You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Competitions__Detail.d1c...

530 lines
1.9 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([[134,5,6,7,8,13,20],{"+NIl":function(H,J,D){(function(M){M(D("VrN/"))})(function(M){"use strict";M.defineMode("stex",function(g,C){"use strict";function N(n,s){n.cmdState.push(s)}function m(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function v(n){var s=n.cmdState.pop();s&&s.closeBracket()}function T(n){for(var s=n.cmdState,d=s.length-1;d>=0;d--){var f=s[d];if(f.name=="DEFAULT")continue;return f}return{styleIdentifier:function(){return null}}}function y(n,s,d){return function(){this.name=n,this.bracketNo=0,this.style=s,this.styles=d,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=y("importmodule","tag",["string","builtin"]),t.documentclass=y("documentclass","tag",["","atom"]),t.usepackage=y("usepackage","tag",["atom"]),t.begin=y("begin","tag",["atom"]),t.end=y("end","tag",["atom"]),t.label=y("label","tag",["atom"]),t.ref=y("ref","tag",["atom"]),t.eqref=y("eqref","tag",["atom"]),t.cite=y("cite","tag",["atom"]),t.bibitem=y("bibitem","tag",["atom"]),t.Bibitem=y("Bibitem","tag",["atom"]),t.RBibitem=y("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function h(n,s){n.f=s}function i(n,s){var d;if(n.match(/^\\[a-zA-Z@]+/)){var f=n.current().slice(1);return d=t.hasOwnProperty(f)?t[f]:t.DEFAULT,d=new d,N(s,d),h(s,a),d.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return h(s,function(o,r){return c(o,r,"\\]")}),"keyword";if(n.match("\\("))return h(s,function(o,r){return c(o,r,"\\)")}),"keyword";if(n.match("$$"))return h(s,function(o,r){return c(o,r,"$$")}),"keyword";if(n.match("$"))return h(s,function(o,r){return c(o,r,"$")}),"keyword";var l=n.next();if(l=="%")return n.skipToEnd(),"comment";if(l=="}"||l=="]"){if(d=m(s),d)d.closeBracket(l),h(s,a);else return"error";return"bracket"}else return l=="{"||l=="["?(d=t.DEFAULT,d=new d,N(s,d),"bracket"):/\d/.test(l)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),d=T(s),d.name=="begin"&&(d.argument=n.current()),d.styleIdentifier())}function c(n,s,d){if(n.eatSpace())return null;if(d&&n.match(d))return h(s,i),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var f=n.next();return f=="{"||f=="}"||f=="["||f=="]"||f=="("||f==")"?"bracket":f=="%"?(n.skipToEnd(),"comment"):"error"}function a(n,s){var d=n.peek(),f;return d=="{"||d=="["?(f=m(s),f.openBracket(d),n.eat(d),h(s,i),"bracket"):/[ \t\r]/.test(d)?(n.eat(d),null):(h(s,i),v(s),i(n,s))}return{startState:function(){var n=C.inMathMode?function(s,d){return c(s,d)}:i;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,s){return s.f(n,s)},blankLine:function(n){n.f=i,n.cmdState.length=0},lineComment:"%"}}),M.defineMIME("text/x-stex","stex"),M.defineMIME("text/x-latex","stex")})},"+ua5":function(H,J,D){},"/cxE":function(H,J,D){"use strict";D.d(J,"f",function(){return C}),D.d(J,"g",function(){return N}),D.d(J,"h",function(){return m}),D.d(J,"e",function(){return T}),D.d(J,"b",function(){return y}),D.d(J,"c",function(){return t}),D.d(J,"d",function(){return h}),D.d(J,"a",function(){return i});class M{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
`+c.stack):c},0)}}emit(c){this.listeners.forEach(a=>{a(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new M;function C(c){T(c)||g.onUnexpectedError(c);return}function N(c){T(c)||g.onUnexpectedExternalError(c);return}function m(c){if(c instanceof Error){let{name:a,message:n}=c;const s=c.stacktrace||c.stack;return{$isError:!0,name:a,message:n,stack:s}}return c}const v="Canceled";function T(c){return c instanceof Error&&c.name===v&&c.message===v}function y(){const c=new Error(v);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 i extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(H,J,D){(function(M){M(D("VrN/"))})(function(M){M.defineOption("placeholder","",function(y,t,h){var i=h&&h!=M.Init;if(t&&!i)y.on("blur",m),y.on("change",v),y.on("swapDoc",v),M.on(y.getInputField(),"compositionupdate",y.state.placeholderCompose=function(){N(y)}),v(y);else if(!t&&i){y.off("blur",m),y.off("change",v),y.off("swapDoc",v),M.off(y.getInputField(),"compositionupdate",y.state.placeholderCompose),g(y);var c=y.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}t&&!y.hasFocus()&&m(y)});function g(y){y.state.placeholder&&(y.state.placeholder.parentNode.removeChild(y.state.placeholder),y.state.placeholder=null)}function C(y){g(y);var t=y.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=y.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var h=y.getOption("placeholder");typeof h=="string"&&(h=document.createTextNode(h)),t.appendChild(h),y.display.lineSpace.insertBefore(t,y.display.lineSpace.firstChild)}function N(y){setTimeout(function(){var t=!1,h=y.getInputField();h.nodeName=="TEXTAREA"?t=!h.value:y.lineCount()==1&&(t=!/[^\u200b]/.test(h.querySelector(".CodeMirror-line").textContent)),t?C(y):g(y)},20)}function m(y){T(y)&&C(y)}function v(y){var t=y.getWrapperElement(),h=T(y);t.className=t.className.replace(" CodeMirror-empty","")+(h?" CodeMirror-empty":""),h?C(y):g(y)}function T(y){return y.lineCount()===1&&y.getLine(0)===""}})},"1ZF9":function(H,J,D){H.exports=D.p+"static/Authorize.cc9c212f.png"},"1eCo":function(H,J,D){(function(M){M(D("VrN/"))})(function(M){"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},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};M.defineMode("xml",function(N,m){var v=N.indentUnit,T={},y=m.htmlMode?g:C;for(var t in y)T[t]=y[t];for(var t in m)T[t]=m[t];var h,i;function c(S,F){function P(z){return F.tokenize=z,z(S,F)}var L=S.next();if(L=="<")return S.eat("!")?S.eat("[")?S.match("CDATA[")?P(s("atom","]]>")):null:S.match("--")?P(s("comment","-->")):S.match("DOCTYPE",!0,!0)?(S.eatWhile(/[\w\._\-]/),P(d(1))):null:S.eat("?")?(S.eatWhile(/[\w\._\-]/),F.tokenize=s("meta","?>"),"meta"):(h=S.eat("/")?"closeTag":"openTag",F.tokenize=a,"tag bracket");if(L=="&"){var G;return S.eat("#")?S.eat("x")?G=S.eatWhile(/[a-fA-F\d]/)&&S.eat(";"):G=S.eatWhile(/[\d]/)&&S.eat(";"):G=S.eatWhile(/[\w\.\-:]/)&&S.eat(";"),G?"atom":"error"}else return S.eatWhile(/[^&<]/),null}c.isInText=!0;function a(S,F){var P=S.next();if(P==">"||P=="/"&&S.eat(">"))return F.tokenize=c,h=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return h="equals",null;if(P=="<"){F.tokenize=c,F.state=r,F.tagName=F.tagStart=null;var L=F.tokenize(S,F);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(P)?(F.tokenize=n(P),F.stringStartCol=S.column(),F.tokenize(S,F)):(S.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(S){var F=function(P,L){for(;!P.eol();)if(P.next()==S){L.tokenize=a;break}return"string"};return F.isInAttribute=!0,F}function s(S,F){return function(P,L){for(;!P.eol();){if(P.match(F)){L.tokenize=c;break}P.next()}return S}}function d(S){return function(F,P){for(var L;(L=F.next())!=null;){if(L=="<")return P.tokenize=d(S+1),P.tokenize(F,P);if(L==">")if(S==1){P.tokenize=c;break}else return P.tokenize=d(S-1),P.tokenize(F,P)}return"meta"}}function f(S,F,P){this.prev=S.context,this.tagName=F,this.indent=S.indented,this.startOfLine=P,(T.doNotIndent.hasOwnProperty(F)||S.context&&S.context.noIndent)&&(this.noIndent=!0)}function l(S){S.context&&(S.context=S.context.prev)}function o(S,F){for(var P;;){if(!S.context)return;if(P=S.context.tagName,!T.contextGrabbers.hasOwnProperty(P)||!T.contextGrabbers[P].hasOwnProperty(F))return;l(S)}}function r(S,F,P){return S=="openTag"?(P.tagStart=F.column(),x):S=="closeTag"?b:r}function x(S,F,P){return S=="word"?(P.tagName=F.current(),i="tag",O):T.allowMissingTagName&&S=="endTag"?(i="tag bracket",O(S,F,P)):(i="error",x)}function b(S,F,P){if(S=="word"){var L=F.current();return P.context&&P.context.tagName!=L&&T.implicitlyClosed.hasOwnProperty(P.context.tagName)&&l(P),P.context&&P.context.tagName==L||T.matchClosing===!1?(i="tag",p):(i="tag error",I)}else return T.allowMissingTagName&&S=="endTag"?(i="tag bracket",p(S,F,P)):(i="error",I)}function p(S,F,P){return S!="endTag"?(i="error",p):(l(P),r)}function I(S,F,P){return i="error",p(S,F,P)}function O(S,F,P){if(S=="word")return i="attribute",_;if(S=="endTag"||S=="selfcloseTag"){var L=P.tagName,G=P.tagStart;return P.tagName=P.tagStart=null,S=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(L)?o(P,L):(o(P,L),P.context=new f(P,L,G==P.indented)),r}return i="error",O}function _(S,F,P){return S=="equals"?E:(T.allowMissing||(i="error"),O(S,F,P))}function E(S,F,P){return S=="string"?w:S=="word"&&T.allowUnquoted?(i="string",O):(i="error",O(S,F,P))}function w(S,F,P){return S=="string"?w:O(S,F,P)}return{startState:function(S){var F={tokenize:c,state:r,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 P=F.tokenize(S,F);return(P||h)&&P!="comment"&&(i=null,F.state=F.state(h||P,S,F),i&&(P=i=="error"?P+" error":i)),P},indent:function(S,F,P){var L=S.context;if(S.tokenize.isInAttribute)return S.tagStart==S.indented?S.stringStartCol+1:S.indented+v;if(L&&L.noIndent)return M.Pass;if(S.tokenize!=a&&S.tokenize!=c)return P?P.match(/^(\s*)/)[0].length:0;if(S.tagName)return T.multilineTagIndentPastTag!==!1?S.tagStart+S.tagName.length+2:S.tagStart+v*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var G=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(G&&G[1])for(;L;)if(L.tagName==G[2]){L=L.prev;break}else if(T.implicitlyClosed.hasOwnProperty(L.tagName))L=L.prev;else break;else if(G)for(;L;){var z=T.contextGrabbers[L.tagName];if(z&&z.hasOwnProperty(G[2]))L=L.prev;else break}for(;L&&L.prev&&!L.startOfLine;)L=L.prev;return L?L.indent+v:S.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(S){S.state==E&&(S.state=O)},xmlCurrentTag:function(S){return S.tagName?{name:S.tagName,close:S.type=="closeTag"}:null},xmlCurrentContext:function(S){for(var F=[],P=S.context;P;P=P.prev)P.tagName&&F.push(P.tagName);return F.reverse()}}}),M.defineMIME("text/xml","xml"),M.defineMIME("application/xml","xml"),M.mimeModes.hasOwnProperty("text/html")||M.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.Hasher,m=g.x64,v=m.Word,T=m.WordArray,y=g.algo;function t(){return v.create.apply(v,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)],i=[];(function(){for(var a=0;a<80;a++)i[a]=t()})();var c=y.SHA512=N.extend({_doReset:function(){this._hash=new T.init([new v.init(1779033703,4089235720),new v.init(3144134277,2227873595),new v.init(1013904242,4271175723),new v.init(2773480762,1595750129),new v.init(1359893119,2917565137),new v.init(2600822924,725511199),new v.init(528734635,4215389547),new v.init(1541459225,327033209)])},_doProcessBlock:function(a,n){for(var s=this._hash.words,d=s[0],f=s[1],l=s[2],o=s[3],r=s[4],x=s[5],b=s[6],p=s[7],I=d.high,O=d.low,_=f.high,E=f.low,w=l.high,S=l.low,F=o.high,P=o.low,L=r.high,G=r.low,z=x.high,A=x.low,B=b.high,U=b.low,R=p.high,K=p.low,Z=I,ue=O,de=_,Ce=E,Re=w,me=S,Oe=F,be=P,ce=L,le=G,ne=z,ge=A,te=B,re=U,Se=R,ie=K,q=0;q<80;q++){var Y,X,he=i[q];if(q<16)X=he.high=a[n+q*2]|0,Y=he.low=a[n+q*2+1]|0;else{var fe=i[q-15],xe=fe.high,Ke=fe.low,Ze=(xe>>>1|Ke<<31)^(xe>>>8|Ke<<24)^xe>>>7,et=(Ke>>>1|xe<<31)^(Ke>>>8|xe<<24)^(Ke>>>7|xe<<25),st=i[q-2],ut=st.high,dt=st.low,Fe=(ut>>>19|dt<<13)^(ut<<3|dt>>>29)^ut>>>6,Ie=(dt>>>19|ut<<13)^(dt<<3|ut>>>29)^(dt>>>6|ut<<26),ot=i[q-7],ft=ot.high,Qe=ot.low,tt=i[q-16],Be=tt.high,ke=tt.low;Y=et+Qe,X=Ze+ft+(Y>>>0<et>>>0?1:0),Y=Y+Ie,X=X+Fe+(Y>>>0<Ie>>>0?1:0),Y=Y+ke,X=X+Be+(Y>>>0<ke>>>0?1:0),he.high=X,he.low=Y}var Ne=ce&ne^~ce&te,Ee=le&ge^~le&re,Ae=Z&de^Z&Re^de&Re,Le=ue&Ce^ue&me^Ce&me,Me=(Z>>>28|ue<<4)^(Z<<30|ue>>>2)^(Z<<25|ue>>>7),He=(ue>>>28|Z<<4)^(ue<<30|Z>>>2)^(ue<<25|Z>>>7),nt=(ce>>>14|le<<18)^(ce>>>18|le<<14)^(ce<<23|le>>>9),vt=(le>>>14|ce<<18)^(le>>>18|ce<<14)^(le<<23|ce>>>9),bt=h[q],Wt=bt.high,Bt=bt.low,lr=ie+vt,dr=Se+nt+(lr>>>0<ie>>>0?1:0),lr=lr+Ee,dr=dr+Ne+(lr>>>0<Ee>>>0?1:0),lr=lr+Bt,dr=dr+Wt+(lr>>>0<Bt>>>0?1:0),lr=lr+Y,dr=dr+X+(lr>>>0<Y>>>0?1:0),Ot=He+Le,Vr=Me+Ae+(Ot>>>0<He>>>0?1:0);Se=te,ie=re,te=ne,re=ge,ne=ce,ge=le,le=be+lr|0,ce=Oe+dr+(le>>>0<be>>>0?1:0)|0,Oe=Re,be=me,Re=de,me=Ce,de=Z,Ce=ue,ue=lr+Ot|0,Z=dr+Vr+(ue>>>0<lr>>>0?1:0)|0}O=d.low=O+ue,d.high=I+Z+(O>>>0<ue>>>0?1:0),E=f.low=E+Ce,f.high=_+de+(E>>>0<Ce>>>0?1:0),S=l.low=S+me,l.high=w+Re+(S>>>0<me>>>0?1:0),P=o.low=P+be,o.high=F+Oe+(P>>>0<be>>>0?1:0),G=r.low=G+le,r.high=L+ce+(G>>>0<le>>>0?1:0),A=x.low=A+ge,x.high=z+ne+(A>>>0<ge>>>0?1:0),U=b.low=U+re,b.high=B+te+(U>>>0<re>>>0?1:0),K=p.low=K+ie,p.high=R+Se+(K>>>0<ie>>>0?1:0)},_doFinalize:function(){var a=this._data,n=a.words,s=this._nDataBytes*8,d=a.sigBytes*8;n[d>>>5]|=128<<24-d%32,n[(d+128>>>10<<5)+30]=Math.floor(s/4294967296),n[(d+128>>>10<<5)+31]=s,a.sigBytes=n.length*4,this._process();var f=this._hash.toX32();return f},clone:function(){var a=N.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:1024/32});g.SHA512=N._createHelper(c),g.HmacSHA512=N._createHmacHelper(c)}(),M.SHA512})},"24hK":function(H,J,D){"use strict";D.d(J,"a",function(){return g});class M{constructor(C){this.element=C,this.next=M.Undefined,this.prev=M.Undefined}}M.Undefined=new M(void 0);class g{constructor(){this._first=M.Undefined,this._last=M.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===M.Undefined}clear(){let C=this._first;for(;C!==M.Undefined;){const N=C.next;C.prev=M.Undefined,C.next=M.Undefined,C=N}this._first=M.Undefined,this._last=M.Undefined,this._size=0}unshift(C){return this._insert(C,!1)}push(C){return this._insert(C,!0)}_insert(C,N){const m=new M(C);if(this._first===M.Undefined)this._first=m,this._last=m;else if(N){const T=this._last;this._last=m,m.prev=T,T.next=m}else{const T=this._first;this._first=m,m.next=T,T.prev=m}this._size+=1;let v=!1;return()=>{v||(v=!0,this._remove(m))}}shift(){if(this._first===M.Undefined)return;{const C=this._first.element;return this._remove(this._first),C}}pop(){if(this._last===M.Undefined)return;{const C=this._last.element;return this._remove(this._last),C}}_remove(C){if(C.prev!==M.Undefined&&C.next!==M.Undefined){const N=C.prev;N.next=C.next,C.next.prev=N}else C.prev===M.Undefined&&C.next===M.Undefined?(this._first=M.Undefined,this._last=M.Undefined):C.next===M.Undefined?(this._last=this._last.prev,this._last.next=M.Undefined):C.prev===M.Undefined&&(this._first=this._first.next,this._first.prev=M.Undefined);this._size-=1}*[Symbol.iterator](){let C=this._first;for(;C!==M.Undefined;)yield C.element,C=C.next}}},"3/fG":function(H,J,D){"use strict";D.d(J,"a",function(){return g});function M(C,N){let m;return N.length===0?m=C:m=C.replace(/\{(\d+)\}/g,function(v,T){const y=T[0];return typeof N[y]!="undefined"?N[y]:v}),m}function g(C,N,...m){return M(N,m)}},"3y9D":function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.WordArray,m=C.Hasher,v=g.algo,T=[],y=v.SHA1=m.extend({_doReset:function(){this._hash=new N.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,h){for(var i=this._hash.words,c=i[0],a=i[1],n=i[2],s=i[3],d=i[4],f=0;f<80;f++){if(f<16)T[f]=t[h+f]|0;else{var l=T[f-3]^T[f-8]^T[f-14]^T[f-16];T[f]=l<<1|l>>>31}var o=(c<<5|c>>>27)+d+T[f];f<20?o+=(a&n|~a&s)+1518500249:f<40?o+=(a^n^s)+1859775393:f<60?o+=(a&n|a&s|n&s)-1894007588:o+=(a^n^s)-899497514,d=s,s=n,n=a<<30|a>>>2,a=c,c=o}i[0]=i[0]+c|0,i[1]=i[1]+a|0,i[2]=i[2]+n|0,i[3]=i[3]+s|0,i[4]=i[4]+d|0},_doFinalize:function(){var t=this._data,h=t.words,i=this._nDataBytes*8,c=t.sigBytes*8;return h[c>>>5]|=128<<24-c%32,h[(c+64>>>9<<4)+14]=Math.floor(i/4294967296),h[(c+64>>>9<<4)+15]=i,t.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var t=m.clone.call(this);return t._hash=this._hash.clone(),t}});g.SHA1=m._createHelper(y),g.HmacSHA1=m._createHmacHelper(y)}(),M.SHA1})},4:function(H,J){},"55Ip":function(H,J,D){"use strict";D.d(J,"a",function(){return o});var M=D("Ty5D"),g=D("dI71"),C=D("q1tI"),N=D.n(C),m=D("YS25"),v=D("17x9"),T=D.n(v),y=D("wx14"),t=D("zLVn"),h=D("9R94"),i=function(E){Object(g.a)(w,E);function w(){for(var F,P=arguments.length,L=new Array(P),G=0;G<P;G++)L[G]=arguments[G];return F=E.call.apply(E,[this].concat(L))||this,F.history=Object(m.a)(F.props),F}var S=w.prototype;return S.render=function(){return N.a.createElement(M.c,{history:this.history,children:this.props.children})},w}(N.a.Component),c=function(E){Object(g.a)(w,E);function w(){for(var F,P=arguments.length,L=new Array(P),G=0;G<P;G++)L[G]=arguments[G];return F=E.call.apply(E,[this].concat(L))||this,F.history=Object(m.b)(F.props),F}var S=w.prototype;return S.render=function(){return N.a.createElement(M.c,{history:this.history,children:this.props.children})},w}(N.a.Component),a=function(w,S){return typeof w=="function"?w(S):w},n=function(w,S){return typeof w=="string"?Object(m.c)(w,null,null,S):w},s=function(w){return w},d=N.a.forwardRef;typeof d=="undefined"&&(d=s);function f(E){return!!(E.metaKey||E.altKey||E.ctrlKey||E.shiftKey)}var l=d(function(E,w){var S=E.innerRef,F=E.navigate,P=E.onClick,L=Object(t.a)(E,["innerRef","navigate","onClick"]),G=L.target,z=Object(y.a)({},L,{onClick:function(B){try{P&&P(B)}catch(U){throw B.preventDefault(),U}!B.defaultPrevented&&B.button===0&&(!G||G==="_self")&&!f(B)&&(B.preventDefault(),F())}});return s!==d?z.ref=w||S:z.ref=S,N.a.createElement("a",z)}),o=d(function(E,w){var S=E.component,F=S===void 0?l:S,P=E.replace,L=E.to,G=E.innerRef,z=Object(t.a)(E,["component","replace","to","innerRef"]);return N.a.createElement(M.e.Consumer,null,function(A){A||Object(h.a)(!1);var B=A.history,U=n(a(L,A.location),A.location),R=U?B.createHref(U):"",K=Object(y.a)({},z,{href:R,navigate:function(){var ue=a(L,A.location),de=P?B.replace:B.push;de(ue)}});return s!==d?K.ref=w||G:K.innerRef=G,N.a.createElement(F,K)})});if(!1)var r,x;var b=function(w){return w},p=N.a.forwardRef;typeof p=="undefined"&&(p=b);function I(){for(var E=arguments.length,w=new Array(E),S=0;S<E;S++)w[S]=arguments[S];return w.filter(function(F){return F}).join(" ")}var O=p(function(E,w){var S=E["aria-current"],F=S===void 0?"page":S,P=E.activeClassName,L=P===void 0?"active":P,G=E.activeStyle,z=E.className,A=E.exact,B=E.isActive,U=E.location,R=E.sensitive,K=E.strict,Z=E.style,ue=E.to,de=E.innerRef,Ce=Object(t.a)(E,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return N.a.createElement(M.e.Consumer,null,function(Re){Re||Object(h.a)(!1);var me=U||Re.location,Oe=n(a(ue,me),me),be=Oe.pathname,ce=be&&be.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),le=ce?Object(M.f)(me.pathname,{path:ce,exact:A,sensitive:R,strict:K}):null,ne=!!(B?B(le,me):le),ge=ne?I(z,L):z,te=ne?Object(y.a)({},Z,{},G):Z,re=Object(y.a)({"aria-current":ne&&F||null,className:ge,style:te,to:Oe},Ce);return b!==p?re.ref=w||de:re.innerRef=de,N.a.createElement(o,re)})});if(!1)var _},"5VLF":function(H,J,D){"use strict";var M,g;function C(N,m,v){var T=function(y,t){return N.js_beautify(y,t)};return T.js=N.js_beautify,T.css=m.css_beautify,T.html=v.html_beautify,T.js_beautify=N.js_beautify,T.css_beautify=m.css_beautify,T.html_beautify=v.html_beautify,T}!(M=[D("6UM0"),D("TXwP"),D("psGv")],g=function(N,m,v){return C(N,m,v)}.apply(J,M),g!==void 0&&(H.exports=g))},"5Y4S":function(H,J,D){"use strict";D.d(J,"a",function(){return C});var M=D("MNsG");const g=M.b.performance&&typeof M.b.performance.now=="function";class C{constructor(N){this._highResolution=g&&N,this._startTime=this._now(),this._stopTime=-1}static create(N=!0){return new C(N)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?M.b.performance.now():Date.now()}}},"5hvy":function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"))})(this,function(M){return function(g){var C=M,N=C.lib,m=N.WordArray,v=N.Hasher,T=C.x64,y=T.Word,t=C.algo,h=[],i=[],c=[];(function(){for(var s=1,d=0,f=0;f<24;f++){h[s+5*d]=(f+1)*(f+2)/2%64;var l=d%5,o=(2*s+3*d)%5;s=l,d=o}for(var s=0;s<5;s++)for(var d=0;d<5;d++)i[s+5*d]=d+(2*s+3*d)%5*5;for(var r=1,x=0;x<24;x++){for(var b=0,p=0,I=0;I<7;I++){if(r&1){var O=(1<<I)-1;O<32?p^=1<<O:b^=1<<O-32}r&128?r=r<<1^113:r<<=1}c[x]=y.create(b,p)}})();var a=[];(function(){for(var s=0;s<25;s++)a[s]=y.create()})();var n=t.SHA3=v.extend({cfg:v.cfg.extend({outputLength:512}),_doReset:function(){for(var s=this._state=[],d=0;d<25;d++)s[d]=new y.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(s,d){for(var f=this._state,l=this.blockSize/2,o=0;o<l;o++){var r=s[d+2*o],x=s[d+2*o+1];r=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360;var b=f[o];b.high^=x,b.low^=r}for(var p=0;p<24;p++){for(var I=0;I<5;I++){for(var O=0,_=0,E=0;E<5;E++){var b=f[I+5*E];O^=b.high,_^=b.low}var w=a[I];w.high=O,w.low=_}for(var I=0;I<5;I++)for(var S=a[(I+4)%5],F=a[(I+1)%5],P=F.high,L=F.low,O=S.high^(P<<1|L>>>31),_=S.low^(L<<1|P>>>31),E=0;E<5;E++){var b=f[I+5*E];b.high^=O,b.low^=_}for(var G=1;G<25;G++){var O,_,b=f[G],z=b.high,A=b.low,B=h[G];B<32?(O=z<<B|A>>>32-B,_=A<<B|z>>>32-B):(O=A<<B-32|z>>>64-B,_=z<<B-32|A>>>64-B);var U=a[i[G]];U.high=O,U.low=_}var R=a[0],K=f[0];R.high=K.high,R.low=K.low;for(var I=0;I<5;I++)for(var E=0;E<5;E++){var G=I+5*E,b=f[G],Z=a[G],ue=a[(I+1)%5+5*E],de=a[(I+2)%5+5*E];b.high=Z.high^~ue.high&de.high,b.low=Z.low^~ue.low&de.low}var b=f[0],Ce=c[p];b.high^=Ce.high,b.low^=Ce.low}},_doFinalize:function(){var s=this._data,d=s.words,f=this._nDataBytes*8,l=s.sigBytes*8,o=this.blockSize*32;d[l>>>5]|=1<<24-l%32,d[(g.ceil((l+1)/o)*o>>>5)-1]|=128,s.sigBytes=d.length*4,this._process();for(var r=this._state,x=this.cfg.outputLength/8,b=x/8,p=[],I=0;I<b;I++){var O=r[I],_=O.high,E=O.low;_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,p.push(E),p.push(_)}return new m.init(p,x)},clone:function(){for(var s=v.clone.call(this),d=s._state=this._state.slice(0),f=0;f<25;f++)d[f]=d[f].clone();return s}});C.SHA3=v._createHelper(n),C.HmacSHA3=v._createHmacHelper(n)}(Math),M.SHA3})},"6+eU":function(H,J,D){"use strict";D.d(J,"a",function(){return p});var M=D("wx14"),g=D("rePB"),C=D("VTBJ"),N=D("1OyB"),m=D("vuIU"),v=D("Ji7U"),T=D("LK+K"),y=D("q1tI"),t=D.n(y),h=D("TSYQ"),i=D.n(h),c=function(O){var _,E="".concat(O.rootPrefixCls,"-item"),w=i()(E,"".concat(E,"-").concat(O.page),(_={},Object(g.a)(_,"".concat(E,"-active"),O.active),Object(g.a)(_,O.className,!!O.className),Object(g.a)(_,"".concat(E,"-disabled"),!O.page),_)),S=function(){O.onClick(O.page)},F=function(L){O.onKeyPress(L,O.onClick,O.page)};return t.a.createElement("li",{title:O.showTitle?O.page:null,className:w,onClick:S,onKeyPress:F,tabIndex:"0"},O.itemRender(O.page,"page",t.a.createElement("a",{rel:"nofollow"},O.page)))},a=c,n={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},s=function(I){Object(v.a)(_,I);var O=Object(T.a)(_);function _(){var E;Object(N.a)(this,_);for(var w=arguments.length,S=new Array(w),F=0;F<w;F++)S[F]=arguments[F];return E=O.call.apply(O,[this].concat(S)),E.state={goInputText:""},E.buildOptionText=function(P){return"".concat(P," ").concat(E.props.locale.items_per_page)},E.changeSize=function(P){E.props.changeSize(Number(P))},E.handleChange=function(P){E.setState({goInputText:P.target.value})},E.handleBlur=function(P){var L=E.props,G=L.goButton,z=L.quickGo,A=L.rootPrefixCls,B=E.state.goInputText;if(G||B==="")return;if(P.relatedTarget&&(P.relatedTarget.className.indexOf("".concat(A,"-prev"))>=0||P.relatedTarget.className.indexOf("".concat(A,"-next"))>=0))return;E.setState({goInputText:""}),z(E.getValidValue())},E.go=function(P){var L=E.state.goInputText;if(L==="")return;(P.keyCode===n.ENTER||P.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(m.a)(_,[{key:"getValidValue",value:function(){var w=this.state,S=w.goInputText,F=w.current;return!S||isNaN(S)?F:Number(S)}},{key:"getPageSizeOptions",value:function(){var w=this.props,S=w.pageSize,F=w.pageSizeOptions;return F.some(function(P){return P.toString()===S.toString()})?F:F.concat([S.toString()]).sort(function(P,L){var G=isNaN(Number(P))?0:Number(P),z=isNaN(Number(L))?0:Number(L);return G-z})}},{key:"render",value:function(){var w=this,S=this.props,F=S.pageSize,P=S.locale,L=S.rootPrefixCls,G=S.changeSize,z=S.quickGo,A=S.goButton,B=S.selectComponentClass,U=S.buildOptionText,R=S.selectPrefixCls,K=S.disabled,Z=this.state.goInputText,ue="".concat(L,"-options"),de=B,Ce=null,Re=null,me=null;if(!G&&!z)return null;var Oe=this.getPageSizeOptions();if(G&&de){var be=Oe.map(function(ce,le){return t.a.createElement(de.Option,{key:le,value:ce.toString()},(U||w.buildOptionText)(ce))});Ce=t.a.createElement(de,{disabled:K,prefixCls:R,showSearch:!1,className:"".concat(ue,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},be)}return z&&(A&&(me=typeof A=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:K,className:"".concat(ue,"-quick-jumper-button")},P.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},A)),Re=t.a.createElement("div",{className:"".concat(ue,"-quick-jumper")},P.jump_to,t.a.createElement("input",{disabled:K,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),P.page,me)),t.a.createElement("li",{className:"".concat(ue)},Ce,Re)}}]),_}(t.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=s,f=D("N2Kk");function l(){}function o(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I}function r(I,O,_){return _}function x(I,O,_){var E=typeof I=="undefined"?O.pageSize:I;return Math.floor((_.total-1)/E)+1}var b=function(I){Object(v.a)(_,I);var O=Object(T.a)(_);function _(E){var w;Object(N.a)(this,_),w=O.call(this,E),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(x(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(G,z){var A=w.props.prefixCls,B=G||t.a.createElement("button",{type:"button","aria-label":z,className:"".concat(A,"-item-link")});return typeof G=="function"&&(B=t.a.createElement(G,Object(C.a)({},w.props))),B},w.savePaginationNode=function(G){w.paginationNode=G},w.isValid=function(G){return o(G)&&G!==w.state.current},w.shouldDisplayQuickJumper=function(){var G=w.props,z=G.showQuickJumper,A=G.pageSize,B=G.total;return B<=A?!1:z},w.handleKeyDown=function(G){(G.keyCode===n.ARROW_UP||G.keyCode===n.ARROW_DOWN)&&G.preventDefault()},w.handleKeyUp=function(G){var z=w.getValidValue(G),A=w.state.currentInputValue;z!==A&&w.setState({currentInputValue:z}),G.keyCode===n.ENTER?w.handleChange(z):G.keyCode===n.ARROW_UP?w.handleChange(z-1):G.keyCode===n.ARROW_DOWN&&w.handleChange(z+1)},w.changePageSize=function(G){var z=w.state.current,A=x(G,w.state,w.props);z=z>A?A:z,A===0&&(z=w.state.current),typeof G=="number"&&("pageSize"in w.props||w.setState({pageSize:G}),"current"in w.props||w.setState({current:z,currentInputValue:z})),w.props.onShowSizeChange(z,G),"onChange"in w.props&&w.props.onChange&&w.props.onChange(z,G)},w.handleChange=function(G){var z=w.props.disabled,A=G;if(w.isValid(A)&&!z){var B=x(void 0,w.state,w.props);A>B?A=B:A<1&&(A=1),"current"in w.props||w.setState({current:A,currentInputValue:A});var U=w.state.pageSize;return w.props.onChange(A,U),A}return w.state.current},w.prev=function(){w.hasPrev()&&w.handleChange(w.state.current-1)},w.next=function(){w.hasNext()&&w.handleChange(w.state.current+1)},w.jumpPrev=function(){w.handleChange(w.getJumpPrevPage())},w.jumpNext=function(){w.handleChange(w.getJumpNextPage())},w.hasPrev=function(){return w.state.current>1},w.hasNext=function(){return w.state.current<x(void 0,w.state,w.props)},w.runIfEnter=function(G,z){if(G.key==="Enter"||G.charCode===13){for(var A=arguments.length,B=new Array(A>2?A-2:0),U=2;U<A;U++)B[U-2]=arguments[U];z.apply(void 0,B)}},w.runIfEnterPrev=function(G){w.runIfEnter(G,w.prev)},w.runIfEnterNext=function(G){w.runIfEnter(G,w.next)},w.runIfEnterJumpPrev=function(G){w.runIfEnter(G,w.jumpPrev)},w.runIfEnterJumpNext=function(G){w.runIfEnter(G,w.jumpNext)},w.handleGoTO=function(G){(G.keyCode===n.ENTER||G.type==="click")&&w.handleChange(w.state.currentInputValue)};var S=E.onChange!==l,F="current"in E;F&&!S&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var P=E.defaultCurrent;"current"in E&&(P=E.current);var L=E.defaultPageSize;return"pageSize"in E&&(L=E.pageSize),P=Math.min(P,x(L,void 0,E)),w.state={current:P,currentInputValue:P,pageSize:L},w}return Object(m.a)(_,[{key:"componentDidUpdate",value:function(w,S){var F=this.props.prefixCls;if(S.current!==this.state.current&&this.paginationNode){var P=this.paginationNode.querySelector(".".concat(F,"-item-").concat(S.current));P&&document.activeElement===P&&P.blur()}}},{key:"getValidValue",value:function(w){var S=w.target.value,F=x(void 0,this.state,this.props),P=this.state.currentInputValue,L;return S===""?L=S:isNaN(Number(S))?L=P:S>=F?L=F:L=Number(S),L}},{key:"getShowSizeChanger",value:function(){var w=this.props,S=w.showSizeChanger,F=w.total,P=w.totalBoundaryShowSizeChanger;return typeof S!="undefined"?S:F>P}},{key:"renderPrev",value:function(w){var S=this.props,F=S.prevIcon,P=S.itemRender,L=P(w,"prev",this.getItemIcon(F,"prev page")),G=!this.hasPrev();return Object(y.isValidElement)(L)?Object(y.cloneElement)(L,{disabled:G}):L}},{key:"renderNext",value:function(w){var S=this.props,F=S.nextIcon,P=S.itemRender,L=P(w,"next",this.getItemIcon(F,"next page")),G=!this.hasNext();return Object(y.isValidElement)(L)?Object(y.cloneElement)(L,{disabled:G}):L}},{key:"render",value:function(){var w=this,S=this.props,F=S.prefixCls,P=S.className,L=S.style,G=S.disabled,z=S.hideOnSinglePage,A=S.total,B=S.locale,U=S.showQuickJumper,R=S.showLessItems,K=S.showTitle,Z=S.showTotal,ue=S.simple,de=S.itemRender,Ce=S.showPrevNextJumpers,Re=S.jumpPrevIcon,me=S.jumpNextIcon,Oe=S.selectComponentClass,be=S.selectPrefixCls,ce=S.pageSizeOptions,le=this.state,ne=le.current,ge=le.pageSize,te=le.currentInputValue;if(z===!0&&A<=ge)return null;var re=x(void 0,this.state,this.props),Se=[],ie=null,q=null,Y=null,X=null,he=null,fe=U&&U.goButton,xe=R?1:2,Ke=ne-1>0?ne-1:0,Ze=ne+1<re?ne+1:re,et=Object.keys(this.props).reduce(function(Ee,Ae){return(Ae.substr(0,5)==="data-"||Ae.substr(0,5)==="aria-"||Ae==="role")&&(Ee[Ae]=w.props[Ae]),Ee},{});if(ue)return fe&&(typeof fe=="boolean"?he=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},B.jump_to_confirm):he=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fe),he=t.a.createElement("li",{title:K?"".concat(B.jump_to).concat(ne,"/").concat(re):null,className:"".concat(F,"-simple-pager")},he)),t.a.createElement("ul",Object(M.a)({className:i()(F,"".concat(F,"-simple"),Object(g.a)({},"".concat(F,"-disabled"),G),P),style:L,ref:this.savePaginationNode},et),t.a.createElement("li",{title:K?B.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ke)),t.a.createElement("li",{title:K?"".concat(ne,"/").concat(re):null,className:"".concat(F,"-simple-pager")},t.a.createElement("input",{type:"text",value:te,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(F,"-slash")},"/"),re),t.a.createElement("li",{title:K?B.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ze)),he);if(re<=3+xe*2){var st={locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:K,itemRender:de};re||Se.push(t.a.createElement(a,Object(M.a)({},st,{key:"noPager",page:re,className:"".concat(F,"-disabled")})));for(var ut=1;ut<=re;ut+=1){var dt=ne===ut;Se.push(t.a.createElement(a,Object(M.a)({},st,{key:ut,page:ut,active:dt})))}}else{var Fe=R?B.prev_3:B.prev_5,Ie=R?B.next_3:B.next_5;Ce&&(ie=t.a.createElement("li",{title:K?Fe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(F,"-jump-prev"),Object(g.a)({},"".concat(F,"-jump-prev-custom-icon"),!!Re))},de(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Re,"prev page"))),q=t.a.createElement("li",{title:K?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(F,"-jump-next"),Object(g.a)({},"".concat(F,"-jump-next-custom-icon"),!!me))},de(this.getJumpNextPage(),"jump-next",this.getItemIcon(me,"next page")))),X=t.a.createElement(a,{locale:B,last:!0,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:re,page:re,active:!1,showTitle:K,itemRender:de}),Y=t.a.createElement(a,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:K,itemRender:de});var ot=Math.max(1,ne-xe),ft=Math.min(ne+xe,re);ne-1<=xe&&(ft=1+xe*2),re-ne<=xe&&(ot=re-xe*2);for(var Qe=ot;Qe<=ft;Qe+=1){var tt=ne===Qe;Se.push(t.a.createElement(a,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:tt,showTitle:K,itemRender:de}))}ne-1>=xe*2&&ne!==1+2&&(Se[0]=Object(y.cloneElement)(Se[0],{className:"".concat(F,"-item-after-jump-prev")}),Se.unshift(ie)),re-ne>=xe*2&&ne!==re-2&&(Se[Se.length-1]=Object(y.cloneElement)(Se[Se.length-1],{className:"".concat(F,"-item-before-jump-next")}),Se.push(q)),ot!==1&&Se.unshift(Y),ft!==re&&Se.push(X)}var Be=null;Z&&(Be=t.a.createElement("li",{className:"".concat(F,"-total-text")},Z(A,[A===0?0:(ne-1)*ge+1,ne*ge>A?A:ne*ge])));var ke=!this.hasPrev()||!re,Ne=!this.hasNext()||!re;return t.a.createElement("ul",Object(M.a)({className:i()(F,P,Object(g.a)({},"".concat(F,"-disabled"),G)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},et),Be,t.a.createElement("li",{title:K?B.prev_page:null,onClick:this.prev,tabIndex:ke?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),ke)),"aria-disabled":ke},this.renderPrev(Ke)),Se,t.a.createElement("li",{title:K?B.next_page:null,onClick:this.next,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),Ne)),"aria-disabled":Ne},this.renderNext(Ze)),t.a.createElement(d,{disabled:G,locale:B,rootPrefixCls:F,selectComponentClass:Oe,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ne,pageSize:ge,pageSizeOptions:ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:fe}))}}],[{key:"getDerivedStateFromProps",value:function(w,S){var F={};if("current"in w&&(F.current=w.current,w.current!==S.current&&(F.currentInputValue=F.current)),"pageSize"in w&&w.pageSize!==S.pageSize){var P=S.current,L=x(w.pageSize,S,w);P=P>L?L:P,"current"in w||(F.current=P,F.currentInputValue=P),F.pageSize=w.pageSize}return F}}]),_}(t.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:l,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:l,locale:f.a,style:{},itemRender:r,totalBoundaryShowSizeChanger:50};var p=b},"6RRn":function(H,J,D){"use strict";var M=D("wCXF"),g=D("n6Qo");D.d(J,"b",function(){return g.a});var C=D("IBYe"),N=D("6eGT"),m=D("hW8S");D.d(J,"a",function(){return m.a}),J.c=M.b},"6UM0":function(H,J,D){var M,g;(function(){var C;(function(){"use strict";var m=[function(t,h,i){var c=i(1).Beautifier,a=i(5).Options;function n(s,d){var f=new c(s,d);return f.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new a}},function(t,h,i){var c=i(2).Output,a=i(3).Token,n=i(4),s=i(5).Options,d=i(7).Tokenizer,f=i(7).line_starters,l=i(7).positionable_operators,o=i(7).TOKEN;function r(R,K){return K.indexOf(R)!==-1}function x(R){return R.replace(/^\s+/g,"")}function b(R){for(var K={},Z=0;Z<R.length;Z++)K[R[Z].replace(/-/g,"_")]=R[Z];return K}function p(R,K){return R&&R.type===o.RESERVED&&R.text===K}function I(R,K){return R&&R.type===o.RESERVED&&r(R.text,K)}var O=["case","return","do","if","throw","else","await","break","continue","async"],_=["before-newline","after-newline","preserve-newline"],E=b(_),w=[E.before_newline,E.preserve_newline],S={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function F(R,K){if(K.multiline_frame||K.mode===S.ForInitializer||K.mode===S.Conditional)return;R.remove_indent(K.start_line_index)}function P(R){R=R.replace(n.allLineBreaks,`
`);for(var K=[],Z=R.indexOf(`
`);Z!==-1;)K.push(R.substring(0,Z)),R=R.substring(Z+1),Z=R.indexOf(`
`);return R.length&&K.push(R),K}function L(R){return R===S.ArrayLiteral}function G(R){return r(R,[S.Expression,S.ForInitializer,S.Conditional])}function z(R,K){for(var Z=0;Z<R.length;Z++){var ue=R[Z].trim();if(ue.charAt(0)!==K)return!1}return!0}function A(R,K){for(var Z=0,ue=R.length,de;Z<ue;Z++)if(de=R[Z],de&&de.indexOf(K)!==0)return!1;return!0}function B(R,K){K=K||{},this._source_text=R||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new s(K)}B.prototype.create_flags=function(R,K){var Z=0;R&&(Z=R.indentation_level,!this._output.just_added_newline()&&R.line_indent_level>Z&&(Z=R.line_indent_level));var ue={mode:K,parent:R,last_token:R?R.last_token:new a(o.START_BLOCK,""),last_word:R?R.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:Z,alignment:0,line_indent_level:R?R.line_indent_level:Z,start_line_index:this._output.get_line_number(),ternary_depth:0};return ue},B.prototype._reset=function(R){var K=R.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 Z=new d(R,this._options);return this._tokens=Z.tokenize(),R},B.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R,K=this._reset(this._source_text),Z=this._options.eol;this._options.eol==="auto"&&(Z=`
`,K&&n.lineBreak.test(K||"")&&(Z=K.match(n.lineBreak)[0]));for(var ue=this._tokens.next();ue;)this.handle_token(ue),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ue,ue=this._tokens.next();return R=this._output.get_code(Z),R},B.prototype.handle_token=function(R,K){R.type===o.START_EXPR?this.handle_start_expr(R):R.type===o.END_EXPR?this.handle_end_expr(R):R.type===o.START_BLOCK?this.handle_start_block(R):R.type===o.END_BLOCK?this.handle_end_block(R):R.type===o.WORD?this.handle_word(R):R.type===o.RESERVED?this.handle_word(R):R.type===o.SEMICOLON?this.handle_semicolon(R):R.type===o.STRING?this.handle_string(R):R.type===o.EQUALS?this.handle_equals(R):R.type===o.OPERATOR?this.handle_operator(R):R.type===o.COMMA?this.handle_comma(R):R.type===o.BLOCK_COMMENT?this.handle_block_comment(R,K):R.type===o.COMMENT?this.handle_comment(R,K):R.type===o.DOT?this.handle_dot(R):R.type===o.EOF?this.handle_eof(R):R.type===o.UNKNOWN?this.handle_unknown(R,K):this.handle_unknown(R,K)},B.prototype.handle_whitespace_and_comments=function(R,K){var Z=R.newlines,ue=this._options.keep_array_indentation&&L(this._flags.mode);if(R.comments_before)for(var de=R.comments_before.next();de;)this.handle_whitespace_and_comments(de,K),this.handle_token(de,K),de=R.comments_before.next();if(ue)for(var Ce=0;Ce<Z;Ce+=1)this.print_newline(Ce>0,K);else if(this._options.max_preserve_newlines&&Z>this._options.max_preserve_newlines&&(Z=this._options.max_preserve_newlines),this._options.preserve_newlines&&Z>1){this.print_newline(!1,K);for(var Re=1;Re<Z;Re+=1)this.print_newline(!0,K)}};var U=["async","break","continue","return","throw","yield"];B.prototype.allow_wrap_or_preserved_newline=function(R,K){if(K=K===void 0?!1:K,this._output.just_added_newline())return;var Z=this._options.preserve_newlines&&R.newlines||K,ue=r(this._flags.last_token.text,l)||r(R.text,l);if(ue){var de=r(this._flags.last_token.text,l)&&r(this._options.operator_position,w)||r(R.text,l);Z=Z&&de}if(Z)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(I(this._flags.last_token,U))return;this._output.set_wrap_point()}},B.prototype.print_newline=function(R,K){if(!K&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var Z=this._tokens.peek();this._flags.mode===S.Statement&&!(this._flags.if_block&&p(Z,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(R)&&(this._flags.multiline_frame=!0)},B.prototype.print_token_line_indentation=function(R){this._output.just_added_newline()&&(this._options.keep_array_indentation&&R.newlines&&(R.text==="["||L(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(R.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},B.prototype.print_token=function(R){if(this._output.raw){this._output.add_raw_token(R);return}if(this._options.comma_first&&R.previous&&R.previous.type===o.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var K=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(K),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(R),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(R),this._output.non_breaking_space=!0,this._output.add_token(R.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},B.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},B.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},B.prototype.set_mode=function(R){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,R),this._flags=this.create_flags(this._previous_flags,R),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},B.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))},B.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"]))},B.prototype.start_of_statement=function(R){var K=!1;return K=K||I(this._flags.last_token,["var","let","const"])&&R.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)&&!R.newlines,K=K||p(this._flags.last_token,"else")&&!(p(R,"if")&&!R.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&&!(R.text==="--"||R.text==="++")&&this._last_last_text!=="function"&&R.type!==o.WORD&&R.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(R,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R,I(R,["do","for","if","while"])),!0):!1},B.prototype.handle_start_expr=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R);var K=S.Expression;if(R.text==="["){if(this._flags.last_token.type===o.WORD||this._flags.last_token.text===")"){I(this._flags.last_token,f)&&(this._output.space_before_token=!0),this.print_token(R),this.set_mode(K),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}K=S.ArrayLiteral,L(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),r(this._flags.last_token.type,[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):r(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,K=S.Conditional):r(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&R.whitespace_before===""?this._output.space_before_token=!1:(r(this._flags.last_token.text,f)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R);else if(this._flags.last_token.type===o.WORD){this._output.space_before_token=!1;var Z=this._tokens.peek(-3);if(this._options.space_after_named_function&&Z){var ue=this._tokens.peek(-4);I(Z,["async","function"])||Z.text==="*"&&I(ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===S.ObjectLiteral?(Z.text==="{"||Z.text===","||Z.text==="*"&&(ue.text==="{"||ue.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(R);(this._flags.last_token.type===o.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===S.ObjectLiteral&&r(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===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(R,R.newlines),this.print_token(R),this.set_mode(K),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},B.prototype.handle_end_expr=function(R){for(;this._flags.mode===S.Statement;)this.restore_mode();this.handle_whitespace_and_comments(R),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(R,R.text==="]"&&L(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(R),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)},B.prototype.handle_start_block=function(R){this.handle_whitespace_and_comments(R);var K=this._tokens.peek(),Z=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):Z&&(r(Z.text,[":",","])&&r(K.type,[o.STRING,o.WORD,o.RESERVED])||r(K.text,["get","set","..."])&&r(Z.type,[o.WORD,o.RESERVED]))?r(this._last_last_text,["class","interface"])&&!r(Z.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):r(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 ue=!K.comments_before&&K.text==="}",de=ue&&this._flags.last_word==="function"&&this._flags.last_token.type===o.END_EXPR;if(this._options.brace_preserve_inline){var Ce=0,Re=null;this._flags.inline_frame=!0;do if(Ce+=1,Re=this._tokens.peek(Ce-1),Re.newlines){this._flags.inline_frame=!1;break}while(Re.type!==o.EOF&&!(Re.type===o.END_BLOCK&&Re.opened===R))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==o.OPERATOR&&(de||this._flags.last_token.type===o.EQUALS||I(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(L(this._previous_flags.mode)&&(this._flags.last_token.type===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(R),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(R),this.indent(),!ue&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},B.prototype.handle_end_block=function(R){for(this.handle_whitespace_and_comments(R);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||(L(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(R)},B.prototype.handle_word=function(R){if(R.type===o.RESERVED){if(r(R.text,["set","get"])&&this._flags.mode!==S.ObjectLiteral)R.type=o.WORD;else if(R.text==="import"&&r(this._tokens.peek().text,["(","."]))R.type=o.WORD;else if(r(R.text,["as","from"])&&!this._flags.import_block)R.type=o.WORD;else if(this._flags.mode===S.ObjectLiteral){var K=this._tokens.peek();K.text===":"&&(R.type=o.WORD)}}if(this.start_of_statement(R)?I(this._flags.last_token,["var","let","const"])&&R.type===o.WORD&&(this._flags.declaration_statement=!0):R.newlines&&!G(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(R),this.print_newline()):this.handle_whitespace_and_comments(R),this._flags.do_block&&!this._flags.do_while)if(p(R,"while")){this._output.space_before_token=!0,this.print_token(R),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(R,"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(R,["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(R),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(R)),p(R,"function")){(r(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(r(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===o.OPERATOR))&&(!this._output.just_added_blankline()&&!R.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&&(G(this._flags.mode)||L(this._flags.mode))||this.print_newline(),this.print_token(R),this._flags.last_word=R.text;return}var Z="NONE";if(this._flags.last_token.type===o.END_BLOCK?this._previous_flags.inline_frame?Z="SPACE":I(R,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines?Z="NEWLINE":(Z="SPACE",this._output.space_before_token=!0):Z="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&this._flags.mode===S.BlockStatement?Z="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&G(this._flags.mode)?Z="SPACE":this._flags.last_token.type===o.STRING?Z="NEWLINE":this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===S.ObjectLiteral&&r(this._last_last_text,["{",","]))?Z="SPACE":this._flags.last_token.type===o.START_BLOCK?this._flags.inline_frame?Z="SPACE":Z="NEWLINE":this._flags.last_token.type===o.END_EXPR&&(this._output.space_before_token=!0,Z="NEWLINE"),I(R,f)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Z="SPACE":Z="NEWLINE"),I(R,["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"&&R.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ue=this._output.current_line;ue.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Z==="NEWLINE"?I(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&I(R,["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(R,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(R,"if")&&p(R.previous,"else")?this._output.space_before_token=!0:this.print_newline()):I(R,f)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&L(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Z==="SPACE"&&(this._output.space_before_token=!0);R.previous&&(R.previous.type===o.WORD||R.previous.type===o.RESERVED)&&(this._output.space_before_token=!0),this.print_token(R),this._flags.last_word=R.text,R.type===o.RESERVED&&(R.text==="do"?this._flags.do_block=!0:R.text==="if"?this._flags.if_block=!0:R.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(R,"from")&&(this._flags.import_block=!1))},B.prototype.handle_semicolon=function(R){this.start_of_statement(R)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(R);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(R)},B.prototype.handle_string=function(R){R.text.startsWith("`")&&R.newlines===0&&R.whitespace_before===""&&(R.previous.text===")"||this._flags.last_token.type===o.WORD)||(this.start_of_statement(R)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(R),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(R):R.text.startsWith("`")&&this._flags.last_token.type===o.END_EXPR&&(R.previous.text==="]"||R.previous.text===")")&&R.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(R)},B.prototype.handle_equals=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0},B.prototype.handle_comma=function(R){this.handle_whitespace_and_comments(R,!0),this.print_token(R),this._output.space_before_token=!0,this._flags.declaration_statement?(G(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(R)):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(R)},B.prototype.handle_operator=function(R){var K=R.text==="*"&&(I(this._flags.last_token,["function","yield"])||r(this._flags.last_token.type,[o.START_BLOCK,o.COMMA,o.END_BLOCK,o.SEMICOLON])),Z=r(R.text,["-","+"])&&(r(this._flags.last_token.type,[o.START_BLOCK,o.START_EXPR,o.EQUALS,o.OPERATOR])||r(this._flags.last_token.text,f)||this._flags.last_token.text===",");if(!this.start_of_statement(R)){var ue=!K;this.handle_whitespace_and_comments(R,ue)}if(R.text==="*"&&this._flags.last_token.type===o.DOT){this.print_token(R);return}if(R.text==="::"){this.print_token(R);return}if(this._flags.last_token.type===o.OPERATOR&&r(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(R),R.text===":"&&this._flags.in_case){this.print_token(R),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 de=!0,Ce=!0,Re=!1;if(R.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Re=!0):R.text==="?"&&(this._flags.ternary_depth+=1),!Z&&!K&&this._options.preserve_newlines&&r(R.text,l)){var me=R.text===":",Oe=me&&Re,be=me&&!Re;switch(this._options.operator_position){case E.before_newline:this._output.space_before_token=!be,this.print_token(R),(!me||Oe)&&this.allow_wrap_or_preserved_newline(R),this._output.space_before_token=!0;return;case E.after_newline:this._output.space_before_token=!0,!me||Oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(R):this._output.space_before_token=!1,this.print_token(R),this._output.space_before_token=!0;return;case E.preserve_newline:be||this.allow_wrap_or_preserved_newline(R),de=!(this._output.just_added_newline()||be),this._output.space_before_token=de,this.print_token(R),this._output.space_before_token=!0;return}}if(K){this.allow_wrap_or_preserved_newline(R),de=!1;var ce=this._tokens.peek();Ce=ce&&r(ce.type,[o.WORD,o.RESERVED])}else if(R.text==="...")this.allow_wrap_or_preserved_newline(R),de=this._flags.last_token.type===o.START_BLOCK,Ce=!1;else if(r(R.text,["--","++","!","~"])||Z){if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR)&&this.allow_wrap_or_preserved_newline(R),de=!1,Ce=!1,R.newlines&&(R.text==="--"||R.text==="++"||R.text==="~")){var le=I(this._flags.last_token,O)&&R.newlines;le&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(le,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(de=!0),this._flags.last_token.type===o.RESERVED?de=!0:this._flags.last_token.type===o.END_EXPR?de=!(this._flags.last_token.text==="]"&&(R.text==="--"||R.text==="++")):this._flags.last_token.type===o.OPERATOR&&(de=r(R.text,["--","-","++","+"])&&r(this._flags.last_token.text,["--","-","++","+"]),r(R.text,["+","-"])&&r(this._flags.last_token.text,["--","++"])&&(Ce=!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||de,this.print_token(R),this._output.space_before_token=Ce},B.prototype.handle_block_comment=function(R,K){if(this._output.raw){this._output.add_raw_token(R),R.directives&&R.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(R.directives){this.print_newline(!1,K),this.print_token(R),R.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(R.text)&&!R.newlines){this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0;return}else this.print_block_commment(R,K)},B.prototype.print_block_commment=function(R,K){var Z=P(R.text),ue,de=!1,Ce=!1,Re=R.whitespace_before,me=Re.length;if(this.print_newline(!1,K),this.print_token_line_indentation(R),this._output.add_token(Z[0]),this.print_newline(!1,K),Z.length>1){for(Z=Z.slice(1),de=z(Z,"*"),Ce=A(Z,Re),de&&(this._flags.alignment=1),ue=0;ue<Z.length;ue++)de?(this.print_token_line_indentation(R),this._output.add_token(x(Z[ue]))):Ce&&Z[ue]?(this.print_token_line_indentation(R),this._output.add_token(Z[ue].substring(me))):(this._output.current_line.set_indent(-1),this._output.add_token(Z[ue])),this.print_newline(!1,K);this._flags.alignment=0}},B.prototype.handle_comment=function(R,K){R.newlines?this.print_newline(!1,K):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(R),this.print_newline(!1,K)},B.prototype.handle_dot=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),I(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(R,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(R)},B.prototype.handle_unknown=function(R,K){this.print_token(R),R.text[R.text.length-1]===`
`&&this.print_newline(!1,K)},B.prototype.handle_eof=function(R){for(;this._flags.mode===S.Statement;)this.restore_mode();this.handle_whitespace_and_comments(R)},t.exports.Beautifier=B},function(t){function h(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var a=new h(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},h.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},h.prototype.has_match=function(a){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(a))return!0;return!1},h.prototype.set_indent=function(a,n){this.is_empty()&&(this.__indent_count=a||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 a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__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(a){this.__items.push(a);var n=a.lastIndexOf(`
`);n!==-1?this.__character_count=a.length-n:this.__character_count+=a.length},h.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},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 a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function i(a,n){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),n=n||"",a.indent_level>0&&(n=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}i.prototype.get_indent_size=function(a,n){var s=this.__base_string_length;return n=n||0,a<0&&(s=0),s+=a*this.__indent_size,s+=n,s},i.prototype.get_indent_string=function(a,n){var s=this.__base_string;return n=n||0,a<0&&(a=0,s=""),n+=a*this.__indent_size,this.__ensure_cache(n),s+=this.__cache[n],s},i.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var a=this.__cache.length,n=0,s="";this.__indent_size&&a>=this.__indent_size&&(n=Math.floor(a/this.__indent_size),a-=n*this.__indent_size,s=new Array(n+1).join(this.__indent_string)),a&&(s+=new Array(a+1).join(" ")),this.__cache.push(s)};function c(a,n){this.__indent_cache=new i(a,n),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.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(a,n){return this.__indent_cache.get_indent_string(a,n)},c.prototype.get_indent_size=function(a,n){return this.__indent_cache.get_indent_size(a,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(a){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return a!==`
`&&(s=s.replace(/[\n]/g,a)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(a,n){return a=a||0,n=n||0,this.next_line.set_indent(a,n),this.__lines.length>1?(this.current_line.set_indent(a,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(a){for(var n=0;n<a.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(a){for(var n=this.__lines.length;a<n;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(a,n){for(var s=this.__lines.length-2;s>=0;){var d=this.__lines[s];if(d.is_empty())break;if(d.item(0).indexOf(a)!==0&&d.item(-1)!==n){this.__lines.splice(s+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},function(t){function h(i,c,a,n){this.type=i,this.text=c,this.comments_before=null,this.newlines=a||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 i="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",a="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",s="(?:\\\\u[0-9a-fA-F]{4}|["+i+a+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+c+a+n+"])*";h.identifier=new RegExp(s+d,"g"),h.identifierStart=new RegExp(s),h.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+a+n+"])+");var f=/[\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,i){var c=i(6).Options,a=["before-newline","after-newline","preserve-newline"];function n(s){c.call(this,s,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var l=0;l<f.length;l++)f[l]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=f[l];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",a),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}n.prototype=new c,t.exports.Options=n},function(t){function h(a,n){this.raw_options=i(a,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(a,n){var s=this.raw_options[a],d=n||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(d=s.concat()):typeof s=="string"&&(d=s.split(/[^a-zA-Z0-9_\/\-]+/)),d},h.prototype._get_boolean=function(a,n){var s=this.raw_options[a],d=s===void 0?!!n:!!s;return d},h.prototype._get_characters=function(a,n){var s=this.raw_options[a],d=n||"";return typeof s=="string"&&(d=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},h.prototype._get_number=function(a,n){var s=this.raw_options[a];n=parseInt(n,10),isNaN(n)&&(n=0);var d=parseInt(s,10);return isNaN(d)&&(d=n),d},h.prototype._get_selection=function(a,n,s){var d=this._get_selection_list(a,n,s);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[a]+"'");return d[0]},h.prototype._get_selection_list=function(a,n,s){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[n[0]],!this._is_valid_selection(s,n))throw new Error("Invalid Default Value!");var d=this._get_array(a,s);if(!this._is_valid_selection(d,n))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[a]+"'");return d},h.prototype._is_valid_selection=function(a,n){return a.length&&n.length&&!a.some(function(s){return n.indexOf(s)===-1})};function i(a,n){var s={};a=c(a);var d;for(d in a)d!==n&&(s[d]=a[d]);if(n&&a[n])for(d in a[n])s[d]=a[n][d];return s}function c(a){var n={},s;for(s in a){var d=s.replace(/-/g,"_");n[d]=a[s]}return n}t.exports.Options=h,t.exports.normalizeOpts=c,t.exports.mergeOpts=i},function(t,h,i){var c=i(8).InputScanner,a=i(9).Tokenizer,n=i(9).TOKEN,s=i(13).Directives,d=i(4),f=i(12).Pattern,l=i(14).TemplatablePattern;function o(z,A){return A.indexOf(z)!==-1}var r={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},x=new s(/\/\*/,/\*\//),b=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,p=/[0-9]/,I=/[^\d\.]/,O=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var E=new RegExp(_),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),S=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),F=new RegExp("^(?:"+S.join("|")+")$"),P,L=function(z,A){a.call(this,z,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var B=new f(this._input),U=new l(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(d.identifier).matching(d.identifierMatch),number:B.matching(b),punct:B.matching(E),comment:B.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:B.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:B.matching(/<!--/),html_comment_end:B.matching(/-->/),include:B.starting_with(/#include/).until_after(d.lineBreak),shebang:B.starting_with(/#!/).until_after(d.lineBreak),xml:B.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};L.prototype=new a,L.prototype._is_comment=function(z){return z.type===r.COMMENT||z.type===r.BLOCK_COMMENT||z.type===r.UNKNOWN},L.prototype._is_opening=function(z){return z.type===r.START_BLOCK||z.type===r.START_EXPR},L.prototype._is_closing=function(z,A){return(z.type===r.END_BLOCK||z.type===r.END_EXPR)&&A&&(z.text==="]"&&A.text==="["||z.text===")"&&A.text==="("||z.text==="}"&&A.text==="{")},L.prototype._reset=function(){P=!1},L.prototype._get_next_token=function(z,A){var B=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(r.EOF,""):(B=B||this._read_non_javascript(U),B=B||this._read_string(U),B=B||this._read_word(z),B=B||this._read_singles(U),B=B||this._read_comment(U),B=B||this._read_regexp(U,z),B=B||this._read_xml(U,z),B=B||this._read_punctuation(),B=B||this._create_token(r.UNKNOWN,this._input.next()),B)},L.prototype._read_word=function(z){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(d.allLineBreaks,`
`),!(z.type===r.DOT||z.type===r.RESERVED&&(z.text==="set"||z.text==="get"))&&F.test(A)?(A==="in"||A==="of")&&(z.type===r.WORD||z.type===r.STRING)?this._create_token(r.OPERATOR,A):this._create_token(r.RESERVED,A):this._create_token(r.WORD,A);if(A=this.__patterns.number.read(),A!=="")return this._create_token(r.WORD,A)},L.prototype._read_singles=function(z){var A=null;return z==="("||z==="["?A=this._create_token(r.START_EXPR,z):z===")"||z==="]"?A=this._create_token(r.END_EXPR,z):z==="{"?A=this._create_token(r.START_BLOCK,z):z==="}"?A=this._create_token(r.END_BLOCK,z):z===";"?A=this._create_token(r.SEMICOLON,z):z==="."&&I.test(this._input.peek(1))?A=this._create_token(r.DOT,z):z===","&&(A=this._create_token(r.COMMA,z)),A&&this._input.next(),A},L.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(r.EQUALS,z):z==="?."?this._create_token(r.DOT,z):this._create_token(r.OPERATOR,z)},L.prototype._read_non_javascript=function(z){var A="";if(z==="#"){if(this._is_first_token()&&(A=this.__patterns.shebang.read(),A))return this._create_token(r.UNKNOWN,A.trim()+`
`);if(A=this.__patterns.include.read(),A)return this._create_token(r.UNKNOWN,A.trim()+`
`);z=this._input.next();var B="#";if(this._input.hasNext()&&this._input.testChar(p)){do z=this._input.next(),B+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(B+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(B+="{}",this._input.next(),this._input.next())),this._create_token(r.WORD,B)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)A+=this._input.next();return P=!0,this._create_token(r.COMMENT,A)}}else if(P&&z==="-"&&(A=this.__patterns.html_comment_end.read(),A))return P=!1,this._create_token(r.COMMENT,A);return null},L.prototype._read_comment=function(z){var A=null;if(z==="/"){var B="";if(this._input.peek(1)==="*"){B=this.__patterns.block_comment.read();var U=x.get_directives(B);U&&U.ignore==="start"&&(B+=x.readIgnored(this._input)),B=B.replace(d.allLineBreaks,`
`),A=this._create_token(r.BLOCK_COMMENT,B),A.directives=U}else this._input.peek(1)==="/"&&(B=this.__patterns.comment.read(),A=this._create_token(r.COMMENT,B))}return A},L.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var A=this._input.next();return this.has_char_escapes=!1,z==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(A=G(A)),this._input.peek()===z&&(A+=this._input.next()),A=A.replace(d.allLineBreaks,`
`),this._create_token(r.STRING,A)}return null},L.prototype._allow_regexp_or_xml=function(z){return z.type===r.RESERVED&&o(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===r.END_EXPR&&z.text===")"&&z.opened.previous.type===r.RESERVED&&o(z.opened.previous.text,["if","while","for"])||o(z.type,[r.COMMENT,r.START_EXPR,r.START_BLOCK,r.START,r.END_BLOCK,r.OPERATOR,r.EQUALS,r.EOF,r.SEMICOLON,r.COMMA])},L.prototype._read_regexp=function(z,A){if(z==="/"&&this._allow_regexp_or_xml(A)){for(var B=this._input.next(),U=!1,R=!1;this._input.hasNext()&&(U||R||this._input.peek()!==z)&&!this._input.testChar(d.newline);)B+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?R=!0:this._input.peek()==="]"&&(R=!1)),this._input.next();return this._input.peek()===z&&(B+=this._input.next(),B+=this._input.read(d.identifier)),this._create_token(r.STRING,B)}return null},L.prototype._read_xml=function(z,A){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(A)){var B="",U=this.__patterns.xml.read_match();if(U){for(var R=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),K=R.indexOf("{")===0,Z=0;U;){var ue=!!U[1],de=U[2],Ce=!!U[U.length-1]||de.slice(0,8)==="![CDATA[";if(!Ce&&(de===R||K&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ue?--Z:++Z),B+=U[0],Z<=0)break;U=this.__patterns.xml.read_match()}return U||(B+=this._input.match(/[\s\S]*/g)[0]),B=B.replace(d.allLineBreaks,`
`),this._create_token(r.STRING,B)}}return null};function G(z){for(var A="",B=0,U=new c(z),R=null;U.hasNext();)if(R=U.match(/([\s]|[^\\]|\\\\)+/g),R&&(A+=R[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")R=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")R=U.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",U.hasNext()&&(A+=U.next());continue}if(!R)return z;if(B=parseInt(R[1],16),B>126&&B<=255&&R[0].indexOf("x")===0)return z;if(B>=0&&B<32){A+="\\"+R[0];continue}else B===34||B===39||B===92?A+="\\"+String.fromCharCode(B):A+=String.fromCharCode(B)}return A}L.prototype._read_string_recursive=function(z,A,B){var U,R;z==="'"?R=this.__patterns.single_quote:z==='"'?R=this.__patterns.double_quote:z==="`"?R=this.__patterns.template_text:z==="}"&&(R=this.__patterns.template_expression);for(var K=R.read(),Z="";this._input.hasNext();){if(Z=this._input.next(),Z===z||!A&&d.newline.test(Z)){this._input.back();break}else Z==="\\"&&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(),Z+=this._input.next()):B&&(B==="${"&&Z==="$"&&this._input.peek()==="{"&&(Z+=this._input.next()),B===Z&&(z==="`"?Z+=this._read_string_recursive("}",A,"`"):Z+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(Z+=this._input.next())));Z+=R.read(),K+=Z}return K},t.exports.Tokenizer=L,t.exports.TOKEN=r,t.exports.positionable_operators=O.slice(),t.exports.line_starters=w.slice()},function(t){var h=RegExp.prototype.hasOwnProperty("sticky");function i(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},i.prototype.peek=function(c){var a=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(a=this.__input.charAt(c)),a},i.prototype.__match=function(c,a){c.lastIndex=a;var n=c.exec(this.__input);return n&&!(h&&c.sticky)&&(n.index!==a&&(n=null)),n},i.prototype.test=function(c,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(c,a):!1},i.prototype.testChar=function(c,a){var n=this.peek(a);return c.lastIndex=0,n!==null&&c.test(n)},i.prototype.match=function(c){var a=this.__match(c,this.__position);return a?this.__position+=a[0].length:a=null,a},i.prototype.read=function(c,a,n){var s="",d;return c&&(d=this.match(c),d&&(s+=d[0])),a&&(d||!c)&&(s+=this.readUntil(a,n)),s},i.prototype.readUntil=function(c,a){var n="",s=this.__position;c.lastIndex=this.__position;var d=c.exec(this.__input);return d?(s=d.index,a&&(s+=d[0].length)):s=this.__input_length,n=this.__input.substring(this.__position,s),this.__position=s,n},i.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},i.prototype.get_regexp=function(c,a){var n=null,s="g";return a&&h&&(s="y"),typeof c=="string"&&c!==""?n=new RegExp(c,s):c&&(n=new RegExp(c.source,s)),n},i.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(c){var a=this.__position,n=this.readUntilAfter(c);return this.__position=a,n},i.prototype.lookBack=function(c){var a=this.__position-1;return a>=c.length&&this.__input.substring(a-c.length,a).toLowerCase()===c},t.exports.InputScanner=i},function(t,h,i){var c=i(8).InputScanner,a=i(3).Token,n=i(10).TokenStream,s=i(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(l,o){this._input=new c(l),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var l,o=new a(d.START,""),r=null,x=[],b=new n;o.type!==d.EOF;){for(l=this._get_next_token(o,r);this._is_comment(l);)b.add(l),l=this._get_next_token(o,r);b.isEmpty()||(l.comments_before=b,b=new n),l.parent=r,this._is_opening(l)?(x.push(r),r=l):r&&this._is_closing(l,r)&&(l.opened=r,r.closed=l,r=x.pop(),l.parent=r),l.previous=o,o.next=l,this.__tokens.add(l),o=l}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(l,o){this._readWhitespace();var r=this._input.read(/.+/g);return r?this._create_token(d.RAW,r):this._create_token(d.EOF,"")},f.prototype._is_comment=function(l){return!1},f.prototype._is_opening=function(l){return!1},f.prototype._is_closing=function(l,o){return!1},f.prototype._create_token=function(l,o){var r=new a(l,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return r},f.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=f,t.exports.TOKEN=d},function(t){function h(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},h.prototype.peek=function(i){var c=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(c=this.__tokens[i]),c},h.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},t.exports.TokenStream=h},function(t,h,i){var c=i(12).Pattern;function a(n,s){c.call(this,n,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}a.prototype=new c,a.prototype.__set_whitespace_patterns=function(n,s){n+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var s=this.__split(this._newline_regexp,n);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return n},a.prototype.matching=function(n,s){var d=this._create();return d.__set_whitespace_patterns(n,s),d._update(),d},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(n,s){n.lastIndex=0;for(var d=0,f=[],l=n.exec(s);l;)f.push(s.substring(d,l.index)),d=l.index+l[0].length,l=n.exec(s);return d<s.length?f.push(s.substring(d,s.length)):f.push(""),f},t.exports.WhitespacePattern=a},function(t){function h(i,c){this._input=i,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}h.prototype.read=function(){var i=this._input.read(this._starting_pattern);return(!this._starting_pattern||i)&&(i+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),i},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(i){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(i),c._update(),c},h.prototype.until=function(i){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(i),c._update(),c},h.prototype.starting_with=function(i){var c=this._create();return c._starting_pattern=this._input.get_regexp(i,!0),c._update(),c},h.prototype.matching=function(i){var c=this._create();return c._match_pattern=this._input.get_regexp(i,!0),c._update(),c},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},t.exports.Pattern=h},function(t){function h(i,c){i=typeof i=="string"?i:i.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(i);a;)c[a[1]]=a[2],a=this.__directive_pattern.exec(i);return c},h.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=h},function(t,h,i){var c=i(12).Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(s,d){c.call(this,s,d),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._disabled));var f=new c(s);this.__patterns={handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:f.starting_with(/{{{/).until_after(/}}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),php:f.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:f.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:f.starting_with(/{%/).until_after(/%}/),django_value:f.starting_with(/{{/).until_after(/}}/),django_comment:f.starting_with(/{#/).until_after(/#}/),smarty:f.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:f.starting_with(/{\*/).until_after(/\*}/),smarty_literal:f.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new c,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(s){var d=this._create();return d._disabled[s]=!0,d._update(),d},n.prototype.read_options=function(s){var d=this._create();for(var f in a)d._disabled[f]=s.templating.indexOf(f)===-1;return d._update(),d},n.prototype.exclude=function(s){var d=this._create();return d._excluded[s]=!0,d._update(),d},n.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),s+=d,d=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},n.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},n.prototype._read_template=function(){var s="",d=this._input.peek();if(d==="<"){var f=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&f==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&f==="%"&&(s=s||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},t.exports.TemplatablePattern=n}],v={};function T(t){var h=v[t];if(h!==void 0)return h.exports;var i=v[t]={exports:{}};return m[t](i,i.exports,T),i.exports}var y=T(0);C=y})();var N=C;!(M=[],g=function(){return{js_beautify:N}}.apply(J,M),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,J,D){"use strict";function M(g){return null}J.a=M},"746U":function(H,J,D){"use strict";D.d(J,"f",function(){return M}),D.d(J,"l",function(){return g}),D.d(J,"k",function(){return C}),D.d(J,"j",function(){return N}),D.d(J,"g",function(){return m}),D.d(J,"m",function(){return v}),D.d(J,"h",function(){return T}),D.d(J,"n",function(){return y}),D.d(J,"c",function(){return t}),D.d(J,"a",function(){return h}),D.d(J,"i",function(){return i}),D.d(J,"o",function(){return c}),D.d(J,"e",function(){return s}),D.d(J,"d",function(){return d}),D.d(J,"p",function(){return f}),D.d(J,"b",function(){return l});function M(o){return Array.isArray(o)}function g(o){return typeof o=="string"}function C(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function N(o){return typeof o=="number"&&!isNaN(o)}function m(o){return o===!0||o===!1}function v(o){return typeof o=="undefined"}function T(o){return!y(o)}function y(o){return v(o)||o===null}function t(o,r){if(!o)throw new Error(r?`Unexpected type, expected '${r}'`:"Unexpected type")}function h(o){if(y(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function i(o){return typeof o=="function"}function c(o,r){const x=Math.min(o.length,r.length);for(let b=0;b<x;b++)a(o[b],r[b])}function a(o,r){if(g(r)){if(typeof o!==r)throw new Error(`argument does not match constraint: typeof ${r}`)}else if(i(r)){try{if(o instanceof r)return}catch(x){}if(!y(o)&&o.constructor===r)return;if(r.length===1&&r.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function n(o){let r=[],x=Object.getPrototypeOf(o);for(;Object.prototype!==x;)r=r.concat(Object.getOwnPropertyNames(x)),x=Object.getPrototypeOf(x);return r}function s(o){const r=[];for(const x of n(o))typeof o[x]=="function"&&r.push(x);return r}function d(o,r){const x=p=>function(){const I=Array.prototype.slice.call(arguments,0);return r(p,I)};let b={};for(const p of o)b[p]=x(p);return b}function f(o){return o===null?void 0:o}function l(o,r="Unreachable"){throw new Error(r)}},"7Cbv":function(H,J,D){"use strict";var M=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 C(){if(!M)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return M(g)}var N=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function m(a){return typeof a=="string"&&N.test(a)}for(var v=m,T=[],y=0;y<256;++y)T.push((y+256).toString(16).substr(1));function t(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(T[a[n+0]]+T[a[n+1]]+T[a[n+2]]+T[a[n+3]]+"-"+T[a[n+4]]+T[a[n+5]]+"-"+T[a[n+6]]+T[a[n+7]]+"-"+T[a[n+8]]+T[a[n+9]]+"-"+T[a[n+10]]+T[a[n+11]]+T[a[n+12]]+T[a[n+13]]+T[a[n+14]]+T[a[n+15]]).toLowerCase();if(!v(s))throw TypeError("Stringified UUID is invalid");return s}var h=t;function i(a,n,s){a=a||{};var d=a.random||(a.rng||C)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,n){s=s||0;for(var f=0;f<16;++f)n[s+f]=d[f];return n}return h(d)}var c=J.a=i},"7ahc":function(H,J,D){"use strict";D.d(J,"a",function(){return x});var M=D("k1fw"),g=D("0Owb"),C=D("+L6B"),N=D("2/Rp"),m=D("y8nQ"),v=D("Vl3Y"),T=D("tJVT"),y=D("OaEy"),t=D("2fM7"),h=D("q1tI"),i=D.n(h),c=D("VrN/"),a=D.n(c),n=D("p77/"),s=D.n(n),d=D("c5Ni"),f=D.n(d),l=t.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},r={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};J.b=function(b){var p=b.callback,I=b.onCancel,O=Object(h.useState)("python"),_=Object(T.a)(O,2),E=_[0],w=_[1];function S(P){w(r[P][1])}function F(P){p(P)}return i.a.createElement(v.a,Object(g.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),i.a.createElement(v.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(t.a,{onChange:S},Object.keys(r).map(function(P){return i.a.createElement(l,{key:P,value:P},r[P][0])}))),i.a.createElement(v.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(x,{mode:E})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(N.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(N.a,{type:"ghost",onClick:I},"\u53D6\u6D88")))};function x(b){var p=b.value,I=b.onChange,O=b.mode,_=b.options,E=_===void 0?{}:_,w=Object(h.useRef)(),S=Object(h.useState)(),F=Object(T.a)(S,2),P=F[0],L=F[1];return Object(h.useEffect)(function(){if(P){function G(z){var A=z.getValue();I&&I(A)}return P.on("change",G),function(){P.off("change",G)}}},[P,I]),Object(h.useEffect)(function(){P&&P.setOption("mode",O)},[P,O]),Object(h.useEffect)(function(){P&&((p!==P.getValue()||p==="")&&setTimeout(function(){P.setValue(p||" ")},300))},[P,p]),Object(h.useEffect)(function(){if(w.current&&!P){var G=a.a.fromTextArea(w.current,Object(M.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));L(G)}},[w.current,P]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:w}))}},"815F":function(H,J,D){"use strict";D.d(J,"e",function(){return T}),D.d(J,"c",function(){return t}),D.d(J,"d",function(){return h}),D.d(J,"a",function(){return c}),D.d(J,"f",function(){return a}),D.d(J,"b",function(){return n});var M=D("KQm4"),g=D("VTBJ"),C=D("Ff2n"),N=D("Zm9Q"),m=D("Kwbf"),v=D("OZM5");function T(s,d){return s!=null?s:d}function y(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function f(l){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(l||[]).forEach(function(r){var x=r.key,b=r.children;Object(m.a)(x!=null,"Tree node must have a certain key: [".concat(o).concat(x,"]"));var p=String(x);Object(m.a)(!d.has(p)||x===null||x===void 0,"Same 'key' exist in the Tree: ".concat(p)),d.set(p,!0),f(b,"".concat(o).concat(p," > "))})}f(s)}function t(s){function d(f){var l=Object(N.a)(f);return l.map(function(o){if(!Object(v.i)(o))return Object(m.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var r=o.key,x=o.props,b=x.children,p=Object(C.a)(x,["children"]),I=Object(g.a)({key:r},p),O=d(b);return O.length&&(I.children=O),I}).filter(function(o){return o})}return d(s)}function h(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=new Set(d===!0?[]:d),l=[];function o(r){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.map(function(b,p){var I=Object(v.h)(x?x.pos:"0",p),O=T(b.key,I),_=Object(g.a)(Object(g.a)({},b),{},{parent:x,pos:I,children:null,data:b,isStart:[].concat(Object(M.a)(x?x.isStart:[]),[p===0]),isEnd:[].concat(Object(M.a)(x?x.isEnd:[]),[p===r.length-1])});return l.push(_),d===!0||f.has(O)?_.children=o(b.children||[],_):_.children=[],_})}return o(s),l}function i(s,d,f){var l;f?typeof f=="string"?l=function(x){return x[f]}:typeof f=="function"&&(l=function(x){return f(x)}):l=function(x,b){return T(x.key,b)};function o(r,x,b){var p=r?r.children:s,I=r?Object(v.h)(b.pos,x):"0";if(r){var O=l(r,I),_={node:r,index:x,pos:I,key:O,parentPos:b.node?b.pos:null,level:b.level+1};d(_)}p&&p.forEach(function(E,w){o(E,w,{node:r,pos:I,level:b?b.level+1:-1})})}o(null)}function c(s){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=d.initWrapper,l=d.processEntity,o=d.onProcessFinished,r=arguments.length>2?arguments[2]:void 0,x={},b={},p={posEntities:x,keyEntities:b};return f&&(p=f(p)||p),i(s,function(I){var O=I.node,_=I.index,E=I.pos,w=I.key,S=I.parentPos,F=I.level,P={node:O,index:_,key:w,pos:E,level:F},L=T(w,E);x[E]=P,b[L]=P,P.parent=x[S],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),l&&l(P,p)},r),o&&o(p),p}function a(s,d){var f=d.expandedKeys,l=d.selectedKeys,o=d.loadedKeys,r=d.loadingKeys,x=d.checkedKeys,b=d.halfCheckedKeys,p=d.dragOverNodeKey,I=d.dropPosition,O=d.keyEntities,_=O[s],E={eventKey:s,expanded:f.indexOf(s)!==-1,selected:l.indexOf(s)!==-1,loaded:o.indexOf(s)!==-1,loading:r.indexOf(s)!==-1,checked:x.indexOf(s)!==-1,halfChecked:b.indexOf(s)!==-1,pos:String(_?_.pos:""),dragOver:p===s&&I===0,dragOverGapTop:p===s&&I===-1,dragOverGapBottom:p===s&&I===1};return E}function n(s){var d=s.data,f=s.expanded,l=s.selected,o=s.checked,r=s.loaded,x=s.loading,b=s.halfChecked,p=s.dragOver,I=s.dragOverGapTop,O=s.dragOverGapBottom,_=s.pos,E=s.active,w=Object(g.a)(Object(g.a)({},d),{},{expanded:f,selected:l,checked:o,loaded:r,loading:x,halfChecked:b,dragOver:p,dragOverGapTop:I,dragOverGapBottom:O,pos:_,active:E});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(m.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),w}},"8EBN":function(H,J,D){(function(M){M(D("VrN/"))})(function(M){"use strict";M.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<M.modeInfo.length;g++){var C=M.modeInfo[g];C.mimes&&(C.mime=C.mimes[0])}M.findModeByMIME=function(N){N=N.toLowerCase();for(var m=0;m<M.modeInfo.length;m++){var v=M.modeInfo[m];if(v.mime==N)return v;if(v.mimes){for(var T=0;T<v.mimes.length;T++)if(v.mimes[T]==N)return v}}if(/\+xml$/.test(N))return M.findModeByMIME("application/xml");if(/\+json$/.test(N))return M.findModeByMIME("application/json")},M.findModeByExtension=function(N){N=N.toLowerCase();for(var m=0;m<M.modeInfo.length;m++){var v=M.modeInfo[m];if(v.ext){for(var T=0;T<v.ext.length;T++)if(v.ext[T]==N)return v}}},M.findModeByFileName=function(N){for(var m=0;m<M.modeInfo.length;m++){var v=M.modeInfo[m];if(v.file&&v.file.test(N))return v}var T=N.lastIndexOf("."),y=T>-1&&N.substring(T+1,N.length);if(y)return M.findModeByExtension(y)},M.findModeByName=function(N){N=N.toLowerCase();for(var m=0;m<M.modeInfo.length;m++){var v=M.modeInfo[m];if(v.name.toLowerCase()==N)return v;if(v.alias){for(var T=0;T<v.alias.length;T++)if(v.alias[T].toLowerCase()==N)return v}}}})},"8HAY":function(H,J,D){"use strict";D.d(J,"a",function(){return m}),D.d(J,"b",function(){return v}),D.d(J,"d",function(){return T}),D.d(J,"e",function(){return y}),D.d(J,"c",function(){return t});var M=D("MI8n"),g=D("pmY6"),C=D("3/fG"),N=function(h,i,c,a){function n(s){return s instanceof c?s:new c(function(d){d(s)})}return new(c||(c=Promise))(function(s,d){function f(r){try{o(a.next(r))}catch(x){d(x)}}function l(r){try{o(a.throw(r))}catch(x){d(x)}}function o(r){r.done?s(r.value):n(r.value).then(f,l)}o((a=a.apply(h,i||[])).next())})};class m extends g.a{constructor(h,i="",c="",a=!0,n){super();this._onDidChange=this._register(new M.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=h,this._label=i,this._cssClass=c,this._enabled=a,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(h){this._setLabel(h)}_setLabel(h){this._label!==h&&(this._label=h,this._onDidChange.fire({label:h}))}get tooltip(){return this._tooltip||""}set tooltip(h){this._setTooltip(h)}_setTooltip(h){this._tooltip!==h&&(this._tooltip=h,this._onDidChange.fire({tooltip:h}))}get class(){return this._cssClass}set class(h){this._setClass(h)}_setClass(h){this._cssClass!==h&&(this._cssClass=h,this._onDidChange.fire({class:h}))}get enabled(){return this._enabled}set enabled(h){this._setEnabled(h)}_setEnabled(h){this._enabled!==h&&(this._enabled=h,this._onDidChange.fire({enabled:h}))}get checked(){return this._checked}set checked(h){this._setChecked(h)}_setChecked(h){this._checked!==h&&(this._checked=h,this._onDidChange.fire({checked:h}))}run(h,i){return N(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(h))})}}class v extends g.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new M.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new M.b),this.onDidRun=this._onDidRun.event}run(h,i){return N(this,void 0,void 0,function*(){if(!h.enabled)return;this._onBeforeRun.fire({action:h});let c;try{yield this.runAction(h,i)}catch(a){c=a}this._onDidRun.fire({action:h,error:c})})}runAction(h,i){return N(this,void 0,void 0,function*(){yield h.run(i)})}}class T extends m{constructor(h){super(T.ID,h,h?"separator text":"separator");this.checked=!1,this.enabled=!1}}T.ID="vs.actions.separator";class y{constructor(h,i,c,a){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=h,this.label=i,this.class=a,this._actions=c}get actions(){return this._actions}dispose(){}run(){return N(this,void 0,void 0,function*(){})}}class t extends m{constructor(){super(t.ID,C.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8hTe":function(H,J,D){H.exports={button:"button___1wy9m"}},"9Bee":function(H,J,D){"use strict";var M=D("DYRE"),g=D("zeV3"),C=D("+L6B"),N=D("2/Rp"),m=D("k1fw"),v=D("9og8"),T=D("tJVT"),y=D("WmNS"),t=D.n(y),h=D("q1tI"),i=D.n(h),c=D("vg9a"),a=D("DlQD"),n=D.n(a),s=D("rUJ1");function d(se,V){var $=se.match(/^(\s+)(?:```)/);if($===null)return V;var ee=$[1];return V.split(`
`).map(function(ye){var oe=ye.match(/^\s+/);if(oe===null)return ye;var Ve=Object(T.a)(oe,1),Tt=Ve[0];return Tt.length>=ee.length?ye.slice(ee.length):ye}).join(`
`)}var f=[],l=["<ul>"],o=new n.a.Renderer,r=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function x(){f.length=0,l=["<ul>"]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(se,V,$,ee){if(V>=se.length||se[V].level<=$)return V;var ye=se[V];ee.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),V++;var oe=[];return V=p(se,V,ye.level,oe),oe.length>0&&(ee.push("<ul>"),oe.forEach(function(Ve){ee.push(Ve)}),ee.push("</ul>")),ee.push("</li>"),V=p(se,V,$,ee),V}function I(){return p(f,0,0,l),l.push("</ul>"),l.join("")}var O={heading:function(V){var $=r.exec(V);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(V){var $=this.rules.block.fences.exec(V);if($){var ee=$[0],ye=d(ee,$[3]||""),oe=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ve=w(),Tt=ye;ye=Ve,S[Ve]={type:"block",expression:Tt}}return{type:"code",raw:ee,lang:oe,text:ye}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,E=0,w=function(){return"__special_katext_id_".concat(E++,"__")},S={};function F(){return S}function P(){E=0,S={}}function L(se){return se=se.replace(_,function(V,$){var ee=w();return S[ee]={type:"inline",expression:$},ee}),se}var G=o.listitem;o.listitem=function(se){return G(L(se))};var z=o.paragraph;o.paragraph=function(se){return z(L(se))};var A=o.tablecell;o.tablecell=function(se,V){return A(L(se),V)},o.code=function(se,V,$){var ee=(V||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"<p class='editormd-tex'>".concat(se,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(V,'">').concat($?se:Object(s.escape)(se,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+($?se:Object(s.escape)(se,!0))+"</code></pre>"},o.heading=function(se,V,$){var ee=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:ee,level:V,text:se}),"<h"+V+' id="'+ee+'">'+se+"</h"+V+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:O,renderer:o});var B=n.a,U=D("SJMd"),R=D("ulZh"),K=D.n(R),Z=D("m3rI"),ue=D("Oy/b"),de=D("p5ED"),Ce=D("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Re=function(se,V){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ee){$.__proto__=ee}||function($,ee){for(var ye in ee)Object.prototype.hasOwnProperty.call(ee,ye)&&($[ye]=ee[ye])})(se,V)};function me(se,V){function $(){this.constructor=se}Re(se,V),se.prototype=V===null?Object.create(V):($.prototype=V.prototype,new $)}function Oe(se,V,$,ee){return new($||($=Promise))(function(ye,oe){function Ve(Er){try{Xt(ee.next(Er))}catch(kt){oe(kt)}}function Tt(Er){try{Xt(ee.throw(Er))}catch(kt){oe(kt)}}function Xt(Er){var kt;Er.done?ye(Er.value):(kt=Er.value,kt instanceof $?kt:new $(function(Pr){Pr(kt)})).then(Ve,Tt)}Xt((ee=ee.apply(se,V||[])).next())})}function be(se,V){var $,ee,ye,oe,Ve={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return oe={next:Tt(0),throw:Tt(1),return:Tt(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Tt(Xt){return function(Er){return function(kt){if($)throw new TypeError("Generator is already executing.");for(;Ve;)try{if($=1,ee&&(ye=2&kt[0]?ee.return:kt[0]?ee.throw||((ye=ee.return)&&ye.call(ee),0):ee.next)&&!(ye=ye.call(ee,kt[1])).done)return ye;switch(ee=0,ye&&(kt=[2&kt[0],ye.value]),kt[0]){case 0:case 1:ye=kt;break;case 4:return Ve.label++,{value:kt[1],done:!1};case 5:Ve.label++,ee=kt[1],kt=[0];continue;case 7:kt=Ve.ops.pop(),Ve.trys.pop();continue;default:if(!(ye=Ve.trys,(ye=ye.length>0&&ye[ye.length-1])||kt[0]!==6&&kt[0]!==2)){Ve=0;continue}if(kt[0]===3&&(!ye||kt[1]>ye[0]&&kt[1]<ye[3])){Ve.label=kt[1];break}if(kt[0]===6&&Ve.label<ye[1]){Ve.label=ye[1],ye=kt;break}if(ye&&Ve.label<ye[2]){Ve.label=ye[2],Ve.ops.push(kt);break}ye[2]&&Ve.ops.pop(),Ve.trys.pop();continue}kt=V.call(se,Ve)}catch(Pr){kt=[6,Pr],ee=0}finally{$=ye=0}if(5&kt[0])throw kt[1];return{value:kt[0]?kt[1]:void 0,done:!0}}([Xt,Er])}}}function ce(){for(var se=0,V=0,$=arguments.length;V<$;V++)se+=arguments[V].length;var ee=Array(se),ye=0;for(V=0;V<$;V++)for(var oe=arguments[V],Ve=0,Tt=oe.length;Ve<Tt;Ve++,ye++)ee[ye]=oe[Ve];return ee}var le=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(V,$){for(var ee=0,ye=$;ee<ye.length;ee++){var oe=ye[ee],Ve=oe[0],Tt=oe[1];V.setAttribute(Ve,Tt)}},se.createRect=function(V,$,ee){var ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return ye.setAttribute("width",V.toString()),ye.setAttribute("height",$.toString()),ee&&se.setAttributes(ye,ee),ye},se.createLine=function(V,$,ee,ye,oe){var Ve=document.createElementNS("http://www.w3.org/2000/svg","line");return Ve.setAttribute("x1",V.toString()),Ve.setAttribute("y1",$.toString()),Ve.setAttribute("x2",ee.toString()),Ve.setAttribute("y2",ye.toString()),oe&&se.setAttributes(Ve,oe),Ve},se.createPolygon=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",V),$&&se.setAttributes(ee,$),ee},se.createCircle=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(V/2).toString()),ee.setAttribute("cy",(V/2).toString()),ee.setAttribute("r",V.toString()),$&&se.setAttributes(ee,$),ee},se.createEllipse=function(V,$,ee){var ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ye.setAttribute("cx",(V/2).toString()),ye.setAttribute("cy",($/2).toString()),ye.setAttribute("rx",(V/2).toString()),ye.setAttribute("ry",($/2).toString()),ee&&se.setAttributes(ye,ee),ye},se.createGroup=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&se.setAttributes($,V),$},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(V,$,ee,ye,oe,Ve,Tt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(Xt,[["id",V],["orient",$],["markerWidth",ee.toString()],["markerHeight",ye.toString()],["refX",oe.toString()],["refY",Ve.toString()]]),Xt.appendChild(Tt),Xt},se.createText=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),V&&se.setAttributes($,V),$},se.createTSpan=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=V,$&&se.setAttributes(ee,$),ee},se.createImage=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&se.setAttributes($,V),$},se.createPoint=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=V,ee.y=$,ee},se.createPath=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",V),$&&se.setAttributes(ee,$),ee},se}(),ne=function(){function se(){}return se.addKey=function(V){se.key=V},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),ge=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(V,$,ee){var ye=this;return new Promise(function(oe){var Ve=ee!==void 0?ee:document.createElement("canvas");V===null&&(ye.markersOnly=!0,ye.naturalSize=!1);var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg");Tt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Tt.setAttribute("width",$.width.baseVal.valueAsString),Tt.setAttribute("height",$.height.baseVal.valueAsString),Tt.setAttribute("viewBox","0 0 "+$.viewBox.baseVal.width.toString()+" "+$.viewBox.baseVal.height.toString()),Tt.innerHTML=$.innerHTML,ye.naturalSize===!0?(Tt.width.baseVal.value=V.naturalWidth,Tt.height.baseVal.value=V.naturalHeight):ye.width!==void 0&&ye.height!==void 0&&(Tt.width.baseVal.value=ye.width,Tt.height.baseVal.value=ye.height),Ve.width=Tt.width.baseVal.value,Ve.height=Tt.height.baseVal.value;var Xt=Tt.outerHTML,Er=Ve.getContext("2d");ye.markersOnly!==!0&&Er.drawImage(V,0,0,Ve.width,Ve.height);var kt=window.URL,Pr=new Image(Ve.width,Ve.height);Pr.setAttribute("crossOrigin","anonymous");var Gr=new Blob([Xt],{type:"image/svg+xml"}),yn=kt.createObjectURL(Gr);Pr.onload=function(){Er.drawImage(Pr,0,0),kt.revokeObjectURL(yn);var ni=Ve.toDataURL(ye.imageType,ye.imageQuality);oe(ni)},Pr.src=yn})},se}(),te=function(){},re=function(){function se(V){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},se.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},se.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new Se("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Se("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Se("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ie("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ie("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Se=function(se,V){this.selector=se,this.style=V},ie=function(se,V){this.localName=se,this.style=V},q=function(){function se(V,$,ee,ye,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=$,this.markerItems=ee,this.uiStyleSettings=ye,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(V){var $=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",this.uiContainer.appendChild(ee),this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Ve=document.createElement("div");Ve.className=""+$.toolbarButtonStyleClass.name,Ve.setAttribute("data-type-name",oe.typeName),Ve.innerHTML=oe.icon,Ve.addEventListener("click",function(){$.markerToolbarButtonClicked(Ve,oe)}),$.buttons.push(Ve),$.markerButtons.push(Ve)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ye=document.createElement("div");ye.className=this.toolbarBlockStyleClass.name,ye.style.whiteSpace="nowrap",ye.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ye),this.addActionButton(ye,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ye,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},se.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var V=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$<this.markerButtons.length;$++)$<V||$===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[$]):($===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[$]))}},se.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},se.prototype.resetButtonStyles=function(){var V=this;this.buttons.forEach(function($){$.className=$.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),$.className=$.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),$.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},se.prototype.addActionButton=function(V,$,ee){var ye=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=$,oe.setAttribute("data-action",ee),oe.addEventListener("click",function(){ye.actionToolbarButtonClicked(oe,ee)}),ee){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(oe),this.buttons.push(oe)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ie("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ie("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ie("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ie("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ie("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ie("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
padding: `+V+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Se("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Se("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},se.prototype.markerToolbarButtonClicked=function(V,$){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(V,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.prototype.setActiveButton=function(V){this.resetButtonStyles(),V.className=V.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),V.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},se.prototype.setActiveMarkerButton=function(V){var $=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===V});$&&this.setActiveButton($)},se.prototype.setCurrentMarker=function(V){var $=this;this.currentMarker=V,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){$.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},se}(),Y=function(){function se(V,$,ee,ye){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=$,this.uiStyleSettings=ee,this.styles=ye,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new ie("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 ie("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ie("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ie("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ie("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 ie("toolbox-panel-row_colors",`
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
padding: `+$+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Se("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Se("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(V){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(V){var $,ee,ye=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ve;oe.uiStyleSettings=ye.uiStyleSettings;var Tt=document.createElement("div");Tt.className=ye.toolboxButtonStyleClass.name+" "+((Ve=ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:ye.toolboxButtonStyleColorsClass.name),Tt.innerHTML=oe.icon,Tt.title=oe.title,Tt.addEventListener("click",function(){ye.panelButtonClick(oe)}),ye.panelButtons.push(Tt),ye.buttonRow.appendChild(Tt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(V){var $=this,ee=-1;if(V!==this.activePanel){ee=this.panels.indexOf(V),this.panelRow.innerHTML="";var ye=V.getUi();ye.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ye),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=V}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ve){var Tt,Xt;oe.className=$.toolboxButtonStyleClass.name+" "+(Ve===ee?""+((Tt=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Tt!==void 0?Tt:$.toolboxActiveButtonStyleColorsClass.name):""+((Xt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:$.toolboxButtonStyleColorsClass.name))})},se}(),X=function(se,V){this.title=se,this.icon=V},he=function(se){function V($,ee,ye,oe){var Ve=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ve.colors=[],Ve.addTransparent=!1,Ve.colorBoxes=[],Ve.colors=ee,Ve.currentColor=ye,Ve.setCurrentColor=Ve.setCurrentColor.bind(Ve),Ve.getColorBox=Ve.getColorBox.bind(Ve),Ve}return me(V,se),V.prototype.getUi=function(){var $=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(ye){var oe=$.getColorBox(ye);ee.appendChild(oe),$.colorBoxes.push(oe)}),ee},V.prototype.getColorBox=function($){var ee=this,ye=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-ye,Ve=document.createElement("div");Ve.style.display="inline-block",Ve.style.boxSizing="content-box",Ve.style.width=oe-2+"px",Ve.style.height=oe-2+"px",Ve.style.padding="1px",Ve.style.marginRight="2px",Ve.style.marginBottom="2px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.borderRadius=(oe+2)/2+"px",Ve.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){ee.setCurrentColor($,Ve)});var Tt=document.createElement("div");return Tt.style.display="inline-block",Tt.style.width=oe-2+"px",Tt.style.height=oe-2+"px",Tt.style.backgroundColor=$,Tt.style.borderRadius=oe/2+"px",$==="transparent"&&(Tt.style.fill=this.uiStyleSettings.toolboxAccentColor,Tt.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Ve.appendChild(Tt),Ve},V.prototype.setCurrentColor=function($,ee){var ye=this;this.currentColor=$,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},V}(X),fe=function(){function se(V,$,ee){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=$,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(V){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(V,$){},se.prototype.dblClick=function(V,$){},se.prototype.manipulate=function(V){},se.prototype.pointerUp=function(V){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},se.prototype.scale=function(V,$){},se.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},se.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},se.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},se.typeName="MarkerBase",se}(),xe=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},se}(),Ke=function(){function se(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},se}(),Ze=function(){function se(){}return se.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},se.toSVGMatrix=function(V,$){return V.a=$.a,V.b=$.b,V.c=$.c,V.d=$.d,V.e=$.e,V.f=$.f,V},se}(),et=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(le.createTransform()),oe.setupControlBox(),oe}return me(V,se),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var ee=le.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ye=this.unrotatePoint($);if(this.manipulationStartX=ye.x,this.manipulationStartY=ye.y,this.offsetX=ye.x-this.left,this.offsetY=ye.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ve=this.container.transform.baseVal.getItem(0);Ve.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ve,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function($){var ee=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},V.prototype.manipulate=function($){var ee=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate($)},V.prototype.resize=function($){var ee=this.manipulationStartLeft,ye=this.manipulationStartWidth,oe=this.manipulationStartTop,Ve=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+$.x-this.manipulationStartX,ye=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ye=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+$.y-this.manipulationStartY,Ve=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ve=this.manipulationStartHeight+$.y-this.manipulationStartY}ye>=0?(this.left=ee,this.width=ye):(this.left=ee+ye,this.width=-ye),Ve>=0?(this.top=oe,this.height=Ve):(this.top=oe+Ve,this.height=-Ve),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ee=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},V.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},V.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ee=this.container.getCTM(),ye=le.createPoint($.x,$.y);return{x:(ye=ye.matrixTransform(ee)).x,y:ye.y}},V.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ee=this.container.getCTM();ee=ee.inverse();var ye=le.createPoint($.x,$.y);return{x:(ye=ye.matrixTransform(ee)).x,y:ye.y}},V.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=le.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new xe,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},V.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()},V.prototype.createGrip=function(){var $=new Ke;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},V.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ee=-$/2,ye=ee,oe=(this.width+this.CB_DISTANCE)/2-$/2,Ve=(this.height+this.CB_DISTANCE)/2-$/2,Tt=this.height+this.CB_DISTANCE-$/2,Xt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,ye),this.positionGrip(this.controlGrips.topCenter.visual,oe,ye),this.positionGrip(this.controlGrips.topRight.visual,Xt,ye),this.positionGrip(this.controlGrips.centerLeft.visual,ee,Ve),this.positionGrip(this.controlGrips.centerRight.visual,Xt,Ve),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Tt),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Tt),this.positionGrip(this.controlGrips.bottomRight.visual,Xt,Tt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,ye-3*this.CB_DISTANCE)},V.prototype.positionGrip=function($,ee,ye){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ee,ye),$.transform.baseVal.replaceItem(oe,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},V.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ee=$;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee);var ye=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:ye.x*$,y:ye.y*ee});this.left=oe.x,this.top=oe.y,this.width=this.width*$,this.height=this.height*ee,this.adjustControlBox()},V}(fe),st=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return me(V,se),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},V.prototype.createVisual=function(){this.visual=le.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},V.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},V.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},V.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this))},V.prototype.restoreState=function($){var ee=$;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee),this.setSize()},V.title="Rectangle marker",V}(et),ut=function(se){function V($,ee,ye,oe){var Ve=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ve.widths=[],Ve.widthBoxes=[],Ve.widths=ee,Ve.currentWidth=ye,Ve.setCurrentWidth=Ve.setCurrentWidth.bind(Ve),Ve}return me(V,se),V.prototype.getUi=function(){var $=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(ye){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ye===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentWidth(ye,oe)}),ee.appendChild(oe);var Ve=document.createElement("div");Ve.innerText=ye.toString(),Ve.style.marginRight="5px",oe.appendChild(Ve);var Tt=document.createElement("div");Tt.style.minHeight="20px",Tt.style.flexGrow="2",Tt.style.display="flex",Tt.style.alignItems="center";var Xt=document.createElement("hr");Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop=ye+"px solid "+$.uiStyleSettings.toolboxColor,Xt.style.flexGrow="2",Tt.appendChild(Xt),oe.appendChild(Tt),$.widthBoxes.push(oe)}),ee},V.prototype.setCurrentWidth=function($,ee){var ye=this;this.currentWidth=$,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(X),dt=function(se){function V($,ee,ye,oe){var Ve=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ve.styles=[],Ve.styleBoxes=[],Ve.styles=ee,Ve.currentStyle=ye,Ve.setCurrentStyle=Ve.setCurrentStyle.bind(Ve),Ve}return me(V,se),V.prototype.getUi=function(){var $=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(ye){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.styles.length-5+"%",oe.style.borderColor=ye===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentStyle(ye,oe)}),ee.appendChild(oe);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.overflow="hidden";var Tt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+$.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ye!==""?'stroke-dasharray="'+ye+'"':"")+` />
</svg>`;Ve.innerHTML=Tt,oe.appendChild(Ve),$.styleBoxes.push(oe)}),ee},V.prototype.setCurrentStyle=function($,ee){var ye=this;this.currentStyle=$,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(X),Fe=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.strokePanel=new he("Line color",ye.defaultColorSet,ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return me(V,se),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(st),Ie=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},ot=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return me(V,se),V.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function($){var ee=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate($),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},V.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var $=new Ke;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},V.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},V.prototype.positionGrip=function($,ee,ye){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ee,ye),$.transform.baseVal.replaceItem(oe,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},V.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ee=$;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee),this.x1=this.x1*$,this.y1=this.y1*ee,this.x2=this.x2*$,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},V}(fe),ft=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.strokePanel=new he("Line color",ye.defaultColorSet,ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return me(V,se),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ee=$;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',V}(ot),Qe=function(se){function V($,ee,ye,oe){var Ve=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ve.fonts=[],Ve.fontBoxes=[],Ve.fonts=ee,Ve.currentFont=ye,Ve.setCurrentFont=Ve.setCurrentFont.bind(Ve),Ve}return me(V,se),V.prototype.getUi=function(){var $=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(ye){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.fonts.length-5+"%",oe.style.borderColor=ye===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentFont(ye,oe)}),ee.appendChild(oe);var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.fontFamily=ye,Ve.style.overflow="hidden";var Tt=document.createElement("div");Tt.style.whiteSpace="nowrap",Tt.style.overflow="hidden",Tt.style.textOverflow="ellipsis",Tt.innerHTML="The quick brown fox jumps over the lazy dog",Ve.appendChild(Tt),oe.appendChild(Ve),$.fontBoxes.push(oe)}),ee},V.prototype.setCurrentFont=function($,ee){var ye=this;this.currentFont=$,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(X),tt=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=ye.defaultColor,oe.fontFamily=ye.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new he("Color",ye.defaultColorSet,ye.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Qe("Font",ye.defaultFontFamilies,ye.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return me(V,se),V.prototype.ownsTarget=function($){if(se.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(ye){ye===$&&(ee=!0)}),ee},V.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.renderText=function(){var $=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ee){$.textElement.appendChild(le.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ee=1;if($.width>0&&$.height>0){var ye=(1*this.width-this.width*this.padding*2/100)/$.width,oe=(1*this.height-this.height*this.padding*2/100)/$.height;ee=Math.min(ye,oe)}return ee},V.prototype.getTextPosition=function($){var ee=this.textElement.getBBox(),ye=0,oe=0;return ee.width>0&&ee.height>0&&(ye=(this.width-ee.width*$)/2,oe=this.height/2-ee.height*$/2),{x:ye,y:oe}},V.prototype.sizeText=function(){var $=this.textElement.getBBox(),ee=this.getTextScale(),ye=this.getTextPosition(ee);ye.y-=$.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ye.x+"px, "+ye.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ye.x,ye.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},V.prototype.manipulate=function($){se.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function($){se.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function($){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,$),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var $=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,$.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var ye=ee.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(ye)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ye=this.textElement.getBBox(),oe={x:ye.width*$,y:ye.height*$};ee.x-=oe.x/2,ee.y-=oe.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},V.prototype.dblClick=function($,ee){se.prototype.dblClick.call(this,$,ee),this.showTextEditor()},V.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},V.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var ee=$;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',V}(et),Be=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=ye.defaultColor,oe.lineWidth=ye.defaultStrokeWidth,oe.pixelRatio=ye.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new he("Color",ye.defaultColorSet,ye.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return me(V,se),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,ee){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo($.x,$.y),this.drawing=!0):se.prototype.pointerDown.call(this,$,ee)},V.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,$)},V.prototype.resize=function($){se.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,$)},V.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)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ye=ee[0],oe=ee[1],Ve=ee[2],Tt=ee[3],Xt=!1,Er=0;Er<this.canvasElement.height;Er++)for(var kt=0;kt<this.canvasElement.width;kt++)$.data[Er*this.canvasElement.width*4+4*kt+3]>0&&(Xt=!0,Er<oe&&(oe=Er),kt<ye&&(ye=kt),Er>Tt&&(Tt=Er),kt>Ve&&(Ve=kt));if(Xt){this.left=ye/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ve-ye)/this.pixelRatio,this.height=(Tt-oe)/this.pixelRatio;var Pr=document.createElement("canvas");Pr.width=Ve-ye,Pr.height=Tt-oe,Pr.getContext("2d").putImageData(this.canvasContext.getImageData(ye,oe,Ve-ye,Tt-oe),0,0),this.drawingImgUrl=Pr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function($){this.color=$,this.colorChanged($)},V.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){this.createVisual(),se.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',V}(et),ke=function(se){function V($,ee,ye){var oe=se.call(this,$,ye||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=ee,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return me(V,se),V.prototype.getUi=function(){var $=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var ye=function(Tt){var Xt="both";switch(Tt){case 0:Xt="both";break;case 1:Xt="start";break;case 2:Xt="end";break;case 3:Xt="none"}var Er=document.createElement("div");if(Er.style.display="flex",Er.style.flexGrow="2",Er.style.alignItems="center",Er.style.justifyContent="space-between",Er.style.padding="5px",Er.style.borderWidth="2px",Er.style.borderStyle="solid",Er.style.borderColor=Xt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Er.addEventListener("click",function(){$.setCurrentType(Xt,Er)}),ee.appendChild(Er),Xt==="both"||Xt==="start"){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,kt.style.marginLeft="5px",Er.appendChild(kt)}var Pr=document.createElement("div");Pr.style.display="flex",Pr.style.alignItems="center",Pr.style.minHeight="20px",Pr.style.flexGrow="2";var Gr=document.createElement("hr");if(Gr.style.minWidth="20px",Gr.style.border="0px",Gr.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Gr.style.flexGrow="2",Pr.appendChild(Gr),Er.appendChild(Pr),Xt==="both"||Xt==="end"){var yn=document.createElement("div");yn.style.display="flex",yn.style.alignItems="center",yn.style.minHeight="20px",yn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,yn.style.marginRight="5px",Er.appendChild(yn)}oe.typeBoxes.push(Er)},oe=this,Ve=0;Ve<4;Ve++)ye(Ve);return ee},V.prototype.setCurrentType=function($,ee){var ye=this;this.currentType=$,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===ee?ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(X),Ne=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new ke("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return me(V,se),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},V.prototype.getArrowPoints=function($,ee){var ye=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return $-ye/2+","+(ee+oe/2)+" "+$+","+(ee-oe/2)+" "+($+ye/2)+","+(ee+oe/2)},V.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var ye=this.arrow2.transform.baseVal.getItem(0);ye.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ye,0)}},V.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ee=$;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',V}(ft),Ee=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.fillColor=ye.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new he("Color",ye.defaultColorSet,ye.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return me(V,se),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(st),Ae=function(se){function V($,ee,ye,oe){var Ve=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ve.opacities=[],Ve.opacityBoxes=[],Ve.opacities=ee,Ve.currentOpacity=ye,Ve.setCurrentOpacity=Ve.setCurrentOpacity.bind(Ve),Ve}return me(V,se),V.prototype.getUi=function(){var $=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(ye){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ye===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentOpacity(ye,oe)}),ee.appendChild(oe);var Ve=document.createElement("div");Ve.innerText=100*ye+"%",oe.appendChild(Ve),$.opacityBoxes.push(oe)}),ee},V.prototype.setCurrentOpacity=function($,ee){var ye=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(X),Le=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=ye.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=ye.defaultHighlightOpacity,oe.fillPanel=new he("Color",ye.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Ae("Opacity",ye.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return me(V,se),V.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="HighlightMarker",V.title="Highlight marker",V.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',V}(Ee),Me='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',He=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=ye.defaultStrokeColor,oe.bgColor=ye.defaultFillColor,oe.fontFamily=ye.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new he("Text color",ye.defaultColorSet,oe.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new he("Fill color",ye.defaultColorSet,oe.bgColor,Me),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Qe("Font",ye.defaultFontFamilies,ye.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Ke,oe.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return me(V,se),V.prototype.ownsTarget=function($){return se.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},V.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function($,ee){this.state==="new"&&se.prototype.pointerDown.call(this,$,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,$,ee)},V.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,$);else{var ee=this.state==="creating";se.prototype.pointerUp.call(this,$),this.setTipPoints(ee),this.positionTip()}},V.prototype.manipulate=function($){if(this.tipMoving){var ee=this.unrotatePoint($);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,$)},V.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},V.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},V.prototype.setTipPoints=function($){$===void 0&&($=!1);var ee=Math.min(this.height/2,15),ye=this.height/5;$&&(this.tipPosition={x:ee+ye/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ye=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:0},this.tipBase2Position={x:ee+ye,y:0}):(this.tipBase1Position={x:0,y:ee},this.tipBase2Position={x:0,y:ee+ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ye=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-ye,y:0},this.tipBase2Position={x:this.width-ee,y:0}):(this.tipBase1Position={x:this.width,y:ee},this.tipBase2Position={x:this.width,y:ee+ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ye=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-ye,y:this.height},this.tipBase2Position={x:this.width-ee,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ee-ye},this.tipBase2Position={x:this.width,y:this.height-ee}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ye=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:this.height},this.tipBase2Position={x:ee+ye,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ee},this.tipBase2Position={x:0,y:this.height-ee-ye})},V.prototype.resize=function($){se.prototype.resize.call(this,$),this.positionTip()},V.prototype.positionTip=function(){le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var $=this.tipGrip.visual.transform.baseVal.getItem(0);$.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem($,0)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.select=function(){this.positionTip(),se.prototype.select.call(this)},V.prototype.getState=function(){var $=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var ee=$;this.bgColor=ee.bgColor,this.tipPosition=ee.tipPosition,se.prototype.restoreState.call(this,$),this.createTip(),this.setTipPoints()},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee),this.tipPosition={x:this.tipPosition.x*$,y:this.tipPosition.y*ee},this.positionTip()},V.typeName="CalloutMarker",V.title="Callout marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',V}(tt),nt=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.fillColor=ye.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new he("Line color",ce(ye.defaultColorSet,["transparent"]),ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new he("Fill color",ce(ye.defaultColorSet,["transparent"]),oe.fillColor,Me),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Ae("Opacity",ye.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return me(V,se),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},V.prototype.createVisual=function(){this.visual=le.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},V.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},V.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},V.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},V.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var ee=$;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,ee){se.prototype.scale.call(this,$,ee),this.setSize()},V.typeName="EllipseMarker",V.title="Ellipse marker",V.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',V}(et),vt=function(se){function V($,ee,ye){return se.call(this,$,ee,ye)||this}return me(V,se),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},V.prototype.createTips=function(){this.tip1=le.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var ye=this.tip2.transform.baseVal.getItem(0);ye.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ye,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=V.typeName,$},V.prototype.restoreState=function($){se.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',V}(ft),bt=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.strokePanel.colors=ye.defaultColorSet,oe.fillColor="transparent",oe}return me(V,se),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',V}(nt),Wt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},se.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),Bt=function(se){function V($,ee,ye){var oe=se.call(this,$,ee,ye)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.strokePanel=new he("Line color",ye.defaultColorSet,ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return me(V,se),V.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,ee){se.prototype.pointerDown.call(this,$,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},V.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),se.prototype.manipulate.call(this,$)},V.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),se.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},V.prototype.scale=function($,ee){this.curveX=this.curveX*$,this.curveY=this.curveY*ee,se.prototype.scale.call(this,$,ee)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ee=$;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',V}(ot),lr=function(){function se(V,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=$}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),dr=function(se){function V($,ee,ye){var oe=se.call(this,$,!1)||this;return oe.dataUrl=ee,oe.state=ye,oe}return me(V,se),V}(lr),Ot=function(se){function V($,ee,ye){ye===void 0&&(ye=!1);var oe=se.call(this,$,ye)||this;return oe.marker=ee,oe}return me(V,se),V}(lr),Vr=function(){function se(){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 se.prototype.addEventListener=function(V,$){this[V].push($)},se.prototype.removeEventListener=function(V,$){var ee=this[V].indexOf($);ee>-1&&this[V].splice(ee,1)},se}(),Wr=function(){function se(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ie,this._isOpen=!1,this.undoRedoManager=new Wt,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 Vr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new re(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.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(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Be,Ne,tt,bt,nt,Le,He,vt,Ee,ft,Bt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Be,Ne,tt,nt,Le,He]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Be,Ne,tt,Le]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var $=this;this._availableMarkerTypes.splice(0),V.forEach(function(ee){if(typeof ee=="string"){var ye=$.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===ee});ye!==void 0&&$._availableMarkerTypes.push(ye)}else $._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&te.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=te.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new lr(V))})},se.prototype.render=function(){return Oe(this,void 0,void 0,function(){var V;return be(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(V=new ge).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},se.prototype.close=function(V){var $=this;if(V===void 0&&(V=!1),this.isOpen){var ee=!1;V||this.eventListeners.beforeclose.forEach(function(ye){var oe=new lr($,!0);ye(oe),oe.defaultPrevented&&(ee=!0)}),ee||(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(ye){return ye(new lr($))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var V,$=[],ee=0;ee<arguments.length;ee++)$[ee]=arguments[ee];(V=this._availableMarkerTypes).push.apply(V,$)},se.prototype.addRenderEventListener=function(V){this.addEventListener("render",function($){V($.dataUrl,$.state)})},se.prototype.removeRenderEventListener=function(V){},se.prototype.addCloseEventListener=function(V){this.addEventListener("close",function(){V()})},se.prototype.removeCloseEventListener=function(V){},se.prototype.setupResizeObserver=function(){var V=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return V.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupTargetResize=function(){var V=1*this.target.clientWidth/this.target.clientHeight,$=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,ee=$<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize($,ee)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(V,$){this._isResizing=!0;var ee=V/this.imageWidth,ye=$/this.imageHeight;this.imageWidth=Math.round(V),this.imageHeight=Math.round($),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ee,ye),this._isResizing=!1},se.prototype.scaleMarkers=function(V,$){var ee,ye=this;this._currentMarker&&this._currentMarker instanceof tt?this._currentMarker.scale(V,$):(ee=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==ye._currentMarker&&oe.scale(V,$)}),ee!==void 0&&this.setCurrentMarker(ee)},se.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},se.prototype.setTopLeft=function(){var V=this.editingTarget.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=V.left-$.left,this.top=V.top-$.top},se.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},se.prototype.addDefs=function(){for(var V,$=[],ee=0;ee<arguments.length;ee++)$[ee]=arguments[ee];this.defs=le.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,$)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},se.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var V=document.createElement("a");V.href="https://markerjs.com/",V.target="_blank",V.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},se.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")},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.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 V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Y(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(V){this.markerImage.removeChild(V.container),this.markers.indexOf(V)>-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},se.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())},se.prototype.toolbarButtonClicked=function(V,$){if(V==="marker"&&$!==void 0)this.createNewMarker($);else if(V==="action")switch($){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ye){var oe=new Ot(V,V._currentMarker,!0);ye(oe),oe.defaultPrevented&&($=!0)}),!$){var ee=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(ye){return ye(new Ot(V,ee))})}}},se.prototype.clear=function(){var V=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ve){var Tt=new Ot(V,void 0,!0);Ve(Tt),Tt.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ee=function(Ve){var Tt=ye.markers[Ve];ye.setCurrentMarker(ye.markers[Ve]),ye._currentMarker.dispose(),ye.markerImage.removeChild(ye._currentMarker.container),ye.markers.splice(ye.markers.indexOf(ye._currentMarker),1),ye.eventListeners.markerdelete.forEach(function(Xt){return Xt(new Ot(V,Tt))})},ye=this,oe=this.markers.length-1;oe>=0;oe--)ee(oe);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.prototype.showNotesEditor=function(){var V;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=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},se.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)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===$.width&&ee.height===$.height){var ye=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),ye<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new lr(V))})}else this.undoRedoManager.replaceLastUndoStep($),this.eventListeners.statechange.forEach(function(oe){return oe(new lr(V))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.prototype.undoStep=function(){var V=this,$=this.undoRedoManager.undo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new lr(V))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.prototype.redoStep=function(){var V=this,$=this.undoRedoManager.redo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new lr(V))}))},se.prototype.stepZoom=function(){var V=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=V<this.zoomSteps.length-1?this.zoomSteps[V+1]:this.zoomSteps[0]},se.prototype.panTo=function(V){this.contentDiv.scrollBy({left:this.prevPanPoint.x-V.x,top:this.prevPanPoint.y-V.y}),this.prevPanPoint=V},se.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var V,$,ee=this;return be(this,function(ye){switch(ye.label){case 0:return[4,this.render()];case 1:return V=ye.sent(),$=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new dr(ee,V,$))}),this.close(!0),[2]}})})},se.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var $={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ee){return $.markers.push(ee.getState())}),$},se.prototype.restoreState=function(V){var $=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(ee){var ye=$._availableMarkerTypes.find(function(Ve){return Ve.typeName===ee.typeName});if(ye!==void 0){var oe=$.addNewMarker(ye);oe.restoreState(ee),$.markers.push(oe)}}),V.width&&V.height&&(V.width!==this.imageWidth||V.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/V.width,this.imageHeight/V.height),this.eventListeners.restorestate.forEach(function(ee){return ee(new lr($))})},se.prototype.addNewMarker=function(V){var $=le.createGroup();return this.markerImage.appendChild($),new V($,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(V){var $,ee=this;($=typeof V=="string"?this._availableMarkerTypes.find(function(ye){return ye.typeName===V}):V)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker($),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton($.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ye){return ye(new Ot(ee,ee._currentMarker))}))},se.prototype.markerCreated=function(V){var $=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(V),this.setCurrentMarker(V),V instanceof Be&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Be):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ee){return ee(new Ot($,$._currentMarker))})},se.prototype.colorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=V,this.settings.defaultStrokeColor=V)},se.prototype.fillColorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=V)},se.prototype.markerStateChanged=function(V){var $=this;this.eventListeners.markerchange.forEach(function(ee){return ee(new Ot($,V))})},se.prototype.setCurrentMarker=function(V){var $=this;this._currentMarker!==V&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ee){return ee(new Ot($,$._currentMarker))})),this._currentMarker=V,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ee){return ee(new Ot($,$._currentMarker))}))},se.prototype.onPointerDown=function(V){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||V.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var $=this.markers.find(function(ee){return ee.ownsTarget(V.target)});$!==void 0?(this.setCurrentMarker($),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:V.clientX,y:V.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY))},se.prototype.onDblClick=function(V){if(this._isFocused||this.focus(),this.mode==="select"){var $=this.markers.find(function(ee){return ee.ownsTarget(V.target)});$!==void 0&&$!==this._currentMarker&&this.setCurrentMarker($),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target):this.setCurrentMarker()}},se.prototype.onPointerMove=function(V){this.touchPoints!==1&&V.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||V.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(V.clientX,V.clientY)):this.zoomLevel>1&&this.panTo({x:V.clientX,y:V.clientY}))},se.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(V,$){var ee=this.markerImage.getBoundingClientRect();return{x:(V-ee.left)/this.zoomLevel,y:($-ee.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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()},se.prototype.addLicenseKey=function(V){ne.addKey(V)},se.prototype.addEventListener=function(V,$){this.eventListeners.addEventListener(V,$)},se.prototype.removeEventListener=function(V,$){this.eventListeners.removeEventListener(V,$)},se.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new lr(V))}))},se.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new lr(V))}))},se.instanceCounter=0,se}();/* **********************************
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 Yr=function(se,V){return(Yr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ee){$.__proto__=ee}||function($,ee){for(var ye in ee)Object.prototype.hasOwnProperty.call(ee,ye)&&($[ye]=ee[ye])})(se,V)};function bn(se,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function $(){this.constructor=se}Yr(se,V),se.prototype=V===null?Object.create(V):($.prototype=V.prototype,new $)}function Ar(se,V,$,ee){return new($||($=Promise))(function(ye,oe){function Ve(Er){try{Xt(ee.next(Er))}catch(kt){oe(kt)}}function Tt(Er){try{Xt(ee.throw(Er))}catch(kt){oe(kt)}}function Xt(Er){var kt;Er.done?ye(Er.value):(kt=Er.value,kt instanceof $?kt:new $(function(Pr){Pr(kt)})).then(Ve,Tt)}Xt((ee=ee.apply(se,V||[])).next())})}function fn(se,V){var $,ee,ye,oe,Ve={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return oe={next:Tt(0),throw:Tt(1),return:Tt(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Tt(Xt){return function(Er){return function(kt){if($)throw new TypeError("Generator is already executing.");for(;Ve;)try{if($=1,ee&&(ye=2&kt[0]?ee.return:kt[0]?ee.throw||((ye=ee.return)&&ye.call(ee),0):ee.next)&&!(ye=ye.call(ee,kt[1])).done)return ye;switch(ee=0,ye&&(kt=[2&kt[0],ye.value]),kt[0]){case 0:case 1:ye=kt;break;case 4:return Ve.label++,{value:kt[1],done:!1};case 5:Ve.label++,ee=kt[1],kt=[0];continue;case 7:kt=Ve.ops.pop(),Ve.trys.pop();continue;default:if(!(ye=Ve.trys,(ye=ye.length>0&&ye[ye.length-1])||kt[0]!==6&&kt[0]!==2)){Ve=0;continue}if(kt[0]===3&&(!ye||kt[1]>ye[0]&&kt[1]<ye[3])){Ve.label=kt[1];break}if(kt[0]===6&&Ve.label<ye[1]){Ve.label=ye[1],ye=kt;break}if(ye&&Ve.label<ye[2]){Ve.label=ye[2],Ve.ops.push(kt);break}ye[2]&&Ve.ops.pop(),Ve.trys.pop();continue}kt=V.call(se,Ve)}catch(Pr){kt=[6,Pr],ee=0}finally{$=ye=0}if(5&kt[0])throw kt[1];return{value:kt[0]?kt[1]:void 0,done:!0}}([Xt,Er])}}}var cn=function(){function se(){}return se.addKey=function(V){se.key=V},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),Vt=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(V,$){for(var ee=0,ye=$;ee<ye.length;ee++){var oe=ye[ee],Ve=oe[0],Tt=oe[1];V.setAttribute(Ve,Tt)}},se.createRect=function(V,$,ee){var ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return ye.setAttribute("width",V.toString()),ye.setAttribute("height",$.toString()),ee&&se.setAttributes(ye,ee),ye},se.createLine=function(V,$,ee,ye,oe){var Ve=document.createElementNS("http://www.w3.org/2000/svg","line");return Ve.setAttribute("x1",V.toString()),Ve.setAttribute("y1",$.toString()),Ve.setAttribute("x2",ee.toString()),Ve.setAttribute("y2",ye.toString()),oe&&se.setAttributes(Ve,oe),Ve},se.createPolygon=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",V),$&&se.setAttributes(ee,$),ee},se.createCircle=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(V/2).toString()),ee.setAttribute("cy",(V/2).toString()),ee.setAttribute("r",V.toString()),$&&se.setAttributes(ee,$),ee},se.createEllipse=function(V,$,ee){var ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ye.setAttribute("cx",(V/2).toString()),ye.setAttribute("cy",($/2).toString()),ye.setAttribute("rx",(V/2).toString()),ye.setAttribute("ry",($/2).toString()),ee&&se.setAttributes(ye,ee),ye},se.createGroup=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&se.setAttributes($,V),$},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(V,$,ee,ye,oe,Ve,Tt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(Xt,[["id",V],["orient",$],["markerWidth",ee.toString()],["markerHeight",ye.toString()],["refX",oe.toString()],["refY",Ve.toString()]]),Xt.appendChild(Tt),Xt},se.createText=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),V&&se.setAttributes($,V),$},se.createTSpan=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=V,$&&se.setAttributes(ee,$),ee},se.createImage=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&se.setAttributes($,V),$},se.createPoint=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=V,ee.y=$,ee},se.createPath=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",V),$&&se.setAttributes(ee,$),ee},se.createElement=function(V,$){var ee=document.createElementNS("http://www.w3.org/2000/svg",V);return $&&se.setAttributes(ee,$),ee},se.getHollowRectanglePath=function(V,$,ee,ye,oe,Ve,Tt,Xt){return"M"+V+","+$+"V"+($+ye)+"H"+(V+ee)+"V"+$+"H"+oe+"V"+Ve+"H"+(oe+Tt)+"V"+(Ve+Xt)+"H"+oe+"V"+$+"Z"},se}(),En=function(){function se(V){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},se.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},se.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new fr("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new fr("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new fr("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new br("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new br("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),fr=function(se,V){this.selector=se,this.style=V},br=function(se,V){this.localName=se,this.style=V},Br=function(){function se(){this.blocks=[],this.display=""}return se.prototype.addButtonBlock=function(V){V.className=this.blockClassName,V.buttonClassName=this.buttonClassName,V.buttonColorsClassName=this.buttonColorsClassName,V.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(V)},se.prototype.addElementBlock=function(V){V.className===void 0&&(V.className=this.blockClassName),this.blocks.push(V)},se.prototype.getUI=function(){var V=document.createElement("div");return V.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,V.style.display=this.display,this.blocks.forEach(function($){return V.appendChild($.getUI())}),V},se}(),kn=function(){function se(){}return se.prototype.getUI=function(){var V=document.createElement("div");if(V.className=this.className,this.minWidth!==void 0&&(V.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":V.style.justifyContent="flex-start";break;case"center":V.style.justifyContent="center";break;case"end":V.style.justifyContent="flex-end"}return V.style.whiteSpace="nowrap",V},se}(),Kn=function(se){function V(){var $=se!==null&&se.apply(this,arguments)||this;return $.buttons=[],$}return bn(V,se),V.prototype.addButton=function($){$.className=this.buttonClassName,$.colorsClassName=this.buttonColorsClassName,$.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push($)},V.prototype.getUI=function(){var $=se.prototype.getUI.call(this);return this.buttons.forEach(function(ee){return $.appendChild(ee.getUI())}),$},V}(kn),dn=function(){function se(V,$){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=$,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(se.prototype,"icon",{get:function(){return this._icon},set:function(V){this._icon=V,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isActive",{get:function(){return this._isActive},set:function(V){this._isActive=V,this.adjustClassName()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){var V=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return V.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},se.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},se.prototype.hide=function(){this._isHidden=!0},se}(),sr=function(se){function V(){var $=se!==null&&se.apply(this,arguments)||this;return $.elements=[],$}return bn(V,se),V.prototype.addElement=function($){this.elements.push($)},V.prototype.getUI=function(){var $=se.prototype.getUI.call(this);return this.elements.forEach(function(ee){return $.appendChild(ee)}),$},V}(kn),Jn=function(){function se(V,$){this.horizontal=V,this.vertical=$}return Object.defineProperty(se.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),se.prototype.getVerticalLength=function(V){return V/this.ratio},se.prototype.getHorizontalLength=function(V){return V*this.ratio},se}(),Tn=function(){function se(){}return se.getIcon=function(V,$){if(V>0&&$>0){var ee=new Jn(V,$),ye=ee.ratio>=1?20:ee.getHorizontalLength(20),oe=ee.ratio<1?20:ee.getVerticalLength(20),Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ve);var Tt=Vt.createDefs();Ve.appendChild(Tt);var Xt=Vt.createElement("clipPath",[["id","text-bg-clip"]]);Tt.appendChild(Xt);var Er=Vt.createPath(Vt.getHollowRectanglePath((24-ye)/2,(24-oe)/2,ye,oe,(24-ye)/2+2,(24-oe)/2+2,ye-4,oe-4));Ve.appendChild(Er);var kt=Vt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);kt.appendChild(Vt.createTSpan(V+":"+$)),Ve.appendChild(kt);var Pr=kt.getBBox();Vt.setAttributes(kt,[["x",((24-Pr.width)/2).toString()],["y",((24-Pr.height)/2-Pr.y).toString()]]);var Gr=Vt.createPath(Vt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Pr.width))/2,(24-Math.ceil(Pr.height))/2,Math.ceil(Pr.width),Math.ceil(Pr.height)));return Xt.appendChild(Gr),Vt.setAttributes(Er,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ve),Ve.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},se}(),On=function(se){function V($,ee,ye){var oe=se.call(this,$,ee)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=ye,oe}return bn(V,se),V.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=$.className,ee.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(dn),Jr=function(){function se(V,$){this.GRIP_SIZE=10,this.color=V,this.fillColor=$,this.visual=Vt.createGroup(),this.visual.appendChild(Vt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Vt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},se.prototype.setCenter=function(V,$){this.visual.childNodes.forEach(function(ee){return Vt.setAttributes(ee,[["cx",V.toString()],["cy",$.toString()]])})},se}(),An=function(){function se(V,$,ee,ye){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=$,this.margin=ee,this.container=ye,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(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&&Vt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var V=this;this.cropShadeElement=Vt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Vt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$<this.numberOfGridLines;$++)this.horizontalGridLines.push(Vt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Vt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ee){return V.gridContainer.appendChild(ee)}),this.verticalGridLines.forEach(function(ee){return V.gridContainer.appendChild(ee)}),this.cropRectElement=Vt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},se.prototype.setCropRectangle=function(V){this.cropRect=V;var $=Object.assign({},this.cropRect);this.zoomFactor!==1&&($.width=this.cropRect.width*this.zoomFactor,$.height=this.cropRect.height*this.zoomFactor,$.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-$.width/2,$.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Vt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ee=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Ve){var Tt=$.y+ee*(Ve+1);Vt.setAttributes(oe,[["x1",""+$.x],["y1",""+Tt],["x2",""+($.x+$.width)],["y2",""+Tt]])});var ye=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Ve){var Tt=$.x+ye*(Ve+1);Vt.setAttributes(oe,[["x1",""+Tt],["y1",""+$.y],["x2",""+Tt],["y2",""+($.y+$.height)]])}),Vt.setAttributes(this.cropShadeElement,[["d",Vt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.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)},se.prototype.clientToLocalCoordinates=function(V,$){var ee=this.container.getBoundingClientRect();return{x:V-ee.left+this.margin,y:$-ee.top+this.margin}},se.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize($)}V.preventDefault()},se.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},se.prototype.move=function(V){var $=V.x-this.previousPoint.x,ee=V.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},se.prototype.resize=function(V){var $=Object.assign({},this.cropRect),ee=V.x-this.previousPoint.x,ye=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+ee<this.margin&&(ee=this.margin-$.x),$.x+=ee,$.width=this.cropRect.x+this.cropRect.width-$.x;break;case this.bottomRightGrip:case this.topRightGrip:$.width+ee>this.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-$.width),$.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=ye,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=ye}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=V,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),ye=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidth<ye/this.canvasHeight?this.cropRect.width=ee:this.cropRect.height=ye,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=V-this.cropRect.width/2,this.cropRect.y=$-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},se.prototype.getRescaledRect=function(V,$,ee,ye,oe,Ve){var Tt=ee/V,Xt=ye/$;return{x:(oe.x-Ve)*Tt+Ve,y:(oe.y-Ve)*Xt+Ve,width:oe.width*Tt,height:oe.height*Xt}},se.prototype.scaleCanvas=function(V,$){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,$,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},se}(),Zn=function(){function se(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,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(se.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.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},se.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},se.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},se.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();Vt.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},se.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var ye=ee%5==0?this.height/3:this.height/6;$+="h4v"+-ye+"h1v"+ye}$+="v1H0Z",this.scaleShape=Vt.createPath($);var oe=Vt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),V.appendChild(this.scaleShape),this.angleLabelElement=Vt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Vt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ve=Vt.createTSpan("");return Ve.innerHTML="&deg;",this.angleLabelElement.appendChild(Ve),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},se}(),ri=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(V,$,ee,ye,oe,Ve,Tt){var Xt=this;return new Promise(function(Er){var kt=document.createElement("canvas");kt.width=V.width.baseVal.value-2*ye,kt.height=V.height.baseVal.value-2*ye;var Pr=1,Gr=1;Xt.naturalSize===!0?(Pr=$.naturalWidth/(V.width.baseVal.value-2*ye)/Ve,Gr=$.naturalHeight/(V.height.baseVal.value-2*ye)/Tt,kt.width=$.naturalWidth/Ve,kt.height=$.naturalHeight/Tt):Xt.width!==void 0&&Xt.height!==void 0&&(Pr=Xt.width/ee.width,Gr=Xt.height/ee.height,kt.width*=Pr,kt.height*=Gr);var yn=kt.getContext("2d");yn.translate(kt.width/2,kt.height/2),yn.rotate(oe*Math.PI/180),yn.scale(Ve,Tt),yn.translate(-kt.width/2,-kt.height/2),yn.drawImage($,0,0,kt.width,kt.height);var ni=document.createElement("canvas");ni.width=ee.width*Pr,ni.height=ee.height*Gr,ni.getContext("2d").putImageData(yn.getImageData((ee.x-ye)*Pr,(ee.y-ye)*Gr,ee.width*Pr,ee.height*Gr),0,0),Er(ni.toDataURL(Xt.imageType,Xt.imageQuality))})},se}(),Nt=function(){function se(V){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=se.instanceCounter++,this.styles=new En(this.instanceNo),this.target=V,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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),se.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},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function($){return $()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},se.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},se.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},se.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},se.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.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))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=$+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/V;this.resize($,ee)}},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Vt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},se.prototype.resize=function(V,$){this.imageWidth=Math.round(V),this.imageHeight=Math.round($),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},se.prototype.setEditingTarget=function(){var V=document.createElement("canvas");V.width=this.target.naturalWidth,V.height=this.target.naturalHeight,V.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var $=V.toDataURL();Vt.setAttributes(this.editingTarget,[["href",$]]),this.setEditingTargetSize()},se.prototype.setTopLeft=function(){var V=this.target.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=V.left-$.left-this.CANVAS_MARGIN,this.top=V.top-$.top-this.CANVAS_MARGIN},se.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Vt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Vt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Vt.createGroup(),this.editingTargetRotationScaleContainer=Vt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var V=Vt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(V);var $=Vt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem($),this.editingTargetContainer=Vt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},se.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},se.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Vt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new An(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},se.prototype.zoomToCrop=function(){if(this.cropRect){var V=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,$=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=V+"px "+$+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-V+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-$+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},se.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},se.prototype.cropRectChanged=function(V){this.cropRect=V,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},se.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var V=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,$=this.target.offsetTop>V+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new Br,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new Kn;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ee=[];this.aspectRatios.forEach(function(Gr){var yn=new dn(Tn.getIcon(Gr.horizontal,Gr.vertical),Gr.horizontal===0&&Gr.vertical===0?"FREE":Gr.horizontal+":"+Gr.vertical);yn.onClick=function(){return V.ratioButtonClicked(Gr)},ee.push(yn)}),this.aspectRatioButton=new On(Tn.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ye=new dn('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ye.isActive=this.isGridVisible,ye.onClick=function(){V.isGridVisible=!V.isGridVisible,ye.isActive=V.isGridVisible},$.addButton(ye);var oe=new dn('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,oe.isActive=V.zoomToCropEnabled},$.addButton(oe),!cn.isLicensed){var Ve=new sr;this.topToolbar.addElementBlock(Ve);var Tt=document.createElement("div");Tt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Xt=document.createElement("a");Xt.style.color="currentColor",Xt.href="https://markerjs.com/products/cropro",Xt.target="_blank",Xt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Tt.appendChild(Xt),Ve.addElement(Tt)}var Er=new Kn;Er.minWidth=3*this.toolbarHeight+"px",Er.contentAlign="end",this.topToolbar.addButtonBlock(Er);var kt=new dn('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");kt.onClick=this.startRenderAndClose,Er.addButton(kt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(kt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Pr=new dn('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Pr.onClick=this.close,Er.addButton(Pr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Pr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new Br,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new Kn;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ee=new dn('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,$.addButton(ee);var ye=new dn('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ye.onClick=this.rotateRightButtonClicked,$.addButton(ye);var oe=new sr;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new Zn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Er){V.rotateBy(Er),V.straightener.angle=V.rotationAngle},oe.addElement(this.straightener.getUI());var Ve=new Kn;Ve.minWidth=2*this.toolbarHeight+"px",Ve.contentAlign="end",this.bottomToolbar.addButtonBlock(Ve);var Tt=new dn('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Tt.onClick=this.flipHorizontallyButtonClicked,Ve.addButton(Tt);var Xt=new dn('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Xt.onClick=this.flipVerticallyButtonClicked,Ve.addButton(Xt)},se.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Tn.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Jn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(V){if(V){var $=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(V,$){var ee=this.cropImage.getBoundingClientRect();return{x:V-ee.left,y:$-ee.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"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()},se.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},se.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},se.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},se.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},se.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Ar(this,void 0,void 0,function(){var V,$;return fn(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return V=ee.sent(),$=this.getState(),this.renderEventListeners.forEach(function(ye){return ye(V,$)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Ar(this,void 0,void 0,function(){var V;return fn(this,function($){switch($.label){case 0:return(V=new ri).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),Vt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return $.sent(),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,$.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new br("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 br("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new br("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new br("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*V)+`px;
height: `+(this.toolbarHeight-2*V)+`px;
padding: `+V+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new br("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new br("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new fr("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new fr("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new br("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 br("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new br("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 br("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*V)+`px;
padding: `+V+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new br("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},se.instanceCounter=0,se}(),_r=D("8hTe"),mi=D.n(_r),xi=/<pre[^>]*>/g;function Di(se){var V=document.createElement("div");return V.innerHTML=se,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var wi=J.a=function(se){var V=se.value,$=V===void 0?"":V,ee=se.edit,ye=ee===void 0?!1:ee,oe=se.className,Ve=se.showTextOnly,Tt=se.showLines,Xt=se.replaces,Er=se.zoomImg,kt=se.hasMask,Pr=se.style,Gr=Pr===void 0?{}:Pr,yn=se.stylesPrev,ni=yn===void 0?{}:yn,ii=String($),Bn=Object(h.useRef)(),Ni=Object(h.useRef)(),Ki=Object(h.useState)(""),Gn=Object(T.a)(Ki,2),Ti=Gn[0],Gi=Gn[1],Li=Object(h.useState)("office"),li=Object(T.a)(Li,2),ea=li[0],Vi=li[1],ta=function(){var mt=new Nt(Ni.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var wt=Object(v.a)(t.a.mark(function Lt(It){var Kt;return t.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Bn.current.style.display="none",ht.next=3,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:It}});case 3:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return ht.stop()}},Lt)}));return function(Lt){return wt.apply(this,arguments)}}()),mt.show()},oa=function(){var mt=new Wr(Ni.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var wt=Object(v.a)(t.a.mark(function Lt(It){var Kt;return t.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Bn.current.style.display="none",!Ni.current){ht.next=6;break}return ht.next=4,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:It.dataUrl}});case 4:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return ht.stop()}},Lt)}));return function(Lt){return wt.apply(this,arguments)}}()),mt.show(),window.markerArea=mt},ki=Object(h.useMemo)(function(){Bn.current&&(Bn.current.style.zIndex=-1);try{var rt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ii=ii.replace(rt,"("+Z.a.API_SERVER+"/api/attachments/").replace(mt,'"'+Z.a.API_SERVER+"/api/attachments/").replace(wt,'"'+Z.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(Ht){}var Lt=B(ii),It=F();if(ii.match(/\[TOC\]/)&&(Lt=Lt.replace("<p>[TOC]</p>",I()),x()),Lt=Lt.replace(/(__special_katext_id_\d+__)/g,function(Ht,ht){var St=It[ht],At=St.type,ur=St.expression;return Object(ue.renderToString)(Di(ur)||"",{displayMode:At==="block",throwOnError:!1,output:"html"})}),Lt=Lt.replace(/▁/g,"\u2581\u2581\u2581"),P(),Ve){var Kt=document.createElement("div");return Kt.innerHTML=Lt,Kt.innerText}return setTimeout(function(){return ha()},500),Lt},[ii]),qn=Object(h.useRef)();b.WebkitLineClamp=Tt,Tt&&(Gr=Object(m.a)(Object(m.a)({},Gr),b));function ji(rt){var mt=rt.target;if(mt.tagName.toUpperCase()==="IMG"){if(Er){var wt=mt.getAttribute("src");Gi(wt),Vi("image")}}else if(mt.tagName.toUpperCase()==="A"){var Lt=mt.getAttribute("href");if(Lt.indexOf("office")>-1)rt.preventDefault(),Gi(Lt),Vi("office");else if(Lt.indexOf("application/pdf")>-1)rt.preventDefault(),Gi(Lt),Vi("pdf");else if(Lt.indexOf("text/html")>-1)rt.preventDefault(),Gi(Lt),Vi("html");else if(Lt.startsWith("#")){rt.preventDefault();var It=document.getElementById(Lt.replace("#",""));It&&It.scrollIntoView(!0)}}}var ha=function(){var mt,wt=(mt=qn.current)===null||mt===void 0?void 0:mt.querySelectorAll("video");wt==null||wt.forEach(function(Lt){if(Lt.oncontextmenu=function(){return!1},Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var It=new K.a;It.loadSource(Lt.src),It.attachMedia(Lt)}}})};Object(h.useEffect)(function(){if(qn.current&&ki&&(ki.match(xi)&&window.PR.prettyPrint()),qn.current)return qn.current.addEventListener("click",ji),function(){qn.current.removeEventListener("click",ji),P(),x()}},[ki,qn.current,ji]);var xt=function(mt){if(!ye)return;mt.target.nodeName==="IMG"?(Bn.current.style.zIndex=1,Bn.current.style.display="flex",Bn.current.style.width=mt.target.clientWidth+"px",Bn.current.style.height=mt.target.clientHeight+"px",Bn.current.style.top=mt.target.offsetTop+"px",Bn.current.style.left=mt.target.offsetLeft+"px",Ni.current.src=mt.target.getAttribute("src")):Bn.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:qn,style:Object(m.a)({},Gr),className:"".concat(oe||""," markdown-body ").concat(mi.a.mdBody),onMouseOver:xt,dangerouslySetInnerHTML:{__html:ki}}),i.a.createElement("div",{ref:Bn,className:mi.a.button},i.a.createElement(g.a,null,i.a.createElement(N.a,{onClick:function(){return ta()}},"\u88C1\u526A"),i.a.createElement(N.a,{onClick:function(){return oa()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:Ni,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(de.a,{close:!0,data:Ti,type:Ti!=null&&Ti.length?ea:"",style:Object(m.a)({},ni),onClose:function(){return Gi("")}}))}},"9OqN":function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.mode.CTR=function(){var g=M.lib.BlockCipherMode.extend(),C=g.Encryptor=g.extend({processBlock:function(N,m){var v=this._cipher,T=v.blockSize,y=this._iv,t=this._counter;y&&(t=this._counter=y.slice(0),this._iv=void 0);var h=t.slice(0);v.encryptBlock(h,0),t[T-1]=t[T-1]+1|0;for(var i=0;i<T;i++)N[m+i]^=h[i]}});return g.Decryptor=C,g}(),M.mode.CTR})},"9VGf":function(H,J,D){"use strict";D.d(J,"a",function(){return C});var M=D("q1tI"),g=D.n(M);function C(N,m){var v=Object(M.useRef)();Object(M.useEffect)(function(){v.current=N}),Object(M.useEffect)(function(){function T(){v.current()}if(m!==null){var y=setInterval(T,m);return function(){return clearInterval(y)}}},[m])}},ALsQ:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.mode.CFB=function(){var g=M.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(N,m){var v=this._cipher,T=v.blockSize;C.call(this,N,m,T,v),this._prevBlock=N.slice(m,m+T)}}),g.Decryptor=g.extend({processBlock:function(N,m){var v=this._cipher,T=v.blockSize,y=N.slice(m,m+T);C.call(this,N,m,T,v),this._prevBlock=y}});function C(N,m,v,T){var y,t=this._iv;t?(y=t.slice(0),this._iv=void 0):y=this._prevBlock,T.encryptBlock(y,0);for(var h=0;h<v;h++)N[m+h]^=y[h]}return g}(),M.mode.CFB})},BJfS:function(H,J){var D=function(M){return M.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}).toLowerCase()};H.exports=D},BU3w:function(H,J,D){"use strict";D.d(J,"a",function(){return v});var M=D("MNnm"),g="rc-util-key";function C(T){if(T.attachTo)return T.attachTo;var y=document.querySelector("head");return y||document.body}function N(T){var y,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(M.a)())return null;var h=document.createElement("style");if((y=t.csp)===null||y===void 0?void 0:y.nonce){var i;h.nonce=(i=t.csp)===null||i===void 0?void 0:i.nonce}h.innerHTML=T;var c=C(t),a=c.firstChild;return t.prepend&&c.prepend?c.prepend(h):t.prepend&&a?c.insertBefore(h,a):c.appendChild(h),h}var m=new Map;function v(T,y){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=C(t);if(!m.has(h)){var i=N("",t),c=i.parentNode;m.set(h,c),c.removeChild(i)}var a=Array.from(m.get(h).children).find(function(l){return l.tagName==="STYLE"&&l[g]===y});if(a){var n,s;if(((n=t.csp)===null||n===void 0?void 0:n.nonce)&&a.nonce!==((s=t.csp)===null||s===void 0?void 0:s.nonce)){var d;a.nonce=(d=t.csp)===null||d===void 0?void 0:d.nonce}return a.innerHTML!==T&&(a.innerHTML=T),a}var f=N(T,t);return f[g]=y,f}},Bd2K:function(H,J,D){(function(M){M(D("VrN/"),D("osHv"))})(function(M){M.defineOption("autoCloseTags",!1,function(t,h,i){if(i!=M.Init&&i&&t.removeKeyMap("autoCloseTags"),!h)return;var c={name:"autoCloseTags"};(typeof h!="object"||h.whenClosing!==!1)&&(c["'/'"]=function(a){return v(a)}),(typeof h!="object"||h.whenOpening!==!1)&&(c["'>'"]=function(a){return N(a)}),t.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function N(t){if(t.getOption("disableInput"))return M.Pass;for(var h=t.listSelections(),i=[],c=t.getOption("autoCloseTags"),a=0;a<h.length;a++){if(!h[a].empty())return M.Pass;var n=h[a].head,s=t.getTokenAt(n),d=M.innerMode(t.getMode(),s.state),f=d.state,l=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(f),o=l&&l.name;if(!o)return M.Pass;var r=d.mode.configuration=="html",x=typeof c=="object"&&c.dontCloseTags||r&&g,b=typeof c=="object"&&c.indentTags||r&&C;s.end>n.ch&&(o=o.slice(0,o.length-s.end+n.ch));var p=o.toLowerCase();if(!o||s.type=="string"&&(s.end!=n.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&l.close||s.string.indexOf("/")==n.ch-s.start-1||x&&T(x,p)>-1||y(t,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],o,n,!0))return M.Pass;var I=typeof c=="object"&&c.emptyTags;if(I&&T(I,o)>-1){i[a]={text:"/>",newPos:M.Pos(n.line,n.ch+2)};continue}var O=b&&T(b,p)>-1;i[a]={indent:O,text:">"+(O?`
`:"")+"</"+o+">",newPos:O?M.Pos(n.line+1,0):M.Pos(n.line,n.ch+1)}}for(var _=typeof c=="object"&&c.dontIndentOnAutoClose,a=h.length-1;a>=0;a--){var E=i[a];t.replaceRange(E.text,h[a].head,h[a].anchor,"+insert");var w=t.listSelections().slice(0);w[a]={head:E.newPos,anchor:E.newPos},t.setSelections(w),!_&&E.indent&&(t.indentLine(E.newPos.line,null,!0),t.indentLine(E.newPos.line+1,null,!0))}}function m(t,h){for(var i=t.listSelections(),c=[],a=h?"/":"</",n=t.getOption("autoCloseTags"),s=typeof n=="object"&&n.dontIndentOnSlash,d=0;d<i.length;d++){if(!i[d].empty())return M.Pass;var f=i[d].head,l=t.getTokenAt(f),o=M.innerMode(t.getMode(),l.state),r=o.state;if(h&&(l.type=="string"||l.string.charAt(0)!="<"||l.start!=f.ch-1))return M.Pass;var x,b=o.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(b&&o.mode.name=="javascript")x=a+"script";else if(b&&o.mode.name=="css")x=a+"style";else{var p=o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(r);if(!p||p.length&&y(t,p,p[p.length-1],f))return M.Pass;x=a+p[p.length-1]}t.getLine(f.line).charAt(l.end)!=">"&&(x+=">"),c[d]=x}if(t.replaceSelections(c),i=t.listSelections(),!s)for(var d=0;d<i.length;d++)(d==i.length-1||i[d].head.line<i[d+1].head.line)&&t.indentLine(i[d].head.line)}function v(t){return t.getOption("disableInput")?M.Pass:m(t,!0)}M.commands.closeTag=function(t){return m(t)};function T(t,h){if(t.indexOf)return t.indexOf(h);for(var i=0,c=t.length;i<c;++i)if(t[i]==h)return i;return-1}function y(t,h,i,c,a){if(!M.scanForClosingTag)return!1;var n=Math.min(t.lastLine()+1,c.line+500),s=M.scanForClosingTag(t,c,null,n);if(!s||s.tag!=i)return!1;for(var d=a?1:0,f=h.length-1;f>=0&&h[f]==i;f--)++d;c=s.to;for(var f=1;f<d;f++){var l=M.scanForClosingTag(t,c,null,n);if(!l||l.tag!=i)return!1;c=l.to}return!0}})},BjJ7:function(H,J,D){"use strict";D.d(J,"d",function(){return g}),D.d(J,"c",function(){return C}),D.d(J,"e",function(){return N}),D.d(J,"b",function(){return m}),D.d(J,"a",function(){return T});var M=D("m3rI");function g(y){var t=!0;if(y.length>0){for(var h=0;h<y.length;h++)if(y[h].compile_success==0||!y[h].compile_success){t=!1;break}}else t=!1;return t}function C(y){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=[],i=0;i<y.length;i++){var c=y[i],a=t?"".concat(t,"/").concat(c.name):"".concat(c.name);h.push({title:c.name,isLeaf:!(c.type==="tree"),key:a})}return h}function N(y,t,h){for(var i=0;i<y.length;i++){var c=y[i];if(c.key===t){c.children=h;break}c.children&&N(c.children,t,h)}return y}function m(y,t,h){var i;return function(){var c=this,a=arguments,n=function(){i=null,h||y.apply(c,a)},s=h&&!i;clearTimeout(i),i=setTimeout(n,t),s&&y.apply(c,a)}}var v=!0,T=M.a.API_SERVER},"C+DQ":function(H,J,D){},"C/vA":function(H,J,D){"use strict";D.d(J,"a",function(){return M});function M(g){const C=this;let N=!1,m;return function(){return N||(N=!0,m=g.apply(C,arguments)),m}}},"Cg/j":function(H,J,D){"use strict";D.d(J,"b",function(){return M}),D.d(J,"a",function(){return g}),D.d(J,"c",function(){return N}),D.d(J,"d",function(){return m});var M;(function(v){v.serviceIds=new Map,v.DI_TARGET="$di$target",v.DI_DEPENDENCIES="$di$dependencies";function T(y){return y[v.DI_DEPENDENCIES]||[]}v.getServiceDependencies=T})(M||(M={}));const g=N("instantiationService");function C(v,T,y,t){T[M.DI_TARGET]===T?T[M.DI_DEPENDENCIES].push({id:v,index:y,optional:t}):(T[M.DI_DEPENDENCIES]=[{id:v,index:y,optional:t}],T[M.DI_TARGET]=T)}function N(v){if(M.serviceIds.has(v))return M.serviceIds.get(v);const T=function(y,t,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");C(T,y,h,!1)};return T.toString=()=>v,M.serviceIds.set(v,T),T}function m(v){return function(T,y,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");C(v,T,t,!0)}}},Dgm7:function(H,J,D){H.exports=D.p+"static/auth.ea067b42.png"},DlQD:function(H,J,D){(function(M,g){H.exports=g()})(this,function(){"use strict";function M(Be,ke){for(var Ne=0;Ne<ke.length;Ne++){var Ee=ke[Ne];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(Be,Ee.key,Ee)}}function g(Be,ke,Ne){return ke&&M(Be.prototype,ke),Ne&&M(Be,Ne),Be}function C(Be,ke){if(!Be)return;if(typeof Be=="string")return N(Be,ke);var Ne=Object.prototype.toString.call(Be).slice(8,-1);if(Ne==="Object"&&Be.constructor&&(Ne=Be.constructor.name),Ne==="Map"||Ne==="Set")return Array.from(Be);if(Ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ne))return N(Be,ke)}function N(Be,ke){(ke==null||ke>Be.length)&&(ke=Be.length);for(var Ne=0,Ee=new Array(ke);Ne<ke;Ne++)Ee[Ne]=Be[Ne];return Ee}function m(Be,ke){var Ne;if(typeof Symbol=="undefined"||Be[Symbol.iterator]==null){if(Array.isArray(Be)||(Ne=C(Be))||ke&&Be&&typeof Be.length=="number"){Ne&&(Be=Ne);var Ee=0;return function(){return Ee>=Be.length?{done:!0}:{done:!1,value:Be[Ee++]}}}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 Ne=Be[Symbol.iterator](),Ne.next.bind(Ne)}function v(Be,ke){return ke={exports:{}},Be(ke,ke.exports),ke.exports}var T=v(function(Be){function ke(){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 Ne(Ee){Be.exports.defaults=Ee}Be.exports={defaults:ke(),getDefaults:ke,changeDefaults:Ne}}),y=T.defaults,t=T.getDefaults,h=T.changeDefaults,i=/[&<>"']/,c=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=function(ke){return s[ke]};function f(Be,ke){if(ke){if(i.test(Be))return Be.replace(c,d)}else if(a.test(Be))return Be.replace(n,d);return Be}var l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(Be){return Be.replace(l,function(ke,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var r=/(^|[^\[])\^/g;function x(Be,ke){Be=Be.source||Be,ke=ke||"";var Ne={replace:function(Ae,Le){return Le=Le.source||Le,Le=Le.replace(r,"$1"),Be=Be.replace(Ae,Le),Ne},getRegex:function(){return new RegExp(Be,ke)}};return Ne}var b=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function I(Be,ke,Ne){if(Be){var Ee;try{Ee=decodeURIComponent(o(Ne)).replace(b,"").toLowerCase()}catch(Ae){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}ke&&!p.test(Ne)&&(Ne=S(ke,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Ae){return null}return Ne}var O={},_=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function S(Be,ke){O[" "+Be]||(_.test(Be)?O[" "+Be]=Be+"/":O[" "+Be]=G(Be,"/",!0)),Be=O[" "+Be];var Ne=Be.indexOf(":")===-1;return ke.substring(0,2)==="//"?Ne?ke:Be.replace(E,"$1")+ke:ke.charAt(0)==="/"?Ne?ke:Be.replace(w,"$1")+ke:Be+ke}var F={exec:function(){}};function P(Be){for(var ke=1,Ne,Ee;ke<arguments.length;ke++){Ne=arguments[ke];for(Ee in Ne)Object.prototype.hasOwnProperty.call(Ne,Ee)&&(Be[Ee]=Ne[Ee])}return Be}function L(Be,ke){var Ne=Be.replace(/\|/g,function(Le,Me,He){for(var nt=!1,vt=Me;--vt>=0&&He[vt]==="\\";)nt=!nt;return nt?"|":" |"}),Ee=Ne.split(/ \|/),Ae=0;if(Ee.length>ke)Ee.splice(ke);else for(;Ee.length<ke;)Ee.push("");for(;Ae<Ee.length;Ae++)Ee[Ae]=Ee[Ae].trim().replace(/\\\|/g,"|");return Ee}function G(Be,ke,Ne){var Ee=Be.length;if(Ee===0)return"";for(var Ae=0;Ae<Ee;){var Le=Be.charAt(Ee-Ae-1);if(Le===ke&&!Ne)Ae++;else if(Le!==ke&&Ne)Ae++;else break}return Be.substr(0,Ee-Ae)}function z(Be,ke){if(Be.indexOf(ke[1])===-1)return-1;for(var Ne=Be.length,Ee=0,Ae=0;Ae<Ne;Ae++)if(Be[Ae]==="\\")Ae++;else if(Be[Ae]===ke[0])Ee++;else if(Be[Ae]===ke[1]&&(Ee--,Ee<0))return Ae;return-1}function A(Be){Be&&Be.sanitize&&!Be.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var B={escape:f,unescape:o,edit:x,cleanUrl:I,resolveUrl:S,noopTest:F,merge:P,splitCells:L,rtrim:G,findClosingBracket:z,checkSanitizeDeprecation:A},U=T.defaults,R=B.rtrim,K=B.splitCells,Z=B.escape,ue=B.findClosingBracket;function de(Be,ke,Ne){var Ee=ke.href,Ae=ke.title?Z(ke.title):null,Le=Be[1].replace(/\\([\[\]])/g,"$1");return Be[0].charAt(0)!=="!"?{type:"link",raw:Ne,href:Ee,title:Ae,text:Le}:{type:"image",raw:Ne,href:Ee,title:Ae,text:Z(Le)}}function Ce(Be,ke){var Ne=Be.match(/^(\s+)(?:```)/);if(Ne===null)return ke;var Ee=Ne[1];return ke.split(`
`).map(function(Ae){var Le=Ae.match(/^\s+/);if(Le===null)return Ae;var Me=Le[0];return Me.length>=Ee.length?Ae.slice(Ee.length):Ae}).join(`
`)}var Re=function(){function Be(Ne){this.options=Ne||U}var ke=Be.prototype;return ke.space=function(Ee){var Ae=this.rules.block.newline.exec(Ee);if(Ae)return Ae[0].length>1?{type:"space",raw:Ae[0]}:{raw:`
`}},ke.code=function(Ee,Ae){var Le=this.rules.block.code.exec(Ee);if(Le){var Me=Ae[Ae.length-1];if(Me&&Me.type==="paragraph")return{raw:Le[0],text:Le[0].trimRight()};var He=Le[0].replace(/^ {4}/gm,"");return{type:"code",raw:Le[0],codeBlockStyle:"indented",text:this.options.pedantic?He:R(He,`
`)}}},ke.fences=function(Ee){var Ae=this.rules.block.fences.exec(Ee);if(Ae){var Le=Ae[0],Me=Ce(Le,Ae[3]||"");return{type:"code",raw:Le,lang:Ae[2]?Ae[2].trim():Ae[2],text:Me}}},ke.heading=function(Ee){var Ae=this.rules.block.heading.exec(Ee);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},ke.nptable=function(Ee){var Ae=this.rules.block.nptable.exec(Ee);if(Ae){var Le={type:"table",header:K(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
`):[],raw:Ae[0]};if(Le.header.length===Le.align.length){var Me=Le.align.length,He;for(He=0;He<Me;He++)/^ *-+: *$/.test(Le.align[He])?Le.align[He]="right":/^ *:-+: *$/.test(Le.align[He])?Le.align[He]="center":/^ *:-+ *$/.test(Le.align[He])?Le.align[He]="left":Le.align[He]=null;for(Me=Le.cells.length,He=0;He<Me;He++)Le.cells[He]=K(Le.cells[He],Le.header.length);return Le}}},ke.hr=function(Ee){var Ae=this.rules.block.hr.exec(Ee);if(Ae)return{type:"hr",raw:Ae[0]}},ke.blockquote=function(Ee){var Ae=this.rules.block.blockquote.exec(Ee);if(Ae){var Le=Ae[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ae[0],text:Le}}},ke.list=function(Ee){var Ae=this.rules.block.list.exec(Ee);if(Ae){for(var Le=Ae[0],Me=Ae[2],He=Me.length>1,nt=Me[Me.length-1]===")",vt={type:"list",raw:Le,ordered:He,start:He?+Me.slice(0,-1):"",loose:!1,items:[]},bt=Ae[0].match(this.rules.block.item),Wt=!1,Bt,lr,dr,Ot,Vr,Wr,Yr,bn=bt.length,Ar=0;Ar<bn;Ar++)Bt=bt[Ar],Le=Bt,lr=Bt.length,Bt=Bt.replace(/^ *([*+-]|\d+[.)]) */,""),~Bt.indexOf(`
`)&&(lr-=Bt.length,Bt=this.options.pedantic?Bt.replace(/^ {1,4}/gm,""):Bt.replace(new RegExp("^ {1,"+lr+"}","gm"),"")),Ar!==bn-1&&(dr=this.rules.block.bullet.exec(bt[Ar+1])[0],(He?dr.length===1||!nt&&dr[dr.length-1]===")":dr.length>1||this.options.smartLists&&dr!==Me)&&(Ot=bt.slice(Ar+1).join(`
`),vt.raw=vt.raw.substring(0,vt.raw.length-Ot.length),Ar=bn-1)),Vr=Wt||/\n\n(?!\s*$)/.test(Bt),Ar!==bn-1&&(Wt=Bt.charAt(Bt.length-1)===`
`,Vr||(Vr=Wt)),Vr&&(vt.loose=!0),Wr=/^\[[ xX]\] /.test(Bt),Yr=void 0,Wr&&(Yr=Bt[1]!==" ",Bt=Bt.replace(/^\[[ xX]\] +/,"")),vt.items.push({type:"list_item",raw:Le,task:Wr,checked:Yr,loose:Vr,text:Bt});return vt}},ke.html=function(Ee){var Ae=this.rules.block.html.exec(Ee);if(Ae)return{type:this.options.sanitize?"paragraph":"html",raw:Ae[0],pre:!this.options.sanitizer&&(Ae[1]==="pre"||Ae[1]==="script"||Ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):Z(Ae[0]):Ae[0]}},ke.def=function(Ee){var Ae=this.rules.block.def.exec(Ee);if(Ae){Ae[3]&&(Ae[3]=Ae[3].substring(1,Ae[3].length-1));var Le=Ae[1].toLowerCase().replace(/\s+/g," ");return{tag:Le,raw:Ae[0],href:Ae[2],title:Ae[3]}}},ke.table=function(Ee){var Ae=this.rules.block.table.exec(Ee);if(Ae){var Le={type:"table",header:K(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
`):[]};if(Le.header.length===Le.align.length){Le.raw=Ae[0];var Me=Le.align.length,He;for(He=0;He<Me;He++)/^ *-+: *$/.test(Le.align[He])?Le.align[He]="right":/^ *:-+: *$/.test(Le.align[He])?Le.align[He]="center":/^ *:-+ *$/.test(Le.align[He])?Le.align[He]="left":Le.align[He]=null;for(Me=Le.cells.length,He=0;He<Me;He++)Le.cells[He]=K(Le.cells[He].replace(/^ *\| *| *\| *$/g,""),Le.header.length);return Le}}},ke.lheading=function(Ee){var Ae=this.rules.block.lheading.exec(Ee);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[2].charAt(0)==="="?1:2,text:Ae[1]}},ke.paragraph=function(Ee){var Ae=this.rules.block.paragraph.exec(Ee);if(Ae)return{type:"paragraph",raw:Ae[0],text:Ae[1].charAt(Ae[1].length-1)===`
`?Ae[1].slice(0,-1):Ae[1]}},ke.text=function(Ee,Ae){var Le=this.rules.block.text.exec(Ee);if(Le){var Me=Ae[Ae.length-1];return Me&&Me.type==="text"?{raw:Le[0],text:Le[0]}:{type:"text",raw:Le[0],text:Le[0]}}},ke.escape=function(Ee){var Ae=this.rules.inline.escape.exec(Ee);if(Ae)return{type:"escape",raw:Ae[0],text:Z(Ae[1])}},ke.tag=function(Ee,Ae,Le){var Me=this.rules.inline.tag.exec(Ee);if(Me)return!Ae&&/^<a /i.test(Me[0])?Ae=!0:Ae&&/^<\/a>/i.test(Me[0])&&(Ae=!1),!Le&&/^<(pre|code|kbd|script)(\s|>)/i.test(Me[0])?Le=!0:Le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Me[0])&&(Le=!1),{type:this.options.sanitize?"text":"html",raw:Me[0],inLink:Ae,inRawBlock:Le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Me[0]):Z(Me[0]):Me[0]}},ke.link=function(Ee){var Ae=this.rules.inline.link.exec(Ee);if(Ae){var Le=ue(Ae[2],"()");if(Le>-1){var Me=Ae[0].indexOf("!")===0?5:4,He=Me+Ae[1].length+Le;Ae[2]=Ae[2].substring(0,Le),Ae[0]=Ae[0].substring(0,He).trim(),Ae[3]=""}var nt=Ae[2],vt="";if(this.options.pedantic){var bt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(nt);bt?(nt=bt[1],vt=bt[3]):vt=""}else vt=Ae[3]?Ae[3].slice(1,-1):"";nt=nt.trim().replace(/^<([\s\S]*)>$/,"$1");var Wt=de(Ae,{href:nt&&nt.replace(this.rules.inline._escapes,"$1"),title:vt&&vt.replace(this.rules.inline._escapes,"$1")},Ae[0]);return Wt}},ke.reflink=function(Ee,Ae){var Le;if((Le=this.rules.inline.reflink.exec(Ee))||(Le=this.rules.inline.nolink.exec(Ee))){var Me=(Le[2]||Le[1]).replace(/\s+/g," ");if(Me=Ae[Me.toLowerCase()],!Me||!Me.href){var He=Le[0].charAt(0);return{type:"text",raw:He,text:He}}var nt=de(Le,Me,Le[0]);return nt}},ke.strong=function(Ee,Ae,Le){Le===void 0&&(Le="");var Me=this.rules.inline.strong.start.exec(Ee);if(Me&&(!Me[1]||Me[1]&&(Le===""||this.rules.inline.punctuation.exec(Le)))){Ae=Ae.slice(-1*Ee.length);var He=Me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;He.lastIndex=0;for(var nt;(Me=He.exec(Ae))!=null;)if(nt=this.rules.inline.strong.middle.exec(Ae.slice(0,Me.index+3)),nt)return{type:"strong",raw:Ee.slice(0,nt[0].length),text:Ee.slice(2,nt[0].length-2)}}},ke.em=function(Ee,Ae,Le){Le===void 0&&(Le="");var Me=this.rules.inline.em.start.exec(Ee);if(Me&&(!Me[1]||Me[1]&&(Le===""||this.rules.inline.punctuation.exec(Le)))){Ae=Ae.slice(-1*Ee.length);var He=Me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;He.lastIndex=0;for(var nt;(Me=He.exec(Ae))!=null;)if(nt=this.rules.inline.em.middle.exec(Ae.slice(0,Me.index+2)),nt)return{type:"em",raw:Ee.slice(0,nt[0].length),text:Ee.slice(1,nt[0].length-1)}}},ke.codespan=function(Ee){var Ae=this.rules.inline.code.exec(Ee);if(Ae){var Le=Ae[2].replace(/\n/g," "),Me=/[^ ]/.test(Le),He=Le.startsWith(" ")&&Le.endsWith(" ");return Me&&He&&(Le=Le.substring(1,Le.length-1)),Le=Z(Le,!0),{type:"codespan",raw:Ae[0],text:Le}}},ke.br=function(Ee){var Ae=this.rules.inline.br.exec(Ee);if(Ae)return{type:"br",raw:Ae[0]}},ke.del=function(Ee){var Ae=this.rules.inline.del.exec(Ee);if(Ae)return{type:"del",raw:Ae[0],text:Ae[1]}},ke.autolink=function(Ee,Ae){var Le=this.rules.inline.autolink.exec(Ee);if(Le){var Me,He;return Le[2]==="@"?(Me=Z(this.options.mangle?Ae(Le[1]):Le[1]),He="mailto:"+Me):(Me=Z(Le[1]),He=Me),{type:"link",raw:Le[0],text:Me,href:He,tokens:[{type:"text",raw:Me,text:Me}]}}},ke.url=function(Ee,Ae){var Le;if(Le=this.rules.inline.url.exec(Ee)){var Me,He;if(Le[2]==="@")Me=Z(this.options.mangle?Ae(Le[0]):Le[0]),He="mailto:"+Me;else{var nt;do nt=Le[0],Le[0]=this.rules.inline._backpedal.exec(Le[0])[0];while(nt!==Le[0]);Me=Z(Le[0]),Le[1]==="www."?He="http://"+Me:He=Me}return{type:"link",raw:Le[0],text:Me,href:He,tokens:[{type:"text",raw:Me,text:Me}]}}},ke.inlineText=function(Ee,Ae,Le){var Me=this.rules.inline.text.exec(Ee);if(Me){var He;return Ae?He=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Me[0]):Z(Me[0]):Me[0]:He=Z(this.options.smartypants?Le(Me[0]):Me[0]),{type:"text",raw:Me[0],text:He}}},Be}(),me=B.noopTest,Oe=B.edit,be=B.merge,ce={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:me,table:me,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=Oe(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=Oe(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Oe(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex(),ce._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ce._comment=/<!--(?!-?>)[\s\S]*?-->/,ce.html=Oe(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Oe(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.blockquote=Oe(ce.blockquote).replace("paragraph",ce.paragraph).getRegex(),ce.normal=be({},ce),ce.gfm=be({},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=Oe(ce.gfm.nptable).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.gfm.table=Oe(ce.gfm.table).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.pedantic=be({},ce.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:me,paragraph:Oe(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 le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:me,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",le.punctuation=Oe(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Oe(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Oe(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Oe(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Oe(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Oe(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Oe(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Oe(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Oe(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Oe(le._blockSkip,"g").getRegex(),le.overlapSkip=Oe(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,le.autolink=Oe(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Oe(le.tag).replace("comment",ce._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Oe(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Oe(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Oe(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=be({},le),le.pedantic=be({},le.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=be({},le.normal,{escape:Oe(le.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),le.gfm.url=Oe(le.gfm.url,"i").replace("email",le.gfm._extended_email).getRegex(),le.breaks=be({},le.gfm,{br:Oe(le.br).replace("{2,}","*").getRegex(),text:Oe(le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ne={block:ce,inline:le},ge=T.defaults,te=ne.block,re=ne.inline;function Se(Be){return Be.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ie(Be){var ke="",Ne,Ee,Ae=Be.length;for(Ne=0;Ne<Ae;Ne++)Ee=Be.charCodeAt(Ne),Math.random()>.5&&(Ee="x"+Ee.toString(16)),ke+="&#"+Ee+";";return ke}var q=function(){function Be(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||ge,this.options.tokenizer=this.options.tokenizer||new Re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:te.normal,inline:re.normal};this.options.pedantic?(Ee.block=te.pedantic,Ee.inline=re.pedantic):this.options.gfm&&(Ee.block=te.gfm,this.options.breaks?Ee.inline=re.breaks:Ee.inline=re.gfm),this.tokenizer.rules=Ee}Be.lex=function(Ee,Ae){var Le=new Be(Ae);return Le.lex(Ee)};var ke=Be.prototype;return ke.lex=function(Ee){return Ee=Ee.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Ee,this.tokens,!0),this.inline(this.tokens),this.tokens},ke.blockTokens=function(Ee,Ae,Le){Ae===void 0&&(Ae=[]),Le===void 0&&(Le=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Me,He,nt,vt;Ee;){if(Me=this.tokenizer.space(Ee)){Ee=Ee.substring(Me.raw.length),Me.type&&Ae.push(Me);continue}if(Me=this.tokenizer.code(Ee,Ae)){Ee=Ee.substring(Me.raw.length),Me.type?Ae.push(Me):(vt=Ae[Ae.length-1],vt.raw+=`
`+Me.raw,vt.text+=`
`+Me.text);continue}if(Me=this.tokenizer.fences(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.heading(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.hr(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Me.raw.length),Me.tokens=this.blockTokens(Me.text,[],Le),Ae.push(Me);continue}if(Me=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Me.raw.length),nt=Me.items.length,He=0;He<nt;He++)Me.items[He].tokens=this.blockTokens(Me.items[He].text,[],!1);Ae.push(Me);continue}if(Me=this.tokenizer.html(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Le&&(Me=this.tokenizer.def(Ee))){Ee=Ee.substring(Me.raw.length),this.tokens.links[Me.tag]||(this.tokens.links[Me.tag]={href:Me.href,title:Me.title});continue}if(Me=this.tokenizer.table(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.lheading(Ee)){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Le&&(Me=this.tokenizer.paragraph(Ee))){Ee=Ee.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.text(Ee,Ae)){Ee=Ee.substring(Me.raw.length),Me.type?Ae.push(Me):(vt=Ae[Ae.length-1],vt.raw+=`
`+Me.raw,vt.text+=`
`+Me.text);continue}if(Ee){var bt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(bt);break}else throw new Error(bt)}}return Ae},ke.inline=function(Ee){var Ae,Le,Me,He,nt,vt,bt=Ee.length;for(Ae=0;Ae<bt;Ae++){vt=Ee[Ae];switch(vt.type){case"paragraph":case"text":case"heading":{vt.tokens=[],this.inlineTokens(vt.text,vt.tokens);break}case"table":{for(vt.tokens={header:[],cells:[]},He=vt.header.length,Le=0;Le<He;Le++)vt.tokens.header[Le]=[],this.inlineTokens(vt.header[Le],vt.tokens.header[Le]);for(He=vt.cells.length,Le=0;Le<He;Le++)for(nt=vt.cells[Le],vt.tokens.cells[Le]=[],Me=0;Me<nt.length;Me++)vt.tokens.cells[Le][Me]=[],this.inlineTokens(nt[Me],vt.tokens.cells[Le][Me]);break}case"blockquote":{this.inline(vt.tokens);break}case"list":{for(He=vt.items.length,Le=0;Le<He;Le++)this.inline(vt.items[Le].tokens);break}}}return Ee},ke.inlineTokens=function(Ee,Ae,Le,Me,He){Ae===void 0&&(Ae=[]),Le===void 0&&(Le=!1),Me===void 0&&(Me=!1),He===void 0&&(He="");var nt,vt=Ee,bt;if(this.tokens.links){var Wt=Object.keys(this.tokens.links);if(Wt.length>0)for(;(bt=this.tokenizer.rules.inline.reflinkSearch.exec(vt))!=null;)Wt.includes(bt[0].slice(bt[0].lastIndexOf("[")+1,-1))&&(vt=vt.slice(0,bt.index)+"["+"a".repeat(bt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(bt=this.tokenizer.rules.inline.blockSkip.exec(vt))!=null;)vt=vt.slice(0,bt.index)+"["+"a".repeat(bt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ee;){if(nt=this.tokenizer.escape(Ee)){Ee=Ee.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.tag(Ee,Le,Me)){Ee=Ee.substring(nt.raw.length),Le=nt.inLink,Me=nt.inRawBlock,Ae.push(nt);continue}if(nt=this.tokenizer.link(Ee)){Ee=Ee.substring(nt.raw.length),nt.type==="link"&&(nt.tokens=this.inlineTokens(nt.text,[],!0,Me)),Ae.push(nt);continue}if(nt=this.tokenizer.reflink(Ee,this.tokens.links)){Ee=Ee.substring(nt.raw.length),nt.type==="link"&&(nt.tokens=this.inlineTokens(nt.text,[],!0,Me)),Ae.push(nt);continue}if(nt=this.tokenizer.strong(Ee,vt,He)){Ee=Ee.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],Le,Me),Ae.push(nt);continue}if(nt=this.tokenizer.em(Ee,vt,He)){Ee=Ee.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],Le,Me),Ae.push(nt);continue}if(nt=this.tokenizer.codespan(Ee)){Ee=Ee.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.br(Ee)){Ee=Ee.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.del(Ee)){Ee=Ee.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],Le,Me),Ae.push(nt);continue}if(nt=this.tokenizer.autolink(Ee,ie)){Ee=Ee.substring(nt.raw.length),Ae.push(nt);continue}if(!Le&&(nt=this.tokenizer.url(Ee,ie))){Ee=Ee.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.inlineText(Ee,Me,Se)){Ee=Ee.substring(nt.raw.length),He=nt.raw.slice(-1),Ae.push(nt);continue}if(Ee){var Bt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return Ae},g(Be,null,[{key:"rules",get:function(){return{block:te,inline:re}}}]),Be}(),Y=T.defaults,X=B.cleanUrl,he=B.escape,fe=function(){function Be(Ne){this.options=Ne||Y}var ke=Be.prototype;return ke.code=function(Ee,Ae,Le){var Me=(Ae||"").match(/\S*/)[0];if(this.options.highlight){var He=this.options.highlight(Ee,Me);He!=null&&He!==Ee&&(Le=!0,Ee=He)}return Me?'<pre><code class="'+this.options.langPrefix+he(Me,!0)+'">'+(Le?Ee:he(Ee,!0))+`</code></pre>
`:"<pre><code>"+(Le?Ee:he(Ee,!0))+`</code></pre>
`},ke.blockquote=function(Ee){return`<blockquote>
`+Ee+`</blockquote>
`},ke.html=function(Ee){return Ee},ke.heading=function(Ee,Ae,Le,Me){return this.options.headerIds?"<h"+Ae+' id="'+this.options.headerPrefix+Me.slug(Le)+'">'+Ee+"</h"+Ae+`>
`:"<h"+Ae+">"+Ee+"</h"+Ae+`>
`},ke.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ke.list=function(Ee,Ae,Le){var Me=Ae?"ol":"ul",He=Ae&&Le!==1?' start="'+Le+'"':"";return"<"+Me+He+`>
`+Ee+"</"+Me+`>
`},ke.listitem=function(Ee){return"<li>"+Ee+`</li>
`},ke.checkbox=function(Ee){return"<input "+(Ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ke.paragraph=function(Ee){return"<p>"+Ee+`</p>
`},ke.table=function(Ee,Ae){return Ae&&(Ae="<tbody>"+Ae+"</tbody>"),`<table>
<thead>
`+Ee+`</thead>
`+Ae+`</table>
`},ke.tablerow=function(Ee){return`<tr>
`+Ee+`</tr>
`},ke.tablecell=function(Ee,Ae){var Le=Ae.header?"th":"td",Me=Ae.align?"<"+Le+' align="'+Ae.align+'">':"<"+Le+">";return Me+Ee+"</"+Le+`>
`},ke.strong=function(Ee){return"<strong>"+Ee+"</strong>"},ke.em=function(Ee){return"<em>"+Ee+"</em>"},ke.codespan=function(Ee){return"<code>"+Ee+"</code>"},ke.br=function(){return this.options.xhtml?"<br/>":"<br>"},ke.del=function(Ee){return"<del>"+Ee+"</del>"},ke.link=function(Ee,Ae,Le){if(Ee=X(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return Le;var Me='<a href="'+he(Ee)+'"';return Ae&&(Me+=' title="'+Ae+'"'),Me+=">"+Le+"</a>",Me},ke.image=function(Ee,Ae,Le){if(Ee=X(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return Le;var Me='<img src="'+Ee+'" alt="'+Le+'"';return Ae&&(Me+=' title="'+Ae+'"'),Me+=this.options.xhtml?"/>":">",Me},ke.text=function(Ee){return Ee},Be}(),xe=function(){function Be(){}var ke=Be.prototype;return ke.strong=function(Ee){return Ee},ke.em=function(Ee){return Ee},ke.codespan=function(Ee){return Ee},ke.del=function(Ee){return Ee},ke.html=function(Ee){return Ee},ke.text=function(Ee){return Ee},ke.link=function(Ee,Ae,Le){return""+Le},ke.image=function(Ee,Ae,Le){return""+Le},ke.br=function(){return""},Be}(),Ke=function(){function Be(){this.seen={}}var ke=Be.prototype;return ke.slug=function(Ee){var Ae=Ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ae)){var Le=Ae;do this.seen[Le]++,Ae=Le+"-"+this.seen[Le];while(this.seen.hasOwnProperty(Ae))}return this.seen[Ae]=0,Ae},Be}(),Ze=T.defaults,et=B.unescape,st=function(){function Be(Ne){this.options=Ne||Ze,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xe,this.slugger=new Ke}Be.parse=function(Ee,Ae){var Le=new Be(Ae);return Le.parse(Ee)};var ke=Be.prototype;return ke.parse=function(Ee,Ae){Ae===void 0&&(Ae=!0);var Le="",Me,He,nt,vt,bt,Wt,Bt,lr,dr,Ot,Vr,Wr,Yr,bn,Ar,fn,cn,Vt,En=Ee.length;for(Me=0;Me<En;Me++){Ot=Ee[Me];switch(Ot.type){case"space":continue;case"hr":{Le+=this.renderer.hr();continue}case"heading":{Le+=this.renderer.heading(this.parseInline(Ot.tokens),Ot.depth,et(this.parseInline(Ot.tokens,this.textRenderer)),this.slugger);continue}case"code":{Le+=this.renderer.code(Ot.text,Ot.lang,Ot.escaped);continue}case"table":{for(lr="",Bt="",vt=Ot.header.length,He=0;He<vt;He++)Bt+=this.renderer.tablecell(this.parseInline(Ot.tokens.header[He]),{header:!0,align:Ot.align[He]});for(lr+=this.renderer.tablerow(Bt),dr="",vt=Ot.cells.length,He=0;He<vt;He++){for(Wt=Ot.tokens.cells[He],Bt="",bt=Wt.length,nt=0;nt<bt;nt++)Bt+=this.renderer.tablecell(this.parseInline(Wt[nt]),{header:!1,align:Ot.align[nt]});dr+=this.renderer.tablerow(Bt)}Le+=this.renderer.table(lr,dr);continue}case"blockquote":{dr=this.parse(Ot.tokens),Le+=this.renderer.blockquote(dr);continue}case"list":{for(Vr=Ot.ordered,Wr=Ot.start,Yr=Ot.loose,vt=Ot.items.length,dr="",He=0;He<vt;He++)Ar=Ot.items[He],fn=Ar.checked,cn=Ar.task,bn="",Ar.task&&(Vt=this.renderer.checkbox(fn),Yr?Ar.tokens.length>0&&Ar.tokens[0].type==="text"?(Ar.tokens[0].text=Vt+" "+Ar.tokens[0].text,Ar.tokens[0].tokens&&Ar.tokens[0].tokens.length>0&&Ar.tokens[0].tokens[0].type==="text"&&(Ar.tokens[0].tokens[0].text=Vt+" "+Ar.tokens[0].tokens[0].text)):Ar.tokens.unshift({type:"text",text:Vt}):bn+=Vt),bn+=this.parse(Ar.tokens,Yr),dr+=this.renderer.listitem(bn,cn,fn);Le+=this.renderer.list(dr,Vr,Wr);continue}case"html":{Le+=this.renderer.html(Ot.text);continue}case"paragraph":{Le+=this.renderer.paragraph(this.parseInline(Ot.tokens));continue}case"text":{for(dr=Ot.tokens?this.parseInline(Ot.tokens):Ot.text;Me+1<En&&Ee[Me+1].type==="text";)Ot=Ee[++Me],dr+=`
`+(Ot.tokens?this.parseInline(Ot.tokens):Ot.text);Le+=Ae?this.renderer.paragraph(dr):dr;continue}default:{var fr='Token with "'+Ot.type+'" type was not found.';if(this.options.silent){console.error(fr);return}else throw new Error(fr)}}}return Le},ke.parseInline=function(Ee,Ae){Ae=Ae||this.renderer;var Le="",Me,He,nt=Ee.length;for(Me=0;Me<nt;Me++){He=Ee[Me];switch(He.type){case"escape":{Le+=Ae.text(He.text);break}case"html":{Le+=Ae.html(He.text);break}case"link":{Le+=Ae.link(He.href,He.title,this.parseInline(He.tokens,Ae));break}case"image":{Le+=Ae.image(He.href,He.title,He.text);break}case"strong":{Le+=Ae.strong(this.parseInline(He.tokens,Ae));break}case"em":{Le+=Ae.em(this.parseInline(He.tokens,Ae));break}case"codespan":{Le+=Ae.codespan(He.text);break}case"br":{Le+=Ae.br();break}case"del":{Le+=Ae.del(this.parseInline(He.tokens,Ae));break}case"text":{Le+=Ae.text(He.text);break}default:{var vt='Token with "'+He.type+'" type was not found.';if(this.options.silent){console.error(vt);return}else throw new Error(vt)}}}return Le},Be}(),ut=B.merge,dt=B.checkSanitizeDeprecation,Fe=B.escape,Ie=T.getDefaults,ot=T.changeDefaults,ft=T.defaults;function Qe(Be,ke,Ne){if(typeof Be=="undefined"||Be===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Be!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Be)+", string expected");if(typeof ke=="function"&&(Ne=ke,ke=null),ke=ut({},Qe.defaults,ke||{}),dt(ke),Ne){var Ee=ke.highlight,Ae;try{Ae=q.lex(Be,ke)}catch(nt){return Ne(nt)}var Le=function(vt){var bt;if(!vt)try{bt=st.parse(Ae,ke)}catch(Wt){vt=Wt}return ke.highlight=Ee,vt?Ne(vt):Ne(null,bt)};if(!Ee||Ee.length<3)return Le();if(delete ke.highlight,!Ae.length)return Le();var Me=0;Qe.walkTokens(Ae,function(nt){nt.type==="code"&&(Me++,setTimeout(function(){Ee(nt.text,nt.lang,function(vt,bt){if(vt)return Le(vt);bt!=null&&bt!==nt.text&&(nt.text=bt,nt.escaped=!0),Me--,Me===0&&Le()})},0))}),Me===0&&Le();return}try{var He=q.lex(Be,ke);return ke.walkTokens&&Qe.walkTokens(He,ke.walkTokens),st.parse(He,ke)}catch(nt){if(nt.message+=`
Please report this to https://github.com/markedjs/marked.`,ke.silent)return"<p>An error occurred:</p><pre>"+Fe(nt.message+"",!0)+"</pre>";throw nt}}Qe.options=Qe.setOptions=function(Be){return ut(Qe.defaults,Be),ot(Qe.defaults),Qe},Qe.getDefaults=Ie,Qe.defaults=ft,Qe.use=function(Be){var ke=ut({},Be);if(Be.renderer&&function(){var Ee=Qe.defaults.renderer||new fe,Ae=function(He){var nt=Ee[He];Ee[He]=function(){for(var vt=arguments.length,bt=new Array(vt),Wt=0;Wt<vt;Wt++)bt[Wt]=arguments[Wt];var Bt=Be.renderer[He].apply(Ee,bt);return Bt===!1&&(Bt=nt.apply(Ee,bt)),Bt}};for(var Le in Be.renderer)Ae(Le);ke.renderer=Ee}(),Be.tokenizer&&function(){var Ee=Qe.defaults.tokenizer||new Re,Ae=function(He){var nt=Ee[He];Ee[He]=function(){for(var vt=arguments.length,bt=new Array(vt),Wt=0;Wt<vt;Wt++)bt[Wt]=arguments[Wt];var Bt=Be.tokenizer[He].apply(Ee,bt);return Bt===!1&&(Bt=nt.apply(Ee,bt)),Bt}};for(var Le in Be.tokenizer)Ae(Le);ke.tokenizer=Ee}(),Be.walkTokens){var Ne=Qe.defaults.walkTokens;ke.walkTokens=function(Ee){Be.walkTokens(Ee),Ne&&Ne(Ee)}}Qe.setOptions(ke)},Qe.walkTokens=function(Be,ke){for(var Ne=m(Be),Ee;!(Ee=Ne()).done;){var Ae=Ee.value;ke(Ae);switch(Ae.type){case"table":{for(var Le=m(Ae.tokens.header),Me;!(Me=Le()).done;){var He=Me.value;Qe.walkTokens(He,ke)}for(var nt=m(Ae.tokens.cells),vt;!(vt=nt()).done;)for(var bt=vt.value,Wt=m(bt),Bt;!(Bt=Wt()).done;){var lr=Bt.value;Qe.walkTokens(lr,ke)}break}case"list":{Qe.walkTokens(Ae.items,ke);break}default:Ae.tokens&&Qe.walkTokens(Ae.tokens,ke)}}},Qe.Parser=st,Qe.parser=st.parse,Qe.Renderer=fe,Qe.TextRenderer=xe,Qe.Lexer=q,Qe.lexer=q.lex,Qe.Tokenizer=Re,Qe.Slugger=Ke,Qe.parse=Qe;var tt=Qe;return tt})},E4JC:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.StreamCipher,m=g.algo,v=[],T=[],y=[],t=m.Rabbit=N.extend({_doReset:function(){for(var i=this._key.words,c=this.cfg.iv,a=0;a<4;a++)i[a]=(i[a]<<8|i[a]>>>24)&16711935|(i[a]<<24|i[a]>>>8)&4278255360;var n=this._X=[i[0],i[3]<<16|i[2]>>>16,i[1],i[0]<<16|i[3]>>>16,i[2],i[1]<<16|i[0]>>>16,i[3],i[2]<<16|i[1]>>>16],s=this._C=[i[2]<<16|i[2]>>>16,i[0]&4294901760|i[1]&65535,i[3]<<16|i[3]>>>16,i[1]&4294901760|i[2]&65535,i[0]<<16|i[0]>>>16,i[2]&4294901760|i[3]&65535,i[1]<<16|i[1]>>>16,i[3]&4294901760|i[0]&65535];this._b=0;for(var a=0;a<4;a++)h.call(this);for(var a=0;a<8;a++)s[a]^=n[a+4&7];if(c){var d=c.words,f=d[0],l=d[1],o=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,x=o>>>16|r&4294901760,b=r<<16|o&65535;s[0]^=o,s[1]^=x,s[2]^=r,s[3]^=b,s[4]^=o,s[5]^=x,s[6]^=r,s[7]^=b;for(var a=0;a<4;a++)h.call(this)}},_doProcessBlock:function(i,c){var a=this._X;h.call(this),v[0]=a[0]^a[5]>>>16^a[3]<<16,v[1]=a[2]^a[7]>>>16^a[5]<<16,v[2]=a[4]^a[1]>>>16^a[7]<<16,v[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)v[n]=(v[n]<<8|v[n]>>>24)&16711935|(v[n]<<24|v[n]>>>8)&4278255360,i[c+n]^=v[n]},blockSize:128/32,ivSize:64/32});function h(){for(var i=this._X,c=this._C,a=0;a<8;a++)T[a]=c[a];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<T[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<T[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<T[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<T[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<T[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<T[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<T[6]>>>0?1:0)|0,this._b=c[7]>>>0<T[7]>>>0?1:0;for(var a=0;a<8;a++){var n=i[a]+c[a],s=n&65535,d=n>>>16,f=((s*s>>>17)+s*d>>>15)+d*d,l=((n&4294901760)*n|0)+((n&65535)*n|0);y[a]=f^l}i[0]=y[0]+(y[7]<<16|y[7]>>>16)+(y[6]<<16|y[6]>>>16)|0,i[1]=y[1]+(y[0]<<8|y[0]>>>24)+y[7]|0,i[2]=y[2]+(y[1]<<16|y[1]>>>16)+(y[0]<<16|y[0]>>>16)|0,i[3]=y[3]+(y[2]<<8|y[2]>>>24)+y[1]|0,i[4]=y[4]+(y[3]<<16|y[3]>>>16)+(y[2]<<16|y[2]>>>16)|0,i[5]=y[5]+(y[4]<<8|y[4]>>>24)+y[3]|0,i[6]=y[6]+(y[5]<<16|y[5]>>>16)+(y[4]<<16|y[4]>>>16)|0,i[7]=y[7]+(y[6]<<8|y[6]>>>24)+y[5]|0}g.Rabbit=N._createHelper(t)}(),M.Rabbit})},ELLl:function(H,J,D){(function(M){M(D("VrN/"))})(function(M){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=M.Pos;M.defineOption("autoCloseBrackets",!1,function(s,d,f){f&&f!=M.Init&&(s.removeKeyMap(m),s.state.closeBrackets=null),d&&(v(N(d,"pairs")),s.state.closeBrackets=d,s.addKeyMap(m))});function N(s,d){return d=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[d]!=null?s[d]:g[d]}var m={Backspace:t,Enter:h};function v(s){for(var d=0;d<s.length;d++){var f=s.charAt(d),l="'"+f+"'";m[l]||(m[l]=T(f))}}v(g.pairs+"`");function T(s){return function(d){return c(d,s)}}function y(s){var d=s.state.closeBrackets;if(!d||d.override)return d;var f=s.getModeAt(s.getCursor());return f.closeBrackets||d}function t(s){var d=y(s);if(!d||s.getOption("disableInput"))return M.Pass;for(var f=N(d,"pairs"),l=s.listSelections(),o=0;o<l.length;o++){if(!l[o].empty())return M.Pass;var r=a(s,l[o].head);if(!r||f.indexOf(r)%2!=0)return M.Pass}for(var o=l.length-1;o>=0;o--){var x=l[o].head;s.replaceRange("",C(x.line,x.ch-1),C(x.line,x.ch+1),"+delete")}}function h(s){var d=y(s),f=d&&N(d,"explode");if(!f||s.getOption("disableInput"))return M.Pass;for(var l=s.listSelections(),o=0;o<l.length;o++){if(!l[o].empty())return M.Pass;var r=a(s,l[o].head);if(!r||f.indexOf(r)%2!=0)return M.Pass}s.operation(function(){var x=s.lineSeparator()||`
`;s.replaceSelection(x+x,null),s.execCommand("goCharLeft"),l=s.listSelections();for(var b=0;b<l.length;b++){var p=l[b].head.line;s.indentLine(p,null,!0),s.indentLine(p+1,null,!0)}})}function i(s){var d=M.cmpPos(s.anchor,s.head)>0;return{anchor:new C(s.anchor.line,s.anchor.ch+(d?-1:1)),head:new C(s.head.line,s.head.ch+(d?1:-1))}}function c(s,d){var f=y(s);if(!f||s.getOption("disableInput"))return M.Pass;var l=N(f,"pairs"),o=l.indexOf(d);if(o==-1)return M.Pass;for(var r=N(f,"closeBefore"),x=N(f,"triples"),b=l.charAt(o+1)==d,p=s.listSelections(),I=o%2==0,O,_=0;_<p.length;_++){var E=p[_],w=E.head,S,F=s.getRange(w,C(w.line,w.ch+1));if(I&&!E.empty())S="surround";else if((b||!I)&&F==d)b&&n(s,w)?S="both":x.indexOf(d)>=0&&s.getRange(w,C(w.line,w.ch+3))==d+d+d?S="skipThree":S="skip";else if(b&&w.ch>1&&x.indexOf(d)>=0&&s.getRange(C(w.line,w.ch-2),w)==d+d){if(w.ch>2&&/\bstring/.test(s.getTokenTypeAt(C(w.line,w.ch-2))))return M.Pass;S="addFour"}else if(b){var P=w.ch==0?" ":s.getRange(C(w.line,w.ch-1),w);if(!M.isWordChar(F)&&P!=d&&!M.isWordChar(P))S="both";else return M.Pass}else if(I&&(F.length===0||/\s/.test(F)||r.indexOf(F)>-1))S="both";else return M.Pass;if(!O)O=S;else if(O!=S)return M.Pass}var L=o%2?l.charAt(o-1):d,G=o%2?d:l.charAt(o+1);s.operation(function(){if(O=="skip")s.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)s.execCommand("goCharRight");else if(O=="surround"){for(var A=s.getSelections(),z=0;z<A.length;z++)A[z]=L+A[z]+G;s.replaceSelections(A,"around"),A=s.listSelections().slice();for(var z=0;z<A.length;z++)A[z]=i(A[z]);s.setSelections(A)}else O=="both"?(s.replaceSelection(L+G,null),s.triggerElectric(L+G),s.execCommand("goCharLeft")):O=="addFour"&&(s.replaceSelection(L+L+L+L,"before"),s.execCommand("goCharRight"))})}function a(s,d){var f=s.getRange(C(d.line,d.ch-1),C(d.line,d.ch+1));return f.length==2?f:null}function n(s,d){var f=s.getTokenAt(C(d.line,d.ch+1));return/\bstring/.test(f.type)&&f.start==d.ch&&(d.ch==0||!/\bstring/.test(s.getTokenTypeAt(d)))}})},ELcG:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(g){var C=M,N=C.lib,m=N.WordArray,v=N.Hasher,T=C.algo,y=m.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),t=m.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=m.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),i=m.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),c=m.create([0,1518500249,1859775393,2400959708,2840853838]),a=m.create([1352829926,1548603684,1836072691,2053994217,0]),n=T.RIPEMD160=v.extend({_doReset:function(){this._hash=m.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(x,b){for(var p=0;p<16;p++){var I=b+p,O=x[I];x[I]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var _=this._hash.words,E=c.words,w=a.words,S=y.words,F=t.words,P=h.words,L=i.words,G,z,A,B,U,R,K,Z,ue,de;R=G=_[0],K=z=_[1],Z=A=_[2],ue=B=_[3],de=U=_[4];for(var Ce,p=0;p<80;p+=1)Ce=G+x[b+S[p]]|0,p<16?Ce+=s(z,A,B)+E[0]:p<32?Ce+=d(z,A,B)+E[1]:p<48?Ce+=f(z,A,B)+E[2]:p<64?Ce+=l(z,A,B)+E[3]:Ce+=o(z,A,B)+E[4],Ce=Ce|0,Ce=r(Ce,P[p]),Ce=Ce+U|0,G=U,U=B,B=r(A,10),A=z,z=Ce,Ce=R+x[b+F[p]]|0,p<16?Ce+=o(K,Z,ue)+w[0]:p<32?Ce+=l(K,Z,ue)+w[1]:p<48?Ce+=f(K,Z,ue)+w[2]:p<64?Ce+=d(K,Z,ue)+w[3]:Ce+=s(K,Z,ue)+w[4],Ce=Ce|0,Ce=r(Ce,L[p]),Ce=Ce+de|0,R=de,de=ue,ue=r(Z,10),Z=K,K=Ce;Ce=_[1]+A+ue|0,_[1]=_[2]+B+de|0,_[2]=_[3]+U+R|0,_[3]=_[4]+G+K|0,_[4]=_[0]+z+Z|0,_[0]=Ce},_doFinalize:function(){var x=this._data,b=x.words,p=this._nDataBytes*8,I=x.sigBytes*8;b[I>>>5]|=128<<24-I%32,b[(I+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,x.sigBytes=(b.length+1)*4,this._process();for(var O=this._hash,_=O.words,E=0;E<5;E++){var w=_[E];_[E]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return O},clone:function(){var x=v.clone.call(this);return x._hash=this._hash.clone(),x}});function s(x,b,p){return x^b^p}function d(x,b,p){return x&b|~x&p}function f(x,b,p){return(x|~b)^p}function l(x,b,p){return x&p|b&~p}function o(x,b,p){return x^(b|~p)}function r(x,b){return x<<b|x>>>32-b}C.RIPEMD160=v._createHelper(n),C.HmacRIPEMD160=v._createHmacHelper(n)}(Math),M.RIPEMD160})},ETIr:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.WordArray,m=g.enc,v=m.Base64={stringify:function(y){var t=y.words,h=y.sigBytes,i=this._map;y.clamp();for(var c=[],a=0;a<h;a+=3)for(var n=t[a>>>2]>>>24-a%4*8&255,s=t[a+1>>>2]>>>24-(a+1)%4*8&255,d=t[a+2>>>2]>>>24-(a+2)%4*8&255,f=n<<16|s<<8|d,l=0;l<4&&a+l*.75<h;l++)c.push(i.charAt(f>>>6*(3-l)&63));var o=i.charAt(64);if(o)for(;c.length%4;)c.push(o);return c.join("")},parse:function(y){var t=y.length,h=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var c=0;c<h.length;c++)i[h.charCodeAt(c)]=c}var a=h.charAt(64);if(a){var n=y.indexOf(a);n!==-1&&(t=n)}return T(y,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function T(y,t,h){for(var i=[],c=0,a=0;a<t;a++)if(a%4){var n=h[y.charCodeAt(a-1)]<<a%4*2,s=h[y.charCodeAt(a)]>>>6-a%4*2,d=n|s;i[c>>>2]|=d<<24-c%4*8,c++}return N.create(i,c)}}(),M.enc.Base64})},"F+F2":function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(){if(typeof ArrayBuffer!="function")return;var g=M,C=g.lib,N=C.WordArray,m=N.init,v=N.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 y=T.byteLength,t=[],h=0;h<y;h++)t[h>>>2]|=T[h]<<24-h%4*8;m.call(this,t,y)}else m.apply(this,arguments)};v.prototype=N}(),M.lib.WordArray})},FWmy:function(H,J,D){"use strict";D.d(J,"a",function(){return M});function M(g,C){if(!g)throw new Error(C?`Assertion failed (${C})`:"Assertion Failed")}},GRO8:function(H,J,D){"use strict";D.r(J);var M=D("k1fw"),g=D("2qtc"),C=D("kLXV"),N=D("lUTK"),m=D("BvKs"),v=D("+L6B"),T=D("2/Rp"),y=D("T2oS"),t=D("W9HT"),h=D("sPJy"),i=D("bE4q"),c=D("miYZ"),a=D("tsqr"),n=D("9og8"),s=D("tJVT"),d=D("PpiC"),f=D("WmNS"),l=D.n(f),o=D("q1tI"),r=D.n(o),x=D("Ty5D"),b=D("55Ip"),p=D("9kvl"),I=D("KeDT"),O=D.n(I),_=D("zrhs"),E=D("DZo9"),w=D("8z0m"),S=D("LtfV"),F=D("KhGG"),P=w.a.Dragger,L=function(rt){var mt=rt.user,wt=rt.dispatch,Lt=rt.classroomList,It=rt.shixunsDetail,Kt=rt.getResults,Ht=Object(x.i)(),ht=Object(o.useState)(),St=Object(s.a)(ht,2),At=St[0],ur=St[1],ar=Object(o.useState)([]),Zt=Object(s.a)(ar,2),$t=Zt[0],rr=Zt[1],cr=Object(o.useState)(!1),lt=Object(s.a)(cr,2),Rr=lt[0],jr=lt[1],xr={onRemove:function(){rr([])},beforeUpload:function(Rt){if(console.log(Rt),(Rt==null?void 0:Rt.size)>1024*1024*500)return a.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Et=[];return Et.push(Rt),rr([].concat(Et)),!1},fileList:$t};return r.a.createElement(C.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:It.actionTabs.key==="md-tab",confirmLoading:Rr,onOk:Object(n.a)(l.a.mark(function _t(){var Rt,Et,Mt;return l.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(!(($t==null?void 0:$t.length)<=0)){pr.next=3;break}return a.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),pr.abrupt("return");case 3:return jr(!0),pr.next=6,Object(F.c)($t[0],{login:(Rt=mt.userInfo)===null||Rt===void 0?void 0:Rt.login,container_type:"Competition",container_id:It.actionTabs.params.id,stage_type:It.actionTabs.params.value,file_name:(Et=$t[0])===null||Et===void 0?void 0:Et.name});case 6:Mt=pr.sent,(Mt==null?void 0:Mt.status)===0?(a.b.info("\u63D0\u4EA4\u6210\u529F"),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),jr(!1),rr([]),Kt(It.actionTabs.params.value)):(jr(!1),a.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return pr.stop()}},_t)})),onCancel:function(){rr([]),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},r.a.createElement(P,xr,r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(S.a,null)),r.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(p.a)(function(xt){var rt=xt.user,mt=xt.classroomList,wt=xt.shixunsDetail;return{user:rt,classroomList:mt,shixunsDetail:wt}})(L),z=D("14J3"),A=D("BMrR"),B=D("5NDa"),U=D("5rEg"),R=D("9Bee"),K=D("m3rI"),Z=D("ErOA"),ue=D("NLgs"),de=D("fV52"),Ce=D("3I+P"),Re=D("OaEy"),me=D("2fM7"),Oe=D("5bA4"),be=D("UESt"),ce=me.a.Option;function le(xt){var rt=xt.rewarddata,mt=xt.getlistdatas,wt=xt.is_signed,Lt=xt.dispatch,It=xt.userlist,Kt=Object(o.useRef)(null),Ht=Object(o.useState)(!1),ht=Object(s.a)(Ht,2),St=ht[0],At=ht[1],ur=Object(o.useState)(void 0),ar=Object(s.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(o.useState)(""),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(void 0),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(void 0),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(void 0),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1];function at(mr){return zt.apply(this,arguments)}function zt(){return zt=Object(n.a)(l.a.mark(function mr(Dr){var Mr;return l.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(!Dr.user_received){Qt.next=3;break}return window.open(Dr.click_info),Qt.abrupt("return");case 3:if(Object(ue.f)(Lt)){Qt.next=5;break}return Qt.abrupt("return");case 5:if(!(wt===!1)){Qt.next=8;break}return a.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Qt.abrupt("return");case 8:if(!(Dr.click_event==="Pop")){Qt.next=14;break}return Rr(Dr.id),At(!0),Qt.abrupt("return");case 14:$t(void 0);case 15:return Qt.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:Dr.id}});case 17:Mr=Qt.sent,Mr&&Mr.status===0&&(mt(),Dr.click_event==="Link"?(a.b.info("\u9886\u53D6\u6210\u529F"),window.open(Dr.click_info)):a.b.info(Dr.click_info));case 19:case"end":return Qt.stop()}},mr)})),zt.apply(this,arguments)}function sn(){return en.apply(this,arguments)}function en(){return en=Object(n.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(It&&!It.real_name)){Ft.next=4;break}if(_t){Ft.next=4;break}return a.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(It&&!It.email)){Ft.next=8;break}if(qt){Ft.next=8;break}return a.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(It&&!It.phone)){Ft.next=12;break}if(Hr){Ft.next=12;break}return a.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Zt){Ft.next=15;break}return a.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:lt,className:Zt,name:_t,mail:qt,phone:Hr}});case 17:Dr=Ft.sent,Dr&&Dr.status===0&&(At(!1),mt(),a.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement(C.a,{visible:St,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return At(!1)},onOk:function(){sn()}},r.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",r.a.createElement(U.a,{className:It&&It.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:It&&It.phone?"":"#ffffff!important"},value:It&&It.real_name||_t,disabled:It&&It.real_name||!1,onChange:function(Dr){return Rt(Dr.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",r.a.createElement(U.a,{className:It&&It.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:It&&It.phone?"":"#ffffff!important"},value:It&&It.email||qt,disabled:It&&It.email||!1,onChange:function(Dr){return pr(Dr.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",r.a.createElement(U.a,{style:{width:"300px"},className:It&&It.phone?"":"bkfff",value:It&&It.phone||Hr,disabled:It&&It.phone||!1,onChange:function(Dr){return yr(Dr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",r.a.createElement(me.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(Dr){$t(Dr)}},r.a.createElement(ce,{value:"\u5927\u4E00"},"\u5927\u4E00"),r.a.createElement(ce,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),r.a.createElement(ce,{value:"\u5927\u4E09"},"\u5927\u4E09"),r.a.createElement(ce,{value:"\u5927\u56DB"},"\u5927\u56DB"),r.a.createElement(ce,{value:"\u5927\u4E94"},"\u5927\u4E94"),r.a.createElement(ce,{value:"\u7855\u4E00"},"\u7855\u4E00"),r.a.createElement(ce,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),r.a.createElement(ce,{value:"\u7855\u4E09"},"\u7855\u4E09"),r.a.createElement(ce,{value:"\u535A\u4E00"},"\u535A\u4E00"),r.a.createElement(ce,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),r.a.createElement(ce,{value:"\u535A\u4E09"},"\u535A\u4E09"),r.a.createElement(ce,{value:"\u535A\u56DB"},"\u535A\u56DB"),r.a.createElement(ce,{value:"\u535A\u4E94"},"\u535A\u4E94")),r.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),rt&&rt.length>3?r.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},r.a.createElement("span",{className:O.a.spanprev,onClick:function(){Kt.current.prev()}},r.a.createElement(Oe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),r.a.createElement(Ce.a,{ref:Kt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},rt&&rt.map(function(mr,Dr){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return at(mr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),r.a.createElement("span",{className:O.a.spannext,onClick:function(){Kt.current.next()}},r.a.createElement(be.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):r.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},rt&&rt.map(function(mr,Dr){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return at(mr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var ne=le,ge=function(rt,mt){var wt=rt.StaffDetail,Lt=rt.HeaderDetail,It=rt.ItemData,Kt=rt.setIssee,Ht=rt.ModelType,ht=rt.dispatch,St=rt.userinfo,At=rt.Editable,ur=Object(o.useState)(!1),ar=Object(s.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(o.useState)([]),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(""),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(""),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(!1),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1],at=Object(x.i)(),zt=at.identifier,sn=Object(o.useRef)(null),en=Object(o.useRef)(null);sn.current=wt==null?void 0:wt.enrolled,Object(o.useEffect)(function(){var Ft;return(Ft=en.current)===null||Ft===void 0||Ft.addEventListener("click",mr),function(){var Qt;(Qt=en.current)===null||Qt===void 0||Qt.removeEventListener("click",mr)}},[]);var mr=function(Qt){var gr;if((Qt==null||((gr=Qt.target)===null||gr===void 0)?void 0:gr.id)==="modal-upload"){if(!Object(ue.e)(ht))return;if(!sn.current){C.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}$t(!0)}};Object(o.useEffect)(function(){if(Lt!=null&&Lt.upload_file){var Ft,Qt,gr;Rr([{name:Lt==null||((Ft=Lt.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),pr(Lt==null?void 0:Lt.upload_file_url),Rt(Lt==null||((Qt=Lt.upload_file)===null||Qt===void 0||((gr=Qt.url)===null||gr===void 0))?void 0:gr.split("/")[3])}},[Lt==null?void 0:Lt.upload_file]);var Dr={name:"file",multiple:!1,withCredentials:!0,action:K.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:lt,onChange:function(Qt){var gr=Qt.file.status,tr=[Object(M.a)({},Qt.file)];if(Rr(tr),Qt.file.status==="uploading"&&yr(!0),gr==="done"){var gt,yt;Rt((gt=tr[0])===null||gt===void 0||((yt=gt.response)===null||yt===void 0)?void 0:yt.id),yr(!1)}gr==="error"&&(Rr([]),yr(!1))},beforeUpload:function(Qt){var gr=Qt.size/1024/1024<1e3;return gr?Promise.resolve():(a.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Mr=function(){$t(!0)};return Object(o.useImperativeHandle)(mt,function(){return{handleVisible:Mr}}),r.a.createElement("div",{ref:en},Ht==="reward"?r.a.createElement(ne,{userlist:St,dispatch:ht,rewarddata:It.reward_setting,is_signed:It.is_signed}):null,r.a.createElement("div",{style:{textAlign:"right"}},((St==null?void 0:St.admin)||(St==null?void 0:St.business)||At)&&r.a.createElement(T.a,{onClick:function(){return Kt(!1)}},"\u7F16\u8F91")),r.a.createElement(R.a,{value:It.md_content}),It&&It.attachments&&It.attachments.map(function(Ft,Qt){return r.a.createElement("div",null,r.a.createElement("a",{href:(K.a===null||K.a===void 0?void 0:K.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},r.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),r.a.createElement("span",{style:{color:"#000000"}},Ft.title),r.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),r.a.createElement(C.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Zt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Hr,onCancel:function(){return $t(!1)},onOk:Object(n.a)(l.a.mark(function Ft(){var Qt;return l.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:if(!(!_t&&!qt)){tr.next=3;break}return $t(!1),tr.abrupt("return");case 3:return yr(!0),tr.next=6,Object(Z.a)("/api/competitions/".concat(zt,"/upload_file.json"),{method:"post",body:{attachment_id:_t,upload_file_url:qt}});case 6:Qt=tr.sent,Qt.status===0&&($t(!1),yr(!1));case 8:case"end":return tr.stop()}},Ft)}))},r.a.createElement("div",null,r.a.createElement(A.a,{align:"middle",className:"mb20"},r.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),r.a.createElement(U.a,{style:{width:416},value:qt,onChange:function(Qt){var gr;return pr((gr=Qt.target)===null||gr===void 0?void 0:gr.value)}})),r.a.createElement(A.a,{align:"top"},r.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),r.a.createElement(w.a,Dr,r.a.createElement(T.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},te=Object(o.forwardRef)(ge),re=D("Ot1p"),Se=D("hJwl");function ie(xt){var rt=xt.ItemData,mt=xt.setIssee,wt=xt.MenuItem,Lt=xt.dispatch,It=xt.identifier,Kt=xt.ModelType,Ht=xt.userinfo,ht=xt.getrightdatas,St=Object(o.useState)([]),At=Object(s.a)(St,2),ur=At[0],ar=At[1],Zt=Object(o.useState)(rt.md_content),$t=Object(s.a)(Zt,2),rr=$t[0],cr=$t[1];Object(o.useEffect)(function(){var Rt,Et=[];rt==null||((Rt=rt.attachments)===null||Rt===void 0)||Rt.map(function(Mt){var qt={uid:Mt.id,name:Mt.title,response:{id:Mt.id}};Et.push(qt)}),ar(Et)},[rt==null?void 0:rt.attachments]);function lt(){var Rt,Et=[];return rt==null||((Rt=rt.attachments)===null||Rt===void 0)||Rt.map(function(Mt){var qt={uid:Mt==null?void 0:Mt.id,name:Mt.title,response:{id:Mt.id}};Et.push(qt)}),Et}var Rr={name:"file",multiple:!0,withCredentials:!0,action:K.a.API_SERVER+"/api/attachments.json",defaultFileList:lt(),onRemove:function(Et){Object(Se.t)({id:Et.uid})},onChange:function(Et){var Mt=Et.file.status;Mt!=="uploading",Mt==="removed"&&ar(Et.fileList),Mt==="done"?(ar(Et.fileList),a.b.success("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Mt==="error"&&a.b.error("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Et){var Mt=Et.size/1024/1024<150;return Mt||a.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Mt}};console.log(Rr);function jr(){return xr.apply(this,arguments)}function xr(){return xr=Object(n.a)(l.a.mark(function Rt(){var Et;return l.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Lt({type:"competitions/updateMdContent",payload:{attachment_ids:_t(ur),competition_module_id:rt.id,md_content_id:rt.md_id,content:rr,identifier:It}});case 2:Et=qt.sent,Et&&(a.b.info("\u63D0\u4EA4\u6210\u529F"),mt(!0),ht(wt));case 4:case"end":return qt.stop()}},Rt)})),xr.apply(this,arguments)}function _t(Rt){var Et=[];return Rt&&Rt.map(function(Mt){Et.push(Mt.response.id)}),Et}return r.a.createElement("div",null,Kt==="reward"?r.a.createElement(ne,{userlist:Ht,dispatch:Lt,rewarddata:rt.reward_setting,is_signed:rt.is_signed}):null,r.a.createElement(re.a,{defaultValue:rr,onChange:function(Et){return cr(Et)}}),r.a.createElement(w.a,Rr,r.a.createElement(T.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return jr()}},"\u63D0\u4EA4"),r.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mt(!0)}},"\u53D6\u6D88")))}var q=ie,Y=D("g9YV"),X=D("wCAj"),he=D("Znn+"),fe=D("ZTPi");function xe(){return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),r.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Ke=xe,Ze=D("5Dmo"),et=D("3S7+"),st=D("jCWc"),ut=D("kPKH"),dt=D("IzEo"),Fe=D("bx4M");function Ie(xt){var rt=xt.oneItem,mt=xt.towItem,wt=xt.threeItem;return r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement(A.a,{gutter:16,style:{justifyContent:"center"}},r.a.createElement(ut.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},r.a.createElement(Fe.a,{title:r.a.createElement("div",{className:O.a.towtop},r.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(b.a,{to:"/users/".concat(mt==null?void 0:mt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(mt==null?void 0:mt.user_image)}),(mt==null?void 0:mt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},mt==null?void 0:mt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},mt==null?void 0:mt.record_user_name)))),className:O.a.towdiv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},mt==null?void 0:mt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},mt==null?void 0:mt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(mt==null?void 0:mt.extra_score)+parseFloat(mt==null?void 0:mt.score),"\u5206"))),r.a.createElement(ut.a,{span:6},r.a.createElement(Fe.a,{title:r.a.createElement("div",{className:O.a.onetop},r.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(b.a,{to:"/users/".concat(rt==null?void 0:rt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(rt==null?void 0:rt.user_image)}),(rt==null?void 0:rt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},rt==null?void 0:rt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},rt==null?void 0:rt.record_user_name)))),className:O.a.onediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},rt==null?void 0:rt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},rt==null?void 0:rt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(rt==null?void 0:rt.extra_score)+parseFloat(rt==null?void 0:rt.score),"\u5206"))),r.a.createElement(ut.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},r.a.createElement(Fe.a,{title:r.a.createElement("div",{className:O.a.threetop},r.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(b.a,{to:"/users/".concat(wt==null?void 0:wt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(wt==null?void 0:wt.user_image)}),(wt==null?void 0:wt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},wt==null?void 0:wt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},wt==null?void 0:wt.record_user_name)))),className:O.a.threediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},wt==null?void 0:wt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},wt==null?void 0:wt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(wt==null?void 0:wt.extra_score)+parseFloat(wt==null?void 0:wt.score),"\u5206")))))}var ot=Ie;function ft(xt){var rt,mt,wt,Lt,It,Kt,Ht,ht,St,At,ur,ar,Zt,$t,rr,cr,lt,Rr,jr,xr,_t,Rt,Et,Mt,qt,pr,er,Ir,Hr,yr,at=xt.ItemData;return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement(ot,{oneItem:at==null?void 0:at.teams[0],towItem:at==null?void 0:at.teams[1],threeItem:at==null?void 0:at.teams[2]}),(at==null||((rt=at.user_ranks)===null||rt===void 0)?void 0:rt.length)>0&&r.a.createElement("div",{className:O.a.myTeam},(at==null||((mt=at.user_ranks)===null||mt===void 0||((wt=mt[0])===null||wt===void 0))?void 0:wt.success)===!1?r.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u664B\u7EA7\uFF1A",r.a.createElement("span",{style:{color:(at==null||((Lt=at.user_ranks)===null||Lt===void 0||((It=Lt[0])===null||It===void 0))?void 0:It.success)===!1?"red":"green"}},(at==null||((Kt=at.user_ranks)===null||Kt===void 0||((Ht=Kt[0])===null||Ht===void 0))?void 0:Ht.success)===!1?"\u5426":at!=null&&(ht=at.user_ranks)!==null&&ht!==void 0&&(St=ht[0])!==null&&St!==void 0&&St.success?"\u662F":"")),(at==null||((At=at.user_ranks)===null||At===void 0||((ur=At[0])===null||ur===void 0))?void 0:ur.awards)&&r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u83B7\u5956\uFF1A",r.a.createElement("span",null,(at==null||((ar=at.user_ranks)===null||ar===void 0||((Zt=ar[0])===null||Zt===void 0))?void 0:Zt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(at==null||(($t=at.user_ranks)===null||$t===void 0||((rr=$t[0])===null||rr===void 0))?void 0:rr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):r.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",at==null||((cr=at.user_ranks)===null||cr===void 0||((lt=cr[0])===null||lt===void 0))?void 0:lt.rank),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6218\u961F\u540D"},at==null||((Rr=at.user_ranks)===null||Rr===void 0||((jr=Rr[0])===null||jr===void 0))?void 0:jr.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u65F6\u95F4"},at==null||((xr=at.user_ranks)===null||xr===void 0||((_t=xr[0])===null||_t===void 0))?void 0:_t.cost_time)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement(et.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},at==null||((Rt=at.user_ranks)===null||Rt===void 0||((Et=Rt[0])===null||Et===void 0))?void 0:Et.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},at==null||((Mt=at.user_ranks)===null||Mt===void 0||((qt=Mt[0])===null||qt===void 0))?void 0:qt.score)),r.a.createElement("span",null,r.a.createElement(et.a,{title:"\u603B\u5206"},parseFloat(at==null||((pr=at.user_ranks)===null||pr===void 0||((er=pr[0])===null||er===void 0))?void 0:er.extra_score)+parseFloat(at==null||((Ir=at.user_ranks)===null||Ir===void 0||((Hr=Ir[0])===null||Hr===void 0))?void 0:Hr.score)||0))),at==null||((yr=at.teams)===null||yr===void 0)?void 0:yr.map(function(zt,sn){return r.a.createElement("div",{className:O.a.bottomItem},r.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},sn+1),r.a.createElement(b.a,{to:"/users/".concat(zt==null?void 0:zt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(zt==null?void 0:zt.user_image)}),(zt==null?void 0:zt.competition_prize)&&r.a.createElement("span",{className:O.a.spanrightradius},zt==null?void 0:zt.competition_prize)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6218\u961F\u540D"},zt==null?void 0:zt.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},zt.school_name)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement(et.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},zt.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},zt.score)),r.a.createElement("span",{style:{color:"#0152d9"}},r.a.createElement(et.a,{title:"\u603B\u5206"},parseFloat(zt.extra_score)+parseFloat(zt.score))))}))}var Qe=ft,tt=fe.a.TabPane;function Be(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.ChartRules,ht=xt.ItemData,St=xt.getCharts,At=xt.Selectkey,ur=xt.getChartRules,ar=xt.userinfo,Zt=xt.Editable,$t=xt.HeaderDetail,rr=Object(o.useState)(!1),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(""),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(!0),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1],at=Object(o.useState)(),zt=Object(s.a)(at,2),sn=zt[0],en=zt[1],mr=Object(x.i)(),Dr=mr.identifier;Object(o.useEffect)(function(){if(qt){var gr,tr=Ht==null||((gr=Ht.stages)===null||gr===void 0)?void 0:gr[0];if(yr(tr),tr!=null&&tr.id){var gt,yt,Gt;(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog")&&St(tr==null?void 0:tr.id),Rt(((gt=Ht.rule_contents)===null||gt===void 0||((yt=gt.filter(function(ln){return parseInt(ln.competition_stage_id)===parseInt(tr==null?void 0:tr.id)}))===null||yt===void 0||((Gt=yt[0])===null||Gt===void 0))?void 0:Gt.content)||"")}else{var Pt,Lr,an;($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog",Rt(((Pt=Ht.rule_contents)===null||Pt===void 0||((Lr=Pt.filter(function(ln){return parseInt(ln.competition_stage_id)===0}))===null||Lr===void 0||((an=Lr[0])===null||an===void 0))?void 0:an.content)||"")}}},[Ht]);function Mr(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(n.a)(l.a.mark(function gr(){var tr,gt,yt,Gt,Pt,Lr,an,ln,Or;return l.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(_t){Fr.next=3;break}return a.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Fr.abrupt("return");case 3:if(pr(!1),tr=Hr==null?void 0:Hr.id,!tr){Fr.next=12;break}return Fr.next=8,Object(Z.a)("/api/competitions/".concat(Dr,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:_t,md_content_id:(gt=Ht.rule_contents)===null||gt===void 0||((yt=gt.filter(function(pn){return parseInt(pn.competition_stage_id)===parseInt(tr)}))===null||yt===void 0||((Gt=yt[0])===null||Gt===void 0))?void 0:Gt.id,stage_id:Hr==null?void 0:Hr.id}});case 8:Pt=Fr.sent,Pt.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),Rr(!1),ur()),Fr.next=16;break;case 12:return Fr.next=14,Object(Z.a)("/api/competitions/".concat(Dr,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:_t,md_content_id:(Lr=Ht.rule_contents)===null||Lr===void 0||((an=Lr.filter(function(pn){return parseInt(pn.competition_stage_id)===0}))===null||an===void 0||((ln=an[0])===null||ln===void 0))?void 0:ln.id,stage_id:Hr==null?void 0:Hr.id}});case 14:Or=Fr.sent,Or.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),Rr(!1),ur());case 16:case"end":return Fr.stop()}},gr)})),Ft.apply(this,arguments)}var Qt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(tr,gt,yt){return r.a.createElement("span",null,yt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(tr){return r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(tr)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(tr){return r.a.createElement("span",{title:tr},tr&&(tr==null?void 0:tr.length)>=15?(tr==null?void 0:tr.substr(0,15))+"...":tr||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(tr){return r.a.createElement("span",null,tr||"--")}},{title:($t==null?void 0:$t.task)==="mAP"?"mAP\u6307\u6807":($t==null?void 0:$t.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(tr){return r.a.createElement("span",null,tr||"--")}}];return r.a.createElement("div",null,(Ht==null||((rt=Ht.stages)===null||rt===void 0)?void 0:rt.length)>0?null:r.a.createElement(Ke,null),(Ht==null||((mt=Ht.stages)===null||mt===void 0)?void 0:mt.length)>0&&r.a.createElement(fe.a,{animated:!0,tabBarExtraContent:((ar==null?void 0:ar.admin)||(ar==null?void 0:ar.business)||Zt)&&r.a.createElement(T.a,{onClick:function(){Rr(!0)}},"\u7F16\u8F91"),onChange:function(tr){var gt,yt,Gt,Pt,Lr;Rr(!1);var an=Ht==null||((gt=Ht.stages)===null||gt===void 0)?void 0:gt.filter(function(Or){return parseInt(tr)===parseInt(Or==null?void 0:Or.id)})[0];yr(an);var ln=an==null||((yt=an.children)===null||yt===void 0)?void 0:yt[0];en(ln),Rt(((Gt=Ht.rule_contents)===null||Gt===void 0||((Pt=Gt.filter(function(Or){return parseInt(Or.competition_stage_id)===parseInt(an==null?void 0:an.id)}))===null||Pt===void 0||((Lr=Pt[0])===null||Lr===void 0))?void 0:Lr.content)||""),St((ln==null?void 0:ln.id)||tr)}},Ht&&Ht.stages.map(function(gr,tr){return r.a.createElement(tt,{tab:gr.name,key:gr.id===null?0:gr.id},lt===!1&&Ht&&Ht.rule_contents.map(function(gt,yt){if(gr.id===gt.competition_stage_id)return r.a.createElement(R.a,{key:yt,value:gt.content===void 0||gt.content===null?"":gt.content});if(gr.id===null&&gt.competition_stage_id===0)return r.a.createElement(R.a,{key:yt,value:gt.content===void 0||gt.content===null?"":gt.content})}))})),(Hr==null||((wt=Hr.children)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{activeKey:(sn==null?void 0:sn.id)+"",onChange:function(tr){var gt,yt=Hr==null||((gt=Hr.children)===null||gt===void 0)?void 0:gt.filter(function(Gt){return parseInt(tr)===parseInt(Gt==null?void 0:Gt.id)})[0];en(yt),St(tr)}},Hr==null||((Lt=Hr.children)===null||Lt===void 0)?void 0:Lt.map(function(gr,tr){return r.a.createElement(tt,{tab:gr.name,key:gr.id===null?0:gr.id})})),lt&&r.a.createElement("div",null,r.a.createElement(re.a,{defaultValue:_t,onChange:function(tr){Rt(tr)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Mr()}},"\u63D0\u4EA4"),r.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Rr(!1)}},"\u53D6\u6D88"))),(ht==null||((It=ht.teams)===null||It===void 0)?void 0:It.length)>0&&(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog"||($t==null?void 0:$t.task)==="Jittor-3")?r.a.createElement(X.a,{dataSource:ht==null?void 0:ht.teams,columns:Qt,pagination:!1}):(ht==null||((Kt=ht.teams)===null||Kt===void 0)?void 0:Kt.length)>0&&r.a.createElement(Qe,{ItemData:ht}))}var ke=Be,Ne=D("/zsF"),Ee=D("PArb");function Ae(xt){var rt,mt,wt,Lt,It,Kt,Ht,ht=xt.Prize,St=Object(x.i)(),At=Object(o.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),ur=Object(s.a)(At,2),ar=ur[0],Zt=ur[1],$t=function(){var rr=Object(n.a)(l.a.mark(function cr(lt){var Rr;return l.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Object(Se.u)({type:lt.type,id:St.identifier});case 2:Rr=xr.sent,(Rr==null?void 0:Rr.status)===0&&(location.href="/competitions/exports?id=".concat(St.identifier,"&type=").concat(lt.type));case 4:case"end":return xr.stop()}},cr)}));return function(lt){return rr.apply(this,arguments)}}();return r.a.createElement("div",null,r.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),r.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ht==null||((rt=ht.personal_certifications)===null||rt===void 0)?void 0:rt.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:K.a.API_SERVER+"".concat(ht==null||((mt=ht.personal_certifications[0])===null||mt===void 0)?void 0:mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),r.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ht==null||((wt=ht.team_certifications)===null||wt===void 0)?void 0:wt.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:K.a.API_SERVER+"".concat(ht==null||((Lt=ht.team_certifications[0])===null||Lt===void 0)?void 0:Lt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),r.a.createElement(Ee.a,null),(ht==null||((It=ht.teams)===null||It===void 0)?void 0:It.length)>0?r.a.createElement("div",null,r.a.createElement("p",null,(ht==null?void 0:ht.teams)&&(ht==null||((Kt=ht.teams[0])===null||Kt===void 0)?void 0:Kt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),r.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},r.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),r.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),r.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ht==null?void 0:ht.teams)&&(ht==null||((Ht=ht.teams[0])===null||Ht===void 0)?void 0:Ht.team_members.map(function(rr,cr){var lt,Rr,jr,xr,_t,Rt;return r.a.createElement("p",{className:O.a.teamItem},r.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.role),r.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.name),r.a.createElement("span",{style:{width:"10%"}},(rr==null?void 0:rr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(rr==null?void 0:rr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},(rr==null?void 0:rr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(rr==null?void 0:rr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(rr==null?void 0:rr.role)==="\u961F\u957F"?r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ht==null?void 0:ht.teams)&&(ht==null||((lt=ht.teams[0])===null||lt===void 0||((Rr=lt.bank_account)===null||Rr===void 0))?void 0:Rr.bank),(ht==null?void 0:ht.teams)&&(ht==null||((jr=ht.teams[0])===null||jr===void 0||((xr=jr.bank_account)===null||xr===void 0))?void 0:xr.second_bank),(ht==null?void 0:ht.teams)&&(ht==null||((_t=ht.teams[0])===null||_t===void 0||((Rt=_t.bank_account)===null||Rt===void 0))?void 0:Rt.card_no)):r.a.createElement("span",{style:{width:"50%"}}))}))):null,r.a.createElement(A.a,{gutter:[20,20]},ar.map(function(rr,cr){return r.a.createElement(ut.a,{key:cr},r.a.createElement(T.a,{type:"primary",onClick:function(){return $t(rr)}},rr.name))})))}var Le=Ae,Me=D("0Owb"),He=D("7Kak"),nt=D("9yH6"),vt=D("y8nQ"),bt=D("Vl3Y"),Wt=D("1vsH"),Bt=D("Dgm7"),lr=D.n(Bt),dr=D("NnUe"),Ot=D.n(dr),Vr=w.a.Dragger,Wr=10,Yr=function(rt){var mt=rt.user,wt=rt.account,Lt=rt.globalSetting,It=rt.loading,Kt=rt.dispatch,Ht=Object(d.a)(rt,["user","account","globalSetting","loading","dispatch"]),ht=bt.a.useForm(),St=Object(s.a)(ht,1),At=St[0],ur=Object(o.useState)({}),ar=Object(s.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(o.useState)(!0),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1],at=Object(o.useState)(),zt=Object(s.a)(at,2),sn=zt[0],en=zt[1];Object(o.useEffect)(function(){if(!wt.basicInfo)return;var tr=wt.basicInfo,gt={name:tr.show_realname?tr.name:Object(Wt.H)(tr.name),gender:tr.gender};Rt(tr.name),Rr(tr.show_realname),At.setFieldsValue(gt),$t(gt)},[wt.basicInfo]);var mr=function(gt){if(gt.file.status==="uploading"){en(!0);return}if(gt.file.status==="done"){var yt;console.log(gt.file,gt.file.response),yr((yt=gt.file.response)===null||yt===void 0?void 0:yt.id),Object(Wt.D)(gt.file.originFileObj,function(Gt){pr(Gt),en(!1)})}},Dr=function(gt){$t(Object(M.a)({},At.getFieldsValue())),"name"in gt&&Rt(gt.name)},Mr=function(){var gt=!lt;Rr(gt);var yt=gt?_t:Object(Wt.H)(_t);At.setFieldsValue({name:yt})},Ft=function(){var tr=Object(n.a)(l.a.mark(function gt(yt){var Gt,Pt,Lr,an,ln,Or,tn,Fr;return l.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Lr=yt||{},an=Lr.name,ln=Lr.gender,Or=Lr.idNumber,qt){Xr.next=4;break}return a.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Xr.abrupt("return");case 4:return Xr.next=6,Kt({type:"account/applyRealNameAuth",payload:{id:((Gt=wt.basicInfo)===null||Gt===void 0?void 0:Gt.id)||((Pt=mt.userInfo)===null||Pt===void 0?void 0:Pt.login),name:an,gender:ln,id_number:Or,show_realname:lt,attachment_ids:[Hr]}});case 6:tn=Xr.sent,Qt(),tn&&(a.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Kt({type:"account/getBasicInfo",payload:{login:(Fr=mt.userInfo)===null||Fr===void 0?void 0:Fr.login}}));case 9:case"end":return Xr.stop()}},gt)}));return function(yt){return tr.apply(this,arguments)}}(),Qt=function(){Kt({type:"account/setActionTabs",payload:{}})},gr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),className:Ot.a.uploader,onChange:mr,beforeUpload:function(gt){var yt=gt.type==="image/jpeg"||gt.type==="image/png"||gt.type==="image/jpg"||gt.type==="image/bmp";return yt||a.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),yt}};return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:wt.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},r.a.createElement(t.a,{spinning:!!sn},r.a.createElement(bt.a,{className:Ot.a.formWrap,form:At,layout:"horizontal",onValuesChange:Dr,onFinish:Ft},r.a.createElement(bt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Wr,"\u4E2A\u5B57\u7B26")},{validator:Wt.K}],extra:r.a.createElement("span",null,lt?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},r.a.createElement(U.a,{disabled:!lt,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Wr,"\u4E2A\u5B57\u7B26"),maxLength:Wr,addonAfter:r.a.createElement("i",{className:"iconfont ".concat(lt?"icon-xianshi":"icon-yincang"," font18 ").concat(Ot.a.color0152d9),onClick:Mr})})),r.a.createElement(bt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},r.a.createElement(nt.a.Group,null,r.a.createElement(nt.a,{value:0},"\u7537"),r.a.createElement(nt.a,{value:1},"\u5973"))),r.a.createElement(bt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),r.a.createElement(bt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},r.a.createElement("div",{className:Ot.a.flexRow},r.a.createElement("div",{className:"".concat(Ot.a.flexColumn," ").concat(Ot.a.example)},r.a.createElement("span",{className:Ot.a.exampleImg},r.a.createElement("img",{src:lr.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(Ot.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:Ot.a.flexColumn},r.a.createElement(Vr,Object(Me.a)({},gr,{accept:".png,.jpg,.bmp,.jpeg"}),qt?r.a.createElement("img",{src:qt,className:Ot.a.uploadImg}):r.a.createElement("div",{className:Ot.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Ot.a.uploadTipIcon)})),r.a.createElement("p",{className:Ot.a.uploadTip},r.a.createElement("a",{className:Ot.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:Ot.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:Ot.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(T.a,{className:"mr5",size:"large",onClick:Qt},"\u53D6\u6D88"),r.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:Ot.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),r.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),r.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),r.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),r.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),r.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),r.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},bn=Object(p.a)(function(xt){var rt=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:rt,account:mt,globalSetting:Lt,loading:wt.effects}})(Yr),Ar=D("O3gP"),fn=D("lrIw"),cn=D("KXlV"),Vt=D.n(cn),En=D("Sjjz"),fr=D.n(En),br=U.a.TextArea,Br=function(rt){var mt=rt.account,wt=rt.globalSetting,Lt=rt.loading,It=rt.dispatch,Kt=rt.schoolName,Ht=rt.departmentName,ht=rt.visible,St=rt.onClose,At=St===void 0?function(){}:St,ur=rt.onSuccess,ar=ur===void 0?function(){}:ur,Zt=Object(d.a)(rt,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),$t=bt.a.useForm(),rr=Object(s.a)($t,1),cr=rr[0],lt=Object(o.useRef)();Object(o.useEffect)(function(){lt.current=Zt.schoolId},[Zt.schoolId]),Object(o.useEffect)(function(){cr.setFieldsValue({department:Ht})},[Ht]);var Rr=function(){var jr=Object(n.a)(l.a.mark(function xr(_t){var Rt,Et,Mt,qt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return Rt=_t||{},Et=Rt.department,Mt=Rt.remarks,er.next=3,It({type:"account/appplyDepartment",payload:{school_id:lt.current,name:Et,remarks:Mt}});case 3:qt=er.sent,At(),qt&&(a.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),ar(Et));case 6:case"end":return er.stop()}},xr)}));return function(_t){return jr.apply(this,arguments)}}();return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ht,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(bt.a,{className:fr.a.formWrap,form:cr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Rr},r.a.createElement(bt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Kt),r.a.createElement(bt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),r.a.createElement(bt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(br,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:fr.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(T.a,{className:"mr5",size:"large",onClick:function(){At()}},"\u53D6\u6D88"),r.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},kn=Object(p.a)(function(xt){var rt=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:rt,globalSetting:wt,loading:mt.effects}})(Br),Kn=D("6UJt"),dn=D("DFOY"),sr=D("jO45"),Jn=D("jN4g"),Tn=D("gJ3r"),On=D("jwmR"),Jr=D.n(On),An=function(rt,mt){return mt.some(function(wt){return wt.label.toLowerCase().indexOf(rt.toLowerCase())>-1})},Zn=U.a.TextArea,ri=function(rt){var mt=rt.account,wt=rt.globalSetting,Lt=rt.loading,It=rt.dispatch,Kt=rt.schoolName,Ht=rt.visible,ht=rt.onClose,St=ht===void 0?function(){}:ht,At=rt.onSuccess,ur=At===void 0?function(){}:At,ar=Object(d.a)(rt,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Zt=bt.a.useForm(),$t=Object(s.a)(Zt,1),rr=$t[0];Object(o.useEffect)(function(){rr.setFieldsValue({name:Kt})},[Kt]);var cr=function(){var lt=Object(n.a)(l.a.mark(function Rr(jr){var xr,_t,Rt,Et,Mt,qt,pr;return l.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return xr=jr||{},_t=xr.name,Rt=xr.city,Et=Rt===void 0?[]:Rt,Mt=xr.address,qt=xr.remarks,Ir.next=3,It({type:"account/appplySchool",payload:{name:_t,province:Et[0],city:Et[1],address:Mt,remarks:qt}});case 3:pr=Ir.sent,St(),pr&&(a.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),ur(_t));case 6:case"end":return Ir.stop()}},Rr)}));return function(jr){return lt.apply(this,arguments)}}();return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ht,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(bt.a,{className:Jr.a.formWrap,form:rr,labelCol:{span:4},wrapperCol:{span:20},onFinish:cr},r.a.createElement(bt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},r.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),r.a.createElement("div",{className:"".concat(Jr.a.flexRow," ").concat(Jr.a.example)},r.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),r.a.createElement("div",{className:Jr.a.flexColumn},r.a.createElement("div",null,r.a.createElement(sr.a,{style:{color:"rgb(82, 196, 26)"}}),r.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),r.a.createElement("div",null,r.a.createElement(Jn.a,{style:{color:"red"}}),r.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),r.a.createElement(bt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},r.a.createElement(dn.a,{allowClear:!0,size:"large",options:Tn.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:An}})),r.a.createElement(bt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},r.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),r.a.createElement(bt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(Zn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:Jr.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(T.a,{className:"mr5",size:"large",onClick:function(){St()}},"\u53D6\u6D88"),r.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplySchool"]},"\u4FDD\u5B58")))))},Nt=Object(p.a)(function(xt){var rt=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:rt,globalSetting:wt,loading:mt.effects}})(ri),_r=me.a.Option,mi=w.a.Dragger,xi=function(rt){var mt,wt,Lt=rt.user,It=rt.account,Kt=rt.globalSetting,Ht=rt.loading,ht=rt.dispatch,St=rt.Scoid,At=Object(d.a)(rt,["user","account","globalSetting","loading","dispatch","Scoid"]),ur=bt.a.useForm(),ar=Object(s.a)(ur,1),Zt=ar[0],$t=Object(o.useState)({}),rr=Object(s.a)($t,2),cr=rr[0],lt=rr[1],Rr=Object(o.useState)([]),jr=Object(s.a)(Rr,2),xr=jr[0],_t=jr[1],Rt=Object(o.useState)([]),Et=Object(s.a)(Rt,2),Mt=Et[0],qt=Et[1],pr=Object(o.useState)([]),er=Object(s.a)(pr,2),Ir=er[0],Hr=er[1],yr=Object(o.useState)([]),at=Object(s.a)(yr,2),zt=at[0],sn=at[1],en=Object(o.useState)(),mr=Object(s.a)(en,2),Dr=mr[0],Mr=mr[1],Ft=Object(o.useState)(),Qt=Object(s.a)(Ft,2),gr=Qt[0],tr=Qt[1],gt=Object(o.useState)(),yt=Object(s.a)(gt,2),Gt=yt[0],Pt=yt[1],Lr=Object(o.useState)(),an=Object(s.a)(Lr,2),ln=an[0],Or=an[1],tn=Object(o.useState)(),Fr=Object(s.a)(tn,2),pn=Fr[0],Xr=Fr[1];Object(o.useEffect)(function(){mn()},[]),Object(o.useEffect)(function(){Object(n.a)(l.a.mark(function $e(){var ze;return l.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(St){pt.next=2;break}return pt.abrupt("return");case 2:return pt.next=4,Qn(St);case 4:ze=pt.sent,Hr(ze==null?void 0:ze.departments);case 6:case"end":return pt.stop()}},$e)}))()},[St]);var mn=function(){var $e=Object(n.a)(l.a.mark(function ze(){var qe;return l.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,ht({type:"account/getSchoolOption"});case 2:qe=Dt.sent,_t(qe==null?void 0:qe.schools);case 4:case"end":return Dt.stop()}},ze)}));return function(){return $e.apply(this,arguments)}}(),Qn=function(ze){return ht({type:"account/getDepartmentOption",payload:{id:ze}})};Object(o.useEffect)(function(){if(!It.basicInfo)return;var $e=It.basicInfo,ze={identity:$e.identity,school:$e.school_name,department:$e.department_name,studentNo:$e.student_id,jobTitle:$e.identity=="teacher"?$e.technical_title:"\u6559\u6388",manager:$e.identity=="professional"?$e.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Zt.setFieldsValue(ze),lt(ze)},[It.basicInfo]);var Pe=function(){Or(!0)},Xe=function(){if(!xr.find(function(ze){return ze.name===cr.school})){a.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Xr(!0)},Je=function(ze){if(lt(Object(M.a)({},Zt.getFieldsValue())),"school"in ze){qt(xr.filter(function(pt){return pt.name.includes(ze.school)}));var qe=(xr.find(function(pt){return pt.name===ze.school})||{}).id;qe?Ue(ze.school):(Zt.setFieldsValue({department:""}),lt(Object(M.a)(Object(M.a)({},cr),{school:ze.school,department:""})))}},Ue=function(){var $e=Object(n.a)(l.a.mark(function ze(qe,pt){var Dt,jt,Yt,kr,Qr,$r;return l.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return kr=(Dt=xr.find(function(rn){return rn.name===qe}))===null||Dt===void 0?void 0:Dt.id,zr.next=3,Qn(kr);case 3:if(zr.t0=zr.sent,zr.t0){zr.next=6;break}zr.t0={};case 6:Qr=zr.t0,Hr(Qr==null?void 0:Qr.departments),$r=pt||(Qr==null||((jt=Qr.departments)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.name),Zt.setFieldsValue({department:$r}),lt(Object(M.a)(Object(M.a)({},cr),{school:qe,department:$r}));case 11:case"end":return zr.stop()}},ze)}));return function(qe,pt){return $e.apply(this,arguments)}}(),_e=function(){var $e=Object(n.a)(l.a.mark(function ze(qe){return l.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,mn();case 2:Zt.setFieldsValue({school:qe,department:""}),lt(Object(M.a)(Object(M.a)({},cr),{school:qe,department:""}));case 4:case"end":return Dt.stop()}},ze)}));return function(qe){return $e.apply(this,arguments)}}(),De=function(ze){if(ze.file.status==="uploading"){Pt(!0);return}if(ze.file.status==="done"){var qe;console.log(ze.file,ze.file.response),tr((qe=ze.file.response)===null||qe===void 0?void 0:qe.id),Object(Wt.D)(ze.file.originFileObj,function(pt){Mr(pt),Pt(!1)})}},Te=function(){var $e=Object(n.a)(l.a.mark(function ze(qe){var pt,Dt,jt,Yt,kr,Qr,$r,qr,zr,rn,nn,vn,un,Pn,hn,Nr;return l.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:if(kr=qe||{},Qr=kr.school,$r=kr.department,qr=kr.identity,zr=kr.studentNo,rn=kr.jobTitle,nn=kr.manager,Dr){on.next=4;break}return a.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),on.abrupt("return");case 4:return vn=(pt=xr.find(function(gn){return gn.name===Qr}))===null||pt===void 0?void 0:pt.id,un=(Dt=Ir.find(function(gn){return gn.name===$r}))===null||Dt===void 0?void 0:Dt.id,qr==="student"?Pn=zr:qr==="teacher"?Pn=rn:Pn=nn,on.next=9,ht({type:"account/applyProfessionalAuth",payload:{id:((jt=It.basicInfo)===null||jt===void 0?void 0:jt.id)||((Yt=Lt.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:vn,department_id:un,identity:qr,extra:Pn,attachment_ids:[gr]}});case 9:hn=on.sent,je(),hn&&(a.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ht({type:"account/getBasicInfo",payload:{login:(Nr=Lt.userInfo)===null||Nr===void 0?void 0:Nr.login}}));case 12:case"end":return on.stop()}},ze)}));return function(qe){return $e.apply(this,arguments)}}(),je=function(){ht({type:"account/setActionTabs",payload:{}})},Ge={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),className:Ot.a.uploader,onChange:De,beforeUpload:function(ze){var qe=ze.type==="image/jpeg"||ze.type==="image/png"||ze.type==="image/jpg"||ze.type==="image/bmp";return qe||a.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),qe}};return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:Ot.a.modal,visible:It.actionTabs.key==="Account-ProfessionalAuth",title:r.a.createElement("div",null,r.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(Ot.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},r.a.createElement(t.a,{spinning:!!Gt},r.a.createElement(bt.a,{className:Ot.a.formWrap,form:Zt,layout:"horizontal",onValuesChange:Je,onFinish:Te},r.a.createElement(A.a,{gutter:[10,0]},r.a.createElement(ut.a,{flex:"300px"},r.a.createElement(bt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},r.a.createElement(me.a,null,r.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),r.a.createElement(_r,{value:"student"},"\u5B66\u751F"),r.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),cr.identity==="student"&&r.a.createElement(ut.a,{flex:"200px"},r.a.createElement(bt.a.Item,{initialValue:cr.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},r.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),cr.identity==="teacher"&&r.a.createElement(ut.a,{flex:"200px"},r.a.createElement(bt.a.Item,{initialValue:cr.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(me.a,null,r.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),r.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),r.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),r.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),cr.identity==="professional"&&r.a.createElement(ut.a,{flex:"200px"},r.a.createElement(bt.a.Item,{initialValue:cr.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(me.a,null,r.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),r.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),r.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),r.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),r.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),r.a.createElement(bt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:cr.department&&!(Ir!=null&&Ir.find(function($e){return $e.name===cr.department}))&&r.a.createElement("div",{className:Ot.a.schoolHintWrap},r.a.createElement("span",{className:Ot.a.colorCDCDCD},cr.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(cr.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),r.a.createElement("span",{className:"".concat(Ot.a.color0152d9," current"),onClick:Xe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},r.a.createElement(fn.a,{showSearch:!0,onChange:function(ze){return sn(Ir.filter(function(qe){return qe.name.includes(ze)}))},options:zt==null?void 0:zt.map(function($e){return{value:$e.name}})})),r.a.createElement(bt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},r.a.createElement("div",{className:Ot.a.flexRow},r.a.createElement("div",{className:"".concat(Ot.a.flexColumn," ").concat(Ot.a.example)},r.a.createElement("span",{className:Ot.a.exampleImg},r.a.createElement("img",{src:Vt.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(Ot.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:Ot.a.flexColumn},r.a.createElement(mi,Object(Me.a)({},Ge,{accept:".png,.jpg,.bmp,.jpeg"}),Dr?r.a.createElement("img",{src:Dr,className:Ot.a.uploadImg}):r.a.createElement("div",{className:Ot.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Ot.a.uploadTipIcon)})),r.a.createElement("p",{className:Ot.a.uploadTip},r.a.createElement("a",{className:Ot.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:Ot.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:Ot.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(T.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),r.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Ht["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:Ot.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),r.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),r.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),r.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),r.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),r.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Kt!=null&&(mt=Kt.setting)!==null&&mt!==void 0&&mt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),r.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),r.a.createElement(Nt,{visible:ln,onClose:function(){return Or(!1)},schoolName:cr.school,onSuccess:_e}),r.a.createElement(kn,{visible:pn,onClose:function(){return Xr(!1)},schoolId:(wt=xr.find(function($e){return $e.name===cr.school}))===null||wt===void 0?void 0:wt.id,schoolName:cr.school,departmentName:cr.department,onSuccess:function(ze){return Ue(cr.school,ze)}}))},Di=Object(p.a)(function(xt){var rt=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:rt,account:mt,globalSetting:Lt,loading:wt.effects}})(xi),wi=D("aCH8"),se=D.n(wi);function V(xt){var rt=xt.type,mt=xt.dispatch,wt=xt.userid,Lt=xt.isshow,It=xt.setPhoneshow,Kt=xt.setEmailshow,Ht="79e33abd4b6588941ab7622aed1e67e8",ht=Object(o.useState)(""),St=Object(s.a)(ht,2),At=St[0],ur=St[1],ar=Object(o.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Zt=Object(s.a)(ar,2),$t=Zt[0],rr=Zt[1],cr=Object(o.useState)(60),lt=Object(s.a)(cr,2),Rr=lt[0],jr=lt[1],xr=Object(o.useState)(!1),_t=Object(s.a)(xr,2),Rt=_t[0],Et=_t[1],Mt=Object(o.useState)(""),qt=Object(s.a)(Mt,2),pr=qt[0],er=qt[1];function Ir(){return Hr.apply(this,arguments)}function Hr(){return Hr=Object(n.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(At){Ft.next=3;break}return rt===3?a.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):a.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,mt({type:"competitions/getVerification",payload:{type:rt,login:At,smscode:se()(Ht+At)}});case 5:Dr=Ft.sent,Dr.status===1&&(a.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),yr(),Et(!0));case 7:case"end":return Ft.stop()}},mr)})),Hr.apply(this,arguments)}function yr(){jr(60);var mr=setInterval(function(){--Rr,Rr>-1?jr(Rr):(clearInterval(mr),Et(!1))},1e3)}function at(){return zt.apply(this,arguments)}function zt(){return zt=Object(n.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/PhoneBind",payload:{userid:wt,code:pr,phone:At}});case 2:Dr=Ft.sent,Dr.status===0&&(a.b.info("\u7ED1\u5B9A\u6210\u529F"),It("none"));case 4:case"end":return Ft.stop()}},mr)})),zt.apply(this,arguments)}function sn(){return en.apply(this,arguments)}function en(){return en=Object(n.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/EmailBind",payload:{userid:wt,code:pr,email:At}});case 2:Dr=Ft.sent,Dr.status===0&&(a.b.info("\u7ED1\u5B9A\u6210\u529F"),Kt("none"));case 4:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return r.a.createElement("div",{style:{display:Lt}},r.a.createElement("p",null,r.a.createElement(U.a,{value:At,onChange:function(Dr){return ur(Dr.target.value)},placeholder:rt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),r.a.createElement("span",null,r.a.createElement(U.a,{value:pr,onChange:function(Dr){return er(Dr.target.value)},placeholder:rt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",r.a.createElement(T.a,{disabled:Rt,onClick:function(){return Ir()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Rt?"\u91CD\u65B0\u53D1\u9001".concat(Rr,"s"):$t),r.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},r.a.createElement(T.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!pr){a.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}rt===3?at():sn()}},"\u786E\u8BA4"),r.a.createElement(T.a,{style:{marginLeft:"20px"},onClick:function(){rt===3?It("none"):Kt("none")}},"\u53D6\u6D88")))}var $=V;function ee(xt){var rt=xt.dispatch,mt=xt.userid,wt={wrapperCol:{offset:3,span:21}},Lt=bt.a.useForm(),It=Object(s.a)(Lt,1),Kt=It[0],Ht=Object(x.i)(),ht=Ht.identifier;return r.a.createElement("div",{style:{width:"500px"}},r.a.createElement(bt.a,{form:Kt,name:"basic"},r.a.createElement(bt.a.Item,Object(Me.a)({},wt,{label:r.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(bt.a.Item,Object(Me.a)({},wt,{label:r.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(bt.a.Item,Object(Me.a)({},wt,{label:r.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),r.a.createElement(U.a,null)),r.a.createElement(bt.a.Item,null,r.a.createElement(T.a,{type:"primary",htmlType:"submit",onClick:Object(n.a)(l.a.mark(function St(){return l.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:Kt.validateFields().then(function(){var ar=Object(n.a)(l.a.mark(function Zt($t){var rr;return l.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,rt({type:"competitions/setleader",payload:Object(M.a)({identifier:ht,user_id:mt},$t)});case 2:rr=lt.sent,rr.status===0&&a.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return lt.stop()}},Zt)}));return function(Zt){return ar.apply(this,arguments)}}());case 1:case"end":return ur.stop()}},St)}))},"\u63D0\u4EA4"))))}var ye=ee,oe={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ve(xt){var rt,mt,wt,Lt,It,Kt,Ht,ht,St=xt.Prize,At=xt.Accounts,ur=xt.dispatch,ar=xt.userid,Zt=Object(o.useState)("none"),$t=Object(s.a)(Zt,2),rr=$t[0],cr=$t[1],lt=Object(o.useState)("none"),Rr=Object(s.a)(lt,2),jr=Rr[0],xr=Rr[1];function _t(Et){return Rt.apply(this,arguments)}function Rt(){return Rt=Object(n.a)(l.a.mark(function Et(Mt){var qt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!(Mt==="1")){er.next=6;break}return er.next=3,ur({type:"competitions/Authentication"});case 3:qt=er.sent,er.next=9;break;case 6:return er.next=8,ur({type:"competitions/Professional"});case 8:qt=er.sent;case 9:qt.status===0&&a.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return er.stop()}},Et)})),Rt.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u59D3\u540D\uFF1A",r.a.createElement("span",null,At==null?void 0:At.name),(At==null?void 0:At.authentication)==="uncertified"?null:(At==null?void 0:At.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(T.a,{type:"primary",onClick:function(){return _t("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," ","\u5DF2\u8BA4\u8BC1")),r.a.createElement("p",null,"\u6027\u522B\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.gender)===0?"\u7537":"\u5973"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u804C\u4E1A\uFF1A",r.a.createElement("span",null,At&&At.identity&&oe[At.identity]),(At==null?void 0:At.authentication)==="uncertified"?null:(At==null?void 0:At.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(T.a,{type:"primary",onClick:function(){return _t("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),r.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),r.a.createElement(T.a,{type:"primary",onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),r.a.createElement("p",null,"\u5B66\u53F7\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.student_id)||"--")),r.a.createElement("p",null,"\u5B66\u6821\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.school_name)||"--")),r.a.createElement("p",null,"\u9662\u7CFB\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.department_name)||"--"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(At==null?void 0:At.phone)||"--"),rr==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){cr("block")}},"\u66F4\u6362"):null),r.a.createElement($,{type:3,dispatch:ur,userid:At==null?void 0:At.id,isshow:rr,setPhoneshow:cr,setEmailshow:xr}),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(At==null?void 0:At.mail)||"--"),jr==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){xr("block")}},"\u66F4\u6362"):null),r.a.createElement($,{type:4,dispatch:ur,userid:At==null?void 0:At.id,isshow:jr,setEmailshow:xr,setPhoneshow:cr})),St!=null&&St.leader&&St!==null&&St!==void 0&&St.teams&&St!==null&&St!==void 0&&(rt=St.teams[0])!==null&&rt!==void 0&&(mt=rt.bank_account)!==null&&mt!==void 0&&mt.bank?r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),r.a.createElement(ye,{dispatch:ur,userid:ar})),St!=null&&St.leader?r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),r.a.createElement("span",null,(St==null?void 0:St.teams)&&(St==null||((wt=St.teams[0])===null||wt===void 0||((Lt=wt.bank_account)===null||Lt===void 0))?void 0:Lt.bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),r.a.createElement("span",null,(St==null?void 0:St.teams)&&(St==null||((It=St.teams[0])===null||It===void 0||((Kt=It.bank_account)===null||Kt===void 0))?void 0:Kt.second_bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),r.a.createElement("span",null,(St==null?void 0:St.teams)&&(St==null||((Ht=St.teams[0])===null||Ht===void 0||((ht=Ht.bank_account)===null||ht===void 0))?void 0:ht.card_no)||"--"))):null,r.a.createElement(Di,{Scoid:At==null?void 0:At.school_id}),r.a.createElement(bn,null))}var Tt=Ve,Xt=fe.a.TabPane;function Er(xt){var rt=xt.Prize,mt=xt.Accounts,wt=xt.getAccounts,Lt=xt.dispatch,It=xt.userid;return r.a.createElement("div",{className:"fr"},r.a.createElement("div",{className:"mb100 "},r.a.createElement(fe.a,{defaultActiveKey:"1",onChange:function(Ht){Ht==="2"&&wt()}},r.a.createElement(Xt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},r.a.createElement(Le,{Prize:rt})),r.a.createElement(Xt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},r.a.createElement(Tt,{userid:It,dispatch:Lt,Prize:rt,Accounts:mt})))))}var kt=Er,Pr=D("xKgJ"),Gr=D("wd/R"),yn=D.n(Gr),ni=fe.a.TabPane;function ii(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.ChartRules,ht=xt.ItemData,St=xt.getCharts,At=xt.Selectkey,ur=xt.HeaderDetail,ar=xt.getChartRules,Zt=xt.userinfo,$t=xt.Editable,rr=xt.dispatch,cr=xt.StaffDetail,lt=Object(o.useState)(!1),Rr=Object(s.a)(lt,2),jr=Rr[0],xr=Rr[1],_t=Object(o.useState)(""),Rt=Object(s.a)(_t,2),Et=Rt[0],Mt=Rt[1],qt=Object(o.useState)(!0),pr=Object(s.a)(qt,2),er=pr[0],Ir=pr[1],Hr=Object(o.useState)(),yr=Object(s.a)(Hr,2),at=yr[0],zt=yr[1],sn=Object(o.useState)(),en=Object(s.a)(sn,2),mr=en[0],Dr=en[1],Mr=Object(x.i)(),Ft=Mr.identifier;Object(o.useEffect)(function(){if(er){var gt,yt,Gt,Pt,Lr=Ht==null||((gt=Ht.stages)===null||gt===void 0)?void 0:gt[0];zt(Lr);var an=Ht==null||((yt=Ht.stages)===null||yt===void 0||((Gt=yt[0])===null||Gt===void 0||((Pt=Gt.children)===null||Pt===void 0)))?void 0:Pt[0];if(Dr(an),Lr!=null&&Lr.id){var ln,Or,tn;St(Lr==null?void 0:Lr.id),Mt(((ln=Ht.rule_contents)===null||ln===void 0||((Or=ln.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(Lr==null?void 0:Lr.id)}))===null||Or===void 0||((tn=Or[0])===null||tn===void 0))?void 0:tn.content)||"")}else{var Fr,pn,Xr;St(0),Mt(((Fr=Ht.rule_contents)===null||Fr===void 0||((pn=Fr.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||pn===void 0||((Xr=pn[0])===null||Xr===void 0))?void 0:Xr.content)||"")}}},[Ht]);function Qt(){return gr.apply(this,arguments)}function gr(){return gr=Object(n.a)(l.a.mark(function gt(){var yt,Gt,Pt,Lr,an,ln,Or,tn,Fr;return l.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Et){Xr.next=3;break}return a.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Xr.abrupt("return");case 3:if(Ir(!1),yt=at==null?void 0:at.id,!yt){Xr.next=12;break}return Xr.next=8,Object(Z.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:Et,md_content_id:(Gt=Ht.rule_contents)===null||Gt===void 0||((Pt=Gt.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(yt)}))===null||Pt===void 0||((Lr=Pt[0])===null||Lr===void 0))?void 0:Lr.id,stage_id:at==null?void 0:at.id}});case 8:an=Xr.sent,an.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),xr(!1),ar()),Xr.next=16;break;case 12:return Xr.next=14,Object(Z.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:Et,md_content_id:(ln=Ht.rule_contents)===null||ln===void 0||((Or=ln.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||Or===void 0||((tn=Or[0])===null||tn===void 0))?void 0:tn.id,stage_id:at==null?void 0:at.id}});case 14:Fr=Xr.sent,Fr.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),xr(!1),ar());case 16:case"end":return Xr.stop()}},gt)})),gr.apply(this,arguments)}var tr=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(yt,Gt,Pt){return r.a.createElement("span",null,yt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(yt){return r.a.createElement(et.a,{title:yt},r.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=10?(yt==null?void 0:yt.substr(0,10))+"...":yt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(yt){return r.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=6?(yt==null?void 0:yt.substr(0,6))+"...":yt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(yt){return r.a.createElement("span",null,yt===1?"\u8BA1\u7B97\u4E2D":yt===2?"\u5B8C\u6210":yt===0?"\u5F85\u8BA1\u7B97":yt===3&&"\u9519\u8BEF")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return r.a.createElement("span",null,yt||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){return(yt==null?void 0:yt.length)>0?yt==null?void 0:yt.map(function(Gt,Pt){return r.a.createElement("span",null,Gt==null?void 0:Gt.name,"\uFF1A",Gt==null?void 0:Gt.value," ",r.a.createElement("br",null))}):r.a.createElement("span",null,"--")}},(at==null?void 0:at.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(yt){return r.a.createElement("span",null,yt||"--")}},(at==null?void 0:at.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="score"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},(at==null?void 0:at.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="fid"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},(at==null?void 0:at.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="total_score"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return r.a.createElement("span",null,yt||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="Coffee"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="Easyship"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="Scar"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="Scarf"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(at!=null&&at.display_four_indicators)&&(at==null?void 0:at.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(Pt){return(Pt==null?void 0:Pt.name)==="Total"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(yt){return r.a.createElement("a",{href:yt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(gt){return!!gt});return r.a.createElement("div",null,(Ht==null||((rt=Ht.stages)===null||rt===void 0)?void 0:rt.length)>0?null:r.a.createElement(Ke,null),(Ht==null||((mt=Ht.stages)===null||mt===void 0)?void 0:mt.length)>0&&r.a.createElement(fe.a,{animated:!0,tabBarExtraContent:Zt!=null&&Zt.admin||Zt!=null&&Zt.business||$t?r.a.createElement(T.a,{onClick:function(){xr(!0)}},"\u7F16\u8F91"):cr.enrolled&&(at==null?void 0:at.start_time)&&(at==null?void 0:at.end_time)&&r.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",yn()(at==null?void 0:at.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",yn()(at==null?void 0:at.end_time).format("YYYY-MM-DD HH:mm:ss"),r.a.createElement(T.a,{style:{marginLeft:"20px"},disabled:yn()(at==null?void 0:at.start_time).unix()>yn()(yn()().format("YYYY-MM-DD HH:mm:s")).unix()||yn()(yn()().format("YYYY-MM-DD HH:mm:s")).unix()>yn()(at==null?void 0:at.end_time).unix(),onClick:function(){rr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(mr==null?void 0:mr.id)||(at==null?void 0:at.id),id:ur==null?void 0:ur.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(yt){var Gt,Pt,Lr,an,ln;xr(!1);var Or=Ht==null||((Gt=Ht.stages)===null||Gt===void 0)?void 0:Gt.filter(function(Fr){return parseInt(yt)===parseInt(Fr==null?void 0:Fr.id)})[0],tn=Or==null||((Pt=Or.children)===null||Pt===void 0)?void 0:Pt[0];Dr(tn),zt(Or),Mt(((Lr=Ht.rule_contents)===null||Lr===void 0||((an=Lr.filter(function(Fr){return parseInt(Fr.competition_stage_id)===parseInt(Or==null?void 0:Or.id)}))===null||an===void 0||((ln=an[0])===null||ln===void 0))?void 0:ln.content)||""),St((tn==null?void 0:tn.id)||yt)}},Ht&&Ht.stages.map(function(gt,yt){return r.a.createElement(ni,{tab:gt.name,key:gt.id===null?0:gt.id},jr===!1&&Ht&&Ht.rule_contents.map(function(Gt,Pt){if(gt.id===Gt.competition_stage_id)return r.a.createElement(R.a,{key:Pt,value:Gt.content===void 0||Gt.content===null?"":Gt.content});if(gt.id===null&&Gt.competition_stage_id===0)return r.a.createElement(R.a,{key:Pt,value:Gt.content===void 0||Gt.content===null?"":Gt.content})}))})),(at==null||((wt=at.children)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{activeKey:(mr==null?void 0:mr.id)+"",onChange:function(yt){var Gt,Pt=at==null||((Gt=at.children)===null||Gt===void 0)?void 0:Gt.filter(function(Lr){return parseInt(yt)===parseInt(Lr==null?void 0:Lr.id)})[0];Dr(Pt),St(yt)}},at==null||((Lt=at.children)===null||Lt===void 0)?void 0:Lt.map(function(gt,yt){return r.a.createElement(ni,{tab:gt.name,key:gt.id===null?0:gt.id})})),jr&&r.a.createElement("div",null,r.a.createElement(re.a,{defaultValue:Et,onChange:function(yt){Mt(yt)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Qt()}},"\u63D0\u4EA4"),r.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return xr(!1)}},"\u53D6\u6D88"))),((It=ur.competition_modules.filter(function(gt){return gt.id===At}))===null||It===void 0||((Kt=It[0])===null||Kt===void 0)?void 0:Kt.show_leaderboard)&&r.a.createElement(X.a,{dataSource:ht==null?void 0:ht.results,columns:tr}))}var Bn=ii,Ni=D("DjyN"),Ki=D("NUBc"),Gn=fe.a.TabPane;function Ti(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.loading,ht=xt.ChartRules,St=xt.ItemData,At=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,cr=xt.dispatch,lt=xt.StaffDetail,Rr=Object(o.useState)(!1),jr=Object(s.a)(Rr,2),xr=jr[0],_t=jr[1],Rt=Object(o.useState)(""),Et=Object(s.a)(Rt,2),Mt=Et[0],qt=Et[1],pr=Object(o.useState)(!0),er=Object(s.a)(pr,2),Ir=er[0],Hr=er[1],yr=Object(o.useState)(),at=Object(s.a)(yr,2),zt=at[0],sn=at[1],en=Object(o.useState)(),mr=Object(s.a)(en,2),Dr=mr[0],Mr=mr[1],Ft=Object(x.i)(),Qt=Ft.identifier,gr=Object(o.useState)({page:1,limit:10,sort:"desc"}),tr=Object(s.a)(gr,2),gt=tr[0],yt=tr[1];Object(o.useEffect)(function(){var Pt;Ir&&ht!==null&&ht!==void 0&&(Pt=ht.stages)!==null&&Pt!==void 0&&Pt[0]&&Gt()},[ht==null||((rt=ht.stages)===null||rt===void 0)?void 0:rt[0]]);var Gt=function(){var Pt=Object(n.a)(l.a.mark(function Lr(){var an,ln,Or,tn,Fr,pn;return l.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return Fr=ht==null||((an=ht.stages)===null||an===void 0)?void 0:an[0],sn(Fr),pn=ht==null||((ln=ht.stages)===null||ln===void 0||((Or=ln[0])===null||Or===void 0||((tn=Or.children)===null||tn===void 0)))?void 0:tn[0],Mr(pn),gt.id=(pn==null?void 0:pn.id)||(Fr==null?void 0:Fr.id),yt(Object(M.a)({},gt)),mn.next=7,At(Object(M.a)(Object(M.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return mn.stop()}},Lr)}));return function(){return Pt.apply(this,arguments)}}();return r.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:r.a.createElement(Ke,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Pt=Object(n.a)(l.a.mark(function Lr(an){var ln,Or,tn,Fr,pn,Xr,mn;return l.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return _t(!1),Xr=ht==null||((ln=ht.stages)===null||ln===void 0)?void 0:ln.filter(function(Xe){return parseInt(an)===parseInt(Xe==null?void 0:Xe.id)})[0],mn=Xr==null||((Or=Xr.children)===null||Or===void 0)?void 0:Or[0],Mr(mn),sn(Xr),qt(((tn=ht.rule_contents)===null||tn===void 0||((Fr=tn.filter(function(Xe){return parseInt(Xe.competition_stage_id)===parseInt(Xr==null?void 0:Xr.id)}))===null||Fr===void 0||((pn=Fr[0])===null||pn===void 0))?void 0:pn.content)||""),gt.page=1,gt.limit=10,gt.id=(mn==null?void 0:mn.id)||an,yt(Object(M.a)({},gt)),Pe.next=9,At(Object(M.a)({},gt));case 9:case"end":return Pe.stop()}},Lr)}));return function(Lr){return Pt.apply(this,arguments)}}()},ht&&ht.stages.map(function(Pt,Lr){return r.a.createElement(Gn,{tab:Pt.name,key:Pt.id===null?0:Pt.id})})),(zt==null||((Lt=zt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&r.a.createElement(fe.a,{activeKey:(Dr==null?void 0:Dr.id)+"",onChange:function(){var Pt=Object(n.a)(l.a.mark(function Lr(an){var ln,Or;return l.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:return Or=zt==null||((ln=zt.children)===null||ln===void 0)?void 0:ln.filter(function(pn){return parseInt(an)===parseInt(pn==null?void 0:pn.id)})[0],Mr(Or),gt.page=1,gt.limit=10,gt.id=an,yt(Object(M.a)({},gt)),Fr.next=5,At(Object(M.a)({},gt));case 5:case"end":return Fr.stop()}},Lr)}));return function(Lr){return Pt.apply(this,arguments)}}()},zt==null||((It=zt.children)===null||It===void 0)?void 0:It.map(function(Pt,Lr){return r.a.createElement(Gn,{tab:Pt.name,key:Pt.id===null?0:Pt.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){gt.page=1,gt.sort=gt.sort==="desc"?"asc":"desc",yt(Object(M.a)({},gt)),At(Object(M.a)({},gt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",gt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(gt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",r.a.createElement(U.a.Search,{onSearch:function(Lr){gt.page=1,gt.search=Lr,yt(Object(M.a)({},gt)),At(Object(M.a)({},gt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),r.a.createElement(t.a,{spinning:Ht},St==null||((Kt=St.results)===null||Kt===void 0)?void 0:Kt.map(function(Pt,Lr){return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Lr===0?14:30}},r.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/"+(Pt==null?void 0:Pt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),r.a.createElement("div",{style:{marginLeft:10}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},Pt==null?void 0:Pt.user_name),r.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Pt==null?void 0:Pt.team_name)||"- -")),r.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821"," ",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Pt==null?void 0:Pt.school_name)||"- -")))),r.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},r.a.createElement("div",null,r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Pt==null?void 0:Pt.created_at),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Pt==null?void 0:Pt.ts_mem)||"- -","MB"),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Pt==null?void 0:Pt.ts_time)||"- -","\u79D2")),r.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Pt==null?void 0:Pt.game_identifier),target:"_blank"},r.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),r.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),r.a.createElement(Ki.a,{total:St==null?void 0:St.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(Lr,an){gt.page=Lr,yt(Object(M.a)({},gt)),At(Object(M.a)({},gt))}})))}var Gi=Ti,Li=function(rt){var mt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],wt=["","\u5341","\u767E","\u5343","\u4E07"];rt=parseInt(rt);var Lt=function(ht){for(var St=ht.toString().split("").reverse(),At="",ur=0;ur<St.length;ur++)At=(ur==0&&St[ur]==0||ur>0&&St[ur]==0&&St[ur-1]==0?"":mt[St[ur]]+(St[ur]==0?wt[0]:wt[ur]))+At;return At},It=Math.floor(rt/1e4),Kt=rt%1e4;return Kt.toString().length<4&&(Kt="0"+Kt),It?Lt(It)+"\u4E07"+Lt(Kt):Lt(rt)};function li(xt){var rt,mt=xt.item,wt=xt.index,Lt=xt.StaffDetail,It=Object(o.useState)(!0),Kt=Object(s.a)(It,2),Ht=Kt[0],ht=Kt[1],St=Object(o.useState)(!0),At=Object(s.a)(St,2),ur=At[0],ar=At[1],Zt=Object(o.useRef)();return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},r.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/"+(mt==null?void 0:mt.pic),style:{width:220,height:130,borderRadius:"4px"}}),r.a.createElement("div",{style:{marginLeft:20,width:"75%"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Li(wt+1),"\uFF1A",r.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},mt==null?void 0:mt.name)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},mt==null?void 0:mt.challenges_count)," ")),r.a.createElement("div",{ref:Zt},r.a.createElement(R.a,{style:{maxHeight:Ht&&100},value:mt==null?void 0:mt.description})),r.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ht(!Ht)}},Ht?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",r.a.createElement("i",{className:"iconfont font14 ".concat(Ht?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),r.a.createElement("div",{style:{marginTop:14,maxHeight:ur&&58,overflow:"hidden"}},mt==null||((rt=mt.challenges)===null||rt===void 0)?void 0:rt.map(function($t,rr){return r.a.createElement("div",{style:{marginTop:rr===0?0:12}},r.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),r.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",rr+1,"\u5173",$t==null?void 0:$t.name))})),r.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},r.a.createElement("span",{onClick:function(){ar(!ur)}},ur?"\u5C55\u5F00":"\u6536\u8D77"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(ur?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Lt==null?void 0:Lt.enrolled)&&r.a.createElement(T.a,{onClick:function(){window.open("/shixuns/".concat(mt==null?void 0:mt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var ea=li,Vi=fe.a.TabPane;function ta(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.loading,ht=xt.ChartRules,St=xt.ItemData,At=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,cr=xt.dispatch,lt=xt.StaffDetail,Rr=Object(o.useState)(!1),jr=Object(s.a)(Rr,2),xr=jr[0],_t=jr[1],Rt=Object(o.useState)(""),Et=Object(s.a)(Rt,2),Mt=Et[0],qt=Et[1],pr=Object(o.useState)(!0),er=Object(s.a)(pr,2),Ir=er[0],Hr=er[1],yr=Object(o.useState)(),at=Object(s.a)(yr,2),zt=at[0],sn=at[1],en=Object(o.useState)(),mr=Object(s.a)(en,2),Dr=mr[0],Mr=mr[1],Ft=Object(x.i)(),Qt=Ft.identifier,gr=Object(o.useState)({page:1,limit:10}),tr=Object(s.a)(gr,2),gt=tr[0],yt=tr[1],Gt=Object(o.useState)(),Pt=Object(s.a)(Gt,2),Lr=Pt[0],an=Pt[1];Object(o.useEffect)(function(){var Or;Ir&&ht!==null&&ht!==void 0&&(Or=ht.stages)!==null&&Or!==void 0&&Or[0]&&ln()},[ht==null||((rt=ht.stages)===null||rt===void 0)?void 0:rt[0]]);var ln=function(){var Or=Object(n.a)(l.a.mark(function tn(){var Fr,pn,Xr,mn,Qn,Pe;return l.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Qn=ht==null||((Fr=ht.stages)===null||Fr===void 0)?void 0:Fr[0],sn(Qn),Pe=ht==null||((pn=ht.stages)===null||pn===void 0||((Xr=pn[0])===null||Xr===void 0||((mn=Xr.children)===null||mn===void 0)))?void 0:mn[0],Mr(Pe),gt.id=(Pe==null?void 0:Pe.id)||(Qn==null?void 0:Qn.id),yt(Object(M.a)({},gt)),Je.next=7,At(Object(M.a)(Object(M.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return Je.stop()}},tn)}));return function(){return Or.apply(this,arguments)}}();return r.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:r.a.createElement(Ke,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Or=Object(n.a)(l.a.mark(function tn(Fr){var pn,Xr,mn,Qn,Pe,Xe,Je;return l.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return _t(!1),Xe=ht==null||((pn=ht.stages)===null||pn===void 0)?void 0:pn.filter(function(De){return parseInt(Fr)===parseInt(De==null?void 0:De.id)})[0],Je=Xe==null||((Xr=Xe.children)===null||Xr===void 0)?void 0:Xr[0],Mr(Je),sn(Xe),qt(((mn=ht.rule_contents)===null||mn===void 0||((Qn=mn.filter(function(De){return parseInt(De.competition_stage_id)===parseInt(Xe==null?void 0:Xe.id)}))===null||Qn===void 0||((Pe=Qn[0])===null||Pe===void 0))?void 0:Pe.content)||""),gt.page=1,gt.limit=10,gt.id=(Je==null?void 0:Je.id)||Fr,yt(Object(M.a)({},gt)),_e.next=9,At(Object(M.a)({},gt));case 9:case"end":return _e.stop()}},tn)}));return function(tn){return Or.apply(this,arguments)}}()},ht&&ht.stages.map(function(Or,tn){return r.a.createElement(Vi,{tab:Or.name,key:Or.id===null?0:Or.id})})),(zt==null||((Lt=zt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&r.a.createElement(fe.a,{activeKey:(Dr==null?void 0:Dr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Or=Object(n.a)(l.a.mark(function tn(Fr){var pn,Xr;return l.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:return Xr=zt==null||((pn=zt.children)===null||pn===void 0)?void 0:pn.filter(function(Pe){return parseInt(Fr)===parseInt(Pe==null?void 0:Pe.id)})[0],Mr(Xr),gt.page=1,gt.limit=10,gt.id=Fr,yt(Object(M.a)({},gt)),Qn.next=5,At(Object(M.a)({},gt));case 5:case"end":return Qn.stop()}},tn)}));return function(tn){return Or.apply(this,arguments)}}()},zt==null||((It=zt.children)===null||It===void 0)?void 0:It.map(function(Or,tn){return r.a.createElement(Vi,{tab:Or.name,key:Or.id===null?0:Or.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},St==null?void 0:St.start_time,"~",St==null?void 0:St.end_time)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(St==null?void 0:St.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),r.a.createElement(t.a,{spinning:Ht},St==null||((Kt=St.results)===null||Kt===void 0)?void 0:Kt.map(function(Or,tn){return r.a.createElement(ea,{StaffDetail:lt,item:Or,index:tn})})),r.a.createElement(Ki.a,{total:St==null?void 0:St.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(tn,Fr){gt.page=tn,yt(Object(M.a)({},gt)),At(Object(M.a)({},gt))}})))}var oa=ta,ki=D("UfjD"),qn=D("qHvr"),ji=function(rt){var mt,wt,Lt,It,Kt,Ht,ht,St,At=rt.globalSetting,ur=rt.loading,ar=rt.dispatch,Zt=rt.user,$t=Object(d.a)(rt,["globalSetting","loading","dispatch","user"]),rr=Object(o.useState)({avatar_url:""}),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)([]),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(x.i)(),Mt=Et.identifier,qt=Object(o.useState)([]),pr=Object(s.a)(qt,2),er=pr[0],Ir=pr[1],Hr=Object(o.useState)(!0),yr=Object(s.a)(Hr,2),at=yr[0],zt=yr[1],sn=Object(o.useState)([]),en=Object(s.a)(sn,2),mr=en[0],Dr=en[1],Mr=Object(o.useState)([]),Ft=Object(s.a)(Mr,2),Qt=Ft[0],gr=Ft[1],tr=Object(o.useState)(!1),gt=Object(s.a)(tr,2),yt=gt[0],Gt=gt[1],Pt=Object(o.useState)(!1),Lr=Object(s.a)(Pt,2),an=Lr[0],ln=Lr[1],Or=Object(o.useState)(!1),tn=Object(s.a)(Or,2),Fr=tn[0],pn=tn[1],Xr=Object(o.useState)([]),mn=Object(s.a)(Xr,2),Qn=mn[0],Pe=mn[1],Xe=Object(o.useState)([]),Je=Object(s.a)(Xe,2),Ue=Je[0],_e=Je[1],De=Object(o.useState)([]),Te=Object(s.a)(De,2),je=Te[0],Ge=Te[1],$e=Object(o.useState)(!1),ze=Object(s.a)($e,2),qe=ze[0],pt=ze[1],Dt=Object(o.useState)([]),jt=Object(s.a)(Dt,2),Yt=jt[0],kr=jt[1],Qr=Object(o.useState)(),$r=Object(s.a)(Qr,2),qr=$r[0],zr=$r[1],rn=Object(o.useState)(!0),nn=Object(s.a)(rn,2),vn=nn[0],un=nn[1],Pn=Object(o.useState)(!1),hn=Object(s.a)(Pn,2),Nr=hn[0],Ur=hn[1],on=Object(o.useState)(!1),gn=Object(s.a)(on,2),Tr=gn[0],xn=gn[1],Vn=Object(o.useState)(!1),Cn=Object(s.a)(Vn,2),jn=Cn[0],Rn=Cn[1],ei=Object(o.useState)(!1),ui=Object(s.a)(ei,2),Xn=ui[0],gi=ui[1],Xi=Object(o.useState)(!1),Si=Object(s.a)(Xi,2),ci=Si[0],Fn=Si[1],Un=Object(o.useState)(!0),Yn=Object(s.a)(Un,2),zn=Yn[0],ai=Yn[1],Ai=Object(x.h)(),ra=Object(o.useRef)(null);Object(o.useEffect)(function(){Mt&&Dn(),Object(Wt.X)("\u7ADE\u8D5B")},[Mt]);function Dn(){return Fi.apply(this,arguments)}function Fi(){return Fi=Object(n.a)(l.a.mark(function wr(){var Sr;return l.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return wn.t0=Rt,wn.next=3,ar({type:"competitions/getStaff",payload:{identifier:Mt}});case 3:return wn.t1=wn.sent,(0,wn.t0)(wn.t1),wn.next=7,ar({type:"competitions/getHeader",payload:{identifier:Mt}});case 7:Sr=wn.sent,Rr(Sr),Object(Wt.X)((Sr==null?void 0:Sr.name)||"\u7ADE\u8D5B");case 10:case"end":return wn.stop()}},wr)})),Fi.apply(this,arguments)}Object(o.useEffect)(function(){var wr;zr(parseInt(Ai==null||((wr=Ai.query)===null||wr===void 0)?void 0:wr.type)===1)},[Ai]),Object(o.useEffect)(function(){var wr;if((lt==null||((wr=lt.competition_modules)===null||wr===void 0)?void 0:wr.length)>0){var Sr,or;if((Ai==null||((Sr=Ai.query)===null||Sr===void 0)?void 0:Sr.active)==="\u8D5B\u9898\u53D1\u5E03"){var wn,hr=lt==null||((wn=lt.competition_modules)===null||wn===void 0)?void 0:wn.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(hr){Ui(hr);return}}Ui(lt==null||((or=lt.competition_modules)===null||or===void 0)?void 0:or[0])}},[lt]);function Ui(wr){return Mn.apply(this,arguments)}function Mn(){return Mn=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Ge(Sr.id),je=Sr.id,Dr(Sr),!(Sr.module_type==="entrance")){hr.next=9;break}return hr.next=6,ar({type:"competitions/getItem",payload:{url:Sr.module_url,module_type:"entrance"}});case 6:or=hr.sent,hr.next=12;break;case 9:return hr.next=11,ar({type:"competitions/getItem",payload:{url:Sr.module_url}});case 11:or=hr.sent;case 12:Gt(!1),pn(!1),pt(!1),Ir(or),Ur(!1),xn(!1),gr(Sr.module_type),Sr.module_type==="chart"?(Gt(!0),zt(!1),Ba()):Sr.module_type==="certificate"?(pn(!0),Gt(!1),zt(!1),ba()):Sr.module_type==="md_tab"?(pt(!0),zt(!1),localStorage.setItem("issee","2"),Gt(!1),pn(!1),ua()):Sr.module_type==="md_shixun"?(Ur(!0),zt(!1),ua()):Sr.module_type==="entrance"?(xn(!0),zt(!1),ua()):(zt(!0),localStorage.setItem("issee","1"));case 20:case"end":return hr.stop()}},wr)})),Mn.apply(this,arguments)}function In(wr,Sr,or){return oi.apply(this,arguments)}function oi(){return oi=Object(n.a)(l.a.mark(function wr(Sr,or,wn){var hr,pa;return l.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:if(Sr.stopPropagation(),Object(ue.e)(ar)){Hn.next=3;break}return Hn.abrupt("return");case 3:if(!(lt!=null&&lt.is_authentication&&!(Zt!=null&&(hr=Zt.userInfo)!==null&&hr!==void 0&&hr.authentication))){Hn.next=6;break}return ar({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Hn.abrupt("return");case 6:if(!(lt!=null&&lt.enroll_url)){Hn.next=9;break}return Object(Wt.S)(lt==null?void 0:lt.enroll_url),Hn.abrupt("return");case 9:if(!(wn==="ismodel")){Hn.next=23;break}if(!(or.member_of_course===!0)){Hn.next=14;break}Object(Wt.S)("/classrooms/".concat(or.course_id)),Hn.next=21;break;case 14:if(or.invite_code){Hn.next=17;break}return a.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),Hn.abrupt("return");case 17:return Hn.next=19,ar({type:"competitions/addApplytojoincourse",payload:{invite_code:or.invite_code,student:1}});case 19:pa=Hn.sent,pa.status===0&&Object(Wt.S)("/classrooms/".concat(or.course_id));case 21:Hn.next=27;break;case 23:if(!(_t.enrolled===!0)){Hn.next=26;break}return Object(Wt.S)(wn),Hn.abrupt("return");case 26:Rn(!0);case 27:case"end":return Hn.stop()}},wr)})),oi.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(n.a)(l.a.mark(function wr(){return l.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=ln,or.next=3,ar({type:"competitions/ChartRules",payload:{identifier:Mt}});case 3:return or.t1=or.sent,or.next=6,(0,or.t0)(or.t1);case 6:case"end":return or.stop()}},wr)})),wa.apply(this,arguments)}function sa(wr){return la.apply(this,arguments)}function la(){return la=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Charts",payload:{identifier:Mt,stage_id:Sr}});case 2:or=hr.sent,Ir(or);case 4:case"end":return hr.stop()}},wr)})),la.apply(this,arguments)}function La(wr){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return un(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(M.a)({identifier:Mt,stage_id:Sr==null?void 0:Sr.id},Sr)});case 3:or=hr.sent,Ir(or),un(!1);case 6:case"end":return hr.stop()}},wr)})),Ta.apply(this,arguments)}function ka(wr){return Ha.apply(this,arguments)}function Ha(){return Ha=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return un(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(M.a)({identifier:Mt,stage_id:Sr==null?void 0:Sr.id,module_type:"entrance"},Sr)});case 3:or=hr.sent,Ir(or),un(!1);case 6:case"end":return hr.stop()}},wr)})),Ha.apply(this,arguments)}function Xa(wr){return Pa.apply(this,arguments)}function Pa(){return Pa=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Results",payload:{identifier:Mt,stage_id:Sr}});case 2:if(or=hr.sent,!(localStorage.getItem("issee")==="1")){hr.next=5;break}return hr.abrupt("return");case 5:Ir(or);case 6:case"end":return hr.stop()}},wr)})),Pa.apply(this,arguments)}function ua(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(n.a)(l.a.mark(function wr(){return l.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=kr,or.next=3,ar({type:"competitions/TabResults",payload:{identifier:Mt,competition_module_id:je}});case 3:or.t1=or.sent,(0,or.t0)(or.t1);case 5:case"end":return or.stop()}},wr)})),Sa.apply(this,arguments)}function ba(){return ca.apply(this,arguments)}function ca(){return ca=Object(n.a)(l.a.mark(function wr(){var Sr,or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Prize",payload:{identifier:Mt,user_id:Zt==null||((Sr=Zt.userInfo)===null||Sr===void 0)?void 0:Sr.user_id}});case 2:or=hr.sent,Pe(or);case 4:case"end":return hr.stop()}},wr)})),ca.apply(this,arguments)}function co(){return _a.apply(this,arguments)}function _a(){return _a=Object(n.a)(l.a.mark(function wr(){var Sr,or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Accounts",payload:{id:Zt==null||((Sr=Zt.userInfo)===null||Sr===void 0)?void 0:Sr.user_id}});case 2:or=hr.sent,_e(or);case 4:case"end":return hr.stop()}},wr)})),_a.apply(this,arguments)}function Ca(wr){return da.apply(this,arguments)}function da(){return da=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(zn){hr.next=2;break}return hr.abrupt("return");case 2:if(ai(!1),!fa()){hr.next=5;break}return hr.abrupt("return");case 5:return hr.next=7,ar({type:"competitions/AddTeam",payload:{identifier:Mt,name:Sr}});case 7:or=hr.sent,or&&or.status===0?(a.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),Dn(),gi(!1)):ai(!0);case 9:case"end":return hr.stop()}},wr)})),da.apply(this,arguments)}function fa(){var wr,Sr;if(Zt!=null&&(wr=Zt.userInfo)!==null&&wr!==void 0&&wr.is_teacher){var or;if(_t!=null&&(or=_t.teacher_staff)!==null&&or!==void 0&&or.mutiple_limited&&(_t!=null&&_t.enrolled))return a.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ai(!0),!0}else{var wn;if(_t!=null&&(wn=_t.member_staff)!==null&&wn!==void 0&&wn.mutiple_limited&&(_t!=null&&_t.enrolled))return a.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ai(!0),!0}if(_t!=null&&_t.enroll_ended)return a.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ai(!0),!0;if(Zt!=null&&(Sr=Zt.userInfo)!==null&&Sr!==void 0&&Sr.is_teacher){if(!_t.teacher_staff)return a.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ai(!0),!0}else if(!(_t!=null&&_t.member_staff))return a.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ai(!0),!0}function Yi(wr){return na.apply(this,arguments)}function na(){return na=Object(n.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(zn){hr.next=2;break}return hr.abrupt("return");case 2:if(!fa()){hr.next=4;break}return hr.abrupt("return");case 4:return ai(!1),hr.next=7,ar({type:"competitions/JoinTeam",payload:{identifier:Mt,invite_code:Sr}});case 7:or=hr.sent,or&&or.status===0?(a.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),Fn(!1),ai(!0),Dn()):ai(!0);case 9:case"end":return hr.stop()}},wr)})),na.apply(this,arguments)}return r.a.createElement("div",{className:"edu-container minH500"},r.a.createElement(i.a,{className:"mt10",separator:">"},r.a.createElement(i.a.Item,null,r.a.createElement(b.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),r.a.createElement(i.a.Item,null,lt.name,lt.sub_title?"-"+lt.sub_title:null)),r.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},r.a.createElement(t.a,{spinning:ur.effects["competitions/getHeader"]},r.a.createElement("div",{style:{height:"355px",width:"800px"}},(lt==null?void 0:lt.avatar_url)&&(lt==null?void 0:lt.avatar_url)!==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:K.a.IMG_SERVER+"/"+(lt==null?void 0:lt.avatar_url)}),!(lt!=null&&lt.avatar_url)&&(lt==null?void 0:lt.avatar_url)==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:K.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),r.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},r.a.createElement("p",{className:"".concat(O.a.titlesize)},lt.name,lt.sub_title?"-"+lt.sub_title:null),r.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u5956\u91D1"),lt!=null&&lt.bonus?r.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(lt&&lt.bonus).toLocaleString()):r.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u6D4F\u89C8"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(lt&&lt.visits_count).toLocaleString())),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u62A5\u540D"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(lt&&lt.member_count).toLocaleString()))),r.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},r.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),lt.start_time,"~",lt.end_time),r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),lt.enroll_end_time),lt.competition_status==="ended"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,lt.competition_status==="nearly_published"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,lt.competition_status==="progressing"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,r.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(lt==null?void 0:lt.mode)<=2&&_t.enrolled&&r.a.createElement(T.a,{onClick:function(Sr){if((lt==null?void 0:lt.mode)===1){var or;Ui((or=lt.competition_modules)===null||or===void 0?void 0:or.find(function(wn){return wn.module_type==="entrance"}))}else In(Sr,lt,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(lt==null?void 0:lt.mode)===2||(lt==null?void 0:lt.mode)===1&&((mt=lt.competition_modules)===null||mt===void 0||((wt=mt.filter(function(wr){return wr.module_type==="entrance"}))===null||wt===void 0)?void 0:wt.length)>0?"":"none"},className:O.a.buttonsize},(lt==null?void 0:lt.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(lt==null?void 0:lt.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),lt.competition_status==="ended"?r.a.createElement(T.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,lt.competition_status==="nearly_published"?r.a.createElement(T.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,lt.competition_status!=="nearly_published"&&lt.enroll_end&&lt.competition_status!=="ended"?r.a.createElement(T.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,lt.competition_status==="progressing"&&lt.enroll_end!=!0?r.a.createElement(T.a,{type:"primary",disabled:_t.enrolled&&!lt.need_attachment,className:O.a.buttonsize,onClick:function(Sr){if(_t.enrolled&&lt.need_attachment){var or;(or=ra.current)===null||or===void 0||or.handleVisible();return}In(Sr,lt,lt.mode===2?"ismodel":lt.personal?"personal":"/competitions/index/".concat(lt.identifier,"/enroll"))}},_t.enrolled?lt.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":lt!=null&&lt.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Zt.userInfo.real_name!="\u6E38\u5BA2"&&!(lt!=null&&lt.enroll_url)&&r.a.createElement("span",{onClick:function(Sr){return In(Sr,lt,lt.mode===2?"ismodel":lt.personal?"personal":"/competitions/index/".concat(lt.identifier,"/enroll"))},className:O.a.myteam},Object(Pr.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),r.a.createElement("div",{className:O.a.bootmdetail},r.a.createElement("div",{className:O.a.flex1},r.a.createElement(m.a,{selectedKeys:["".concat(je)]},lt&&lt.competition_modules&&lt.competition_modules.map(function(wr,Sr){if(wr.module_type!="enroll")return r.a.createElement(m.a.Item,{className:O.a.menuItem,onClick:function(){if(wr!=null&&wr.is_authentication){if(!Object(ue.e)(ar))return;a.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Ui(wr)},key:wr.id},wr.name)}))),r.a.createElement("div",{className:O.a.flex6,style:{padding:(Nr||Tr)&&0}},Fr?r.a.createElement(kt,{dispatch:ar,userid:Zt==null||((Lt=Zt.userInfo)===null||Lt===void 0)?void 0:Lt.user_id,Prize:Qn,Accounts:Ue,getAccounts:co}):null,yt?r.a.createElement(ke,{HeaderDetail:lt,userinfo:Zt.userInfo,Editable:lt==null||((It=lt.permission)===null||It===void 0)?void 0:It.editable,getCharts:sa,getChartRules:Ba,Selectkey:je,ChartRules:an,ItemData:er}):null,at?r.a.createElement(te,{ref:ra,StaffDetail:_t,HeaderDetail:lt,userinfo:Zt.userInfo,Editable:lt==null||((Kt=lt.permission)===null||Kt===void 0)?void 0:Kt.editable,ItemData:er,setIssee:zt,ModelType:Qt,dispatch:ar}):null,!at&&!Nr&&!Tr&&!yt&&!Fr&&!qe?r.a.createElement(q,{userinfo:Zt.userInfo,ModelType:Qt,getrightdatas:Ui,dispatch:ar,MenuItem:mr,setIssee:zt,identifier:Mt,ItemData:er}):null,qe&&r.a.createElement(Bn,{dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:lt,Editable:lt==null||((Ht=lt.permission)===null||Ht===void 0)?void 0:Ht.editable,getCharts:Xa,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),Nr&&r.a.createElement(Gi,{loading:vn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:lt,Editable:lt==null||((ht=lt.permission)===null||ht===void 0)?void 0:ht.editable,getCharts:La,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),Tr&&r.a.createElement(oa,{loading:vn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:lt,Editable:lt==null||((St=lt.permission)===null||St===void 0)?void 0:St.editable,getCharts:ka,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}))),r.a.createElement(_.a,null),r.a.createElement(G,{getResults:Xa}),r.a.createElement(C.a,{visible:qr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return zr(!1)}},r.a.createElement("div",{className:O.a.modal},r.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),r.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",r.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),r.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),r.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),r.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),r.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),r.a.createElement(T.a,{type:"primary",onClick:function(){return Object(Wt.S)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),r.a.createElement(C.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:jn,onCancel:function(){Rn(!1)},footer:!1},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},r.a.createElement(T.a,{type:"primary",style:{height:40},onClick:function(){Fn(!0),Rn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),r.a.createElement(T.a,{style:{height:40},onClick:function(){gi(!0),Rn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ci?r.a.createElement(ki.a,{isjoin:ci,setJoin:Fn,JoinTeams:Yi}):null,Xn?r.a.createElement(qn.a,{isAddmodle:Xn,setIsAdd:gi,createTeam:Ca}):null)},ha=J.default=Object(p.a)(function(xt){var rt=xt.loading,mt=xt.globalSetting,wt=xt.user;return{globalSetting:mt,loading:rt,user:wt}})(ji)},GRuw:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("lPiR"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.WordArray,m=g.algo,v=m.SHA256,T=m.SHA224=v.extend({_doReset:function(){this._hash=new N.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var y=v._doFinalize.call(this);return y.sigBytes-=4,y}});g.SHA224=v._createHelper(T),g.HmacSHA224=v._createHmacHelper(T)}(),M.SHA224})},GfqC:function(H,J,D){"use strict";var M=D("q1tI"),g=D.n(M),C=D("TSYQ"),N=D.n(C);function m(B,U){var R="cannot "+B.method+" "+B.action+" "+U.status+"'",K=new Error(R);return K.status=U.status,K.method=B.method,K.url=B.action,K}function v(B){var U=B.responseText||B.response;if(!U)return U;try{return JSON.parse(U)}catch(R){return U}}function T(B){var U=new XMLHttpRequest;B.onProgress&&U.upload&&(U.upload.onprogress=function(ue){ue.total>0&&(ue.percent=ue.loaded/ue.total*100),B.onProgress(ue)});var R=new FormData;B.data&&Object.keys(B.data).forEach(function(Z){var ue=B.data[Z];if(Array.isArray(ue)){ue.forEach(function(de){R.append(Z+"[]",de)});return}R.append(Z,B.data[Z])}),B.file instanceof Blob?R.append(B.filename,B.file,B.file.name):R.append(B.filename,B.file),U.onerror=function(ue){B.onError(ue)},U.onload=function(){return U.status<200||U.status>=300?B.onError(m(B,U),v(U)):B.onSuccess(v(U),U)},U.open(B.method,B.action,!0),B.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var K=B.headers||{};return K["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(K).forEach(function(Z){K[Z]!==null&&U.setRequestHeader(Z,K[Z])}),U.send(R),{abort:function(){U.abort()}}}var y=+new Date,t=0;function h(){return"rc-upload-"+y+"-"+ ++t}function i(B,U){return B.indexOf(U,B.length-U.length)!==-1}var c=function(B,U){if(B&&U){var R=Array.isArray(U)?U:U.split(","),K=B.name||"",Z=B.type||"",ue=Z.replace(/\/.*$/,"");return R.some(function(de){var Ce=de.trim();return Ce.charAt(0)==="."?i(K.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?ue===Ce.replace(/\/.*$/,""):Z===Ce})}return!0};function a(B,U){var R=B.createReader(),K=[];function Z(){R.readEntries(function(ue){var de=Array.prototype.slice.apply(ue);K=K.concat(de);var Ce=!de.length;Ce?U(K):Z()})}Z()}var n=function(U,R,K){var Z=function ue(de,Ce){Ce=Ce||"",de.isFile?de.file(function(Re){K(Re)&&(de.fullPath&&!Re.webkitRelativePath&&(Object.defineProperties(Re,{webkitRelativePath:{writable:!0}}),Re.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(Re,{webkitRelativePath:{writable:!1}})),R([Re]))}):de.isDirectory&&a(de,function(Re){Re.forEach(function(me){ue(me,""+Ce+de.name+"/")})})};U.forEach(function(ue){Z(ue.webkitGetAsEntry())})},s=n,d=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var R=arguments[U];for(var K in R)Object.prototype.hasOwnProperty.call(R,K)&&(B[K]=R[K])}return B},f=function(){function B(U,R){var K=[],Z=!0,ue=!1,de=void 0;try{for(var Ce=U[Symbol.iterator](),Re;!(Z=(Re=Ce.next()).done)&&!(K.push(Re.value),R&&K.length===R);Z=!0);}catch(me){ue=!0,de=me}finally{try{!Z&&Ce.return&&Ce.return()}finally{if(ue)throw de}}return K}return function(U,R){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return B(U,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function B(U,R){for(var K=0;K<R.length;K++){var Z=R[K];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(U,Z.key,Z)}}return function(U,R,K){return R&&B(U.prototype,R),K&&B(U,K),U}}();function o(B,U,R){return U in B?Object.defineProperty(B,U,{value:R,enumerable:!0,configurable:!0,writable:!0}):B[U]=R,B}function r(B,U){var R={};for(var K in B){if(U.indexOf(K)>=0)continue;if(!Object.prototype.hasOwnProperty.call(B,K))continue;R[K]=B[K]}return R}function x(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function b(B,U){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:B}function p(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(B,U):B.__proto__=U)}var I=function(U){return Object.keys(U).reduce(function(R,K){return(K.substr(0,5)==="data-"||K.substr(0,5)==="aria-"||K==="role")&&(R[K]=U[K]),R},{})},O=function(B){p(U,B);function U(){var R,K,Z,ue;x(this,U);for(var de=arguments.length,Ce=Array(de),Re=0;Re<de;Re++)Ce[Re]=arguments[Re];return ue=(K=(Z=b(this,(R=U.__proto__||Object.getPrototypeOf(U)).call.apply(R,[this].concat(Ce))),Z),Z.state={uid:h()},Z.reqs={},Z.onChange=function(me){var Oe=me.target.files;Z.uploadFiles(Oe),Z.reset()},Z.onClick=function(me){var Oe=Z.fileInput;if(!Oe)return;var be=Z.props,ce=be.children,le=be.onClick;ce&&ce.type==="button"&&(Oe.parentNode.focus(),Oe.parentNode.querySelector("button").blur()),Oe.click(),le&&le(me)},Z.onKeyDown=function(me){me.key==="Enter"&&Z.onClick()},Z.onFileDrop=function(me){var Oe=Z.props.multiple;if(me.preventDefault(),me.type==="dragover")return;if(Z.props.directory)s(Array.prototype.slice.call(me.dataTransfer.items),Z.uploadFiles,function(ce){return c(ce,Z.props.accept)});else{var be=Array.prototype.slice.call(me.dataTransfer.files).filter(function(ce){return c(ce,Z.props.accept)});Oe===!1&&(be=be.slice(0,1)),Z.uploadFiles(be)}},Z.uploadFiles=function(me){var Oe=Array.prototype.slice.call(me);Oe.map(function(be){return be.uid=h(),be}).forEach(function(be){Z.upload(be,Oe)})},Z.saveFileInput=function(me){Z.fileInput=me},K),b(Z,ue)}return l(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(K,Z){var ue=this,de=this.props;if(!de.beforeUpload)return setTimeout(function(){return ue.post(K)},0);var Ce=de.beforeUpload(K,Z);Ce&&Ce.then?Ce.then(function(Re){var me=Object.prototype.toString.call(Re);return me==="[object File]"||me==="[object Blob]"?ue.post(Re):ue.post(K)}).catch(function(Re){console.log(Re)}):Ce!==!1&&setTimeout(function(){return ue.post(K)},0);return}},{key:"post",value:function(K){var Z=this;if(!this._isMounted)return;var ue=this.props,de=ue.onStart,Ce=ue.onProgress,Re=ue.transformFile,me=Re===void 0?function(Oe){return Oe}:Re;new Promise(function(Oe){var be=ue.action;return typeof be=="function"&&(be=be(K)),Oe(be)}).then(function(Oe){var be=K.uid,ce=ue.customRequest||T,le=Promise.resolve(me(K)).then(function(ne){var ge=ue.data;return typeof ge=="function"&&(ge=ge(ne)),Promise.all([ne,ge])}).catch(function(ne){console.error(ne)});le.then(function(ne){var ge=f(ne,2),te=ge[0],re=ge[1],Se={action:Oe,filename:ue.name,data:re,file:te,headers:ue.headers,withCredentials:ue.withCredentials,method:ue.method||"post",onProgress:Ce?function(ie){Ce(ie,K)}:null,onSuccess:function(q,Y){delete Z.reqs[be],ue.onSuccess(q,K,Y)},onError:function(q,Y){delete Z.reqs[be],ue.onError(q,Y,K)}};de(K),Z.reqs[be]=ce(Se)})})}},{key:"reset",value:function(){this.setState({uid:h()})}},{key:"abort",value:function(K){var Z=this.reqs;if(K){var ue=K;K&&K.uid&&(ue=K.uid),Z[ue]&&Z[ue].abort&&Z[ue].abort(),delete Z[ue]}else Object.keys(Z).forEach(function(de){Z[de]&&Z[de].abort&&Z[de].abort(),delete Z[de]})}},{key:"render",value:function(){var K,Z=this.props,ue=Z.component,de=Z.prefixCls,Ce=Z.className,Re=Z.disabled,me=Z.id,Oe=Z.style,be=Z.multiple,ce=Z.accept,le=Z.children,ne=Z.directory,ge=Z.openFileDialogOnClick,te=Z.onMouseEnter,re=Z.onMouseLeave,Se=r(Z,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=N()((K={},o(K,de,!0),o(K,de+"-disabled",Re),o(K,Ce,Ce),K)),q=Re?{}:{onClick:ge?this.onClick:function(){},onKeyDown:ge?this.onKeyDown:function(){},onMouseEnter:te,onMouseLeave:re,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(ue,d({},q,{className:ie,role:"button",style:Oe}),g.a.createElement("input",d({},I(Se),{id:me,type:"file",ref:this.saveFileInput,onClick:function(X){return X.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ce,directory:ne?"directory":null,webkitdirectory:ne?"webkitdirectory":null,multiple:be,onChange:this.onChange})),le)}}]),U}(M.Component),_=O,E=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var R=arguments[U];for(var K in R)Object.prototype.hasOwnProperty.call(R,K)&&(B[K]=R[K])}return B},w=function(){function B(U,R){for(var K=0;K<R.length;K++){var Z=R[K];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(U,Z.key,Z)}}return function(U,R,K){return R&&B(U.prototype,R),K&&B(U,K),U}}();function S(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function F(B,U){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:B}function P(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(B,U):B.__proto__=U)}function L(){}var G=function(B){P(U,B);function U(){var R,K,Z,ue;S(this,U);for(var de=arguments.length,Ce=Array(de),Re=0;Re<de;Re++)Ce[Re]=arguments[Re];return ue=(K=(Z=F(this,(R=U.__proto__||Object.getPrototypeOf(U)).call.apply(R,[this].concat(Ce))),Z),Z.saveUploader=function(me){Z.uploader=me},K),F(Z,ue)}return w(U,[{key:"abort",value:function(K){this.uploader.abort(K)}},{key:"render",value:function(){return g.a.createElement(_,E({},this.props,{ref:this.saveUploader}))}}]),U}(M.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:L,onError:L,onSuccess:L,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var z=G,A=J.a=z},HmJG:function(H,J,D){},IBYe:function(H,J,D){"use strict";function M(g){return null}J.a=M},Ib8C:function(H,J,D){(function(M){(function(g,C){H.exports=J=C()})(this,function(){var g=g||function(C,N){var m;if(typeof window!="undefined"&&window.crypto&&(m=window.crypto),typeof self!="undefined"&&self.crypto&&(m=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(m=globalThis.crypto),!m&&typeof window!="undefined"&&window.msCrypto&&(m=window.msCrypto),!m&&typeof M!="undefined"&&M.crypto&&(m=M.crypto),!m&&!0)try{m=D(4)}catch(o){}var v=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch(o){}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch(o){}}throw new Error("Native crypto module could not be used to get secure random number.")},T=Object.create||function(){function o(){}return function(r){var x;return o.prototype=r,x=new o,o.prototype=null,x}}(),y={},t=y.lib={},h=t.Base=function(){return{extend:function(o){var r=T(this);return o&&r.mixIn(o),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var r in o)o.hasOwnProperty(r)&&(this[r]=o[r]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),i=t.WordArray=h.extend({init:function(o,r){o=this.words=o||[],r!=N?this.sigBytes=r:this.sigBytes=o.length*4},toString:function(o){return(o||a).stringify(this)},concat:function(o){var r=this.words,x=o.words,b=this.sigBytes,p=o.sigBytes;if(this.clamp(),b%4)for(var I=0;I<p;I++){var O=x[I>>>2]>>>24-I%4*8&255;r[b+I>>>2]|=O<<24-(b+I)%4*8}else for(var _=0;_<p;_+=4)r[b+_>>>2]=x[_>>>2];return this.sigBytes+=p,this},clamp:function(){var o=this.words,r=this.sigBytes;o[r>>>2]&=4294967295<<32-r%4*8,o.length=C.ceil(r/4)},clone:function(){var o=h.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var r=[],x=0;x<o;x+=4)r.push(v());return new i.init(r,o)}}),c=y.enc={},a=c.Hex={stringify:function(o){for(var r=o.words,x=o.sigBytes,b=[],p=0;p<x;p++){var I=r[p>>>2]>>>24-p%4*8&255;b.push((I>>>4).toString(16)),b.push((I&15).toString(16))}return b.join("")},parse:function(o){for(var r=o.length,x=[],b=0;b<r;b+=2)x[b>>>3]|=parseInt(o.substr(b,2),16)<<24-b%8*4;return new i.init(x,r/2)}},n=c.Latin1={stringify:function(o){for(var r=o.words,x=o.sigBytes,b=[],p=0;p<x;p++){var I=r[p>>>2]>>>24-p%4*8&255;b.push(String.fromCharCode(I))}return b.join("")},parse:function(o){for(var r=o.length,x=[],b=0;b<r;b++)x[b>>>2]|=(o.charCodeAt(b)&255)<<24-b%4*8;return new i.init(x,r)}},s=c.Utf8={stringify:function(o){try{return decodeURIComponent(escape(n.stringify(o)))}catch(r){throw new Error("Malformed UTF-8 data")}},parse:function(o){return n.parse(unescape(encodeURIComponent(o)))}},d=t.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=s.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var r,x=this._data,b=x.words,p=x.sigBytes,I=this.blockSize,O=I*4,_=p/O;o?_=C.ceil(_):_=C.max((_|0)-this._minBufferSize,0);var E=_*I,w=C.min(E*4,p);if(E){for(var S=0;S<E;S+=I)this._doProcessBlock(b,S);r=b.splice(0,E),x.sigBytes-=w}return new i.init(r,w)},clone:function(){var o=h.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0}),f=t.Hasher=d.extend({cfg:h.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var r=this._doFinalize();return r},blockSize:512/32,_createHelper:function(o){return function(r,x){return new o.init(x).finalize(r)}},_createHmacHelper:function(o){return function(r,x){return new l.HMAC.init(o,x).finalize(r)}}}),l=y.algo={};return y}(Math);return g})}).call(this,D("IyRk"))},JYp7:function(H,J,D){"use strict";D.d(J,"a",function(){return M});var M;(function(g){function C(r){return r&&typeof r=="object"&&typeof r[Symbol.iterator]=="function"}g.is=C;const N=Object.freeze([]);function m(){return N}g.empty=m;function*v(r){yield r}g.single=v;function T(r){return r||N}g.from=T;function y(r){return!r||r[Symbol.iterator]().next().done===!0}g.isEmpty=y;function t(r){return r[Symbol.iterator]().next().value}g.first=t;function h(r,x){for(const b of r)if(x(b))return!0;return!1}g.some=h;function i(r,x){for(const b of r)if(x(b))return b;return}g.find=i;function*c(r,x){for(const b of r)x(b)&&(yield b)}g.filter=c;function*a(r,x){let b=0;for(const p of r)yield x(p,b++)}g.map=a;function*n(...r){for(const x of r)for(const b of x)yield b}g.concat=n;function*s(r){for(const x of r)for(const b of x)yield b}g.concatNested=s;function d(r,x,b){let p=b;for(const I of r)p=x(p,I);return p}g.reduce=d;function*f(r,x,b=r.length){for(x<0&&(x+=r.length),b<0?b+=r.length:b>r.length&&(b=r.length);x<b;x++)yield r[x]}g.slice=f;function l(r,x=Number.POSITIVE_INFINITY){const b=[];if(x===0)return[b,r];const p=r[Symbol.iterator]();for(let I=0;I<x;I++){const O=p.next();if(O.done)return[b,g.empty()];b.push(O.value)}return[b,{[Symbol.iterator](){return p}}]}g.consume=l;function o(r,x,b=(p,I)=>p===I){const p=r[Symbol.iterator](),I=x[Symbol.iterator]();for(;;){const O=p.next(),_=I.next();if(O.done!==_.done)return!1;if(O.done)return!0;if(!b(O.value,_.value))return!1}}g.equals=o})(M||(M={}))},K3mO:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.Base,m=C.WordArray,v=g.algo,T=v.MD5,y=v.EvpKDF=N.extend({cfg:N.extend({keySize:128/32,hasher:T,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,h){for(var i,c=this.cfg,a=c.hasher.create(),n=m.create(),s=n.words,d=c.keySize,f=c.iterations;s.length<d;){i&&a.update(i),i=a.update(t).finalize(h),a.reset();for(var l=1;l<f;l++)i=a.finalize(i),a.reset();n.concat(i)}return n.sigBytes=d*4,n}});g.EvpKDF=function(t,h,i){return y.create(i).compute(t,h)}}(),M.EvpKDF})},KXlV:function(H,J,D){H.exports=D.p+"static/job.65c6034f.png"},KeDT:function(H,J,D){H.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:function(H,J,D){"use strict";D.d(J,"a",function(){return p}),D.d(J,"c",function(){return _});var M=D("0Owb"),g=D("miYZ"),C=D("tsqr"),N=D("oBTY"),m=D("tJVT"),v=D("PpiC"),T=D("k1fw"),y=D("9og8"),t=D("DZo9"),h=D("8z0m"),i=D("WmNS"),c=D.n(i),a=D("q1tI"),n=D.n(a),s=D("ErOA"),d=D("NFKh"),f=D.n(d),l=D("7Cbv"),o=D("9kvl"),r=D("mxV5"),x=D.n(r),b=h.a.Dragger,p=function(S){var F="bf3c199c2470cb477d907b1e0917c17b",P="5183666c72eec9e4",L=f.a.enc.Utf8.parse(F),G=f.a.enc.Utf8.parse(P),z=f.a.AES.decrypt(S,L,{iv:G,mode:f.a.mode.CBC});return z.toString(f.a.enc.Utf8)},I,O=function(){var w=Object(y.a)(c.a.mark(function S(F){var P,L,G,z,A,B,U,R,K,Z,ue;return c.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return U=F.identifier,R=F.oldFilename,K=F.newFilename,Ce.next=3,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return Z=Ce.sent,Z.data=JSON.parse(p(Z.data)),ue=new x.a({endpoint:Z==null||((P=Z.data)===null||P===void 0)?void 0:P.end_point,region:Z==null||((L=Z.data)===null||L===void 0)?void 0:L.region,accessKeyId:Z==null||((G=Z.data)===null||G===void 0)?void 0:G.access_key_id,accessKeySecret:Z==null||((z=Z.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:Z==null||((A=Z.data)===null||A===void 0)?void 0:A.bucket,stsToken:Z==null||((B=Z.data)===null||B===void 0)?void 0:B.security_token}),Ce.abrupt("return",new Promise(function(Re,me){console.log(11111,"".concat(U,"/").concat(R),"".concat(U,"/").concat(K),Z.data),ue.copy("/".concat(U,"/").concat(R),"/".concat(U,"/").concat(K)).then(function(Oe){console.log("\u62F7\u8D1D\u6210\u529F",Oe)}).catch(function(Oe){console.log(Oe)})}));case 7:case"end":return Ce.stop()}},S)}));return function(F){return w.apply(this,arguments)}}(),_=function(){var w=Object(y.a)(c.a.mark(function S(F,P,L){var G,z,A,B,U,R,K,Z,ue,de;return c.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return P.file_name=F.name,Re.next=3,Object(s.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return K=Re.sent,console.log("decrypt(res.data):",p(K.data)),K.data=JSON.parse(p(K.data)),Z=F.name.split("."),Z.pop(),ue=P.realFileName?Z:Object(l.a)(),de=new x.a({endpoint:K==null||((G=K.data)===null||G===void 0)?void 0:G.end_point,region:K==null||((z=K.data)===null||z===void 0)?void 0:z.region,accessKeyId:K==null||((A=K.data)===null||A===void 0)?void 0:A.access_key_id,accessKeySecret:K==null||((B=K.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:K==null||((U=K.data)===null||U===void 0)?void 0:U.bucket,stsToken:K==null||((R=K.data)===null||R===void 0)?void 0:R.security_token}),Re.abrupt("return",new Promise(function(me,Oe){var be;de.multipartUpload("".concat(ue),new Blob([F],{type:F.type}),Object(T.a)(Object(T.a)({timeout:200*1e3,partSize:102400},L),{},{callback:{url:K==null||((be=K.data)===null||be===void 0)?void 0:be.callback_url,host:K==null?void 0:K.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(P)}})).then(function(ce){var le;F.response=(le=ce.data)===null||le===void 0?void 0:le.data,me(ce==null?void 0:ce.data)}).catch(function(ce){Oe(ce),console.log("err:",ce)})}));case 11:case"end":return Re.stop()}},S)}));return function(F,P,L){return w.apply(this,arguments)}}(),E=function(S){var F=S.user,P=S.cancelUpload,L=Object(v.a)(S,["user","cancelUpload"]),G=Object(a.useState)([]),z=Object(m.a)(G,2),A=z[0],B=z[1],U=Object(a.useState)(),R=Object(m.a)(U,2),K=R[0],Z=R[1],ue={onRemove:function(Re){B(Object(N.a)(A.filter(function(me){return me.name!==Re.name}))),L.onChange(A.filter(function(me){return me.name!==Re.name}))},disabled:L.disabled,multiple:!0,fileList:A==null?void 0:A.map(function(Ce){return Ce.file}),customRequest:function(){},beforeUpload:function(){var Ce=Object(y.a)(c.a.mark(function me(Oe){var be;return c.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(be=L.maxSize||1024*1024*1024*1,!A.filter(function(ne){return ne.name===Oe.name}).length){le.next=4;break}return C.b.info("".concat(Oe.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),le.abrupt("return");case 4:if(!((Oe==null?void 0:Oe.size)>be)){le.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(be/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),le.abrupt("return",!1);case 7:return A.push({name:Oe.name,file:Oe}),B(Object(N.a)(A)),L.onChange(A),le.abrupt("return",!1);case 11:case"end":return le.stop()}},me)}));function Re(me){return Ce.apply(this,arguments)}return Re}()},de=function(){var Ce=Object(y.a)(c.a.mark(function Re(me,Oe){var be,ce,le,ne,ge,te,re,Se,ie,q;return c.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return Oe.file_name=me.name,re=me.name,X.next=4,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Se=X.sent,Se.data=JSON.parse(p(Se.data)),!((Se==null?void 0:Se.status)!==0)){X.next=12;break}return A[A.findIndex(function(he){return he.name===re})].status="error",A[A.findIndex(function(he){return he.name===re})].file.status="error",L.onChange(A),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),X.abrupt("return");case 12:return K=new x.a({endpoint:Se==null||((be=Se.data)===null||be===void 0)?void 0:be.end_point,region:Se==null||((ce=Se.data)===null||ce===void 0)?void 0:ce.region,accessKeyId:Se==null||((le=Se.data)===null||le===void 0)?void 0:le.access_key_id,accessKeySecret:Se==null||((ne=Se.data)===null||ne===void 0)?void 0:ne.access_key_secret,bucket:Se==null||((ge=Se.data)===null||ge===void 0)?void 0:ge.bucket,stsToken:Se==null||((te=Se.data)===null||te===void 0)?void 0:te.security_token}),console.log(me,"file"),Z(K),ie=me.name.split("."),ie.pop(),q=Oe.realFileName?ie:Object(l.a)(),X.abrupt("return",new Promise(function(he,fe){try{var xe;K.multipartUpload("".concat(L.identifier,"/").concat(q).concat(re.indexOf(".")>-1?"."+re.split(".").pop():""),new Blob([me.file],{type:me.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Ze,et,st){try{console.log("\u8FDB\u5EA6",Ze,et,st);var ut=A.findIndex(function(dt){return dt.name===re});A[ut].file.percent=Ze*100,A[ut].tempCheckpoint=et,B(Object(N.a)(A))}catch(dt){}},checkpoint:A[A.findIndex(function(Ke){return Ke.name===re})].tempCheckpoint,callback:{customValue:{id:re+""},url:Se==null||((xe=Se.data)===null||xe===void 0)?void 0:xe.callback_url,host:Se==null?void 0:Se.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(Oe)}}).then(function(Ke){var Ze,et=A.findIndex(function(Ie){return Ie.name===re}),st="done";if(((Ze=Ke.data)===null||Ze===void 0?void 0:Ze.status)===0){var ut;me.response=(ut=Ke.data)===null||ut===void 0?void 0:ut.data;var dt=A.findIndex(function(Ie){return Ie.name===re});A[dt].status="done",A[dt].file.status="done"}else{var Fe;C.b.warn((Fe=Ke.data)===null||Fe===void 0?void 0:Fe.message),st="error"}A[et].status=st,A[et].file.status=st,L.onChange(A),he(Ke==null?void 0:Ke.data)}).catch(function(Ke){A[A.findIndex(function(Ze){return Ze.name===re})].status="error",A[A.findIndex(function(Ze){return Ze.name===re})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(N.a)(A)),L.onChange(A),fe(Ke),console.log("err:",Ke)})}catch(Ke){}}));case 19:case"end":return X.stop()}},Re)}));return function(me,Oe){return Ce.apply(this,arguments)}}();return Object(a.useEffect)(function(){A.every(function(Ce){return Ce==="done"||Ce==="error"})&&L.onComplete(A)},[A]),Object(a.useEffect)(function(){if(P){var Ce;(Ce=K)===null||Ce===void 0||Ce.cancel()}},[P]),Object(a.useEffect)(function(){L.uploading&&A.map(function(){var Ce=Object(y.a)(c.a.mark(function Re(me){var Oe,be;return c.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(!((!me.status||me.status==="error")&&!P)){le.next=6;break}return me.status="uploading",me.file.status="uploading",le.next=5,de(me,{login:F==null||((Oe=F.userInfo)===null||Oe===void 0)?void 0:Oe.login,container_type:L.container_type,container_id:L.container_id,description:L.description,realFileName:L.realFileName});case 5:be=le.sent;case 6:case"end":return le.stop()}},Re)}));return function(Re){return Ce.apply(this,arguments)}}())},[L.uploading]),n.a.createElement(b,Object(M.a)({},ue,{height:L.height,className:L.className}),n.a.createElement("p",{className:"ant-upload-hint"},L.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(o.a)(function(w){var S=w.loading,F=w.globalSetting,P=w.user;return{globalSetting:F,loading:S.models.competitions,user:P}})(E)},KmYQ:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.pad.ZeroPadding={pad:function(g,C){var N=C*4;g.clamp(),g.sigBytes+=N-(g.sigBytes%N||N)},unpad:function(g){for(var C=g.words,N=g.sigBytes-1,N=g.sigBytes-1;N>=0;N--)if(C[N>>>2]>>>24-N%4*8&255){g.sigBytes=N+1;break}}},M.pad.ZeroPadding})},LdHM:function(H,J,D){"use strict";D.d(J,"b",function(){return r}),D.d(J,"a",function(){return b});var M=D("1OyB"),g=D("vuIU"),C=D("Ji7U"),N=D("LK+K"),m=D("q1tI"),v=D("rePB"),T=D("Ff2n"),y=D("ODXe"),t=D("4IlW"),h=D("bX4T"),i=D("YrtM"),c=D("TSYQ"),a=D.n(c),n=D("+nKL"),s=D("8OUc"),d=function(K,Z){var ue=K.prefixCls,de=K.id,Ce=K.flattenOptions,Re=K.childrenAsData,me=K.values,Oe=K.searchValue,be=K.multiple,ce=K.defaultActiveFirstOption,le=K.height,ne=K.itemHeight,ge=K.notFoundContent,te=K.open,re=K.menuItemSelectedIcon,Se=K.virtual,ie=K.onSelect,q=K.onToggleOpen,Y=K.onActiveValue,X=K.onScroll,he=K.onMouseEnter,fe="".concat(ue,"-item"),xe=Object(i.a)(function(){return Ce},[te,Ce],function(tt,Be){return Be[0]&&tt[1]!==Be[1]}),Ke=m.useRef(null),Ze=function(Be){Be.preventDefault()},et=function(Be){Ke.current&&Ke.current.scrollTo({index:Be})},st=function(Be){for(var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ne=xe.length,Ee=0;Ee<Ne;Ee+=1){var Ae=(Be+Ee*ke+Ne)%Ne,Le=xe[Ae],Me=Le.group,He=Le.data;if(!Me&&!He.disabled)return Ae}return-1},ut=m.useState(function(){return st(0)}),dt=Object(y.a)(ut,2),Fe=dt[0],Ie=dt[1],ot=function(Be){Ie(Be);var ke=xe[Be];if(!ke){Y(null,-1);return}Y(ke.data.value,Be)};m.useEffect(function(){ot(ce!==!1?st(0):-1)},[xe.length,Oe]),m.useEffect(function(){var tt=setTimeout(function(){if(!be&&te&&me.size===1){var Be=Array.from(me)[0],ke=xe.findIndex(function(Ne){var Ee=Ne.data;return Ee.value===Be});ot(ke),et(ke)}});return function(){return clearTimeout(tt)}},[te]);var ft=function(Be){Be!==void 0&&ie(Be,{selected:!me.has(Be)}),be||q(!1)};if(m.useImperativeHandle(Z,function(){return{onKeyDown:function(Be){var ke=Be.which;switch(ke){case t.a.UP:case t.a.DOWN:{var Ne=0;if(ke===t.a.UP?Ne=-1:ke===t.a.DOWN&&(Ne=1),Ne!==0){var Ee=st(Fe+Ne,Ne);et(Ee),ot(Ee)}break}case t.a.ENTER:{var Ae=xe[Fe];Ae&&!Ae.data.disabled?ft(Ae.data.value):ft(void 0),te&&Be.preventDefault();break}case t.a.ESC:q(!1)}},onKeyUp:function(){},scrollTo:function(Be){et(Be)}}}),xe.length===0)return m.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(fe,"-empty"),onMouseDown:Ze},ge);function Qe(tt){var Be=xe[tt];if(!Be)return null;var ke=Be.data||{},Ne=ke.value,Ee=ke.label,Ae=ke.children,Le=Object(h.a)(ke,!0),Me=Re?Ae:Ee;return Be?m.createElement("div",Object.assign({"aria-label":typeof Me=="string"?Me:null},Le,{key:tt,role:"option",id:"".concat(de,"_list_").concat(tt),"aria-selected":me.has(Ne)}),Ne):null}return m.createElement(m.Fragment,null,m.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},Qe(Fe-1),Qe(Fe),Qe(Fe+1)),m.createElement(n.a,{itemKey:"key",ref:Ke,data:xe,height:le,itemHeight:ne,fullHeight:!1,onMouseDown:Ze,onScroll:X,virtual:Se,onMouseEnter:he},function(tt,Be){var ke,Ne=tt.group,Ee=tt.groupOption,Ae=tt.data,Le=Ae.label,Me=Ae.key;if(Ne)return m.createElement("div",{className:a()(fe,"".concat(fe,"-group"))},Le!==void 0?Le:Me);var He=Ae.disabled,nt=Ae.value,vt=Ae.title,bt=Ae.children,Wt=Ae.style,Bt=Ae.className,lr=Object(T.a)(Ae,["disabled","value","title","children","style","className"]),dr=me.has(nt),Ot="".concat(fe,"-option"),Vr=a()(fe,Ot,Bt,(ke={},Object(v.a)(ke,"".concat(Ot,"-grouped"),Ee),Object(v.a)(ke,"".concat(Ot,"-active"),Fe===Be&&!He),Object(v.a)(ke,"".concat(Ot,"-disabled"),He),Object(v.a)(ke,"".concat(Ot,"-selected"),dr),ke)),Wr=Re?bt:Le,Yr=!re||typeof re=="function"||dr;return m.createElement("div",Object.assign({},lr,{"aria-selected":dr,className:Vr,title:vt,onMouseMove:function(){if(Fe===Be||He)return;ot(Be)},onClick:function(){He||ft(nt)},style:Wt}),m.createElement("div",{className:"".concat(Ot,"-content")},Wr||nt),m.isValidElement(re)||dr,Yr&&m.createElement(s.a,{className:"".concat(fe,"-option-state"),customizeIcon:re,customizeIconProps:{isSelected:dr}},dr?"\u2713":null))}))},f=m.forwardRef(d);f.displayName="OptionList";var l=f,o=function(){return null};o.isSelectOption=!0;var r=o,x=function(){return null};x.isSelectOptGroup=!0;var b=x,p=D("VTBJ"),I=D("Zm9Q");function O(R){var K=R.key,Z=R.props,ue=Z.children,de=Z.value,Ce=Object(T.a)(Z,["children","value"]);return Object(p.a)({key:K,value:de!==void 0?de:K,children:ue},Ce)}function _(R){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(I.a)(R).map(function(Z,ue){if(!m.isValidElement(Z)||!Z.type)return null;var de=Z.type.isSelectOptGroup,Ce=Z.key,Re=Z.props,me=Re.children,Oe=Object(T.a)(Re,["children"]);return K||!de?O(Z):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?ue:Ce,"__"),label:Ce},Oe),{},{options:_(me)})}).filter(function(Z){return Z})}var E=D("2Qr1"),w=D("qNPg"),S=D("U8pU"),F=D("Kwbf"),P=D("WKfj");function L(R){var K=R.mode,Z=R.options,ue=R.children,de=R.backfill,Ce=R.allowClear,Re=R.placeholder,me=R.getInputElement,Oe=R.showSearch,be=R.onSearch,ce=R.defaultOpen,le=R.autoFocus,ne=R.labelInValue,ge=R.value,te=R.inputValue,re=R.optionLabelProp,Se=K==="multiple"||K==="tags",ie=Oe!==void 0?Oe:Se||K==="combobox",q=Z||_(ue);if(Object(F.a)(K!=="tags"||q.every(function(fe){return!fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),K==="tags"||K==="combobox"){var Y=q.some(function(fe){return fe.options?fe.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in fe?fe.value:fe.key)=="number"});Object(F.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(K!=="combobox"||!re,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(K==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(F.a)(K==="combobox"||!me,"`getInputElement` only work with `combobox` mode."),Object(F.b)(K!=="combobox"||!me||!Ce||!Re,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!ie&&K!=="combobox"&&K!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!ce||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ge!=null){var X=Object(P.d)(ge);Object(F.a)(!ne||X.every(function(fe){return Object(S.a)(fe)==="object"&&("key"in fe||"value"in fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!Se||Array.isArray(ge),"`value` should be array when `mode` is `multiple` or `tags`")}if(ue){var he=null;Object(I.a)(ue).some(function(fe){if(!m.isValidElement(fe)||!fe.type)return!1;var xe=fe.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Ke=Object(I.a)(fe.props.children).every(function(Ze){return!m.isValidElement(Ze)||!fe.type||Ze.type.isSelectOption?!0:(he=Ze.type,!1)});return!Ke}return he=xe,!0}),he&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(he.displayName||he.name||he,"`.")),Object(F.a)(te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=L,z=Object(w.a)({prefixCls:"rc-select",components:{optionList:l},convertChildrenToData:_,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:G,fillOptionsWithMissingValue:E.a}),A=function(R){Object(C.a)(Z,R);var K=Object(N.a)(Z);function Z(){var ue;return Object(M.a)(this,Z),ue=K.apply(this,arguments),ue.selectRef=m.createRef(),ue.focus=function(){ue.selectRef.current.focus()},ue.blur=function(){ue.selectRef.current.blur()},ue}return Object(g.a)(Z,[{key:"render",value:function(){return m.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),Z}(m.Component);A.Option=r,A.OptGroup=b;var B=A,U=J.c=B},M8RZ:function(H,J,D){"use strict";D.d(J,"a",function(){return t});var M=D("fWQN"),g=D("mtLc"),C=D("yKVA"),N=D("879j"),m=D("q1tI"),v=D.n(m),T=D("i8i4"),y=D.n(T),t=function(h){Object(C.a)(c,h);var i=Object(N.a)(c);function c(a){var n;Object(M.a)(this,c),n=i.call(this,a);var s=window.document;return n.node=s.createElement("div"),s.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}(v.a.Component)},MI8n:function(H,J,D){"use strict";D.d(J,"c",function(){return m}),D.d(J,"b",function(){return t}),D.d(J,"e",function(){return h}),D.d(J,"a",function(){return i}),D.d(J,"d",function(){return c}),D.d(J,"f",function(){return a});var M=D("/cxE"),g=D("pmY6"),C=D("24hK"),N=D("5Y4S"),m;(function(n){n.None=()=>g.a.None;function s(L){return(G,z=null,A)=>{let B=!1,U;return U=L(R=>B?void 0:(U?U.dispose():B=!0,G.call(z,R)),null,A),B&&U.dispose(),U}}n.once=s;function d(L,G){return b((z,A=null,B)=>L(U=>z.call(A,G(U)),null,B))}n.map=d;function f(L,G){return b((z,A=null,B)=>L(U=>{G(U),z.call(A,U)},null,B))}n.forEach=f;function l(L,G){return b((z,A=null,B)=>L(U=>G(U)&&z.call(A,U),null,B))}n.filter=l;function o(L){return L}n.signal=o;function r(...L){return(G,z=null,A)=>Object(g.e)(...L.map(B=>B(U=>G.call(z,U),null,A)))}n.any=r;function x(L,G,z){let A=z;return d(L,B=>(A=G(A,B),A))}n.reduce=x;function b(L){let G;const z=new t({onFirstListenerAdd(){G=L(z.fire,z)},onLastListenerRemove(){G.dispose()}});return z.event}function p(L,G,z=100,A=!1,B){let U,R,K,Z=0;const ue=new t({leakWarningThreshold:B,onFirstListenerAdd(){U=L(de=>{Z++,R=G(R,de),A&&!K&&(ue.fire(R),R=void 0),clearTimeout(K),K=setTimeout(()=>{const Ce=R;R=void 0,K=void 0,(!A||Z>1)&&ue.fire(Ce),Z=0},z)})},onLastListenerRemove(){U.dispose()}});return ue.event}n.debounce=p;function I(L,G=(z,A)=>z===A){let z=!0,A;return l(L,B=>{const U=z||!G(B,A);return z=!1,A=B,U})}n.latch=I;function O(L,G){return[n.filter(L,G),n.filter(L,z=>!G(z))]}n.split=O;function _(L,G=!1,z=[]){let A=z.slice(),B=L(K=>{A?A.push(K):R.fire(K)});const U=()=>{A&&A.forEach(K=>R.fire(K)),A=null},R=new t({onFirstListenerAdd(){B||(B=L(K=>R.fire(K)))},onFirstListenerDidAdd(){A&&(G?setTimeout(U):U())},onLastListenerRemove(){B&&B.dispose(),B=null}});return R.event}n.buffer=_;class E{constructor(L){this.event=L}map(L){return new E(d(this.event,L))}forEach(L){return new E(f(this.event,L))}filter(L){return new E(l(this.event,L))}reduce(L,G){return new E(x(this.event,L,G))}latch(){return new E(I(this.event))}debounce(L,G=100,z=!1,A){return new E(p(this.event,L,G,z,A))}on(L,G,z){return this.event(L,G,z)}once(L,G,z){return s(this.event)(L,G,z)}}function w(L){return new E(L)}n.chain=w;function S(L,G,z=A=>A){const A=(...K)=>R.fire(z(...K)),B=()=>L.on(G,A),U=()=>L.removeListener(G,A),R=new t({onFirstListenerAdd:B,onLastListenerRemove:U});return R.event}n.fromNodeEventEmitter=S;function F(L,G,z=A=>A){const A=(...K)=>R.fire(z(...K)),B=()=>L.addEventListener(G,A),U=()=>L.removeEventListener(G,A),R=new t({onFirstListenerAdd:B,onLastListenerRemove:U});return R.event}n.fromDOMEventEmitter=F;function P(L){return new Promise(G=>s(L)(G))}n.toPromise=P})(m||(m={}));class v{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${v._idPool++}`}start(n){this._stopWatch=new N.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}v._idPool=0;let T=-1;class y{constructor(n,s=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let s=T;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||n<s)return;this._stacks||(this._stacks=new Map);const d=new Error().stack.split(`
`).slice(3).join(`
`),f=this._stacks.get(d)||0;if(this._stacks.set(d,f+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let l,o=0;for(const[r,x]of this._stacks)(!l||o<x)&&(l=r,o=x);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${o}):`),console.warn(l)}return()=>{const l=this._stacks.get(d)||0;this._stacks.set(d,l-1)}}}class t{constructor(n){var s;this._disposed=!1,this._options=n,this._leakageMon=T>0?new y(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new v(this._options._profName):void 0}get event(){return this._event||(this._event=(n,s,d)=>{var f;this._listeners||(this._listeners=new C.a);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(s?[n,s]:n);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,s);const r=(f=this._leakageMon)===null||f===void 0?void 0:f.check(this._listeners.size),x=Object(g.i)(()=>{if(r&&r(),!this._disposed&&(o(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return d instanceof g.b?d.add(x):Array.isArray(d)&&d.push(x),x}),this._event}fire(n){var s,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new C.a);for(let f of this._listeners)this._deliveryQueue.push([f,n]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[f,l]=this._deliveryQueue.shift();try{typeof f=="function"?f.call(void 0,l):f[0].call(f[1],l)}catch(o){Object(M.f)(o)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var n,s,d,f,l;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(f=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||f===void 0||f.call(d),(l=this._leakageMon)===null||l===void 0||l.dispose())}}class h extends t{constructor(n){super(n);this._isPaused=0,this._eventQueue=new C.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class i extends h{constructor(n){var s;super(n);this._delay=(s=n.delay)!==null&&s!==void 0?s:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class c{constructor(){this.buffers=[]}wrapEvent(n){return(s,d,f)=>n(l=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>s.call(d,l)):s.call(d,l)},void 0,f)}bufferEvents(n){const s=[];this.buffers.push(s);const d=n();return this.buffers.pop(),s.forEach(f=>f()),d}}class a{constructor(){this.listening=!1,this.inputEvent=m.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(H,J,D){"use strict";(function(M,g){D.d(J,"b",function(){return d}),D.d(J,"i",function(){return r}),D.d(J,"f",function(){return x}),D.d(J,"d",function(){return b}),D.d(J,"g",function(){return p}),D.d(J,"h",function(){return I}),D.d(J,"c",function(){return O}),D.d(J,"k",function(){return _}),D.d(J,"j",function(){return E}),D.d(J,"a",function(){return w}),D.d(J,"e",function(){return P});var C;const N="en";let m=!1,v=!1,T=!1,y=!1,t=!1,h=!1,i=!1,c,a=N,n,s;const d=typeof self=="object"?self:typeof M=="object"?M:{};let f;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?f=d.vscode.process:typeof g!="undefined"&&(f=g);const l=typeof((C=f==null?void 0:f.versions)===null||C===void 0?void 0:C.electron)=="string"&&f.type==="renderer";if(typeof navigator=="object"&&!l)s=navigator.userAgent,m=s.indexOf("Windows")>=0,v=s.indexOf("Macintosh")>=0,i=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,T=s.indexOf("Linux")>=0,h=!0,c=navigator.language,a=c;else if(typeof f=="object"){m=f.platform==="win32",v=f.platform==="darwin",T=f.platform==="linux",y=T&&!!f.env.SNAP&&!!f.env.SNAP_REVISION,c=N,a=N;const L=f.env.VSCODE_NLS_CONFIG;if(L)try{const G=JSON.parse(L),z=G.availableLanguages["*"];c=G.locale,a=z||N,n=G._translationsConfigFile}catch(G){}t=!0}else console.error("Unable to resolve platform.");let o=0;v?o=1:m?o=3:T&&(o=2);const r=m,x=v,b=T,p=t,I=h,O=i,_=s,E=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let z=[];d.addEventListener("message",B=>{if(B.data&&B.data.vscodeSetImmediateId)for(let U=0,R=z.length;U<R;U++){const K=z[U];if(K.id===B.data.vscodeSetImmediateId){z.splice(U,1),K.callback();return}}});let A=0;return B=>{const U=++A;z.push({id:U,callback:B}),d.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(f==null?void 0:f.nextTick)=="function")return f.nextTick.bind(f);const G=Promise.resolve();return z=>G.then(z)}(),w=v||i?2:m?1:3;let S=!0,F=!1;function P(){if(!F){F=!0;const L=new Uint8Array(2);L[0]=1,L[1]=2;const G=new Uint16Array(L.buffer);S=G[0]===(2<<8)+1}return S}}).call(this,D("IyRk"),D("Q2Ig"))},MlIO:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(g){var C=M,N=C.lib,m=N.Base,v=N.WordArray,T=C.x64={},y=T.Word=m.extend({init:function(h,i){this.high=h,this.low=i}}),t=T.WordArray=m.extend({init:function(h,i){h=this.words=h||[],i!=g?this.sigBytes=i:this.sigBytes=h.length*8},toX32:function(){for(var h=this.words,i=h.length,c=[],a=0;a<i;a++){var n=h[a];c.push(n.high),c.push(n.low)}return v.create(c,this.sigBytes)},clone:function(){for(var h=m.clone.call(this),i=h.words=this.words.slice(0),c=i.length,a=0;a<c;a++)i[a]=i[a].clone();return h}})}(),M})},N0LK:function(H,J,D){"use strict";D.d(J,"C",function(){return M}),D.d(J,"v",function(){return C}),D.d(J,"s",function(){return N}),D.d(J,"t",function(){return m}),D.d(J,"U",function(){return v}),D.d(J,"J",function(){return T}),D.d(J,"O",function(){return y}),D.d(J,"p",function(){return t}),D.d(J,"T",function(){return h}),D.d(J,"q",function(){return i}),D.d(J,"N",function(){return c}),D.d(J,"M",function(){return a}),D.d(J,"Q",function(){return n}),D.d(J,"u",function(){return s}),D.d(J,"x",function(){return d}),D.d(J,"I",function(){return f}),D.d(J,"f",function(){return l}),D.d(J,"h",function(){return o}),D.d(J,"g",function(){return r}),D.d(J,"i",function(){return x}),D.d(J,"G",function(){return b}),D.d(J,"H",function(){return p}),D.d(J,"r",function(){return I}),D.d(J,"R",function(){return O}),D.d(J,"d",function(){return _}),D.d(J,"e",function(){return E}),D.d(J,"E",function(){return w}),D.d(J,"F",function(){return S}),D.d(J,"j",function(){return F}),D.d(J,"z",function(){return P}),D.d(J,"K",function(){return G}),D.d(J,"L",function(){return z}),D.d(J,"m",function(){return B}),D.d(J,"k",function(){return R}),D.d(J,"A",function(){return Z}),D.d(J,"a",function(){return ue}),D.d(J,"n",function(){return de}),D.d(J,"l",function(){return Ce}),D.d(J,"D",function(){return Re}),D.d(J,"B",function(){return me}),D.d(J,"b",function(){return Oe}),D.d(J,"S",function(){return be}),D.d(J,"o",function(){return ce}),D.d(J,"P",function(){return le}),D.d(J,"w",function(){return ne}),D.d(J,"c",function(){return ge}),D.d(J,"y",function(){return Se});function M(X){return!X||typeof X!="string"?!0:X.trim().length===0}const g=/{(\d+)}/g;function C(X,...he){return he.length===0?X:X.replace(g,function(fe,xe){const Ke=parseInt(xe,10);return isNaN(Ke)||Ke<0||Ke>=he.length?fe:he[Ke]})}function N(X){return X.replace(/[<>&]/g,function(he){switch(he){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return he}})}function m(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function v(X,he=" "){const fe=T(X,he);return y(fe,he)}function T(X,he){if(!X||!he)return X;const fe=he.length;if(fe===0||X.length===0)return X;let xe=0;for(;X.indexOf(he,xe)===xe;)xe=xe+fe;return X.substring(xe)}function y(X,he){if(!X||!he)return X;const fe=he.length,xe=X.length;if(fe===0||xe===0)return X;let Ke=xe,Ze=-1;for(;!(Ze=X.lastIndexOf(he,Ke-1),Ze===-1||Ze+fe!==Ke);){if(Ze===0)return"";Ke=Ze}return X.substring(0,Ke)}function t(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h(X){return X.replace(/\*/g,"")}function i(X,he,fe={}){if(!X)throw new Error("Cannot create regex from empty string");he||(X=m(X)),fe.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));let xe="";return fe.global&&(xe+="g"),fe.matchCase||(xe+="i"),fe.multiline&&(xe+="m"),fe.unicode&&(xe+="u"),new RegExp(X,xe)}function c(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;const he=X.exec("");return!!(he&&X.lastIndex===0)}function a(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function n(X){return X.split(/\r\n|\r|\n/)}function s(X){for(let he=0,fe=X.length;he<fe;he++){const xe=X.charCodeAt(he);if(xe!==32&&xe!==9)return he}return-1}function d(X,he=0,fe=X.length){for(let xe=he;xe<fe;xe++){const Ke=X.charCodeAt(xe);if(Ke!==32&&Ke!==9)return X.substring(he,xe)}return X.substring(he,fe)}function f(X,he=X.length-1){for(let fe=he;fe>=0;fe--){const xe=X.charCodeAt(fe);if(xe!==32&&xe!==9)return fe}return-1}function l(X,he){return X<he?-1:X>he?1:0}function o(X,he,fe=0,xe=X.length,Ke=0,Ze=he.length){for(;fe<xe&&Ke<Ze;fe++,Ke++){let ut=X.charCodeAt(fe),dt=he.charCodeAt(Ke);if(ut<dt)return-1;if(ut>dt)return 1}const et=xe-fe,st=Ze-Ke;return et<st?-1:et>st?1:0}function r(X,he){return x(X,he,0,X.length,0,he.length)}function x(X,he,fe=0,xe=X.length,Ke=0,Ze=he.length){for(;fe<xe&&Ke<Ze;fe++,Ke++){let ut=X.charCodeAt(fe),dt=he.charCodeAt(Ke);if(ut===dt)continue;if(ut>=128||dt>=128)return o(X.toLowerCase(),he.toLowerCase(),fe,xe,Ke,Ze);b(ut)&&(ut-=32),b(dt)&&(dt-=32);const Fe=ut-dt;if(Fe===0)continue;return Fe}const et=xe-fe,st=Ze-Ke;return et<st?-1:et>st?1:0}function b(X){return X>=97&&X<=122}function p(X){return X>=65&&X<=90}function I(X,he){return X.length===he.length&&x(X,he)===0}function O(X,he){const fe=he.length;return he.length>X.length?!1:x(X,he,0,fe)===0}function _(X,he){let fe,xe=Math.min(X.length,he.length);for(fe=0;fe<xe;fe++)if(X.charCodeAt(fe)!==he.charCodeAt(fe))return fe;return xe}function E(X,he){let fe,xe=Math.min(X.length,he.length);const Ke=X.length-1,Ze=he.length-1;for(fe=0;fe<xe;fe++)if(X.charCodeAt(Ke-fe)!==he.charCodeAt(Ze-fe))return fe;return xe}function w(X){return 55296<=X&&X<=56319}function S(X){return 56320<=X&&X<=57343}function F(X,he){return(X-55296<<10)+(he-56320)+65536}function P(X,he,fe){const xe=X.charCodeAt(fe);if(w(xe)&&fe+1<he){const Ke=X.charCodeAt(fe+1);if(S(Ke))return F(xe,Ke)}return xe}function L(X,he){const fe=X.charCodeAt(he-1);if(S(fe)&&he>1){const xe=X.charCodeAt(he-2);if(w(xe))return F(xe,fe)}return fe}function G(X,he){const fe=te.getInstance(),xe=he,Ke=X.length,Ze=P(X,Ke,he);he+=Ze>=65536?2:1;let et=fe.getGraphemeBreakType(Ze);for(;he<Ke;){const st=P(X,Ke,he),ut=fe.getGraphemeBreakType(st);if(ge(et,ut))break;he+=st>=65536?2:1,et=ut}return he-xe}function z(X,he){const fe=te.getInstance(),xe=he,Ke=L(X,he);he-=Ke>=65536?2:1;let Ze=fe.getGraphemeBreakType(Ke);for(;he>0;){const et=L(X,he),st=fe.getGraphemeBreakType(et);if(ge(st,Ze))break;he-=et>=65536?2:1,Ze=st}return xe-he}const A=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function B(X){return A.test(X)}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 R(X){return U.test(X)}const K=/^[\t\n\r\x20-\x7E]*$/;function Z(X){return K.test(X)}const ue=/[\u2028\u2029]/;function de(X){return ue.test(X)}function Ce(X){for(let he=0,fe=X.length;he<fe;he++)if(Re(X.charCodeAt(he)))return!0;return!1}function Re(X){return X=+X,X>=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function me(X){return X>=127462&&X<=127487||X===8986||X===8987||X===9200||X===9203||X>=9728&&X<=10175||X===11088||X===11093||X>=127744&&X<=128591||X>=128640&&X<=128764||X>=128992&&X<=129003||X>=129280&&X<=129535||X>=129648&&X<=129750}const Oe=String.fromCharCode(65279);function be(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function ce(X,he=!1){return X?(he&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function le(X){const he=90-65+1;return X=X%(2*he),X<he?String.fromCharCode(97+X):String.fromCharCode(65+X-he)}function ne(X){const he=te.getInstance();return he.getGraphemeBreakType(X)}function ge(X,he){return X===0?he!==5&&he!==7:X===2&&he===3?!1:X===4||X===2||X===3||(he===4||he===2||he===3)?!0:X===8&&(he===8||he===9||he===11||he===12)||((X===11||X===9)&&(he===9||he===10)||((X===12||X===10)&&he===10||(he===5||he===13||(he===7||(X===1||X===13&&he===14)))))?!1:!(X===6&&he===6)}class te{constructor(){this._data=re()}static getInstance(){return te._INSTANCE||(te._INSTANCE=new te),te._INSTANCE}getGraphemeBreakType(X){if(X<32)return X===10?3:X===13?2:4;if(X<127)return 0;const he=this._data,fe=he.length/3;let xe=1;for(;xe<=fe;)if(X<he[3*xe])xe=2*xe;else if(X>he[3*xe+1])xe=2*xe+1;else return he[3*xe+2];return 0}}te._INSTANCE=null;function re(){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 Se(X,he){if(X===0)return 0;const fe=ie(X,he);if(fe!==void 0)return fe;const xe=L(he,X);return X-=q(xe),X}function ie(X,he){let fe=L(he,X);for(X-=q(fe);Y(fe)||fe===65039||fe===8419;){if(X===0)return;fe=L(he,X),X-=q(fe)}if(!me(fe))return;if(X>=0){const xe=L(he,X);xe===8205&&(X-=q(xe))}return X}function q(X){return X>=65536?2:1}function Y(X){return 127995<=X&&X<=127999}},NFKh:function(H,J,D){(function(M,g,C){H.exports=J=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(M){return M})},NLgs:function(H,J,D){"use strict";D.d(J,"e",function(){return r}),D.d(J,"f",function(){return x}),D.d(J,"d",function(){return p}),D.d(J,"c",function(){return I}),D.d(J,"a",function(){return O}),D.d(J,"b",function(){return _});var M=D("miYZ"),g=D("tsqr"),C=D("9og8"),N=D("2qtc"),m=D("kLXV"),v=D("WmNS"),T=D.n(v),y=D("q1tI"),t=D.n(y),h=D("9kvl"),i=D("xKgJ"),c=D("1vsH"),a=D("RCxd"),n=D("yTi+"),s=D.n(n),d=D("1ZF9"),f=D.n(d),l=D("NoGO"),o=D.n(l),r=function(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(x(w)&&b(S))},x=function(w){return Object(i.p)()?!0:(w({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},b=function(){var w,S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,F=Object(h.c)()._store.getState(),P=F.user;return(w=P.userInfo)!==null&&w!==void 0&&w.profile_completed?!0:(m.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:S?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){h.d.push("/account/profile/edit")}}),!1)},p=function(){var w,S=Object(h.c)()._store.getState(),F=S.user;return(w=F.userInfo)!==null&&w!==void 0&&w.professional_certification?!0:(m.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(c.S)("/account/certification")}}),!1)},I=function(){return Object(i.a)()?!0:(m.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:o.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},O=function(w,S){return w?!0:(m.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,S||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),t.a.createElement("div",{style:{marginLeft:"110px"}},t.a.createElement("img",{src:f.a,width:200}),t.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},_=function(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",F=Object(h.c)()._store.getState(),P=F.shixunsDetail.detail;return(P==null?void 0:P.public)===2||(P==null?void 0:P.public)===1||(P==null?void 0:P.shixun_status)===3?(m.a.info({centered:!0,icon:t.a.createElement(a.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(P==null?void 0:P.public)===2?"\u5DF2\u516C\u5F00":(P==null?void 0:P.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",S,"\u3002"),t.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),t.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:s.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(P==null?void 0:P.shixun_status)===2?(m.a.confirm({centered:!0,icon:t.a.createElement(a.a,null),title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",S,"\u3002"),t.a.createElement("br",null),t.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){m.a.confirm({width:440,centered:!0,icon:t.a.createElement(a.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var G=Object(C.a)(T.a.mark(function A(){var B;return T.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,w({type:"shixunsDetail/cancelRelease",payload:{id:P==null?void 0:P.identifier}});case 2:B=R.sent,B.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),w({type:"shixunsDetail/getShixunsDetail",payload:{id:P==null?void 0:P.identifier}}),w({type:"practiceSetting/getCommonData",payload:{id:P==null?void 0:P.identifier}}));case 4:case"end":return R.stop()}},A)}));function z(){return G.apply(this,arguments)}return z}()})}}),!0):!1}},NnUe:function(H,J,D){H.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NoGO:function(H,J,D){H.exports=D.p+"static/newqrcode.d852fdfc.png"},NvD2:function(H,J,D){"use strict";D.d(J,"a",function(){return v});var M=D("Kwbf");function g(T,y){var t=new Set;return T.forEach(function(h){y.has(h)||t.add(h)}),t}function C(T){var y=T||{},t=y.disabled,h=y.disableCheckbox,i=y.checkable;return!!(t||h)||i===!1}function N(T,y,t,h){for(var i=new Set(T),c=new Set,a=0;a<=t;a+=1){var n=y.get(a)||new Set;n.forEach(function(l){var o=l.key,r=l.node,x=l.children,b=x===void 0?[]:x;i.has(o)&&!h(r)&&b.filter(function(p){return!h(p.node)}).forEach(function(p){i.add(p.key)})})}for(var s=new Set,d=t;d>=0;d-=1){var f=y.get(d)||new Set;f.forEach(function(l){var o=l.parent,r=l.node;if(h(r)||!l.parent||s.has(l.parent.key))return;if(h(l.parent.node)){s.add(o.key);return}var x=!0,b=!1;(o.children||[]).filter(function(p){return!h(p.node)}).forEach(function(p){var I=p.key,O=i.has(I);x&&!O&&(x=!1),!b&&(O||c.has(I))&&(b=!0)}),x&&i.add(o.key),b&&c.add(o.key),s.add(o.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(g(c,i))}}function m(T,y,t,h,i){for(var c=new Set(T),a=new Set(y),n=0;n<=h;n+=1){var s=t.get(n)||new Set;s.forEach(function(o){var r=o.key,x=o.node,b=o.children,p=b===void 0?[]:b;!c.has(r)&&!a.has(r)&&!i(x)&&p.filter(function(I){return!i(I.node)}).forEach(function(I){c.delete(I.key)})})}a=new Set;for(var d=new Set,f=h;f>=0;f-=1){var l=t.get(f)||new Set;l.forEach(function(o){var r=o.parent,x=o.node;if(i(x)||!o.parent||d.has(o.parent.key))return;if(i(o.parent.node)){d.add(r.key);return}var b=!0,p=!1;(r.children||[]).filter(function(I){return!i(I.node)}).forEach(function(I){var O=I.key,_=c.has(O);b&&!_&&(b=!1),!p&&(_||a.has(O))&&(p=!0)}),b||c.delete(r.key),p&&a.add(r.key),d.add(r.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(a,c))}}function v(T,y,t,h){var i=[],c;h?c=h:c=C;var a=new Set(T.filter(function(f){var l=!!t[f];return l||i.push(f),l})),n=new Map,s=0;Object.keys(t).forEach(function(f){var l=t[f],o=l.level,r=n.get(o);r||(r=new Set,n.set(o,r)),r.add(l),s=Math.max(s,o)}),Object(M.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(f){return"'".concat(f,"'")}).join(", ")));var d;return y===!0?d=N(a,n,s,c):d=m(a,y.halfCheckedKeys,n,s,c),d}},OLod:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("K3mO"))})(this,function(M){M.lib.Cipher||function(g){var C=M,N=C.lib,m=N.Base,v=N.WordArray,T=N.BufferedBlockAlgorithm,y=C.enc,t=y.Utf8,h=y.Base64,i=C.algo,c=i.EvpKDF,a=N.Cipher=T.extend({cfg:m.extend(),createEncryptor:function(w,S){return this.create(this._ENC_XFORM_MODE,w,S)},createDecryptor:function(w,S){return this.create(this._DEC_XFORM_MODE,w,S)},init:function(w,S,F){this.cfg=this.cfg.extend(F),this._xformMode=w,this._key=S,this.reset()},reset:function(){T.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(S){return typeof S=="string"?E:I}return function(S){return{encrypt:function(F,P,L){return w(P).encrypt(S,F,P,L)},decrypt:function(F,P,L){return w(P).decrypt(S,F,P,L)}}}}()}),n=N.StreamCipher=a.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),s=C.mode={},d=N.BlockCipherMode=m.extend({createEncryptor:function(w,S){return this.Encryptor.create(w,S)},createDecryptor:function(w,S){return this.Decryptor.create(w,S)},init:function(w,S){this._cipher=w,this._iv=S}}),f=s.CBC=function(){var w=d.extend();w.Encryptor=w.extend({processBlock:function(F,P){var L=this._cipher,G=L.blockSize;S.call(this,F,P,G),L.encryptBlock(F,P),this._prevBlock=F.slice(P,P+G)}}),w.Decryptor=w.extend({processBlock:function(F,P){var L=this._cipher,G=L.blockSize,z=F.slice(P,P+G);L.decryptBlock(F,P),S.call(this,F,P,G),this._prevBlock=z}});function S(F,P,L){var G,z=this._iv;z?(G=z,this._iv=g):G=this._prevBlock;for(var A=0;A<L;A++)F[P+A]^=G[A]}return w}(),l=C.pad={},o=l.Pkcs7={pad:function(w,S){for(var F=S*4,P=F-w.sigBytes%F,L=P<<24|P<<16|P<<8|P,G=[],z=0;z<P;z+=4)G.push(L);var A=v.create(G,P);w.concat(A)},unpad:function(w){var S=w.words[w.sigBytes-1>>>2]&255;w.sigBytes-=S}},r=N.BlockCipher=a.extend({cfg:a.cfg.extend({mode:f,padding:o}),reset:function(){var w;a.reset.call(this);var S=this.cfg,F=S.iv,P=S.mode;this._xformMode==this._ENC_XFORM_MODE?w=P.createEncryptor:(w=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,F&&F.words):(this._mode=w.call(P,this,F&&F.words),this._mode.__creator=w)},_doProcessBlock:function(w,S){this._mode.processBlock(w,S)},_doFinalize:function(){var w,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),S.unpad(w)),w},blockSize:128/32}),x=N.CipherParams=m.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),b=C.format={},p=b.OpenSSL={stringify:function(w){var S,F=w.ciphertext,P=w.salt;return P?S=v.create([1398893684,1701076831]).concat(P).concat(F):S=F,S.toString(h)},parse:function(w){var S,F=h.parse(w),P=F.words;return P[0]==1398893684&&P[1]==1701076831&&(S=v.create(P.slice(2,4)),P.splice(0,4),F.sigBytes-=16),x.create({ciphertext:F,salt:S})}},I=N.SerializableCipher=m.extend({cfg:m.extend({format:p}),encrypt:function(w,S,F,P){P=this.cfg.extend(P);var L=w.createEncryptor(F,P),G=L.finalize(S),z=L.cfg;return x.create({ciphertext:G,key:F,iv:z.iv,algorithm:w,mode:z.mode,padding:z.padding,blockSize:w.blockSize,formatter:P.format})},decrypt:function(w,S,F,P){P=this.cfg.extend(P),S=this._parse(S,P.format);var L=w.createDecryptor(F,P).finalize(S.ciphertext);return L},_parse:function(w,S){return typeof w=="string"?S.parse(w,this):w}}),O=C.kdf={},_=O.OpenSSL={execute:function(w,S,F,P){P||(P=v.random(64/8));var L=c.create({keySize:S+F}).compute(w,P),G=v.create(L.words.slice(S),F*4);return L.sigBytes=S*4,x.create({key:L,iv:G,salt:P})}},E=N.PasswordBasedCipher=I.extend({cfg:I.cfg.extend({kdf:_}),encrypt:function(w,S,F,P){P=this.cfg.extend(P);var L=P.kdf.execute(F,w.keySize,w.ivSize);P.iv=L.iv;var G=I.encrypt.call(this,w,S,L.key,P);return G.mixIn(L),G},decrypt:function(w,S,F,P){P=this.cfg.extend(P),S=this._parse(S,P.format);var L=P.kdf.execute(F,w.keySize,w.ivSize,S.salt);P.iv=L.iv;var G=I.decrypt.call(this,w,S,L.key,P);return G}})}()})},OZM5:function(H,J,D){"use strict";D.d(J,"b",function(){return h}),D.d(J,"a",function(){return i}),D.d(J,"k",function(){return c}),D.d(J,"h",function(){return a}),D.d(J,"i",function(){return n}),D.d(J,"g",function(){return s}),D.d(J,"c",function(){return d}),D.d(J,"d",function(){return f}),D.d(J,"j",function(){return r}),D.d(J,"e",function(){return x}),D.d(J,"f",function(){return b});var M=D("KQm4"),g=D("U8pU"),C=D("Ff2n"),N=D("q1tI"),m=D.n(N),v=D("Kwbf"),T=D("WaYH"),y=.25,t=2;function h(p,I){var O=p.slice(),_=O.indexOf(I);return _>=0&&O.splice(_,1),O}function i(p,I){var O=p.slice();return O.indexOf(I)===-1&&O.push(I),O}function c(p){return p.split("-")}function a(p,I){return"".concat(p,"-").concat(I)}function n(p){return p&&p.type&&p.type.isTreeNode}function s(p,I){var O=[p],_=I[p];function E(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(S){var F=S.key,P=S.children;O.push(F),E(P)})}return E(_.children),O}function d(p,I){var O=p.clientY,_=I.selectHandle.getBoundingClientRect(),E=_.top,w=_.bottom,S=_.height,F=Math.max(S*y,t);return O<=E+F?-1:O>=w-F?1:0}function f(p,I){if(!p)return;var O=I.multiple;return O?p.slice():p.length?[p[0]]:p}var l=function(I){return I};function o(p,I){if(!p)return[];var O=I||{},_=O.processProps,E=_===void 0?l:_,w=Array.isArray(p)?p:[p];return w.map(function(S){var F=S.children,P=Object(C.a)(S,["children"]),L=o(F,I);return m.a.createElement(T.a,Object.assign({},E(P)),L)})}function r(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(v.a)(!1,"`checkedKeys` is not an array or an object"),null;return I}function x(p,I){var O=new Set;function _(E){if(O.has(E))return;var w=I[E];if(!w)return;O.add(E);var S=w.parent,F=w.node;if(F.disabled)return;S&&_(S.key)}return(p||[]).forEach(function(E){_(E)}),Object(M.a)(O)}function b(p){var I={};return Object.keys(p).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(I[O]=p[O])}),I}},Ot1p:function(H,J,D){"use strict";var M=D("2qtc"),g=D("kLXV"),C=D("rAM+"),N=D("miYZ"),m=D("tsqr"),v=D("9og8"),T=D("tJVT"),y=D("jrin"),t=D("WmNS"),h=D.n(t),i=D("q1tI"),c=D.n(i),a=D("VrN/"),n=D.n(a),s=D("bdgK"),d=D("p77/"),f=D("Bd2K"),l=D("ELLl"),o=D("19Vz"),r=D("lZu9"),x=D("+NIl"),b=D("kSUc"),p=D("9Bee"),I=function(He){var nt=He.value,vt=nt===void 0?"":nt,bt=He.className,Wt=He.showTextOnly,Bt=He.showLines,lr=He.style,dr=lr===void 0?{}:lr,Ot=Object(i.useMemo)(function(){return""},[vt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ot}}))},O=D("0Owb"),_=D("dejd"),E=D("C+DQ"),w=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 P(He){var nt=He.onActionCallback,vt=He.title,bt=He.icon,Wt=He.actionName,Bt=He.className,lr=Bt===void 0?"":Bt,dr=He.children;function Ot(){nt(Wt)}return c.a.createElement("a",{title:vt,className:lr,onClick:Ot},c.a.createElement("i",{className:"md-iconfont ".concat(bt)}),dr)}var L=function(He){var nt=He.watch,vt=He.showNullButton,bt=He.onActionCallback,Wt=He.fullScreen,Bt=He.insertTemp,lr=He.hidetoolBar,dr=He.uuid,Ot=He.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(w.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(w.F)("_educoder_session"),"&key=").concat(dr,"&api=").concat(encodeURIComponent(S.a.PROXY_SERVER)));var Vr=[].concat(F,[{title:"".concat(nt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(nt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!lr&&Vr.map(function(Wr,Yr){return c.a.createElement("li",{key:Yr},Wr.actionName?c.a.createElement(P,Object(O.a)({},Wr,{onActionCallback:bt})):c.a.createElement("span",{className:"v-line"}))}),vt?c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:bt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Bt&&c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Bt),onActionCallback:bt},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(P,{icon:"".concat(Wt?"icon-shrink":"icon-enlarge"),title:Wt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:bt})))},G=D("M8RZ"),z=D("+L6B"),A=D("2/Rp"),B=D("y8nQ"),U=D("Vl3Y"),R=D("5NDa"),K=D("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},ue=function(He){var nt=He.callback,vt=He.onCancel;function bt(Wt){nt(Wt)}return c.a.createElement(U.a,Object(O.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:bt}),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(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},de=D("7ahc"),Ce=D("HmJG"),Re=D("BjJ7"),me=U.a.useForm,Oe={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}},ce=function(He){var nt=He.callback,vt=He.onCancel,bt=me(),Wt=Object(T.a)(bt,1),Bt=Wt[0];function lr(Vr){nt(Vr)}function dr(Vr,Wr){if(Vr.status===-1){m.b.error(Vr.message);return}Bt.setFieldsValue({src:"/api/attachments/".concat(Vr.id),type:Wr.type})}function Ot(Vr){var Wr=Vr.target.files[0];ne(Wr,dr)}return c.a.createElement(U.a,Object(O.a)({form:Bt},be,{className:"upload-image-panel",onFinish:lr}),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:Oe})),c.a.createElement(le,{onFileChange:Ot}))),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(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))};function le(He){var nt=He.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:nt}))}function ne(He,nt){if(!He)throw new String("\u6CA1\u6709\u6587\u4EF6");var vt=new FormData;vt.append("editormd-image-file",He),vt.append("file_param_name","editormd-image-file"),vt.append("byxhr","true");var bt=new window.XMLHttpRequest;bt.withCredentials=!0,bt.addEventListener("load",function(Wt){nt(JSON.parse(Wt.target.responseText),He)},!1),bt.addEventListener("error",function(Wt){console.error(Wt)},!1),bt.open("POST","".concat(Re.a,"/api/attachments.json")),bt.send(vt)}var ge=D("giR+"),te=D("fyUT"),re=D("7Kak"),Se=D("9yH6"),ie=Se.a.Group,q={margin:"0 8px"},Y=function(He){var nt=He.callback,vt=He.onCancel;function bt(Wt){nt(Wt)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:bt},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:q},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(te.a,null)),c.a.createElement("span",{style:q},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(te.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(Se.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Se.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Se.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Se.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},X=D("ErOA"),he=D("7Cbv"),fe="link",xe="upload-image",Ke="code-block",Ze="add-table",et="------------",st={default:et,left:":".concat(et),center:":".concat(et,":"),right:"".concat(et,":")},ut=D("9VGf"),dt,Fe;function Ie(){}var ot=0,ft=1e4,Qe="\u2581",tt=`
**\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 Be(He){return/^\d+$/.test(He)?"".concat(He,"px"):He}var ke=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ne=ke?"Cmd":"Ctrl",Ee=["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"],Ae=(dt={},Object(y.a)(dt,Ne+"-B","bold"),Object(y.a)(dt,Ne+"-I","italic"),dt),Le=(Fe={},Object(y.a)(Fe,fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(y.a)(Fe,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(y.a)(Fe,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(y.a)(Fe,Ze,"\u6DFB\u52A0\u8868\u683C"),Fe),Me=J.a=function(He){var nt=He.defaultValue,vt=nt===void 0?"":nt,bt=He.onChange,Wt=He.width,Bt=Wt===void 0?"100%":Wt,lr=He.height,dr=lr===void 0?400:lr,Ot=He.miniToolbar,Vr=Ot===void 0?!1:Ot,Wr=He.isFocus,Yr=Wr===void 0?!1:Wr,bn=He.watch,Ar=He.insertTemp,fn=He.mode,cn=fn===void 0?"markdown":fn,Vt=He.id,En=Vt===void 0?"markdown-editor-id":Vt,fr=He.showResizeBar,br=fr===void 0?!1:fr,Br=He.noStorage,kn=Br===void 0?!1:Br,Kn=He.showNullButton,dn=Kn===void 0?!1:Kn,sr=He.hidetoolBar,Jn=sr===void 0?!1:sr,Tn=He.fullScreen,On=Tn===void 0?!1:Tn,Jr=He.onBlur,An=He.onCMBeforeChange,Zn=He.onFullScreen,ri=He.className,Nt=ri===void 0?"":ri,_r=He.disablePaste,mi=_r===void 0?!1:_r,xi=He.placeholder,Di=xi===void 0?"":xi,wi=He.values,se=wi===void 0?"":wi,V=Object(i.useState)(null),$=Object(T.a)(V,2),ee=$[0],ye=$[1],oe=Object(i.useState)(vt),Ve=Object(T.a)(oe,2),Tt=Ve[0],Xt=Ve[1],Er=Object(i.useState)(bn),kt=Object(T.a)(Er,2),Pr=kt[0],Gr=kt[1],yn=Object(i.useState)(On),ni=Object(T.a)(yn,2),ii=ni[0],Bn=ni[1],Ni=Object(i.useState)(""),Ki=Object(T.a)(Ni,2),Gn=Ki[0],Ti=Ki[1],Gi=Object(i.useState)(0),Li=Object(T.a)(Gi,2),li=Li[0],ea=Li[1],Vi=Object(i.useState)(dr),ta=Object(T.a)(Vi,2),oa=ta[0],ki=ta[1],qn=Object(i.useState)(!1),ji=Object(T.a)(qn,2),ha=ji[0],xt=ji[1],rt=Object(i.useRef)(Object(he.a)()),mt=Object(i.useRef)(!1),wt=Object(i.useRef)(),Lt=Object(i.useRef)(),It=Object(i.useRef)(),Kt=Object(i.useRef)(),Ht=Object(i.useRef)(),ht=function(){var _t=Object(v.a)(h.a.mark(function Rt(){var Et,Mt;return h.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return pr.next=2,Object(X.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:rt.current}});case 2:Mt=pr.sent,Mt!=null&&(Et=Mt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",ee,Lt),Mt.attachments.map(function(er){er.content_type.indexOf("image")>-1?ee.replaceSelection("![,](/api/attachments/".concat(er.id,"?type=").concat(er.content_type,")")):er.content_type.indexOf("video")>-1?ee.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):er.content_type.indexOf("pdf")>-1?ee.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,'&disposition=inline" target="_blank">').concat(er.name,"</a>")):ee.replaceSelection("[".concat(er.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,")"))}));case 4:case"end":return pr.stop()}},Rt)}));return function(){return _t.apply(this,arguments)}}();Object(i.useEffect)(function(){Xt(se),ee==null||ee.setValue(se)},[se]),Object(i.useEffect)(function(){Zn==null||Zn(ii)},[ii]),Object(i.useEffect)(function(){if(Lt.current){var _t=n.a.fromTextArea(Lt.current,{mode:cn,lineNumbers:!Vr,lineWrapping:!0,value:vt,autoCloseTags:!0,autoCloseBrackets:!0});Yr&&_t.focus();function Rt(Et,Mt){if(mi){Mt.preventDefault();return}var qt=Mt.clipboardData;if(qt){var pr=qt.types.toString(),er=qt.items;if(pr==="Files"||qt.types.indexOf("Files")>-1){if(Mt.preventDefault(),cn=="stex")return;try{var Ir,Hr=er[1];((Ir=er[0])===null||Ir===void 0?void 0:Ir.kind)==="file"&&(Hr=er[0]);var yr=Hr.getAsFile(),at=yr.name.split(".").pop();ne(yr,function(zt){if(zt.id){var sn,en,mr;(yr==null||((sn=yr.type)===null||sn===void 0)?void 0:sn.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(zt.id,"?type=").concat(zt.content_type,")")):(yr==null||((en=yr.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,'"></video>')):(yr==null||((mr=yr.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(yr.type,'&disposition=inline" target="_blank">').concat(yr.name,"</a>")):Ee.includes(at)?_t.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,'?type=office&disposition=inline" target="_blank">').concat(yr.name,"</a>")):_t.replaceSelection("[".concat(yr.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(zt.content_type,")"))}else(zt==null?void 0:zt.status)===401&&(document.location.href="/user/login")})}catch(zt){m.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return _t.on("paste",Rt),_t.on("dragleave",function(Et,Mt){It.current.classList.remove("mouse-hover-md")}),_t.on("dragover",function(Et,Mt){It.current.classList.add("mouse-hover-md")}),_t.on("drop",function(Et,Mt){It.current.classList.add("mouse-hover-md");var qt;if(qt=Mt.dataTransfer.files,qt.length>0){Mt.preventDefault(),Mt.stopPropagation();for(var pr=function(Hr){var yr=qt[Hr],at=yr.name.split(".").pop();ne(yr,function(zt){if(zt.id){var sn,en,mr;(yr==null||((sn=yr.type)===null||sn===void 0)?void 0:sn.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(zt.id,"?type=").concat(zt.content_type,")")):(yr==null||((en=yr.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,'"></video>')):(yr==null||((mr=yr.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(yr.type,'&disposition=inline" target="_blank">').concat(yr.name,"</a>")):Ee.includes(at)?_t.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,'?type=office&disposition=inline" target="_blank">').concat(yr.name,"</a>")):_t.replaceSelection("[".concat(yr.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(zt.content_type,")"))}else(zt==null?void 0:zt.status)===401&&(document.location.href="/user/login")})},er=0;er<qt.length;er++)pr(er)}}),ye(_t),function(){_t.off("paste",Rt)}}},[]);var St=Object(i.useCallback)(function(){if(It.current)try{}catch(_t){console.log(_t,"---- to set md editor body height")}},[oa,It,ii]);Object(i.useEffect)(function(){function _t(){var Et=new s.default(function(Mt){var qt=Object(C.a)(Mt),pr;try{for(qt.s();!(pr=qt.n()).done;){var er=pr.value;(er.target.offsetHeight>0||er.target.offsetWidth>0)&&(St(),ee.setSize("100%","100%"),ee.refresh())}}catch(Ir){qt.e(Ir)}finally{qt.f()}});return Et.observe(Lt.current.parentElement),Et}if(ee){var Rt=_t();return function(){Rt.unobserve(Lt.current.parentElement)}}},[ee,St]),Object(i.useEffect)(function(){if(ee){for(var _t=[],Rt=function(){var er=Mt[Et];qt=Object(T.a)(er,2);var Ir=qt[0],Hr=qt[1],yr=Object(y.a)({},Ir,function(){At(Hr)});_t.push(yr),ee.addKeyMap(yr)},Et=0,Mt=Object.entries(Ae);Et<Mt.length;Et++){var qt;Rt()}return wt.current=setInterval(function(){mt.current&&ht()},4e3),function(){clearInterval(wt.current);var pr=Object(C.a)(_t),er;try{for(pr.s();!(er=pr.n()).done;){var Ir=er.value;ee.removeKeyMap(Ir)}}catch(Hr){pr.e(Hr)}finally{pr.f()}}}},[ee]),Object(i.useEffect)(function(){On!==ii&&Bn(On)},[On]),Object(ut.a)(function(){if(!kn&&li>0){var _t=new Date().getTime(),Rt=window.sessionStorage.getItem(En);_t>=li+ft&&(!Rt||Rt!==Tt)&&(window.sessionStorage.setItem(En,Tt),xt(!0))}},ft),Object(i.useEffect)(function(){Gr(bn)},[ee,bn]),Object(i.useEffect)(function(){ee&&(Yr&&ee.focus())},[ee,Yr]),Object(i.useEffect)(function(){if(Pr&&ee){var _t=ee.getScrollerElement();function Rt(Et){var Mt=Et.target;if(Ht.current){var qt=Mt.scrollTop/Mt.scrollHeight;Ht.current.scrollTop=Ht.current.scrollHeight*qt}}return _t.addEventListener("scroll",Rt),function(){_t.removeEventListener("scroll",Rt)}}},[ee,Pr]),Object(i.useEffect)(function(){if(ee&&An){function _t(Rt,Et){An(Rt,Et)}return ee.on("beforeChange",_t),function(){ee.off("beforeChange",_t)}}},[ee,An]),Object(i.useEffect)(function(){if(ee&&Jr){function _t(){Jr(ee.getValue())}return ee.on("blur",_t),function(){ee.off("blur",_t)}}},[ee,Jr]),Object(i.useEffect)(function(){if(ee){function _t(Rt){var Et=Rt.getValue();Xt(Et),ea(new Date().getTime()),Rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),bt&&bt(Et)}return ee.on("change",_t),function(){ee.off("change",_t)}}},[ee,bt]),Object(i.useEffect)(function(){ee&&(vt==null?(ee.setValue(""),Xt("")):vt!==ee.getValue()&&(ee.setValue(vt),Xt(vt),ee.setCursor(ee.lineCount(),0)))},[ee,vt]);var At=Object(i.useCallback)(function(_t){var Rt=ee.getCursor(),Et=ee.getSelection(),Mt=Et.split(`
`);switch(_t){case"bold":return ee.replaceSelection("**"+Et+"**"),Et===""&&ee.setCursor(Rt.line,Rt.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Et+"*"),Et===""&&ee.setCursor(Rt.line,Rt.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Et+"`"),Et===""&&ee.setCursor(Rt.line,Rt.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Et+"$$`"),Et===""&&ee.setCursor(Rt.line,Rt.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Et+"\n```"),ee.setCursor(Rt.line+1,Et.length+1),ee.focus();case"line-break":return ee.replaceSelection(`<br/>
`),ee.focus();case"list-ul":return Et===""?ee.replaceSelection("- "+Et):ee.replaceSelection(Mt.map(function(qt){return qt===""?"":"- ".concat(qt)}).join(`
`)),ee.focus();case"list-ol":return Et===""?ee.replaceSelection("1. "+Et):ee.replaceSelection(Mt.map(function(qt,pr){return qt===""?"":"".concat(pr+1,". ").concat(qt)}).join(`
`)),ee.focus();case"add-null-ch":return Et===""&&ee.setCursor(Rt.line,Rt.ch+1),ee.replaceSelection(Qe),ee.focus();case"inster-template-1":return Et===""&&ee.setCursor(Rt.line,Rt.ch),ee.replaceSelection(tt),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Gr(!Pr),ee.focus();case"trigger-full-screen":return Bn(!ii),ee.focus();case fe:Ti(fe);return;case Ke:Ti(Ke);return;case xe:Ti(xe);return;case Ze:Ti(Ze);return;default:throw new Error}},[ee,Pr,ii]),ur=Object(i.useCallback)(function(_t){Ti("");switch(Gn){case fe:var Rt=_t.title,Et=_t.link;return ee.replaceSelection("[".concat(Rt,"](").concat(Et,")")),ee.focus();case Ke:var Mt=_t.language,qt=_t.content;return ee.replaceSelection(["```"+Mt,qt,"```"].join(`
`)),ee.focus();case xe:var pr=_t.src,er=_t.alt;return er?ee.replaceSelection("![ ".concat(er," ]( ").concat(pr,' "').concat(er,'" )')):ee.replaceSelection("![,](".concat(pr,")")),ee.focus();case Ze:for(var Ir=_t.row,Hr=_t.col,yr=_t.align,at=`
`,zt=0;zt<Ir;zt++){for(var sn=[],en=[],mr=0;mr<Hr;mr++)zt===1&&en.push(st[yr]),sn.push(" ");zt===1&&(at+="| ".concat(en.join(" | "),` |
`)),at+="| ".concat(sn.join(Hr===1?"":" | "),` |
`)}return ee.replaceSelection(at+`
`),ee.focus();default:throw new Error}},[ee,Gn]),ar=Object(i.useMemo)(function(){switch(Gn){case fe:return c.a.createElement(ue,{callback:ur,onCancel:Zt});case Ke:return c.a.createElement(de.b,{callback:ur,onCancel:Zt});case xe:return c.a.createElement(ce,{callback:ur,onCancel:Zt});case Ze:return c.a.createElement(Y,{callback:ur,onCancel:Zt});default:return null}},[Gn]);function Zt(){Ti("")}Object(i.useEffect)(function(){if(Kt.current){var _t=Kt.current,Rt=!1,Et=0;function Mt(er){Rt=!0,Et=er.pageY}function qt(){Rt=!1}function pr(er){if(Rt){var Ir=er.pageY-Et;Ir<0&&(Ir=0),Ir>300&&(Ir=300);var Hr=dr+Ir+"px";ki(Hr)}}return _t.addEventListener("mousedown",Mt),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",qt),function(){_t.removeEventListener("mousedown",Mt),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",qt)}}},[ee,Kt]),Object(i.useEffect)(function(){ki(dr)},[dr]);var $t=Be(Bt),rr=Be(oa),cr={width:$t,height:rr},lt=Object(i.useMemo)(function(){if(li){var _t=new Date(li),Rt=_t.getHours(),Et=_t.getMinutes(),Mt=_t.getSeconds();return Rt=Rt<10?"0"+Rt:Rt,Et=Et<10?"0"+Et:Et,Mt=Mt<10?"0"+Mt:Mt,"".concat(Rt,":").concat(Et,":").concat(Mt)}return 0},[li]);function Rr(){window.sessionStorage.removeItem(En),xt(!1),ea(0)}function jr(){xt(!1),ea(0),ee.setValue(window.sessionStorage.getItem(En))}function xr(_t,Rt){var Et=ee.getValue();Et=Et.replace(_t,Rt),Xt(Et),ee==null||ee.setValue(Et)}return c.a.createElement(i.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:It},c.a.createElement("div",{className:"markdown-editor-container ".concat(Nt," ").concat(Pr?"on-preview":""," ").concat(Vr?"mini":""," ").concat(ii?"full-screen":""),style:cr},c.a.createElement(L,{insertTemp:Ar,watch:Pr,fullScreen:ii,showNullButton:dn,onActionCallback:At,hidetoolBar:Jn,uuid:rt.current,setOpenPhones:function(){mt.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Lt,placeholder:Di})),Pr?c.a.createElement("div",{ref:Ht,className:"preview-container"},cn==="stex"&&c.a.createElement(I,{value:Tt}),cn!=="stex"&&c.a.createElement(p.a,{edit:!0,value:Tt,replaces:xr})):null))),br?c.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,c.a.createElement(G.a,null,Le[Gn]?c.a.createElement(g.a,{centered:!0,title:Le[Gn],visible:!0,onCancel:Zt,footer:null,className:"markdown-popup-form"},ar):null))}},PVpz:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.StreamCipher,m=g.algo,v=[],T=[],y=[],t=m.RabbitLegacy=N.extend({_doReset:function(){var i=this._key.words,c=this.cfg.iv,a=this._X=[i[0],i[3]<<16|i[2]>>>16,i[1],i[0]<<16|i[3]>>>16,i[2],i[1]<<16|i[0]>>>16,i[3],i[2]<<16|i[1]>>>16],n=this._C=[i[2]<<16|i[2]>>>16,i[0]&4294901760|i[1]&65535,i[3]<<16|i[3]>>>16,i[1]&4294901760|i[2]&65535,i[0]<<16|i[0]>>>16,i[2]&4294901760|i[3]&65535,i[1]<<16|i[1]>>>16,i[3]&4294901760|i[0]&65535];this._b=0;for(var s=0;s<4;s++)h.call(this);for(var s=0;s<8;s++)n[s]^=a[s+4&7];if(c){var d=c.words,f=d[0],l=d[1],o=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,x=o>>>16|r&4294901760,b=r<<16|o&65535;n[0]^=o,n[1]^=x,n[2]^=r,n[3]^=b,n[4]^=o,n[5]^=x,n[6]^=r,n[7]^=b;for(var s=0;s<4;s++)h.call(this)}},_doProcessBlock:function(i,c){var a=this._X;h.call(this),v[0]=a[0]^a[5]>>>16^a[3]<<16,v[1]=a[2]^a[7]>>>16^a[5]<<16,v[2]=a[4]^a[1]>>>16^a[7]<<16,v[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)v[n]=(v[n]<<8|v[n]>>>24)&16711935|(v[n]<<24|v[n]>>>8)&4278255360,i[c+n]^=v[n]},blockSize:128/32,ivSize:64/32});function h(){for(var i=this._X,c=this._C,a=0;a<8;a++)T[a]=c[a];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<T[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<T[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<T[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<T[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<T[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<T[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<T[6]>>>0?1:0)|0,this._b=c[7]>>>0<T[7]>>>0?1:0;for(var a=0;a<8;a++){var n=i[a]+c[a],s=n&65535,d=n>>>16,f=((s*s>>>17)+s*d>>>15)+d*d,l=((n&4294901760)*n|0)+((n&65535)*n|0);y[a]=f^l}i[0]=y[0]+(y[7]<<16|y[7]>>>16)+(y[6]<<16|y[6]>>>16)|0,i[1]=y[1]+(y[0]<<8|y[0]>>>24)+y[7]|0,i[2]=y[2]+(y[1]<<16|y[1]>>>16)+(y[0]<<16|y[0]>>>16)|0,i[3]=y[3]+(y[2]<<8|y[2]>>>24)+y[1]|0,i[4]=y[4]+(y[3]<<16|y[3]>>>16)+(y[2]<<16|y[2]>>>16)|0,i[5]=y[5]+(y[4]<<8|y[4]>>>24)+y[3]|0,i[6]=y[6]+(y[5]<<16|y[5]>>>16)+(y[4]<<16|y[4]>>>16)|0,i[7]=y[7]+(y[6]<<8|y[6]>>>24)+y[5]|0}g.RabbitLegacy=N._createHelper(t)}(),M.RabbitLegacy})},RxwV:function(H,J,D){"use strict";var M=D("q1tI"),g=D("uciX"),C=D("2W6z"),N=D.n(C),m=D("4IlW"),v=D("uK0f"),T=D.n(v);function y(Oe,be){if(Oe===be)return!0;if(!Oe||!be)return!1;var ce=Oe.length;if(be.length!==ce)return!1;for(var le=0;le<ce;le++)if(Oe[le]!==be[le])return!1;return!0}function t(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(ce){return typeof ce}:t=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},t(Oe)}function h(Oe,be){if(!(Oe instanceof be))throw new TypeError("Cannot call a class as a function")}function i(Oe,be){for(var ce=0;ce<be.length;ce++){var le=be[ce];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Oe,le.key,le)}}function c(Oe,be,ce){return be&&i(Oe.prototype,be),ce&&i(Oe,ce),Oe}function a(Oe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(be&&be.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),be&&n(Oe,be)}function n(Oe,be){return n=Object.setPrototypeOf||function(le,ne){return le.__proto__=ne,le},n(Oe,be)}function s(Oe){var be=l();return function(){var ce=o(Oe),le;if(be){var ne=o(this).constructor;le=Reflect.construct(ce,arguments,ne)}else le=ce.apply(this,arguments);return d(this,le)}}function d(Oe,be){return be&&(t(be)==="object"||typeof be=="function")?be:f(Oe)}function f(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Oe){return!1}}function o(Oe){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(ce){return ce.__proto__||Object.getPrototypeOf(ce)},o(Oe)}var r=function(){var Oe=function(be){a(le,be);var ce=s(le);function le(){var ne;return h(this,le),ne=ce.apply(this,arguments),ne.menuItems={},ne.saveMenuItem=function(ge){return function(te){ne.menuItems[ge]=te}},ne}return c(le,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(ge){!ge.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(ge){var te=this.props,re=te.fieldNames,Se=te.defaultFieldNames;return re[ge]||Se[ge]}},{key:"getOption",value:function(ge,te){var re=this.props,Se=re.prefixCls,ie=re.expandTrigger,q=re.expandIcon,Y=re.loadingIcon,X=this.props.onSelect.bind(this,ge,te),he=this.props.onItemDoubleClick.bind(this,ge,te),fe={onClick:X,onDoubleClick:he},xe="".concat(Se,"-menu-item"),Ke=null,Ze=ge[this.getFieldName("children")]&&ge[this.getFieldName("children")].length>0;(Ze||ge.isLeaf===!1)&&(xe+=" ".concat(Se,"-menu-item-expand"),ge.loading||(Ke=M.createElement("span",{className:"".concat(Se,"-menu-item-expand-icon")},q))),ie==="hover"&&(Ze||ge.isLeaf===!1)&&(fe={onMouseEnter:this.delayOnSelect.bind(this,X),onMouseLeave:this.delayOnSelect.bind(this),onClick:X}),this.isActiveOption(ge,te)&&(xe+=" ".concat(Se,"-menu-item-active"),fe.ref=this.saveMenuItem(te)),ge.disabled&&(xe+=" ".concat(Se,"-menu-item-disabled"));var et=null;ge.loading&&(xe+=" ".concat(Se,"-menu-item-loading"),et=Y||null);var st="";return"title"in ge?st=ge.title:typeof ge[this.getFieldName("label")]=="string"&&(st=ge[this.getFieldName("label")]),M.createElement("li",Object.assign({key:ge[this.getFieldName("value")],className:xe,title:st},fe,{role:"menuitem",onMouseDown:function(dt){return dt.preventDefault()}}),ge[this.getFieldName("label")],Ke,et)}},{key:"getActiveOptions",value:function(ge){var te=this,re=this.props.options,Se=ge||this.props.activeValue;return T()(re,function(ie,q){return ie[te.getFieldName("value")]===Se[q]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var ge=this,te=this.props.options,re=this.getActiveOptions().map(function(Se){return Se[ge.getFieldName("children")]}).filter(function(Se){return!!Se});return re.unshift(te),re}},{key:"delayOnSelect",value:function(ge){for(var te=this,re=arguments.length,Se=new Array(re>1?re-1:0),ie=1;ie<re;ie++)Se[ie-1]=arguments[ie];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof ge=="function"&&(this.delayTimer=window.setTimeout(function(){ge(Se),te.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var ge=this.getShowOptions().length,te=0;te<ge;te++){var re=this.menuItems[te];re&&re.parentElement&&(re.parentElement.scrollTop=re.offsetTop)}}},{key:"isActiveOption",value:function(ge,te){var re=this.props.activeValue,Se=re===void 0?[]:re;return Se[te]===ge[this.getFieldName("value")]}},{key:"render",value:function(){var ge=this,te=this.props,re=te.prefixCls,Se=te.dropdownMenuColumnStyle;return M.createElement("div",null,this.getShowOptions().map(function(ie,q){return M.createElement("ul",{className:"".concat(re,"-menu"),key:q,style:Se},ie.map(function(Y){return ge.getOption(Y,q)}))}))}}]),le}(M.Component);return Oe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Oe}(),x=r,b={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},p=b;function I(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(ce){return typeof ce}:I=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},I(Oe)}function O(Oe,be){if(Oe==null)return{};var ce=_(Oe,be),le,ne;if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(Oe);for(ne=0;ne<ge.length;ne++){if(le=ge[ne],be.indexOf(le)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Oe,le))continue;ce[le]=Oe[le]}}return ce}function _(Oe,be){if(Oe==null)return{};var ce={},le=Object.keys(Oe),ne,ge;for(ge=0;ge<le.length;ge++){if(ne=le[ge],be.indexOf(ne)>=0)continue;ce[ne]=Oe[ne]}return ce}function E(Oe){return P(Oe)||F(Oe)||S(Oe)||w()}function w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(Oe,be){if(!Oe)return;if(typeof Oe=="string")return L(Oe,be);var ce=Object.prototype.toString.call(Oe).slice(8,-1);if(ce==="Object"&&Oe.constructor&&(ce=Oe.constructor.name),ce==="Map"||ce==="Set")return Array.from(Oe);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return L(Oe,be)}function F(Oe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Oe))return Array.from(Oe)}function P(Oe){if(Array.isArray(Oe))return L(Oe)}function L(Oe,be){(be==null||be>Oe.length)&&(be=Oe.length);for(var ce=0,le=new Array(be);ce<be;ce++)le[ce]=Oe[ce];return le}function G(Oe,be){if(!(Oe instanceof be))throw new TypeError("Cannot call a class as a function")}function z(Oe,be){for(var ce=0;ce<be.length;ce++){var le=be[ce];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Oe,le.key,le)}}function A(Oe,be,ce){return be&&z(Oe.prototype,be),ce&&z(Oe,ce),Oe}function B(Oe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(be&&be.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),be&&U(Oe,be)}function U(Oe,be){return U=Object.setPrototypeOf||function(le,ne){return le.__proto__=ne,le},U(Oe,be)}function R(Oe){var be=ue();return function(){var ce=de(Oe),le;if(be){var ne=de(this).constructor;le=Reflect.construct(ce,arguments,ne)}else le=ce.apply(this,arguments);return K(this,le)}}function K(Oe,be){return be&&(I(be)==="object"||typeof be=="function")?be:Z(Oe)}function Z(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function ue(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Oe){return!1}}function de(Oe){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(ce){return ce.__proto__||Object.getPrototypeOf(ce)},de(Oe)}var Ce=function(){var Oe=function(be){B(le,be);var ce=R(le);function le(ne){var ge;G(this,le),ge=ce.call(this,ne),ge.setPopupVisible=function(re){var Se=ge.state.value;"popupVisible"in ge.props||ge.setState({popupVisible:re}),re&&!ge.state.popupVisible&&ge.setState({activeValue:Se}),ge.props.onPopupVisibleChange(re)},ge.handleChange=function(re,Se,ie){var q=Se.visible;(ie.type!=="keydown"||ie.keyCode===m.a.ENTER)&&(ge.props.onChange(re.map(function(Y){return Y[ge.getFieldName("value")]}),re),ge.setPopupVisible(q))},ge.handlePopupVisibleChange=function(re){ge.setPopupVisible(re)},ge.handleMenuSelect=function(re,Se,ie){var q=ge.trigger.getRootDomNode();q&&q.focus&&q.focus();var Y=ge.props,X=Y.changeOnSelect,he=Y.loadData,fe=Y.expandTrigger;if(!re||re.disabled)return;var xe=ge.state.activeValue;xe=xe.slice(0,Se+1),xe[Se]=re[ge.getFieldName("value")];var Ke=ge.getActiveOptions(xe);if(re.isLeaf===!1&&!re[ge.getFieldName("children")]&&he){X&&ge.handleChange(Ke,{visible:!0},ie),ge.setState({activeValue:xe}),he(Ke);return}var Ze={};!re[ge.getFieldName("children")]||!re[ge.getFieldName("children")].length?(ge.handleChange(Ke,{visible:!1},ie),Ze.value=xe):X&&(ie.type==="click"||ie.type==="keydown")&&(fe==="hover"?ge.handleChange(Ke,{visible:!1},ie):ge.handleChange(Ke,{visible:!0},ie),Ze.value=xe),Ze.activeValue=xe,("value"in ge.props||ie.type==="keydown"&&ie.keyCode!==m.a.ENTER)&&delete Ze.value,ge.setState(Ze)},ge.handleItemDoubleClick=function(){var re=ge.props.changeOnSelect;re&&ge.setPopupVisible(!1)},ge.handleKeyDown=function(re){var Se=ge.props.children;if(Se&&Se.props.onKeyDown){Se.props.onKeyDown(re);return}var ie=E(ge.state.activeValue),q=ie.length-1<0?0:ie.length-1,Y=ge.getCurrentLevelOptions(),X=Y.map(function(Ke){return Ke[ge.getFieldName("value")]}).indexOf(ie[q]);if(re.keyCode!==m.a.DOWN&&re.keyCode!==m.a.UP&&re.keyCode!==m.a.LEFT&&re.keyCode!==m.a.RIGHT&&re.keyCode!==m.a.ENTER&&re.keyCode!==m.a.SPACE&&re.keyCode!==m.a.BACKSPACE&&re.keyCode!==m.a.ESC&&re.keyCode!==m.a.TAB)return;if(!ge.state.popupVisible&&re.keyCode!==m.a.BACKSPACE&&re.keyCode!==m.a.LEFT&&re.keyCode!==m.a.RIGHT&&re.keyCode!==m.a.ESC&&re.keyCode!==m.a.TAB){ge.setPopupVisible(!0);return}if(re.keyCode===m.a.DOWN||re.keyCode===m.a.UP){re.preventDefault();var he=X;he!==-1?re.keyCode===m.a.DOWN?(he+=1,he=he>=Y.length?0:he):(he-=1,he=he<0?Y.length-1:he):he=0,ie[q]=Y[he][ge.getFieldName("value")]}else if(re.keyCode===m.a.LEFT||re.keyCode===m.a.BACKSPACE)re.preventDefault(),ie.splice(ie.length-1,1);else if(re.keyCode===m.a.RIGHT)re.preventDefault(),Y[X]&&Y[X][ge.getFieldName("children")]&&ie.push(Y[X][ge.getFieldName("children")][0][ge.getFieldName("value")]);else if(re.keyCode===m.a.ESC||re.keyCode===m.a.TAB){ge.setPopupVisible(!1);return}(!ie||ie.length===0)&&ge.setPopupVisible(!1);var fe=ge.getActiveOptions(ie),xe=fe[fe.length-1];ge.handleMenuSelect(xe,fe.length-1,re),ge.props.onKeyDown&&ge.props.onKeyDown(re)},ge.saveTrigger=function(re){ge.trigger=re};var te=[];return"value"in ne?te=ne.value||[]:"defaultValue"in ne&&(te=ne.defaultValue||[]),N()(!("filedNames"in ne),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),ge.state={popupVisible:ne.popupVisible,activeValue:te,value:te,prevProps:ne},ge.defaultFieldNames={label:"label",value:"value",children:"children"},ge}return A(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(ge){var te=this.defaultFieldNames,re=this.props,Se=re.fieldNames,ie=re.filedNames;return"filedNames"in this.props?ie[ge]||te[ge]:Se[ge]||te[ge]}},{key:"getFieldNames",value:function(){var ge=this.props,te=ge.fieldNames,re=ge.filedNames;return"filedNames"in this.props?re:te}},{key:"getCurrentLevelOptions",value:function(){var ge=this,te=this.props.options,re=te===void 0?[]:te,Se=this.state.activeValue,ie=Se===void 0?[]:Se,q=T()(re,function(Y,X){return Y[ge.getFieldName("value")]===ie[X]},{childrenKeyName:this.getFieldName("children")});return q[q.length-2]?q[q.length-2][this.getFieldName("children")]:E(re).filter(function(Y){return!Y.disabled})}},{key:"getActiveOptions",value:function(ge){var te=this;return T()(this.props.options||[],function(re,Se){return re[te.getFieldName("value")]===ge[Se]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var ge=this.props,te=ge.prefixCls,re=ge.transitionName,Se=ge.popupClassName,ie=ge.options,q=ie===void 0?[]:ie,Y=ge.disabled,X=ge.builtinPlacements,he=ge.popupPlacement,fe=ge.children,xe=ge.dropdownRender,Ke=O(ge,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Ze=M.createElement("div",null),et="";q&&q.length>0?Ze=M.createElement(x,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):et=" ".concat(te,"-menus-empty");var st=Ze;return xe&&(st=xe(Ze)),M.createElement(g.a,Object.assign({ref:this.saveTrigger},Ke,{popupPlacement:he,builtinPlacements:X,popupTransitionName:re,action:Y?[]:["click"],popupVisible:Y?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(te,"-menus"),popupClassName:Se+et,popup:st}),M.cloneElement(fe,{onKeyDown:this.handleKeyDown,tabIndex:Y?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(ge,te){var re=te.prevProps,Se=re===void 0?{}:re,ie={prevProps:ge};return"value"in ge&&!y(Se.value,ge.value)&&(ie.value=ge.value||[],"loadData"in ge||(ie.activeValue=ge.value||[])),"popupVisible"in ge&&(ie.popupVisible=ge.popupVisible),ie}}]),le}(M.Component);return Oe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:p,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Oe}(),Re=Ce,me=J.a=Re},S6kV:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.mode.OFB=function(){var g=M.lib.BlockCipherMode.extend(),C=g.Encryptor=g.extend({processBlock:function(N,m){var v=this._cipher,T=v.blockSize,y=this._iv,t=this._keystream;y&&(t=this._keystream=y.slice(0),this._iv=void 0),v.encryptBlock(t,0);for(var h=0;h<T;h++)N[m+h]^=t[h]}});return g.Decryptor=C,g}(),M.mode.OFB})},"SA+Z":function(H,J,D){var M=D("wTVA"),g=D("EbDI"),C=D("ZhPi"),N=D("wkBT");function m(v){return M(v)||g(v)||C(v)||N()}H.exports=m,H.exports.__esModule=!0,H.exports.default=H.exports},SJMd:function(H,J){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var D,M,g,C=!1,N,m;window.PR_SHOULD_USE_CONTINUATION=!0;var v,T;(function(){var y=window,t=["break,continue,do,else,for,if,return,while"],h=[t,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],i=[h,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[i,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],a=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[i,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",d=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],f="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],o=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],r=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],x=[c,n,a,d,f,l,o,r],b=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,p="str",I="kwd",O="com",_="typ",E="lit",w="pun",S="pln",F="tag",P="dec",L="src",G="atn",z="atv",A="nocode",B="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var q=0,Y=!1,X=!1,he=0,fe=ie.length;he<fe;++he){var xe=ie[he];if(xe.ignoreCase)X=!0;else if(/[a-z]/i.test(xe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Y=!0,X=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function Ze(Fe){var Ie=Fe.charCodeAt(0);if(Ie!==92)return Ie;var ot=Fe.charAt(1);return Ie=Ke[ot],Ie||("0"<=ot&&ot<="7"?parseInt(Fe.substring(1),8):ot==="u"||ot==="x"?parseInt(Fe.substring(2),16):Fe.charCodeAt(1))}function et(Fe){if(Fe<32)return(Fe<16?"\\x0":"\\x")+Fe.toString(16);var Ie=String.fromCharCode(Fe);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function st(Fe){var Ie=Fe.substring(1,Fe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),ot=[],ft=Ie[0]==="^",Qe=["["];ft&&Qe.push("^");for(var tt=ft?1:0,Be=Ie.length;tt<Be;++tt){var ke=Ie[tt];if(/\\[bdsw]/i.test(ke))Qe.push(ke);else{var Ne=Ze(ke),Ee;tt+2<Be&&Ie[tt+1]==="-"?(Ee=Ze(Ie[tt+2]),tt+=2):Ee=Ne,ot.push([Ne,Ee]),Ee<65||Ne>122||(Ee<65||Ne>90||ot.push([Math.max(65,Ne)|32,Math.min(Ee,90)|32]),Ee<97||Ne>122||ot.push([Math.max(97,Ne)&~32,Math.min(Ee,122)&~32]))}}ot.sort(function(He,nt){return He[0]-nt[0]||nt[1]-He[1]});for(var Ae=[],Le=[],tt=0;tt<ot.length;++tt){var Me=ot[tt];Me[0]<=Le[1]+1?Le[1]=Math.max(Le[1],Me[1]):Ae.push(Le=Me)}for(var tt=0;tt<Ae.length;++tt){var Me=Ae[tt];Qe.push(et(Me[0])),Me[1]>Me[0]&&(Me[1]+1>Me[0]&&Qe.push("-"),Qe.push(et(Me[1])))}return Qe.push("]"),Qe.join("")}function ut(Fe){for(var Ie=Fe.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")),ot=Ie.length,ft=[],Qe=0,tt=0;Qe<ot;++Qe){var Be=Ie[Qe];if(Be==="(")++tt;else if(Be.charAt(0)==="\\"){var ke=+Be.substring(1);ke&&(ke<=tt?ft[ke]=-1:Ie[Qe]=et(ke))}}for(var Qe=1;Qe<ft.length;++Qe)ft[Qe]===-1&&(ft[Qe]=++q);for(var Qe=0,tt=0;Qe<ot;++Qe){var Be=Ie[Qe];if(Be==="(")++tt,ft[tt]||(Ie[Qe]="(?:");else if(Be.charAt(0)==="\\"){var ke=+Be.substring(1);ke&&ke<=tt&&(Ie[Qe]="\\"+ft[ke])}}for(var Qe=0;Qe<ot;++Qe)Ie[Qe]==="^"&&Ie[Qe+1]!=="^"&&(Ie[Qe]="");if(Fe.ignoreCase&&Y)for(var Qe=0;Qe<ot;++Qe){var Be=Ie[Qe],Ne=Be.charAt(0);Be.length>=2&&Ne==="["?Ie[Qe]=st(Be):Ne!=="\\"&&(Ie[Qe]=Be.replace(/[a-zA-Z]/g,function(Le){var Me=Le.charCodeAt(0);return"["+String.fromCharCode(Me&~32,Me|32)+"]"}))}return Ie.join("")}for(var dt=[],he=0,fe=ie.length;he<fe;++he){var xe=ie[he];if(xe.global||xe.multiline)throw new Error(""+xe);dt.push("(?:"+ut(xe)+")")}return new RegExp(dt.join("|"),X?"gi":"g")}function R(ie,q){var Y=/(?:^|\s)nocode(?:\s|$)/,X=[],he=0,fe=[],xe=0;function Ke(Ze){var et=Ze.nodeType;if(et==1){if(Y.test(Ze.className))return;for(var st=Ze.firstChild;st;st=st.nextSibling)Ke(st);var ut=Ze.nodeName.toLowerCase();(ut==="br"||ut==="li")&&(X[xe]=`
`,fe[xe<<1]=he++,fe[xe++<<1|1]=Ze)}else if(et==3||et==4){var dt=Ze.nodeValue;dt.length&&(q?dt=dt.replace(/\r\n?/g,`
`):dt=dt.replace(/[ \t\r\n]+/g," "),X[xe]=dt,fe[xe<<1]=he,he+=dt.length,fe[xe++<<1|1]=Ze)}}return Ke(ie),{sourceCode:X.join("").replace(/\n$/,""),spans:fe}}function K(ie,q,Y,X,he){if(!Y)return;var fe={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:Y,spans:null,basePos:q,decorations:null};X(fe),he.push.apply(he,fe.decorations)}var Z=/\S/;function ue(ie){for(var q=void 0,Y=ie.firstChild;Y;Y=Y.nextSibling){var X=Y.nodeType;q=X===1?q?ie:Y:X===3&&Z.test(Y.nodeValue)?ie:q}return q===ie?void 0:q}function de(ie,q){var Y={},X;(function(){for(var xe=ie.concat(q),Ke=[],Ze={},et=0,st=xe.length;et<st;++et){var ut=xe[et],dt=ut[3];if(dt)for(var Fe=dt.length;--Fe>=0;)Y[dt.charAt(Fe)]=ut;var Ie=ut[1],ot=""+Ie;Ze.hasOwnProperty(ot)||(Ke.push(Ie),Ze[ot]=null)}Ke.push(/[\0-\uffff]/),X=U(Ke)})();var he=q.length,fe=function(xe){for(var Ke=xe.sourceCode,Ze=xe.basePos,et=xe.sourceNode,st=[Ze,S],ut=0,dt=Ke.match(X)||[],Fe={},Ie=0,ot=dt.length;Ie<ot;++Ie){var ft=dt[Ie],Qe=Fe[ft],tt=void 0,Be;if(typeof Qe=="string")Be=!1;else{var ke=Y[ft.charAt(0)];if(ke)tt=ft.match(ke[1]),Qe=ke[0];else{for(var Ne=0;Ne<he;++Ne)if(ke=q[Ne],tt=ft.match(ke[1]),tt){Qe=ke[0];break}tt||(Qe=S)}Be=Qe.length>=5&&Qe.substring(0,5)==="lang-",Be&&!(tt&&typeof tt[1]=="string")&&(Be=!1,Qe=L),Be||(Fe[ft]=Qe)}var Ee=ut;if(ut+=ft.length,!Be)st.push(Ze+Ee,Qe);else{var Ae=tt[1],Le=ft.indexOf(Ae),Me=Le+Ae.length;tt[2]&&(Me=ft.length-tt[2].length,Le=Me-Ae.length);var He=Qe.substring(5);K(et,Ze+Ee,ft.substring(0,Le),fe,st),K(et,Ze+Ee+Le,Ae,le(He,Ae),st),K(et,Ze+Ee+Me,ft.substring(Me),fe,st)}}xe.decorations=st};return fe}function Ce(ie){var q=[],Y=[];ie.tripleQuotedStrings?q.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?q.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&Y.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=ie.hashComments;X&&(ie.cStyleComments?(X>1?q.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Y.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([O,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(Y.push([O,/^\/\/[^\r\n]*/,null]),Y.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var he=ie.regexLiterals;if(he){var fe=he>1?"":`
\r`,xe=fe?".":"[\\S\\s]",Ke="/(?=[^/*"+fe+"])(?:[^/\\x5B\\x5C"+fe+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+fe+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+B+"("+Ke+")")])}var Ze=ie.types;Ze&&Y.push([_,Ze]);var et=(""+ie.keywords).replace(/^ | $/g,"");et.length&&Y.push([I,new RegExp("^(?:"+et.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([S,/^\s+/,null,` \r
\xA0`]);var st="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(st+="(?!s*/)"),Y.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[S,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[S,/^\\[\s\S]?/,null],[w,new RegExp(st),null]),de(q,Y)}var Re=Ce({keywords:x,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function me(ie,q,Y){for(var X=/(?:^|\s)nocode(?:\s|$)/,he=/\r\n?|\n/,fe=ie.ownerDocument,xe=fe.createElement("li");ie.firstChild;)xe.appendChild(ie.firstChild);var Ke=[xe];function Ze(Ie){var ot=Ie.nodeType;if(ot==1&&!X.test(Ie.className))if(Ie.nodeName==="br")et(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var ft=Ie.firstChild;ft;ft=ft.nextSibling)Ze(ft);else if((ot==3||ot==4)&&Y){var Qe=Ie.nodeValue,tt=Qe.match(he);if(tt){var Be=Qe.substring(0,tt.index);Ie.nodeValue=Be;var ke=Qe.substring(tt.index+tt[0].length);if(ke){var Ne=Ie.parentNode;Ne.insertBefore(fe.createTextNode(ke),Ie.nextSibling)}et(Ie),Be||Ie.parentNode.removeChild(Ie)}}}function et(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function ot(tt,Be){var ke=Be?tt.cloneNode(!1):tt,Ne=tt.parentNode;if(Ne){var Ee=ot(Ne,1),Ae=tt.nextSibling;Ee.appendChild(ke);for(var Le=Ae;Le;Le=Ae)Ae=Le.nextSibling,Ee.appendChild(Le)}return ke}for(var ft=ot(Ie.nextSibling,0),Qe;(Qe=ft.parentNode)&&Qe.nodeType===1;)ft=Qe;Ke.push(ft)}for(var st=0;st<Ke.length;++st)Ze(Ke[st]);q===(q|0)&&Ke[0].setAttribute("value",q);var ut=fe.createElement("ol");ut.className="linenums";for(var dt=Math.max(0,q-1|0)||0,st=0,Fe=Ke.length;st<Fe;++st)xe=Ke[st],xe.className="L"+(st+dt)%10,xe.firstChild||xe.appendChild(fe.createTextNode("\xA0")),ut.appendChild(xe);ie.appendChild(ut)}function Oe(ie){var q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);q=q&&+q[1]<=8;var Y=/\n/g,X=ie.sourceCode,he=X.length,fe=0,xe=ie.spans,Ke=xe.length,Ze=0,et=ie.decorations,st=et.length,ut=0;et[st]=he;var dt,Fe;for(Fe=dt=0;Fe<st;)et[Fe]!==et[Fe+2]?(et[dt++]=et[Fe++],et[dt++]=et[Fe++]):Fe+=2;for(st=dt,Fe=dt=0;Fe<st;){for(var Ie=et[Fe],ot=et[Fe+1],ft=Fe+2;ft+2<=st&&et[ft+1]===ot;)ft+=2;et[dt++]=Ie,et[dt++]=ot,Fe=ft}st=et.length=dt;var Qe=ie.sourceNode,tt="";Qe&&(tt=Qe.style.display,Qe.style.display="none");try{for(var Be=null;Ze<Ke;){var ke=xe[Ze],Ne=xe[Ze+2]||he,Ee=et[ut+2]||he,ft=Math.min(Ne,Ee),Ae=xe[Ze+1],Le;if(Ae.nodeType!==1&&(Le=X.substring(fe,ft))){q&&(Le=Le.replace(Y,"\r")),Ae.nodeValue=Le;var Me=Ae.ownerDocument,He=Me.createElement("span");He.className=et[ut+1];var nt=Ae.parentNode;nt.replaceChild(He,Ae),He.appendChild(Ae),fe<Ne&&(xe[Ze+1]=Ae=Me.createTextNode(X.substring(ft,Ne)),nt.insertBefore(Ae,He.nextSibling))}fe=ft,fe>=Ne&&(Ze+=2),fe>=Ee&&(ut+=2)}}finally{Qe&&(Qe.style.display=tt)}}var be={};function ce(ie,q){for(var Y=q.length;--Y>=0;){var X=q[Y];be.hasOwnProperty(X)?y.console&&console.warn("cannot override language handler %s",X):be[X]=ie}}function le(ie,q){return ie&&be.hasOwnProperty(ie)||(ie=/^\s*</.test(q)?"default-markup":"default-code"),be[ie]}ce(Re,["default-code"]),ce(de([],[[S,/^[^<?]+/],[P,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[w,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ce(de([[S,/^[\s]+/,null,` \r
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[w,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ce(de([],[[z,/^[\s\S]+/]]),["uq.val"]),ce(Ce({keywords:c,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),ce(Ce({keywords:"null,true,false"}),["json"]),ce(Ce({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),ce(Ce({keywords:a,cStyleComments:!0}),["java"]),ce(Ce({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ce(Ce({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ce(Ce({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ce(Ce({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ce(Ce({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ce(Ce({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ce(de([],[[p,/^[\s\S]+/]]),["regex"]);function ne(ie){var q=ie.langExtension;try{var Y=R(ie.sourceNode,ie.pre),X=Y.sourceCode;ie.sourceCode=X,ie.spans=Y.spans,ie.basePos=0,le(q,X)(ie),Oe(ie)}catch(he){y.console&&console.log(he&&he.stack||he)}}function ge(ie,q,Y){var X=Y||!1,he=q||null,fe=document.createElement("div");fe.innerHTML="<pre>"+ie+"</pre>",fe=fe.firstChild,X&&me(fe,X,!0);var xe={langExtension:he,numberLines:X,sourceNode:fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ne(xe),fe.innerHTML}function te(ie,q){var Y=q||document.body,X=Y.ownerDocument||document;function he(ke){return Y.getElementsByTagName(ke)}for(var fe=[he("pre"),he("code"),he("xmp")],xe=[],Ke=0;Ke<fe.length;++Ke)for(var Ze=0,et=fe[Ke].length;Ze<et;++Ze)xe.push(fe[Ke][Ze]);fe=null;var st=Date;st.now||(st={now:function(){return+new Date}});var ut=0,dt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Fe=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,ot=/pre|xmp/i,ft=/^code$/i,Qe=/^(?:pre|code|xmp)$/i,tt={};function Be(){for(var ke=y.PR_SHOULD_USE_CONTINUATION?st.now()+250:Infinity;ut<xe.length&&st.now()<ke;ut++){for(var Ne=xe[ut],Ee=tt,Ae=Ne;Ae=Ae.previousSibling;){var Le=Ae.nodeType,Me=(Le===7||Le===8)&&Ae.nodeValue;if(Me?!/^\??prettify\b/.test(Me):Le!==3||/\S/.test(Ae.nodeValue))break;if(Me){Ee={},Me.replace(/\b(\w+)=([\w:.%+-]+)/g,function(bn,Ar,fn){Ee[Ar]=fn});break}}var He=Ne.className;if((Ee!==tt||Fe.test(He))&&!Ie.test(He)){for(var nt=!1,vt=Ne.parentNode;vt;vt=vt.parentNode){var bt=vt.tagName;if(Qe.test(bt)&&vt.className&&Fe.test(vt.className)){nt=!0;break}}if(!nt){Ne.className+=" prettyprinted";var Wt=Ee.lang;if(!Wt){Wt=He.match(dt);var Bt;!Wt&&(Bt=ue(Ne))&&ft.test(Bt.tagName)&&(Wt=Bt.className.match(dt)),Wt&&(Wt=Wt[1])}var lr;if(ot.test(Ne.tagName))lr=1;else{var dr=Ne.currentStyle,Ot=X.defaultView,Vr=dr?dr.whiteSpace:Ot&&Ot.getComputedStyle?Ot.getComputedStyle(Ne,null).getPropertyValue("white-space"):0;lr=Vr&&Vr.substring(0,3)==="pre"}var Wr=Ee.linenums;(Wr=Wr==="true"||+Wr)||(Wr=He.match(/\blinenums\b(?::(\d+))?/),Wr=Wr?Wr[1]&&Wr[1].length?+Wr[1]:!0:!1),Wr&&me(Ne,Wr,lr);var Yr={langExtension:Wt,sourceNode:Ne,numberLines:Wr,pre:lr,sourceCode:null,basePos:null,spans:null,decorations:null};ne(Yr)}}}ut<xe.length?y.setTimeout(Be,250):typeof ie=="function"&&ie()}Be()}var re=y.PR={createSimpleLexer:de,registerLangHandler:ce,sourceDecorator:Ce,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:z,PR_COMMENT:O,PR_DECLARATION:P,PR_KEYWORD:I,PR_LITERAL:E,PR_NOCODE:A,PR_PLAIN:S,PR_PUNCTUATION:w,PR_SOURCE:L,PR_STRING:p,PR_TAG:F,PR_TYPE:_,prettyPrintOne:C?y.prettyPrintOne=ge:v=ge,prettyPrint:T=C?y.prettyPrint=te:T=te},Se=y.define;typeof Se=="function"&&Se.amd&&Se("google-code-prettify",[],function(){return re})})()},Sjjz:function(H,J,D){H.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},T8No:function(H,J,D){"use strict";D.d(J,"a",function(){return T}),D.d(J,"e",function(){return y}),D.d(J,"c",function(){return w}),D.d(J,"b",function(){return S}),D.d(J,"d",function(){return F}),D.d(J,"f",function(){return G});var M=D("MNsG"),g=D("N0LK"),C=D("Cg/j");let N=M.k||"";const m=new Map;m.set("false",!1),m.set("true",!0),m.set("isMac",M.f),m.set("isLinux",M.d),m.set("isWindows",M.i),m.set("isWeb",M.h),m.set("isMacNative",M.f&&!M.h),m.set("isEdge",N.indexOf("Edg/")>=0),m.set("isFirefox",N.indexOf("Firefox")>=0),m.set("isChrome",N.indexOf("Chrome")>=0),m.set("isSafari",N.indexOf("Safari")>=0);const v=Object.prototype.hasOwnProperty;class T{static has(A){return c.create(A)}static equals(A,B){return a.create(A,B)}static regex(A,B){return p.create(A,B)}static not(A){return f.create(A)}static and(...A){return _.create(A,null)}static or(...A){return E.create(A,null,!0)}static deserialize(A,B=!1){return A?this._deserializeOrExpression(A,B):void 0}static _deserializeOrExpression(A,B){let U=A.split("||");return E.create(U.map(R=>this._deserializeAndExpression(R,B)),null,!0)}static _deserializeAndExpression(A,B){let U=A.split("&&");return _.create(U.map(R=>this._deserializeOne(R,B)),null)}static _deserializeOne(A,B){if(A=A.trim(),A.indexOf("!=")>=0){let U=A.split("!=");return d.create(U[0].trim(),this._deserializeValue(U[1],B))}if(A.indexOf("==")>=0){let U=A.split("==");return a.create(U[0].trim(),this._deserializeValue(U[1],B))}if(A.indexOf("=~")>=0){let U=A.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],B))}if(A.indexOf(" in ")>=0){let U=A.split(" in ");return n.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(A)){const U=A.split(">=");return r.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(A)){const U=A.split(">");return o.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(A)){const U=A.split("<=");return b.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(A)){const U=A.split("<");return x.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(A)?f.create(A.substr(1).trim()):c.create(A)}static _deserializeValue(A,B){if(A=A.trim(),A==="true")return!0;if(A==="false")return!1;let U=/^'([^']*)'$/.exec(A);return U?U[1].trim():A}static _deserializeRegexValue(A,B){if(Object(g.C)(A)){if(B)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=A.indexOf("/"),R=A.lastIndexOf("/");if(U===R||U<0){if(B)throw new Error(`bad regexp-value '${A}', missing /-enclosure`);return console.warn(`bad regexp-value '${A}', missing /-enclosure`),null}let K=A.slice(U+1,R),Z=A[R+1]==="i"?"i":"";try{return new RegExp(K,Z)}catch(ue){if(B)throw new Error(`bad regexp-value '${A}', parse error: ${ue}`);return console.warn(`bad regexp-value '${A}', parse error: ${ue}`),null}}}function y(A,B){const U=A?A.substituteConstants():void 0,R=B?B.substituteConstants():void 0;return!U&&!R?!0:!U||!R?!1:U.equals(R)}function t(A,B){return A.cmp(B)}class h{constructor(){this.type=0}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!1}serialize(){return"false"}keys(){return[]}negate(){return i.INSTANCE}}h.INSTANCE=new h;class i{constructor(){this.type=1}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}i.INSTANCE=new i;class c{constructor(A,B){this.key=A,this.negated=B,this.type=2}static create(A,B=null){const U=m.get(A);return typeof U=="boolean"?U?i.INSTANCE:h.INSTANCE:new c(A,B)}cmp(A){return A.type!==this.type?this.type-A.type:P(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=m.get(this.key);return typeof A=="boolean"?A?i.INSTANCE:h.INSTANCE:this}evaluate(A){return!!A.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}class a{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=4}static create(A,B,U=null){if(typeof B=="boolean")return B?c.create(A,U):f.create(A,U);const R=m.get(A);if(typeof R=="boolean"){const K=R?"true":"false";return B===K?i.INSTANCE:h.INSTANCE}return new a(A,B,U)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=m.get(this.key);if(typeof A=="boolean"){const B=A?"true":"false";return this.value===B?i.INSTANCE:h.INSTANCE}return this}evaluate(A){return A.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}class n{constructor(A,B){this.key=A,this.valueKey=B,this.type=10,this.negated=null}static create(A,B){return new n(A,B)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.valueKey,A.key,A.valueKey)}equals(A){return A.type===this.type?this.key===A.key&&this.valueKey===A.valueKey:!1}substituteConstants(){return this}evaluate(A){const B=A.getValue(this.valueKey),U=A.getValue(this.key);return Array.isArray(B)?B.indexOf(U)>=0:typeof U=="string"&&typeof B=="object"&&B!==null?v.call(B,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(A){this._actual=A,this.type=11}static create(A){return new s(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class d{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=5}static create(A,B,U=null){if(typeof B=="boolean")return B?f.create(A,U):c.create(A,U);const R=m.get(A);if(typeof R=="boolean"){const K=R?"true":"false";return B===K?h.INSTANCE:i.INSTANCE}return new d(A,B,U)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=m.get(this.key);if(typeof A=="boolean"){const B=A?"true":"false";return this.value===B?h.INSTANCE:i.INSTANCE}return this}evaluate(A){return A.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class f{constructor(A,B){this.key=A,this.negated=B,this.type=3}static create(A,B=null){const U=m.get(A);return typeof U=="boolean"?U?h.INSTANCE:i.INSTANCE:new f(A,B)}cmp(A){return A.type!==this.type?this.type-A.type:P(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=m.get(this.key);return typeof A=="boolean"?A?h.INSTANCE:i.INSTANCE:this}evaluate(A){return!A.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}function l(A,B){if(typeof A=="string"){const U=parseFloat(A);isNaN(U)||(A=U)}return typeof A=="string"||typeof A=="number"?B(A):h.INSTANCE}class o{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=12}static create(A,B,U=null){return l(B,R=>new o(A,R,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class r{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=13}static create(A,B,U=null){return l(B,R=>new r(A,R,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}class x{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=14}static create(A,B,U=null){return l(B,R=>new x(A,R,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class b{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=15}static create(A,B,U=null){return l(B,R=>new b(A,R,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class p{constructor(A,B){this.key=A,this.regexp=B,this.type=7,this.negated=null}static create(A,B){return new p(A,B)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.key<A.key)return-1;if(this.key>A.key)return 1;const B=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return B<U?-1:B>U?1:0}equals(A){if(A.type===this.type){const B=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return this.key===A.key&&B===U}return!1}substituteConstants(){return this}evaluate(A){let B=A.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const A=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${A}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this)),this.negated}}class I{constructor(A){this._actual=A,this.type=8}static create(A){return new I(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(A){let B=null;for(let U=0,R=A.length;U<R;U++){const K=A[U].substituteConstants();if(A[U]!==K&&B===null){B=[];for(let Z=0;Z<U;Z++)B[Z]=A[Z]}B!==null&&(B[U]=K)}return B===null?A:B}class _{constructor(A,B){this.expr=A,this.negated=B,this.type=6}static create(A,B){return _._normalizeArr(A,B)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let B=0,U=this.expr.length;B<U;B++){const R=t(this.expr[B],A.expr[B]);if(R!==0)return R}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].equals(A.expr[B]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:_.create(A,this.negated)}evaluate(A){for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].evaluate(A))return!1;return!0}static _normalizeArr(A,B){const U=[];let R=!1;for(const K of A){if(!K)continue;if(K.type===1){R=!0;continue}if(K.type===0)return h.INSTANCE;if(K.type===6){U.push(...K.expr);continue}U.push(K)}if(U.length===0&&R)return i.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(t);for(let K=1;K<U.length;K++)U[K-1].equals(U[K])&&(U.splice(K,1),K--);if(U.length===1)return U[0];for(;U.length>1;){const K=U[U.length-1];if(K.type!==9)break;U.pop();const Z=U.pop(),ue=U.length===0,de=E.create(K.expr.map(Ce=>_.create([Ce,Z],null)),null,ue);de&&(U.push(de),U.sort(t))}return U.length===1?U[0]:new _(U,B)}serialize(){return this.expr.map(A=>A.serialize()).join(" && ")}keys(){const A=[];for(let B of this.expr)A.push(...B.keys());return A}negate(){if(!this.negated){const A=[];for(let B of this.expr)A.push(B.negate());this.negated=E.create(A,this,!0)}return this.negated}}class E{constructor(A,B){this.expr=A,this.negated=B,this.type=9}static create(A,B,U){return E._normalizeArr(A,B,U)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let B=0,U=this.expr.length;B<U;B++){const R=t(this.expr[B],A.expr[B]);if(R!==0)return R}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].equals(A.expr[B]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:E.create(A,this.negated,!1)}evaluate(A){for(let B=0,U=this.expr.length;B<U;B++)if(this.expr[B].evaluate(A))return!0;return!1}static _normalizeArr(A,B,U){let R=[],K=!1;if(A){for(let Z=0,ue=A.length;Z<ue;Z++){const de=A[Z];if(!de)continue;if(de.type===0){K=!0;continue}if(de.type===1)return i.INSTANCE;if(de.type===9){R=R.concat(de.expr);continue}R.push(de)}if(R.length===0&&K)return h.INSTANCE;R.sort(t)}if(R.length===0)return;if(R.length===1)return R[0];for(let Z=1;Z<R.length;Z++)R[Z-1].equals(R[Z])&&(R.splice(Z,1),Z--);if(R.length===1)return R[0];if(U){for(let Z=0;Z<R.length;Z++)for(let ue=Z+1;ue<R.length;ue++)G(R[Z],R[ue])&&(R.splice(ue,1),ue--);if(R.length===1)return R[0]}return new E(R,B)}serialize(){return this.expr.map(A=>A.serialize()).join(" || ")}keys(){const A=[];for(let B of this.expr)A.push(...B.keys());return A}negate(){if(!this.negated){let A=[];for(let B of this.expr)A.push(B.negate());for(;A.length>1;){const B=A.shift(),U=A.shift(),R=[];for(const Z of z(B))for(const ue of z(U))R.push(_.create([Z,ue],null));const K=A.length===0;A.unshift(E.create(R,null,K))}this.negated=A[0]}return this.negated}}class w extends c{constructor(A,B,U){super(A,null);this._defaultValue=B,typeof U=="object"?w._info.push(Object.assign(Object.assign({},U),{key:A})):U!==!0&&w._info.push({key:A,description:U,type:B!=null?typeof B:void 0})}static all(){return w._info.values()}bindTo(A){return A.createKey(this.key,this._defaultValue)}getValue(A){return A.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(A){return a.create(this.key,A)}}w._info=[];const S=Object(C.c)("contextKeyService"),F="setContext";function P(A,B){return A<B?-1:A>B?1:0}function L(A,B,U,R){return A<U?-1:A>U?1:B<R?-1:B>R?1:0}function G(A,B){if(B.type===6&&A.type!==9&&A.type!==6){for(const K of B.expr)if(A.equals(K))return!0}const U=A.negate(),R=z(U).concat(z(B));R.sort(t);for(let K=0;K<R.length;K++){const Z=R[K],ue=Z.negate();for(let de=K+1;de<R.length;de++){const Ce=R[de];if(ue.equals(Ce))return!0}}return!1}function z(A){return A.type===9?A.expr:[A]}},TXwP:function(H,J,D){var M,g;(function(){var C;(function(){"use strict";var m=[,,function(t){function h(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var a=new h(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},h.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},h.prototype.has_match=function(a){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(a))return!0;return!1},h.prototype.set_indent=function(a,n){this.is_empty()&&(this.__indent_count=a||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 a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__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(a){this.__items.push(a);var n=a.lastIndexOf(`
`);n!==-1?this.__character_count=a.length-n:this.__character_count+=a.length},h.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},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 a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function i(a,n){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),n=n||"",a.indent_level>0&&(n=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}i.prototype.get_indent_size=function(a,n){var s=this.__base_string_length;return n=n||0,a<0&&(s=0),s+=a*this.__indent_size,s+=n,s},i.prototype.get_indent_string=function(a,n){var s=this.__base_string;return n=n||0,a<0&&(a=0,s=""),n+=a*this.__indent_size,this.__ensure_cache(n),s+=this.__cache[n],s},i.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var a=this.__cache.length,n=0,s="";this.__indent_size&&a>=this.__indent_size&&(n=Math.floor(a/this.__indent_size),a-=n*this.__indent_size,s=new Array(n+1).join(this.__indent_string)),a&&(s+=new Array(a+1).join(" ")),this.__cache.push(s)};function c(a,n){this.__indent_cache=new i(a,n),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.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(a,n){return this.__indent_cache.get_indent_string(a,n)},c.prototype.get_indent_size=function(a,n){return this.__indent_cache.get_indent_size(a,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(a){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return a!==`
`&&(s=s.replace(/[\n]/g,a)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(a,n){return a=a||0,n=n||0,this.next_line.set_indent(a,n),this.__lines.length>1?(this.current_line.set_indent(a,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(a){for(var n=0;n<a.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(a){for(var n=this.__lines.length;a<n;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(a,n){for(var s=this.__lines.length-2;s>=0;){var d=this.__lines[s];if(d.is_empty())break;if(d.item(0).indexOf(a)!==0&&d.item(-1)!==n){this.__lines.splice(s+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},,,,function(t){function h(a,n){this.raw_options=i(a,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(a,n){var s=this.raw_options[a],d=n||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(d=s.concat()):typeof s=="string"&&(d=s.split(/[^a-zA-Z0-9_\/\-]+/)),d},h.prototype._get_boolean=function(a,n){var s=this.raw_options[a],d=s===void 0?!!n:!!s;return d},h.prototype._get_characters=function(a,n){var s=this.raw_options[a],d=n||"";return typeof s=="string"&&(d=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},h.prototype._get_number=function(a,n){var s=this.raw_options[a];n=parseInt(n,10),isNaN(n)&&(n=0);var d=parseInt(s,10);return isNaN(d)&&(d=n),d},h.prototype._get_selection=function(a,n,s){var d=this._get_selection_list(a,n,s);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[a]+"'");return d[0]},h.prototype._get_selection_list=function(a,n,s){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[n[0]],!this._is_valid_selection(s,n))throw new Error("Invalid Default Value!");var d=this._get_array(a,s);if(!this._is_valid_selection(d,n))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[a]+"'");return d},h.prototype._is_valid_selection=function(a,n){return a.length&&n.length&&!a.some(function(s){return n.indexOf(s)===-1})};function i(a,n){var s={};a=c(a);var d;for(d in a)d!==n&&(s[d]=a[d]);if(n&&a[n])for(d in a[n])s[d]=a[n][d];return s}function c(a){var n={},s;for(s in a){var d=s.replace(/-/g,"_");n[d]=a[s]}return n}t.exports.Options=h,t.exports.normalizeOpts=c,t.exports.mergeOpts=i},,function(t){var h=RegExp.prototype.hasOwnProperty("sticky");function i(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},i.prototype.peek=function(c){var a=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(a=this.__input.charAt(c)),a},i.prototype.__match=function(c,a){c.lastIndex=a;var n=c.exec(this.__input);return n&&!(h&&c.sticky)&&(n.index!==a&&(n=null)),n},i.prototype.test=function(c,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(c,a):!1},i.prototype.testChar=function(c,a){var n=this.peek(a);return c.lastIndex=0,n!==null&&c.test(n)},i.prototype.match=function(c){var a=this.__match(c,this.__position);return a?this.__position+=a[0].length:a=null,a},i.prototype.read=function(c,a,n){var s="",d;return c&&(d=this.match(c),d&&(s+=d[0])),a&&(d||!c)&&(s+=this.readUntil(a,n)),s},i.prototype.readUntil=function(c,a){var n="",s=this.__position;c.lastIndex=this.__position;var d=c.exec(this.__input);return d?(s=d.index,a&&(s+=d[0].length)):s=this.__input_length,n=this.__input.substring(this.__position,s),this.__position=s,n},i.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},i.prototype.get_regexp=function(c,a){var n=null,s="g";return a&&h&&(s="y"),typeof c=="string"&&c!==""?n=new RegExp(c,s):c&&(n=new RegExp(c.source,s)),n},i.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(c){var a=this.__position,n=this.readUntilAfter(c);return this.__position=a,n},i.prototype.lookBack=function(c){var a=this.__position-1;return a>=c.length&&this.__input.substring(a-c.length,a).toLowerCase()===c},t.exports.InputScanner=i},,,,,function(t){function h(i,c){i=typeof i=="string"?i:i.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(i);a;)c[a[1]]=a[2],a=this.__directive_pattern.exec(i);return c},h.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=h},,function(t,h,i){var c=i(16).Beautifier,a=i(17).Options;function n(s,d){var f=new c(s,d);return f.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new a}},function(t,h,i){var c=i(17).Options,a=i(2).Output,n=i(8).InputScanner,s=i(13).Directives,d=new s(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,o=/\s/,r=/(?:\s|\n)+/g,x=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(I,O){this._source_text=I||"",this._options=new c(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(I){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(I.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return O},p.prototype.eatWhitespace=function(I){for(var O=o.test(this._input.peek()),_=0;o.test(this._input.peek());)this._ch=this._input.next(),I&&this._ch===`
`&&((_===0||_<this._options.max_preserve_newlines)&&(_++,this._output.add_new_line(!0)));return O},p.prototype.foundNestedPseudoClass=function(){for(var I=0,O=1,_=this._input.peek(O);_;){if(_==="{")return!0;if(_==="(")I+=1;else if(_===")"){if(I===0)return!1;I-=1}else if(_===";"||_==="}")return!1;O++,_=this._input.peek(O)}return!1},p.prototype.print_string=function(I){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(I)},p.prototype.preserveSingleSpace=function(I){I&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var I=this._source_text,O=this._options.eol;O==="auto"&&(O=`
`,I&&f.test(I||"")&&(O=I.match(f)[0])),I=I.replace(l,`
`);var _=I.match(/^[\t ]*/)[0];this._output=new a(this._options,_),this._input=new n(I),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var E=0,w=!1,S=!1,F=!1,P=!1,L=!1,G=!1,z=this._ch,A=!1,B,U,R;B=this._input.read(r),U=B!=="",R=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(x),Z=d.get_directives(K);Z&&Z.ignore==="start"&&(K+=d.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(b)),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 ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s$/,""),this.print_string(ue),this._output.space_before_token=!0),ue=ue.replace(/\s$/,""),ue==="extend"?P=!0:ue==="import"&&(L=!0),ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,ue in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!w&&E===0&&ue.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,w=this._indentLevel>=this._nestedLevel):w=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&w&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(R==="("?this._output.space_before_token=!1:R!==","&&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(),R==="{"&&this._output.trim(!0),L=!1,P=!1,S&&(this.outdent(),S=!1),this.print_string(this._ch),w=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var de=0;de<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;de++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[de])){A=!0;break}(w||F)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!P&&E===0?(this.print_string(":"),S||(S=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ce=R==='"'||R==="'";this.preserveSingleSpace(Ce||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")A=!1,E===0?(S&&(this.outdent(),S=!1),P=!1,L=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),E++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),E&&(E--,this.outdent()));else{var Re=!1;this._input.lookBack("with")&&(Re=!0),this.preserveSingleSpace(U||Re),this.print_string(this._ch),S&&R==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),G=!0):(this.eatWhitespace(),E++,this.indent())}else if(this._ch===")")E&&(E--,this.outdent()),G&&this._input.peek()===";"&&this._options.selector_separator_newline&&(G=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!S||G)&&E===0&&!L&&!P?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!S&&E===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&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 me=R==='"'||R==="'";this.preserveSingleSpace(me||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&A&&this._output.add_new_line()}var Oe=this._output.get_code(O);return Oe},t.exports.Beautifier=p},function(t,h,i){var c=i(6).Options;function a(n){c.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f<d.length;f++)d[f]!=="expand"?this.brace_style="collapse":this.brace_style=d[f]}a.prototype=new c,t.exports.Options=a}],v={};function T(t){var h=v[t];if(h!==void 0)return h.exports;var i=v[t]={exports:{}};return m[t](i,i.exports,T),i.exports}var y=T(15);C=y})();var N=C;!(M=[],g=function(){return{css_beautify:N}}.apply(J,M),g!==void 0&&(H.exports=g))})()},UfjD:function(H,J,D){"use strict";var M=D("2qtc"),g=D("kLXV"),C=D("5NDa"),N=D("5rEg"),m=D("miYZ"),v=D("tsqr"),T=D("tJVT"),y=D("q1tI"),t=D.n(y),h=D("4i/N");function i(c){var a=c.isjoin,n=c.setJoin,s=c.JoinTeams,d=Object(y.useState)(""),f=Object(T.a)(d,2),l=f[0],o=f[1];return t.a.createElement(g.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),t.a.createElement(h.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:a,closable:!1,destroyOnClose:!0,onOk:function(){if(!l){v.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}s(l)},onCancel:function(){return n(!1)}},t.a.createElement("div",null,t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},t.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",t.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:l,maxLength:60,addonAfter:String(l&&l.length||0)+"/60",onChange:function(x){return o(x.target.value)}}))))}J.a=i},Vhoy:function(H,J,D){"use strict";D.d(J,"d",function(){return N}),D.d(J,"e",function(){return m}),D.d(J,"c",function(){return v}),D.d(J,"b",function(){return T}),D.d(J,"a",function(){return y});var M=D("MI8n");class g{constructor(){this._icons=new Map,this._onDidRegister=new M.b}add(t){const h=this._icons.get(t.id);h?t.description?h.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const C=new g,N=C;function m(t,h){return new T(t,h)}function v(t){return t?t.replace(/\$\((.*?)\)/g,(h,i)=>` ${i} `).trim():""}class T{constructor(t,h,i){this.id=t,this.definition=h,this.description=i,C.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var y;(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 i(n){if(n instanceof T)return["codicon","codicon-"+n.id];const s=h.exec(n.id);if(!s)return i(T.error);let[,d,f]=s;const l=["codicon","codicon-"+d];return f&&l.push("codicon-modifier-"+f.substr(1)),l}t.asClassNameArray=i;function c(n){return i(n).join(" ")}t.asClassName=c;function a(n){return"."+i(n).join(".")}t.asCSSSelector=a})(y||(y={})),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(H,J,D){(function(M,g){H.exports=g()})(this,function(){"use strict";var M=navigator.userAgent,g=navigator.platform,C=/gecko\/\d/i.test(M),N=/MSIE \d/.test(M),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(M),v=/Edge\/(\d+)/.exec(M),T=N||m||v,y=T&&(N?document.documentMode||6:+(v||m)[1]),t=!v&&/WebKit\//.test(M),h=t&&/Qt\/\d+\.\d+/.test(M),i=!v&&/Chrome\//.test(M),c=/Opera\//.test(M),a=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(M),s=/PhantomJS/.test(M),d=!v&&/AppleWebKit/.test(M)&&/Mobile\/\w+/.test(M),f=/Android/.test(M),l=d||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(M),o=d||/Mac/.test(g),r=/\bCrOS\b/.test(M),x=/win/i.test(g),b=c&&M.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(c=!1,t=!0);var p=o&&(h||c&&(b==null||b<12.11)),I=C||T&&y>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _=function(e,u){var j=e.className,k=O(u).exec(j);if(k){var W=j.slice(k.index+k[0].length);e.className=j.slice(0,k.index)+(W?k[1]+W:"")}};function E(e){for(var u=e.childNodes.length;u>0;--u)e.removeChild(e.firstChild);return e}function w(e,u){return E(e).appendChild(u)}function S(e,u,j,k){var W=document.createElement(e);if(j&&(W.className=j),k&&(W.style.cssText=k),typeof u=="string")W.appendChild(document.createTextNode(u));else if(u)for(var Q=0;Q<u.length;++Q)W.appendChild(u[Q]);return W}function F(e,u,j,k){var W=S(e,u,j,k);return W.setAttribute("role","presentation"),W}var P;document.createRange?P=function(e,u,j,k){var W=document.createRange();return W.setEnd(k||e,j),W.setStart(e,u),W}:P=function(e,u,j){var k=document.body.createTextRange();try{k.moveToElementText(e.parentNode)}catch(W){return k}return k.collapse(!0),k.moveEnd("character",j),k.moveStart("character",u),k};function L(e,u){if(u.nodeType==3&&(u=u.parentNode),e.contains)return e.contains(u);do if(u.nodeType==11&&(u=u.host),u==e)return!0;while(u=u.parentNode)}function G(){var e;try{e=document.activeElement}catch(u){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function z(e,u){var j=e.className;O(u).test(j)||(e.className+=(j?" ":"")+u)}function A(e,u){for(var j=e.split(" "),k=0;k<j.length;k++)j[k]&&!O(j[k]).test(u)&&(u+=" "+j[k]);return u}var B=function(e){e.select()};d?B=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:T&&(B=function(e){try{e.select()}catch(u){}});function U(e){var u=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,u)}}function R(e,u,j){u||(u={});for(var k in e)e.hasOwnProperty(k)&&(j!==!1||!u.hasOwnProperty(k))&&(u[k]=e[k]);return u}function K(e,u,j,k,W){u==null&&(u=e.search(/[^\s\u00a0]/),u==-1&&(u=e.length));for(var Q=k||0,ae=W||0;;){var pe=e.indexOf(" ",Q);if(pe<0||pe>=u)return ae+(u-Q);ae+=pe-Q,ae+=j-ae%j,Q=pe+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};Z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Z.prototype.set=function(e,u){this.f=u;var j=+new Date+e;(!this.id||j<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=j)};function ue(e,u){for(var j=0;j<e.length;++j)if(e[j]==u)return j;return-1}var de=50,Ce={toString:function(){return"CodeMirror.Pass"}},Re={scroll:!1},me={origin:"*mouse"},Oe={origin:"+move"};function be(e,u,j){for(var k=0,W=0;;){var Q=e.indexOf(" ",k);Q==-1&&(Q=e.length);var ae=Q-k;if(Q==e.length||W+ae>=u)return k+Math.min(ae,u-W);if(W+=Q-k,W+=j-W%j,k=Q+1,W>=u)return k}}var ce=[""];function le(e){for(;ce.length<=e;)ce.push(ne(ce)+" ");return ce[e]}function ne(e){return e[e.length-1]}function ge(e,u){for(var j=[],k=0;k<e.length;k++)j[k]=u(e[k],k);return j}function te(e,u,j){for(var k=0,W=j(u);k<e.length&&j(e[k])<=W;)k++;e.splice(k,0,u)}function re(){}function Se(e,u){var j;return Object.create?j=Object.create(e):(re.prototype=e,j=new re),u&&R(u,j),j}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function Y(e,u){return u?u.source.indexOf("\\w")>-1&&q(e)?!0:u.test(e):q(e)}function X(e){for(var u in e)if(e.hasOwnProperty(u)&&e[u])return!1;return!0}var he=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function fe(e){return e.charCodeAt(0)>=768&&he.test(e)}function xe(e,u,j){for(;(j<0?u>0:u<e.length)&&fe(e.charAt(u));)u+=j;return u}function Ke(e,u,j){for(var k=u>j?-1:1;;){if(u==j)return u;var W=(u+j)/2,Q=k<0?Math.ceil(W):Math.floor(W);if(Q==u)return e(Q)?u:j;e(Q)?j=Q:u=Q+k}}function Ze(e,u,j,k){if(!e)return k(u,j,"ltr",0);for(var W=!1,Q=0;Q<e.length;++Q){var ae=e[Q];(ae.from<j&&ae.to>u||u==j&&ae.to==u)&&(k(Math.max(ae.from,u),Math.min(ae.to,j),ae.level==1?"rtl":"ltr",Q),W=!0)}W||k(u,j,"ltr")}var et=null;function st(e,u,j){var k;et=null;for(var W=0;W<e.length;++W){var Q=e[W];if(Q.from<u&&Q.to>u)return W;Q.to==u&&(Q.from!=Q.to&&j=="before"?k=W:et=W),Q.from==u&&(Q.from!=Q.to&&j!="before"?k=W:et=W)}return k!=null?k:et}var ut=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",u="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function j(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?u.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var k=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,W=/[stwN]/,Q=/[LRr]/,ae=/[Lb1n]/,pe=/[1n]/;function ve(we,We,Ye){this.level=we,this.from=We,this.to=Ye}return function(we,We){var Ye=We=="ltr"?"L":"R";if(we.length==0||We=="ltr"&&!k.test(we))return!1;for(var ct=we.length,it=[],Ct=0;Ct<ct;++Ct)it.push(j(we.charCodeAt(Ct)));for(var Ut=0,Jt=Ye;Ut<ct;++Ut){var nr=it[Ut];nr=="m"?it[Ut]=Jt:Jt=nr}for(var vr=0,ir=Ye;vr<ct;++vr){var Cr=it[vr];Cr=="1"&&ir=="r"?it[vr]="n":Q.test(Cr)&&(ir=Cr,Cr=="r"&&(it[vr]="R"))}for(var Zr=1,Kr=it[0];Zr<ct-1;++Zr){var _n=it[Zr];_n=="+"&&Kr=="1"&&it[Zr+1]=="1"?it[Zr]="1":_n==","&&Kr==it[Zr+1]&&(Kr=="1"||Kr=="n")&&(it[Zr]=Kr),Kr=_n}for(var $n=0;$n<ct;++$n){var Ci=it[$n];if(Ci==",")it[$n]="N";else if(Ci=="%"){var si=void 0;for(si=$n+1;si<ct&&it[si]=="%";++si);for(var qi=$n&&it[$n-1]=="!"||si<ct&&it[si]=="1"?"1":"N",Ji=$n;Ji<si;++Ji)it[Ji]=qi;$n=si-1}}for(var vi=0,Qi=Ye;vi<ct;++vi){var Ii=it[vi];Qi=="L"&&Ii=="1"?it[vi]="L":Q.test(Ii)&&(Qi=Ii)}for(var Ei=0;Ei<ct;++Ei)if(W.test(it[Ei])){var yi=void 0;for(yi=Ei+1;yi<ct&&W.test(it[yi]);++yi);for(var di=(Ei?it[Ei-1]:Ye)=="L",Zi=(yi<ct?it[yi]:Ye)=="L",lo=di==Zi?di?"L":"R":Ye,Ua=Ei;Ua<yi;++Ua)it[Ua]=lo;Ei=yi-1}for(var Mi=[],xa,Oi=0;Oi<ct;)if(ae.test(it[Oi])){var ps=Oi;for(++Oi;Oi<ct&&ae.test(it[Oi]);++Oi);Mi.push(new ve(0,ps,Oi))}else{var Da=Oi,Ga=Mi.length,Va=We=="rtl"?1:0;for(++Oi;Oi<ct&&it[Oi]!="L";++Oi);for(var zi=Da;zi<Oi;)if(pe.test(it[zi])){Da<zi&&(Mi.splice(Ga,0,new ve(1,Da,zi)),Ga+=Va);var uo=zi;for(++zi;zi<Oi&&pe.test(it[zi]);++zi);Mi.splice(Ga,0,new ve(2,uo,zi)),Ga+=Va,Da=zi}else++zi;Da<Oi&&Mi.splice(Ga,0,new ve(1,Da,Oi))}return We=="ltr"&&(Mi[0].level==1&&(xa=we.match(/^\s+/))&&(Mi[0].from=xa[0].length,Mi.unshift(new ve(0,0,xa[0].length))),ne(Mi).level==1&&(xa=we.match(/\s+$/))&&(ne(Mi).to-=xa[0].length,Mi.push(new ve(0,ct-xa[0].length,ct)))),We=="rtl"?Mi.reverse():Mi}}();function dt(e,u){var j=e.order;return j==null&&(j=e.order=ut(e.text,u)),j}var Fe=[],Ie=function(e,u,j){if(e.addEventListener)e.addEventListener(u,j,!1);else if(e.attachEvent)e.attachEvent("on"+u,j);else{var k=e._handlers||(e._handlers={});k[u]=(k[u]||Fe).concat(j)}};function ot(e,u){return e._handlers&&e._handlers[u]||Fe}function ft(e,u,j){if(e.removeEventListener)e.removeEventListener(u,j,!1);else if(e.detachEvent)e.detachEvent("on"+u,j);else{var k=e._handlers,W=k&&k[u];if(W){var Q=ue(W,j);Q>-1&&(k[u]=W.slice(0,Q).concat(W.slice(Q+1)))}}}function Qe(e,u){var j=ot(e,u);if(!j.length)return;for(var k=Array.prototype.slice.call(arguments,2),W=0;W<j.length;++W)j[W].apply(null,k)}function tt(e,u,j){return typeof u=="string"&&(u={type:u,preventDefault:function(){this.defaultPrevented=!0}}),Qe(e,j||u.type,e,u),Le(u)||u.codemirrorIgnore}function Be(e){var u=e._handlers&&e._handlers.cursorActivity;if(!u)return;for(var j=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),k=0;k<u.length;++k)ue(j,u[k])==-1&&j.push(u[k])}function ke(e,u){return ot(e,u).length>0}function Ne(e){e.prototype.on=function(u,j){Ie(this,u,j)},e.prototype.off=function(u,j){ft(this,u,j)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Le(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Me(e){Ee(e),Ae(e)}function He(e){return e.target||e.srcElement}function nt(e){var u=e.which;return u==null&&(e.button&1?u=1:e.button&2?u=3:e.button&4&&(u=2)),o&&e.ctrlKey&&u==1&&(u=3),u}var vt=function(){if(T&&y<9)return!1;var e=S("div");return"draggable"in e||"dragDrop"in e}(),bt;function Wt(e){if(bt==null){var u=S("span","\u200B");w(e,S("span",[u,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(bt=u.offsetWidth<=1&&u.offsetHeight>2&&!(T&&y<8))}var j=bt?S("span","\u200B"):S("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return j.setAttribute("cm-text",""),j}var Bt;function lr(e){if(Bt!=null)return Bt;var u=w(e,document.createTextNode("A\u062EA")),j=P(u,0,1).getBoundingClientRect(),k=P(u,1,2).getBoundingClientRect();return E(e),!j||j.left==j.right?!1:Bt=k.right-j.right<3}var dr=`
b`.split(/\n/).length!=3?function(e){for(var u=0,j=[],k=e.length;u<=k;){var W=e.indexOf(`
`,u);W==-1&&(W=e.length);var Q=e.slice(u,e.charAt(W-1)=="\r"?W-1:W),ae=Q.indexOf("\r");ae!=-1?(j.push(Q.slice(0,ae)),u+=ae+1):(j.push(Q),u=W+1)}return j}:function(e){return e.split(/\r\n?|\n/)},Ot=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(u){return!1}}:function(e){var u;try{u=e.ownerDocument.selection.createRange()}catch(j){}return!u||u.parentElement()!=e?!1:u.compareEndPoints("StartToEnd",u)!=0},Vr=function(){var e=S("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Wr=null;function Yr(e){if(Wr!=null)return Wr;var u=w(e,S("span","x")),j=u.getBoundingClientRect(),k=P(u,0,1).getBoundingClientRect();return Wr=Math.abs(j.left-k.left)>1}var bn={},Ar={};function fn(e,u){arguments.length>2&&(u.dependencies=Array.prototype.slice.call(arguments,2)),bn[e]=u}function cn(e,u){Ar[e]=u}function Vt(e){if(typeof e=="string"&&Ar.hasOwnProperty(e))e=Ar[e];else if(e&&typeof e.name=="string"&&Ar.hasOwnProperty(e.name)){var u=Ar[e.name];typeof u=="string"&&(u={name:u}),e=Se(u,e),e.name=u.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Vt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Vt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function En(e,u){u=Vt(u);var j=bn[u.name];if(!j)return En(e,"text/plain");var k=j(e,u);if(fr.hasOwnProperty(u.name)){var W=fr[u.name];for(var Q in W){if(!W.hasOwnProperty(Q))continue;k.hasOwnProperty(Q)&&(k["_"+Q]=k[Q]),k[Q]=W[Q]}}if(k.name=u.name,u.helperType&&(k.helperType=u.helperType),u.modeProps)for(var ae in u.modeProps)k[ae]=u.modeProps[ae];return k}var fr={};function br(e,u){var j=fr.hasOwnProperty(e)?fr[e]:fr[e]={};R(u,j)}function Br(e,u){if(u===!0)return u;if(e.copyState)return e.copyState(u);var j={};for(var k in u){var W=u[k];W instanceof Array&&(W=W.concat([])),j[k]=W}return j}function kn(e,u){for(var j;e.innerMode&&!(j=e.innerMode(u),!j||j.mode==e);)u=j.state,e=j.mode;return j||{mode:e,state:u}}function Kn(e,u,j){return e.startState?e.startState(u,j):!0}var dn=function(e,u,j){this.pos=this.start=0,this.string=e,this.tabSize=u||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=j};dn.prototype.eol=function(){return this.pos>=this.string.length},dn.prototype.sol=function(){return this.pos==this.lineStart},dn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dn.prototype.eat=function(e){var u=this.string.charAt(this.pos),j;if(typeof e=="string"?j=u==e:j=u&&(e.test?e.test(u):e(u)),j)return++this.pos,u},dn.prototype.eatWhile=function(e){for(var u=this.pos;this.eat(e););return this.pos>u},dn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},dn.prototype.skipToEnd=function(){this.pos=this.string.length},dn.prototype.skipTo=function(e){var u=this.string.indexOf(e,this.pos);if(u>-1)return this.pos=u,!0},dn.prototype.backUp=function(e){this.pos-=e},dn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=K(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},dn.prototype.indentation=function(){return K(this.string,null,this.tabSize)-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},dn.prototype.match=function(e,u,j){if(typeof e=="string"){var k=function(ae){return j?ae.toLowerCase():ae},W=this.string.substr(this.pos,e.length);if(k(W)==k(e))return u!==!1&&(this.pos+=e.length),!0}else{var Q=this.string.slice(this.pos).match(e);return Q&&Q.index>0?null:(Q&&u!==!1&&(this.pos+=Q[0].length),Q)}},dn.prototype.current=function(){return this.string.slice(this.start,this.pos)},dn.prototype.hideFirstChars=function(e,u){this.lineStart+=e;try{return u()}finally{this.lineStart-=e}},dn.prototype.lookAhead=function(e){var u=this.lineOracle;return u&&u.lookAhead(e)},dn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function sr(e,u){if(u-=e.first,u<0||u>=e.size)throw new Error("There is no line "+(u+e.first)+" in the document.");for(var j=e;!j.lines;)for(var k=0;;++k){var W=j.children[k],Q=W.chunkSize();if(u<Q){j=W;break}u-=Q}return j.lines[u]}function Jn(e,u,j){var k=[],W=u.line;return e.iter(u.line,j.line+1,function(Q){var ae=Q.text;W==j.line&&(ae=ae.slice(0,j.ch)),W==u.line&&(ae=ae.slice(u.ch)),k.push(ae),++W}),k}function Tn(e,u,j){var k=[];return e.iter(u,j,function(W){k.push(W.text)}),k}function On(e,u){var j=u-e.height;if(j)for(var k=e;k;k=k.parent)k.height+=j}function Jr(e){if(e.parent==null)return null;for(var u=e.parent,j=ue(u.lines,e),k=u.parent;k;u=k,k=k.parent)for(var W=0;!(k.children[W]==u);++W)j+=k.children[W].chunkSize();return j+u.first}function An(e,u){var j=e.first;e:do{for(var k=0;k<e.children.length;++k){var W=e.children[k],Q=W.height;if(u<Q){e=W;continue e}u-=Q,j+=W.chunkSize()}return j}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var pe=e.lines[ae],ve=pe.height;if(u<ve)break;u-=ve}return j+ae}function Zn(e,u){return u>=e.first&&u<e.first+e.size}function ri(e,u){return String(e.lineNumberFormatter(u+e.firstLineNumber))}function Nt(e,u,j){if(j===void 0&&(j=null),!(this instanceof Nt))return new Nt(e,u,j);this.line=e,this.ch=u,this.sticky=j}function _r(e,u){return e.line-u.line||e.ch-u.ch}function mi(e,u){return e.sticky==u.sticky&&_r(e,u)==0}function xi(e){return Nt(e.line,e.ch)}function Di(e,u){return _r(e,u)<0?u:e}function wi(e,u){return _r(e,u)<0?e:u}function se(e,u){return Math.max(e.first,Math.min(u,e.first+e.size-1))}function V(e,u){if(u.line<e.first)return Nt(e.first,0);var j=e.first+e.size-1;return u.line>j?Nt(j,sr(e,j).text.length):$(u,sr(e,u.line).text.length)}function $(e,u){var j=e.ch;return j==null||j>u?Nt(e.line,u):j<0?Nt(e.line,0):e}function ee(e,u){for(var j=[],k=0;k<u.length;k++)j[k]=V(e,u[k]);return j}var ye=function(e,u){this.state=e,this.lookAhead=u},oe=function(e,u,j,k){this.state=u,this.doc=e,this.line=j,this.maxLookAhead=k||0,this.baseTokens=null,this.baseTokenPos=1};oe.prototype.lookAhead=function(e){var u=this.doc.getLine(this.line+e);return u!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),u},oe.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var u=this.baseTokens[this.baseTokenPos+1];return{type:u&&u.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},oe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oe.fromSaved=function(e,u,j){return u instanceof ye?new oe(e,Br(e.mode,u.state),j,u.lookAhead):new oe(e,Br(e.mode,u),j)},oe.prototype.save=function(e){var u=e!==!1?Br(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ye(u,this.maxLookAhead):u};function Ve(e,u,j,k){var W=[e.state.modeGen],Q={};ii(e,u.text,e.doc.mode,j,function(we,We){return W.push(we,We)},Q,k);for(var ae=j.state,pe=function(we){j.baseTokens=W;var We=e.state.overlays[we],Ye=1,ct=0;j.state=!0,ii(e,u.text,We.mode,j,function(it,Ct){for(var Ut=Ye;ct<it;){var Jt=W[Ye];Jt>it&&W.splice(Ye,1,it,W[Ye+1],Jt),Ye+=2,ct=Math.min(it,Jt)}if(!Ct)return;if(We.opaque)W.splice(Ut,Ye-Ut,it,"overlay "+Ct),Ye=Ut+2;else for(;Ut<Ye;Ut+=2){var nr=W[Ut+1];W[Ut+1]=(nr?nr+" ":"")+"overlay "+Ct}},Q),j.state=ae,j.baseTokens=null,j.baseTokenPos=1},ve=0;ve<e.state.overlays.length;++ve)pe(ve);return{styles:W,classes:Q.bgClass||Q.textClass?Q:null}}function Tt(e,u,j){if(!u.styles||u.styles[0]!=e.state.modeGen){var k=Xt(e,Jr(u)),W=u.text.length>e.options.maxHighlightLength&&Br(e.doc.mode,k.state),Q=Ve(e,u,k);W&&(k.state=W),u.stateAfter=k.save(!W),u.styles=Q.styles,Q.classes?u.styleClasses=Q.classes:u.styleClasses&&(u.styleClasses=null),j===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return u.styles}function Xt(e,u,j){var k=e.doc,W=e.display;if(!k.mode.startState)return new oe(k,!0,u);var Q=Bn(e,u,j),ae=Q>k.first&&sr(k,Q-1).stateAfter,pe=ae?oe.fromSaved(k,ae,Q):new oe(k,Kn(k.mode),Q);return k.iter(Q,u,function(ve){Er(e,ve.text,pe);var we=pe.line;ve.stateAfter=we==u-1||we%5==0||we>=W.viewFrom&&we<W.viewTo?pe.save():null,pe.nextLine()}),j&&(k.modeFrontier=pe.line),pe}function Er(e,u,j,k){var W=e.doc.mode,Q=new dn(u,e.options.tabSize,j);for(Q.start=Q.pos=k||0,u==""&&kt(W,j.state);!Q.eol();)Pr(W,Q,j.state),Q.start=Q.pos}function kt(e,u){if(e.blankLine)return e.blankLine(u);if(!e.innerMode)return;var j=kn(e,u);if(j.mode.blankLine)return j.mode.blankLine(j.state)}function Pr(e,u,j,k){for(var W=0;W<10;W++){k&&(k[0]=kn(e,j).mode);var Q=e.token(u,j);if(u.pos>u.start)return Q}throw new Error("Mode "+e.name+" failed to advance stream.")}var Gr=function(e,u,j){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=u||null,this.state=j};function yn(e,u,j,k){var W=e.doc,Q=W.mode,ae;u=V(W,u);var pe=sr(W,u.line),ve=Xt(e,u.line,j),we=new dn(pe.text,e.options.tabSize,ve),We;for(k&&(We=[]);(k||we.pos<u.ch)&&!we.eol();)we.start=we.pos,ae=Pr(Q,we,ve.state),k&&We.push(new Gr(we,ae,Br(W.mode,ve.state)));return k?We:new Gr(we,ae,ve.state)}function ni(e,u){if(e)for(;;){var j=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!j)break;e=e.slice(0,j.index)+e.slice(j.index+j[0].length);var k=j[1]?"bgClass":"textClass";u[k]==null?u[k]=j[2]:new RegExp("(?:^|\\s)"+j[2]+"(?:$|\\s)").test(u[k])||(u[k]+=" "+j[2])}return e}function ii(e,u,j,k,W,Q,ae){var pe=j.flattenSpans;pe==null&&(pe=e.options.flattenSpans);var ve=0,we=null,We=new dn(u,e.options.tabSize,k),Ye,ct=e.options.addModeClass&&[null];for(u==""&&ni(kt(j,k.state),Q);!We.eol();){if(We.pos>e.options.maxHighlightLength?(pe=!1,ae&&Er(e,u,k,We.pos),We.pos=u.length,Ye=null):Ye=ni(Pr(j,We,k.state,ct),Q),ct){var it=ct[0].name;it&&(Ye="m-"+(Ye?it+" "+Ye:it))}if(!pe||we!=Ye){for(;ve<We.start;)ve=Math.min(We.start,ve+5e3),W(ve,we);we=Ye}We.start=We.pos}for(;ve<We.pos;){var Ct=Math.min(We.pos,ve+5e3);W(Ct,we),ve=Ct}}function Bn(e,u,j){for(var k,W,Q=e.doc,ae=j?-1:u-(e.doc.mode.innerMode?1e3:100),pe=u;pe>ae;--pe){if(pe<=Q.first)return Q.first;var ve=sr(Q,pe-1),we=ve.stateAfter;if(we&&(!j||pe+(we instanceof ye?we.lookAhead:0)<=Q.modeFrontier))return pe;var We=K(ve.text,null,e.options.tabSize);(W==null||k>We)&&(W=pe-1,k=We)}return W}function Ni(e,u){if(e.modeFrontier=Math.min(e.modeFrontier,u),e.highlightFrontier<u-10)return;for(var j=e.first,k=u-1;k>j;k--){var W=sr(e,k).stateAfter;if(W&&(!(W instanceof ye)||k+W.lookAhead<u)){j=k+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,j)}var Ki=!1,Gn=!1;function Ti(){Ki=!0}function Gi(){Gn=!0}function Li(e,u,j){this.marker=e,this.from=u,this.to=j}function li(e,u){if(e)for(var j=0;j<e.length;++j){var k=e[j];if(k.marker==u)return k}}function ea(e,u){for(var j,k=0;k<e.length;++k)e[k]!=u&&(j||(j=[])).push(e[k]);return j}function Vi(e,u){e.markedSpans=e.markedSpans?e.markedSpans.concat([u]):[u],u.marker.attachLine(e)}function ta(e,u,j){var k;if(e)for(var W=0;W<e.length;++W){var Q=e[W],ae=Q.marker,pe=Q.from==null||(ae.inclusiveLeft?Q.from<=u:Q.from<u);if(pe||Q.from==u&&ae.type=="bookmark"&&(!j||!Q.marker.insertLeft)){var ve=Q.to==null||(ae.inclusiveRight?Q.to>=u:Q.to>u);(k||(k=[])).push(new Li(ae,Q.from,ve?null:Q.to))}}return k}function oa(e,u,j){var k;if(e)for(var W=0;W<e.length;++W){var Q=e[W],ae=Q.marker,pe=Q.to==null||(ae.inclusiveRight?Q.to>=u:Q.to>u);if(pe||Q.from==u&&ae.type=="bookmark"&&(!j||Q.marker.insertLeft)){var ve=Q.from==null||(ae.inclusiveLeft?Q.from<=u:Q.from<u);(k||(k=[])).push(new Li(ae,ve?null:Q.from-u,Q.to==null?null:Q.to-u))}}return k}function ki(e,u){if(u.full)return null;var j=Zn(e,u.from.line)&&sr(e,u.from.line).markedSpans,k=Zn(e,u.to.line)&&sr(e,u.to.line).markedSpans;if(!j&&!k)return null;var W=u.from.ch,Q=u.to.ch,ae=_r(u.from,u.to)==0,pe=ta(j,W,ae),ve=oa(k,Q,ae),we=u.text.length==1,We=ne(u.text).length+(we?W:0);if(pe)for(var Ye=0;Ye<pe.length;++Ye){var ct=pe[Ye];if(ct.to==null){var it=li(ve,ct.marker);it?we&&(ct.to=it.to==null?null:it.to+We):ct.to=W}}if(ve)for(var Ct=0;Ct<ve.length;++Ct){var Ut=ve[Ct];if(Ut.to!=null&&(Ut.to+=We),Ut.from==null){var Jt=li(pe,Ut.marker);Jt||(Ut.from=We,we&&(pe||(pe=[])).push(Ut))}else Ut.from+=We,we&&(pe||(pe=[])).push(Ut)}pe&&(pe=qn(pe)),ve&&ve!=pe&&(ve=qn(ve));var nr=[pe];if(!we){var vr=u.text.length-2,ir;if(vr>0&&pe)for(var Cr=0;Cr<pe.length;++Cr)pe[Cr].to==null&&(ir||(ir=[])).push(new Li(pe[Cr].marker,null,null));for(var Zr=0;Zr<vr;++Zr)nr.push(ir);nr.push(ve)}return nr}function qn(e){for(var u=0;u<e.length;++u){var j=e[u];j.from!=null&&j.from==j.to&&j.marker.clearWhenEmpty!==!1&&e.splice(u--,1)}return e.length?e:null}function ji(e,u,j){var k=null;if(e.iter(u.line,j.line+1,function(it){if(it.markedSpans)for(var Ct=0;Ct<it.markedSpans.length;++Ct){var Ut=it.markedSpans[Ct].marker;Ut.readOnly&&(!k||ue(k,Ut)==-1)&&(k||(k=[])).push(Ut)}}),!k)return null;for(var W=[{from:u,to:j}],Q=0;Q<k.length;++Q)for(var ae=k[Q],pe=ae.find(0),ve=0;ve<W.length;++ve){var we=W[ve];if(_r(we.to,pe.from)<0||_r(we.from,pe.to)>0)continue;var We=[ve,1],Ye=_r(we.from,pe.from),ct=_r(we.to,pe.to);(Ye<0||!ae.inclusiveLeft&&!Ye)&&We.push({from:we.from,to:pe.from}),(ct>0||!ae.inclusiveRight&&!ct)&&We.push({from:pe.to,to:we.to}),W.splice.apply(W,We),ve+=We.length-3}return W}function ha(e){var u=e.markedSpans;if(!u)return;for(var j=0;j<u.length;++j)u[j].marker.detachLine(e);e.markedSpans=null}function xt(e,u){if(!u)return;for(var j=0;j<u.length;++j)u[j].marker.attachLine(e);e.markedSpans=u}function rt(e){return e.inclusiveLeft?-1:0}function mt(e){return e.inclusiveRight?1:0}function wt(e,u){var j=e.lines.length-u.lines.length;if(j!=0)return j;var k=e.find(),W=u.find(),Q=_r(k.from,W.from)||rt(e)-rt(u);if(Q)return-Q;var ae=_r(k.to,W.to)||mt(e)-mt(u);return ae||u.id-e.id}function Lt(e,u){var j=Gn&&e.markedSpans,k;if(j)for(var W=void 0,Q=0;Q<j.length;++Q)W=j[Q],W.marker.collapsed&&(u?W.from:W.to)==null&&(!k||wt(k,W.marker)<0)&&(k=W.marker);return k}function It(e){return Lt(e,!0)}function Kt(e){return Lt(e,!1)}function Ht(e,u){var j=Gn&&e.markedSpans,k;if(j)for(var W=0;W<j.length;++W){var Q=j[W];Q.marker.collapsed&&(Q.from==null||Q.from<u)&&(Q.to==null||Q.to>u)&&(!k||wt(k,Q.marker)<0)&&(k=Q.marker)}return k}function ht(e,u,j,k,W){var Q=sr(e,u),ae=Gn&&Q.markedSpans;if(ae)for(var pe=0;pe<ae.length;++pe){var ve=ae[pe];if(!ve.marker.collapsed)continue;var we=ve.marker.find(0),We=_r(we.from,j)||rt(ve.marker)-rt(W),Ye=_r(we.to,k)||mt(ve.marker)-mt(W);if(We>=0&&Ye<=0||We<=0&&Ye>=0)continue;if(We<=0&&(ve.marker.inclusiveRight&&W.inclusiveLeft?_r(we.to,j)>=0:_r(we.to,j)>0)||We>=0&&(ve.marker.inclusiveRight&&W.inclusiveLeft?_r(we.from,k)<=0:_r(we.from,k)<0))return!0}}function St(e){for(var u;u=It(e);)e=u.find(-1,!0).line;return e}function At(e){for(var u;u=Kt(e);)e=u.find(1,!0).line;return e}function ur(e){for(var u,j;u=Kt(e);)e=u.find(1,!0).line,(j||(j=[])).push(e);return j}function ar(e,u){var j=sr(e,u),k=St(j);return j==k?u:Jr(k)}function Zt(e,u){if(u>e.lastLine())return u;var j=sr(e,u),k;if(!$t(e,j))return u;for(;k=Kt(j);)j=k.find(1,!0).line;return Jr(j)+1}function $t(e,u){var j=Gn&&u.markedSpans;if(j)for(var k=void 0,W=0;W<j.length;++W){if(k=j[W],!k.marker.collapsed)continue;if(k.from==null)return!0;if(k.marker.widgetNode)continue;if(k.from==0&&k.marker.inclusiveLeft&&rr(e,u,k))return!0}}function rr(e,u,j){if(j.to==null){var k=j.marker.find(1,!0);return rr(e,k.line,li(k.line.markedSpans,j.marker))}if(j.marker.inclusiveRight&&j.to==u.text.length)return!0;for(var W=void 0,Q=0;Q<u.markedSpans.length;++Q)if(W=u.markedSpans[Q],W.marker.collapsed&&!W.marker.widgetNode&&W.from==j.to&&(W.to==null||W.to!=j.from)&&(W.marker.inclusiveLeft||j.marker.inclusiveRight)&&rr(e,u,W))return!0}function cr(e){e=St(e);for(var u=0,j=e.parent,k=0;k<j.lines.length;++k){var W=j.lines[k];if(W==e)break;u+=W.height}for(var Q=j.parent;Q;j=Q,Q=j.parent)for(var ae=0;ae<Q.children.length;++ae){var pe=Q.children[ae];if(pe==j)break;u+=pe.height}return u}function lt(e){if(e.height==0)return 0;for(var u=e.text.length,j,k=e;j=It(k);){var W=j.find(0,!0);k=W.from.line,u+=W.from.ch-W.to.ch}for(k=e;j=Kt(k);){var Q=j.find(0,!0);u-=k.text.length-Q.from.ch,k=Q.to.line,u+=k.text.length-Q.to.ch}return u}function Rr(e){var u=e.display,j=e.doc;u.maxLine=sr(j,j.first),u.maxLineLength=lt(u.maxLine),u.maxLineChanged=!0,j.iter(function(k){var W=lt(k);W>u.maxLineLength&&(u.maxLineLength=W,u.maxLine=k)})}var jr=function(e,u,j){this.text=e,xt(this,u),this.height=j?j(this):1};jr.prototype.lineNo=function(){return Jr(this)},Ne(jr);function xr(e,u,j,k){e.text=u,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ha(e),xt(e,j);var W=k?k(e):1;W!=e.height&&On(e,W)}function _t(e){e.parent=null,ha(e)}var Rt={},Et={};function Mt(e,u){if(!e||/^\s*$/.test(e))return null;var j=u.addModeClass?Et:Rt;return j[e]||(j[e]=e.replace(/\S+/g,"cm-$&"))}function qt(e,u){var j=F("span",null,null,t?"padding-right: .1px":null),k={pre:F("pre",[j],"CodeMirror-line"),content:j,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};u.measure={};for(var W=0;W<=(u.rest?u.rest.length:0);W++){var Q=W?u.rest[W-1]:u.line,ae=void 0;k.pos=0,k.addToken=er,lr(e.display.measure)&&(ae=dt(Q,e.doc.direction))&&(k.addToken=Hr(k.addToken,ae)),k.map=[];var pe=u!=e.display.externalMeasured&&Jr(Q);at(Q,k,Tt(e,Q,pe)),Q.styleClasses&&(Q.styleClasses.bgClass&&(k.bgClass=A(Q.styleClasses.bgClass,k.bgClass||"")),Q.styleClasses.textClass&&(k.textClass=A(Q.styleClasses.textClass,k.textClass||""))),k.map.length==0&&k.map.push(0,0,k.content.appendChild(Wt(e.display.measure))),W==0?(u.measure.map=k.map,u.measure.cache={}):((u.measure.maps||(u.measure.maps=[])).push(k.map),(u.measure.caches||(u.measure.caches=[])).push({}))}if(t){var ve=k.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(k.content.className="cm-tab-wrap-hack")}return Qe(e,"renderLine",e,u.line,k.pre),k.pre.className&&(k.textClass=A(k.pre.className,k.textClass||"")),k}function pr(e){var u=S("span","\u2022","cm-invalidchar");return u.title="\\u"+e.charCodeAt(0).toString(16),u.setAttribute("aria-label",u.title),u}function er(e,u,j,k,W,Q,ae){if(!u)return;var pe=e.splitSpaces?Ir(u,e.trailingSpace):u,ve=e.cm.state.specialChars,we=!1,We;if(!ve.test(u))e.col+=u.length,We=document.createTextNode(pe),e.map.push(e.pos,e.pos+u.length,We),T&&y<9&&(we=!0),e.pos+=u.length;else{We=document.createDocumentFragment();for(var Ye=0;;){ve.lastIndex=Ye;var ct=ve.exec(u),it=ct?ct.index-Ye:u.length-Ye;if(it){var Ct=document.createTextNode(pe.slice(Ye,Ye+it));T&&y<9?We.appendChild(S("span",[Ct])):We.appendChild(Ct),e.map.push(e.pos,e.pos+it,Ct),e.col+=it,e.pos+=it}if(!ct)break;Ye+=it+1;var Ut=void 0;if(ct[0]==" "){var Jt=e.cm.options.tabSize,nr=Jt-e.col%Jt;Ut=We.appendChild(S("span",le(nr),"cm-tab")),Ut.setAttribute("role","presentation"),Ut.setAttribute("cm-text"," "),e.col+=nr}else ct[0]=="\r"||ct[0]==`
`?(Ut=We.appendChild(S("span",ct[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ut.setAttribute("cm-text",ct[0]),e.col+=1):(Ut=e.cm.options.specialCharPlaceholder(ct[0]),Ut.setAttribute("cm-text",ct[0]),T&&y<9?We.appendChild(S("span",[Ut])):We.appendChild(Ut),e.col+=1);e.map.push(e.pos,e.pos+1,Ut),e.pos++}}if(e.trailingSpace=pe.charCodeAt(u.length-1)==32,j||k||W||we||Q||ae){var vr=j||"";k&&(vr+=k),W&&(vr+=W);var ir=S("span",[We],vr,Q);if(ae)for(var Cr in ae)ae.hasOwnProperty(Cr)&&Cr!="style"&&Cr!="class"&&ir.setAttribute(Cr,ae[Cr]);return e.content.appendChild(ir)}e.content.appendChild(We)}function Ir(e,u){if(e.length>1&&!/ /.test(e))return e;for(var j=u,k="",W=0;W<e.length;W++){var Q=e.charAt(W);Q==" "&&j&&(W==e.length-1||e.charCodeAt(W+1)==32)&&(Q="\xA0"),k+=Q,j=Q==" "}return k}function Hr(e,u){return function(j,k,W,Q,ae,pe,ve){W=W?W+" cm-force-border":"cm-force-border";for(var we=j.pos,We=we+k.length;;){for(var Ye=void 0,ct=0;ct<u.length&&!(Ye=u[ct],Ye.to>we&&Ye.from<=we);ct++);if(Ye.to>=We)return e(j,k,W,Q,ae,pe,ve);e(j,k.slice(0,Ye.to-we),W,Q,null,pe,ve),Q=null,k=k.slice(Ye.to-we),we=Ye.to}}}function yr(e,u,j,k){var W=!k&&j.widgetNode;W&&e.map.push(e.pos,e.pos+u,W),!k&&e.cm.display.input.needsContentAttribute&&(W||(W=e.content.appendChild(document.createElement("span"))),W.setAttribute("cm-marker",j.id)),W&&(e.cm.display.input.setUneditable(W),e.content.appendChild(W)),e.pos+=u,e.trailingSpace=!1}function at(e,u,j){var k=e.markedSpans,W=e.text,Q=0;if(!k){for(var ae=1;ae<j.length;ae+=2)u.addToken(u,W.slice(Q,Q=j[ae]),Mt(j[ae+1],u.cm.options));return}for(var pe=W.length,ve=0,we=1,We="",Ye,ct,it=0,Ct,Ut,Jt,nr,vr;;){if(it==ve){Ct=Ut=Jt=ct="",vr=null,nr=null,it=Infinity;for(var ir=[],Cr=void 0,Zr=0;Zr<k.length;++Zr){var Kr=k[Zr],_n=Kr.marker;if(_n.type=="bookmark"&&Kr.from==ve&&_n.widgetNode)ir.push(_n);else if(Kr.from<=ve&&(Kr.to==null||Kr.to>ve||_n.collapsed&&Kr.to==ve&&Kr.from==ve)){if(Kr.to!=null&&Kr.to!=ve&&it>Kr.to&&(it=Kr.to,Ut=""),_n.className&&(Ct+=" "+_n.className),_n.css&&(ct=(ct?ct+";":"")+_n.css),_n.startStyle&&Kr.from==ve&&(Jt+=" "+_n.startStyle),_n.endStyle&&Kr.to==it&&(Cr||(Cr=[])).push(_n.endStyle,Kr.to),_n.title&&((vr||(vr={})).title=_n.title),_n.attributes)for(var $n in _n.attributes)(vr||(vr={}))[$n]=_n.attributes[$n];_n.collapsed&&(!nr||wt(nr.marker,_n)<0)&&(nr=Kr)}else Kr.from>ve&&it>Kr.from&&(it=Kr.from)}if(Cr)for(var Ci=0;Ci<Cr.length;Ci+=2)Cr[Ci+1]==it&&(Ut+=" "+Cr[Ci]);if(!nr||nr.from==ve)for(var si=0;si<ir.length;++si)yr(u,0,ir[si]);if(nr&&(nr.from||0)==ve){if(yr(u,(nr.to==null?pe+1:nr.to)-ve,nr.marker,nr.from==null),nr.to==null)return;nr.to==ve&&(nr=!1)}}if(ve>=pe)break;for(var qi=Math.min(pe,it);;){if(We){var Ji=ve+We.length;if(!nr){var vi=Ji>qi?We.slice(0,qi-ve):We;u.addToken(u,vi,Ye?Ye+Ct:Ct,Jt,ve+vi.length==it?Ut:"",ct,vr)}if(Ji>=qi){We=We.slice(qi-ve),ve=qi;break}ve=Ji,Jt=""}We=W.slice(Q,Q=j[we++]),Ye=Mt(j[we++],u.cm.options)}}}function zt(e,u,j){this.line=u,this.rest=ur(u),this.size=this.rest?Jr(ne(this.rest))-j+1:1,this.node=this.text=null,this.hidden=$t(e,u)}function sn(e,u,j){for(var k=[],W,Q=u;Q<j;Q=W){var ae=new zt(e.doc,sr(e.doc,Q),Q);W=Q+ae.size,k.push(ae)}return k}var en=null;function mr(e){en?en.ops.push(e):e.ownsGroup=en={ops:[e],delayedCallbacks:[]}}function Dr(e){var u=e.delayedCallbacks,j=0;do{for(;j<u.length;j++)u[j].call(null);for(var k=0;k<e.ops.length;k++){var W=e.ops[k];if(W.cursorActivityHandlers)for(;W.cursorActivityCalled<W.cursorActivityHandlers.length;)W.cursorActivityHandlers[W.cursorActivityCalled++].call(null,W.cm)}}while(j<u.length)}function Mr(e,u){var j=e.ownsGroup;if(!j)return;try{Dr(j)}finally{en=null,u(j)}}var Ft=null;function Qt(e,u){var j=ot(e,u);if(!j.length)return;var k=Array.prototype.slice.call(arguments,2),W;en?W=en.delayedCallbacks:Ft?W=Ft:(W=Ft=[],setTimeout(gr,0));for(var Q=function(pe){W.push(function(){return j[pe].apply(null,k)})},ae=0;ae<j.length;++ae)Q(ae)}function gr(){var e=Ft;Ft=null;for(var u=0;u<e.length;++u)e[u]()}function tr(e,u,j,k){for(var W=0;W<u.changes.length;W++){var Q=u.changes[W];Q=="text"?Pt(e,u):Q=="gutter"?an(e,u,j,k):Q=="class"?Lr(e,u):Q=="widget"&&ln(e,u,k)}u.changes=null}function gt(e){return e.node==e.text&&(e.node=S("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),T&&y<8&&(e.node.style.zIndex=2)),e.node}function yt(e,u){var j=u.bgClass?u.bgClass+" "+(u.line.bgClass||""):u.line.bgClass;if(j&&(j+=" CodeMirror-linebackground"),u.background)j?u.background.className=j:(u.background.parentNode.removeChild(u.background),u.background=null);else if(j){var k=gt(u);u.background=k.insertBefore(S("div",null,j),k.firstChild),e.display.input.setUneditable(u.background)}}function Gt(e,u){var j=e.display.externalMeasured;return j&&j.line==u.line?(e.display.externalMeasured=null,u.measure=j.measure,j.built):qt(e,u)}function Pt(e,u){var j=u.text.className,k=Gt(e,u);u.text==u.node&&(u.node=k.pre),u.text.parentNode.replaceChild(k.pre,u.text),u.text=k.pre,k.bgClass!=u.bgClass||k.textClass!=u.textClass?(u.bgClass=k.bgClass,u.textClass=k.textClass,Lr(e,u)):j&&(u.text.className=j)}function Lr(e,u){yt(e,u),u.line.wrapClass?gt(u).className=u.line.wrapClass:u.node!=u.text&&(u.node.className="");var j=u.textClass?u.textClass+" "+(u.line.textClass||""):u.line.textClass;u.text.className=j||""}function an(e,u,j,k){if(u.gutter&&(u.node.removeChild(u.gutter),u.gutter=null),u.gutterBackground&&(u.node.removeChild(u.gutterBackground),u.gutterBackground=null),u.line.gutterClass){var W=gt(u);u.gutterBackground=S("div",null,"CodeMirror-gutter-background "+u.line.gutterClass,"left: "+(e.options.fixedGutter?k.fixedPos:-k.gutterTotalWidth)+"px; width: "+k.gutterTotalWidth+"px"),e.display.input.setUneditable(u.gutterBackground),W.insertBefore(u.gutterBackground,u.text)}var Q=u.line.gutterMarkers;if(e.options.lineNumbers||Q){var ae=gt(u),pe=u.gutter=S("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?k.fixedPos:-k.gutterTotalWidth)+"px");if(e.display.input.setUneditable(pe),ae.insertBefore(pe,u.text),u.line.gutterClass&&(pe.className+=" "+u.line.gutterClass),e.options.lineNumbers&&(!Q||!Q["CodeMirror-linenumbers"])&&(u.lineNumber=pe.appendChild(S("div",ri(e.options,j),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+k.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Q)for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var we=e.display.gutterSpecs[ve].className,We=Q.hasOwnProperty(we)&&Q[we];We&&pe.appendChild(S("div",[We],"CodeMirror-gutter-elt","left: "+k.gutterLeft[we]+"px; width: "+k.gutterWidth[we]+"px"))}}}function ln(e,u,j){u.alignable&&(u.alignable=null);for(var k=O("CodeMirror-linewidget"),W=u.node.firstChild,Q=void 0;W;W=Q)Q=W.nextSibling,k.test(W.className)&&u.node.removeChild(W);tn(e,u,j)}function Or(e,u,j,k){var W=Gt(e,u);return u.text=u.node=W.pre,W.bgClass&&(u.bgClass=W.bgClass),W.textClass&&(u.textClass=W.textClass),Lr(e,u),an(e,u,j,k),tn(e,u,k),u.node}function tn(e,u,j){if(Fr(e,u.line,u,j,!0),u.rest)for(var k=0;k<u.rest.length;k++)Fr(e,u.rest[k],u,j,!1)}function Fr(e,u,j,k,W){if(!u.widgets)return;for(var Q=gt(j),ae=0,pe=u.widgets;ae<pe.length;++ae){var ve=pe[ae],we=S("div",[ve.node],"CodeMirror-linewidget"+(ve.className?" "+ve.className:""));ve.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),pn(ve,we,j,k),e.display.input.setUneditable(we),W&&ve.above?Q.insertBefore(we,j.gutter||j.text):Q.appendChild(we),Qt(ve,"redraw")}}function pn(e,u,j,k){if(e.noHScroll){(j.alignable||(j.alignable=[])).push(u);var W=k.wrapperWidth;u.style.left=k.fixedPos+"px",e.coverGutter||(W-=k.gutterTotalWidth,u.style.paddingLeft=k.gutterTotalWidth+"px"),u.style.width=W+"px"}e.coverGutter&&(u.style.zIndex=5,u.style.position="relative",e.noHScroll||(u.style.marginLeft=-k.gutterTotalWidth+"px"))}function Xr(e){if(e.height!=null)return e.height;var u=e.doc.cm;if(!u)return 0;if(!L(document.body,e.node)){var j="position: relative;";e.coverGutter&&(j+="margin-left: -"+u.display.gutters.offsetWidth+"px;"),e.noHScroll&&(j+="width: "+u.display.wrapper.clientWidth+"px;"),w(u.display.measure,S("div",[e.node],null,j))}return e.height=e.node.parentNode.offsetHeight}function mn(e,u){for(var j=He(u);j!=e.wrapper;j=j.parentNode)if(!j||j.nodeType==1&&j.getAttribute("cm-ignore-events")=="true"||j.parentNode==e.sizer&&j!=e.mover)return!0}function Qn(e){return e.lineSpace.offsetTop}function Pe(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Xe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var u=w(e.measure,S("pre","x","CodeMirror-line-like")),j=window.getComputedStyle?window.getComputedStyle(u):u.currentStyle,k={left:parseInt(j.paddingLeft),right:parseInt(j.paddingRight)};return!isNaN(k.left)&&!isNaN(k.right)&&(e.cachedPaddingH=k),k}function Je(e){return de-e.display.nativeBarWidth}function Ue(e){return e.display.scroller.clientWidth-Je(e)-e.display.barWidth}function _e(e){return e.display.scroller.clientHeight-Je(e)-e.display.barHeight}function De(e,u,j){var k=e.options.lineWrapping,W=k&&Ue(e);if(!u.measure.heights||k&&u.measure.width!=W){var Q=u.measure.heights=[];if(k){u.measure.width=W;for(var ae=u.text.firstChild.getClientRects(),pe=0;pe<ae.length-1;pe++){var ve=ae[pe],we=ae[pe+1];Math.abs(ve.bottom-we.bottom)>2&&Q.push((ve.bottom+we.top)/2-j.top)}}Q.push(j.bottom-j.top)}}function Te(e,u,j){if(e.line==u)return{map:e.measure.map,cache:e.measure.cache};for(var k=0;k<e.rest.length;k++)if(e.rest[k]==u)return{map:e.measure.maps[k],cache:e.measure.caches[k]};for(var W=0;W<e.rest.length;W++)if(Jr(e.rest[W])>j)return{map:e.measure.maps[W],cache:e.measure.caches[W],before:!0}}function je(e,u){u=St(u);var j=Jr(u),k=e.display.externalMeasured=new zt(e.doc,u,j);k.lineN=j;var W=k.built=qt(e,k);return k.text=W.pre,w(e.display.lineMeasure,W.pre),k}function Ge(e,u,j,k){return qe(e,ze(e,u),j,k)}function $e(e,u){if(u>=e.display.viewFrom&&u<e.display.viewTo)return e.display.view[Fn(e,u)];var j=e.display.externalMeasured;if(j&&u>=j.lineN&&u<j.lineN+j.size)return j}function ze(e,u){var j=Jr(u),k=$e(e,j);k&&!k.text?k=null:k&&k.changes&&(tr(e,k,j,Xn(e)),e.curOp.forceUpdate=!0),k||(k=je(e,u));var W=Te(k,u,j);return{line:u,view:k,rect:null,map:W.map,cache:W.cache,before:W.before,hasHeights:!1}}function qe(e,u,j,k,W){u.before&&(j=-1);var Q=j+(k||""),ae;return u.cache.hasOwnProperty(Q)?ae=u.cache[Q]:(u.rect||(u.rect=u.view.text.getBoundingClientRect()),u.hasHeights||(De(e,u.view,u.rect),u.hasHeights=!0),ae=Yt(e,u,j,k),ae.bogus||(u.cache[Q]=ae)),{left:ae.left,right:ae.right,top:W?ae.rtop:ae.top,bottom:W?ae.rbottom:ae.bottom}}var pt={left:0,right:0,top:0,bottom:0};function Dt(e,u,j){for(var k,W,Q,ae,pe,ve,we=0;we<e.length;we+=3)if(pe=e[we],ve=e[we+1],u<pe?(W=0,Q=1,ae="left"):u<ve?(W=u-pe,Q=W+1):(we==e.length-3||u==ve&&e[we+3]>u)&&(Q=ve-pe,W=Q-1,u>=ve&&(ae="right")),W!=null){if(k=e[we+2],pe==ve&&j==(k.insertLeft?"left":"right")&&(ae=j),j=="left"&&W==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)k=e[(we-=3)+2],ae="left";if(j=="right"&&W==ve-pe)for(;we<e.length-3&&e[we+3]==e[we+4]&&!e[we+5].insertLeft;)k=e[(we+=3)+2],ae="right";break}return{node:k,start:W,end:Q,collapse:ae,coverStart:pe,coverEnd:ve}}function jt(e,u){var j=pt;if(u=="left")for(var k=0;k<e.length&&!((j=e[k]).left!=j.right);k++);else for(var W=e.length-1;W>=0&&!((j=e[W]).left!=j.right);W--);return j}function Yt(e,u,j,k){var W=Dt(u.map,j,k),Q=W.node,ae=W.start,pe=W.end,ve=W.collapse,we;if(Q.nodeType==3){for(var We=0;We<4;We++){for(;ae&&fe(u.line.text.charAt(W.coverStart+ae));)--ae;for(;W.coverStart+pe<W.coverEnd&&fe(u.line.text.charAt(W.coverStart+pe));)++pe;if(T&&y<9&&ae==0&&pe==W.coverEnd-W.coverStart?we=Q.parentNode.getBoundingClientRect():we=jt(P(Q,ae,pe).getClientRects(),k),we.left||we.right||ae==0)break;pe=ae,ae=ae-1,ve="right"}T&&y<11&&(we=kr(e.display.measure,we))}else{ae>0&&(ve=k="right");var Ye;e.options.lineWrapping&&(Ye=Q.getClientRects()).length>1?we=Ye[k=="right"?Ye.length-1:0]:we=Q.getBoundingClientRect()}if(T&&y<9&&!ae&&(!we||!we.left&&!we.right)){var ct=Q.parentNode.getClientRects()[0];ct?we={left:ct.left,right:ct.left+ui(e.display),top:ct.top,bottom:ct.bottom}:we=pt}for(var it=we.top-u.rect.top,Ct=we.bottom-u.rect.top,Ut=(it+Ct)/2,Jt=u.view.measure.heights,nr=0;nr<Jt.length-1&&!(Ut<Jt[nr]);nr++);var vr=nr?Jt[nr-1]:0,ir=Jt[nr],Cr={left:(ve=="right"?we.right:we.left)-u.rect.left,right:(ve=="left"?we.left:we.right)-u.rect.left,top:vr,bottom:ir};return!we.left&&!we.right&&(Cr.bogus=!0),e.options.singleCursorHeightPerLine||(Cr.rtop=it,Cr.rbottom=Ct),Cr}function kr(e,u){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Yr(e))return u;var j=screen.logicalXDPI/screen.deviceXDPI,k=screen.logicalYDPI/screen.deviceYDPI;return{left:u.left*j,right:u.right*j,top:u.top*k,bottom:u.bottom*k}}function Qr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var u=0;u<e.rest.length;u++)e.measure.caches[u]={}}function $r(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var u=0;u<e.display.view.length;u++)Qr(e.display.view[u])}function qr(e){$r(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function zr(){return i&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function rn(){return i&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function nn(e){var u=0;if(e.widgets)for(var j=0;j<e.widgets.length;++j)e.widgets[j].above&&(u+=Xr(e.widgets[j]));return u}function vn(e,u,j,k,W){if(!W){var Q=nn(u);j.top+=Q,j.bottom+=Q}if(k=="line")return j;k||(k="local");var ae=cr(u);if(k=="local"?ae+=Qn(e.display):ae-=e.display.viewOffset,k=="page"||k=="window"){var pe=e.display.lineSpace.getBoundingClientRect();ae+=pe.top+(k=="window"?0:rn());var ve=pe.left+(k=="window"?0:zr());j.left+=ve,j.right+=ve}return j.top+=ae,j.bottom+=ae,j}function un(e,u,j){if(j=="div")return u;var k=u.left,W=u.top;if(j=="page")k-=zr(),W-=rn();else if(j=="local"||!j){var Q=e.display.sizer.getBoundingClientRect();k+=Q.left,W+=Q.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:k-ae.left,top:W-ae.top}}function Pn(e,u,j,k,W){return k||(k=sr(e.doc,u.line)),vn(e,k,Ge(e,k,u.ch,W),j)}function hn(e,u,j,k,W,Q){k=k||sr(e.doc,u.line),W||(W=ze(e,k));function ae(Ct,Ut){var Jt=qe(e,W,Ct,Ut?"right":"left",Q);return Ut?Jt.left=Jt.right:Jt.right=Jt.left,vn(e,k,Jt,j)}var pe=dt(k,e.doc.direction),ve=u.ch,we=u.sticky;if(ve>=k.text.length?(ve=k.text.length,we="before"):ve<=0&&(ve=0,we="after"),!pe)return ae(we=="before"?ve-1:ve,we=="before");function We(Ct,Ut,Jt){var nr=pe[Ut],vr=nr.level==1;return ae(Jt?Ct-1:Ct,vr!=Jt)}var Ye=st(pe,ve,we),ct=et,it=We(ve,Ye,we=="before");return ct!=null&&(it.other=We(ve,ct,we!="before")),it}function Nr(e,u){var j=0;u=V(e.doc,u),e.options.lineWrapping||(j=ui(e.display)*u.ch);var k=sr(e.doc,u.line),W=cr(k)+Qn(e.display);return{left:j,right:j,top:W,bottom:W+k.height}}function Ur(e,u,j,k,W){var Q=Nt(e,u,j);return Q.xRel=W,k&&(Q.outside=k),Q}function on(e,u,j){var k=e.doc;if(j+=e.display.viewOffset,j<0)return Ur(k.first,0,null,-1,-1);var W=An(k,j),Q=k.first+k.size-1;if(W>Q)return Ur(k.first+k.size-1,sr(k,Q).text.length,null,1,1);u<0&&(u=0);for(var ae=sr(k,W);;){var pe=Vn(e,ae,W,u,j),ve=Ht(ae,pe.ch+(pe.xRel>0||pe.outside>0?1:0));if(!ve)return pe;var we=ve.find(1);if(we.line==W)return we;ae=sr(k,W=we.line)}}function gn(e,u,j,k){k-=nn(u);var W=u.text.length,Q=Ke(function(ae){return qe(e,j,ae-1).bottom<=k},W,0);return W=Ke(function(ae){return qe(e,j,ae).top>k},Q,W),{begin:Q,end:W}}function Tr(e,u,j,k){j||(j=ze(e,u));var W=vn(e,u,qe(e,j,k),"line").top;return gn(e,u,j,W)}function xn(e,u,j,k){return e.bottom<=j?!1:e.top>j?!0:(k?e.left:e.right)>u}function Vn(e,u,j,k,W){W-=cr(u);var Q=ze(e,u),ae=nn(u),pe=0,ve=u.text.length,we=!0,We=dt(u,e.doc.direction);if(We){var Ye=(e.options.lineWrapping?jn:Cn)(e,u,j,Q,We,k,W);we=Ye.level!=1,pe=we?Ye.from:Ye.to-1,ve=we?Ye.to:Ye.from-1}var ct=null,it=null,Ct=Ke(function(Zr){var Kr=qe(e,Q,Zr);return Kr.top+=ae,Kr.bottom+=ae,xn(Kr,k,W,!1)?(Kr.top<=W&&Kr.left<=k&&(ct=Zr,it=Kr),!0):!1},pe,ve),Ut,Jt,nr=!1;if(it){var vr=k-it.left<it.right-k,ir=vr==we;Ct=ct+(ir?0:1),Jt=ir?"after":"before",Ut=vr?it.left:it.right}else{!we&&(Ct==ve||Ct==pe)&&Ct++,Jt=Ct==0?"after":Ct==u.text.length?"before":qe(e,Q,Ct-(we?1:0)).bottom+ae<=W==we?"after":"before";var Cr=hn(e,Nt(j,Ct,Jt),"line",u,Q);Ut=Cr.left,nr=W<Cr.top?-1:W>=Cr.bottom?1:0}return Ct=xe(u.text,Ct,1),Ur(j,Ct,Jt,nr,k-Ut)}function Cn(e,u,j,k,W,Q,ae){var pe=Ke(function(Ye){var ct=W[Ye],it=ct.level!=1;return xn(hn(e,Nt(j,it?ct.to:ct.from,it?"before":"after"),"line",u,k),Q,ae,!0)},0,W.length-1),ve=W[pe];if(pe>0){var we=ve.level!=1,We=hn(e,Nt(j,we?ve.from:ve.to,we?"after":"before"),"line",u,k);xn(We,Q,ae,!0)&&We.top>ae&&(ve=W[pe-1])}return ve}function jn(e,u,j,k,W,Q,ae){var pe=gn(e,u,k,ae),ve=pe.begin,we=pe.end;/\s/.test(u.text.charAt(we-1))&&we--;for(var We=null,Ye=null,ct=0;ct<W.length;ct++){var it=W[ct];if(it.from>=we||it.to<=ve)continue;var Ct=it.level!=1,Ut=qe(e,k,Ct?Math.min(we,it.to)-1:Math.max(ve,it.from)).right,Jt=Ut<Q?Q-Ut+1e9:Ut-Q;(!We||Ye>Jt)&&(We=it,Ye=Jt)}return We||(We=W[W.length-1]),We.from<ve&&(We={from:ve,to:We.to,level:We.level}),We.to>we&&(We={from:We.from,to:we,level:We.level}),We}var Rn;function ei(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Rn==null){Rn=S("pre",null,"CodeMirror-line-like");for(var u=0;u<49;++u)Rn.appendChild(document.createTextNode("x")),Rn.appendChild(S("br"));Rn.appendChild(document.createTextNode("x"))}w(e.measure,Rn);var j=Rn.offsetHeight/50;return j>3&&(e.cachedTextHeight=j),E(e.measure),j||1}function ui(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var u=S("span","xxxxxxxxxx"),j=S("pre",[u],"CodeMirror-line-like");w(e.measure,j);var k=u.getBoundingClientRect(),W=(k.right-k.left)/10;return W>2&&(e.cachedCharWidth=W),W||10}function Xn(e){for(var u=e.display,j={},k={},W=u.gutters.clientLeft,Q=u.gutters.firstChild,ae=0;Q;Q=Q.nextSibling,++ae){var pe=e.display.gutterSpecs[ae].className;j[pe]=Q.offsetLeft+Q.clientLeft+W,k[pe]=Q.clientWidth}return{fixedPos:gi(u),gutterTotalWidth:u.gutters.offsetWidth,gutterLeft:j,gutterWidth:k,wrapperWidth:u.wrapper.clientWidth}}function gi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var u=ei(e.display),j=e.options.lineWrapping,k=j&&Math.max(5,e.display.scroller.clientWidth/ui(e.display)-3);return function(W){if($t(e.doc,W))return 0;var Q=0;if(W.widgets)for(var ae=0;ae<W.widgets.length;ae++)W.widgets[ae].height&&(Q+=W.widgets[ae].height);return j?Q+(Math.ceil(W.text.length/k)||1)*u:Q+u}}function Si(e){var u=e.doc,j=Xi(e);u.iter(function(k){var W=j(k);W!=k.height&&On(k,W)})}function ci(e,u,j,k){var W=e.display;if(!j&&He(u).getAttribute("cm-not-content")=="true")return null;var Q,ae,pe=W.lineSpace.getBoundingClientRect();try{Q=u.clientX-pe.left,ae=u.clientY-pe.top}catch(Ye){return null}var ve=on(e,Q,ae),we;if(k&&ve.xRel>0&&(we=sr(e.doc,ve.line).text).length==ve.ch){var We=K(we,we.length,e.options.tabSize)-we.length;ve=Nt(ve.line,Math.max(0,Math.round((Q-Xe(e.display).left)/ui(e.display))-We))}return ve}function Fn(e,u){if(u>=e.display.viewTo)return null;if(u-=e.display.viewFrom,u<0)return null;for(var j=e.display.view,k=0;k<j.length;k++)if(u-=j[k].size,u<0)return k}function Un(e,u,j,k){u==null&&(u=e.doc.first),j==null&&(j=e.doc.first+e.doc.size),k||(k=0);var W=e.display;if(k&&j<W.viewTo&&(W.updateLineNumbers==null||W.updateLineNumbers>u)&&(W.updateLineNumbers=u),e.curOp.viewChanged=!0,u>=W.viewTo)Gn&&ar(e.doc,u)<W.viewTo&&zn(e);else if(j<=W.viewFrom)Gn&&Zt(e.doc,j+k)>W.viewFrom?zn(e):(W.viewFrom+=k,W.viewTo+=k);else if(u<=W.viewFrom&&j>=W.viewTo)zn(e);else if(u<=W.viewFrom){var Q=ai(e,j,j+k,1);Q?(W.view=W.view.slice(Q.index),W.viewFrom=Q.lineN,W.viewTo+=k):zn(e)}else if(j>=W.viewTo){var ae=ai(e,u,u,-1);ae?(W.view=W.view.slice(0,ae.index),W.viewTo=ae.lineN):zn(e)}else{var pe=ai(e,u,u,-1),ve=ai(e,j,j+k,1);pe&&ve?(W.view=W.view.slice(0,pe.index).concat(sn(e,pe.lineN,ve.lineN)).concat(W.view.slice(ve.index)),W.viewTo+=k):zn(e)}var we=W.externalMeasured;we&&(j<we.lineN?we.lineN+=k:u<we.lineN+we.size&&(W.externalMeasured=null))}function Yn(e,u,j){e.curOp.viewChanged=!0;var k=e.display,W=e.display.externalMeasured;if(W&&u>=W.lineN&&u<W.lineN+W.size&&(k.externalMeasured=null),u<k.viewFrom||u>=k.viewTo)return;var Q=k.view[Fn(e,u)];if(Q.node==null)return;var ae=Q.changes||(Q.changes=[]);ue(ae,j)==-1&&ae.push(j)}function zn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ai(e,u,j,k){var W=Fn(e,u),Q,ae=e.display.view;if(!Gn||j==e.doc.first+e.doc.size)return{index:W,lineN:j};for(var pe=e.display.viewFrom,ve=0;ve<W;ve++)pe+=ae[ve].size;if(pe!=u){if(k>0){if(W==ae.length-1)return null;Q=pe+ae[W].size-u,W++}else Q=pe-u;u+=Q,j+=Q}for(;ar(e.doc,j)!=j;){if(W==(k<0?0:ae.length-1))return null;j+=k*ae[W-(k<0?1:0)].size,W+=k}return{index:W,lineN:j}}function Ai(e,u,j){var k=e.display,W=k.view;W.length==0||u>=k.viewTo||j<=k.viewFrom?(k.view=sn(e,u,j),k.viewFrom=u):(k.viewFrom>u?k.view=sn(e,u,k.viewFrom).concat(k.view):k.viewFrom<u&&(k.view=k.view.slice(Fn(e,u))),k.viewFrom=u,k.viewTo<j?k.view=k.view.concat(sn(e,k.viewTo,j)):k.viewTo>j&&(k.view=k.view.slice(0,Fn(e,j)))),k.viewTo=j}function ra(e){for(var u=e.display.view,j=0,k=0;k<u.length;k++){var W=u[k];!W.hidden&&(!W.node||W.changes)&&++j}return j}function Dn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fi(e,u){u===void 0&&(u=!0);for(var j=e.doc,k={},W=k.cursors=document.createDocumentFragment(),Q=k.selection=document.createDocumentFragment(),ae=0;ae<j.sel.ranges.length;ae++){if(!u&&ae==j.sel.primIndex)continue;var pe=j.sel.ranges[ae];if(pe.from().line>=e.display.viewTo||pe.to().line<e.display.viewFrom)continue;var ve=pe.empty();(ve||e.options.showCursorWhenSelecting)&&Ui(e,pe.head,W),ve||In(e,pe,Q)}return k}function Ui(e,u,j){var k=hn(e,u,"div",null,null,!e.options.singleCursorHeightPerLine),W=j.appendChild(S("div","\xA0","CodeMirror-cursor"));if(W.style.left=k.left+"px",W.style.top=k.top+"px",W.style.height=Math.max(0,k.bottom-k.top)*e.options.cursorHeight+"px",k.other){var Q=j.appendChild(S("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Q.style.display="",Q.style.left=k.other.left+"px",Q.style.top=k.other.top+"px",Q.style.height=(k.other.bottom-k.other.top)*.85+"px"}}function Mn(e,u){return e.top-u.top||e.left-u.left}function In(e,u,j){var k=e.display,W=e.doc,Q=document.createDocumentFragment(),ae=Xe(e.display),pe=ae.left,ve=Math.max(k.sizerWidth,Ue(e)-k.sizer.offsetLeft)-ae.right,we=W.direction=="ltr";function We(ir,Cr,Zr,Kr){Cr<0&&(Cr=0),Cr=Math.round(Cr),Kr=Math.round(Kr),Q.appendChild(S("div",null,"CodeMirror-selected","position: absolute; left: "+ir+`px;
top: `+Cr+"px; width: "+(Zr==null?ve-ir:Zr)+`px;
height: `+(Kr-Cr)+"px"))}function Ye(ir,Cr,Zr){var Kr=sr(W,ir),_n=Kr.text.length,$n,Ci;function si(vi,Qi){return Pn(e,Nt(ir,vi),"div",Kr,Qi)}function qi(vi,Qi,Ii){var Ei=Tr(e,Kr,null,vi),yi=Qi=="ltr"==(Ii=="after")?"left":"right",di=Ii=="after"?Ei.begin:Ei.end-(/\s/.test(Kr.text.charAt(Ei.end-1))?2:1);return si(di,yi)[yi]}var Ji=dt(Kr,W.direction);return Ze(Ji,Cr||0,Zr==null?_n:Zr,function(vi,Qi,Ii,Ei){var yi=Ii=="ltr",di=si(vi,yi?"left":"right"),Zi=si(Qi-1,yi?"right":"left"),lo=Cr==null&&vi==0,Ua=Zr==null&&Qi==_n,Mi=Ei==0,xa=!Ji||Ei==Ji.length-1;if(Zi.top-di.top<=3){var Oi=(we?lo:Ua)&&Mi,ps=(we?Ua:lo)&&xa,Da=Oi?pe:(yi?di:Zi).left,Ga=ps?ve:(yi?Zi:di).right;We(Da,di.top,Ga-Da,di.bottom)}else{var Va,zi,uo,ms;yi?(Va=we&&lo&&Mi?pe:di.left,zi=we?ve:qi(vi,Ii,"before"),uo=we?pe:qi(Qi,Ii,"after"),ms=we&&Ua&&xa?ve:Zi.right):(Va=we?qi(vi,Ii,"before"):pe,zi=!we&&lo&&Mi?ve:di.right,uo=!we&&Ua&&xa?pe:Zi.left,ms=we?qi(Qi,Ii,"after"):ve),We(Va,di.top,zi-Va,di.bottom),di.bottom<Zi.top&&We(pe,di.bottom,null,Zi.top),We(uo,Zi.top,ms-uo,Zi.bottom)}(!$n||Mn(di,$n)<0)&&($n=di),Mn(Zi,$n)<0&&($n=Zi),(!Ci||Mn(di,Ci)<0)&&(Ci=di),Mn(Zi,Ci)<0&&(Ci=Zi)}),{start:$n,end:Ci}}var ct=u.from(),it=u.to();if(ct.line==it.line)Ye(ct.line,ct.ch,it.ch);else{var Ct=sr(W,ct.line),Ut=sr(W,it.line),Jt=St(Ct)==St(Ut),nr=Ye(ct.line,ct.ch,Jt?Ct.text.length+1:null).end,vr=Ye(it.line,Jt?0:null,it.ch).start;Jt&&(nr.top<vr.top-2?(We(nr.right,nr.top,null,nr.bottom),We(pe,vr.top,vr.left,vr.bottom)):We(nr.right,nr.top,vr.left-nr.right,nr.bottom)),nr.bottom<vr.top&&We(pe,nr.bottom,null,vr.top)}j.appendChild(Q)}function oi(e){if(!e.state.focused)return;var u=e.display;clearInterval(u.blinker);var j=!0;u.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?u.blinker=setInterval(function(){e.hasFocus()||la(e),u.cursorDiv.style.visibility=(j=!j)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(u.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),sa(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,la(e))},100)}function sa(e,u){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Qe(e,"focus",e,u),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()),oi(e)}function la(e,u){if(e.state.delayingBlurEvent)return;e.state.focused&&(Qe(e,"blur",e,u),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function La(e){for(var u=e.display,j=u.lineDiv.offsetTop,k=0;k<u.view.length;k++){var W=u.view[k],Q=e.options.lineWrapping,ae=void 0,pe=0;if(W.hidden)continue;if(T&&y<8){var ve=W.node.offsetTop+W.node.offsetHeight;ae=ve-j,j=ve}else{var we=W.node.getBoundingClientRect();ae=we.bottom-we.top,!Q&&W.text.firstChild&&(pe=W.text.firstChild.getBoundingClientRect().right-we.left-1)}var We=W.line.height-ae;if((We>.005||We<-.005)&&(On(W.line,ae),Ta(W.line),W.rest))for(var Ye=0;Ye<W.rest.length;Ye++)Ta(W.rest[Ye]);if(pe>e.display.sizerWidth){var ct=Math.ceil(pe/ui(e.display));ct>e.display.maxLineLength&&(e.display.maxLineLength=ct,e.display.maxLine=W.line,e.display.maxLineChanged=!0)}}}function Ta(e){if(e.widgets)for(var u=0;u<e.widgets.length;++u){var j=e.widgets[u],k=j.node.parentNode;k&&(j.height=k.offsetHeight)}}function ka(e,u,j){var k=j&&j.top!=null?Math.max(0,j.top):e.scroller.scrollTop;k=Math.floor(k-Qn(e));var W=j&&j.bottom!=null?j.bottom:k+e.wrapper.clientHeight,Q=An(u,k),ae=An(u,W);if(j&&j.ensure){var pe=j.ensure.from.line,ve=j.ensure.to.line;pe<Q?(Q=pe,ae=An(u,cr(sr(u,pe))+e.wrapper.clientHeight)):Math.min(ve,u.lastLine())>=ae&&(Q=An(u,cr(sr(u,ve))-e.wrapper.clientHeight),ae=ve)}return{from:Q,to:Math.max(ae,Q+1)}}function Ha(e,u){if(tt(e,"scrollCursorIntoView"))return;var j=e.display,k=j.sizer.getBoundingClientRect(),W=null;if(u.top+k.top<0?W=!0:u.bottom+k.top>(window.innerHeight||document.documentElement.clientHeight)&&(W=!1),W!=null&&!s){var Q=S("div","\u200B",null,`position: absolute;
top: `+(u.top-j.viewOffset-Qn(e.display))+`px;
height: `+(u.bottom-u.top+Je(e)+j.barHeight)+`px;
left: `+u.left+"px; width: "+Math.max(2,u.right-u.left)+"px;");e.display.lineSpace.appendChild(Q),Q.scrollIntoView(W),e.display.lineSpace.removeChild(Q)}}function Xa(e,u,j,k){k==null&&(k=0);var W;!e.options.lineWrapping&&u==j&&(u=u.ch?Nt(u.line,u.sticky=="before"?u.ch-1:u.ch,"after"):u,j=u.sticky=="before"?Nt(u.line,u.ch+1,"before"):u);for(var Q=0;Q<5;Q++){var ae=!1,pe=hn(e,u),ve=!j||j==u?pe:hn(e,j);W={left:Math.min(pe.left,ve.left),top:Math.min(pe.top,ve.top)-k,right:Math.max(pe.left,ve.left),bottom:Math.max(pe.bottom,ve.bottom)+k};var we=ua(e,W),We=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(we.scrollTop!=null&&(da(e,we.scrollTop),Math.abs(e.doc.scrollTop-We)>1&&(ae=!0)),we.scrollLeft!=null&&(Yi(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(ae=!0)),!ae)break}return W}function Pa(e,u){var j=ua(e,u);j.scrollTop!=null&&da(e,j.scrollTop),j.scrollLeft!=null&&Yi(e,j.scrollLeft)}function ua(e,u){var j=e.display,k=ei(e.display);u.top<0&&(u.top=0);var W=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:j.scroller.scrollTop,Q=_e(e),ae={};u.bottom-u.top>Q&&(u.bottom=u.top+Q);var pe=e.doc.height+Pe(j),ve=u.top<k,we=u.bottom>pe-k;if(u.top<W)ae.scrollTop=ve?0:u.top;else if(u.bottom>W+Q){var We=Math.min(u.top,(we?pe:u.bottom)-Q);We!=W&&(ae.scrollTop=We)}var Ye=e.options.fixedGutter?0:j.gutters.offsetWidth,ct=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:j.scroller.scrollLeft-Ye,it=Ue(e)-j.gutters.offsetWidth,Ct=u.right-u.left>it;return Ct&&(u.right=u.left+it),u.left<10?ae.scrollLeft=0:u.left<ct?ae.scrollLeft=Math.max(0,u.left+Ye-(Ct?0:10)):u.right>it+ct-3&&(ae.scrollLeft=u.right+(Ct?0:10)-it),ae}function Sa(e,u){if(u==null)return;_a(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+u}function ba(e){_a(e);var u=e.getCursor();e.curOp.scrollToPos={from:u,to:u,margin:e.options.cursorScrollMargin}}function ca(e,u,j){(u!=null||j!=null)&&_a(e),u!=null&&(e.curOp.scrollLeft=u),j!=null&&(e.curOp.scrollTop=j)}function co(e,u){_a(e),e.curOp.scrollToPos=u}function _a(e){var u=e.curOp.scrollToPos;if(u){e.curOp.scrollToPos=null;var j=Nr(e,u.from),k=Nr(e,u.to);Ca(e,j,k,u.margin)}}function Ca(e,u,j,k){var W=ua(e,{left:Math.min(u.left,j.left),top:Math.min(u.top,j.top)-k,right:Math.max(u.right,j.right),bottom:Math.max(u.bottom,j.bottom)+k});ca(e,W.scrollLeft,W.scrollTop)}function da(e,u){if(Math.abs(e.doc.scrollTop-u)<2)return;C||za(e,{top:u}),fa(e,u,!0),C&&za(e),Wa(e,100)}function fa(e,u,j){if(u=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,u)),e.display.scroller.scrollTop==u&&!j)return;e.doc.scrollTop=u,e.display.scrollbars.setScrollTop(u),e.display.scroller.scrollTop!=u&&(e.display.scroller.scrollTop=u)}function Yi(e,u,j,k){if(u=Math.max(0,Math.min(u,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(j?u==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-u)<2)&&!k)return;e.doc.scrollLeft=u,Sn(e),e.display.scroller.scrollLeft!=u&&(e.display.scroller.scrollLeft=u),e.display.scrollbars.setScrollLeft(u)}function na(e){var u=e.display,j=u.gutters.offsetWidth,k=Math.round(e.doc.height+Pe(e.display));return{clientHeight:u.scroller.clientHeight,viewHeight:u.wrapper.clientHeight,scrollWidth:u.scroller.scrollWidth,clientWidth:u.scroller.clientWidth,viewWidth:u.wrapper.clientWidth,barLeft:e.options.fixedGutter?j:0,docHeight:k,scrollHeight:k+Je(e)+u.barHeight,nativeBarWidth:u.nativeBarWidth,gutterWidth:j}}var wr=function(e,u,j){this.cm=j;var k=this.vert=S("div",[S("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),W=this.horiz=S("div",[S("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");k.tabIndex=W.tabIndex=-1,e(k),e(W),Ie(k,"scroll",function(){k.clientHeight&&u(k.scrollTop,"vertical")}),Ie(W,"scroll",function(){W.clientWidth&&u(W.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&y<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wr.prototype.update=function(e){var u=e.scrollWidth>e.clientWidth+1,j=e.scrollHeight>e.clientHeight+1,k=e.nativeBarWidth;if(j){this.vert.style.display="block",this.vert.style.bottom=u?k+"px":"0";var W=e.viewHeight-(u?k:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+W)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(u){this.horiz.style.display="block",this.horiz.style.right=j?k+"px":"0",this.horiz.style.left=e.barLeft+"px";var Q=e.viewWidth-e.barLeft-(j?k:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Q)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(k==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:j?k:0,bottom:u?k:0}},wr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wr.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 Z,this.disableVert=new Z},wr.prototype.enableZeroWidthBar=function(e,u,j){e.style.pointerEvents="auto";function k(){var W=e.getBoundingClientRect(),Q=j=="vert"?document.elementFromPoint(W.right-1,(W.top+W.bottom)/2):document.elementFromPoint((W.right+W.left)/2,W.bottom-1);Q!=e?e.style.pointerEvents="none":u.set(1e3,k)}u.set(1e3,k)},wr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Sr=function(){};Sr.prototype.update=function(){return{bottom:0,right:0}},Sr.prototype.setScrollLeft=function(){},Sr.prototype.setScrollTop=function(){},Sr.prototype.clear=function(){};function or(e,u){u||(u=na(e));var j=e.display.barWidth,k=e.display.barHeight;wn(e,u);for(var W=0;W<4&&j!=e.display.barWidth||k!=e.display.barHeight;W++)j!=e.display.barWidth&&e.options.lineWrapping&&La(e),wn(e,na(e)),j=e.display.barWidth,k=e.display.barHeight}function wn(e,u){var j=e.display,k=j.scrollbars.update(u);j.sizer.style.paddingRight=(j.barWidth=k.right)+"px",j.sizer.style.paddingBottom=(j.barHeight=k.bottom)+"px",j.heightForcer.style.borderBottom=k.bottom+"px solid transparent",k.right&&k.bottom?(j.scrollbarFiller.style.display="block",j.scrollbarFiller.style.height=k.bottom+"px",j.scrollbarFiller.style.width=k.right+"px"):j.scrollbarFiller.style.display="",k.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(j.gutterFiller.style.display="block",j.gutterFiller.style.height=k.bottom+"px",j.gutterFiller.style.width=u.gutterWidth+"px"):j.gutterFiller.style.display=""}var hr={native:wr,null:Sr};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new hr[e.options.scrollbarStyle](function(u){e.display.wrapper.insertBefore(u,e.display.scrollbarFiller),Ie(u,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),u.setAttribute("cm-not-content","true")},function(u,j){j=="horizontal"?Yi(e,u):da(e,u)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Ya=0;function Hn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ya},mr(e.curOp)}function Oa(e){var u=e.curOp;u&&Mr(u,function(j){for(var k=0;k<j.ops.length;k++)j.ops[k].cm.curOp=null;Io(j)})}function Io(e){for(var u=e.ops,j=0;j<u.length;j++)Jo(u[j]);for(var k=0;k<u.length;k++)Qo(u[k]);for(var W=0;W<u.length;W++)Zo(u[W]);for(var Q=0;Q<u.length;Q++)ho(u[Q]);for(var ae=0;ae<u.length;ae++)qo(u[ae])}function Jo(e){var u=e.cm,j=u.display;Do(u),e.updateMaxLine&&Rr(u),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<j.viewFrom||e.scrollToPos.to.line>=j.viewTo)||j.maxLineChanged&&u.options.lineWrapping,e.update=e.mustUpdate&&new ia(u,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var u=e.cm,j=u.display;e.updatedDisplay&&La(u),e.barMeasure=na(u),j.maxLineChanged&&!u.options.lineWrapping&&(e.adjustWidthTo=Ge(u,j.maxLine,j.maxLine.text.length).left+3,u.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(j.scroller.clientWidth,j.sizer.offsetLeft+e.adjustWidthTo+Je(u)+u.display.barWidth),e.maxScrollLeft=Math.max(0,j.sizer.offsetLeft+e.adjustWidthTo-Ue(u))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=j.input.prepareSelection())}function ho(e){var u=e.cm;e.adjustWidthTo!=null&&(u.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<u.doc.scrollLeft&&Yi(u,Math.min(u.display.scroller.scrollLeft,e.maxScrollLeft),!0),u.display.maxLineChanged=!1);var j=e.focus&&e.focus==G();e.preparedSelection&&u.display.input.showSelection(e.preparedSelection,j),(e.updatedDisplay||e.startHeight!=u.doc.height)&&or(u,e.barMeasure),e.updatedDisplay&&Nn(u,e.barMeasure),e.selectionChanged&&oi(u),u.state.focused&&e.updateInput&&u.display.input.reset(e.typing),j&&Ba(e.cm)}function qo(e){var u=e.cm,j=u.display,k=u.doc;if(e.updatedDisplay&&$a(u,e.update),j.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(j.wheelStartX=j.wheelStartY=null),e.scrollTop!=null&&fa(u,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Yi(u,e.scrollLeft,!0,!0),e.scrollToPos){var W=Xa(u,V(k,e.scrollToPos.from),V(k,e.scrollToPos.to),e.scrollToPos.margin);Ha(u,W)}var Q=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(Q)for(var pe=0;pe<Q.length;++pe)Q[pe].lines.length||Qe(Q[pe],"hide");if(ae)for(var ve=0;ve<ae.length;++ve)ae[ve].lines.length&&Qe(ae[ve],"unhide");j.wrapper.offsetHeight&&(k.scrollTop=u.display.scroller.scrollTop),e.changeObjs&&Qe(u,"changes",u,e.changeObjs),e.update&&e.update.finish()}function Bi(e,u){if(e.curOp)return u();Hn(e);try{return u()}finally{Oa(e)}}function hi(e,u){return function(){if(e.curOp)return u.apply(e,arguments);Hn(e);try{return u.apply(e,arguments)}finally{Oa(e)}}}function Ri(e){return function(){if(this.curOp)return e.apply(this,arguments);Hn(this);try{return e.apply(this,arguments)}finally{Oa(this)}}}function fi(e){return function(){var u=this.cm;if(!u||u.curOp)return e.apply(this,arguments);Hn(u);try{return e.apply(this,arguments)}finally{Oa(u)}}}function Wa(e,u){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(u,U(es,e))}function es(e){var u=e.doc;if(u.highlightFrontier>=e.display.viewTo)return;var j=+new Date+e.options.workTime,k=Xt(e,u.highlightFrontier),W=[];u.iter(k.line,Math.min(u.first+u.size,e.display.viewTo+500),function(Q){if(k.line>=e.display.viewFrom){var ae=Q.styles,pe=Q.text.length>e.options.maxHighlightLength?Br(u.mode,k.state):null,ve=Ve(e,Q,k,!0);pe&&(k.state=pe),Q.styles=ve.styles;var we=Q.styleClasses,We=ve.classes;We?Q.styleClasses=We:we&&(Q.styleClasses=null);for(var Ye=!ae||ae.length!=Q.styles.length||we!=We&&(!we||!We||we.bgClass!=We.bgClass||we.textClass!=We.textClass),ct=0;!Ye&&ct<ae.length;++ct)Ye=ae[ct]!=Q.styles[ct];Ye&&W.push(k.line),Q.stateAfter=k.save(),k.nextLine()}else Q.text.length<=e.options.maxHighlightLength&&Er(e,Q.text,k),Q.stateAfter=k.line%5==0?k.save():null,k.nextLine();if(+new Date>j)return Wa(e,e.options.workDelay),!0}),u.highlightFrontier=k.line,u.modeFrontier=Math.max(u.modeFrontier,k.line),W.length&&Bi(e,function(){for(var Q=0;Q<W.length;Q++)Yn(e,W[Q],"text")})}var ia=function(e,u,j){var k=e.display;this.viewport=u,this.visible=ka(k,e.doc,u),this.editorIsHidden=!k.wrapper.offsetWidth,this.wrapperHeight=k.wrapper.clientHeight,this.wrapperWidth=k.wrapper.clientWidth,this.oldDisplayWidth=Ue(e),this.force=j,this.dims=Xn(e),this.events=[]};ia.prototype.signal=function(e,u){ke(e,u)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Qe.apply(null,this.events[e])};function Do(e){var u=e.display;!u.scrollbarsClipped&&u.scroller.offsetWidth&&(u.nativeBarWidth=u.scroller.offsetWidth-u.scroller.clientWidth,u.heightForcer.style.height=Je(e)+"px",u.sizer.style.marginBottom=-u.nativeBarWidth+"px",u.sizer.style.borderRightWidth=Je(e)+"px",u.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var u=G();if(!u||!L(e.display.lineDiv,u))return null;var j={activeElt:u};if(window.getSelection){var k=window.getSelection();k.anchorNode&&k.extend&&L(e.display.lineDiv,k.anchorNode)&&(j.anchorNode=k.anchorNode,j.anchorOffset=k.anchorOffset,j.focusNode=k.focusNode,j.focusOffset=k.focusOffset)}return j}function ko(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode)){var u=window.getSelection(),j=document.createRange();j.setEnd(e.anchorNode,e.anchorOffset),j.collapse(!1),u.removeAllRanges(),u.addRange(j),u.extend(e.focusNode,e.focusOffset)}}function Aa(e,u){var j=e.display,k=e.doc;if(u.editorIsHidden)return zn(e),!1;if(!u.force&&u.visible.from>=j.viewFrom&&u.visible.to<=j.viewTo&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo)&&j.renderedView==j.view&&ra(e)==0)return!1;bi(e)&&(zn(e),u.dims=Xn(e));var W=k.first+k.size,Q=Math.max(u.visible.from-e.options.viewportMargin,k.first),ae=Math.min(W,u.visible.to+e.options.viewportMargin);j.viewFrom<Q&&Q-j.viewFrom<20&&(Q=Math.max(k.first,j.viewFrom)),j.viewTo>ae&&j.viewTo-ae<20&&(ae=Math.min(W,j.viewTo)),Gn&&(Q=ar(e.doc,Q),ae=Zt(e.doc,ae));var pe=Q!=j.viewFrom||ae!=j.viewTo||j.lastWrapHeight!=u.wrapperHeight||j.lastWrapWidth!=u.wrapperWidth;Ai(e,Q,ae),j.viewOffset=cr(sr(e.doc,j.viewFrom)),e.display.mover.style.top=j.viewOffset+"px";var ve=ra(e);if(!pe&&ve==0&&!u.force&&j.renderedView==j.view&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo))return!1;var we=Lo(e);return ve>4&&(j.lineDiv.style.display="none"),Po(e,j.updateLineNumbers,u.dims),ve>4&&(j.lineDiv.style.display=""),j.renderedView=j.view,ko(we),E(j.cursorDiv),E(j.selectionDiv),j.gutters.style.height=j.sizer.style.minHeight=0,pe&&(j.lastWrapHeight=u.wrapperHeight,j.lastWrapWidth=u.wrapperWidth,Wa(e,400)),j.updateLineNumbers=null,!0}function $a(e,u){for(var j=u.viewport,k=!0;;k=!1){if(!k||!e.options.lineWrapping||u.oldDisplayWidth==Ue(e)){if(j&&j.top!=null&&(j={top:Math.min(e.doc.height+Pe(e.display)-_e(e),j.top)}),u.visible=ka(e.display,e.doc,j),u.visible.from>=e.display.viewFrom&&u.visible.to<=e.display.viewTo)break}else k&&(u.visible=ka(e.display,e.doc,j));if(!Aa(e,u))break;La(e);var W=na(e);Dn(e),or(e,W),Nn(e,W),u.force=!1}u.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(u.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,u){var j=new ia(e,u);if(Aa(e,j)){La(e),$a(e,j);var k=na(e);Dn(e),or(e,k),Nn(e,k),j.finish()}}function Po(e,u,j){var k=e.display,W=e.options.lineNumbers,Q=k.lineDiv,ae=Q.firstChild;function pe(Ct){var Ut=Ct.nextSibling;return t&&o&&e.display.currentWheelTarget==Ct?Ct.style.display="none":Ct.parentNode.removeChild(Ct),Ut}for(var ve=k.view,we=k.viewFrom,We=0;We<ve.length;We++){var Ye=ve[We];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=Q){var ct=Or(e,Ye,we,j);Q.insertBefore(ct,ae)}else{for(;ae!=Ye.node;)ae=pe(ae);var it=W&&u!=null&&u<=we&&Ye.lineNumber;Ye.changes&&(ue(Ye.changes,"gutter")>-1&&(it=!1),tr(e,Ye,we,j)),it&&(E(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(ri(e.options,we)))),ae=Ye.node.nextSibling}we+=Ye.size}for(;ae;)ae=pe(ae)}function Ja(e){var u=e.gutters.offsetWidth;e.sizer.style.marginLeft=u+"px"}function Nn(e,u){e.display.sizer.style.minHeight=u.docHeight+"px",e.display.heightForcer.style.top=u.docHeight+"px",e.display.gutters.style.height=u.docHeight+e.display.barHeight+Je(e)+"px"}function Sn(e){var u=e.display,j=u.view;if(!u.alignWidgets&&(!u.gutters.firstChild||!e.options.fixedGutter))return;for(var k=gi(u)-u.scroller.scrollLeft+e.doc.scrollLeft,W=u.gutters.offsetWidth,Q=k+"px",ae=0;ae<j.length;ae++)if(!j[ae].hidden){e.options.fixedGutter&&(j[ae].gutter&&(j[ae].gutter.style.left=Q),j[ae].gutterBackground&&(j[ae].gutterBackground.style.left=Q));var pe=j[ae].alignable;if(pe)for(var ve=0;ve<pe.length;ve++)pe[ve].style.left=Q}e.options.fixedGutter&&(u.gutters.style.left=k+W+"px")}function bi(e){if(!e.options.lineNumbers)return!1;var u=e.doc,j=ri(e.options,u.first+u.size-1),k=e.display;if(j.length!=k.lineNumChars){var W=k.measure.appendChild(S("div",[S("div",j)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Q=W.firstChild.offsetWidth,ae=W.offsetWidth-Q;return k.lineGutter.style.width="",k.lineNumInnerWidth=Math.max(Q,k.lineGutter.offsetWidth-ae)+1,k.lineNumWidth=k.lineNumInnerWidth+ae,k.lineNumChars=k.lineNumInnerWidth?j.length:-1,k.lineGutter.style.width=k.lineNumWidth+"px",Ja(e.display),!0}return!1}function Hi(e,u){for(var j=[],k=!1,W=0;W<e.length;W++){var Q=e[W],ae=null;if(typeof Q!="string"&&(ae=Q.style,Q=Q.className),Q=="CodeMirror-linenumbers")if(u)k=!0;else continue;j.push({className:Q,style:ae})}return u&&!k&&j.push({className:"CodeMirror-linenumbers",style:null}),j}function Ma(e){var u=e.gutters,j=e.gutterSpecs;E(u),e.lineGutter=null;for(var k=0;k<j.length;++k){var W=j[k],Q=W.className,ae=W.style,pe=u.appendChild(S("div",null,"CodeMirror-gutter "+Q));ae&&(pe.style.cssText=ae),Q=="CodeMirror-linenumbers"&&(e.lineGutter=pe,pe.style.width=(e.lineNumWidth||1)+"px")}u.style.display=j.length?"":"none",Ja(e)}function ma(e){Ma(e.display),Un(e),Sn(e)}function Ka(e,u,j,k){var W=this;this.input=j,W.scrollbarFiller=S("div",null,"CodeMirror-scrollbar-filler"),W.scrollbarFiller.setAttribute("cm-not-content","true"),W.gutterFiller=S("div",null,"CodeMirror-gutter-filler"),W.gutterFiller.setAttribute("cm-not-content","true"),W.lineDiv=F("div",null,"CodeMirror-code"),W.selectionDiv=S("div",null,null,"position: relative; z-index: 1"),W.cursorDiv=S("div",null,"CodeMirror-cursors"),W.measure=S("div",null,"CodeMirror-measure"),W.lineMeasure=S("div",null,"CodeMirror-measure"),W.lineSpace=F("div",[W.measure,W.lineMeasure,W.selectionDiv,W.cursorDiv,W.lineDiv],null,"position: relative; outline: none");var Q=F("div",[W.lineSpace],"CodeMirror-lines");W.mover=S("div",[Q],null,"position: relative"),W.sizer=S("div",[W.mover],"CodeMirror-sizer"),W.sizerWidth=null,W.heightForcer=S("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),W.gutters=S("div",null,"CodeMirror-gutters"),W.lineGutter=null,W.scroller=S("div",[W.sizer,W.heightForcer,W.gutters],"CodeMirror-scroll"),W.scroller.setAttribute("tabIndex","-1"),W.wrapper=S("div",[W.scrollbarFiller,W.gutterFiller,W.scroller],"CodeMirror"),T&&y<8&&(W.gutters.style.zIndex=-1,W.scroller.style.paddingRight=0),!t&&!(C&&l)&&(W.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(W.wrapper):e(W.wrapper)),W.viewFrom=W.viewTo=u.first,W.reportedViewFrom=W.reportedViewTo=u.first,W.view=[],W.renderedView=null,W.externalMeasured=null,W.viewOffset=0,W.lastWrapHeight=W.lastWrapWidth=0,W.updateLineNumbers=null,W.nativeBarWidth=W.barHeight=W.barWidth=0,W.scrollbarsClipped=!1,W.lineNumWidth=W.lineNumInnerWidth=W.lineNumChars=null,W.alignWidgets=!1,W.cachedCharWidth=W.cachedTextHeight=W.cachedPaddingH=null,W.maxLine=null,W.maxLineLength=0,W.maxLineChanged=!1,W.wheelDX=W.wheelDY=W.wheelStartX=W.wheelStartY=null,W.shift=!1,W.selForContextMenu=null,W.activeTouch=null,W.gutterSpecs=Hi(k.gutters,k.lineNumbers),Ma(W),j.init(W)}var Ea=0,_i=null;T?_i=-.53:C?_i=15:i?_i=-.7:a&&(_i=-1/3);function Qa(e){var u=e.wheelDeltaX,j=e.wheelDeltaY;return u==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(u=e.detail),j==null&&e.detail&&e.axis==e.VERTICAL_AXIS?j=e.detail:j==null&&(j=e.wheelDelta),{x:u,y:j}}function fo(e){var u=Qa(e);return u.x*=_i,u.y*=_i,u}function po(e,u){var j=Qa(u),k=j.x,W=j.y,Q=e.display,ae=Q.scroller,pe=ae.scrollWidth>ae.clientWidth,ve=ae.scrollHeight>ae.clientHeight;if(!(k&&pe||W&&ve))return;if(W&&o&&t){e:for(var we=u.target,We=Q.view;we!=ae;we=we.parentNode)for(var Ye=0;Ye<We.length;Ye++)if(We[Ye].node==we){e.display.currentWheelTarget=we;break e}}if(k&&!C&&!c&&_i!=null){W&&ve&&da(e,Math.max(0,ae.scrollTop+W*_i)),Yi(e,Math.max(0,ae.scrollLeft+k*_i)),(!W||W&&ve)&&Ee(u),Q.wheelStartX=null;return}if(W&&_i!=null){var ct=W*_i,it=e.doc.scrollTop,Ct=it+Q.wrapper.clientHeight;ct<0?it=Math.max(0,it+ct-50):Ct=Math.min(e.doc.height,Ct+ct+50),za(e,{top:it,bottom:Ct})}Ea<20&&(Q.wheelStartX==null?(Q.wheelStartX=ae.scrollLeft,Q.wheelStartY=ae.scrollTop,Q.wheelDX=k,Q.wheelDY=W,setTimeout(function(){if(Q.wheelStartX==null)return;var Ut=ae.scrollLeft-Q.wheelStartX,Jt=ae.scrollTop-Q.wheelStartY,nr=Jt&&Q.wheelDY&&Jt/Q.wheelDY||Ut&&Q.wheelDX&&Ut/Q.wheelDX;if(Q.wheelStartX=Q.wheelStartY=null,!nr)return;_i=(_i*Ea+nr)/(Ea+1),++Ea},200)):(Q.wheelDX+=k,Q.wheelDY+=W))}var Wi=function(e,u){this.ranges=e,this.primIndex=u};Wi.prototype.primary=function(){return this.ranges[this.primIndex]},Wi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var u=0;u<this.ranges.length;u++){var j=this.ranges[u],k=e.ranges[u];if(!mi(j.anchor,k.anchor)||!mi(j.head,k.head))return!1}return!0},Wi.prototype.deepCopy=function(){for(var e=[],u=0;u<this.ranges.length;u++)e[u]=new Ln(xi(this.ranges[u].anchor),xi(this.ranges[u].head));return new Wi(e,this.primIndex)},Wi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Wi.prototype.contains=function(e,u){u||(u=e);for(var j=0;j<this.ranges.length;j++){var k=this.ranges[j];if(_r(u,k.from())>=0&&_r(e,k.to())<=0)return j}return-1};var Ln=function(e,u){this.anchor=e,this.head=u};Ln.prototype.from=function(){return wi(this.anchor,this.head)},Ln.prototype.to=function(){return Di(this.anchor,this.head)},Ln.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,u,j){var k=e&&e.options.selectionsMayTouch,W=u[j];u.sort(function(ct,it){return _r(ct.from(),it.from())}),j=ue(u,W);for(var Q=1;Q<u.length;Q++){var ae=u[Q],pe=u[Q-1],ve=_r(pe.to(),ae.from());if(k&&!ae.empty()?ve>0:ve>=0){var we=wi(pe.from(),ae.from()),We=Di(pe.to(),ae.to()),Ye=pe.empty()?ae.from()==ae.head:pe.from()==pe.head;Q<=j&&--j,u.splice(--Q,2,new Ln(Ye?We:we,Ye?we:We))}}return new Wi(u,j)}function ga(e,u){return new Wi([new Ln(e,u||e)],0)}function va(e){return e.text?Nt(e.from.line+e.text.length-1,ne(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,u){if(_r(e,u.from)<0)return e;if(_r(e,u.to)<=0)return va(u);var j=e.line+u.text.length-(u.to.line-u.from.line)-1,k=e.ch;return e.line==u.to.line&&(k+=va(u).ch-u.to.ch),Nt(j,k)}function Za(e,u){for(var j=[],k=0;k<e.sel.ranges.length;k++){var W=e.sel.ranges[k];j.push(new Ln(mo(W.anchor,u),mo(W.head,u)))}return aa(e.cm,j,e.sel.primIndex)}function Mo(e,u,j){return e.line==u.line?Nt(j.line,e.ch-u.ch+j.ch):Nt(j.line+(e.line-u.line),e.ch)}function No(e,u,j){for(var k=[],W=Nt(e.first,0),Q=W,ae=0;ae<u.length;ae++){var pe=u[ae],ve=Mo(pe.from,W,Q),we=Mo(va(pe),W,Q);if(W=pe.to,Q=we,j=="around"){var We=e.sel.ranges[ae],Ye=_r(We.head,We.anchor)<0;k[ae]=new Ln(Ye?we:ve,Ye?ve:we)}else k[ae]=new Ln(ve,ve)}return new Wi(k,e.sel.primIndex)}function Ra(e){e.doc.mode=En(e.options,e.doc.modeOption),go(e)}function go(e){e.doc.iter(function(u){u.stateAfter&&(u.stateAfter=null),u.styles&&(u.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Wa(e,100),e.state.modeGen++,e.curOp&&Un(e)}function gs(e,u){return u.from.ch==0&&u.to.ch==0&&ne(u.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,u,j,k){function W(vr){return j?j[vr]:null}function Q(vr,ir,Cr){xr(vr,ir,Cr,k),Qt(vr,"change",vr,u)}function ae(vr,ir){for(var Cr=[],Zr=vr;Zr<ir;++Zr)Cr.push(new jr(we[Zr],W(Zr),k));return Cr}var pe=u.from,ve=u.to,we=u.text,We=sr(e,pe.line),Ye=sr(e,ve.line),ct=ne(we),it=W(we.length-1),Ct=ve.line-pe.line;if(u.full)e.insert(0,ae(0,we.length)),e.remove(we.length,e.size-we.length);else if(gs(e,u)){var Ut=ae(0,we.length-1);Q(Ye,Ye.text,it),Ct&&e.remove(pe.line,Ct),Ut.length&&e.insert(pe.line,Ut)}else if(We==Ye)if(we.length==1)Q(We,We.text.slice(0,pe.ch)+ct+We.text.slice(ve.ch),it);else{var Jt=ae(1,we.length-1);Jt.push(new jr(ct+We.text.slice(ve.ch),it,k)),Q(We,We.text.slice(0,pe.ch)+we[0],W(0)),e.insert(pe.line+1,Jt)}else if(we.length==1)Q(We,We.text.slice(0,pe.ch)+we[0]+Ye.text.slice(ve.ch),W(0)),e.remove(pe.line+1,Ct);else{Q(We,We.text.slice(0,pe.ch)+we[0],W(0)),Q(Ye,ct+Ye.text.slice(ve.ch),it);var nr=ae(1,we.length-1);Ct>1&&e.remove(pe.line+1,Ct-1),e.insert(pe.line+1,nr)}Qt(e,"change",e,u)}function Na(e,u,j){function k(W,Q,ae){if(W.linked)for(var pe=0;pe<W.linked.length;++pe){var ve=W.linked[pe];if(ve.doc==Q)continue;var we=ae&&ve.sharedHist;if(j&&!we)continue;u(ve.doc,we),k(ve.doc,W,we)}}k(e,null,!0)}function vs(e,u){if(u.cm)throw new Error("This document is already in use.");e.doc=u,u.cm=e,Si(e),Ra(e),ys(e),e.options.lineWrapping||Rr(e),e.options.mode=u.modeOption,Un(e)}function ys(e){(e.doc.direction=="rtl"?z:_)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Bi(e,function(){ys(e),Un(e)})}function jo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,u){var j={from:xi(u.from),to:va(u),text:Jn(e,u.from,u.to)};return Es(e,j,u.from.line,u.to.line+1),Na(e,function(k){return Es(k,j,u.from.line,u.to.line+1)},!0),j}function bs(e){for(;e.length;){var u=ne(e);if(u.ranges)e.pop();else break}}function ml(e,u){if(u)return bs(e.done),ne(e.done);if(e.done.length&&!ne(e.done).ranges)return ne(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ne(e.done)}function _s(e,u,j,k){var W=e.history;W.undone.length=0;var Q=+new Date,ae,pe;if((W.lastOp==k||W.lastOrigin==u.origin&&u.origin&&(u.origin.charAt(0)=="+"&&W.lastModTime>Q-(e.cm?e.cm.options.historyEventDelay:500)||u.origin.charAt(0)=="*"))&&(ae=ml(W,W.lastOp==k)))pe=ne(ae.changes),_r(u.from,u.to)==0&&_r(u.from,pe.to)==0?pe.to=va(u):ae.changes.push(rs(e,u));else{var ve=ne(W.done);for((!ve||!ve.ranges)&&Fo(e.sel,W.done),ae={changes:[rs(e,u)],generation:W.generation},W.done.push(ae);W.done.length>W.undoDepth;)W.done.shift(),W.done[0].ranges||W.done.shift()}W.done.push(j),W.generation=++W.maxGeneration,W.lastModTime=W.lastSelTime=Q,W.lastOp=W.lastSelOp=k,W.lastOrigin=W.lastSelOrigin=u.origin,pe||Qe(e,"historyAdded")}function gl(e,u,j,k){var W=u.charAt(0);return W=="*"||W=="+"&&j.ranges.length==k.ranges.length&&j.somethingSelected()==k.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,u,j,k){var W=e.history,Q=k&&k.origin;j==W.lastSelOp||Q&&W.lastSelOrigin==Q&&(W.lastModTime==W.lastSelTime&&W.lastOrigin==Q||gl(e,Q,ne(W.done),u))?W.done[W.done.length-1]=u:Fo(u,W.done),W.lastSelTime=+new Date,W.lastSelOrigin=Q,W.lastSelOp=j,k&&k.clearRedo!==!1&&bs(W.undone)}function Fo(e,u){var j=ne(u);j&&j.ranges&&j.equals(e)||u.push(e)}function Es(e,u,j,k){var W=u["spans_"+e.id],Q=0;e.iter(Math.max(e.first,j),Math.min(e.first+e.size,k),function(ae){ae.markedSpans&&((W||(W=u["spans_"+e.id]={}))[Q]=ae.markedSpans),++Q})}function yl(e){if(!e)return null;for(var u,j=0;j<e.length;++j)e[j].marker.explicitlyCleared?u||(u=e.slice(0,j)):u&&u.push(e[j]);return u?u.length?u:null:e}function bl(e,u){var j=u["spans_"+e.id];if(!j)return null;for(var k=[],W=0;W<u.text.length;++W)k.push(yl(j[W]));return k}function xs(e,u){var j=bl(e,u),k=ki(e,u);if(!j)return k;if(!k)return j;for(var W=0;W<j.length;++W){var Q=j[W],ae=k[W];if(Q&&ae){e:for(var pe=0;pe<ae.length;++pe){for(var ve=ae[pe],we=0;we<Q.length;++we)if(Q[we].marker==ve.marker)continue e;Q.push(ve)}}else ae&&(j[W]=ae)}return j}function qa(e,u,j){for(var k=[],W=0;W<e.length;++W){var Q=e[W];if(Q.ranges){k.push(j?Wi.prototype.deepCopy.call(Q):Q);continue}var ae=Q.changes,pe=[];k.push({changes:pe});for(var ve=0;ve<ae.length;++ve){var we=ae[ve],We=void 0;if(pe.push({from:we.from,to:we.to,text:we.text}),u)for(var Ye in we)(We=Ye.match(/^spans_(\d+)$/))&&(ue(u,Number(We[1]))>-1&&(ne(pe)[Ye]=we[Ye],delete we[Ye]))}}return k}function ns(e,u,j,k){if(k){var W=e.anchor;if(j){var Q=_r(u,W)<0;Q!=_r(j,W)<0?(W=u,u=j):Q!=_r(u,j)<0&&(u=j)}return new Ln(W,u)}else return new Ln(j||u,u)}function Uo(e,u,j,k,W){W==null&&(W=e.cm&&(e.cm.display.shift||e.extend)),Pi(e,new Wi([ns(e.sel.primary(),u,j,W)],0),k)}function ws(e,u,j){for(var k=[],W=e.cm&&(e.cm.display.shift||e.extend),Q=0;Q<e.sel.ranges.length;Q++)k[Q]=ns(e.sel.ranges[Q],u[Q],null,W);var ae=aa(e.cm,k,e.sel.primIndex);Pi(e,ae,j)}function is(e,u,j,k){var W=e.sel.ranges.slice(0);W[u]=j,Pi(e,aa(e.cm,W,e.sel.primIndex),k)}function Ts(e,u,j,k){Pi(e,ga(u,j),k)}function _l(e,u,j){var k={ranges:u.ranges,update:function(W){this.ranges=[];for(var Q=0;Q<W.length;Q++)this.ranges[Q]=new Ln(V(e,W[Q].anchor),V(e,W[Q].head))},origin:j&&j.origin};return Qe(e,"beforeSelectionChange",e,k),e.cm&&Qe(e.cm,"beforeSelectionChange",e.cm,k),k.ranges!=u.ranges?aa(e.cm,k.ranges,k.ranges.length-1):u}function Ss(e,u,j){var k=e.history.done,W=ne(k);W&&W.ranges?(k[k.length-1]=u,Bo(e,u,j)):Pi(e,u,j)}function Pi(e,u,j){Bo(e,u,j),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,j)}function Bo(e,u,j){(ke(e,"beforeSelectionChange")||e.cm&&ke(e.cm,"beforeSelectionChange"))&&(u=_l(e,u,j));var k=j&&j.bias||(_r(u.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,u,k,!0)),!(j&&j.scroll===!1)&&e.cm&&ba(e.cm)}function Cs(e,u){if(u.equals(e.sel))return;e.sel=u,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Be(e.cm)),Qt(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,u,j,k){for(var W,Q=0;Q<u.ranges.length;Q++){var ae=u.ranges[Q],pe=u.ranges.length==e.sel.ranges.length&&e.sel.ranges[Q],ve=Ho(e,ae.anchor,pe&&pe.anchor,j,k),we=Ho(e,ae.head,pe&&pe.head,j,k);(W||ve!=ae.anchor||we!=ae.head)&&(W||(W=u.ranges.slice(0,Q)),W[Q]=new Ln(ve,we))}return W?aa(e.cm,W,u.primIndex):u}function eo(e,u,j,k,W){var Q=sr(e,u.line);if(Q.markedSpans)for(var ae=0;ae<Q.markedSpans.length;++ae){var pe=Q.markedSpans[ae],ve=pe.marker,we="selectLeft"in ve?!ve.selectLeft:ve.inclusiveLeft,We="selectRight"in ve?!ve.selectRight:ve.inclusiveRight;if((pe.from==null||(we?pe.from<=u.ch:pe.from<u.ch))&&(pe.to==null||(We?pe.to>=u.ch:pe.to>u.ch))){if(W&&(Qe(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(Q.markedSpans){--ae;continue}else break;if(!ve.atomic)continue;if(j){var Ye=ve.find(k<0?1:-1),ct=void 0;if((k<0?We:we)&&(Ye=Rs(e,Ye,-k,Ye&&Ye.line==u.line?Q:null)),Ye&&Ye.line==u.line&&(ct=_r(Ye,j))&&(k<0?ct<0:ct>0))return eo(e,Ye,u,k,W)}var it=ve.find(k<0?-1:1);return(k<0?we:We)&&(it=Rs(e,it,k,it.line==u.line?Q:null)),it?eo(e,it,u,k,W):null}}return u}function Ho(e,u,j,k,W){var Q=k||1,ae=eo(e,u,j,Q,W)||!W&&eo(e,u,j,Q,!0)||eo(e,u,j,-Q,W)||!W&&eo(e,u,j,-Q,!0);return ae||(e.cantEdit=!0,Nt(e.first,0))}function Rs(e,u,j,k){return j<0&&u.ch==0?u.line>e.first?V(e,Nt(u.line-1)):null:j>0&&u.ch==(k||sr(e,u.line)).text.length?u.line<e.first+e.size-1?Nt(u.line+1,0):null:new Nt(u.line,u.ch+j)}function Is(e){e.setSelection(Nt(e.firstLine(),0),Nt(e.lastLine()),Re)}function Ds(e,u,j){var k={canceled:!1,from:u.from,to:u.to,text:u.text,origin:u.origin,cancel:function(){return k.canceled=!0}};return j&&(k.update=function(W,Q,ae,pe){W&&(k.from=V(e,W)),Q&&(k.to=V(e,Q)),ae&&(k.text=ae),pe!==void 0&&(k.origin=pe)}),Qe(e,"beforeChange",e,k),e.cm&&Qe(e.cm,"beforeChange",e.cm,k),k.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:k.from,to:k.to,text:k.text,origin:k.origin}}function to(e,u,j){if(e.cm){if(!e.cm.curOp)return hi(e.cm,to)(e,u,j);if(e.cm.state.suppressEdits)return}if((ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"))&&(u=Ds(e,u,!0),!u))return;var k=Ki&&!j&&ji(e,u.from,u.to);if(k)for(var W=k.length-1;W>=0;--W)Ls(e,{from:k[W].from,to:k[W].to,text:W?[""]:u.text,origin:u.origin});else Ls(e,u)}function Ls(e,u){if(u.text.length==1&&u.text[0]==""&&_r(u.from,u.to)==0)return;var j=Za(e,u);_s(e,u,j,e.cm?e.cm.curOp.id:NaN),vo(e,u,j,ki(e,u));var k=[];Na(e,function(W,Q){!Q&&ue(k,W.history)==-1&&(Ns(W.history,u),k.push(W.history)),vo(W,u,null,ki(W,u))})}function Wo(e,u,j){var k=e.cm&&e.cm.state.suppressEdits;if(k&&!j)return;for(var W=e.history,Q,ae=e.sel,pe=u=="undo"?W.done:W.undone,ve=u=="undo"?W.undone:W.done,we=0;we<pe.length&&!(Q=pe[we],j?Q.ranges&&!Q.equals(e.sel):!Q.ranges);we++);if(we==pe.length)return;for(W.lastOrigin=W.lastSelOrigin=null;;)if(Q=pe.pop(),Q.ranges){if(Fo(Q,ve),j&&!Q.equals(e.sel)){Pi(e,Q,{clearRedo:!1});return}ae=Q}else if(k){pe.push(Q);return}else break;var We=[];Fo(ae,ve),ve.push({changes:We,generation:W.generation}),W.generation=Q.generation||++W.maxGeneration;for(var Ye=ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"),ct=function(Ut){var Jt=Q.changes[Ut];if(Jt.origin=u,Ye&&!Ds(e,Jt,!1))return pe.length=0,{};We.push(rs(e,Jt));var nr=Ut?Za(e,Jt):ne(pe);vo(e,Jt,nr,xs(e,Jt)),!Ut&&e.cm&&e.cm.scrollIntoView({from:Jt.from,to:va(Jt)});var vr=[];Na(e,function(ir,Cr){!Cr&&ue(vr,ir.history)==-1&&(Ns(ir.history,Jt),vr.push(ir.history)),vo(ir,Jt,null,xs(ir,Jt))})},it=Q.changes.length-1;it>=0;--it){var Ct=ct(it);if(Ct)return Ct.v}}function ks(e,u){if(u==0)return;if(e.first+=u,e.sel=new Wi(ge(e.sel.ranges,function(W){return new Ln(Nt(W.anchor.line+u,W.anchor.ch),Nt(W.head.line+u,W.head.ch))}),e.sel.primIndex),e.cm){Un(e.cm,e.first,e.first-u,u);for(var j=e.cm.display,k=j.viewFrom;k<j.viewTo;k++)Yn(e.cm,k,"gutter")}}function vo(e,u,j,k){if(e.cm&&!e.cm.curOp)return hi(e.cm,vo)(e,u,j,k);if(u.to.line<e.first){ks(e,u.text.length-1-(u.to.line-u.from.line));return}if(u.from.line>e.lastLine())return;if(u.from.line<e.first){var W=u.text.length-1-(e.first-u.from.line);ks(e,W),u={from:Nt(e.first,0),to:Nt(u.to.line+W,u.to.ch),text:[ne(u.text)],origin:u.origin}}var Q=e.lastLine();u.to.line>Q&&(u={from:u.from,to:Nt(Q,sr(e,Q).text.length),text:[u.text[0]],origin:u.origin}),u.removed=Jn(e,u.from,u.to),j||(j=Za(e,u)),e.cm?El(e.cm,u,k):ts(e,u,k),Bo(e,j,Re),e.cantEdit&&Ho(e,Nt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,u,j){var k=e.doc,W=e.display,Q=u.from,ae=u.to,pe=!1,ve=Q.line;e.options.lineWrapping||(ve=Jr(St(sr(k,Q.line))),k.iter(ve,ae.line+1,function(it){if(it==W.maxLine)return pe=!0,!0})),k.sel.contains(u.from,u.to)>-1&&Be(e),ts(k,u,j,Xi(e)),e.options.lineWrapping||(k.iter(ve,Q.line+u.text.length,function(it){var Ct=lt(it);Ct>W.maxLineLength&&(W.maxLine=it,W.maxLineLength=Ct,W.maxLineChanged=!0,pe=!1)}),pe&&(e.curOp.updateMaxLine=!0)),Ni(k,Q.line),Wa(e,400);var we=u.text.length-(ae.line-Q.line)-1;u.full?Un(e):Q.line==ae.line&&u.text.length==1&&!gs(e.doc,u)?Yn(e,Q.line,"text"):Un(e,Q.line,ae.line+1,we);var We=ke(e,"changes"),Ye=ke(e,"change");if(Ye||We){var ct={from:Q,to:ae,text:u.text,removed:u.removed,origin:u.origin};Ye&&Qt(e,"change",e,ct),We&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ct)}e.display.selForContextMenu=null}function ro(e,u,j,k,W){var Q;k||(k=j),_r(k,j)<0&&(Q=[k,j],j=Q[0],k=Q[1]),typeof u=="string"&&(u=e.splitLines(u)),to(e,{from:j,to:k,text:u,origin:W})}function Ps(e,u,j,k){j<e.line?e.line+=k:u<e.line&&(e.line=u,e.ch=0)}function Ms(e,u,j,k){for(var W=0;W<e.length;++W){var Q=e[W],ae=!0;if(Q.ranges){Q.copied||(Q=e[W]=Q.deepCopy(),Q.copied=!0);for(var pe=0;pe<Q.ranges.length;pe++)Ps(Q.ranges[pe].anchor,u,j,k),Ps(Q.ranges[pe].head,u,j,k);continue}for(var ve=0;ve<Q.changes.length;++ve){var we=Q.changes[ve];if(j<we.from.line)we.from=Nt(we.from.line+k,we.from.ch),we.to=Nt(we.to.line+k,we.to.ch);else if(u<=we.to.line){ae=!1;break}}ae||(e.splice(0,W+1),W=0)}}function Ns(e,u){var j=u.from.line,k=u.to.line,W=u.text.length-(k-j)-1;Ms(e.done,j,k,W),Ms(e.undone,j,k,W)}function yo(e,u,j,k){var W=u,Q=u;return typeof u=="number"?Q=sr(e,se(e,u)):W=Jr(u),W==null?null:(k(Q,W)&&e.cm&&Yn(e.cm,W,j),Q)}function bo(e){this.lines=e,this.parent=null;for(var u=0,j=0;j<e.length;++j)e[j].parent=this,u+=e[j].height;this.height=u}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,u){for(var j=e,k=e+u;j<k;++j){var W=this.lines[j];this.height-=W.height,_t(W),Qt(W,"delete")}this.lines.splice(e,u)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,u,j){this.height+=j,this.lines=this.lines.slice(0,e).concat(u).concat(this.lines.slice(e));for(var k=0;k<u.length;++k)u[k].parent=this},iterN:function(e,u,j){for(var k=e+u;e<k;++e)if(j(this.lines[e]))return!0}};function _o(e){this.children=e;for(var u=0,j=0,k=0;k<e.length;++k){var W=e[k];u+=W.chunkSize(),j+=W.height,W.parent=this}this.size=u,this.height=j,this.parent=null}_o.prototype={chunkSize:function(){return this.size},removeInner:function(e,u){this.size-=u;for(var j=0;j<this.children.length;++j){var k=this.children[j],W=k.chunkSize();if(e<W){var Q=Math.min(u,W-e),ae=k.height;if(k.removeInner(e,Q),this.height-=ae-k.height,W==Q&&(this.children.splice(j--,1),k.parent=null),(u-=Q)==0)break;e=0}else e-=W}if(this.size-u<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var pe=[];this.collapse(pe),this.children=[new bo(pe)],this.children[0].parent=this}},collapse:function(e){for(var u=0;u<this.children.length;++u)this.children[u].collapse(e)},insertInner:function(e,u,j){this.size+=u.length,this.height+=j;for(var k=0;k<this.children.length;++k){var W=this.children[k],Q=W.chunkSize();if(e<=Q){if(W.insertInner(e,u,j),W.lines&&W.lines.length>50){for(var ae=W.lines.length%25+25,pe=ae;pe<W.lines.length;){var ve=new bo(W.lines.slice(pe,pe+=25));W.height-=ve.height,this.children.splice(++k,0,ve),ve.parent=this}W.lines=W.lines.slice(0,ae),this.maybeSpill()}break}e-=Q}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var u=e.children.splice(e.children.length-5,5),j=new _o(u);if(e.parent){e.size-=j.size,e.height-=j.height;var W=ue(e.parent.children,e);e.parent.children.splice(W+1,0,j)}else{var k=new _o(e.children);k.parent=e,e.children=[k,j],e=k}j.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,u,j){for(var k=0;k<this.children.length;++k){var W=this.children[k],Q=W.chunkSize();if(e<Q){var ae=Math.min(u,Q-e);if(W.iterN(e,ae,j))return!0;if((u-=ae)==0)break;e=0}else e-=Q}}};var Eo=function(e,u,j){if(j)for(var k in j)j.hasOwnProperty(k)&&(this[k]=j[k]);this.doc=e,this.node=u};Eo.prototype.clear=function(){var e=this.doc.cm,u=this.line.widgets,j=this.line,k=Jr(j);if(k==null||!u)return;for(var W=0;W<u.length;++W)u[W]==this&&u.splice(W--,1);u.length||(j.widgets=null);var Q=Xr(this);On(j,Math.max(0,j.height-Q)),e&&(Bi(e,function(){js(e,j,-Q),Yn(e,k,"widget")}),Qt(e,"lineWidgetCleared",e,this,k))},Eo.prototype.changed=function(){var e=this,u=this.height,j=this.doc.cm,k=this.line;this.height=null;var W=Xr(this)-u;if(!W)return;$t(this.doc,k)||On(k,k.height+W),j&&Bi(j,function(){j.curOp.forceUpdate=!0,js(j,k,W),Qt(j,"lineWidgetChanged",j,e,Jr(k))})},Ne(Eo);function js(e,u,j){cr(u)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,j)}function xl(e,u,j,k){var W=new Eo(e,j,k),Q=e.cm;return Q&&W.noHScroll&&(Q.display.alignWidgets=!0),yo(e,u,"widget",function(ae){var pe=ae.widgets||(ae.widgets=[]);if(W.insertAt==null?pe.push(W):pe.splice(Math.min(pe.length-1,Math.max(0,W.insertAt)),0,W),W.line=ae,Q&&!$t(e,ae)){var ve=cr(ae)<e.scrollTop;On(ae,ae.height+Xr(W)),ve&&Sa(Q,W.height),Q.curOp.forceUpdate=!0}return!0}),Q&&Qt(Q,"lineWidgetAdded",Q,W,typeof u=="number"?u:Jr(u)),W}var Fs=0,ja=function(e,u){this.lines=[],this.type=u,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,u=e&&!e.curOp;if(u&&Hn(e),ke(this,"clear")){var j=this.find();j&&Qt(this,"clear",j.from,j.to)}for(var k=null,W=null,Q=0;Q<this.lines.length;++Q){var ae=this.lines[Q],pe=li(ae.markedSpans,this);e&&!this.collapsed?Yn(e,Jr(ae),"text"):e&&(pe.to!=null&&(W=Jr(ae)),pe.from!=null&&(k=Jr(ae))),ae.markedSpans=ea(ae.markedSpans,pe),pe.from==null&&this.collapsed&&!$t(this.doc,ae)&&e&&On(ae,ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ve=0;ve<this.lines.length;++ve){var we=St(this.lines[ve]),We=lt(we);We>e.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=We,e.display.maxLineChanged=!0)}k!=null&&e&&this.collapsed&&Un(e,k,W+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Qt(e,"markerCleared",e,this,k,W),u&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,u){e==null&&this.type=="bookmark"&&(e=1);for(var j,k,W=0;W<this.lines.length;++W){var Q=this.lines[W],ae=li(Q.markedSpans,this);if(ae.from!=null&&(j=Nt(u?Q:Jr(Q),ae.from),e==-1))return j;if(ae.to!=null&&(k=Nt(u?Q:Jr(Q),ae.to),e==1))return k}return j&&{from:j,to:k}},ja.prototype.changed=function(){var e=this,u=this.find(-1,!0),j=this,k=this.doc.cm;if(!u||!k)return;Bi(k,function(){var W=u.line,Q=Jr(u.line),ae=$e(k,Q);if(ae&&(Qr(ae),k.curOp.selectionChanged=k.curOp.forceUpdate=!0),k.curOp.updateMaxLine=!0,!$t(j.doc,W)&&j.height!=null){var pe=j.height;j.height=null;var ve=Xr(j)-pe;ve&&On(W,W.height+ve)}Qt(k,"markerChanged",k,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(!u.maybeHiddenMarkers||ue(u.maybeHiddenMarkers,this)==-1)&&(u.maybeUnhiddenMarkers||(u.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ja.prototype.detachLine=function(e){if(this.lines.splice(ue(this.lines,e),1),!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(u.maybeHiddenMarkers||(u.maybeHiddenMarkers=[])).push(this)}},Ne(ja);function no(e,u,j,k,W){if(k&&k.shared)return wl(e,u,j,k,W);if(e.cm&&!e.cm.curOp)return hi(e.cm,no)(e,u,j,k,W);var Q=new ja(e,W),ae=_r(u,j);if(k&&R(k,Q,!1),ae>0||ae==0&&Q.clearWhenEmpty!==!1)return Q;if(Q.replacedWith&&(Q.collapsed=!0,Q.widgetNode=F("span",[Q.replacedWith],"CodeMirror-widget"),k.handleMouseEvents||Q.widgetNode.setAttribute("cm-ignore-events","true"),k.insertLeft&&(Q.widgetNode.insertLeft=!0)),Q.collapsed){if(ht(e,u.line,u,j,Q)||u.line!=j.line&&ht(e,j.line,u,j,Q))throw new Error("Inserting collapsed marker partially overlapping an existing one");Gi()}Q.addToHistory&&_s(e,{from:u,to:j,origin:"markText"},e.sel,NaN);var pe=u.line,ve=e.cm,we;if(e.iter(pe,j.line+1,function(Ye){ve&&Q.collapsed&&!ve.options.lineWrapping&&St(Ye)==ve.display.maxLine&&(we=!0),Q.collapsed&&pe!=u.line&&On(Ye,0),Vi(Ye,new Li(Q,pe==u.line?u.ch:null,pe==j.line?j.ch:null)),++pe}),Q.collapsed&&e.iter(u.line,j.line+1,function(Ye){$t(e,Ye)&&On(Ye,0)}),Q.clearOnEnter&&Ie(Q,"beforeCursorEnter",function(){return Q.clear()}),Q.readOnly&&(Ti(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Q.collapsed&&(Q.id=++Fs,Q.atomic=!0),ve){if(we&&(ve.curOp.updateMaxLine=!0),Q.collapsed)Un(ve,u.line,j.line+1);else if(Q.className||Q.startStyle||Q.endStyle||Q.css||Q.attributes||Q.title)for(var We=u.line;We<=j.line;We++)Yn(ve,We,"text");Q.atomic&&Os(ve.doc),Qt(ve,"markerAdded",ve,Q)}return Q}var xo=function(e,u){this.markers=e,this.primary=u;for(var j=0;j<e.length;++j)e[j].parent=this};xo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qt(this,"clear")},xo.prototype.find=function(e,u){return this.primary.find(e,u)},Ne(xo);function wl(e,u,j,k,W){k=R(k),k.shared=!1;var Q=[no(e,u,j,k,W)],ae=Q[0],pe=k.widgetNode;return Na(e,function(ve){pe&&(k.widgetNode=pe.cloneNode(!0)),Q.push(no(ve,V(ve,u),V(ve,j),k,W));for(var we=0;we<ve.linked.length;++we)if(ve.linked[we].isParent)return;ae=ne(Q)}),new xo(Q,ae)}function Us(e){return e.findMarks(Nt(e.first,0),e.clipPos(Nt(e.lastLine())),function(u){return u.parent})}function Tl(e,u){for(var j=0;j<u.length;j++){var k=u[j],W=k.find(),Q=e.clipPos(W.from),ae=e.clipPos(W.to);if(_r(Q,ae)){var pe=no(e,Q,ae,k.primary,k.primary.type);k.markers.push(pe),pe.parent=k}}}function Sl(e){for(var u=function(k){var W=e[k],Q=[W.primary.doc];Na(W.primary.doc,function(ve){return Q.push(ve)});for(var ae=0;ae<W.markers.length;ae++){var pe=W.markers[ae];ue(Q,pe.doc)==-1&&(pe.parent=null,W.markers.splice(ae--,1))}},j=0;j<e.length;j++)u(j)}var Cl=0,$i=function(e,u,j,k,W){if(!(this instanceof $i))return new $i(e,u,j,k,W);j==null&&(j=0),_o.call(this,[new bo([new jr("",null)])]),this.first=j,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=j;var Q=Nt(j,0);this.sel=ga(Q),this.history=new jo(null),this.id=++Cl,this.modeOption=u,this.lineSep=k,this.direction=W=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:Q,to:Q,text:e}),Pi(this,ga(Q),Re)};$i.prototype=Se(_o.prototype,{constructor:$i,iter:function(e,u,j){j?this.iterN(e-this.first,u-e,j):this.iterN(this.first,this.first+this.size,e)},insert:function(e,u){for(var j=0,k=0;k<u.length;++k)j+=u[k].height;this.insertInner(e-this.first,u,j)},remove:function(e,u){this.removeInner(e-this.first,u)},getValue:function(e){var u=Tn(this,this.first,this.first+this.size);return e===!1?u:u.join(e||this.lineSeparator())},setValue:fi(function(e){var u=Nt(this.first,0),j=this.first+this.size-1;to(this,{from:u,to:Nt(j,sr(this,j).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ca(this.cm,0,0),Pi(this,ga(u),Re)}),replaceRange:function(e,u,j,k){u=V(this,u),j=j?V(this,j):u,ro(this,e,u,j,k)},getRange:function(e,u,j){var k=Jn(this,V(this,e),V(this,u));return j===!1?k:k.join(j||this.lineSeparator())},getLine:function(e){var u=this.getLineHandle(e);return u&&u.text},getLineHandle:function(e){if(Zn(this,e))return sr(this,e)},getLineNumber:function(e){return Jr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=sr(this,e)),St(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return V(this,e)},getCursor:function(e){var u=this.sel.primary(),j;return e==null||e=="head"?j=u.head:e=="anchor"?j=u.anchor:e=="end"||e=="to"||e===!1?j=u.to():j=u.from(),j},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:fi(function(e,u,j){Ts(this,V(this,typeof e=="number"?Nt(e,u||0):e),null,j)}),setSelection:fi(function(e,u,j){Ts(this,V(this,e),V(this,u||e),j)}),extendSelection:fi(function(e,u,j){Uo(this,V(this,e),u&&V(this,u),j)}),extendSelections:fi(function(e,u){ws(this,ee(this,e),u)}),extendSelectionsBy:fi(function(e,u){var j=ge(this.sel.ranges,e);ws(this,ee(this,j),u)}),setSelections:fi(function(e,u,j){if(!e.length)return;for(var k=[],W=0;W<e.length;W++)k[W]=new Ln(V(this,e[W].anchor),V(this,e[W].head));u==null&&(u=Math.min(e.length-1,this.sel.primIndex)),Pi(this,aa(this.cm,k,u),j)}),addSelection:fi(function(e,u,j){var k=this.sel.ranges.slice(0);k.push(new Ln(V(this,e),V(this,u||e))),Pi(this,aa(this.cm,k,k.length-1),j)}),getSelection:function(e){for(var u=this.sel.ranges,j,k=0;k<u.length;k++){var W=Jn(this,u[k].from(),u[k].to());j=j?j.concat(W):W}return e===!1?j:j.join(e||this.lineSeparator())},getSelections:function(e){for(var u=[],j=this.sel.ranges,k=0;k<j.length;k++){var W=Jn(this,j[k].from(),j[k].to());e!==!1&&(W=W.join(e||this.lineSeparator())),u[k]=W}return u},replaceSelection:function(e,u,j){for(var k=[],W=0;W<this.sel.ranges.length;W++)k[W]=e;this.replaceSelections(k,u,j||"+input")},replaceSelections:fi(function(e,u,j){for(var k=[],W=this.sel,Q=0;Q<W.ranges.length;Q++){var ae=W.ranges[Q];k[Q]={from:ae.from(),to:ae.to(),text:this.splitLines(e[Q]),origin:j}}for(var pe=u&&u!="end"&&No(this,k,u),ve=k.length-1;ve>=0;ve--)to(this,k[ve]);pe?Ss(this,pe):this.cm&&ba(this.cm)}),undo:fi(function(){Wo(this,"undo")}),redo:fi(function(){Wo(this,"redo")}),undoSelection:fi(function(){Wo(this,"undo",!0)}),redoSelection:fi(function(){Wo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,u=0,j=0,k=0;k<e.done.length;k++)e.done[k].ranges||++u;for(var W=0;W<e.undone.length;W++)e.undone[W].ranges||++j;return{undo:u,redo:j}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Na(this,function(u){return u.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qa(this.history.done),undone:qa(this.history.undone)}},setHistory:function(e){var u=this.history=new jo(this.history.maxGeneration);u.done=qa(e.done.slice(0),null,!0),u.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:fi(function(e,u,j){return yo(this,e,"gutter",function(k){var W=k.gutterMarkers||(k.gutterMarkers={});return W[u]=j,!j&&X(W)&&(k.gutterMarkers=null),!0})}),clearGutter:fi(function(e){var u=this;this.iter(function(j){j.gutterMarkers&&j.gutterMarkers[e]&&yo(u,j,"gutter",function(){return j.gutterMarkers[e]=null,X(j.gutterMarkers)&&(j.gutterMarkers=null),!0})})}),lineInfo:function(e){var u;if(typeof e=="number"){if(!Zn(this,e))return null;if(u=e,e=sr(this,e),!e)return null}else if(u=Jr(e),u==null)return null;return{line:u,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:fi(function(e,u,j){return yo(this,e,u=="gutter"?"gutter":"class",function(k){var W=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass";if(!k[W])k[W]=j;else{if(O(j).test(k[W]))return!1;k[W]+=" "+j}return!0})}),removeLineClass:fi(function(e,u,j){return yo(this,e,u=="gutter"?"gutter":"class",function(k){var W=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass",Q=k[W];if(Q)if(j==null)k[W]=null;else{var ae=Q.match(O(j));if(!ae)return!1;var pe=ae.index+ae[0].length;k[W]=Q.slice(0,ae.index)+(!ae.index||pe==Q.length?"":" ")+Q.slice(pe)||null}else return!1;return!0})}),addLineWidget:fi(function(e,u,j){return xl(this,e,u,j)}),removeLineWidget:function(e){e.clear()},markText:function(e,u,j){return no(this,V(this,e),V(this,u),j,j&&j.type||"range")},setBookmark:function(e,u){var j={replacedWith:u&&(u.nodeType==null?u.widget:u),insertLeft:u&&u.insertLeft,clearWhenEmpty:!1,shared:u&&u.shared,handleMouseEvents:u&&u.handleMouseEvents};return e=V(this,e),no(this,e,e,j,"bookmark")},findMarksAt:function(e){e=V(this,e);var u=[],j=sr(this,e.line).markedSpans;if(j)for(var k=0;k<j.length;++k){var W=j[k];(W.from==null||W.from<=e.ch)&&(W.to==null||W.to>=e.ch)&&u.push(W.marker.parent||W.marker)}return u},findMarks:function(e,u,j){e=V(this,e),u=V(this,u);var k=[],W=e.line;return this.iter(e.line,u.line+1,function(Q){var ae=Q.markedSpans;if(ae)for(var pe=0;pe<ae.length;pe++){var ve=ae[pe];!(ve.to!=null&&W==e.line&&e.ch>=ve.to||ve.from==null&&W!=e.line||ve.from!=null&&W==u.line&&ve.from>=u.ch)&&(!j||j(ve.marker))&&k.push(ve.marker.parent||ve.marker)}++W}),k},getAllMarks:function(){var e=[];return this.iter(function(u){var j=u.markedSpans;if(j)for(var k=0;k<j.length;++k)j[k].from!=null&&e.push(j[k].marker)}),e},posFromIndex:function(e){var u,j=this.first,k=this.lineSeparator().length;return this.iter(function(W){var Q=W.text.length+k;if(Q>e)return u=e,!0;e-=Q,++j}),V(this,Nt(j,u))},indexFromPos:function(e){e=V(this,e);var u=e.ch;if(e.line<this.first||e.ch<0)return 0;var j=this.lineSeparator().length;return this.iter(this.first,e.line,function(k){u+=k.text.length+j}),u},copy:function(e){var u=new $i(Tn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return u.scrollTop=this.scrollTop,u.scrollLeft=this.scrollLeft,u.sel=this.sel,u.extend=!1,e&&(u.history.undoDepth=this.history.undoDepth,u.setHistory(this.getHistory())),u},linkedDoc:function(e){e||(e={});var u=this.first,j=this.first+this.size;e.from!=null&&e.from>u&&(u=e.from),e.to!=null&&e.to<j&&(j=e.to);var k=new $i(Tn(this,u,j),e.mode||this.modeOption,u,this.lineSep,this.direction);return e.sharedHist&&(k.history=this.history),(this.linked||(this.linked=[])).push({doc:k,sharedHist:e.sharedHist}),k.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(k,Us(this)),k},unlinkDoc:function(e){if(e instanceof ti&&(e=e.doc),this.linked)for(var u=0;u<this.linked.length;++u){var j=this.linked[u];if(j.doc!=e)continue;this.linked.splice(u,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var k=[e.id];Na(e,function(W){return k.push(W.id)},!0),e.history=new jo(null),e.history.done=qa(this.history.done,k),e.history.undone=qa(this.history.undone,k)}},iterLinkedDocs:function(e){Na(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:fi(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(u){return u.order=null}),this.cm&&pl(this.cm)})}),$i.prototype.eachLine=$i.prototype.iter;var Bs=0;function Ol(e){var u=this;if(Hs(u),tt(u,e)||mn(u.display,e))return;Ee(e),T&&(Bs=+new Date);var j=ci(u,e,!0),k=e.dataTransfer.files;if(!j||u.isReadOnly())return;if(k&&k.length&&window.FileReader&&window.File)for(var W=k.length,Q=Array(W),ae=0,pe=function(){++ae==W&&hi(u,function(){j=V(u.doc,j);var it={from:j,to:j,text:u.doc.splitLines(Q.filter(function(Ct){return Ct!=null}).join(u.doc.lineSeparator())),origin:"paste"};to(u.doc,it),Ss(u.doc,ga(V(u.doc,j),V(u.doc,va(it))))})()},ve=function(it,Ct){if(u.options.allowDropFileTypes&&ue(u.options.allowDropFileTypes,it.type)==-1){pe();return}var Ut=new FileReader;Ut.onerror=function(){return pe()},Ut.onload=function(){var Jt=Ut.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Jt)){pe();return}Q[Ct]=Jt,pe()},Ut.readAsText(it)},we=0;we<k.length;we++)ve(k[we],we);else{if(u.state.draggingText&&u.doc.sel.contains(j)>-1){u.state.draggingText(e),setTimeout(function(){return u.display.input.focus()},20);return}try{var We=e.dataTransfer.getData("Text");if(We){var Ye;if(u.state.draggingText&&!u.state.draggingText.copy&&(Ye=u.listSelections()),Bo(u.doc,ga(j,j)),Ye)for(var ct=0;ct<Ye.length;++ct)ro(u.doc,"",Ye[ct].anchor,Ye[ct].head,"drag");u.replaceSelection(We,"around","paste"),u.display.input.focus()}}catch(it){}}}function Al(e,u){if(T&&(!e.state.draggingText||+new Date-Bs<100)){Me(u);return}if(tt(e,u)||mn(e.display,u))return;if(u.dataTransfer.setData("Text",e.getSelection()),u.dataTransfer.effectAllowed="copyMove",u.dataTransfer.setDragImage&&!a){var j=S("img",null,null,"position: fixed; left: 0; top: 0;");j.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(j.width=j.height=1,e.display.wrapper.appendChild(j),j._top=j.offsetTop),u.dataTransfer.setDragImage(j,0,0),c&&j.parentNode.removeChild(j)}}function Rl(e,u){var j=ci(e,u);if(!j)return;var k=document.createDocumentFragment();Ui(e,j,k),e.display.dragCursor||(e.display.dragCursor=S("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),w(e.display.dragCursor,k)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var u=document.getElementsByClassName("CodeMirror"),j=[],k=0;k<u.length;k++){var W=u[k].CodeMirror;W&&j.push(W)}j.length&&j[0].operation(function(){for(var Q=0;Q<j.length;Q++)e(j[Q])})}var zs=!1;function Il(){if(zs)return;Dl(),zs=!0}function Dl(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ll)},100))}),Ie(window,"blur",function(){return Ws(la)})}function Ll(e){var u=e.display;u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.scrollbarsClipped=!1,e.setSize()}for(var Fa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},wo=0;wo<10;wo++)Fa[wo+48]=Fa[wo+96]=String(wo);for(var zo=65;zo<=90;zo++)Fa[zo]=String.fromCharCode(zo);for(var To=1;To<=12;To++)Fa[To+111]=Fa[To+63235]="F"+To;var Ia={};Ia.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ia.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ia.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ia.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ia.default=o?Ia.macDefault:Ia.pcDefault;function kl(e){var u=e.split(/-(?!$)/);e=u[u.length-1];for(var j,k,W,Q,ae=0;ae<u.length-1;ae++){var pe=u[ae];if(/^(cmd|meta|m)$/i.test(pe))Q=!0;else if(/^a(lt)?$/i.test(pe))j=!0;else if(/^(c|ctrl|control)$/i.test(pe))k=!0;else if(/^s(hift)?$/i.test(pe))W=!0;else throw new Error("Unrecognized modifier name: "+pe)}return j&&(e="Alt-"+e),k&&(e="Ctrl-"+e),Q&&(e="Cmd-"+e),W&&(e="Shift-"+e),e}function Pl(e){var u={};for(var j in e)if(e.hasOwnProperty(j)){var k=e[j];if(/^(name|fallthrough|(de|at)tach)$/.test(j))continue;if(k=="..."){delete e[j];continue}for(var W=ge(j.split(" "),kl),Q=0;Q<W.length;Q++){var ae=void 0,pe=void 0;Q==W.length-1?(pe=W.join(" "),ae=k):(pe=W.slice(0,Q+1).join(" "),ae="...");var ve=u[pe];if(!ve)u[pe]=ae;else if(ve!=ae)throw new Error("Inconsistent bindings for "+pe)}delete e[j]}for(var we in u)e[we]=u[we];return e}function io(e,u,j,k){u=Ko(u);var W=u.call?u.call(e,k):u[e];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&j(W))return"handled";if(u.fallthrough){if(Object.prototype.toString.call(u.fallthrough)!="[object Array]")return io(e,u.fallthrough,j,k);for(var Q=0;Q<u.fallthrough.length;Q++){var ae=io(e,u.fallthrough[Q],j,k);if(ae)return ae}}}function Ks(e){var u=typeof e=="string"?e:Fa[e.keyCode];return u=="Ctrl"||u=="Alt"||u=="Shift"||u=="Mod"}function Gs(e,u,j){var k=e;return u.altKey&&k!="Alt"&&(e="Alt-"+e),(p?u.metaKey:u.ctrlKey)&&k!="Ctrl"&&(e="Ctrl-"+e),(p?u.ctrlKey:u.metaKey)&&k!="Mod"&&(e="Cmd-"+e),!j&&u.shiftKey&&k!="Shift"&&(e="Shift-"+e),e}function Vs(e,u){if(c&&e.keyCode==34&&e.char)return!1;var j=Fa[e.keyCode];return j==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(j=e.code),Gs(j,e,u))}function Ko(e){return typeof e=="string"?Ia[e]:e}function ao(e,u){for(var j=e.doc.sel.ranges,k=[],W=0;W<j.length;W++){for(var Q=u(j[W]);k.length&&_r(Q.from,ne(k).to)<=0;){var ae=k.pop();if(_r(ae.from,Q.from)<0){Q.from=ae.from;break}}k.push(Q)}Bi(e,function(){for(var pe=k.length-1;pe>=0;pe--)ro(e.doc,"",k[pe].from,k[pe].to,"+delete");ba(e)})}function as(e,u,j){var k=xe(e.text,u+j,j);return k<0||k>e.text.length?null:k}function os(e,u,j){var k=as(e,u.ch,j);return k==null?null:new Nt(u.line,k,j<0?"after":"before")}function ss(e,u,j,k,W){if(e){u.doc.direction=="rtl"&&(W=-W);var Q=dt(j,u.doc.direction);if(Q){var ae=W<0?ne(Q):Q[0],pe=W<0==(ae.level==1),ve=pe?"after":"before",we;if(ae.level>0||u.doc.direction=="rtl"){var We=ze(u,j);we=W<0?j.text.length-1:0;var Ye=qe(u,We,we).top;we=Ke(function(ct){return qe(u,We,ct).top==Ye},W<0==(ae.level==1)?ae.from:ae.to-1,we),ve=="before"&&(we=as(j,we,1))}else we=W<0?ae.to:ae.from;return new Nt(k,we,ve)}}return new Nt(k,W<0?j.text.length:0,W<0?"before":"after")}function Ml(e,u,j,k){var W=dt(u,e.doc.direction);if(!W)return os(u,j,k);j.ch>=u.text.length?(j.ch=u.text.length,j.sticky="before"):j.ch<=0&&(j.ch=0,j.sticky="after");var Q=st(W,j.ch,j.sticky),ae=W[Q];if(e.doc.direction=="ltr"&&ae.level%2==0&&(k>0?ae.to>j.ch:ae.from<j.ch))return os(u,j,k);var pe=function(nr,vr){return as(u,nr instanceof Nt?nr.ch:nr,vr)},ve,we=function(nr){return e.options.lineWrapping?(ve=ve||ze(e,u),Tr(e,u,ve,nr)):{begin:0,end:u.text.length}},We=we(j.sticky=="before"?pe(j,-1):j.ch);if(e.doc.direction=="rtl"||ae.level==1){var Ye=ae.level==1==k<0,ct=pe(j,Ye?1:-1);if(ct!=null&&(Ye?ct<=ae.to&&ct<=We.end:ct>=ae.from&&ct>=We.begin)){var it=Ye?"before":"after";return new Nt(j.line,ct,it)}}var Ct=function(nr,vr,ir){for(var Cr=function($n,Ci){return Ci?new Nt(j.line,pe($n,1),"before"):new Nt(j.line,$n,"after")};nr>=0&&nr<W.length;nr+=vr){var Zr=W[nr],Kr=vr>0==(Zr.level!=1),_n=Kr?ir.begin:pe(ir.end,-1);if(Zr.from<=_n&&_n<Zr.to)return Cr(_n,Kr);if(_n=Kr?Zr.from:pe(Zr.to,-1),ir.begin<=_n&&_n<ir.end)return Cr(_n,Kr)}},Ut=Ct(Q+k,k,We);if(Ut)return Ut;var Jt=k>0?We.end:pe(We.begin,-1);return Jt!=null&&!(k>0&&Jt==u.text.length)&&(Ut=Ct(k>0?0:W.length-1,k,we(Jt)),Ut)?Ut:null}var So={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Re)},killLine:function(e){return ao(e,function(u){if(u.empty()){var j=sr(e.doc,u.head.line).text.length;return u.head.ch==j&&u.head.line<e.lastLine()?{from:u.head,to:Nt(u.head.line+1,0)}:{from:u.head,to:Nt(u.head.line,j)}}else return{from:u.from(),to:u.to()}})},deleteLine:function(e){return ao(e,function(u){return{from:Nt(u.from().line,0),to:V(e.doc,Nt(u.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(u){return{from:Nt(u.from().line,0),to:u.from()}})},delWrappedLineLeft:function(e){return ao(e,function(u){var j=e.charCoords(u.head,"div").top+5,k=e.coordsChar({left:0,top:j},"div");return{from:k,to:u.from()}})},delWrappedLineRight:function(e){return ao(e,function(u){var j=e.charCoords(u.head,"div").top+5,k=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:j},"div");return{from:u.from(),to:k}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Nt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Nt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(u){return Xs(e,u.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(u){return Ys(e,u.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(u){return Nl(e,u.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:j},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:0,top:j},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5,k=e.coordsChar({left:0,top:j},"div");return k.ch<e.getLine(k.line).search(/\S/)?Ys(e,u.head):k},Oe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var u=[],j=e.listSelections(),k=e.options.tabSize,W=0;W<j.length;W++){var Q=j[W].from(),ae=K(e.getLine(Q.line),Q.ch,k);u.push(le(k-ae%k))}e.replaceSelections(u)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Bi(e,function(){for(var u=e.listSelections(),j=[],k=0;k<u.length;k++){if(!u[k].empty())continue;var W=u[k].head,Q=sr(e.doc,W.line).text;if(Q){if(W.ch==Q.length&&(W=new Nt(W.line,W.ch-1)),W.ch>0)W=new Nt(W.line,W.ch+1),e.replaceRange(Q.charAt(W.ch-1)+Q.charAt(W.ch-2),Nt(W.line,W.ch-2),W,"+transpose");else if(W.line>e.doc.first){var ae=sr(e.doc,W.line-1).text;ae&&(W=new Nt(W.line,1),e.replaceRange(Q.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),Nt(W.line-1,ae.length-1),W,"+transpose"))}}j.push(new Ln(W,W))}e.setSelections(j)})},newlineAndIndent:function(e){return Bi(e,function(){for(var u=e.listSelections(),j=u.length-1;j>=0;j--)e.replaceRange(e.doc.lineSeparator(),u[j].anchor,u[j].head,"+input");u=e.listSelections();for(var k=0;k<u.length;k++)e.indentLine(u[k].from().line,null,!0);ba(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,u){var j=sr(e.doc,u),k=St(j);return k!=j&&(u=Jr(k)),ss(!0,e,k,u,1)}function Nl(e,u){var j=sr(e.doc,u),k=At(j);return k!=j&&(u=Jr(k)),ss(!0,e,j,u,-1)}function Ys(e,u){var j=Xs(e,u.line),k=sr(e.doc,j.line),W=dt(k,e.doc.direction);if(!W||W[0].level==0){var Q=Math.max(j.ch,k.text.search(/\S/)),ae=u.line==j.line&&u.ch<=Q&&u.ch;return Nt(j.line,ae?0:Q,j.sticky)}return j}function Go(e,u,j){if(typeof u=="string"&&(u=So[u],!u))return!1;e.display.input.ensurePolled();var k=e.display.shift,W=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),j&&(e.display.shift=!1),W=u(e)!=Ce}finally{e.display.shift=k,e.state.suppressEdits=!1}return W}function jl(e,u,j){for(var k=0;k<e.state.keyMaps.length;k++){var W=io(u,e.state.keyMaps[k],j,e);if(W)return W}return e.options.extraKeys&&io(u,e.options.extraKeys,j,e)||io(u,e.options.keyMap,j,e)}var Fl=new Z;function Co(e,u,j,k){var W=e.state.keySeq;if(W){if(Ks(u))return"handled";if(/\'$/.test(u)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==W&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,W+" "+u,j,k))return!0}return $s(e,u,j,k)}function $s(e,u,j,k){var W=jl(e,u,k);return W=="multi"&&(e.state.keySeq=u),W=="handled"&&Qt(e,"keyHandled",e,u,j),(W=="handled"||W=="multi")&&(Ee(j),oi(e)),!!W}function Js(e,u){var j=Vs(u,!0);return j?u.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+j,u,function(k){return Go(e,k,!0)})||Co(e,j,u,function(k){if(typeof k=="string"?/^go[A-Z]/.test(k):k.motion)return Go(e,k)}):Co(e,j,u,function(k){return Go(e,k)}):!1}function Ul(e,u,j){return Co(e,"'"+j+"'",u,function(k){return Go(e,k,!0)})}var ls=null;function Qs(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(u.curOp.focus=G(),tt(u,e))return;T&&y<11&&e.keyCode==27&&(e.returnValue=!1);var j=e.keyCode;u.display.shift=j==16||e.shiftKey;var k=Js(u,e);c&&(ls=k?j:null,!k&&j==88&&!Vr&&(o?e.metaKey:e.ctrlKey)&&u.replaceSelection("",null,"cut")),C&&!o&&!k&&j==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),j==18&&!/\bCodeMirror-crosshair\b/.test(u.display.lineDiv.className)&&Bl(u)}function Bl(e){var u=e.display.lineDiv;z(u,"CodeMirror-crosshair");function j(k){(k.keyCode==18||!k.altKey)&&(_(u,"CodeMirror-crosshair"),ft(document,"keyup",j),ft(document,"mouseover",j))}Ie(document,"keyup",j),Ie(document,"mouseover",j)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),tt(this,e)}function el(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(mn(u.display,e)||tt(u,e)||e.ctrlKey&&!e.altKey||o&&e.metaKey)return;var j=e.keyCode,k=e.charCode;if(c&&j==ls){ls=null,Ee(e);return}if(c&&(!e.which||e.which<10)&&Js(u,e))return;var W=String.fromCharCode(k==null?j:k);if(W=="\b")return;if(Ul(u,e,W))return;u.display.input.onKeyPress(e)}var Hl=400,us=function(e,u,j){this.time=e,this.pos=u,this.button=j};us.prototype.compare=function(e,u,j){return this.time+Hl>e&&_r(u,this.pos)==0&&j==this.button};var Oo,Ao;function Wl(e,u){var j=+new Date;return Ao&&Ao.compare(j,e,u)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(j,e,u)?(Ao=new us(j,e,u),Oo=null,"double"):(Oo=new us(j,e,u),Ao=null,"single")}function tl(e){var u=this,j=u.display;if(tt(u,e)||j.activeTouch&&j.input.supportsTouch())return;if(j.input.ensurePolled(),j.shift=e.shiftKey,mn(j,e)){t||(j.scroller.draggable=!1,setTimeout(function(){return j.scroller.draggable=!0},100));return}if(cs(u,e))return;var k=ci(u,e),W=nt(e),Q=k?Wl(k,W):"single";if(window.focus(),W==1&&u.state.selectingText&&u.state.selectingText(e),k&&zl(u,W,k,Q,e))return;W==1?k?Gl(u,k,Q,e):He(e)==j.scroller&&Ee(e):W==2?(k&&Uo(u.doc,k),setTimeout(function(){return j.input.focus()},20)):W==3&&(I?u.display.input.onContextMenu(e):wa(u))}function zl(e,u,j,k,W){var Q="Click";return k=="double"?Q="Double"+Q:k=="triple"&&(Q="Triple"+Q),Q=(u==1?"Left":u==2?"Middle":"Right")+Q,Co(e,Gs(Q,W),W,function(ae){if(typeof ae=="string"&&(ae=So[ae]),!ae)return!1;var pe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),pe=ae(e,j)!=Ce}finally{e.state.suppressEdits=!1}return pe})}function Kl(e,u,j){var k=e.getOption("configureMouse"),W=k?k(e,u,j):{};if(W.unit==null){var Q=r?j.shiftKey&&j.metaKey:j.altKey;W.unit=Q?"rectangle":u=="single"?"char":u=="double"?"word":"line"}return(W.extend==null||e.doc.extend)&&(W.extend=e.doc.extend||j.shiftKey),W.addNew==null&&(W.addNew=o?j.metaKey:j.ctrlKey),W.moveOnDrag==null&&(W.moveOnDrag=!(o?j.altKey:j.ctrlKey)),W}function Gl(e,u,j,k){T?setTimeout(U(Ba,e),0):e.curOp.focus=G();var W=Kl(e,j,k),Q=e.doc.sel,ae;e.options.dragDrop&&vt&&!e.isReadOnly()&&j=="single"&&(ae=Q.contains(u))>-1&&(_r((ae=Q.ranges[ae]).from(),u)<0||u.xRel>0)&&(_r(ae.to(),u)>0||u.xRel<0)?Vl(e,k,u,W):Xl(e,k,u,W)}function Vl(e,u,j,k){var W=e.display,Q=!1,ae=hi(e,function(we){t&&(W.scroller.draggable=!1),e.state.draggingText=!1,ft(W.wrapper.ownerDocument,"mouseup",ae),ft(W.wrapper.ownerDocument,"mousemove",pe),ft(W.scroller,"dragstart",ve),ft(W.scroller,"drop",ae),Q||(Ee(we),k.addNew||Uo(e.doc,j,null,null,k.extend),t&&!a||T&&y==9?setTimeout(function(){W.wrapper.ownerDocument.body.focus({preventScroll:!0}),W.input.focus()},20):W.input.focus())}),pe=function(we){Q=Q||Math.abs(u.clientX-we.clientX)+Math.abs(u.clientY-we.clientY)>=10},ve=function(){return Q=!0};t&&(W.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!k.moveOnDrag,W.scroller.dragDrop&&W.scroller.dragDrop(),Ie(W.wrapper.ownerDocument,"mouseup",ae),Ie(W.wrapper.ownerDocument,"mousemove",pe),Ie(W.scroller,"dragstart",ve),Ie(W.scroller,"drop",ae),wa(e),setTimeout(function(){return W.input.focus()},20)}function rl(e,u,j){if(j=="char")return new Ln(u,u);if(j=="word")return e.findWordAt(u);if(j=="line")return new Ln(Nt(u.line,0),V(e.doc,Nt(u.line+1,0)));var k=j(e,u);return new Ln(k.from,k.to)}function Xl(e,u,j,k){var W=e.display,Q=e.doc;Ee(u);var ae,pe,ve=Q.sel,we=ve.ranges;if(k.addNew&&!k.extend?(pe=Q.sel.contains(j),pe>-1?ae=we[pe]:ae=new Ln(j,j)):(ae=Q.sel.primary(),pe=Q.sel.primIndex),k.unit=="rectangle")k.addNew||(ae=new Ln(j,j)),j=ci(e,u,!0,!0),pe=-1;else{var We=rl(e,j,k.unit);k.extend?ae=ns(ae,We.anchor,We.head,k.extend):ae=We}k.addNew?pe==-1?(pe=we.length,Pi(Q,aa(e,we.concat([ae]),pe),{scroll:!1,origin:"*mouse"})):we.length>1&&we[pe].empty()&&k.unit=="char"&&!k.extend?(Pi(Q,aa(e,we.slice(0,pe).concat(we.slice(pe+1)),0),{scroll:!1,origin:"*mouse"}),ve=Q.sel):is(Q,pe,ae,me):(pe=0,Pi(Q,new Wi([ae],0),me),ve=Q.sel);var Ye=j;function ct(ir){if(_r(Ye,ir)==0)return;if(Ye=ir,k.unit=="rectangle"){for(var Cr=[],Zr=e.options.tabSize,Kr=K(sr(Q,j.line).text,j.ch,Zr),_n=K(sr(Q,ir.line).text,ir.ch,Zr),$n=Math.min(Kr,_n),Ci=Math.max(Kr,_n),si=Math.min(j.line,ir.line),qi=Math.min(e.lastLine(),Math.max(j.line,ir.line));si<=qi;si++){var Ji=sr(Q,si).text,vi=be(Ji,$n,Zr);$n==Ci?Cr.push(new Ln(Nt(si,vi),Nt(si,vi))):Ji.length>vi&&Cr.push(new Ln(Nt(si,vi),Nt(si,be(Ji,Ci,Zr))))}Cr.length||Cr.push(new Ln(j,j)),Pi(Q,aa(e,ve.ranges.slice(0,pe).concat(Cr),pe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ir)}else{var Qi=ae,Ii=rl(e,ir,k.unit),Ei=Qi.anchor,yi;_r(Ii.anchor,Ei)>0?(yi=Ii.head,Ei=wi(Qi.from(),Ii.anchor)):(yi=Ii.anchor,Ei=Di(Qi.to(),Ii.head));var di=ve.ranges.slice(0);di[pe]=Yl(e,new Ln(V(Q,Ei),yi)),Pi(Q,aa(e,di,pe),me)}}var it=W.wrapper.getBoundingClientRect(),Ct=0;function Ut(ir){var Cr=++Ct,Zr=ci(e,ir,!0,k.unit=="rectangle");if(!Zr)return;if(_r(Zr,Ye)!=0){e.curOp.focus=G(),ct(Zr);var Kr=ka(W,Q);(Zr.line>=Kr.to||Zr.line<Kr.from)&&setTimeout(hi(e,function(){Ct==Cr&&Ut(ir)}),150)}else{var _n=ir.clientY<it.top?-20:ir.clientY>it.bottom?20:0;_n&&setTimeout(hi(e,function(){if(Ct!=Cr)return;W.scroller.scrollTop+=_n,Ut(ir)}),50)}}function Jt(ir){e.state.selectingText=!1,Ct=Infinity,ir&&(Ee(ir),W.input.focus()),ft(W.wrapper.ownerDocument,"mousemove",nr),ft(W.wrapper.ownerDocument,"mouseup",vr),Q.history.lastSelOrigin=null}var nr=hi(e,function(ir){ir.buttons===0||!nt(ir)?Jt(ir):Ut(ir)}),vr=hi(e,Jt);e.state.selectingText=vr,Ie(W.wrapper.ownerDocument,"mousemove",nr),Ie(W.wrapper.ownerDocument,"mouseup",vr)}function Yl(e,u){var j=u.anchor,k=u.head,W=sr(e.doc,j.line);if(_r(j,k)==0&&j.sticky==k.sticky)return u;var Q=dt(W);if(!Q)return u;var ae=st(Q,j.ch,j.sticky),pe=Q[ae];if(pe.from!=j.ch&&pe.to!=j.ch)return u;var ve=ae+(pe.from==j.ch==(pe.level!=1)?0:1);if(ve==0||ve==Q.length)return u;var we;if(k.line!=j.line)we=(k.line-j.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var We=st(Q,k.ch,k.sticky),Ye=We-ae||(k.ch-j.ch)*(pe.level==1?-1:1);We==ve-1||We==ve?we=Ye<0:we=Ye>0}var ct=Q[ve+(we?-1:0)],it=we==(ct.level==1),Ct=it?ct.from:ct.to,Ut=it?"after":"before";return j.ch==Ct&&j.sticky==Ut?u:new Ln(new Nt(j.line,Ct,Ut),k)}function nl(e,u,j,k){var W,Q;if(u.touches)W=u.touches[0].clientX,Q=u.touches[0].clientY;else try{W=u.clientX,Q=u.clientY}catch(ct){return!1}if(W>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;k&&Ee(u);var ae=e.display,pe=ae.lineDiv.getBoundingClientRect();if(Q>pe.bottom||!ke(e,j))return Le(u);Q-=pe.top-ae.viewOffset;for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var we=ae.gutters.childNodes[ve];if(we&&we.getBoundingClientRect().right>=W){var We=An(e.doc,Q),Ye=e.display.gutterSpecs[ve];return Qe(e,j,e,We,Ye.className,u),Le(u)}}}function cs(e,u){return nl(e,u,"gutterClick",!0)}function il(e,u){if(mn(e.display,u)||$l(e,u))return;if(tt(e,u,"contextmenu"))return;I||e.display.input.onContextMenu(u)}function $l(e,u){return ke(e,"gutterContextMenu")?nl(e,u,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var u=e.optionHandlers;function j(k,W,Q,ae){e.defaults[k]=W,Q&&(u[k]=ae?function(pe,ve,we){we!=oo&&Q(pe,ve,we)}:Q)}e.defineOption=j,e.Init=oo,j("value","",function(k,W){return k.setValue(W)},!0),j("mode",null,function(k,W){k.doc.modeOption=W,Ra(k)},!0),j("indentUnit",2,Ra,!0),j("indentWithTabs",!1),j("smartIndent",!0),j("tabSize",4,function(k){go(k),qr(k),Un(k)},!0),j("lineSeparator",null,function(k,W){if(k.doc.lineSep=W,!W)return;var Q=[],ae=k.doc.first;k.doc.iter(function(ve){for(var we=0;;){var We=ve.text.indexOf(W,we);if(We==-1)break;we=We+W.length,Q.push(Nt(ae,We))}ae++});for(var pe=Q.length-1;pe>=0;pe--)ro(k.doc,W,Q[pe],Nt(Q[pe].line,Q[pe].ch+W.length))}),j("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(k,W,Q){k.state.specialChars=new RegExp(W.source+(W.test(" ")?"":"| "),"g"),Q!=oo&&k.refresh()}),j("specialCharPlaceholder",pr,function(k){return k.refresh()},!0),j("electricChars",!0),j("inputStyle",l?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),j("spellcheck",!1,function(k,W){return k.getInputField().spellcheck=W},!0),j("autocorrect",!1,function(k,W){return k.getInputField().autocorrect=W},!0),j("autocapitalize",!1,function(k,W){return k.getInputField().autocapitalize=W},!0),j("rtlMoveVisually",!x),j("wholeLineUpdateBefore",!0),j("theme","default",function(k){al(k),ma(k)},!0),j("keyMap","default",function(k,W,Q){var ae=Ko(W),pe=Q!=oo&&Ko(Q);pe&&pe.detach&&pe.detach(k,ae),ae.attach&&ae.attach(k,pe||null)}),j("extraKeys",null),j("configureMouse",null),j("lineWrapping",!1,Zl,!0),j("gutters",[],function(k,W){k.display.gutterSpecs=Hi(W,k.options.lineNumbers),ma(k)},!0),j("fixedGutter",!0,function(k,W){k.display.gutters.style.left=W?gi(k.display)+"px":"0",k.refresh()},!0),j("coverGutterNextToScrollbar",!1,function(k){return or(k)},!0),j("scrollbarStyle","native",function(k){pa(k),or(k),k.display.scrollbars.setScrollTop(k.doc.scrollTop),k.display.scrollbars.setScrollLeft(k.doc.scrollLeft)},!0),j("lineNumbers",!1,function(k,W){k.display.gutterSpecs=Hi(k.options.gutters,W),ma(k)},!0),j("firstLineNumber",1,ma,!0),j("lineNumberFormatter",function(k){return k},ma,!0),j("showCursorWhenSelecting",!1,Dn,!0),j("resetSelectionOnContextMenu",!0),j("lineWiseCopyCut",!0),j("pasteLinesPerSelection",!0),j("selectionsMayTouch",!1),j("readOnly",!1,function(k,W){W=="nocursor"&&(la(k),k.display.input.blur()),k.display.input.readOnlyChanged(W)}),j("screenReaderLabel",null,function(k,W){W=W===""?null:W,k.display.input.screenReaderLabelChanged(W)}),j("disableInput",!1,function(k,W){W||k.display.input.reset()},!0),j("dragDrop",!0,Ql),j("allowDropFileTypes",null),j("cursorBlinkRate",530),j("cursorScrollMargin",0),j("cursorHeight",1,Dn,!0),j("singleCursorHeightPerLine",!0,Dn,!0),j("workTime",100),j("workDelay",100),j("flattenSpans",!0,go,!0),j("addModeClass",!1,go,!0),j("pollInterval",100),j("undoDepth",200,function(k,W){return k.doc.history.undoDepth=W}),j("historyEventDelay",1250),j("viewportMargin",10,function(k){return k.refresh()},!0),j("maxHighlightLength",1e4,go,!0),j("moveInputWithCursor",!0,function(k,W){W||k.display.input.resetPosition()}),j("tabindex",null,function(k,W){return k.display.input.getField().tabIndex=W||""}),j("autofocus",null),j("direction","ltr",function(k,W){return k.doc.setDirection(W)},!0),j("phrases",null)}function Ql(e,u,j){var k=j&&j!=oo;if(!u!=!k){var W=e.display.dragFunctions,Q=u?Ie:ft;Q(e.display.scroller,"dragstart",W.start),Q(e.display.scroller,"dragenter",W.enter),Q(e.display.scroller,"dragover",W.over),Q(e.display.scroller,"dragleave",W.leave),Q(e.display.scroller,"drop",W.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Rr(e)),Si(e),Un(e),qr(e),setTimeout(function(){return or(e)},100)}function ti(e,u){var j=this;if(!(this instanceof ti))return new ti(e,u);this.options=u=u?R(u):{},R(ol,u,!1);var k=u.value;typeof k=="string"?k=new $i(k,u.mode,null,u.lineSeparator,u.direction):u.mode&&(k.modeOption=u.mode),this.doc=k;var W=new ti.inputStyles[u.inputStyle](this),Q=this.display=new Ka(e,k,W,u);Q.wrapper.CodeMirror=this,al(this),u.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Z,keySeq:null,specialChars:null},u.autofocus&&!l&&Q.input.focus(),T&&y<11&&setTimeout(function(){return j.display.input.reset(!0)},20),ql(this),Il(),Hn(this),this.curOp.forceUpdate=!0,vs(this,k),u.autofocus&&!l||this.hasFocus()?setTimeout(function(){j.hasFocus()&&!j.state.focused&&sa(j)},20):la(this);for(var ae in Vo)Vo.hasOwnProperty(ae)&&Vo[ae](this,u[ae],oo);bi(this),u.finishInit&&u.finishInit(this);for(var pe=0;pe<ds.length;++pe)ds[pe](this);Oa(this),t&&u.lineWrapping&&getComputedStyle(Q.lineDiv).textRendering=="optimizelegibility"&&(Q.lineDiv.style.textRendering="auto")}ti.defaults=ol,ti.optionHandlers=Vo;function ql(e){var u=e.display;Ie(u.scroller,"mousedown",hi(e,tl)),T&&y<11?Ie(u.scroller,"dblclick",hi(e,function(ve){if(tt(e,ve))return;var we=ci(e,ve);if(!we||cs(e,ve)||mn(e.display,ve))return;Ee(ve);var We=e.findWordAt(we);Uo(e.doc,We.anchor,We.head)})):Ie(u.scroller,"dblclick",function(ve){return tt(e,ve)||Ee(ve)}),Ie(u.scroller,"contextmenu",function(ve){return il(e,ve)}),Ie(u.input.getField(),"contextmenu",function(ve){u.scroller.contains(ve.target)||il(e,ve)});var j,k={end:0};function W(){u.activeTouch&&(j=setTimeout(function(){return u.activeTouch=null},1e3),k=u.activeTouch,k.end=+new Date)}function Q(ve){if(ve.touches.length!=1)return!1;var we=ve.touches[0];return we.radiusX<=1&&we.radiusY<=1}function ae(ve,we){if(we.left==null)return!0;var We=we.left-ve.left,Ye=we.top-ve.top;return We*We+Ye*Ye>20*20}Ie(u.scroller,"touchstart",function(ve){if(!tt(e,ve)&&!Q(ve)&&!cs(e,ve)){u.input.ensurePolled(),clearTimeout(j);var we=+new Date;u.activeTouch={start:we,moved:!1,prev:we-k.end<=300?k:null},ve.touches.length==1&&(u.activeTouch.left=ve.touches[0].pageX,u.activeTouch.top=ve.touches[0].pageY)}}),Ie(u.scroller,"touchmove",function(){u.activeTouch&&(u.activeTouch.moved=!0)}),Ie(u.scroller,"touchend",function(ve){var we=u.activeTouch;if(we&&!mn(u,ve)&&we.left!=null&&!we.moved&&new Date-we.start<300){var We=e.coordsChar(u.activeTouch,"page"),Ye;!we.prev||ae(we,we.prev)?Ye=new Ln(We,We):!we.prev.prev||ae(we,we.prev.prev)?Ye=e.findWordAt(We):Ye=new Ln(Nt(We.line,0),V(e.doc,Nt(We.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),Ee(ve)}W()}),Ie(u.scroller,"touchcancel",W),Ie(u.scroller,"scroll",function(){u.scroller.clientHeight&&(da(e,u.scroller.scrollTop),Yi(e,u.scroller.scrollLeft,!0),Qe(e,"scroll",e))}),Ie(u.scroller,"mousewheel",function(ve){return po(e,ve)}),Ie(u.scroller,"DOMMouseScroll",function(ve){return po(e,ve)}),Ie(u.wrapper,"scroll",function(){return u.wrapper.scrollTop=u.wrapper.scrollLeft=0}),u.dragFunctions={enter:function(ve){tt(e,ve)||Me(ve)},over:function(ve){tt(e,ve)||(Rl(e,ve),Me(ve))},start:function(ve){return Al(e,ve)},drop:hi(e,Ol),leave:function(ve){tt(e,ve)||Hs(e)}};var pe=u.input.getField();Ie(pe,"keyup",function(ve){return Zs.call(e,ve)}),Ie(pe,"keydown",hi(e,Qs)),Ie(pe,"keypress",hi(e,el)),Ie(pe,"focus",function(ve){return sa(e,ve)}),Ie(pe,"blur",function(ve){return la(e,ve)})}var ds=[];ti.defineInitHook=function(e){return ds.push(e)};function Ro(e,u,j,k){var W=e.doc,Q;j==null&&(j="add"),j=="smart"&&(W.mode.indent?Q=Xt(e,u).state:j="prev");var ae=e.options.tabSize,pe=sr(W,u),ve=K(pe.text,null,ae);pe.stateAfter&&(pe.stateAfter=null);var we=pe.text.match(/^\s*/)[0],We;if(!k&&!/\S/.test(pe.text))We=0,j="not";else if(j=="smart"&&(We=W.mode.indent(Q,pe.text.slice(we.length),pe.text),We==Ce||We>150)){if(!k)return;j="prev"}j=="prev"?u>W.first?We=K(sr(W,u-1).text,null,ae):We=0:j=="add"?We=ve+e.options.indentUnit:j=="subtract"?We=ve-e.options.indentUnit:typeof j=="number"&&(We=ve+j),We=Math.max(0,We);var Ye="",ct=0;if(e.options.indentWithTabs)for(var it=Math.floor(We/ae);it;--it)ct+=ae,Ye+=" ";if(ct<We&&(Ye+=le(We-ct)),Ye!=we)return ro(W,Ye,Nt(u,0),Nt(u,we.length),"+input"),pe.stateAfter=null,!0;for(var Ct=0;Ct<W.sel.ranges.length;Ct++){var Ut=W.sel.ranges[Ct];if(Ut.head.line==u&&Ut.head.ch<we.length){var Jt=Nt(u,we.length);is(W,Ct,new Ln(Jt,Jt));break}}}var ya=null;function Xo(e){ya=e}function hs(e,u,j,k,W){var Q=e.doc;e.display.shift=!1,k||(k=Q.sel);var ae=+new Date-200,pe=W=="paste"||e.state.pasteIncoming>ae,ve=dr(u),we=null;if(pe&&k.ranges.length>1)if(ya&&ya.text.join(`
`)==u){if(k.ranges.length%ya.text.length==0){we=[];for(var We=0;We<ya.text.length;We++)we.push(Q.splitLines(ya.text[We]))}}else ve.length==k.ranges.length&&e.options.pasteLinesPerSelection&&(we=ge(ve,function(nr){return[nr]}));for(var Ye=e.curOp.updateInput,ct=k.ranges.length-1;ct>=0;ct--){var it=k.ranges[ct],Ct=it.from(),Ut=it.to();it.empty()&&(j&&j>0?Ct=Nt(Ct.line,Ct.ch-j):e.state.overwrite&&!pe?Ut=Nt(Ut.line,Math.min(sr(Q,Ut.line).text.length,Ut.ch+ne(ve).length)):pe&&ya&&ya.lineWise&&ya.text.join(`
`)==ve.join(`
`)&&(Ct=Ut=Nt(Ct.line,0)));var Jt={from:Ct,to:Ut,text:we?we[ct%we.length]:ve,origin:W||(pe?"paste":e.state.cutIncoming>ae?"cut":"+input")};to(e.doc,Jt),Qt(e,"inputRead",e,Jt)}u&&!pe&&ll(e,u),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,u){var j=e.clipboardData&&e.clipboardData.getData("Text");if(j)return e.preventDefault(),!u.isReadOnly()&&!u.options.disableInput&&Bi(u,function(){return hs(u,j,0,null,"paste")}),!0}function ll(e,u){if(!e.options.electricChars||!e.options.smartIndent)return;for(var j=e.doc.sel,k=j.ranges.length-1;k>=0;k--){var W=j.ranges[k];if(W.head.ch>100||k&&j.ranges[k-1].head.line==W.head.line)continue;var Q=e.getModeAt(W.head),ae=!1;if(Q.electricChars){for(var pe=0;pe<Q.electricChars.length;pe++)if(u.indexOf(Q.electricChars.charAt(pe))>-1){ae=Ro(e,W.head.line,"smart");break}}else Q.electricInput&&(Q.electricInput.test(sr(e.doc,W.head.line).text.slice(0,W.head.ch))&&(ae=Ro(e,W.head.line,"smart")));ae&&Qt(e,"electricInput",e,W.head.line)}}function ul(e){for(var u=[],j=[],k=0;k<e.doc.sel.ranges.length;k++){var W=e.doc.sel.ranges[k].head.line,Q={anchor:Nt(W,0),head:Nt(W+1,0)};j.push(Q),u.push(e.getRange(Q.anchor,Q.head))}return{text:u,ranges:j}}function cl(e,u,j,k){e.setAttribute("autocorrect",j?"":"off"),e.setAttribute("autocapitalize",k?"":"off"),e.setAttribute("spellcheck",!!u)}function dl(){var e=S("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),u=S("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),d&&(e.style.border="1px solid black"),cl(e),u}function eu(e){var u=e.optionHandlers,j=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(k,W){var Q=this.options,ae=Q[k];if(Q[k]==W&&k!="mode")return;Q[k]=W,u.hasOwnProperty(k)&&hi(this,u[k])(this,W,ae),Qe(this,"optionChange",this,k)},getOption:function(k){return this.options[k]},getDoc:function(){return this.doc},addKeyMap:function(k,W){this.state.keyMaps[W?"push":"unshift"](Ko(k))},removeKeyMap:function(k){for(var W=this.state.keyMaps,Q=0;Q<W.length;++Q)if(W[Q]==k||W[Q].name==k)return W.splice(Q,1),!0},addOverlay:Ri(function(k,W){var Q=k.token?k:e.getMode(this.options,k);if(Q.startState)throw new Error("Overlays may not be stateful.");te(this.state.overlays,{mode:Q,modeSpec:k,opaque:W&&W.opaque,priority:W&&W.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Un(this)}),removeOverlay:Ri(function(k){for(var W=this.state.overlays,Q=0;Q<W.length;++Q){var ae=W[Q].modeSpec;if(ae==k||typeof k=="string"&&ae.name==k){W.splice(Q,1),this.state.modeGen++,Un(this);return}}}),indentLine:Ri(function(k,W,Q){typeof W!="string"&&typeof W!="number"&&(W==null?W=this.options.smartIndent?"smart":"prev":W=W?"add":"subtract"),Zn(this.doc,k)&&Ro(this,k,W,Q)}),indentSelection:Ri(function(k){for(var W=this.doc.sel.ranges,Q=-1,ae=0;ae<W.length;ae++){var pe=W[ae];if(pe.empty())pe.head.line>Q&&(Ro(this,pe.head.line,k,!0),Q=pe.head.line,ae==this.doc.sel.primIndex&&ba(this));else{var ve=pe.from(),we=pe.to(),We=Math.max(Q,ve.line);Q=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Ye=We;Ye<Q;++Ye)Ro(this,Ye,k);var ct=this.doc.sel.ranges;ve.ch==0&&W.length==ct.length&&ct[ae].from().ch>0&&is(this.doc,ae,new Ln(ve,ct[ae].to()),Re)}}}),getTokenAt:function(k,W){return yn(this,k,W)},getLineTokens:function(k,W){return yn(this,Nt(k),W,!0)},getTokenTypeAt:function(k){k=V(this.doc,k);var W=Tt(this,sr(this.doc,k.line)),Q=0,ae=(W.length-1)/2,pe=k.ch,ve;if(pe==0)ve=W[2];else for(;;){var we=Q+ae>>1;if((we?W[we*2-1]:0)>=pe)ae=we;else if(W[we*2+1]<pe)Q=we+1;else{ve=W[we*2+2];break}}var We=ve?ve.indexOf("overlay "):-1;return We<0?ve:We==0?null:ve.slice(0,We-1)},getModeAt:function(k){var W=this.doc.mode;return W.innerMode?e.innerMode(W,this.getTokenAt(k).state).mode:W},getHelper:function(k,W){return this.getHelpers(k,W)[0]},getHelpers:function(k,W){var Q=[];if(!j.hasOwnProperty(W))return Q;var ae=j[W],pe=this.getModeAt(k);if(typeof pe[W]=="string")ae[pe[W]]&&Q.push(ae[pe[W]]);else if(pe[W])for(var ve=0;ve<pe[W].length;ve++){var we=ae[pe[W][ve]];we&&Q.push(we)}else pe.helperType&&ae[pe.helperType]?Q.push(ae[pe.helperType]):ae[pe.name]&&Q.push(ae[pe.name]);for(var We=0;We<ae._global.length;We++){var Ye=ae._global[We];Ye.pred(pe,this)&&ue(Q,Ye.val)==-1&&Q.push(Ye.val)}return Q},getStateAfter:function(k,W){var Q=this.doc;return k=se(Q,k==null?Q.first+Q.size-1:k),Xt(this,k+1,W).state},cursorCoords:function(k,W){var Q,ae=this.doc.sel.primary();return k==null?Q=ae.head:typeof k=="object"?Q=V(this.doc,k):Q=k?ae.from():ae.to(),hn(this,Q,W||"page")},charCoords:function(k,W){return Pn(this,V(this.doc,k),W||"page")},coordsChar:function(k,W){return k=un(this,k,W||"page"),on(this,k.left,k.top)},lineAtHeight:function(k,W){return k=un(this,{top:k,left:0},W||"page").top,An(this.doc,k+this.display.viewOffset)},heightAtLine:function(k,W,Q){var ae=!1,pe;if(typeof k=="number"){var ve=this.doc.first+this.doc.size-1;k<this.doc.first?k=this.doc.first:k>ve&&(k=ve,ae=!0),pe=sr(this.doc,k)}else pe=k;return vn(this,pe,{top:0,left:0},W||"page",Q||ae).top+(ae?this.doc.height-cr(pe):0)},defaultTextHeight:function(){return ei(this.display)},defaultCharWidth:function(){return ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(k,W,Q,ae,pe){var ve=this.display;k=hn(this,V(this.doc,k));var we=k.bottom,We=k.left;if(W.style.position="absolute",W.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(W),ve.sizer.appendChild(W),ae=="over")we=k.top;else if(ae=="above"||ae=="near"){var Ye=Math.max(ve.wrapper.clientHeight,this.doc.height),ct=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(ae=="above"||k.bottom+W.offsetHeight>Ye)&&k.top>W.offsetHeight?we=k.top-W.offsetHeight:k.bottom+W.offsetHeight<=Ye&&(we=k.bottom),We+W.offsetWidth>ct&&(We=ct-W.offsetWidth)}W.style.top=we+"px",W.style.left=W.style.right="",pe=="right"?(We=ve.sizer.clientWidth-W.offsetWidth,W.style.right="0px"):(pe=="left"?We=0:pe=="middle"&&(We=(ve.sizer.clientWidth-W.offsetWidth)/2),W.style.left=We+"px"),Q&&Pa(this,{left:We,top:we,right:We+W.offsetWidth,bottom:we+W.offsetHeight})},triggerOnKeyDown:Ri(Qs),triggerOnKeyPress:Ri(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Ri(tl),execCommand:function(k){if(So.hasOwnProperty(k))return So[k].call(null,this)},triggerElectric:Ri(function(k){ll(this,k)}),findPosH:function(k,W,Q,ae){var pe=1;W<0&&(pe=-1,W=-W);for(var ve=V(this.doc,k),we=0;we<W&&!(ve=fs(this.doc,ve,pe,Q,ae),ve.hitSide);++we);return ve},moveH:Ri(function(k,W){var Q=this;this.extendSelectionsBy(function(ae){return Q.display.shift||Q.doc.extend||ae.empty()?fs(Q.doc,ae.head,k,W,Q.options.rtlMoveVisually):k<0?ae.from():ae.to()},Oe)}),deleteH:Ri(function(k,W){var Q=this.doc.sel,ae=this.doc;Q.somethingSelected()?ae.replaceSelection("",null,"+delete"):ao(this,function(pe){var ve=fs(ae,pe.head,k,W,!1);return k<0?{from:ve,to:pe.head}:{from:pe.head,to:ve}})}),findPosV:function(k,W,Q,ae){var pe=1,ve=ae;W<0&&(pe=-1,W=-W);for(var we=V(this.doc,k),We=0;We<W;++We){var Ye=hn(this,we,"div");if(ve==null?ve=Ye.left:Ye.left=ve,we=hl(this,Ye,pe,Q),we.hitSide)break}return we},moveV:Ri(function(k,W){var Q=this,ae=this.doc,pe=[],ve=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(We){if(ve)return k<0?We.from():We.to();var Ye=hn(Q,We.head,"div");We.goalColumn!=null&&(Ye.left=We.goalColumn),pe.push(Ye.left);var ct=hl(Q,Ye,k,W);return W=="page"&&We==ae.sel.primary()&&Sa(Q,Pn(Q,ct,"div").top-Ye.top),ct},Oe),pe.length)for(var we=0;we<ae.sel.ranges.length;we++)ae.sel.ranges[we].goalColumn=pe[we]}),findWordAt:function(k){var W=this.doc,Q=sr(W,k.line).text,ae=k.ch,pe=k.ch;if(Q){var ve=this.getHelper(k,"wordChars");(k.sticky=="before"||pe==Q.length)&&ae?--ae:++pe;for(var we=Q.charAt(ae),We=Y(we,ve)?function(Ye){return Y(Ye,ve)}:/\s/.test(we)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!Y(Ye)};ae>0&&We(Q.charAt(ae-1));)--ae;for(;pe<Q.length&&We(Q.charAt(pe));)++pe}return new Ln(Nt(k.line,ae),Nt(k.line,pe))},toggleOverwrite:function(k){if(k!=null&&k==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),Qe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ri(function(k,W){ca(this,k,W)}),getScrollInfo:function(){var k=this.display.scroller;return{left:k.scrollLeft,top:k.scrollTop,height:k.scrollHeight-Je(this)-this.display.barHeight,width:k.scrollWidth-Je(this)-this.display.barWidth,clientHeight:_e(this),clientWidth:Ue(this)}},scrollIntoView:Ri(function(k,W){k==null?(k={from:this.doc.sel.primary().head,to:null},W==null&&(W=this.options.cursorScrollMargin)):typeof k=="number"?k={from:Nt(k,0),to:null}:k.from==null&&(k={from:k,to:null}),k.to||(k.to=k.from),k.margin=W||0,k.from.line!=null?co(this,k):Ca(this,k.from,k.to,k.margin)}),setSize:Ri(function(k,W){var Q=this,ae=function(ve){return typeof ve=="number"||/^\d+$/.test(String(ve))?ve+"px":ve};k!=null&&(this.display.wrapper.style.width=ae(k)),W!=null&&(this.display.wrapper.style.height=ae(W)),this.options.lineWrapping&&$r(this);var pe=this.display.viewFrom;this.doc.iter(pe,this.display.viewTo,function(ve){if(ve.widgets){for(var we=0;we<ve.widgets.length;we++)if(ve.widgets[we].noHScroll){Yn(Q,pe,"widget");break}}++pe}),this.curOp.forceUpdate=!0,Qe(this,"refresh",this)}),operation:function(k){return Bi(this,k)},startOperation:function(){return Hn(this)},endOperation:function(){return Oa(this)},refresh:Ri(function(){var k=this.display.cachedTextHeight;Un(this),this.curOp.forceUpdate=!0,qr(this),ca(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(k==null||Math.abs(k-ei(this.display))>.5||this.options.lineWrapping)&&Si(this),Qe(this,"refresh",this)}),swapDoc:Ri(function(k){var W=this.doc;return W.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,k),qr(this),this.display.input.reset(),ca(this,k.scrollLeft,k.scrollTop),this.curOp.forceScroll=!0,Qt(this,"swapDoc",this,W),W}),phrase:function(k){var W=this.options.phrases;return W&&Object.prototype.hasOwnProperty.call(W,k)?W[k]:k},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ne(e),e.registerHelper=function(k,W,Q){j.hasOwnProperty(k)||(j[k]=e[k]={_global:[]}),j[k][W]=Q},e.registerGlobalHelper=function(k,W,Q,ae){e.registerHelper(k,W,ae),j[k]._global.push({pred:Q,val:ae})}}function fs(e,u,j,k,W){var Q=u,ae=j,pe=sr(e,u.line),ve=W&&e.direction=="rtl"?-j:j;function we(){var vr=u.line+ve;return vr<e.first||vr>=e.first+e.size?!1:(u=new Nt(vr,u.ch,u.sticky),pe=sr(e,vr))}function We(vr){var ir;if(k=="codepoint"){var Cr=pe.text.charCodeAt(u.ch+(k>0?0:-1));isNaN(Cr)?ir=null:ir=new Nt(u.line,Math.max(0,Math.min(pe.text.length,u.ch+j*(Cr>=55296&&Cr<56320?2:1))),-j)}else W?ir=Ml(e.cm,pe,u,j):ir=os(pe,u,j);if(ir==null)if(!vr&&we())u=ss(W,e.cm,pe,u.line,ve);else return!1;else u=ir;return!0}if(k=="char"||k=="codepoint")We();else if(k=="column")We(!0);else if(k=="word"||k=="group")for(var Ye=null,ct=k=="group",it=e.cm&&e.cm.getHelper(u,"wordChars"),Ct=!0;!(j<0&&!We(!Ct));Ct=!1){var Ut=pe.text.charAt(u.ch)||`
`,Jt=Y(Ut,it)?"w":ct&&Ut==`
`?"n":!ct||/\s/.test(Ut)?null:"p";if(ct&&!Ct&&!Jt&&(Jt="s"),Ye&&Ye!=Jt){j<0&&(j=1,We(),u.sticky="after");break}if(Jt&&(Ye=Jt),j>0&&!We(!Ct))break}var nr=Ho(e,u,Q,ae,!0);return mi(Q,nr)&&(nr.hitSide=!0),nr}function hl(e,u,j,k){var W=e.doc,Q=u.left,ae;if(k=="page"){var pe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(pe-.5*ei(e.display),3);ae=(j>0?u.bottom:u.top)+j*ve}else k=="line"&&(ae=j>0?u.bottom+3:u.top-3);for(var we;!(we=on(e,Q,ae),!we.outside);){if(j<0?ae<=0:ae>=W.height){we.hitSide=!0;break}ae+=j*5}return we}var Wn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Wn.prototype.init=function(e){var u=this,j=this,k=j.cm,W=j.div=e.lineDiv;cl(W,k.options.spellcheck,k.options.autocorrect,k.options.autocapitalize);function Q(pe){for(var ve=pe.target;ve;ve=ve.parentNode){if(ve==W)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}Ie(W,"paste",function(pe){if(!Q(pe)||tt(k,pe)||sl(pe,k))return;y<=11&&setTimeout(hi(k,function(){return u.updateFromDOM()}),20)}),Ie(W,"compositionstart",function(pe){u.composing={data:pe.data,done:!1}}),Ie(W,"compositionupdate",function(pe){u.composing||(u.composing={data:pe.data,done:!1})}),Ie(W,"compositionend",function(pe){u.composing&&(pe.data!=u.composing.data&&u.readFromDOMSoon(),u.composing.done=!0)}),Ie(W,"touchstart",function(){return j.forceCompositionEnd()}),Ie(W,"input",function(){u.composing||u.readFromDOMSoon()});function ae(pe){if(!Q(pe)||tt(k,pe))return;if(k.somethingSelected())Xo({lineWise:!1,text:k.getSelections()}),pe.type=="cut"&&k.replaceSelection("",null,"cut");else if(k.options.lineWiseCopyCut){var ve=ul(k);Xo({lineWise:!0,text:ve.text}),pe.type=="cut"&&k.operation(function(){k.setSelections(ve.ranges,0,Re),k.replaceSelection("",null,"cut")})}else return;if(pe.clipboardData){pe.clipboardData.clearData();var we=ya.text.join(`
`);if(pe.clipboardData.setData("Text",we),pe.clipboardData.getData("Text")==we){pe.preventDefault();return}}var We=dl(),Ye=We.firstChild;k.display.lineSpace.insertBefore(We,k.display.lineSpace.firstChild),Ye.value=ya.text.join(`
`);var ct=document.activeElement;B(Ye),setTimeout(function(){k.display.lineSpace.removeChild(We),ct.focus(),ct==W&&j.showPrimarySelection()},50)}Ie(W,"copy",ae),Ie(W,"cut",ae)},Wn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Wn.prototype.prepareSelection=function(){var e=Fi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Wn.prototype.showSelection=function(e,u){if(!e||!this.cm.display.view.length)return;(e.focus||u)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Wn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Wn.prototype.showPrimarySelection=function(){var e=this.getSelection(),u=this.cm,j=u.doc.sel.primary(),k=j.from(),W=j.to();if(u.display.viewTo==u.display.viewFrom||k.line>=u.display.viewTo||W.line<u.display.viewFrom){e.removeAllRanges();return}var Q=Yo(u,e.anchorNode,e.anchorOffset),ae=Yo(u,e.focusNode,e.focusOffset);if(Q&&!Q.bad&&ae&&!ae.bad&&_r(wi(Q,ae),k)==0&&_r(Di(Q,ae),W)==0)return;var pe=u.display.view,ve=k.line>=u.display.viewFrom&&fl(u,k)||{node:pe[0].measure.map[2],offset:0},we=W.line<u.display.viewTo&&fl(u,W);if(!we){var We=pe[pe.length-1].measure,Ye=We.maps?We.maps[We.maps.length-1]:We.map;we={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!ve||!we){e.removeAllRanges();return}var ct=e.rangeCount&&e.getRangeAt(0),it;try{it=P(ve.node,ve.offset,we.offset,we.node)}catch(Ct){}it&&(!C&&u.state.focused?(e.collapse(ve.node,ve.offset),it.collapsed||(e.removeAllRanges(),e.addRange(it))):(e.removeAllRanges(),e.addRange(it)),ct&&e.anchorNode==null?e.addRange(ct):C&&this.startGracePeriod()),this.rememberSelection()},Wn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Wn.prototype.showMultipleSelections=function(e){w(this.cm.display.cursorDiv,e.cursors),w(this.cm.display.selectionDiv,e.selection)},Wn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Wn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var u=e.getRangeAt(0).commonAncestorContainer;return L(this.div,u)},Wn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Wn.prototype.blur=function(){this.div.blur()},Wn.prototype.getField=function(){return this.div},Wn.prototype.supportsTouch=function(){return!0},Wn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Bi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function u(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,u))}this.polling.set(this.cm.options.pollInterval,u)},Wn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Wn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),u=this.cm;if(f&&i&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var j=Yo(u,e.anchorNode,e.anchorOffset),k=Yo(u,e.focusNode,e.focusOffset);j&&k&&Bi(u,function(){Pi(u.doc,ga(j,k),Re),(j.bad||k.bad)&&(u.curOp.selectionChanged=!0)})},Wn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,u=e.display,j=e.doc.sel.primary(),k=j.from(),W=j.to();if(k.ch==0&&k.line>e.firstLine()&&(k=Nt(k.line-1,sr(e.doc,k.line-1).length)),W.ch==sr(e.doc,W.line).text.length&&W.line<e.lastLine()&&(W=Nt(W.line+1,0)),k.line<u.viewFrom||W.line>u.viewTo-1)return!1;var Q,ae,pe;k.line==u.viewFrom||(Q=Fn(e,k.line))==0?(ae=Jr(u.view[0].line),pe=u.view[0].node):(ae=Jr(u.view[Q].line),pe=u.view[Q-1].node.nextSibling);var ve=Fn(e,W.line),we,We;if(ve==u.view.length-1?(we=u.viewTo-1,We=u.lineDiv.lastChild):(we=Jr(u.view[ve+1].line)-1,We=u.view[ve+1].node.previousSibling),!pe)return!1;for(var Ye=e.doc.splitLines(ru(e,pe,We,ae,we)),ct=Jn(e.doc,Nt(ae,0),Nt(we,sr(e.doc,we).text.length));Ye.length>1&&ct.length>1;)if(ne(Ye)==ne(ct))Ye.pop(),ct.pop(),we--;else if(Ye[0]==ct[0])Ye.shift(),ct.shift(),ae++;else break;for(var it=0,Ct=0,Ut=Ye[0],Jt=ct[0],nr=Math.min(Ut.length,Jt.length);it<nr&&Ut.charCodeAt(it)==Jt.charCodeAt(it);)++it;for(var vr=ne(Ye),ir=ne(ct),Cr=Math.min(vr.length-(Ye.length==1?it:0),ir.length-(ct.length==1?it:0));Ct<Cr&&vr.charCodeAt(vr.length-Ct-1)==ir.charCodeAt(ir.length-Ct-1);)++Ct;if(Ye.length==1&&ct.length==1&&ae==k.line)for(;it&&it>k.ch&&vr.charCodeAt(vr.length-Ct-1)==ir.charCodeAt(ir.length-Ct-1);)it--,Ct++;Ye[Ye.length-1]=vr.slice(0,vr.length-Ct).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(it).replace(/\u200b+$/,"");var Zr=Nt(ae,it),Kr=Nt(we,ct.length?ne(ct).length-Ct:0);if(Ye.length>1||Ye[0]||_r(Zr,Kr))return ro(e.doc,Ye,Zr,Kr,"+input"),!0},Wn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wn.prototype.reset=function(){this.forceCompositionEnd()},Wn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Wn.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)},Wn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Bi(this.cm,function(){return Un(e.cm)})},Wn.prototype.setUneditable=function(e){e.contentEditable="false"},Wn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||hi(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Wn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Wn.prototype.onContextMenu=function(){},Wn.prototype.resetPosition=function(){},Wn.prototype.needsContentAttribute=!0;function fl(e,u){var j=$e(e,u.line);if(!j||j.hidden)return null;var k=sr(e.doc,u.line),W=Te(j,k,u.line),Q=dt(k,e.doc.direction),ae="left";if(Q){var pe=st(Q,u.ch);ae=pe%2?"right":"left"}var ve=Dt(W.map,u.ch,ae);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}function tu(e){for(var u=e;u;u=u.parentNode)if(/CodeMirror-gutter-wrapper/.test(u.className))return!0;return!1}function so(e,u){return u&&(e.bad=!0),e}function ru(e,u,j,k,W){var Q="",ae=!1,pe=e.doc.lineSeparator(),ve=!1;function we(it){return function(Ct){return Ct.id==it}}function We(){ae&&(Q+=pe,ve&&(Q+=pe),ae=ve=!1)}function Ye(it){it&&(We(),Q+=it)}function ct(it){if(it.nodeType==1){var Ct=it.getAttribute("cm-text");if(Ct){Ye(Ct);return}var Ut=it.getAttribute("cm-marker"),Jt;if(Ut){var nr=e.findMarks(Nt(k,0),Nt(W+1,0),we(+Ut));nr.length&&(Jt=nr[0].find(0))&&Ye(Jn(e.doc,Jt.from,Jt.to).join(pe));return}if(it.getAttribute("contenteditable")=="false")return;var vr=/^(pre|div|p|li|table|br)$/i.test(it.nodeName);if(!/^br$/i.test(it.nodeName)&&it.textContent.length==0)return;vr&&We();for(var ir=0;ir<it.childNodes.length;ir++)ct(it.childNodes[ir]);/^(pre|p)$/i.test(it.nodeName)&&(ve=!0),vr&&(ae=!0)}else it.nodeType==3&&Ye(it.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ct(u),u==j);)u=u.nextSibling,ve=!1;return Q}function Yo(e,u,j){var k;if(u==e.display.lineDiv){if(k=e.display.lineDiv.childNodes[j],!k)return so(e.clipPos(Nt(e.display.viewTo-1)),!0);u=null,j=0}else for(k=u;;k=k.parentNode){if(!k||k==e.display.lineDiv)return null;if(k.parentNode&&k.parentNode==e.display.lineDiv)break}for(var W=0;W<e.display.view.length;W++){var Q=e.display.view[W];if(Q.node==k)return nu(Q,u,j)}}function nu(e,u,j){var k=e.text.firstChild,W=!1;if(!u||!L(k,u))return so(Nt(Jr(e.line),0),!0);if(u==k&&(W=!0,u=k.childNodes[j],j=0,!u)){var Q=e.rest?ne(e.rest):e.line;return so(Nt(Jr(Q),Q.text.length),W)}var ae=u.nodeType==3?u:null,pe=u;for(!ae&&u.childNodes.length==1&&u.firstChild.nodeType==3&&(ae=u.firstChild,j&&(j=ae.nodeValue.length));pe.parentNode!=k;)pe=pe.parentNode;var ve=e.measure,we=ve.maps;function We(Jt,nr,vr){for(var ir=-1;ir<(we?we.length:0);ir++)for(var Cr=ir<0?ve.map:we[ir],Zr=0;Zr<Cr.length;Zr+=3){var Kr=Cr[Zr+2];if(Kr==Jt||Kr==nr){var _n=Jr(ir<0?e.line:e.rest[ir]),$n=Cr[Zr]+vr;return(vr<0||Kr!=Jt)&&($n=Cr[Zr+(vr?1:0)]),Nt(_n,$n)}}}var Ye=We(ae,pe,j);if(Ye)return so(Ye,W);for(var ct=pe.nextSibling,it=ae?ae.nodeValue.length-j:0;ct;ct=ct.nextSibling){if(Ye=We(ct,ct.firstChild,0),Ye)return so(Nt(Ye.line,Ye.ch-it),W);it+=ct.textContent.length}for(var Ct=pe.previousSibling,Ut=j;Ct;Ct=Ct.previousSibling){if(Ye=We(Ct,Ct.firstChild,-1),Ye)return so(Nt(Ye.line,Ye.ch+Ut),W);Ut+=Ct.textContent.length}}var pi=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Z,this.hasSelection=!1,this.composing=null};pi.prototype.init=function(e){var u=this,j=this,k=this.cm;this.createField(e);var W=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),d&&(W.style.width="0px"),Ie(W,"input",function(){T&&y>=9&&u.hasSelection&&(u.hasSelection=null),j.poll()}),Ie(W,"paste",function(ae){if(tt(k,ae)||sl(ae,k))return;k.state.pasteIncoming=+new Date,j.fastPoll()});function Q(ae){if(tt(k,ae))return;if(k.somethingSelected())Xo({lineWise:!1,text:k.getSelections()});else if(k.options.lineWiseCopyCut){var pe=ul(k);Xo({lineWise:!0,text:pe.text}),ae.type=="cut"?k.setSelections(pe.ranges,null,Re):(j.prevInput="",W.value=pe.text.join(`
`),B(W))}else return;ae.type=="cut"&&(k.state.cutIncoming=+new Date)}Ie(W,"cut",Q),Ie(W,"copy",Q),Ie(e.scroller,"paste",function(ae){if(mn(e,ae)||tt(k,ae))return;if(!W.dispatchEvent){k.state.pasteIncoming=+new Date,j.focus();return}var pe=new Event("paste");pe.clipboardData=ae.clipboardData,W.dispatchEvent(pe)}),Ie(e.lineSpace,"selectstart",function(ae){mn(e,ae)||Ee(ae)}),Ie(W,"compositionstart",function(){var ae=k.getCursor("from");j.composing&&j.composing.range.clear(),j.composing={start:ae,range:k.markText(ae,k.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(W,"compositionend",function(){j.composing&&(j.poll(),j.composing.range.clear(),j.composing=null)})},pi.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},pi.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},pi.prototype.prepareSelection=function(){var e=this.cm,u=e.display,j=e.doc,k=Fi(e);if(e.options.moveInputWithCursor){var W=hn(e,j.sel.primary().head,"div"),Q=u.wrapper.getBoundingClientRect(),ae=u.lineDiv.getBoundingClientRect();k.teTop=Math.max(0,Math.min(u.wrapper.clientHeight-10,W.top+ae.top-Q.top)),k.teLeft=Math.max(0,Math.min(u.wrapper.clientWidth-10,W.left+ae.left-Q.left))}return k},pi.prototype.showSelection=function(e){var u=this.cm,j=u.display;w(j.cursorDiv,e.cursors),w(j.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},pi.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var u=this.cm;if(u.somethingSelected()){this.prevInput="";var j=u.getSelection();this.textarea.value=j,u.state.focused&&B(this.textarea),T&&y>=9&&(this.hasSelection=j)}else e||(this.prevInput=this.textarea.value="",T&&y>=9&&(this.hasSelection=null))},pi.prototype.getField=function(){return this.textarea},pi.prototype.supportsTouch=function(){return!1},pi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!l||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},pi.prototype.blur=function(){this.textarea.blur()},pi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pi.prototype.receivedFocus=function(){this.slowPoll()},pi.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()})},pi.prototype.fastPoll=function(){var e=!1,u=this;u.pollingFast=!0;function j(){var k=u.poll();!k&&!e?(e=!0,u.polling.set(60,j)):(u.pollingFast=!1,u.slowPoll())}u.polling.set(20,j)},pi.prototype.poll=function(){var e=this,u=this.cm,j=this.textarea,k=this.prevInput;if(this.contextMenuPending||!u.state.focused||Ot(j)&&!k&&!this.composing||u.isReadOnly()||u.options.disableInput||u.state.keySeq)return!1;var W=j.value;if(W==k&&!u.somethingSelected())return!1;if(T&&y>=9&&this.hasSelection===W||o&&/[\uf700-\uf7ff]/.test(W))return u.display.input.reset(),!1;if(u.doc.sel==u.display.selForContextMenu){var Q=W.charCodeAt(0);if(Q==8203&&!k&&(k="\u200B"),Q==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,pe=Math.min(k.length,W.length);ae<pe&&k.charCodeAt(ae)==W.charCodeAt(ae);)++ae;return Bi(u,function(){hs(u,W.slice(ae),k.length-ae,null,e.composing?"*compose":null),W.length>1e3||W.indexOf(`
`)>-1?j.value=e.prevInput="":e.prevInput=W,e.composing&&(e.composing.range.clear(),e.composing.range=u.markText(e.composing.start,u.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},pi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},pi.prototype.onKeyPress=function(){T&&y>=9&&(this.hasSelection=null),this.fastPoll()},pi.prototype.onContextMenu=function(e){var u=this,j=u.cm,k=j.display,W=u.textarea;u.contextMenuPending&&u.contextMenuPending();var Q=ci(j,e),ae=k.scroller.scrollTop;if(!Q||c)return;var pe=j.options.resetSelectionOnContextMenu;pe&&j.doc.sel.contains(Q)==-1&&hi(j,Pi)(j.doc,ga(Q),Re);var ve=W.style.cssText,we=u.wrapper.style.cssText,We=u.wrapper.offsetParent.getBoundingClientRect();u.wrapper.style.cssText="position: static",W.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-We.top-5)+"px; left: "+(e.clientX-We.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 Ye;t&&(Ye=window.scrollY),k.input.focus(),t&&window.scrollTo(null,Ye),k.input.reset(),j.somethingSelected()||(W.value=u.prevInput=" "),u.contextMenuPending=it,k.selForContextMenu=j.doc.sel,clearTimeout(k.detectingSelectAll);function ct(){if(W.selectionStart!=null){var Ut=j.somethingSelected(),Jt="\u200B"+(Ut?W.value:"");W.value="\u21DA",W.value=Jt,u.prevInput=Ut?"":"\u200B",W.selectionStart=1,W.selectionEnd=Jt.length,k.selForContextMenu=j.doc.sel}}function it(){if(u.contextMenuPending!=it)return;if(u.contextMenuPending=!1,u.wrapper.style.cssText=we,W.style.cssText=ve,T&&y<9&&k.scrollbars.setScrollTop(k.scroller.scrollTop=ae),W.selectionStart!=null){(!T||T&&y<9)&&ct();var Ut=0,Jt=function(){k.selForContextMenu==j.doc.sel&&W.selectionStart==0&&W.selectionEnd>0&&u.prevInput=="\u200B"?hi(j,Is)(j):Ut++<10?k.detectingSelectAll=setTimeout(Jt,500):(k.selForContextMenu=null,k.input.reset())};k.detectingSelectAll=setTimeout(Jt,200)}}if(T&&y>=9&&ct(),I){Me(e);var Ct=function(){ft(window,"mouseup",Ct),setTimeout(it,20)};Ie(window,"mouseup",Ct)}else setTimeout(it,50)},pi.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},pi.prototype.setUneditable=function(){},pi.prototype.needsContentAttribute=!1;function iu(e,u){if(u=u?R(u):{},u.value=e.value,!u.tabindex&&e.tabIndex&&(u.tabindex=e.tabIndex),!u.placeholder&&e.placeholder&&(u.placeholder=e.placeholder),u.autofocus==null){var j=G();u.autofocus=j==e||e.getAttribute("autofocus")!=null&&j==document.body}function k(){e.value=pe.getValue()}var W;if(e.form&&(Ie(e.form,"submit",k),!u.leaveSubmitMethodAlone)){var Q=e.form;W=Q.submit;try{var ae=Q.submit=function(){k(),Q.submit=W,Q.submit(),Q.submit=ae}}catch(ve){}}u.finishInit=function(ve){ve.save=k,ve.getTextArea=function(){return e},ve.toTextArea=function(){ve.toTextArea=isNaN,k(),e.parentNode.removeChild(ve.getWrapperElement()),e.style.display="",e.form&&(ft(e.form,"submit",k),!u.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=W))}},e.style.display="none";var pe=ti(function(ve){return e.parentNode.insertBefore(ve,e.nextSibling)},u);return pe}function au(e){e.off=ft,e.on=Ie,e.wheelEventPixels=fo,e.Doc=$i,e.splitLines=dr,e.countColumn=K,e.findColumn=be,e.isWordChar=q,e.Pass=Ce,e.signal=Qe,e.Line=jr,e.changeEnd=va,e.scrollbarModel=hr,e.Pos=Nt,e.cmpPos=_r,e.modes=bn,e.mimeModes=Ar,e.resolveMode=Vt,e.getMode=En,e.modeExtensions=fr,e.extendMode=br,e.copyState=Br,e.startState=Kn,e.innerMode=kn,e.commands=So,e.keyMap=Ia,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=Pl,e.StringStream=dn,e.SharedTextMarker=xo,e.TextMarker=ja,e.LineWidget=Eo,e.e_preventDefault=Ee,e.e_stopPropagation=Ae,e.e_stop=Me,e.addClass=z,e.contains=L,e.rmClass=_,e.keyNames=Fa}Jl(ti),eu(ti);var ou="iter insert remove copy getEditor constructor".split(" ");for(var $o in $i.prototype)$i.prototype.hasOwnProperty($o)&&ue(ou,$o)<0&&(ti.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}($i.prototype[$o]));return Ne($i),ti.inputStyles={textarea:pi,contenteditable:Wn},ti.defineMode=function(e){!ti.defaults.mode&&e!="null"&&(ti.defaults.mode=e),fn.apply(this,arguments)},ti.defineMIME=cn,ti.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ti.defineMIME("text/plain","null"),ti.defineExtension=function(e,u){ti.prototype[e]=u},ti.defineDocExtension=function(e,u){$i.prototype[e]=u},ti.fromTextArea=iu,au(ti),ti.version="5.58.2",ti})},WYAk:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){(function(){var g=M,C=g.lib,N=C.Base,m=g.enc,v=m.Utf8,T=g.algo,y=T.HMAC=N.extend({init:function(t,h){t=this._hasher=new t.init,typeof h=="string"&&(h=v.parse(h));var i=t.blockSize,c=i*4;h.sigBytes>c&&(h=t.finalize(h)),h.clamp();for(var a=this._oKey=h.clone(),n=this._iKey=h.clone(),s=a.words,d=n.words,f=0;f<i;f++)s[f]^=1549556828,d[f]^=909522486;a.sigBytes=n.sigBytes=c,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var h=this._hasher,i=h.finalize(t);h.reset();var c=h.finalize(this._oKey.clone().concat(i));return c}})})()})},WaYH:function(H,J,D){"use strict";var M=D("rePB"),g=D("Ff2n"),C=D("VTBJ"),N=D("1OyB"),m=D("vuIU"),v=D("JX7q"),T=D("Ji7U"),y=D("LK+K"),t=D("q1tI"),h=D("TSYQ"),i=D.n(h),c=D("sboe"),a=D("OZM5"),n=function(I){var O=I.prefixCls,_=I.level,E=I.isStart,w=I.isEnd;if(!_)return null;for(var S="".concat(O,"-indent-unit"),F=[],P=0;P<_;P+=1){var L;F.push(t.createElement("span",{key:P,className:i()(S,(L={},Object(M.a)(L,"".concat(S,"-start"),E[P+1]),Object(M.a)(L,"".concat(S,"-end"),w[P+1]),Object(M.a)(L,"".concat(S,"-end-first-level"),!P&&w[0]),L))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},F)},s=n,d=D("815F"),f="open",l="close",o="---",r=function(p){Object(T.a)(O,p);var I=Object(y.a)(O);function O(){var _;return Object(N.a)(this,O),_=I.apply(this,arguments),_.state={dragNodeHighlight:!1},_.onSelectorClick=function(E){var w=_.props.context.onNodeClick;w(E,Object(d.b)(_.props)),_.isSelectable()?_.onSelect(E):_.onCheck(E)},_.onSelectorDoubleClick=function(E){var w=_.props.context.onNodeDoubleClick;w(E,Object(d.b)(_.props))},_.onSelect=function(E){if(_.isDisabled())return;var w=_.props.context.onNodeSelect;E.preventDefault(),w(E,Object(d.b)(_.props))},_.onCheck=function(E){if(_.isDisabled())return;var w=_.props,S=w.disableCheckbox,F=w.checked,P=_.props.context.onNodeCheck;if(!_.isCheckable()||S)return;E.preventDefault();var L=!F;P(E,Object(d.b)(_.props),L)},_.onMouseEnter=function(E){var w=_.props.context.onNodeMouseEnter;w(E,Object(d.b)(_.props))},_.onMouseLeave=function(E){var w=_.props.context.onNodeMouseLeave;w(E,Object(d.b)(_.props))},_.onContextMenu=function(E){var w=_.props.context.onNodeContextMenu;w(E,Object(d.b)(_.props))},_.onDragStart=function(E){var w=_.props.context.onNodeDragStart;E.stopPropagation(),_.setState({dragNodeHighlight:!0}),w(E,Object(v.a)(_));try{E.dataTransfer.setData("text/plain","")}catch(S){}},_.onDragEnter=function(E){var w=_.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),w(E,Object(v.a)(_))},_.onDragOver=function(E){var w=_.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),w(E,Object(v.a)(_))},_.onDragLeave=function(E){var w=_.props.context.onNodeDragLeave;E.stopPropagation(),w(E,Object(v.a)(_))},_.onDragEnd=function(E){var w=_.props.context.onNodeDragEnd;E.stopPropagation(),_.setState({dragNodeHighlight:!1}),w(E,Object(v.a)(_))},_.onDrop=function(E){var w=_.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),_.setState({dragNodeHighlight:!1}),w(E,Object(v.a)(_))},_.onExpand=function(E){var w=_.props.context.onNodeExpand;w(E,Object(d.b)(_.props))},_.setSelectHandle=function(E){_.selectHandle=E},_.getNodeState=function(){var E=_.props.expanded;return _.isLeaf()?null:E?f:l},_.hasChildren=function(){var E=_.props.eventKey,w=_.props.context.keyEntities,S=w[E]||{},F=S.children;return!!(F||[]).length},_.isLeaf=function(){var E=_.props,w=E.isLeaf,S=E.loaded,F=_.props.context.loadData,P=_.hasChildren();return w===!1?!1:w||!F&&!P||F&&S&&!P},_.isDisabled=function(){var E=_.props.disabled,w=_.props.context.disabled;return!!(w||E)},_.isCheckable=function(){var E=_.props.checkable,w=_.props.context.checkable;return!w||E===!1?!1:w},_.syncLoadData=function(E){var w=E.expanded,S=E.loading,F=E.loaded,P=_.props.context,L=P.loadData,G=P.onNodeLoad;if(S)return;L&&w&&!_.isLeaf()&&(!_.hasChildren()&&!F&&G(Object(d.b)(_.props)))},_.renderSwitcher=function(){var E=_.props,w=E.expanded,S=E.switcherIcon,F=_.props.context,P=F.prefixCls,L=F.switcherIcon,G=S||L;if(_.isLeaf())return t.createElement("span",{className:i()("".concat(P,"-switcher"),"".concat(P,"-switcher-noop"))},typeof G=="function"?G(Object(C.a)(Object(C.a)({},_.props),{},{isLeaf:!0})):G);var z=i()("".concat(P,"-switcher"),"".concat(P,"-switcher_").concat(w?f:l));return t.createElement("span",{onClick:_.onExpand,className:z},typeof G=="function"?G(Object(C.a)(Object(C.a)({},_.props),{},{isLeaf:!1})):G)},_.renderCheckbox=function(){var E=_.props,w=E.checked,S=E.halfChecked,F=E.disableCheckbox,P=_.props.context.prefixCls,L=_.isDisabled(),G=_.isCheckable();if(!G)return null;var z=typeof G!="boolean"?G:null;return t.createElement("span",{className:i()("".concat(P,"-checkbox"),w&&"".concat(P,"-checkbox-checked"),!w&&S&&"".concat(P,"-checkbox-indeterminate"),(L||F)&&"".concat(P,"-checkbox-disabled")),onClick:_.onCheck},z)},_.renderIcon=function(){var E=_.props.loading,w=_.props.context.prefixCls;return t.createElement("span",{className:i()("".concat(w,"-iconEle"),"".concat(w,"-icon__").concat(_.getNodeState()||"docu"),E&&"".concat(w,"-icon_loading"))})},_.renderSelector=function(){var E=_.state.dragNodeHighlight,w=_.props,S=w.title,F=w.selected,P=w.icon,L=w.loading,G=w.data,z=_.props.context,A=z.prefixCls,B=z.showIcon,U=z.icon,R=z.draggable,K=z.loadData,Z=z.titleRender,ue=_.isDisabled(),de="".concat(A,"-node-content-wrapper"),Ce;if(B){var Re=P||U;Ce=Re?t.createElement("span",{className:i()("".concat(A,"-iconEle"),"".concat(A,"-icon__customize"))},typeof Re=="function"?Re(_.props):Re):_.renderIcon()}else K&&L&&(Ce=_.renderIcon());var me;typeof S=="function"?me=S(G):Z?me=Z(G):me=S;var Oe=t.createElement("span",{className:"".concat(A,"-title")},me);return t.createElement("span",{ref:_.setSelectHandle,title:typeof S=="string"?S:"",className:i()("".concat(de),"".concat(de,"-").concat(_.getNodeState()||"normal"),!ue&&(F||E)&&"".concat(A,"-node-selected"),!ue&&R&&"draggable"),draggable:!ue&&R||void 0,"aria-grabbed":!ue&&R||void 0,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onContextMenu:_.onContextMenu,onClick:_.onSelectorClick,onDoubleClick:_.onSelectorDoubleClick,onDragStart:R?_.onDragStart:void 0},Ce,Oe)},_}return Object(m.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var E=this.props.selectable,w=this.props.context.selectable;return typeof E=="boolean"?E:w}},{key:"render",value:function(){var E,w=this.props,S=w.eventKey,F=w.className,P=w.style,L=w.dragOver,G=w.dragOverGapTop,z=w.dragOverGapBottom,A=w.isLeaf,B=w.isStart,U=w.isEnd,R=w.expanded,K=w.selected,Z=w.checked,ue=w.halfChecked,de=w.loading,Ce=w.domRef,Re=w.active,me=w.onMouseMove,Oe=Object(g.a)(w,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),be=this.props.context,ce=be.prefixCls,le=be.filterTreeNode,ne=be.draggable,ge=be.keyEntities,te=this.isDisabled(),re=Object(a.f)(Oe),Se=ge[S]||{},ie=Se.level,q=U[U.length-1];return t.createElement("div",Object.assign({ref:Ce,className:i()(F,"".concat(ce,"-treenode"),(E={},Object(M.a)(E,"".concat(ce,"-treenode-disabled"),te),Object(M.a)(E,"".concat(ce,"-treenode-switcher-").concat(R?"open":"close"),!A),Object(M.a)(E,"".concat(ce,"-treenode-checkbox-checked"),Z),Object(M.a)(E,"".concat(ce,"-treenode-checkbox-indeterminate"),ue),Object(M.a)(E,"".concat(ce,"-treenode-selected"),K),Object(M.a)(E,"".concat(ce,"-treenode-loading"),de),Object(M.a)(E,"".concat(ce,"-treenode-active"),Re),Object(M.a)(E,"".concat(ce,"-treenode-leaf-last"),q),Object(M.a)(E,"drag-over",!te&&L),Object(M.a)(E,"drag-over-gap-top",!te&&G),Object(M.a)(E,"drag-over-gap-bottom",!te&&z),Object(M.a)(E,"filter-node",le&&le(Object(d.b)(this.props))),E)),style:P,onDragEnter:ne?this.onDragEnter:void 0,onDragOver:ne?this.onDragOver:void 0,onDragLeave:ne?this.onDragLeave:void 0,onDrop:ne?this.onDrop:void 0,onDragEnd:ne?this.onDragEnd:void 0,onMouseMove:me},re),t.createElement(s,{prefixCls:ce,level:ie,isStart:B,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(t.Component),x=function(I){return t.createElement(c.a.Consumer,null,function(O){return t.createElement(r,Object.assign({},I,{context:O}))})};x.displayName="TreeNode",x.defaultProps={title:o},x.isTreeNode=1;var b=J.a=x},Y1PL:function(H,J,D){"use strict";D.r(J),D.d(J,"ResizableTextArea",function(){return ue});var M=D("wx14"),g=D("1OyB"),C=D("vuIU"),N=D("Ji7U"),m=D("LK+K"),v=D("q1tI"),T=D("VTBJ"),y=D("rePB"),t=D("Zm9Q"),h=D("Kwbf"),i=D("c+Xe"),c=D("m+aA"),a=D("bdgK"),n=new Map;function s(Re){Re.forEach(function(me){var Oe,be=me.target;(Oe=n.get(be))===null||Oe===void 0||Oe.forEach(function(ce){return ce(be)})})}var d=new a.default(s),f=null,l=null;function o(Re,me){n.has(Re)||(n.set(Re,new Set),d.observe(Re)),n.get(Re).add(me)}function r(Re,me){n.has(Re)&&(n.get(Re).delete(me),n.get(Re).size||(d.unobserve(Re),n.delete(Re)))}var x=function(Re){Object(N.a)(Oe,Re);var me=Object(m.a)(Oe);function Oe(){return Object(g.a)(this,Oe),me.apply(this,arguments)}return Object(C.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(v.Component),b=v.createContext(null);function p(Re){var me=Re.children,Oe=Re.onBatchResize,be=v.useRef(0),ce=v.useRef([]),le=v.useContext(b),ne=v.useCallback(function(ge,te,re){be.current+=1;var Se=be.current;ce.current.push({size:ge,element:te,data:re}),Promise.resolve().then(function(){Se===be.current&&(Oe==null||Oe(ce.current),ce.current=[])}),le==null||le(ge,te,re)},[Oe,le]);return v.createElement(b.Provider,{value:ne},me)}function I(Re){var me=Re.children,Oe=Re.disabled,be=v.useRef(null),ce=v.useRef(null),le=v.useContext(b),ne=v.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ge=v.isValidElement(me)&&Object(i.c)(me),te=ge?me.ref:null,re=v.useMemo(function(){return Object(i.a)(te,be)},[te,be]),Se=v.useRef(Re);Se.current=Re;var ie=v.useCallback(function(q){var Y=Se.current,X=Y.onResize,he=Y.data,fe=q.getBoundingClientRect(),xe=fe.width,Ke=fe.height,Ze=q.offsetWidth,et=q.offsetHeight,st=Math.floor(xe),ut=Math.floor(Ke);if(ne.current.width!==st||ne.current.height!==ut||ne.current.offsetWidth!==Ze||ne.current.offsetHeight!==et){var dt={width:st,height:ut,offsetWidth:Ze,offsetHeight:et};ne.current=dt;var Fe=Ze===Math.round(xe)?xe:Ze,Ie=et===Math.round(Ke)?Ke:et,ot=Object(T.a)(Object(T.a)({},dt),{},{offsetWidth:Fe,offsetHeight:Ie});le==null||le(ot,q,he),X&&Promise.resolve().then(function(){X(ot,q)})}},[]);return v.useEffect(function(){var q=Object(c.a)(be.current)||Object(c.a)(ce.current);return q&&!Oe&&o(q,ie),function(){return r(q,ie)}},[be.current,Oe]),v.createElement(x,{ref:ce},ge?v.cloneElement(me,{ref:re}):me)}var O="rc-observer-key";function _(Re){var me=Re.children,Oe=Object(t.a)(me);return Oe.map(function(be,ce){var le=(be==null?void 0:be.key)||"".concat(O,"-").concat(ce);return v.createElement(I,Object(M.a)({},Re,{key:le}),be)})}_.Collection=p;var E=_,w=D("bT9E"),S=D("TSYQ"),F=D.n(S),P=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,L=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],G={},z;function A(Re){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=Re.getAttribute("id")||Re.getAttribute("data-reactid")||Re.getAttribute("name");if(me&&G[Oe])return G[Oe];var be=window.getComputedStyle(Re),ce=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),le=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),ne=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),ge=L.map(function(re){return"".concat(re,":").concat(be.getPropertyValue(re))}).join(";"),te={sizingStyle:ge,paddingSize:le,borderSize:ne,boxSizing:ce};return me&&Oe&&(G[Oe]=te),te}function B(Re){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=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)),Re.getAttribute("wrap")?z.setAttribute("wrap",Re.getAttribute("wrap")):z.removeAttribute("wrap");var ce=A(Re,me),le=ce.paddingSize,ne=ce.borderSize,ge=ce.boxSizing,te=ce.sizingStyle;z.setAttribute("style","".concat(te,";").concat(P)),z.value=Re.value||Re.placeholder||"";var re=Number.MIN_SAFE_INTEGER,Se=Number.MAX_SAFE_INTEGER,ie=z.scrollHeight,q;if(ge==="border-box"?ie+=ne:ge==="content-box"&&(ie-=le),Oe!==null||be!==null){z.value=" ";var Y=z.scrollHeight-le;Oe!==null&&(re=Y*Oe,ge==="border-box"&&(re=re+le+ne),ie=Math.max(re,ie)),be!==null&&(Se=Y*be,ge==="border-box"&&(Se=Se+le+ne),q=ie>Se?"":"hidden",ie=Math.min(Se,ie))}return{height:ie,minHeight:re,maxHeight:Se,overflowY:q,resize:"none"}}var U=D("Gytx"),R=D.n(U),K;(function(Re){Re[Re.NONE=0]="NONE",Re[Re.RESIZING=1]="RESIZING",Re[Re.RESIZED=2]="RESIZED"})(K||(K={}));var Z=function(Re){Object(N.a)(Oe,Re);var me=Object(m.a)(Oe);function Oe(be){var ce;return Object(g.a)(this,Oe),ce=me.call(this,be),ce.nextFrameActionId=void 0,ce.resizeFrameId=void 0,ce.textArea=void 0,ce.saveTextArea=function(le){ce.textArea=le},ce.handleResize=function(le){var ne=ce.state.resizeStatus,ge=ce.props,te=ge.autoSize,re=ge.onResize;if(ne!==K.NONE)return;typeof re=="function"&&re(le),te&&ce.resizeOnNextFrame()},ce.resizeOnNextFrame=function(){cancelAnimationFrame(ce.nextFrameActionId),ce.nextFrameActionId=requestAnimationFrame(ce.resizeTextarea)},ce.resizeTextarea=function(){var le=ce.props.autoSize;if(!le||!ce.textArea)return;var ne=le.minRows,ge=le.maxRows,te=B(ce.textArea,!1,ne,ge);ce.setState({textareaStyles:te,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 le=ce.props,ne=le.prefixCls,ge=ne===void 0?"rc-textarea":ne,te=le.autoSize,re=le.onResize,Se=le.className,ie=le.disabled,q=ce.state,Y=q.textareaStyles,X=q.resizeStatus,he=Object(w.a)(ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),fe=F()(ge,Se,Object(y.a)({},"".concat(ge,"-disabled"),ie));"value"in he&&(he.value=he.value||"");var xe=Object(T.a)(Object(T.a)(Object(T.a)({},ce.props.style),Y),X===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return v.createElement(E,{onResize:ce.handleResize,disabled:!(te||re)},v.createElement("textarea",Object(M.a)({},he,{className:fe,style:xe,ref:ce.saveTextArea})))},ce.state={textareaStyles:{},resizeStatus:K.NONE},ce}return Object(C.a)(Oe,[{key:"componentDidUpdate",value:function(ce){(ce.value!==this.props.value||!R()(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,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(ce,le)}}catch(ne){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(v.Component),ue=Z,de=function(Re){Object(N.a)(Oe,Re);var me=Object(m.a)(Oe);function Oe(be){var ce;Object(g.a)(this,Oe),ce=me.call(this,be),ce.resizableTextArea=void 0,ce.focus=function(){ce.resizableTextArea.textArea.focus()},ce.saveTextArea=function(ne){ce.resizableTextArea=ne},ce.handleChange=function(ne){var ge=ce.props.onChange;ce.setValue(ne.target.value,function(){ce.resizableTextArea.resizeTextarea()}),ge&&ge(ne)},ce.handleKeyDown=function(ne){var ge=ce.props,te=ge.onPressEnter,re=ge.onKeyDown;ne.keyCode===13&&te&&te(ne),re&&re(ne)};var le=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return ce.state={value:le},ce}return Object(C.a)(Oe,[{key:"setValue",value:function(ce,le){"value"in this.props||this.setState({value:ce},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return v.createElement(ue,Object(M.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}}]),Oe}(v.Component),Ce=J.default=de},ZW9T:function(H,J,D){"use strict";D.d(J,"a",function(){return U});var M=D("k1fw"),g=D("oBTY"),C=D("miYZ"),N=D("tsqr"),m=D("rAM+"),v=D("tJVT"),T=D("PpiC"),y=D("q1tI"),t=D.n(y),h=D("bdgK"),i=D("9og8"),c=D("WmNS"),a=D.n(c),n={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},s={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},d={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},f={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},l=D("5VLF"),o=D.n(l),r={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},x=function(K,Z){return Z.map(function(ue){return{label:ue,kind:K.languages.CompletionItemKind.Keyword,insertText:ue}})},b=function(K){return Object.keys(r.tables).map(function(Z){return{label:Z,kind:K.languages.CompletionItemKind.Variable,insertText:Z}})},p=function(K,Z){var ue=r.tables[K];return ue?ue.map(function(de){return{label:de,kind:Z.languages.CompletionItemKind.Field,insertText:de}}):[]};function I(R,K,Z,ue,de){var Ce=K.getWordUntilPosition(Z),Re={startLineNumber:Z.lineNumber,endLineNumber:Z.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},me=ue.map(function(Oe){return{label:Oe,kind:R.languages.CompletionItemKind.Keyword,insertText:Oe,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}});return de.map(function(Oe){me.push(Object(M.a)(Object(M.a)({},Oe),{},{range:Re}))}),me}var O=function(R){r.languages.map(function(de){return R.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Re,me,Oe){return Object(i.a)(a.a.mark(function be(){var ce;return a.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return ce=o()(Re.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}),ne.abrupt("return",[{range:Re.getFullModelRange(),text:ce}]);case 2:case"end":return ne.stop()}},be)}))()}}),de});var K=d.quickKey.map(function(de){return{label:de.label,kind:R.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Z=f.quickKey.map(function(de){return{label:de.label,kind:R.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ue=s.quickKey.map(function(de){return{label:de.label,kind:R.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet}});R.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},be=Ce.getLineContent(Re.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(d.keywords.map(function(ce){return{label:ce,kind:R.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(g.a)(d.quickKey.map(function(ce){return{label:ce.label,kind:R.languages.CompletionItemKind.Function,documentation:ce.content,insertText:be.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}}),R.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn};return{suggestions:Object(g.a)(n.keywords.map(function(be){return{label:be,kind:R.languages.CompletionItemKind.Function,documentation:be,insertText:be,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}}))}}}),R.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},be=Ce.getLineContent(Re.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(s.keywords.map(function(ce){return{label:ce,kind:R.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(g.a)(s.quickKey.map(function(ce){return{label:ce.label,kind:R.languages.CompletionItemKind.Function,documentation:ce.content,insertText:be.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}}),R.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},be=Ce.getLineContent(Re.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(f.keywords.map(function(ce){return{label:ce,kind:R.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(g.a)(f.quickKey.map(function(ce){return{label:ce.label,kind:R.languages.CompletionItemKind.Function,documentation:ce.content,insertText:be.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",E=D("fjLI"),w=D("LvDl"),S=D("+ua5");function F(R){return/^\d+$/.test(R)?"".concat(R,"px"):R}function P(){}var L=!1,G={"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 R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],K=R;if(Array.isArray(R)){for(var Z=0;Z<R.length;Z++){var ue=G[R[Z]];if(ue)return ue}return K[0]}return G[K]||K}var A=null,B=J.b=function(R){var K=R.width,Z=K===void 0?"100%":K,ue=R.height,de=ue===void 0?"100%":ue,Ce=R.value,Re=R.language,me=Re===void 0?"javascript":Re,Oe=R.style,be=Oe===void 0?{}:Oe,ce=R.options,le=ce===void 0?{}:ce,ne=R.overrideServices,ge=ne===void 0?{}:ne,te=R.theme,re=te===void 0?"vs-dark":te,Se=R.onEditBlur,ie=R.onSave,q=R.autoHeight,Y=q===void 0?!1:q,X=R.forbidCopy,he=X===void 0?!1:X,fe=R.onChange,xe=fe===void 0?P:fe,Ke=R.editorDidMount,Ze=Ke===void 0?P:Ke,et=R.onFocus,st=et===void 0?P:et,ut=R.filename,dt=ut===void 0?"educoder.txt":ut,Fe=R.errorLine,Ie=R.errorContent,ot=Ie===void 0?"":Ie,ft=Object(T.a)(R,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Qe=Object(y.useRef)(),tt=Object(y.useRef)({}),Be=Object(y.useRef)(),ke=Object(y.useRef)(),Ne=Object(y.useRef)(!1),Ee=Object(y.useRef)(),Ae=Object(y.useState)(!1),Le=Object(v.a)(Ae,2),Me=Le[0],He=Le[1];function nt(){var fr;return Qe.current&&(fr=new h.default(function(br){var Br=Object(m.a)(br),kn;try{for(Br.s();!(kn=Br.n()).done;){var Kn=kn.value;(Kn.target.offsetHeight>0||Kn.target.offsetWidth>0)&&tt.current.instance.layout()}}catch(dn){Br.e(dn)}finally{Br.f()}}),fr.observe(Qe.current)),fr}function vt(){N.b.warn(decodeURIComponent(_))}var bt=function(){var br=tt.current.instance;if(Ce!=null&&br&&Me){var Br=br.getModel();Br&&Ce!==Br.getValue()&&(L=!0,Br.setValue(Ce),br.layout(),L=!1)}};Object(y.useEffect)(function(){ke.current&&clearTimeout(ke.current),ke.current=setTimeout(function(){bt()},500)},[Ce,Me,tt.current]),Object(y.useEffect)(function(){if(Fe&&tt.current&&tt.current.instance){var fr=tt.current.instance;fr.changeViewZones(function(Br){var kn=document.createElement("div");kn.style.padding="10px 20px",kn.style.width="calc(100% - 20px)",kn.className="my-error-line-wrp",kn.innerHTML=ot,Br.addZone({afterLineNumber:Fe||11,heightInLines:3,domNode:kn})});var br={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}};fr.addOverlayWidget(br),fr.revealPositionInCenter({lineNumber:20,column:1})}},[Fe,tt.current,Me]);function Wt(){var fr=tt.current.instance;if(fr){var br=fr.getSelection(),Br=tt.current.pastePos||{},kn=new A.Range(Br.startLineNumber||br.endLineNumber,Br.startColumn||br.endColumn,Br.endLineNumber||br.endLineNumber,Br.endColumn||br.endColumn);setTimeout(function(){fr.executeEdits("",[{range:kn,text:""}])},300)}}function Bt(fr){(window.navigator.platform.match("Mac")?fr.metaKey:fr.ctrlKey)&&fr.keyCode==83&&(fr.preventDefault(),ie())}var lr=function(){if(Y&&tt.current.instance){var br=tt.current.instance.getContentHeight();Vt(br<de?de:br)}else Vt(de)};function dr(fr){var br=document.createEvent("MouseEvents");br.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),fr.dispatchEvent(br)}function Ot(fr,br){var Br=window.URL||window.webkitURL||window,kn=new Blob([br]),Kn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Kn.href=Br.createObjectURL(kn),Kn.download=fr,dr(Kn)}Object(y.useEffect)(function(){lr()},[lr]),Object(y.useEffect)(function(){Qe.current&&!Me&&Promise.all([D.e(15),D.e(27)]).then(D.t.bind(null,"M/lh",7)).then(function(fr){try{A=fr,tt.current.instance=A.editor.create(Qe.current,{value:Ce,language:z(me),theme:re,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},ge);var br=tt.current.instance,Br=E.d._menuItems,kn=Object(g.a)(Br).find(function(Tn){return Tn[0]._debugName=="EditorContext"}),Kn=kn[1],dn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],sr=function(On,Jr){var An=On._first;do{var Zn,ri,Nt=Jr.includes((Zn=An.element)===null||Zn===void 0||((ri=Zn.command)===null||ri===void 0)?void 0:ri.id);Nt&&On._remove(An)}while(An=An.next)};if(Ze(br,A),setTimeout(function(){lr(),tt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ot(dt||"educoder.txt",br.getValue())}}),br.getDomNode().addEventListener("input",function(){Be.current.autoFormat&&br.getAction("editor.action.formatDocument").run()})},500),tt.current.subscription=br.onDidChangeModelContent(function(Tn){Ne.current?clearTimeout(Ee.current):(lr(),xe(br.getValue(),Tn)),Ee.current=setTimeout(function(){Ne.current=!1},500)}),window.Monaco||O(A,z(me)),he&&(sr(Kn,dn),Qe.current.classList.add("noCopyPaste"),br.onKeyDown(function(Tn){var On=Tn.keyCode,Jr=Tn.ctrlKey,An=Tn.metaKey;(On===33||On===52)&&(An||Jr)&&(vt(),Tn.preventDefault())})),window.Monaco=A,Se&&br.onDidBlurEditorWidget(function(){Se(br.getValue())}),st&&br.onDidFocusEditorText(function(){st(br.getValue())}),he){br.addCommand(A.KeyMod.CtrlCmd|A.KeyCode.KEY_V,function(){return vt(),null}),br.onDidPaste(function(Tn){tt.current.pastePos=Tn});try{window.addEventListener("paste",Wt)}catch(Tn){}}var Jn=nt();return He(!0),function(){var Tn=tt.current.instance;Tn.dispose();var On=Tn.getModel();On&&On.dispose(),tt.current.subscription&&tt.current.subscription.dispose(),he&&window.removeEventListener("paste",Wt),Jn.unobserve(Qe.current)}}catch(Tn){}})},[]),Object(y.useEffect)(function(){var fr=tt.current.instance;if(fr&&Me)return document.addEventListener("keydown",Bt,!1),function(){document.removeEventListener("keydown",Bt)}},[ie,Me]),Object(y.useEffect)(function(){var fr=tt.current.instance;if(fr&&Me){var br=z(me);A.editor.setModelLanguage(fr.getModel(),br),console.log("language:",me,fr.getModel(),br)}},[me,Me]),Object(y.useEffect)(function(){var fr=tt.current.instance;fr&&Me&&A.editor.setTheme(re)},[re,Me]),Object(y.useEffect)(function(){var fr=tt.current.instance;Be.current=le,fr&&Me&&(fr.updateOptions(Object(M.a)({},le)),setTimeout(function(){fr.getModel().updateOptions(Object(M.a)({},le))},200))},[JSON.stringify(le),Me]),Object(y.useEffect)(function(){var fr=tt.current.instance;fr&&Me&&fr.layout()},[Z,de,Me]);var Vr=Object(y.useState)(F(Z)),Wr=Object(v.a)(Vr,2),Yr=Wr[0],bn=Wr[1],Ar=Object(y.useState)(F(de)),fn=Object(v.a)(Ar,2),cn=fn[0],Vt=fn[1],En=Object(M.a)(Object(M.a)({},be),{},{width:Yr,height:cn});return t.a.createElement("div",{className:"my-monaco-editor",ref:Qe,style:En})};function U(R){var K=R.width,Z=K===void 0?"100%":K,ue=R.height,de=ue===void 0?"100%":ue,Ce=R.original,Re=R.modified,me=R.language,Oe=R.options,be=Oe===void 0?{}:Oe,ce=Object(y.useRef)(),le=Object(y.useState)(null),ne=Object(v.a)(le,2),ge=ne[0],te=ne[1];function re(Y){var X;return ce.current&&(X=new h.default(function(he){var fe=Object(m.a)(he),xe;try{for(fe.s();!(xe=fe.n()).done;){var Ke=xe.value;(Ke.target.offsetHeight>0||Ke.target.offsetWidth>0)&&Y.layout()}}catch(Ze){fe.e(Ze)}finally{fe.f()}}),X.observe(ce.current)),X}Object(y.useEffect)(function(){ce.current&&Promise.all([D.e(15),D.e(27)]).then(D.t.bind(null,"M/lh",7)).then(function(Y){A=Y;var X=A.editor.createDiffEditor(ce.current,Object(M.a)(Object(M.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},be),{},{wordWrap:!0}));te(X);var he=re(X);return function(){X.dispose();var fe=X.getModel();fe&&fe.dispose(),he.unobserve(ce.current)}})},[]),Object(y.useEffect)(function(){ge&&ge.setModel({original:A.editor.createModel(Ce,me),modified:A.editor.createModel(Re,me)})},[Ce,Re,me,ge]);var Se=F(Z),ie=F(de),q={width:Se,height:ie};return t.a.createElement("div",{className:"my-diff-editor",ref:ce,style:q})}},ZpRC:function(H,J,D){"use strict";function M(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function g(i,c){return(!c||i!=="hidden")&&i!=="visible"&&i!=="clip"}function C(i,c){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var a=getComputedStyle(i,null);return g(a.overflowY,c)||g(a.overflowX,c)||function(n){var s=function(d){if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(f){return null}}(n);return!!s&&(s.clientHeight<n.scrollHeight||s.clientWidth<n.scrollWidth)}(i)}return!1}function N(i,c,a,n,s,d,f,l){return d<i&&f>c||d>i&&f<c?0:d<=i&&l<=a||f>=c&&l>=a?d-i-n:f>c&&l<a||d<i&&l>a?f-c+s:0}var m=function(i,c){var a=window,n=c.scrollMode,s=c.block,d=c.inline,f=c.boundary,l=c.skipOverflowHiddenElements,o=typeof f=="function"?f:function(Y){return Y!==f};if(!M(i))throw new TypeError("Invalid target");for(var r=document.scrollingElement||document.documentElement,x=[],b=i;M(b)&&o(b);){if((b=b.parentElement)===r){x.push(b);break}b!=null&&b===document.body&&C(b)&&!C(document.documentElement)||b!=null&&C(b,l)&&x.push(b)}for(var p=a.visualViewport?a.visualViewport.width:innerWidth,I=a.visualViewport?a.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,_=window.scrollY||pageYOffset,E=i.getBoundingClientRect(),w=E.height,S=E.width,F=E.top,P=E.right,L=E.bottom,G=E.left,z=s==="start"||s==="nearest"?F:s==="end"?L:F+w/2,A=d==="center"?G+S/2:d==="end"?P:G,B=[],U=0;U<x.length;U++){var R=x[U],K=R.getBoundingClientRect(),Z=K.height,ue=K.width,de=K.top,Ce=K.right,Re=K.bottom,me=K.left;if(n==="if-needed"&&F>=0&&G>=0&&L<=I&&P<=p&&F>=de&&L<=Re&&G>=me&&P<=Ce)return B;var Oe=getComputedStyle(R),be=parseInt(Oe.borderLeftWidth,10),ce=parseInt(Oe.borderTopWidth,10),le=parseInt(Oe.borderRightWidth,10),ne=parseInt(Oe.borderBottomWidth,10),ge=0,te=0,re="offsetWidth"in R?R.offsetWidth-R.clientWidth-be-le:0,Se="offsetHeight"in R?R.offsetHeight-R.clientHeight-ce-ne:0;if(r===R)ge=s==="start"?z:s==="end"?z-I:s==="nearest"?N(_,_+I,I,ce,ne,_+z,_+z+w,w):z-I/2,te=d==="start"?A:d==="center"?A-p/2:d==="end"?A-p:N(O,O+p,p,be,le,O+A,O+A+S,S),ge=Math.max(0,ge+_),te=Math.max(0,te+O);else{ge=s==="start"?z-de-ce:s==="end"?z-Re+ne+Se:s==="nearest"?N(de,Re,Z,ce,ne+Se,z,z+w,w):z-(de+Z/2)+Se/2,te=d==="start"?A-me-be:d==="center"?A-(me+ue/2)+re/2:d==="end"?A-Ce+le+re:N(me,Ce,ue,be,le+re,A,A+S,S);var ie=R.scrollLeft,q=R.scrollTop;z+=q-(ge=Math.max(0,Math.min(q+ge,R.scrollHeight-Z+Se))),A+=ie-(te=Math.max(0,Math.min(ie+te,R.scrollWidth-ue+re)))}B.push({el:R,top:ge,left:te})}return B};function v(i){return i===Object(i)&&Object.keys(i).length!==0}function T(i,c){c===void 0&&(c="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(n){var s=n.el,d=n.top,f=n.left;s.scroll&&a?s.scroll({top:d,left:f,behavior:c}):(s.scrollTop=d,s.scrollLeft=f)})}function y(i){return i===!1?{block:"end",inline:"nearest"}:v(i)?i:{block:"start",inline:"nearest"}}function t(i,c){var a=!i.ownerDocument.documentElement.contains(i);if(v(c)&&typeof c.behavior=="function")return c.behavior(a?[]:m(i,c));if(a)return;var n=y(c);return T(m(i,n),n.behavior)}var h=J.a=t},Zss7:function(H,J,D){var M;(function(g){var C=/^\s+/,N=/\s+$/,m=0,v=g.round,T=g.min,y=g.max,t=g.random;function h(ne,ge){if(ne=ne||"",ge=ge||{},ne instanceof h)return ne;if(!(this instanceof h))return new h(ne,ge);var te=i(ne);this._originalInput=ne,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=v(100*this._a)/100,this._format=ge.format||te.format,this._gradientType=ge.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=te.ok,this._tc_id=m++}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 ne=this.toRgb();return(ne.r*299+ne.g*587+ne.b*114)/1e3},getLuminance:function(){var ne=this.toRgb(),ge,te,re,Se,ie,q;return ge=ne.r/255,te=ne.g/255,re=ne.b/255,ge<=.03928?Se=ge/12.92:Se=g.pow((ge+.055)/1.055,2.4),te<=.03928?ie=te/12.92:ie=g.pow((te+.055)/1.055,2.4),re<=.03928?q=re/12.92:q=g.pow((re+.055)/1.055,2.4),.2126*Se+.7152*ie+.0722*q},setAlpha:function(ne){return this._a=B(ne),this._roundA=v(100*this._a)/100,this},toHsv:function(){var ne=s(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,v:ne.v,a:this._a}},toHsvString:function(){var ne=s(this._r,this._g,this._b),ge=v(ne.h*360),te=v(ne.s*100),re=v(ne.v*100);return this._a==1?"hsv("+ge+", "+te+"%, "+re+"%)":"hsva("+ge+", "+te+"%, "+re+"%, "+this._roundA+")"},toHsl:function(){var ne=a(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,l:ne.l,a:this._a}},toHslString:function(){var ne=a(this._r,this._g,this._b),ge=v(ne.h*360),te=v(ne.s*100),re=v(ne.l*100);return this._a==1?"hsl("+ge+", "+te+"%, "+re+"%)":"hsla("+ge+", "+te+"%, "+re+"%, "+this._roundA+")"},toHex:function(ne){return f(this._r,this._g,this._b,ne)},toHexString:function(ne){return"#"+this.toHex(ne)},toHex8:function(ne){return l(this._r,this._g,this._b,this._a,ne)},toHex8String:function(ne){return"#"+this.toHex8(ne)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(U(this._r,255)*100)+"%",g:v(U(this._g,255)*100)+"%",b:v(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%)":"rgba("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(ne){var ge="#"+o(this._r,this._g,this._b,this._a),te=ge,re=this._gradientType?"GradientType = 1, ":"";if(ne){var Se=h(ne);te="#"+o(Se._r,Se._g,Se._b,Se._a)}return"progid:DXImageTransform.Microsoft.gradient("+re+"startColorstr="+ge+",endColorstr="+te+")"},toString:function(ne){var ge=!!ne;ne=ne||this._format;var te=!1,re=this._a<1&&this._a>=0,Se=!ge&&re&&(ne==="hex"||ne==="hex6"||ne==="hex3"||ne==="hex4"||ne==="hex8"||ne==="name");return Se?ne==="name"&&this._a===0?this.toName():this.toRgbString():(ne==="rgb"&&(te=this.toRgbString()),ne==="prgb"&&(te=this.toPercentageRgbString()),(ne==="hex"||ne==="hex6")&&(te=this.toHexString()),ne==="hex3"&&(te=this.toHexString(!0)),ne==="hex4"&&(te=this.toHex8String(!0)),ne==="hex8"&&(te=this.toHex8String()),ne==="name"&&(te=this.toName()),ne==="hsl"&&(te=this.toHslString()),ne==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(ne,ge){var te=ne.apply(null,[this].concat([].slice.call(ge)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(I,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(r,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(ne,ge){return ne.apply(null,[this].concat([].slice.call(ge)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(ne,ge){if(typeof ne=="object"){var te={};for(var re in ne)ne.hasOwnProperty(re)&&(re==="a"?te[re]=ne[re]:te[re]=Ce(ne[re]));ne=te}return h(ne,ge)};function i(ne){var ge={r:0,g:0,b:0},te=1,re=null,Se=null,ie=null,q=!1,Y=!1;return typeof ne=="string"&&(ne=ce(ne)),typeof ne=="object"&&(be(ne.r)&&be(ne.g)&&be(ne.b)?(ge=c(ne.r,ne.g,ne.b),q=!0,Y=String(ne.r).substr(-1)==="%"?"prgb":"rgb"):be(ne.h)&&be(ne.s)&&be(ne.v)?(re=Ce(ne.s),Se=Ce(ne.v),ge=d(ne.h,re,Se),q=!0,Y="hsv"):be(ne.h)&&be(ne.s)&&be(ne.l)&&(re=Ce(ne.s),ie=Ce(ne.l),ge=n(ne.h,re,ie),q=!0,Y="hsl"),ne.hasOwnProperty("a")&&(te=ne.a)),te=B(te),{ok:q,format:ne.format||Y,r:T(255,y(ge.r,0)),g:T(255,y(ge.g,0)),b:T(255,y(ge.b,0)),a:te}}function c(ne,ge,te){return{r:U(ne,255)*255,g:U(ge,255)*255,b:U(te,255)*255}}function a(ne,ge,te){ne=U(ne,255),ge=U(ge,255),te=U(te,255);var re=y(ne,ge,te),Se=T(ne,ge,te),ie,q,Y=(re+Se)/2;if(re==Se)ie=q=0;else{var X=re-Se;q=Y>.5?X/(2-re-Se):X/(re+Se);switch(re){case ne:ie=(ge-te)/X+(ge<te?6:0);break;case ge:ie=(te-ne)/X+2;break;case te:ie=(ne-ge)/X+4;break}ie/=6}return{h:ie,s:q,l:Y}}function n(ne,ge,te){var re,Se,ie;ne=U(ne,360),ge=U(ge,100),te=U(te,100);function q(he,fe,xe){return xe<0&&(xe+=1),xe>1&&(xe-=1),xe<1/6?he+(fe-he)*6*xe:xe<1/2?fe:xe<2/3?he+(fe-he)*(2/3-xe)*6:he}if(ge===0)re=Se=ie=te;else{var Y=te<.5?te*(1+ge):te+ge-te*ge,X=2*te-Y;re=q(X,Y,ne+1/3),Se=q(X,Y,ne),ie=q(X,Y,ne-1/3)}return{r:re*255,g:Se*255,b:ie*255}}function s(ne,ge,te){ne=U(ne,255),ge=U(ge,255),te=U(te,255);var re=y(ne,ge,te),Se=T(ne,ge,te),ie,q,Y=re,X=re-Se;if(q=re===0?0:X/re,re==Se)ie=0;else{switch(re){case ne:ie=(ge-te)/X+(ge<te?6:0);break;case ge:ie=(te-ne)/X+2;break;case te:ie=(ne-ge)/X+4;break}ie/=6}return{h:ie,s:q,v:Y}}function d(ne,ge,te){ne=U(ne,360)*6,ge=U(ge,100),te=U(te,100);var re=g.floor(ne),Se=ne-re,ie=te*(1-ge),q=te*(1-Se*ge),Y=te*(1-(1-Se)*ge),X=re%6,he=[te,q,ie,ie,Y,te][X],fe=[Y,te,te,q,ie,ie][X],xe=[ie,ie,Y,te,te,q][X];return{r:he*255,g:fe*255,b:xe*255}}function f(ne,ge,te,re){var Se=[de(v(ne).toString(16)),de(v(ge).toString(16)),de(v(te).toString(16))];return re&&Se[0].charAt(0)==Se[0].charAt(1)&&Se[1].charAt(0)==Se[1].charAt(1)&&Se[2].charAt(0)==Se[2].charAt(1)?Se[0].charAt(0)+Se[1].charAt(0)+Se[2].charAt(0):Se.join("")}function l(ne,ge,te,re,Se){var ie=[de(v(ne).toString(16)),de(v(ge).toString(16)),de(v(te).toString(16)),de(Re(re))];return Se&&ie[0].charAt(0)==ie[0].charAt(1)&&ie[1].charAt(0)==ie[1].charAt(1)&&ie[2].charAt(0)==ie[2].charAt(1)&&ie[3].charAt(0)==ie[3].charAt(1)?ie[0].charAt(0)+ie[1].charAt(0)+ie[2].charAt(0)+ie[3].charAt(0):ie.join("")}function o(ne,ge,te,re){var Se=[de(Re(re)),de(v(ne).toString(16)),de(v(ge).toString(16)),de(v(te).toString(16))];return Se.join("")}h.equals=function(ne,ge){return!ne||!ge?!1:h(ne).toRgbString()==h(ge).toRgbString()},h.random=function(){return h.fromRatio({r:t(),g:t(),b:t()})};function r(ne,ge){ge=ge===0?0:ge||10;var te=h(ne).toHsl();return te.s-=ge/100,te.s=R(te.s),h(te)}function x(ne,ge){ge=ge===0?0:ge||10;var te=h(ne).toHsl();return te.s+=ge/100,te.s=R(te.s),h(te)}function b(ne){return h(ne).desaturate(100)}function p(ne,ge){ge=ge===0?0:ge||10;var te=h(ne).toHsl();return te.l+=ge/100,te.l=R(te.l),h(te)}function I(ne,ge){ge=ge===0?0:ge||10;var te=h(ne).toRgb();return te.r=y(0,T(255,te.r-v(255*-(ge/100)))),te.g=y(0,T(255,te.g-v(255*-(ge/100)))),te.b=y(0,T(255,te.b-v(255*-(ge/100)))),h(te)}function O(ne,ge){ge=ge===0?0:ge||10;var te=h(ne).toHsl();return te.l-=ge/100,te.l=R(te.l),h(te)}function _(ne,ge){var te=h(ne).toHsl(),re=(te.h+ge)%360;return te.h=re<0?360+re:re,h(te)}function E(ne){var ge=h(ne).toHsl();return ge.h=(ge.h+180)%360,h(ge)}function w(ne){var ge=h(ne).toHsl(),te=ge.h;return[h(ne),h({h:(te+120)%360,s:ge.s,l:ge.l}),h({h:(te+240)%360,s:ge.s,l:ge.l})]}function S(ne){var ge=h(ne).toHsl(),te=ge.h;return[h(ne),h({h:(te+90)%360,s:ge.s,l:ge.l}),h({h:(te+180)%360,s:ge.s,l:ge.l}),h({h:(te+270)%360,s:ge.s,l:ge.l})]}function F(ne){var ge=h(ne).toHsl(),te=ge.h;return[h(ne),h({h:(te+72)%360,s:ge.s,l:ge.l}),h({h:(te+216)%360,s:ge.s,l:ge.l})]}function P(ne,ge,te){ge=ge||6,te=te||30;var re=h(ne).toHsl(),Se=360/te,ie=[h(ne)];for(re.h=(re.h-(Se*ge>>1)+720)%360;--ge;)re.h=(re.h+Se)%360,ie.push(h(re));return ie}function L(ne,ge){ge=ge||6;for(var te=h(ne).toHsv(),re=te.h,Se=te.s,ie=te.v,q=[],Y=1/ge;ge--;)q.push(h({h:re,s:Se,v:ie})),ie=(ie+Y)%1;return q}h.mix=function(ne,ge,te){te=te===0?0:te||50;var re=h(ne).toRgb(),Se=h(ge).toRgb(),ie=te/100,q={r:(Se.r-re.r)*ie+re.r,g:(Se.g-re.g)*ie+re.g,b:(Se.b-re.b)*ie+re.b,a:(Se.a-re.a)*ie+re.a};return h(q)},h.readability=function(ne,ge){var te=h(ne),re=h(ge);return(g.max(te.getLuminance(),re.getLuminance())+.05)/(g.min(te.getLuminance(),re.getLuminance())+.05)},h.isReadable=function(ne,ge,te){var re=h.readability(ne,ge),Se,ie;ie=!1,Se=le(te);switch(Se.level+Se.size){case"AAsmall":case"AAAlarge":ie=re>=4.5;break;case"AAlarge":ie=re>=3;break;case"AAAsmall":ie=re>=7;break}return ie},h.mostReadable=function(ne,ge,te){var re=null,Se=0,ie,q,Y,X;te=te||{},q=te.includeFallbackColors,Y=te.level,X=te.size;for(var he=0;he<ge.length;he++)ie=h.readability(ne,ge[he]),ie>Se&&(Se=ie,re=h(ge[he]));return h.isReadable(ne,re,{level:Y,size:X})||!q?re:(te.includeFallbackColors=!1,h.mostReadable(ne,["#fff","#000"],te))};var G=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=A(G);function A(ne){var ge={};for(var te in ne)ne.hasOwnProperty(te)&&(ge[ne[te]]=te);return ge}function B(ne){return ne=parseFloat(ne),(isNaN(ne)||ne<0||ne>1)&&(ne=1),ne}function U(ne,ge){Z(ne)&&(ne="100%");var te=ue(ne);return ne=T(ge,y(0,parseFloat(ne))),te&&(ne=parseInt(ne*ge,10)/100),g.abs(ne-ge)<1e-6?1:ne%ge/parseFloat(ge)}function R(ne){return T(1,y(0,ne))}function K(ne){return parseInt(ne,16)}function Z(ne){return typeof ne=="string"&&ne.indexOf(".")!=-1&&parseFloat(ne)===1}function ue(ne){return typeof ne=="string"&&ne.indexOf("%")!=-1}function de(ne){return ne.length==1?"0"+ne:""+ne}function Ce(ne){return ne<=1&&(ne=ne*100+"%"),ne}function Re(ne){return g.round(parseFloat(ne)*255).toString(16)}function me(ne){return K(ne)/255}var Oe=function(){var ne="[-\\+]?\\d+%?",ge="[-\\+]?\\d*\\.\\d+%?",te="(?:"+ge+")|(?:"+ne+")",re="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",Se="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),rgb:new RegExp("rgb"+re),rgba:new RegExp("rgba"+Se),hsl:new RegExp("hsl"+re),hsla:new RegExp("hsla"+Se),hsv:new RegExp("hsv"+re),hsva:new RegExp("hsva"+Se),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function be(ne){return!!Oe.CSS_UNIT.exec(ne)}function ce(ne){ne=ne.replace(C,"").replace(N,"").toLowerCase();var ge=!1;if(G[ne])ne=G[ne],ge=!0;else if(ne=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var te;return(te=Oe.rgb.exec(ne))?{r:te[1],g:te[2],b:te[3]}:(te=Oe.rgba.exec(ne))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Oe.hsl.exec(ne))?{h:te[1],s:te[2],l:te[3]}:(te=Oe.hsla.exec(ne))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Oe.hsv.exec(ne))?{h:te[1],s:te[2],v:te[3]}:(te=Oe.hsva.exec(ne))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Oe.hex8.exec(ne))?{r:K(te[1]),g:K(te[2]),b:K(te[3]),a:me(te[4]),format:ge?"name":"hex8"}:(te=Oe.hex6.exec(ne))?{r:K(te[1]),g:K(te[2]),b:K(te[3]),format:ge?"name":"hex"}:(te=Oe.hex4.exec(ne))?{r:K(te[1]+""+te[1]),g:K(te[2]+""+te[2]),b:K(te[3]+""+te[3]),a:me(te[4]+""+te[4]),format:ge?"name":"hex8"}:(te=Oe.hex3.exec(ne))?{r:K(te[1]+""+te[1]),g:K(te[2]+""+te[2]),b:K(te[3]+""+te[3]),format:ge?"name":"hex"}:!1}function le(ne){var ge,te;return ne=ne||{level:"AA",size:"small"},ge=(ne.level||"AA").toUpperCase(),te=(ne.size||"small").toLowerCase(),ge!=="AA"&&ge!=="AAA"&&(ge="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:ge,size:te}}H.exports?H.exports=h:!(M=function(){return h}.call(J,D,J,H),M!==void 0&&(H.exports=M))})(Math)},bQjk:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return function(g){var C=M,N=C.lib,m=N.CipherParams,v=C.enc,T=v.Hex,y=C.format,t=y.Hex={stringify:function(h){return h.ciphertext.toString(T)},parse:function(h){var i=T.parse(h);return m.create({ciphertext:i})}}}(),M.format.Hex})},bT9E:function(H,J,D){"use strict";D.d(J,"a",function(){return g});var M=D("VTBJ");function g(C,N){var m=Object(M.a)({},C);return Array.isArray(N)&&N.forEach(function(v){delete m[v]}),m}},biw7:function(H,J,D){"use strict";var M=D("q1tI"),g=D.n(M),C=M.createContext(null);J.a=C},c5Ni:function(H,J,D){},cv67:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(g){var C=M,N=C.lib,m=N.WordArray,v=N.Hasher,T=C.algo,y=[];(function(){for(var n=0;n<64;n++)y[n]=g.abs(g.sin(n+1))*4294967296|0})();var t=T.MD5=v.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,s){for(var d=0;d<16;d++){var f=s+d,l=n[f];n[f]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var o=this._hash.words,r=n[s+0],x=n[s+1],b=n[s+2],p=n[s+3],I=n[s+4],O=n[s+5],_=n[s+6],E=n[s+7],w=n[s+8],S=n[s+9],F=n[s+10],P=n[s+11],L=n[s+12],G=n[s+13],z=n[s+14],A=n[s+15],B=o[0],U=o[1],R=o[2],K=o[3];B=h(B,U,R,K,r,7,y[0]),K=h(K,B,U,R,x,12,y[1]),R=h(R,K,B,U,b,17,y[2]),U=h(U,R,K,B,p,22,y[3]),B=h(B,U,R,K,I,7,y[4]),K=h(K,B,U,R,O,12,y[5]),R=h(R,K,B,U,_,17,y[6]),U=h(U,R,K,B,E,22,y[7]),B=h(B,U,R,K,w,7,y[8]),K=h(K,B,U,R,S,12,y[9]),R=h(R,K,B,U,F,17,y[10]),U=h(U,R,K,B,P,22,y[11]),B=h(B,U,R,K,L,7,y[12]),K=h(K,B,U,R,G,12,y[13]),R=h(R,K,B,U,z,17,y[14]),U=h(U,R,K,B,A,22,y[15]),B=i(B,U,R,K,x,5,y[16]),K=i(K,B,U,R,_,9,y[17]),R=i(R,K,B,U,P,14,y[18]),U=i(U,R,K,B,r,20,y[19]),B=i(B,U,R,K,O,5,y[20]),K=i(K,B,U,R,F,9,y[21]),R=i(R,K,B,U,A,14,y[22]),U=i(U,R,K,B,I,20,y[23]),B=i(B,U,R,K,S,5,y[24]),K=i(K,B,U,R,z,9,y[25]),R=i(R,K,B,U,p,14,y[26]),U=i(U,R,K,B,w,20,y[27]),B=i(B,U,R,K,G,5,y[28]),K=i(K,B,U,R,b,9,y[29]),R=i(R,K,B,U,E,14,y[30]),U=i(U,R,K,B,L,20,y[31]),B=c(B,U,R,K,O,4,y[32]),K=c(K,B,U,R,w,11,y[33]),R=c(R,K,B,U,P,16,y[34]),U=c(U,R,K,B,z,23,y[35]),B=c(B,U,R,K,x,4,y[36]),K=c(K,B,U,R,I,11,y[37]),R=c(R,K,B,U,E,16,y[38]),U=c(U,R,K,B,F,23,y[39]),B=c(B,U,R,K,G,4,y[40]),K=c(K,B,U,R,r,11,y[41]),R=c(R,K,B,U,p,16,y[42]),U=c(U,R,K,B,_,23,y[43]),B=c(B,U,R,K,S,4,y[44]),K=c(K,B,U,R,L,11,y[45]),R=c(R,K,B,U,A,16,y[46]),U=c(U,R,K,B,b,23,y[47]),B=a(B,U,R,K,r,6,y[48]),K=a(K,B,U,R,E,10,y[49]),R=a(R,K,B,U,z,15,y[50]),U=a(U,R,K,B,O,21,y[51]),B=a(B,U,R,K,L,6,y[52]),K=a(K,B,U,R,p,10,y[53]),R=a(R,K,B,U,F,15,y[54]),U=a(U,R,K,B,x,21,y[55]),B=a(B,U,R,K,w,6,y[56]),K=a(K,B,U,R,A,10,y[57]),R=a(R,K,B,U,_,15,y[58]),U=a(U,R,K,B,G,21,y[59]),B=a(B,U,R,K,I,6,y[60]),K=a(K,B,U,R,P,10,y[61]),R=a(R,K,B,U,b,15,y[62]),U=a(U,R,K,B,S,21,y[63]),o[0]=o[0]+B|0,o[1]=o[1]+U|0,o[2]=o[2]+R|0,o[3]=o[3]+K|0},_doFinalize:function(){var n=this._data,s=n.words,d=this._nDataBytes*8,f=n.sigBytes*8;s[f>>>5]|=128<<24-f%32;var l=g.floor(d/4294967296),o=d;s[(f+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,s[(f+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,n.sigBytes=(s.length+1)*4,this._process();for(var r=this._hash,x=r.words,b=0;b<4;b++){var p=x[b];x[b]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return r},clone:function(){var n=v.clone.call(this);return n._hash=this._hash.clone(),n}});function h(n,s,d,f,l,o,r){var x=n+(s&d|~s&f)+l+r;return(x<<o|x>>>32-o)+s}function i(n,s,d,f,l,o,r){var x=n+(s&f|d&~f)+l+r;return(x<<o|x>>>32-o)+s}function c(n,s,d,f,l,o,r){var x=n+(s^d^f)+l+r;return(x<<o|x>>>32-o)+s}function a(n,s,d,f,l,o,r){var x=n+(d^(s|~f))+l+r;return(x<<o|x>>>32-o)+s}C.MD5=v._createHelper(t),C.HmacMD5=v._createHmacHelper(t)}(Math),M.MD5})},dejd:function(H,J,D){},dmUQ:function(H,J,D){"use strict";var M=D("Ff2n"),g=D("rePB"),C=D("1OyB"),N=D("vuIU"),m=D("Ji7U"),v=D("md7G"),T=D("foSv"),y=D("q1tI"),t=D.n(y),h=D("TSYQ"),i=D.n(h),c=D("4IlW");function a(w,S){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);S&&(P=P.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),F.push.apply(F,P)}return F}function n(w){for(var S=1;S<arguments.length;S++){var F=arguments[S]!=null?arguments[S]:{};S%2?a(Object(F),!0).forEach(function(P){Object(g.a)(w,P,F[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):a(Object(F)).forEach(function(P){Object.defineProperty(w,P,Object.getOwnPropertyDescriptor(F,P))})}return w}function s(w){var S=d();return function(){var P=Object(T.a)(w),L;if(S){var G=Object(T.a)(this).constructor;L=Reflect.construct(P,arguments,G)}else L=P.apply(this,arguments);return Object(v.a)(this,L)}}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}function f(){}function l(w){w.preventDefault()}var o=function(S){return S.replace(/[^\w.-]+/g,"")},r=200,x=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(S){return S!=null},I=function(S,F){return F===S||typeof F=="number"&&typeof S=="number"&&isNaN(F)&&isNaN(S)},O=function(w){Object(m.a)(F,w);var S=s(F);function F(P){var L;Object(C.a)(this,F),L=S.call(this,P),L.onKeyDown=function(A){var B=L.props,U=B.onKeyDown,R=B.onPressEnter;if(A.keyCode===c.a.UP){var K=L.getRatio(A);L.up(A,K,null),L.stop()}else if(A.keyCode===c.a.DOWN){var Z=L.getRatio(A);L.down(A,Z,null),L.stop()}else A.keyCode===c.a.ENTER&&R&&R(A);if(L.recordCursorPosition(),L.lastKeyCode=A.keyCode,U){for(var ue=arguments.length,de=new Array(ue>1?ue-1:0),Ce=1;Ce<ue;Ce++)de[Ce-1]=arguments[Ce];U.apply(void 0,[A].concat(de))}},L.onKeyUp=function(A){var B=L.props.onKeyUp;if(L.stop(),L.recordCursorPosition(),B){for(var U=arguments.length,R=new Array(U>1?U-1:0),K=1;K<U;K++)R[K-1]=arguments[K];B.apply(void 0,[A].concat(R))}},L.onChange=function(A){var B=L.props.onChange;L.state.focused&&(L.inputting=!0),L.rawInput=L.props.parser(L.getValueFromEvent(A)),L.setState({inputValue:L.rawInput}),B(L.toNumber(L.rawInput))},L.onMouseUp=function(){var A=L.props.onMouseUp;L.recordCursorPosition(),A&&A.apply(void 0,arguments)},L.onFocus=function(){var A;L.setState({focused:!0}),(A=L.props).onFocus.apply(A,arguments)},L.onBlur=function(){var A=L.props.onBlur;L.inputting=!1,L.setState({focused:!1});var B=L.getCurrentValidValue(L.state.inputValue),U=L.setValue(B,f);if(A){var R=L.input.value,K=L.getInputDisplayValue({focus:!1,value:U});L.input.value=K&&Number(K),A.apply(void 0,arguments),L.input.value=R}},L.getRatio=function(A){var B=1;return A.metaKey||A.ctrlKey?B=.1:A.shiftKey&&(B=10),B},L.getFullNum=function(A){return isNaN(A)?A:/e/i.test(String(A))?Number(A).toFixed(18).replace(/\.?0+$/,""):A},L.getPrecision=function(A){if(p(L.props.precision))return L.props.precision;var B=String(A);if(B.indexOf("e-")>=0)return parseInt(B.slice(B.indexOf("e-")+2),10);var U=0;return B.indexOf(".")>=0&&(U=B.length-B.indexOf(".")-1),U},L.getInputDisplayValue=function(A){var B=A||L.state,U=B.focused,R=B.inputValue,K=B.value,Z;U?Z=R:Z=L.toPrecisionAsStep(K),Z==null&&(Z="");var ue=L.formatWrapper(Z);return p(L.props.decimalSeparator)&&(ue=ue.toString().replace(".",L.props.decimalSeparator)),ue},L.recordCursorPosition=function(){try{L.cursorStart=L.input.selectionStart,L.cursorEnd=L.input.selectionEnd,L.currentValue=L.input.value,L.cursorBefore=L.input.value.substring(0,L.cursorStart),L.cursorAfter=L.input.value.substring(L.cursorEnd)}catch(A){}},L.restoreByAfter=function(A){if(A===void 0)return!1;var B=L.input.value,U=B.lastIndexOf(A);if(U===-1)return!1;var R=L.cursorBefore.length;return L.lastKeyCode===c.a.DELETE&&L.cursorBefore.charAt(R-1)===A[0]?(L.fixCaret(R,R),!0):U+A.length===B.length?(L.fixCaret(U,U),!0):!1},L.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(B,U){var R=A.substring(U);return L.restoreByAfter(R)})},L.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(A,B,U){L.pressingUpOrDown=!0,L.step("down",A,B,U)},L.up=function(A,B,U){L.pressingUpOrDown=!0,L.step("up",A,B,U)},L.saveInput=function(A){L.input=A};var G=P.value;G===void 0&&(G=P.defaultValue),L.state={focused:P.autoFocus};var z=L.getValidValue(L.toNumber(G));return L.state=n(n({},L.state),{},{inputValue:L.toPrecisionAsStep(z),value:z}),L}return Object(N.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var G=this.props,z=G.value,A=G.onChange,B=G.max,U=G.min,R=this.state.focused;if(L){if(!I(L.value,z)||!I(L.max,B)||!I(L.min,U)){var K=R?z:this.getValidValue(z),Z;this.pressingUpOrDown?Z=K:this.inputting?Z=this.rawInput:Z=this.toPrecisionAsStep(K),this.setState({value:K,inputValue:Z})}var ue="value"in this.props?z:this.state.value;"max"in this.props&&L.max!==B&&typeof ue=="number"&&ue>B&&A&&A(B),"min"in this.props&&L.min!==U&&typeof ue=="number"&&ue<U&&A&&A(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case c.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case c.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ce){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(L){var G=L;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(L){var G=L.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(L);return isNaN(A)?L:(A<G&&(A=G),A>z&&(A=z),A)}},{key:"setValue",value:function(L,G){var z=this.props.precision,A=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),B=this.state.value,U=B===void 0?null:B,R=this.state.inputValue,K=R===void 0?null:R,Z=typeof A=="number"?A.toFixed(z):"".concat(A),ue=A!==U||Z!=="".concat(K);return"value"in this.props?(K=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:K},G)):this.setState({value:A,inputValue:this.toPrecisionAsStep(L)},G),ue&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,A=z.precision,B=z.step;if(p(A))return A;var U=this.getPrecision(G),R=this.getPrecision(B),K=this.getPrecision(L);return L?Math.max(K,U+R):U+R}},{key:"getPrecisionFactor",value:function(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(L,G);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(L){return this.props.formatter?this.props.formatter(L):L}},{key:"toPrecisionAsStep",value:function(L){if(this.isNotCompleteNumber(L)||L==="")return L;var G=Math.abs(this.getMaxPrecision(L));return isNaN(G)?L.toString():Number(L).toFixed(G)}},{key:"toNumber",value:function(L){var G=this.props.precision,z=this.state.focused,A=L&&L.length>16&&z;return this.isNotCompleteNumber(L)||A?L:p(G)?Math.round(L*Math.pow(10,G))/Math.pow(10,G):Number(L)}},{key:"upStep",value:function(L,G){var z=this.props.step,A=this.getPrecisionFactor(L,G),B=Math.abs(this.getMaxPrecision(L,G)),U=((A*L+A*z*G)/A).toFixed(B);return this.toNumber(U)}},{key:"downStep",value:function(L,G){var z=this.props.step,A=this.getPrecisionFactor(L,G),B=Math.abs(this.getMaxPrecision(L,G)),U=((A*L-A*z*G)/A).toFixed(B);return this.toNumber(U)}},{key:"step",value:function(L,G){var z=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var R=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(R))return;var K=this["".concat(L,"Step")](R,A),Z=K>U.max||K<U.min;if(K>U.max?K=U.max:K<U.min&&(K=U.min),this.setValue(K,null),this.setState({focused:!0},function(){z.pressingUpOrDown=!1}),Z)return;this.autoStepTimer=setTimeout(function(){z[L](G,A,!0)},B?r:x)}},{key:"fixCaret",value:function(L,G){if(L===void 0||G===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,A=this.input.selectionEnd;(L!==z||G!==A)&&this.input.setSelectionRange(L,G)}catch(B){}}},{key:"render",value:function(){var L,G=this.props,z=G.prefixCls,A=G.disabled,B=G.readOnly,U=G.useTouch,R=G.autoComplete,K=G.upHandler,Z=G.downHandler,ue=G.className,de=G.max,Ce=G.min,Re=G.style,me=G.title,Oe=G.onMouseEnter,be=G.onMouseLeave,ce=G.onMouseOver,le=G.onMouseOut,ne=G.required,ge=G.onClick,te=G.tabIndex,re=G.type,Se=G.placeholder,ie=G.id,q=G.inputMode,Y=G.pattern,X=G.step,he=G.maxLength,fe=G.autoFocus,xe=G.name,Ke=G.onPaste,Ze=G.onInput,et=Object(M.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),st=this.state,ut=st.value,dt=st.focused,Fe=i()(z,(L={},Object(g.a)(L,ue,!!ue),Object(g.a)(L,"".concat(z,"-disabled"),A),Object(g.a)(L,"".concat(z,"-focused"),dt),L)),Ie={};Object.keys(et).forEach(function(Me){(Me.substr(0,5)==="data-"||Me.substr(0,5)==="aria-"||Me==="role")&&(Ie[Me]=et[Me])});var ot=!B&&!A,ft=this.getInputDisplayValue(null),Qe=(ut||ut===0)&&(isNaN(ut)||Number(ut)>=de),tt=(ut||ut===0)&&(isNaN(ut)||Number(ut)<=Ce),Be=Qe||A||B,ke=tt||A||B,Ne=i()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(g.a)({},"".concat(z,"-handler-up-disabled"),Be)),Ee=i()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(g.a)({},"".concat(z,"-handler-down-disabled"),ke)),Ae=U?{onTouchStart:Be?f:this.up,onTouchEnd:this.stop}:{onMouseDown:Be?f:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Le=U?{onTouchStart:ke?f:this.down,onTouchEnd:this.stop}:{onMouseDown:ke?f:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Fe,style:Re,title:me,onMouseEnter:Oe,onMouseLeave:be,onMouseOver:ce,onMouseOut:le,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"},Ae,{role:"button","aria-label":"Increase Value","aria-disabled":Be,className:Ne}),K||t.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:l})),t.a.createElement("span",Object.assign({unselectable:"on"},Le,{role:"button","aria-label":"Decrease Value","aria-disabled":ke,className:Ee}),Z||t.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:l}))),t.a.createElement("div",{className:"".concat(z,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ce,"aria-valuemax":de,"aria-valuenow":ut,required:ne,type:re,placeholder:Se,onPaste:Ke,onClick:ge,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:te,autoComplete:R,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ot?this.onKeyDown:f,onKeyUp:ot?this.onKeyUp:f,autoFocus:fe,maxLength:he,readOnly:B,disabled:A,max:de,min:Ce,step:X,name:xe,title:me,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ft),pattern:Y,inputMode:q,onInput:Ze},Ie))))}}]),F}(t.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:b,min:-b,step:1,style:{},onChange:f,onKeyDown:f,onPressEnter:f,onFocus:f,onBlur:f,parser:o,required:!1,autoComplete:"off"};var _=O,E=J.a=_},e7zE:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.Base,m=C.WordArray,v=g.algo,T=v.SHA1,y=v.HMAC,t=v.PBKDF2=N.extend({cfg:N.extend({keySize:128/32,hasher:T,iterations:1}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,i){for(var c=this.cfg,a=y.create(c.hasher,h),n=m.create(),s=m.create([1]),d=n.words,f=s.words,l=c.keySize,o=c.iterations;d.length<l;){var r=a.update(i).finalize(s);a.reset();for(var x=r.words,b=x.length,p=r,I=1;I<o;I++){p=a.finalize(p),a.reset();for(var O=p.words,_=0;_<b;_++)x[_]^=O[_]}n.concat(r),f[0]++}return n.sigBytes=l*4,n}});g.PBKDF2=function(h,i,c){return t.create(c).compute(h,i)}}(),M.PBKDF2})},fjLI:function(H,J,D){"use strict";D.d(J,"f",function(){return a}),D.d(J,"b",function(){return n}),D.d(J,"a",function(){return s}),D.d(J,"d",function(){return d}),D.d(J,"e",function(){return f}),D.d(J,"c",function(){return l});var M=D("8HAY"),g=D("Vhoy"),C=D("MI8n"),N=D("JYp7"),m=D("pmY6"),v=D("24hK"),T=D("nnTU"),y=D("T8No"),t=D("Cg/j"),h=D("t9D7"),i=function(o,r,x,b){var p=arguments.length,I=p<3?r:b===null?b=Object.getOwnPropertyDescriptor(r,x):b,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(o,r,x,b);else for(var _=o.length-1;_>=0;_--)(O=o[_])&&(I=(p<3?O(I):p>3?O(r,x,I):O(r,x))||I);return p>3&&I&&Object.defineProperty(r,x,I),I},c=function(o,r){return function(x,b){r(x,b,o)}};function a(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 s=Object(t.c)("menuService"),d=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new C.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:o=>o===n.CommandPalette}}addCommand(o){return this.addCommands(N.a.single(o))}addCommands(o){for(const r of o)this._commands.set(r.id,r);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(m.i)(()=>{let r=!1;for(const x of o)r=this._commands.delete(x.id)||r;r&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((r,x)=>o.set(x,r)),o}appendMenuItem(o,r){return this.appendMenuItems(N.a.single({id:o,item:r}))}appendMenuItems(o){const r=new Set,x=new v.a;for(const{id:b,item:p}of o){let I=this._menuItems.get(b);I||(I=new v.a,this._menuItems.set(b,I)),x.push(I.push(p)),r.add(b)}return this._onDidChangeMenu.fire(r),Object(m.i)(()=>{if(x.size>0){for(let b of x)b();this._onDidChangeMenu.fire(r),x.clear()}})}getMenuItems(o){let r;return this._menuItems.has(o)?r=[...this._menuItems.get(o)]:r=[],o===n.CommandPalette&&this._appendImplicitItems(r),r}_appendImplicitItems(o){const r=new Set;for(const x of o)a(x)&&(r.add(x.command.id),x.alt&&r.add(x.alt.id));this._commands.forEach((x,b)=>{r.has(b)||o.push({command:x})})}};class f extends M.e{constructor(o,r,x,b){super(`submenuitem.${o.submenu.id}`,typeof o.title=="string"?o.title:o.title.value,[],"submenu");this.item=o,this._menuService=r,this._contextKeyService=x,this._options=b}get actions(){const o=[],r=this._menuService.createMenu(this.item.submenu,this._contextKeyService),x=r.getActions(this._options);r.dispose();for(const[,b]of x)b.length>0&&(o.push(...b),o.push(new M.d));return o.length&&o.pop(),o}}let l=class o{constructor(r,x,b,p,I){var O,_;if(this._commandService=I,this.id=r.id,this.label=(b==null?void 0:b.renderShortTitle)&&r.shortTitle?typeof r.shortTitle=="string"?r.shortTitle:r.shortTitle.value:typeof r.title=="string"?r.title:r.title.value,this.tooltip=(_=typeof r.tooltip=="string"?r.tooltip:(O=r.tooltip)===null||O===void 0?void 0:O.value)!==null&&_!==void 0?_:"",this.enabled=!r.precondition||p.contextMatchesRules(r.precondition),this.checked=void 0,r.toggled){const E=r.toggled.condition?r.toggled:{condition:r.toggled};this.checked=p.contextMatchesRules(E.condition),this.checked&&E.tooltip&&(this.tooltip=typeof E.tooltip=="string"?E.tooltip:E.tooltip.value),E.title&&(this.label=typeof E.title=="string"?E.title:E.title.value)}this.item=r,this.alt=x?new o(x,void 0,b,p,I):void 0,this._options=b,h.d.isThemeIcon(r.icon)&&(this.class=g.a.asClassName(r.icon))}dispose(){}run(...r){var x,b;let p=[];return((x=this._options)===null||x===void 0?void 0:x.arg)&&(p=[...p,this._options.arg]),((b=this._options)===null||b===void 0?void 0:b.shouldForwardArgs)&&(p=[...p,...r]),this._commandService.executeCommand(this.id,...p)}};l=i([c(3,y.b),c(4,T.b)],l)},fyJ8:function(H,J,D){"use strict";var M=D("rePB"),g=D("VTBJ"),C=D("Ff2n"),N=D("U8pU"),m=D("q1tI"),v=D.n(m),T=D("TSYQ"),y=D.n(T),t=D("c+Xe"),h=D("sR1s");function i(d){return d&&Object(N.a)(d)==="object"&&!Array.isArray(d)&&!m.isValidElement(d)}function c(d){return typeof d=="string"?!0:Object(t.c)(d)}function a(d,f){var l,o=d.prefixCls,r=d.className,x=d.record,b=d.index,p=d.dataIndex,I=d.render,O=d.children,_=d.component,E=_===void 0?"td":_,w=d.colSpan,S=d.rowSpan,F=d.fixLeft,P=d.fixRight,L=d.firstFixLeft,G=d.lastFixLeft,z=d.firstFixRight,A=d.lastFixRight,B=d.appendNode,U=d.additionalProps,R=U===void 0?{}:U,K=d.ellipsis,Z=d.align,ue=d.rowType,de=d.isSticky,Ce="".concat(o,"-cell"),Re,me;if(O)me=O;else{var Oe=Object(h.b)(x,p);if(me=Oe,I){var be=I(Oe,x,b);i(be)?(me=be.children,Re=be.props):me=be}}Object(N.a)(me)==="object"&&!Array.isArray(me)&&!m.isValidElement(me)&&(me=null),K&&(G||z)&&(me=m.createElement("span",{className:"".concat(Ce,"-content")},me));var ce=Re||{},le=ce.colSpan,ne=ce.rowSpan,ge=ce.style,te=ce.className,re=Object(C.a)(ce,["colSpan","rowSpan","style","className"]),Se=le!==void 0?le:w,ie=ne!==void 0?ne:S;if(Se===0||ie===0)return null;var q={},Y=typeof F=="number",X=typeof P=="number";Y&&(q.position="sticky",q.left=F),X&&(q.position="sticky",q.right=P);var he={};Z&&(he.textAlign=Z);var fe,xe=K===!0?{showTitle:!0}:K;xe&&(xe.showTitle||ue==="header")&&(typeof me=="string"||typeof me=="number"?fe=me.toString():m.isValidElement(me)&&typeof me.props.children=="string"&&(fe=me.props.children));var Ke=Object(g.a)(Object(g.a)(Object(g.a)({title:fe},re),R),{},{colSpan:Se&&Se!==1?Se:null,rowSpan:ie&&ie!==1?ie:null,className:y()(Ce,r,(l={},Object(M.a)(l,"".concat(Ce,"-fix-left"),Y),Object(M.a)(l,"".concat(Ce,"-fix-left-first"),L),Object(M.a)(l,"".concat(Ce,"-fix-left-last"),G),Object(M.a)(l,"".concat(Ce,"-fix-right"),X),Object(M.a)(l,"".concat(Ce,"-fix-right-first"),z),Object(M.a)(l,"".concat(Ce,"-fix-right-last"),A),Object(M.a)(l,"".concat(Ce,"-ellipsis"),K),Object(M.a)(l,"".concat(Ce,"-with-append"),B),Object(M.a)(l,"".concat(Ce,"-fix-sticky"),(Y||X)&&de),l),R.className,te),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},R.style),he),q),ge),ref:c(E)?f:null});return m.createElement(E,Object.assign({},Ke),B,me)}var n=m.forwardRef(a);n.displayName="Cell";var s=m.memo(n,function(d,f){return f.shouldCellUpdate?!f.shouldCellUpdate(f.record,d.record):!1});J.a=s},gJ3r:function(H,J,D){"use strict";D.d(J,"a",function(){return M});var M=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.mode.ECB=function(){var g=M.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(C,N){this._cipher.encryptBlock(C,N)}}),g.Decryptor=g.extend({processBlock:function(C,N){this._cipher.decryptBlock(C,N)}}),g}(),M.mode.ECB})},h78n:function(H,J,D){"use strict";D.d(J,"a",function(){return L});var M=D("q1tI"),g=D.n(M),C=D("TSYQ"),N=D.n(C),m={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},v=function(A){var B=A.map(function(){return Object(M.useRef)()}),U=Object(M.useRef)();return Object(M.useEffect)(function(){var R=Date.now(),K=!1;Object.keys(B).forEach(function(Z){var ue=B[Z].current;if(!ue)return;K=!0;var de=ue.style;de.transitionDuration=".3s, .3s, .3s, .06s",U.current&&R-U.current<100&&(de.transitionDuration="0s, 0s")}),K&&(U.current=Date.now())}),[B]};function T(){return T=Object.assign||function(z){for(var A=1;A<arguments.length;A++){var B=arguments[A];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(z[U]=B[U])}return z},T.apply(this,arguments)}function y(z,A){return a(z)||c(z,A)||h(z,A)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(z,A){if(!z)return;if(typeof z=="string")return i(z,A);var B=Object.prototype.toString.call(z).slice(8,-1);if(B==="Object"&&z.constructor&&(B=z.constructor.name),B==="Map"||B==="Set")return Array.from(z);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return i(z,A)}function i(z,A){(A==null||A>z.length)&&(A=z.length);for(var B=0,U=new Array(A);B<A;B++)U[B]=z[B];return U}function c(z,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var B=[],U=!0,R=!1,K=void 0;try{for(var Z=z[Symbol.iterator](),ue;!(U=(ue=Z.next()).done)&&!(B.push(ue.value),A&&B.length===A);U=!0);}catch(de){R=!0,K=de}finally{try{!U&&Z.return!=null&&Z.return()}finally{if(R)throw K}}return B}function a(z){if(Array.isArray(z))return z}function n(z,A){if(z==null)return{};var B=s(z,A),U,R;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(z);for(R=0;R<K.length;R++){if(U=K[R],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function s(z,A){if(z==null)return{};var B={},U=Object.keys(z),R,K;for(K=0;K<U.length;K++){if(R=U[K],A.indexOf(R)>=0)continue;B[R]=z[R]}return B}var d=function(A){var B=A.className,U=A.percent,R=A.prefixCls,K=A.strokeColor,Z=A.strokeLinecap,ue=A.strokeWidth,de=A.style,Ce=A.trailColor,Re=A.trailWidth,me=A.transition,Oe=n(A,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var be=Array.isArray(U)?U:[U],ce=Array.isArray(K)?K:[K],le=v(be),ne=y(le,1),ge=ne[0],te=ue/2,re=100-ue/2,Se="M ".concat(Z==="round"?te:0,",").concat(te,`
L `).concat(Z==="round"?re:100,",").concat(te),ie="0 0 100 ".concat(ue),q=0;return g.a.createElement("svg",T({className:N()("".concat(R,"-line"),B),viewBox:ie,preserveAspectRatio:"none",style:de},Oe),g.a.createElement("path",{className:"".concat(R,"-line-trail"),d:Se,strokeLinecap:Z,stroke:Ce,strokeWidth:Re||ue,fillOpacity:"0"}),be.map(function(Y,X){var he={strokeDasharray:"".concat(Y,"px, 100px"),strokeDashoffset:"-".concat(q,"px"),transition:me||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=ce[X]||ce[ce.length-1];return q+=Y,g.a.createElement("path",{key:X,className:"".concat(R,"-line-path"),d:Se,strokeLinecap:Z,stroke:fe,strokeWidth:ue,fillOpacity:"0",ref:ge[X],style:he})}))};d.defaultProps=m;var f=d;function l(){return l=Object.assign||function(z){for(var A=1;A<arguments.length;A++){var B=arguments[A];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(z[U]=B[U])}return z},l.apply(this,arguments)}function o(z,A){return I(z)||p(z,A)||x(z,A)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(z,A){if(!z)return;if(typeof z=="string")return b(z,A);var B=Object.prototype.toString.call(z).slice(8,-1);if(B==="Object"&&z.constructor&&(B=z.constructor.name),B==="Map"||B==="Set")return Array.from(z);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return b(z,A)}function b(z,A){(A==null||A>z.length)&&(A=z.length);for(var B=0,U=new Array(A);B<A;B++)U[B]=z[B];return U}function p(z,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var B=[],U=!0,R=!1,K=void 0;try{for(var Z=z[Symbol.iterator](),ue;!(U=(ue=Z.next()).done)&&!(B.push(ue.value),A&&B.length===A);U=!0);}catch(de){R=!0,K=de}finally{try{!U&&Z.return!=null&&Z.return()}finally{if(R)throw K}}return B}function I(z){if(Array.isArray(z))return z}function O(z,A){if(z==null)return{};var B=_(z,A),U,R;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(z);for(R=0;R<K.length;R++){if(U=K[R],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function _(z,A){if(z==null)return{};var B={},U=Object.keys(z),R,K;for(K=0;K<U.length;K++){if(R=U[K],A.indexOf(R)>=0)continue;B[R]=z[R]}return B}var E=0;function w(z){return+z.replace("%","")}function S(z){return Array.isArray(z)?z:[z]}function F(z,A,B,U){var R=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,K=arguments.length>5?arguments[5]:void 0,Z=50-U/2,ue=0,de=-Z,Ce=0,Re=-2*Z;switch(K){case"left":ue=-Z,de=0,Ce=2*Z,Re=0;break;case"right":ue=Z,de=0,Ce=-2*Z,Re=0;break;case"bottom":de=Z,Re=2*Z;break;default:}var me="M 50,50 m ".concat(ue,",").concat(de,`
a `).concat(Z,",").concat(Z," 0 1 1 ").concat(Ce,",").concat(-Re,`
a `).concat(Z,",").concat(Z," 0 1 1 ").concat(-Ce,",").concat(Re),Oe=Math.PI*2*Z,be={stroke:B,strokeDasharray:"".concat(A/100*(Oe-R),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(R/2+z/100*(Oe-R),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:me,pathStyle:be}}var P=function(A){var B=A.prefixCls,U=A.strokeWidth,R=A.trailWidth,K=A.gapDegree,Z=A.gapPosition,ue=A.trailColor,de=A.strokeLinecap,Ce=A.style,Re=A.className,me=A.strokeColor,Oe=A.percent,be=O(A,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ce=Object(M.useMemo)(function(){return E+=1,E},[]),le=F(0,100,ue,U,K,Z),ne=le.pathString,ge=le.pathStyle,te=S(Oe),re=S(me),Se=re.find(function(he){return Object.prototype.toString.call(he)==="[object Object]"}),ie=v(te),q=o(ie,1),Y=q[0],X=function(){var fe=0;return te.map(function(xe,Ke){var Ze=re[Ke]||re[re.length-1],et=Object.prototype.toString.call(Ze)==="[object Object]"?"url(#".concat(B,"-gradient-").concat(ce,")"):"",st=F(fe,xe,Ze,U,K,Z);return fe+=xe,g.a.createElement("path",{key:Ke,className:"".concat(B,"-circle-path"),d:st.pathString,stroke:et,strokeLinecap:de,strokeWidth:U,opacity:xe===0?0:1,fillOpacity:"0",style:st.pathStyle,ref:Y[Ke]})})};return g.a.createElement("svg",l({className:N()("".concat(B,"-circle"),Re),viewBox:"0 0 100 100",style:Ce},be),Se&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(B,"-gradient-").concat(ce),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Se).sort(function(he,fe){return w(he)-w(fe)}).map(function(he,fe){return g.a.createElement("stop",{key:fe,offset:he,stopColor:Se[he]})}))),g.a.createElement("path",{className:"".concat(B,"-circle-trail"),d:ne,stroke:ue,strokeLinecap:de,strokeWidth:R||U,fillOpacity:"0",style:ge}),X().reverse())};P.defaultProps=m;var L=P,G={Line:f,Circle:L}},hW8S:function(H,J,D){"use strict";D.d(J,"a",function(){return N}),D.d(J,"c",function(){return m}),D.d(J,"b",function(){return v});var M=D("VTBJ"),g=D("Ff2n"),C=D("Kwbf"),N="RC_TABLE_INTERNAL_COL_DEFINE";function m(T){var y=T.expandable,t=Object(g.a)(T,["expandable"]);return"expandable"in T?Object(M.a)(Object(M.a)({},t),y):t}function v(T){return Object.keys(T).reduce(function(y,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(y[t]=T[t]),y},{})}},ic2d:function(H,J,D){"use strict";D.d(J,"a",function(){return N});var M=D("FWmy"),g=D("746U");class C{constructor(){this.data=new Map}add(m,v){M.a(g.l(m)),M.a(g.k(v)),M.a(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,v)}as(m){return this.data.get(m)||null}}const N=new C},jO9C:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.pad.Iso97971={pad:function(g,C){g.concat(M.lib.WordArray.create([2147483648],1)),M.pad.ZeroPadding.pad(g,C)},unpad:function(g){M.pad.ZeroPadding.unpad(g),g.sigBytes--}},M.pad.Iso97971})},jwmR:function(H,J,D){H.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(H,J,D){"use strict";D.d(J,"a",function(){return Or});var M=D("rePB"),g=D("ODXe"),C=D("Ff2n"),N=D("VTBJ"),m=D("q1tI"),v=D("TSYQ"),T=D.n(v),y=D("Zm9Q"),t=D("6cGi"),h=D("KQm4"),i=D("xEkU"),c=D.n(i),a=D("t23M");function n(Pe){var Xe=Object(m.useRef)(),Je=Object(m.useRef)(!1);function Ue(){for(var _e=arguments.length,De=new Array(_e),Te=0;Te<_e;Te++)De[Te]=arguments[Te];Je.current||(c.a.cancel(Xe.current),Xe.current=c()(function(){Pe.apply(void 0,De)}))}return Object(m.useEffect)(function(){return function(){Je.current=!0,c.a.cancel(Xe.current)}},[]),Ue}function s(Pe){var Xe=Object(m.useRef)([]),Je=Object(m.useState)({}),Ue=Object(g.a)(Je,2),_e=Ue[1],De=Object(m.useRef)(typeof Pe=="function"?Pe():Pe),Te=n(function(){var Ge=De.current;Xe.current.forEach(function($e){Ge=$e(Ge)}),Xe.current=[],De.current=Ge,_e({})});function je(Ge){Xe.current.push(Ge),Te()}return[De.current,je]}var d=D("4IlW");function f(Pe,Xe){var Je,Ue=Pe.prefixCls,_e=Pe.id,De=Pe.active,Te=Pe.rtl,je=Pe.tab,Ge=je.key,$e=je.tab,ze=je.disabled,qe=je.closeIcon,pt=Pe.tabBarGutter,Dt=Pe.tabPosition,jt=Pe.closable,Yt=Pe.renderWrapper,kr=Pe.removeAriaLabel,Qr=Pe.editable,$r=Pe.onClick,qr=Pe.onRemove,zr=Pe.onFocus,rn="".concat(Ue,"-tab");m.useEffect(function(){return qr},[]);var nn={};Dt==="top"||Dt==="bottom"?nn[Te?"marginLeft":"marginRight"]=pt:nn.marginBottom=pt;var vn=Qr&&jt!==!1&&!ze;function un(Nr){if(ze)return;$r(Nr)}function Pn(Nr){Nr.preventDefault(),Nr.stopPropagation(),Qr.onEdit("remove",{key:Ge,event:Nr})}var hn=m.createElement("div",{key:Ge,ref:Xe,className:T()(rn,(Je={},Object(M.a)(Je,"".concat(rn,"-with-remove"),vn),Object(M.a)(Je,"".concat(rn,"-active"),De),Object(M.a)(Je,"".concat(rn,"-disabled"),ze),Je)),style:nn,onClick:un},m.createElement("div",{role:"tab","aria-selected":De,id:_e&&"".concat(_e,"-tab-").concat(Ge),className:"".concat(rn,"-btn"),"aria-controls":_e&&"".concat(_e,"-panel-").concat(Ge),"aria-disabled":ze,tabIndex:ze?null:0,onClick:function(Ur){Ur.stopPropagation(),un(Ur)},onKeyDown:function(Ur){[d.a.SPACE,d.a.ENTER].includes(Ur.which)&&(Ur.preventDefault(),un(Ur))},onFocus:zr},$e),vn&&m.createElement("button",{type:"button","aria-label":kr||"remove",tabIndex:0,className:"".concat(rn,"-remove"),onClick:function(Ur){Ur.stopPropagation(),Pn(Ur)}},qe||Qr.removeIcon||"\xD7"));return Yt&&(hn=Yt(hn)),hn}var l=m.forwardRef(f),o={width:0,height:0,left:0,top:0};function r(Pe,Xe,Je){return Object(m.useMemo)(function(){for(var Ue,_e=new Map,De=Xe.get((Ue=Pe[0])===null||Ue===void 0?void 0:Ue.key)||o,Te=De.left+De.width,je=0;je<Pe.length;je+=1){var Ge=Pe[je].key,$e=Xe.get(Ge);if(!$e){var ze;$e=Xe.get((ze=Pe[je-1])===null||ze===void 0?void 0:ze.key)||o}var qe=_e.get(Ge)||Object(N.a)({},$e);qe.right=Te-qe.left-qe.width,_e.set(Ge,qe)}return _e},[Pe.map(function(Ue){return Ue.key}).join("_"),Xe,Je])}var x={width:0,height:0,left:0,top:0,right:0};function b(Pe,Xe,Je,Ue,_e){var De=_e.tabs,Te=_e.tabPosition,je=_e.rtl,Ge,$e,ze;["top","bottom"].includes(Te)?(Ge="width",$e=je?"right":"left",ze=Math.abs(Xe.left)):(Ge="height",$e="top",ze=-Xe.top);var qe=Xe[Ge],pt=Je[Ge],Dt=Ue[Ge],jt=qe;return pt+Dt>qe&&(jt=qe-Dt),Object(m.useMemo)(function(){if(!De.length)return[0,0];for(var Yt=De.length,kr=Yt,Qr=0;Qr<Yt;Qr+=1){var $r=Pe.get(De[Qr].key)||x;if($r[$e]+$r[Ge]>ze+jt){kr=Qr-1;break}}for(var qr=0,zr=Yt-1;zr>=0;zr-=1){var rn=Pe.get(De[zr].key)||x;if(rn[$e]<ze){qr=zr+1;break}}return[qr,kr]},[Pe,ze,jt,Te,De.map(function(Yt){return Yt.key}).join("_"),je])}var p=D("wx14"),I=D("1OyB"),O=D("vuIU"),_=D("JX7q"),E=D("Ji7U"),w=D("LK+K"),S=D("I8Z2"),F=D("bT9E"),P=D("2GS6"),L=D("Gytx"),G=D.n(L),z=D("U8pU"),A=/iPhone/i,B=/iPod/i,U=/iPad/i,R=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,Z=/\bAndroid(?:.+)SD4930UR\b/i,ue=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,de=/Windows Phone/i,Ce=/\bWindows(?:.+)ARM\b/i,Re=/BlackBerry/i,me=/BB10/i,Oe=/Opera Mini/i,be=/\b(CriOS|Chrome)(?:.+)Mobile/i,ce=/Mobile(?:.+)Firefox\b/i;function le(Pe,Xe){return Pe.test(Xe)}function ne(Pe){var Xe=Pe||(typeof navigator!="undefined"?navigator.userAgent:""),Je=(Xe||"").split("[FBAN");if(typeof Je[1]!="undefined"){var Ue=Je,_e=Object(g.a)(Ue,1);Xe=_e[0]}if(Je=Xe.split("Twitter"),typeof Je[1]!="undefined"){var De=Je,Te=Object(g.a)(De,1);Xe=Te[0]}var je={apple:{phone:le(A,Xe)&&!le(de,Xe),ipod:le(B,Xe),tablet:!le(A,Xe)&&le(U,Xe)&&!le(de,Xe),device:(le(A,Xe)||le(B,Xe)||le(U,Xe))&&!le(de,Xe)},amazon:{phone:le(Z,Xe),tablet:!le(Z,Xe)&&le(ue,Xe),device:le(Z,Xe)||le(ue,Xe)},android:{phone:!le(de,Xe)&&le(Z,Xe)||!le(de,Xe)&&le(R,Xe),tablet:!le(de,Xe)&&!le(Z,Xe)&&!le(R,Xe)&&(le(ue,Xe)||le(K,Xe)),device:!le(de,Xe)&&(le(Z,Xe)||le(ue,Xe)||le(R,Xe)||le(K,Xe))||le(/\bokhttp\b/i,Xe)},windows:{phone:le(de,Xe),tablet:le(Ce,Xe),device:le(de,Xe)||le(Ce,Xe)},other:{blackberry:le(Re,Xe),blackberry10:le(me,Xe),opera:le(Oe,Xe),firefox:le(ce,Xe),chrome:le(be,Xe),device:le(Re,Xe)||le(me,Xe)||le(Oe,Xe)||le(ce,Xe)||le(be,Xe)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var ge=Object(N.a)(Object(N.a)({},ne()),{},{isMobile:ne}),te=ge;function re(){}function Se(Pe,Xe,Je){var Ue=Xe||"";return Pe.key||"".concat(Ue,"item_").concat(Je)}function ie(Pe){return"".concat(Pe,"-menu-")}function q(Pe,Xe){var Je=-1;m.Children.forEach(Pe,function(Ue){Je+=1,Ue&&Ue.type&&Ue.type.isMenuItemGroup?m.Children.forEach(Ue.props.children,function(_e){Je+=1,Xe(_e,Je)}):Xe(Ue,Je)})}function Y(Pe,Xe,Je){if(!Pe||Je.find)return;m.Children.forEach(Pe,function(Ue){if(Ue){var _e=Ue.type;if(!_e||!(_e.isSubMenu||_e.isMenuItem||_e.isMenuItemGroup))return;Xe.indexOf(Ue.key)!==-1?Je.find=!0:Ue.props.children&&Y(Ue.props.children,Xe,Je)}})}var X=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],he=function(Xe){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Xe&&typeof Xe.getBoundingClientRect=="function"&&Xe.getBoundingClientRect().width;if(Ue){if(Je){var _e=getComputedStyle(Xe),De=_e.marginLeft,Te=_e.marginRight;Ue+=+De.replace("px","")+ +Te.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},fe=function(Xe,Je,Ue){Xe&&Object(z.a)(Xe.style)==="object"&&(Xe.style[Je]=Ue)},xe=function(){return te.any},Ke=D("bdgK"),Ze=D("i8i4"),et=D.n(Ze),st=D("wgJM"),ut=D("l4aY"),dt=D("m+aA"),Fe=D("c+Xe"),Ie=D("zT1h"),ot=D("QC+M");function ft(Pe,Xe,Je){return Je?Pe[0]===Xe[0]:Pe[0]===Xe[0]&&Pe[1]===Xe[1]}function Qe(Pe,Xe,Je){var Ue=Pe[Xe]||{};return Object(N.a)(Object(N.a)({},Ue),Je)}function tt(Pe,Xe,Je,Ue){for(var _e=Je.points,De=Object.keys(Pe),Te=0;Te<De.length;Te+=1){var je=De[Te];if(ft(Pe[je].points,_e,Ue))return"".concat(Xe,"-placement-").concat(je)}return""}var Be=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Pe=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Pe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Pe==null?void 0:Pe.substr(0,4)))},ke=D("MNnm");function Ne(Pe,Xe){var Je={};return Je[Pe.toLowerCase()]=Xe.toLowerCase(),Je["Webkit".concat(Pe)]="webkit".concat(Xe),Je["Moz".concat(Pe)]="moz".concat(Xe),Je["ms".concat(Pe)]="MS".concat(Xe),Je["O".concat(Pe)]="o".concat(Xe.toLowerCase()),Je}function Ee(Pe,Xe){var Je={animationend:Ne("Animation","AnimationEnd"),transitionend:Ne("Transition","TransitionEnd")};return Pe&&("AnimationEvent"in Xe||delete Je.animationend.animation,"TransitionEvent"in Xe||delete Je.transitionend.transition),Je}var Ae=Ee(Object(ke.a)(),typeof window!="undefined"?window:{}),Le={};if(Object(ke.a)()){var Me=document.createElement("div");Le=Me.style}var He={};function nt(Pe){if(He[Pe])return He[Pe];var Xe=Ae[Pe];if(Xe)for(var Je=Object.keys(Xe),Ue=Je.length,_e=0;_e<Ue;_e+=1){var De=Je[_e];if(Object.prototype.hasOwnProperty.call(Xe,De)&&De in Le)return He[Pe]=Xe[De],He[Pe]}return""}var vt=nt("animationend"),bt=nt("transitionend"),Wt=!!(vt&&bt),Bt=vt||"animationend",lr=bt||"transitionend";function dr(Pe,Xe){if(!Pe)return null;if(Object(z.a)(Pe)==="object"){var Je=Xe.replace(/-\w/g,function(Ue){return Ue[1].toUpperCase()});return Pe[Je]}return"".concat(Pe,"-").concat(Xe)}var Ot="none",Vr="appear",Wr="enter",Yr="leave",bn="none",Ar="prepare",fn="start",cn="active",Vt="end";function En(Pe){var Xe=Object(m.useRef)(!1),Je=Object(m.useState)(Pe),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1];function Te(je){Xe.current||De(je)}return Object(m.useEffect)(function(){return function(){Xe.current=!0}},[]),[_e,Te]}var fr=Object(ke.a)()?m.useLayoutEffect:m.useEffect,br=fr,Br=function(){var Pe=m.useRef(null);function Xe(){st.a.cancel(Pe.current)}function Je(Ue){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Xe();var De=Object(st.a)(function(){_e<=1?Ue({isCanceled:function(){return De!==Pe.current}}):Je(Ue,_e-1)});Pe.current=De}return m.useEffect(function(){return function(){Xe()}},[]),[Je,Xe]},kn=[Ar,fn,cn,Vt],Kn=!1,dn=!0;function sr(Pe){return Pe===cn||Pe===Vt}var Jn=function(Pe,Xe){var Je=m.useState(bn),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1],Te=Br(),je=Object(g.a)(Te,2),Ge=je[0],$e=je[1];function ze(){De(Ar)}return br(function(){if(_e!==bn&&_e!==Vt){var qe=kn.indexOf(_e),pt=kn[qe+1],Dt=Xe(_e);Dt===Kn?De(pt):Ge(function(jt){function Yt(){if(jt.isCanceled())return;De(pt)}Dt===!0?Yt():Promise.resolve(Dt).then(Yt)})}},[Pe,_e]),m.useEffect(function(){return function(){$e()}},[]),[ze,_e]},Tn=function(Pe){var Xe=Object(m.useRef)(),Je=Object(m.useRef)(Pe);Je.current=Pe;var Ue=m.useCallback(function(Te){Je.current(Te)},[]);function _e(Te){Te&&(Te.removeEventListener(lr,Ue),Te.removeEventListener(Bt,Ue))}function De(Te){Xe.current&&Xe.current!==Te&&_e(Xe.current),Te&&Te!==Xe.current&&(Te.addEventListener(lr,Ue),Te.addEventListener(Bt,Ue),Xe.current=Te)}return m.useEffect(function(){return function(){_e(Xe.current)}},[]),[De,_e]};function On(Pe,Xe,Je,Ue){var _e=Ue.motionEnter,De=_e===void 0?!0:_e,Te=Ue.motionAppear,je=Te===void 0?!0:Te,Ge=Ue.motionLeave,$e=Ge===void 0?!0:Ge,ze=Ue.motionDeadline,qe=Ue.motionLeaveImmediately,pt=Ue.onAppearPrepare,Dt=Ue.onEnterPrepare,jt=Ue.onLeavePrepare,Yt=Ue.onAppearStart,kr=Ue.onEnterStart,Qr=Ue.onLeaveStart,$r=Ue.onAppearActive,qr=Ue.onEnterActive,zr=Ue.onLeaveActive,rn=Ue.onAppearEnd,nn=Ue.onEnterEnd,vn=Ue.onLeaveEnd,un=Ue.onVisibleChanged,Pn=En(),hn=Object(g.a)(Pn,2),Nr=hn[0],Ur=hn[1],on=En(Ot),gn=Object(g.a)(on,2),Tr=gn[0],xn=gn[1],Vn=En(null),Cn=Object(g.a)(Vn,2),jn=Cn[0],Rn=Cn[1],ei=Object(m.useRef)(!1),ui=Object(m.useRef)(null),Xn=Object(m.useRef)(!1),gi=Object(m.useRef)(null);function Xi(){var Mn=Je();return Mn||gi.current}var Si=Object(m.useRef)(!1);function ci(Mn){var In=Xi();if(Mn&&!Mn.deadline&&Mn.target!==In)return;var oi;Tr===Vr&&Si.current?oi=rn==null?void 0:rn(In,Mn):Tr===Wr&&Si.current?oi=nn==null?void 0:nn(In,Mn):Tr===Yr&&Si.current&&(oi=vn==null?void 0:vn(In,Mn)),oi!==!1&&!Xn.current&&(xn(Ot),Rn(null))}var Fn=Tn(ci),Un=Object(g.a)(Fn,1),Yn=Un[0],zn=m.useMemo(function(){var Mn,In,oi;switch(Tr){case"appear":return Mn={},Object(M.a)(Mn,Ar,pt),Object(M.a)(Mn,fn,Yt),Object(M.a)(Mn,cn,$r),Mn;case"enter":return In={},Object(M.a)(In,Ar,Dt),Object(M.a)(In,fn,kr),Object(M.a)(In,cn,qr),In;case"leave":return oi={},Object(M.a)(oi,Ar,jt),Object(M.a)(oi,fn,Qr),Object(M.a)(oi,cn,zr),oi;default:return{}}},[Tr]),ai=Jn(Tr,function(Mn){if(Mn===Ar){var In=zn[Ar];return In?In(Xi()):Kn}if(Dn in zn){var oi;Rn(((oi=zn[Dn])===null||oi===void 0?void 0:oi.call(zn,Xi(),null))||null)}return Dn===cn&&(Yn(Xi()),ze>0&&(clearTimeout(ui.current),ui.current=setTimeout(function(){ci({deadline:!0})},ze))),dn}),Ai=Object(g.a)(ai,2),ra=Ai[0],Dn=Ai[1],Fi=sr(Dn);Si.current=Fi,br(function(){Ur(Xe);var Mn=ei.current;if(ei.current=!0,!Pe)return;var In;!Mn&&Xe&&je&&(In=Vr),Mn&&Xe&&De&&(In=Wr),(Mn&&!Xe&&$e||!Mn&&qe&&!Xe&&$e)&&(In=Yr),In&&(xn(In),ra())},[Xe]),Object(m.useEffect)(function(){(Tr===Vr&&!je||Tr===Wr&&!De||Tr===Yr&&!$e)&&xn(Ot)},[je,De,$e]),Object(m.useEffect)(function(){return function(){clearTimeout(ui.current),Xn.current=!0}},[]),Object(m.useEffect)(function(){Nr!==void 0&&Tr===Ot&&(un==null||un(Nr))},[Nr,Tr]);var Ui=jn;return zn[Ar]&&Dn===fn&&(Ui=Object(N.a)({transition:"none"},Ui)),[Tr,Dn,Ui,Nr!=null?Nr:Xe]}var Jr=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(){return Object(I.a)(this,Je),Xe.apply(this,arguments)}return Object(O.a)(Je,[{key:"render",value:function(){return this.props.children}}]),Je}(m.Component),An=Jr;function Zn(Pe){var Xe=Pe;Object(z.a)(Pe)==="object"&&(Xe=Pe.transitionSupport);function Je(_e){return!!(_e.motionName&&Xe)}var Ue=m.forwardRef(function(_e,De){var Te=_e.visible,je=Te===void 0?!0:Te,Ge=_e.removeOnLeave,$e=Ge===void 0?!0:Ge,ze=_e.forceRender,qe=_e.children,pt=_e.motionName,Dt=_e.leavedClassName,jt=_e.eventProps,Yt=Je(_e),kr=Object(m.useRef)(),Qr=Object(m.useRef)();function $r(){try{return Object(dt.a)(kr.current||Qr.current)}catch(xn){return null}}var qr=On(Yt,je,$r,_e),zr=Object(g.a)(qr,4),rn=zr[0],nn=zr[1],vn=zr[2],un=zr[3],Pn=m.useRef(un);un&&(Pn.current=!0);var hn=Object(m.useRef)(De);hn.current=De;var Nr=m.useCallback(function(xn){kr.current=xn,Object(Fe.b)(hn.current,xn)},[]),Ur,on=Object(N.a)(Object(N.a)({},jt),{},{visible:je});if(!qe)Ur=null;else if(rn===Ot||!Je(_e))un?Ur=qe(Object(N.a)({},on),Nr):!$e&&Pn.current?Ur=qe(Object(N.a)(Object(N.a)({},on),{},{className:Dt}),Nr):ze?Ur=qe(Object(N.a)(Object(N.a)({},on),{},{style:{display:"none"}}),Nr):Ur=null;else{var gn,Tr;nn===Ar?Tr="prepare":sr(nn)?Tr="active":nn===fn&&(Tr="start"),Ur=qe(Object(N.a)(Object(N.a)({},on),{},{className:T()(dr(pt,rn),(gn={},Object(M.a)(gn,dr(pt,"".concat(rn,"-").concat(Tr)),Tr),Object(M.a)(gn,pt,typeof pt=="string"),gn)),style:vn}),Nr)}return m.createElement(An,{ref:Qr},Ur)});return Ue.displayName="CSSMotion",Ue}var ri=Zn(Wt),Nt="add",_r="keep",mi="remove",xi="removed";function Di(Pe){var Xe;return Pe&&Object(z.a)(Pe)==="object"&&"key"in Pe?Xe=Pe:Xe={key:Pe},Object(N.a)(Object(N.a)({},Xe),{},{key:String(Xe.key)})}function wi(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Pe.map(Di)}function se(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Je=[],Ue=0,_e=Xe.length,De=wi(Pe),Te=wi(Xe);De.forEach(function($e){for(var ze=!1,qe=Ue;qe<_e;qe+=1){var pt=Te[qe];if(pt.key===$e.key){Ue<qe&&(Je=Je.concat(Te.slice(Ue,qe).map(function(Dt){return Object(N.a)(Object(N.a)({},Dt),{},{status:Nt})})),Ue=qe),Je.push(Object(N.a)(Object(N.a)({},pt),{},{status:_r})),Ue+=1,ze=!0;break}}ze||Je.push(Object(N.a)(Object(N.a)({},$e),{},{status:mi}))}),Ue<_e&&(Je=Je.concat(Te.slice(Ue).map(function($e){return Object(N.a)(Object(N.a)({},$e),{},{status:Nt})})));var je={};Je.forEach(function($e){var ze=$e.key;je[ze]=(je[ze]||0)+1});var Ge=Object.keys(je).filter(function($e){return je[$e]>1});return Ge.forEach(function($e){Je=Je.filter(function(ze){var qe=ze.key,pt=ze.status;return qe!==$e||pt!==mi}),Je.forEach(function(ze){ze.key===$e&&(ze.status=_r)})}),Je}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(Pe){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ri,Je=function(Ue){Object(E.a)(De,Ue);var _e=Object(w.a)(De);function De(){var Te;return Object(I.a)(this,De),Te=_e.apply(this,arguments),Te.state={keyEntities:[]},Te.removeKey=function(je){Te.setState(function(Ge){var $e=Ge.keyEntities;return{keyEntities:$e.map(function(ze){return ze.key!==je?ze:Object(N.a)(Object(N.a)({},ze),{},{status:xi})})}})},Te}return Object(O.a)(De,[{key:"render",value:function(){var je=this,Ge=this.state.keyEntities,$e=this.props,ze=$e.component,qe=$e.children,pt=$e.onVisibleChanged,Dt=Object(C.a)($e,["component","children","onVisibleChanged"]),jt=ze||m.Fragment,Yt={};return V.forEach(function(kr){Yt[kr]=Dt[kr],delete Dt[kr]}),delete Dt.keys,m.createElement(jt,Dt,Ge.map(function(kr){var Qr=kr.status,$r=Object(C.a)(kr,["status"]),qr=Qr===Nt||Qr===_r;return m.createElement(Xe,Object(p.a)({},Yt,{key:$r.key,visible:qr,eventProps:$r,onVisibleChanged:function(rn){pt==null||pt(rn,{key:$r.key}),rn||je.removeKey($r.key)}}),qe)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Ge){var $e=je.keys,ze=Ge.keyEntities,qe=wi($e),pt=se(ze,qe);return{keyEntities:pt.filter(function(Dt){var jt=ze.find(function(Yt){var kr=Yt.key;return Dt.key===kr});return!(jt&&jt.status===xi&&Dt.status===mi)})}}}]),De}(m.Component);return Je.defaultProps={component:"div"},Je}var ee=$(Wt),ye=ri;function oe(Pe){var Xe=Pe.prefixCls,Je=Pe.motion,Ue=Pe.animation,_e=Pe.transitionName;return Je||(Ue?{motionName:"".concat(Xe,"-").concat(Ue)}:_e?{motionName:_e}:null)}function Ve(Pe){var Xe=Pe.prefixCls,Je=Pe.visible,Ue=Pe.zIndex,_e=Pe.mask,De=Pe.maskMotion,Te=Pe.maskAnimation,je=Pe.maskTransitionName;if(!_e)return null;var Ge={};return(De||je||Te)&&(Ge=Object(N.a)({motionAppear:!0},oe({motion:De,prefixCls:Xe,transitionName:je,animation:Te}))),m.createElement(ye,Object(p.a)({},Ge,{visible:Je,removeOnLeave:!0}),function($e){var ze=$e.className;return m.createElement("div",{style:{zIndex:Ue},className:T()("".concat(Xe,"-mask"),ze)})})}var Tt=D("9mu1"),Xt=D("o0o1"),Er=D.n(Xt),kt=D("HaE+"),Pr=["measure","align",null,"motion"],Gr=function(Pe,Xe){var Je=Object(m.useState)(null),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1],Te=Object(m.useRef)(),je=Object(m.useRef)(!1);function Ge(qe){je.current||De(qe)}function $e(){st.a.cancel(Te.current)}function ze(qe){$e(),Te.current=Object(st.a)(function(){Ge(function(pt){switch(_e){case"align":return"motion";case"motion":return"stable";default:}return pt}),qe==null||qe()})}return Object(m.useEffect)(function(){Ge("measure")},[Pe]),Object(m.useEffect)(function(){switch(_e){case"measure":Xe();break;default:}_e&&(Te.current=Object(st.a)(Object(kt.a)(Er.a.mark(function qe(){var pt,Dt;return Er.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:pt=Pr.indexOf(_e),Dt=Pr[pt+1],Dt&&pt!==-1&&Ge(Dt);case 3:case"end":return Yt.stop()}},qe)}))))},[_e]),Object(m.useEffect)(function(){return function(){je.current=!0,$e()}},[]),[_e,ze]},yn=function(Pe){var Xe=m.useState({width:0,height:0}),Je=Object(g.a)(Xe,2),Ue=Je[0],_e=Je[1];function De(je){_e({width:je.offsetWidth,height:je.offsetHeight})}var Te=m.useMemo(function(){var je={};if(Pe){var Ge=Ue.width,$e=Ue.height;Pe.indexOf("height")!==-1&&$e?je.height=$e:Pe.indexOf("minHeight")!==-1&&$e&&(je.minHeight=$e),Pe.indexOf("width")!==-1&&Ge?je.width=Ge:Pe.indexOf("minWidth")!==-1&&Ge&&(je.minWidth=Ge)}return je},[Pe,Ue]);return[Te,De]},ni=m.forwardRef(function(Pe,Xe){var Je=Pe.visible,Ue=Pe.prefixCls,_e=Pe.className,De=Pe.style,Te=Pe.children,je=Pe.zIndex,Ge=Pe.stretch,$e=Pe.destroyPopupOnHide,ze=Pe.forceRender,qe=Pe.align,pt=Pe.point,Dt=Pe.getRootDomNode,jt=Pe.getClassNameFromAlign,Yt=Pe.onAlign,kr=Pe.onMouseEnter,Qr=Pe.onMouseLeave,$r=Pe.onMouseDown,qr=Pe.onTouchStart,zr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useState)(),vn=Object(g.a)(nn,2),un=vn[0],Pn=vn[1],hn=yn(Ge),Nr=Object(g.a)(hn,2),Ur=Nr[0],on=Nr[1];function gn(){Ge&&on(Dt())}var Tr=Gr(Je,gn),xn=Object(g.a)(Tr,2),Vn=xn[0],Cn=xn[1],jn=Object(m.useRef)();function Rn(){return pt||Dt}function ei(){var Fn;(Fn=zr.current)===null||Fn===void 0||Fn.forceAlign()}function ui(Fn,Un){var Yn=jt(Un);un!==Yn&&Pn(Yn),Vn==="align"&&(un!==Yn?Promise.resolve().then(function(){ei()}):Cn(function(){var zn;(zn=jn.current)===null||zn===void 0||zn.call(jn)}),Yt==null||Yt(Fn,Un))}var Xn=Object(N.a)({},oe(Pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Fn){var Un=Xn[Fn];Xn[Fn]=function(Yn,zn){return Cn(),Un==null?void 0:Un(Yn,zn)}});function gi(){return new Promise(function(Fn){jn.current=Fn})}m.useEffect(function(){!Xn.motionName&&Vn==="motion"&&Cn()},[Xn.motionName,Vn]),m.useImperativeHandle(Xe,function(){return{forceAlign:ei,getElement:function(){return rn.current}}});var Xi=Object(N.a)(Object(N.a)({},Ur),{},{zIndex:je,opacity:Vn==="motion"||Vn==="stable"||!Je?void 0:0,pointerEvents:Vn==="stable"?void 0:"none"},De),Si=!0;(qe==null?void 0:qe.points)&&(Vn==="align"||Vn==="stable")&&(Si=!1);var ci=Te;return m.Children.count(Te)>1&&(ci=m.createElement("div",{className:"".concat(Ue,"-content")},Te)),m.createElement(ye,Object(p.a)({visible:Je,ref:rn,leavedClassName:"".concat(Ue,"-hidden")},Xn,{onAppearPrepare:gi,onEnterPrepare:gi,removeOnLeave:$e,forceRender:ze}),function(Fn,Un){var Yn=Fn.className,zn=Fn.style,ai=T()(Ue,_e,un,Yn);return m.createElement(Tt.a,{target:Rn(),key:"popup",ref:zr,monitorWindowResize:!0,disabled:Si,align:qe,onAlign:ui},m.createElement("div",{ref:Un,className:ai,onMouseEnter:kr,onMouseLeave:Qr,onMouseDownCapture:$r,onTouchStartCapture:qr,style:Object(N.a)(Object(N.a)({},zn),Xi)},ci))})});ni.displayName="PopupInner";var ii=ni,Bn=m.forwardRef(function(Pe,Xe){var Je=Pe.prefixCls,Ue=Pe.visible,_e=Pe.zIndex,De=Pe.children,Te=Pe.mobile;Te=Te===void 0?{}:Te;var je=Te.popupClassName,Ge=Te.popupStyle,$e=Te.popupMotion,ze=$e===void 0?{}:$e,qe=Te.popupRender,pt=m.useRef();m.useImperativeHandle(Xe,function(){return{forceAlign:function(){},getElement:function(){return pt.current}}});var Dt=Object(N.a)({zIndex:_e},Ge),jt=De;return m.Children.count(De)>1&&(jt=m.createElement("div",{className:"".concat(Je,"-content")},De)),qe&&(jt=qe(jt)),m.createElement(ye,Object(p.a)({visible:Ue,ref:pt,removeOnLeave:!0},ze),function(Yt,kr){var Qr=Yt.className,$r=Yt.style,qr=T()(Je,je,Qr);return m.createElement("div",{ref:kr,className:qr,style:Object(N.a)(Object(N.a)({},$r),Dt)},jt)})});Bn.displayName="MobilePopupInner";var Ni=Bn,Ki=["visible","mobile"],Gn=m.forwardRef(function(Pe,Xe){var Je=Pe.visible,Ue=Pe.mobile,_e=Object(C.a)(Pe,Ki),De=Object(m.useState)(Je),Te=Object(g.a)(De,2),je=Te[0],Ge=Te[1],$e=Object(m.useState)(!1),ze=Object(g.a)($e,2),qe=ze[0],pt=ze[1],Dt=Object(N.a)(Object(N.a)({},_e),{},{visible:je});Object(m.useEffect)(function(){Ge(Je),Je&&Ue&&pt(Be())},[Je,Ue]);var jt=qe?m.createElement(Ni,Object(p.a)({},Dt,{mobile:Ue,ref:Xe})):m.createElement(ii,Object(p.a)({},Dt,{ref:Xe}));return m.createElement("div",null,m.createElement(Ve,Dt),jt)});Gn.displayName="Popup";var Ti=Gn,Gi=m.createContext(null),Li=Gi;function li(){}function ea(){return""}function Vi(Pe){return Pe?Pe.ownerDocument:window.document}var ta=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function oa(Pe){var Xe=function(Je){Object(E.a)(_e,Je);var Ue=Object(w.a)(_e);function _e(De){var Te;Object(I.a)(this,_e),Te=Ue.call(this,De),Te.popupRef=m.createRef(),Te.triggerRef=m.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(Ge){var $e=Te.props.mouseEnterDelay;Te.fireEvents("onMouseEnter",Ge),Te.delaySetPopupVisible(!0,$e,$e?null:Ge)},Te.onMouseMove=function(Ge){Te.fireEvents("onMouseMove",Ge),Te.setPoint(Ge)},Te.onMouseLeave=function(Ge){Te.fireEvents("onMouseLeave",Ge),Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onPopupMouseEnter=function(){Te.clearDelayTimer()},Te.onPopupMouseLeave=function(Ge){var $e;if(Ge.relatedTarget&&!Ge.relatedTarget.setTimeout&&Object(ut.a)(($e=Te.popupRef.current)===null||$e===void 0?void 0:$e.getElement(),Ge.relatedTarget))return;Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onFocus=function(Ge){Te.fireEvents("onFocus",Ge),Te.clearDelayTimer(),Te.isFocusToShow()&&(Te.focusTime=Date.now(),Te.delaySetPopupVisible(!0,Te.props.focusDelay))},Te.onMouseDown=function(Ge){Te.fireEvents("onMouseDown",Ge),Te.preClickTime=Date.now()},Te.onTouchStart=function(Ge){Te.fireEvents("onTouchStart",Ge),Te.preTouchTime=Date.now()},Te.onBlur=function(Ge){Te.fireEvents("onBlur",Ge),Te.clearDelayTimer(),Te.isBlurToHide()&&Te.delaySetPopupVisible(!1,Te.props.blurDelay)},Te.onContextMenu=function(Ge){Ge.preventDefault(),Te.fireEvents("onContextMenu",Ge),Te.setPopupVisible(!0,Ge)},Te.onContextMenuClose=function(){Te.isContextMenuToShow()&&Te.close()},Te.onClick=function(Ge){if(Te.fireEvents("onClick",Ge),Te.focusTime){var $e;if(Te.preClickTime&&Te.preTouchTime?$e=Math.min(Te.preClickTime,Te.preTouchTime):Te.preClickTime?$e=Te.preClickTime:Te.preTouchTime&&($e=Te.preTouchTime),Math.abs($e-Te.focusTime)<20)return;Te.focusTime=0}Te.preClickTime=0,Te.preTouchTime=0,Te.isClickToShow()&&(Te.isClickToHide()||Te.isBlurToHide())&&Ge&&Ge.preventDefault&&Ge.preventDefault();var ze=!Te.state.popupVisible;(Te.isClickToHide()&&!ze||ze&&Te.isClickToShow())&&Te.setPopupVisible(!Te.state.popupVisible,Ge)},Te.onPopupMouseDown=function(){if(Te.hasPopupMouseDown=!0,clearTimeout(Te.mouseDownTimeout),Te.mouseDownTimeout=window.setTimeout(function(){Te.hasPopupMouseDown=!1},0),Te.context){var Ge;(Ge=Te.context).onPopupMouseDown.apply(Ge,arguments)}},Te.onDocumentClick=function(Ge){if(Te.props.mask&&!Te.props.maskClosable)return;var $e=Ge.target,ze=Te.getRootDomNode(),qe=Te.getPopupDomNode();(!Object(ut.a)(ze,$e)||Te.isContextMenuOnly())&&!Object(ut.a)(qe,$e)&&!Te.hasPopupMouseDown&&Te.close()},Te.getRootDomNode=function(){var Ge=Te.props.getTriggerDOMNode;if(Ge)return Ge(Te.triggerRef.current);try{var $e=Object(dt.a)(Te.triggerRef.current);if($e)return $e}catch(ze){}return et.a.findDOMNode(Object(_.a)(Te))},Te.getPopupClassNameFromAlign=function(Ge){var $e=[],ze=Te.props,qe=ze.popupPlacement,pt=ze.builtinPlacements,Dt=ze.prefixCls,jt=ze.alignPoint,Yt=ze.getPopupClassNameFromAlign;return qe&&pt&&$e.push(tt(pt,Dt,Ge,jt)),Yt&&$e.push(Yt(Ge)),$e.join(" ")},Te.getComponent=function(){var Ge=Te.props,$e=Ge.prefixCls,ze=Ge.destroyPopupOnHide,qe=Ge.popupClassName,pt=Ge.onPopupAlign,Dt=Ge.popupMotion,jt=Ge.popupAnimation,Yt=Ge.popupTransitionName,kr=Ge.popupStyle,Qr=Ge.mask,$r=Ge.maskAnimation,qr=Ge.maskTransitionName,zr=Ge.maskMotion,rn=Ge.zIndex,nn=Ge.popup,vn=Ge.stretch,un=Ge.alignPoint,Pn=Ge.mobile,hn=Ge.forceRender,Nr=Te.state,Ur=Nr.popupVisible,on=Nr.point,gn=Te.getPopupAlign(),Tr={};return Te.isMouseEnterToShow()&&(Tr.onMouseEnter=Te.onPopupMouseEnter),Te.isMouseLeaveToHide()&&(Tr.onMouseLeave=Te.onPopupMouseLeave),Tr.onMouseDown=Te.onPopupMouseDown,Tr.onTouchStart=Te.onPopupMouseDown,m.createElement(Ti,Object(p.a)({prefixCls:$e,destroyPopupOnHide:ze,visible:Ur,point:un&&on,className:qe,align:gn,onAlign:pt,animation:jt,getClassNameFromAlign:Te.getPopupClassNameFromAlign},Tr,{stretch:vn,getRootDomNode:Te.getRootDomNode,style:kr,mask:Qr,zIndex:rn,transitionName:Yt,maskAnimation:$r,maskTransitionName:qr,maskMotion:zr,ref:Te.popupRef,motion:Dt,mobile:Pn,forceRender:hn}),typeof nn=="function"?nn():nn)},Te.attachParent=function(Ge){st.a.cancel(Te.attachId);var $e=Te.props,ze=$e.getPopupContainer,qe=$e.getDocument,pt=Te.getRootDomNode(),Dt;ze?(pt||ze.length===0)&&(Dt=ze(pt)):Dt=qe(Te.getRootDomNode()).body,Dt?Dt.appendChild(Ge):Te.attachId=Object(st.a)(function(){Te.attachParent(Ge)})},Te.getContainer=function(){var Ge=Te.props.getDocument,$e=Ge(Te.getRootDomNode()).createElement("div");return $e.style.position="absolute",$e.style.top="0",$e.style.left="0",$e.style.width="100%",Te.attachParent($e),$e},Te.setPoint=function(Ge){var $e=Te.props.alignPoint;if(!$e||!Ge)return;Te.setState({point:{pageX:Ge.pageX,pageY:Ge.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},ta.forEach(function(Ge){Te["fire".concat(Ge)]=function($e){Te.fireEvents(Ge,$e)}}),Te}return Object(O.a)(_e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this.props,je=this.state;if(je.popupVisible){var Ge;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ge=Te.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Ge,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ge=Ge||Te.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Ge,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ge=Ge||Te.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(Ge,"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),st.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,Ge=Te.popupAlign,$e=Te.builtinPlacements;return je&&$e?Qe($e,je,Ge):Ge}},{key:"setPopupVisible",value:function(Te,je){var Ge=this.props.alignPoint,$e=this.state.popupVisible;this.clearDelayTimer(),$e!==Te&&("popupVisible"in this.props||this.setState({popupVisible:Te,prevPopupVisible:$e}),this.props.onPopupVisibleChange(Te)),Ge&&je&&Te&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(Te,je,Ge){var $e=this,ze=je*1e3;if(this.clearDelayTimer(),ze){var qe=Ge?{pageX:Ge.pageX,pageY:Ge.pageY}:null;this.delayTimer=window.setTimeout(function(){$e.setPopupVisible(Te,qe),$e.clearDelayTimer()},ze)}else this.setPopupVisible(Te,Ge)}},{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,Ge=this.props;return je[Te]&&Ge[Te]?this["fire".concat(Te)]:je[Te]||Ge[Te]}},{key:"isClickToShow",value:function(){var Te=this.props,je=Te.action,Ge=Te.showAction;return je.indexOf("click")!==-1||Ge.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,Ge=Te.showAction;return je.indexOf("contextMenu")!==-1||Ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Te=this.props,je=Te.action,Ge=Te.hideAction;return je.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Te=this.props,je=Te.action,Ge=Te.showAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Te=this.props,je=Te.action,Ge=Te.hideAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Te=this.props,je=Te.action,Ge=Te.showAction;return je.indexOf("focus")!==-1||Ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Te=this.props,je=Te.action,Ge=Te.hideAction;return je.indexOf("focus")!==-1||Ge.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 Ge=this.props.children.props[Te];Ge&&Ge(je);var $e=this.props[Te];$e&&$e(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Te=this.state.popupVisible,je=this.props,Ge=je.children,$e=je.forceRender,ze=je.alignPoint,qe=je.className,pt=je.autoDestroy,Dt=m.Children.only(Ge),jt={key:"trigger"};this.isContextMenuToShow()?jt.onContextMenu=this.onContextMenu:jt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(jt.onClick=this.onClick,jt.onMouseDown=this.onMouseDown,jt.onTouchStart=this.onTouchStart):(jt.onClick=this.createTwoChains("onClick"),jt.onMouseDown=this.createTwoChains("onMouseDown"),jt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(jt.onMouseEnter=this.onMouseEnter,ze&&(jt.onMouseMove=this.onMouseMove)):jt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?jt.onMouseLeave=this.onMouseLeave:jt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(jt.onFocus=this.onFocus,jt.onBlur=this.onBlur):(jt.onFocus=this.createTwoChains("onFocus"),jt.onBlur=this.createTwoChains("onBlur"));var Yt=T()(Dt&&Dt.props&&Dt.props.className,qe);Yt&&(jt.className=Yt);var kr=Object(N.a)({},jt);Object(Fe.c)(Dt)&&(kr.ref=Object(Fe.a)(this.triggerRef,Dt.ref));var Qr=m.cloneElement(Dt,kr),$r;return(Te||this.popupRef.current||$e)&&($r=m.createElement(Pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Te&&pt&&($r=null),m.createElement(Li.Provider,{value:this.triggerContextValue},Qr,$r)}}],[{key:"getDerivedStateFromProps",value:function(Te,je){var Ge=Te.popupVisible,$e={};return Ge!==void 0&&je.popupVisible!==Ge&&($e.popupVisible=Ge,$e.prevPopupVisible=je.popupVisible),$e}}]),_e}(m.Component);return Xe.contextType=Li,Xe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ea,getDocument:Vi,onPopupVisibleChange:li,afterPopupVisibleChange:li,onPopupAlign:li,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Xe}var ki=oa(ot.a),qn={adjustX:1,adjustY:1},ji={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},ha={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},xt=ji,rt=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},wt=function(Xe,Je,Ue){var _e=ie(Je),De=Xe.getState();Xe.setState({defaultActiveFirst:Object(N.a)(Object(N.a)({},De.defaultActiveFirst),{},Object(M.a)({},_e,Ue))})},Lt=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(Ue){var _e;Object(I.a)(this,Je),_e=Xe.call(this,Ue),_e.onDestroy=function(ze){_e.props.onDestroy(ze)},_e.onKeyDown=function(ze){var qe=ze.keyCode,pt=_e.menuInstance,Dt=_e.props.store,jt=_e.getVisible();if(qe===d.a.ENTER)return _e.onTitleClick(ze),wt(Dt,_e.props.eventKey,!0),!0;if(qe===d.a.RIGHT)return jt?pt.onKeyDown(ze):(_e.triggerOpenChange(!0),wt(Dt,_e.props.eventKey,!0)),!0;if(qe===d.a.LEFT){var Yt;if(jt)Yt=pt.onKeyDown(ze);else return;return Yt||(_e.triggerOpenChange(!1),Yt=!0),Yt}return jt&&(qe===d.a.UP||qe===d.a.DOWN)?pt.onKeyDown(ze):void 0},_e.onOpenChange=function(ze){_e.props.onOpenChange(ze)},_e.onPopupVisibleChange=function(ze){_e.triggerOpenChange(ze,ze?"mouseenter":"mouseleave")},_e.onMouseEnter=function(ze){var qe=_e.props,pt=qe.eventKey,Dt=qe.onMouseEnter,jt=qe.store;wt(jt,_e.props.eventKey,!1),Dt({key:pt,domEvent:ze})},_e.onMouseLeave=function(ze){var qe=_e.props,pt=qe.parentMenu,Dt=qe.eventKey,jt=qe.onMouseLeave;pt.subMenuInstance=Object(_.a)(_e),jt({key:Dt,domEvent:ze})},_e.onTitleMouseEnter=function(ze){var qe=_e.props,pt=qe.eventKey,Dt=qe.onItemHover,jt=qe.onTitleMouseEnter;Dt({key:pt,hover:!0}),jt({key:pt,domEvent:ze})},_e.onTitleMouseLeave=function(ze){var qe=_e.props,pt=qe.parentMenu,Dt=qe.eventKey,jt=qe.onItemHover,Yt=qe.onTitleMouseLeave;pt.subMenuInstance=Object(_.a)(_e),jt({key:Dt,hover:!1}),Yt({key:Dt,domEvent:ze})},_e.onTitleClick=function(ze){var qe=Object(_.a)(_e),pt=qe.props;if(pt.onTitleClick({key:pt.eventKey,domEvent:ze}),pt.triggerSubMenuAction==="hover")return;_e.triggerOpenChange(!_e.getVisible(),"click"),wt(pt.store,_e.props.eventKey,!1)},_e.onSubMenuClick=function(ze){typeof _e.props.onClick=="function"&&_e.props.onClick(_e.addKeyPath(ze))},_e.onSelect=function(ze){_e.props.onSelect(ze)},_e.onDeselect=function(ze){_e.props.onDeselect(ze)},_e.getPrefixCls=function(){return"".concat(_e.props.rootPrefixCls,"-submenu")},_e.getActiveClassName=function(){return"".concat(_e.getPrefixCls(),"-active")},_e.getDisabledClassName=function(){return"".concat(_e.getPrefixCls(),"-disabled")},_e.getSelectedClassName=function(){return"".concat(_e.getPrefixCls(),"-selected")},_e.getOpenClassName=function(){return"".concat(_e.props.rootPrefixCls,"-submenu-open")},_e.getVisible=function(){return _e.state.isOpen},_e.getMode=function(){return _e.state.mode},_e.saveMenuInstance=function(ze){_e.menuInstance=ze},_e.addKeyPath=function(ze){return Object(N.a)(Object(N.a)({},ze),{},{keyPath:(ze.keyPath||[]).concat(_e.props.eventKey)})},_e.triggerOpenChange=function(ze,qe){var pt=_e.props.eventKey,Dt=function(){_e.onOpenChange({key:pt,item:Object(_.a)(_e),trigger:qe,open:ze})};qe==="mouseenter"?_e.mouseenterTimeout=setTimeout(function(){Dt()},0):Dt()},_e.isChildrenSelected=function(){var ze={find:!1};return Y(_e.props.children,_e.props.selectedKeys,ze),ze.find},_e.isInlineMode=function(){return _e.getMode()==="inline"},_e.adjustWidth=function(){if(!_e.subMenuTitle||!_e.menuInstance)return;var ze=Ze.findDOMNode(_e.menuInstance);if(ze.offsetWidth>=_e.subMenuTitle.offsetWidth)return;ze.style.minWidth="".concat(_e.subMenuTitle.offsetWidth,"px")},_e.saveSubMenuTitle=function(ze){_e.subMenuTitle=ze},_e.getBaseProps=function(){var ze=Object(_.a)(_e),qe=ze.props,pt=_e.getMode();return{mode:pt==="horizontal"?"vertical":pt,visible:_e.getVisible(),level:qe.level+1,inlineIndent:qe.inlineIndent,focusable:!1,onClick:_e.onSubMenuClick,onSelect:_e.onSelect,onDeselect:_e.onDeselect,onDestroy:_e.onDestroy,selectedKeys:qe.selectedKeys,eventKey:"".concat(qe.eventKey,"-menu-"),openKeys:qe.openKeys,motion:qe.motion,onOpenChange:_e.onOpenChange,subMenuOpenDelay:qe.subMenuOpenDelay,parentMenu:Object(_.a)(_e),subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,triggerSubMenuAction:qe.triggerSubMenuAction,builtinPlacements:qe.builtinPlacements,defaultActiveFirst:qe.store.getState().defaultActiveFirst[ie(qe.eventKey)],multiple:qe.multiple,prefixCls:qe.rootPrefixCls,id:_e.internalMenuId,manualRef:_e.saveMenuInstance,itemIcon:qe.itemIcon,expandIcon:qe.expandIcon,direction:qe.direction}},_e.getMotion=function(ze,qe){var pt=Object(_.a)(_e),Dt=pt.haveRendered,jt=_e.props,Yt=jt.motion,kr=jt.rootPrefixCls,Qr=Object(N.a)(Object(N.a)({},Yt),{},{leavedClassName:"".concat(kr,"-hidden"),removeOnLeave:!1,motionAppear:Dt||!qe||ze!=="inline"});return Qr};var De=Ue.store,Te=Ue.eventKey,je=De.getState(),Ge=je.defaultActiveFirst;_e.isRootMenu=!1;var $e=!1;return Ge&&($e=Ge[Te]),wt(De,Te,$e),_e.state={mode:Ue.mode,isOpen:Ue.isOpen},_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this,De=this.props,Te=De.mode,je=De.parentMenu,Ge=De.manualRef,$e=De.isOpen,ze=function(){_e.setState({mode:Te,isOpen:$e})},qe=$e!==this.state.isOpen,pt=Te!==this.state.mode;if((pt||qe)&&(st.a.cancel(this.updateStateRaf),pt?this.updateStateRaf=Object(st.a)(ze):ze()),Ge&&Ge(this),Te!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!$e)return;this.minWidthTimeout=setTimeout(function(){return _e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var _e=this.props,De=_e.onDestroy,Te=_e.eventKey;De&&De(Te),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),st.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(_e,De){var Te=this.getBaseProps();return m.createElement(Rr,Object(p.a)({},Te,{id:this.internalMenuId,className:_e,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var _e=this,De=this.getBaseProps(),Te=De.mode,je=De.visible,Ge=De.forceSubMenuRender,$e=De.direction,ze=this.getMotion(Te,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Ge,!this.haveOpened)return m.createElement("div",null);var qe=T()("".concat(De.prefixCls,"-sub"),Object(M.a)({},"".concat(De.prefixCls,"-rtl"),$e==="rtl"));return this.isInlineMode()?m.createElement(ye,Object(p.a)({visible:De.visible,forceRender:Ge},ze),function(pt){var Dt=pt.className,jt=pt.style,Yt=T()(qe,Dt);return _e.renderPopupMenu(Yt,jt)}):this.renderPopupMenu(qe)}},{key:"render",value:function(){var _e,De,Te,je=Object(N.a)({},this.props),Ge=this.getVisible(),$e=this.getPrefixCls(),ze=this.isInlineMode(),qe=this.getMode(),pt=T()($e,"".concat($e,"-").concat(qe),(_e={},Object(M.a)(_e,je.className,!!je.className),Object(M.a)(_e,this.getOpenClassName(),Ge),Object(M.a)(_e,this.getActiveClassName(),je.active||Ge&&!ze),Object(M.a)(_e,this.getDisabledClassName(),je.disabled),Object(M.a)(_e,this.getSelectedClassName(),this.isChildrenSelected()),_e));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(rt+=1,this.internalMenuId="$__$".concat(rt,"$Menu")));var Dt={},jt={},Yt={};je.disabled||(Dt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},jt={onClick:this.onTitleClick},Yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var kr={},Qr=je.direction,$r=Qr==="rtl";ze&&($r?kr.paddingRight=je.inlineIndent*je.level:kr.paddingLeft=je.inlineIndent*je.level);var qr={};this.getVisible()&&(qr={"aria-owns":this.internalMenuId});var zr=null;qe!=="horizontal"&&(zr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(zr=m.createElement(this.props.expandIcon,Object(N.a)({},this.props))));var rn=m.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:kr,className:"".concat($e,"-title"),role:"button"},Yt,jt,{"aria-expanded":Ge},qr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,zr||m.createElement("i",{className:"".concat($e,"-arrow")})),nn=this.renderChildren(),vn=((De=je.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Rn){return Rn.parentNode},un=mt[qe],Pn=je.popupOffset?{offset:je.popupOffset}:{},hn=T()((Te={},Object(M.a)(Te,je.popupClassName,je.popupClassName&&!ze),Object(M.a)(Te,"".concat($e,"-rtl"),$r),Te)),Nr=je.disabled,Ur=je.triggerSubMenuAction,on=je.subMenuOpenDelay,gn=je.forceSubMenuRender,Tr=je.subMenuCloseDelay,xn=je.builtinPlacements;X.forEach(function(Rn){return delete je[Rn]}),delete je.onClick;var Vn=$r?Object(N.a)(Object(N.a)({},ha),xn):Object(N.a)(Object(N.a)({},ji),xn);delete je.direction;var Cn=this.getBaseProps(),jn=ze?null:this.getMotion(Cn.mode,Cn.visible);return m.createElement("li",Object(p.a)({},je,Dt,{className:pt,role:"menuitem"}),m.createElement(ki,{prefixCls:$e,popupClassName:T()("".concat($e,"-popup"),hn),getPopupContainer:vn,builtinPlacements:Vn,popupPlacement:un,popupVisible:ze?!1:Ge,popupAlign:Pn,popup:ze?null:nn,action:Nr||ze?[]:[Ur],mouseEnterDelay:on,mouseLeaveDelay:Tr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:gn,popupMotion:jn},rn),ze?nn:null)}}]),Je}(m.Component);Lt.defaultProps={onMouseEnter:re,onMouseLeave:re,onTitleMouseEnter:re,onTitleMouseLeave:re,onTitleClick:re,manualRef:re,mode:"vertical",title:""};var It=Object(S.b)(function(Pe,Xe){var Je=Pe.openKeys,Ue=Pe.activeKey,_e=Pe.selectedKeys,De=Xe.eventKey,Te=Xe.subMenuKey;return{isOpen:Je.indexOf(De)>-1,active:Ue[Te]===De,selectedKeys:_e}})(Lt);It.isSubMenu=!0;var Kt=It,Ht="menuitem-overflowed",ht=.5,St=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(){var Ue;return Object(I.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.resizeObserver=null,Ue.mutationObserver=null,Ue.originalTotalWidth=0,Ue.overflowedItems=[],Ue.menuItemSizes=[],Ue.cancelFrameId=null,Ue.state={lastVisibleIndex:void 0},Ue.childRef=m.createRef(),Ue.getMenuItemNodes=function(){var _e=Ue.props.prefixCls,De=Ue.childRef.current;return De?[].slice.call(De.children).filter(function(Te){return Te.className.split(" ").indexOf("".concat(_e,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(_e,De,Te){var je=Ue.props,Ge=je.overflowedIndicator,$e=je.level,ze=je.mode,qe=je.prefixCls,pt=je.theme;if($e!==1||ze!=="horizontal")return null;var Dt=Ue.props.children[0],jt=Dt.props,Yt=jt.children,kr=jt.title,Qr=jt.style,$r=Object(C.a)(jt,["children","title","style"]),qr=Object(N.a)({},Qr),zr="".concat(_e,"-overflowed-indicator"),rn="".concat(_e,"-overflowed-indicator");De.length===0&&Te!==!0?qr=Object(N.a)(Object(N.a)({},qr),{},{display:"none"}):Te&&(qr=Object(N.a)(Object(N.a)({},qr),{},{visibility:"hidden",position:"absolute"}),zr="".concat(zr,"-placeholder"),rn="".concat(rn,"-placeholder"));var nn=pt?"".concat(qe,"-").concat(pt):"",vn={};return X.forEach(function(un){$r[un]!==void 0&&(vn[un]=$r[un])}),m.createElement(Kt,Object(p.a)({title:Ge,className:"".concat(qe,"-overflowed-submenu"),popupClassName:nn},vn,{key:zr,eventKey:rn,disabled:!1,style:qr}),De)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var De=_e.children;if(!De||De.length===0)return;var Te=_e.children[De.length-1];fe(Te,"display","inline-block");var je=Ue.getMenuItemNodes(),Ge=je.filter(function($e){return $e.className.split(" ").indexOf(Ht)>=0});Ge.forEach(function($e){fe($e,"display","inline-block")}),Ue.menuItemSizes=je.map(function($e){return he($e,!0)}),Ge.forEach(function($e){fe($e,"display","none")}),Ue.overflowedIndicatorWidth=he(_e.children[_e.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function($e,ze){return $e+ze},0),Ue.handleResize(),fe(Te,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var De=he(_e);Ue.overflowedItems=[];var Te=0,je;Ue.originalTotalWidth>De+ht&&(je=-1,Ue.menuItemSizes.forEach(function(Ge){Te+=Ge,Te+Ue.overflowedIndicatorWidth<=De&&(je+=1)})),Ue.setState({lastVisibleIndex:je})},Ue}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){var _e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new Ke.default(function(Te){Te.forEach(function(){var je=_e.cancelFrameId;cancelAnimationFrame(je),_e.cancelFrameId=requestAnimationFrame(_e.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(Te){_e.resizeObserver.observe(Te)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){_e.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(Te){_e.resizeObserver.observe(Te)}),_e.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(_e){var De=this,Te=this.state.lastVisibleIndex;return(_e||[]).reduce(function(je,Ge,$e){var ze=Ge;if(De.props.mode==="horizontal"){var qe=De.getOverflowedSubMenuItem(Ge.props.eventKey,[]);Te!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&($e>Te&&(ze=m.cloneElement(Ge,{style:{display:"none"},eventKey:"".concat(Ge.props.eventKey,"-hidden"),className:"".concat(Ht)})),$e===Te+1&&(De.overflowedItems=_e.slice(Te+1).map(function(Dt){return m.cloneElement(Dt,{key:Dt.props.eventKey,mode:"vertical-left"})}),qe=De.getOverflowedSubMenuItem(Ge.props.eventKey,De.overflowedItems)));var pt=[].concat(Object(h.a)(je),[qe,ze]);return $e===_e.length-1&&pt.push(De.getOverflowedSubMenuItem(Ge.props.eventKey,[],!0)),pt}return[].concat(Object(h.a)(je),[ze])},[])}},{key:"render",value:function(){var _e=this.props,De=_e.visible,Te=_e.prefixCls,je=_e.overflowedIndicator,Ge=_e.mode,$e=_e.level,ze=_e.tag,qe=_e.children,pt=_e.theme,Dt=Object(C.a)(_e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),jt=ze;return m.createElement(jt,Object(p.a)({ref:this.childRef},Dt),this.renderChildren(qe))}}]),Je}(m.Component);St.defaultProps={tag:"div",className:""};var At=St;function ur(Pe){return Pe.length?Pe.every(function(Xe){return!!Xe.props.disabled}):!0}function ar(Pe,Xe,Je){var Ue=Pe.getState();Pe.setState({activeKey:Object(N.a)(Object(N.a)({},Ue.activeKey),{},Object(M.a)({},Xe,Je))})}function Zt(Pe){return Pe.eventKey||"0-menu-"}function $t(Pe,Xe){var Je=Xe,Ue=Pe.children,_e=Pe.eventKey;if(Je){var De;if(q(Ue,function(Te,je){Te&&Te.props&&!Te.props.disabled&&Je===Se(Te,_e,je)&&(De=!0)}),De)return Je}return Je=null,Pe.defaultActiveFirst&&q(Ue,function(Te,je){!Je&&Te&&!Te.props.disabled&&(Je=Se(Te,_e,je))}),Je}function rr(Pe){if(!Pe)return;var Xe=this.instanceArray.indexOf(Pe);Xe!==-1?this.instanceArray[Xe]=Pe:this.instanceArray.push(Pe)}var cr=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(Ue){var _e;return Object(I.a)(this,Je),_e=Xe.call(this,Ue),_e.onKeyDown=function(De,Te){var je=De.keyCode,Ge;if(_e.getFlatInstanceArray().forEach(function(ze){ze&&ze.props.active&&ze.onKeyDown&&(Ge=ze.onKeyDown(De))}),Ge)return 1;var $e=null;return(je===d.a.UP||je===d.a.DOWN)&&($e=_e.step(je===d.a.UP?-1:1)),$e?(De.preventDefault(),ar(_e.props.store,Zt(_e.props),$e.props.eventKey),typeof Te=="function"&&Te($e),1):void 0},_e.onItemHover=function(De){var Te=De.key,je=De.hover;ar(_e.props.store,Zt(_e.props),je?Te:null)},_e.onDeselect=function(De){_e.props.onDeselect(De)},_e.onSelect=function(De){_e.props.onSelect(De)},_e.onClick=function(De){_e.props.onClick(De)},_e.onOpenChange=function(De){_e.props.onOpenChange(De)},_e.onDestroy=function(De){_e.props.onDestroy(De)},_e.getFlatInstanceArray=function(){return _e.instanceArray},_e.step=function(De){var Te=_e.getFlatInstanceArray(),je=_e.props.store.getState().activeKey[Zt(_e.props)],Ge=Te.length;if(!Ge)return null;De<0&&(Te=Te.concat().reverse());var $e=-1;if(Te.every(function(Dt,jt){return Dt&&Dt.props.eventKey===je?($e=jt,!1):!0}),!_e.props.defaultActiveFirst&&$e!==-1&&ur(Te.slice($e,Ge-1)))return;var ze=($e+1)%Ge,qe=ze;do{var pt=Te[qe];if(!pt||pt.props.disabled)qe=(qe+1)%Ge;else return pt}while(qe!==ze);return null},_e.renderCommonMenuItem=function(De,Te,je){var Ge=_e.props.store.getState(),$e=Object(_.a)(_e),ze=$e.props,qe=Se(De,ze.eventKey,Te),pt=De.props;if(!pt||typeof De.type=="string")return De;var Dt=qe===Ge.activeKey,jt=Object(N.a)(Object(N.a)({mode:pt.mode||ze.mode,level:ze.level,inlineIndent:ze.inlineIndent,renderMenuItem:_e.renderMenuItem,rootPrefixCls:ze.prefixCls,index:Te,parentMenu:ze.parentMenu,manualRef:pt.disabled?void 0:Object(P.a)(De.ref,rr.bind(Object(_.a)(_e))),eventKey:qe,active:!pt.disabled&&Dt,multiple:ze.multiple,onClick:function(kr){(pt.onClick||re)(kr),_e.onClick(kr)},onItemHover:_e.onItemHover,motion:ze.motion,subMenuOpenDelay:ze.subMenuOpenDelay,subMenuCloseDelay:ze.subMenuCloseDelay,forceSubMenuRender:ze.forceSubMenuRender,onOpenChange:_e.onOpenChange,onDeselect:_e.onDeselect,onSelect:_e.onSelect,builtinPlacements:ze.builtinPlacements,itemIcon:pt.itemIcon||_e.props.itemIcon,expandIcon:pt.expandIcon||_e.props.expandIcon},je),{},{direction:ze.direction});return(ze.mode==="inline"||xe())&&(jt.triggerSubMenuAction="click"),m.cloneElement(De,Object(N.a)(Object(N.a)({},jt),{},{key:qe||Te}))},_e.renderMenuItem=function(De,Te,je){if(!De)return null;var Ge=_e.props.store.getState(),$e={openKeys:Ge.openKeys,selectedKeys:Ge.selectedKeys,triggerSubMenuAction:_e.props.triggerSubMenuAction,subMenuKey:je};return _e.renderCommonMenuItem(De,Te,$e)},Ue.store.setState({activeKey:Object(N.a)(Object(N.a)({},Ue.store.getState().activeKey),{},Object(M.a)({},Ue.eventKey,$t(Ue,Ue.activeKey)))}),_e.instanceArray=[],_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(_e){return this.props.visible||_e.visible||this.props.className!==_e.className||!G()(this.props.style,_e.style)}},{key:"componentDidUpdate",value:function(_e){var De=this.props,Te="activeKey"in De?De.activeKey:De.store.getState().activeKey[Zt(De)],je=$t(De,Te);if(je!==Te)ar(De.store,Zt(De),je);else if("activeKey"in _e){var Ge=$t(_e,_e.activeKey);je!==Ge&&ar(De.store,Zt(De),je)}}},{key:"render",value:function(){var _e=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 Ge=De.prefixCls,$e=De.eventKey,ze=De.visible,qe=De.level,pt=De.mode,Dt=De.overflowedIndicator,jt=De.theme;return X.forEach(function(Yt){return delete De[Yt]}),delete De.onClick,m.createElement(At,Object(p.a)({},De,{prefixCls:Ge,mode:pt,tag:"ul",level:qe,theme:jt,visible:ze,overflowedIndicator:Dt},je),Object(y.a)(De.children).map(function(Yt,kr){return _e.renderMenuItem(Yt,kr,$e||"0-menu-")}))}}]),Je}(m.Component);cr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:re};var lt=Object(S.b)()(cr),Rr=lt,jr=D("Kwbf");function xr(Pe,Xe,Je){var Ue=Pe.prefixCls,_e=Pe.motion,De=Pe.defaultMotions,Te=De===void 0?{}:De,je=Pe.openAnimation,Ge=Pe.openTransitionName,$e=Xe.switchingModeFromInline;if(_e)return _e;if(Object(z.a)(je)==="object"&&je)Object(jr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Ue,"-open-").concat(je)};if(Ge)return{motionName:Ge};var ze=Te[Je];return ze||($e?null:Te.other)}var _t=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(Ue){var _e;Object(I.a)(this,Je),_e=Xe.call(this,Ue),_e.onSelect=function(je){var Ge=Object(_.a)(_e),$e=Ge.props;if($e.selectable){var ze=_e.store.getState(),qe=ze.selectedKeys,pt=je.key;$e.multiple?qe=qe.concat([pt]):qe=[pt],"selectedKeys"in $e||_e.store.setState({selectedKeys:qe}),$e.onSelect(Object(N.a)(Object(N.a)({},je),{},{selectedKeys:qe}))}},_e.onClick=function(je){var Ge=_e.getRealMenuMode(),$e=Object(_.a)(_e),ze=$e.store,qe=$e.props.onOpenChange;Ge!=="inline"&&!("openKeys"in _e.props)&&(ze.setState({openKeys:[]}),qe([])),_e.props.onClick(je)},_e.onKeyDown=function(je,Ge){_e.innerMenu.getWrappedInstance().onKeyDown(je,Ge)},_e.onOpenChange=function(je){var Ge=Object(_.a)(_e),$e=Ge.props,ze=_e.store.getState().openKeys.concat(),qe=!1,pt=function(jt){var Yt=!1;if(jt.open)Yt=ze.indexOf(jt.key)===-1,Yt&&ze.push(jt.key);else{var kr=ze.indexOf(jt.key);Yt=kr!==-1,Yt&&ze.splice(kr,1)}qe=qe||Yt};Array.isArray(je)?je.forEach(pt):pt(je),qe&&("openKeys"in _e.props||_e.store.setState({openKeys:ze}),$e.onOpenChange(ze))},_e.onDeselect=function(je){var Ge=Object(_.a)(_e),$e=Ge.props;if($e.selectable){var ze=_e.store.getState().selectedKeys.concat(),qe=je.key,pt=ze.indexOf(qe);pt!==-1&&ze.splice(pt,1),"selectedKeys"in $e||_e.store.setState({selectedKeys:ze}),$e.onDeselect(Object(N.a)(Object(N.a)({},je),{},{selectedKeys:ze}))}},_e.onMouseEnter=function(je){_e.restoreModeVerticalFromInline();var Ge=_e.props.onMouseEnter;Ge&&Ge(je)},_e.onTransitionEnd=function(je){var Ge=je.propertyName==="width"&&je.target===je.currentTarget,$e=je.target.className,ze=Object.prototype.toString.call($e)==="[object SVGAnimatedString]"?$e.animVal:$e,qe=je.propertyName==="font-size"&&ze.indexOf("anticon")>=0;(Ge||qe)&&_e.restoreModeVerticalFromInline()},_e.setInnerMenu=function(je){_e.innerMenu=je},_e.isRootMenu=!0;var De=Ue.defaultSelectedKeys,Te=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(De=Ue.selectedKeys||[]),"openKeys"in Ue&&(Te=Ue.openKeys||[]),_e.store=Object(S.c)({selectedKeys:De,openKeys:Te,activeKey:{"0-menu-":$t(Ue,Ue.activeKey)}}),_e.state={switchingModeFromInline:!1,prevProps:Ue,inlineOpenKeys:[],store:_e.store},_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(_e){var De=this.props,Te=De.siderCollapsed,je=De.inlineCollapsed,Ge=De.onOpenChange;(!_e.inlineCollapsed&&je||!_e.siderCollapsed&&Te)&&Ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var _e=this.props.collapsedWidth,De=this.store,Te=this.prevOpenKeys,je=this.getInlineCollapsed()&&(_e===0||_e==="0"||_e==="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 _e=this.props.mode,De=this.state.switchingModeFromInline,Te=this.getInlineCollapsed();return De&&Te?"inline":Te?"vertical":_e}},{key:"getInlineCollapsed",value:function(){var _e=this.props,De=_e.inlineCollapsed,Te=_e.siderCollapsed;return Te!==void 0?Te:De}},{key:"restoreModeVerticalFromInline",value:function(){var _e=this.state.switchingModeFromInline;_e&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var _e=Object(N.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return _e.className+=" ".concat(_e.prefixCls,"-root"),_e.direction==="rtl"&&(_e.className+=" ".concat(_e.prefixCls,"-rtl")),_e=Object(N.a)(Object(N.a)({},_e),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:xr(this.props,this.state,De)}),delete _e.openAnimation,delete _e.openTransitionName,m.createElement(S.a,{store:this.store},m.createElement(Rr,Object(p.a)({},_e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(_e,De){var Te=De.prevProps,je=De.store,Ge=je.getState(),$e={},ze={prevProps:_e};return Te.mode==="inline"&&_e.mode!=="inline"&&(ze.switchingModeFromInline=!0),"openKeys"in _e?$e.openKeys=_e.openKeys||[]:((_e.inlineCollapsed&&!Te.inlineCollapsed||_e.siderCollapsed&&!Te.siderCollapsed)&&(ze.switchingModeFromInline=!0,ze.inlineOpenKeys=Ge.openKeys,$e.openKeys=[]),(!_e.inlineCollapsed&&Te.inlineCollapsed||!_e.siderCollapsed&&Te.siderCollapsed)&&($e.openKeys=De.inlineOpenKeys,ze.inlineOpenKeys=[])),Object.keys($e).length&&je.setState($e),ze}}]),Je}(m.Component);_t.defaultProps={selectable:!0,onClick:re,onSelect:re,onOpenChange:re,onDeselect:re,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:m.createElement("span",null,"\xB7\xB7\xB7")};var Rt=_t,Et=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(){var Ue;return Object(I.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.onKeyDown=function(_e){var De=_e.keyCode;return De===d.a.ENTER?(Ue.onClick(_e),!0):void 0},Ue.onMouseLeave=function(_e){var De=Ue.props,Te=De.eventKey,je=De.onItemHover,Ge=De.onMouseLeave;je({key:Te,hover:!1}),Ge({key:Te,domEvent:_e})},Ue.onMouseEnter=function(_e){var De=Ue.props,Te=De.eventKey,je=De.onItemHover,Ge=De.onMouseEnter;je({key:Te,hover:!0}),Ge({key:Te,domEvent:_e})},Ue.onClick=function(_e){var De=Ue.props,Te=De.eventKey,je=De.multiple,Ge=De.onClick,$e=De.onSelect,ze=De.onDeselect,qe=De.isSelected,pt={key:Te,keyPath:[Te],item:Object(_.a)(Ue),domEvent:_e};Ge(pt),je?qe?ze(pt):$e(pt):qe||$e(pt)},Ue.saveNode=function(_e){Ue.node=_e},Ue}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var _e=this.props;_e.onDestroy&&_e.onDestroy(_e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var _e,De=Object(N.a)({},this.props),Te=T()(this.getPrefixCls(),De.className,(_e={},Object(M.a)(_e,this.getActiveClassName(),!De.disabled&&De.active),Object(M.a)(_e,this.getSelectedClassName(),De.isSelected),Object(M.a)(_e,this.getDisabledClassName(),De.disabled),_e)),je=Object(N.a)(Object(N.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(N.a)(Object(N.a)({},je),{},{role:"option","aria-selected":De.isSelected}):(De.role===null||De.role==="none")&&(je.role="none");var Ge={onClick:De.disabled?null:this.onClick,onMouseLeave:De.disabled?null:this.onMouseLeave,onMouseEnter:De.disabled?null:this.onMouseEnter},$e=Object(N.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?$e.paddingRight=De.inlineIndent*De.level:$e.paddingLeft=De.inlineIndent*De.level),X.forEach(function(qe){return delete De[qe]}),delete De.direction;var ze=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ze=m.createElement(this.props.itemIcon,this.props)),m.createElement("li",Object(p.a)({},Object(F.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Ge,{style:$e,ref:this.saveNode}),De.children,ze)}}]),Je}(m.Component);Et.isMenuItem=!0,Et.defaultProps={onSelect:re,onMouseEnter:re,onMouseLeave:re,manualRef:re};var Mt=Object(S.b)(function(Pe,Xe){var Je=Pe.activeKey,Ue=Pe.selectedKeys,_e=Xe.eventKey,De=Xe.subMenuKey;return{active:Je[De]===_e,isSelected:Array.isArray(Ue)?Ue.indexOf(_e)!==-1:Ue===_e}})(Et),qt=Mt,pr=function(Pe){Object(E.a)(Je,Pe);var Xe=Object(w.a)(Je);function Je(){var Ue;return Object(I.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.renderInnerMenuItem=function(_e){var De=Ue.props,Te=De.renderMenuItem,je=De.index;return Te(_e,je,Ue.props.subMenuKey)},Ue}return Object(O.a)(Je,[{key:"render",value:function(){var _e=Object(p.a)({},this.props),De=_e.className,Te=De===void 0?"":De,je=_e.rootPrefixCls,Ge="".concat(je,"-item-group-title"),$e="".concat(je,"-item-group-list"),ze=_e.title,qe=_e.children;return X.forEach(function(pt){return delete _e[pt]}),delete _e.direction,m.createElement("li",Object(p.a)({},_e,{onClick:function(Dt){return Dt.stopPropagation()},className:"".concat(Te," ").concat(je,"-item-group")}),m.createElement("div",{className:Ge,title:typeof ze=="string"?ze:void 0},ze),m.createElement("ul",{className:$e},m.Children.map(qe,this.renderInnerMenuItem)))}}]),Je}(m.Component);pr.isMenuItemGroup=!0,pr.defaultProps={disabled:!0};var er=pr,Ir=function(Xe){var Je=Xe.className,Ue=Xe.rootPrefixCls,_e=Xe.style;return m.createElement("li",{className:"".concat(Je," ").concat(Ue,"-item-divider"),style:_e})};Ir.defaultProps={disabled:!0,className:"",style:{}};var Hr=Ir,yr=Rt,at=D("eDIo");function zt(Pe,Xe){var Je=Pe.prefixCls,Ue=Pe.editable,_e=Pe.locale,De=Pe.style;return!Ue||Ue.showAdd===!1?null:m.createElement("button",{ref:Xe,type:"button",className:"".concat(Je,"-nav-add"),style:De,"aria-label":(_e==null?void 0:_e.addAriaLabel)||"Add tab",onClick:function(je){Ue.onEdit("add",{event:je})}},Ue.addIcon||"+")}var sn=m.forwardRef(zt);function en(Pe,Xe){var Je=Pe.prefixCls,Ue=Pe.id,_e=Pe.tabs,De=Pe.locale,Te=Pe.mobile,je=Pe.moreIcon,Ge=je===void 0?"More":je,$e=Pe.moreTransitionName,ze=Pe.style,qe=Pe.className,pt=Pe.editable,Dt=Pe.tabBarGutter,jt=Pe.rtl,Yt=Pe.onTabClick,kr=Object(m.useState)(!1),Qr=Object(g.a)(kr,2),$r=Qr[0],qr=Qr[1],zr=Object(m.useState)(null),rn=Object(g.a)(zr,2),nn=rn[0],vn=rn[1],un="".concat(Ue,"-more-popup"),Pn="".concat(Je,"-dropdown"),hn=nn!==null?"".concat(un,"-").concat(nn):null,Nr=De==null?void 0:De.dropdownAriaLabel,Ur=m.createElement(yr,{onClick:function(jn){var Rn=jn.key,ei=jn.domEvent;Yt(Rn,ei),qr(!1)},id:un,tabIndex:-1,role:"listbox","aria-activedescendant":hn,selectedKeys:[nn],"aria-label":Nr!==void 0?Nr:"expanded dropdown"},_e.map(function(Cn){return m.createElement(qt,{key:Cn.key,id:"".concat(un,"-").concat(Cn.key),role:"option","aria-controls":Ue&&"".concat(Ue,"-panel-").concat(Cn.key),disabled:Cn.disabled},Cn.tab)}));function on(Cn){for(var jn=_e.filter(function(gi){return!gi.disabled}),Rn=jn.findIndex(function(gi){return gi.key===nn})||0,ei=jn.length,ui=0;ui<ei;ui+=1){Rn=(Rn+Cn+ei)%ei;var Xn=jn[Rn];if(!Xn.disabled){vn(Xn.key);return}}}function gn(Cn){var jn=Cn.which;if(!$r){[d.a.DOWN,d.a.SPACE,d.a.ENTER].includes(jn)&&(qr(!0),Cn.preventDefault());return}switch(jn){case d.a.UP:on(-1),Cn.preventDefault();break;case d.a.DOWN:on(1),Cn.preventDefault();break;case d.a.ESC:qr(!1);break;case d.a.SPACE:case d.a.ENTER:nn!==null&&Yt(nn,Cn);break}}Object(m.useEffect)(function(){var Cn=document.getElementById(hn);Cn&&Cn.scrollIntoView&&Cn.scrollIntoView(!1)},[nn]),Object(m.useEffect)(function(){$r||vn(null)},[$r]);var Tr=Object(M.a)({},jt?"marginLeft":"marginRight",Dt);_e.length||(Tr.visibility="hidden",Tr.order=1);var xn=T()(Object(M.a)({},"".concat(Pn,"-rtl"),jt)),Vn=Te?null:m.createElement(at.a,{prefixCls:Pn,overlay:Ur,trigger:["hover"],visible:$r,transitionName:$e,onVisibleChange:qr,overlayClassName:xn,mouseEnterDelay:.1,mouseLeaveDelay:.1},m.createElement("button",{type:"button",className:"".concat(Je,"-nav-more"),style:Tr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":un,id:"".concat(Ue,"-more"),"aria-expanded":$r,onKeyDown:gn},Ge));return m.createElement("div",{className:T()("".concat(Je,"-nav-operations"),qe),style:ze,ref:Xe},Vn,m.createElement(sn,{prefixCls:Je,locale:De,editable:pt}))}var mr=m.forwardRef(en),Dr=Object(m.createContext)(null),Mr=.1,Ft=.01,Qt=20,gr=Math.pow(.995,Qt);function tr(){var Pe=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Pe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Pe.substr(0,4)))}function gt(Pe,Xe){var Je=Object(m.useState)(),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1],Te=Object(m.useState)(0),je=Object(g.a)(Te,2),Ge=je[0],$e=je[1],ze=Object(m.useState)(0),qe=Object(g.a)(ze,2),pt=qe[0],Dt=qe[1],jt=Object(m.useState)(),Yt=Object(g.a)(jt,2),kr=Yt[0],Qr=Yt[1],$r=Object(m.useRef)();function qr(Nr){var Ur=Nr.touches[0],on=Ur.screenX,gn=Ur.screenY;De({x:on,y:gn}),window.clearInterval($r.current)}function zr(Nr){if(!_e)return;Nr.preventDefault();var Ur=Nr.touches[0],on=Ur.screenX,gn=Ur.screenY;De({x:on,y:gn});var Tr=on-_e.x,xn=gn-_e.y;Xe(Tr,xn);var Vn=Date.now();$e(Vn),Dt(Vn-Ge),Qr({x:Tr,y:xn})}function rn(){if(!_e)return;if(De(null),Qr(null),kr){var Nr=kr.x/pt,Ur=kr.y/pt,on=Math.abs(Nr),gn=Math.abs(Ur);if(Math.max(on,gn)<Mr)return;var Tr=Nr,xn=Ur;$r.current=window.setInterval(function(){if(Math.abs(Tr)<Ft&&Math.abs(xn)<Ft){window.clearInterval($r.current);return}Tr*=gr,xn*=gr,Xe(Tr*Qt,xn*Qt)},Qt)}}var nn=Object(m.useRef)(0),vn=Object(m.useRef)(!1),un=Object(m.useRef)();function Pn(Nr){var Ur=Nr.deltaX,on=Nr.deltaY,gn=0,Tr=Math.abs(Ur),xn=Math.abs(on);Tr===xn?gn=un.current==="x"?Ur:on:Tr>xn?(gn=Ur,un.current="x"):(gn=on,un.current="y");var Vn=Date.now();Vn-nn.current>100&&(vn.current=!1),(Xe(-gn,-gn)||vn.current)&&(Nr.preventDefault(),vn.current=!0),nn.current=Vn}var hn=Object(m.useRef)(null);hn.current={onTouchStart:qr,onTouchMove:zr,onTouchEnd:rn,onWheel:Pn},m.useEffect(function(){function Nr(Tr){hn.current.onTouchStart(Tr)}function Ur(Tr){hn.current.onTouchMove(Tr)}function on(Tr){hn.current.onTouchEnd(Tr)}function gn(Tr){hn.current.onWheel(Tr)}return document.addEventListener("touchmove",Ur,{passive:!1}),document.addEventListener("touchend",on,{passive:!1}),Pe.current.addEventListener("touchstart",Nr,{passive:!1}),Pe.current.addEventListener("wheel",gn),function(){document.removeEventListener("touchmove",Ur),document.removeEventListener("touchend",on)}},[])}function yt(){var Pe=Object(m.useRef)(new Map);function Xe(Ue){return Pe.current.has(Ue)||Pe.current.set(Ue,m.createRef()),Pe.current.get(Ue)}function Je(Ue){Pe.current.delete(Ue)}return[Xe,Je]}function Gt(Pe,Xe){var Je=m.useRef(Pe),Ue=m.useState({}),_e=Object(g.a)(Ue,2),De=_e[1];function Te(je){var Ge=typeof je=="function"?je(Je.current):je;Ge!==Je.current&&Xe(Ge,Je.current),Je.current=Ge,De({})}return[Je.current,Te]}var Pt=function(Xe){var Je=Xe.position,Ue=Xe.prefixCls,_e=Xe.extra;if(!_e)return null;var De,Te=_e;return Je==="right"&&(De=Te.right||!Te.left&&Te||null),Je==="left"&&(De=Te.left||null),De?m.createElement("div",{className:"".concat(Ue,"-extra-content")},De):null};function Lr(Pe,Xe){var Je,Ue=m.useContext(Dr),_e=Ue.prefixCls,De=Ue.tabs,Te=Pe.className,je=Pe.style,Ge=Pe.id,$e=Pe.animated,ze=Pe.activeKey,qe=Pe.rtl,pt=Pe.extra,Dt=Pe.editable,jt=Pe.locale,Yt=Pe.tabPosition,kr=Pe.tabBarGutter,Qr=Pe.children,$r=Pe.onTabClick,qr=Pe.onTabScroll,zr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useRef)(),vn=Object(m.useRef)(),un=yt(),Pn=Object(g.a)(un,2),hn=Pn[0],Nr=Pn[1],Ur=Yt==="top"||Yt==="bottom",on=Gt(0,function(Nn,Sn){Ur&&qr&&qr({direction:Nn>Sn?"left":"right"})}),gn=Object(g.a)(on,2),Tr=gn[0],xn=gn[1],Vn=Gt(0,function(Nn,Sn){!Ur&&qr&&qr({direction:Nn>Sn?"top":"bottom"})}),Cn=Object(g.a)(Vn,2),jn=Cn[0],Rn=Cn[1],ei=Object(m.useState)(0),ui=Object(g.a)(ei,2),Xn=ui[0],gi=ui[1],Xi=Object(m.useState)(0),Si=Object(g.a)(Xi,2),ci=Si[0],Fn=Si[1],Un=Object(m.useState)(0),Yn=Object(g.a)(Un,2),zn=Yn[0],ai=Yn[1],Ai=Object(m.useState)(0),ra=Object(g.a)(Ai,2),Dn=ra[0],Fi=ra[1],Ui=Object(m.useState)(null),Mn=Object(g.a)(Ui,2),In=Mn[0],oi=Mn[1],Ba=Object(m.useState)(null),wa=Object(g.a)(Ba,2),sa=wa[0],la=wa[1],La=Object(m.useState)(0),Ta=Object(g.a)(La,2),ka=Ta[0],Ha=Ta[1],Xa=Object(m.useState)(0),Pa=Object(g.a)(Xa,2),ua=Pa[0],Sa=Pa[1],ba=s(new Map),ca=Object(g.a)(ba,2),co=ca[0],_a=ca[1],Ca=r(De,co,Xn),da="".concat(_e,"-nav-operations-hidden"),fa=0,Yi=0;Ur?qe?(fa=0,Yi=Math.max(0,Xn-In)):(fa=Math.min(0,In-Xn),Yi=0):(fa=Math.min(0,sa-ci),Yi=0);function na(Nn){return Nn<fa?[fa,!1]:Nn>Yi?[Yi,!1]:[Nn,!0]}var wr=Object(m.useRef)(),Sr=Object(m.useState)(),or=Object(g.a)(Sr,2),wn=or[0],hr=or[1];function pa(){hr(Date.now())}function Ya(){window.clearTimeout(wr.current)}gt(zr,function(Nn,Sn){var bi=!1;function Hi(Ma,ma){Ma(function(Ka){var Ea=na(Ka+ma),_i=Object(g.a)(Ea,2),Qa=_i[0],fo=_i[1];return bi=fo,Qa})}if(Ur){if(In>=Xn)return bi;Hi(xn,Nn)}else{if(sa>=ci)return bi;Hi(Rn,Sn)}return Ya(),pa(),bi}),Object(m.useEffect)(function(){return Ya(),wn&&(wr.current=window.setTimeout(function(){hr(0)},100)),Ya},[wn]);function Hn(){var Nn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ze,Sn=Ca.get(Nn);if(!Sn)return;if(Ur){var bi=Tr;qe?Sn.right<Tr?bi=Sn.right:Sn.right+Sn.width>Tr+In&&(bi=Sn.right+Sn.width-In):Sn.left<-Tr?bi=-Sn.left:Sn.left+Sn.width>-Tr+In&&(bi=-(Sn.left+Sn.width-In)),Rn(0),xn(na(bi)[0])}else{var Hi=jn;Sn.top<-jn?Hi=-Sn.top:Sn.top+Sn.height>-jn+sa&&(Hi=-(Sn.top+Sn.height-sa)),xn(0),Rn(na(Hi)[0])}}var Oa=b(Ca,{width:In,height:sa,left:Tr,top:jn},{width:zn,height:Dn},{width:ka,height:ua},Object(N.a)(Object(N.a)({},Pe),{},{tabs:De})),Io=Object(g.a)(Oa,2),Jo=Io[0],Qo=Io[1],Zo=De.map(function(Nn){var Sn=Nn.key;return m.createElement(l,{id:Ge,prefixCls:_e,key:Sn,rtl:qe,tab:Nn,closable:Nn.closable,editable:Dt,active:Sn===ze,tabPosition:Yt,tabBarGutter:kr,renderWrapper:Qr,removeAriaLabel:jt==null?void 0:jt.removeAriaLabel,ref:hn(Sn),onClick:function(Hi){$r(Sn,Hi)},onRemove:function(){Nr(Sn)},onFocus:function(){Hn(Sn),pa(),qe||(zr.current.scrollLeft=0),zr.current.scrollTop=0}})}),ho=n(function(){var Nn,Sn,bi,Hi,Ma,ma,Ka,Ea,_i,Qa=((Nn=zr.current)===null||Nn===void 0?void 0:Nn.offsetWidth)||0,fo=((Sn=zr.current)===null||Sn===void 0?void 0:Sn.offsetHeight)||0,po=((bi=vn.current)===null||bi===void 0?void 0:bi.offsetWidth)||0,Wi=((Hi=vn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Ln=((Ma=nn.current)===null||Ma===void 0?void 0:Ma.offsetWidth)||0,aa=((ma=nn.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;oi(Qa),la(fo),Ha(po),Sa(Wi);var ga=(((Ka=rn.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,va=(((Ea=rn.current)===null||Ea===void 0?void 0:Ea.offsetHeight)||0)-Wi;gi(ga),Fn(va);var mo=(_i=nn.current)===null||_i===void 0?void 0:_i.className.includes(da);ai(ga-(mo?0:Ln)),Fi(va-(mo?0:aa)),_a(function(){var Za=new Map;return De.forEach(function(Mo){var No=Mo.key,Ra=hn(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=De.slice(0,Jo),Bi=De.slice(Qo+1),hi=[].concat(Object(h.a)(qo),Object(h.a)(Bi)),Ri=Object(m.useState)(),fi=Object(g.a)(Ri,2),Wa=fi[0],es=fi[1],ia=Ca.get(ze),Do=Object(m.useRef)();function Lo(){c.a.cancel(Do.current)}Object(m.useEffect)(function(){var Nn={};return ia&&(Ur?(qe?Nn.right=ia.right:Nn.left=ia.left,Nn.width=ia.width):(Nn.top=ia.top,Nn.height=ia.height)),Lo(),Do.current=c()(function(){es(Nn)}),Lo},[ia,Ur,qe]),Object(m.useEffect)(function(){Hn()},[ze,ia,Ca,Ur]),Object(m.useEffect)(function(){ho()},[qe,kr,ze,De.map(function(Nn){return Nn.key}).join("_")]);var ko=!!hi.length,Aa="".concat(_e,"-nav-wrap"),$a,za,Po,Ja;return Ur?qe?(za=Tr>0,$a=Tr+In<Xn):($a=Tr<0,za=-Tr+In<Xn):(Po=jn<0,Ja=-jn+sa<ci),m.createElement("div",{ref:Xe,role:"tablist",className:T()("".concat(_e,"-nav"),Te),style:je,onKeyDown:function(){pa()}},m.createElement(Pt,{position:"left",extra:pt,prefixCls:_e}),m.createElement(a.a,{onResize:ho},m.createElement("div",{className:T()(Aa,(Je={},Object(M.a)(Je,"".concat(Aa,"-ping-left"),$a),Object(M.a)(Je,"".concat(Aa,"-ping-right"),za),Object(M.a)(Je,"".concat(Aa,"-ping-top"),Po),Object(M.a)(Je,"".concat(Aa,"-ping-bottom"),Ja),Je)),ref:zr},m.createElement(a.a,{onResize:ho},m.createElement("div",{ref:rn,className:"".concat(_e,"-nav-list"),style:{transform:"translate(".concat(Tr,"px, ").concat(jn,"px)"),transition:wn?"none":void 0}},Zo,m.createElement(sn,{ref:vn,prefixCls:_e,locale:jt,editable:Dt,style:{visibility:ko?"hidden":null}}),m.createElement("div",{className:T()("".concat(_e,"-ink-bar"),Object(M.a)({},"".concat(_e,"-ink-bar-animated"),$e.inkBar)),style:Wa}))))),m.createElement(mr,Object.assign({},Pe,{ref:nn,prefixCls:_e,tabs:hi,className:!ko&&da})),m.createElement(Pt,{position:"right",extra:pt,prefixCls:_e}))}var an=m.forwardRef(Lr);function ln(Pe){var Xe=Pe.id,Je=Pe.activeKey,Ue=Pe.animated,_e=Pe.tabPosition,De=Pe.rtl,Te=Pe.destroyInactiveTabPane,je=m.useContext(Dr),Ge=je.prefixCls,$e=je.tabs,ze=Ue.tabPane,qe=$e.findIndex(function(pt){return pt.key===Je});return m.createElement("div",{className:T()("".concat(Ge,"-content-holder"))},m.createElement("div",{className:T()("".concat(Ge,"-content"),"".concat(Ge,"-content-").concat(_e),Object(M.a)({},"".concat(Ge,"-content-animated"),ze)),style:qe&&ze?Object(M.a)({},De?"marginRight":"marginLeft","-".concat(qe,"00%")):null},$e.map(function(pt){return m.cloneElement(pt.node,{key:pt.key,prefixCls:Ge,tabKey:pt.key,id:Xe,animated:ze,active:pt.key===Je,destroyInactiveTabPane:Te})})))}function Or(Pe){var Xe=Pe.prefixCls,Je=Pe.forceRender,Ue=Pe.className,_e=Pe.style,De=Pe.id,Te=Pe.active,je=Pe.animated,Ge=Pe.destroyInactiveTabPane,$e=Pe.tabKey,ze=Pe.children,qe=m.useState(Je),pt=Object(g.a)(qe,2),Dt=pt[0],jt=pt[1];m.useEffect(function(){Te?jt(!0):Ge&&jt(!1)},[Te,Ge]);var Yt={};return Te||(je?(Yt.visibility="hidden",Yt.height=0,Yt.overflowY="hidden"):Yt.display="none"),m.createElement("div",{id:De&&"".concat(De,"-panel-").concat($e),role:"tabpanel",tabIndex:Te?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat($e),"aria-hidden":!Te,style:Object(N.a)(Object(N.a)({},Yt),_e),className:T()("".concat(Xe,"-tabpane"),Te&&"".concat(Xe,"-tabpane-active"),Ue)},(Te||Dt||Je)&&ze)}var tn=0;function Fr(Pe){return Object(y.a)(Pe).map(function(Xe){if(m.isValidElement(Xe)){var Je=Xe.key!==void 0?String(Xe.key):void 0;return Object(N.a)(Object(N.a)({key:Je},Xe.props),{},{node:Xe})}return null}).filter(function(Xe){return Xe})}function pn(Pe,Xe){var Je,Ue=Pe.id,_e=Pe.prefixCls,De=_e===void 0?"rc-tabs":_e,Te=Pe.className,je=Pe.children,Ge=Pe.direction,$e=Pe.activeKey,ze=Pe.defaultActiveKey,qe=Pe.editable,pt=Pe.animated,Dt=Pe.tabPosition,jt=Dt===void 0?"top":Dt,Yt=Pe.tabBarGutter,kr=Pe.tabBarStyle,Qr=Pe.tabBarExtraContent,$r=Pe.locale,qr=Pe.moreIcon,zr=Pe.moreTransitionName,rn=Pe.destroyInactiveTabPane,nn=Pe.renderTabBar,vn=Pe.onChange,un=Pe.onTabClick,Pn=Pe.onTabScroll,hn=Object(C.a)(Pe,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Nr=Fr(je),Ur=Ge==="rtl",on;pt===!1?on={inkBar:!1,tabPane:!1}:on=Object(N.a)({inkBar:!0,tabPane:!1},pt!==!0?pt:null);var gn=Object(m.useState)(!1),Tr=Object(g.a)(gn,2),xn=Tr[0],Vn=Tr[1];Object(m.useEffect)(function(){Vn(tr())},[]);var Cn=Object(t.a)(function(){var Dn;return(Dn=Nr[0])===null||Dn===void 0?void 0:Dn.key},{value:$e,defaultValue:ze}),jn=Object(g.a)(Cn,2),Rn=jn[0],ei=jn[1],ui=Object(m.useState)(function(){return Nr.findIndex(function(Dn){return Dn.key===Rn})}),Xn=Object(g.a)(ui,2),gi=Xn[0],Xi=Xn[1];Object(m.useEffect)(function(){var Dn=Nr.findIndex(function(Ui){return Ui.key===Rn});if(Dn===-1){var Fi;Dn=Math.max(0,Math.min(gi,Nr.length-1)),ei((Fi=Nr[Dn])===null||Fi===void 0?void 0:Fi.key)}Xi(Dn)},[Nr.map(function(Dn){return Dn.key}).join("_"),Rn,gi]);var Si=Object(t.a)(null,{value:Ue}),ci=Object(g.a)(Si,2),Fn=ci[0],Un=ci[1],Yn=jt;xn&&!["left","right"].includes(jt)&&(Yn="top"),Object(m.useEffect)(function(){Ue||(Un("rc-tabs-".concat(tn)),tn+=1)},[]);function zn(Dn,Fi){un==null||un(Dn,Fi),ei(Dn),vn==null||vn(Dn)}var ai={id:Fn,activeKey:Rn,animated:on,tabPosition:Yn,rtl:Ur,mobile:xn},Ai,ra=Object(N.a)(Object(N.a)({},ai),{},{editable:qe,locale:$r,moreIcon:qr,moreTransitionName:zr,tabBarGutter:Yt,onTabClick:zn,onTabScroll:Pn,extra:Qr,style:kr,panes:je});return nn?Ai=nn(ra,an):Ai=m.createElement(an,Object.assign({},ra)),m.createElement(Dr.Provider,{value:{tabs:Nr,prefixCls:De}},m.createElement("div",Object.assign({ref:Xe,id:Ue,className:T()(De,"".concat(De,"-").concat(Yn),(Je={},Object(M.a)(Je,"".concat(De,"-mobile"),xn),Object(M.a)(Je,"".concat(De,"-editable"),qe),Object(M.a)(Je,"".concat(De,"-rtl"),Ur),Je),Te)},hn),Ai,m.createElement(ln,Object.assign({destroyInactiveTabPane:rn},ai,{animated:on}))))}var Xr=m.forwardRef(pn);Xr.TabPane=Or;var mn=Xr,Qn=J.b=mn},kSUc:function(H,J,D){},lPiR:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(g){var C=M,N=C.lib,m=N.WordArray,v=N.Hasher,T=C.algo,y=[],t=[];(function(){function c(d){for(var f=g.sqrt(d),l=2;l<=f;l++)if(!(d%l))return!1;return!0}function a(d){return(d-(d|0))*4294967296|0}for(var n=2,s=0;s<64;)c(n)&&(s<8&&(y[s]=a(g.pow(n,1/2))),t[s]=a(g.pow(n,1/3)),s++),n++})();var h=[],i=T.SHA256=v.extend({_doReset:function(){this._hash=new m.init(y.slice(0))},_doProcessBlock:function(c,a){for(var n=this._hash.words,s=n[0],d=n[1],f=n[2],l=n[3],o=n[4],r=n[5],x=n[6],b=n[7],p=0;p<64;p++){if(p<16)h[p]=c[a+p]|0;else{var I=h[p-15],O=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,_=h[p-2],E=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;h[p]=O+h[p-7]+E+h[p-16]}var w=o&r^~o&x,S=s&d^s&f^d&f,F=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),P=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),L=b+P+w+t[p]+h[p],G=F+S;b=x,x=r,r=o,o=l+L|0,l=f,f=d,d=s,s=L+G|0}n[0]=n[0]+s|0,n[1]=n[1]+d|0,n[2]=n[2]+f|0,n[3]=n[3]+l|0,n[4]=n[4]+o|0,n[5]=n[5]+r|0,n[6]=n[6]+x|0,n[7]=n[7]+b|0},_doFinalize:function(){var c=this._data,a=c.words,n=this._nDataBytes*8,s=c.sigBytes*8;return a[s>>>5]|=128<<24-s%32,a[(s+64>>>9<<4)+14]=g.floor(n/4294967296),a[(s+64>>>9<<4)+15]=n,c.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var c=v.clone.call(this);return c._hash=this._hash.clone(),c}});C.SHA256=v._createHelper(i),C.HmacSHA256=v._createHmacHelper(i)}(Math),M.SHA256})},lZu9:function(H,J,D){(function(M){M(D("VrN/"),D("1eCo"),D("8EBN"))})(function(M){"use strict";M.defineMode("markdown",function(g,C){var N=M.getMode(g,"text/html"),m=N.name=="null";function v(U){if(M.findModeByName){var R=M.findModeByName(U);R&&(U=R.mime||R.mimes[0])}var K=M.getMode(g,U);return K.name=="null"?null:K}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var 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 y in T)T.hasOwnProperty(y)&&C.tokenTypeOverrides[y]&&(T[y]=C.tokenTypeOverrides[y]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,h=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,c=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,a=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\s*\[[^\]]+?\]:.*$/,f=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,l=" ";function o(U,R,K){return R.f=R.inline=K,K(U,R)}function r(U,R,K){return R.f=R.block=K,K(U,R)}function x(U){return!U||!/\S/.test(U.string)}function b(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 R=m;if(!R){var K=M.innerMode(N,U.htmlState);R=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}R&&(U.f=w,U.block=p,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function p(U,R){var K=U.column()===R.indentation,Z=x(R.prevLine.stream),ue=R.indentedCode,de=R.prevLine.hr,Ce=R.list!==!1,Re=(R.listStack[R.listStack.length-1]||0)+3;R.indentedCode=!1;var me=R.indentation;if(R.indentationDiff===null&&(R.indentationDiff=R.indentation,Ce)){for(R.list=null;me<R.listStack[R.listStack.length-1];)R.listStack.pop(),R.listStack.length?R.indentation=R.listStack[R.listStack.length-1]:R.list=!1;R.list!==!1&&(R.indentationDiff=me-R.listStack[R.listStack.length-1])}var Oe=!Z&&!de&&!R.prevLine.header&&(!Ce||!ue)&&!R.prevLine.fencedCodeEnd,be=(R.list===!1||de||Z)&&R.indentation<=Re&&U.match(t),ce=null;if(R.indentationDiff>=4&&(ue||R.prevLine.fencedCodeEnd||R.prevLine.header||Z))return U.skipToEnd(),R.indentedCode=!0,T.code;if(U.eatSpace())return null;if(K&&R.indentation<=Re&&(ce=U.match(c))&&ce[1].length<=6)return R.quote=0,R.header=ce[1].length,R.thisLine.header=!0,C.highlightFormatting&&(R.formatting="header"),R.f=R.inline,_(R);if(R.indentation<=Re&&U.eat(">"))return R.quote=K?1:R.quote+1,C.highlightFormatting&&(R.formatting="quote"),U.eatSpace(),_(R);if(!be&&!R.setext&&K&&R.indentation<=Re&&(ce=U.match(h))){var le=ce[1]?"ol":"ul";return R.indentation=me+U.current().length,R.list=!0,R.quote=0,R.listStack.push(R.indentation),R.em=!1,R.strong=!1,R.code=!1,R.strikethrough=!1,C.taskLists&&U.match(i,!1)&&(R.taskList=!0),R.f=R.inline,C.highlightFormatting&&(R.formatting=["list","list-"+le]),_(R)}else{if(K&&R.indentation<=Re&&(ce=U.match(s,!0)))return R.quote=0,R.fencedEndRE=new RegExp(ce[1]+"+ *$"),R.localMode=C.fencedCodeBlockHighlighting&&v(ce[2]||C.fencedCodeBlockDefaultMode),R.localMode&&(R.localState=M.startState(R.localMode)),R.f=R.block=O,C.highlightFormatting&&(R.formatting="code-block"),R.code=-1,_(R);if(R.setext||(!Oe||!Ce)&&!R.quote&&R.list===!1&&!R.code&&!be&&!d.test(U.string)&&(ce=U.lookAhead(1))&&(ce=ce.match(a)))return R.setext?(R.header=R.setext,R.setext=0,U.skipToEnd(),C.highlightFormatting&&(R.formatting="header")):(R.header=ce[0].charAt(0)=="="?1:2,R.setext=R.header),R.thisLine.header=!0,R.f=R.inline,_(R);if(be)return U.skipToEnd(),R.hr=!0,R.thisLine.hr=!0,T.hr;if(U.peek()==="[")return o(U,R,G)}return o(U,R,R.inline)}function I(U,R){var K=N.token(U,R.htmlState);if(!m){var Z=M.innerMode(N,R.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||R.md_inside&&U.current().indexOf(">")>-1)&&(R.f=w,R.block=p,R.htmlState=null)}return K}function O(U,R){var K=R.listStack[R.listStack.length-1]||0,Z=R.indentation<K,ue=K+3;if(R.fencedEndRE&&R.indentation<=ue&&(Z||U.match(R.fencedEndRE))){C.highlightFormatting&&(R.formatting="code-block");var de;return Z||(de=_(R)),R.localMode=R.localState=null,R.block=p,R.f=w,R.fencedEndRE=null,R.code=0,R.thisLine.fencedCodeEnd=!0,Z?r(U,R,R.block):de}else return R.localMode?R.localMode.token(U,R.localState):(U.skipToEnd(),T.code)}function _(U){var R=[];if(U.formatting){R.push(T.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var K=0;K<U.formatting.length;K++)R.push(T.formatting+"-"+U.formatting[K]),U.formatting[K]==="header"&&R.push(T.formatting+"-"+U.formatting[K]+"-"+U.header),U.formatting[K]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?R.push(T.formatting+"-"+U.formatting[K]+"-"+U.quote):R.push("error"))}if(U.taskOpen)return R.push("meta"),R.length?R.join(" "):null;if(U.taskClosed)return R.push("property"),R.length?R.join(" "):null;if(U.linkHref?R.push(T.linkHref,"url"):(U.strong&&R.push(T.strong),U.em&&R.push(T.em),U.strikethrough&&R.push(T.strikethrough),U.emoji&&R.push(T.emoji),U.linkText&&R.push(T.linkText),U.code&&R.push(T.code),U.image&&R.push(T.image),U.imageAltText&&R.push(T.imageAltText,"link"),U.imageMarker&&R.push(T.imageMarker)),U.header&&R.push(T.header,T.header+"-"+U.header),U.quote&&(R.push(T.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?R.push(T.quote+"-"+U.quote):R.push(T.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var Z=(U.listStack.length-1)%3;Z?Z===1?R.push(T.list2):R.push(T.list3):R.push(T.list1)}return U.trailingSpaceNewLine?R.push("trailing-space-new-line"):U.trailingSpace&&R.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),R.length?R.join(" "):null}function E(U,R){return U.match(n,!0)?_(R):void 0}function w(U,R){var K=R.text(U,R);if(typeof K!="undefined")return K;if(R.list)return R.list=null,_(R);if(R.taskList){var Z=U.match(i,!0)[1]===" ";return Z?R.taskOpen=!0:R.taskClosed=!0,C.highlightFormatting&&(R.formatting="task"),R.taskList=!1,_(R)}if(R.taskOpen=!1,R.taskClosed=!1,R.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(R.formatting="header"),_(R);var ue=U.next();if(R.linkTitle){R.linkTitle=!1;var de=ue;ue==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ce="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(U.match(new RegExp(Ce),!0))return T.linkHref}if(ue==="`"){var Re=R.formatting;C.highlightFormatting&&(R.formatting="code"),U.eatWhile("`");var me=U.current().length;if(R.code==0&&(!R.quote||me==1))return R.code=me,_(R);if(me==R.code){var Oe=_(R);return R.code=0,Oe}else return R.formatting=Re,_(R)}else if(R.code)return _(R);if(ue==="\\"&&(U.next(),C.highlightFormatting)){var be=_(R),ce=T.formatting+"-escape";return be?be+" "+ce:ce}if(ue==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return R.imageMarker=!0,R.image=!0,C.highlightFormatting&&(R.formatting="image"),_(R);if(ue==="["&&R.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return R.imageMarker=!1,R.imageAltText=!0,C.highlightFormatting&&(R.formatting="image"),_(R);if(ue==="]"&&R.imageAltText){C.highlightFormatting&&(R.formatting="image");var be=_(R);return R.imageAltText=!1,R.image=!1,R.inline=R.f=F,be}if(ue==="["&&!R.image)return R.linkText&&U.match(/^.*?\]/)||(R.linkText=!0,C.highlightFormatting&&(R.formatting="link")),_(R);if(ue==="]"&&R.linkText){C.highlightFormatting&&(R.formatting="link");var be=_(R);return R.linkText=!1,R.inline=R.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:w,be}if(ue==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){R.f=R.inline=S,C.highlightFormatting&&(R.formatting="link");var be=_(R);return be?be+=" ":be="",be+T.linkInline}if(ue==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){R.f=R.inline=S,C.highlightFormatting&&(R.formatting="link");var be=_(R);return be?be+=" ":be="",be+T.linkEmail}if(C.xml&&ue==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=U.string.indexOf(">",U.pos);if(le!=-1){var ne=U.string.substring(U.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ne)&&(R.md_inside=!0)}return U.backUp(1),R.htmlState=M.startState(N),r(U,R,I)}if(C.xml&&ue==="<"&&U.match(/^\/\w*?>/))return R.md_inside=!1,"tag";if(ue==="*"||ue==="_"){for(var ge=1,te=U.pos==1?" ":U.string.charAt(U.pos-2);ge<3&&U.eat(ue);)ge++;var re=U.peek()||" ",Se=!/\s/.test(re)&&(!f.test(re)||/\s/.test(te)||f.test(te)),ie=!/\s/.test(te)&&(!f.test(te)||/\s/.test(re)||f.test(re)),q=null,Y=null;if(ge%2&&(!R.em&&Se&&(ue==="*"||!ie||f.test(te))?q=!0:R.em==ue&&ie&&(ue==="*"||!Se||f.test(re))&&(q=!1)),ge>1&&(!R.strong&&Se&&(ue==="*"||!ie||f.test(te))?Y=!0:R.strong==ue&&ie&&(ue==="*"||!Se||f.test(re))&&(Y=!1)),Y!=null||q!=null){C.highlightFormatting&&(R.formatting=q==null?"strong":Y==null?"em":"strong em"),q===!0&&(R.em=ue),Y===!0&&(R.strong=ue);var Oe=_(R);return q===!1&&(R.em=!1),Y===!1&&(R.strong=!1),Oe}}else if(ue===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return _(R);U.backUp(1)}if(C.strikethrough){if(ue==="~"&&U.eatWhile(ue)){if(R.strikethrough){C.highlightFormatting&&(R.formatting="strikethrough");var Oe=_(R);return R.strikethrough=!1,Oe}else if(U.match(/^[^\s]/,!1))return R.strikethrough=!0,C.highlightFormatting&&(R.formatting="strikethrough"),_(R)}else if(ue===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return _(R);U.backUp(2)}}if(C.emoji&&ue===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){R.emoji=!0,C.highlightFormatting&&(R.formatting="emoji");var X=_(R);return R.emoji=!1,X}return ue===" "&&(U.match(/^ +$/,!1)?R.trailingSpace++:R.trailingSpace&&(R.trailingSpaceNewLine=!0)),_(R)}function S(U,R){var K=U.next();if(K===">"){R.f=R.inline=w,C.highlightFormatting&&(R.formatting="link");var Z=_(R);return Z?Z+=" ":Z="",Z+T.linkInline}return U.match(/^[^>]+/,!0),T.linkInline}function F(U,R){if(U.eatSpace())return null;var K=U.next();return K==="("||K==="["?(R.f=R.inline=L(K==="("?")":"]"),C.highlightFormatting&&(R.formatting="link-string"),R.linkHref=!0,_(R)):"error"}var P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(U){return function(R,K){var Z=R.next();if(Z===U){K.f=K.inline=w,C.highlightFormatting&&(K.formatting="link-string");var ue=_(K);return K.linkHref=!1,ue}return R.match(P[U]),K.linkHref=!0,_(K)}}function G(U,R){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(R.f=z,U.next(),C.highlightFormatting&&(R.formatting="link"),R.linkText=!0,_(R)):o(U,R,w)}function z(U,R){if(U.match(/^\]:/,!0)){R.f=R.inline=A,C.highlightFormatting&&(R.formatting="link");var K=_(R);return R.linkText=!1,K}return U.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function A(U,R){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?R.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),R.f=R.inline=w,T.linkHref+" url")}var B={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:w,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&M.copyState(N,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?M.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,R){if(R.formatting=!1,U!=R.thisLine.stream){if(R.header=0,R.hr=!1,U.match(/^\s*$/,!0))return b(R),null;if(R.prevLine=R.thisLine,R.thisLine={stream:U},R.taskList=!1,R.trailingSpace=0,R.trailingSpaceNewLine=!1,!R.localState&&(R.f=R.block,R.f!=I)){var K=U.match(/^\s*/,!0)[0].replace(/\t/g,l).length;if(R.indentation=K,R.indentationDiff=null,K>0)return null}}return R.f(U,R)},innerMode:function(U){return U.block==I?{state:U.htmlState,mode:N}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:B}},indent:function(U,R,K){return U.block==I&&N.indent?N.indent(U.htmlState,R,K):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,R,K):M.Pass},blankLine:b,getType:_,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return B},"xml"),M.defineMIME("text/markdown","markdown"),M.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(H){if(!0)module.exports=H();else var J})(function(){var define,module,exports;return function(){function H(J,D,M){function g(m,v){if(!D[m]){if(!J[m]){var T=typeof require=="function"&&require;if(!v&&T)return require(m,!0);if(C)return C(m,!0);var y=new Error("Cannot find module '"+m+"'");throw y.code="MODULE_NOT_FOUND",y}var t=D[m]={exports:{}};J[m][0].call(t.exports,function(h){var i=J[m][1][h];return g(i||h)},t,t.exports,H,J,D,M)}return D[m].exports}for(var C=typeof require=="function"&&require,N=0;N<M.length;N++)g(M[N]);return g}return H}()({1:[function(H,J,D){"use strict";var M=H("./browser/client");M.Buffer=H("buffer").Buffer,M.urllib=H("../shims/xhr"),M.version=H("./browser/version").version,J.exports=M},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(H,J,D){(function(M,g){"use strict";var C=H("babel-runtime/core-js/promise"),N=t(C),m=H("babel-runtime/regenerator"),v=t(m),T=H("babel-runtime/core-js/object/assign"),y=t(T);function t(G){return G&&G.__esModule?G:{default:G}}var h=H("debug")("ali-oss"),i=H("copy-to"),c=H("xml2js"),a=H("agentkeepalive"),n=H("merge-descriptors"),s=H("url"),d=H("is-type-of"),f=H("platform"),l=H("utility"),o=H("urllib"),r=H("./version"),x=H("bowser"),b=H("../common/signUtils"),p=H("../common/utils/isIP"),I=p.isIP,O=H("../common/client/initOptions"),_=H("../common/utils/createRequest"),E=_.createRequest,w=new a;function S(){var G=f.name,z=f.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function P(G,z){if(S(),!(this instanceof P))return new P(G,z);G&&G.inited?this.options=G:this.options=P.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=o,this.agent=this.options.agent||w),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}J.exports=P,P.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var A=(0,y.default)({secure:F(),useFetch:!1},z);return O(A)};var L=P.prototype;L.debug=h,n(L,H("./object")),n(L,H("../common/bucket/getBucketWebsite")),n(L,H("../common/bucket/putBucketWebsite")),n(L,H("../common/bucket/deleteBucketWebsite")),n(L,H("../common/bucket/getBucketLifecycle")),n(L,H("../common/bucket/putBucketLifecycle")),n(L,H("../common/bucket/deleteBucketLifecycle")),n(L,H("../common/bucket/putBucketVersioning")),n(L,H("../common/bucket/getBucketVersioning")),n(L,H("./managed-upload")),n(L,H("../common/multipart")),n(L,H("../common/parallel")),L.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),b.computeSignature(this.options.accessKeySecret,z)},L.authorization=function(z,A,B,U){var R=b.buildCanonicalString(z.toUpperCase(),A,{headers:U,parameters:B});return b.authorization(this.options.accessKeyId,this.options.accessKeySecret,R)},L.request=function(z){var A,B,U,R,K,Z;return v.default.async(function(de){for(;;)switch(de.prev=de.next){case 0:return A=E.call(this,z),this.options.useFetch||(A.params.mode="disable-fetch"),B=void 0,U=void 0,R=!!z.stream,de.prev=5,de.next=8,v.default.awrap(this.urllib.request(A.url,A.params));case 8:B=de.sent,this.debug("response %s %s, got %s, headers: %j",z.method,A.url,B.status,B.headers,"info"),de.next=15;break;case 12:de.prev=12,de.t0=de.catch(5),U=de.t0;case 15:if(K=void 0,!(B&&z.successStatuses&&z.successStatuses.indexOf(B.status)===-1)){de.next=28;break}return de.next=19,v.default.awrap(this.requestError(B));case 19:if(K=de.sent,!(K.code==="RequestTimeTooSkewed"&&!R)){de.next=25;break}return this.options.amendTimeSkewed=+new Date(K.serverTime)-new Date,de.next=24,v.default.awrap(this.request(z));case 24:return de.abrupt("return",de.sent);case 25:K.params=z,de.next=32;break;case 28:if(!U){de.next=32;break}return de.next=31,v.default.awrap(this.requestError(U));case 31:K=de.sent;case 32:if(!K){de.next=34;break}throw K;case 34:if(!z.xmlResponse){de.next=39;break}return de.next=37,v.default.awrap(this.parseXML(B.data));case 37:Z=de.sent,B.data=Z;case 39:return de.abrupt("return",B);case 40:case"end":return de.stop()}},null,this,[[5,12]])},L._getResource=function(z){var A="/";return z.bucket&&(A+=z.bucket+"/"),z.object&&(A+=z.object),A},L._isIP=I,L._escape=function(z){return l.encodeURIComponent(z).replace(/%2F/g,"/")},L._getReqUrl=function(z){var A={};i(this.options.endpoint).to(A);var B=this._isIP(A.hostname),U=this.options.cname;z.bucket&&!U&&!B&&(A.host=z.bucket+"."+A.host);var R="/";z.bucket&&B&&(R+=z.bucket+"/"),z.object&&(R+=this._escape(z.object).replace(/\+/g,"%2B")),A.pathname=R;var K={};if(z.query&&n(K,z.query),z.subres){var Z={};d.string(z.subres)?Z[z.subres]="":d.array(z.subres)?z.subres.forEach(function(ue){Z[ue]=""}):Z=z.subres,n(K,Z)}return A.query=K,s.format(A)},L._getUserAgent=function(){var z=g&&g.browser?"js":"nodejs",A="aliyun-sdk-"+z+"/"+r.version,B=f.description;return!B&&g&&(B="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(A+" "+B)},L._checkUserAgent=function(z){var A=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return A},L.checkBrowserAndVersion=function(z,A){return x.name===z&&x.version.split(".")[0]===A},L.parseXML=function(z){return new N.default(function(A,B){M.isBuffer(z)&&(z=z.toString()),c.parseString(z,{explicitRoot:!1,explicitArray:!1},function(U,R){U?B(U):A(R)})})},L.requestError=function(z){var A,B,U,R;return v.default.async(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(A=null,!(!z.data||!z.data.length)){Z.next=5;break}z.status===-1||z.status===-2?(A=new Error(z.message),A.name=z.name,A.status=z.status,A.code=z.name):(z.status===404?(A=new Error("Object not exists"),A.name="NoSuchKeyError",A.status=404,A.code="NoSuchKey"):z.status===412?(A=new Error("Pre condition failed"),A.name="PreconditionFailedError",A.status=412,A.code="PreconditionFailed"):(A=new Error("Unknow error, status: "+z.status),A.name="UnknowError",A.status=z.status),A.requestId=z.headers["x-oss-request-id"],A.host=""),Z.next=33;break;case 5:return B=String(z.data),this.debug("request response error data: %s",B,"error"),U=void 0,Z.prev=8,Z.next=11,v.default.awrap(this.parseXML(B));case 11:if(Z.t0=Z.sent,Z.t0){Z.next=14;break}Z.t0={};case 14:U=Z.t0,Z.next=24;break;case 17:return Z.prev=17,Z.t1=Z.catch(8),this.debug(B,"error"),Z.t1.message+=`
raw xml: `+B,Z.t1.status=z.status,Z.t1.requestId=z.headers["x-oss-request-id"],Z.abrupt("return",Z.t1);case 24:R=U.Message||"unknow request error, status: "+z.status,U.Condition&&(R+=" (condition: "+U.Condition+")"),A=new Error(R),A.name=U.Code?U.Code+"Error":"UnknowError",A.status=z.status,A.code=U.Code,A.requestId=U.RequestId,A.hostId=U.HostId,A.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",A,"error"),Z.abrupt("return",A);case 35:case"end":return Z.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:H("../../node_modules/is-buffer/index.js")},H("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/core-js/array/from"),C=y(g),N=H("babel-runtime/core-js/promise"),m=y(N),v=H("babel-runtime/regenerator"),T=y(v);function y(b){return b&&b.__esModule?b:{default:b}}var t=H("is-type-of"),h=H("util"),i=H("path"),c=H("mime"),a=H("copy-to"),n=H("../common/utils/isBlob"),s=n.isBlob,d=H("../common/utils/isFile"),f=d.isFile,l=D;l.multipartUpload=function(p,I,O){var _,E,w,S,F,P,L,G,z;return T.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){B.next=6;break}return B.next=5,T.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return B.abrupt("return",B.sent);case 6:return _=100*1024,O.mime||(f(I)?O.mime=c.getType(i.extname(I.name)):s(I)?O.mime=I.type:O.mime=c.getType(i.extname(I))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),B.next=12,T.default.awrap(this._getFileSize(I));case 12:if(E=B.sent,!(E<_)){B.next=25;break}return w=this._createStream(I,0,E),O.contentLength=E,B.next=18,T.default.awrap(this.putStream(p,w,O));case 18:if(S=B.sent,!(O&&O.progress)){B.next=22;break}return B.next=22,T.default.awrap(O.progress(1));case 22:return F={res:S.res,bucket:this.options.bucket,name:p,etag:S.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(F.data=S.data),B.abrupt("return",F);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){B.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<_)){B.next=29;break}throw new Error("partSize must not be smaller than "+_);case 29:return B.next=31,T.default.awrap(this.initMultipartUpload(p,O));case 31:if(P=B.sent,L=P.uploadId,G=this._getPartSize(E,O.partSize),z={file:I,name:p,fileSize:E,partSize:G,uploadId:L,doneParts:[]},!(O&&O.progress)){B.next=38;break}return B.next=38,T.default.awrap(O.progress(0,z,P.res));case 38:return B.next=40,T.default.awrap(this._resumeMultipart(z,O));case 40:return B.abrupt("return",B.sent);case 41:case"end":return B.stop()}},null,this)},l._resumeMultipart=function(p,I){var O,_,E,w,S,F,P,L,G,z,A,B,U,R,K,Z,ue,de;return T.default.async(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(O=this,!this.isCancel()){Re.next=3;break}throw this._makeCancelEvent();case 3:return _=p.file,E=p.fileSize,w=p.partSize,S=p.uploadId,F=p.doneParts,P=p.name,L=[],F.length>0&&a(F).to(L),G=this._divideParts(E,w),z=G.length,A=!1,B=function(Oe,be){var ce=this;return new m.default(function(ne,ge){var te,re,Se,ie;return T.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(Y.prev=0,Oe.isCancel()){Y.next=18;break}return te=G[be-1],re={stream:Oe._createStream(_,te.start,te.end),size:te.end-te.start},Y.next=6,T.default.awrap(Oe._uploadPart(P,S,be,re));case 6:if(Se=Y.sent,!(!Oe.isCancel()&&!A)){Y.next=15;break}if(p.doneParts.push({number:be,etag:Se.res.headers.etag}),!I.progress){Y.next=12;break}return Y.next=12,T.default.awrap(I.progress(F.length/z,p,Se.res));case 12:ne({number:be,etag:Se.res.headers.etag}),Y.next=16;break;case 15:ne();case 16:Y.next=19;break;case 18:ne();case 19:Y.next=30;break;case 21:Y.prev=21,Y.t0=Y.catch(0),ie=new Error,ie.name=Y.t0.name,ie.message=Y.t0.message,ie.stack=Y.t0.stack,ie.partNum=be,a(Y.t0).to(ie),ge(ie);case 30:case"end":return Y.stop()}},null,ce,[[0,21]])})},U=(0,C.default)(new Array(z),function(me,Oe){return Oe+1}),R=L.map(function(me){return me.number}),K=U.filter(function(me){return R.indexOf(me)<0}),Z=5,ue=I.parallel||Z,Re.next=17,T.default.awrap(this._parallel(K,ue,function(me){return new m.default(function(Oe,be){B(O,me).then(function(ce){ce&&L.push(ce),Oe()}).catch(function(ce){be(ce)})})}));case 17:if(de=Re.sent,A=!0,!this.isCancel()){Re.next=22;break}throw B=null,this._makeCancelEvent();case 22:if(!(de&&de.length>0)){Re.next=25;break}throw de[0].message="Failed to upload some parts with error: "+de[0].toString()+" part_num: "+de[0].partNum,de[0];case 25:return Re.next=27,T.default.awrap(this.completeMultipartUpload(P,S,L,I));case 27:return Re.abrupt("return",Re.sent);case 28:case"end":return Re.stop()}},null,this)},l._getFileSize=function(p){return T.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!t.buffer(p)){O.next=4;break}return O.abrupt("return",p.length);case 4:if(!(s(p)||f(p))){O.next=6;break}return O.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var o=H("stream"),r=o.Readable;function x(b,p){if(!(this instanceof x))return new x(b,p);r.call(this,p),this.file=b,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}h.inherits(x,r),x.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var I=!0;I&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,_=O+p;_=_>this.fileBuffer.length?this.fileBuffer.length:_,this.start=_,I=this.push(this.fileBuffer.slice(O,_))}},x.prototype._read=function(p){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var I=16*1024;p=p||I;var O=this;this.reader.onload=function(E){O.fileBuffer=M.from(new Uint8Array(E.target.result)),O.file=null,O.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},l._createStream=function(p,I,O){if(s(p)||f(p))return new x(p.slice(I,O));throw new Error("_createStream requires File/Blob.")},l._getPartSize=function(p,I){var O=10*1e3,_=1024*1024;return I?Math.max(Math.ceil(p/O),I):_},l._divideParts=function(p,I){for(var O=Math.ceil(p/I),_=[],E=0;E<O;E++){var w=I*E,S=Math.min(w+I,p);_.push({start:w,end:S})}return _}}).call(this,H("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/promise"),g=t(M),C=H("babel-runtime/core-js/object/keys"),N=t(C),m=H("babel-runtime/core-js/object/assign"),v=t(m),T=H("babel-runtime/regenerator"),y=t(T);function t(O){return O&&O.__esModule?O:{default:O}}var h=H("utility"),i=H("fs"),c=H("is-type-of"),a=H("url"),n=H("copy-to"),s=H("path"),d=H("mime"),f=H("../common/callback"),l=H("../common/signUtils"),o=H("merge-descriptors"),r=H("../common/utils/isBlob"),x=r.isBlob,b=H("../common/utils/isFile"),p=b.isFile,I=D;I.append=function(_,E,w){var S;return y.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:return w=w||{},w.position===void 0&&(w.position="0"),w.subres={append:"",position:w.position},w.method="POST",P.next=6,y.default.awrap(this.put(_,E,w));case 6:return S=P.sent,S.nextAppendPosition=S.res.headers["x-oss-next-append-position"],P.abrupt("return",S);case 9:case"end":return P.stop()}},null,this)},I.put=function(_,E,w){var S,F,P,L,G,z,A;return y.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(S=void 0,w=w||{},_=this._objectName(_),!c.buffer(E)){U.next=7;break}S=E,U.next=33;break;case 7:if(!(x(E)||p(E))){U.next=32;break}return w.mime||(p(E)?w.mime=d.getType(s.extname(E.name)):w.mime=E.type),F=this._createStream(E,0,E.size),U.next=12,y.default.awrap(this._getFileSize(E));case 12:return w.contentLength=U.sent,U.prev=13,U.next=16,y.default.awrap(this.putStream(_,F,w));case 16:return P=U.sent,U.abrupt("return",P);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,y.default.awrap(this.put(_,E,w));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return w.headers=w.headers||{},this._convertMetaToHeaders(w.meta,w.headers),L=w.method||"PUT",G=this._objectRequestParams(L,_,w),f.encodeCallback(G,w),G.mime=w.mime,G.content=S,G.successStatuses=[200],U.next=43,y.default.awrap(this.request(G));case 43:return z=U.sent,A={name:_,url:this._objectUrl(_),res:z.res},G.headers&&G.headers["x-oss-callback"]&&(A.data=JSON.parse(z.data.toString())),U.abrupt("return",A);case 47:case"end":return U.stop()}},null,this,[[13,20]])},I.putStream=function(_,E,w){var S,F,P,L;return y.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return w=w||{},w.headers=w.headers||{},_=this._objectName(_),w.contentLength?w.headers["Content-Length"]=w.contentLength:w.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(w.meta,w.headers),S=w.method||"PUT",F=this._objectRequestParams(S,_,w),f.encodeCallback(F,w),F.mime=w.mime,F.stream=E,F.successStatuses=[200],z.next=13,y.default.awrap(this.request(F));case 13:return P=z.sent,L={name:_,url:this._objectUrl(_),res:P.res},F.headers&&F.headers["x-oss-callback"]&&(L.data=JSON.parse(P.data.toString())),z.abrupt("return",L);case 17:case"end":return z.stop()}},null,this)},o(I,H("../common/object/copyObject")),o(I,H("../common/object/getObjectTagging")),o(I,H("../common/object/putObjectTagging")),o(I,H("../common/object/deleteObjectTagging")),o(I,H("../common/image")),o(I,H("../common/object/getBucketVersions")),o(I,H("../common/object/getACL")),o(I,H("../common/object/putACL")),o(I,H("../common/object/head")),o(I,H("../common/object/delete")),o(I,H("../common/object/get")),o(I,H("../common/object/putSymlink")),o(I,H("../common/object/getSymlink")),o(I,H("../common/object/deleteMulti")),o(I,H("../common/object/getObjectMeta")),I.putMeta=function(_,E,w){var S;return y.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,y.default.awrap(this.copy(_,_,{meta:E||{},timeout:w&&w.timeout,ctx:w&&w.ctx}));case 2:return S=P.sent,P.abrupt("return",S);case 4:case"end":return P.stop()}},null,this)},I.list=function(_,E){var w,S,F,P,L;return y.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return w=this._objectRequestParams("GET","",E),w.query=_,w.xmlResponse=!0,w.successStatuses=[200],z.next=6,y.default.awrap(this.request(w));case 6:return S=z.sent,F=S.data.Contents,P=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(A){return{name:A.Key,url:P._objectUrl(A.Key),lastModified:A.LastModified,etag:A.ETag,type:A.Type,size:Number(A.Size),storageClass:A.StorageClass,owner:{id:A.Owner.ID,displayName:A.Owner.DisplayName}}})),L=S.data.CommonPrefixes||null,L&&(Array.isArray(L)||(L=[L]),L=L.map(function(A){return A.Prefix})),z.abrupt("return",{res:S.res,objects:F,prefixes:L,nextMarker:S.data.NextMarker||null,isTruncated:S.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},I.restore=function(_,E){var w,S;return y.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:return E=E||{},E.subres=(0,v.default)({restore:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),w=this._objectRequestParams("POST",_,E),w.successStatuses=[202],P.next=7,y.default.awrap(this.request(w));case 7:return S=P.sent,P.abrupt("return",{res:S.res});case 9:case"end":return P.stop()}},null,this)},I.signatureUrl=function(_,E){E=E||{},_=this._objectName(_),E.method=E.method||"GET";var w=h.timestamp()+(E.expires||1800),S={bucket:this.options.bucket,object:_},F=this._getResource(S);this.options.stsToken&&(E["security-token"]=this.options.stsToken);var P=l._signatureForURL(this.options.accessKeySecret,E,F,w),L=a.parse(this._getReqUrl(S));return L.query={OSSAccessKeyId:this.options.accessKeyId,Expires:w,Signature:P.Signature},n(P.subResource).to(L.query),L.format()},I.getObjectUrl=function(_,E){return E?E[E.length-1]!=="/"&&(E+="/"):E=this.options.endpoint.format(),E+this._escape(this._objectName(_))},I._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},I.generateObjectUrl=function(O,_){if(_)_[_.length-1]!=="/"&&(_+="/");else{_=this.options.endpoint.format();var E=a.parse(_),w=this.options.bucket;E.hostname=w+"."+E.hostname,E.host=w+"."+E.host,_=E.format()}return _+this._escape(this._objectName(O))},I._objectRequestParams=function(_,E,w){if(!this.options.bucket)throw new Error("Please create a bucket first");w=w||{},E=this._objectName(E);var S={object:E,bucket:this.options.bucket,method:_,subres:w&&w.subres,timeout:w&&w.timeout,ctx:w&&w.ctx};return w.headers&&(S.headers={},n(w.headers).to(S.headers)),S},I._objectName=function(_){return _.replace(/^\/+/,"")},I._convertMetaToHeaders=function(_,E){if(!_)return;(0,N.default)(_).forEach(function(w){E["x-oss-meta-"+w]=_[w]})},I._deleteFileSafe=function(_){var E=this;return new g.default(function(w){i.exists(_,function(S){S?i.unlink(_,function(F){F&&E.debug("unlink %j error: %s",_,F,"error"),w()}):w()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(H,J,D){"use strict";D.version="6.10.0"},{}],6:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(T){return T&&T.__esModule?T:{default:T}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=D;v.deleteBucketLifecycle=function(y,t){var h,i;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return m(y),h=this._bucketRequestParams("DELETE",y,"lifecycle",t),h.successStatuses=[204],a.next=5,g.default.awrap(this.request(h));case 5:return i=a.sent,a.abrupt("return",{res:i.res});case 7:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(T){return T&&T.__esModule?T:{default:T}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=D;v.deleteBucketWebsite=function(y,t){var h,i;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return m(y),h=this._bucketRequestParams("DELETE",y,"website",t),h.successStatuses=[204],a.next=5,g.default.awrap(this.request(h));case 5:return i=a.sent,a.abrupt("return",{res:i.res});case 7:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(i){return i&&i.__esModule?i:{default:i}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=H("../utils/isArray"),T=v.isArray,y=H("../utils/formatObjKey"),t=y.formatObjKey,h=D;h.getBucketLifecycle=function(c,a){var n,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return m(c),n=this._bucketRequestParams("GET",c,"lifecycle",a),n.successStatuses=[200],n.xmlResponse=!0,l.next=6,g.default.awrap(this.request(n));case 6:return s=l.sent,d=s.data.Rule||null,d&&(T(d)||(d=[d]),d=d.map(function(o){return o.ID&&(o.id=o.ID,delete o.ID),o.Tag&&!T(o.Tag)&&(o.Tag=[o.Tag]),t(o,"firstLowerCase")})),l.abrupt("return",{rules:d,res:s.res});case 10:case"end":return l.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(T){return T&&T.__esModule?T:{default:T}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=D;v.getBucketVersioning=function(y,t){var h,i,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return m(y),h=this._bucketRequestParams("GET",y,"versioning",t),h.xmlResponse=!0,h.successStatuses=[200],n.next=6,g.default.awrap(this.request(h));case 6:return i=n.sent,c=i.data.Status,n.abrupt("return",{status:i.status,versionStatus:c,res:i.res});case 9:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(t){return t&&t.__esModule?t:{default:t}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=H("../utils/isObject"),T=v.isObject,y=D;y.getBucketWebsite=function(h,i){var c,a,n;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return m(h),c=this._bucketRequestParams("GET",h,"website",i),c.successStatuses=[200],c.xmlResponse=!0,d.next=6,g.default.awrap(this.request(c));case 6:return a=d.sent,n=[],a.data.RoutingRules&&a.data.RoutingRules.RoutingRule&&(T(a.data.RoutingRules.RoutingRule)?n=[a.data.RoutingRules.RoutingRule]:n=a.data.RoutingRules.RoutingRule),d.abrupt("return",{index:a.data.IndexDocument&&a.data.IndexDocument.Suffix||"",supportSubDir:a.data.IndexDocument&&a.data.IndexDocument.SupportSubDir||"false",type:a.data.IndexDocument&&a.data.IndexDocument.Type,routingRules:n,error:a.data.ErrorDocument&&a.data.ErrorDocument.Key||null,res:a.res});case 10:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(p){return p&&p.__esModule?p:{default:p}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=H("../utils/isArray"),T=v.isArray,y=H("../utils/deepCopy"),t=y.deepCopy,h=H("../utils/isObject"),i=h.isObject,c=H("../utils/obj2xml"),a=c.obj2xml,n=H("../utils/checkObjectTag"),s=n.checkObjectTag,d=H("../utils/getStrBytesCount"),f=d.getStrBytesCount,l=D;l.putBucketLifecycle=function(I,O,_){var E,w,S,F,P;return g.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(m(I),T(O)){G.next=3;break}throw new Error("rules must be Array");case 3:return E=this._bucketRequestParams("PUT",I,"lifecycle",_),w=[],S={LifecycleConfiguration:{Rule:w}},O.forEach(function(z){o(z),b(z),z.id&&(z.ID=z.id,delete z.id),w.push(z)}),F=a(S,{headers:!0,firstUpperCase:!0}),E.content=F,E.mime="xml",E.successStatuses=[200],G.next=13,g.default.awrap(this.request(E));case 13:return P=G.sent,G.abrupt("return",{res:P.res});case 15:case"end":return G.stop()}},null,this)};function o(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function r(p,I){var O=p.days,_=p.createdBeforeDate;if(!O&&!_)throw new Error(I+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(_&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(_))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function x(p){if(!T(p)&&!i(p))throw new Error("tag must be Object or Array");p=i(p)?[p]:p;var I={},O=t(p);O.forEach(function(_){I[_.key]=_.value}),s(I)}function b(p){if(p.id&&f(p.id)>255)throw new Error("ID is composed of 255 bytes at most");if(p.prefix===""||p.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(p.status))throw new Error("Status must be Enabled or Disabled");if(p.transition){if(!["IA","Archive"].includes(p.transition.storageClass))throw new Error("StorageClass must be IA or Archive");r(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)r(p.expiration,"Expiration");else if(p.expiration.days||p.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(p.abortMultipartUpload&&r(p.abortMultipartUpload,"AbortMultipartUpload"),!p.expiration&&!p.abortMultipartUpload&&!p.transition&&!p.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(p.tag){if(p.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");x(p.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(t){return t&&t.__esModule?t:{default:t}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=H("../utils/obj2xml"),T=v.obj2xml,y=D;y.putBucketVersioning=function(h,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,n,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:if(m(h),["Enabled","Suspended"].includes(i)){f.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return a=this._bucketRequestParams("PUT",h,"versioning",c),n={VersioningConfiguration:{Status:i}},a.mime="xml",a.content=T(n,{headers:!0}),f.next=9,g.default.awrap(this.request(a));case 9:return s=f.sent,f.abrupt("return",{res:s.res,status:s.status});case 11:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(i){return i&&i.__esModule?i:{default:i}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=H("../utils/obj2xml"),T=v.obj2xml,y=H("../utils/isArray"),t=y.isArray,h=D;h.putBucketWebsite=function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],s,d,f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(m(c),s=this._bucketRequestParams("PUT",c,"website",n),d={Suffix:a.index||"index.html"},f={IndexDocument:d},l={WebsiteConfiguration:f},a.supportSubDir&&(d.SupportSubDir=a.supportSubDir),a.type&&(d.Type=a.type),a.error&&(f.ErrorDocument={Key:a.error}),!(a.routingRules!==void 0)){x.next=12;break}if(t(a.routingRules)){x.next=11;break}throw new Error("RoutingRules must be Array");case 11:f.RoutingRules={RoutingRule:a.routingRules};case 12:return l=T(l),s.content=l,s.mime="xml",s.successStatuses=[200],x.next=18,g.default.awrap(this.request(s));case 18:return o=x.sent,x.abrupt("return",{res:o.res});case 20:case"end":return x.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/core-js/object/keys"),C=v(g),N=H("babel-runtime/core-js/json/stringify"),m=v(N);function v(T){return T&&T.__esModule?T:{default:T}}D.encodeCallback=function(y,t){if(y.headers=y.headers||{},!Object.prototype.hasOwnProperty.call(y.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 i=M.from((0,m.default)(h)).toString("base64");if(y.headers["x-oss-callback"]=i,t.callback.customValue){var c={};(0,C.default)(t.callback.customValue).forEach(function(a){c["x:"+a]=t.callback.customValue[a]}),y.headers["x-oss-callback-var"]=M.from((0,m.default)(c)).toString("base64")}}}}).call(this,H("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/assign"),g=C(M);function C(h){return h&&h.__esModule?h:{default:h}}var N=H("humanize-ms"),m=H("url"),v=H("../utils/checkBucketName"),T=v.checkBucketName;function y(h,i){var c=m.parse(h);if(c.protocol||(c=m.parse("http"+(i?"s":"")+"://"+h)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function t(h,i,c){var a=c?"https://":"http://",n=i?"-internal.aliyuncs.com":".aliyuncs.com",s="vpc100-oss-cn-";return h.substr(0,s.length)===s&&(n=".aliyuncs.com"),m.parse(a+h+n)}J.exports=function(h){if(!h||!h.accessKeyId||!h.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");h.bucket&&T(h.bucket);var i=(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(i.accessKeyId=i.accessKeyId.trim(),i.accessKeySecret=i.accessKeySecret.trim(),i.timeout&&(i.timeout=N(i.timeout)),i.endpoint)i.endpoint=y(i.endpoint,i.secure);else if(i.region)i.endpoint=t(i.region,i.internal,i.secure);else throw new Error("require options.endpoint or options.region");return i.inited=!0,i}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(H,J,D){"use strict";var M=H("merge-descriptors"),g=D;M(g,H("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(i){return i&&i.__esModule?i:{default:i}}var N=H("../utils/checkBucketName"),m=N.checkBucketName,v=H("querystring"),T=H("js-base64"),y=T.Base64.encode,t=D;t.processObjectSave=function(c,a,n,s){var d,f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return h(c,"sourceObject"),h(a,"targetObject"),h(n,"process"),a=this._objectName(a),s&&m(s),d=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),f=s?",b_"+y(s):"",a=y(a),l={"x-oss-process":n+"|sys/saveas,o_"+a+f},d.content=v.stringify(l),x.next=12,g.default.awrap(this.request(d));case 12:return o=x.sent,x.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return x.stop()}},null,this)};function h(i,c){if(!i)throw new Error(c+" is required");if(typeof i!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=C(M);function C(t){return t&&t.__esModule?t:{default:t}}var N=H("copy-to"),m=H("./callback"),v=H("./utils/deepCopy"),T=v.deepCopy,y=D;y.listUploads=function(h,i){var c,a,n,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},c={},N(i).to(c),c.subres="uploads",a=this._objectRequestParams("GET","",c),a.query=h,a.xmlResponse=!0,a.successStatuses=[200],f.next=10,g.default.awrap(this.request(a));case 10:return n=f.sent,s=n.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map(function(l){return{name:l.Key,uploadId:l.UploadId,initiated:l.Initiated}}),f.abrupt("return",{res:n.res,uploads:s,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return f.stop()}},null,this)},y.listParts=function(h,i,c,a){var n,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a=a||{},n={},N(a).to(n),n.subres={uploadId:i},s=this._objectRequestParams("GET",h,n),s.query=c,s.xmlResponse=!0,s.successStatuses=[200],l.next=10,g.default.awrap(this.request(s));case 10:return d=l.sent,l.abrupt("return",{res:d.res,uploadId:d.data.UploadId,bucket:d.data.Bucket,name:d.data.Key,partNumberMarker:d.data.PartNumberMarker,nextPartNumberMarker:d.data.NextPartNumberMarker,maxParts:d.data.MaxParts,isTruncated:d.data.IsTruncated,parts:d.data.Part||[]});case 12:case"end":return l.stop()}},null,this)},y.abortMultipartUpload=function(h,i,c){var a,n,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return this._stop(),c=c||{},a={},N(c).to(a),a.subres={uploadId:i},n=this._objectRequestParams("DELETE",h,a),n.successStatuses=[204],f.next=9,g.default.awrap(this.request(n));case 9:return s=f.sent,f.abrupt("return",{res:s.res});case 11:case"end":return f.stop()}},null,this)},y.initMultipartUpload=function(h,i){var c,a,n;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return i=i||{},c={},N(i).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(i.meta,c.headers),c.subres="uploads",a=this._objectRequestParams("POST",h,c),a.mime=i.mime,a.xmlResponse=!0,a.successStatuses=[200],d.next=12,g.default.awrap(this.request(a));case 12:return n=d.sent,d.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return d.stop()}},null,this)},y.uploadPart=function(h,i,c,a,n,s,d){var f;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return f={stream:this._createStream(a,n,s),size:s-n},o.next=3,g.default.awrap(this._uploadPart(h,i,c,f,d));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},y.completeMultipartUpload=function(h,i,c,a){var n,s,d,f,l,o,r,x;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(I,O){return I.number-O.number}).filter(function(I,O,_){return!O||I.number!==_[O-1].number}),s=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,d=0;d<n.length;d++)f=n[d],s+=`<Part>
`,s+="<PartNumber>"+f.number+`</PartNumber>
`,s+="<ETag>"+f.etag+`</ETag>
`,s+=`</Part>
`;return s+="</CompleteMultipartUpload>",a=a||{},l={},l=T(a),l.headers&&delete l.headers["x-oss-server-side-encryption"],l.subres={uploadId:i},o=this._objectRequestParams("POST",h,l),m.encodeCallback(o,l),o.mime="xml",o.content=s,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 r=p.sent,x={res:r.res,bucket:o.bucket,name:h,etag:r.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(x.data=JSON.parse(r.data.toString())),p.abrupt("return",x);case 21:case"end":return p.stop()}},null,this)},y._uploadPart=function(h,i,c,a,n){var s,d,f;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return n=n||{},s={},N(n).to(s),s.headers={"Content-Length":a.size},s.subres={partNumber:c,uploadId:i},d=this._objectRequestParams("PUT",h,s),d.mime=s.mime,d.stream=a.stream,d.successStatuses=[200],o.next=11,g.default.awrap(this.request(d));case 11:if(f=o.sent,f.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 a.stream=null,d.stream=null,o.abrupt("return",{name:h,etag:f.res.headers.etag,res:f.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=T(M),C=H("babel-runtime/core-js/object/keys"),N=T(C),m=H("babel-runtime/helpers/typeof"),v=T(m);function T(i){return i&&i.__esModule?i:{default:i}}var y=H("../utils/checkBucketName"),t=y.checkBucketName,h=D;h.copy=function(c,a,n,s){var d,f,l;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return(typeof n=="undefined"?"undefined":(0,v.default)(n))==="object"&&(s=n),s=s||{},s.headers=s.headers||{},(0,N.default)(s.headers).forEach(function(x){s.headers["x-oss-copy-source-"+x.toLowerCase()]=s.headers[x]}),s.meta&&(s.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(s.meta,s.headers),a=this._getSourceName(a,n),s.versionId&&(a=a+"?versionId="+s.versionId),s.headers["x-oss-copy-source"]=a,d=this._objectRequestParams("PUT",c,s),d.xmlResponse=!0,d.successStatuses=[200,304],r.next=14,g.default.awrap(this.request(d));case 14:return f=r.sent,l=f.data,l&&(l={etag:l.ETag,lastModified:l.LastModified}),r.abrupt("return",{data:l,res:f.res});case 18:case"end":return r.stop()}},null,this)},h._getSourceName=function(c,a){return typeof a=="string"?c=this._objectName(c):c[0]!=="/"?a=this.options.bucket:(a=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),t(a),c=encodeURI(c),c="/"+a+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.delete=function(y){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,i;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,N.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),h=this._objectRequestParams("DELETE",y,t),h.successStatuses=[204],a.next=6,g.default.awrap(this.request(h));case 6:return i=a.sent,a.abrupt("return",{res:i.res});case 8:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(h){return h&&h.__esModule?h:{default:h}}var v=H("utility"),T=H("../utils/obj2xml"),y=T.obj2xml,t=D;t.deleteMulti=function(i){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n,s,d,f,l,o,r,x,b,p,I;return g.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:if(a=[],!(!i||!i.length)){_.next=3;break}throw new Error("names is required");case 3:for(n=0;n<i.length;n++)s={},typeof i[n]=="string"?s.Key=v.escape(this._objectName(i[n])):(d=i[n],f=d.key,l=d.versionId,s.Key=v.escape(this._objectName(f)),s.VersionId=l),a.push(s);return o={Delete:{Quiet:!!c.quiet,Object:a}},r=y(o,{headers:!0}),c.subres=(0,N.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),x=this._objectRequestParams("POST","",c),x.mime="xml",x.content=r,x.xmlResponse=!0,x.successStatuses=[200],_.next=15,g.default.awrap(this.request(x));case 15:return b=_.sent,p=b.data,I=p&&p.Deleted||null,I&&(Array.isArray(I)||(I=[I])),_.abrupt("return",{res:b.res,deleted:I||[]});case 20:case"end":return _.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.deleteObjectTagging=function(y){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,i;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,N.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),y=this._objectName(y),h=this._objectRequestParams("DELETE",y,t),h.successStatuses=[204],a.next=7,g.default.awrap(this.request(h));case 7:return i=a.sent,a.abrupt("return",{status:i.status,res:i.res});case 9:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(t){return t&&t.__esModule?t:{default:t}}var v=H("fs"),T=H("is-type-of"),y=D;y.get=function(h,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,n,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a=null,n=!1,T.writableStream(i)?a=i:T.string(i)?(a=v.createWriteStream(i),n=!0):c=i,c=c||{},c.subres=(0,N.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),s=void 0,l.prev=8,d=this._objectRequestParams("GET",h,c),d.writeStream=a,d.successStatuses=[200,206,304],l.next=14,g.default.awrap(this.request(d));case 14:s=l.sent,n&&a.destroy(),l.next=25;break;case 18:if(l.prev=18,l.t0=l.catch(8),!n){l.next=24;break}return a.destroy(),l.next=24,g.default.awrap(this._deleteFileSafe(i));case 24:throw l.t0;case 25:return l.abrupt("return",{res:s.res,content:s.data});case 26:case"end":return l.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.getACL=function(y){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,i;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,N.default)({acl:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),y=this._objectName(y),h=this._objectRequestParams("GET",y,t),h.successStatuses=[200],h.xmlResponse=!0,a.next=8,g.default.awrap(this.request(h));case 8:return i=a.sent,a.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 10:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/keys"),g=T(M),C=H("babel-runtime/regenerator"),N=T(C),m=H("babel-runtime/core-js/object/assign"),v=T(m);function T(d){return d&&d.__esModule?d:{default:d}}var y=D,t=H("../utils/isObject"),h=t.isObject,i=H("../utils/isArray"),c=i.isArray;y.getBucketVersions=a,y.listObjectVersions=a;function a(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,o,r,x,b,p;return N.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(d.versionIdMarker&&d.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return f.subres=(0,v.default)({versions:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),l=this._objectRequestParams("GET","",f),l.xmlResponse=!0,l.successStatuses=[200],l.query=s(d),O.next=10,N.default.awrap(this.request(l));case 10:return o=O.sent,r=o.data.Version||[],x=o.data.DeleteMarker||[],b=this,r&&(Array.isArray(r)||(r=[r]),r=r.map(function(_){return{name:_.Key,url:b._objectUrl(_.Key),lastModified:_.LastModified,isLatest:_.IsLatest==="true",versionId:_.VersionId,etag:_.ETag,type:_.Type,size:Number(_.Size),storageClass:_.StorageClass,owner:{id:_.Owner.ID,displayName:_.Owner.DisplayName}}})),x&&(c(x)||(x=[x]),x=x.map(function(_){return{name:_.Key,lastModified:_.LastModified,versionId:_.VersionId,owner:{id:_.Owner.ID,displayName:_.Owner.DisplayName}}})),p=o.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(_){return _.Prefix})),O.abrupt("return",{res:o.res,objects:r,deleteMarker:x,prefixes:p,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function n(d){return d.replace(/([A-Z])/g,"-$1").toLowerCase()}function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f={};return h(d)&&(0,g.default)(d).forEach(function(l){f[n(l)]=d[l]}),f}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.getObjectMeta=function(y,t){var h,i;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t=t||{},y=this._objectName(y),t.subres=(0,N.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),h=this._objectRequestParams("HEAD",y,t),h.successStatuses=[200],a.next=8,g.default.awrap(this.request(h));case 8:return i=a.sent,a.abrupt("return",{status:i.status,res:i.res});case 10:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(t){return t&&t.__esModule?t:{default:t}}var v=D,T=H("../utils/isObject"),y=T.isObject;v.getObjectTagging=function(h){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,a,n,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return i.subres=(0,N.default)({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),h=this._objectName(h),c=this._objectRequestParams("GET",h,i),c.successStatuses=[200],l.next=7,g.default.awrap(this.request(c));case 7:return a=l.sent,l.next=10,g.default.awrap(this.parseXML(a.data));case 10:return n=l.sent,s=n.TagSet.Tag,s=s&&y(s)?[s]:s||[],d={},s.forEach(function(o){d[o.Key]=o.Value}),l.abrupt("return",{status:a.status,res:a.res,tag:d});case 16:case"end":return l.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.getSymlink=function(y){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,i,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return t.subres=(0,N.default)({symlink:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),y=this._objectName(y),h=this._objectRequestParams("GET",y,t),h.successStatuses=[200],n.next=7,g.default.awrap(this.request(h));case 7:return i=n.sent,c=i.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(c),res:i.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=T(M),C=H("babel-runtime/core-js/object/keys"),N=T(C),m=H("babel-runtime/core-js/object/assign"),v=T(m);function T(t){return t&&t.__esModule?t:{default:t}}var y=D;y.head=function(h){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,a,n;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return i.subres=(0,v.default)({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),c=this._objectRequestParams("HEAD",h,i),c.successStatuses=[200,304],d.next=6,g.default.awrap(this.request(c));case 6:return a=d.sent,n={meta:null,res:a.res,status:a.status},a.status===200&&(0,N.default)(a.headers).forEach(function(f){f.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[f.substring(11)]=a.headers[f])}),d.abrupt("return",n);case 10:case"end":return d.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.putACL=function(y,t,h){var i,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.subres=(0,N.default)({acl:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.headers=h.headers||{},h.headers["x-oss-object-acl"]=t,y=this._objectName(y),i=this._objectRequestParams("PUT",y,h),i.successStatuses=[200],n.next=10,g.default.awrap(this.request(i));case 10:return c=n.sent,n.abrupt("return",{res:c.res});case 12:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=T(M),C=H("babel-runtime/core-js/object/keys"),N=T(C),m=H("babel-runtime/core-js/object/assign"),v=T(m);function T(a){return a&&a.__esModule?a:{default:a}}var y=H("../utils/obj2xml"),t=y.obj2xml,h=H("../utils/checkObjectTag"),i=h.checkObjectTag,c=D;c.putObjectTagging=function(n,s){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return i(s),d.subres=(0,v.default)({tagging:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),n=this._objectName(n),f=this._objectRequestParams("PUT",n,d),f.successStatuses=[200],s=(0,N.default)(s).map(function(b){return{Key:b,Value:s[b]}}),l={Tagging:{TagSet:{Tag:s}}},f.mime="xml",f.content=t(l),x.next=12,g.default.awrap(this.request(f));case 12:return o=x.sent,x.abrupt("return",{res:o.res,status:o.status});case 14:case"end":return x.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/object/assign"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v.putSymlink=function(y,t,h){var i,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,N.default)({symlink:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.storageClass&&(h.headers["x-oss-storage-class"]=h.storageClass),y=this._objectName(y),i=this._objectRequestParams("PUT",y,h),i.successStatuses=[200],n.next=13,g.default.awrap(this.request(i));case 13:return c=n.sent,n.abrupt("return",{res:c.res});case 15:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(H,J,D){"use strict";var M=H("babel-runtime/regenerator"),g=m(M),C=H("babel-runtime/core-js/promise"),N=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var v=D;v._parallelNode=function(y,t,h,i){var c,a,n,s,d,f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:c=this,a=[],n=[],s=y.length/t,d=y.length%t,f=d===0?s:(y.length-d)/t+1,l=1,o=0;case 8:if(!(o<y.length)){x.next=26;break}if(!c.isCancel()){x.next=11;break}return x.abrupt("break",26);case 11:if(i?n.push(h(c,y[o],i)):n.push(h(c,y[o])),!(n.length===t||l===f&&o===y.length-1)){x.next=23;break}return x.prev=13,l+=1,x.next=17,g.default.awrap(N.default.all(n));case 17:x.next=22;break;case 19:x.prev=19,x.t0=x.catch(13),a.push(x.t0);case 22:n=[];case 23:o++,x.next=8;break;case 26:return x.abrupt("return",a);case 27:case"end":return x.stop()}},null,this,[[13,19]])},v._parallel=function(y,t,h){var i=this;return new N.default(function(c){var a=[];if(t<=0||!y){c(a);return}function n(p){return function(){if(p===null)throw new Error("Callback was already called.");var I=p;p=null;for(var O=arguments.length,_=Array(O),E=0;E<O;E++)_[E]=arguments[E];I.apply(this,_)}}function s(p){var I=-1,O=p.length;return function(){return++I<O&&!i.isCancel()?{value:p[I],key:I}:null}}var d=s(y),f=!1,l=0,o=!1;function r(p,I){l-=1,p?(f=!0,a.push(p),c(a)):I==={}||f&&l<=0?(f=!0,c(a)):o||(i.isCancel()?c(a):b())}function x(p,I){h(p).then(function(O){I(null,O)}).catch(function(O){I(O)})}function b(){for(o=!0;l<t&&!f&&!i.isCancel();){var p=d();if(p===null||a.length>0){f=!0,l<=0&&c(a);return}l+=1,x(p.value,n(r))}o=!1}b()})},v.cancel=function(y){this.options.cancelFlag=!0,y&&this.abortMultipartUpload(y.name,y.uploadId,y.options)},v.isCancel=function(){return this.options.cancelFlag},v.resetCancelFlag=function(){this.options.cancelFlag=!1},v._stop=function(){this.options.cancelFlag=!0},v._makeCancelEvent=function(){var y={status:0,name:"cancel"};return y}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/core-js/json/stringify"),C=v(g),N=H("babel-runtime/core-js/object/keys"),m=v(N);function v(t){return t&&t.__esModule?t:{default:t}}var T=H("./../../shims/crypto/crypto.js"),y=H("is-type-of");D.buildCanonicalizedResource=function(h,i){var c=""+h,a="?";if(y.string(i)&&i.trim()!=="")c+=a+i;else if(y.array(i))i.sort(),c+=a+i.join("&");else if(i){var n=function(f,l){return f[0]>l[0]?1:f[0]<l[0]?-1:0},s=function(f){c+=a+f,i[f]&&(c+="="+i[f]),a="&"};(0,m.default)(i).sort(n).forEach(s)}return c},D.buildCanonicalString=function(h,i,c,a){c=c||{};var n=c.headers||{},s="x-oss-",d=[],f={},l=[h.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],a||n["x-oss-date"]];return(0,m.default)(n).forEach(function(o){var r=o.toLowerCase();r.indexOf(s)===0&&(f[r]=String(n[o]).trim())}),(0,m.default)(f).sort().forEach(function(o){d.push(o+":"+f[o])}),l=l.concat(d),l.push(this.buildCanonicalizedResource(i,c.parameters)),l.join(`
`)},D.computeSignature=function(h,i){var c=T.createHmac("sha1",h);return c.update(M.from(i,"utf8")).digest("base64")},D.authorization=function(h,i,c){return"OSS "+h+":"+this.computeSignature(i,c)},D._signatureForURL=function(h){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],a=arguments[3],n={},s=i.subResource,d=s===void 0?{}:s;if(i.process){var f="x-oss-process";d[f]=i.process}if(i.trafficLimit){var l="x-oss-traffic-limit";d[l]=i.trafficLimit}if(i.response&&(0,m.default)(i.response).forEach(function(b){var p="response-"+b.toLowerCase();d[p]=i.response[b]}),(0,m.default)(i).forEach(function(b){var p=b.toLowerCase(),I=i[b];p.indexOf("x-oss-")===0?n[p]=I:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[b]=I)}),Object.prototype.hasOwnProperty.call(i,"security-token")&&(d["security-token"]=i["security-token"]),Object.prototype.hasOwnProperty.call(i,"callback")){var o={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};if(i.callback.host&&(o.callbackHost=i.callback.host),i.callback.contentType&&(o.callbackBodyType=i.callback.contentType),d.callback=M.from((0,C.default)(o)).toString("base64"),i.callback.customValue){var r={};(0,m.default)(i.callback.customValue).forEach(function(b){r["x:"+b]=i.callback.customValue[b]}),d["callback-var"]=M.from((0,C.default)(r)).toString("base64")}}var x=this.buildCanonicalString(i.method,c,{headers:n,parameters:d},a.toString());return{Signature:this.computeSignature(h,x),subResource:d}}}).call(this,H("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(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkBucketName=void 0,D.checkBucketName=function(M,g){var C=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(M))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/entries"),g=C(M);function C(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(D,"__esModule",{value:!0}),D.checkObjectTag=void 0;var N=H("./checkValid"),m=N.checkValid,v=H("./isObject"),T=v.isObject,y=[{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(y,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(y,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function h(i){if(!T(i))throw new Error("tag must be Object");var c=(0,g.default)(i);if(c.length>10)throw new Error("maximum of 10 tags for a object");var a=["key","value"];c.forEach(function(n){n.forEach(function(s,d){m(s,t[a[d]])})})}D.checkObjectTag=h},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkValid=void 0;function M(g,C){C.forEach(function(N){if(N.validator)N.validator(g);else if(N.pattern&&!N.pattern.test(g))throw new Error(N.msg)})}D.checkValid=M},{}],38:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/core-js/object/assign"),C=N(g);function N(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(D,"__esModule",{value:!0}),D.createRequest=void 0;var m=H("./../../../shims/crypto/crypto.js"),v=H("debug")("ali-oss"),T=H("mime"),y=H("dateformat"),t=H("copy-to"),h=H("path");function i(n,s){return n[s]||n[s.toLowerCase()]}function c(n,s){delete n[s],delete n[s.toLowerCase()]}function a(n){var s=new Date;this.options.amendTimeSkewed&&(s=+new Date+this.options.amendTimeSkewed);var d={"x-oss-date":y(s,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(d["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(d,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(d["x-oss-security-token"]=this.options.stsToken),t(n.headers).to(d),i(d,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?d["Content-Type"]=n.mime:d["Content-Type"]=T.getType(n.mime||h.extname(n.object||""))),i(d,"Content-Type")||c(d,"Content-Type"),n.content&&(d["Content-Md5"]=m.createHash("md5").update(M.from(n.content,"utf8")).digest("base64"),d["Content-Length"]||(d["Content-Length"]=n.content.length));var f=this._getResource(n);d.authorization=this.authorization(n.method,f,n.subres,d);var l=this._getReqUrl(n);v("request %s %s, with headers %j, !!stream: %s",n.method,l,d,!!n.stream);var o=n.timeout||this.options.timeout,r={method:n.method,content:n.content,stream:n.stream,headers:d,timeout:o,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(r.agent=this.agent),this.httpsAgent&&(r.httpsAgent=this.httpsAgent),{url:l,params:r}}D.createRequest=a}).call(this,H("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(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/keys"),g=m(M),C=H("babel-runtime/helpers/typeof"),N=m(C);function m(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(D,"__esModule",{value:!0}),D.deepCopy=void 0,D.deepCopy=function(v){if(v===null||(typeof v=="undefined"?"undefined":(0,N.default)(v))!=="object")return v;var T=Array.isArray(v)?[]:{};return(0,g.default)(v).forEach(function(y){T[y]=D.deepCopy(v[y])}),T}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/keys"),g=m(M),C=H("babel-runtime/helpers/typeof"),N=m(C);function m(y){return y&&y.__esModule?y:{default:y}}Object.defineProperty(D,"__esModule",{value:!0}),D.formatObjKey=void 0;function v(y,t){if(y===null||(typeof y=="undefined"?"undefined":(0,N.default)(y))!=="object")return y;var h=void 0;if(Array.isArray(y)){h=[];for(var i=0;i<y.length;i++)h.push(v(y[i],t))}else h={},(0,g.default)(y).forEach(function(c){h[T(c,t)]=v(y[c],t)});return h}D.formatObjKey=v;function T(y,t){return t==="firstUpperCase"?y=y.replace(/^./,function(h){return h.toUpperCase()}):t==="firstLowerCase"&&(y=y.replace(/^./,function(h){return h.toLowerCase()})),y}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getStrBytesCount=void 0;function M(g){for(var C=0,N=0;N<g.length;N++){var m=g.charAt(N);/^[\u00-\uff]$/.test(m)?C+=1:C+=2}return C}D.getStrBytesCount=M},{}],42:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isArray=void 0,D.isArray=function(M){return Object.prototype.toString.call(M)==="[object Array]"}},{}],43:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isBlob=void 0;function M(g){return typeof Blob!="undefined"&&g instanceof Blob}D.isBlob=M},{}],44:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isFile=void 0,D.isFile=function(M){return typeof File!="undefined"&&M instanceof File}},{}],45:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isIP=void 0,D.isIP=function(M){var g=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,C=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return g.test(M)||C.test(M)}},{}],46:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isObject=void 0,D.isObject=function(M){return Object.prototype.toString.call(M)==="[object Object]"}},{}],47:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/keys"),g=C(M);function C(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(D,"__esModule",{value:!0}),D.obj2xml=void 0;var N=H("./formatObjKey");function m(T){return Object.prototype.toString.call(T).replace(/(.*? |])/g,"").toLowerCase()}function v(T,y){var t="";return y&&y.headers&&(t=`<?xml version="1.0" encoding="UTF-8"?>
`),y&&y.firstUpperCase&&(T=N.formatObjKey(T,"firstUpperCase")),m(T)==="object"?(0,g.default)(T).forEach(function(h){m(T[h])==="string"||m(T[h])==="number"?t+="<"+h+">"+T[h]+"</"+h+">":m(T[h])==="object"?t+="<"+h+">"+v(T[h])+"</"+h+">":m(T[h])==="array"?t+=T[h].map(function(i){return"<"+h+">"+v(i)+"</"+h+">"}).join(""):t+="<"+h+">"+T[h].toString()+"</"+h+">"}):t+=T.toString(),t}D.obj2xml=v},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(H,J,D){J.exports=M,J.exports.HttpsAgent=M;function M(){}},{}],49:[function(H,J,D){J.exports=H("./register")().Promise},{"./register":51}],50:[function(H,J,D){"use strict";var M="@@any-promise/REGISTRATION",g=null;J.exports=function(C,N){return function(v,T){v=v||null,T=T||{};var y=T.global!==!1;if(g===null&&y&&(g=C[M]||null),g!==null&&v!==null&&g.implementation!==v)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(v!==null&&typeof T.Promise!="undefined"?g={Promise:T.Promise,implementation:v}:g=N(v),y&&(C[M]=g)),g}}},{}],51:[function(H,J,D){"use strict";J.exports=H("./loader")(window,M);function M(){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(H,J,D){J.exports={default:H("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(H,J,D){J.exports={default:H("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(H,J,D){J.exports={default:H("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(H,J,D){J.exports={default:H("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(H,J,D){J.exports={default:H("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(H,J,D){J.exports={default:H("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(H,J,D){J.exports={default:H("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(H,J,D){J.exports={default:H("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(H,J,D){"use strict";D.__esModule=!0;var M=H("../core-js/symbol/iterator"),g=v(M),C=H("../core-js/symbol"),N=v(C),m=typeof N.default=="function"&&typeof g.default=="symbol"?function(T){return typeof T}:function(T){return T&&typeof N.default=="function"&&T.constructor===N.default&&T!==N.default.prototype?"symbol":typeof T};function v(T){return T&&T.__esModule?T:{default:T}}D.default=typeof N.default=="function"&&m(g.default)==="symbol"?function(T){return typeof T=="undefined"?"undefined":m(T)}:function(T){return T&&typeof N.default=="function"&&T.constructor===N.default&&T!==N.default.prototype?"symbol":typeof T=="undefined"?"undefined":m(T)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(H,J,D){J.exports=H("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(H,J,D){"use strict";D.byteLength=y,D.toByteArray=h,D.fromByteArray=a;for(var M=[],g=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,v=N.length;m<v;++m)M[m]=N[m],g[N.charCodeAt(m)]=m;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function T(n){var s=n.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=n.indexOf("=");d===-1&&(d=s);var f=d===s?0:4-d%4;return[d,f]}function y(n){var s=T(n),d=s[0],f=s[1];return(d+f)*3/4-f}function t(n,s,d){return(s+d)*3/4-d}function h(n){var s,d=T(n),f=d[0],l=d[1],o=new C(t(n,f,l)),r=0,x=l>0?f-4:f,b;for(b=0;b<x;b+=4)s=g[n.charCodeAt(b)]<<18|g[n.charCodeAt(b+1)]<<12|g[n.charCodeAt(b+2)]<<6|g[n.charCodeAt(b+3)],o[r++]=s>>16&255,o[r++]=s>>8&255,o[r++]=s&255;return l===2&&(s=g[n.charCodeAt(b)]<<2|g[n.charCodeAt(b+1)]>>4,o[r++]=s&255),l===1&&(s=g[n.charCodeAt(b)]<<10|g[n.charCodeAt(b+1)]<<4|g[n.charCodeAt(b+2)]>>2,o[r++]=s>>8&255,o[r++]=s&255),o}function i(n){return M[n>>18&63]+M[n>>12&63]+M[n>>6&63]+M[n&63]}function c(n,s,d){for(var f,l=[],o=s;o<d;o+=3)f=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),l.push(i(f));return l.join("")}function a(n){for(var s,d=n.length,f=d%3,l=[],o=16383,r=0,x=d-f;r<x;r+=o)l.push(c(n,r,r+o>x?x:r+o));return f===1?(s=n[d-1],l.push(M[s>>2]+M[s<<4&63]+"==")):f===2&&(s=(n[d-2]<<8)+n[d-1],l.push(M[s>>10]+M[s>>4&63]+M[s<<2&63]+"=")),l.join("")}},{}],70:[function(H,J,D){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(M,g,C){typeof J!="undefined"&&J.exports?J.exports=C():typeof define=="function"&&define.amd?define(g,C):M[g]=C()}(this,"bowser",function(){var M=!0;function g(t){function h(B){var U=t.match(B);return U&&U.length>1&&U[1]||""}function i(B){var U=t.match(B);return U&&U.length>1&&U[2]||""}var c=h(/(ipod|iphone|ipad)/i).toLowerCase(),a=/like android/i.test(t),n=!a&&/android/i.test(t),s=/nexus\s*[0-6]\s*/i.test(t),d=!s&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),l=/silk/i.test(t),o=/sailfish/i.test(t),r=/tizen/i.test(t),x=/(web|hpw)(o|0)s/i.test(t),b=/windows phone/i.test(t),p=/SamsungBrowser/i.test(t),I=!b&&/windows/i.test(t),O=!c&&!l&&/macintosh/i.test(t),_=!n&&!o&&!r&&!x&&/linux/i.test(t),E=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=h(/version\/(\d+(\.\d+)?)/i),S=/tablet/i.test(t)&&!/tablet pc/i.test(t),F=!S&&/[^-]mobi/i.test(t),P=/xbox/i.test(t),L;/opera/i.test(t)?L={name:"Opera",opera:M,version:w||h(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?L={name:"Opera",opera:M,version:h(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(t)?L={name:"Samsung Internet for Android",samsungBrowser:M,version:w||h(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?L={name:"NAVER Whale browser",whale:M,version:h(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?L={name:"MZ Browser",mzbrowser:M,version:h(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?L={name:"Opera Coast",coast:M,version:w||h(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?L={name:"Focus",focus:M,version:h(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?L={name:"Yandex Browser",yandexbrowser:M,version:w||h(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?L={name:"UC Browser",ucbrowser:M,version:h(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?L={name:"Maxthon",maxthon:M,version:h(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?L={name:"Epiphany",epiphany:M,version:h(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?L={name:"Puffin",puffin:M,version:h(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?L={name:"Sleipnir",sleipnir:M,version:h(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?L={name:"K-Meleon",kMeleon:M,version:h(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:b?(L={name:"Windows Phone",osname:"Windows Phone",windowsphone:M},E?(L.msedge=M,L.version=E):(L.msie=M,L.version=h(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?L={name:"Internet Explorer",msie:M,version:h(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?L={name:"Chrome",osname:"Chrome OS",chromeos:M,chromeBook:M,chrome:M,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?L={name:"Microsoft Edge",msedge:M,version:E}:/vivaldi/i.test(t)?L={name:"Vivaldi",vivaldi:M,version:h(/vivaldi\/(\d+(\.\d+)?)/i)||w}:o?L={name:"Sailfish",osname:"Sailfish OS",sailfish:M,version:h(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?L={name:"SeaMonkey",seamonkey:M,version:h(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(L={name:"Firefox",firefox:M,version:h(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(L.firefoxos=M,L.osname="Firefox OS")):l?L={name:"Amazon Silk",silk:M,version:h(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?L={name:"PhantomJS",phantom:M,version:h(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?L={name:"SlimerJS",slimer:M,version:h(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?L={name:"BlackBerry",osname:"BlackBerry OS",blackberry:M,version:w||h(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:x?(L={name:"WebOS",osname:"WebOS",webos:M,version:w||h(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(L.touchpad=M)):/bada/i.test(t)?L={name:"Bada",osname:"Bada",bada:M,version:h(/dolfin\/(\d+(\.\d+)?)/i)}:r?L={name:"Tizen",osname:"Tizen",tizen:M,version:h(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(t)?L={name:"QupZilla",qupzilla:M,version:h(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(t)?L={name:"Chromium",chromium:M,version:h(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(t)?L={name:"Chrome",chrome:M,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?L={name:"Android",version:w}:/safari|applewebkit/i.test(t)?(L={name:"Safari",safari:M},w&&(L.version=w)):c?(L={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},w&&(L.version=w)):/googlebot/i.test(t)?L={name:"Googlebot",googlebot:M,version:h(/googlebot\/(\d+(\.\d+))/i)||w}:L={name:h(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!L.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(L.name=L.name||"Blink",L.blink=M):(L.name=L.name||"Webkit",L.webkit=M),!L.version&&w&&(L.version=w)):!L.opera&&/gecko\//i.test(t)&&(L.name=L.name||"Gecko",L.gecko=M,L.version=L.version||h(/gecko\/(\d+(\.\d+)?)/i)),!L.windowsphone&&(n||L.silk)?(L.android=M,L.osname="Android"):!L.windowsphone&&c?(L[c]=M,L.ios=M,L.osname="iOS"):O?(L.mac=M,L.osname="macOS"):P?(L.xbox=M,L.osname="Xbox"):I?(L.windows=M,L.osname="Windows"):_&&(L.linux=M,L.osname="Linux");function G(B){switch(B){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="";L.windows?z=G(h(/Windows ((NT|XP)( \d\d?.\d)?)/i)):L.windowsphone?z=h(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):L.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):L.webos?z=h(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):L.blackberry?z=h(/rim\stablet\sos\s(\d+(\.\d+)*)/i):L.bada?z=h(/bada\/(\d+(\.\d+)*)/i):L.tizen&&(z=h(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(L.osversion=z);var A=!L.windows&&z.split(".")[0];return S||d||c=="ipad"||n&&(A==3||A>=4&&!F)||L.silk?L.tablet=M:(F||c=="iphone"||c=="ipod"||n||s||L.blackberry||L.webos||L.bada)&&(L.mobile=M),L.msedge||L.msie&&L.version>=10||L.yandexbrowser&&L.version>=15||L.vivaldi&&L.version>=1||L.chrome&&L.version>=20||L.samsungBrowser&&L.version>=4||L.whale&&v([L.version,"1.0"])===1||L.mzbrowser&&v([L.version,"6.0"])===1||L.focus&&v([L.version,"1.0"])===1||L.firefox&&L.version>=20||L.safari&&L.version>=6||L.opera&&L.version>=10||L.ios&&L.osversion&&L.osversion.split(".")[0]>=6||L.blackberry&&L.version>=10.1||L.chromium&&L.version>=20?L.a=M:L.msie&&L.version<10||L.chrome&&L.version<20||L.firefox&&L.version<20||L.safari&&L.version<6||L.opera&&L.version<10||L.ios&&L.osversion&&L.osversion.split(".")[0]<6||L.chromium&&L.version<20?L.c=M:L.x=M,L}var C=g(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(t){for(var h=0;h<t.length;++h){var i=t[h];if(typeof i=="string"&&i in C)return!0}return!1};function N(t){return t.split(".").length}function m(t,h){var i=[],c;if(Array.prototype.map)return Array.prototype.map.call(t,h);for(c=0;c<t.length;c++)i.push(h(t[c]));return i}function v(t){for(var h=Math.max(N(t[0]),N(t[1])),i=m(t,function(c){var a=h-N(c);return c=c+new Array(a+1).join(".0"),m(c.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--h>=0;){if(i[0][h]>i[1][h])return 1;if(i[0][h]===i[1][h]){if(h===0)return 0}else return-1}}function T(t,h,i){var c=C;typeof h=="string"&&(i=h,h=void 0),h===void 0&&(h=!1),i&&(c=g(i));var a=""+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 v([a,t[n]])<0}return h}function y(t,h,i){return!T(t,h,i)}return C.isUnsupportedBrowser=T,C.compareVersions=v,C.check=y,C._detect=g,C.detect=g,C})},{}],71:[function(H,J,D){},{}],72:[function(H,J,D){var M=H("buffer").Buffer,g=M.isEncoding||function(y){switch(y&&y.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(y){if(y&&!g(y))throw new Error("Unknown encoding: "+y)}var N=D.StringDecoder=function(y){this.encoding=(y||"utf8").toLowerCase().replace(/[-_]/,""),C(y);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=v;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=T;break;default:this.write=m;return}this.charBuffer=new M(6),this.charReceived=0,this.charLength=0};N.prototype.write=function(y){for(var t="";this.charLength;){var h=y.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:y.length;if(y.copy(this.charBuffer,this.charReceived,0,h),this.charReceived+=h,this.charReceived<this.charLength)return"";y=y.slice(h,y.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,y.length===0)return t;break}this.detectIncompleteChar(y);var i=y.length;this.charLength&&(y.copy(this.charBuffer,0,y.length-this.charReceived,i),i-=this.charReceived),t+=y.toString(this.encoding,0,i);var i=t.length-1,c=t.charCodeAt(i);if(c>=55296&&c<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),y.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},N.prototype.detectIncompleteChar=function(y){for(var t=y.length>=3?3:y.length;t>0;t--){var h=y[y.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},N.prototype.end=function(y){var t="";if(y&&y.length&&(t=this.write(y)),this.charReceived){var h=this.charReceived,i=this.charBuffer,c=this.encoding;t+=i.slice(0,h).toString(c)}return t};function m(y){return y.toString(this.encoding)}function v(y){this.charReceived=y.length%2,this.charLength=this.charReceived?2:0}function T(y){this.charReceived=y.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(H,J,D){(function(M,g){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var C=H("base64-js"),N=H("ieee754"),m=H("isarray");D.Buffer=g,D.SlowBuffer=l,D.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=M.TYPED_ARRAY_SUPPORT!==void 0?M.TYPED_ARRAY_SUPPORT:v(),D.kMaxLength=T();function v(){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(q){return!1}}function T(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function y(ie,q){if(T()<q)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(q),ie.__proto__=g.prototype):(ie===null&&(ie=new g(q)),ie.length=q),ie}function g(ie,q,Y){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(ie,q,Y);if(typeof ie=="number"){if(typeof q=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ie)}return t(this,ie,q,Y)}g.poolSize=8192,g._augment=function(ie){return ie.__proto__=g.prototype,ie};function t(ie,q,Y,X){if(typeof q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&q instanceof ArrayBuffer?s(ie,q,Y,X):typeof q=="string"?a(ie,q,Y):d(ie,q)}g.from=function(ie,q,Y){return t(null,ie,q,Y)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0}));function h(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function i(ie,q,Y,X){return h(q),q<=0?y(ie,q):Y!==void 0?typeof X=="string"?y(ie,q).fill(Y,X):y(ie,q).fill(Y):y(ie,q)}g.alloc=function(ie,q,Y){return i(null,ie,q,Y)};function c(ie,q){if(h(q),ie=y(ie,q<0?0:f(q)|0),!g.TYPED_ARRAY_SUPPORT)for(var Y=0;Y<q;++Y)ie[Y]=0;return ie}g.allocUnsafe=function(ie){return c(null,ie)},g.allocUnsafeSlow=function(ie){return c(null,ie)};function a(ie,q,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!g.isEncoding(Y))throw new TypeError('"encoding" must be a valid string encoding');var X=o(q,Y)|0;ie=y(ie,X);var he=ie.write(q,Y);return he!==X&&(ie=ie.slice(0,he)),ie}function n(ie,q){var Y=q.length<0?0:f(q.length)|0;ie=y(ie,Y);for(var X=0;X<Y;X+=1)ie[X]=q[X]&255;return ie}function s(ie,q,Y,X){if(q.byteLength,Y<0||q.byteLength<Y)throw new RangeError("'offset' is out of bounds");if(q.byteLength<Y+(X||0))throw new RangeError("'length' is out of bounds");return Y===void 0&&X===void 0?q=new Uint8Array(q):X===void 0?q=new Uint8Array(q,Y):q=new Uint8Array(q,Y,X),g.TYPED_ARRAY_SUPPORT?(ie=q,ie.__proto__=g.prototype):ie=n(ie,q),ie}function d(ie,q){if(g.isBuffer(q)){var Y=f(q.length)|0;return ie=y(ie,Y),ie.length===0||q.copy(ie,0,0,Y),ie}if(q){if(typeof ArrayBuffer!="undefined"&&q.buffer instanceof ArrayBuffer||"length"in q)return typeof q.length!="number"||Se(q.length)?y(ie,0):n(ie,q);if(q.type==="Buffer"&&m(q.data))return n(ie,q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(ie){if(ie>=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return ie|0}function l(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(q){return!!(q!=null&&q._isBuffer)},g.compare=function(q,Y){if(!g.isBuffer(q)||!g.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(q===Y)return 0;for(var X=q.length,he=Y.length,fe=0,xe=Math.min(X,he);fe<xe;++fe)if(q[fe]!==Y[fe]){X=q[fe],he=Y[fe];break}return X<he?-1:he<X?1:0},g.isEncoding=function(q){switch(String(q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.concat=function(q,Y){if(!m(q))throw new TypeError('"list" argument must be an Array of Buffers');if(q.length===0)return g.alloc(0);var X;if(Y===void 0)for(Y=0,X=0;X<q.length;++X)Y+=q[X].length;var he=g.allocUnsafe(Y),fe=0;for(X=0;X<q.length;++X){var xe=q[X];if(!g.isBuffer(xe))throw new TypeError('"list" argument must be an Array of Buffers');xe.copy(he,fe),fe+=xe.length}return he};function o(ie,q){if(g.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var Y=ie.length;if(Y===0)return 0;for(var X=!1;;)switch(q){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":case void 0:return le(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return te(ie).length;default:if(X)return le(ie).length;q=(""+q).toLowerCase(),X=!0}}g.byteLength=o;function r(ie,q,Y){var X=!1;if((q===void 0||q<0)&&(q=0),q>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,q>>>=0,Y<=q)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return B(this,q,Y);case"utf8":case"utf-8":return P(this,q,Y);case"ascii":return z(this,q,Y);case"latin1":case"binary":return A(this,q,Y);case"base64":return F(this,q,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,q,Y);default:if(X)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),X=!0}}g.prototype._isBuffer=!0;function x(ie,q,Y){var X=ie[q];ie[q]=ie[Y],ie[Y]=X}g.prototype.swap16=function(){var q=this.length;if(q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Y=0;Y<q;Y+=2)x(this,Y,Y+1);return this},g.prototype.swap32=function(){var q=this.length;if(q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Y=0;Y<q;Y+=4)x(this,Y,Y+3),x(this,Y+1,Y+2);return this},g.prototype.swap64=function(){var q=this.length;if(q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Y=0;Y<q;Y+=8)x(this,Y,Y+7),x(this,Y+1,Y+6),x(this,Y+2,Y+5),x(this,Y+3,Y+4);return this},g.prototype.toString=function(){var q=this.length|0;return q===0?"":arguments.length===0?P(this,0,q):r.apply(this,arguments)},g.prototype.equals=function(q){if(!g.isBuffer(q))throw new TypeError("Argument must be a Buffer");return this===q?!0:g.compare(this,q)===0},g.prototype.inspect=function(){var q="",Y=D.INSPECT_MAX_BYTES;return this.length>0&&(q=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(q+=" ... ")),"<Buffer "+q+">"},g.prototype.compare=function(q,Y,X,he,fe){if(!g.isBuffer(q))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),X===void 0&&(X=q?q.length:0),he===void 0&&(he=0),fe===void 0&&(fe=this.length),Y<0||X>q.length||he<0||fe>this.length)throw new RangeError("out of range index");if(he>=fe&&Y>=X)return 0;if(he>=fe)return-1;if(Y>=X)return 1;if(Y>>>=0,X>>>=0,he>>>=0,fe>>>=0,this===q)return 0;for(var xe=fe-he,Ke=X-Y,Ze=Math.min(xe,Ke),et=this.slice(he,fe),st=q.slice(Y,X),ut=0;ut<Ze;++ut)if(et[ut]!==st[ut]){xe=et[ut],Ke=st[ut];break}return xe<Ke?-1:Ke<xe?1:0};function b(ie,q,Y,X,he){if(ie.length===0)return-1;if(typeof Y=="string"?(X=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=he?0:ie.length-1),Y<0&&(Y=ie.length+Y),Y>=ie.length){if(he)return-1;Y=ie.length-1}else if(Y<0)if(he)Y=0;else return-1;if(typeof q=="string"&&(q=g.from(q,X)),g.isBuffer(q))return q.length===0?-1:p(ie,q,Y,X,he);if(typeof q=="number")return q=q&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(ie,q,Y):Uint8Array.prototype.lastIndexOf.call(ie,q,Y):p(ie,[q],Y,X,he);throw new TypeError("val must be string, number or Buffer")}function p(ie,q,Y,X,he){var fe=1,xe=ie.length,Ke=q.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(ie.length<2||q.length<2)return-1;fe=2,xe/=2,Ke/=2,Y/=2}function Ze(Fe,Ie){return fe===1?Fe[Ie]:Fe.readUInt16BE(Ie*fe)}var et;if(he){var st=-1;for(et=Y;et<xe;et++)if(Ze(ie,et)===Ze(q,st===-1?0:et-st)){if(st===-1&&(st=et),et-st+1===Ke)return st*fe}else st!==-1&&(et-=et-st),st=-1}else for(Y+Ke>xe&&(Y=xe-Ke),et=Y;et>=0;et--){for(var ut=!0,dt=0;dt<Ke;dt++)if(Ze(ie,et+dt)!==Ze(q,dt)){ut=!1;break}if(ut)return et}return-1}g.prototype.includes=function(q,Y,X){return this.indexOf(q,Y,X)!==-1},g.prototype.indexOf=function(q,Y,X){return b(this,q,Y,X,!0)},g.prototype.lastIndexOf=function(q,Y,X){return b(this,q,Y,X,!1)};function I(ie,q,Y,X){Y=Number(Y)||0;var he=ie.length-Y;X?(X=Number(X),X>he&&(X=he)):X=he;var fe=q.length;if(fe%2!==0)throw new TypeError("Invalid hex string");X>fe/2&&(X=fe/2);for(var xe=0;xe<X;++xe){var Ke=parseInt(q.substr(xe*2,2),16);if(isNaN(Ke))return xe;ie[Y+xe]=Ke}return xe}function O(ie,q,Y,X){return re(le(q,ie.length-Y),ie,Y,X)}function _(ie,q,Y,X){return re(ne(q),ie,Y,X)}function E(ie,q,Y,X){return _(ie,q,Y,X)}function w(ie,q,Y,X){return re(te(q),ie,Y,X)}function S(ie,q,Y,X){return re(ge(q,ie.length-Y),ie,Y,X)}g.prototype.write=function(q,Y,X,he){if(Y===void 0)he="utf8",X=this.length,Y=0;else if(X===void 0&&typeof Y=="string")he=Y,X=this.length,Y=0;else if(isFinite(Y))Y=Y|0,isFinite(X)?(X=X|0,he===void 0&&(he="utf8")):(he=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var fe=this.length-Y;if((X===void 0||X>fe)&&(X=fe),q.length>0&&(X<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var xe=!1;;)switch(he){case"hex":return I(this,q,Y,X);case"utf8":case"utf-8":return O(this,q,Y,X);case"ascii":return _(this,q,Y,X);case"latin1":case"binary":return E(this,q,Y,X);case"base64":return w(this,q,Y,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,q,Y,X);default:if(xe)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),xe=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ie,q,Y){return q===0&&Y===ie.length?C.fromByteArray(ie):C.fromByteArray(ie.slice(q,Y))}function P(ie,q,Y){Y=Math.min(ie.length,Y);for(var X=[],he=q;he<Y;){var fe=ie[he],xe=null,Ke=fe>239?4:fe>223?3:fe>191?2:1;if(he+Ke<=Y){var Ze,et,st,ut;switch(Ke){case 1:fe<128&&(xe=fe);break;case 2:Ze=ie[he+1],(Ze&192)===128&&(ut=(fe&31)<<6|Ze&63,ut>127&&(xe=ut));break;case 3:Ze=ie[he+1],et=ie[he+2],(Ze&192)===128&&(et&192)===128&&(ut=(fe&15)<<12|(Ze&63)<<6|et&63,ut>2047&&(ut<55296||ut>57343)&&(xe=ut));break;case 4:Ze=ie[he+1],et=ie[he+2],st=ie[he+3],(Ze&192)===128&&(et&192)===128&&(st&192)===128&&(ut=(fe&15)<<18|(Ze&63)<<12|(et&63)<<6|st&63,ut>65535&&ut<1114112&&(xe=ut))}}xe===null?(xe=65533,Ke=1):xe>65535&&(xe-=65536,X.push(xe>>>10&1023|55296),xe=56320|xe&1023),X.push(xe),he+=Ke}return G(X)}var L=4096;function G(ie){var q=ie.length;if(q<=L)return String.fromCharCode.apply(String,ie);for(var Y="",X=0;X<q;)Y+=String.fromCharCode.apply(String,ie.slice(X,X+=L));return Y}function z(ie,q,Y){var X="";Y=Math.min(ie.length,Y);for(var he=q;he<Y;++he)X+=String.fromCharCode(ie[he]&127);return X}function A(ie,q,Y){var X="";Y=Math.min(ie.length,Y);for(var he=q;he<Y;++he)X+=String.fromCharCode(ie[he]);return X}function B(ie,q,Y){var X=ie.length;(!q||q<0)&&(q=0),(!Y||Y<0||Y>X)&&(Y=X);for(var he="",fe=q;fe<Y;++fe)he+=ce(ie[fe]);return he}function U(ie,q,Y){for(var X=ie.slice(q,Y),he="",fe=0;fe<X.length;fe+=2)he+=String.fromCharCode(X[fe]+X[fe+1]*256);return he}g.prototype.slice=function(q,Y){var X=this.length;q=~~q,Y=Y===void 0?X:~~Y,q<0?(q+=X,q<0&&(q=0)):q>X&&(q=X),Y<0?(Y+=X,Y<0&&(Y=0)):Y>X&&(Y=X),Y<q&&(Y=q);var he;if(g.TYPED_ARRAY_SUPPORT)he=this.subarray(q,Y),he.__proto__=g.prototype;else{var fe=Y-q;he=new g(fe,void 0);for(var xe=0;xe<fe;++xe)he[xe]=this[xe+q]}return he};function R(ie,q,Y){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+q>Y)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(q,Y,X){q=q|0,Y=Y|0,X||R(q,Y,this.length);for(var he=this[q],fe=1,xe=0;++xe<Y&&(fe*=256);)he+=this[q+xe]*fe;return he},g.prototype.readUIntBE=function(q,Y,X){q=q|0,Y=Y|0,X||R(q,Y,this.length);for(var he=this[q+--Y],fe=1;Y>0&&(fe*=256);)he+=this[q+--Y]*fe;return he},g.prototype.readUInt8=function(q,Y){return Y||R(q,1,this.length),this[q]},g.prototype.readUInt16LE=function(q,Y){return Y||R(q,2,this.length),this[q]|this[q+1]<<8},g.prototype.readUInt16BE=function(q,Y){return Y||R(q,2,this.length),this[q]<<8|this[q+1]},g.prototype.readUInt32LE=function(q,Y){return Y||R(q,4,this.length),(this[q]|this[q+1]<<8|this[q+2]<<16)+this[q+3]*16777216},g.prototype.readUInt32BE=function(q,Y){return Y||R(q,4,this.length),this[q]*16777216+(this[q+1]<<16|this[q+2]<<8|this[q+3])},g.prototype.readIntLE=function(q,Y,X){q=q|0,Y=Y|0,X||R(q,Y,this.length);for(var he=this[q],fe=1,xe=0;++xe<Y&&(fe*=256);)he+=this[q+xe]*fe;return fe*=128,he>=fe&&(he-=Math.pow(2,8*Y)),he},g.prototype.readIntBE=function(q,Y,X){q=q|0,Y=Y|0,X||R(q,Y,this.length);for(var he=Y,fe=1,xe=this[q+--he];he>0&&(fe*=256);)xe+=this[q+--he]*fe;return fe*=128,xe>=fe&&(xe-=Math.pow(2,8*Y)),xe},g.prototype.readInt8=function(q,Y){return Y||R(q,1,this.length),this[q]&128?(255-this[q]+1)*-1:this[q]},g.prototype.readInt16LE=function(q,Y){Y||R(q,2,this.length);var X=this[q]|this[q+1]<<8;return X&32768?X|4294901760:X},g.prototype.readInt16BE=function(q,Y){Y||R(q,2,this.length);var X=this[q+1]|this[q]<<8;return X&32768?X|4294901760:X},g.prototype.readInt32LE=function(q,Y){return Y||R(q,4,this.length),this[q]|this[q+1]<<8|this[q+2]<<16|this[q+3]<<24},g.prototype.readInt32BE=function(q,Y){return Y||R(q,4,this.length),this[q]<<24|this[q+1]<<16|this[q+2]<<8|this[q+3]},g.prototype.readFloatLE=function(q,Y){return Y||R(q,4,this.length),N.read(this,q,!0,23,4)},g.prototype.readFloatBE=function(q,Y){return Y||R(q,4,this.length),N.read(this,q,!1,23,4)},g.prototype.readDoubleLE=function(q,Y){return Y||R(q,8,this.length),N.read(this,q,!0,52,8)},g.prototype.readDoubleBE=function(q,Y){return Y||R(q,8,this.length),N.read(this,q,!1,52,8)};function K(ie,q,Y,X,he,fe){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>he||q<fe)throw new RangeError('"value" argument is out of bounds');if(Y+X>ie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(q,Y,X,he){if(q=+q,Y=Y|0,X=X|0,!he){var fe=Math.pow(2,8*X)-1;K(this,q,Y,X,fe,0)}var xe=1,Ke=0;for(this[Y]=q&255;++Ke<X&&(xe*=256);)this[Y+Ke]=q/xe&255;return Y+X},g.prototype.writeUIntBE=function(q,Y,X,he){if(q=+q,Y=Y|0,X=X|0,!he){var fe=Math.pow(2,8*X)-1;K(this,q,Y,X,fe,0)}var xe=X-1,Ke=1;for(this[Y+xe]=q&255;--xe>=0&&(Ke*=256);)this[Y+xe]=q/Ke&255;return Y+X},g.prototype.writeUInt8=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,1,255,0),g.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),this[Y]=q&255,Y+1};function Z(ie,q,Y,X){q<0&&(q=65535+q+1);for(var he=0,fe=Math.min(ie.length-Y,2);he<fe;++he)ie[Y+he]=(q&255<<8*(X?he:1-he))>>>(X?he:1-he)*8}g.prototype.writeUInt16LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8):Z(this,q,Y,!0),Y+2},g.prototype.writeUInt16BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>8,this[Y+1]=q&255):Z(this,q,Y,!1),Y+2};function ue(ie,q,Y,X){q<0&&(q=4294967295+q+1);for(var he=0,fe=Math.min(ie.length-Y,4);he<fe;++he)ie[Y+he]=q>>>(X?he:3-he)*8&255}g.prototype.writeUInt32LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[Y+3]=q>>>24,this[Y+2]=q>>>16,this[Y+1]=q>>>8,this[Y]=q&255):ue(this,q,Y,!0),Y+4},g.prototype.writeUInt32BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>24,this[Y+1]=q>>>16,this[Y+2]=q>>>8,this[Y+3]=q&255):ue(this,q,Y,!1),Y+4},g.prototype.writeIntLE=function(q,Y,X,he){if(q=+q,Y=Y|0,!he){var fe=Math.pow(2,8*X-1);K(this,q,Y,X,fe-1,-fe)}var xe=0,Ke=1,Ze=0;for(this[Y]=q&255;++xe<X&&(Ke*=256);)q<0&&Ze===0&&this[Y+xe-1]!==0&&(Ze=1),this[Y+xe]=(q/Ke>>0)-Ze&255;return Y+X},g.prototype.writeIntBE=function(q,Y,X,he){if(q=+q,Y=Y|0,!he){var fe=Math.pow(2,8*X-1);K(this,q,Y,X,fe-1,-fe)}var xe=X-1,Ke=1,Ze=0;for(this[Y+xe]=q&255;--xe>=0&&(Ke*=256);)q<0&&Ze===0&&this[Y+xe+1]!==0&&(Ze=1),this[Y+xe]=(q/Ke>>0)-Ze&255;return Y+X},g.prototype.writeInt8=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,1,127,-128),g.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),q<0&&(q=255+q+1),this[Y]=q&255,Y+1},g.prototype.writeInt16LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8):Z(this,q,Y,!0),Y+2},g.prototype.writeInt16BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>8,this[Y+1]=q&255):Z(this,q,Y,!1),Y+2},g.prototype.writeInt32LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8,this[Y+2]=q>>>16,this[Y+3]=q>>>24):ue(this,q,Y,!0),Y+4},g.prototype.writeInt32BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,2147483647,-2147483648),q<0&&(q=4294967295+q+1),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>24,this[Y+1]=q>>>16,this[Y+2]=q>>>8,this[Y+3]=q&255):ue(this,q,Y,!1),Y+4};function de(ie,q,Y,X,he,fe){if(Y+X>ie.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ce(ie,q,Y,X,he){return he||de(ie,q,Y,4,34028234663852886e22,-34028234663852886e22),N.write(ie,q,Y,X,23,4),Y+4}g.prototype.writeFloatLE=function(q,Y,X){return Ce(this,q,Y,!0,X)},g.prototype.writeFloatBE=function(q,Y,X){return Ce(this,q,Y,!1,X)};function Re(ie,q,Y,X,he){return he||de(ie,q,Y,8,17976931348623157e292,-17976931348623157e292),N.write(ie,q,Y,X,52,8),Y+8}g.prototype.writeDoubleLE=function(q,Y,X){return Re(this,q,Y,!0,X)},g.prototype.writeDoubleBE=function(q,Y,X){return Re(this,q,Y,!1,X)},g.prototype.copy=function(q,Y,X,he){if(X||(X=0),!he&&he!==0&&(he=this.length),Y>=q.length&&(Y=q.length),Y||(Y=0),he>0&&he<X&&(he=X),he===X)return 0;if(q.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("sourceStart out of bounds");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),q.length-Y<he-X&&(he=q.length-Y+X);var fe=he-X,xe;if(this===q&&X<Y&&Y<he)for(xe=fe-1;xe>=0;--xe)q[xe+Y]=this[xe+X];else if(fe<1e3||!g.TYPED_ARRAY_SUPPORT)for(xe=0;xe<fe;++xe)q[xe+Y]=this[xe+X];else Uint8Array.prototype.set.call(q,this.subarray(X,X+fe),Y);return fe},g.prototype.fill=function(q,Y,X,he){if(typeof q=="string"){if(typeof Y=="string"?(he=Y,Y=0,X=this.length):typeof X=="string"&&(he=X,X=this.length),q.length===1){var fe=q.charCodeAt(0);fe<256&&(q=fe)}if(he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!g.isEncoding(he))throw new TypeError("Unknown encoding: "+he)}else typeof q=="number"&&(q=q&255);if(Y<0||this.length<Y||this.length<X)throw new RangeError("Out of range index");if(X<=Y)return this;Y=Y>>>0,X=X===void 0?this.length:X>>>0,q||(q=0);var xe;if(typeof q=="number")for(xe=Y;xe<X;++xe)this[xe]=q;else{var Ke=g.isBuffer(q)?q:le(new g(q,he).toString()),Ze=Ke.length;for(xe=0;xe<X-Y;++xe)this[xe+Y]=Ke[xe%Ze]}return this};var me=/[^+\/0-9A-Za-z-_]/g;function Oe(ie){if(ie=be(ie).replace(me,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function be(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function ce(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function le(ie,q){q=q||Infinity;for(var Y,X=ie.length,he=null,fe=[],xe=0;xe<X;++xe){if(Y=ie.charCodeAt(xe),Y>55295&&Y<57344){if(!he){if(Y>56319){(q-=3)>-1&&fe.push(239,191,189);continue}else if(xe+1===X){(q-=3)>-1&&fe.push(239,191,189);continue}he=Y;continue}if(Y<56320){(q-=3)>-1&&fe.push(239,191,189),he=Y;continue}Y=(he-55296<<10|Y-56320)+65536}else he&&((q-=3)>-1&&fe.push(239,191,189));if(he=null,Y<128){if((q-=1)<0)break;fe.push(Y)}else if(Y<2048){if((q-=2)<0)break;fe.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((q-=3)<0)break;fe.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((q-=4)<0)break;fe.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return fe}function ne(ie){for(var q=[],Y=0;Y<ie.length;++Y)q.push(ie.charCodeAt(Y)&255);return q}function ge(ie,q){for(var Y,X,he,fe=[],xe=0;xe<ie.length&&!((q-=2)<0);++xe)Y=ie.charCodeAt(xe),X=Y>>8,he=Y%256,fe.push(he),fe.push(X);return fe}function te(ie){return C.toByteArray(Oe(ie))}function re(ie,q,Y,X){for(var he=0;he<X&&!(he+Y>=q.length||he>=ie.length);++he)q[he+Y]=ie[he];return he}function Se(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(H,J,D){J.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(H,J,D){J.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(H,J,D){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var M=Array.prototype.slice;J.exports=g;function g(N,m){if(!(this instanceof g))return new g(N,m);this.src=N,this._withAccess=m}g.prototype.withAccess=function(N){return this._withAccess=N!==!1,this},g.prototype.pick=function(N){return Array.isArray(N)||(N=M.call(arguments)),N.length&&(this.keys=N),this},g.prototype.to=function(N){if(N=N||{},!this.src)return N;var m=this.keys||Object.keys(this.src);if(!this._withAccess){for(var v=0;v<m.length;v++){if(T=m[v],N[T]!==void 0)continue;N[T]=this.src[T]}return N}for(var v=0;v<m.length;v++){var T=m[v];if(!C(N,T))continue;var y=this.src.__lookupGetter__(T),t=this.src.__lookupSetter__(T);y&&N.__defineGetter__(T,y),t&&N.__defineSetter__(T,t),!y&&!t&&(N[T]=this.src[T])}return N},g.prototype.toCover=function(N){for(var m=this.keys||Object.keys(this.src),v=0;v<m.length;v++){var T=m[v];delete N[T];var y=this.src.__lookupGetter__(T),t=this.src.__lookupSetter__(T);y&&N.__defineGetter__(T,y),t&&N.__defineSetter__(T,t),!y&&!t&&(N[T]=this.src[T])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(N){var m={};return this.to(m),this.src=N,this.to(m),this.src=m,this};function C(N,m){return N[m]===void 0&&N.__lookupGetter__(m)===void 0&&N.__lookupSetter__(m)===void 0}},{}],77:[function(H,J,D){H("../../modules/es6.string.iterator"),H("../../modules/es6.array.from"),J.exports=H("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(H,J,D){var M=H("../../modules/_core"),g=M.JSON||(M.JSON={stringify:JSON.stringify});J.exports=function(N){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(H,J,D){H("../../modules/es6.object.assign"),J.exports=H("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(H,J,D){H("../../modules/es6.object.create");var M=H("../../modules/_core").Object;J.exports=function(C,N){return M.create(C,N)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(H,J,D){H("../../modules/es6.object.define-property");var M=H("../../modules/_core").Object;J.exports=function(C,N,m){return M.defineProperty(C,N,m)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(H,J,D){H("../../modules/es7.object.entries"),J.exports=H("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(H,J,D){H("../../modules/es6.object.get-own-property-names");var M=H("../../modules/_core").Object;J.exports=function(C){return M.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(H,J,D){H("../../modules/es6.object.get-prototype-of"),J.exports=H("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(H,J,D){H("../../modules/es6.object.keys"),J.exports=H("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(H,J,D){H("../modules/es6.object.to-string"),H("../modules/es6.string.iterator"),H("../modules/web.dom.iterable"),H("../modules/es6.promise"),H("../modules/es7.promise.finally"),H("../modules/es7.promise.try"),J.exports=H("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(H,J,D){H("../modules/web.immediate"),J.exports=H("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(H,J,D){H("../../modules/es6.string.from-code-point"),J.exports=H("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(H,J,D){H("../../modules/es6.function.has-instance"),J.exports=H("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(H,J,D){H("../../modules/es6.symbol"),H("../../modules/es6.object.to-string"),H("../../modules/es7.symbol.async-iterator"),H("../../modules/es7.symbol.observable"),J.exports=H("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(H,J,D){H("../../modules/es6.string.iterator"),H("../../modules/web.dom.iterable"),J.exports=H("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(H,J,D){J.exports=function(M){if(typeof M!="function")throw TypeError(M+" is not a function!");return M}},{}],93:[function(H,J,D){J.exports=function(){}},{}],94:[function(H,J,D){J.exports=function(M,g,C,N){if(!(M instanceof g)||N!==void 0&&N in M)throw TypeError(C+": incorrect invocation!");return M}},{}],95:[function(H,J,D){var M=H("./_is-object");J.exports=function(g){if(!M(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(H,J,D){var M=H("./_to-iobject"),g=H("./_to-length"),C=H("./_to-absolute-index");J.exports=function(N){return function(m,v,T){var y=M(m),t=g(y.length),h=C(T,t),i;if(N&&v!=v){for(;t>h;)if(i=y[h++],i!=i)return!0}else for(;t>h;h++)if((N||h in y)&&y[h]===v)return N||h||0;return!N&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(H,J,D){var M=H("./_cof"),g=H("./_wks")("toStringTag"),C=M(function(){return arguments}())=="Arguments",N=function(m,v){try{return m[v]}catch(T){}};J.exports=function(m){var v,T,y;return m===void 0?"Undefined":m===null?"Null":typeof(T=N(v=Object(m),g))=="string"?T:C?M(v):(y=M(v))=="Object"&&typeof v.callee=="function"?"Arguments":y}},{"./_cof":98,"./_wks":166}],98:[function(H,J,D){var M={}.toString;J.exports=function(g){return M.call(g).slice(8,-1)}},{}],99:[function(H,J,D){var M=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=M)},{}],100:[function(H,J,D){"use strict";var M=H("./_object-dp"),g=H("./_property-desc");J.exports=function(C,N,m){N in C?M.f(C,N,g(0,m)):C[N]=m}},{"./_object-dp":132,"./_property-desc":146}],101:[function(H,J,D){var M=H("./_a-function");J.exports=function(g,C,N){if(M(g),C===void 0)return g;switch(N){case 1:return function(m){return g.call(C,m)};case 2:return function(m,v){return g.call(C,m,v)};case 3:return function(m,v,T){return g.call(C,m,v,T)}}return function(){return g.apply(C,arguments)}}},{"./_a-function":92}],102:[function(H,J,D){J.exports=function(M){if(M==null)throw TypeError("Can't call method on "+M);return M}},{}],103:[function(H,J,D){J.exports=!H("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(H,J,D){var M=H("./_is-object"),g=H("./_global").document,C=M(g)&&M(g.createElement);J.exports=function(N){return C?g.createElement(N):{}}},{"./_global":110,"./_is-object":119}],105:[function(H,J,D){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(H,J,D){var M=H("./_object-keys"),g=H("./_object-gops"),C=H("./_object-pie");J.exports=function(N){var m=M(N),v=g.f;if(v)for(var T=v(N),y=C.f,t=0,h;T.length>t;)y.call(N,h=T[t++])&&m.push(h);return m}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(H,J,D){var M=H("./_global"),g=H("./_core"),C=H("./_ctx"),N=H("./_hide"),m=H("./_has"),v="prototype",T=function(y,t,h){var i=y&T.F,c=y&T.G,a=y&T.S,n=y&T.P,s=y&T.B,d=y&T.W,f=c?g:g[t]||(g[t]={}),l=f[v],o=c?M:a?M[t]:(M[t]||{})[v],r,x,b;c&&(h=t);for(r in h){if(x=!i&&o&&o[r]!==void 0,x&&m(f,r))continue;b=x?o[r]:h[r],f[r]=c&&typeof o[r]!="function"?h[r]:s&&x?C(b,M):d&&o[r]==b?function(p){var I=function(O,_,E){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(O);case 2:return new p(O,_)}return new p(O,_,E)}return p.apply(this,arguments)};return I[v]=p[v],I}(b):n&&typeof b=="function"?C(Function.call,b):b,n&&((f.virtual||(f.virtual={}))[r]=b,y&T.R&&l&&!l[r]&&N(l,r,b))}};T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128,J.exports=T},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(H,J,D){J.exports=function(M){try{return!!M()}catch(g){return!0}}},{}],109:[function(H,J,D){var M=H("./_ctx"),g=H("./_iter-call"),C=H("./_is-array-iter"),N=H("./_an-object"),m=H("./_to-length"),v=H("./core.get-iterator-method"),T={},y={},D=J.exports=function(t,h,i,c,a){var n=a?function(){return t}:v(t),s=M(i,c,h?2:1),d=0,f,l,o,r;if(typeof n!="function")throw TypeError(t+" is not iterable!");if(C(n)){for(f=m(t.length);f>d;d++)if(r=h?s(N(l=t[d])[0],l[1]):s(t[d]),r===T||r===y)return r}else for(o=n.call(t);!(l=o.next()).done;)if(r=g(o,s,l.value,h),r===T||r===y)return r};D.BREAK=T,D.RETURN=y},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(H,J,D){var M=J.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=M)},{}],111:[function(H,J,D){var M={}.hasOwnProperty;J.exports=function(g,C){return M.call(g,C)}},{}],112:[function(H,J,D){var M=H("./_object-dp"),g=H("./_property-desc");J.exports=H("./_descriptors")?function(C,N,m){return M.f(C,N,g(1,m))}:function(C,N,m){return C[N]=m,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(H,J,D){var M=H("./_global").document;J.exports=M&&M.documentElement},{"./_global":110}],114:[function(H,J,D){J.exports=!H("./_descriptors")&&!H("./_fails")(function(){return Object.defineProperty(H("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(H,J,D){J.exports=function(M,g,C){var N=C===void 0;switch(g.length){case 0:return N?M():M.call(C);case 1:return N?M(g[0]):M.call(C,g[0]);case 2:return N?M(g[0],g[1]):M.call(C,g[0],g[1]);case 3:return N?M(g[0],g[1],g[2]):M.call(C,g[0],g[1],g[2]);case 4:return N?M(g[0],g[1],g[2],g[3]):M.call(C,g[0],g[1],g[2],g[3])}return M.apply(C,g)}},{}],116:[function(H,J,D){var M=H("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return M(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(H,J,D){var M=H("./_iterators"),g=H("./_wks")("iterator"),C=Array.prototype;J.exports=function(N){return N!==void 0&&(M.Array===N||C[g]===N)}},{"./_iterators":125,"./_wks":166}],118:[function(H,J,D){var M=H("./_cof");J.exports=Array.isArray||function(C){return M(C)=="Array"}},{"./_cof":98}],119:[function(H,J,D){J.exports=function(M){return typeof M=="object"?M!==null:typeof M=="function"}},{}],120:[function(H,J,D){var M=H("./_an-object");J.exports=function(g,C,N,m){try{return m?C(M(N)[0],N[1]):C(N)}catch(T){var v=g.return;throw v!==void 0&&M(v.call(g)),T}}},{"./_an-object":95}],121:[function(H,J,D){"use strict";var M=H("./_object-create"),g=H("./_property-desc"),C=H("./_set-to-string-tag"),N={};H("./_hide")(N,H("./_wks")("iterator"),function(){return this}),J.exports=function(m,v,T){m.prototype=M(N,{next:g(1,T)}),C(m,v+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(H,J,D){"use strict";var M=H("./_library"),g=H("./_export"),C=H("./_redefine"),N=H("./_hide"),m=H("./_iterators"),v=H("./_iter-create"),T=H("./_set-to-string-tag"),y=H("./_object-gpo"),t=H("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),i="@@iterator",c="keys",a="values",n=function(){return this};J.exports=function(s,d,f,l,o,r,x){v(f,d,l);var b=function(z){if(!h&&z in _)return _[z];switch(z){case c:return function(){return new f(this,z)};case a:return function(){return new f(this,z)}}return function(){return new f(this,z)}},p=d+" Iterator",I=o==a,O=!1,_=s.prototype,E=_[t]||_[i]||o&&_[o],w=E||b(o),S=o?I?b("entries"):w:void 0,F=d=="Array"&&_.entries||E,P,L,G;if(F&&(G=y(F.call(new s)),G!==Object.prototype&&G.next&&(T(G,p,!0),!M&&typeof G[t]!="function"&&N(G,t,n))),I&&E&&E.name!==a&&(O=!0,w=function(){return E.call(this)}),(!M||x)&&(h||O||!_[t])&&N(_,t,w),m[d]=w,m[p]=n,o)if(P={values:I?w:b(a),keys:r?w:b(c),entries:S},x)for(L in P)L in _||C(_,L,P[L]);else g(g.P+g.F*(h||O),d,P);return P}},{"./_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(H,J,D){var M=H("./_wks")("iterator"),g=!1;try{var C=[7][M]();C.return=function(){g=!0},Array.from(C,function(){throw 2})}catch(N){}J.exports=function(N,m){if(!m&&!g)return!1;var v=!1;try{var T=[7],y=T[M]();y.next=function(){return{done:v=!0}},T[M]=function(){return y},N(T)}catch(t){}return v}},{"./_wks":166}],124:[function(H,J,D){J.exports=function(M,g){return{value:g,done:!!M}}},{}],125:[function(H,J,D){J.exports={}},{}],126:[function(H,J,D){J.exports=!0},{}],127:[function(H,J,D){var M=H("./_uid")("meta"),g=H("./_is-object"),C=H("./_has"),N=H("./_object-dp").f,m=0,v=Object.isExtensible||function(){return!0},T=!H("./_fails")(function(){return v(Object.preventExtensions({}))}),y=function(a){N(a,M,{value:{i:"O"+ ++m,w:{}}})},t=function(a,n){if(!g(a))return typeof a=="symbol"?a:(typeof a=="string"?"S":"P")+a;if(!C(a,M)){if(!v(a))return"F";if(!n)return"E";y(a)}return a[M].i},h=function(a,n){if(!C(a,M)){if(!v(a))return!0;if(!n)return!1;y(a)}return a[M].w},i=function(a){return T&&c.NEED&&v(a)&&!C(a,M)&&y(a),a},c=J.exports={KEY:M,NEED:!1,fastKey:t,getWeak:h,onFreeze:i}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(H,J,D){var M=H("./_global"),g=H("./_task").set,C=M.MutationObserver||M.WebKitMutationObserver,N=M.process,m=M.Promise,v=H("./_cof")(N)=="process";J.exports=function(){var T,y,t,h=function(){var n,s;for(v&&(n=N.domain)&&n.exit();T;){s=T.fn,T=T.next;try{s()}catch(d){throw T?t():y=void 0,d}}y=void 0,n&&n.enter()};if(v)t=function(){N.nextTick(h)};else if(C&&!(M.navigator&&M.navigator.standalone)){var i=!0,c=document.createTextNode("");new C(h).observe(c,{characterData:!0}),t=function(){c.data=i=!i}}else if(m&&m.resolve){var a=m.resolve(void 0);t=function(){a.then(h)}}else t=function(){g.call(M,h)};return function(n){var s={fn:n,next:void 0};y&&(y.next=s),T||(T=s,t()),y=s}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(H,J,D){"use strict";var M=H("./_a-function");function g(C){var N,m;this.promise=new C(function(v,T){if(N!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");N=v,m=T}),this.resolve=M(N),this.reject=M(m)}J.exports.f=function(C){return new g(C)}},{"./_a-function":92}],130:[function(H,J,D){"use strict";var M=H("./_descriptors"),g=H("./_object-keys"),C=H("./_object-gops"),N=H("./_object-pie"),m=H("./_to-object"),v=H("./_iobject"),T=Object.assign;J.exports=!T||H("./_fails")(function(){var y={},t={},h=Symbol(),i="abcdefghijklmnopqrst";return y[h]=7,i.split("").forEach(function(c){t[c]=c}),T({},y)[h]!=7||Object.keys(T({},t)).join("")!=i})?function(t,h){for(var i=m(t),c=arguments.length,a=1,n=C.f,s=N.f;c>a;)for(var d=v(arguments[a++]),f=n?g(d).concat(n(d)):g(d),l=f.length,o=0,r;l>o;)r=f[o++],(!M||s.call(d,r))&&(i[r]=d[r]);return i}:T},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(H,J,D){var M=H("./_an-object"),g=H("./_object-dps"),C=H("./_enum-bug-keys"),N=H("./_shared-key")("IE_PROTO"),m=function(){},v="prototype",T=function(){var y=H("./_dom-create")("iframe"),t=C.length,h="<",i=">",c;for(y.style.display="none",H("./_html").appendChild(y),y.src="javascript:",c=y.contentWindow.document,c.open(),c.write(h+"script"+i+"document.F=Object"+h+"/script"+i),c.close(),T=c.F;t--;)delete T[v][C[t]];return T()};J.exports=Object.create||function(t,h){var i;return t!==null?(m[v]=M(t),i=new m,m[v]=null,i[N]=t):i=T(),h===void 0?i:g(i,h)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(H,J,D){var M=H("./_an-object"),g=H("./_ie8-dom-define"),C=H("./_to-primitive"),N=Object.defineProperty;D.f=H("./_descriptors")?Object.defineProperty:function(v,T,y){if(M(v),T=C(T,!0),M(y),g)try{return N(v,T,y)}catch(t){}if("get"in y||"set"in y)throw TypeError("Accessors not supported!");return"value"in y&&(v[T]=y.value),v}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(H,J,D){var M=H("./_object-dp"),g=H("./_an-object"),C=H("./_object-keys");J.exports=H("./_descriptors")?Object.defineProperties:function(m,v){g(m);for(var T=C(v),y=T.length,t=0,h;y>t;)M.f(m,h=T[t++],v[h]);return m}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(H,J,D){var M=H("./_object-pie"),g=H("./_property-desc"),C=H("./_to-iobject"),N=H("./_to-primitive"),m=H("./_has"),v=H("./_ie8-dom-define"),T=Object.getOwnPropertyDescriptor;D.f=H("./_descriptors")?T:function(t,h){if(t=C(t),h=N(h,!0),v)try{return T(t,h)}catch(i){}if(m(t,h))return g(!M.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(H,J,D){var M=H("./_to-iobject"),g=H("./_object-gopn").f,C={}.toString,N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],m=function(v){try{return g(v)}catch(T){return N.slice()}};J.exports.f=function(T){return N&&C.call(T)=="[object Window]"?m(T):g(M(T))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(H,J,D){var M=H("./_object-keys-internal"),g=H("./_enum-bug-keys").concat("length","prototype");D.f=Object.getOwnPropertyNames||function(N){return M(N,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(H,J,D){D.f=Object.getOwnPropertySymbols},{}],138:[function(H,J,D){var M=H("./_has"),g=H("./_to-object"),C=H("./_shared-key")("IE_PROTO"),N=Object.prototype;J.exports=Object.getPrototypeOf||function(m){return m=g(m),M(m,C)?m[C]:typeof m.constructor=="function"&&m instanceof m.constructor?m.constructor.prototype:m instanceof Object?N:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(H,J,D){var M=H("./_has"),g=H("./_to-iobject"),C=H("./_array-includes")(!1),N=H("./_shared-key")("IE_PROTO");J.exports=function(m,v){var T=g(m),y=0,t=[],h;for(h in T)h!=N&&(M(T,h)&&t.push(h));for(;v.length>y;)M(T,h=v[y++])&&(~C(t,h)||t.push(h));return t}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(H,J,D){var M=H("./_object-keys-internal"),g=H("./_enum-bug-keys");J.exports=Object.keys||function(N){return M(N,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(H,J,D){D.f={}.propertyIsEnumerable},{}],142:[function(H,J,D){var M=H("./_export"),g=H("./_core"),C=H("./_fails");J.exports=function(N,m){var v=(g.Object||{})[N]||Object[N],T={};T[N]=m(v),M(M.S+M.F*C(function(){v(1)}),"Object",T)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(H,J,D){var M=H("./_descriptors"),g=H("./_object-keys"),C=H("./_to-iobject"),N=H("./_object-pie").f;J.exports=function(m){return function(v){for(var T=C(v),y=g(T),t=y.length,h=0,i=[],c;t>h;)c=y[h++],(!M||N.call(T,c))&&i.push(m?[c,T[c]]:T[c]);return i}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(H,J,D){J.exports=function(M){try{return{e:!1,v:M()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(H,J,D){var M=H("./_an-object"),g=H("./_is-object"),C=H("./_new-promise-capability");J.exports=function(N,m){if(M(N),g(m)&&m.constructor===N)return m;var v=C.f(N),T=v.resolve;return T(m),v.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(H,J,D){J.exports=function(M,g){return{enumerable:!(M&1),configurable:!(M&2),writable:!(M&4),value:g}}},{}],147:[function(H,J,D){var M=H("./_hide");J.exports=function(g,C,N){for(var m in C)N&&g[m]?g[m]=C[m]:M(g,m,C[m]);return g}},{"./_hide":112}],148:[function(H,J,D){J.exports=H("./_hide")},{"./_hide":112}],149:[function(H,J,D){"use strict";var M=H("./_global"),g=H("./_core"),C=H("./_object-dp"),N=H("./_descriptors"),m=H("./_wks")("species");J.exports=function(v){var T=typeof g[v]=="function"?g[v]:M[v];N&&T&&!T[m]&&C.f(T,m,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(H,J,D){var M=H("./_object-dp").f,g=H("./_has"),C=H("./_wks")("toStringTag");J.exports=function(N,m,v){N&&!g(N=v?N:N.prototype,C)&&M(N,C,{configurable:!0,value:m})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(H,J,D){var M=H("./_shared")("keys"),g=H("./_uid");J.exports=function(C){return M[C]||(M[C]=g(C))}},{"./_shared":152,"./_uid":162}],152:[function(H,J,D){var M=H("./_core"),g=H("./_global"),C="__core-js_shared__",N=g[C]||(g[C]={});(J.exports=function(m,v){return N[m]||(N[m]=v!==void 0?v:{})})("versions",[]).push({version:M.version,mode:H("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(H,J,D){var M=H("./_an-object"),g=H("./_a-function"),C=H("./_wks")("species");J.exports=function(N,m){var v=M(N).constructor,T;return v===void 0||(T=M(v)[C])==null?m:g(T)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(H,J,D){var M=H("./_to-integer"),g=H("./_defined");J.exports=function(C){return function(N,m){var v=String(g(N)),T=M(m),y=v.length,t,h;return T<0||T>=y?C?"":void 0:(t=v.charCodeAt(T),t<55296||t>56319||T+1===y||(h=v.charCodeAt(T+1))<56320||h>57343?C?v.charAt(T):t:C?v.slice(T,T+2):(t-55296<<10)+(h-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(H,J,D){var M=H("./_ctx"),g=H("./_invoke"),C=H("./_html"),N=H("./_dom-create"),m=H("./_global"),v=m.process,T=m.setImmediate,y=m.clearImmediate,t=m.MessageChannel,h=m.Dispatch,i=0,c={},a="onreadystatechange",n,s,d,f=function(){var o=+this;if(c.hasOwnProperty(o)){var r=c[o];delete c[o],r()}},l=function(o){f.call(o.data)};(!T||!y)&&(T=function(r){for(var x=[],b=1;arguments.length>b;)x.push(arguments[b++]);return c[++i]=function(){g(typeof r=="function"?r:Function(r),x)},n(i),i},y=function(r){delete c[r]},H("./_cof")(v)=="process"?n=function(o){v.nextTick(M(f,o,1))}:h&&h.now?n=function(o){h.now(M(f,o,1))}:t?(s=new t,d=s.port2,s.port1.onmessage=l,n=M(d.postMessage,d,1)):m.addEventListener&&typeof postMessage=="function"&&!m.importScripts?(n=function(o){m.postMessage(o+"","*")},m.addEventListener("message",l,!1)):a in N("script")?n=function(o){C.appendChild(N("script"))[a]=function(){C.removeChild(this),f.call(o)}}:n=function(o){setTimeout(M(f,o,1),0)}),J.exports={set:T,clear:y}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(H,J,D){var M=H("./_to-integer"),g=Math.max,C=Math.min;J.exports=function(N,m){return N=M(N),N<0?g(N+m,0):C(N,m)}},{"./_to-integer":157}],157:[function(H,J,D){var M=Math.ceil,g=Math.floor;J.exports=function(C){return isNaN(C=+C)?0:(C>0?g:M)(C)}},{}],158:[function(H,J,D){var M=H("./_iobject"),g=H("./_defined");J.exports=function(C){return M(g(C))}},{"./_defined":102,"./_iobject":116}],159:[function(H,J,D){var M=H("./_to-integer"),g=Math.min;J.exports=function(C){return C>0?g(M(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(H,J,D){var M=H("./_defined");J.exports=function(g){return Object(M(g))}},{"./_defined":102}],161:[function(H,J,D){var M=H("./_is-object");J.exports=function(g,C){if(!M(g))return g;var N,m;if(C&&typeof(N=g.toString)=="function"&&!M(m=N.call(g)))return m;if(typeof(N=g.valueOf)=="function"&&!M(m=N.call(g)))return m;if(!C&&typeof(N=g.toString)=="function"&&!M(m=N.call(g)))return m;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(H,J,D){var M=0,g=Math.random();J.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++M+g).toString(36))}},{}],163:[function(H,J,D){var M=H("./_global"),g=M.navigator;J.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(H,J,D){var M=H("./_global"),g=H("./_core"),C=H("./_library"),N=H("./_wks-ext"),m=H("./_object-dp").f;J.exports=function(v){var T=g.Symbol||(g.Symbol=C?{}:M.Symbol||{});v.charAt(0)!="_"&&!(v in T)&&m(T,v,{value:N.f(v)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(H,J,D){D.f=H("./_wks")},{"./_wks":166}],166:[function(H,J,D){var M=H("./_shared")("wks"),g=H("./_uid"),C=H("./_global").Symbol,N=typeof C=="function",m=J.exports=function(v){return M[v]||(M[v]=N&&C[v]||(N?C:g)("Symbol."+v))};m.store=M},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(H,J,D){var M=H("./_classof"),g=H("./_wks")("iterator"),C=H("./_iterators");J.exports=H("./_core").getIteratorMethod=function(N){if(N!=null)return N[g]||N["@@iterator"]||C[M(N)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(H,J,D){"use strict";var M=H("./_ctx"),g=H("./_export"),C=H("./_to-object"),N=H("./_iter-call"),m=H("./_is-array-iter"),v=H("./_to-length"),T=H("./_create-property"),y=H("./core.get-iterator-method");g(g.S+g.F*!H("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(h){var i=C(h),c=typeof this=="function"?this:Array,a=arguments.length,n=a>1?arguments[1]:void 0,s=n!==void 0,d=0,f=y(i),l,o,r,x;if(s&&(n=M(n,a>2?arguments[2]:void 0,2)),f!=null&&!(c==Array&&m(f)))for(x=f.call(i),o=new c;!(r=x.next()).done;d++)T(o,d,s?N(x,n,[r.value,d],!0):r.value);else for(l=v(i.length),o=new c(l);l>d;d++)T(o,d,s?n(i[d],d):i[d]);return o.length=d,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(H,J,D){"use strict";var M=H("./_add-to-unscopables"),g=H("./_iter-step"),C=H("./_iterators"),N=H("./_to-iobject");J.exports=H("./_iter-define")(Array,"Array",function(m,v){this._t=N(m),this._i=0,this._k=v},function(){var m=this._t,v=this._k,T=this._i++;return!m||T>=m.length?(this._t=void 0,g(1)):v=="keys"?g(0,T):v=="values"?g(0,m[T]):g(0,[T,m[T]])},"values"),C.Arguments=C.Array,M("keys"),M("values"),M("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(H,J,D){"use strict";var M=H("./_is-object"),g=H("./_object-gpo"),C=H("./_wks")("hasInstance"),N=Function.prototype;C in N||H("./_object-dp").f(N,C,{value:function(m){if(typeof this!="function"||!M(m))return!1;if(!M(this.prototype))return m instanceof this;for(;m=g(m);)if(this.prototype===m)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(H,J,D){var M=H("./_export");M(M.S+M.F,"Object",{assign:H("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(H,J,D){var M=H("./_export");M(M.S,"Object",{create:H("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(H,J,D){var M=H("./_export");M(M.S+M.F*!H("./_descriptors"),"Object",{defineProperty:H("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(H,J,D){H("./_object-sap")("getOwnPropertyNames",function(){return H("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(H,J,D){var M=H("./_to-object"),g=H("./_object-gpo");H("./_object-sap")("getPrototypeOf",function(){return function(N){return g(M(N))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(H,J,D){var M=H("./_to-object"),g=H("./_object-keys");H("./_object-sap")("keys",function(){return function(N){return g(M(N))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(H,J,D){arguments[4][71][0].apply(D,arguments)},{dup:71}],178:[function(H,J,D){"use strict";var M=H("./_library"),g=H("./_global"),C=H("./_ctx"),N=H("./_classof"),m=H("./_export"),v=H("./_is-object"),T=H("./_a-function"),y=H("./_an-instance"),t=H("./_for-of"),h=H("./_species-constructor"),i=H("./_task").set,c=H("./_microtask")(),a=H("./_new-promise-capability"),n=H("./_perform"),s=H("./_user-agent"),d=H("./_promise-resolve"),f="Promise",l=g.TypeError,o=g.process,r=o&&o.versions,x=r&&r.v8||"",b=g[f],p=N(o)=="process",I=function(){},O,_,E,w,S=_=a.f,F=!!function(){try{var R=b.resolve(1),K=(R.constructor={})[H("./_wks")("species")]=function(Z){Z(I,I)};return(p||typeof PromiseRejectionEvent=="function")&&R.then(I)instanceof K&&x.indexOf("6.6")!==0&&s.indexOf("Chrome/66")===-1}catch(Z){}}(),P=function(R){var K;return v(R)&&typeof(K=R.then)=="function"?K:!1},L=function(R,K){if(R._n)return;R._n=!0;var Z=R._c;c(function(){for(var ue=R._v,de=R._s==1,Ce=0,Re=function(me){var Oe=de?me.ok:me.fail,be=me.resolve,ce=me.reject,le=me.domain,ne,ge,te;try{Oe?(de||(R._h==2&&A(R),R._h=1),Oe===!0?ne=ue:(le&&le.enter(),ne=Oe(ue),le&&(le.exit(),te=!0)),ne===me.promise?ce(l("Promise-chain cycle")):(ge=P(ne))?ge.call(ne,be,ce):be(ne)):ce(ue)}catch(re){le&&!te&&le.exit(),ce(re)}};Z.length>Ce;)Re(Z[Ce++]);R._c=[],R._n=!1,K&&!R._h&&G(R)})},G=function(R){i.call(g,function(){var K=R._v,Z=z(R),ue,de,Ce;if(Z&&(ue=n(function(){p?o.emit("unhandledRejection",K,R):(de=g.onunhandledrejection)?de({promise:R,reason:K}):(Ce=g.console)&&Ce.error&&Ce.error("Unhandled promise rejection",K)}),R._h=p||z(R)?2:1),R._a=void 0,Z&&ue.e)throw ue.v})},z=function(R){return R._h!==1&&(R._a||R._c).length===0},A=function(R){i.call(g,function(){var K;p?o.emit("rejectionHandled",R):(K=g.onrejectionhandled)&&K({promise:R,reason:R._v})})},B=function(R){var K=this;if(K._d)return;K._d=!0,K=K._w||K,K._v=R,K._s=2,K._a||(K._a=K._c.slice()),L(K,!0)},U=function(R){var K=this,Z;if(K._d)return;K._d=!0,K=K._w||K;try{if(K===R)throw l("Promise can't be resolved itself");(Z=P(R))?c(function(){var ue={_w:K,_d:!1};try{Z.call(R,C(U,ue,1),C(B,ue,1))}catch(de){B.call(ue,de)}}):(K._v=R,K._s=1,L(K,!1))}catch(ue){B.call({_w:K,_d:!1},ue)}};F||(b=function(K){y(this,b,f,"_h"),T(K),O.call(this);try{K(C(U,this,1),C(B,this,1))}catch(Z){B.call(this,Z)}},O=function(K){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=H("./_redefine-all")(b.prototype,{then:function(K,Z){var ue=S(h(this,b));return ue.ok=typeof K=="function"?K:!0,ue.fail=typeof Z=="function"&&Z,ue.domain=p?o.domain:void 0,this._c.push(ue),this._a&&this._a.push(ue),this._s&&L(this,!1),ue.promise},catch:function(R){return this.then(void 0,R)}}),E=function(){var R=new O;this.promise=R,this.resolve=C(U,R,1),this.reject=C(B,R,1)},a.f=S=function(R){return R===b||R===w?new E(R):_(R)}),m(m.G+m.W+m.F*!F,{Promise:b}),H("./_set-to-string-tag")(b,f),H("./_set-species")(f),w=H("./_core")[f],m(m.S+m.F*!F,f,{reject:function(K){var Z=S(this),ue=Z.reject;return ue(K),Z.promise}}),m(m.S+m.F*(M||!F),f,{resolve:function(K){return d(M&&this===w?b:this,K)}}),m(m.S+m.F*!(F&&H("./_iter-detect")(function(R){b.all(R).catch(I)})),f,{all:function(K){var Z=this,ue=S(Z),de=ue.resolve,Ce=ue.reject,Re=n(function(){var me=[],Oe=0,be=1;t(K,!1,function(ce){var le=Oe++,ne=!1;me.push(void 0),be++,Z.resolve(ce).then(function(ge){if(ne)return;ne=!0,me[le]=ge,--be||de(me)},Ce)}),--be||de(me)});return Re.e&&Ce(Re.v),ue.promise},race:function(K){var Z=this,ue=S(Z),de=ue.reject,Ce=n(function(){t(K,!1,function(Re){Z.resolve(Re).then(ue.resolve,de)})});return Ce.e&&de(Ce.v),ue.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(H,J,D){var M=H("./_export"),g=H("./_to-absolute-index"),C=String.fromCharCode,N=String.fromCodePoint;M(M.S+M.F*(!!N&&N.length!=1),"String",{fromCodePoint:function(v){for(var T=[],y=arguments.length,t=0,h;y>t;){if(h=+arguments[t++],g(h,1114111)!==h)throw RangeError(h+" is not a valid code point");T.push(h<65536?C(h):C(((h-=65536)>>10)+55296,h%1024+56320))}return T.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(H,J,D){"use strict";var M=H("./_string-at")(!0);H("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,C=this._i,N;return C>=g.length?{value:void 0,done:!0}:(N=M(g,C),this._i+=N.length,{value:N,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(H,J,D){"use strict";var M=H("./_global"),g=H("./_has"),C=H("./_descriptors"),N=H("./_export"),m=H("./_redefine"),v=H("./_meta").KEY,T=H("./_fails"),y=H("./_shared"),t=H("./_set-to-string-tag"),h=H("./_uid"),i=H("./_wks"),c=H("./_wks-ext"),a=H("./_wks-define"),n=H("./_enum-keys"),s=H("./_is-array"),d=H("./_an-object"),f=H("./_is-object"),l=H("./_to-object"),o=H("./_to-iobject"),r=H("./_to-primitive"),x=H("./_property-desc"),b=H("./_object-create"),p=H("./_object-gopn-ext"),I=H("./_object-gopd"),O=H("./_object-gops"),_=H("./_object-dp"),E=H("./_object-keys"),w=I.f,S=_.f,F=p.f,P=M.Symbol,L=M.JSON,G=L&&L.stringify,z="prototype",A=i("_hidden"),B=i("toPrimitive"),U={}.propertyIsEnumerable,R=y("symbol-registry"),K=y("symbols"),Z=y("op-symbols"),ue=Object[z],de=typeof P=="function"&&!!O.f,Ce=M.QObject,Re=!Ce||!Ce[z]||!Ce[z].findChild,me=C&&T(function(){return b(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a!=7})?function(fe,xe,Ke){var Ze=w(ue,xe);Ze&&delete ue[xe],S(fe,xe,Ke),Ze&&fe!==ue&&S(ue,xe,Ze)}:S,Oe=function(fe){var xe=K[fe]=b(P[z]);return xe._k=fe,xe},be=de&&typeof P.iterator=="symbol"?function(fe){return typeof fe=="symbol"}:function(fe){return fe instanceof P},ce=function(xe,Ke,Ze){return xe===ue&&ce(Z,Ke,Ze),d(xe),Ke=r(Ke,!0),d(Ze),g(K,Ke)?(Ze.enumerable?(g(xe,A)&&xe[A][Ke]&&(xe[A][Ke]=!1),Ze=b(Ze,{enumerable:x(0,!1)})):(g(xe,A)||S(xe,A,x(1,{})),xe[A][Ke]=!0),me(xe,Ke,Ze)):S(xe,Ke,Ze)},le=function(xe,Ke){d(xe);for(var Ze=n(Ke=o(Ke)),et=0,st=Ze.length,ut;st>et;)ce(xe,ut=Ze[et++],Ke[ut]);return xe},ne=function(xe,Ke){return Ke===void 0?b(xe):le(b(xe),Ke)},ge=function(xe){var Ke=U.call(this,xe=r(xe,!0));return this===ue&&g(K,xe)&&!g(Z,xe)?!1:Ke||!g(this,xe)||!g(K,xe)||g(this,A)&&this[A][xe]?Ke:!0},te=function(xe,Ke){if(xe=o(xe),Ke=r(Ke,!0),xe===ue&&g(K,Ke)&&!g(Z,Ke))return;var Ze=w(xe,Ke);return Ze&&g(K,Ke)&&!(g(xe,A)&&xe[A][Ke])&&(Ze.enumerable=!0),Ze},re=function(xe){for(var Ke=F(o(xe)),Ze=[],et=0,st;Ke.length>et;)!g(K,st=Ke[et++])&&st!=A&&st!=v&&Ze.push(st);return Ze},Se=function(xe){for(var Ke=xe===ue,Ze=F(Ke?Z:o(xe)),et=[],st=0,ut;Ze.length>st;)g(K,ut=Ze[st++])&&(Ke?g(ue,ut):!0)&&et.push(K[ut]);return et};de||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var xe=h(arguments.length>0?arguments[0]:void 0),Ke=function(Ze){this===ue&&Ke.call(Z,Ze),g(this,A)&&g(this[A],xe)&&(this[A][xe]=!1),me(this,xe,x(1,Ze))};return C&&Re&&me(ue,xe,{configurable:!0,set:Ke}),Oe(xe)},m(P[z],"toString",function(){return this._k}),I.f=te,_.f=ce,H("./_object-gopn").f=p.f=re,H("./_object-pie").f=ge,O.f=Se,C&&!H("./_library")&&m(ue,"propertyIsEnumerable",ge,!0),c.f=function(fe){return Oe(i(fe))}),N(N.G+N.W+N.F*!de,{Symbol:P});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),q=0;ie.length>q;)i(ie[q++]);for(var Y=E(i.store),X=0;Y.length>X;)a(Y[X++]);N(N.S+N.F*!de,"Symbol",{for:function(fe){return g(R,fe+="")?R[fe]:R[fe]=P(fe)},keyFor:function(xe){if(!be(xe))throw TypeError(xe+" is not a symbol!");for(var Ke in R)if(R[Ke]===xe)return Ke},useSetter:function(){Re=!0},useSimple:function(){Re=!1}}),N(N.S+N.F*!de,"Object",{create:ne,defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:te,getOwnPropertyNames:re,getOwnPropertySymbols:Se});var he=T(function(){O.f(1)});N(N.S+N.F*he,"Object",{getOwnPropertySymbols:function(xe){return O.f(l(xe))}}),L&&N(N.S+N.F*(!de||T(function(){var fe=P();return G([fe])!="[null]"||G({a:fe})!="{}"||G(Object(fe))!="{}"})),"JSON",{stringify:function(xe){for(var Ke=[xe],Ze=1,et,st;arguments.length>Ze;)Ke.push(arguments[Ze++]);return st=et=Ke[1],!f(et)&&xe===void 0||be(xe)?void 0:(s(et)||(et=function(ut,dt){if(typeof st=="function"&&(dt=st.call(this,ut,dt)),!be(dt))return dt}),Ke[1]=et,G.apply(L,Ke))}}),P[z][B]||H("./_hide")(P[z],B,P[z].valueOf),t(P,"Symbol"),t(Math,"Math",!0),t(M.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(H,J,D){var M=H("./_export"),g=H("./_object-to-array")(!0);M(M.S,"Object",{entries:function(N){return g(N)}})},{"./_export":107,"./_object-to-array":143}],183:[function(H,J,D){"use strict";var M=H("./_export"),g=H("./_core"),C=H("./_global"),N=H("./_species-constructor"),m=H("./_promise-resolve");M(M.P+M.R,"Promise",{finally:function(v){var T=N(this,g.Promise||C.Promise),y=typeof v=="function";return this.then(y?function(t){return m(T,v()).then(function(){return t})}:v,y?function(t){return m(T,v()).then(function(){throw t})}:v)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(H,J,D){"use strict";var M=H("./_export"),g=H("./_new-promise-capability"),C=H("./_perform");M(M.S,"Promise",{try:function(N){var m=g.f(this),v=C(N);return(v.e?m.reject:m.resolve)(v.v),m.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(H,J,D){H("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(H,J,D){H("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(H,J,D){H("./es6.array.iterator");for(var M=H("./_global"),g=H("./_hide"),C=H("./_iterators"),N=H("./_wks")("toStringTag"),m="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),v=0;v<m.length;v++){var T=m[v],y=M[T],t=y&&y.prototype;t&&!t[N]&&g(t,N,T),C[T]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(H,J,D){var M=H("./_export"),g=H("./_task");M(M.G+M.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/helpers/typeof"),C=N(g);function N(r){return r&&r.__esModule?r:{default:r}}function m(r){return Array.isArray?Array.isArray(r):o(r)==="[object Array]"}D.isArray=m;function v(r){return typeof r=="boolean"}D.isBoolean=v;function T(r){return r===null}D.isNull=T;function y(r){return r==null}D.isNullOrUndefined=y;function t(r){return typeof r=="number"}D.isNumber=t;function h(r){return typeof r=="string"}D.isString=h;function i(r){return(typeof r=="undefined"?"undefined":(0,C.default)(r))==="symbol"}D.isSymbol=i;function c(r){return r===void 0}D.isUndefined=c;function a(r){return o(r)==="[object RegExp]"}D.isRegExp=a;function n(r){return(typeof r=="undefined"?"undefined":(0,C.default)(r))==="object"&&r!==null}D.isObject=n;function s(r){return o(r)==="[object Date]"}D.isDate=s;function d(r){return o(r)==="[object Error]"||r instanceof Error}D.isError=d;function f(r){return typeof r=="function"}D.isFunction=f;function l(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||(typeof r=="undefined"?"undefined":(0,C.default)(r))==="symbol"||typeof r=="undefined"}D.isPrimitive=l,D.isBuffer=M.isBuffer;function o(r){return Object.prototype.toString.call(r)}}).call(this,{isBuffer:H("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(H,J,D){"use strict";var M=H("babel-runtime/helpers/typeof"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(N){"use strict";var m=function(){var h=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g;return function(a,n,s,d){if(arguments.length===1&&t(a)==="string"&&!/\d/.test(a)&&(n=a,a=void 0),a=a||new Date,a instanceof Date||(a=new Date(a)),isNaN(a))throw TypeError("Invalid date");n=String(m.masks[n]||n||m.masks.default);var f=n.slice(0,4);(f==="UTC:"||f==="GMT:")&&(n=n.slice(4),s=!0,f==="GMT:"&&(d=!0));var l=s?"getUTC":"get",o=a[l+"Date"](),r=a[l+"Day"](),x=a[l+"Month"](),b=a[l+"FullYear"](),p=a[l+"Hours"](),I=a[l+"Minutes"](),O=a[l+"Seconds"](),_=a[l+"Milliseconds"](),E=s?0:a.getTimezoneOffset(),w=T(a),S=y(a),F={d:o,dd:v(o),ddd:m.i18n.dayNames[r],dddd:m.i18n.dayNames[r+7],m:x+1,mm:v(x+1),mmm:m.i18n.monthNames[x],mmmm:m.i18n.monthNames[x+12],yy:String(b).slice(2),yyyy:b,h:p%12||12,hh:v(p%12||12),H:p,HH:v(p),M:I,MM:v(I),s:O,ss:v(O),l:v(_,3),L:v(Math.round(_/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:d?"GMT":s?"UTC":(String(a).match(i)||[""]).pop().replace(c,""),o:(E>0?"-":"+")+v(Math.floor(Math.abs(E)/60)*100+Math.abs(E)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:w,N:S};return n.replace(h,function(P){return P in F?F[P]:P.slice(1,P.length-1)})}}();m.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"},m.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function v(h,i){for(h=String(h),i=i||2;h.length<i;)h="0"+h;return h}function T(h){var i=new Date(h.getFullYear(),h.getMonth(),h.getDate());i.setDate(i.getDate()-(i.getDay()+6)%7+3);var c=new Date(i.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var a=i.getTimezoneOffset()-c.getTimezoneOffset();i.setHours(i.getHours()-a);var n=(i-c)/(864e5*7);return 1+Math.floor(n)}function y(h){var i=h.getDay();return i===0&&(i=7),i}function t(h){return h===null?"null":h===void 0?"undefined":(typeof h=="undefined"?"undefined":(0,g.default)(h))!=="object"?typeof h=="undefined"?"undefined":(0,g.default)(h):Array.isArray(h)?"array":{}.toString.call(h).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return m}):(typeof D=="undefined"?"undefined":(0,g.default)(D))==="object"?J.exports=m:N.dateFormat=m})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(H,J,D){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var M=/["'&<>]/;J.exports=g;function g(C){var N=""+C,m=M.exec(N);if(!m)return N;var v,T="",y=0,t=0;for(y=m.index;y<N.length;y++){switch(N.charCodeAt(y)){case 34:v="&quot;";break;case 38:v="&amp;";break;case 39:v="&#39;";break;case 60:v="&lt;";break;case 62:v="&gt;";break;default:continue}t!==y&&(T+=N.substring(t,y)),t=y+1,T+=v}return t!==y?T+N.substring(t,y):T}},{}],192:[function(H,J,D){function M(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}J.exports=M,M.EventEmitter=M,M.prototype._events=void 0,M.prototype._maxListeners=void 0,M.defaultMaxListeners=10,M.prototype.setMaxListeners=function(v){if(!C(v)||v<0||isNaN(v))throw TypeError("n must be a positive number");return this._maxListeners=v,this},M.prototype.emit=function(v){var T,y,t,h,i,c;if(this._events||(this._events={}),v==="error"&&(!this._events.error||N(this._events.error)&&!this._events.error.length)){if(T=arguments[1],T instanceof Error)throw T;var a=new Error('Uncaught, unspecified "error" event. ('+T+")");throw a.context=T,a}if(y=this._events[v],m(y))return!1;if(g(y))switch(arguments.length){case 1:y.call(this);break;case 2:y.call(this,arguments[1]);break;case 3:y.call(this,arguments[1],arguments[2]);break;default:h=Array.prototype.slice.call(arguments,1),y.apply(this,h)}else if(N(y))for(h=Array.prototype.slice.call(arguments,1),c=y.slice(),t=c.length,i=0;i<t;i++)c[i].apply(this,h);return!0},M.prototype.addListener=function(v,T){var y;if(!g(T))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",v,g(T.listener)?T.listener:T),this._events[v]?N(this._events[v])?this._events[v].push(T):this._events[v]=[this._events[v],T]:this._events[v]=T,N(this._events[v])&&!this._events[v].warned&&(m(this._maxListeners)?y=M.defaultMaxListeners:y=this._maxListeners,y&&y>0&&this._events[v].length>y&&(this._events[v].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[v].length),typeof console.trace=="function"&&console.trace())),this},M.prototype.on=M.prototype.addListener,M.prototype.once=function(v,T){if(!g(T))throw TypeError("listener must be a function");var y=!1;function t(){this.removeListener(v,t),y||(y=!0,T.apply(this,arguments))}return t.listener=T,this.on(v,t),this},M.prototype.removeListener=function(v,T){var y,t,h,i;if(!g(T))throw TypeError("listener must be a function");if(!this._events||!this._events[v])return this;if(y=this._events[v],h=y.length,t=-1,y===T||g(y.listener)&&y.listener===T)delete this._events[v],this._events.removeListener&&this.emit("removeListener",v,T);else if(N(y)){for(i=h;i-- >0;)if(y[i]===T||y[i].listener&&y[i].listener===T){t=i;break}if(t<0)return this;y.length===1?(y.length=0,delete this._events[v]):y.splice(t,1),this._events.removeListener&&this.emit("removeListener",v,T)}return this},M.prototype.removeAllListeners=function(v){var T,y;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[v]&&delete this._events[v],this;if(arguments.length===0){for(T in this._events){if(T==="removeListener")continue;this.removeAllListeners(T)}return this.removeAllListeners("removeListener"),this._events={},this}if(y=this._events[v],g(y))this.removeListener(v,y);else if(y)for(;y.length;)this.removeListener(v,y[y.length-1]);return delete this._events[v],this},M.prototype.listeners=function(v){var T;return!this._events||!this._events[v]?T=[]:g(this._events[v])?T=[this._events[v]]:T=this._events[v].slice(),T},M.prototype.listenerCount=function(v){if(this._events){var T=this._events[v];if(g(T))return 1;if(T)return T.length}return 0},M.listenerCount=function(v,T){return v.listenerCount(T)};function g(v){return typeof v=="function"}function C(v){return typeof v=="number"}function N(v){return typeof v=="object"&&v!==null}function m(v){return v===void 0}},{}],193:[function(H,J,D){var M=H("http"),g=J.exports;for(var C in M)M.hasOwnProperty(C)&&(g[C]=M[C]);g.request=function(N,m){return N||(N={}),N.scheme="https",N.protocol="https:",M.request.call(this,N,m)}},{http:231}],194:[function(H,J,D){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var M=H("util"),g=H("ms");J.exports=function(C){if(typeof C=="number")return C;var N=g(C);if(N===void 0){var m=new Error(M.format("humanize-ms(%j) result undefined",C));console.warn(m.stack)}return N}},{ms:204,util:243}],195:[function(H,J,D){D.read=function(M,g,C,N,m){var v,T,y=m*8-N-1,t=(1<<y)-1,h=t>>1,i=-7,c=C?m-1:0,a=C?-1:1,n=M[g+c];for(c+=a,v=n&(1<<-i)-1,n>>=-i,i+=y;i>0;v=v*256+M[g+c],c+=a,i-=8);for(T=v&(1<<-i)-1,v>>=-i,i+=N;i>0;T=T*256+M[g+c],c+=a,i-=8);if(v===0)v=1-h;else{if(v===t)return T?NaN:(n?-1:1)*Infinity;T=T+Math.pow(2,N),v=v-h}return(n?-1:1)*T*Math.pow(2,v-N)},D.write=function(M,g,C,N,m,v){var T,y,t,h=v*8-m-1,i=(1<<h)-1,c=i>>1,a=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=N?0:v-1,s=N?1:-1,d=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(y=isNaN(g)?1:0,T=i):(T=Math.floor(Math.log(g)/Math.LN2),g*(t=Math.pow(2,-T))<1&&(T--,t*=2),T+c>=1?g+=a/t:g+=a*Math.pow(2,1-c),g*t>=2&&(T++,t/=2),T+c>=i?(y=0,T=i):T+c>=1?(y=(g*t-1)*Math.pow(2,m),T=T+c):(y=g*Math.pow(2,c-1)*Math.pow(2,m),T=0));m>=8;M[C+n]=y&255,n+=s,y/=256,m-=8);for(T=T<<m|y,h+=m;h>0;M[C+n]=T&255,n+=s,T/=256,h-=8);M[C+n-s]|=d*128}},{}],196:[function(H,J,D){typeof Object.create=="function"?J.exports=function(g,C){C&&(g.super_=C,g.prototype=Object.create(C.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:J.exports=function(g,C){if(C){g.super_=C;var N=function(){};N.prototype=C.prototype,g.prototype=new N,g.prototype.constructor=g}}},{}],197:[function(H,J,D){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/J.exports=function(C){return C!=null&&(M(C)||g(C)||!!C._isBuffer)};function M(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function g(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&M(C.slice(0,0))}},{}],198:[function(H,J,D){var M={}.toString;J.exports=Array.isArray||function(g){return M.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(H,J){typeof exports=="object"&&typeof module!="undefined"?module.exports=J(H):typeof define=="function"&&define.amd?define(J):J(H)})(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(H){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(H){for(var J={},D=0,M=H.length;D<M;D++)J[H.charAt(D)]=D;return J}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(H){if(H.length<2){var J=H.charCodeAt(0);return J<128?H:J<2048?fromCharCode(192|J>>>6)+fromCharCode(128|J&63):fromCharCode(224|J>>>12&15)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}else{var J=65536+(H.charCodeAt(0)-55296)*1024+(H.charCodeAt(1)-56320);return fromCharCode(240|J>>>18&7)+fromCharCode(128|J>>>12&63)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(H){return H.replace(re_utob,cb_utob)},cb_encode=function(H){var J=[0,2,1][H.length%3],D=H.charCodeAt(0)<<16|(H.length>1?H.charCodeAt(1):0)<<8|(H.length>2?H.charCodeAt(2):0),M=[b64chars.charAt(D>>>18),b64chars.charAt(D>>>12&63),J>=2?"=":b64chars.charAt(D>>>6&63),J>=1?"=":b64chars.charAt(D&63)];return M.join("")},btoa=global.btoa?function(H){return global.btoa(H)}:function(H){return H.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(H){var J=Object.prototype.toString.call(H)==="[object Uint8Array]";return J?H.toString("base64"):btoa(utob(String(H)))},encode=function(H,J){return J?_encode(String(H)).replace(/[+\/]/g,function(D){return D=="+"?"-":"_"}).replace(/=/g,""):_encode(H)},encodeURI=function(H){return encode(H,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(H){switch(H.length){case 4:var J=(7&H.charCodeAt(0))<<18|(63&H.charCodeAt(1))<<12|(63&H.charCodeAt(2))<<6|63&H.charCodeAt(3),D=J-65536;return fromCharCode((D>>>10)+55296)+fromCharCode((D&1023)+56320);case 3:return fromCharCode((15&H.charCodeAt(0))<<12|(63&H.charCodeAt(1))<<6|63&H.charCodeAt(2));default:return fromCharCode((31&H.charCodeAt(0))<<6|63&H.charCodeAt(1))}},btou=function(H){return H.replace(re_btou,cb_btou)},cb_decode=function(H){var J=H.length,D=J%4,M=(J>0?b64tab[H.charAt(0)]<<18:0)|(J>1?b64tab[H.charAt(1)]<<12:0)|(J>2?b64tab[H.charAt(2)]<<6:0)|(J>3?b64tab[H.charAt(3)]:0),g=[fromCharCode(M>>>16),fromCharCode(M>>>8&255),fromCharCode(M&255)];return g.length-=[0,0,2,1][D],g.join("")},_atob=global.atob?function(H){return global.atob(H)}:function(H){return H.replace(/\S{1,4}/g,cb_decode)},atob=function(H){return _atob(String(H).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(H){return(H.constructor===buffer.constructor?H:buffer.from(H,"base64")).toString()}:function(H){return(H.constructor===buffer.constructor?H:new buffer(H,"base64")).toString()}:function(H){return btou(_atob(H))},decode=function(H){return _decode(String(H).replace(/[-_]/g,function(J){return J=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var H=global.Base64;return global.Base64=_Base64,H};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(H){return{value:H,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(H){return encode(this,H)})),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(H,J,D){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";J.exports=g;var M=Object.prototype.hasOwnProperty;function g(C,N,m){if(!C)throw new TypeError("argument dest is required");if(!N)throw new TypeError("argument src is required");return m===void 0&&(m=!0),Object.getOwnPropertyNames(N).forEach(function(T){if(!m&&M.call(C,T))return;var y=Object.getOwnPropertyDescriptor(N,T);Object.defineProperty(C,T,y)}),C}},{}],201:[function(H,J,D){"use strict";function M(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}M.prototype.define=function(g,C){for(var N in g){var m=g[N].map(function(y){return y.toLowerCase()});N=N.toLowerCase();for(var v=0;v<m.length;v++){var T=m[v];if(T[0]=="*")continue;if(!C&&T in this._types)throw new Error('Attempt to change mapping for "'+T+'" extension from "'+this._types[T]+'" to "'+N+'". Pass `force=true` to allow this, otherwise remove "'+T+'" from the list of extensions for "'+N+'".');this._types[T]=N}if(C||!this._extensions[N]){var T=m[0];this._extensions[N]=T[0]!="*"?T:T.substr(1)}}},M.prototype.getType=function(g){g=String(g);var C=g.replace(/^.*[/\\]/,"").toLowerCase(),N=C.replace(/^.*\./,"").toLowerCase(),m=C.length<g.length,v=N.length<C.length-1;return(v||!m)&&this._types[N]||null},M.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},J.exports=M},{}],202:[function(H,J,D){"use strict";var M=H("./Mime");J.exports=new M(H("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(H,J,D){J.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(H,J,D){var M=1e3,g=M*60,C=g*60,N=C*24,m=N*7,v=N*365.25;J.exports=function(i,c){c=c||{};var a=typeof i;if(a==="string"&&i.length>0)return T(i);if(a==="number"&&isFinite(i))return c.long?t(i):y(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function T(i){if(i=String(i),i.length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!c)return;var a=parseFloat(c[1]),n=(c[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return a*v;case"weeks":case"week":case"w":return a*m;case"days":case"day":case"d":return a*N;case"hours":case"hour":case"hrs":case"hr":case"h":return a*C;case"minutes":case"minute":case"mins":case"min":case"m":return a*g;case"seconds":case"second":case"secs":case"sec":case"s":return a*M;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}function y(i){var c=Math.abs(i);return c>=N?Math.round(i/N)+"d":c>=C?Math.round(i/C)+"h":c>=g?Math.round(i/g)+"m":c>=M?Math.round(i/M)+"s":i+"ms"}function t(i){var c=Math.abs(i);return c>=N?h(i,c,N,"day"):c>=C?h(i,c,C,"hour"):c>=g?h(i,c,g,"minute"):c>=M?h(i,c,M,"second"):i+" ms"}function h(i,c,a,n){var s=c>=a*1.5;return Math.round(i/a)+" "+n+(s?"s":"")}},{}],205:[function(H,J,D){(function(M){function g(v,T){for(var y=0,t=v.length-1;t>=0;t--){var h=v[t];h==="."?v.splice(t,1):h===".."?(v.splice(t,1),y++):y&&(v.splice(t,1),y--)}if(T)for(;y--;y)v.unshift("..");return v}D.resolve=function(){for(var v="",T=!1,y=arguments.length-1;y>=-1&&!T;y--){var t=y>=0?arguments[y]:M.cwd();if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)continue;v=t+"/"+v,T=t.charAt(0)==="/"}return v=g(N(v.split("/"),function(h){return!!h}),!T).join("/"),(T?"/":"")+v||"."},D.normalize=function(v){var T=D.isAbsolute(v),y=m(v,-1)==="/";return v=g(N(v.split("/"),function(t){return!!t}),!T).join("/"),!v&&!T&&(v="."),v&&y&&(v+="/"),(T?"/":"")+v},D.isAbsolute=function(v){return v.charAt(0)==="/"},D.join=function(){var v=Array.prototype.slice.call(arguments,0);return D.normalize(N(v,function(T,y){if(typeof T!="string")throw new TypeError("Arguments to path.join must be strings");return T}).join("/"))},D.relative=function(v,T){v=D.resolve(v).substr(1),T=D.resolve(T).substr(1);function y(s){for(var d=0;d<s.length&&!(s[d]!=="");d++);for(var f=s.length-1;f>=0&&!(s[f]!=="");f--);return d>f?[]:s.slice(d,f-d+1)}for(var t=y(v.split("/")),h=y(T.split("/")),i=Math.min(t.length,h.length),c=i,a=0;a<i;a++)if(t[a]!==h[a]){c=a;break}for(var n=[],a=c;a<t.length;a++)n.push("..");return n=n.concat(h.slice(c)),n.join("/")},D.sep="/",D.delimiter=":",D.dirname=function(v){if(typeof v!="string"&&(v=v+""),v.length===0)return".";for(var T=v.charCodeAt(0),y=T===47,t=-1,h=!0,i=v.length-1;i>=1;--i)if(T=v.charCodeAt(i),T===47){if(!h){t=i;break}}else h=!1;return t===-1?y?"/":".":y&&t===1?"/":v.slice(0,t)};function C(v){typeof v!="string"&&(v=v+"");var T=0,y=-1,t=!0,h;for(h=v.length-1;h>=0;--h)if(v.charCodeAt(h)===47){if(!t){T=h+1;break}}else y===-1&&(t=!1,y=h+1);return y===-1?"":v.slice(T,y)}D.basename=function(v,T){var y=C(v);return T&&y.substr(-1*T.length)===T&&(y=y.substr(0,y.length-T.length)),y},D.extname=function(v){typeof v!="string"&&(v=v+"");for(var T=-1,y=0,t=-1,h=!0,i=0,c=v.length-1;c>=0;--c){var a=v.charCodeAt(c);if(a===47){if(!h){y=c+1;break}continue}t===-1&&(h=!1,t=c+1),a===46?T===-1?T=c:i!==1&&(i=1):T!==-1&&(i=-1)}return T===-1||t===-1||i===0||i===1&&T===t-1&&T===y+1?"":v.slice(T,t)};function N(v,T){if(v.filter)return v.filter(T);for(var y=[],t=0;t<v.length;t++)T(v[t],t,v)&&y.push(v[t]);return y}var m="ab".substr(-1)==="b"?function(v,T,y){return v.substr(T,y)}:function(v,T,y){return T<0&&(T=v.length+T),v.substr(T,y)}}).call(this,H("_process"))},{_process:208}],206:[function(H,J,D){(function(M){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var g={function:!0,object:!0},C=g[typeof window]&&window||this,N=C,m=g[typeof D]&&D,v=g[typeof J]&&J&&!J.nodeType&&J,T=m&&v&&typeof M=="object"&&M;T&&(T.global===T||T.window===T||T.self===T)&&(C=T);var y=Math.pow(2,53)-1,t=/\bOpera/,h=this,i=Object.prototype,c=i.hasOwnProperty,a=i.toString;function n(_){return _=String(_),_.charAt(0).toUpperCase()+_.slice(1)}function s(_,E,w){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 E&&w&&/^Win/i.test(_)&&!/^Windows Phone /i.test(_)&&(S=S[/[\d.]+$/.exec(_)])&&(_="Windows "+S),_=String(_),E&&w&&(_=_.replace(RegExp(E,"i"),w)),_=f(_.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]),_}function d(_,E){var w=-1,S=_?_.length:0;if(typeof S=="number"&&S>-1&&S<=y)for(;++w<S;)E(_[w],w,_);else l(_,E)}function f(_){return _=p(_),/^(?:webOS|i(?:OS|P))/.test(_)?_:n(_)}function l(_,E){for(var w in _)c.call(_,w)&&E(_[w],w,_)}function o(_){return _==null?n(_):a.call(_).slice(8,-1)}function r(_,E){var w=_!=null?typeof _[E]:"number";return!/^(?:boolean|number|string|undefined)$/.test(w)&&(w=="object"?!!_[E]:!0)}function x(_){return String(_).replace(/([ -])(?!$)/g,"$1?")}function b(_,E){var w=null;return d(_,function(S,F){w=E(w,S,F,_)}),w}function p(_){return String(_).replace(/^ +| +$/g,"")}function I(_){var E=C,w=_&&typeof _=="object"&&o(_)!="String";w&&(E=_,_=null);var S=E.navigator||{},F=S.userAgent||"";_||(_=F);var P=w||h==N,L=w?!!S.likeChrome:/\bChrome\b/.test(_)&&!/internal|\n/i.test(a.toString()),G="Object",z=w?G:"ScriptBridgingProxyObject",A=w?G:"Environment",B=w&&E.java?"JavaPackage":o(E.java),U=w?G:"RuntimeObject",R=/\bJava/.test(B)&&E.java,K=R&&o(E.environment)==A,Z=R?"a":"\u03B1",ue=R?"b":"\u03B2",de=E.document||{},Ce=E.operamini||E.opera,Re=t.test(Re=w&&Ce?Ce["[[Class]]"]:o(Ce))?Re:Ce=null,me,Oe=_,be=[],ce=null,le=_==F,ne=le&&Ce&&typeof Ce.version=="function"&&Ce.version(),ge,te=Y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),re=he(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Se=xe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ie=X({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),q=fe(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Y(st){return b(st,function(ut,dt){return ut||RegExp("\\b"+(dt.pattern||x(dt))+"\\b","i").exec(_)&&(dt.label||dt)})}function X(st){return b(st,function(ut,dt,Fe){return ut||(dt[Se]||dt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Se)]||RegExp("\\b"+x(Fe)+"(?:\\b|\\w*\\d)","i").exec(_))&&Fe})}function he(st){return b(st,function(ut,dt){return ut||RegExp("\\b"+(dt.pattern||x(dt))+"\\b","i").exec(_)&&(dt.label||dt)})}function fe(st){return b(st,function(ut,dt){var Fe=dt.pattern||x(dt);return!ut&&(ut=RegExp("\\b"+Fe+"(?:/[\\d.]+|[ \\w.]*)","i").exec(_))&&(ut=s(ut,Fe,dt.label||dt)),ut})}function xe(st){return b(st,function(ut,dt){var Fe=dt.pattern||x(dt);return!ut&&(ut=RegExp("\\b"+Fe+" *\\d+[.\\w_]*","i").exec(_)||RegExp("\\b"+Fe+" *\\w+-[\\w]*","i").exec(_)||RegExp("\\b"+Fe+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(_))&&((ut=String(dt.label&&!RegExp(Fe,"i").test(dt.label)?dt.label:ut).split("/"))[1]&&!/[\d.]+/.test(ut[0])&&(ut[0]+=" "+ut[1]),dt=dt.label||dt,ut=f(ut[0].replace(RegExp(Fe,"i"),dt).replace(RegExp("; *(?:"+dt+"[_-])?","i")," ").replace(RegExp("("+dt+")[-_.]?(\\w)","i"),"$1 $2"))),ut})}function Ke(st){return b(st,function(ut,dt){return ut||(RegExp(dt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(_)||0)[1]||null})}function Ze(){return this.description||""}if(te&&(te=[te]),ie&&!Se&&(Se=xe([ie])),(me=/\bGoogle TV\b/.exec(Se))&&(Se=me[0]),/\bSimulator\b/i.test(_)&&(Se=(Se?Se+" ":"")+"Simulator"),re=="Opera Mini"&&/\bOPiOS\b/.test(_)&&be.push("running in Turbo/Uncompressed mode"),re=="IE"&&/\blike iPhone OS\b/.test(_)?(me=I(_.replace(/like iPhone OS/,"")),ie=me.manufacturer,Se=me.product):/^iP/.test(Se)?(re||(re="Safari"),q="iOS"+((me=/ OS ([\d_]+)/i.exec(_))?" "+me[1].replace(/_/g,"."):"")):re=="Konqueror"&&!/buntu/i.test(q)?q="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(re)&&!/\bMobile Safari\b/i.test(_)||/\bVita\b/.test(Se))||/\bAndroid\b/.test(q)&&/^Chrome/.test(re)&&/\bVersion\//i.test(_)?(re="Android Browser",q=/\bAndroid\b/.test(q)?q:"Android"):re=="Silk"?(/\bMobi/i.test(_)||(q="Android",be.unshift("desktop mode")),/Accelerated *= *true/i.test(_)&&be.unshift("accelerated")):re=="PaleMoon"&&(me=/\bFirefox\/([\d.]+)\b/.exec(_))?be.push("identifying as Firefox "+me[1]):re=="Firefox"&&(me=/\b(Mobile|Tablet|TV)\b/i.exec(_))?(q||(q="Firefox OS"),Se||(Se=me[1])):!re||(me=!/\bMinefield\b/i.test(_)&&/\b(?:Firefox|Safari)\b/.exec(re))?(re&&!Se&&/[\/,]|^[^(]+?\)/.test(_.slice(_.indexOf(me+"/")+8))&&(re=null),(me=Se||ie||q)&&(Se||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(q))&&(re=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(q)?q:me)+" Browser")):re=="Electron"&&(me=(/\bChrome\/([\d.]+)\b/.exec(_)||0)[1])&&be.push("Chromium "+me),ne||(ne=Ke(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",x(re),"(?:Firefox|Minefield|NetFront)"])),(me=te=="iCab"&&parseFloat(ne)>3&&"WebKit"||/\bOpera\b/.test(re)&&(/\bOPR\b/.test(_)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(_)&&!/^(?:Trident|EdgeHTML)$/.test(te)&&"WebKit"||!te&&/\bMSIE\b/i.test(_)&&(q=="Mac OS"?"Tasman":"Trident")||te=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(re)&&"NetFront")&&(te=[me]),re=="IE"&&(me=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(_)||0)[1])?(re+=" Mobile",q="Windows Phone "+(/\+$/.test(me)?me:me+".x"),be.unshift("desktop mode")):/\bWPDesktop\b/i.test(_)?(re="IE Mobile",q="Windows Phone 8.x",be.unshift("desktop mode"),ne||(ne=(/\brv:([\d.]+)/.exec(_)||0)[1])):re!="IE"&&te=="Trident"&&(me=/\brv:([\d.]+)/.exec(_))&&(re&&be.push("identifying as "+re+(ne?" "+ne:"")),re="IE",ne=me[1]),le){if(r(E,"global"))if(R&&(me=R.lang.System,Oe=me.getProperty("os.arch"),q=q||me.getProperty("os.name")+" "+me.getProperty("os.version")),K){try{ne=E.require("ringo/engine").version.join("."),re="RingoJS"}catch(st){(me=E.system)&&me.global.system==E.system&&(re="Narwhal",q||(q=me[0].os||null))}re||(re="Rhino")}else typeof E.process=="object"&&!E.process.browser&&(me=E.process)&&(typeof me.versions=="object"&&(typeof me.versions.electron=="string"?(be.push("Node "+me.versions.node),re="Electron",ne=me.versions.electron):typeof me.versions.nw=="string"&&(be.push("Chromium "+ne,"Node "+me.versions.node),re="NW.js",ne=me.versions.nw)),re||(re="Node.js",Oe=me.arch,q=me.platform,ne=/[\d.]+/.exec(me.version),ne=ne?ne[0]:null));else o(me=E.runtime)==z?(re="Adobe AIR",q=me.flash.system.Capabilities.os):o(me=E.phantom)==U?(re="PhantomJS",ne=(me=me.version||null)&&me.major+"."+me.minor+"."+me.patch):typeof de.documentMode=="number"&&(me=/\bTrident\/(\d+)/i.exec(_))?(ne=[ne,de.documentMode],(me=+me[1]+4)!=ne[1]&&(be.push("IE "+ne[1]+" mode"),te&&(te[1]=""),ne[1]=me),ne=re=="IE"?String(ne[1].toFixed(1)):ne[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(re)&&(be.push("masking as "+re+" "+ne),re="IE",ne="11.0",te=["Trident"],q="Windows");q=q&&f(q)}if(ne&&(me=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ne)||/(?:alpha|beta)(?: ?\d)?/i.exec(_+";"+(le&&S.appMinorVersion))||/\bMinefield\b/i.test(_)&&"a")&&(ce=/b/i.test(me)?"beta":"alpha",ne=ne.replace(RegExp(me+"\\+?$"),"")+(ce=="beta"?ue:Z)+(/\d+\+?/.exec(me)||"")),re=="Fennec"||re=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))re="Firefox Mobile";else if(re=="Maxthon"&&ne)ne=ne.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Se))Se=="Xbox 360"&&(q=null),Se=="Xbox 360"&&/\bIEMobile\b/.test(_)&&be.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(re)||re&&!Se&&!/Browser|Mobi/.test(re))&&(q=="Windows CE"||/Mobi/i.test(_)))re+=" Mobile";else if(re=="IE"&&le)try{E.external===null&&be.unshift("platform preview")}catch(st){be.unshift("embedded")}else(/\bBlackBerry\b/.test(Se)||/\bBB10\b/.test(_))&&(me=(RegExp(Se.replace(/ +/g," *")+"/([.\\d]+)","i").exec(_)||0)[1]||ne)?(me=[me,/BB10/.test(_)],q=(me[1]?(Se=null,ie="BlackBerry"):"Device Software")+" "+me[0],ne=null):this!=l&&Se!="Wii"&&(le&&Ce||/Opera/.test(re)&&/\b(?:MSIE|Firefox)\b/i.test(_)||re=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||re=="IE"&&(q&&!/^Win/.test(q)&&ne>5.5||/\bWindows XP\b/.test(q)&&ne>8||ne==8&&!/\bTrident\b/.test(_)))&&!t.test(me=I.call(l,_.replace(t,"")+";"))&&me.name&&(me="ing as "+me.name+((me=me.version)?" "+me:""),t.test(re)?(/\bIE\b/.test(me)&&q=="Mac OS"&&(q=null),me="identify"+me):(me="mask"+me,Re?re=f(Re.replace(/([a-z])([A-Z])/g,"$1 $2")):re="Opera",/\bIE\b/.test(me)&&(q=null),le||(ne=null)),te=["Presto"],be.push(me));(me=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(_)||0)[1])&&(me=[parseFloat(me.replace(/\.(\d)$/,".0$1")),me],re=="Safari"&&me[1].slice(-1)=="+"?(re="WebKit Nightly",ce="alpha",ne=me[1].slice(0,-1)):(ne==me[1]||ne==(me[2]=(/\bSafari\/([\d.]+\+?)/i.exec(_)||0)[1]))&&(ne=null),me[1]=(/\bChrome\/([\d.]+)/i.exec(_)||0)[1],me[0]==537.36&&me[2]==537.36&&parseFloat(me[1])>=28&&te=="WebKit"&&(te=["Blink"]),!le||!L&&!me[1]?(te&&(te[1]="like Safari"),me=(me=me[0],me<400?1:me<500?2:me<526?3:me<533?4:me<534?"4+":me<535?5:me<537?6:me<538?7:me<601?8:"8")):(te&&(te[1]="like Chrome"),me=me[1]||(me=me[0],me<530?1:me<532?2:me<532.05?3:me<533?4:me<534.03?5:me<534.07?6:me<534.1?7:me<534.13?8:me<534.16?9:me<534.24?10:me<534.3?11:me<535.01?12:me<535.02?"13+":me<535.07?15:me<535.11?16:me<535.19?17:me<536.05?18:me<536.1?19:me<537.01?20:me<537.11?"21+":me<537.13?23:me<537.18?24:me<537.24?25:me<537.36?26:te!="Blink"?"27":"28")),te&&(te[1]+=" "+(me+=typeof me=="number"?".x":/[.+]/.test(me)?"":"+")),re=="Safari"&&(!ne||parseInt(ne)>45)&&(ne=me)),re=="Opera"&&(me=/\bzbov|zvav$/.exec(q))?(re+=" ",be.unshift("desktop mode"),me=="zvav"?(re+="Mini",ne=null):re+="Mobile",q=q.replace(RegExp(" *"+me+"$"),"")):re=="Safari"&&/\bChrome\b/.exec(te&&te[1])&&(be.unshift("desktop mode"),re="Chrome Mobile",ne=null,/\bOS X\b/.test(q)?(ie="Apple",q="iOS 4.3+"):q=null),ne&&ne.indexOf(me=/[\d.]+$/.exec(q))==0&&_.indexOf("/"+me+"-")>-1&&(q=p(q.replace(me,""))),te&&!/\b(?:Avant|Nook)\b/.test(re)&&(/Browser|Lunascape|Maxthon/.test(re)||re!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(te[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(re)&&te[1])&&((me=te[te.length-1])&&be.push(me)),be.length&&(be=["("+be.join("; ")+")"]),ie&&Se&&Se.indexOf(ie)<0&&be.push("on "+ie),Se&&be.push((/^on /.test(be[be.length-1])?"":"on ")+Se),q&&(me=/ ([\d.+]+)$/.exec(q),ge=me&&q.charAt(q.length-me[0].length-1)=="/",q={architecture:32,family:me&&!ge?q.replace(me[0],""):q,version:me?me[1]:null,toString:function(){var st=this.version;return this.family+(st&&!ge?" "+st:"")+(this.architecture==64?" 64-bit":"")}}),(me=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+me),"")),re&&(/\bWOW64\b/i.test(_)||le&&/\w(?:86|32)$/.test(S.cpuClass||S.platform)&&!/\bWin64; x64\b/i.test(_))&&be.unshift("32-bit")):q&&/^OS X/.test(q.family)&&re=="Chrome"&&parseFloat(ne)>=39&&(q.architecture=64),_||(_=null);var et={};return et.description=_,et.layout=te&&te[0],et.manufacturer=ie,et.name=re,et.prerelease=ce,et.product=Se,et.ua=_,et.version=re&&ne,et.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},et.parse=I,et.toString=Ze,et.version&&be.unshift(ne),et.name&&be.unshift(re),q&&re&&!(q==String(q).split(" ")[0]&&(q==re.split(" ")[0]||Se))&&be.push(Se?"("+q+")":"on "+q),be.length&&(et.description=be.join(" ")),et}var O=I();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):m&&v?l(O,function(_,E){m[E]=_}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(H,J,D){(function(M){"use strict";typeof M=="undefined"||!M.version||M.version.indexOf("v0.")===0||M.version.indexOf("v1.")===0&&M.version.indexOf("v1.8.")!==0?J.exports={nextTick:g}:J.exports=M;function g(C,N,m,v){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var T=arguments.length,y,t;switch(T){case 0:case 1:return M.nextTick(C);case 2:return M.nextTick(function(){C.call(null,N)});case 3:return M.nextTick(function(){C.call(null,N,m)});case 4:return M.nextTick(function(){C.call(null,N,m,v)});default:for(y=new Array(T-1),t=0;t<y.length;)y[t++]=arguments[t];return M.nextTick(function(){C.apply(null,y)})}}}).call(this,H("_process"))},{_process:208}],208:[function(H,J,D){var M=J.exports={},g,C;function N(){throw new Error("setTimeout has not been defined")}function m(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=N}catch(d){g=N}try{typeof clearTimeout=="function"?C=clearTimeout:C=m}catch(d){C=m}})();function v(d){if(g===setTimeout)return setTimeout(d,0);if((g===N||!g)&&setTimeout)return g=setTimeout,setTimeout(d,0);try{return g(d,0)}catch(f){try{return g.call(null,d,0)}catch(l){return g.call(this,d,0)}}}function T(d){if(C===clearTimeout)return clearTimeout(d);if((C===m||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(d);try{return C(d)}catch(f){try{return C.call(null,d)}catch(l){return C.call(this,d)}}}var y=[],t=!1,h,i=-1;function c(){if(!t||!h)return;t=!1,h.length?y=h.concat(y):i=-1,y.length&&a()}function a(){if(t)return;var d=v(c);t=!0;for(var f=y.length;f;){for(h=y,y=[];++i<f;)h&&h[i].run();i=-1,f=y.length}h=null,t=!1,T(d)}M.nextTick=function(d){var f=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)f[l-1]=arguments[l];y.push(new n(d,f)),y.length===1&&!t&&v(a)};function n(d,f){this.fun=d,this.array=f}n.prototype.run=function(){this.fun.apply(null,this.array)},M.title="browser",M.browser=!0,M.env={},M.argv=[],M.version="",M.versions={};function s(){}M.on=s,M.addListener=s,M.once=s,M.off=s,M.removeListener=s,M.removeAllListeners=s,M.emit=s,M.prependListener=s,M.prependOnceListener=s,M.listeners=function(d){return[]},M.binding=function(d){throw new Error("process.binding is not supported")},M.cwd=function(){return"/"},M.chdir=function(d){throw new Error("process.chdir is not supported")},M.umask=function(){return 0}},{}],209:[function(H,J,D){(function(M){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var C=typeof D=="object"&&D&&!D.nodeType&&D,N=typeof J=="object"&&J&&!J.nodeType&&J,m=typeof M=="object"&&M;(m.global===m||m.window===m||m.self===m)&&(g=m);var v,T=2147483647,y=36,t=1,h=26,i=38,c=700,a=72,n=128,s="-",d=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},r=y-t,x=Math.floor,b=String.fromCharCode,p;function I(B){throw new RangeError(o[B])}function O(B,U){for(var R=B.length,K=[];R--;)K[R]=U(B[R]);return K}function _(B,U){var R=B.split("@"),K="";R.length>1&&(K=R[0]+"@",B=R[1]),B=B.replace(l,".");var Z=B.split("."),ue=O(Z,U).join(".");return K+ue}function E(B){for(var U=[],R=0,K=B.length,Z,ue;R<K;)Z=B.charCodeAt(R++),Z>=55296&&Z<=56319&&R<K?(ue=B.charCodeAt(R++),(ue&64512)==56320?U.push(((Z&1023)<<10)+(ue&1023)+65536):(U.push(Z),R--)):U.push(Z);return U}function w(B){return O(B,function(U){var R="";return U>65535&&(U-=65536,R+=b(U>>>10&1023|55296),U=56320|U&1023),R+=b(U),R}).join("")}function S(B){return B-48<10?B-22:B-65<26?B-65:B-97<26?B-97:y}function F(B,U){return B+22+75*(B<26)-((U!=0)<<5)}function P(B,U,R){var K=0;for(B=R?x(B/c):B>>1,B+=x(B/U);B>r*h>>1;K+=y)B=x(B/r);return x(K+(r+1)*B/(B+i))}function L(B){var U=[],R=B.length,K,Z=0,ue=n,de=a,Ce,Re,me,Oe,be,ce,le,ne,ge;for(Ce=B.lastIndexOf(s),Ce<0&&(Ce=0),Re=0;Re<Ce;++Re)B.charCodeAt(Re)>=128&&I("not-basic"),U.push(B.charCodeAt(Re));for(me=Ce>0?Ce+1:0;me<R;){for(Oe=Z,be=1,ce=y;!(me>=R&&I("invalid-input"),le=S(B.charCodeAt(me++)),(le>=y||le>x((T-Z)/be))&&I("overflow"),Z+=le*be,ne=ce<=de?t:ce>=de+h?h:ce-de,le<ne);ce+=y)ge=y-ne,be>x(T/ge)&&I("overflow"),be*=ge;K=U.length+1,de=P(Z-Oe,K,Oe==0),x(Z/K)>T-ue&&I("overflow"),ue+=x(Z/K),Z%=K,U.splice(Z++,0,ue)}return w(U)}function G(B){var U,R,K,Z,ue,de,Ce,Re,me,Oe,be,ce=[],le,ne,ge,te;for(B=E(B),le=B.length,U=n,R=0,ue=a,de=0;de<le;++de)be=B[de],be<128&&ce.push(b(be));for(K=Z=ce.length,Z&&ce.push(s);K<le;){for(Ce=T,de=0;de<le;++de)be=B[de],be>=U&&be<Ce&&(Ce=be);for(ne=K+1,Ce-U>x((T-R)/ne)&&I("overflow"),R+=(Ce-U)*ne,U=Ce,de=0;de<le;++de)if(be=B[de],be<U&&++R>T&&I("overflow"),be==U){for(Re=R,me=y;!(Oe=me<=ue?t:me>=ue+h?h:me-ue,Re<Oe);me+=y)te=Re-Oe,ge=y-Oe,ce.push(b(F(Oe+te%ge,0))),Re=x(te/ge);ce.push(b(F(Re,0))),ue=P(R,ne,K==Z),R=0,++K}++R,++U}return ce.join("")}function z(B){return _(B,function(U){return d.test(U)?L(U.slice(4).toLowerCase()):U})}function A(B){return _(B,function(U){return f.test(U)?"xn--"+G(U):U})}if(v={version:"1.4.1",ucs2:{decode:E,encode:w},decode:L,encode:G,toASCII:A,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return v});else if(C&&N)if(J.exports==C)N.exports=v;else for(p in v)v.hasOwnProperty(p)&&(C[p]=v[p]);else g.punycode=v})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(H,J,D){"use strict";function M(C,N){return Object.prototype.hasOwnProperty.call(C,N)}J.exports=function(C,N,m,v){N=N||"&",m=m||"=";var T={};if(typeof C!="string"||C.length===0)return T;var y=/\+/g;C=C.split(N);var t=1e3;v&&typeof v.maxKeys=="number"&&(t=v.maxKeys);var h=C.length;t>0&&h>t&&(h=t);for(var i=0;i<h;++i){var c=C[i].replace(y,"%20"),a=c.indexOf(m),n,s,d,f;a>=0?(n=c.substr(0,a),s=c.substr(a+1)):(n=c,s=""),d=decodeURIComponent(n),f=decodeURIComponent(s),M(T,d)?g(T[d])?T[d].push(f):T[d]=[T[d],f]:T[d]=f}return T};var g=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(H,J,D){"use strict";var M=function(m){switch(typeof m){case"string":return m;case"boolean":return m?"true":"false";case"number":return isFinite(m)?m:"";default:return""}};J.exports=function(m,v,T,y){return v=v||"&",T=T||"=",m===null&&(m=void 0),typeof m=="object"?C(N(m),function(t){var h=encodeURIComponent(M(t))+T;return g(m[t])?C(m[t],function(i){return h+encodeURIComponent(M(i))}).join(v):h+encodeURIComponent(M(m[t]))}).join(v):y?encodeURIComponent(M(y))+T+encodeURIComponent(M(m)):""};var g=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"};function C(m,v){if(m.map)return m.map(v);for(var T=[],y=0;y<m.length;y++)T.push(v(m[y],y));return T}var N=Object.keys||function(m){var v=[];for(var T in m)Object.prototype.hasOwnProperty.call(m,T)&&v.push(T);return v}},{}],212:[function(H,J,D){"use strict";D.decode=D.parse=H("./decode"),D.encode=D.stringify=H("./encode")},{"./decode":210,"./encode":211}],213:[function(H,J,D){J.exports=H("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=m(M),C=H("babel-runtime/core-js/object/keys"),N=m(C);function m(f){return f&&f.__esModule?f:{default:f}}var v=H("process-nextick-args"),T=N.default||function(f){var l=[];for(var o in f)l.push(o);return l};J.exports=n;var y=(0,g.default)(H("core-util-is"));y.inherits=H("inherits");var t=H("./_stream_readable"),h=H("./_stream_writable");y.inherits(n,t);for(var i=T(h.prototype),c=0;c<i.length;c++){var a=i[c];n.prototype[a]||(n.prototype[a]=h.prototype[a])}function n(f){if(!(this instanceof n))return new n(f);t.call(this,f),h.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",s)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s(){if(this.allowHalfOpen||this._writableState.ended)return;v.nextTick(d,this)}function d(f){f.end()}Object.defineProperty(n.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(l){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=l,this._writableState.destroyed=l}}),n.prototype._destroy=function(f,l){this.push(null),this.end(),v.nextTick(l,f)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(T){return T&&T.__esModule?T:{default:T}}J.exports=v;var N=H("./_stream_transform"),m=(0,g.default)(H("core-util-is"));m.inherits=H("inherits"),m.inherits(v,N);function v(T){if(!(this instanceof v))return new v(T);N.call(this,T)}v.prototype._transform=function(T,y,t){t(null,T)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(H,J,D){(function(M,g){"use strict";var C=H("babel-runtime/core-js/object/get-prototype-of"),N=T(C),m=H("babel-runtime/core-js/object/create"),v=T(m);function T(te){return te&&te.__esModule?te:{default:te}}var y=H("process-nextick-args");J.exports=E;var t=H("isarray"),h;E.ReadableState=_;var i=H("events").EventEmitter,c=function(re,Se){return re.listeners(Se).length},a=H("./internal/streams/stream"),n=H("safe-buffer").Buffer,s=g.Uint8Array||function(){};function d(te){return n.from(te)}function f(te){return n.isBuffer(te)||te instanceof s}var l=(0,v.default)(H("core-util-is"));l.inherits=H("inherits");var o=H("util"),r=void 0;o&&o.debuglog?r=o.debuglog("stream"):r=function(){};var x=H("./internal/streams/BufferList"),b=H("./internal/streams/destroy"),p;l.inherits(E,a);var I=["error","close","destroy","pause","resume"];function O(te,re,Se){if(typeof te.prependListener=="function")return te.prependListener(re,Se);!te._events||!te._events[re]?te.on(re,Se):t(te._events[re])?te._events[re].unshift(Se):te._events[re]=[Se,te._events[re]]}function _(te,re){h=h||H("./_stream_duplex"),te=te||{};var Se=re instanceof h;this.objectMode=!!te.objectMode,Se&&(this.objectMode=this.objectMode||!!te.readableObjectMode);var ie=te.highWaterMark,q=te.readableHighWaterMark,Y=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:Se&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=te.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,te.encoding&&(p||(p=H("string_decoder/").StringDecoder),this.decoder=new p(te.encoding),this.encoding=te.encoding)}function E(te){if(h=h||H("./_stream_duplex"),!(this instanceof E))return new E(te);this._readableState=new _(te,this),this.readable=!0,te&&(typeof te.read=="function"&&(this._read=te.read),typeof te.destroy=="function"&&(this._destroy=te.destroy)),a.call(this)}Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(re){if(!this._readableState)return;this._readableState.destroyed=re}}),E.prototype.destroy=b.destroy,E.prototype._undestroy=b.undestroy,E.prototype._destroy=function(te,re){this.push(null),re(te)},E.prototype.push=function(te,re){var Se=this._readableState,ie;return Se.objectMode?ie=!0:typeof te=="string"&&(re=re||Se.defaultEncoding,re!==Se.encoding&&(te=n.from(te,re),re=""),ie=!0),w(this,te,re,!1,ie)},E.prototype.unshift=function(te){return w(this,te,null,!0,!1)};function w(te,re,Se,ie,q){var Y=te._readableState;if(re===null)Y.reading=!1,A(te,Y);else{var X;q||(X=F(Y,re)),X?te.emit("error",X):Y.objectMode||re&&re.length>0?(typeof re!="string"&&!Y.objectMode&&(0,N.default)(re)!==n.prototype&&(re=d(re)),ie?Y.endEmitted?te.emit("error",new Error("stream.unshift() after end event")):S(te,Y,re,!0):Y.ended?te.emit("error",new Error("stream.push() after EOF")):(Y.reading=!1,Y.decoder&&!Se?(re=Y.decoder.write(re),Y.objectMode||re.length!==0?S(te,Y,re,!1):R(te,Y)):S(te,Y,re,!1))):ie||(Y.reading=!1)}return P(Y)}function S(te,re,Se,ie){re.flowing&&re.length===0&&!re.sync?(te.emit("data",Se),te.read(0)):(re.length+=re.objectMode?1:Se.length,ie?re.buffer.unshift(Se):re.buffer.push(Se),re.needReadable&&B(te)),R(te,re)}function F(te,re){var Se;return!f(re)&&typeof re!="string"&&re!==void 0&&!te.objectMode&&(Se=new TypeError("Invalid non-string/buffer chunk")),Se}function P(te){return!te.ended&&(te.needReadable||te.length<te.highWaterMark||te.length===0)}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(te){return p||(p=H("string_decoder/").StringDecoder),this._readableState.decoder=new p(te),this._readableState.encoding=te,this};var L=8388608;function G(te){return te>=L?te=L:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function z(te,re){return te<=0||re.length===0&&re.ended?0:re.objectMode?1:te!==te?re.flowing&&re.length?re.buffer.head.data.length:re.length:(te>re.highWaterMark&&(re.highWaterMark=G(te)),te<=re.length?te:re.ended?re.length:(re.needReadable=!0,0))}E.prototype.read=function(te){r("read",te),te=parseInt(te,10);var re=this._readableState,Se=te;if(te!==0&&(re.emittedReadable=!1),te===0&&re.needReadable&&(re.length>=re.highWaterMark||re.ended))return r("read: emitReadable",re.length,re.ended),re.length===0&&re.ended?le(this):B(this),null;if(te=z(te,re),te===0&&re.ended)return re.length===0&&le(this),null;var ie=re.needReadable;r("need readable",ie),(re.length===0||re.length-te<re.highWaterMark)&&(ie=!0,r("length less than watermark",ie)),re.ended||re.reading?(ie=!1,r("reading or ended",ie)):ie&&(r("do read"),re.reading=!0,re.sync=!0,re.length===0&&(re.needReadable=!0),this._read(re.highWaterMark),re.sync=!1,re.reading||(te=z(Se,re)));var q;return te>0?q=me(te,re):q=null,q===null?(re.needReadable=!0,te=0):re.length-=te,re.length===0&&(re.ended||(re.needReadable=!0),Se!==te&&re.ended&&le(this)),q!==null&&this.emit("data",q),q};function A(te,re){if(re.ended)return;if(re.decoder){var Se=re.decoder.end();Se&&Se.length&&(re.buffer.push(Se),re.length+=re.objectMode?1:Se.length)}re.ended=!0,B(te)}function B(te){var re=te._readableState;re.needReadable=!1,re.emittedReadable||(r("emitReadable",re.flowing),re.emittedReadable=!0,re.sync?y.nextTick(U,te):U(te))}function U(te){r("emit readable"),te.emit("readable"),Re(te)}function R(te,re){re.readingMore||(re.readingMore=!0,y.nextTick(K,te,re))}function K(te,re){for(var Se=re.length;!re.reading&&!re.flowing&&!re.ended&&re.length<re.highWaterMark&&!(r("maybeReadMore read 0"),te.read(0),Se===re.length);)Se=re.length;re.readingMore=!1}E.prototype._read=function(te){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(te,re){var Se=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=te;break;case 1:ie.pipes=[ie.pipes,te];break;default:ie.pipes.push(te);break}ie.pipesCount+=1,r("pipe count=%d opts=%j",ie.pipesCount,re);var q=(!re||re.end!==!1)&&te!==M.stdout&&te!==M.stderr,Y=q?he:Fe;ie.endEmitted?y.nextTick(Y):Se.once("end",Y),te.on("unpipe",X);function X(Ie,ot){r("onunpipe"),Ie===Se&&(ot&&ot.hasUnpiped===!1&&(ot.hasUnpiped=!0,Ke()))}function he(){r("onend"),te.end()}var fe=Z(Se);te.on("drain",fe);var xe=!1;function Ke(){r("cleanup"),te.removeListener("close",ut),te.removeListener("finish",dt),te.removeListener("drain",fe),te.removeListener("error",st),te.removeListener("unpipe",X),Se.removeListener("end",he),Se.removeListener("end",Fe),Se.removeListener("data",et),xe=!0,ie.awaitDrain&&(!te._writableState||te._writableState.needDrain)&&fe()}var Ze=!1;Se.on("data",et);function et(Ie){r("ondata"),Ze=!1;var ot=te.write(Ie);ot===!1&&!Ze&&((ie.pipesCount===1&&ie.pipes===te||ie.pipesCount>1&&ge(ie.pipes,te)!==-1)&&!xe&&(r("false write response, pause",Se._readableState.awaitDrain),Se._readableState.awaitDrain++,Ze=!0),Se.pause())}function st(Ie){r("onerror",Ie),Fe(),te.removeListener("error",st),c(te,"error")===0&&te.emit("error",Ie)}O(te,"error",st);function ut(){te.removeListener("finish",dt),Fe()}te.once("close",ut);function dt(){r("onfinish"),te.removeListener("close",ut),Fe()}te.once("finish",dt);function Fe(){r("unpipe"),Se.unpipe(te)}return te.emit("pipe",Se),ie.flowing||(r("pipe resume"),Se.resume()),te};function Z(te){return function(){var re=te._readableState;r("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&c(te,"data")&&(re.flowing=!0,Re(te))}}E.prototype.unpipe=function(te){var re=this._readableState,Se={hasUnpiped:!1};if(re.pipesCount===0)return this;if(re.pipesCount===1)return te&&te!==re.pipes?this:(te||(te=re.pipes),re.pipes=null,re.pipesCount=0,re.flowing=!1,te&&te.emit("unpipe",this,Se),this);if(!te){var ie=re.pipes,q=re.pipesCount;re.pipes=null,re.pipesCount=0,re.flowing=!1;for(var Y=0;Y<q;Y++)ie[Y].emit("unpipe",this,Se);return this}var X=ge(re.pipes,te);return X===-1?this:(re.pipes.splice(X,1),re.pipesCount-=1,re.pipesCount===1&&(re.pipes=re.pipes[0]),te.emit("unpipe",this,Se),this)},E.prototype.on=function(te,re){var Se=a.prototype.on.call(this,te,re);if(te==="data")this._readableState.flowing!==!1&&this.resume();else if(te==="readable"){var ie=this._readableState;!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.emittedReadable=!1,ie.reading?ie.length&&B(this):y.nextTick(ue,this))}return Se},E.prototype.addListener=E.prototype.on;function ue(te){r("readable nexttick read 0"),te.read(0)}E.prototype.resume=function(){var te=this._readableState;return te.flowing||(r("resume"),te.flowing=!0,de(this,te)),this};function de(te,re){re.resumeScheduled||(re.resumeScheduled=!0,y.nextTick(Ce,te,re))}function Ce(te,re){re.reading||(r("resume read 0"),te.read(0)),re.resumeScheduled=!1,re.awaitDrain=0,te.emit("resume"),Re(te),re.flowing&&!re.reading&&te.read(0)}E.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Re(te){var re=te._readableState;for(r("flow",re.flowing);re.flowing&&te.read()!==null;);}E.prototype.wrap=function(te){var re=this,Se=this._readableState,ie=!1;te.on("end",function(){if(r("wrapped end"),Se.decoder&&!Se.ended){var X=Se.decoder.end();X&&X.length&&re.push(X)}re.push(null)}),te.on("data",function(X){if(r("wrapped data"),Se.decoder&&(X=Se.decoder.write(X)),Se.objectMode&&X==null)return;if(!Se.objectMode&&(!X||!X.length))return;var he=re.push(X);he||(ie=!0,te.pause())});for(var q in te)this[q]===void 0&&typeof te[q]=="function"&&(this[q]=function(X){return function(){return te[X].apply(te,arguments)}}(q));for(var Y=0;Y<I.length;Y++)te.on(I[Y],this.emit.bind(this,I[Y]));return this._read=function(X){r("wrapped _read",X),ie&&(ie=!1,te.resume())},this},Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),E._fromList=me;function me(te,re){if(re.length===0)return null;var Se;return re.objectMode?Se=re.buffer.shift():!te||te>=re.length?(re.decoder?Se=re.buffer.join(""):re.buffer.length===1?Se=re.buffer.head.data:Se=re.buffer.concat(re.length),re.buffer.clear()):Se=Oe(te,re.buffer,re.decoder),Se}function Oe(te,re,Se){var ie;return te<re.head.data.length?(ie=re.head.data.slice(0,te),re.head.data=re.head.data.slice(te)):te===re.head.data.length?ie=re.shift():ie=Se?be(te,re):ce(te,re),ie}function be(te,re){var Se=re.head,ie=1,q=Se.data;for(te-=q.length;Se=Se.next;){var Y=Se.data,X=te>Y.length?Y.length:te;if(X===Y.length?q+=Y:q+=Y.slice(0,te),te-=X,te===0){X===Y.length?(++ie,Se.next?re.head=Se.next:re.head=re.tail=null):(re.head=Se,Se.data=Y.slice(X));break}++ie}return re.length-=ie,q}function ce(te,re){var Se=n.allocUnsafe(te),ie=re.head,q=1;for(ie.data.copy(Se),te-=ie.data.length;ie=ie.next;){var Y=ie.data,X=te>Y.length?Y.length:te;if(Y.copy(Se,Se.length-te,0,X),te-=X,te===0){X===Y.length?(++q,ie.next?re.head=ie.next:re.head=re.tail=null):(re.head=ie,ie.data=Y.slice(X));break}++q}return re.length-=q,Se}function le(te){var re=te._readableState;if(re.length>0)throw new Error('"endReadable()" called on non-empty stream');re.endEmitted||(re.ended=!0,y.nextTick(ne,re,te))}function ne(te,re){!te.endEmitted&&te.length===0&&(te.endEmitted=!0,re.readable=!1,re.emit("end"))}function ge(te,re){for(var Se=0,ie=te.length;Se<ie;Se++)if(te[Se]===re)return Se;return-1}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(h){return h&&h.__esModule?h:{default:h}}J.exports=T;var N=H("./_stream_duplex"),m=(0,g.default)(H("core-util-is"));m.inherits=H("inherits"),m.inherits(T,N);function v(h,i){var c=this._transformState;c.transforming=!1;var a=c.writecb;if(!a)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,i!=null&&this.push(i),a(h);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function T(h){if(!(this instanceof T))return new T(h);N.call(this,h),this._transformState={afterTransform:v.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",y)}function y(){var h=this;typeof this._flush=="function"?this._flush(function(i,c){t(h,i,c)}):t(this,null,null)}T.prototype.push=function(h,i){return this._transformState.needTransform=!1,N.prototype.push.call(this,h,i)},T.prototype._transform=function(h,i,c){throw new Error("_transform() is not implemented")},T.prototype._write=function(h,i,c){var a=this._transformState;if(a.writecb=c,a.writechunk=h,a.writeencoding=i,!a.transforming){var n=this._readableState;(a.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},T.prototype._read=function(h){var i=this._transformState;i.writechunk!==null&&i.writecb&&!i.transforming?(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform)):i.needTransform=!0},T.prototype._destroy=function(h,i){var c=this;N.prototype._destroy.call(this,h,function(a){i(a),c.emit("close")})};function t(h,i,c){if(i)return h.emit("error",i);if(c!=null&&h.push(c),h._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(h._transformState.transforming)throw new Error("Calling transform done when still transforming");return h.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(H,J,D){(function(M,g){"use strict";var C=H("babel-runtime/core-js/object/define-property"),N=a(C),m=H("babel-runtime/core-js/symbol/has-instance"),v=a(m),T=H("babel-runtime/core-js/symbol"),y=a(T),t=H("babel-runtime/core-js/object/create"),h=a(t),i=H("babel-runtime/core-js/set-immediate"),c=a(i);function a(ce){return ce&&ce.__esModule?ce:{default:ce}}var n=H("process-nextick-args");J.exports=F;function s(ce,le,ne){this.chunk=ce,this.encoding=le,this.callback=ne,this.next=null}function d(ce){var le=this;this.next=null,this.entry=null,this.finish=function(){be(le,ce)}}var f=!M.browser&&["v0.10","v0.9."].indexOf(M.version.slice(0,5))>-1?c.default:n.nextTick,l;F.WritableState=w;var o=(0,h.default)(H("core-util-is"));o.inherits=H("inherits");var r={deprecate:H("util-deprecate")},x=H("./internal/streams/stream"),b=H("safe-buffer").Buffer,p=g.Uint8Array||function(){};function I(ce){return b.from(ce)}function O(ce){return b.isBuffer(ce)||ce instanceof p}var _=H("./internal/streams/destroy");o.inherits(F,x);function E(){}function w(ce,le){l=l||H("./_stream_duplex"),ce=ce||{};var ne=le instanceof l;this.objectMode=!!ce.objectMode,ne&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var ge=ce.highWaterMark,te=ce.writableHighWaterMark,re=this.objectMode?16:16*1024;ge||ge===0?this.highWaterMark=ge:ne&&(te||te===0)?this.highWaterMark=te:this.highWaterMark=re,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 Se=ce.decodeStrings===!1;this.decodeStrings=!Se,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){R(le,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 d(this)}w.prototype.getBuffer=function(){for(var le=this.bufferedRequest,ne=[];le;)ne.push(le),le=le.next;return ne},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var S;typeof y.default=="function"&&v.default&&typeof Function.prototype[v.default]=="function"?(S=Function.prototype[v.default],(0,N.default)(F,v.default,{value:function(le){return S.call(this,le)?!0:this!==F?!1:le&&le._writableState instanceof w}})):S=function(le){return le instanceof this};function F(ce){if(l=l||H("./_stream_duplex"),!S.call(F,this)&&!(this instanceof l))return new F(ce);this._writableState=new w(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)),x.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function P(ce,le){var ne=new Error("write after end");ce.emit("error",ne),n.nextTick(le,ne)}function L(ce,le,ne,ge){var te=!0,re=!1;return ne===null?re=new TypeError("May not write null values to stream"):typeof ne!="string"&&ne!==void 0&&!le.objectMode&&(re=new TypeError("Invalid non-string/buffer chunk")),re&&(ce.emit("error",re),n.nextTick(ge,re),te=!1),te}F.prototype.write=function(ce,le,ne){var ge=this._writableState,te=!1,re=!ge.objectMode&&O(ce);return re&&!b.isBuffer(ce)&&(ce=I(ce)),typeof le=="function"&&(ne=le,le=null),re?le="buffer":le||(le=ge.defaultEncoding),typeof ne!="function"&&(ne=E),ge.ended?P(this,ne):(re||L(this,ge,ce,ne))&&(ge.pendingcb++,te=z(this,ge,re,ce,le,ne)),te},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&&ue(this,ce))},F.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function G(ce,le,ne){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof le=="string"&&(le=b.from(le,ne)),le}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(ce,le,ne,ge,te,re){if(!ne){var Se=G(le,ge,te);ge!==Se&&(ne=!0,te="buffer",ge=Se)}var ie=le.objectMode?1:ge.length;le.length+=ie;var q=le.length<le.highWaterMark;if(q||(le.needDrain=!0),le.writing||le.corked){var Y=le.lastBufferedRequest;le.lastBufferedRequest={chunk:ge,encoding:te,isBuf:ne,callback:re,next:null},Y?Y.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else A(ce,le,!1,ie,ge,te,re);return q}function A(ce,le,ne,ge,te,re,Se){le.writelen=ge,le.writecb=Se,le.writing=!0,le.sync=!0,ne?ce._writev(te,le.onwrite):ce._write(te,re,le.onwrite),le.sync=!1}function B(ce,le,ne,ge,te){--le.pendingcb,ne?(n.nextTick(te,ge),n.nextTick(me,ce,le),ce._writableState.errorEmitted=!0,ce.emit("error",ge)):(te(ge),ce._writableState.errorEmitted=!0,ce.emit("error",ge),me(ce,le))}function U(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function R(ce,le){var ne=ce._writableState,ge=ne.sync,te=ne.writecb;if(U(ne),le)B(ce,ne,ge,le,te);else{var re=de(ne);!re&&!ne.corked&&!ne.bufferProcessing&&ne.bufferedRequest&&ue(ce,ne),ge?f(K,ce,ne,re,te):K(ce,ne,re,te)}}function K(ce,le,ne,ge){ne||Z(ce,le),le.pendingcb--,ge(),me(ce,le)}function Z(ce,le){le.length===0&&le.needDrain&&(le.needDrain=!1,ce.emit("drain"))}function ue(ce,le){le.bufferProcessing=!0;var ne=le.bufferedRequest;if(ce._writev&&ne&&ne.next){var ge=le.bufferedRequestCount,te=new Array(ge),re=le.corkedRequestsFree;re.entry=ne;for(var Se=0,ie=!0;ne;)te[Se]=ne,ne.isBuf||(ie=!1),ne=ne.next,Se+=1;te.allBuffers=ie,A(ce,le,!0,le.length,te,"",re.finish),le.pendingcb++,le.lastBufferedRequest=null,re.next?(le.corkedRequestsFree=re.next,re.next=null):le.corkedRequestsFree=new d(le),le.bufferedRequestCount=0}else{for(;ne;){var q=ne.chunk,Y=ne.encoding,X=ne.callback,he=le.objectMode?1:q.length;if(A(ce,le,!1,he,q,Y,X),ne=ne.next,le.bufferedRequestCount--,le.writing)break}ne===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=ne,le.bufferProcessing=!1}F.prototype._write=function(ce,le,ne){ne(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(ce,le,ne){var ge=this._writableState;typeof ce=="function"?(ne=ce,ce=null,le=null):typeof le=="function"&&(ne=le,le=null),ce!=null&&this.write(ce,le),ge.corked&&(ge.corked=1,this.uncork()),!ge.ending&&!ge.finished&&Oe(this,ge,ne)};function de(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function Ce(ce,le){ce._final(function(ne){le.pendingcb--,ne&&ce.emit("error",ne),le.prefinished=!0,ce.emit("prefinish"),me(ce,le)})}function Re(ce,le){!le.prefinished&&!le.finalCalled&&(typeof ce._final=="function"?(le.pendingcb++,le.finalCalled=!0,n.nextTick(Ce,ce,le)):(le.prefinished=!0,ce.emit("prefinish")))}function me(ce,le){var ne=de(le);return ne&&(Re(ce,le),le.pendingcb===0&&(le.finished=!0,ce.emit("finish"))),ne}function Oe(ce,le,ne){le.ending=!0,me(ce,le),ne&&(le.finished?n.nextTick(ne):ce.once("finish",ne)),le.ended=!0,ce.writable=!1}function be(ce,le,ne){var ge=ce.entry;for(ce.entry=null;ge;){var te=ge.callback;le.pendingcb--,te(ne),ge=ge.next}le.corkedRequestsFree?le.corkedRequestsFree.next=ce:le.corkedRequestsFree=ce}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){if(!this._writableState)return;this._writableState.destroyed=le}}),F.prototype.destroy=_.destroy,F.prototype._undestroy=_.undestroy,F.prototype._destroy=function(ce,le){this.end(),le(ce)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(H,J,D){"use strict";function M(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}var g=H("safe-buffer").Buffer,C=H("util");function N(m,v,T){m.copy(v,T)}J.exports=function(){function m(){M(this,m),this.head=null,this.tail=null,this.length=0}return m.prototype.push=function(T){var y={data:T,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length},m.prototype.unshift=function(T){var y={data:T,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length},m.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},m.prototype.clear=function(){this.head=this.tail=null,this.length=0},m.prototype.join=function(T){if(this.length===0)return"";for(var y=this.head,t=""+y.data;y=y.next;)t+=T+y.data;return t},m.prototype.concat=function(T){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var y=g.allocUnsafe(T>>>0),t=this.head,h=0;t;)N(t.data,y,h),h+=t.data.length,t=t.next;return y},m}(),C&&C.inspect&&C.inspect.custom&&(J.exports.prototype[C.inspect.custom]=function(){var m=C.inspect({length:this.length});return this.constructor.name+" "+m})},{"safe-buffer":228,util:71}],220:[function(H,J,D){"use strict";var M=H("process-nextick-args");function g(m,v){var T=this,y=this._readableState&&this._readableState.destroyed,t=this._writableState&&this._writableState.destroyed;return y||t?(v?v(m):m&&(!this._writableState||!this._writableState.errorEmitted)&&M.nextTick(N,this,m),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(h){!v&&h?(M.nextTick(N,T,h),T._writableState&&(T._writableState.errorEmitted=!0)):v&&v(h)}),this)}function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function N(m,v){m.emit("error",v)}J.exports={destroy:g,undestroy:C}},{"process-nextick-args":207}],221:[function(H,J,D){"use strict";J.exports=H("events").EventEmitter},{events:192}],222:[function(H,J,D){J.exports=H("./readable").PassThrough},{"./readable":223}],223:[function(H,J,D){D=J.exports=H("./lib/_stream_readable.js"),D.Stream=D,D.Readable=D,D.Writable=H("./lib/_stream_writable.js"),D.Duplex=H("./lib/_stream_duplex.js"),D.Transform=H("./lib/_stream_transform.js"),D.PassThrough=H("./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(H,J,D){J.exports=H("./readable").Transform},{"./readable":223}],225:[function(H,J,D){J.exports=H("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(H,J,D){var M=function(){return this}()||Function("return this")(),g=M.regeneratorRuntime&&Object.getOwnPropertyNames(M).indexOf("regeneratorRuntime")>=0,C=g&&M.regeneratorRuntime;if(M.regeneratorRuntime=void 0,J.exports=H("./runtime"),g)M.regeneratorRuntime=C;else try{delete M.regeneratorRuntime}catch(N){M.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(H,J,D){!function(M){"use strict";var g=Object.prototype,C=g.hasOwnProperty,N,m=typeof Symbol=="function"?Symbol:{},v=m.iterator||"@@iterator",T=m.asyncIterator||"@@asyncIterator",y=m.toStringTag||"@@toStringTag",t=typeof J=="object",h=M.regeneratorRuntime;if(h){t&&(J.exports=h);return}h=M.regeneratorRuntime=t?J.exports:{};function i(z,A,B,U){var R=A&&A.prototype instanceof l?A:l,K=Object.create(R.prototype),Z=new P(U||[]);return K._invoke=E(z,B,Z),K}h.wrap=i;function c(z,A,B){try{return{type:"normal",arg:z.call(A,B)}}catch(U){return{type:"throw",arg:U}}}var a="suspendedStart",n="suspendedYield",s="executing",d="completed",f={};function l(){}function o(){}function r(){}var x={};x[v]=function(){return this};var b=Object.getPrototypeOf,p=b&&b(b(L([])));p&&p!==g&&C.call(p,v)&&(x=p);var I=r.prototype=l.prototype=Object.create(x);o.prototype=I.constructor=r,r.constructor=o,r[y]=o.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(A){z[A]=function(B){return this._invoke(A,B)}})}h.isGeneratorFunction=function(z){var A=typeof z=="function"&&z.constructor;return A?A===o||(A.displayName||A.name)==="GeneratorFunction":!1},h.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,r):(z.__proto__=r,y in z||(z[y]="GeneratorFunction")),z.prototype=Object.create(I),z},h.awrap=function(z){return{__await:z}};function _(z){function A(R,K,Z,ue){var de=c(z[R],z,K);if(de.type==="throw")ue(de.arg);else{var Ce=de.arg,Re=Ce.value;return Re&&typeof Re=="object"&&C.call(Re,"__await")?Promise.resolve(Re.__await).then(function(me){A("next",me,Z,ue)},function(me){A("throw",me,Z,ue)}):Promise.resolve(Re).then(function(me){Ce.value=me,Z(Ce)},ue)}}var B;function U(R,K){function Z(){return new Promise(function(ue,de){A(R,K,ue,de)})}return B=B?B.then(Z,Z):Z()}this._invoke=U}O(_.prototype),_.prototype[T]=function(){return this},h.AsyncIterator=_,h.async=function(z,A,B,U){var R=new _(i(z,A,B,U));return h.isGeneratorFunction(A)?R:R.next().then(function(K){return K.done?K.value:R.next()})};function E(z,A,B){var U=a;return function(K,Z){if(U===s)throw new Error("Generator is already running");if(U===d){if(K==="throw")throw Z;return G()}for(B.method=K,B.arg=Z;;){var ue=B.delegate;if(ue){var de=w(ue,B);if(de){if(de===f)continue;return de}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(U===a)throw U=d,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);U=s;var Ce=c(z,A,B);if(Ce.type==="normal"){if(U=B.done?d:n,Ce.arg===f)continue;return{value:Ce.arg,done:B.done}}else Ce.type==="throw"&&(U=d,B.method="throw",B.arg=Ce.arg)}}}function w(z,A){var B=z.iterator[A.method];if(B===N){if(A.delegate=null,A.method==="throw"){if(z.iterator.return&&(A.method="return",A.arg=N,w(z,A),A.method==="throw"))return f;A.method="throw",A.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var U=c(B,z.iterator,A.arg);if(U.type==="throw")return A.method="throw",A.arg=U.arg,A.delegate=null,f;var R=U.arg;if(!R)return A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,f;if(R.done)A[z.resultName]=R.value,A.next=z.nextLoc,A.method!=="return"&&(A.method="next",A.arg=N);else return R;return A.delegate=null,f}O(I),I[y]="Generator",I[v]=function(){return this},I.toString=function(){return"[object Generator]"};function S(z){var A={tryLoc:z[0]};1 in z&&(A.catchLoc=z[1]),2 in z&&(A.finallyLoc=z[2],A.afterLoc=z[3]),this.tryEntries.push(A)}function F(z){var A=z.completion||{};A.type="normal",delete A.arg,z.completion=A}function P(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(S,this),this.reset(!0)}h.keys=function(z){var A=[];for(var B in z)A.push(B);return A.reverse(),function U(){for(;A.length;){var R=A.pop();if(R in z)return U.value=R,U.done=!1,U}return U.done=!0,U}};function L(z){if(z){var A=z[v];if(A)return A.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var B=-1,U=function R(){for(;++B<z.length;)if(C.call(z,B))return R.value=z[B],R.done=!1,R;return R.value=N,R.done=!0,R};return U.next=U}}return{next:G}}h.values=L;function G(){return{value:N,done:!0}}P.prototype={constructor:P,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=N,this.done=!1,this.delegate=null,this.method="next",this.arg=N,this.tryEntries.forEach(F),!z)for(var A in this)A.charAt(0)==="t"&&C.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=N)},stop:function(){this.done=!0;var z=this.tryEntries[0],A=z.completion;if(A.type==="throw")throw A.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var A=this;function B(de,Ce){return K.type="throw",K.arg=z,A.next=de,Ce&&(A.method="next",A.arg=N),!!Ce}for(var U=this.tryEntries.length-1;U>=0;--U){var R=this.tryEntries[U],K=R.completion;if(R.tryLoc==="root")return B("end");if(R.tryLoc<=this.prev){var Z=C.call(R,"catchLoc"),ue=C.call(R,"finallyLoc");if(Z&&ue){if(this.prev<R.catchLoc)return B(R.catchLoc,!0);if(this.prev<R.finallyLoc)return B(R.finallyLoc)}else if(Z){if(this.prev<R.catchLoc)return B(R.catchLoc,!0)}else if(ue){if(this.prev<R.finallyLoc)return B(R.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,A){for(var B=this.tryEntries.length-1;B>=0;--B){var U=this.tryEntries[B];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var R=U;break}}R&&(z==="break"||z==="continue")&&R.tryLoc<=A&&A<=R.finallyLoc&&(R=null);var K=R?R.completion:{};return K.type=z,K.arg=A,R?(this.method="next",this.next=R.finallyLoc,f):this.complete(K)},complete:function(z,A){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&A&&(this.next=A),f},finish:function(z){for(var A=this.tryEntries.length-1;A>=0;--A){var B=this.tryEntries[A];if(B.finallyLoc===z)return this.complete(B.completion,B.afterLoc),F(B),f}},catch:function(z){for(var A=this.tryEntries.length-1;A>=0;--A){var B=this.tryEntries[A];if(B.tryLoc===z){var U=B.completion;if(U.type==="throw"){var R=U.arg;F(B)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(z,A,B){return this.delegate={iterator:L(z),resultName:A,nextLoc:B},this.method==="next"&&(this.arg=N),f}}}(function(){return this}()||Function("return this")())},{}],228:[function(H,J,D){var M=H("buffer"),g=M.Buffer;function C(m,v){for(var T in m)v[T]=m[T]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?J.exports=M:(C(M,D),D.Buffer=N);function N(m,v,T){return g(m,v,T)}C(g,N),N.from=function(m,v,T){if(typeof m=="number")throw new TypeError("Argument must not be a number");return g(m,v,T)},N.alloc=function(m,v,T){if(typeof m!="number")throw new TypeError("Argument must be a number");var y=g(m);return v!==void 0?typeof T=="string"?y.fill(v,T):y.fill(v):y.fill(0),y},N.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return g(m)},N.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return M.SlowBuffer(m)}},{buffer:73}],229:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/core-js/string/from-code-point"),C=n(g),N=H("babel-runtime/core-js/json/stringify"),m=n(N),v=H("babel-runtime/helpers/typeof"),T=n(v),y=H("babel-runtime/core-js/object/define-property"),t=n(y),h=H("babel-runtime/core-js/object/keys"),i=n(h),c=H("babel-runtime/core-js/object/create"),a=n(c);function n(s){return s&&s.__esModule?s:{default:s}}(function(s){s.parser=function(Y,X){return new f(Y,X)},s.SAXParser=f,s.SAXStream=I,s.createStream=p,s.MAX_BUFFER_LENGTH=64*1024;var d=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];s.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function f(Y,X){if(!(this instanceof f))return new f(Y,X);var he=this;o(he),he.q=he.c="",he.bufferCheckPosition=s.MAX_BUFFER_LENGTH,he.opt=X||{},he.opt.lowercase=he.opt.lowercase||he.opt.lowercasetags,he.looseCase=he.opt.lowercase?"toLowerCase":"toUpperCase",he.tags=[],he.closed=he.closedRoot=he.sawRoot=!1,he.tag=he.error=null,he.strict=!!Y,he.noscript=!!(Y||he.opt.noscript),he.state=K.BEGIN,he.strictEntities=he.opt.strictEntities,he.ENTITIES=he.strictEntities?(0,a.default)(s.XML_ENTITIES):(0,a.default)(s.ENTITIES),he.attribList=[],he.opt.xmlns&&(he.ns=(0,a.default)(S)),he.trackPosition=he.opt.position!==!1,he.trackPosition&&(he.position=he.line=he.column=0),ue(he,"onready")}a.default||(Object.create=function(Y){function X(){}X.prototype=Y;var he=new X;return he}),i.default||(Object.keys=function(Y){var X=[];for(var he in Y)Y.hasOwnProperty(he)&&X.push(he);return X});function l(Y){for(var X=Math.max(s.MAX_BUFFER_LENGTH,10),he=0,fe=0,xe=d.length;fe<xe;fe++){var Ke=Y[d[fe]].length;if(Ke>X)switch(d[fe]){case"textNode":Ce(Y);break;case"cdata":de(Y,"oncdata",Y.cdata),Y.cdata="";break;case"script":de(Y,"onscript",Y.script),Y.script="";break;default:me(Y,"Max buffer length exceeded: "+d[fe])}he=Math.max(he,Ke)}var Ze=s.MAX_BUFFER_LENGTH-he;Y.bufferCheckPosition=Ze+Y.position}function o(Y){for(var X=0,he=d.length;X<he;X++)Y[d[X]]=""}function r(Y){Ce(Y),Y.cdata!==""&&(de(Y,"oncdata",Y.cdata),Y.cdata=""),Y.script!==""&&(de(Y,"onscript",Y.script),Y.script="")}f.prototype={end:function(){Oe(this)},write:q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){r(this)}};var x;try{x=H("stream").Stream}catch(Y){x=function(){}}var b=s.EVENTS.filter(function(Y){return Y!=="error"&&Y!=="end"});function p(Y,X){return new I(Y,X)}function I(Y,X){if(!(this instanceof I))return new I(Y,X);x.apply(this),this._parser=new f(Y,X),this.writable=!0,this.readable=!0;var he=this;this._parser.onend=function(){he.emit("end")},this._parser.onerror=function(fe){he.emit("error",fe),he._parser.error=null},this._decoder=null,b.forEach(function(fe){(0,t.default)(he,"on"+fe,{get:function(){return he._parser["on"+fe]},set:function(Ke){if(!Ke)return he.removeAllListeners(fe),he._parser["on"+fe]=Ke,Ke;he.on(fe,Ke)},enumerable:!0,configurable:!1})})}I.prototype=(0,a.default)(x.prototype,{constructor:{value:I}}),I.prototype.write=function(Y){if(typeof M=="function"&&typeof M.isBuffer=="function"&&M.isBuffer(Y)){if(!this._decoder){var X=H("string_decoder").StringDecoder;this._decoder=new X("utf8")}Y=this._decoder.write(Y)}return this._parser.write(Y.toString()),this.emit("data",Y),!0},I.prototype.end=function(Y){return Y&&Y.length&&this.write(Y),this._parser.end(),!0},I.prototype.on=function(Y,X){var he=this;return!he._parser["on"+Y]&&b.indexOf(Y)!==-1&&(he._parser["on"+Y]=function(){var fe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);fe.splice(0,0,Y),he.emit.apply(he,fe)}),x.prototype.on.call(he,Y,X)};var O="[CDATA[",_="DOCTYPE",E="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",S={xml:E,xmlns:w},F=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,P=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,L=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function z(Y){return Y===" "||Y===`
`||Y==="\r"||Y===" "}function A(Y){return Y==='"'||Y==="'"}function B(Y){return Y===">"||z(Y)}function U(Y,X){return Y.test(X)}function R(Y,X){return!U(Y,X)}var K=0;s.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++},s.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},s.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,i.default)(s.ENTITIES).forEach(function(Y){var X=s.ENTITIES[Y],he=typeof X=="number"?String.fromCharCode(X):X;s.ENTITIES[Y]=he});for(var Z in s.STATE)s.STATE[s.STATE[Z]]=Z;K=s.STATE;function ue(Y,X,he){Y[X]&&Y[X](he)}function de(Y,X,he){Y.textNode&&Ce(Y),ue(Y,X,he)}function Ce(Y){Y.textNode=Re(Y.opt,Y.textNode),Y.textNode&&ue(Y,"ontext",Y.textNode),Y.textNode=""}function Re(Y,X){return Y.trim&&(X=X.trim()),Y.normalize&&(X=X.replace(/\s+/g," ")),X}function me(Y,X){return Ce(Y),Y.trackPosition&&(X+=`
Line: `+Y.line+`
Column: `+Y.column+`
Char: `+Y.c),X=new Error(X),Y.error=X,ue(Y,"onerror",X),Y}function Oe(Y){return Y.sawRoot&&!Y.closedRoot&&be(Y,"Unclosed root tag"),Y.state!==K.BEGIN&&Y.state!==K.BEGIN_WHITESPACE&&Y.state!==K.TEXT&&me(Y,"Unexpected end"),Ce(Y),Y.c="",Y.closed=!0,ue(Y,"onend"),f.call(Y,Y.strict,Y.opt),Y}function be(Y,X){if((typeof Y=="undefined"?"undefined":(0,T.default)(Y))!=="object"||!(Y instanceof f))throw new Error("bad call to strictFail");Y.strict&&me(Y,X)}function ce(Y){Y.strict||(Y.tagName=Y.tagName[Y.looseCase]());var X=Y.tags[Y.tags.length-1]||Y,he=Y.tag={name:Y.tagName,attributes:{}};Y.opt.xmlns&&(he.ns=X.ns),Y.attribList.length=0,de(Y,"onopentagstart",he)}function le(Y,X){var he=Y.indexOf(":"),fe=he<0?["",Y]:Y.split(":"),xe=fe[0],Ke=fe[1];return X&&Y==="xmlns"&&(xe="xmlns",Ke=""),{prefix:xe,local:Ke}}function ne(Y){if(Y.strict||(Y.attribName=Y.attribName[Y.looseCase]()),Y.attribList.indexOf(Y.attribName)!==-1||Y.tag.attributes.hasOwnProperty(Y.attribName)){Y.attribName=Y.attribValue="";return}if(Y.opt.xmlns){var X=le(Y.attribName,!0),he=X.prefix,fe=X.local;if(he==="xmlns")if(fe==="xml"&&Y.attribValue!==E)be(Y,"xml: prefix must be bound to "+E+`
Actual: `+Y.attribValue);else if(fe==="xmlns"&&Y.attribValue!==w)be(Y,"xmlns: prefix must be bound to "+w+`
Actual: `+Y.attribValue);else{var xe=Y.tag,Ke=Y.tags[Y.tags.length-1]||Y;xe.ns===Ke.ns&&(xe.ns=(0,a.default)(Ke.ns)),xe.ns[fe]=Y.attribValue}Y.attribList.push([Y.attribName,Y.attribValue])}else Y.tag.attributes[Y.attribName]=Y.attribValue,de(Y,"onattribute",{name:Y.attribName,value:Y.attribValue});Y.attribName=Y.attribValue=""}function ge(Y,X){if(Y.opt.xmlns){var he=Y.tag,fe=le(Y.tagName);he.prefix=fe.prefix,he.local=fe.local,he.uri=he.ns[fe.prefix]||"",he.prefix&&!he.uri&&(be(Y,"Unbound namespace prefix: "+(0,m.default)(Y.tagName)),he.uri=fe.prefix);var xe=Y.tags[Y.tags.length-1]||Y;he.ns&&xe.ns!==he.ns&&(0,i.default)(he.ns).forEach(function(Qe){de(Y,"onopennamespace",{prefix:Qe,uri:he.ns[Qe]})});for(var Ke=0,Ze=Y.attribList.length;Ke<Ze;Ke++){var et=Y.attribList[Ke],st=et[0],ut=et[1],dt=le(st,!0),Fe=dt.prefix,Ie=dt.local,ot=Fe===""?"":he.ns[Fe]||"",ft={name:st,value:ut,prefix:Fe,local:Ie,uri:ot};Fe&&Fe!=="xmlns"&&!ot&&(be(Y,"Unbound namespace prefix: "+(0,m.default)(Fe)),ft.uri=Fe),Y.tag.attributes[st]=ft,de(Y,"onattribute",ft)}Y.attribList.length=0}Y.tag.isSelfClosing=!!X,Y.sawRoot=!0,Y.tags.push(Y.tag),de(Y,"onopentag",Y.tag),X||(!Y.noscript&&Y.tagName.toLowerCase()==="script"?Y.state=K.SCRIPT:Y.state=K.TEXT,Y.tag=null,Y.tagName=""),Y.attribName=Y.attribValue="",Y.attribList.length=0}function te(Y){if(!Y.tagName){be(Y,"Weird empty close tag."),Y.textNode+="</>",Y.state=K.TEXT;return}if(Y.script){if(Y.tagName!=="script"){Y.script+="</"+Y.tagName+">",Y.tagName="",Y.state=K.SCRIPT;return}de(Y,"onscript",Y.script),Y.script=""}var X=Y.tags.length,he=Y.tagName;Y.strict||(he=he[Y.looseCase]());for(var fe=he;X--;){var xe=Y.tags[X];if(xe.name!==fe)be(Y,"Unexpected close tag");else break}if(X<0){be(Y,"Unmatched closing tag: "+Y.tagName),Y.textNode+="</"+Y.tagName+">",Y.state=K.TEXT;return}Y.tagName=he;for(var Ke=Y.tags.length;Ke-- >X;){var Ze=Y.tag=Y.tags.pop();Y.tagName=Y.tag.name,de(Y,"onclosetag",Y.tagName);var et={};for(var st in Ze.ns)et[st]=Ze.ns[st];var ut=Y.tags[Y.tags.length-1]||Y;Y.opt.xmlns&&Ze.ns!==ut.ns&&(0,i.default)(Ze.ns).forEach(function(dt){var Fe=Ze.ns[dt];de(Y,"onclosenamespace",{prefix:dt,uri:Fe})})}X===0&&(Y.closedRoot=!0),Y.tagName=Y.attribValue=Y.attribName="",Y.attribList.length=0,Y.state=K.TEXT}function re(Y){var X=Y.entity,he=X.toLowerCase(),fe,xe="";return Y.ENTITIES[X]?Y.ENTITIES[X]:Y.ENTITIES[he]?Y.ENTITIES[he]:(X=he,X.charAt(0)==="#"&&(X.charAt(1)==="x"?(X=X.slice(2),fe=parseInt(X,16),xe=fe.toString(16)):(X=X.slice(1),fe=parseInt(X,10),xe=fe.toString(10))),X=X.replace(/^0+/,""),isNaN(fe)||xe.toLowerCase()!==X?(be(Y,"Invalid character entity"),"&"+Y.entity+";"):(0,C.default)(fe))}function Se(Y,X){X==="<"?(Y.state=K.OPEN_WAKA,Y.startTagPosition=Y.position):z(X)||(be(Y,"Non-whitespace before first tag."),Y.textNode=X,Y.state=K.TEXT)}function ie(Y,X){var he="";return X<Y.length&&(he=Y.charAt(X)),he}function q(Y){var X=this;if(this.error)throw this.error;if(X.closed)return me(X,"Cannot write after close. Assign an onready handler.");if(Y===null)return Oe(X);(typeof Y=="undefined"?"undefined":(0,T.default)(Y))==="object"&&(Y=Y.toString());for(var he=0,fe="";!(fe=ie(Y,he++),X.c=fe,!fe);){X.trackPosition&&(X.position++,fe===`
`?(X.line++,X.column=0):X.column++);switch(X.state){case K.BEGIN:if(X.state=K.BEGIN_WHITESPACE,fe==="\uFEFF")continue;Se(X,fe);continue;case K.BEGIN_WHITESPACE:Se(X,fe);continue;case K.TEXT:if(X.sawRoot&&!X.closedRoot){for(var xe=he-1;fe&&fe!=="<"&&fe!=="&";)fe=ie(Y,he++),fe&&X.trackPosition&&(X.position++,fe===`
`?(X.line++,X.column=0):X.column++);X.textNode+=Y.substring(xe,he-1)}fe==="<"&&!(X.sawRoot&&X.closedRoot&&!X.strict)?(X.state=K.OPEN_WAKA,X.startTagPosition=X.position):(!z(fe)&&(!X.sawRoot||X.closedRoot)&&be(X,"Text data outside of root node."),fe==="&"?X.state=K.TEXT_ENTITY:X.textNode+=fe);continue;case K.SCRIPT:fe==="<"?X.state=K.SCRIPT_ENDING:X.script+=fe;continue;case K.SCRIPT_ENDING:fe==="/"?X.state=K.CLOSE_TAG:(X.script+="<"+fe,X.state=K.SCRIPT);continue;case K.OPEN_WAKA:if(fe==="!")X.state=K.SGML_DECL,X.sgmlDecl="";else if(!z(fe))if(U(F,fe))X.state=K.OPEN_TAG,X.tagName=fe;else if(fe==="/")X.state=K.CLOSE_TAG,X.tagName="";else if(fe==="?")X.state=K.PROC_INST,X.procInstName=X.procInstBody="";else{if(be(X,"Unencoded <"),X.startTagPosition+1<X.position){var Ke=X.position-X.startTagPosition;fe=new Array(Ke).join(" ")+fe}X.textNode+="<"+fe,X.state=K.TEXT}continue;case K.SGML_DECL:(X.sgmlDecl+fe).toUpperCase()===O?(de(X,"onopencdata"),X.state=K.CDATA,X.sgmlDecl="",X.cdata=""):X.sgmlDecl+fe==="--"?(X.state=K.COMMENT,X.comment="",X.sgmlDecl=""):(X.sgmlDecl+fe).toUpperCase()===_?(X.state=K.DOCTYPE,(X.doctype||X.sawRoot)&&be(X,"Inappropriately located doctype declaration"),X.doctype="",X.sgmlDecl=""):fe===">"?(de(X,"onsgmldeclaration",X.sgmlDecl),X.sgmlDecl="",X.state=K.TEXT):(A(fe)&&(X.state=K.SGML_DECL_QUOTED),X.sgmlDecl+=fe);continue;case K.SGML_DECL_QUOTED:fe===X.q&&(X.state=K.SGML_DECL,X.q=""),X.sgmlDecl+=fe;continue;case K.DOCTYPE:fe===">"?(X.state=K.TEXT,de(X,"ondoctype",X.doctype),X.doctype=!0):(X.doctype+=fe,fe==="["?X.state=K.DOCTYPE_DTD:A(fe)&&(X.state=K.DOCTYPE_QUOTED,X.q=fe));continue;case K.DOCTYPE_QUOTED:X.doctype+=fe,fe===X.q&&(X.q="",X.state=K.DOCTYPE);continue;case K.DOCTYPE_DTD:X.doctype+=fe,fe==="]"?X.state=K.DOCTYPE:A(fe)&&(X.state=K.DOCTYPE_DTD_QUOTED,X.q=fe);continue;case K.DOCTYPE_DTD_QUOTED:X.doctype+=fe,fe===X.q&&(X.state=K.DOCTYPE_DTD,X.q="");continue;case K.COMMENT:fe==="-"?X.state=K.COMMENT_ENDING:X.comment+=fe;continue;case K.COMMENT_ENDING:fe==="-"?(X.state=K.COMMENT_ENDED,X.comment=Re(X.opt,X.comment),X.comment&&de(X,"oncomment",X.comment),X.comment=""):(X.comment+="-"+fe,X.state=K.COMMENT);continue;case K.COMMENT_ENDED:fe!==">"?(be(X,"Malformed comment"),X.comment+="--"+fe,X.state=K.COMMENT):X.state=K.TEXT;continue;case K.CDATA:fe==="]"?X.state=K.CDATA_ENDING:X.cdata+=fe;continue;case K.CDATA_ENDING:fe==="]"?X.state=K.CDATA_ENDING_2:(X.cdata+="]"+fe,X.state=K.CDATA);continue;case K.CDATA_ENDING_2:fe===">"?(X.cdata&&de(X,"oncdata",X.cdata),de(X,"onclosecdata"),X.cdata="",X.state=K.TEXT):fe==="]"?X.cdata+="]":(X.cdata+="]]"+fe,X.state=K.CDATA);continue;case K.PROC_INST:fe==="?"?X.state=K.PROC_INST_ENDING:z(fe)?X.state=K.PROC_INST_BODY:X.procInstName+=fe;continue;case K.PROC_INST_BODY:if(!X.procInstBody&&z(fe))continue;fe==="?"?X.state=K.PROC_INST_ENDING:X.procInstBody+=fe;continue;case K.PROC_INST_ENDING:fe===">"?(de(X,"onprocessinginstruction",{name:X.procInstName,body:X.procInstBody}),X.procInstName=X.procInstBody="",X.state=K.TEXT):(X.procInstBody+="?"+fe,X.state=K.PROC_INST_BODY);continue;case K.OPEN_TAG:U(P,fe)?X.tagName+=fe:(ce(X),fe===">"?ge(X):fe==="/"?X.state=K.OPEN_TAG_SLASH:(z(fe)||be(X,"Invalid character in tag name"),X.state=K.ATTRIB));continue;case K.OPEN_TAG_SLASH:fe===">"?(ge(X,!0),te(X)):(be(X,"Forward-slash in opening tag not followed by >"),X.state=K.ATTRIB);continue;case K.ATTRIB:if(z(fe))continue;fe===">"?ge(X):fe==="/"?X.state=K.OPEN_TAG_SLASH:U(F,fe)?(X.attribName=fe,X.attribValue="",X.state=K.ATTRIB_NAME):be(X,"Invalid attribute name");continue;case K.ATTRIB_NAME:fe==="="?X.state=K.ATTRIB_VALUE:fe===">"?(be(X,"Attribute without value"),X.attribValue=X.attribName,ne(X),ge(X)):z(fe)?X.state=K.ATTRIB_NAME_SAW_WHITE:U(P,fe)?X.attribName+=fe:be(X,"Invalid attribute name");continue;case K.ATTRIB_NAME_SAW_WHITE:if(fe==="=")X.state=K.ATTRIB_VALUE;else{if(z(fe))continue;be(X,"Attribute without value"),X.tag.attributes[X.attribName]="",X.attribValue="",de(X,"onattribute",{name:X.attribName,value:""}),X.attribName="",fe===">"?ge(X):U(F,fe)?(X.attribName=fe,X.state=K.ATTRIB_NAME):(be(X,"Invalid attribute name"),X.state=K.ATTRIB)}continue;case K.ATTRIB_VALUE:if(z(fe))continue;A(fe)?(X.q=fe,X.state=K.ATTRIB_VALUE_QUOTED):(be(X,"Unquoted attribute value"),X.state=K.ATTRIB_VALUE_UNQUOTED,X.attribValue=fe);continue;case K.ATTRIB_VALUE_QUOTED:if(fe!==X.q){fe==="&"?X.state=K.ATTRIB_VALUE_ENTITY_Q:X.attribValue+=fe;continue}ne(X),X.q="",X.state=K.ATTRIB_VALUE_CLOSED;continue;case K.ATTRIB_VALUE_CLOSED:z(fe)?X.state=K.ATTRIB:fe===">"?ge(X):fe==="/"?X.state=K.OPEN_TAG_SLASH:U(F,fe)?(be(X,"No whitespace between attributes"),X.attribName=fe,X.attribValue="",X.state=K.ATTRIB_NAME):be(X,"Invalid attribute name");continue;case K.ATTRIB_VALUE_UNQUOTED:if(!B(fe)){fe==="&"?X.state=K.ATTRIB_VALUE_ENTITY_U:X.attribValue+=fe;continue}ne(X),fe===">"?ge(X):X.state=K.ATTRIB;continue;case K.CLOSE_TAG:if(X.tagName)fe===">"?te(X):U(P,fe)?X.tagName+=fe:X.script?(X.script+="</"+X.tagName,X.tagName="",X.state=K.SCRIPT):(z(fe)||be(X,"Invalid tagname in closing tag"),X.state=K.CLOSE_TAG_SAW_WHITE);else{if(z(fe))continue;R(F,fe)?X.script?(X.script+="</"+fe,X.state=K.SCRIPT):be(X,"Invalid tagname in closing tag."):X.tagName=fe}continue;case K.CLOSE_TAG_SAW_WHITE:if(z(fe))continue;fe===">"?te(X):be(X,"Invalid characters in closing tag");continue;case K.TEXT_ENTITY:case K.ATTRIB_VALUE_ENTITY_Q:case K.ATTRIB_VALUE_ENTITY_U:var Ze,et;switch(X.state){case K.TEXT_ENTITY:Ze=K.TEXT,et="textNode";break;case K.ATTRIB_VALUE_ENTITY_Q:Ze=K.ATTRIB_VALUE_QUOTED,et="attribValue";break;case K.ATTRIB_VALUE_ENTITY_U:Ze=K.ATTRIB_VALUE_UNQUOTED,et="attribValue";break}fe===";"?(X[et]+=re(X),X.entity="",X.state=Ze):U(X.entity.length?G:L,fe)?X.entity+=fe:(be(X,"Invalid character in entity name"),X[et]+="&"+X.entity+fe,X.entity="",X.state=Ze);continue;default:throw new Error(X,"Unknown state: "+X.state)}}return X.position>=X.bufferCheckPosition&&l(X),X}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var Y=String.fromCharCode,X=Math.floor,he=function(){var xe=16384,Ke=[],Ze,et,st=-1,ut=arguments.length;if(!ut)return"";for(var dt="";++st<ut;){var Fe=Number(arguments[st]);if(!isFinite(Fe)||Fe<0||Fe>1114111||X(Fe)!==Fe)throw RangeError("Invalid code point: "+Fe);Fe<=65535?Ke.push(Fe):(Fe-=65536,Ze=(Fe>>10)+55296,et=Fe%1024+56320,Ke.push(Ze,et)),(st+1===ut||Ke.length>xe)&&(dt+=Y.apply(null,Ke),Ke.length=0)}return dt};t.default?Object.defineProperty(String,"fromCodePoint",{value:he,configurable:!0,writable:!0}):String.fromCodePoint=he}()})(typeof D=="undefined"?(void 0).sax={}:D)}).call(this,H("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(H,J,D){J.exports=C;var M=H("events").EventEmitter,g=H("inherits");g(C,M),C.Readable=H("readable-stream/readable.js"),C.Writable=H("readable-stream/writable.js"),C.Duplex=H("readable-stream/duplex.js"),C.Transform=H("readable-stream/transform.js"),C.PassThrough=H("readable-stream/passthrough.js"),C.Stream=C;function C(){M.call(this)}C.prototype.pipe=function(N,m){var v=this;function T(n){N.writable&&(N.write(n)===!1&&v.pause&&v.pause())}v.on("data",T);function y(){v.readable&&v.resume&&v.resume()}N.on("drain",y),!N._isStdio&&(!m||m.end!==!1)&&(v.on("end",h),v.on("close",i));var t=!1;function h(){if(t)return;t=!0,N.end()}function i(){if(t)return;t=!0,typeof N.destroy=="function"&&N.destroy()}function c(n){if(a(),M.listenerCount(this,"error")===0)throw n}v.on("error",c),N.on("error",c);function a(){v.removeListener("data",T),N.removeListener("drain",y),v.removeListener("end",h),v.removeListener("close",i),v.removeListener("error",c),N.removeListener("error",c),v.removeListener("end",a),v.removeListener("close",a),N.removeListener("close",a)}return v.on("end",a),v.on("close",a),N.on("close",a),N.emit("pipe",v),N}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(H,J,D){(function(M){var g=H("./lib/request"),C=H("./lib/response"),N=H("xtend"),m=H("builtin-status-codes"),v=H("url"),T=D;T.request=function(y,t){typeof y=="string"?y=v.parse(y):y=N(y);var h=M.location.protocol.search(/^https?:$/)===-1?"http:":"",i=y.protocol||h,c=y.hostname||y.host,a=y.port,n=y.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),y.url=(c?i+"//"+c:"")+(a?":"+a:"")+n,y.method=(y.method||"GET").toUpperCase(),y.headers=y.headers||{};var s=new g(y);return t&&s.on("response",t),s},T.get=function(t,h){var i=T.request(t,h);return i.end(),i},T.ClientRequest=g,T.IncomingMessage=C.IncomingMessage,T.Agent=function(){},T.Agent.defaultMaxSockets=4,T.globalAgent=new T.Agent,T.STATUS_CODES=m,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(H,J,D){(function(M){"use strict";D.fetch=T(M.fetch)&&T(M.ReadableStream),D.writableStream=T(M.WritableStream),D.abortController=T(M.AbortController),D.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),D.blobConstructor=!0}catch(y){}var g;function C(){if(g!==void 0)return g;if(M.XMLHttpRequest){g=new M.XMLHttpRequest;try{g.open("GET",M.XDomainRequest?"/":"https://example.com")}catch(y){g=null}}else g=null;return g}function N(y){var t=C();if(!t)return!1;try{return t.responseType=y,t.responseType===y}catch(h){}return!1}var m=typeof M.ArrayBuffer!="undefined",v=m&&T(M.ArrayBuffer.prototype.slice);D.arraybuffer=D.fetch||m&&N("arraybuffer"),D.msstream=!D.fetch&&v&&N("ms-stream"),D.mozchunkedarraybuffer=!D.fetch&&m&&N("moz-chunked-arraybuffer"),D.overrideMimeType=D.fetch||(C()?T(C().overrideMimeType):!1),D.vbArray=T(M.VBArray);function T(y){return typeof y=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(H,J,D){(function(M,g,C){"use strict";var N=H("babel-runtime/core-js/object/keys"),m=v(N);function v(l){return l&&l.__esModule?l:{default:l}}var T=H("./capability"),y=H("inherits"),t=H("./response"),h=H("readable-stream"),i=H("to-arraybuffer"),c=t.IncomingMessage,a=t.readyStates;function n(l,o){return T.fetch&&o?"fetch":T.mozchunkedarraybuffer?"moz-chunked-arraybuffer":T.msstream?"ms-stream":T.arraybuffer&&l?"arraybuffer":T.vbArray&&l?"text:vbarray":"text"}var s=J.exports=function(l){var o=this;h.Writable.call(o),o._opts=l,o._body=[],o._headers={},l.auth&&o.setHeader("Authorization","Basic "+new C(l.auth).toString("base64")),(0,m.default)(l.headers).forEach(function(b){o.setHeader(b,l.headers[b])});var r,x=!0;if(l.mode==="disable-fetch"||"requestTimeout"in l&&!T.abortController)x=!1,r=!0;else if(l.mode==="prefer-streaming")r=!1;else if(l.mode==="allow-wrong-content-type")r=!T.overrideMimeType;else if(!l.mode||l.mode==="default"||l.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");o._mode=n(r,x),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};y(s,h.Writable),s.prototype.setHeader=function(l,o){var r=this,x=l.toLowerCase();if(f.indexOf(x)!==-1)return;r._headers[x]={name:l,value:o}},s.prototype.getHeader=function(l){var o=this._headers[l.toLowerCase()];return o?o.value:null},s.prototype.removeHeader=function(l){var o=this;delete o._headers[l.toLowerCase()]},s.prototype._onFinish=function(){var l=this;if(l._destroyed)return;var o=l._opts,r=l._headers,x=null;o.method!=="GET"&&o.method!=="HEAD"&&(T.arraybuffer?x=i(C.concat(l._body)):T.blobConstructor?x=new g.Blob(l._body.map(function(E){return i(E)}),{type:(r["content-type"]||{}).value||""}):x=C.concat(l._body).toString());var b=[];if((0,m.default)(r).forEach(function(E){var w=r[E].name,S=r[E].value;Array.isArray(S)?S.forEach(function(F){b.push([w,F])}):b.push([w,S])}),l._mode==="fetch"){var p=null,I=null;if(T.abortController){var O=new AbortController;p=O.signal,l._fetchAbortController=O,"requestTimeout"in o&&o.requestTimeout!==0&&(l._fetchTimer=g.setTimeout(function(){l.emit("requestTimeout"),l._fetchAbortController&&l._fetchAbortController.abort()},o.requestTimeout))}g.fetch(l._opts.url,{method:l._opts.method,headers:b,body:x||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:p}).then(function(E){l._fetchResponse=E,l._connect()},function(E){g.clearTimeout(l._fetchTimer),l._destroyed||l.emit("error",E)})}else{var _=l._xhr=new g.XMLHttpRequest;try{_.open(l._opts.method,l._opts.url,!0)}catch(E){M.nextTick(function(){l.emit("error",E)});return}"responseType"in _&&(_.responseType=l._mode.split(":")[0]),"withCredentials"in _&&(_.withCredentials=!!o.withCredentials),l._mode==="text"&&"overrideMimeType"in _&&_.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(_.timeout=o.requestTimeout,_.ontimeout=function(){l.emit("requestTimeout")}),b.forEach(function(E){_.setRequestHeader(E[0],E[1])}),l._response=null,_.onreadystatechange=function(){switch(_.readyState){case a.LOADING:case a.DONE:l._onXHRProgress();break}},l._mode==="moz-chunked-arraybuffer"&&(_.onprogress=function(){l._onXHRProgress()}),_.onerror=function(){if(l._destroyed)return;l.emit("error",new Error("XHR error"))};try{_.send(x)}catch(E){M.nextTick(function(){l.emit("error",E)});return}}};function d(l){try{var o=l.status;return o!==null&&o!==0}catch(r){return!1}}s.prototype._onXHRProgress=function(){var l=this;if(!d(l._xhr)||l._destroyed)return;l._response||l._connect(),l._response._onXHRProgress()},s.prototype._connect=function(){var l=this;if(l._destroyed)return;l._response=new c(l._xhr,l._fetchResponse,l._mode,l._fetchTimer),l._response.on("error",function(o){l.emit("error",o)}),l.emit("response",l._response)},s.prototype._write=function(l,o,r){var x=this;x._body.push(l),r()},s.prototype.abort=s.prototype.destroy=function(){var l=this;l._destroyed=!0,g.clearTimeout(l._fetchTimer),l._response&&(l._response._destroyed=!0),l._xhr?l._xhr.abort():l._fetchAbortController&&l._fetchAbortController.abort()},s.prototype.end=function(l,o,r){var x=this;typeof l=="function"&&(r=l,l=void 0),h.Writable.prototype.end.call(x,l,o,r)},s.prototype.flushHeaders=function(){},s.prototype.setTimeout=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("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(H,J,D){(function(M,g,C){"use strict";var N=H("babel-runtime/core-js/promise"),m=v(N);function v(c){return c&&c.__esModule?c:{default:c}}var T=H("./capability"),y=H("inherits"),t=H("readable-stream"),h=D.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},i=D.IncomingMessage=function(c,a,n,s){var d=this;if(t.Readable.call(d),d._mode=n,d.headers={},d.rawHeaders=[],d.trailers={},d.rawTrailers=[],d.on("end",function(){M.nextTick(function(){d.emit("close")})}),n==="fetch"){var f=function p(){o.read().then(function(I){if(d._destroyed)return;if(I.done){g.clearTimeout(s),d.push(null);return}d.push(new C(I.value)),p()}).catch(function(I){g.clearTimeout(s),d._destroyed||d.emit("error",I)})};if(d._fetchResponse=a,d.url=a.url,d.statusCode=a.status,d.statusMessage=a.statusText,a.headers.forEach(function(p,I){d.headers[I.toLowerCase()]=p,d.rawHeaders.push(I,p)}),T.writableStream){var l=new WritableStream({write:function(I){return new m.default(function(O,_){d._destroyed?_():d.push(new C(I))?O():d._resumeFetch=O})},close:function(){g.clearTimeout(s),d._destroyed||d.push(null)},abort:function(I){d._destroyed||d.emit("error",I)}});try{a.body.pipeTo(l).catch(function(p){g.clearTimeout(s),d._destroyed||d.emit("error",p)});return}catch(p){}}var o=a.body.getReader();f()}else{d._xhr=c,d._pos=0,d.url=c.responseURL,d.statusCode=c.status,d.statusMessage=c.statusText;var r=c.getAllResponseHeaders().split(/\r?\n/);if(r.forEach(function(p){var I=p.match(/^([^:]+):\s*(.*)/);if(I){var O=I[1].toLowerCase();O==="set-cookie"?(d.headers[O]===void 0&&(d.headers[O]=[]),d.headers[O].push(I[2])):d.headers[O]!==void 0?d.headers[O]+=", "+I[2]:d.headers[O]=I[2],d.rawHeaders.push(I[1],I[2])}}),d._charset="x-user-defined",!T.overrideMimeType){var x=d.rawHeaders["mime-type"];if(x){var b=x.match(/;\s*charset=([^;])(;|$)/);b&&(d._charset=b[1].toLowerCase())}d._charset||(d._charset="utf-8")}}};y(i,t.Readable),i.prototype._read=function(){var c=this,a=c._resumeFetch;a&&(c._resumeFetch=null,a())},i.prototype._onXHRProgress=function(){var c=this,a=c._xhr,n=null;switch(c._mode){case"text:vbarray":if(a.readyState!==h.DONE)break;try{n=new g.VBArray(a.responseBody).toArray()}catch(o){}if(n!==null){c.push(new C(n));break}case"text":try{n=a.responseText}catch(o){c._mode="text:vbarray";break}if(n.length>c._pos){var s=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var d=new C(s.length),f=0;f<s.length;f++)d[f]=s.charCodeAt(f)&255;c.push(d)}else c.push(s,c._charset);c._pos=n.length}break;case"arraybuffer":if(a.readyState!==h.DONE||!a.response)break;n=a.response,c.push(new C(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=a.response,a.readyState!==h.LOADING||!n)break;c.push(new C(new Uint8Array(n)));break;case"ms-stream":if(n=a.response,a.readyState!==h.LOADING)break;var l=new g.MSStreamReader;l.onprogress=function(){l.result.byteLength>c._pos&&(c.push(new C(new Uint8Array(l.result.slice(c._pos)))),c._pos=l.result.byteLength)},l.onload=function(){c.push(null)},l.readAsArrayBuffer(n);break}c._xhr.readyState===h.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(H,J,D){"use strict";var M=H("safe-buffer").Buffer,g=M.isEncoding||function(l){l=""+l;switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(l){if(!l)return"utf8";for(var o;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(o)return;l=(""+l).toLowerCase(),o=!0}}function N(l){var o=C(l);if(typeof o!="string"&&(M.isEncoding===g||!g(l)))throw new Error("Unknown encoding: "+l);return o||l}D.StringDecoder=m;function m(l){this.encoding=N(l);var o;switch(this.encoding){case"utf16le":this.text=c,this.end=a,o=4;break;case"utf8":this.fillLast=t,o=4;break;case"base64":this.text=n,this.end=s,o=3;break;default:this.write=d,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=M.allocUnsafe(o)}m.prototype.write=function(l){if(l.length===0)return"";var o,r;if(this.lastNeed){if(o=this.fillLast(l),o===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<l.length?o?o+this.text(l,r):this.text(l,r):o||""},m.prototype.end=i,m.prototype.text=h,m.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length};function v(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function T(l,o,r){var x=o.length-1;if(x<r)return 0;var b=v(o[x]);return b>=0?(b>0&&(l.lastNeed=b-1),b):--x<r||b===-2?0:(b=v(o[x]),b>=0?(b>0&&(l.lastNeed=b-2),b):--x<r||b===-2?0:(b=v(o[x]),b>=0?(b>0&&(b===2?b=0:l.lastNeed=b-3),b):0))}function y(l,o,r){if((o[0]&192)!==128)return l.lastNeed=0,"\uFFFD";if(l.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return l.lastNeed=1,"\uFFFD";if(l.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return l.lastNeed=2,"\uFFFD"}}function t(l){var o=this.lastTotal-this.lastNeed,r=y(this,l,o);if(r!==void 0)return r;if(this.lastNeed<=l.length)return l.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,o,0,l.length),this.lastNeed-=l.length}function h(l,o){var r=T(this,l,o);if(!this.lastNeed)return l.toString("utf8",o);this.lastTotal=r;var x=l.length-(r-this.lastNeed);return l.copy(this.lastChar,0,x),l.toString("utf8",o,x)}function i(l){var o=l&&l.length?this.write(l):"";return this.lastNeed?o+"\uFFFD":o}function c(l,o){if((l.length-o)%2===0){var r=l.toString("utf16le",o);if(r){var x=r.charCodeAt(r.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",o,l.length-1)}function a(l){var o=l&&l.length?this.write(l):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,r)}return o}function n(l,o){var r=(l.length-o)%3;return r===0?l.toString("base64",o):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",o,l.length-r))}function s(l){var o=l&&l.length?this.write(l):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function d(l){return l.toString(this.encoding)}function f(l){return l&&l.length?this.write(l):""}},{"safe-buffer":228}],236:[function(H,J,D){(function(M,g){var C=H("process/browser.js").nextTick,N=Function.prototype.apply,m=Array.prototype.slice,v={},T=0;D.setTimeout=function(){return new y(N.call(setTimeout,window,arguments),clearTimeout)},D.setInterval=function(){return new y(N.call(setInterval,window,arguments),clearInterval)},D.clearTimeout=D.clearInterval=function(t){t.close()};function y(t,h){this._id=t,this._clearFn=h}y.prototype.unref=y.prototype.ref=function(){},y.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 M=="function"?M:function(t){var h=T++,i=arguments.length<2?!1:m.call(arguments,1);return v[h]=!0,C(function(){v[h]&&(i?t.apply(null,i):t.call(null),D.clearImmediate(h))}),h},D.clearImmediate=typeof g=="function"?g:function(t){delete v[t]}}).call(this,H("timers").setImmediate,H("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(H,J,D){var M=H("buffer").Buffer;J.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(M.isBuffer(g)){for(var C=new Uint8Array(g.length),N=g.length,m=0;m<N;m++)C[m]=g[m];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(H,J,D){"use strict";var M=H("punycode"),g=H("./util");D.parse=o,D.resolve=x,D.resolveObject=b,D.format=r,D.Url=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var N=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,T=["<",">",'"',"`"," ","\r",`
`," "],y=["{","}","|","\\","^","`"].concat(T),t=["'"].concat(y),h=["%","/","?",";","#"].concat(t),i=["/","?","#"],c=255,a=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,s={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},l=H("querystring");function o(p,I,O){if(p&&g.isObject(p)&&p instanceof C)return p;var _=new C;return _.parse(p,I,O),_}C.prototype.parse=function(p,I,O){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var _=p.indexOf("?"),E=_!==-1&&_<p.indexOf("#")?"?":"#",w=p.split(E),S=/\\/g;w[0]=w[0].replace(S,"/"),p=w.join(E);var F=p;if(F=F.trim(),!O&&p.split("#").length===1){var P=v.exec(F);if(P)return this.path=F,this.href=F,this.pathname=P[1],P[2]?(this.search=P[2],I?this.query=l.parse(this.search.substr(1)):this.query=this.search.substr(1)):I&&(this.search="",this.query={}),this}var L=N.exec(F);if(L){L=L[0];var G=L.toLowerCase();this.protocol=G,F=F.substr(L.length)}if(O||L||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=F.substr(0,2)==="//";z&&!(L&&d[L])&&(F=F.substr(2),this.slashes=!0)}if(!d[L]&&(z||L&&!f[L])){for(var A=-1,B=0;B<i.length;B++){var U=F.indexOf(i[B]);U!==-1&&(A===-1||U<A)&&(A=U)}var R,K;A===-1?K=F.lastIndexOf("@"):K=F.lastIndexOf("@",A),K!==-1&&(R=F.slice(0,K),F=F.slice(K+1),this.auth=decodeURIComponent(R)),A=-1;for(var B=0;B<h.length;B++){var U=F.indexOf(h[B]);U!==-1&&(A===-1||U<A)&&(A=U)}A===-1&&(A=F.length),this.host=F.slice(0,A),F=F.slice(A),this.parseHost(),this.hostname=this.hostname||"";var Z=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Z)for(var ue=this.hostname.split(/\./),B=0,de=ue.length;B<de;B++){var Ce=ue[B];if(!Ce)continue;if(!Ce.match(a)){for(var Re="",me=0,Oe=Ce.length;me<Oe;me++)Ce.charCodeAt(me)>127?Re+="x":Re+=Ce[me];if(!Re.match(a)){var be=ue.slice(0,B),ce=ue.slice(B+1),le=Ce.match(n);le&&(be.push(le[1]),ce.unshift(le[2])),ce.length&&(F="/"+ce.join(".")+F),this.hostname=be.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),Z||(this.hostname=M.toASCII(this.hostname));var ne=this.port?":"+this.port:"",ge=this.hostname||"";this.host=ge+ne,this.href+=this.host,Z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!s[G])for(var B=0,de=t.length;B<de;B++){var te=t[B];if(F.indexOf(te)===-1)continue;var re=encodeURIComponent(te);re===te&&(re=escape(te)),F=F.split(te).join(re)}var Se=F.indexOf("#");Se!==-1&&(this.hash=F.substr(Se),F=F.slice(0,Se));var ie=F.indexOf("?");if(ie!==-1?(this.search=F.substr(ie),this.query=F.substr(ie+1),I&&(this.query=l.parse(this.query)),F=F.slice(0,ie)):I&&(this.search="",this.query={}),F&&(this.pathname=F),f[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ne=this.pathname||"",q=this.search||"";this.path=ne+q}return this.href=this.format(),this};function r(p){return g.isString(p)&&(p=o(p)),p instanceof C?p.format():C.prototype.format.call(p)}C.prototype.format=function(){var p=this.auth||"";p&&(p=encodeURIComponent(p),p=p.replace(/%3A/i,":"),p+="@");var I=this.protocol||"",O=this.pathname||"",_=this.hash||"",E=!1,w="";this.host?E=p+this.host:this.hostname&&(E=p+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(E+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(w=l.stringify(this.query));var S=this.search||w&&"?"+w||"";return I&&I.substr(-1)!==":"&&(I+=":"),this.slashes||(!I||f[I])&&E!==!1?(E="//"+(E||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):E||(E=""),_&&_.charAt(0)!=="#"&&(_="#"+_),S&&S.charAt(0)!=="?"&&(S="?"+S),O=O.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),S=S.replace("#","%23"),I+E+O+S+_};function x(p,I){return o(p,!1,!0).resolve(I)}C.prototype.resolve=function(p){return this.resolveObject(o(p,!1,!0)).format()};function b(p,I){return p?o(p,!1,!0).resolveObject(I):I}C.prototype.resolveObject=function(p){if(g.isString(p)){var I=new C;I.parse(p,!1,!0),p=I}for(var O=new C,_=Object.keys(this),E=0;E<_.length;E++){var w=_[E];O[w]=this[w]}if(O.hash=p.hash,p.href==="")return O.href=O.format(),O;if(p.slashes&&!p.protocol){for(var S=Object.keys(p),F=0;F<S.length;F++){var P=S[F];P!=="protocol"&&(O[P]=p[P])}return f[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(p.protocol&&p.protocol!==O.protocol){if(!f[p.protocol]){for(var L=Object.keys(p),G=0;G<L.length;G++){var z=L[G];O[z]=p[z]}return O.href=O.format(),O}if(O.protocol=p.protocol,!p.host&&!d[p.protocol]){for(var de=(p.pathname||"").split("/");de.length&&!(p.host=de.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),O.pathname=de.join("/")}else O.pathname=p.pathname;if(O.search=p.search,O.query=p.query,O.host=p.host||"",O.auth=p.auth,O.hostname=p.hostname||p.host,O.port=p.port,O.pathname||O.search){var A=O.pathname||"",B=O.search||"";O.path=A+B}return O.slashes=O.slashes||p.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",R=p.host||p.pathname&&p.pathname.charAt(0)==="/",K=R||U||O.host&&p.pathname,Z=K,ue=O.pathname&&O.pathname.split("/")||[],de=p.pathname&&p.pathname.split("/")||[],Ce=O.protocol&&!f[O.protocol];if(Ce&&(O.hostname="",O.port=null,O.host&&(ue[0]===""?ue[0]=O.host:ue.unshift(O.host)),O.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(de[0]===""?de[0]=p.host:de.unshift(p.host)),p.host=null),K=K&&(de[0]===""||ue[0]==="")),R)O.host=p.host||p.host===""?p.host:O.host,O.hostname=p.hostname||p.hostname===""?p.hostname:O.hostname,O.search=p.search,O.query=p.query,ue=de;else if(de.length)ue||(ue=[]),ue.pop(),ue=ue.concat(de),O.search=p.search,O.query=p.query;else if(!g.isNullOrUndefined(p.search)){if(Ce){O.hostname=O.host=ue.shift();var Re=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Re&&(O.auth=Re.shift(),O.host=O.hostname=Re.shift())}return O.search=p.search,O.query=p.query,(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ue.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var me=ue.slice(-1)[0],Oe=(O.host||p.host||ue.length>1)&&(me==="."||me==="..")||me==="",be=0,ce=ue.length;ce>=0;ce--)me=ue[ce],me==="."?ue.splice(ce,1):me===".."?(ue.splice(ce,1),be++):be&&(ue.splice(ce,1),be--);if(!K&&!Z)for(;be--;be)ue.unshift("..");K&&ue[0]!==""&&(!ue[0]||ue[0].charAt(0)!=="/")&&ue.unshift(""),Oe&&ue.join("/").substr(-1)!=="/"&&ue.push("");var le=ue[0]===""||ue[0]&&ue[0].charAt(0)==="/";if(Ce){O.hostname=O.host=le?"":ue.length?ue.shift():"";var Re=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Re&&(O.auth=Re.shift(),O.host=O.hostname=Re.shift())}return K=K||O.host&&ue.length,K&&!le&&ue.unshift(""),ue.length?O.pathname=ue.join("/"):(O.pathname=null,O.path=null),(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=p.auth||O.auth,O.slashes=O.slashes||p.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var p=this.host,I=m.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(H,J,D){"use strict";J.exports={isString:function(M){return typeof M=="string"},isObject:function(M){return typeof M=="object"&&M!==null},isNull:function(M){return M===null},isNullOrUndefined:function(M){return M==null}}},{}],240:[function(H,J,D){(function(M){J.exports=g;function g(N,m){if(C("noDeprecation"))return N;var v=!1;function T(){if(!v){if(C("throwDeprecation"))throw new Error(m);C("traceDeprecation")?console.trace(m):console.warn(m),v=!0}return N.apply(this,arguments)}return T}function C(N){try{if(!M.localStorage)return!1}catch(v){return!1}var m=M.localStorage[N];return m==null?!1:String(m).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(H,J,D){typeof Object.create=="function"?J.exports=function(g,C){g.super_=C,g.prototype=Object.create(C.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:J.exports=function(g,C){g.super_=C;var N=function(){};N.prototype=C.prototype,g.prototype=new N,g.prototype.constructor=g}},{}],242:[function(H,J,D){J.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(H,J,D){(function(M,g){var C=/%[sdj%]/g;D.format=function(A){if(!x(A)){for(var B=[],U=0;U<arguments.length;U++)B.push(v(arguments[U]));return B.join(" ")}for(var U=1,R=arguments,K=R.length,Z=String(A).replace(C,function(de){if(de==="%%")return"%";if(U>=K)return de;switch(de){case"%s":return String(R[U++]);case"%d":return Number(R[U++]);case"%j":try{return JSON.stringify(R[U++])}catch(Ce){return"[Circular]"}default:return de}}),ue=R[U];U<K;ue=R[++U])l(ue)||!O(ue)?Z+=" "+ue:Z+=" "+v(ue);return Z},D.deprecate=function(A,B){if(p(g.process))return function(){return D.deprecate(A,B).apply(this,arguments)};if(M.noDeprecation===!0)return A;var U=!1;function R(){if(!U){if(M.throwDeprecation)throw new Error(B);M.traceDeprecation?console.trace(B):console.error(B),U=!0}return A.apply(this,arguments)}return R};var N={},m;D.debuglog=function(A){if(p(m)&&(m=M.env.NODE_DEBUG||""),A=A.toUpperCase(),!N[A])if(new RegExp("\\b"+A+"\\b","i").test(m)){var B=M.pid;N[A]=function(){var U=D.format.apply(D,arguments);console.error("%s %d: %s",A,B,U)}}else N[A]=function(){};return N[A]};function v(A,B){var U={seen:[],stylize:y};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),f(B)?U.showHidden=B:B&&D._extend(U,B),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,A,U.depth)}D.inspect=v,v.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},v.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function T(A,B){var U=v.styles[B];return U?"["+v.colors[U][0]+"m"+A+"["+v.colors[U][1]+"m":A}function y(A,B){return A}function t(A){var B={};return A.forEach(function(U,R){B[U]=!0}),B}function h(A,B,U){if(A.customInspect&&B&&w(B.inspect)&&B.inspect!==D.inspect&&!(B.constructor&&B.constructor.prototype===B)){var R=B.inspect(U,A);return x(R)||(R=h(A,R,U)),R}var K=i(A,B);if(K)return K;var Z=Object.keys(B),ue=t(Z);if(A.showHidden&&(Z=Object.getOwnPropertyNames(B)),E(B)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return c(B);if(Z.length===0){if(w(B)){var de=B.name?": "+B.name:"";return A.stylize("[Function"+de+"]","special")}if(I(B))return A.stylize(RegExp.prototype.toString.call(B),"regexp");if(_(B))return A.stylize(Date.prototype.toString.call(B),"date");if(E(B))return c(B)}var Ce="",Re=!1,me=["{","}"];if(d(B)&&(Re=!0,me=["[","]"]),w(B)){var Oe=B.name?": "+B.name:"";Ce=" [Function"+Oe+"]"}if(I(B)&&(Ce=" "+RegExp.prototype.toString.call(B)),_(B)&&(Ce=" "+Date.prototype.toUTCString.call(B)),E(B)&&(Ce=" "+c(B)),Z.length===0&&(!Re||B.length==0))return me[0]+Ce+me[1];if(U<0)return I(B)?A.stylize(RegExp.prototype.toString.call(B),"regexp"):A.stylize("[Object]","special");A.seen.push(B);var be;return Re?be=a(A,B,U,ue,Z):be=Z.map(function(ce){return n(A,B,U,ue,ce,Re)}),A.seen.pop(),s(be,Ce,me)}function i(A,B){if(p(B))return A.stylize("undefined","undefined");if(x(B)){var U="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(U,"string")}if(r(B))return A.stylize(""+B,"number");if(f(B))return A.stylize(""+B,"boolean");if(l(B))return A.stylize("null","null")}function c(A){return"["+Error.prototype.toString.call(A)+"]"}function a(A,B,U,R,K){for(var Z=[],ue=0,de=B.length;ue<de;++ue)z(B,String(ue))?Z.push(n(A,B,U,R,String(ue),!0)):Z.push("");return K.forEach(function(Ce){Ce.match(/^\d+$/)||Z.push(n(A,B,U,R,Ce,!0))}),Z}function n(A,B,U,R,K,Z){var ue,de,Ce;if(Ce=Object.getOwnPropertyDescriptor(B,K)||{value:B[K]},Ce.get?Ce.set?de=A.stylize("[Getter/Setter]","special"):de=A.stylize("[Getter]","special"):Ce.set&&(de=A.stylize("[Setter]","special")),z(R,K)||(ue="["+K+"]"),de||(A.seen.indexOf(Ce.value)<0?(l(U)?de=h(A,Ce.value,null):de=h(A,Ce.value,U-1),de.indexOf(`
`)>-1&&(Z?de=de.split(`
`).map(function(Re){return" "+Re}).join(`
`).substr(2):de=`
`+de.split(`
`).map(function(Re){return" "+Re}).join(`
`))):de=A.stylize("[Circular]","special")),p(ue)){if(Z&&K.match(/^\d+$/))return de;ue=JSON.stringify(""+K),ue.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ue=ue.substr(1,ue.length-2),ue=A.stylize(ue,"name")):(ue=ue.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ue=A.stylize(ue,"string"))}return ue+": "+de}function s(A,B,U){var R=0,K=A.reduce(function(Z,ue){return R++,ue.indexOf(`
`)>=0&&R++,Z+ue.replace(/\u001b\[\d\d?m/g,"").length+1},0);return K>60?U[0]+(B===""?"":B+`
`)+" "+A.join(`,
`)+" "+U[1]:U[0]+B+" "+A.join(", ")+" "+U[1]}function d(A){return Array.isArray(A)}D.isArray=d;function f(A){return typeof A=="boolean"}D.isBoolean=f;function l(A){return A===null}D.isNull=l;function o(A){return A==null}D.isNullOrUndefined=o;function r(A){return typeof A=="number"}D.isNumber=r;function x(A){return typeof A=="string"}D.isString=x;function b(A){return typeof A=="symbol"}D.isSymbol=b;function p(A){return A===void 0}D.isUndefined=p;function I(A){return O(A)&&F(A)==="[object RegExp]"}D.isRegExp=I;function O(A){return typeof A=="object"&&A!==null}D.isObject=O;function _(A){return O(A)&&F(A)==="[object Date]"}D.isDate=_;function E(A){return O(A)&&(F(A)==="[object Error]"||A instanceof Error)}D.isError=E;function w(A){return typeof A=="function"}D.isFunction=w;function S(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A=="undefined"}D.isPrimitive=S,D.isBuffer=H("./support/isBuffer");function F(A){return Object.prototype.toString.call(A)}function P(A){return A<10?"0"+A.toString(10):A.toString(10)}var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var A=new Date,B=[P(A.getHours()),P(A.getMinutes()),P(A.getSeconds())].join(":");return[A.getDate(),L[A.getMonth()],B].join(" ")}D.log=function(){console.log("%s - %s",G(),D.format.apply(D,arguments))},D.inherits=H("inherits"),D._extend=function(A,B){if(!B||!O(B))return A;for(var U=Object.keys(B),R=U.length;R--;)A[U[R]]=B[U[R]];return A};function z(A,B){return Object.prototype.hasOwnProperty.call(A,B)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(H,J,D){"use strict";(function(){"use strict";D.stripBOM=function(M){return M[0]==="\uFEFF"?M.substring(1):M}}).call(void 0)},{}],245:[function(H,J,D){"use strict";var M=H("babel-runtime/helpers/typeof"),g=m(M),C=H("babel-runtime/core-js/object/keys"),N=m(C);function m(v){return v&&v.__esModule?v:{default:v}}(function(){"use strict";var v,T,y,t,h,i={}.hasOwnProperty;v=H("xmlbuilder"),T=H("./defaults").defaults,t=function(a){return typeof a=="string"&&(a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0)},h=function(a){return"<![CDATA["+y(a)+"]]>"},y=function(a){return a.replace("]]>","]]]]><![CDATA[>")},D.Builder=function(){function c(a){var n,s,d;this.options={},s=T["0.2"];for(n in s){if(!i.call(s,n))continue;d=s[n],this.options[n]=d}for(n in a){if(!i.call(a,n))continue;d=a[n],this.options[n]=d}}return c.prototype.buildObject=function(a){var n,s,d,f,l;return n=this.options.attrkey,s=this.options.charkey,(0,N.default)(a).length===1&&this.options.rootName===T["0.2"].rootName?(l=(0,N.default)(a)[0],a=a[l]):l=this.options.rootName,d=function(o){return function(r,x){var b,p,I,O,_,E;if((typeof x=="undefined"?"undefined":(0,g.default)(x))!=="object")o.options.cdata&&t(x)?r.raw(h(x)):r.txt(x);else if(Array.isArray(x))for(O in x){if(!i.call(x,O))continue;p=x[O];for(_ in p)I=p[_],r=d(r.ele(_),I).up()}else for(_ in x){if(!i.call(x,_))continue;if(p=x[_],_===n){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(b in p)E=p[b],r=r.att(b,E)}else if(_===s)o.options.cdata&&t(p)?r=r.raw(h(p)):r=r.txt(p);else if(Array.isArray(p))for(O in p){if(!i.call(p,O))continue;I=p[O],typeof I=="string"?o.options.cdata&&t(I)?r=r.ele(_).raw(h(I)).up():r=r.ele(_,I).up():r=d(r.ele(_),I).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?r=d(r.ele(_),p).up():typeof p=="string"&&o.options.cdata&&t(p)?r=r.ele(_).raw(h(p)).up():(p==null&&(p=""),r=r.ele(_,p.toString()).up())}return r}}(this),f=v.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),d(f,a).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(H,J,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(H,J,D){"use strict";var M=H("babel-runtime/core-js/promise"),g=t(M),C=H("babel-runtime/core-js/object/get-own-property-names"),N=t(C),m=H("babel-runtime/core-js/object/keys"),v=t(m),T=H("babel-runtime/helpers/typeof"),y=t(T);function t(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,i,c,a,n,s,d,f,l=function(b,p){return function(){return b.apply(p,arguments)}},o=function(b,p){for(var I in p)r.call(p,I)&&(b[I]=p[I]);function O(){this.constructor=b}return O.prototype=p.prototype,b.prototype=new O,b.__super__=p.prototype,b},r={}.hasOwnProperty;d=H("sax"),c=H("events"),h=H("./bom"),s=H("./processors"),f=H("timers").setImmediate,i=H("./defaults").defaults,a=function(b){return(typeof b=="undefined"?"undefined":(0,y.default)(b))==="object"&&b!=null&&(0,v.default)(b).length===0},n=function(b,p,I){var O,_,E;for(O=0,_=b.length;O<_;O++)E=b[O],p=E(p,I);return p},D.Parser=function(x){o(b,x);function b(p){this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var I,O,_;if(!(this instanceof D.Parser))return new D.Parser(p);this.options={},O=i["0.2"];for(I in O){if(!r.call(O,I))continue;_=O[I],this.options[I]=_}for(I in p){if(!r.call(p,I))continue;_=p[I],this.options[I]=_}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return b.prototype.processAsync=function(){var p,I;try{return this.remaining.length<=this.options.chunkSize?(p=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(p),this.saxParser.close()):(p=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(p),f(this.processAsync))}catch(O){if(I=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(I)}},b.prototype.assignOrPush=function(p,I,O){return I in p?(p[I]instanceof Array||(p[I]=[p[I]]),p[I].push(O)):this.options.explicitArray?p[I]=[O]:p[I]=O},b.prototype.reset=function(){var p,I,O,_;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(E){return function(w){if(E.saxParser.resume(),!E.saxParser.errThrown)return E.saxParser.errThrown=!0,E.emit("error",w)}}(this),this.saxParser.onend=function(E){return function(){if(!E.saxParser.ended)return E.saxParser.ended=!0,E.emit("end",E.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,_=[],p=this.options.attrkey,I=this.options.charkey,this.saxParser.onopentag=function(E){return function(w){var S,F,P,L,G;if(P={},P[I]="",!E.options.ignoreAttrs){G=w.attributes;for(S in G){if(!r.call(G,S))continue;!(p in P)&&!E.options.mergeAttrs&&(P[p]={}),F=E.options.attrValueProcessors?n(E.options.attrValueProcessors,w.attributes[S],S):w.attributes[S],L=E.options.attrNameProcessors?n(E.options.attrNameProcessors,S):S,E.options.mergeAttrs?E.assignOrPush(P,L,F):P[p][L]=F}}return P["#name"]=E.options.tagNameProcessors?n(E.options.tagNameProcessors,w.name):w.name,E.options.xmlns&&(P[E.options.xmlnskey]={uri:w.uri,local:w.local}),_.push(P)}}(this),this.saxParser.onclosetag=function(E){return function(){var w,S,F,P,L,G,z,A,B,U;if(G=_.pop(),L=G["#name"],(!E.options.explicitChildren||!E.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(w=G.cdata,delete G.cdata),B=_[_.length-1],G[I].match(/^\s*$/)&&!w?(S=G[I],delete G[I]):(E.options.trim&&(G[I]=G[I].trim()),E.options.normalize&&(G[I]=G[I].replace(/\s{2,}/g," ").trim()),G[I]=E.options.valueProcessors?n(E.options.valueProcessors,G[I],L):G[I],(0,v.default)(G).length===1&&I in G&&!E.EXPLICIT_CHARKEY&&(G=G[I])),a(G)&&(G=E.options.emptyTag!==""?E.options.emptyTag:S),E.options.validator!=null&&(U="/"+function(){var R,K,Z;for(Z=[],R=0,K=_.length;R<K;R++)P=_[R],Z.push(P["#name"]);return Z}().concat(L).join("/"),function(){var R;try{return G=E.options.validator(U,B&&B[L],G)}catch(K){return R=K,E.emit("error",R)}}()),E.options.explicitChildren&&!E.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,y.default)(G))==="object"){if(!E.options.preserveChildrenOrder)P={},E.options.attrkey in G&&(P[E.options.attrkey]=G[E.options.attrkey],delete G[E.options.attrkey]),!E.options.charsAsChildren&&E.options.charkey in G&&(P[E.options.charkey]=G[E.options.charkey],delete G[E.options.charkey]),(0,N.default)(G).length>0&&(P[E.options.childkey]=G),G=P;else if(B){B[E.options.childkey]=B[E.options.childkey]||[],z={};for(F in G){if(!r.call(G,F))continue;z[F]=G[F]}B[E.options.childkey].push(z),delete G["#name"],(0,v.default)(G).length===1&&I in G&&!E.EXPLICIT_CHARKEY&&(G=G[I])}}return _.length>0?E.assignOrPush(B,L,G):(E.options.explicitRoot&&(A=G,G={},G[L]=A),E.resultObject=G,E.saxParser.ended=!0,E.emit("end",E.resultObject))}}(this),O=function(E){return function(w){var S,F;if(F=_[_.length-1],F)return F[I]+=w,E.options.explicitChildren&&E.options.preserveChildrenOrder&&E.options.charsAsChildren&&(E.options.includeWhiteChars||w.replace(/\\n/g,"").trim()!=="")&&(F[E.options.childkey]=F[E.options.childkey]||[],S={"#name":"__text__"},S[I]=w,E.options.normalize&&(S[I]=S[I].replace(/\s{2,}/g," ").trim()),F[E.options.childkey].push(S)),F}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(E){return function(w){var S;if(S=O(w),S)return S.cdata=!0}}(this)},b.prototype.parseString=function(p,I){var O;I!=null&&typeof I=="function"&&(this.on("end",function(_){return this.reset(),I(null,_)}),this.on("error",function(_){return this.reset(),I(_)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=h.stripBOM(p),this.options.async?(this.remaining=p,f(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(_){if(O=_,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},b.prototype.parseStringPromise=function(p){return new g.default(function(I){return function(O,_){return I.parseString(p,function(E,w){return E?_(E):O(w)})}}(this))},b}(c),D.parseString=function(x,b,p){var I,O,_;return p!=null?(typeof p=="function"&&(I=p),(typeof b=="undefined"?"undefined":(0,y.default)(b))==="object"&&(O=b)):(typeof b=="function"&&(I=b),O={}),_=new D.Parser(O),_.parseString(x,I)},D.parseStringPromise=function(x,b){var p,I;return(typeof b=="undefined"?"undefined":(0,y.default)(b))==="object"&&(p=b),I=new D.Parser(p),I.parseStringPromise(x)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(H,J,D){"use strict";(function(){"use strict";var M;M=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(M,"")},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(H,J,D){"use strict";(function(){"use strict";var M,g,C,N,m=function(y,t){for(var h in t)v.call(t,h)&&(y[h]=t[h]);function i(){this.constructor=y}return i.prototype=t.prototype,y.prototype=new i,y.__super__=t.prototype,y},v={}.hasOwnProperty;g=H("./defaults"),M=H("./builder"),C=H("./parser"),N=H("./processors"),D.defaults=g.defaults,D.processors=N,D.ValidationError=function(T){m(y,T);function y(t){this.message=t}return y}(Error),D.Builder=M.Builder,D.Parser=C.Parser,D.parseString=C.parseString,D.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(H,J,D){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(H,J,D){"use strict";(function(){J.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(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/get-prototype-of"),g=T(M),C=H("babel-runtime/helpers/typeof"),N=T(C),m=H("babel-runtime/core-js/object/assign"),v=T(m);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,t,h,i,c,a,n,s=[].slice,d={}.hasOwnProperty;y=function(){var l,o,r,x,b,p;if(p=arguments[0],b=2<=arguments.length?s.call(arguments,1):[],c(v.default))v.default.apply(null,arguments);else for(l=0,r=b.length;l<r;l++)if(x=b[l],x!=null)for(o in x){if(!d.call(x,o))continue;p[o]=x[o]}return p},c=function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},a=function(l){var o;return!!l&&((o=typeof l=="undefined"?"undefined":(0,N.default)(l))==="function"||o==="object")},h=function(l){return c(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},i=function(l){var o;if(h(l))return!l.length;for(o in l){if(!d.call(l,o))continue;return!1}return!0},n=function(l){var o,r;return a(l)&&(r=(0,g.default)(l))&&(o=r.constructor)&&typeof o=="function"&&o instanceof o&&Function.prototype.toString.call(o)===Function.prototype.toString.call(Object)},t=function(l){return c(l.valueOf)?l.valueOf():l},J.exports.assign=y,J.exports.isFunction=c,J.exports.isObject=a,J.exports.isArray=h,J.exports.isEmpty=i,J.exports.isPlainObject=n,J.exports.getValue=t}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(H,J,D){"use strict";(function(){J.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v;N=H("./NodeType"),v=H("./XMLNode"),J.exports=m=function(){function T(y,t,h){if(this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),t==null)throw new Error("Missing attribute name. "+this.debugInfo(t));this.name=this.stringify.name(t),this.value=this.stringify.attValue(h),this.type=N.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(T.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(T.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(T.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"specified",{get:function(){return!0}}),T.prototype.clone=function(){return(0,g.default)(this)},T.prototype.toString=function(y){return this.options.writer.attribute(this,this.options.writer.filterOptions(y))},T.prototype.debugInfo=function(y){return y=y||this.name,y==null?"parent: <"+this.parent.name+">":"attribute: {"+y+"}, parent: <"+this.parent.name+">"},T.prototype.isEqualNode=function(y){return y.namespaceURI!==this.namespaceURI||(y.prefix!==this.prefix||y.localName!==this.localName)?!1:!(y.value!==this.value)},T}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T=function(h,i){for(var c in i)y.call(i,c)&&(h[c]=i[c]);function a(){this.constructor=h}return a.prototype=i.prototype,h.prototype=new a,h.__super__=i.prototype,h},y={}.hasOwnProperty;N=H("./NodeType"),v=H("./XMLCharacterData"),J.exports=m=function(t){T(h,t);function h(i,c){if(h.__super__.constructor.call(this,i),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=N.CData,this.value=this.stringify.cdata(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(i){return this.options.writer.cdata(this,this.options.writer.filterOptions(i))},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v=function(t,h){for(var i in h)T.call(h,i)&&(t[i]=h[i]);function c(){this.constructor=t}return c.prototype=h.prototype,t.prototype=new c,t.__super__=h.prototype,t},T={}.hasOwnProperty;m=H("./XMLNode"),J.exports=N=function(y){v(t,y);function t(h){t.__super__.constructor.call(this,h),this.value=""}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),t.prototype.clone=function(){return(0,g.default)(this)},t.prototype.substringData=function(h,i){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,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(h,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(h,i,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}(m)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T=function(h,i){for(var c in i)y.call(i,c)&&(h[c]=i[c]);function a(){this.constructor=h}return a.prototype=i.prototype,h.prototype=new a,h.__super__=i.prototype,h},y={}.hasOwnProperty;N=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=v=function(t){T(h,t);function h(i,c){if(h.__super__.constructor.call(this,i),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=N.Comment,this.value=this.stringify.comment(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(i){return this.options.writer.comment(this,this.options.writer.filterOptions(i))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/keys"),g=m(M),C=H("babel-runtime/core-js/object/create"),N=m(C);function m(v){return v&&v.__esModule?v:{default:v}}(function(){var v,T,y;T=H("./XMLDOMErrorHandler"),y=H("./XMLDOMStringList"),J.exports=v=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,N.default)(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new y((0,g.default)(this.defaultParams))}}),t.prototype.getParameter=function(h){return this.params.hasOwnProperty(h)?this.params[h]:null},t.prototype.canSetParameter=function(h,i){return!0},t.prototype.setParameter=function(h,i){return i!=null?this.params[h]=i: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(H,J,D){"use strict";(function(){var M;J.exports=M=function(){function g(){}return g.prototype.handleError=function(C){throw new Error(C)},g}()}).call(void 0)},{}],260:[function(H,J,D){"use strict";(function(){var M;J.exports=M=function(){function g(){}return g.prototype.hasFeature=function(C,N){return!0},g.prototype.createDocumentType=function(C,N,m){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(C,N,m){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(C,N){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(H,J,D){"use strict";(function(){var M;J.exports=M=function(){function g(C){this.arr=C||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(C){return this.arr[C]||null},g.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},g}()}).call(void 0)},{}],262:[function(H,J,D){"use strict";(function(){var M,g,C,N=function(T,y){for(var t in y)m.call(y,t)&&(T[t]=y[t]);function h(){this.constructor=T}return h.prototype=y.prototype,T.prototype=new h,T.__super__=y.prototype,T},m={}.hasOwnProperty;C=H("./XMLNode"),M=H("./NodeType"),J.exports=g=function(v){N(T,v);function T(y,t,h,i,c,a){if(T.__super__.constructor.call(this,y),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(!i)throw new Error("Missing DTD attribute type. "+this.debugInfo(t));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(t));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(t));if(a&&!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=M.AttributeDeclaration,this.attributeName=this.stringify.name(h),this.attributeType=this.stringify.dtdAttType(i),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=c}return T.prototype.toString=function(y){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(y))},T}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(H,J,D){"use strict";(function(){var M,g,C,N=function(T,y){for(var t in y)m.call(y,t)&&(T[t]=y[t]);function h(){this.constructor=T}return h.prototype=y.prototype,T.prototype=new h,T.__super__=y.prototype,T},m={}.hasOwnProperty;C=H("./XMLNode"),M=H("./NodeType"),J.exports=g=function(v){N(T,v);function T(y,t,h){if(T.__super__.constructor.call(this,y),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=M.ElementDeclaration,this.value=this.stringify.dtdElementValue(h)}return T.prototype.toString=function(y){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(y))},T}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(H,J,D){"use strict";(function(){var M,g,C,N,m=function(y,t){for(var h in t)v.call(t,h)&&(y[h]=t[h]);function i(){this.constructor=y}return i.prototype=t.prototype,y.prototype=new i,y.__super__=t.prototype,y},v={}.hasOwnProperty;N=H("./Utility").isObject,C=H("./XMLNode"),M=H("./NodeType"),J.exports=g=function(T){m(y,T);function y(t,h,i,c){if(y.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD entity name. "+this.debugInfo(i));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(i));if(this.pe=!!h,this.name=this.stringify.name(i),this.type=M.EntityDeclaration,!N(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(i));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(i));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(i))}}return Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(y.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(y.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(y.prototype,"xmlVersion",{get:function(){return null}}),y.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},y}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(H,J,D){"use strict";(function(){var M,g,C,N=function(T,y){for(var t in y)m.call(y,t)&&(T[t]=y[t]);function h(){this.constructor=T}return h.prototype=y.prototype,T.prototype=new h,T.__super__=y.prototype,T},m={}.hasOwnProperty;C=H("./XMLNode"),M=H("./NodeType"),J.exports=g=function(v){N(T,v);function T(y,t,h){if(T.__super__.constructor.call(this,y),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=M.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(y){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(y))},T}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(H,J,D){"use strict";(function(){var M,g,C,N,m=function(y,t){for(var h in t)v.call(t,h)&&(y[h]=t[h]);function i(){this.constructor=y}return i.prototype=t.prototype,y.prototype=new i,y.__super__=t.prototype,y},v={}.hasOwnProperty;N=H("./Utility").isObject,C=H("./XMLNode"),M=H("./NodeType"),J.exports=g=function(T){m(y,T);function y(t,h,i,c){var a;y.__super__.constructor.call(this,t),N(h)&&(a=h,h=a.version,i=a.encoding,c=a.standalone),h||(h="1.0"),this.type=M.Declaration,this.version=this.stringify.xmlVersion(h),i!=null&&(this.encoding=this.stringify.xmlEncoding(i)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return y.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},y}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(H,J,D){"use strict";(function(){var M,g,C,N,m,v,T,y,t,h=function(a,n){for(var s in n)i.call(n,s)&&(a[s]=n[s]);function d(){this.constructor=a}return d.prototype=n.prototype,a.prototype=new d,a.__super__=n.prototype,a},i={}.hasOwnProperty;t=H("./Utility").isObject,y=H("./XMLNode"),M=H("./NodeType"),g=H("./XMLDTDAttList"),N=H("./XMLDTDEntity"),C=H("./XMLDTDElement"),m=H("./XMLDTDNotation"),T=H("./XMLNamedNodeMap"),J.exports=v=function(c){h(a,c);function a(n,s,d){var f,l,o,r,x,b;if(a.__super__.constructor.call(this,n),this.type=M.DocType,n.children){for(r=n.children,l=0,o=r.length;l<o;l++)if(f=r[l],f.type===M.Element){this.name=f.name;break}}this.documentObject=n,t(s)&&(x=s,s=x.pubID,d=x.sysID),d==null&&(b=[s,d],d=b[0],s=b[1]),s!=null&&(this.pubID=this.stringify.dtdPubID(s)),d!=null&&(this.sysID=this.stringify.dtdSysID(d))}return Object.defineProperty(a.prototype,"entities",{get:function(){var s,d,f,l,o;for(l={},o=this.children,d=0,f=o.length;d<f;d++)s=o[d],s.type===M.EntityDeclaration&&!s.pe&&(l[s.name]=s);return new T(l)}}),Object.defineProperty(a.prototype,"notations",{get:function(){var s,d,f,l,o;for(l={},o=this.children,d=0,f=o.length;d<f;d++)s=o[d],s.type===M.NotationDeclaration&&(l[s.name]=s);return new T(l)}}),Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),a.prototype.element=function(n,s){var d;return d=new C(this,n,s),this.children.push(d),this},a.prototype.attList=function(n,s,d,f,l){var o;return o=new g(this,n,s,d,f,l),this.children.push(o),this},a.prototype.entity=function(n,s){var d;return d=new N(this,!1,n,s),this.children.push(d),this},a.prototype.pEntity=function(n,s){var d;return d=new N(this,!0,n,s),this.children.push(d),this},a.prototype.notation=function(n,s){var d;return d=new m(this,n,s),this.children.push(d),this},a.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},a.prototype.ele=function(n,s){return this.element(n,s)},a.prototype.att=function(n,s,d,f,l){return this.attList(n,s,d,f,l)},a.prototype.ent=function(n,s){return this.entity(n,s)},a.prototype.pent=function(n,s){return this.pEntity(n,s)},a.prototype.not=function(n,s){return this.notation(n,s)},a.prototype.up=function(){return this.root()||this.documentObject},a.prototype.isEqualNode=function(n){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?n.name!==this.name||n.publicId!==this.publicId?!1:!(n.systemId!==this.systemId):!1},a}(y)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(H,J,D){"use strict";(function(){var M,g,C,N,m,v,T,y,t=function(c,a){for(var n in a)h.call(a,n)&&(c[n]=a[n]);function s(){this.constructor=c}return s.prototype=a.prototype,c.prototype=new s,c.__super__=a.prototype,c},h={}.hasOwnProperty;y=H("./Utility").isPlainObject,C=H("./XMLDOMImplementation"),g=H("./XMLDOMConfiguration"),m=H("./XMLNode"),M=H("./NodeType"),T=H("./XMLStringifier"),v=H("./XMLStringWriter"),J.exports=N=function(i){t(c,i);function c(a){c.__super__.constructor.call(this,null),this.name="#document",this.type=M.Document,this.documentURI=null,this.domConfig=new g,a||(a={}),a.writer||(a.writer=new v),this.options=a,this.stringify=new T(a)}return Object.defineProperty(c.prototype,"implementation",{value:new C}),Object.defineProperty(c.prototype,"doctype",{get:function(){var n,s,d,f;for(f=this.children,s=0,d=f.length;s<d;s++)if(n=f[s],n.type===M.DocType)return n;return null}}),Object.defineProperty(c.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===M.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===M.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===M.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(c.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(c.prototype,"origin",{get:function(){return null}}),Object.defineProperty(c.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(c.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(c.prototype,"contentType",{get:function(){return null}}),c.prototype.end=function(a){var n;return n={},a?y(a)&&(n=a,a=this.options.writer):a=this.options.writer,a.document(this,a.filterOptions(n))},c.prototype.toString=function(a){return this.options.writer.document(this,this.options.writer.filterOptions(a))},c.prototype.createElement=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTextNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.renameNode=function(a,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createNodeIterator=function(a,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(a,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(m)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(H,J,D){"use strict";(function(){var M,g,C,N,m,v,T,y,t,h,i,c,a,n,s,d,f,l,o,r,x,b,p,I,O={}.hasOwnProperty;I=H("./Utility"),b=I.isObject,x=I.isFunction,p=I.isPlainObject,r=I.getValue,M=H("./NodeType"),c=H("./XMLDocument"),n=H("./XMLElement"),N=H("./XMLCData"),m=H("./XMLComment"),d=H("./XMLRaw"),o=H("./XMLText"),s=H("./XMLProcessingInstruction"),h=H("./XMLDeclaration"),i=H("./XMLDocType"),v=H("./XMLDTDAttList"),y=H("./XMLDTDEntity"),T=H("./XMLDTDElement"),t=H("./XMLDTDNotation"),C=H("./XMLAttribute"),l=H("./XMLStringifier"),f=H("./XMLStringWriter"),g=H("./WriterState"),J.exports=a=function(){function _(E,w,S){var F;this.name="?xml",this.type=M.Document,E||(E={}),F={},E.writer?p(E.writer)&&(F=E.writer,E.writer=new f):E.writer=new f,this.options=E,this.writer=E.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new l(E),this.onDataCallback=w||function(){},this.onEndCallback=S||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return _.prototype.createChildNode=function(E){var w,S,F,P,L,G,z,A;switch(E.type){case M.CData:this.cdata(E.value);break;case M.Comment:this.comment(E.value);break;case M.Element:F={},z=E.attribs;for(S in z){if(!O.call(z,S))continue;w=z[S],F[S]=w.value}this.node(E.name,F);break;case M.Dummy:this.dummy();break;case M.Raw:this.raw(E.value);break;case M.Text:this.text(E.value);break;case M.ProcessingInstruction:this.instruction(E.target,E.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+E.constructor.name)}for(A=E.children,L=0,G=A.length;L<G;L++)P=A[L],this.createChildNode(P),P.type===M.Element&&this.up();return this},_.prototype.dummy=function(){return this},_.prototype.node=function(E,w,S){var F;if(E==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(E));return this.openCurrent(),E=r(E),w==null&&(w={}),w=r(w),b(w)||(F=[w,S],S=F[0],w=F[1]),this.currentNode=new n(this,E,w),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,S!=null&&this.text(S),this},_.prototype.element=function(E,w,S){var F,P,L,G,z,A;if(this.currentNode&&this.currentNode.type===M.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(E)||b(E)||x(E))for(G=this.options.noValidation,this.options.noValidation=!0,A=new c(this.options).element("TEMP_ROOT"),A.element(E),this.options.noValidation=G,z=A.children,P=0,L=z.length;P<L;P++)F=z[P],this.createChildNode(F),F.type===M.Element&&this.up();else this.node(E,w,S);return this},_.prototype.attribute=function(E,w){var S,F;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(E));if(E!=null&&(E=r(E)),b(E))for(S in E){if(!O.call(E,S))continue;F=E[S],this.attribute(S,F)}else x(w)&&(w=w.apply()),this.options.keepNullAttributes&&w==null?this.currentNode.attribs[E]=new C(this,E,""):w!=null&&(this.currentNode.attribs[E]=new C(this,E,w));return this},_.prototype.text=function(E){var w;return this.openCurrent(),w=new o(this,E),this.onData(this.writer.text(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.cdata=function(E){var w;return this.openCurrent(),w=new N(this,E),this.onData(this.writer.cdata(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.comment=function(E){var w;return this.openCurrent(),w=new m(this,E),this.onData(this.writer.comment(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.raw=function(E){var w;return this.openCurrent(),w=new d(this,E),this.onData(this.writer.raw(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.instruction=function(E,w){var S,F,P,L,G;if(this.openCurrent(),E!=null&&(E=r(E)),w!=null&&(w=r(w)),Array.isArray(E))for(S=0,L=E.length;S<L;S++)F=E[S],this.instruction(F);else if(b(E))for(F in E){if(!O.call(E,F))continue;P=E[F],this.instruction(F,P)}else x(w)&&(w=w.apply()),G=new s(this,E,w),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},_.prototype.declaration=function(E,w,S){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new h(this,E,w,S),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.doctype=function(E,w,S){if(this.openCurrent(),E==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new i(this,w,S),this.currentNode.rootNodeName=E,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},_.prototype.dtdElement=function(E,w){var S;return this.openCurrent(),S=new T(this,E,w),this.onData(this.writer.dtdElement(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.attList=function(E,w,S,F,P){var L;return this.openCurrent(),L=new v(this,E,w,S,F,P),this.onData(this.writer.dtdAttList(L,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.entity=function(E,w){var S;return this.openCurrent(),S=new y(this,!1,E,w),this.onData(this.writer.dtdEntity(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.pEntity=function(E,w){var S;return this.openCurrent(),S=new y(this,!0,E,w),this.onData(this.writer.dtdEntity(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.notation=function(E,w){var S;return this.openCurrent(),S=new t(this,E,w),this.onData(this.writer.dtdNotation(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},_.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},_.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},_.prototype.openNode=function(E){var w,S,F,P;if(!E.isOpen){if(!this.root&&this.currentLevel===0&&E.type===M.Element&&(this.root=E),S="",E.type===M.Element){this.writerOptions.state=g.OpenTag,S=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<"+E.name,P=E.attribs;for(F in P){if(!O.call(P,F))continue;w=P[F],S+=this.writer.attribute(w,this.writerOptions,this.currentLevel)}S+=(E.children?">":"/>")+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,S=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+E.rootNodeName,E.pubID&&E.sysID?S+=' PUBLIC "'+E.pubID+'" "'+E.sysID+'"':E.sysID&&(S+=' SYSTEM "'+E.sysID+'"'),E.children?(S+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,S+=">"),S+=this.writer.endline(E,this.writerOptions,this.currentLevel);return this.onData(S,this.currentLevel),E.isOpen=!0}},_.prototype.closeNode=function(E){var w;if(!E.isClosed)return w="",this.writerOptions.state=g.CloseTag,E.type===M.Element?w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"</"+E.name+">"+this.writer.endline(E,this.writerOptions,this.currentLevel):w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(w,this.currentLevel),E.isClosed=!0},_.prototype.onData=function(E,w){return this.documentStarted=!0,this.onDataCallback(E,w+1)},_.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},_.prototype.debugInfo=function(E){return E==null?"":"node: <"+E+">"},_.prototype.ele=function(){return this.element.apply(this,arguments)},_.prototype.nod=function(E,w,S){return this.node(E,w,S)},_.prototype.txt=function(E){return this.text(E)},_.prototype.dat=function(E){return this.cdata(E)},_.prototype.com=function(E){return this.comment(E)},_.prototype.ins=function(E,w){return this.instruction(E,w)},_.prototype.dec=function(E,w,S){return this.declaration(E,w,S)},_.prototype.dtd=function(E,w,S){return this.doctype(E,w,S)},_.prototype.e=function(E,w,S){return this.element(E,w,S)},_.prototype.n=function(E,w,S){return this.node(E,w,S)},_.prototype.t=function(E){return this.text(E)},_.prototype.d=function(E){return this.cdata(E)},_.prototype.c=function(E){return this.comment(E)},_.prototype.r=function(E){return this.raw(E)},_.prototype.i=function(E,w){return this.instruction(E,w)},_.prototype.att=function(){return this.currentNode&&this.currentNode.type===M.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},_.prototype.a=function(){return this.currentNode&&this.currentNode.type===M.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},_.prototype.ent=function(E,w){return this.entity(E,w)},_.prototype.pent=function(E,w){return this.pEntity(E,w)},_.prototype.not=function(E,w){return this.notation(E,w)},_}()}).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(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T=function(h,i){for(var c in i)y.call(i,c)&&(h[c]=i[c]);function a(){this.constructor=h}return a.prototype=i.prototype,h.prototype=new a,h.__super__=i.prototype,h},y={}.hasOwnProperty;v=H("./XMLNode"),N=H("./NodeType"),J.exports=m=function(t){T(h,t);function h(i){h.__super__.constructor.call(this,i),this.type=N.Dummy}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(i){return""},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T,y,t,h,i,c,a=function(d,f){for(var l in f)n.call(f,l)&&(d[l]=f[l]);function o(){this.constructor=d}return o.prototype=f.prototype,d.prototype=new o,d.__super__=f.prototype,d},n={}.hasOwnProperty;c=H("./Utility"),i=c.isObject,h=c.isFunction,t=c.getValue,y=H("./XMLNode"),N=H("./NodeType"),m=H("./XMLAttribute"),T=H("./XMLNamedNodeMap"),J.exports=v=function(s){a(d,s);function d(f,l,o){var r,x,b,p;if(d.__super__.constructor.call(this,f),l==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(l),this.type=N.Element,this.attribs={},this.schemaTypeInfo=null,o!=null&&this.attribute(o),f.type===N.Document&&(this.isRoot=!0,this.documentObject=f,f.rootObject=this,f.children)){for(p=f.children,x=0,b=p.length;x<b;x++)if(r=p[x],r.type===N.DocType){r.name=this.name;break}}}return Object.defineProperty(d.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(d.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(d.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new T(this.attribs)),this.attributeMap}}),d.prototype.clone=function(){var f,l,o,r;o=(0,g.default)(this),o.isRoot&&(o.documentObject=null),o.attribs={},r=this.attribs;for(l in r){if(!n.call(r,l))continue;f=r[l],o.attribs[l]=f.clone()}return o.children=[],this.children.forEach(function(x){var b;return b=x.clone(),b.parent=o,o.children.push(b)}),o},d.prototype.attribute=function(f,l){var o,r;if(f!=null&&(f=t(f)),i(f))for(o in f){if(!n.call(f,o))continue;r=f[o],this.attribute(o,r)}else h(l)&&(l=l.apply()),this.options.keepNullAttributes&&l==null?this.attribs[f]=new m(this,f,""):l!=null&&(this.attribs[f]=new m(this,f,l));return this},d.prototype.removeAttribute=function(f){var l,o,r;if(f==null)throw new Error("Missing attribute name. "+this.debugInfo());if(f=t(f),Array.isArray(f))for(o=0,r=f.length;o<r;o++)l=f[o],delete this.attribs[l];else delete this.attribs[f];return this},d.prototype.toString=function(f){return this.options.writer.element(this,this.options.writer.filterOptions(f))},d.prototype.att=function(f,l){return this.attribute(f,l)},d.prototype.a=function(f,l){return this.attribute(f,l)},d.prototype.getAttribute=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f].value:null},d.prototype.setAttribute=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getAttributeNode=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f]:null},d.prototype.setAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.removeAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setAttributeNS=function(f,l,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.removeAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getAttributeNodeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setAttributeNodeNS=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagNameNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.hasAttribute=function(f){return this.attribs.hasOwnProperty(f)},d.prototype.hasAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setIdAttribute=function(f,l){return this.attribs.hasOwnProperty(f)?this.attribs[f].isId:l},d.prototype.setIdAttributeNS=function(f,l,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setIdAttributeNode=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagNameNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByClassName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.isEqualNode=function(f){var l,o,r;if(!d.__super__.isEqualNode.apply(this,arguments).isEqualNode(f))return!1;if(f.namespaceURI!==this.namespaceURI)return!1;if(f.prefix!==this.prefix)return!1;if(f.localName!==this.localName)return!1;if(f.attribs.length!==this.attribs.length)return!1;for(l=o=0,r=this.attribs.length-1;0<=r?o<=r:o>=r;l=0<=r?++o:--o)if(!this.attribs[l].isEqualNode(f.attribs[l]))return!1;return!0},d}(y)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/keys"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N;J.exports=N=function(){function m(v){this.nodes=v}return Object.defineProperty(m.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.getNamedItem=function(v){return this.nodes[v]},m.prototype.setNamedItem=function(v){var T;return T=this.nodes[v.nodeName],this.nodes[v.nodeName]=v,T||null},m.prototype.removeNamedItem=function(v){var T;return T=this.nodes[v],delete this.nodes[v],T||null},m.prototype.item=function(v){return this.nodes[(0,g.default)(this.nodes)[v]]||null},m.prototype.getNamedItemNS=function(v,T){throw new Error("This DOM method is not implemented.")},m.prototype.setNamedItemNS=function(v){throw new Error("This DOM method is not implemented.")},m.prototype.removeNamedItemNS=function(v,T){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(H,J,D){"use strict";(function(){var M,g,C,N,m,v,T,y,t,h,i,c,a,n,s,d,f,l,o,r={}.hasOwnProperty;o=H("./Utility"),l=o.isObject,f=o.isFunction,d=o.isEmpty,s=o.getValue,y=null,C=null,N=null,m=null,v=null,a=null,n=null,c=null,T=null,g=null,i=null,t=null,M=null,J.exports=h=function(){function x(b){this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,y||(y=H("./XMLElement"),C=H("./XMLCData"),N=H("./XMLComment"),m=H("./XMLDeclaration"),v=H("./XMLDocType"),a=H("./XMLRaw"),n=H("./XMLText"),c=H("./XMLProcessingInstruction"),T=H("./XMLDummy"),g=H("./NodeType"),i=H("./XMLNodeList"),t=H("./XMLNamedNodeMap"),M=H("./DocumentPosition"))}return Object.defineProperty(x.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(x.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(x.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(x.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(x.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new i(this.children)),this.childNodeList}}),Object.defineProperty(x.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(x.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(x.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(x.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(x.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(x.prototype,"textContent",{get:function(){var p,I,O,_,E;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(E="",_=this.children,I=0,O=_.length;I<O;I++)p=_[I],p.textContent&&(E+=p.textContent);return E}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),x.prototype.setParent=function(b){var p,I,O,_,E;for(this.parent=b,b&&(this.options=b.options,this.stringify=b.stringify),_=this.children,E=[],I=0,O=_.length;I<O;I++)p=_[I],E.push(p.setParent(this));return E},x.prototype.element=function(b,p,I){var O,_,E,w,S,F,P,L,G,z,A;if(F=null,p===null&&I==null&&(G=[{},null],p=G[0],I=G[1]),p==null&&(p={}),p=s(p),l(p)||(z=[p,I],I=z[0],p=z[1]),b!=null&&(b=s(b)),Array.isArray(b))for(E=0,P=b.length;E<P;E++)_=b[E],F=this.element(_);else if(f(b))F=this.element(b.apply());else if(l(b))for(S in b){if(!r.call(b,S))continue;if(A=b[S],f(A)&&(A=A.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&S.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(S.substr(this.stringify.convertAttKey.length),A);else if(!this.options.separateArrayItems&&Array.isArray(A)&&d(A))F=this.dummy();else if(l(A)&&d(A))F=this.element(S);else if(!this.options.keepNullNodes&&A==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(A))for(w=0,L=A.length;w<L;w++)_=A[w],O={},O[S]=_,F=this.element(O);else l(A)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&S.indexOf(this.stringify.convertTextKey)===0?F=this.element(A):(F=this.element(S),F.element(A)):F=this.element(S,A)}else!this.options.keepNullNodes&&I===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&b.indexOf(this.stringify.convertTextKey)===0?F=this.text(I):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&b.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(I):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&b.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(I):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&b.indexOf(this.stringify.convertRawKey)===0?F=this.raw(I):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&b.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(b.substr(this.stringify.convertPIKey.length),I):F=this.node(b,p,I);if(F==null)throw new Error("Could not create any elements with: "+b+". "+this.debugInfo());return F},x.prototype.insertBefore=function(b,p,I){var O,_,E,w,S;if(b!=null?b.type:void 0)return E=b,w=p,E.setParent(this),w?(_=children.indexOf(w),S=children.splice(_),children.push(E),Array.prototype.push.apply(children,S)):children.push(E),E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(b));return _=this.parent.children.indexOf(this),S=this.parent.children.splice(_),O=this.parent.element(b,p,I),Array.prototype.push.apply(this.parent.children,S),O},x.prototype.insertAfter=function(b,p,I){var O,_,E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(b));return _=this.parent.children.indexOf(this),E=this.parent.children.splice(_+1),O=this.parent.element(b,p,I),Array.prototype.push.apply(this.parent.children,E),O},x.prototype.remove=function(){var b,p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return b=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[b,b-b+1].concat(p=[])),this.parent},x.prototype.node=function(b,p,I){var O,_;return b!=null&&(b=s(b)),p||(p={}),p=s(p),l(p)||(_=[p,I],I=_[0],p=_[1]),O=new y(this,b,p),I!=null&&O.text(I),this.children.push(O),O},x.prototype.text=function(b){var p;return l(b)&&this.element(b),p=new n(this,b),this.children.push(p),this},x.prototype.cdata=function(b){var p;return p=new C(this,b),this.children.push(p),this},x.prototype.comment=function(b){var p;return p=new N(this,b),this.children.push(p),this},x.prototype.commentBefore=function(b){var p,I,O;return I=this.parent.children.indexOf(this),O=this.parent.children.splice(I),p=this.parent.comment(b),Array.prototype.push.apply(this.parent.children,O),this},x.prototype.commentAfter=function(b){var p,I,O;return I=this.parent.children.indexOf(this),O=this.parent.children.splice(I+1),p=this.parent.comment(b),Array.prototype.push.apply(this.parent.children,O),this},x.prototype.raw=function(b){var p;return p=new a(this,b),this.children.push(p),this},x.prototype.dummy=function(){var b;return b=new T(this),b},x.prototype.instruction=function(b,p){var I,O,_,E,w;if(b!=null&&(b=s(b)),p!=null&&(p=s(p)),Array.isArray(b))for(E=0,w=b.length;E<w;E++)I=b[E],this.instruction(I);else if(l(b))for(I in b){if(!r.call(b,I))continue;O=b[I],this.instruction(I,O)}else f(p)&&(p=p.apply()),_=new c(this,b,p),this.children.push(_);return this},x.prototype.instructionBefore=function(b,p){var I,O,_;return O=this.parent.children.indexOf(this),_=this.parent.children.splice(O),I=this.parent.instruction(b,p),Array.prototype.push.apply(this.parent.children,_),this},x.prototype.instructionAfter=function(b,p){var I,O,_;return O=this.parent.children.indexOf(this),_=this.parent.children.splice(O+1),I=this.parent.instruction(b,p),Array.prototype.push.apply(this.parent.children,_),this},x.prototype.declaration=function(b,p,I){var O,_;return O=this.document(),_=new m(O,b,p,I),O.children.length===0?O.children.unshift(_):O.children[0].type===g.Declaration?O.children[0]=_:O.children.unshift(_),O.root()||O},x.prototype.dtd=function(b,p){var I,O,_,E,w,S,F,P,L,G;for(O=this.document(),_=new v(O,b,p),L=O.children,E=w=0,F=L.length;w<F;E=++w)if(I=L[E],I.type===g.DocType)return O.children[E]=_,_;for(G=O.children,E=S=0,P=G.length;S<P;E=++S)if(I=G[E],I.isRoot)return O.children.splice(E,0,_),_;return O.children.push(_),_},x.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},x.prototype.root=function(){var b;for(b=this;b;){if(b.type===g.Document)return b.rootObject;if(b.isRoot)return b;b=b.parent}},x.prototype.document=function(){var b;for(b=this;b;){if(b.type===g.Document)return b;b=b.parent}},x.prototype.end=function(b){return this.document().end(b)},x.prototype.prev=function(){var b;if(b=this.parent.children.indexOf(this),b<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[b-1]},x.prototype.next=function(){var b;if(b=this.parent.children.indexOf(this),b===-1||b===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[b+1]},x.prototype.importDocument=function(b){var p;return p=b.root().clone(),p.parent=this,p.isRoot=!1,this.children.push(p),this},x.prototype.debugInfo=function(b){var p,I;return b=b||this.name,b==null&&!((p=this.parent)!=null?p.name:void 0)?"":b==null?"parent: <"+this.parent.name+">":((I=this.parent)!=null?I.name:void 0)?"node: <"+b+">, parent: <"+this.parent.name+">":"node: <"+b+">"},x.prototype.ele=function(b,p,I){return this.element(b,p,I)},x.prototype.nod=function(b,p,I){return this.node(b,p,I)},x.prototype.txt=function(b){return this.text(b)},x.prototype.dat=function(b){return this.cdata(b)},x.prototype.com=function(b){return this.comment(b)},x.prototype.ins=function(b,p){return this.instruction(b,p)},x.prototype.doc=function(){return this.document()},x.prototype.dec=function(b,p,I){return this.declaration(b,p,I)},x.prototype.e=function(b,p,I){return this.element(b,p,I)},x.prototype.n=function(b,p,I){return this.node(b,p,I)},x.prototype.t=function(b){return this.text(b)},x.prototype.d=function(b){return this.cdata(b)},x.prototype.c=function(b){return this.comment(b)},x.prototype.r=function(b){return this.raw(b)},x.prototype.i=function(b,p){return this.instruction(b,p)},x.prototype.u=function(){return this.up()},x.prototype.importXMLBuilder=function(b){return this.importDocument(b)},x.prototype.replaceChild=function(b,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.removeChild=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.appendChild=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.hasChildNodes=function(){return this.children.length!==0},x.prototype.cloneNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isSupported=function(b,p){return!0},x.prototype.hasAttributes=function(){return this.attribs.length!==0},x.prototype.compareDocumentPosition=function(b){var p,I;return p=this,p===b?0:this.document()!==b.document()?(I=M.Disconnected|M.ImplementationSpecific,Math.random()<.5?I|=M.Preceding:I|=M.Following,I):p.isAncestor(b)?M.Contains|M.Preceding:p.isDescendant(b)?M.Contains|M.Following:p.isPreceding(b)?M.Preceding:M.Following},x.prototype.isSameNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.lookupPrefix=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isDefaultNamespace=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.lookupNamespaceURI=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isEqualNode=function(b){var p,I,O;if(b.nodeType!==this.nodeType)return!1;if(b.children.length!==this.children.length)return!1;for(p=I=0,O=this.children.length-1;0<=O?I<=O:I>=O;p=0<=O?++I:--I)if(!this.children[p].isEqualNode(b.children[p]))return!1;return!0},x.prototype.getFeature=function(b,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.setUserData=function(b,p,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getUserData=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.contains=function(b){return b?b===this||this.isDescendant(b):!1},x.prototype.isDescendant=function(b){var p,I,O,_,E;for(E=this.children,O=0,_=E.length;O<_;O++){if(p=E[O],b===p)return!0;if(I=p.isDescendant(b),I)return!0}return!1},x.prototype.isAncestor=function(b){return b.isDescendant(this)},x.prototype.isPreceding=function(b){var p,I;return p=this.treePosition(b),I=this.treePosition(this),p===-1||I===-1?!1:p<I},x.prototype.isFollowing=function(b){var p,I;return p=this.treePosition(b),I=this.treePosition(this),p===-1||I===-1?!1:p>I},x.prototype.treePosition=function(b){var p,I;return I=0,p=!1,this.foreachTreeNode(this.document(),function(O){if(I++,!p&&O===b)return p=!0}),p?I:-1},x.prototype.foreachTreeNode=function(b,p){var I,O,_,E,w;for(b||(b=this.document()),E=b.children,O=0,_=E.length;O<_;O++){if(I=E[O],w=p(I))return w;if(w=this.foreachTreeNode(I,p),w)return w}},x}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(H,J,D){"use strict";(function(){var M;J.exports=M=function(){function g(C){this.nodes=C}return Object.defineProperty(g.prototype,"length",{get:function(){return this.nodes.length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.item=function(C){return this.nodes[C]||null},g}()}).call(void 0)},{}],275:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T=function(h,i){for(var c in i)y.call(i,c)&&(h[c]=i[c]);function a(){this.constructor=h}return a.prototype=i.prototype,h.prototype=new a,h.__super__=i.prototype,h},y={}.hasOwnProperty;N=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=v=function(t){T(h,t);function h(i,c,a){if(h.__super__.constructor.call(this,i),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=N.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,a&&(this.value=this.stringify.insValue(a))}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(i){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(i))},h.prototype.isEqualNode=function(i){return h.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.target!==this.target):!1},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T=function(h,i){for(var c in i)y.call(i,c)&&(h[c]=i[c]);function a(){this.constructor=h}return a.prototype=i.prototype,h.prototype=new a,h.__super__=i.prototype,h},y={}.hasOwnProperty;N=H("./NodeType"),m=H("./XMLNode"),J.exports=v=function(t){T(h,t);function h(i,c){if(h.__super__.constructor.call(this,i),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=N.Raw,this.value=this.stringify.raw(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(i){return this.options.writer.raw(this,this.options.writer.filterOptions(i))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(H,J,D){"use strict";(function(){var M,g,C,N,m=function(y,t){for(var h in t)v.call(t,h)&&(y[h]=t[h]);function i(){this.constructor=y}return i.prototype=t.prototype,y.prototype=new i,y.__super__=t.prototype,y},v={}.hasOwnProperty;M=H("./NodeType"),N=H("./XMLWriterBase"),g=H("./WriterState"),J.exports=C=function(T){m(y,T);function y(t,h){this.stream=t,y.__super__.constructor.call(this,h)}return y.prototype.endline=function(t,h,i){return t.isLastRootNode&&h.state===g.CloseTag?"":y.__super__.endline.call(this,t,h,i)},y.prototype.document=function(t,h){var i,c,a,n,s,d,f,l,o;for(f=t.children,c=a=0,s=f.length;a<s;c=++a)i=f[c],i.isLastRootNode=c===t.children.length-1;for(h=this.filterOptions(h),l=t.children,o=[],n=0,d=l.length;n<d;n++)i=l[n],o.push(this.writeChildNode(i,h,0));return o},y.prototype.attribute=function(t,h,i){return this.stream.write(y.__super__.attribute.call(this,t,h,i))},y.prototype.cdata=function(t,h,i){return this.stream.write(y.__super__.cdata.call(this,t,h,i))},y.prototype.comment=function(t,h,i){return this.stream.write(y.__super__.comment.call(this,t,h,i))},y.prototype.declaration=function(t,h,i){return this.stream.write(y.__super__.declaration.call(this,t,h,i))},y.prototype.docType=function(t,h,i){var c,a,n,s;if(i||(i=0),this.openNode(t,h,i),h.state=g.OpenTag,this.stream.write(this.indent(t,h,i)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,h,i)),h.state=g.InsideTag,s=t.children,a=0,n=s.length;a<n;a++)c=s[a],this.writeChildNode(c,h,i+1);h.state=g.CloseTag,this.stream.write("]")}return h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+">"),this.stream.write(this.endline(t,h,i)),h.state=g.None,this.closeNode(t,h,i)},y.prototype.element=function(t,h,i){var c,a,n,s,d,f,l,o,r,x;i||(i=0),this.openNode(t,h,i),h.state=g.OpenTag,this.stream.write(this.indent(t,h,i)+"<"+t.name),r=t.attribs;for(l in r){if(!v.call(r,l))continue;c=r[l],this.attribute(c,h,i)}if(n=t.children.length,s=n===0?null:t.children[0],n===0||t.children.every(function(b){return(b.type===M.Text||b.type===M.Raw)&&b.value===""}))h.allowEmpty?(this.stream.write(">"),h.state=g.CloseTag,this.stream.write("</"+t.name+">")):(h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+"/>"));else if(h.pretty&&n===1&&(s.type===M.Text||s.type===M.Raw)&&s.value!=null)this.stream.write(">"),h.state=g.InsideTag,h.suppressPrettyCount++,o=!0,this.writeChildNode(s,h,i+1),h.suppressPrettyCount--,o=!1,h.state=g.CloseTag,this.stream.write("</"+t.name+">");else{for(this.stream.write(">"+this.endline(t,h,i)),h.state=g.InsideTag,x=t.children,d=0,f=x.length;d<f;d++)a=x[d],this.writeChildNode(a,h,i+1);h.state=g.CloseTag,this.stream.write(this.indent(t,h,i)+"</"+t.name+">")}return this.stream.write(this.endline(t,h,i)),h.state=g.None,this.closeNode(t,h,i)},y.prototype.processingInstruction=function(t,h,i){return this.stream.write(y.__super__.processingInstruction.call(this,t,h,i))},y.prototype.raw=function(t,h,i){return this.stream.write(y.__super__.raw.call(this,t,h,i))},y.prototype.text=function(t,h,i){return this.stream.write(y.__super__.text.call(this,t,h,i))},y.prototype.dtdAttList=function(t,h,i){return this.stream.write(y.__super__.dtdAttList.call(this,t,h,i))},y.prototype.dtdElement=function(t,h,i){return this.stream.write(y.__super__.dtdElement.call(this,t,h,i))},y.prototype.dtdEntity=function(t,h,i){return this.stream.write(y.__super__.dtdEntity.call(this,t,h,i))},y.prototype.dtdNotation=function(t,h,i){return this.stream.write(y.__super__.dtdNotation.call(this,t,h,i))},y}(N)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(H,J,D){"use strict";(function(){var M,g,C=function(v,T){for(var y in T)N.call(T,y)&&(v[y]=T[y]);function t(){this.constructor=v}return t.prototype=T.prototype,v.prototype=new t,v.__super__=T.prototype,v},N={}.hasOwnProperty;g=H("./XMLWriterBase"),J.exports=M=function(m){C(v,m);function v(T){v.__super__.constructor.call(this,T)}return v.prototype.document=function(T,y){var t,h,i,c,a;for(y=this.filterOptions(y),c="",a=T.children,h=0,i=a.length;h<i;h++)t=a[h],c+=this.writeChildNode(t,y,0);return y.pretty&&c.slice(-y.newline.length)===y.newline&&(c=c.slice(0,-y.newline.length)),c},v}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(H,J,D){"use strict";(function(){var M,g=function(m,v){return function(){return m.apply(v,arguments)}},C={}.hasOwnProperty;J.exports=M=function(){function N(m){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var v,T,y;m||(m={}),this.options=m,this.options.version||(this.options.version="1.0"),T=m.stringify||{};for(v in T){if(!C.call(T,v))continue;y=T[v],this[v]=y}}return N.prototype.name=function(m){return this.options.noValidation?m:this.assertLegalName(""+m||"")},N.prototype.text=function(m){return this.options.noValidation?m:this.assertLegalChar(this.textEscape(""+m||""))},N.prototype.cdata=function(m){return this.options.noValidation?m:(m=""+m||"",m=m.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(m))},N.prototype.comment=function(m){if(this.options.noValidation)return m;if(m=""+m||"",m.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+m);return this.assertLegalChar(m)},N.prototype.raw=function(m){return this.options.noValidation?m:""+m||""},N.prototype.attValue=function(m){return this.options.noValidation?m:this.assertLegalChar(this.attEscape(m=""+m||""))},N.prototype.insTarget=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.insValue=function(m){if(this.options.noValidation)return m;if(m=""+m||"",m.match(/\?>/))throw new Error("Invalid processing instruction value: "+m);return this.assertLegalChar(m)},N.prototype.xmlVersion=function(m){if(this.options.noValidation)return m;if(m=""+m||"",!m.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+m);return m},N.prototype.xmlEncoding=function(m){if(this.options.noValidation)return m;if(m=""+m||"",!m.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+m);return this.assertLegalChar(m)},N.prototype.xmlStandalone=function(m){return this.options.noValidation?m:m?"yes":"no"},N.prototype.dtdPubID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.dtdSysID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.dtdElementValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.dtdAttType=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.dtdAttDefault=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.dtdEntityValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.dtdNData=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},N.prototype.convertAttKey="@",N.prototype.convertPIKey="?",N.prototype.convertTextKey="#text",N.prototype.convertCDataKey="#cdata",N.prototype.convertCommentKey="#comment",N.prototype.convertRawKey="#raw",N.prototype.assertLegalChar=function(m){var v,T;if(this.options.noValidation)return m;if(v="",this.options.version==="1.0"){if(v=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=m.match(v))throw new Error("Invalid character in string: "+m+" at index "+T.index)}else if(this.options.version==="1.1"&&(v=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=m.match(v)))throw new Error("Invalid character in string: "+m+" at index "+T.index);return m},N.prototype.assertLegalName=function(m){var v;if(this.options.noValidation)return m;if(this.assertLegalChar(m),v=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!m.match(v))throw new Error("Invalid character in name");return m},N.prototype.textEscape=function(m){var v;return this.options.noValidation?m:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(v,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},N.prototype.attEscape=function(m){var v;return this.options.noValidation?m:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(v,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},N}()}).call(void 0)},{}],280:[function(H,J,D){"use strict";var M=H("babel-runtime/core-js/object/create"),g=C(M);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,m,v,T=function(h,i){for(var c in i)y.call(i,c)&&(h[c]=i[c]);function a(){this.constructor=h}return a.prototype=i.prototype,h.prototype=new a,h.__super__=i.prototype,h},y={}.hasOwnProperty;N=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=v=function(t){T(h,t);function h(i,c){if(h.__super__.constructor.call(this,i),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=N.Text,this.value=this.stringify.text(c)}return Object.defineProperty(h.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"wholeText",{get:function(){var c,a,n;for(n="",a=this.previousSibling;a;)n=a.data+n,a=a.previousSibling;for(n+=this.data,c=this.nextSibling;c;)n=n+c.data,c=c.nextSibling;return n}}),h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(i){return this.options.writer.text(this,this.options.writer.filterOptions(i))},h.prototype.splitText=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.replaceWholeText=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(H,J,D){"use strict";(function(){var M,g,C,N,m,v,T,y,t,h,i,c,a,n,s,d,f,l={}.hasOwnProperty;f=H("./Utility").assign,M=H("./NodeType"),t=H("./XMLDeclaration"),h=H("./XMLDocType"),C=H("./XMLCData"),N=H("./XMLComment"),c=H("./XMLElement"),n=H("./XMLRaw"),s=H("./XMLText"),a=H("./XMLProcessingInstruction"),i=H("./XMLDummy"),m=H("./XMLDTDAttList"),v=H("./XMLDTDElement"),T=H("./XMLDTDEntity"),y=H("./XMLDTDNotation"),g=H("./WriterState"),J.exports=d=function(){function o(r){var x,b,p;r||(r={}),this.options=r,b=r.writer||{};for(x in b){if(!l.call(b,x))continue;p=b[x],this["_"+x]=this[x],this[x]=p}}return o.prototype.filterOptions=function(r){var x,b,p,I,O,_,E,w;return r||(r={}),r=f({},this.options,r),x={writer:this},x.pretty=r.pretty||!1,x.allowEmpty=r.allowEmpty||!1,x.indent=(b=r.indent)!=null?b:" ",x.newline=(p=r.newline)!=null?p:`
`,x.offset=(I=r.offset)!=null?I:0,x.dontPrettyTextNodes=(O=(_=r.dontPrettyTextNodes)!=null?_:r.dontprettytextnodes)!=null?O:0,x.spaceBeforeSlash=(E=(w=r.spaceBeforeSlash)!=null?w:r.spacebeforeslash)!=null?E:"",x.spaceBeforeSlash===!0&&(x.spaceBeforeSlash=" "),x.suppressPrettyCount=0,x.user={},x.state=g.None,x},o.prototype.indent=function(r,x,b){var p;return!x.pretty||x.suppressPrettyCount?"":x.pretty&&(p=(b||0)+x.offset+1,p>0)?new Array(p).join(x.indent):""},o.prototype.endline=function(r,x,b){return!x.pretty||x.suppressPrettyCount?"":x.newline},o.prototype.attribute=function(r,x,b){var p;return this.openAttribute(r,x,b),p=" "+r.name+'="'+r.value+'"',this.closeAttribute(r,x,b),p},o.prototype.cdata=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<![CDATA[",x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+="]]>"+this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.comment=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<!-- ",x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+=" -->"+this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.declaration=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<?xml",x.state=g.InsideTag,p+=' version="'+r.version+'"',r.encoding!=null&&(p+=' encoding="'+r.encoding+'"'),r.standalone!=null&&(p+=' standalone="'+r.standalone+'"'),x.state=g.CloseTag,p+=x.spaceBeforeSlash+"?>",p+=this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.docType=function(r,x,b){var p,I,O,_,E;if(b||(b=0),this.openNode(r,x,b),x.state=g.OpenTag,_=this.indent(r,x,b),_+="<!DOCTYPE "+r.root().name,r.pubID&&r.sysID?_+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(_+=' SYSTEM "'+r.sysID+'"'),r.children.length>0){for(_+=" [",_+=this.endline(r,x,b),x.state=g.InsideTag,E=r.children,I=0,O=E.length;I<O;I++)p=E[I],_+=this.writeChildNode(p,x,b+1);x.state=g.CloseTag,_+="]"}return x.state=g.CloseTag,_+=x.spaceBeforeSlash+">",_+=this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),_},o.prototype.element=function(r,x,b){var p,I,O,_,E,w,S,F,P,L,G,z,A,B;b||(b=0),L=!1,G="",this.openNode(r,x,b),x.state=g.OpenTag,G+=this.indent(r,x,b)+"<"+r.name,z=r.attribs;for(P in z){if(!l.call(z,P))continue;p=z[P],G+=this.attribute(p,x,b)}if(O=r.children.length,_=O===0?null:r.children[0],O===0||r.children.every(function(U){return(U.type===M.Text||U.type===M.Raw)&&U.value===""}))x.allowEmpty?(G+=">",x.state=g.CloseTag,G+="</"+r.name+">"+this.endline(r,x,b)):(x.state=g.CloseTag,G+=x.spaceBeforeSlash+"/>"+this.endline(r,x,b));else if(x.pretty&&O===1&&(_.type===M.Text||_.type===M.Raw)&&_.value!=null)G+=">",x.state=g.InsideTag,x.suppressPrettyCount++,L=!0,G+=this.writeChildNode(_,x,b+1),x.suppressPrettyCount--,L=!1,x.state=g.CloseTag,G+="</"+r.name+">"+this.endline(r,x,b);else{if(x.dontPrettyTextNodes){for(A=r.children,E=0,S=A.length;E<S;E++)if(I=A[E],(I.type===M.Text||I.type===M.Raw)&&I.value!=null){x.suppressPrettyCount++,L=!0;break}}for(G+=">"+this.endline(r,x,b),x.state=g.InsideTag,B=r.children,w=0,F=B.length;w<F;w++)I=B[w],G+=this.writeChildNode(I,x,b+1);x.state=g.CloseTag,G+=this.indent(r,x,b)+"</"+r.name+">",L&&x.suppressPrettyCount--,G+=this.endline(r,x,b),x.state=g.None}return this.closeNode(r,x,b),G},o.prototype.writeChildNode=function(r,x,b){switch(r.type){case M.CData:return this.cdata(r,x,b);case M.Comment:return this.comment(r,x,b);case M.Element:return this.element(r,x,b);case M.Raw:return this.raw(r,x,b);case M.Text:return this.text(r,x,b);case M.ProcessingInstruction:return this.processingInstruction(r,x,b);case M.Dummy:return"";case M.Declaration:return this.declaration(r,x,b);case M.DocType:return this.docType(r,x,b);case M.AttributeDeclaration:return this.dtdAttList(r,x,b);case M.ElementDeclaration:return this.dtdElement(r,x,b);case M.EntityDeclaration:return this.dtdEntity(r,x,b);case M.NotationDeclaration:return this.dtdNotation(r,x,b);default:throw new Error("Unknown XML node type: "+r.constructor.name)}},o.prototype.processingInstruction=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<?",x.state=g.InsideTag,p+=r.target,r.value&&(p+=" "+r.value),x.state=g.CloseTag,p+=x.spaceBeforeSlash+"?>",p+=this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.raw=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b),x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+=this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.text=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b),x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+=this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.dtdAttList=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<!ATTLIST",x.state=g.InsideTag,p+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType,r.defaultValueType!=="#DEFAULT"&&(p+=" "+r.defaultValueType),r.defaultValue&&(p+=' "'+r.defaultValue+'"'),x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.dtdElement=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<!ELEMENT",x.state=g.InsideTag,p+=" "+r.name+" "+r.value,x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.dtdEntity=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<!ENTITY",x.state=g.InsideTag,r.pe&&(p+=" %"),p+=" "+r.name,r.value?p+=' "'+r.value+'"':(r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),r.nData&&(p+=" NDATA "+r.nData)),x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.dtdNotation=function(r,x,b){var p;return this.openNode(r,x,b),x.state=g.OpenTag,p=this.indent(r,x,b)+"<!NOTATION",x.state=g.InsideTag,p+=" "+r.name,r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.pubID?p+=' PUBLIC "'+r.pubID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,b),x.state=g.None,this.closeNode(r,x,b),p},o.prototype.openNode=function(r,x,b){},o.prototype.closeNode=function(r,x,b){},o.prototype.openAttribute=function(r,x,b){},o.prototype.closeAttribute=function(r,x,b){},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(H,J,D){"use strict";(function(){var M,g,C,N,m,v,T,y,t,h;h=H("./Utility"),y=h.assign,t=h.isFunction,C=H("./XMLDOMImplementation"),N=H("./XMLDocument"),m=H("./XMLDocumentCB"),T=H("./XMLStringWriter"),v=H("./XMLStreamWriter"),M=H("./NodeType"),g=H("./WriterState"),J.exports.create=function(i,c,a,n){var s,d;if(i==null)throw new Error("Root element needs a name.");return n=y({},c,a,n),s=new N(n),d=s.element(i),n.headless||(s.declaration(n),(n.pubID!=null||n.sysID!=null)&&s.dtd(n)),d},J.exports.begin=function(i,c,a){var n;return t(i)&&(n=[i,c],c=n[0],a=n[1],i={}),c?new m(i,c,a):new N(i)},J.exports.stringWriter=function(i){return new T(i)},J.exports.streamWriter=function(i,c){return new v(i,c)},J.exports.implementation=new C,J.exports.nodeType=M,J.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(H,J,D){J.exports=g;var M=Object.prototype.hasOwnProperty;function g(){for(var C={},N=0;N<arguments.length;N++){var m=arguments[N];for(var v in m)M.call(m,v)&&(C[v]=m[v])}return C}},{}],284:[function(H,J,D){"use strict";var M=H("buffer").Buffer,g=H("./sha"),C=H("./md5"),N={sha1:g,md5:C},m=64,v=M.alloc(m);v.fill(0);function T(h,i,c){M.isBuffer(i)||(i=M.from(i)),M.isBuffer(c)||(c=M.from(c)),i.length>m?i=h(i):i.length<m&&(i=M.concat([i,v],m));for(var a=M.alloc(m),n=M.alloc(m),s=0;s<m;s++)a[s]=i[s]^54,n[s]=i[s]^92;var d=h(M.concat([a,c]));return h(M.concat([n,d]))}function y(h,i){h=h||"sha1";var c=N[h],a=[],n=0;return c||t("algorithm:",h,"is not yet supported"),{update:function(d){return M.isBuffer(d)||(d=M.from(d)),a.push(d),n+=d.length,this},digest:function(d){var f=M.concat(a),l=i?T(c,i,f):c(f);return a=null,d?l.toString(d):l}}}function t(){var h=[].slice.call(arguments).join(" ");throw new Error([h,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}D.createHash=function(h){return y(h)},D.createHmac=function(h,i){return y(h,i)},D.createCredentials=function(){t("sorry,createCredentials is not implemented yet")},D.createCipher=function(){t("sorry,createCipher is not implemented yet")},D.createCipheriv=function(){t("sorry,createCipheriv is not implemented yet")},D.createDecipher=function(){t("sorry,createDecipher is not implemented yet")},D.createDecipheriv=function(){t("sorry,createDecipheriv is not implemented yet")},D.createSign=function(){t("sorry,createSign is not implemented yet")},D.createVerify=function(){t("sorry,createVerify is not implemented yet")},D.createDiffieHellman=function(){t("sorry,createDiffieHellman is not implemented yet")},D.pbkdf2=function(){t("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(H,J,D){"use strict";var M=H("buffer").Buffer,g=4,C=M.alloc(g);C.fill(0);var N=8;function m(y,t){if(y.length%g!==0){var h=y.length+(g-y.length%g);y=M.concat([y,C],h)}for(var i=[],c=t?y.readInt32BE:y.readInt32LE,a=0;a<y.length;a+=g)i.push(c.call(y,a));return i}function v(y,t,h){for(var i=M.alloc(t),c=h?i.writeInt32BE:i.writeInt32LE,a=0;a<y.length;a++)c.call(i,y[a],a*4,!0);return i}function T(y,t,h,i){M.isBuffer(y)||(y=M.from(y));var c=t(m(y,i),y.length*N);return v(c,h,i)}J.exports={hash:T}},{buffer:73}],286:[function(H,J,D){"use strict";var M=H("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(i,c){i[c>>5]|=128<<c%32,i[(c+64>>>9<<4)+14]=c;for(var a=1732584193,n=-271733879,s=-1732584194,d=271733878,f=0;f<i.length;f+=16){var l=a,o=n,r=s,x=d;a=m(a,n,s,d,i[f+0],7,-680876936),d=m(d,a,n,s,i[f+1],12,-389564586),s=m(s,d,a,n,i[f+2],17,606105819),n=m(n,s,d,a,i[f+3],22,-1044525330),a=m(a,n,s,d,i[f+4],7,-176418897),d=m(d,a,n,s,i[f+5],12,1200080426),s=m(s,d,a,n,i[f+6],17,-1473231341),n=m(n,s,d,a,i[f+7],22,-45705983),a=m(a,n,s,d,i[f+8],7,1770035416),d=m(d,a,n,s,i[f+9],12,-1958414417),s=m(s,d,a,n,i[f+10],17,-42063),n=m(n,s,d,a,i[f+11],22,-1990404162),a=m(a,n,s,d,i[f+12],7,1804603682),d=m(d,a,n,s,i[f+13],12,-40341101),s=m(s,d,a,n,i[f+14],17,-1502002290),n=m(n,s,d,a,i[f+15],22,1236535329),a=v(a,n,s,d,i[f+1],5,-165796510),d=v(d,a,n,s,i[f+6],9,-1069501632),s=v(s,d,a,n,i[f+11],14,643717713),n=v(n,s,d,a,i[f+0],20,-373897302),a=v(a,n,s,d,i[f+5],5,-701558691),d=v(d,a,n,s,i[f+10],9,38016083),s=v(s,d,a,n,i[f+15],14,-660478335),n=v(n,s,d,a,i[f+4],20,-405537848),a=v(a,n,s,d,i[f+9],5,568446438),d=v(d,a,n,s,i[f+14],9,-1019803690),s=v(s,d,a,n,i[f+3],14,-187363961),n=v(n,s,d,a,i[f+8],20,1163531501),a=v(a,n,s,d,i[f+13],5,-1444681467),d=v(d,a,n,s,i[f+2],9,-51403784),s=v(s,d,a,n,i[f+7],14,1735328473),n=v(n,s,d,a,i[f+12],20,-1926607734),a=T(a,n,s,d,i[f+5],4,-378558),d=T(d,a,n,s,i[f+8],11,-2022574463),s=T(s,d,a,n,i[f+11],16,1839030562),n=T(n,s,d,a,i[f+14],23,-35309556),a=T(a,n,s,d,i[f+1],4,-1530992060),d=T(d,a,n,s,i[f+4],11,1272893353),s=T(s,d,a,n,i[f+7],16,-155497632),n=T(n,s,d,a,i[f+10],23,-1094730640),a=T(a,n,s,d,i[f+13],4,681279174),d=T(d,a,n,s,i[f+0],11,-358537222),s=T(s,d,a,n,i[f+3],16,-722521979),n=T(n,s,d,a,i[f+6],23,76029189),a=T(a,n,s,d,i[f+9],4,-640364487),d=T(d,a,n,s,i[f+12],11,-421815835),s=T(s,d,a,n,i[f+15],16,530742520),n=T(n,s,d,a,i[f+2],23,-995338651),a=y(a,n,s,d,i[f+0],6,-198630844),d=y(d,a,n,s,i[f+7],10,1126891415),s=y(s,d,a,n,i[f+14],15,-1416354905),n=y(n,s,d,a,i[f+5],21,-57434055),a=y(a,n,s,d,i[f+12],6,1700485571),d=y(d,a,n,s,i[f+3],10,-1894986606),s=y(s,d,a,n,i[f+10],15,-1051523),n=y(n,s,d,a,i[f+1],21,-2054922799),a=y(a,n,s,d,i[f+8],6,1873313359),d=y(d,a,n,s,i[f+15],10,-30611744),s=y(s,d,a,n,i[f+6],15,-1560198380),n=y(n,s,d,a,i[f+13],21,1309151649),a=y(a,n,s,d,i[f+4],6,-145523070),d=y(d,a,n,s,i[f+11],10,-1120210379),s=y(s,d,a,n,i[f+2],15,718787259),n=y(n,s,d,a,i[f+9],21,-343485551),a=t(a,l),n=t(n,o),s=t(s,r),d=t(d,x)}return Array(a,n,s,d)}function N(i,c,a,n,s,d){return t(h(t(t(c,i),t(n,d)),s),a)}function m(i,c,a,n,s,d,f){return N(c&a|~c&n,i,c,s,d,f)}function v(i,c,a,n,s,d,f){return N(c&n|a&~n,i,c,s,d,f)}function T(i,c,a,n,s,d,f){return N(c^a^n,i,c,s,d,f)}function y(i,c,a,n,s,d,f){return N(a^(c|~n),i,c,s,d,f)}function t(i,c){var a=(i&65535)+(c&65535),n=(i>>16)+(c>>16)+(a>>16);return n<<16|a&65535}function h(i,c){return i<<c|i>>>32-c}J.exports=function(c){return M.hash(c,C,16)}},{"./helpers":285}],287:[function(H,J,D){"use strict";var M=H("./helpers");function g(T,y){T[y>>5]|=128<<24-y%32,T[(y+64>>9<<4)+15]=y;for(var t=Array(80),h=1732584193,i=-271733879,c=-1732584194,a=271733878,n=-1009589776,s=0;s<T.length;s+=16){for(var d=h,f=i,l=c,o=a,r=n,x=0;x<80;x++){x<16?t[x]=T[s+x]:t[x]=v(t[x-3]^t[x-8]^t[x-14]^t[x-16],1);var b=m(m(v(h,5),C(x,i,c,a)),m(m(n,t[x]),N(x)));n=a,a=c,c=v(i,30),i=h,h=b}h=m(h,d),i=m(i,f),c=m(c,l),a=m(a,o),n=m(n,r)}return Array(h,i,c,a,n)}function C(T,y,t,h){return T<20?y&t|~y&h:T<40?y^t^h:T<60?y&t|y&h|t&h:y^t^h}function N(T){return T<20?1518500249:T<40?1859775393:T<60?-1894007588:-899497514}function m(T,y){var t=(T&65535)+(y&65535),h=(T>>16)+(y>>16)+(t>>16);return h<<16|t&65535}function v(T,y){return T<<y|T>>>32-y}J.exports=function(y){return M.hash(y,g,20,!0)}},{"./helpers":285}],288:[function(H,J,D){"use strict";J.exports=function(){return function(){}}},{}],289:[function(H,J,D){(function(M){"use strict";var g=H("babel-runtime/helpers/typeof"),C=N(g);function N(h){return h&&h.__esModule?h:{default:h}}var m=H("stream"),v=m.Stream,T=H("../lib/common/utils/isArray"),y=T.isArray;J.exports.string=function(i){return typeof i=="string"},J.exports.array=y,J.exports.buffer=M.isBuffer;function t(h){return h instanceof v}J.exports.writableStream=function(i){return t(i)&&typeof i._write=="function"&&(0,C.default)(i._writableState)==="object"}}).call(this,{isBuffer:H("../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(H,J,D){"use strict";D.encodeURIComponent=function(M){try{return encodeURIComponent(M)}catch(g){return M}},D.escape=H("escape-html"),D.timestamp=function(g){if(g){var C=g;return typeof C=="string"&&(C=Number(C)),String(g).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(H,J,D){(function(M,g){"use strict";var C=H("babel-runtime/core-js/json/stringify"),N=T(C),m=H("babel-runtime/helpers/typeof"),v=T(m);function T(x){return x&&x.__esModule?x:{default:x}}var y=H("util"),t=H("url"),h=H("http"),i=H("https"),c=H("debug")("urllib"),a=H("humanize-ms"),n,s=0,d=Math.pow(2,31)-10,f=/^https?:\/\//i;function l(x,b){return x===void 0?b:x}function o(x,b){return function(p,I,O){if(p)return b(p);x({data:I,status:O.statusCode,headers:O.headers,res:O})}}D.TIMEOUTS=[a("300s"),a("300s")];var r=["json","text"];D.request=function(b,p,I){return arguments.length===2&&typeof p=="function"&&(I=p,p=null),typeof I=="function"?D.requestWithCallback(b,p,I):(n||(n=H("any-promise")),new n(function(O,_){D.requestWithCallback(b,p,o(O,_))}))},D.requestWithCallback=function(b,p,I){if(!b||typeof b!="string"&&(typeof b=="undefined"?"undefined":(0,v.default)(b))!=="object"){var O=y.format("expect request url to be a string or a http request options, but got %j",b);throw new Error(O)}arguments.length===2&&typeof p=="function"&&(I=p,p=null),p=p||{},s>=d&&(s=0);var _=++s;p.requestUrls=p.requestUrls||[];var E={requestId:_,url:b,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",E),p.timeout=p.timeout||D.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var w=Date.now(),S;typeof b=="string"?(f.test(b)||(b="http://"+b),S=t.parse(b)):S=b;var F=(p.type||p.method||S.method||"GET").toUpperCase(),P=S.port||80,L=h,G=l(p.agent,D.agent),z=p.fixJSONCtlChars;S.protocol==="https:"&&(L=i,G=l(p.httpsAgent,D.httpsAgent),S.port||(P=443));var A={host:S.hostname||S.host||"localhost",path:S.path||"/",method:F,port:P,agent:G,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?A.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(A.requestTimeout=p.timeout);for(var B=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<B.length;U++){var R=B[U];p.hasOwnProperty(R)&&(A[R]=p[R])}A.rejectUnauthorized===!1&&!A.hasOwnProperty("secureOptions")&&(A.secureOptions=H("constants").SSL_OP_NO_TLSv1_2);var K=p.auth||S.auth;K&&(A.auth=K);var Z=p.content||p.data,ue=F==="GET"||F==="HEAD"||p.dataAsQueryString;if(!p.content&&(Z&&!(typeof Z=="string"||g.isBuffer(Z))))if(ue)Z=p.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z);else{var de=A.headers["Content-Type"]||A.headers["content-type"];de||(p.contentType==="json"?de="application/json":de="application/x-www-form-urlencoded",A.headers["Content-Type"]=de),parseContentType(de).type==="application/json"?Z=(0,N.default)(Z):Z=p.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z)}ue&&Z&&(A.path+=(S.query?"&":"?")+Z,Z=null);var Ce=0;if(Z){var Re=Z.length;g.isBuffer(Z)||(Re=g.byteLength(Z)),Ce=A.headers["Content-Length"]=Re}p.dataType==="json"&&(A.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(A);var me=null,Oe=null,be=null,ce=!1,le=!1,ne=0,ge=-1,te=!1,re="",Se="",ie=null;p.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function q(){me&&(clearTimeout(me),me=null)}function Y(){Oe&&(clearTimeout(Oe),Oe=null)}function X(Ie,ot,ft){if(Y(),!I){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),_,M.pid,A.method,b),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),_,M.pid,Ie.name,Ie.message,Ie.stack);return}var Qe=I;I=null;var tt={};if(ft&&(ge=ft.statusCode,tt=ft.headers),ge===401&&tt["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var Be=tt["www-authenticate"];if(Be.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",_,b,Be),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(A.method,A.path,Be,p.digestAuth),c("Request#%d %s: auth with digest header: %s",_,b,p.headers.Authorization),ft.headers["set-cookie"]&&(p.headers.Cookie=ft.headers["set-cookie"].join(";")),D.requestWithCallback(b,p,Qe)}var ke=Date.now()-w;ie&&(ie.contentDownload=ke),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",ke,ne,ge,A.method,A.host,A.path,le,ie);var Ne={status:ge,statusCode:ge,headers:tt,size:ne,aborted:te,rt:ke,keepAliveSocket:le,data:ot,requestUrls:p.requestUrls,timing:ie,remoteAddress:re,remotePort:Se};if(Ie){var Ee="";G&&typeof G.getCurrentStatus=="function"&&(Ee=", agent status: "+(0,N.default)(G.getCurrentStatus())),Ie.message+=", "+A.method+" "+b+" "+ge+" (connected: "+ce+", keepalive socket: "+le+Ee+`)
headers: `+(0,N.default)(tt),Ie.data=ot,Ie.path=A.path,Ie.status=ge,Ie.headers=tt,Ie.res=Ne}Qe(Ie,ot,p.streaming?ft:Ne),p.emitter&&(E.url=b,E.socket=dt&&dt.connection,E.options=A,E.size=Ce,p.emitter.emit("response",{requestId:_,error:Ie,ctx:p.ctx,req:E,res:Ne}))}function he(Ie){var ot=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var ft=Ie.headers.location;if(!ft)ot=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),ot.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)ot=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+b),ot.name="MaxRedirectError";else{var Qe=p.formatRedirectUrl?p.formatRedirectUrl(b,ft):t.resolve(b,ft);c("Request#%d %s: `redirected` from %s to %s",_,A.path,b,Qe),Y(),p.headers&&p.headers.Host&&f.test(ft)&&(p.headers.Host=null);var tt=I;return I=null,D.requestWithCallback(Qe,p,tt),{redirect:!0,error:null}}}return{redirect:!1,error:ot}}!A.headers["User-Agent"]&&!A.headers["user-agent"]&&(A.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!A.headers["Accept-Encoding"]&&!A.headers["accept-encoding"]&&(A.headers["Accept-Encoding"]="gzip"));function fe(Ie,ot,ft){var Qe=Ie.headers["content-encoding"];return ft(null,ot,Qe)}var xe=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",_,F,b,A.headers,A.path),p.requestUrls.push(b);function Ke(Ie){if(ie&&(ie.waiting=Date.now()-w),c("Request#%d %s `req response` event emit: status %d, headers: %j",_,b,Ie.statusCode,Ie.headers),p.streaming){var ot=he(Ie);if(ot.redirect){Ie.resume();return}return ot.error?(Ie.resume(),X(ot.error,null,Ie)):X(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",_,b,ne)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",_,b,ne)}),Ie.on("aborted",function(){te=!0,c("Request#%d %s: `res aborted` event emit, total size %d",_,b,ne)}),xe){var ot=he(Ie);if(ot.redirect){Ie.resume();return}return ot.error?(Ie.resume(),xe.end(),X(ot.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",X.bind(null,null,null,Ie)):isNode010||isNode012?first([[xe,"close"],[Ie,"aborted"]],function(tt,Be,ke){c("Request#%d %s: writeStream or res %s event emitted",_,b,ke),X(be||null,null,Ie)}):xe.on("close",function(){c("Request#%d %s: writeStream close event emitted",_,b),X(be||null,null,Ie)}),Ie.pipe(xe))}var ft=[];Ie.on("data",function(Qe){c("Request#%d %s: `res data` event emit, size %d",_,b,Qe.length),ne+=Qe.length,ft.push(Qe)}),Ie.on("end",function(){var Qe=g.concat(ft,ne);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",_,b,ne,Ie._dumped),be)return X(be,Qe,Ie);var tt=he(Ie);if(tt.error)return X(tt.error,Qe,Ie);if(tt.redirect)return;fe(Ie,Qe,function(Be,ke,Ne){if(Be)return X(Be,Qe,Ie);if(!Ne&&r.indexOf(p.dataType)>=0){try{ke=decodeBodyByCharset(ke,Ie)}catch(Ae){return c("decodeBodyByCharset error: %s",Ae),X(null,ke,Ie)}if(p.dataType==="json")if(ne===0)ke=null;else{var Ee=parseJSON(ke,z);Ee.error?Be=Ee.error:ke=Ee.data}}te&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",_,b),X(Be,ke,Ie)})})}var Ze,et;Array.isArray(p.timeout)?(Ze=a(p.timeout[0]),et=a(p.timeout[1])):Ze=et=a(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Ze,et);function st(){c("Connect timer ticking, timeout: %d",Ze),me=setTimeout(function(){me=null,ge===-1&&(ge=-2);var Ie="Connect timeout for "+Ze+"ms",ot="ConnectionTimeoutError";dt.socket||(ot="SocketAssignTimeoutError",Ie+=", working sockets is full"),be=new Error(Ie),be.name=ot,be.requestId=_,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",_,b,be.name,Ie,ce),Fe()},Ze)}function ut(){c("Response timer ticking, timeout: %d",et),Oe=setTimeout(function(){Oe=null;var Ie="Response timeout for "+et+"ms",ot="ResponseTimeoutError";be=new Error(Ie),be.name=ot,be.requestId=_,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",_,b,be.name,Ie,ce),Fe()},et)}var dt;A.mode=p.mode?p.mode:"";try{dt=L.request(A,Ke)}catch(Ie){return X(Ie)}typeof window=="undefined"?st():dt.on("requestTimeout",function(){ge===-1&&(ge=-2);var Ie="Connect timeout for "+Ze+"ms",ot="ConnectionTimeoutError";be=new Error(Ie),be.name=ot,be.requestId=_,Fe()});function Fe(){c("Request#%d %s abort, connected: %s",_,b,ce),dt.socket||(be.noSocket=!0,X(be)),dt.abort()}return ie&&dt.on("finish",function(){ie.requestSent=Date.now()-w}),dt.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-w),isNode010&&Ie.socket&&(Ie=Ie.socket);var ot=Ie.readyState;if(ot==="opening"){Ie.once("lookup",function(ft,Qe,tt){c("Request#%d %s lookup: %s, %s, %s",_,b,ft,Qe,tt),ie&&(ie.dnslookup=Date.now()-w),Qe&&(re=Qe)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-w),q(),ut(),c("Request#%d %s new socket connected",_,b),ce=!0,re||(re=Ie.remoteAddress),Se=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",_,b,ot),ce=!0,le=!0,re||(re=Ie.remoteAddress),Se=Ie.remotePort,q(),ut()}),dt.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",_,b,Ie.name,Ie.message),X(be||Ie)}),xe&&xe.once("error",function(Ie){Ie.message+=' (writeStream "error")',be=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",_,b,Ie.name,Ie.message),Fe()}),p.stream?(p.stream.pipe(dt),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',be=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",_,b,Ie.name,Ie.message),Fe()})):dt.end(Z),dt.requestId=_,dt}}).call(this,H("_process"),H("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(H,J,D){"use strict";D.d(J,"a",function(){return y});var M=D("q1tI"),g=D("biw7"),C=D("fyJ8");function N(t){var h=t.className,i=t.index,c=t.children,a=t.colSpan,n=t.rowSpan,s=M.useContext(g.a),d=s.prefixCls,f=s.fixedInfoList,l=f[i];return M.createElement(C.a,Object.assign({className:h,index:i,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:a,rowSpan:n}}}},l))}function m(t){return M.createElement("tr",Object.assign({},t))}function v(t){var h=t.children,i=M.useContext(g.a),c=i.prefixCls;return M.createElement("tfoot",{className:"".concat(c,"-summary")},h)}var T=J.b=v,y={Cell:N,Row:m}},nEHx:function(H,J,D){"use strict";D.d(J,"a",function(){return M});var M;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(M||(M={}))},nnTU:function(H,J,D){"use strict";D.d(J,"b",function(){return T}),D.d(J,"a",function(){return y});var M=D("MI8n"),g=D("JYp7"),C=D("pmY6"),N=D("24hK"),m=D("746U"),v=D("Cg/j");const T=Object(v.c)("commandService"),y=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new M.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 s=[];for(let f of t.description.args)s.push(f.constraint);const d=t.handler;t.handler=function(f,...l){return Object(m.o)(l,s),d(f,...l)}}const{id:i}=t;let c=this._commands.get(i);c||(c=new N.a,this._commands.set(i,c));let a=c.unshift(t),n=Object(C.i)(()=>{a();const s=this._commands.get(i);(s==null?void 0:s.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),n}registerCommandAlias(t,h){return y.registerCommand(t,(i,...c)=>i.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 i=this.getCommand(h);i&&t.set(h,i)}return t}};y.registerCommand("noop",()=>{})},oRuE:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.pad.Iso10126={pad:function(g,C){var N=C*4,m=N-g.sigBytes%N;g.concat(M.lib.WordArray.random(m-1)).concat(M.lib.WordArray.create([m<<24],1))},unpad:function(g){var C=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=C}},M.pad.Iso10126})},osHv:function(H,J,D){(function(M){M(D("VrN/"))})(function(M){"use strict";var g=M.Pos;function C(f,l){return f.line-l.line||f.ch-l.ch}var N="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=N+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",v=new RegExp("<(/?)(["+N+"]["+m+"]*)","g");function T(f,l,o,r){this.line=l,this.ch=o,this.cm=f,this.text=f.getLine(l),this.min=r?Math.max(r.from,f.firstLine()):f.firstLine(),this.max=r?Math.min(r.to-1,f.lastLine()):f.lastLine()}function y(f,l){var o=f.cm.getTokenTypeAt(g(f.line,l));return o&&/\btag\b/.test(o)}function t(f){return f.line>=f.max?void 0:(f.ch=0,f.text=f.cm.getLine(++f.line),!0)}function h(f){return f.line<=f.min?void 0:(f.text=f.cm.getLine(--f.line),f.ch=f.text.length,!0)}function i(f){for(;;){var l=f.text.indexOf(">",f.ch);if(l==-1){if(t(f))continue;return}if(!y(f,l+1)){f.ch=l+1;continue}var o=f.text.lastIndexOf("/",l),r=o>-1&&!/\S/.test(f.text.slice(o+1,l));return f.ch=l+1,r?"selfClose":"regular"}}function c(f){for(;;){var l=f.ch?f.text.lastIndexOf("<",f.ch-1):-1;if(l==-1){if(h(f))continue;return}if(!y(f,l+1)){f.ch=l;continue}v.lastIndex=l,f.ch=l;var o=v.exec(f.text);if(o&&o.index==l)return o}}function a(f){for(;;){v.lastIndex=f.ch;var l=v.exec(f.text);if(!l){if(t(f))continue;return}if(!y(f,l.index+1)){f.ch=l.index+1;continue}return f.ch=l.index+l[0].length,l}}function n(f){for(;;){var l=f.ch?f.text.lastIndexOf(">",f.ch-1):-1;if(l==-1){if(h(f))continue;return}if(!y(f,l+1)){f.ch=l;continue}var o=f.text.lastIndexOf("/",l),r=o>-1&&!/\S/.test(f.text.slice(o+1,l));return f.ch=l+1,r?"selfClose":"regular"}}function s(f,l){for(var o=[];;){var r=a(f),x,b=f.line,p=f.ch-(r?r[0].length:0);if(!r||!(x=i(f)))return;if(x=="selfClose")continue;if(r[1]){for(var I=o.length-1;I>=0;--I)if(o[I]==r[2]){o.length=I;break}if(I<0&&(!l||l==r[2]))return{tag:r[2],from:g(b,p),to:g(f.line,f.ch)}}else o.push(r[2])}}function d(f,l){for(var o=[];;){var r=n(f);if(!r)return;if(r=="selfClose"){c(f);continue}var x=f.line,b=f.ch,p=c(f);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&&(!l||l==p[2]))return{tag:p[2],from:g(f.line,f.ch),to:g(x,b)}}}}M.registerHelper("fold","xml",function(f,l){for(var o=new T(f,l.line,0);;){var r=a(o);if(!r||o.line!=l.line)return;var x=i(o);if(!x)return;if(!r[1]&&x!="selfClose"){var b=g(o.line,o.ch),p=s(o,r[2]);return p&&C(p.from,b)>0?{from:b,to:p.from}:null}}}),M.findMatchingTag=function(f,l,o){var r=new T(f,l.line,l.ch,o);if(r.text.indexOf(">")==-1&&r.text.indexOf("<")==-1)return;var x=i(r),b=x&&g(r.line,r.ch),p=x&&c(r);if(!x||!p||C(r,l)>0)return;var I={from:g(r.line,r.ch),to:b,tag:p[2]};return x=="selfClose"?{open:I,close:null,at:"open"}:p[1]?{open:d(r,p[2]),close:I,at:"close"}:(r=new T(f,b.line,b.ch,o),{open:I,close:s(r,p[2]),at:"open"})},M.findEnclosingTag=function(f,l,o,r){for(var x=new T(f,l.line,l.ch,o);;){var b=d(x,r);if(!b)break;var p=new T(f,l.line,l.ch,o),I=s(p,b.tag);if(I)return{open:b,close:I}}},M.scanForClosingTag=function(f,l,o,r){var x=new T(f,l.line,l.ch,r?{from:0,to:r}:null);return s(x,o)}})},p5ED:function(H,J,D){"use strict";var M=D("+L6B"),g=D("2/Rp"),C=D("5Dmo"),N=D("3S7+"),m=D("k1fw"),v=D("tJVT"),T=D("q1tI"),y=D.n(T),t=D("vHTk"),h=D.n(t),i=D("yEEn"),c=D("ZW9T"),a=D("1vsH");J.a=function(n){var s=n.name,d=n.data,f=n.theme,l=n.type,o=n.filename,r=n.monacoEditor,x=n.className,b=n.style,p=n.close,I=n.onClose,O=n.hasMask,_=Object(T.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(v.a)(_,2),w=E[0],S=E[1],F=Object(T.useState)(""),P=Object(v.a)(F,2),L=P[0],G=P[1],z,A=1024*1024,B=10*A,U=Object(T.useRef)();l==="office"&&(z=Object(a.T)(d).filesize,z>B&&(l="other")),o&&(r.filename=o),Object(T.useEffect)(function(){var Z,ue,de=(Z=document.cookie)===null||Z===void 0||((ue=Z.replace(/\s/g,""))===null||ue===void 0)?void 0:ue.split(";");de==null||de.map(function(Ce){var Re=Ce.split("=");Re[0]==="_educoder_session"&&G(Re[1])})},[]);var R=function(){if(d.startsWith("http")||d.startsWith("/")){K();return}Object(a.z)(o||"educoder",d,o)},K=function(){Object(a.x)(o||s,d)};return console.log("data:",d,"fileanme:",o," name:",s),y.a.createElement("div",{style:Object(m.a)({},b||{}),className:"".concat(O&&h.a.bgBlack," ").concat(l?h.a.wrp:"hide")},p&&y.a.createElement("div",{className:h.a.close,ref:U},y.a.createElement(N.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return U.current}},y.a.createElement("span",{onClick:K},y.a.createElement("i",{className:"icon-quxiaozhiding"}))),y.a.createElement(N.a,{title:"\u5173\u95ED",getPopupContainer:function(){return U.current}},y.a.createElement("span",{className:"",onClick:I},y.a.createElement("i",{className:"icon-guanbi1"})))),y.a.createElement("div",{className:"".concat(h.a[x]," ").concat(x," ").concat(h.a.monaco," ").concat(l==="txt"?"show":"hide")},l==="txt"&&y.a.createElement(c.b,r)),l==="audio"&&y.a.createElement("audio",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?d:"data:audio/mp3;base64,").concat(d),autoPlay:!0}),l==="video"&&y.a.createElement(y.a.Fragment,null,d!=null&&d.startsWith("/")?y.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):y.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),l==="html"&&y.a.createElement("iframe",{src:d+"&disposition=inline"}),l==="pdf"&&y.a.createElement("embed",{className:h.a.embed,src:d}),l==="image"&&y.a.createElement(y.a.Fragment,null,y.a.createElement("img",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(d)})),l==="other"&&y.a.createElement("div",null,y.a.createElement(g.a,{type:"primary",size:"large",onClick:R},y.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(l==="download"||l==="office")&&y.a.createElement(g.a,{type:"primary",size:"large",onClick:R},y.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(H,J,D){},pA7S:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.WordArray,m=C.BlockCipher,v=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],y=[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}],i=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=v.DES=m.extend({_doReset:function(){for(var d=this._key,f=d.words,l=[],o=0;o<56;o++){var r=T[o]-1;l[o]=f[r>>>5]>>>31-r%32&1}for(var x=this._subKeys=[],b=0;b<16;b++){for(var p=x[b]=[],I=t[b],o=0;o<24;o++)p[o/6|0]|=l[(y[o]-1+I)%28]<<31-o%6,p[4+(o/6|0)]|=l[28+(y[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 O=this._invSubKeys=[],o=0;o<16;o++)O[o]=x[15-o]},encryptBlock:function(d,f){this._doCryptBlock(d,f,this._subKeys)},decryptBlock:function(d,f){this._doCryptBlock(d,f,this._invSubKeys)},_doCryptBlock:function(d,f,l){this._lBlock=d[f],this._rBlock=d[f+1],a.call(this,4,252645135),a.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),a.call(this,1,1431655765);for(var o=0;o<16;o++){for(var r=l[o],x=this._lBlock,b=this._rBlock,p=0,I=0;I<8;I++)p|=h[I][((b^r[I])&i[I])>>>0];this._lBlock=b,this._rBlock=x^p}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,a.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),a.call(this,16,65535),a.call(this,4,252645135),d[f]=this._lBlock,d[f+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function a(d,f){var l=(this._lBlock>>>d^this._rBlock)&f;this._rBlock^=l,this._lBlock^=l<<d}function n(d,f){var l=(this._rBlock>>>d^this._lBlock)&f;this._lBlock^=l,this._rBlock^=l<<d}g.DES=m._createHelper(c);var s=v.TripleDES=m.extend({_doReset:function(){var d=this._key,f=d.words;if(f.length!==2&&f.length!==4&&f.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=f.slice(0,2),o=f.length<4?f.slice(0,2):f.slice(2,4),r=f.length<6?f.slice(0,2):f.slice(4,6);this._des1=c.createEncryptor(N.create(l)),this._des2=c.createEncryptor(N.create(o)),this._des3=c.createEncryptor(N.create(r))},encryptBlock:function(d,f){this._des1.encryptBlock(d,f),this._des2.decryptBlock(d,f),this._des3.encryptBlock(d,f)},decryptBlock:function(d,f){this._des3.decryptBlock(d,f),this._des2.encryptBlock(d,f),this._des1.decryptBlock(d,f)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=m._createHelper(s)}(),M.TripleDES})},pIsd:function(H,J,D){var M=D("BJfS"),g=function(m){var v=/[height|width]$/;return v.test(m)},C=function(m){var v="",T=Object.keys(m);return T.forEach(function(y,t){var h=m[y];y=M(y),g(y)&&typeof h=="number"&&(h=h+"px"),h===!0?v+=y:h===!1?v+="not "+y:v+="("+y+": "+h+")",t<T.length-1&&(v+=" and ")}),v},N=function(m){var v="";return typeof m=="string"?m:m instanceof Array?(m.forEach(function(T,y){v+=C(T),y<m.length-1&&(v+=", ")}),v):C(m)};H.exports=N},pmY6:function(H,J,D){"use strict";D.d(J,"h",function(){return h}),D.d(J,"g",function(){return c}),D.d(J,"f",function(){return a}),D.d(J,"e",function(){return n}),D.d(J,"i",function(){return s}),D.d(J,"b",function(){return d}),D.d(J,"a",function(){return f}),D.d(J,"d",function(){return l}),D.d(J,"c",function(){return o});var M=D("C/vA"),g=D("JYp7");const C=!1;let N=null;function m(r){N=r}if(C){const r="__is_disposable_tracked__";m(new class{trackDisposable(x){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{x[r]||console.log(b)},3e3)}setParent(x,b){if(x&&x!==f.None)try{x[r]=!0}catch(p){}}markAsDisposed(x){if(x&&x!==f.None)try{x[r]=!0}catch(b){}}markAsSingleton(x){}})}function v(r){return N==null||N.trackDisposable(r),r}function T(r){N==null||N.markAsDisposed(r)}function y(r,x){N==null||N.setParent(r,x)}function t(r,x){if(!N)return;for(const b of r)N.setParent(b,x)}function h(r){return N==null||N.markAsSingleton(r),r}class i extends Error{constructor(r){super(`Encountered errors while disposing of store. Errors: [${r.join(", ")}]`);this.errors=r}}function c(r){return typeof r.dispose=="function"&&r.dispose.length===0}function a(r){if(g.a.is(r)){let x=[];for(const b of r)if(b)try{b.dispose()}catch(p){x.push(p)}if(x.length===1)throw x[0];if(x.length>1)throw new i(x);return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function n(...r){const x=s(()=>a(r));return t(r,x),x}function s(r){const x=v({dispose:Object(M.a)(()=>{T(x),r()})});return x}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,v(this)}dispose(){if(this._isDisposed)return;T(this),this._isDisposed=!0,this.clear()}clear(){try{a(this._toDispose.values())}finally{this._toDispose.clear()}}add(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return y(r,this),this._isDisposed?d.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(r),r}}d.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new d,v(this),y(this._store,this)}dispose(){T(this),this._store.dispose()}_register(r){if(r===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(r)}}f.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,v(this)}get value(){return this._isDisposed?void 0:this._value}set value(r){var x;if(this._isDisposed||r===this._value)return;(x=this._value)===null||x===void 0||x.dispose(),r&&y(r,this),this._value=r}clear(){this.value=void 0}dispose(){var r;this._isDisposed=!0,T(this),(r=this._value)===null||r===void 0||r.dispose(),this._value=void 0}clearAndLeak(){const r=this._value;return this._value=void 0,r&&y(r,null),r}}class o{constructor(r){this.object=r}dispose(){}}},psGv:function(H,J,D){var M,g;(function(){var C;(function(){"use strict";var T=[,,function(i){function c(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var s=new c(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},c.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},c.prototype.has_match=function(s){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(s))return!0;return!1},c.prototype.set_indent=function(s,d){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},c.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},c.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},c.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},c.prototype.is_empty=function(){return this.__items.length===0},c.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},c.prototype.push=function(s){this.__items.push(s);var d=s.lastIndexOf(`
`);d!==-1?this.__character_count=s.length-d:this.__character_count+=s.length},c.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},c.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},c.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},c.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},c.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function a(s,d){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),d=d||"",s.indent_level>0&&(d=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}a.prototype.get_indent_size=function(s,d){var f=this.__base_string_length;return d=d||0,s<0&&(f=0),f+=s*this.__indent_size,f+=d,f},a.prototype.get_indent_string=function(s,d){var f=this.__base_string;return d=d||0,s<0&&(s=0,f=""),d+=s*this.__indent_size,this.__ensure_cache(d),f+=this.__cache[d],f},a.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var s=this.__cache.length,d=0,f="";this.__indent_size&&s>=this.__indent_size&&(d=Math.floor(s/this.__indent_size),s-=d*this.__indent_size,f=new Array(d+1).join(this.__indent_string)),s&&(f+=new Array(s+1).join(" ")),this.__cache.push(f)};function n(s,d){this.__indent_cache=new a(s,d),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(s,d){return this.__indent_cache.get_indent_string(s,d)},n.prototype.get_indent_size=function(s,d){return this.__indent_cache.get_indent_size(s,d)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(s){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var f=this.__lines.join(`
`);return s!==`
`&&(f=f.replace(/[\n]/g,s)),f},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(s,d){return s=s||0,d=d||0,this.next_line.set_indent(s,d),this.__lines.length>1?(this.current_line.set_indent(s,d),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(s){for(var d=0;d<s.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(s){for(var d=this.__lines.length;s<d;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(s,d){for(var f=this.__lines.length-2;f>=0;){var l=this.__lines[f];if(l.is_empty())break;if(l.item(0).indexOf(s)!==0&&l.item(-1)!==d){this.__lines.splice(f+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}f--}},i.exports.Output=n},function(i){function c(a,n,s,d){this.type=a,this.text=n,this.comments_before=null,this.newlines=s||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=c},,,function(i){function c(s,d){this.raw_options=a(s,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}c.prototype._get_array=function(s,d){var f=this.raw_options[s],l=d||[];return typeof f=="object"?f!==null&&typeof f.concat=="function"&&(l=f.concat()):typeof f=="string"&&(l=f.split(/[^a-zA-Z0-9_\/\-]+/)),l},c.prototype._get_boolean=function(s,d){var f=this.raw_options[s],l=f===void 0?!!d:!!f;return l},c.prototype._get_characters=function(s,d){var f=this.raw_options[s],l=d||"";return typeof f=="string"&&(l=f.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),l},c.prototype._get_number=function(s,d){var f=this.raw_options[s];d=parseInt(d,10),isNaN(d)&&(d=0);var l=parseInt(f,10);return isNaN(l)&&(l=d),l},c.prototype._get_selection=function(s,d,f){var l=this._get_selection_list(s,d,f);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[s]+"'");return l[0]},c.prototype._get_selection_list=function(s,d,f){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(f=f||[d[0]],!this._is_valid_selection(f,d))throw new Error("Invalid Default Value!");var l=this._get_array(s,f);if(!this._is_valid_selection(l,d))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[s]+"'");return l},c.prototype._is_valid_selection=function(s,d){return s.length&&d.length&&!s.some(function(f){return d.indexOf(f)===-1})};function a(s,d){var f={};s=n(s);var l;for(l in s)l!==d&&(f[l]=s[l]);if(d&&s[d])for(l in s[d])f[l]=s[d][l];return f}function n(s){var d={},f;for(f in s){var l=f.replace(/-/g,"_");d[l]=s[f]}return d}i.exports.Options=c,i.exports.normalizeOpts=n,i.exports.mergeOpts=a},,function(i){var c=RegExp.prototype.hasOwnProperty("sticky");function a(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},a.prototype.peek=function(n){var s=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(s=this.__input.charAt(n)),s},a.prototype.__match=function(n,s){n.lastIndex=s;var d=n.exec(this.__input);return d&&!(c&&n.sticky)&&(d.index!==s&&(d=null)),d},a.prototype.test=function(n,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(n,s):!1},a.prototype.testChar=function(n,s){var d=this.peek(s);return n.lastIndex=0,d!==null&&n.test(d)},a.prototype.match=function(n){var s=this.__match(n,this.__position);return s?this.__position+=s[0].length:s=null,s},a.prototype.read=function(n,s,d){var f="",l;return n&&(l=this.match(n),l&&(f+=l[0])),s&&(l||!n)&&(f+=this.readUntil(s,d)),f},a.prototype.readUntil=function(n,s){var d="",f=this.__position;n.lastIndex=this.__position;var l=n.exec(this.__input);return l?(f=l.index,s&&(f+=l[0].length)):f=this.__input_length,d=this.__input.substring(this.__position,f),this.__position=f,d},a.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},a.prototype.get_regexp=function(n,s){var d=null,f="g";return s&&c&&(f="y"),typeof n=="string"&&n!==""?d=new RegExp(n,f):n&&(d=new RegExp(n.source,f)),d},a.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(n){var s=this.__position,d=this.readUntilAfter(n);return this.__position=s,d},a.prototype.lookBack=function(n){var s=this.__position-1;return s>=n.length&&this.__input.substring(s-n.length,s).toLowerCase()===n},i.exports.InputScanner=a},function(i,c,a){var n=a(8).InputScanner,s=a(3).Token,d=a(10).TokenStream,f=a(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(r,x){this._input=new n(r),this._options=x||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new f(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var r,x=new s(l.START,""),b=null,p=[],I=new d;x.type!==l.EOF;){for(r=this._get_next_token(x,b);this._is_comment(r);)I.add(r),r=this._get_next_token(x,b);I.isEmpty()||(r.comments_before=I,I=new d),r.parent=b,this._is_opening(r)?(p.push(b),b=r):b&&this._is_closing(r,b)&&(r.opened=b,b.closed=r,b=p.pop(),r.parent=b),r.previous=x,x.next=r,this.__tokens.add(r),x=r}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(r,x){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(l.RAW,b):this._create_token(l.EOF,"")},o.prototype._is_comment=function(r){return!1},o.prototype._is_opening=function(r){return!1},o.prototype._is_closing=function(r,x){return!1},o.prototype._create_token=function(r,x){var b=new s(r,x,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=o,i.exports.TOKEN=l},function(i){function c(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}c.prototype.restart=function(){this.__position=0},c.prototype.isEmpty=function(){return this.__tokens_length===0},c.prototype.hasNext=function(){return this.__position<this.__tokens_length},c.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},c.prototype.peek=function(a){var n=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(n=this.__tokens[a]),n},c.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},i.exports.TokenStream=c},function(i,c,a){var n=a(12).Pattern;function s(d,f){n.call(this,d,f),f?this._line_regexp=this._input.get_regexp(f._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}s.prototype=new n,s.prototype.__set_whitespace_patterns=function(d,f){d+="\\t ",f+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+f+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+f+"]")},s.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var f=this.__split(this._newline_regexp,d);this.newline_count=f.length-1,this.whitespace_before_token=f[this.newline_count]}return d},s.prototype.matching=function(d,f){var l=this._create();return l.__set_whitespace_patterns(d,f),l._update(),l},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(d,f){d.lastIndex=0;for(var l=0,o=[],r=d.exec(f);r;)o.push(f.substring(l,r.index)),l=r.index+r[0].length,r=d.exec(f);return l<f.length?o.push(f.substring(l,f.length)):o.push(""),o},i.exports.WhitespacePattern=s},function(i){function c(a,n){this._input=a,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,n&&(this._starting_pattern=this._input.get_regexp(n._starting_pattern,!0),this._match_pattern=this._input.get_regexp(n._match_pattern,!0),this._until_pattern=this._input.get_regexp(n._until_pattern),this._until_after=n._until_after)}c.prototype.read=function(){var a=this._input.read(this._starting_pattern);return(!this._starting_pattern||a)&&(a+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),a},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(a){var n=this._create();return n._until_after=!0,n._until_pattern=this._input.get_regexp(a),n._update(),n},c.prototype.until=function(a){var n=this._create();return n._until_after=!1,n._until_pattern=this._input.get_regexp(a),n._update(),n},c.prototype.starting_with=function(a){var n=this._create();return n._starting_pattern=this._input.get_regexp(a,!0),n._update(),n},c.prototype.matching=function(a){var n=this._create();return n._match_pattern=this._input.get_regexp(a,!0),n._update(),n},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},i.exports.Pattern=c},function(i){function c(a,n){a=typeof a=="string"?a:a.source,n=typeof n=="string"?n:n.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+n,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+n,"g")}c.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var n={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(a);s;)n[s[1]]=s[2],s=this.__directive_pattern.exec(a);return n},c.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=c},function(i,c,a){var n=a(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(f,l){n.call(this,f,l),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var o=new n(f);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new n,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(f){var l=this._create();return l._disabled[f]=!0,l._update(),l},d.prototype.read_options=function(f){var l=this._create();for(var o in s)l._disabled[o]=f.templating.indexOf(o)===-1;return l._update(),l},d.prototype.exclude=function(f){var l=this._create();return l._excluded[f]=!0,l._update(),l},d.prototype.read=function(){var f="";this._match_pattern?f=this._input.read(this._starting_pattern):f=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),f+=l,l=this._read_template();return this._until_after&&(f+=this._input.readUntilAfter(this._until_pattern)),f},d.prototype.__set_templated_pattern=function(){var f=[];this._disabled.php||f.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||f.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||f.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(f.push(this.__patterns.django._starting_pattern.source),f.push(this.__patterns.django_value._starting_pattern.source),f.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||f.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&f.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+f.join("|")+")")},d.prototype._read_template=function(){var f="",l=this._input.peek();if(l==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(f=f||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(f=f||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(f=f||this.__patterns.handlebars_comment.read(),f=f||this.__patterns.handlebars_unescaped.read(),f=f||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(f=f||this.__patterns.django_value.read()),this._excluded.django||(f=f||this.__patterns.django_comment.read(),f=f||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(f=f||this.__patterns.smarty_comment.read(),f=f||this.__patterns.smarty_literal.read(),f=f||this.__patterns.smarty.read()));return f},i.exports.TemplatablePattern=d},,,,function(i,c,a){var n=a(19).Beautifier,s=a(20).Options;function d(f,l,o,r){var x=new n(f,l,o,r);return x.beautify()}i.exports=d,i.exports.defaultOptions=function(){return new s}},function(i,c,a){var n=a(20).Options,s=a(2).Output,d=a(21).Tokenizer,f=a(21).TOKEN,l=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,r=function(F,P){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=F.max_preserve_newlines,this.preserve_newlines=F.preserve_newlines,this._output=new s(F,P)};r.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},r.prototype.set_space_before_token=function(F,P){this._output.space_before_token=F,this._output.non_breaking_space=P},r.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},r.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},r.prototype.print_preserved_newlines=function(F){var P=0;F.type!==f.TEXT&&F.previous.type!==f.TEXT&&(P=F.newlines?1:0),this.preserve_newlines&&(P=F.newlines<this.max_preserve_newlines+1?F.newlines:this.max_preserve_newlines+1);for(var L=0;L<P;L++)this.print_newline(L>0);return P!==0},r.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},r.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},r.prototype.print_newline=function(F){this._output.add_new_line(F)},r.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},r.prototype.indent=function(){this.indent_level++},r.prototype.get_full_indent=function(F){return F=this.indent_level+(F||0),F<1?"":this._output.get_indent_string(F)};var x=function(F){for(var P=null,L=F.next;L.type!==f.EOF&&F.closed!==L;){if(L.type===f.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===f.EQUALS&&L.next.next&&L.next.next.type===f.VALUE&&(P=L.next.next.text);break}L=L.next}return P},b=function(F,P){var L=null,G=null;return P.closed?(F==="script"?L="text/javascript":F==="style"&&(L="text/css"),L=x(P)||L,L.search("text/css")>-1?G="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":L.search(/test\/null/)>-1&&(G="null"),G):null};function p(F,P){return P.indexOf(F)!==-1}function I(F,P,L){this.parent=F||null,this.tag=P?P.tag_name:"",this.indent_level=L||0,this.parser_token=P||null}function O(F){this._printer=F,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(F){var P=new I(this._current_frame,F,this._printer.indent_level);this._current_frame=P},O.prototype._try_pop_frame=function(F){var P=null;return F&&(P=F.parser_token,this._printer.indent_level=F.indent_level,this._current_frame=F.parent),P},O.prototype._get_frame=function(F,P){for(var L=this._current_frame;L&&!(F.indexOf(L.tag)!==-1);){if(P&&P.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},O.prototype.try_pop=function(F,P){var L=this._get_frame([F],P);return this._try_pop_frame(L)},O.prototype.indent_to_tag=function(F){var P=this._get_frame(F);P&&(this._printer.indent_level=P.indent_level)};function _(F,P,L,G){this._source_text=F||"",P=P||{},this._js_beautify=L,this._css_beautify=G,this._tag_stack=null;var z=new n(P,"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"}_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var F=this._source_text,P=this._options.eol;this._options.eol==="auto"&&(P=`
`,F&&l.test(F)&&(P=F.match(l)[0])),F=F.replace(o,`
`);var L=F.match(/^[\t ]*/)[0],G={text:"",type:""},z=new E,A=new r(this._options,L),B=new d(F,this._options).tokenize();this._tag_stack=new O(A);for(var U=null,R=B.next();R.type!==f.EOF;)R.type===f.TAG_OPEN||R.type===f.COMMENT?(U=this._handle_tag_open(A,R,z,G),z=U):R.type===f.ATTRIBUTE||R.type===f.EQUALS||R.type===f.VALUE||R.type===f.TEXT&&!z.tag_complete?U=this._handle_inside_tag(A,R,z,B):R.type===f.TAG_CLOSE?U=this._handle_tag_close(A,R,z):R.type===f.TEXT?U=this._handle_text(A,R,z):A.add_raw_token(R),G=U,R=B.next();var K=A._output.get_code(P);return K},_.prototype._handle_tag_close=function(F,P,L){var G={text:P.text,type:P.type};return F.alignment_size=0,L.tag_complete=!0,F.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),L.is_unformatted?F.add_raw_token(P):(L.tag_start_char==="<"&&(F.set_space_before_token(P.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&F.print_newline(!1)),F.print_token(P)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(F.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&F.set_wrap_point(),G},_.prototype._handle_inside_tag=function(F,P,L,G){var z=L.has_wrapped_attrs,A={text:P.text,type:P.type};if(F.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),L.is_unformatted)F.add_raw_token(P);else if(L.tag_start_char==="{"&&P.type===f.TEXT)F.print_preserved_newlines(P)?(P.newlines=0,F.add_raw_token(P)):F.print_token(P);else{if(P.type===f.ATTRIBUTE?(F.set_space_before_token(!0),L.attr_count+=1):(P.type===f.EQUALS||P.type===f.VALUE&&P.previous.type===f.EQUALS)&&F.set_space_before_token(!1),P.type===f.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(F.traverse_whitespace(P),z=z||P.newlines!==0),this._is_wrap_attributes_force)){var B=L.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&L.attr_count===1){var U=!0,R=0,K;do{if(K=G.peek(R),K.type===f.ATTRIBUTE){U=!1;break}R+=1}while(R<4&&K.type!==f.EOF&&K.type!==f.TAG_CLOSE);B=!U}B&&(F.print_newline(!1),z=!0)}F.print_token(P),z=z||F.previous_token_wrapped(),L.has_wrapped_attrs=z}return A},_.prototype._handle_text=function(F,P,L){var G={text:P.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(F,P,L):L.is_unformatted||L.is_content_unformatted?F.add_raw_token(P):(F.traverse_whitespace(P),F.print_token(P)),G},_.prototype._print_custom_beatifier_text=function(F,P,L){var G=this;if(P.text!==""){var z=P.text,A,B=1,U="",R="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?A=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?A=this._css_beautify:L.custom_beautifier_name==="html"&&(A=function(Re,me){var Oe=new _(Re,me,G._js_beautify,G._css_beautify);return Oe.beautify()}),this._options.indent_scripts==="keep"?B=0:this._options.indent_scripts==="separate"&&(B=-F.indent_level);var K=F.get_full_indent(B);if(z=z.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&z[0]==="<"&&z.match(/^(<!--|<!\[CDATA\[)/)){var Z=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(z);if(!Z){F.add_raw_token(P);return}U=K+Z[1]+`
`,z=Z[4],Z[5]&&(R=K+Z[5]),z=z.replace(/\n[ \t]*$/,""),(Z[2]||Z[3].indexOf(`
`)!==-1)&&(Z=Z[3].match(/[ \t]+$/),Z&&(P.whitespace_before=Z[0]))}if(z)if(A){var ue=function(){this.eol=`
`};ue.prototype=this._options.raw_options;var de=new ue;z=A(K+z,de)}else{var Ce=P.whitespace_before;Ce&&(z=z.replace(new RegExp(`
(`+Ce+")?","g"),`
`)),z=K+z.replace(/\n/g,`
`+K)}U&&(z?z=U+z+`
`+R:z=U+R),F.print_newline(!1),z&&(P.text=z,P.whitespace_before="",P.newlines=0,F.add_raw_token(P),F.print_newline(!0))}},_.prototype._handle_tag_open=function(F,P,L,G){var z=this._get_tag_open_token(P);return(L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&P.type===f.TAG_OPEN&&P.text.indexOf("</")===0?(F.add_raw_token(P),z.start_tag_token=this._tag_stack.try_pop(z.tag_name)):(F.traverse_whitespace(P),this._set_tag_position(F,P,z,L,G),z.is_inline_element||F.set_wrap_point(),F.print_token(P)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(z.alignment_size=P.text.length+1),!z.tag_complete&&!z.is_unformatted&&(F.alignment_size=z.alignment_size),z};var E=function(F,P){if(this.parent=F||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!P)this.tag_complete=!0;else{var L;this.tag_start_char=P.text[0],this.text=P.text,this.tag_start_char==="<"?(L=P.text.match(/^<([^\s>]*)/),this.tag_check=L?L[1]:""):(L=P.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",(P.text.startsWith("{{#>")||P.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&P.next!==null?this.tag_check=P.next.text.split(" ")[0]:this.tag_check=P.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),P.type===f.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||P.closed&&P.closed.text==="/>";var G=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(G=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(G)))}};_.prototype._get_tag_open_token=function(F){var P=new E(this._tag_stack.get_parser_token(),F);return P.alignment_size=this._options.wrap_attributes_indent_size,P.is_end_tag=P.is_end_tag||p(P.tag_check,this._options.void_elements),P.is_empty_element=P.tag_complete||P.is_start_tag&&P.is_end_tag,P.is_unformatted=!P.tag_complete&&p(P.tag_check,this._options.unformatted),P.is_content_unformatted=!P.is_empty_element&&p(P.tag_check,this._options.content_unformatted),P.is_inline_element=p(P.tag_name,this._options.inline)||P.tag_name.includes("-")||P.tag_start_char==="{",P},_.prototype._set_tag_position=function(F,P,L,G,z){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||F.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=b(L.tag_check,P)))),p(L.tag_check,this._options.extra_liners)&&(F.print_newline(!1),F._output.just_added_blankline()||F.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var A=F.current_line_has_match(/{{#if/);A||F.print_newline(!1)}L.tag_name==="!--"&&z.type===f.TAG_CLOSE&&G.is_end_tag&&L.text.indexOf(`
`)===-1||(L.is_inline_element||L.is_unformatted||F.print_newline(!1),this._calcluate_parent_multiline(F,L))}else if(L.is_end_tag){var B=!1;B=L.start_tag_token&&L.start_tag_token.multiline_content,B=B||!L.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(z.type===f.TAG_CLOSE&&L.start_tag_token===G)&&z.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(B=!1),B&&F.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(z.type!=="TK_CONTENT"||L.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,L)},_.prototype._calcluate_parent_multiline=function(F,P){P.parent&&F._output.just_added_newline()&&!((P.is_inline_element||P.is_unformatted)&&P.parent.is_inline_element)&&(P.parent.multiline_content=!0)};var w=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],S=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(F){var P=null;if(F.is_empty_element||!F.is_start_tag||!F.parent)return;if(F.tag_name==="body")P=P||this._tag_stack.try_pop("head");else if(F.tag_name==="li")P=P||this._tag_stack.try_pop("li",["ol","ul"]);else if(F.tag_name==="dd"||F.tag_name==="dt")P=P||this._tag_stack.try_pop("dt",["dl"]),P=P||this._tag_stack.try_pop("dd",["dl"]);else if(F.parent.tag_name==="p"&&w.indexOf(F.tag_name)!==-1){var L=F.parent.parent;(!L||S.indexOf(L.tag_name)===-1)&&(P=P||this._tag_stack.try_pop("p"))}else F.tag_name==="rp"||F.tag_name==="rt"?(P=P||this._tag_stack.try_pop("rt",["ruby","rtc"]),P=P||this._tag_stack.try_pop("rp",["ruby","rtc"])):F.tag_name==="optgroup"?P=P||this._tag_stack.try_pop("optgroup",["select"]):F.tag_name==="option"?P=P||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):F.tag_name==="colgroup"?P=P||this._tag_stack.try_pop("caption",["table"]):F.tag_name==="thead"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"])):F.tag_name==="tbody"||F.tag_name==="tfoot"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("thead",["table"]),P=P||this._tag_stack.try_pop("tbody",["table"])):F.tag_name==="tr"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(F.tag_name==="th"||F.tag_name==="td")&&(P=P||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),P=P||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return F.parent=this._tag_stack.get_parser_token(),P},i.exports.Beautifier=_},function(i,c,a){var n=a(6).Options;function s(d){n.call(this,d,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}s.prototype=new n,i.exports.Options=s},function(i,c,a){var n=a(9).Tokenizer,s=a(9).TOKEN,d=a(13).Directives,f=a(14).TemplatablePattern,l=a(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:s.START,RAW:s.RAW,EOF:s.EOF},r=new d(/<\!--/,/-->/),x=function(b,p){n.call(this,b,p),this._current_tag_name="";var I=new f(this._input).read_options(this._options),O=new l(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:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(/<!--/).until_after(/-->/),cdata:O.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:O.starting_with(/<!\[/).until_after(/]>/),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(_).until_after(_)}};x.prototype=new n,x.prototype._is_comment=function(b){return!1},x.prototype._is_opening=function(b){return b.type===o.TAG_OPEN},x.prototype._is_closing=function(b,p){return b.type===o.TAG_CLOSE&&p&&((b.text===">"||b.text==="/>")&&p.text[0]==="<"||b.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},x.prototype._reset=function(){this._current_tag_name=""},x.prototype._get_next_token=function(b,p){var I=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(o.EOF,""):(I=I||this._read_open_handlebars(O,p),I=I||this._read_attribute(O,b,p),I=I||this._read_close(O,p),I=I||this._read_raw_content(O,b,p),I=I||this._read_content_word(O),I=I||this._read_comment_or_cdata(O),I=I||this._read_processing(O),I=I||this._read_open(O,p),I=I||this._create_token(o.UNKNOWN,this._input.next()),I)},x.prototype._read_comment_or_cdata=function(b){var p=null,I=null,O=null;if(b==="<"){var _=this._input.peek(1);_==="!"&&(I=this.__patterns.comment.read(),I?(O=r.get_directives(I),O&&O.ignore==="start"&&(I+=r.readIgnored(this._input))):I=this.__patterns.cdata.read()),I&&(p=this._create_token(o.COMMENT,I),p.directives=O)}return p},x.prototype._read_processing=function(b){var p=null,I=null,O=null;if(b==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(I=this.__patterns.conditional_comment.read(),I=I||this.__patterns.processing.read()),I&&(p=this._create_token(o.COMMENT,I),p.directives=O)}return p},x.prototype._read_open=function(b,p){var I=null,O=null;return p||b==="<"&&(I=this._input.next(),this._input.peek()==="/"&&(I+=this._input.next()),I+=this.__patterns.element_name.read(),O=this._create_token(o.TAG_OPEN,I)),O},x.prototype._read_open_handlebars=function(b,p){var I=null,O=null;return p||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(I=this.__patterns.handlebars_comment.read(),I=I||this.__patterns.handlebars.read(),O=this._create_token(o.COMMENT,I)):(I=this.__patterns.handlebars_open.read(),O=this._create_token(o.TAG_OPEN,I))),O},x.prototype._read_close=function(b,p){var I=null,O=null;return p&&(p.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(I=this._input.next(),b==="/"&&(I+=this._input.next()),O=this._create_token(o.TAG_CLOSE,I)):p.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(o.TAG_CLOSE,"}}"))),O},x.prototype._read_attribute=function(b,p,I){var O=null,_="";if(I&&I.text[0]==="<")if(b==="=")O=this._create_token(o.EQUALS,this._input.next());else if(b==='"'||b==="'"){var E=this._input.next();b==='"'?E+=this.__patterns.double_quote.read():E+=this.__patterns.single_quote.read(),O=this._create_token(o.VALUE,E)}else _=this.__patterns.attribute.read(),_&&(p.type===o.EQUALS?O=this._create_token(o.VALUE,_):O=this._create_token(o.ATTRIBUTE,_));return O},x.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},x.prototype._read_raw_content=function(b,p,I){var O="";if(I&&I.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(p.type===o.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var _=p.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var E=this._read_comment_or_cdata(b);if(E)return E.type=o.TEXT,E;O=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(O=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return O?this._create_token(o.TEXT,O):null},x.prototype._read_content_word=function(b){var p="";if(this._options.unformatted_content_delimiter&&(b===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)},i.exports.Tokenizer=x,i.exports.TOKEN=o}],y={};function t(i){var c=y[i];if(c!==void 0)return c.exports;var a=y[i]={exports:{}};return T[i](a,a.exports,t),a.exports}var h=t(18);C=h})();var N=C;if(!0)!(M=[D,D("6UM0"),D("TXwP")],g=function(T){var y=D("6UM0"),t=D("TXwP");return{html_beautify:function(h,i){return N(h,i,y.js_beautify,t.css_beautify)}}}.apply(J,M),g!==void 0&&(H.exports=g));else var m,v})()},qBft:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.pad.AnsiX923={pad:function(g,C){var N=g.sigBytes,m=C*4,v=m-N%m,T=N+v-1;g.clamp(),g.words[T>>>2]|=v<<24-T%4*8,g.sigBytes+=v},unpad:function(g){var C=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=C}},M.pad.Ansix923})},qHvr:function(H,J,D){"use strict";var M=D("2qtc"),g=D("kLXV"),C=D("5NDa"),N=D("5rEg"),m=D("miYZ"),v=D("tsqr"),T=D("tJVT"),y=D("q1tI"),t=D.n(y),h=D("4i/N");function i(c){var a=c.isAddmodle,n=c.setIsAdd,s=c.createTeam,d=Object(y.useState)(""),f=Object(T.a)(d,2),l=f[0],o=f[1];return t.a.createElement(g.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),t.a.createElement(h.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:a,closable:!1,destroyOnClose:!0,onOk:function(){if(!l){v.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}s(l)},onCancel:function(){return n(!1)}},t.a.createElement("div",null,t.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},t.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:l,maxLength:60,addonAfter:String(l&&l.length||0)+"/60",onChange:function(x){return o(x.target.value)}}))))}J.a=i},qM6L:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.WordArray,m=g.enc,v=m.Utf16=m.Utf16BE={stringify:function(y){for(var t=y.words,h=y.sigBytes,i=[],c=0;c<h;c+=2){var a=t[c>>>2]>>>16-c%4*8&65535;i.push(String.fromCharCode(a))}return i.join("")},parse:function(y){for(var t=y.length,h=[],i=0;i<t;i++)h[i>>>1]|=y.charCodeAt(i)<<16-i%2*16;return N.create(h,t*2)}};m.Utf16LE={stringify:function(y){for(var t=y.words,h=y.sigBytes,i=[],c=0;c<h;c+=2){var a=T(t[c>>>2]>>>16-c%4*8&65535);i.push(String.fromCharCode(a))}return i.join("")},parse:function(y){for(var t=y.length,h=[],i=0;i<t;i++)h[i>>>1]|=T(y.charCodeAt(i)<<16-i%2*16);return N.create(h,t*2)}};function T(y){return y<<8&4278255360|y>>>8&16711935}}(),M.enc.Utf16})},qu8F:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return M.mode.CTRGladman=function(){var g=M.lib.BlockCipherMode.extend();function C(v){if((v>>24&255)===255){var T=v>>16&255,y=v>>8&255,t=v&255;T===255?(T=0,y===255?(y=0,t===255?t=0:++t):++y):++T,v=0,v+=T<<16,v+=y<<8,v+=t}else v+=1<<24;return v}function N(v){return(v[0]=C(v[0]))===0&&(v[1]=C(v[1])),v}var m=g.Encryptor=g.extend({processBlock:function(v,T){var y=this._cipher,t=y.blockSize,h=this._iv,i=this._counter;h&&(i=this._counter=h.slice(0),this._iv=void 0),N(i);var c=i.slice(0);y.encryptBlock(c,0);for(var a=0;a<t;a++)v[T+a]^=c[a]}});return g.Decryptor=m,g}(),M.mode.CTRGladman})},"rAM+":function(H,J,D){"use strict";D.d(J,"a",function(){return g});var M=D("Qw5x");function g(C,N){var m;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(m=Object(M.a)(C))||N&&C&&typeof C.length=="number"){m&&(C=m);var v=0,T=function(){};return{s:T,n:function(){return v>=C.length?{done:!0}:{done:!1,value:C[v++]}},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 y=!0,t=!1,h;return{s:function(){m=C[Symbol.iterator]()},n:function(){var c=m.next();return y=c.done,c},e:function(c){t=!0,h=c},f:function(){try{!y&&m.return!=null&&m.return()}finally{if(t)throw h}}}}},rUJ1:function(H,J){const D=/[&<>"']/,M=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m=O=>N[O];function v(O,_){if(_){if(D.test(O))return O.replace(M,m)}else if(g.test(O))return O.replace(C,m);return O}const T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(O){return O.replace(T,(_,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const t=/(^|[^\[])\^/g;function h(O,_){O=O.source||O,_=_||"";const E={replace:(w,S)=>(S=S.source||S,S=S.replace(t,"$1"),O=O.replace(w,S),E),getRegex:()=>new RegExp(O,_)};return E}const i=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(O,_,E){if(O){let w;try{w=decodeURIComponent(y(E)).replace(i,"").toLowerCase()}catch(S){return null}if(w.indexOf("javascript:")===0||w.indexOf("vbscript:")===0||w.indexOf("data:")===0)return null}_&&!c.test(E)&&(E=l(_,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(w){return null}return E}const n={},s=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(O,_){n[" "+O]||(s.test(O)?n[" "+O]=O+"/":n[" "+O]=b(O,"/",!0)),O=n[" "+O];const E=O.indexOf(":")===-1;return _.substring(0,2)==="//"?E?_:O.replace(d,"$1")+_:_.charAt(0)==="/"?E?_:O.replace(f,"$1")+_:O+_}const o={exec:function(){}};function r(O){let _=1,E,w;for(;_<arguments.length;_++){E=arguments[_];for(w in E)Object.prototype.hasOwnProperty.call(E,w)&&(O[w]=E[w])}return O}function x(O,_){const E=O.replace(/\|/g,(F,P,L)=>{let G=!1,z=P;for(;--z>=0&&L[z]==="\\";)G=!G;return G?"|":" |"}),w=E.split(/ \|/);let S=0;if(w.length>_)w.splice(_);else for(;w.length<_;)w.push("");for(;S<w.length;S++)w[S]=w[S].trim().replace(/\\\|/g,"|");return w}function b(O,_,E){const w=O.length;if(w===0)return"";let S=0;for(;S<w;){const F=O.charAt(w-S-1);if(F===_&&!E)S++;else if(F!==_&&E)S++;else break}return O.substr(0,w-S)}function p(O,_){if(O.indexOf(_[1])===-1)return-1;const E=O.length;let w=0,S=0;for(;S<E;S++)if(O[S]==="\\")S++;else if(O[S]===_[0])w++;else if(O[S]===_[1]&&(w--,w<0))return S;return-1}function I(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}H.exports={escape:v,unescape:y,edit:h,cleanUrl:a,resolveUrl:l,noopTest:o,merge:r,splitCells:x,rtrim:b,findClosingBracket:p,checkSanitizeDeprecation:I}},sR1s:function(H,J,D){"use strict";D.d(J,"b",function(){return N}),D.d(J,"a",function(){return m}),D.d(J,"c",function(){return v}),D.d(J,"d",function(){return T});var M=D("U8pU"),g="RC_TABLE_KEY";function C(y){return y==null?[]:Array.isArray(y)?y:[y]}function N(y,t){if(!t&&typeof t!="number")return y;for(var h=C(t),i=y,c=0;c<h.length;c+=1){if(!i)return null;var a=h[c];i=i[a]}return i}function m(y){var t=[],h={};return y.forEach(function(i){for(var c=i||{},a=c.key,n=c.dataIndex,s=a||C(n).join("-")||g;h[s];)s="".concat(s,"_next");h[s]=!0,t.push(s)}),t}function v(){var y={};function t(a,n){n&&Object.keys(n).forEach(function(s){var d=n[s];d&&Object(M.a)(d)==="object"?(a[s]=a[s]||{},t(a[s],d)):a[s]=d})}for(var h=arguments.length,i=new Array(h),c=0;c<h;c++)i[c]=arguments[c];return i.forEach(function(a){t(y,a)}),y}function T(y){return y!=null}},sboe:function(H,J,D){"use strict";D.d(J,"a",function(){return C});var M=D("q1tI"),g=D.n(M),C=M.createContext(null)},t23M:function(H,J,D){"use strict";var M=D("VTBJ"),g=D("1OyB"),C=D("vuIU"),N=D("Ji7U"),m=D("LK+K"),v=D("q1tI"),T=D.n(v),y=D("m+aA"),t=D("Zm9Q"),h=D("Kwbf"),i=D("c+Xe"),c=D("bdgK"),a="rc-observer-key",n=function(s){Object(N.a)(f,s);var d=Object(m.a)(f);function f(){var l;return Object(g.a)(this,f),l=d.apply(this,arguments),l.resizeObserver=null,l.childNode=null,l.currentElement=null,l.state={width:0,height:0,offsetHeight:0,offsetWidth:0},l.onResize=function(o){var r=l.props.onResize,x=o[0].target,b=x.getBoundingClientRect(),p=b.width,I=b.height,O=x.offsetWidth,_=x.offsetHeight,E=Math.floor(p),w=Math.floor(I);if(l.state.width!==E||l.state.height!==w||l.state.offsetWidth!==O||l.state.offsetHeight!==_){var S={width:E,height:w,offsetWidth:O,offsetHeight:_};l.setState(S),r&&Promise.resolve().then(function(){r(Object(M.a)(Object(M.a)({},S),{},{offsetWidth:O,offsetHeight:_}))})}},l.setChildNode=function(o){l.childNode=o},l}return Object(C.a)(f,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var o=this.props.disabled;if(o){this.destroyObserver();return}var r=Object(y.a)(this.childNode||this),x=r!==this.currentElement;x&&(this.destroyObserver(),this.currentElement=r),!this.resizeObserver&&r&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(r))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var o=this.props.children,r=Object(t.a)(o);if(r.length>1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(r.length===0)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var x=r[0];if(v.isValidElement(x)&&Object(i.c)(x)){var b=x.ref;r[0]=v.cloneElement(x,{ref:Object(i.a)(b,this.setChildNode)})}return r.length===1?r[0]:r.map(function(p,I){return!v.isValidElement(p)||"key"in p&&p.key!==null?p:v.cloneElement(p,{key:"".concat(a,"-").concat(I)})})}}]),f}(v.Component);n.displayName="ResizeObserver",J.a=n},t9D7:function(H,J,D){"use strict";D.d(J,"b",function(){return T}),D.d(J,"g",function(){return t}),D.d(J,"d",function(){return h}),D.d(J,"e",function(){return i}),D.d(J,"a",function(){return c}),D.d(J,"f",function(){return s}),D.d(J,"c",function(){return d});var M=D("Vhoy"),g=D("MI8n"),C=D("pmY6"),N=D("Cg/j"),m=D("ic2d"),v=D("nEHx");const T=Object(N.c)("themeService");var y;(function(f){function l(o){return o&&typeof o=="object"&&typeof o.id=="string"}f.isThemeColor=l})(y||(y={}));function t(f){return{id:f}}var h;(function(f){function l(I){return I&&typeof I=="object"&&typeof I.id=="string"&&(typeof I.color=="undefined"||y.isThemeColor(I.color))}f.isThemeIcon=l;const o=new RegExp(`^\\$\\((${M.a.iconNameExpression}(?:${M.a.iconModifierExpression})?)\\)$`);function r(I){const O=o.exec(I);if(!O)return;let[,_]=O;return{id:_}}f.fromString=r;function x(I,O){let _=I.id;const E=_.lastIndexOf("~");return E!==-1&&(_=_.substring(0,E)),O&&(_=`${_}~${O}`),{id:_}}f.modify=x;function b(I,O){var _,E;return I.id===O.id&&((_=I.color)===null||_===void 0?void 0:_.id)===((E=O.color)===null||E===void 0?void 0:E.id)}f.isEqual=b;function p(I,O){return{id:I.id,color:O?t(O):void 0}}f.asThemeIcon=p,f.asClassNameArray=M.a.asClassNameArray,f.asClassName=M.a.asClassName,f.asCSSSelector=M.a.asCSSSelector})(h||(h={}));function i(f){switch(f){case v.a.DARK:return"vs-dark";case v.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"};class a{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new g.b}onColorThemeChange(f){return this.themingParticipants.push(f),this.onThemingParticipantAddedEmitter.fire(f),Object(C.i)(()=>{const l=this.themingParticipants.indexOf(f);this.themingParticipants.splice(l,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new a;m.a.add(c.ThemingContribution,n);function s(f){return n.onColorThemeChange(f)}class d extends C.a{constructor(f){super();this.themeService=f,this.theme=f.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(l=>this.onThemeChange(l)))}onThemeChange(f){this.theme=f,this.updateStyles()}updateStyles(){}}},uGsb:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"),D("1uat"))})(this,function(M){return function(){var g=M,C=g.x64,N=C.Word,m=C.WordArray,v=g.algo,T=v.SHA512,y=v.SHA384=T.extend({_doReset:function(){this._hash=new m.init([new N.init(3418070365,3238371032),new N.init(1654270250,914150663),new N.init(2438529370,812702999),new N.init(355462360,4144912697),new N.init(1731405415,4290775857),new N.init(2394180231,1750603025),new N.init(3675008525,1694076839),new N.init(1203062813,3204075428)])},_doFinalize:function(){var t=T._doFinalize.call(this);return t.sigBytes-=16,t}});g.SHA384=T._createHelper(y),g.HmacSHA384=T._createHmacHelper(y)}(),M.SHA384})},uGxW:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(M){return M.pad.NoPadding={pad:function(){},unpad:function(){}},M.pad.NoPadding})},uK0f:function(H,J,D){(function(M,g){H.exports=g()})(this,function(){"use strict";function M(g,C,N){N=N||{},N.childrenKeyName=N.childrenKeyName||"children";var m=g||[],v=[],T=0;do{var y=m.filter(function(t){return C(t,T)})[0];if(!y)break;v.push(y),m=y[N.childrenKeyName]||[],T+=1}while(m.length>0);return v}return M})},ulZh:function(H,J,D){typeof window!="undefined"&&function(g,C){H.exports=C()}(this,function(){return function(M){var g={};function C(N){if(g[N])return g[N].exports;var m=g[N]={i:N,l:!1,exports:{}};return M[N].call(m.exports,m,m.exports,C),m.l=!0,m.exports}return C.m=M,C.c=g,C.d=function(N,m,v){C.o(N,m)||Object.defineProperty(N,m,{enumerable:!0,get:v})},C.r=function(N){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},C.t=function(N,m){if(m&1&&(N=C(N)),m&8)return N;if(m&4&&typeof N=="object"&&N&&N.__esModule)return N;var v=Object.create(null);if(C.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:N}),m&2&&typeof N!="string")for(var T in N)C.d(v,T,function(y){return N[y]}.bind(null,T));return v},C.n=function(N){var m=N&&N.__esModule?function(){return N.default}:function(){return N};return C.d(m,"a",m),m},C.o=function(N,m){return Object.prototype.hasOwnProperty.call(N,m)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(M,g,C){"use strict";var N=Object.prototype.hasOwnProperty,m="~";function v(){}Object.create&&(v.prototype=Object.create(null),new v().__proto__||(m=!1));function T(i,c,a){this.fn=i,this.context=c,this.once=a||!1}function y(i,c,a,n,s){if(typeof a!="function")throw new TypeError("The listener must be a function");var d=new T(a,n||i,s),f=m?m+c:c;return i._events[f]?i._events[f].fn?i._events[f]=[i._events[f],d]:i._events[f].push(d):(i._events[f]=d,i._eventsCount++),i}function t(i,c){--i._eventsCount===0?i._events=new v:delete i._events[c]}function h(){this._events=new v,this._eventsCount=0}h.prototype.eventNames=function(){var c=[],a,n;if(this._eventsCount===0)return c;for(n in a=this._events)N.call(a,n)&&c.push(m?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},h.prototype.listeners=function(c){var a=m?m+c:c,n=this._events[a];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,d=n.length,f=new Array(d);s<d;s++)f[s]=n[s].fn;return f},h.prototype.listenerCount=function(c){var a=m?m+c:c,n=this._events[a];return n?n.fn?1:n.length:0},h.prototype.emit=function(c,a,n,s,d,f){var l=m?m+c:c;if(!this._events[l])return!1;var o=this._events[l],r=arguments.length,x,b;if(o.fn){o.once&&this.removeListener(c,o.fn,void 0,!0);switch(r){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,a),!0;case 3:return o.fn.call(o.context,a,n),!0;case 4:return o.fn.call(o.context,a,n,s),!0;case 5:return o.fn.call(o.context,a,n,s,d),!0;case 6:return o.fn.call(o.context,a,n,s,d,f),!0}for(b=1,x=new Array(r-1);b<r;b++)x[b-1]=arguments[b];o.fn.apply(o.context,x)}else{var p=o.length,I;for(b=0;b<p;b++){o[b].once&&this.removeListener(c,o[b].fn,void 0,!0);switch(r){case 1:o[b].fn.call(o[b].context);break;case 2:o[b].fn.call(o[b].context,a);break;case 3:o[b].fn.call(o[b].context,a,n);break;case 4:o[b].fn.call(o[b].context,a,n,s);break;default:if(!x)for(I=1,x=new Array(r-1);I<r;I++)x[I-1]=arguments[I];o[b].fn.apply(o[b].context,x)}}}return!0},h.prototype.on=function(c,a,n){return y(this,c,a,n,!1)},h.prototype.once=function(c,a,n){return y(this,c,a,n,!0)},h.prototype.removeListener=function(c,a,n,s){var d=m?m+c:c;if(!this._events[d])return this;if(!a)return t(this,d),this;var f=this._events[d];if(f.fn)f.fn===a&&(!s||f.once)&&(!n||f.context===n)&&t(this,d);else{for(var l=0,o=[],r=f.length;l<r;l++)(f[l].fn!==a||s&&!f[l].once||n&&f[l].context!==n)&&o.push(f[l]);o.length?this._events[d]=o.length===1?o[0]:o:t(this,d)}return this},h.prototype.removeAllListeners=function(c){var a;return c?(a=m?m+c:c,this._events[a]&&t(this,a)):(this._events=new v,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=m,h.EventEmitter=h,M.exports=h},"./node_modules/url-toolkit/src/url-toolkit.js":function(M,g,C){(function(N){var m=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,v=/^([^\/?#]*)([^]*)$/,T=/(?:\/|^)\.(?=\/)/g,y=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(h,i,c){if(c=c||{},h=h.trim(),i=i.trim(),!i){if(!c.alwaysNormalize)return h;var a=t.parseURL(h);if(!a)throw new Error("Error trying to parse base URL.");return a.path=t.normalizePath(a.path),t.buildURLFromParts(a)}var n=t.parseURL(i);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return c.alwaysNormalize?(n.path=t.normalizePath(n.path),t.buildURLFromParts(n)):i;var s=t.parseURL(h);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var d=v.exec(s.path);s.netLoc=d[1],s.path=d[2]}s.netLoc&&!s.path&&(s.path="/");var f={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(f.netLoc=s.netLoc,n.path[0]!=="/"))if(!n.path)f.path=s.path,n.params||(f.params=s.params,n.query||(f.query=s.query));else{var l=s.path,o=l.substring(0,l.lastIndexOf("/")+1)+n.path;f.path=t.normalizePath(o)}return f.path===null&&(f.path=c.alwaysNormalize?t.normalizePath(n.path):n.path),t.buildURLFromParts(f)},parseURL:function(h){var i=m.exec(h);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(T,"");h.length!==(h=h.replace(y,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};M.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(M,g,C){function N(c){var a={};function n(d){if(a[d])return a[d].exports;var f=a[d]={i:d,l:!1,exports:{}};return c[d].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.m=c,n.c=a,n.i=function(d){return d},n.d=function(d,f,l){n.o(d,f)||Object.defineProperty(d,f,{configurable:!1,enumerable:!0,get:l})},n.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},n.n=function(d){var f=d&&d.__esModule?function(){return d.default}:function(){return d};return n.d(f,"a",f),f},n.o=function(d,f){return Object.prototype.hasOwnProperty.call(d,f)},n.p="/",n.oe=function(d){throw console.error(d),d};var s=n(n.s=ENTRY_MODULE);return s.default||s}var m="[\\.|\\-|\\+|\\w|/|@]+",v="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+m+").*?\\)";function T(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function y(c){return!isNaN(1*c)}function t(c,a,n){var s={};s[n]=[];var d=a.toString(),f=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!f)return s;for(var l=f[1],o=new RegExp("(\\\\n|\\W)"+T(l)+v,"g"),r;r=o.exec(d);){if(r[3]==="dll-reference")continue;s[n].push(r[3])}for(o=new RegExp("\\("+T(l)+'\\("(dll-reference\\s('+m+'))"\\)\\)'+v,"g");r=o.exec(d);)c[r[2]]||(s[n].push(r[1]),c[r[2]]=C(r[1]).m),s[r[2]]=s[r[2]]||[],s[r[2]].push(r[4]);for(var x=Object.keys(s),b=0;b<x.length;b++)for(var p=0;p<s[x[b]].length;p++)y(s[x[b]][p])&&(s[x[b]][p]=1*s[x[b]][p]);return s}function h(c){var a=Object.keys(c);return a.reduce(function(n,s){return n||c[s].length>0},!1)}function i(c,a){for(var n={main:[a]},s={main:[]},d={main:{}};h(n);)for(var f=Object.keys(n),l=0;l<f.length;l++){var o=f[l],r=n[o],x=r.pop();if(d[o]=d[o]||{},d[o][x]||!c[o][x])continue;d[o][x]=!0,s[o]=s[o]||[],s[o].push(x);for(var b=t(c,c[o][x],o),p=Object.keys(b),I=0;I<p.length;I++)n[p[I]]=n[p[I]]||[],n[p[I]]=n[p[I]].concat(b[p[I]])}return s}M.exports=function(c,a){a=a||{};var n={main:C.m},s=a.all?{main:Object.keys(n.main)}:i(n,c),d="";Object.keys(s).filter(function(x){return x!=="main"}).forEach(function(x){for(var b=0;s[x][b];)b++;s[x].push(b),n[x][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+"var "+x+" = ("+N.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+s[x].map(function(p){return""+JSON.stringify(p)+": "+n[x][p].toString()}).join(",")+`});
`}),d=d+"new (("+N.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+s.main.map(function(x){return""+JSON.stringify(x)+": "+n.main[x].toString()}).join(",")+"}))(self);";var f=new window.Blob([d],{type:"text/javascript"});if(a.bare)return f;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,o=l.createObjectURL(f),r=new window.Worker(o);return r.objectURL=o,r}},"./src/config.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"hlsDefaultConfig",function(){return I}),C.d(g,"mergeConfig",function(){return _}),C.d(g,"enableStreamingMode",function(){return E});var N=C("./src/controller/abr-controller.ts"),m=C("./src/controller/audio-stream-controller.ts"),v=C("./src/controller/audio-track-controller.ts"),T=C("./src/controller/subtitle-stream-controller.ts"),y=C("./src/controller/subtitle-track-controller.ts"),t=C("./src/controller/buffer-controller.ts"),h=C("./src/controller/timeline-controller.ts"),i=C("./src/controller/cap-level-controller.ts"),c=C("./src/controller/fps-controller.ts"),a=C("./src/controller/eme-controller.ts"),n=C("./src/controller/cmcd-controller.ts"),s=C("./src/utils/xhr-loader.ts"),d=C("./src/utils/fetch-loader.ts"),f=C("./src/utils/cues.ts"),l=C("./src/utils/mediakeys-helper.ts"),o=C("./src/utils/logger.ts");function r(){return r=Object.assign||function(w){for(var S=1;S<arguments.length;S++){var F=arguments[S];for(var P in F)Object.prototype.hasOwnProperty.call(F,P)&&(w[P]=F[P])}return w},r.apply(this,arguments)}function x(w,S){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);S&&(P=P.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),F.push.apply(F,P)}return F}function b(w){for(var S=1;S<arguments.length;S++){var F=arguments[S]!=null?arguments[S]:{};S%2?x(Object(F),!0).forEach(function(P){p(w,P,F[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):x(Object(F)).forEach(function(P){Object.defineProperty(w,P,Object.getOwnPropertyDescriptor(F,P))})}return w}function p(w,S,F){return S in w?Object.defineProperty(w,S,{value:F,enumerable:!0,configurable:!0,writable:!0}):w[S]=F,w}var I=b(b({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:N.default,bufferController:t.default,capLevelController:i.default,fpsController:c.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:l.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:T.SubtitleStreamController,subtitleTrackController:y.default,timelineController:h.TimelineController,audioStreamController:m.default,audioTrackController:v.default,emeController:a.default,cmcdController:n.default});function O(){return{cueHandler:f.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function _(w,S){if((S.liveSyncDurationCount||S.liveMaxLatencyDurationCount)&&(S.liveSyncDuration||S.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(S.liveMaxLatencyDurationCount!==void 0&&(S.liveSyncDurationCount===void 0||S.liveMaxLatencyDurationCount<=S.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(S.liveMaxLatencyDuration!==void 0&&(S.liveSyncDuration===void 0||S.liveMaxLatencyDuration<=S.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return r({},w,S)}function E(w){var S=w.loader;if(S!==d.default&&S!==s.default)o.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),w.progressive=!1;else{var F=Object(d.fetchSupported)();F&&(w.loader=d.default,w.progressive=!0,w.enableSoftwareAES=!0,o.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/polyfills/number.ts"),m=C("./src/utils/ewma-bandwidth-estimator.ts"),v=C("./src/events.ts"),T=C("./src/utils/buffer-helper.ts"),y=C("./src/errors.ts"),t=C("./src/types/loader.ts"),h=C("./src/utils/logger.ts");function i(n,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function c(n,s,d){return s&&i(n.prototype,s),d&&i(n,d),n}var a=function(){function n(d){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=d;var f=d.config;this.bwEstimator=new m.default(f.abrEwmaSlowVoD,f.abrEwmaFastVoD,f.abrEwmaDefaultEstimate),this.registerListeners()}var s=n.prototype;return s.registerListeners=function(){var f=this.hls;f.on(v.Events.FRAG_LOADING,this.onFragLoading,this),f.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),f.on(v.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.on(v.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(v.Events.FRAG_LOADING,this.onFragLoading,this),f.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(v.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.off(v.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(f,l){var o=l.frag;if(o.type===t.PlaylistLevelType.MAIN&&!this.timer){var r;this.fragCurrent=o,this.partCurrent=(r=l.part)!=null?r:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(f,l){var o=this.hls.config;l.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var f=this.fragCurrent,l=this.partCurrent,o=this.hls,r=o.autoLevelEnabled,x=o.config,b=o.media;if(!f||!b)return;var p=l?l.stats:f.stats,I=l?l.duration:f.duration;if(p.aborted){h.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!r||b.paused||!b.playbackRate||!b.readyState)return;var O=performance.now()-p.loading.start,_=Math.abs(b.playbackRate);if(O<=500*I/_)return;var E=o.levels,w=o.minAutoLevel,S=E[f.level],F=p.total||Math.max(p.loaded,Math.round(I*S.maxBitrate/8)),P=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/O),L=(F-p.loaded)/P,G=b.currentTime,z=(T.BufferHelper.bufferInfo(b,G,x.maxBufferHole).end-G)/_;if(z>=2*I/_||L<=z)return;var A=Number.POSITIVE_INFINITY,B;for(B=f.level-1;B>w;B--){var U=E[B].maxBitrate;if(A=I*U/(8*.8*P),A<z)break}if(A>=L)return;var R=this.bwEstimator.getEstimate();h.logger.warn("Fragment "+f.sn+(l?" part "+l.index:"")+" of level "+f.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+B+`
Current BW estimate: `+(Object(N.isFiniteNumber)(R)?(R/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+L.toFixed(3)+` s
Estimated load time for the next fragment: `+A.toFixed(3)+` s
Time to underbuffer: `+z.toFixed(3)+" s"),o.nextLoadLevel=B,this.bwEstimator.sample(O,p.loaded),this.clearTimer(),f.loader&&(this.fragCurrent=this.partCurrent=null,f.loader.abort()),o.trigger(v.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:f,part:l,stats:p})},s.onFragLoaded=function(f,l){var o=l.frag,r=l.part;if(o.type===t.PlaylistLevelType.MAIN&&Object(N.isFiniteNumber)(o.sn)){var x=r?r.stats:o.stats,b=r?r.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)+x.loaded,O=(p.loaded?p.loaded.duration:0)+b;p.loaded={bytes:I,duration:O},p.realBitrate=Math.round(8*I/O)}if(o.bitrateTest){var _={stats:x,frag:o,part:r,id:o.type};this.onFragBuffered(v.Events.FRAG_BUFFERED,_),o.bitrateTest=!1}}},s.onFragBuffered=function(f,l){var o=l.frag,r=l.part,x=r?r.stats:o.stats;if(x.aborted)return;if(o.type!==t.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var b=x.parsing.end-x.loading.start;this.bwEstimator.sample(b,x.loaded),x.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},s.onError=function(f,l){switch(l.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var f=this.fragCurrent,l=this.partCurrent,o=this.hls,r=o.maxAutoLevel,x=o.config,b=o.minAutoLevel,p=o.media,I=l?l.duration:f?f.duration:0,O=p?p.currentTime:0,_=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():x.abrEwmaDefaultEstimate,w=(T.BufferHelper.bufferInfo(p,O,x.maxBufferHole).end-O)/_,S=this.findBestLevel(E,b,r,w,x.abrBandWidthFactor,x.abrBandWidthUpFactor);if(S>=0)return S;h.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=I?Math.min(I,x.maxStarvationDelay):x.maxStarvationDelay,P=x.abrBandWidthFactor,L=x.abrBandWidthUpFactor;if(!w){var G=this.bitrateTestDelay;if(G){var z=I?Math.min(I,x.maxLoadingDelay):x.maxLoadingDelay;F=z-G,h.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),P=L=1}}return S=this.findBestLevel(E,b,r,w+F,P,L),Math.max(S,0)},s.findBestLevel=function(f,l,o,r,x,b){for(var p,I=this.fragCurrent,O=this.partCurrent,_=this.lastLoadedFragLevel,E=this.hls.levels,w=E[_],S=!!(w!=null&&(p=w.details)!==null&&p!==void 0&&p.live),F=w==null?void 0:w.codecSet,P=O?O.duration:I?I.duration:0,L=o;L>=l;L--){var G=E[L];if(!G||F&&G.codecSet!==F)continue;var z=G.details,A=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||P,B=void 0;L<=_?B=x*f:B=b*f;var U=E[L].maxBitrate,R=U*A/B;if(h.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+L+"/"+Math.round(B)+"/"+U+"/"+A+"/"+r+"/"+R),B>U&&(!R||S&&!this.bitrateTestDelay||R<r))return L}return-1},c(n,[{key:"nextAutoLevel",get:function(){var f=this._nextAutoLevel,l=this.bwEstimator;if(f!==-1&&(!l||!l.canEstimate()))return f;var o=this.getNextABRAutoLevel();return f!==-1&&(o=Math.min(f,o)),o},set:function(f){this._nextAutoLevel=f}}]),n}();g.default=a},"./src/controller/audio-stream-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/polyfills/number.ts"),m=C("./src/controller/base-stream-controller.ts"),v=C("./src/events.ts"),T=C("./src/utils/buffer-helper.ts"),y=C("./src/controller/fragment-tracker.ts"),t=C("./src/types/level.ts"),h=C("./src/types/loader.ts"),i=C("./src/loader/fragment.ts"),c=C("./src/demux/chunk-cache.ts"),a=C("./src/demux/transmuxer-interface.ts"),n=C("./src/types/transmuxer.ts"),s=C("./src/controller/fragment-finders.ts"),d=C("./src/utils/discontinuities.ts"),f=C("./src/errors.ts"),l=C("./src/utils/logger.ts");function o(){return o=Object.assign||function(I){for(var O=1;O<arguments.length;O++){var _=arguments[O];for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(I[E]=_[E])}return I},o.apply(this,arguments)}function r(I,O){I.prototype=Object.create(O.prototype),I.prototype.constructor=I,x(I,O)}function x(I,O){return x=Object.setPrototypeOf||function(E,w){return E.__proto__=w,E},x(I,O)}var b=100,p=function(I){r(O,I);function O(E,w){var S;return S=I.call(this,E,w,"[audio-stream-controller]")||this,S.videoBuffer=null,S.videoTrackCC=-1,S.waitingVideoCC=-1,S.audioSwitch=!1,S.trackId=-1,S.waitingData=null,S.mainDetails=null,S.bufferFlushed=!1,S._registerListeners(),S}var _=O.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var w=this.hls;w.on(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(v.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.on(v.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.on(v.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.on(v.Events.ERROR,this.onError,this),w.on(v.Events.BUFFER_RESET,this.onBufferReset,this),w.on(v.Events.BUFFER_CREATED,this.onBufferCreated,this),w.on(v.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.on(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.on(v.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var w=this.hls;w.off(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(v.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.off(v.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.off(v.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.off(v.Events.ERROR,this.onError,this),w.off(v.Events.BUFFER_RESET,this.onBufferReset,this),w.off(v.Events.BUFFER_CREATED,this.onBufferCreated,this),w.off(v.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.off(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.off(v.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onInitPtsFound=function(w,S){var F=S.frag,P=S.id,L=S.initPTS;if(P==="main"){var G=F.cc;this.initPTS[F.cc]=L,this.log("InitPTS for cc: "+G+" found from main: "+L),this.videoTrackCC=G,this.state===m.State.WAITING_INIT_PTS&&this.tick()}},_.startLoad=function(w){if(!this.levels){this.startPosition=w,this.state=m.State.STOPPED;return}var S=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,S>0&&w===-1?(this.log("Override startPosition with lastCurrentTime @"+S.toFixed(3)),this.state=m.State.IDLE):(this.loadedmetadata=!1,this.state=m.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},_.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_TRACK:{var w,S=this.levels,F=this.trackId,P=S==null||((w=S[F])===null||w===void 0)?void 0:w.details;if(P){if(this.waitForCdnTuneIn(P))break;this.state=m.State.WAITING_INIT_PTS}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var L,G=performance.now(),z=this.retryDate;(!z||G>=z||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=m.State.IDLE);break}case m.State.WAITING_INIT_PTS:{var A=this.waitingData;if(A){var B=A.frag,U=A.part,R=A.cache,K=A.complete;if(this.initPTS[B.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.FRAG_LOADING;var Z=R.flush(),ue={frag:B,part:U,payload:Z,networkDetails:null};this._handleFragmentLoadProgress(ue),K&&I.prototype._handleFragmentLoadComplete.call(this,ue)}else if(this.videoTrackCC!==this.waitingVideoCC)l.logger.log("Waiting fragment cc ("+B.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Ce=T.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Re=Object(s.fragmentWithinToleranceTest)(Ce.end,this.config.maxFragLookUpTolerance,B);Re<0&&(l.logger.log("Waiting fragment cc ("+B.cc+") @ "+B.start+" cancelled because another fragment at "+Ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=m.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.IDLE)},_.onTickEnd=function(){var w=this.media;if(!w||!w.readyState)return;var S=this.mediaBuffer?this.mediaBuffer:w,F=S.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=w.currentTime},_.doTickIdle=function(){var w,S,F=this.hls,P=this.levels,L=this.media,G=this.trackId,z=F.config;if(!P||!P[G])return;if(!L&&(this.startFragRequested||!z.startFragPrefetch))return;var A=P[G],B=A.details;if(!B||B.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(B)){this.state=m.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,h.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,h.PlaylistLevelType.AUDIO);if(U===null)return;var R=U.len,K=this.getMaxBufferLength(),Z=this.audioSwitch;if(R>=K&&!Z)return;if(!Z&&this._streamEnded(U,B)){F.trigger(v.Events.BUFFER_EOS,{type:"audio"}),this.state=m.State.ENDED;return}var ue=B.fragments,de=ue[0].start,Ce=U.end;if(Z){var Re=this.getLoadPosition();Ce=Re,B.PTSKnown&&Re<de&&((U.end>de||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),L.currentTime=de+.05))}var me=this.getNextFragment(Ce,B);if(!me){this.bufferFlushed=!0;return}((w=me.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((S=me.decryptdata)!==null&&S!==void 0&&S.key)?this.loadKey(me,B):this.loadFragment(me,B,Ce)},_.getMaxBufferLength=function(){var w=I.prototype.getMaxBufferLength.call(this),S=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,h.PlaylistLevelType.MAIN);return S===null?w:Math.max(w,S.len)},_.onMediaDetaching=function(){this.videoBuffer=null,I.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(w,S){var F=S.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(P){return new t.Level(P)})},_.onAudioTrackSwitching=function(w,S){var F=!!S.url;this.trackId=S.id;var P=this.fragCurrent;P!=null&&P.loader&&P.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(b):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=m.State.IDLE):this.state=m.State.STOPPED,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},_.onLevelLoaded=function(w,S){this.mainDetails=S.details},_.onAudioTrackLoaded=function(w,S){var F,P=this.levels,L=S.details,G=S.id;if(!P){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+L.startSN+","+L.endSN+"],duration:"+L.totalduration);var z=P[G],A=0;if(L.live||(F=z.details)!==null&&F!==void 0&&F.live){var B=this.mainDetails;if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed||!B)return;!z.details&&L.hasProgramDateTime&&B.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(L,B),A=L.fragments[0].start):A=this.alignPlaylists(L,z.details)}z.details=L,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!L.live)&&this.setStartPosition(z.details,A),this.state===m.State.WAITING_TRACK&&!this.waitForCdnTuneIn(L)&&(this.state=m.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(w){var S,F=w.frag,P=w.part,L=w.payload,G=this.config,z=this.trackId,A=this.levels;if(!A){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+F.sn+" of level "+F.level+" will not be buffered");return}var B=A[z];console.assert(B,"Audio track is defined on fragment load progress");var U=B.details;console.assert(U,"Audio track details are defined on fragment load progress");var R=G.defaultAudioCodec||B.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new a.default(this.hls,h.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Z=this.initPTS[F.cc],ue=(S=F.initSegment)===null||S===void 0?void 0:S.data;if(Z!==void 0){var de=!1,Ce=P?P.index:-1,Re=Ce!==-1,me=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,L.byteLength,Ce,Re);K.push(L,ue,R,"",F,P,U.totalduration,de,me,Z)}else{l.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var Oe=this.waitingData=this.waitingData||{frag:F,part:P,cache:new c.default,complete:!1},be=Oe.cache;be.push(new Uint8Array(L)),this.waitingVideoCC=this.videoTrackCC,this.state=m.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}I.prototype._handleFragmentLoadComplete.call(this,w)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(w,S){var F=S.tracks.audio;F&&(this.mediaBuffer=F.buffer),S.tracks.video&&(this.videoBuffer=S.tracks.video.buffer)},_.onFragBuffered=function(w,S){var F=S.frag,P=S.part;if(F.type!==h.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(P?" p: "+P.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(v.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,P)},_.onError=function(w,S){switch(S.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.AUDIO,S);break;case f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==m.State.ERROR&&this.state!==m.State.STOPPED&&(this.state=S.fatal?m.State.ERROR:m.State.IDLE,this.warn(S.details+" while loading frag, switching to "+this.state+" state"));break;case f.ErrorDetails.BUFFER_FULL_ERROR:if(S.parent==="audio"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var F=!0,P=this.getFwdBufferInfo(this.mediaBuffer,h.PlaylistLevelType.AUDIO);P&&P.len>.5&&(F=!this.reduceMaxBufferLength(P.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}},_.onBufferFlushed=function(w,S){var F=S.type;F===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(w){var S,F="audio",P=this.hls,L=w.remuxResult,G=w.chunkMeta,z=this.getCurrentContext(G);if(!z){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var A=z.frag,B=z.part,U=L.audio,R=L.text,K=L.id3,Z=L.initSegment;if(this.fragContextChanged(A))return;if(this.state=m.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),Z!=null&&Z.tracks&&(this._bufferInitSegment(Z.tracks,A,G),P.trigger(v.Events.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:F,tracks:Z.tracks})),U){var ue=U.startPTS,de=U.endPTS,Ce=U.startDTS,Re=U.endDTS;B&&(B.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:de,startDTS:Ce,endDTS:Re}),A.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,ue,de,Ce,Re),this.bufferFragmentData(U,A,B,G)}if(K!=null&&(S=K.samples)!==null&&S!==void 0&&S.length){var me=o({frag:A,id:F},K);P.trigger(v.Events.FRAG_PARSING_METADATA,me)}if(R){var Oe=o({frag:A,id:F},R);P.trigger(v.Events.FRAG_PARSING_USERDATA,Oe)}},_._bufferInitSegment=function(w,S,F){if(this.state!==m.State.PARSING)return;w.video&&delete w.video;var P=w.audio;if(!P)return;P.levelCodec=P.codec,P.id="audio",this.log("Init audio buffer, container:"+P.container+", codecs[parsed]=["+P.codec+"]"),this.hls.trigger(v.Events.BUFFER_CODECS,w);var L=P.initSegment;if(L!=null&&L.byteLength){var G={type:"audio",frag:S,part:null,chunkMeta:F,parent:S.type,data:L};this.hls.trigger(v.Events.BUFFER_APPENDING,G)}this.tick()},_.loadFragment=function(w,S,F){var P=this.fragmentTracker.getState(w);this.fragCurrent=w,(this.audioSwitch||P===y.FragmentState.NOT_LOADED||P===y.FragmentState.PARTIAL)&&(w.sn==="initSegment"?this._loadInitSegment(w):S.live&&!Object(N.isFiniteNumber)(this.initPTS[w.cc])?(this.log("Waiting for video PTS in continuity counter "+w.cc+" of live stream before loading audio fragment "+w.sn+" of level "+this.trackId),this.state=m.State.WAITING_INIT_PTS):(this.startFragRequested=!0,I.prototype.loadFragment.call(this,w,S,F)))},_.completeAudioSwitch=function(){var w=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,w.trigger(v.Events.AUDIO_TRACK_SWITCHED,{id:F})},O}(m.default);g.default=p},"./src/controller/audio-track-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/events.ts"),m=C("./src/errors.ts"),v=C("./src/controller/base-playlist-controller.ts"),T=C("./src/types/loader.ts");function y(a,n){for(var s=0;s<n.length;s++){var d=n[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function t(a,n,s){return n&&y(a.prototype,n),s&&y(a,s),a}function h(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,i(a,n)}function i(a,n){return i=Object.setPrototypeOf||function(d,f){return d.__proto__=f,d},i(a,n)}var c=function(a){h(n,a);function n(d){var f;return f=a.call(this,d,"[audio-track-controller]")||this,f.tracks=[],f.groupId=null,f.tracksInGroup=[],f.trackId=-1,f.trackName="",f.selectDefaultTrack=!0,f.registerListeners(),f}var s=n.prototype;return s.registerListeners=function(){var f=this.hls;f.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),f.on(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.on(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.on(N.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),f.off(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.off(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.off(N.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,a.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(f,l){this.tracks=l.audioTracks||[]},s.onAudioTrackLoaded=function(f,l){var o=l.id,r=l.details,x=this.tracksInGroup[o];if(!x){this.warn("Invalid audio track id "+o);return}var b=x.details;x.details=l.details,this.log("audioTrack "+o+" loaded ["+r.startSN+"-"+r.endSN+"]"),o===this.trackId&&(this.retryCount=0,this.playlistLoaded(o,l,b))},s.onLevelLoading=function(f,l){this.switchLevel(l.level)},s.onLevelSwitching=function(f,l){this.switchLevel(l.level)},s.switchLevel=function(f){var l=this.hls.levels[f];if(!(l!=null&&l.audioGroupIds))return;var o=l.audioGroupIds[l.urlId];if(this.groupId!==o){this.groupId=o;var r=this.tracks.filter(function(b){return!o||b.groupId===o});this.selectDefaultTrack&&!r.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var x={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+o+'" group-id'),this.hls.trigger(N.Events.AUDIO_TRACKS_UPDATED,x),this.selectInitialTrack()}},s.onError=function(f,l){if(a.prototype.onError.call(this,f,l),l.fatal||!l.context)return;l.context.type===T.PlaylistContextType.AUDIO_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},s.setAudioTrack=function(f){var l=this.tracksInGroup;if(f<0||f>=l.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=l[this.trackId];this.log("Now switching to audio-track index "+f);var r=l[f],x=r.id,b=r.groupId,p=b===void 0?"":b,I=r.name,O=r.type,_=r.url;if(this.trackId=f,this.trackName=I,this.selectDefaultTrack=!1,this.hls.trigger(N.Events.AUDIO_TRACK_SWITCHING,{id:x,groupId:p,name:I,type:O,url:_}),r.details&&!r.details.live)return;var E=this.switchParams(r.url,o==null?void 0:o.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var f=this.tracksInGroup;console.assert(f.length,"Initial audio track should be selected when tracks are known");var l=this.trackName,o=this.findTrackId(l)||this.findTrackId();o!==-1?this.setAudioTrack(o):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(f){for(var l=this.tracksInGroup,o=0;o<l.length;o++){var r=l[o];if((!this.selectDefaultTrack||r.default)&&(!f||f===r.name))return r.id}return-1},s.loadPlaylist=function(f){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var o=l.id,r=l.groupId,x=l.url;if(f)try{x=f.addDirectives(x)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("loading audio-track playlist for id: "+o),this.clearTimer(),this.hls.trigger(N.Events.AUDIO_TRACK_LOADING,{url:x,id:o,groupId:r,deliveryDirectives:f||null})}},t(n,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(f){this.selectDefaultTrack=!1,this.setAudioTrack(f)}}]),n}(v.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return t});var N=C("./src/polyfills/number.ts"),m=C("./src/types/level.ts"),v=C("./src/controller/level-helper.ts"),T=C("./src/utils/logger.ts"),y=C("./src/errors.ts"),t=function(){function h(c,a){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=T.logger.log.bind(T.logger,a+":"),this.warn=T.logger.warn.bind(T.logger,a+":"),this.hls=c}var i=h.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(a,n){n.fatal&&n.type===y.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(a,n){var s=n==null?void 0:n.renditionReports;if(s)for(var d=0;d<s.length;d++){var f=s[d],l=""+f.URI;if(l===a.substr(-l.length)){var o=parseInt(f["LAST-MSN"]),r=parseInt(f["LAST-PART"]);if(n&&this.hls.config.lowLatencyMode){var x=Math.min(n.age-n.partTarget,n.targetduration);r!==void 0&&x>n.partTarget&&(r+=1)}if(Object(N.isFiniteNumber)(o))return new m.HlsUrlParameters(o,Object(N.isFiniteNumber)(r)?r:void 0,m.HlsSkip.No)}}},i.loadPlaylist=function(a){},i.shouldLoadTrack=function(a){return this.canLoad&&a&&!!a.url&&(!a.details||a.details.live)},i.playlistLoaded=function(a,n,s){var d=this,f=n.details,l=n.stats,o=l.loading.end?Math.max(0,self.performance.now()-l.loading.end):0;if(f.advancedDateTime=Date.now()-o,f.live||s!=null&&s.live){if(f.reloaded(s),s&&this.log("live playlist "+a+" "+(f.advanced?"REFRESHED "+f.lastPartSn+"-"+f.lastPartIndex:"MISSED")),s&&f.fragments.length>0&&Object(v.mergeDetails)(s,f),!this.canLoad||!f.live)return;var r,x=void 0,b=void 0;if(f.canBlockReload&&f.endSN&&f.advanced){var p=this.hls.config.lowLatencyMode,I=f.lastPartSn,O=f.endSN,_=f.lastPartIndex,E=_!==-1,w=I===O,S=p?0:_;E?(x=w?O+1:I,b=w?S:_+1):x=O+1;var F=f.age,P=F+f.ageHeader,L=Math.min(P-f.partTarget,f.targetduration*1.5);if(L>0){if(s&&L>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+L+" with playlist age: "+f.age),L=0;else{var G=Math.floor(L/f.targetduration);if(x+=G,b!==void 0){var z=Math.round(L%f.targetduration/f.partTarget);b+=z}this.log("CDN Tune-in age: "+f.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+L+" skip sn "+G+" to part "+b)}f.tuneInGoal=L}if(r=this.getDeliveryDirectives(f,n.deliveryDirectives,x,b),p||!w){this.loadPlaylist(r);return}}else r=this.getDeliveryDirectives(f,n.deliveryDirectives,x,b);var A=Object(v.computeReloadInterval)(f,l);x!==void 0&&f.canBlockReload&&(A-=f.partTarget||1),this.log("reload live playlist "+a+" in "+Math.round(A)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(r)},A)}else this.clearTimer()},i.getDeliveryDirectives=function(a,n,s,d){var f=Object(m.getSkipValue)(a,s);return n!=null&&n.skip&&a.deltaUpdateFailed&&(s=n.msn,d=n.part,f=m.HlsSkip.No),new m.HlsUrlParameters(s,d,f)},i.retryLoadingOrFail=function(a){var n=this,s=this.hls.config,d=this.retryCount<s.levelLoadingMaxRetry;if(d){var f;if(this.retryCount++,a.details.indexOf("LoadTimeOut")>-1&&(f=a.context)!==null&&f!==void 0&&f.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+a.details+'"'),this.loadPlaylist();else{var l=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return n.loadPlaylist()},l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+a.details+'"')}}else this.warn('cannot recover from error "'+a.details+'"'),this.clearTimer(),a.fatal=!0;return d},h}()},"./src/controller/base-stream-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"State",function(){return O}),C.d(g,"default",function(){return _});var N=C("./src/polyfills/number.ts"),m=C("./src/task-loop.ts"),v=C("./src/controller/fragment-tracker.ts"),T=C("./src/utils/buffer-helper.ts"),y=C("./src/utils/logger.ts"),t=C("./src/events.ts"),h=C("./src/errors.ts"),i=C("./src/types/transmuxer.ts"),c=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/discontinuities.ts"),n=C("./src/controller/fragment-finders.ts"),s=C("./src/controller/level-helper.ts"),d=C("./src/loader/fragment-loader.ts"),f=C("./src/crypt/decrypter.ts"),l=C("./src/utils/time-ranges.ts"),o=C("./src/types/loader.ts");function r(E,w){for(var S=0;S<w.length;S++){var F=w[S];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(E,F.key,F)}}function x(E,w,S){return w&&r(E.prototype,w),S&&r(E,S),E}function b(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function p(E,w){E.prototype=Object.create(w.prototype),E.prototype.constructor=E,I(E,w)}function I(E,w){return I=Object.setPrototypeOf||function(F,P){return F.__proto__=P,F},I(E,w)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},_=function(E){p(w,E);function w(F,P,L){var G;return G=E.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=O.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=L,G.log=y.logger.log.bind(y.logger,L+":"),G.warn=y.logger.warn.bind(y.logger,L+":"),G.hls=F,G.fragmentLoader=new d.default(F.config),G.fragmentTracker=P,G.config=F.config,G.decrypter=new f.default(F,F.config),F.on(t.Events.KEY_LOADED,G.onKeyLoaded,b(G)),G}var S=w.prototype;return S.doTick=function(){this.onTickEnd()},S.onTickEnd=function(){},S.startLoad=function(P){},S.stopLoad=function(){this.fragmentLoader.abort();var P=this.fragCurrent;P&&this.fragmentTracker.removeFragment(P),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},S._streamEnded=function(P,L){var G=this.fragCurrent,z=this.fragmentTracker;if(!L.live&&G&&G.sn===L.endSN&&!P.nextStart){var A=z.getState(G);return A===v.FragmentState.PARTIAL||A===v.FragmentState.OK}return!1},S.onMediaAttached=function(P,L){var G=this.media=this.mediaBuffer=L.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(z.startPosition)},S.onMediaDetaching=function(){var P=this.media;P!=null&&P.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),P&&(P.removeEventListener("seeking",this.onvseeking),P.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},S.onMediaSeeking=function(){var P=this.config,L=this.fragCurrent,G=this.media,z=this.mediaBuffer,A=this.state,B=G?G.currentTime:0,U=T.BufferHelper.bufferInfo(z||G,B,P.maxBufferHole);if(this.log("media seeking to "+(Object(N.isFiniteNumber)(B)?B.toFixed(3):B)+", state: "+A),A===O.ENDED)this.resetLoadingState();else if(L&&!U.len){var R=P.maxFragLookUpTolerance,K=L.start-R,Z=L.start+L.duration+R,ue=B>Z;(B<K||ue)&&(ue&&L.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),L.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=B),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=B),this.tickImmediate()},S.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},S.onKeyLoaded=function(P,L){if(this.state!==O.KEY_LOADING||L.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var G=this.levels[L.frag.level].details;G&&this.loadFragment(L.frag,G,L.frag.start)},S.onHandlerDestroying=function(){this.stopLoad(),E.prototype.onHandlerDestroying.call(this)},S.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(t.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,E.prototype.onHandlerDestroyed.call(this)},S.loadKey=function(P,L){this.log("Loading key for "+P.sn+" of ["+L.startSN+"-"+L.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+P.level),this.state=O.KEY_LOADING,this.fragCurrent=P,this.hls.trigger(t.Events.KEY_LOADING,{frag:P})},S.loadFragment=function(P,L,G){this._loadFragForPlayback(P,L,G)},S._loadFragForPlayback=function(P,L,G){var z=this,A=function(U){if(z.fragContextChanged(P)){z.warn("Fragment "+P.sn+(U.part?" p: "+U.part.index:"")+" of level "+P.level+" was dropped during download."),z.fragmentTracker.removeFragment(P);return}P.stats.chunkCount++,z._handleFragmentLoadProgress(U)};this._doFragLoad(P,L,G,A).then(function(B){if(!B)return;z.fragLoadError=0;var U=z.state;if(z.fragContextChanged(P)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!z.fragCurrent&&U===O.PARSING)&&(z.fragmentTracker.removeFragment(P),z.state=O.IDLE);return}if("payload"in B&&(z.log("Loaded fragment "+P.sn+" of level "+P.level),z.hls.trigger(t.Events.FRAG_LOADED,B),z.state===O.BACKTRACKING)){z.fragmentTracker.backtrack(P,B),z.resetFragmentLoading(P);return}z._handleFragmentLoadComplete(B)}).catch(function(B){z.warn(B),z.resetFragmentLoading(P)})},S.flushMainBuffer=function(P,L,G){if(G===void 0&&(G=null),!(P-L))return;var z={startOffset:P,endOffset:L,type:G};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,z)},S._loadInitSegment=function(P){var L=this;this._doFragLoad(P).then(function(G){if(!G||L.fragContextChanged(P)||!L.levels)throw new Error("init load aborted");return G}).then(function(G){var z=L.hls,A=G.payload,B=P.decryptdata;if(A&&A.byteLength>0&&B&&B.key&&B.iv&&B.method==="AES-128"){var U=self.performance.now();return L.decrypter.webCryptoDecrypt(new Uint8Array(A),B.key.buffer,B.iv.buffer).then(function(R){var K=self.performance.now();return z.trigger(t.Events.FRAG_DECRYPTED,{frag:P,payload:R,stats:{tstart:U,tdecrypt:K}}),G.payload=R,G})}return G}).then(function(G){var z=L.fragCurrent,A=L.hls,B=L.levels;if(!B)throw new Error("init load aborted, missing levels");var U=B[P.level].details;console.assert(U,"Level details are defined when init segment is loaded");var R=P.stats;L.state=O.IDLE,L.fragLoadError=0,P.data=new Uint8Array(G.payload),R.parsing.start=R.buffering.start=self.performance.now(),R.parsing.end=R.buffering.end=self.performance.now(),G.frag===z&&A.trigger(t.Events.FRAG_BUFFERED,{stats:R,frag:z,part:null,id:P.type}),L.tick()}).catch(function(G){L.warn(G),L.resetFragmentLoading(P)})},S.fragContextChanged=function(P){var L=this.fragCurrent;return!P||!L||P.level!==L.level||P.sn!==L.sn||P.urlId!==L.urlId},S.fragBufferedComplete=function(P,L){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+P.type+" sn: "+P.sn+(L?" part: "+L.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+P.level+" "+l.default.toString(T.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},S._handleFragmentLoadComplete=function(P){var L=this.transmuxer;if(!L)return;var G=P.frag,z=P.part,A=P.partsLoaded,B=!A||A.length===0||A.some(function(R){return!R}),U=new i.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,z?z.index:-1,!B);L.flush(U)},S._handleFragmentLoadProgress=function(P){},S._doFragLoad=function(P,L,G,z){var A=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(P.start,G||0),this.config.lowLatencyMode&&L){var B=L.partList;if(B&&z){G>P.end&&L.fragmentHint&&(P=L.fragmentHint);var U=this.getNextPart(B,P,G);if(U>-1){var R=B[U];return this.log("Loading part sn: "+P.sn+" p: "+R.index+" cc: "+P.cc+" of playlist ["+L.startSN+"-"+L.endSN+"] parts [0-"+U+"-"+(B.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+P.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=R.start+R.duration,this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:P,part:B[U],targetBufferTime:G}),this.doFragPartsLoad(P,B,U,z).catch(function(K){return A.handleFragLoadError(K)})}else if(!P.url||this.loadedEndOfParts(B,G))return Promise.resolve(null)}}return this.log("Loading fragment "+P.sn+" cc: "+P.cc+" "+(L?"of ["+L.startSN+"-"+L.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+P.level+", target: "+parseFloat(G.toFixed(3))),Object(N.isFiniteNumber)(P.sn)&&!this.bitrateTest&&(this.nextLoadPosition=P.start+P.duration),this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:P,targetBufferTime:G}),this.fragmentLoader.load(P,z).catch(function(K){return A.handleFragLoadError(K)})},S.doFragPartsLoad=function(P,L,G,z){var A=this;return new Promise(function(B,U){var R=[],K=function Z(ue){var de=L[ue];A.fragmentLoader.loadPart(P,de,z).then(function(Ce){R[de.index]=Ce;var Re=Ce.part;A.hls.trigger(t.Events.FRAG_LOADED,Ce);var me=L[ue+1];if(me&&me.fragment===P)Z(ue+1);else return B({frag:P,part:Re,partsLoaded:R})}).catch(U)};K(G)})},S.handleFragLoadError=function(P){var L=P.data;return L&&L.details===h.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(L.frag,L.part):this.hls.trigger(t.Events.ERROR,L),null},S._handleTransmuxerFlush=function(P){var L=this.getCurrentContext(P);if(!L||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=L.frag,z=L.part,A=L.level,B=self.performance.now();G.stats.parsing.end=B,z&&(z.stats.parsing.end=B),this.updateLevelTiming(G,z,A,P.partial)},S.getCurrentContext=function(P){var L=this.levels,G=P.level,z=P.sn,A=P.part;if(!L||!L[G])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+G+". The current chunk will not be buffered."),null;var B=L[G],U=A>-1?Object(s.getPartWith)(B,z,A):null,R=U?U.fragment:Object(s.getFragmentWithSN)(B,z,this.fragCurrent);return R?{frag:R,part:U,level:B}:null},S.bufferFragmentData=function(P,L,G,z){if(!P||this.state!==O.PARSING)return;var A=P.data1,B=P.data2,U=A;if(A&&B&&(U=Object(c.appendUint8Array)(A,B)),!U||!U.length)return;var R={type:P.type,frag:L,part:G,chunkMeta:z,parent:L.type,data:U};this.hls.trigger(t.Events.BUFFER_APPENDING,R),P.dropped&&P.independent&&!G&&this.flushBufferGap(L)},S.flushBufferGap=function(P){var L=this.media;if(!L)return;if(!T.BufferHelper.isBuffered(L,L.currentTime)){this.flushMainBuffer(0,P.start);return}var G=L.currentTime,z=T.BufferHelper.bufferInfo(L,G,0),A=P.duration,B=Math.min(this.config.maxFragLookUpTolerance*2,A*.25),U=Math.max(Math.min(P.start-B,z.end-B),G+B);P.start-U>B&&this.flushMainBuffer(U,P.start)},S.getFwdBufferInfo=function(P,L){var G=this.config,z=this.getLoadPosition();if(!Object(N.isFiniteNumber)(z))return null;var A=T.BufferHelper.bufferInfo(P,z,G.maxBufferHole);if(A.len===0&&A.nextStart!==void 0){var B=this.fragmentTracker.getBufferedFrag(z,L);if(B&&A.nextStart<B.end)return T.BufferHelper.bufferInfo(P,z,Math.max(A.nextStart,G.maxBufferHole))}return A},S.getMaxBufferLength=function(P){var L=this.config,G;return P?G=Math.max(8*L.maxBufferSize/P,L.maxBufferLength):G=L.maxBufferLength,Math.min(G,L.maxMaxBufferLength)},S.reduceMaxBufferLength=function(P){var L=this.config,G=P||L.maxBufferLength;return L.maxMaxBufferLength>=G?(L.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+L.maxMaxBufferLength+"s"),!0):!1},S.getNextFragment=function(P,L){var G,z,A=L.fragments,B=A.length;if(!B)return null;var U=this.config,R=A[0].start,K;if(L.live){var Z=U.initialLiveManifestSize;if(B<Z)return this.warn("Not enough fragments to start playback (have: "+B+", need: "+Z+")"),null;!L.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(L,A),this.startPosition=K?this.hls.liveSyncPosition||K.start:P)}else P<=R&&(K=A[0]);if(!K){var ue=U.lowLatencyMode?L.partEnd:L.fragmentEnd;K=this.getFragmentAtPosition(P,ue,L)}return(G=K)!==null&&G!==void 0&&G.initSegment&&!((z=K)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(K=K.initSegment),K},S.getNextPart=function(P,L,G){for(var z=-1,A=!1,B=!0,U=0,R=P.length;U<R;U++){var K=P[U];if(B=B&&!K.independent,z>-1&&G<K.start)break;var Z=K.loaded;!Z&&(A||K.independent||B)&&K.fragment===L&&(z=U),A=Z}return z},S.loadedEndOfParts=function(P,L){var G=P[P.length-1];return G&&L>G.start&&G.loaded},S.getInitialLiveFragment=function(P,L){var G=this.fragPrevious,z=null;if(G){if(P.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),z=Object(n.findFragmentByPDT)(L,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var A=G.sn+1;if(A>=P.startSN&&A<=P.endSN){var B=L[A-P.startSN];G.cc===B.cc&&(z=B,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(n.findFragWithCC)(L,G.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?P.fragmentEnd:P.edge,P))}return z},S.getFragmentAtPosition=function(P,L,G){var z=this.config,A=this.fragPrevious,B=G.fragments,U=G.endSN,R=G.fragmentHint,K=z.maxFragLookUpTolerance,Z=!!(z.lowLatencyMode&&G.partList&&R);Z&&R&&!this.bitrateTest&&(B=B.concat(R),U=R.sn);var ue;if(P<L){var de=P>L-K?0:K;ue=Object(n.findFragmentByPTS)(A,B,P,de)}else ue=B[B.length-1];if(ue){var Ce=ue.sn-G.startSN,Re=A&&ue.level===A.level,me=B[Ce+1],Oe=this.fragmentTracker.getState(ue);if(Oe===v.FragmentState.BACKTRACKED){ue=null;for(var be=Ce;B[be]&&this.fragmentTracker.getState(B[be])===v.FragmentState.BACKTRACKED;)A?ue=B[be--]:ue=B[--be];ue||(ue=me)}else A&&ue.sn===A.sn&&!Z&&(Re&&(ue.sn<U&&this.fragmentTracker.getState(me)!==v.FragmentState.OK?(this.log("SN "+ue.sn+" just loaded, load next one: "+me.sn),ue=me):ue=null))}return ue},S.synchronizeToLiveEdge=function(P){var L=this.config,G=this.media;if(!G)return;var z=this.hls.liveSyncPosition,A=G.currentTime,B=P.fragments[0].start,U=P.edge,R=A>=B-L.maxFragLookUpTolerance&&A<=U;if(z!==null&&G.duration>z&&(A<z||!R)){var K=L.liveMaxLatencyDuration!==void 0?L.liveMaxLatencyDuration:L.liveMaxLatencyDurationCount*P.targetduration;(!R&&G.readyState<4||A<U-K)&&(this.loadedmetadata||(this.nextLoadPosition=z),G.readyState&&(this.warn("Playback: "+A.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+z.toFixed(3)),G.currentTime=z))}},S.alignPlaylists=function(P,L){var G=this.levels,z=this.levelLastLoaded,A=this.fragPrevious,B=z!==null?G[z]:null,U=P.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var R=P.fragments[0].start,K=!L,Z=P.alignedSliding&&Object(N.isFiniteNumber)(R);if(K||!Z&&!R){Object(a.alignStream)(A,B,P);var ue=P.fragments[0].start;return this.log("Live playlist sliding: "+ue.toFixed(2)+" start-sn: "+(L?L.startSN:"na")+"->"+P.startSN+" prev-sn: "+(A?A.sn:"na")+" fragments: "+U),ue}return R},S.waitForCdnTuneIn=function(P){var L=3;return P.live&&P.canBlockReload&&P.tuneInGoal>Math.max(P.partHoldBack,P.partTarget*L)},S.setStartPosition=function(P,L){var G=this.startPosition;if(G<L&&(G=-1),G===-1||this.lastCurrentTime===-1){var z=P.startTimeOffset;Object(N.isFiniteNumber)(z)?(G=L+z,z<0&&(G+=P.totalduration),G=Math.min(Math.max(L,G),L+P.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+G),this.startPosition=G):P.live?G=this.hls.liveSyncPosition||L:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},S.getLoadPosition=function(){var P=this.media,L=0;return this.loadedmetadata&&P?L=P.currentTime:this.nextLoadPosition&&(L=this.nextLoadPosition),L},S.handleFragLoadAborted=function(P,L){this.transmuxer&&P.sn!=="initSegment"&&P.stats.aborted&&(this.warn("Fragment "+P.sn+(L?" part"+L.index:"")+" of level "+P.level+" was aborted"),this.resetFragmentLoading(P))},S.resetFragmentLoading=function(P){(!this.fragCurrent||!this.fragContextChanged(P))&&(this.state=O.IDLE)},S.onFragmentOrKeyLoadError=function(P,L){if(L.fatal)return;var G=L.frag;if(!G||G.type!==P)return;var z=this.fragCurrent;console.assert(z&&G.sn===z.sn&&G.level===z.level&&G.urlId===z.urlId,"Frag load error must match current frag to retry");var A=this.config;if(this.fragLoadError+1<=A.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var B=Math.min(Math.pow(2,this.fragLoadError)*A.fragLoadingRetryDelay,A.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+P+" "+G.level+" failed to load, retrying in "+B+"ms"),this.retryDate=self.performance.now()+B,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else L.levelRetry?(P===o.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(y.logger.error(L.details+" reaches max retry, redispatch as fatal ..."),L.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},S.afterBufferFlushed=function(P,L,G){if(!P)return;var z=T.BufferHelper.getBuffered(P);this.fragmentTracker.detectEvictedFragments(L,z,G),this.state===O.ENDED&&this.resetLoadingState()},S.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},S.resetLiveStartWhenNotLoaded=function(P){if(!this.loadedmetadata){this.startFragRequested=!1;var L=this.levels?this.levels[P].details:null;if(L!=null&&L.live)return this.startPosition=-1,this.setStartPosition(L,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},S.updateLevelTiming=function(P,L,G,z){var A=this,B=G.details;console.assert(!!B,"level.details must be defined");var U=Object.keys(P.elementaryStreams).reduce(function(R,K){var Z=P.elementaryStreams[K];if(Z){var ue=Z.endPTS-Z.startPTS;if(ue<=0)return A.warn("Could not parse fragment "+P.sn+" "+K+" duration reliably ("+ue+") resetting transmuxer to fallback to playlist timing"),A.resetTransmuxer(),R||!1;var de=z?0:Object(s.updateFragPTSDTS)(B,P,Z.startPTS,Z.endPTS,Z.startDTS,Z.endDTS);return A.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:B,level:G,drift:de,type:K,frag:P,start:Z.startPTS,end:Z.endPTS}),!0}return R},!1);U?(this.state=O.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:P,part:L})):this.resetLoadingState()},S.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},x(w,[{key:"state",get:function(){return this._state},set:function(P){var L=this._state;L!==P&&(this._state=P,this.log(L+"->"+P))}}]),w}(m.default)},"./src/controller/buffer-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return n});var N=C("./src/polyfills/number.ts"),m=C("./src/events.ts"),v=C("./src/utils/logger.ts"),T=C("./src/errors.ts"),y=C("./src/utils/buffer-helper.ts"),t=C("./src/utils/mediasource-helper.ts"),h=C("./src/loader/fragment.ts"),i=C("./src/controller/buffer-operation-queue.ts"),c=Object(t.getMediaSource)(),a=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function s(f){var l=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var o=l.hls,r=l.media,x=l.mediaSource;v.logger.log("[buffer-controller]: Media source opened"),r&&(l.updateMediaElementDuration(),o.trigger(m.Events.MEDIA_ATTACHED,{media:r})),x&&x.removeEventListener("sourceopen",l._onMediaSourceOpen),l.checkPendingTracks()},this._onMediaSourceClose=function(){v.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){v.logger.log("[buffer-controller]: Media source ended")},this.hls=f,this._initSourceBuffer(),this.registerListeners()}var d=s.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var l=this.hls;l.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(m.Events.BUFFER_RESET,this.onBufferReset,this),l.on(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.on(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.on(m.Events.BUFFER_EOS,this.onBufferEos,this),l.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.on(m.Events.FRAG_PARSED,this.onFragParsed,this),l.on(m.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var l=this.hls;l.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(m.Events.BUFFER_RESET,this.onBufferReset,this),l.off(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.off(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.off(m.Events.BUFFER_EOS,this.onBufferEos,this),l.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.off(m.Events.FRAG_PARSED,this.onFragParsed,this),l.off(m.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(l,o){var r=2;(o.audio&&!o.video||!o.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,v.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(l,o){var r=this.media=o.media;if(r&&c){var x=this.mediaSource=new c;x.addEventListener("sourceopen",this._onMediaSourceOpen),x.addEventListener("sourceended",this._onMediaSourceEnded),x.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(x),this._objectUrl=r.src}},d.onMediaDetaching=function(){var l=this.media,o=this.mediaSource,r=this._objectUrl;if(o){if(v.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(x){v.logger.warn("[buffer-controller]: onMediaDetaching: "+x.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),l&&(r&&self.URL.revokeObjectURL(r),l.src===r?(l.removeAttribute("src"),l.load()):v.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(m.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var l=this;this.getSourceBufferTypes().forEach(function(o){var r=l.sourceBuffer[o];try{r&&(l.removeBufferListeners(o),l.mediaSource&&l.mediaSource.removeSourceBuffer(r),l.sourceBuffer[o]=void 0)}catch(x){v.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",x)}}),this._initSourceBuffer()},d.onBufferCodecs=function(l,o){var r=this,x=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(b){if(x){var p=r.tracks[b];if(p&&typeof p.buffer.changeType=="function"){var I=o[b],O=I.codec,_=I.levelCodec,E=I.container,w=(p.levelCodec||p.codec).replace(a,"$1"),S=(_||O).replace(a,"$1");if(w!==S){var F=E+";codecs="+(_||O);r.appendChangeType(b,F)}}}else r.pendingTracks[b]=o[b]}),x)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(l,o){var r=this,x=this.operationQueue,b={execute:function(){var I=r.sourceBuffer[l];I&&(v.logger.log("[buffer-controller]: changing "+l+" sourceBuffer type to "+o),I.changeType(o)),x.shiftAndExecuteNext(l)},onStart:function(){},onComplete:function(){},onError:function(I){v.logger.warn("[buffer-controller]: Failed to change "+l+" SourceBuffer type",I)}};x.append(b,l)},d.onBufferAppending=function(l,o){var r=this,x=this.hls,b=this.operationQueue,p=this.tracks,I=o.data,O=o.type,_=o.frag,E=o.part,w=o.chunkMeta,S=w.buffering[O],F=self.performance.now();S.start=F;var P=_.stats.buffering,L=E?E.stats.buffering:null;P.start===0&&(P.start=F),L&&L.start===0&&(L.start=F);var G=p.audio,z=O==="audio"&&w.id===1&&(G==null?void 0:G.container)==="audio/mpeg",A={execute:function(){if(S.executeStart=self.performance.now(),z){var U=r.sourceBuffer[O];if(U){var R=_.start-U.timestampOffset;Math.abs(R)>=.1&&(v.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+R+") sn: "+_.sn+")"),U.timestampOffset=_.start)}}r.appendExecutor(I,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();S.executeEnd=S.end=U,P.first===0&&(P.first=U),L&&L.first===0&&(L.first=U);var R=r.sourceBuffer,K={};for(var Z in R)K[Z]=y.BufferHelper.getBuffered(R[Z]);r.appendError=0,r.hls.trigger(m.Events.BUFFER_APPENDED,{type:O,frag:_,part:E,chunkMeta:w,parent:_.type,timeRanges:K})},onError:function(U){v.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var R={type:T.ErrorTypes.MEDIA_ERROR,parent:_.type,details:T.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?R.details=T.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,R.details=T.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>x.config.appendErrorMaxRetry&&(v.logger.error("[buffer-controller]: Failed "+x.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),R.fatal=!0)),x.trigger(m.Events.ERROR,R)}};b.append(A,O)},d.onBufferFlushing=function(l,o){var r=this,x=this.operationQueue,b=function(I){return{execute:r.removeExecutor.bind(r,I,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(m.Events.BUFFER_FLUSHED,{type:I})},onError:function(_){v.logger.warn("[buffer-controller]: Failed to remove from "+I+" SourceBuffer",_)}}};o.type?x.append(b(o.type),o.type):this.getSourceBufferTypes().forEach(function(p){x.append(b(p),p)})},d.onFragParsed=function(l,o){var r=this,x=o.frag,b=o.part,p=[],I=b?b.elementaryStreams:x.elementaryStreams;I[h.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(I[h.ElementaryStreamTypes.AUDIO]&&p.push("audio"),I[h.ElementaryStreamTypes.VIDEO]&&p.push("video"));var O=function(){var E=self.performance.now();x.stats.buffering.end=E,b&&(b.stats.buffering.end=E);var w=b?b.stats:x.stats;r.hls.trigger(m.Events.FRAG_BUFFERED,{frag:x,part:b,stats:w,id:x.type})};p.length===0&&v.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+x.type+" level: "+x.level+" sn: "+x.sn),this.blockBuffers(O,p)},d.onFragChanged=function(l,o){this.flushBackBuffer()},d.onBufferEos=function(l,o){var r=this,x=this.getSourceBufferTypes().reduce(function(b,p){var I=r.sourceBuffer[p];return(!o.type||o.type===p)&&(I&&!I.ended&&(I.ended=!0,v.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),b&&!!(!I||I.ended)},!0);x&&this.blockBuffers(function(){var b=r.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},d.onLevelUpdated=function(l,o){var r=o.details;if(!r.fragments.length)return;this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var l=this.hls,o=this.details,r=this.media,x=this.sourceBuffer;if(!r||o===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var p=o.live&&l.config.liveBackBufferLength!==null?l.config.liveBackBufferLength:l.config.backBufferLength;if(!Object(N.isFiniteNumber)(p)||p<0)return;var I=r.currentTime,O=o.levelTargetDuration,_=Math.max(p,O),E=Math.floor(I/O)*O-_;b.forEach(function(w){var S=x[w];if(S){var F=y.BufferHelper.getBuffered(S);F.length>0&&E>F.start(0)&&(l.trigger(m.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),o.live&&l.trigger(m.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),l.trigger(m.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:w}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var l=this.details,o=this.hls,r=this.media,x=this.mediaSource,b=l.fragments[0].start+l.totalduration,p=r.duration,I=Object(N.isFiniteNumber)(x.duration)?x.duration:0;l.live&&o.config.liveDurationInfinity?(v.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),x.duration=Infinity,this.updateSeekableRange(l)):(b>I&&b>p||!Object(N.isFiniteNumber)(p))&&(v.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),x.duration=b)},d.updateSeekableRange=function(l){var o=this.mediaSource,r=l.fragments,x=r.length;if(x&&l.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var b=Math.max(0,r[0].start),p=Math.max(b,b+l.totalduration);o.setLiveSeekableRange(b,p)}},d.checkPendingTracks=function(){var l=this.bufferCodecEventsExpected,o=this.operationQueue,r=this.pendingTracks,x=Object.keys(r).length;if(x&&!l||x===2){this.createSourceBuffers(r),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(m.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}b.forEach(function(p){o.executeNext(p)})}},d.createSourceBuffers=function(l){var o=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var x=0;for(var b in l)if(!o[b]){var p=l[b];if(!p)throw Error("source buffer exists for track "+b+", however track does not");var I=p.levelCodec||p.codec,O=p.container+";codecs="+I;v.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var _=o[b]=r.addSourceBuffer(O),E=b;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[b]={buffer:_,codec:I,container:p.container,levelCodec:p.levelCodec,id:p.id},x++}catch(w){v.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+w.message),this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:O})}}x&&this.hls.trigger(m.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(l){var o=this.operationQueue,r=o.current(l);r.onStart()},d._onSBUpdateEnd=function(l){var o=this.operationQueue,r=o.current(l);r.onComplete(),o.shiftAndExecuteNext(l)},d._onSBUpdateError=function(l,o){v.logger.error("[buffer-controller]: "+l+" SourceBuffer error",o),this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(l);r&&r.onError(o)},d.removeExecutor=function(l,o,r){var x=this.media,b=this.mediaSource,p=this.operationQueue,I=this.sourceBuffer,O=I[l];if(!x||!b||!O){v.logger.warn("[buffer-controller]: Attempting to remove from the "+l+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(l);return}var _=Object(N.isFiniteNumber)(x.duration)?x.duration:Infinity,E=Object(N.isFiniteNumber)(b.duration)?b.duration:Infinity,w=Math.max(0,o),S=Math.min(r,_,E);S>w?(v.logger.log("[buffer-controller]: Removing ["+w+","+S+"] from the "+l+" SourceBuffer"),console.assert(!O.updating,l+" sourceBuffer must not be updating"),O.remove(w,S)):p.shiftAndExecuteNext(l)},d.appendExecutor=function(l,o){var r=this.operationQueue,x=this.sourceBuffer,b=x[o];if(!b){v.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),r.shiftAndExecuteNext(o);return}b.ended=!1,console.assert(!b.updating,o+" sourceBuffer must not be updating"),b.appendBuffer(l)},d.blockBuffers=function(l,o){var r=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){v.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(l);return}var x=this.operationQueue,b=o.map(function(p){return x.appendBlocker(p)});Promise.all(b).then(function(){l(),o.forEach(function(p){var I=r.sourceBuffer[p];(!I||!I.updating)&&x.shiftAndExecuteNext(p)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(l,o,r){var x=this.sourceBuffer[l];if(!x)return;var b=r.bind(this,l);this.listeners[l].push({event:o,listener:b}),x.addEventListener(o,b)},d.removeBufferListeners=function(l){var o=this.sourceBuffer[l];if(!o)return;this.listeners[l].forEach(function(r){o.removeEventListener(r.event,r.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return m});var N=C("./src/utils/logger.ts"),m=function(){function v(y){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=y}var T=v.prototype;return T.append=function(t,h){var i=this.queues[h];i.push(t),i.length===1&&this.buffers[h]&&this.executeNext(h)},T.insertAbort=function(t,h){var i=this.queues[h];i.unshift(t),this.executeNext(h)},T.appendBlocker=function(t){var h,i=new Promise(function(a){h=a}),c={execute:h,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,t),i},T.executeNext=function(t){var h=this.buffers,i=this.queues,c=h[t],a=i[t];if(a.length){var n=a[0];try{n.execute()}catch(s){N.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(s),(!c||!c.updating)&&(a.shift(),this.executeNext(t))}}},T.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},T.current=function(t){return this.queues[t][0]},v}()},"./src/controller/cap-level-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/events.ts");function m(y,t){for(var h=0;h<t.length;h++){var i=t[h];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(y,i.key,i)}}function v(y,t,h){return t&&m(y.prototype,t),h&&m(y,h),y}var T=function(){function y(h){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=h,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=y.prototype;return t.setStreamController=function(i){this.streamController=i},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var i=this.hls;i.on(N.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var i=this.hls;i.off(N.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(i,c){y.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},t.onMediaAttaching=function(i,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},t.onManifestParsed=function(i,c){var a=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,a.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onBufferCodecs=function(i,c){var a=this.hls;a.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(i.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},t.getMaxLevel=function(i){var c=this,a=this.hls.levels;if(!a.length)return-1;var n=a.filter(function(s,d){return y.isLevelAllowed(d,c.restrictedLevels)&&d<=i});return this.clientRect=null,y.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},t.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,c={width:0,height:0};if(i){var a=i.getBoundingClientRect();c.width=a.width,c.height=a.height,!c.width&&!c.height&&(c.width=a.right-a.left||i.width||0,c.height=a.bottom-a.top||i.height||0)}return this.clientRect=c,c},y.isLevelAllowed=function(i,c){return c===void 0&&(c=[]),c.indexOf(i)===-1},y.getMaxLevelByMediaSize=function(i,c,a){if(!i||!i.length)return-1;for(var n=function(o,r){return r?o.width!==r.width||o.height!==r.height:!0},s=i.length-1,d=0;d<i.length;d+=1){var f=i[d];if((f.width>=c||f.height>=a)&&n(f,i[d+1])){s=d;break}}return s},v(y,[{key:"mediaWidth",get:function(){return this.getDimensions().width*y.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*y.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(c){}return i}}]),y}();g.default=T},"./src/controller/cmcd-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return n});var N=C("./src/events.ts"),m=C("./src/types/cmcd.ts"),v=C("./src/utils/buffer-helper.ts"),T=C("./src/utils/logger.ts");function y(s,d){for(var f=0;f<d.length;f++){var l=d[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function t(s,d,f){return d&&y(s.prototype,d),f&&y(s,f),s}function h(s,d){var f=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(f)return(f=f.call(s)).next.bind(f);if(Array.isArray(s)||(f=i(s))||d&&s&&typeof s.length=="number"){f&&(s=f);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(s,d){if(!s)return;if(typeof s=="string")return c(s,d);var f=Object.prototype.toString.call(s).slice(8,-1);if(f==="Object"&&s.constructor&&(f=s.constructor.name),f==="Map"||f==="Set")return Array.from(s);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return c(s,d)}function c(s,d){(d==null||d>s.length)&&(d=s.length);for(var f=0,l=new Array(d);f<d;f++)l[f]=s[f];return l}function a(){return a=Object.assign||function(s){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&(s[l]=f[l])}return s},a.apply(this,arguments)}var n=function(){function s(f){var l=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){l.initialized&&(l.starved=!0),l.buffering=!0},this.onPlaying=function(){l.initialized||(l.initialized=!0),l.buffering=!1},this.applyPlaylistData=function(x){try{l.apply(x,{ot:m.CMCDObjectType.MANIFEST,su:!l.initialized})}catch(b){T.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(x){try{var b=x.frag,p=l.hls.levels[b.level],I=l.getObjectType(b),O={d:b.duration*1e3,ot:I};(I===m.CMCDObjectType.VIDEO||I===m.CMCDObjectType.AUDIO||I==m.CMCDObjectType.MUXED)&&(O.br=p.bitrate/1e3,O.tb=l.getTopBandwidth(I),O.bl=l.getBufferLength(I)),l.apply(x,O)}catch(_){T.logger.warn("Could not generate segment CMCD data.",_)}},this.hls=f;var o=this.config=f.config,r=o.cmcd;r!=null&&(o.pLoader=this.createPlaylistLoader(),o.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||s.uuid(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.registerListeners())}var d=s.prototype;return d.registerListeners=function(){var l=this.hls;l.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.on(N.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var l=this.hls;l.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.off(N.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},d.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},d.onMediaAttached=function(l,o){this.media=o.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},d.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},d.onBufferCreated=function(l,o){var r,x;this.audioBuffer=(r=o.tracks.audio)===null||r===void 0?void 0:r.buffer,this.videoBuffer=(x=o.tracks.video)===null||x===void 0?void 0:x.buffer},d.createData=function(){var l;return{v:m.CMCDVersion,sf:m.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(l=this.media)===null||l===void 0?void 0:l.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(l,o){o===void 0&&(o={}),a(o,this.createData());var r=o.ot===m.CMCDObjectType.INIT||o.ot===m.CMCDObjectType.VIDEO||o.ot===m.CMCDObjectType.MUXED;if(this.starved&&r&&(o.bs=!0,o.su=!0,this.starved=!1),o.su==null&&(o.su=this.buffering),this.useHeaders){var x=s.toHeaders(o);if(!Object.keys(x).length)return;l.headers||(l.headers={}),a(l.headers,x)}else{var b=s.toQuery(o);if(!b)return;l.url=s.appendQueryToUri(l.url,b)}},d.getObjectType=function(l){var o=l.type;return o==="subtitle"?m.CMCDObjectType.TIMED_TEXT:l.sn==="initSegment"?m.CMCDObjectType.INIT:o==="audio"?m.CMCDObjectType.AUDIO:o==="main"?this.hls.audioTracks.length?m.CMCDObjectType.VIDEO:m.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(l){for(var o=0,r=l===m.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,x=h(r),b;!(b=x()).done;){var p=b.value;p.bitrate>o&&(o=p.bitrate)}return o>0?o:NaN},d.getBufferLength=function(l){var o=this.hls.media,r=l===m.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!r||!o)return NaN;var x=v.BufferHelper.bufferInfo(r,o.currentTime,this.config.maxBufferHole);return x.len*1e3},d.createPlaylistLoader=function(){var l=this.config.pLoader,o=this.applyPlaylistData,r=l||this.config.loader;return function(){function x(p){this.loader=void 0,this.loader=new r(p)}var b=x.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(I,O,_){o(I),this.loader.load(I,O,_)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},d.createFragmentLoader=function(){var l=this.config.fLoader,o=this.applyFragmentData,r=l||this.config.loader;return function(){function x(p){this.loader=void 0,this.loader=new r(p)}var b=x.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(I,O,_){o(I),this.loader.load(I,O,_)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},s.uuid=function(){var l=URL.createObjectURL(new Blob),o=l.toString();return URL.revokeObjectURL(l),o.substr(o.lastIndexOf("/")+1)},s.serialize=function(l){for(var o=[],r=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},x=function(z){return Math.round(z)},b=function(z){return x(z/100)*100},p=function(z){return encodeURIComponent(z)},I={br:x,d:x,bl:b,dl:b,mtp:b,nor:p,rtp:b,tb:x},O=Object.keys(l||{}).sort(),_=h(O),E;!(E=_()).done;){var w=E.value,S=l[w];if(!r(S))continue;if(w==="v"&&S===1)continue;if(w=="pr"&&S===1)continue;var F=I[w];F&&(S=F(S));var P=typeof S,L=void 0;w==="ot"||w==="sf"||w==="st"?L=w+"="+S:P==="boolean"?L=w:P==="number"?L=w+"="+S:L=w+"="+JSON.stringify(S),o.push(L)}return o.join(",")},s.toHeaders=function(l){for(var o=Object.keys(l),r={},x=["Object","Request","Session","Status"],b=[{},{},{},{}],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,O=o;I<O.length;I++){var _=O[I],E=p[_]!=null?p[_]:1;b[E][_]=l[_]}for(var w=0;w<b.length;w++){var S=s.serialize(b[w]);S&&(r["CMCD-"+x[w]]=S)}return r},s.toQuery=function(l){return"CMCD="+encodeURIComponent(s.serialize(l))},s.appendQueryToUri=function(l,o){if(!o)return l;var r=l.includes("?")?"&":"?";return""+l+r+o},s}()},"./src/controller/eme-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/events.ts"),m=C("./src/errors.ts"),v=C("./src/utils/logger.ts"),T=C("./src/utils/mediakeys-helper.ts");function y(n,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function t(n,s,d){return s&&y(n.prototype,s),d&&y(n,d),n}var h=3,i=function(s,d,f){var l={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(o){l.audioCapabilities.push({contentType:'audio/mp4; codecs="'+o+'"',robustness:f.audioRobustness||""})}),d.forEach(function(o){l.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"',robustness:f.videoRobustness||""})}),[l]},c=function(s,d,f,l){switch(s){case T.KeySystems.WIDEVINE:return i(d,f,l);default:throw new Error("Unknown key-system: "+s)}},a=function(){function n(d){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=d,this._config=d.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var s=n.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(f){switch(f){case T.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+f+'"')},s._attemptKeySystemAccess=function(f,l,o){var r=this,x=c(f,l,o,this._drmSystemOptions);v.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(f,x);this.mediaKeysPromise=b.then(function(p){return r._onMediaKeySystemAccessObtained(f,p)}),b.catch(function(p){v.logger.error('Failed to obtain key-system "'+f+'" access:',p)})},s._onMediaKeySystemAccessObtained=function(f,l){var o=this;v.logger.log('Access for key-system "'+f+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:l,mediaKeySystemDomain:f};this._mediaKeysList.push(r);var x=Promise.resolve().then(function(){return l.createMediaKeys()}).then(function(b){return r.mediaKeys=b,v.logger.log('Media-keys created for key-system "'+f+'"'),o._onMediaKeysCreated(),b});return x.catch(function(b){v.logger.error("Failed to create media-keys:",b)}),x},s._onMediaKeysCreated=function(){var f=this;this._mediaKeysList.forEach(function(l){l.mediaKeysSession||(l.mediaKeysSession=l.mediaKeys.createSession(),f._onNewMediaKeySession(l.mediaKeysSession))})},s._onNewMediaKeySession=function(f){var l=this;v.logger.log("New key-system session "+f.sessionId),f.addEventListener("message",function(o){l._onKeySessionMessage(f,o.message)},!1)},s._onKeySessionMessage=function(f,l){v.logger.log("Got EME message event, creating license request"),this._requestLicense(l,function(o){v.logger.log("Received license data (length: "+(o&&o.byteLength)+"), updating key-session"),f.update(o)})},s.onMediaEncrypted=function(f){var l=this;if(v.logger.log('Media is encrypted using "'+f.initDataType+'" init data type'),!this.mediaKeysPromise){v.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var o=function(x){if(!l._media)return;l._attemptSetMediaKeys(x),l._generateRequestWithPreferredKeySession(f.initDataType,f.initData)};this.mediaKeysPromise.then(o).catch(o)},s._attemptSetMediaKeys=function(f){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var l=this._mediaKeysList[0];if(!l||!l.mediaKeys){v.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}v.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(l.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(f,l){var o=this,r=this._mediaKeysList[0];if(!r){v.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(r.mediaKeysSessionInitialized){v.logger.warn("Key-Session already initialized but requested again");return}var x=r.mediaKeysSession;if(!x){v.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!l){v.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}v.logger.log('Generating key-session request for "'+f+'" init data type'),r.mediaKeysSessionInitialized=!0,x.generateRequest(f,l).then(function(){v.logger.debug("Key-session generation succeeded")}).catch(function(b){v.logger.error("Error generating key-session request:",b),o.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(f,l,o){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,f,l,o);var x=this._licenseXhrSetup;if(x)try{x.call(this.hls,r,f),x=void 0}catch(b){v.logger.error(b)}try{r.readyState||r.open("POST",f,!0),x&&x.call(this.hls,r,f)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return r},s._onLicenseRequestReadyStageChange=function(f,l,o,r){switch(f.readyState){case 4:if(f.status===200){this._requestLicenseFailureCount=0,v.logger.log("License request succeeded");var x=f.response,b=this._licenseResponseCallback;if(b)try{x=b.call(this.hls,f,l)}catch(I){v.logger.error(I)}r(x)}else{if(v.logger.error("License Request XHR failed ("+l+"). Status: "+f.status+" ("+f.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h){this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=h-this._requestLicenseFailureCount+1;v.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(o,r)}break}},s._generateLicenseRequestChallenge=function(f,l){switch(f.mediaKeySystemDomain){case T.KeySystems.WIDEVINE:return l}throw new Error("unsupported key-system: "+f.mediaKeySystemDomain)},s._requestLicense=function(f,l){v.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){v.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var r=this.getLicenseServerUrl(o.mediaKeySystemDomain),x=this._createLicenseXhr(r,f,l);v.logger.log("Sending license request to URL: "+r);var b=this._generateLicenseRequestChallenge(o,f);x.send(b)}catch(p){v.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(f,l){if(!this._emeEnabled)return;var o=l.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var f=this._media,l=this._mediaKeysList;if(!f)return;f.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(l.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return f.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(f,l){if(!this._emeEnabled)return;var o=l.levels.map(function(x){return x.audioCodec}).filter(function(x){return!!x}),r=l.levels.map(function(x){return x.videoCodec}).filter(function(x){return!!x});this._attemptKeySystemAccess(T.KeySystems.WIDEVINE,o,r)},t(n,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),n}();g.default=a},"./src/controller/fps-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/events.ts"),m=C("./src/utils/logger.ts"),v=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 y=T.prototype;return y.setStreamController=function(h){this.streamController=h},y.registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},y.unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching)},y.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},y.onMediaAttaching=function(h,i){var c=this.hls.config;if(c.capLevelOnFPSDrop){var a=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=a,a&&typeof a.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},y.checkFPS=function(h,i,c){var a=performance.now();if(i){if(this.lastTime){var n=a-this.lastTime,s=c-this.lastDroppedFrames,d=i-this.lastDecodedFrames,f=1e3*s/n,l=this.hls;if(l.trigger(N.Events.FPS_DROP,{currentDropped:s,currentDecoded:d,totalDroppedFrames:c}),f>0&&s>l.config.fpsDroppedMonitoringThreshold*d){var o=l.currentLevel;m.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=o)&&(o=o-1,l.trigger(N.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:l.currentLevel}),l.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=c,this.lastDecodedFrames=i}},y.checkFPSInterval=function(){var h=this.media;if(h)if(this.isVideoPlaybackQualityAvailable){var i=h.getVideoPlaybackQuality();this.checkFPS(h,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(h,h.webkitDecodedFrameCount,h.webkitDroppedFrameCount)},T}();g.default=v},"./src/controller/fragment-finders.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"findFragmentByPDT",function(){return v}),C.d(g,"findFragmentByPTS",function(){return T}),C.d(g,"fragmentWithinToleranceTest",function(){return y}),C.d(g,"pdtWithinToleranceTest",function(){return t}),C.d(g,"findFragWithCC",function(){return h});var N=C("./src/polyfills/number.ts"),m=C("./src/utils/binary-search.ts");function v(i,c,a){if(c===null||!Array.isArray(i)||!i.length||!Object(N.isFiniteNumber)(c))return null;var n=i[0].programDateTime;if(c<(n||0))return null;var s=i[i.length-1].endProgramDateTime;if(c>=(s||0))return null;a=a||0;for(var d=0;d<i.length;++d){var f=i[d];if(t(c,a,f))return f}return null}function T(i,c,a,n){a===void 0&&(a=0),n===void 0&&(n=0);var s=null;if(i?s=c[i.sn-c[0].sn+1]||null:a===0&&c[0].start===0&&(s=c[0]),s&&y(a,n,s)===0)return s;var d=m.default.search(c,y.bind(null,a,n));return d||s}function y(i,c,a){i===void 0&&(i=0),c===void 0&&(c=0);var n=Math.min(c,a.duration+(a.deltaPTS?a.deltaPTS:0));return a.start+a.duration-n<=i?1:a.start-n>i&&a.start?-1:0}function t(i,c,a){var n=Math.min(c,a.duration+(a.deltaPTS?a.deltaPTS:0))*1e3,s=a.endProgramDateTime||0;return s-n>i}function h(i,c){return m.default.search(i,function(a){return a.cc<c?1:a.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"FragmentState",function(){return v}),C.d(g,"FragmentTracker",function(){return T});var N=C("./src/events.ts"),m=C("./src/types/loader.ts"),v;(function(h){h.NOT_LOADED="NOT_LOADED",h.BACKTRACKED="BACKTRACKED",h.APPENDING="APPENDING",h.PARTIAL="PARTIAL",h.OK="OK"})(v||(v={}));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 i=h.prototype;return i._registerListeners=function(){var a=this.hls;a.on(N.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.on(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(N.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var a=this.hls;a.off(N.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.off(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(N.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(a,n){if(n===m.PlaylistLevelType.MAIN){var s=this.activeFragment,d=this.activeParts;if(!s)return null;if(d)for(var f=d.length;f--;){var l=d[f],o=l?l.end:s.appendedPTS;if(l.start<=a&&o!==void 0&&a<=o)return f>9&&(this.activeParts=d.slice(f-9)),l}else if(s.start<=a&&s.appendedPTS!==void 0&&a<=s.appendedPTS)return s}return this.getBufferedFrag(a,n)},i.getBufferedFrag=function(a,n){for(var s=this.fragments,d=Object.keys(s),f=d.length;f--;){var l=s[d[f]];if((l==null?void 0:l.body.type)===n&&l.buffered){var o=l.body;if(o.start<=a&&a<=o.end)return o}}return null},i.detectEvictedFragments=function(a,n,s){var d=this;Object.keys(this.fragments).forEach(function(f){var l=d.fragments[f];if(!l)return;if(!l.buffered){l.body.type===s&&d.removeFragment(l.body);return}var o=l.range[a];if(!o)return;o.time.some(function(r){var x=!d.isTimeBuffered(r.startPTS,r.endPTS,n);return x&&d.removeFragment(l.body),x})})},i.detectPartialFragments=function(a){var n=this,s=this.timeRanges,d=a.frag,f=a.part;if(!s||d.sn==="initSegment")return;var l=t(d),o=this.fragments[l];if(!o)return;Object.keys(s).forEach(function(r){var x=d.elementaryStreams[r];if(!x)return;var b=s[r],p=f!==null||x.partial===!0;o.range[r]=n.getBufferedTimes(d,f,p,b)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},i.fragBuffered=function(a){var n=t(a),s=this.fragments[n];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},i.getBufferedTimes=function(a,n,s,d){for(var f={time:[],partial:s},l=n?n.start:a.start,o=n?n.end:a.end,r=a.minEndPTS||o,x=a.maxStartPTS||l,b=0;b<d.length;b++){var p=d.start(b)-this.bufferPadding,I=d.end(b)+this.bufferPadding;if(x>=p&&r<=I){f.time.push({startPTS:Math.max(l,d.start(b)),endPTS:Math.min(o,d.end(b))});break}else if(l<I&&o>p)f.partial=!0,f.time.push({startPTS:Math.max(l,d.start(b)),endPTS:Math.min(o,d.end(b))});else if(o<=p)break}return f},i.getPartialFragment=function(a){var n=null,s,d,f,l=0,o=this.bufferPadding,r=this.fragments;return Object.keys(r).forEach(function(x){var b=r[x];if(!b)return;y(b)&&(d=b.body.start-o,f=b.body.end+o,a>=d&&a<=f&&(s=Math.min(a-d,f-a),l<=s&&(n=b.body,l=s)))}),n},i.getState=function(a){var n=t(a),s=this.fragments[n];return s?s.buffered?y(s)?v.PARTIAL:v.OK:s.backtrack?v.BACKTRACKED:v.APPENDING:v.NOT_LOADED},i.backtrack=function(a,n){var s=t(a),d=this.fragments[s];if(!d||d.backtrack)return null;var f=d.backtrack=n||d.loaded;return d.loaded=null,f},i.getBacktrackData=function(a){var n=t(a),s=this.fragments[n];if(s){var d,f=s.backtrack;if(f!=null&&(d=f.payload)!==null&&d!==void 0&&d.byteLength)return f;this.removeFragment(a)}return null},i.isTimeBuffered=function(a,n,s){for(var d,f,l=0;l<s.length;l++){if(d=s.start(l)-this.bufferPadding,f=s.end(l)+this.bufferPadding,a>=d&&n<=f)return!0;if(n<=d)return!1}return!1},i.onFragLoaded=function(a,n){var s=n.frag,d=n.part;if(s.sn==="initSegment"||s.bitrateTest||d)return;var f=t(s);this.fragments[f]={body:s,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(a,n){var s=this,d=n.frag,f=n.part,l=n.timeRanges;if(d.type===m.PlaylistLevelType.MAIN)if(this.activeFragment=d,f){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(f)}else this.activeParts=null;this.timeRanges=l,Object.keys(l).forEach(function(r){var x=l[r];if(s.detectEvictedFragments(r,x),!f)for(var b=0;b<x.length;b++)d.appendedPTS=Math.max(x.end(b),d.appendedPTS||0)})},i.onFragBuffered=function(a,n){this.detectPartialFragments(n)},i.hasFragment=function(a){var n=t(a);return!!this.fragments[n]},i.removeFragmentsInRange=function(a,n,s){var d=this;Object.keys(this.fragments).forEach(function(f){var l=d.fragments[f];if(!l)return;if(l.buffered){var o=l.body;o.type===s&&o.start<n&&o.end>a&&d.removeFragment(o)}})},i.removeFragment=function(a){var n=t(a);a.stats.loaded=0,a.clearElementaryStreamInfo(),delete this.fragments[n]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},h}();function y(h){var i,c;return h.buffered&&(((i=h.range.video)===null||i===void 0?void 0:i.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(M,g,C){"use strict";C.r(g),C.d(g,"STALL_MINIMUM_DURATION_MS",function(){return y}),C.d(g,"MAX_START_GAP_JUMP",function(){return t}),C.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return h}),C.d(g,"SKIP_BUFFER_RANGE_START",function(){return i}),C.d(g,"default",function(){return c});var N=C("./src/utils/buffer-helper.ts"),m=C("./src/errors.ts"),v=C("./src/events.ts"),T=C("./src/utils/logger.ts"),y=250,t=2,h=.1,i=.05,c=function(){function a(s,d,f,l){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=d,this.fragmentTracker=f,this.hls=l}var n=a.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(d){var f=this.config,l=this.media,o=this.stalled,r=l.currentTime,x=l.seeking,b=this.seeking&&!x,p=!this.seeking&&x;if(this.seeking=x,r!==d){if(this.moved=!0,o!==null){if(this.stallReported){var I=self.performance.now()-o;T.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(I)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||b)&&(this.stalled=null),l.paused||l.ended||l.playbackRate===0||!N.BufferHelper.getBuffered(l).length)return;var O=N.BufferHelper.bufferInfo(l,r,0),_=O.len>0,E=O.nextStart||0;if(!_&&!E)return;if(x){var w=O.len>t,S=!E||E-r>t&&!this.fragmentTracker.getPartialFragment(r);if(w||S)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,P=Math.max(E,O.start||0)-r,L=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=L==null||((F=L.details)===null||F===void 0)?void 0:F.live,z=G?L.details.targetduration*2:t;if(P>0&&P<=z){this._trySkipBufferHole(null);return}}var A=self.performance.now();if(o===null){this.stalled=A;return}var B=A-o;!x&&B>=y&&this._reportStall(O.len);var U=N.BufferHelper.bufferInfo(l,r,f.maxBufferHole);this._tryFixBufferStall(U,B)},n._tryFixBufferStall=function(d,f){var l=this.config,o=this.fragmentTracker,r=this.media,x=r.currentTime,b=o.getPartialFragment(x);if(b){var p=this._trySkipBufferHole(b);if(p)return}d.len>l.maxBufferHole&&f>l.highBufferWatchdogPeriod*1e3&&(T.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},n._reportStall=function(d){var f=this.hls,l=this.media,o=this.stallReported;o||(this.stallReported=!0,T.logger.warn("Playback stalling at @"+l.currentTime+" due to low buffer (buffer="+d+")"),f.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},n._trySkipBufferHole=function(d){for(var f=this.config,l=this.hls,o=this.media,r=o.currentTime,x=0,b=N.BufferHelper.getBuffered(o),p=0;p<b.length;p++){var I=b.start(p);if(r+f.maxBufferHole>=x&&r<I){var O=Math.max(I+i,o.currentTime+h);return T.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+O),this.moved=!0,this.stalled=null,o.currentTime=O,d&&l.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+O,frag:d}),O}x=b.end(p)}return 0},n._tryNudgeBuffer=function(){var d=this.config,f=this.hls,l=this.media,o=l.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<d.nudgeMaxRetry){var x=o+r*d.nudgeOffset;T.logger.warn("Nudging 'currentTime' from "+o+" to "+x),l.currentTime=x,f.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else T.logger.error("Playhead still not moving while enough data buffered @"+o+" after "+d.nudgeMaxRetry+" nudges"),f.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},a}()},"./src/controller/id3-track-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/events.ts"),m=C("./src/utils/texttrack-utils.ts"),v=C("./src/demux/id3.ts"),T=.25,y=function(){function t(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var h=t.prototype;return h.destroy=function(){this._unregisterListeners()},h._registerListeners=function(){var c=this.hls;c.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(N.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h._unregisterListeners=function(){var c=this.hls;c.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(N.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h.onMediaAttached=function(c,a){this.media=a.media},h.onMediaDetaching=function(){if(!this.id3Track)return;Object(m.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},h.getID3Track=function(c){if(!this.media)return;for(var a=0;a<c.length;a++){var n=c[a];if(n.kind==="metadata"&&n.label==="id3")return Object(m.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")},h.onFragParsingMetadata=function(c,a){if(!this.media)return;var n=a.frag,s=a.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var d=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,f=0;f<s.length;f++){var l=v.getID3Frames(s[f].data);if(l){var o=s[f].pts,r=f<s.length-1?s[f+1].pts:n.end,x=r-o;x<=0&&(r=o+T);for(var b=0;b<l.length;b++){var p=l[b];if(!v.isTimeStampFrame(p)){var I=new d(o,r,"");I.value=p,this.id3Track.addCue(I)}}}}},h.onBufferFlushing=function(c,a){var n=a.startOffset,s=a.endOffset,d=a.type;if(!d||d==="audio"){var f=this.id3Track;f&&Object(m.removeCuesInRange)(f,n,s)}},t}();g.default=y},"./src/controller/latency-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return t});var N=C("./src/errors.ts"),m=C("./src/events.ts"),v=C("./src/utils/logger.ts");function T(h,i){for(var c=0;c<i.length;c++){var a=i[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(h,a.key,a)}}function y(h,i,c){return i&&T(h.prototype,i),c&&T(h,c),h}var t=function(){function h(c){var a=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return a.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var i=h.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(m.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(m.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(m.Events.ERROR,this.onError)},i.onMediaAttached=function(a,n){this.media=n.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(a,n){var s=n.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(a,n){if(n.details!==N.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,v.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var a=this.media,n=this.levelDetails;if(!a||!n)return;this.currentTime=a.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var d=this.config,f=d.lowLatencyMode,l=d.maxLiveSyncPlaybackRate;if(!f||l===1)return;var o=this.targetLatency;if(o===null)return;var r=s-o,x=Math.min(this.maxLatency,o+n.targetduration),b=r<x;if(n.live&&b&&r>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,l)),I=Math.round(2/(1+Math.exp(-.75*r-this.edgeStalled))*20)/20;a.playbackRate=Math.min(p,Math.max(1,I))}else a.playbackRate!==1&&a.playbackRate!==0&&(a.playbackRate=1)},i.estimateLiveEdge=function(){var a=this.levelDetails;return a===null?null:a.edge+a.age},i.computeLatency=function(){var a=this.estimateLiveEdge();return a===null?null:a-this.currentTime},y(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var a=this.config,n=this.levelDetails;return a.liveMaxLatencyDuration!==void 0?a.liveMaxLatencyDuration:n?a.liveMaxLatencyDurationCount*n.targetduration:0}},{key:"targetLatency",get:function(){var a=this.levelDetails;if(a===null)return null;var n=a.holdBack,s=a.partHoldBack,d=a.targetduration,f=this.config,l=f.liveSyncDuration,o=f.liveSyncDurationCount,r=f.lowLatencyMode,x=this.hls.userConfig,b=r&&s||n;(x.liveSyncDuration||x.liveSyncDurationCount||b===0)&&(b=l!==void 0?l:o*d);var p=d,I=1;return b+Math.min(this.stallCount*I,p)}},{key:"liveSyncPosition",get:function(){var a=this.estimateLiveEdge(),n=this.targetLatency,s=this.levelDetails;if(a===null||n===null||s===null)return null;var d=s.edge,f=a-n-this.edgeStalled,l=d-s.totalduration,o=d-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(l,f),o)}},{key:"drift",get:function(){var a=this.levelDetails;return a===null?1:a.drift}},{key:"edgeStalled",get:function(){var a=this.levelDetails;if(a===null)return 0;var n=(this.config.lowLatencyMode&&a.partTarget||a.targetduration)*3;return Math.max(a.age-n,0)}},{key:"forwardBufferLength",get:function(){var a=this.media,n=this.levelDetails;if(!a||!n)return 0;var s=a.buffered.length;return s?a.buffered.end(s-1):n.edge-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return f});var N=C("./src/types/level.ts"),m=C("./src/events.ts"),v=C("./src/errors.ts"),T=C("./src/utils/codecs.ts"),y=C("./src/controller/level-helper.ts"),t=C("./src/controller/base-playlist-controller.ts"),h=C("./src/types/loader.ts");function i(){return i=Object.assign||function(l){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var x in r)Object.prototype.hasOwnProperty.call(r,x)&&(l[x]=r[x])}return l},i.apply(this,arguments)}function c(l,o){for(var r=0;r<o.length;r++){var x=o[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function a(l,o,r){return o&&c(l.prototype,o),r&&c(l,r),l}function n(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,s(l,o)}function s(l,o){return s=Object.setPrototypeOf||function(x,b){return x.__proto__=b,x},s(l,o)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),f=function(l){n(o,l);function o(x){var b;return b=l.call(this,x,"[level-controller]")||this,b._levels=[],b._firstLevel=-1,b._startLevel=void 0,b.currentLevelIndex=-1,b.manualLevelIndex=-1,b.onParsedComplete=void 0,b._registerListeners(),b}var r=o.prototype;return r._registerListeners=function(){var b=this.hls;b.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(m.Events.ERROR,this.onError,this)},r._unregisterListeners=function(){var b=this.hls;b.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(m.Events.ERROR,this.onError,this)},r.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,l.prototype.destroy.call(this)},r.startLoad=function(){var b=this._levels;b.forEach(function(p){p.loadError=0}),l.prototype.startLoad.call(this)},r.onManifestLoaded=function(b,p){var I=[],O=[],_=[],E,w={},S,F=!1,P=!1,L=!1;if(p.levels.forEach(function(B){var U=B.attrs;F=F||!!(B.width&&B.height),P=P||!!B.videoCodec,L=L||!!B.audioCodec,d&&B.audioCodec&&B.audioCodec.indexOf("mp4a.40.34")!==-1&&(B.audioCodec=void 0);var R=B.bitrate+"-"+B.attrs.RESOLUTION+"-"+B.attrs.CODECS;S=w[R],S?S.url.push(B.url):(S=new N.Level(B),w[R]=S,I.push(S)),U&&(U.AUDIO&&Object(y.addGroupId)(S,"audio",U.AUDIO),U.SUBTITLES&&Object(y.addGroupId)(S,"text",U.SUBTITLES))}),(F||P)&&L&&(I=I.filter(function(B){var U=B.videoCodec,R=B.width,K=B.height;return!!U||!!(R&&K)})),I=I.filter(function(B){var U=B.audioCodec,R=B.videoCodec;return(!U||Object(T.isCodecSupportedInMp4)(U,"audio"))&&(!R||Object(T.isCodecSupportedInMp4)(R,"video"))}),p.audioTracks&&(O=p.audioTracks.filter(function(B){return!B.audioCodec||Object(T.isCodecSupportedInMp4)(B.audioCodec,"audio")}),Object(y.assignTrackIdsByGroup)(O)),p.subtitles&&(_=p.subtitles,Object(y.assignTrackIdsByGroup)(_)),I.length>0){E=I[0].bitrate,I.sort(function(B,U){return B.bitrate-U.bitrate}),this._levels=I;for(var G=0;G<I.length;G++)if(I[G].bitrate===E){this._firstLevel=G,this.log("manifest loaded, "+I.length+" level(s) found, first bitrate: "+E);break}var z=L&&!P,A={levels:I,audioTracks:O,subtitleTracks:_,firstLevel:this._firstLevel,stats:p.stats,audio:L,video:P,altAudio:!z&&O.some(function(B){return!!B.url})};this.hls.trigger(m.Events.MANIFEST_PARSED,A),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},r.onError=function(b,p){if(l.prototype.onError.call(this,b,p),p.fatal)return;var I=p.context,O=this._levels[this.currentLevelIndex];if(I&&(I.type===h.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&I.groupId===O.audioGroupIds[O.urlId]||I.type===h.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&I.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var _=!1,E=!0,w;switch(p.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:if(p.frag){var S=this._levels[p.frag.level];S?(S.fragmentError++,S.fragmentError>this.hls.config.fragLoadingMaxRetry&&(w=p.frag.level)):w=p.frag.level}break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:I&&(I.deliveryDirectives&&(E=!1),w=I.level),_=!0;break;case v.ErrorDetails.REMUX_ALLOC_ERROR:w=p.level,_=!0;break}w!==void 0&&this.recoverLevel(p,w,_,E)},r.recoverLevel=function(b,p,I,O){var _=b.details,E=this._levels[p];if(E.loadError++,I){var w=this.retryLoadingOrFail(b);if(w)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var S=E.url.length;if(S>1&&E.loadError<S)b.levelRetry=!0,this.redundantFailover(p);else if(this.manualLevelIndex===-1){var F=p===0?this._levels.length-1:p-1;this.currentLevelIndex!==F&&this._levels[F].loadError===0&&(this.warn(_+": switch to "+F),b.levelRetry=!0,this.hls.nextAutoLevel=F)}}},r.redundantFailover=function(b){var p=this._levels[b],I=p.url.length;if(I>1){var O=(p.urlId+1)%I;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(_){_.urlId=O}),this.level=b}},r.onFragLoaded=function(b,p){var I=p.frag;if(I!==void 0&&I.type===h.PlaylistLevelType.MAIN){var O=this._levels[I.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},r.onLevelLoaded=function(b,p){var I,O=p.level,_=p.details,E=this._levels[O];if(!E){var w;this.warn("Invalid level index "+O),(w=p.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(_.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(O,p,E.details)):(I=p.deliveryDirectives)!==null&&I!==void 0&&I.skip&&(_.deltaUpdateFailed=!0)},r.onAudioTrackSwitched=function(b,p){var I=this.hls.levels[this.currentLevelIndex];if(!I)return;if(I.audioGroupIds){for(var O=-1,_=this.hls.audioTracks[p.id].groupId,E=0;E<I.audioGroupIds.length;E++)if(I.audioGroupIds[E]===_){O=E;break}O!==I.urlId&&(I.urlId=O,this.startLoad())}},r.loadPlaylist=function(b){var p=this.currentLevelIndex,I=this._levels[p];if(this.canLoad&&I&&I.url.length>0){var O=I.urlId,_=I.url[O];if(b)try{_=b.addDirectives(_)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+p+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+O+" "+_),this.clearTimer(),this.hls.trigger(m.Events.LEVEL_LOADING,{url:_,level:p,id:O,deliveryDirectives:b||null})}},r.removeLevel=function(b,p){var I=function(E,w){return w!==p},O=this._levels.filter(function(_,E){return E!==b?!0:_.url.length>1&&p!==void 0?(_.url=_.url.filter(I),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(I)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(I)),_.urlId=0,!0):!1}).map(function(_,E){var w=_.details;return w!=null&&w.fragments&&w.fragments.forEach(function(S){S.level=E}),_});this._levels=O,this.hls.trigger(m.Events.LEVELS_UPDATED,{levels:O})},a(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var p,I=this._levels;if(I.length===0)return;if(this.currentLevelIndex===b&&(p=I[b])!==null&&p!==void 0&&p.details)return;if(b<0||b>=I.length){var O=b<0;if(this.hls.trigger(m.Events.ERROR,{type:v.ErrorTypes.OTHER_ERROR,details:v.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:O,reason:"invalid level idx"}),O)return;b=Math.min(b,I.length-1)}this.clearTimer();var _=this.currentLevelIndex,E=I[_],w=I[b];this.log("switching to level "+b+" from "+_),this.currentLevelIndex=b;var S=i({},w,{level:b,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete S._urlId,this.hls.trigger(m.Events.LEVEL_SWITCHING,S);var F=w.details;if(!F||F.live){var P=this.switchParams(w.uri,E==null?void 0:E.details);this.loadPlaylist(P)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(b){this.manualLevelIndex=b,this._startLevel===void 0&&(this._startLevel=b),b!==-1&&(this.level=b)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(b){this._firstLevel=b}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var b=this.hls.config.startLevel;return b!==void 0?b:this._firstLevel}else return this._startLevel},set:function(b){this._startLevel=b}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(b){this.level=b,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=b)}}]),o}(t.default)},"./src/controller/level-helper.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"addGroupId",function(){return v}),C.d(g,"assignTrackIdsByGroup",function(){return T}),C.d(g,"updatePTS",function(){return y}),C.d(g,"updateFragPTSDTS",function(){return h}),C.d(g,"mergeDetails",function(){return i}),C.d(g,"mapPartIntersection",function(){return c}),C.d(g,"mapFragmentIntersection",function(){return a}),C.d(g,"adjustSliding",function(){return n}),C.d(g,"addSliding",function(){return s}),C.d(g,"computeReloadInterval",function(){return d}),C.d(g,"getFragmentWithSN",function(){return f}),C.d(g,"getPartWith",function(){return l});var N=C("./src/polyfills/number.ts"),m=C("./src/utils/logger.ts");function v(o,r,x){switch(r){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(x);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(x);break}}function T(o){var r={};o.forEach(function(x){var b=x.groupId||"";x.id=r[b]=r[b]||0,r[b]++})}function y(o,r,x){var b=o[r],p=o[x];t(b,p)}function t(o,r){var x=r.startPTS;if(Object(N.isFiniteNumber)(x)){var b=0,p;r.sn>o.sn?(b=x-o.start,p=o):(b=o.start-x,p=r),p.duration!==b&&(p.duration=b)}else if(r.sn>o.sn){var I=o.cc===r.cc;I&&o.minEndPTS?r.start=o.start+(o.minEndPTS-o.start):r.start=o.start+o.duration}else r.start=Math.max(o.start-r.duration,0)}function h(o,r,x,b,p,I){var O=b-x;O<=0&&(m.logger.warn("Fragment should have a positive duration",r),b=x+r.duration,I=p+r.duration);var _=x,E=b,w=r.startPTS,S=r.endPTS;if(Object(N.isFiniteNumber)(w)){var F=Math.abs(w-x);Object(N.isFiniteNumber)(r.deltaPTS)?r.deltaPTS=Math.max(F,r.deltaPTS):r.deltaPTS=F,_=Math.max(x,w),x=Math.min(x,w),p=Math.min(p,r.startDTS),E=Math.min(b,S),b=Math.max(b,S),I=Math.max(I,r.endDTS)}r.duration=b-x;var P=x-r.start;r.appendedPTS=b,r.start=r.startPTS=x,r.maxStartPTS=_,r.startDTS=p,r.endPTS=b,r.minEndPTS=E,r.endDTS=I;var L=r.sn;if(!o||L<o.startSN||L>o.endSN)return 0;var G,z=L-o.startSN,A=o.fragments;for(A[z]=r,G=z;G>0;G--)t(A[G],A[G-1]);for(G=z;G<A.length-1;G++)t(A[G],A[G+1]);return o.fragmentHint&&t(A[A.length-1],o.fragmentHint),o.PTSKnown=o.alignedSliding=!0,P}function i(o,r){for(var x=null,b=o.fragments,p=b.length-1;p>=0;p--){var I=b[p].initSegment;if(I){x=I;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var O=0,_;if(a(o,r,function(G,z){G.relurl&&(O=G.cc-z.cc),Object(N.isFiniteNumber)(G.startPTS)&&Object(N.isFiniteNumber)(G.endPTS)&&(z.start=z.startPTS=G.startPTS,z.startDTS=G.startDTS,z.appendedPTS=G.appendedPTS,z.maxStartPTS=G.maxStartPTS,z.endPTS=G.endPTS,z.endDTS=G.endDTS,z.minEndPTS=G.minEndPTS,z.duration=G.endPTS-G.startPTS,z.duration&&(_=z),r.PTSKnown=r.alignedSliding=!0),z.elementaryStreams=G.elementaryStreams,z.loader=G.loader,z.stats=G.stats,z.urlId=G.urlId,G.initSegment&&(z.initSegment=G.initSegment,x=G.initSegment)}),x){var E=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;E.forEach(function(G){var z;(!G.initSegment||G.initSegment.relurl===((z=x)===null||z===void 0?void 0:z.relurl))&&(G.initSegment=x)})}if(r.skippedSegments&&(r.deltaUpdateFailed=r.fragments.some(function(G){return!G}),r.deltaUpdateFailed)){m.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=r.skippedSegments;w--;)r.fragments.shift();r.startSN=r.fragments[0].sn,r.startCC=r.fragments[0].cc}var S=r.fragments;if(O){m.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<S.length;F++)S[F].cc+=O}r.skippedSegments&&(r.startCC=r.fragments[0].cc),c(o.partList,r.partList,function(G,z){z.elementaryStreams=G.elementaryStreams,z.stats=G.stats}),_?h(r,_,_.startPTS,_.endPTS,_.startDTS,_.endDTS):n(o,r),S.length&&(r.totalduration=r.edge-S[0].start),r.driftStartTime=o.driftStartTime,r.driftStart=o.driftStart;var P=r.advancedDateTime;if(r.advanced&&P){var L=r.edge;r.driftStart||(r.driftStartTime=P,r.driftStart=L),r.driftEndTime=P,r.driftEnd=L}else r.driftEndTime=o.driftEndTime,r.driftEnd=o.driftEnd,r.advancedDateTime=o.advancedDateTime}function c(o,r,x){if(o&&r)for(var b=0,p=0,I=o.length;p<=I;p++){var O=o[p],_=r[p+b];O&&_&&O.index===_.index&&O.fragment.sn===_.fragment.sn?x(O,_):b--}}function a(o,r,x){for(var b=r.skippedSegments,p=Math.max(o.startSN,r.startSN)-r.startSN,I=(o.fragmentHint?1:0)+(b?r.endSN:Math.min(o.endSN,r.endSN))-r.startSN,O=r.startSN-o.startSN,_=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,E=o.fragmentHint?o.fragments.concat(o.fragmentHint):o.fragments,w=p;w<=I;w++){var S=E[O+w],F=_[w];b&&!F&&w<b&&(F=r.fragments[w]=S),S&&F&&x(S,F)}}function n(o,r){var x=r.startSN+r.skippedSegments-o.startSN,b=o.fragments;if(x<0||x>=b.length)return;s(r,b[x].start)}function s(o,r){if(r){for(var x=o.fragments,b=o.skippedSegments;b<x.length;b++)x[b].start+=r;o.fragmentHint&&(o.fragmentHint.start+=r)}}function d(o,r){var x=1e3*o.levelTargetDuration,b=x/2,p=o.age,I=p>0&&p<x*3,O=r.loading.end-r.loading.start,_,E=o.availabilityDelay;if(o.updated===!1)if(I){var w=333*o.misses;_=Math.max(Math.min(b,O*2),w),o.availabilityDelay=(o.availabilityDelay||0)+_}else _=b;else I?(E=Math.min(E||x/2,p),o.availabilityDelay=E,_=E+x-p):_=x-O;return Math.round(_)}function f(o,r,x){if(!o||!o.details)return null;var b=o.details,p=b.fragments[r-b.startSN];return p||(p=b.fragmentHint,p&&p.sn===r?p:r<b.startSN&&x&&x.sn===r?x:null)}function l(o,r,x){if(!o||!o.details)return null;var b=o.details.partList;if(b)for(var p=b.length;p--;){var I=b[p];if(I.index===x&&I.fragment.sn===r)return I}return null}},"./src/controller/stream-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return b});var N=C("./src/polyfills/number.ts"),m=C("./src/controller/base-stream-controller.ts"),v=C("./src/is-supported.ts"),T=C("./src/events.ts"),y=C("./src/utils/buffer-helper.ts"),t=C("./src/controller/fragment-tracker.ts"),h=C("./src/types/loader.ts"),i=C("./src/loader/fragment.ts"),c=C("./src/demux/transmuxer-interface.ts"),a=C("./src/types/transmuxer.ts"),n=C("./src/controller/gap-controller.ts"),s=C("./src/errors.ts"),d=C("./src/utils/logger.ts");function f(p,I){for(var O=0;O<I.length;O++){var _=I[O];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(p,_.key,_)}}function l(p,I,O){return I&&f(p.prototype,I),O&&f(p,O),p}function o(p,I){p.prototype=Object.create(I.prototype),p.prototype.constructor=p,r(p,I)}function r(p,I){return r=Object.setPrototypeOf||function(_,E){return _.__proto__=E,_},r(p,I)}var x=100,b=function(p){o(I,p);function I(_,E){var w;return w=p.call(this,_,E,"[stream-controller]")||this,w.audioCodecSwap=!1,w.gapController=null,w.level=-1,w._forceStartLoad=!1,w.altAudio=!1,w.audioOnly=!1,w.fragPlaying=null,w.onvplaying=null,w.onvseeked=null,w.fragLastKbps=0,w.stalled=!1,w.couldBacktrack=!1,w.audioCodecSwitch=!1,w.videoBuffer=null,w._registerListeners(),w}var O=I.prototype;return O._registerListeners=function(){var E=this.hls;E.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(T.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(T.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(T.Events.ERROR,this.onError,this),E.on(T.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(T.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(T.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(T.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var E=this.hls;E.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(T.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(T.Events.ERROR,this.onError,this),E.off(T.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(T.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(T.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(T.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(E){if(this.levels){var w=this.lastCurrentTime,S=this.hls;if(this.stopLoad(),this.setInterval(x),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var F=S.startLevel;F===-1&&(S.config.testBandwidth?(F=0,this.bitrateTest=!0):F=S.nextAutoLevel),this.level=S.nextLoadLevel=F,this.loadedmetadata=!1}w>0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),E=w),this.state=m.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=m.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_LEVEL:{var E,w=this.levels,S=this.level,F=w==null||((E=w[S])===null||E===void 0)?void 0:E.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=m.State.IDLE;break}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var P,L=self.performance.now(),G=this.retryDate;(!G||L>=G||(P=this.media)!==null&&P!==void 0&&P.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=m.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var E,w,S=this.hls,F=this.levelLastLoaded,P=this.levels,L=this.media,G=S.config,z=S.nextLoadLevel;if(F===null||!L&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!P||!P[z])return;var A=P[z];this.level=S.nextLoadLevel=z;var B=A.details;if(!B||this.state===m.State.WAITING_LEVEL||B.live&&this.levelLastLoaded!==z){this.state=m.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:L,h.PlaylistLevelType.MAIN);if(U===null)return;var R=U.len,K=this.getMaxBufferLength(A.maxBitrate);if(R>=K)return;if(this._streamEnded(U,B)){var Z={};this.altAudio&&(Z.type="video"),this.hls.trigger(T.Events.BUFFER_EOS,Z),this.state=m.State.ENDED;return}var ue=U.end,de=this.getNextFragment(ue,B);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Ce=de.sn-B.startSN;Ce>1&&(de=B.fragments[Ce-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===t.FragmentState.OK&&this.nextLoadPosition>ue){var Re=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(L,Re,h.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,B)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((E=de.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((w=de.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(de,B):this.loadFragment(de,B,ue)},O.loadFragment=function(E,w,S){var F,P=this.fragmentTracker.getState(E);if(this.fragCurrent=E,P===t.FragmentState.BACKTRACKED){var L=this.fragmentTracker.getBacktrackData(E);if(L){this._handleFragmentLoadProgress(L),this._handleFragmentLoadComplete(L);return}else P=t.FragmentState.NOT_LOADED}P===t.FragmentState.NOT_LOADED||P===t.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,E,w,S)):P===t.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(E){var w=this.fragmentTracker.getAppendedFrag(E,h.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},O.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,h.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var E=this.levels,w=this.media;if(w!=null&&w.readyState){var S,F=this.getAppendedFrag(w.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!w.paused&&E){var P=this.hls.nextLoadLevel,L=E[P],G=this.fragLastKbps;G&&this.fragCurrent?S=this.fragCurrent.duration*L.maxBitrate/(1e3*G)+1:S=0}else S=0;var z=this.getBufferedFrag(w.currentTime+S);if(z){var A=this.followingBufferedFrag(z);if(A){this.abortCurrentFrag();var B=A.maxStartPTS?A.maxStartPTS:A.start,U=A.duration,R=Math.max(z.end,B+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(R,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===m.State.KEY_LOADING&&(this.state=m.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(E,w){p.prototype.flushMainBuffer.call(this,E,w,this.altAudio?"video":null)},O.onMediaAttached=function(E,w){p.prototype.onMediaAttached.call(this,E,w);var S=w.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)},O.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),p.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var E=this.media,w=E?E.currentTime:null;Object(N.isFiniteNumber)(w)&&this.log("Media seeked to "+w.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(T.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(E,w){var S=!1,F=!1,P;w.levels.forEach(function(L){P=L.audioCodec,P&&(P.indexOf("mp4a.40.2")!==-1&&(S=!0),P.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=S&&F&&!Object(v.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=w.levels,this.startFragRequested=!1},O.onLevelLoading=function(E,w){var S=this.levels;if(!S||this.state!==m.State.IDLE)return;var F=S[w.level];(!F.details||F.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(F.details))&&(this.state=m.State.WAITING_LEVEL)},O.onLevelLoaded=function(E,w){var S,F=this.levels,P=w.level,L=w.details,G=L.totalduration;if(!F){this.warn("Levels were reset while loading level "+P);return}this.log("Level "+P+" loaded ["+L.startSN+","+L.endSN+"], cc ["+L.startCC+", "+L.endCC+"] duration:"+G);var z=this.fragCurrent;z&&(this.state===m.State.FRAG_LOADING||this.state===m.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==w.level&&z.loader&&(this.state=m.State.IDLE,z.loader.abort()));var A=F[P],B=0;if(L.live||(S=A.details)!==null&&S!==void 0&&S.live){if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed)return;B=this.alignPlaylists(L,A.details)}if(A.details=L,this.levelLastLoaded=P,this.hls.trigger(T.Events.LEVEL_UPDATED,{details:L,level:P}),this.state===m.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(L))return;this.state=m.State.IDLE}this.startFragRequested?L.live&&this.synchronizeToLiveEdge(L):this.setStartPosition(L,B),this.tick()},O._handleFragmentLoadProgress=function(E){var w,S=E.frag,F=E.part,P=E.payload,L=this.levels;if(!L){this.warn("Levels were reset while fragment load was in progress. Fragment "+S.sn+" of level "+S.level+" will not be buffered");return}var G=L[S.level],z=G.details;if(!z){this.warn("Dropping fragment "+S.sn+" of level "+S.level+" after level details were reset");return}var A=G.videoCodec,B=z.PTSKnown||!z.live,U=(w=S.initSegment)===null||w===void 0?void 0:w.data,R=this._getAudioCodec(G),K=this.transmuxer=this.transmuxer||new c.default(this.hls,h.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Z=F?F.index:-1,ue=Z!==-1,de=new a.ChunkMetadata(S.level,S.sn,S.stats.chunkCount,P.byteLength,Z,ue),Ce=this.initPTS[S.cc];K.push(P,U,R,A,S,F,z.totalduration,B,de,Ce)},O.onAudioTrackSwitching=function(E,w){var S=this.altAudio,F=!!w.url,P=w.id;if(!F){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var L=this.fragCurrent;L!=null&&L.loader&&(this.log("Switching to main audio track, cancel main fragment load"),L.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;S&&G.trigger(T.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(T.Events.AUDIO_TRACK_SWITCHED,{id:P})}},O.onAudioTrackSwitched=function(E,w){var S=w.id,F=!!this.hls.audioTracks[S].url;if(F){var P=this.videoBuffer;P&&this.mediaBuffer!==P&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=P)}this.altAudio=F,this.tick()},O.onBufferCreated=function(E,w){var S=w.tracks,F,P,L=!1;for(var G in S){var z=S[G];if(z.id==="main"){if(P=G,F=z,G==="video"){var A=S[G];A&&(this.videoBuffer=A.buffer)}}else L=!0}L&&F?(this.log("Alternate track found, use "+P+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(E,w){var S=w.frag,F=w.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===m.State.PARSED&&(this.state=m.State.IDLE);return}var P=F?F.stats:S.stats;this.fragLastKbps=Math.round(8*P.total/(P.buffering.end-P.loading.first)),S.sn!=="initSegment"&&(this.fragPrevious=S),this.fragBufferedComplete(S,F)},O.onError=function(E,w){switch(w.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.MAIN,w);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==m.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=m.State.ERROR):!w.levelRetry&&this.state===m.State.WAITING_LEVEL&&(this.state=m.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===m.State.PARSING||this.state===m.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}},O.checkBuffer=function(){var E=this.media,w=this.gapController;if(!E||!w||!E.readyState)return;var S=y.BufferHelper.getBuffered(E);!this.loadedmetadata&&S.length?(this.loadedmetadata=!0,this.seekToStartPos()):w.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=m.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(E,w){var S=w.type;if(S!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(S===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,S,h.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(E,w){this.levels=w.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var E=this.media,w=E.currentTime,S=this.startPosition;if(S>=0&&w<S){if(E.seeking){d.logger.log("could not seek to "+S+", already seeking at "+w);return}var F=y.BufferHelper.getBuffered(E),P=F.length?F.start(0):0,L=P-S;L>0&&(L<this.config.maxBufferHole||L<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+L+" to match buffer start"),S+=L,this.startPosition=S),this.log("seek to target start position "+S+" from current time "+w),E.currentTime=S}},O._getAudioCodec=function(E){var w=this.config.defaultAudioCodec||E.audioCodec;return this.audioCodecSwap&&w&&(this.log("Swapping audio codec"),w.indexOf("mp4a.40.5")!==-1?w="mp4a.40.2":w="mp4a.40.5"),w},O._loadBitrateTestFrag=function(E){var w=this;this._doFragLoad(E).then(function(S){var F=w.hls;if(!S||F.nextLoadLevel||w.fragContextChanged(E))return;w.fragLoadError=0,w.state=m.State.IDLE,w.startFragRequested=!1,w.bitrateTest=!1;var P=E.stats;P.parsing.start=P.parsing.end=P.buffering.start=P.buffering.end=self.performance.now(),F.trigger(T.Events.FRAG_LOADED,S)})},O._handleTransmuxComplete=function(E){var w,S="main",F=this.hls,P=E.remuxResult,L=E.chunkMeta,G=this.getCurrentContext(L);if(!G){this.warn("The loading context changed while buffering fragment "+L.sn+" of level "+L.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(L.level);return}var z=G.frag,A=G.part,B=G.level,U=P.video,R=P.text,K=P.id3,Z=P.initSegment,ue=this.altAudio?void 0:P.audio;if(this.fragContextChanged(z))return;if(this.state=m.State.PARSING,Z){Z.tracks&&(this._bufferInitSegment(B,Z.tracks,z,L),F.trigger(T.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:S,tracks:Z.tracks}));var de=Z.initPTS,Ce=Z.timescale;Object(N.isFiniteNumber)(de)&&(this.initPTS[z.cc]=de,F.trigger(T.Events.INIT_PTS_FOUND,{frag:z,id:S,initPTS:de,timescale:Ce}))}if(U&&P.independent!==!1){if(B.details){var Re=U.startPTS,me=U.endPTS,Oe=U.startDTS,be=U.endDTS;if(A)A.elementaryStreams[U.type]={startPTS:Re,endPTS:me,startDTS:Oe,endDTS:be};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ce=this.getLoadPosition()+this.config.maxBufferHole;if(ce<Re){this.backtrack(z);return}z.setElementaryStreamInfo(U.type,z.start,me,z.start,be,!0)}z.setElementaryStreamInfo(U.type,Re,me,Oe,be),this.bufferFragmentData(U,z,A,L)}}else if(P.independent===!1){this.backtrack(z);return}if(ue){var le=ue.startPTS,ne=ue.endPTS,ge=ue.startDTS,te=ue.endDTS;A&&(A.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:ne,startDTS:ge,endDTS:te}),z.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,le,ne,ge,te),this.bufferFragmentData(ue,z,A,L)}if(K!=null&&(w=K.samples)!==null&&w!==void 0&&w.length){var re={frag:z,id:S,samples:K.samples};F.trigger(T.Events.FRAG_PARSING_METADATA,re)}if(R){var Se={frag:z,id:S,samples:R.samples};F.trigger(T.Events.FRAG_PARSING_USERDATA,Se)}},O._bufferInitSegment=function(E,w,S,F){var P=this;if(this.state!==m.State.PARSING)return;this.audioOnly=!!w.audio&&!w.video,this.altAudio&&!this.audioOnly&&delete w.audio;var L=w.audio,G=w.video,z=w.audiovideo;if(L){var A=E.audioCodec,B=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(A&&(A.indexOf("mp4a.40.5")!==-1?A="mp4a.40.2":A="mp4a.40.5"),L.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(A="mp4a.40.5")),B.indexOf("android")!==-1&&L.container!=="audio/mpeg"&&(A="mp4a.40.2",this.log("Android: force audio codec to "+A)),E.audioCodec&&E.audioCodec!==A&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+A+'"'),L.levelCodec=A,L.id="main",this.log("Init audio buffer, container:"+L.container+", codecs[selected/level/parsed]=["+(A||"")+"/"+(E.audioCodec||"")+"/"+L.codec+"]")}G&&(G.levelCodec=E.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(E.videoCodec||"")+"/"+G.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(E.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(T.Events.BUFFER_CODECS,w),Object.keys(w).forEach(function(U){var R=w[U],K=R.initSegment;K!=null&&K.byteLength&&P.hls.trigger(T.Events.BUFFER_APPENDING,{type:U,data:K,frag:S,part:null,chunkMeta:F,parent:S.type})}),this.tick()},O.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var w=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,w?this.resetFragmentLoading(E):this.state=m.State.BACKTRACKING},O.checkFragmentChanged=function(){var E=this.media,w=null;if(E&&E.readyState>1&&E.seeking===!1){var S=E.currentTime;if(y.BufferHelper.isBuffered(E,S)?w=this.getAppendedFrag(S):y.BufferHelper.isBuffered(E,S+.1)&&(w=this.getAppendedFrag(S+.1)),w){var F=this.fragPlaying,P=w.level;(!F||w.sn!==F.sn||F.level!==P||w.urlId!==F.urlId)&&(this.hls.trigger(T.Events.FRAG_CHANGED,{frag:w}),(!F||F.level!==P)&&this.hls.trigger(T.Events.LEVEL_SWITCHED,{level:P}),this.fragPlaying=w)}}},l(I,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);if(w)return w.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(w)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),I}(m.default)},"./src/controller/subtitle-stream-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"SubtitleStreamController",function(){return o});var N=C("./src/events.ts"),m=C("./src/utils/logger.ts"),v=C("./src/utils/buffer-helper.ts"),T=C("./src/controller/fragment-finders.ts"),y=C("./src/utils/discontinuities.ts"),t=C("./src/controller/level-helper.ts"),h=C("./src/controller/fragment-tracker.ts"),i=C("./src/controller/base-stream-controller.ts"),c=C("./src/types/loader.ts"),a=C("./src/types/level.ts");function n(r,x){for(var b=0;b<x.length;b++){var p=x[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(r,p.key,p)}}function s(r,x,b){return x&&n(r.prototype,x),b&&n(r,b),r}function d(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,f(r,x)}function f(r,x){return f=Object.setPrototypeOf||function(p,I){return p.__proto__=I,p},f(r,x)}var l=500,o=function(r){d(x,r);function x(p,I){var O;return O=r.call(this,p,I,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var b=x.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var I=this.hls;I.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),I.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),I.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),I.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),I.on(N.Events.ERROR,this.onError,this),I.on(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),I.on(N.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),I.on(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),I.on(N.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),I.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var I=this.hls;I.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),I.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),I.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),I.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),I.off(N.Events.ERROR,this.onError,this),I.off(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),I.off(N.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),I.off(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),I.off(N.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),I.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(l),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(I,O){this.mainDetails=O.details},b.onSubtitleFragProcessed=function(I,O){var _=O.frag,E=O.success;if(this.fragPrevious=_,this.state=i.State.IDLE,!E)return;var w=this.tracksBuffered[this.currentTrackId];if(!w)return;for(var S,F=_.start,P=0;P<w.length;P++)if(F>=w[P].start&&F<=w[P].end){S=w[P];break}var L=_.start+_.duration;S?S.end=L:(S={start:F,end:L},w.push(S)),this.fragmentTracker.fragBuffered(_)},b.onBufferFlushing=function(I,O){var _=O.startOffset,E=O.endOffset;if(_===0&&E!==Number.POSITIVE_INFINITY){var w=this.currentTrackId,S=this.levels;if(!S.length||!S[w]||!S[w].details)return;var F=S[w].details,P=F.targetduration,L=E-P;if(L<=0)return;O.endOffsetSubtitles=Math.max(0,L),this.tracksBuffered.forEach(function(G){for(var z=0;z<G.length;){if(G[z].end<=L){G.shift();continue}else if(G[z].start<L)G[z].start=L;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(_,L,c.PlaylistLevelType.SUBTITLE)}},b.onError=function(I,O){var _,E=O.frag;if(!E||E.type!==c.PlaylistLevelType.SUBTITLE)return;(_=this.fragCurrent)!==null&&_!==void 0&&_.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},b.onSubtitleTracksUpdated=function(I,O){var _=this,E=O.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(w){return new a.Level(w)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(w){_.tracksBuffered[w.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(I,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var _=this.levels[this.currentTrackId];_!=null&&_.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,_&&this.setInterval(l)},b.onSubtitleTrackLoaded=function(I,O){var _,E=O.details,w=O.id,S=this.currentTrackId,F=this.levels;if(!F.length)return;var P=F[S];if(w>=F.length||w!==S||!P)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(_=P.details)!==null&&_!==void 0&&_.live){var L=this.mainDetails;if(E.deltaUpdateFailed||!L)return;var G=L.fragments[0];if(!P.details)E.hasProgramDateTime&&L.hasProgramDateTime?Object(y.alignMediaPlaylistByPDT)(E,L):G&&Object(t.addSliding)(E,G.start);else{var z=this.alignPlaylists(E,P.details);z===0&&G&&Object(t.addSliding)(E,G.start)}}if(P.details=E,this.levelLastLoaded=w,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var A=Object(T.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);A||(this.warn("Subtitle playlist not aligned with playback"),P.details=void 0)}},b._handleFragmentLoadComplete=function(I){var O=I.frag,_=I.payload,E=O.decryptdata,w=this.hls;if(this.fragContextChanged(O))return;if(_&&_.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var S=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(_),E.key.buffer,E.iv.buffer).then(function(F){var P=performance.now();w.trigger(N.Events.FRAG_DECRYPTED,{frag:O,payload:F,stats:{tstart:S,tdecrypt:P}})})}},b.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var I,O=this.currentTrackId,_=this.levels;if(!_.length||!_[O]||!_[O].details)return;var E=_[O].details,w=E.targetduration,S=this.config,F=this.media,P=v.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-w,S.maxBufferHole),L=P.end,G=P.len,z=this.getMaxBufferLength()+w;if(G>z)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var A=E.fragments,B=A.length,U=E.edge,R,K=this.fragPrevious;if(L<U){var Z=S.maxFragLookUpTolerance;K&&E.hasProgramDateTime&&(R=Object(T.findFragmentByPDT)(A,K.endProgramDateTime,Z)),R||(R=Object(T.findFragmentByPTS)(K,A,L,Z),!R&&K&&K.start<A[0].start&&(R=A[0]))}else R=A[B-1];(I=R)!==null&&I!==void 0&&I.encrypted?(m.logger.log("Loading key for "+R.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(N.Events.KEY_LOADING,{frag:R})):R&&this.fragmentTracker.getState(R)===h.FragmentState.NOT_LOADED&&this.loadFragment(R,E,L)}},b.loadFragment=function(I,O,_){this.fragCurrent=I,r.prototype.loadFragment.call(this,I,O,_)},s(x,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),x}(i.default)},"./src/controller/subtitle-track-controller.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/events.ts"),m=C("./src/utils/texttrack-utils.ts"),v=C("./src/controller/base-playlist-controller.ts"),T=C("./src/types/loader.ts");function y(n,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function t(n,s,d){return s&&y(n.prototype,s),d&&y(n,d),n}function h(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,i(n,s)}function i(n,s){return i=Object.setPrototypeOf||function(f,l){return f.__proto__=l,f},i(n,s)}var c=function(n){h(s,n);function s(f){var l;return l=n.call(this,f,"[subtitle-track-controller]")||this,l.media=null,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.selectDefaultTrack=!0,l.queuedDefaultTrack=-1,l.trackChangeListener=function(){return l.onTextTracksChanged()},l.asyncPollTrackChange=function(){return l.pollTrackChange(0)},l.useTextTrackPolling=!1,l.subtitlePollingInterval=-1,l.subtitleDisplay=!0,l.registerListeners(),l}var d=s.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,n.prototype.destroy.call(this)},d.registerListeners=function(){var l=this.hls;l.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.on(N.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var l=this.hls;l.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.off(N.Events.ERROR,this.onError,this)},d.onMediaAttached=function(l,o){if(this.media=o.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},d.pollTrackChange=function(l){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,l)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var l=a(this.media.textTracks);l.forEach(function(o){Object(m.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(l,o){this.tracks=o.subtitleTracks},d.onSubtitleTrackLoaded=function(l,o){var r=o.id,x=o.details,b=this.trackId,p=this.tracksInGroup[b];if(!p){this.warn("Invalid subtitle track id "+r);return}var I=p.details;p.details=o.details,this.log("subtitle track "+r+" loaded ["+x.startSN+"-"+x.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,o,I))},d.onLevelLoading=function(l,o){this.switchLevel(o.level)},d.onLevelSwitching=function(l,o){this.switchLevel(o.level)},d.switchLevel=function(l){var o=this.hls.levels[l];if(!(o!=null&&o.textGroupIds))return;var r=o.textGroupIds[o.urlId];if(this.groupId!==r){var x=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(O){return!r||O.groupId===r});this.tracksInGroup=b;var p=this.findTrackId(x==null?void 0:x.name)||this.findTrackId();this.groupId=r;var I={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(N.Events.SUBTITLE_TRACKS_UPDATED,I),p!==-1&&this.setSubtitleTrack(p,x)}},d.findTrackId=function(l){for(var o=this.tracksInGroup,r=0;r<o.length;r++){var x=o[r];if((!this.selectDefaultTrack||x.default)&&(!l||l===x.name))return x.id}return-1},d.onError=function(l,o){if(n.prototype.onError.call(this,l,o),o.fatal||!o.context)return;o.context.type===T.PlaylistContextType.SUBTITLE_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},d.loadPlaylist=function(l){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var r=o.id,x=o.groupId,b=o.url;if(l)try{b=l.addDirectives(b)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADING,{url:b,id:r,groupId:x,deliveryDirectives:l||null})}},d.toggleTrackModes=function(l){var o=this,r=this.media,x=this.subtitleDisplay,b=this.trackId;if(!r)return;var p=a(r.textTracks),I=p.filter(function(E){return E.groupId===o.groupId});if(l===-1)[].slice.call(p).forEach(function(E){E.mode="disabled"});else{var O=I[b];O&&(O.mode="disabled")}var _=I[l];_&&(_.mode=x?"showing":"hidden")},d.setSubtitleTrack=function(l,o){var r,x=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=l;return}if(this.trackId!==l&&this.toggleTrackModes(l),this.trackId===l&&(l===-1||(r=x[l])!==null&&r!==void 0&&r.details)||l<-1||l>=x.length)return;this.clearTimer();var b=x[l];if(this.log("Switching to subtitle track "+l),this.trackId=l,b){var p=b.id,I=b.groupId,O=I===void 0?"":I,_=b.name,E=b.type,w=b.url;this.hls.trigger(N.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:O,name:_,type:E,url:w});var S=this.switchParams(b.url,o==null?void 0:o.details);this.loadPlaylist(S)}else this.hls.trigger(N.Events.SUBTITLE_TRACK_SWITCH,{id:l})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var l=-1,o=a(this.media.textTracks),r=0;r<o.length;r++)if(o[r].mode==="hidden")l=r;else if(o[r].mode==="showing"){l=r;break}this.subtitleTrack!==l&&(this.subtitleTrack=l)},t(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1;var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(l,o)}}]),s}(v.default);function a(n){for(var s=[],d=0;d<n.length;d++){var f=n[d];f.kind==="subtitles"&&f.label&&s.push(n[d])}return s}g.default=c},"./src/controller/timeline-controller.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"TimelineController",function(){return a});var N=C("./src/polyfills/number.ts"),m=C("./src/events.ts"),v=C("./src/utils/cea-608-parser.ts"),T=C("./src/utils/output-filter.ts"),y=C("./src/utils/webvtt-parser.ts"),t=C("./src/utils/texttrack-utils.ts"),h=C("./src/utils/imsc1-ttml-parser.ts"),i=C("./src/types/loader.ts"),c=C("./src/utils/logger.ts"),a=function(){function f(o){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this.captionsProperties=void 0,this.hls=o,this.config=o.config,this.Cues=o.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var r=new T.default(this,"textTrack1"),x=new T.default(this,"textTrack2"),b=new T.default(this,"textTrack3"),p=new T.default(this,"textTrack4");this.cea608Parser1=new v.default(1,r,x),this.cea608Parser2=new v.default(3,b,p)}o.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),o.on(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),o.on(m.Events.FRAG_LOADING,this.onFragLoading,this),o.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),o.on(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),o.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),o.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var l=f.prototype;return l.destroy=function(){var r=this.hls;r.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.off(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.off(m.Events.FRAG_LOADING,this.onFragLoading,this),r.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),r.off(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.off(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.addCues=function(r,x,b,p,I){for(var O=!1,_=I.length;_--;){var E=I[_],w=s(E[0],E[1],x,b);if(w>=0&&(E[0]=Math.min(E[0],x),E[1]=Math.max(E[1],b),O=!0,w/(b-x)>.5))return}if(O||I.push([x,b]),this.config.renderTextTracksNatively){var S=this.captionsTracks[r];this.Cues.newCue(S,x,b,p)}else{var F=this.Cues.newCue(null,x,b,p);this.hls.trigger(m.Events.CUES_PARSED,{type:"captions",cues:F,track:r})}},l.onInitPtsFound=function(r,x){var b=this,p=x.frag,I=x.id,O=x.initPTS,_=x.timescale,E=this.unparsedVttFrags;I==="main"&&(this.initPTS[p.cc]=O,this.timescale[p.cc]=_),E.length&&(this.unparsedVttFrags=[],E.forEach(function(w){b.onFragLoaded(m.Events.FRAG_LOADED,w)}))},l.getExistingTrack=function(r){var x=this.media;if(x)for(var b=0;b<x.textTracks.length;b++){var p=x.textTracks[b];if(p[r])return p}return null},l.createCaptionsTrack=function(r){this.config.renderTextTracksNatively?this.createNativeTrack(r):this.createNonNativeTrack(r)},l.createNativeTrack=function(r){if(this.captionsTracks[r])return;var x=this.captionsProperties,b=this.captionsTracks,p=this.media,I=x[r],O=I.label,_=I.languageCode,E=this.getExistingTrack(r);if(E)b[r]=E,Object(t.clearCurrentCues)(b[r]),Object(t.sendAddTrackEvent)(b[r],p);else{var w=this.createTextTrack("captions",O,_);w&&(w[r]=!0,b[r]=w)}},l.createNonNativeTrack=function(r){if(this.nonNativeCaptionsTracks[r])return;var x=this.captionsProperties[r];if(!x)return;var b=x.label,p={_id:r,label:b,kind:"captions",default:x.media?!!x.media.default:!1,closedCaptions:x.media};this.nonNativeCaptionsTracks[r]=p,this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},l.createTextTrack=function(r,x,b){var p=this.media;return p?p.addTextTrack(r,x,b):void 0},l.onMediaAttaching=function(r,x){this.media=x.media,this._cleanTracks()},l.onMediaDetaching=function(){var r=this.captionsTracks;Object.keys(r).forEach(function(x){Object(t.clearCurrentCues)(r[x]),delete r[x]}),this.nonNativeCaptionsTracks={}},l.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},l._cleanTracks=function(){var r=this.media;if(!r)return;var x=r.textTracks;if(x)for(var b=0;b<x.length;b++)Object(t.clearCurrentCues)(x[b])},l.onSubtitleTracksUpdated=function(r,x){var b=this;this.textTracks=[];var p=x.subtitleTracks||[],I=p.some(function(w){return w.textCodec===h.IMSC1_CODEC});if(this.config.enableWebVTT||I&&this.config.enableIMSC1){var O=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(w,S){var F;if(S<_.length){for(var P=null,L=0;L<_.length;L++)if(n(_[L],w)){P=_[L];break}P&&(F=P)}F?Object(t.clearCurrentCues)(F):(F=b.createTextTrack("subtitles",w.name,w.lang),F&&(F.mode="disabled")),F&&(F.groupId=w.groupId,b.textTracks.push(F))})}else if(!O&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(w){return{label:w.name,kind:w.type.toLowerCase(),default:w.default,subtitleTrack:w}});this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},l.onManifestLoaded=function(r,x){var b=this;this.config.enableCEA708Captions&&x.captions&&x.captions.forEach(function(p){var I=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!I)return;var O="textTrack"+I[1],_=b.captionsProperties[O];if(!_)return;_.label=p.name,p.lang&&(_.languageCode=p.lang),_.media=p})},l.onFragLoading=function(r,x){var b=this.cea608Parser1,p=this.cea608Parser2,I=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(b&&p))return;if(x.frag.type===i.PlaylistLevelType.MAIN){var _,E,w=x.frag.sn,S=(_=x==null||((E=x.part)===null||E===void 0)?void 0:E.index)!=null?_:-1;w===I+1||w===I&&S===O+1||(b.reset(),p.reset()),this.lastSn=w,this.lastPartIndex=S}},l.onFragLoaded=function(r,x){var b=x.frag,p=x.payload,I=this.initPTS,O=this.unparsedVttFrags;if(b.type===i.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(N.isFiniteNumber)(I[b.cc])){O.push(x),I.length&&this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var _=b.decryptdata;if(_==null||_.key==null||_.method!=="AES-128"){var E=this.tracks[b.level],w=this.vttCCs;w[b.cc]||(w[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),E&&E.textCodec===h.IMSC1_CODEC?this._parseIMSC1(b,p):this._parseVTTs(b,p,w)}}else this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},l._parseIMSC1=function(r,x){var b=this,p=this.hls;Object(h.parseIMSC1)(x,this.initPTS[r.cc],this.timescale[r.cc],function(I){b._appendCues(I,r.level),p.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(I){c.logger.log("Failed to parse IMSC1: "+I),p.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:I})})},l._parseVTTs=function(r,x,b){var p=this,I=this.hls;Object(y.parseWebVTT)(x,this.initPTS[r.cc],this.timescale[r.cc],b,r.cc,r.start,function(O){p._appendCues(O,r.level),I.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(O){p._fallbackToIMSC1(r,x),c.logger.log("Failed to parse VTT cue: "+O),I.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:O})})},l._fallbackToIMSC1=function(r,x){var b=this,p=this.tracks[r.level];p.textCodec||Object(h.parseIMSC1)(x,this.initPTS[r.cc],this.timescale[r.cc],function(){p.textCodec=h.IMSC1_CODEC,b._parseIMSC1(r,x)},function(){p.textCodec="wvtt"})},l._appendCues=function(r,x){var b=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[x];if(p.mode==="disabled")return;r.forEach(function(_){return Object(t.addCueToTrack)(p,_)})}else{var I=this.tracks[x],O=I.default?"default":"subtitles"+x;b.trigger(m.Events.CUES_PARSED,{type:"subtitles",cues:r,track:O})}},l.onFragDecrypted=function(r,x){var b=x.frag;if(b.type===i.PlaylistLevelType.SUBTITLE){if(!Object(N.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(x);return}this.onFragLoaded(m.Events.FRAG_LOADED,x)}},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(r,x){var b=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(b&&p))return;for(var I=0;I<x.samples.length;I++){var O=x.samples[I].bytes;if(O){var _=this.extractCea608Data(O);b.addData(x.samples[I].pts,_[0]),p.addData(x.samples[I].pts,_[1])}}},l.onBufferFlushing=function(r,x){var b=x.startOffset,p=x.endOffset,I=x.endOffsetSubtitles,O=x.type,_=this.media;if(!_||_.currentTime<p)return;if(!O||O==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(S){return Object(t.removeCuesInRange)(E[S],b,p)})}if(this.config.renderTextTracksNatively&&(b===0&&I!==void 0)){var w=this.textTracks;Object.keys(w).forEach(function(S){return Object(t.removeCuesInRange)(w[S],b,I)})}},l.extractCea608Data=function(r){for(var x=r[0]&31,b=2,p=[[],[]],I=0;I<x;I++){var O=r[b++],_=127&r[b++],E=127&r[b++],w=(4&O)!==0,S=3&O;if(_===0&&E===0)continue;w&&((S===0||S===1)&&(p[S].push(_),p[S].push(E)))}return p},f}();function n(f,l){return f&&f.label===l.name&&!(f.textTrack1||f.textTrack2)}function s(f,l,o,r){return Math.min(l,r)-Math.max(f,o)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return N});var N=function(){function m(T,y){this.subtle=void 0,this.aesIV=void 0,this.subtle=T,this.aesIV=y}var v=m.prototype;return v.decrypt=function(y,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,y)},m}()},"./src/crypt/aes-decryptor.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"removePadding",function(){return m}),C.d(g,"default",function(){return v});var N=C("./src/utils/typed-array.ts");function m(T){var y=T.byteLength,t=y&&new DataView(T.buffer).getUint8(y-1);return t?Object(N.sliceUint8)(T,0,y-t):T}var v=function(){function T(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var y=T.prototype;return y.uint8ArrayToUint32Array_=function(h){for(var i=new DataView(h),c=new Uint32Array(4),a=0;a<4;a++)c[a]=i.getUint32(a*4);return c},y.initTable=function(){var h=this.sBox,i=this.invSBox,c=this.subMix,a=c[0],n=c[1],s=c[2],d=c[3],f=this.invSubMix,l=f[0],o=f[1],r=f[2],x=f[3],b=new Uint32Array(256),p=0,I=0,O=0;for(O=0;O<256;O++)O<128?b[O]=O<<1:b[O]=O<<1^283;for(O=0;O<256;O++){var _=I^I<<1^I<<2^I<<3^I<<4;_=_>>>8^_&255^99,h[p]=_,i[_]=p;var E=b[p],w=b[E],S=b[w],F=b[_]*257^_*16843008;a[p]=F<<24|F>>>8,n[p]=F<<16|F>>>16,s[p]=F<<8|F>>>24,d[p]=F,F=S*16843009^w*65537^E*257^p*16843008,l[_]=F<<24|F>>>8,o[_]=F<<16|F>>>16,r[_]=F<<8|F>>>24,x[_]=F,p?(p=E^b[b[b[S^E]]],I^=b[b[I]]):p=I=1}},y.expandKey=function(h){for(var i=this.uint8ArrayToUint32Array_(h),c=!0,a=0;a<i.length&&c;)c=i[a]===this.key[a],a++;if(c)return;this.key=i;var n=this.keySize=i.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);var s=this.ksRows=(n+6+1)*4,d,f,l=this.keySchedule=new Uint32Array(s),o=this.invKeySchedule=new Uint32Array(s),r=this.sBox,x=this.rcon,b=this.invSubMix,p=b[0],I=b[1],O=b[2],_=b[3],E,w;for(d=0;d<s;d++){if(d<n){E=l[d]=i[d];continue}w=E,d%n===0?(w=w<<8|w>>>24,w=r[w>>>24]<<24|r[w>>>16&255]<<16|r[w>>>8&255]<<8|r[w&255],w^=x[d/n|0]<<24):n>6&&d%n===4&&(w=r[w>>>24]<<24|r[w>>>16&255]<<16|r[w>>>8&255]<<8|r[w&255]),l[d]=E=(l[d-n]^w)>>>0}for(f=0;f<s;f++)d=s-f,f&3?w=l[d]:w=l[d-4],f<4||d<=4?o[f]=w:o[f]=p[r[w>>>24]]^I[r[w>>>16&255]]^O[r[w>>>8&255]]^_[r[w&255]],o[f]=o[f]>>>0},y.networkToHostOrderSwap=function(h){return h<<24|(h&65280)<<8|(h&16711680)>>8|h>>>24},y.decrypt=function(h,i,c){for(var a=this.keySize+6,n=this.invKeySchedule,s=this.invSBox,d=this.invSubMix,f=d[0],l=d[1],o=d[2],r=d[3],x=this.uint8ArrayToUint32Array_(c),b=x[0],p=x[1],I=x[2],O=x[3],_=new Int32Array(h),E=new Int32Array(_.length),w,S,F,P,L,G,z,A,B,U,R,K,Z,ue,de=this.networkToHostOrderSwap;i<_.length;){for(B=de(_[i]),U=de(_[i+1]),R=de(_[i+2]),K=de(_[i+3]),L=B^n[0],G=K^n[1],z=R^n[2],A=U^n[3],Z=4,ue=1;ue<a;ue++)w=f[L>>>24]^l[G>>16&255]^o[z>>8&255]^r[A&255]^n[Z],S=f[G>>>24]^l[z>>16&255]^o[A>>8&255]^r[L&255]^n[Z+1],F=f[z>>>24]^l[A>>16&255]^o[L>>8&255]^r[G&255]^n[Z+2],P=f[A>>>24]^l[L>>16&255]^o[G>>8&255]^r[z&255]^n[Z+3],L=w,G=S,z=F,A=P,Z=Z+4;w=s[L>>>24]<<24^s[G>>16&255]<<16^s[z>>8&255]<<8^s[A&255]^n[Z],S=s[G>>>24]<<24^s[z>>16&255]<<16^s[A>>8&255]<<8^s[L&255]^n[Z+1],F=s[z>>>24]<<24^s[A>>16&255]<<16^s[L>>8&255]<<8^s[G&255]^n[Z+2],P=s[A>>>24]<<24^s[L>>16&255]<<16^s[G>>8&255]<<8^s[z&255]^n[Z+3],E[i]=de(w^b),E[i+1]=de(P^p),E[i+2]=de(F^I),E[i+3]=de(S^O),b=B,p=U,I=R,O=K,i=i+4}return E.buffer},T}()},"./src/crypt/decrypter.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return i});var N=C("./src/crypt/aes-crypto.ts"),m=C("./src/crypt/fast-aes-key.ts"),v=C("./src/crypt/aes-decryptor.ts"),T=C("./src/utils/logger.ts"),y=C("./src/utils/mp4-tools.ts"),t=C("./src/utils/typed-array.ts"),h=16,i=function(){function c(n,s,d){var f=d===void 0?{}:d,l=f.removePKCS7Padding,o=l===void 0?!0:l;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=n,this.config=s,this.removePKCS7Padding=o,o)try{var r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(x){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var a=c.prototype;return a.destroy=function(){this.observer=null},a.isSync=function(){return this.config.enableSoftwareAES},a.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var d=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(v.removePadding)(d):d},a.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},a.decrypt=function(s,d,f,l){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),d,f);var o=this.flush();o&&l(o.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),d,f).then(l)},a.softwareDecrypt=function(s,d,f){var l=this.currentIV,o=this.currentResult,r=this.remainderData;this.logOnce("JS AES decrypt"),r&&(s=Object(y.appendUint8Array)(r,s),this.remainderData=null);var x=this.getValidChunk(s);if(!x.length)return null;l&&(f=l);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new v.default),b.expandKey(d);var p=o;return this.currentResult=b.decrypt(x.buffer,0,f),this.currentIV=Object(t.sliceUint8)(x,-16).buffer,p||null},a.webCryptoDecrypt=function(s,d,f){var l=this,o=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new m.default(o,d)),this.fastAesKey.expandKey().then(function(r){if(!o)return Promise.reject(new Error("web crypto not initialized"));var x=new N.default(o,f);return x.decrypt(s.buffer,r)}).catch(function(r){return l.onWebCryptoError(r,s,d,f)})},a.onWebCryptoError=function(s,d,f,l){return T.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,f,l)},a.getValidChunk=function(s){var d=s,f=s.length-s.length%h;return f!==s.length&&(d=Object(t.sliceUint8)(s,0,f),this.remainderData=Object(t.sliceUint8)(s,f)),d},a.logOnce=function(s){if(!this.logEnabled)return;T.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return N});var N=function(){function m(T,y){this.subtle=void 0,this.key=void 0,this.subtle=T,this.key=y}var v=m.prototype;return v.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},m}()},"./src/demux/aacdemuxer.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/demux/base-audio-demuxer.ts"),m=C("./src/demux/adts.ts"),v=C("./src/utils/logger.ts"),T=C("./src/demux/id3.ts");function y(i,c){i.prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c)}function t(i,c){return t=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},t(i,c)}var h=function(i){y(c,i);function c(n,s){var d;return d=i.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=n,d.config=s,d}var a=c.prototype;return a.resetInitSegment=function(s,d,f){i.prototype.resetInitSegment.call(this,s,d,f),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var d=T.getID3Data(s,0)||[],f=d.length,l=s.length;f<l;f++)if(m.probe(s,f))return v.logger.log("ADTS sync word found !"),!0;return!1},a.canParse=function(s,d){return m.canParse(s,d)},a.appendFrame=function(s,d,f){m.initTrackConfig(s,this.observer,d,f,s.manifestCodec);var l=m.appendFrame(s,d,f,this.initPTS,this.frameIndex);if(l&&l.missing===0)return l},c}(N.default);h.minProbeByteLength=9,g.default=h},"./src/demux/adts.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"getAudioConfig",function(){return T}),C.d(g,"isHeaderPattern",function(){return y}),C.d(g,"getHeaderLength",function(){return t}),C.d(g,"getFullFrameLength",function(){return h}),C.d(g,"canGetFrameLength",function(){return i}),C.d(g,"isHeader",function(){return c}),C.d(g,"canParse",function(){return a}),C.d(g,"probe",function(){return n}),C.d(g,"initTrackConfig",function(){return s}),C.d(g,"getFrameDuration",function(){return d}),C.d(g,"parseFrameHeader",function(){return f}),C.d(g,"appendFrame",function(){return l});var N=C("./src/utils/logger.ts"),m=C("./src/errors.ts"),v=C("./src/events.ts");function T(o,r,x,b){var p,I,O,_,E=navigator.userAgent.toLowerCase(),w=b,S=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((r[x+2]&192)>>>6)+1;var F=(r[x+2]&60)>>>2;if(F>S.length-1){o.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return O=(r[x+2]&1)<<2,O|=(r[x+3]&192)>>>6,N.logger.log("manifest codec:"+b+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(E)?F>=6?(p=5,_=new Array(4),I=F-3):(p=2,_=new Array(2),I=F):E.indexOf("android")!==-1?(p=2,_=new Array(2),I=F):(p=5,_=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&F>=6?I=F-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(F>=6&&O===1||/vivaldi/i.test(E))||!b&&O===1)&&(p=2,_=new Array(2)),I=F)),_[0]=p<<3,_[0]|=(F&14)>>1,_[1]|=(F&1)<<7,_[1]|=O<<3,p===5&&(_[1]|=(I&14)>>1,_[2]=(I&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:S[F],channelCount:O,codec:"mp4a.40."+p,manifestCodec:w}}function y(o,r){return o[r]===255&&(o[r+1]&246)===240}function t(o,r){return o[r+1]&1?7:9}function h(o,r){return(o[r+3]&3)<<11|o[r+4]<<3|(o[r+5]&224)>>>5}function i(o,r){return r+5<o.length}function c(o,r){return r+1<o.length&&y(o,r)}function a(o,r){return i(o,r)&&y(o,r)&&h(o,r)<=o.length-r}function n(o,r){if(c(o,r)){var x=t(o,r);if(r+x>=o.length)return!1;var b=h(o,r);if(b<=x)return!1;var p=r+b;return p===o.length||c(o,p)}return!1}function s(o,r,x,b,p){if(!o.samplerate){var I=T(r,x,b,p);if(!I)return;o.config=I.config,o.samplerate=I.samplerate,o.channelCount=I.channelCount,o.codec=I.codec,o.manifestCodec=I.manifestCodec,N.logger.log("parsed codec:"+o.codec+", rate:"+I.samplerate+", channels:"+I.channelCount)}}function d(o){return 1024*9e4/o}function f(o,r,x,b,p){var I=t(o,r),O=h(o,r);if(O-=I,O>0){var _=x+b*p;return{headerLength:I,frameLength:O,stamp:_}}}function l(o,r,x,b,p){var I=d(o.samplerate),O=f(r,x,b,p,I);if(O){var _=O.frameLength,E=O.headerLength,w=O.stamp,S=E+_,F=Math.max(0,x+S-r.length),P;F?(P=new Uint8Array(S-E),P.set(r.subarray(x+E,r.length),0)):P=r.subarray(x+E,x+S);var L={unit:P,pts:w};return F||o.samples.push(L),{sample:L,length:S,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"initPTSFn",function(){return h});var N=C("./src/polyfills/number.ts"),m=C("./src/demux/id3.ts"),v=C("./src/demux/dummy-demuxed-track.ts"),T=C("./src/utils/mp4-tools.ts"),y=C("./src/utils/typed-array.ts"),t=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=i.prototype;return c.resetInitSegment=function(n,s,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(n,s){return!1},c.appendFrame=function(n,s,d){},c.demux=function(n,s){this.cachedData&&(n=Object(T.appendUint8Array)(this.cachedData,n),this.cachedData=null);var d=m.getID3Data(n,0),f=d?d.length:0,l,o,r=this._audioTrack,x=this._id3Track,b=d?m.getTimeStamp(d):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=h(b,s)),d&&d.length>0&&x.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),o=this.initPTS;f<p;){if(this.canParse(n,f)){var I=this.appendFrame(r,n,f);I?(this.frameIndex++,o=I.sample.pts,f+=I.length,l=f):f=p}else m.canParse(n,f)?(d=m.getID3Data(n,f),x.samples.push({pts:o,dts:o,data:d}),f+=d.length,l=f):f++;if(f===p&&l!==p){var O=Object(y.sliceUint8)(n,l);this.cachedData?this.cachedData=Object(T.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:r,avcTrack:Object(v.dummyTrack)(),id3Track:x,textTrack:Object(v.dummyTrack)()}},c.demuxSampleAes=function(n,s,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(n){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(v.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(v.dummyTrack)()}},c.destroy=function(){},i}(),h=function(c,a){return Object(N.isFiniteNumber)(c)?c*90:a*9e4};g.default=t},"./src/demux/chunk-cache.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return N});var N=function(){function v(){this.chunks=[],this.dataLength=0}var T=v.prototype;return T.push=function(t){this.chunks.push(t),this.dataLength+=t.length},T.flush=function(){var t=this.chunks,h=this.dataLength,i;if(t.length)t.length===1?i=t[0]:i=m(t,h);else return new Uint8Array(0);return this.reset(),i},T.reset=function(){this.chunks.length=0,this.dataLength=0},v}();function m(v,T){for(var y=new Uint8Array(T),t=0,h=0;h<v.length;h++){var i=v[h];y.set(i,t),t+=i.length}return y}},"./src/demux/dummy-demuxed-track.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"dummyTrack",function(){return N});function N(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/utils/logger.ts"),m=function(){function v(y){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=y,this.bytesAvailable=y.byteLength,this.word=0,this.bitsAvailable=0}var T=v.prototype;return T.loadWord=function(){var t=this.data,h=this.bytesAvailable,i=t.byteLength-h,c=new Uint8Array(4),a=Math.min(4,h);if(a===0)throw new Error("no bytes available");c.set(t.subarray(i,i+a)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a},T.skipBits=function(t){var h;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,h=t>>3,t-=h>>3,this.bytesAvailable-=h,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},T.readBits=function(t){var h=Math.min(this.bitsAvailable,t),i=this.word>>>32-h;return t>32&&N.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?i<<h|this.readBits(h):i},T.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if((this.word&2147483648>>>t)!==0)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},T.skipUEG=function(){this.skipBits(1+this.skipLZ())},T.skipEG=function(){this.skipBits(1+this.skipLZ())},T.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},T.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},T.readBoolean=function(){return this.readBits(1)===1},T.readUByte=function(){return this.readBits(8)},T.readUShort=function(){return this.readBits(16)},T.readUInt=function(){return this.readBits(32)},T.skipScalingList=function(t){for(var h=8,i=8,c,a=0;a<t;a++)i!==0&&(c=this.readEG(),i=(h+c+256)%256),h=i===0?h:i},T.readSPS=function(){var t=0,h=0,i=0,c=0,a,n,s,d=this.readUByte.bind(this),f=this.readBits.bind(this),l=this.readUEG.bind(this),o=this.readBoolean.bind(this),r=this.skipBits.bind(this),x=this.skipEG.bind(this),b=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);d();var I=d();if(f(5),r(3),d(),b(),I===100||I===110||I===122||I===244||I===44||I===83||I===86||I===118||I===128){var O=l();if(O===3&&r(1),b(),b(),r(1),o())for(n=O!==3?8:12,s=0;s<n;s++)o()&&(s<6?p(16):p(64))}b();var _=l();if(_===0)l();else if(_===1)for(r(1),x(),x(),a=l(),s=0;s<a;s++)x();b(),r(1);var E=l(),w=l(),S=f(1);S===0&&r(1),r(1),o()&&(t=l(),h=l(),i=l(),c=l());var F=[1,1];if(o()&&o()){var P=d();switch(P){case 1:F=[1,1];break;case 2:F=[12,11];break;case 3:F=[10,11];break;case 4:F=[16,11];break;case 5:F=[40,33];break;case 6:F=[24,11];break;case 7:F=[20,11];break;case 8:F=[32,11];break;case 9:F=[80,33];break;case 10:F=[18,11];break;case 11:F=[15,11];break;case 12:F=[64,33];break;case 13:F=[160,99];break;case 14:F=[4,3];break;case 15:F=[3,2];break;case 16:F=[2,1];break;case 255:{F=[d()<<8|d(),d()<<8|d()];break}}}return{width:Math.ceil((E+1)*16-t*2-h*2),height:(2-S)*(w+1)*16-(S?2:4)*(i+c),pixelRatio:F}},T.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},v}();g.default=m},"./src/demux/id3.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"isHeader",function(){return N}),C.d(g,"isFooter",function(){return m}),C.d(g,"getID3Data",function(){return v}),C.d(g,"canParse",function(){return y}),C.d(g,"getTimeStamp",function(){return t}),C.d(g,"isTimeStampFrame",function(){return h}),C.d(g,"getID3Frames",function(){return c}),C.d(g,"decodeFrame",function(){return a}),C.d(g,"utf8ArrayToStr",function(){return l}),C.d(g,"testables",function(){return o});var N=function(p,I){return I+10<=p.length&&(p[I]===73&&p[I+1]===68&&p[I+2]===51&&(p[I+3]<255&&p[I+4]<255&&(p[I+6]<128&&p[I+7]<128&&p[I+8]<128&&p[I+9]<128)))},m=function(p,I){return I+10<=p.length&&(p[I]===51&&p[I+1]===68&&p[I+2]===73&&(p[I+3]<255&&p[I+4]<255&&(p[I+6]<128&&p[I+7]<128&&p[I+8]<128&&p[I+9]<128)))},v=function(p,I){for(var O=I,_=0;N(p,I);){_+=10;var E=T(p,I+6);_+=E,m(p,I+10)&&(_+=10),I+=_}return _>0?p.subarray(O,O+_):void 0},T=function(p,I){var O=0;return O=(p[I]&127)<<21,O|=(p[I+1]&127)<<14,O|=(p[I+2]&127)<<7,O|=p[I+3]&127,O},y=function(p,I){return N(p,I)&&T(p,I+6)+10<=p.length-I},t=function(p){for(var I=c(p),O=0;O<I.length;O++){var _=I[O];if(h(_))return f(_)}return},h=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},i=function(p){var I=String.fromCharCode(p[0],p[1],p[2],p[3]),O=T(p,4),_=10;return{type:I,size:O,data:p.subarray(_,_+O)}},c=function(p){for(var I=0,O=[];N(p,I);){var _=T(p,I+6);I+=10;for(var E=I+_;I+8<E;){var w=i(p.subarray(I)),S=a(w);S&&O.push(S),I+=w.size+10}m(p,I)&&(I+=10)}return O},a=function(p){return p.type==="PRIV"?n(p):p.type[0]==="W"?d(p):s(p)},n=function(p){if(p.size<2)return;var I=l(p.data,!0),O=new Uint8Array(p.data.subarray(I.length+1));return{key:p.type,info:I,data:O.buffer}},s=function(p){if(p.size<2)return;if(p.type==="TXXX"){var I=1,O=l(p.data.subarray(I),!0);I+=O.length+1;var _=l(p.data.subarray(I));return{key:p.type,info:O,data:_}}var E=l(p.data.subarray(1));return{key:p.type,data:E}},d=function(p){if(p.type==="WXXX"){if(p.size<2)return;var I=1,O=l(p.data.subarray(I),!0);I+=O.length+1;var _=l(p.data.subarray(I));return{key:p.type,info:O,data:_}}var E=l(p.data);return{key:p.type,data:E}},f=function(p){if(p.data.byteLength===8){var I=new Uint8Array(p.data),O=I[3]&1,_=(I[4]<<23)+(I[5]<<15)+(I[6]<<7)+I[7];return _/=45,O&&(_+=4772185884e-2),Math.round(_)}return},l=function(p,I){I===void 0&&(I=!1);var O=x();if(O){var _=O.decode(p);if(I){var E=_.indexOf("\0");return E!==-1?_.substring(0,E):_}return _.replace(/\0/g,"")}for(var w=p.length,S,F,P,L="",G=0;G<w;){if(S=p[G++],S===0&&I)return L;if(S===0||S===3)continue;switch(S>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:L+=String.fromCharCode(S);break;case 12:case 13:F=p[G++],L+=String.fromCharCode((S&31)<<6|F&63);break;case 14:F=p[G++],P=p[G++],L+=String.fromCharCode((S&15)<<12|(F&63)<<6|(P&63)<<0);break;default:}}return L},o={decodeTextFrame:s},r;function x(){return!r&&typeof self.TextDecoder!="undefined"&&(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/demux/base-audio-demuxer.ts"),m=C("./src/demux/id3.ts"),v=C("./src/utils/logger.ts"),T=C("./src/demux/mpegaudio.ts");function y(i,c){i.prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c)}function t(i,c){return t=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},t(i,c)}var h=function(i){y(c,i);function c(){return i.apply(this,arguments)||this}var a=c.prototype;return a.resetInitSegment=function(s,d,f){i.prototype.resetInitSegment.call(this,s,d,f),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var d=m.getID3Data(s,0)||[],f=d.length,l=s.length;f<l;f++)if(T.probe(s,f))return v.logger.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(s,d){return T.canParse(s,d)},a.appendFrame=function(s,d,f){return this.initPTS===null?void 0:T.appendFrame(s,d,f,this.initPTS,this.frameIndex)},c}(N.default);h.minProbeByteLength=4,g.default=h},"./src/demux/mp4demuxer.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/utils/mp4-tools.ts"),m=C("./src/demux/dummy-demuxed-track.ts"),v=function(){function T(t,h){this.remainderData=null,this.config=void 0,this.config=h}var y=T.prototype;return y.resetTimeStamp=function(){},y.resetInitSegment=function(){},y.resetContiguity=function(){},T.probe=function(h){return Object(N.findBox)({data:h,start:0,end:Math.min(h.length,16384)},["moof"]).length>0},y.demux=function(h){var i=h,c=Object(m.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(N.appendUint8Array)(this.remainderData,h));var a=Object(N.segmentValidRange)(i);this.remainderData=a.remainder,c.samples=a.valid||new Uint8Array}else c.samples=i;return{audioTrack:Object(m.dummyTrack)(),avcTrack:c,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},y.flush=function(){var h=Object(m.dummyTrack)();return h.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(m.dummyTrack)(),avcTrack:h,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},y.demuxSampleAes=function(h,i,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},y.destroy=function(){},T}();v.minProbeByteLength=1024,g.default=v},"./src/demux/mpegaudio.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"appendFrame",function(){return t}),C.d(g,"parseHeader",function(){return h}),C.d(g,"isHeaderPattern",function(){return i}),C.d(g,"isHeader",function(){return c}),C.d(g,"canParse",function(){return a}),C.d(g,"probe",function(){return n});var N=null,m=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],v=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],T=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],y=[0,1,1,4];function t(s,d,f,l,o){if(f+24>d.length)return;var r=h(d,f);if(r&&f+r.frameLength<=d.length){var x=r.samplesPerFrame*9e4/r.sampleRate,b=l+o*x,p={unit:d.subarray(f,f+r.frameLength),pts:b,dts:b};return s.config=[],s.channelCount=r.channelCount,s.samplerate=r.sampleRate,s.samples.push(p),{sample:p,length:r.frameLength,missing:0}}}function h(s,d){var f=s[d+1]>>3&3,l=s[d+1]>>1&3,o=s[d+2]>>4&15,r=s[d+2]>>2&3;if(f!==1&&o!==0&&o!==15&&r!==3){var x=s[d+2]>>1&1,b=s[d+3]>>6,p=f===3?3-l:l===3?3:4,I=m[p*14+o-1]*1e3,O=f===3?0:f===2?1:2,_=v[O*3+r],E=b===3?1:2,w=T[f][l],S=y[l],F=w*8*S,P=Math.floor(w*I/_+x)*S;if(N===null){var L=navigator.userAgent||"",G=L.match(/Chrome\/(\d+)/i);N=G?parseInt(G[1]):0}var z=!!N&&N<=87;return z&&l===2&&I>=224e3&&b===0&&(s[d+3]=s[d+3]|128),{sampleRate:_,channelCount:E,frameLength:P,samplesPerFrame:F}}}function i(s,d){return s[d]===255&&(s[d+1]&224)===224&&(s[d+1]&6)!==0}function c(s,d){return d+1<s.length&&i(s,d)}function a(s,d){var f=4;return i(s,d)&&f<=s.length-d}function n(s,d){if(d+1<s.length&&i(s,d)){var f=4,l=h(s,d),o=f;l!=null&&l.frameLength&&(o=l.frameLength);var r=d+o;return r===s.length||c(s,r)}return!1}},"./src/demux/sample-aes.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/crypt/decrypter.ts"),m=C("./src/demux/tsdemuxer.ts"),v=function(){function T(t,h,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new N.default(t,h,{removePKCS7Padding:!1})}var y=T.prototype;return y.decryptBuffer=function(h,i){this.decrypter.decrypt(h,this.keyData.key.buffer,this.keyData.iv.buffer,i)},y.decryptAacSample=function(h,i,c,a){var n=h[i].unit,s=n.subarray(16,n.length-n.length%16),d=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),f=this;this.decryptBuffer(d,function(l){var o=new Uint8Array(l);n.set(o,16),a||f.decryptAacSamples(h,i+1,c)})},y.decryptAacSamples=function(h,i,c){for(;;i++){if(i>=h.length){c();return}if(h[i].unit.length<32)continue;var a=this.decrypter.isSync();if(this.decryptAacSample(h,i,c,a),!a)return}},y.getAvcEncryptedData=function(h){for(var i=Math.floor((h.length-48)/160)*16+16,c=new Int8Array(i),a=0,n=32;n<=h.length-16;n+=160,a+=16)c.set(h.subarray(n,n+16),a);return c},y.getAvcDecryptedUnit=function(h,i){for(var c=new Uint8Array(i),a=0,n=32;n<=h.length-16;n+=160,a+=16)h.set(c.subarray(a,a+16),n);return h},y.decryptAvcSample=function(h,i,c,a,n,s){var d=Object(m.discardEPB)(n.data),f=this.getAvcEncryptedData(d),l=this;this.decryptBuffer(f.buffer,function(o){n.data=l.getAvcDecryptedUnit(d,o),s||l.decryptAvcSamples(h,i,c+1,a)})},y.decryptAvcSamples=function(h,i,c,a){if(h instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,c=0){if(i>=h.length){a();return}for(var n=h[i].units;!(c>=n.length);c++){var s=n[c];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(h,i,c,a,s,d),!d)return}}},T}();g.default=v},"./src/demux/transmuxer-interface.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return n});var N=C("./node_modules/webworkify-webpack/index.js"),m=C.n(N),v=C("./src/events.ts"),T=C("./src/demux/transmuxer.ts"),y=C("./src/utils/logger.ts"),t=C("./src/errors.ts"),h=C("./src/utils/mediasource-helper.ts"),i=C("./node_modules/eventemitter3/index.js"),c=C.n(i),a=Object(h.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function s(f,l,o,r){var x=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=f,this.id=l,this.onTransmuxComplete=o,this.onFlush=r;var b=f.config,p=function(w,S){S=S||{},S.frag=x.frag,S.id=x.id,f.trigger(w,S)};this.observer=new i.EventEmitter,this.observer.on(v.Events.FRAG_DECRYPTED,p),this.observer.on(v.Events.ERROR,p);var I={mp4:a.isTypeSupported("video/mp4"),mpeg:a.isTypeSupported("audio/mpeg"),mp3:a.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){y.logger.log("demuxing in webworker");var _;try{_=this.worker=N("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(E){f.trigger(v.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},_.postMessage({cmd:"init",typeSupported:I,vendor:O,id:l,config:JSON.stringify(b)})}catch(E){y.logger.warn("Error in worker:",E),y.logger.error("Error while initializing DemuxerWorker, fallback to inline"),_&&self.URL.revokeObjectURL(_.objectURL),this.transmuxer=new T.default(this.observer,I,b,O,l),this.worker=null}}else this.transmuxer=new T.default(this.observer,I,b,O,l)}var d=s.prototype;return d.destroy=function(){var l=this.worker;if(l)l.removeEventListener("message",this.onwmsg),l.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},d.push=function(l,o,r,x,b,p,I,O,_,E){var w=this;_.transmuxing.start=self.performance.now();var S=this.transmuxer,F=this.worker,P=p?p.start:b.start,L=b.decryptdata,G=this.frag,z=!(G&&b.cc===G.cc),A=!(G&&_.level===G.level),B=G?_.sn-G.sn:-1,U=this.part?_.part-this.part.index:1,R=!A&&(B===1||B===0&&U===1),K=self.performance.now();(A||B||b.stats.parsing.start===0)&&(b.stats.parsing.start=K),p&&(U||!R)&&(p.stats.parsing.start=K);var Z=new T.TransmuxState(z,R,O,A,P);if(!R||z){y.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+_.sn+" p: "+_.part+" level: "+_.level+" id: "+_.id+`
discontinuity: `+z+`
trackSwitch: `+A+`
contiguous: `+R+`
accurateTimeOffset: `+O+`
timeOffset: `+P);var ue=new T.TransmuxConfig(r,x,o,I,E);this.configureTransmuxer(ue)}if(this.frag=b,this.part=p,F)F.postMessage({cmd:"demux",data:l,decryptdata:L,chunkMeta:_,state:Z},l instanceof ArrayBuffer?[l]:[]);else if(S){var de=S.push(l,L,_,Z);Object(T.isPromise)(de)?de.then(function(Ce){w.handleTransmuxComplete(Ce)}):this.handleTransmuxComplete(de)}},d.flush=function(l){var o=this;l.transmuxing.start=self.performance.now();var r=this.transmuxer,x=this.worker;if(x)x.postMessage({cmd:"flush",chunkMeta:l});else if(r){var b=r.flush(l);Object(T.isPromise)(b)?b.then(function(p){o.handleFlushResult(p,l)}):this.handleFlushResult(b,l)}},d.handleFlushResult=function(l,o){var r=this;l.forEach(function(x){r.handleTransmuxComplete(x)}),this.onFlush(o)},d.onWorkerMessage=function(l){var o=l.data,r=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,r.trigger(o.event,o.data);break}}},d.configureTransmuxer=function(l){var o=this.worker,r=this.transmuxer;o?o.postMessage({cmd:"configure",config:l}):r&&r.configure(l)},d.handleTransmuxComplete=function(l){l.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(l)},s}()},"./src/demux/transmuxer-worker.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return t});var N=C("./src/demux/transmuxer.ts"),m=C("./src/events.ts"),v=C("./src/utils/logger.ts"),T=C("./node_modules/eventemitter3/index.js"),y=C.n(T);function t(n){var s=new T.EventEmitter,d=function(l,o){n.postMessage({event:l,data:o})};s.on(m.Events.FRAG_DECRYPTED,d),s.on(m.Events.ERROR,d),n.addEventListener("message",function(f){var l=f.data;switch(l.cmd){case"init":{var o=JSON.parse(l.config);n.transmuxer=new N.default(s,l.typeSupported,o,l.vendor,l.id),Object(v.enableLogs)(o.debug),d("init",null);break}case"configure":{n.transmuxer.configure(l.config);break}case"demux":{var r=n.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);Object(N.isPromise)(r)?r.then(function(p){h(n,p)}):h(n,r);break}case"flush":{var x=l.chunkMeta,b=n.transmuxer.flush(x);Object(N.isPromise)(b)?b.then(function(p){c(n,p,x)}):c(n,b,x);break}default:break}})}function h(n,s){if(a(s.remuxResult))return;var d=[],f=s.remuxResult,l=f.audio,o=f.video;l&&i(d,l),o&&i(d,o),n.postMessage({event:"transmuxComplete",data:s},d)}function i(n,s){s.data1&&n.push(s.data1.buffer),s.data2&&n.push(s.data2.buffer)}function c(n,s,d){s.forEach(function(f){h(n,f)}),n.postMessage({event:"flush",data:d})}function a(n){return!n.audio&&!n.video&&!n.text&&!n.id3&&!n.initSegment}},"./src/demux/transmuxer.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return o}),C.d(g,"isPromise",function(){return b}),C.d(g,"TransmuxConfig",function(){return p}),C.d(g,"TransmuxState",function(){return I});var N=C("./src/events.ts"),m=C("./src/errors.ts"),v=C("./src/crypt/decrypter.ts"),T=C("./src/demux/aacdemuxer.ts"),y=C("./src/demux/mp4demuxer.ts"),t=C("./src/demux/tsdemuxer.ts"),h=C("./src/demux/mp3demuxer.ts"),i=C("./src/remux/mp4-remuxer.ts"),c=C("./src/remux/passthrough-remuxer.ts"),a=C("./src/demux/chunk-cache.ts"),n=C("./src/utils/mp4-tools.ts"),s=C("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(O){s.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var f=[{demux:t.default,remux:i.default},{demux:y.default,remux:c.default},{demux:T.default,remux:i.default},{demux:h.default,remux:i.default}],l=1024;f.forEach(function(O){var _=O.demux;l=Math.max(l,_.minProbeByteLength)});var o=function(){function O(E,w,S,F,P){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 a.default,this.observer=E,this.typeSupported=w,this.config=S,this.vendor=F,this.id=P}var _=O.prototype;return _.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},_.push=function(w,S,F,P){var L=this,G=F.transmuxing;G.executeStart=d();var z=new Uint8Array(w),A=this.cache,B=this.config,U=this.currentTransmuxState,R=this.transmuxConfig;P&&(this.currentTransmuxState=P);var K=r(z,S);if(K&&K.method==="AES-128"){var Z=this.getDecrypter();if(B.enableSoftwareAES){var ue=Z.softwareDecrypt(z,K.key.buffer,K.iv.buffer);if(!ue)return G.executeEnd=d(),x(F);z=new Uint8Array(ue)}else return this.decryptionPromise=Z.webCryptoDecrypt(z,K.key.buffer,K.iv.buffer).then(function(q){var Y=L.push(q,null,F);return L.decryptionPromise=null,Y}),this.decryptionPromise}var de=P||U,Ce=de.contiguous,Re=de.discontinuity,me=de.trackSwitch,Oe=de.accurateTimeOffset,be=de.timeOffset,ce=R.audioCodec,le=R.videoCodec,ne=R.defaultInitPts,ge=R.duration,te=R.initSegmentData;if((Re||me)&&this.resetInitSegment(te,ce,le,ge),Re&&this.resetInitialTimestamp(ne),Ce||this.resetContiguity(),this.needsProbing(z,Re,me)){if(A.dataLength){var re=A.flush();z=Object(n.appendUint8Array)(re,z)}this.configureTransmuxer(z,R)}var Se=this.transmux(z,K,be,Oe,F),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,G.executeEnd=d(),Se},_.flush=function(w){var S=this,F=w.transmuxing;F.executeStart=d();var P=this.decrypter,L=this.cache,G=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return S.flush(w)});var A=[],B=G.timeOffset;if(P){var U=P.flush();U&&A.push(this.push(U,null,w))}var R=L.dataLength;L.reset();var K=this.demuxer,Z=this.remuxer;if(!K||!Z)return R>=l&&this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=d(),[x(w)];var ue=K.flush(B);return b(ue)?ue.then(function(de){return S.flushRemux(A,de,w),A}):(this.flushRemux(A,ue,w),A)},_.flushRemux=function(w,S,F){var P=S.audioTrack,L=S.avcTrack,G=S.id3Track,z=S.textTrack,A=this.currentTransmuxState,B=A.accurateTimeOffset,U=A.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var R=this.remuxer.remux(P,L,G,z,U,B,!0,this.id);w.push({remuxResult:R,chunkMeta:F}),F.transmuxing.executeEnd=d()},_.resetInitialTimestamp=function(w){var S=this.demuxer,F=this.remuxer;if(!S||!F)return;S.resetTimeStamp(w),F.resetTimeStamp(w)},_.resetContiguity=function(){var w=this.demuxer,S=this.remuxer;if(!w||!S)return;w.resetContiguity(),S.resetNextTimestamp()},_.resetInitSegment=function(w,S,F,P){var L=this.demuxer,G=this.remuxer;if(!L||!G)return;L.resetInitSegment(S,F,P),G.resetInitSegment(w,S,F)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(w,S,F,P,L){var G;return S&&S.method==="SAMPLE-AES"?G=this.transmuxSampleAes(w,S,F,P,L):G=this.transmuxUnencrypted(w,F,P,L),G},_.transmuxUnencrypted=function(w,S,F,P){var L=this.demuxer.demux(w,S,!1,!this.config.progressive),G=L.audioTrack,z=L.avcTrack,A=L.id3Track,B=L.textTrack,U=this.remuxer.remux(G,z,A,B,S,F,!1,this.id);return{remuxResult:U,chunkMeta:P}},_.transmuxSampleAes=function(w,S,F,P,L){var G=this;return this.demuxer.demuxSampleAes(w,S,F).then(function(z){var A=G.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,F,P,!1,G.id);return{remuxResult:A,chunkMeta:L}})},_.configureTransmuxer=function(w,S){for(var F=this.config,P=this.observer,L=this.typeSupported,G=this.vendor,z=S.audioCodec,A=S.defaultInitPts,B=S.duration,U=S.initSegmentData,R=S.videoCodec,K,Z=0,ue=f.length;Z<ue;Z++)if(f[Z].demux.probe(w)){K=f[Z];break}K||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),K={demux:y.default,remux:c.default});var de=this.demuxer,Ce=this.remuxer,Re=K.remux,me=K.demux;(!Ce||!(Ce instanceof Re))&&(this.remuxer=new Re(P,F,L,G)),(!de||!(de instanceof me))&&(this.demuxer=new me(P,F,L),this.probe=me.probe),this.resetInitSegment(U,z,R,B),this.resetInitialTimestamp(A)},_.needsProbing=function(w,S,F){return!this.demuxer||!this.remuxer||S||F},_.getDecrypter=function(){var w=this.decrypter;return w||(w=this.decrypter=new v.default(this.observer,this.config)),w},O}();function r(O,_){var E=null;return O.byteLength>0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(E=_),E}var x=function(_){return{remuxResult:{},chunkMeta:_}};function b(O){return"then"in O&&O.then instanceof Function}var p=function(_,E,w,S,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=_,this.videoCodec=E,this.initSegmentData=w,this.duration=S,this.defaultInitPts=F},I=function(_,E,w,S,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=_,this.contiguous=E,this.accurateTimeOffset=w,this.trackSwitch=S,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"discardEPB",function(){return x});var N=C("./src/demux/adts.ts"),m=C("./src/demux/mpegaudio.ts"),v=C("./src/demux/exp-golomb.ts"),T=C("./src/demux/id3.ts"),y=C("./src/demux/sample-aes.ts"),t=C("./src/events.ts"),h=C("./src/utils/mp4-tools.ts"),i=C("./src/utils/logger.ts"),c=C("./src/errors.ts"),a={video:1,audio:2,id3:3,text:4},n=function(){function b(I,O,_){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=O,this.typeSupported=_}b.probe=function(O){var _=b.syncOffset(O);return _<0?!1:(_&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},b.syncOffset=function(O){for(var _=Math.min(1e3,O.length-3*188),E=0;E<_;){if(O[E]===71&&O[E+188]===71&&O[E+2*188]===71)return E;E++}return-1},b.createTrack=function(O,_){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:a[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?_:void 0}};var p=b.prototype;return p.resetInitSegment=function(O,_,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",E),this._audioTrack=b.createTrack("audio",E),this._id3Track=b.createTrack("id3",E),this._txtTrack=b.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=_,this._duration=E},p.resetTimeStamp=function(){},p.resetContiguity=function(){var O=this._audioTrack,_=this._avcTrack,E=this._id3Track;O&&(O.pesData=null),_&&(_.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(O,_,E,w){E===void 0&&(E=!1),w===void 0&&(w=!1),E||(this.sampleAes=null);var S,F=this._avcTrack,P=this._audioTrack,L=this._id3Track,G=F.pid,z=F.pesData,A=P.pid,B=L.pid,U=P.pesData,R=L.pesData,K=!1,Z=this.pmtParsed,ue=this._pmtId,de=O.length;if(this.remainderData&&(O=Object(h.appendUint8Array)(this.remainderData,O),de=O.length,this.remainderData=null),de<188&&!w)return this.remainderData=O,{audioTrack:P,avcTrack:F,id3Track:L,textTrack:this._txtTrack};var Ce=Math.max(0,b.syncOffset(O));de-=(de+Ce)%188,de<O.byteLength&&!w&&(this.remainderData=new Uint8Array(O.buffer,de,O.buffer.byteLength-de));for(var Re=Ce;Re<de;Re+=188)if(O[Re]===71){var me=!!(O[Re+1]&64),Oe=((O[Re+1]&31)<<8)+O[Re+2],be=(O[Re+3]&48)>>4,ce=void 0;if(be>1){if(ce=Re+5+O[Re+4],ce===Re+188)continue}else ce=Re+4;switch(Oe){case G:me&&(z&&(S=l(z))&&this.parseAVCPES(S,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(ce,Re+188)),z.size+=Re+188-ce);break;case A:me&&(U&&(S=l(U))&&(P.isAAC?this.parseAACPES(S):this.parseMPEGPES(S)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ce,Re+188)),U.size+=Re+188-ce);break;case B:me&&(R&&(S=l(R))&&this.parseID3PES(S),R={data:[],size:0}),R&&(R.data.push(O.subarray(ce,Re+188)),R.size+=Re+188-ce);break;case 0:me&&(ce+=O[ce]+1),ue=this._pmtId=d(O,ce);break;case ue:{me&&(ce+=O[ce]+1);var le=f(O,ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);G=le.avc,G>0&&(F.pid=G),A=le.audio,A>0&&(P.pid=A,P.isAAC=le.isAAC),B=le.id3,B>0&&(L.pid=B),K&&!Z&&(i.logger.log("reparse from beginning"),K=!1,Re=Ce-188),Z=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,P.pesData=U,L.pesData=R;var ne={audioTrack:P,avcTrack:F,id3Track:L,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(ne),ne},p.flush=function(){var O=this.remainderData;this.remainderData=null;var _;return O?_=this.demux(O,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},p.extractRemainingSamples=function(O){var _=O.audioTrack,E=O.avcTrack,w=O.id3Track,S=E.pesData,F=_.pesData,P=w.pesData,L;S&&(L=l(S))?(this.parseAVCPES(L,!0),E.pesData=null):E.pesData=S,F&&(L=l(F))?(_.isAAC?this.parseAACPES(L):this.parseMPEGPES(L),_.pesData=null):(F!=null&&F.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=F),P&&(L=l(P))?(this.parseID3PES(L),w.pesData=null):w.pesData=P},p.demuxSampleAes=function(O,_,E){var w=this.demux(O,E,!0,!this.config.progressive),S=this.sampleAes=new y.default(this.observer,this.config,_);return this.decrypt(w,S)},p.decrypt=function(O,_){return new Promise(function(E){var w=O.audioTrack,S=O.avcTrack;w.samples&&w.isAAC?_.decryptAacSamples(w.samples,0,function(){S.samples?_.decryptAvcSamples(S.samples,0,0,function(){E(O)}):E(O)}):S.samples&&_.decryptAvcSamples(S.samples,0,0,function(){E(O)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(O,_){var E=this,w=this._avcTrack,S=this.parseAVCNALu(O.data),F=!1,P=this.avcSample,L,G=!1;O.data=null,P&&S.length&&!w.audFound&&(o(P,w),P=this.avcSample=s(!1,O.pts,O.dts,"")),S.forEach(function(z){switch(z.type){case 1:{L=!0,P||(P=E.avcSample=s(!0,O.pts,O.dts,"")),F&&(P.debug+="NDR "),P.frame=!0;var A=z.data;if(G&&A.length>4){var B=new v.default(A).readSliceType();(B===2||B===4||B===7||B===9)&&(P.key=!0)}break}case 5:L=!0,P||(P=E.avcSample=s(!0,O.pts,O.dts,"")),F&&(P.debug+="IDR "),P.key=!0,P.frame=!0;break;case 6:{L=!0,F&&P&&(P.debug+="SEI ");var U=new v.default(x(z.data));U.readUByte();for(var R=0,K=0,Z=!1,ue=0;!Z&&U.bytesAvailable>1;){R=0;do ue=U.readUByte(),R+=ue;while(ue===255);K=0;do ue=U.readUByte(),K+=ue;while(ue===255);if(R===4&&U.bytesAvailable!==0){Z=!0;var de=U.readUByte();if(de===181){var Ce=U.readUShort();if(Ce===49){var Re=U.readUInt();if(Re===1195456820){var me=U.readUByte();if(me===3){for(var Oe=U.readUByte(),be=U.readUByte(),ce=31&Oe,le=[Oe,be],ne=0;ne<ce;ne++)le.push(U.readUByte()),le.push(U.readUByte()),le.push(U.readUByte());r(E._txtTrack.samples,{type:3,pts:O.pts,bytes:le})}}}}}else if(R===5&&U.bytesAvailable!==0){if(Z=!0,K>16){for(var ge=[],te=0;te<16;te++)ge.push(U.readUByte().toString(16)),(te===3||te===5||te===7||te===9)&&ge.push("-");for(var re=K-16,Se=new Uint8Array(re),ie=0;ie<re;ie++)Se[ie]=U.readUByte();r(E._txtTrack.samples,{pts:O.pts,payloadType:R,uuid:ge.join(""),userData:Object(T.utf8ArrayToStr)(Se),userDataBytes:Se})}}else if(K<U.bytesAvailable)for(var q=0;q<K;q++)U.readUByte()}break}case 7:if(L=!0,G=!0,F&&P&&(P.debug+="SPS "),!w.sps){var Y=new v.default(z.data),X=Y.readSPS();w.width=X.width,w.height=X.height,w.pixelRatio=X.pixelRatio,w.sps=[z.data],w.duration=E._duration;for(var he=z.data.subarray(1,4),fe="avc1.",xe=0;xe<3;xe++){var Ke=he[xe].toString(16);Ke.length<2&&(Ke="0"+Ke),fe+=Ke}w.codec=fe}break;case 8:L=!0,F&&P&&(P.debug+="PPS "),w.pps||(w.pps=[z.data]);break;case 9:L=!1,w.audFound=!0,P&&o(P,w),P=E.avcSample=s(!1,O.pts,O.dts,F?"AUD ":"");break;case 12:L=!1;break;default:L=!1,P&&(P.debug+="unknown NAL "+z.type+" ");break}if(P&&L){var Ze=P.units;Ze.push(z)}}),_&&P&&(o(P,w),this.avcSample=null)},p.getLastNalUnit=function(){var O,_=this.avcSample,E;if(!_||_.units.length===0){var w=this._avcTrack.samples;_=w[w.length-1]}if((O=_)!==null&&O!==void 0&&O.units){var S=_.units;E=S[S.length-1]}return E},p.parseAVCNALu=function(O){var _=O.byteLength,E=this._avcTrack,w=E.naluState||0,S=w,F=[],P=0,L,G,z,A=-1,B=0;for(w===-1&&(A=0,B=O[0]&31,w=0,P=1);P<_;){if(L=O[P++],!w){w=L?0:1;continue}if(w===1){w=L?0:2;continue}if(!L)w=3;else if(L===1){if(A>=0){var U={data:O.subarray(A,P-w-1),type:B};F.push(U)}else{var R=this.getLastNalUnit();if(R&&(S&&P<=4-S&&(R.state&&(R.data=R.data.subarray(0,R.data.byteLength-S))),G=P-w-1,G>0)){var K=new Uint8Array(R.data.byteLength+G);K.set(R.data,0),K.set(O.subarray(0,G),R.data.byteLength),R.data=K,R.state=0}}P<_?(z=O[P]&31,A=P,B=z,w=0):w=-1}else w=0}if(A>=0&&w>=0){var Z={data:O.subarray(A,_),type:B,state:w};F.push(Z)}if(F.length===0){var ue=this.getLastNalUnit();if(ue){var de=new Uint8Array(ue.data.byteLength+O.byteLength);de.set(ue.data,0),de.set(O,ue.data.byteLength),ue.data=de}}return E.naluState=w,F},p.parseAACPES=function(O){var _=0,E=this._audioTrack,w=this.aacOverFlow,S=O.data;if(w){this.aacOverFlow=null;var F=w.sample.unit.byteLength,P=Math.min(w.missing,F),L=F-P;w.sample.unit.set(S.subarray(0,P),L),E.samples.push(w.sample),_=w.missing}var G,z;for(G=_,z=S.length;G<z-1&&!N.isHeader(S,G);G++);if(G!==_){var A,B;if(G<z-1?(A="AAC PES did not start with ADTS header,offset:"+G,B=!1):(A="no ADTS header found in AAC PES",B=!0),i.logger.warn("parsing error:"+A),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:B,reason:A}),B)return}N.initTrackConfig(E,this.observer,S,G,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(w){var R=N.getFrameDuration(E.samplerate);U=w.sample.pts+R}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var K=0;G<z;)if(N.isHeader(S,G)){if(G+5<z){var Z=N.appendFrame(E,S,G,U,K);if(Z)if(Z.missing)this.aacOverFlow=Z;else{G+=Z.length,K++;continue}}break}else G++},p.parseMPEGPES=function(O){var _=O.data,E=_.length,w=0,S=0,F=O.pts;if(F===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;S<E;)if(m.isHeader(_,S)){var P=m.appendFrame(this._audioTrack,_,S,F,w);if(P)S+=P.length,w++;else break}else S++},p.parseID3PES=function(O){if(O.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},b}();n.minProbeByteLength=188;function s(b,p,I,O){return{key:b,frame:!1,pts:p,dts:I,units:[],debug:O,length:0}}function d(b,p){return(b[p+10]&31)<<8|b[p+11]}function f(b,p,I,O){var _={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(b[p+1]&15)<<8|b[p+2],w=p+3+E-4,S=(b[p+10]&15)<<8|b[p+11];for(p+=12+S;p<w;){var F=(b[p+1]&31)<<8|b[p+2];switch(b[p]){case 207:if(!O){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:_.audio===-1&&(_.audio=F);break;case 21:_.id3===-1&&(_.id3=F);break;case 219:if(!O){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:_.avc===-1&&(_.avc=F);break;case 3:case 4:I?_.audio===-1&&(_.audio=F,_.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}p+=((b[p+3]&15)<<8|b[p+4])+5}return _}function l(b){var p=0,I,O,_,E,w,S=b.data;if(!b||b.size===0)return null;for(;S[0].length<19&&S.length>1;){var F=new Uint8Array(S[0].length+S[1].length);F.set(S[0]),F.set(S[1],S[0].length),S[0]=F,S.splice(1,1)}I=S[0];var P=(I[0]<<16)+(I[1]<<8)+I[2];if(P===1){if(O=(I[4]<<8)+I[5],O&&O>b.size-6)return null;var L=I[7];L&192&&(E=(I[9]&14)*536870912+(I[10]&255)*4194304+(I[11]&254)*16384+(I[12]&255)*128+(I[13]&254)/2,L&64?(w=(I[14]&14)*536870912+(I[15]&255)*4194304+(I[16]&254)*16384+(I[17]&255)*128+(I[18]&254)/2,E-w>60*9e4&&(i.logger.warn(Math.round((E-w)/9e4)+"s delta between PTS and DTS, align them"),E=w)):w=E),_=I[8];var G=_+9;if(b.size<=G)return null;b.size-=G;for(var z=new Uint8Array(b.size),A=0,B=S.length;A<B;A++){I=S[A];var U=I.byteLength;if(G)if(G>U){G-=U;continue}else I=I.subarray(G),U-=G,G=0;z.set(I,p),p+=U}return O&&(O-=_+3),{data:z,pts:E,dts:w,len:O}}return null}function o(b,p){if(b.units.length&&b.frame){if(b.pts===void 0){var I=p.samples,O=I.length;if(O){var _=I[O-1];b.pts=_.pts,b.dts=_.dts}else{p.dropped++;return}}p.samples.push(b)}b.debug.length&&i.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function r(b,p){var I=b.length;if(I>0){if(p.pts>=b[I-1].pts)b.push(p);else for(var O=I-1;O>=0;O--)if(p.pts<b[O].pts){b.splice(O,0,p);break}}else b.push(p)}function x(b){for(var p=b.byteLength,I=[],O=1;O<p-2;)b[O]===0&&b[O+1]===0&&b[O+2]===3?(I.push(O+2),O+=2):O++;if(I.length===0)return b;var _=p-I.length,E=new Uint8Array(_),w=0;for(O=0;O<_;w++,O++)w===I[0]&&(w++,I.shift()),E[O]=b[w];return E}g.default=n},"./src/errors.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"ErrorTypes",function(){return N}),C.d(g,"ErrorDetails",function(){return m});var N;(function(v){v.NETWORK_ERROR="networkError",v.MEDIA_ERROR="mediaError",v.KEY_SYSTEM_ERROR="keySystemError",v.MUX_ERROR="muxError",v.OTHER_ERROR="otherError"})(N||(N={}));var m;(function(v){v.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",v.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",v.KEY_SYSTEM_NO_SESSION="keySystemNoSession",v.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",v.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",v.MANIFEST_LOAD_ERROR="manifestLoadError",v.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",v.MANIFEST_PARSING_ERROR="manifestParsingError",v.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",v.LEVEL_EMPTY_ERROR="levelEmptyError",v.LEVEL_LOAD_ERROR="levelLoadError",v.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",v.LEVEL_SWITCH_ERROR="levelSwitchError",v.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",v.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",v.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",v.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",v.FRAG_LOAD_ERROR="fragLoadError",v.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",v.FRAG_DECRYPT_ERROR="fragDecryptError",v.FRAG_PARSING_ERROR="fragParsingError",v.REMUX_ALLOC_ERROR="remuxAllocError",v.KEY_LOAD_ERROR="keyLoadError",v.KEY_LOAD_TIMEOUT="keyLoadTimeOut",v.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",v.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",v.BUFFER_APPEND_ERROR="bufferAppendError",v.BUFFER_APPENDING_ERROR="bufferAppendingError",v.BUFFER_STALLED_ERROR="bufferStalledError",v.BUFFER_FULL_ERROR="bufferFullError",v.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",v.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",v.INTERNAL_EXCEPTION="internalException",v.INTERNAL_ABORTED="aborted",v.UNKNOWN="unknown"})(m||(m={}))},"./src/events.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"Events",function(){return N});var N;(function(m){m.MEDIA_ATTACHING="hlsMediaAttaching",m.MEDIA_ATTACHED="hlsMediaAttached",m.MEDIA_DETACHING="hlsMediaDetaching",m.MEDIA_DETACHED="hlsMediaDetached",m.BUFFER_RESET="hlsBufferReset",m.BUFFER_CODECS="hlsBufferCodecs",m.BUFFER_CREATED="hlsBufferCreated",m.BUFFER_APPENDING="hlsBufferAppending",m.BUFFER_APPENDED="hlsBufferAppended",m.BUFFER_EOS="hlsBufferEos",m.BUFFER_FLUSHING="hlsBufferFlushing",m.BUFFER_FLUSHED="hlsBufferFlushed",m.MANIFEST_LOADING="hlsManifestLoading",m.MANIFEST_LOADED="hlsManifestLoaded",m.MANIFEST_PARSED="hlsManifestParsed",m.LEVEL_SWITCHING="hlsLevelSwitching",m.LEVEL_SWITCHED="hlsLevelSwitched",m.LEVEL_LOADING="hlsLevelLoading",m.LEVEL_LOADED="hlsLevelLoaded",m.LEVEL_UPDATED="hlsLevelUpdated",m.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",m.LEVELS_UPDATED="hlsLevelsUpdated",m.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",m.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",m.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",m.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",m.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",m.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",m.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",m.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",m.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",m.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",m.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",m.CUES_PARSED="hlsCuesParsed",m.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",m.INIT_PTS_FOUND="hlsInitPtsFound",m.FRAG_LOADING="hlsFragLoading",m.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",m.FRAG_LOADED="hlsFragLoaded",m.FRAG_DECRYPTED="hlsFragDecrypted",m.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",m.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",m.FRAG_PARSING_METADATA="hlsFragParsingMetadata",m.FRAG_PARSED="hlsFragParsed",m.FRAG_BUFFERED="hlsFragBuffered",m.FRAG_CHANGED="hlsFragChanged",m.FPS_DROP="hlsFpsDrop",m.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",m.ERROR="hlsError",m.DESTROYING="hlsDestroying",m.KEY_LOADING="hlsKeyLoading",m.KEY_LOADED="hlsKeyLoaded",m.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",m.BACK_BUFFER_REACHED="hlsBackBufferReached"})(N||(N={}))},"./src/hls.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return b});var N=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(N),v=C("./src/loader/playlist-loader.ts"),T=C("./src/loader/key-loader.ts"),y=C("./src/controller/id3-track-controller.ts"),t=C("./src/controller/latency-controller.ts"),h=C("./src/controller/level-controller.ts"),i=C("./src/controller/fragment-tracker.ts"),c=C("./src/controller/stream-controller.ts"),a=C("./src/is-supported.ts"),n=C("./src/utils/logger.ts"),s=C("./src/config.ts"),d=C("./node_modules/eventemitter3/index.js"),f=C.n(d),l=C("./src/events.ts"),o=C("./src/errors.ts");function r(p,I){for(var O=0;O<I.length;O++){var _=I[O];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(p,_.key,_)}}function x(p,I,O){return I&&r(p.prototype,I),O&&r(p,O),p}var b=function(){p.isSupported=function(){return Object(a.isSupported)()};function p(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new d.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var _=this.config=Object(s.mergeConfig)(p.DefaultConfig,O);this.userConfig=O,Object(n.enableLogs)(_.debug),this._autoLevelCapping=-1,_.progressive&&Object(s.enableStreamingMode)(_);var E=_.abrController,w=_.bufferController,S=_.capLevelController,F=_.fpsController,P=this.abrController=new E(this),L=this.bufferController=new w(this),G=this.capLevelController=new S(this),z=new F(this),A=new v.default(this),B=new T.default(this),U=new y.default(this),R=this.levelController=new h.default(this),K=new i.FragmentTracker(this),Z=this.streamController=new c.default(this,K);G.setStreamController(Z),z.setStreamController(Z);var ue=[R,Z];this.networkControllers=ue;var de=[A,B,P,L,G,z,U,K];this.audioTrackController=this.createController(_.audioTrackController,null,ue),this.createController(_.audioStreamController,K,ue),this.subtitleTrackController=this.createController(_.subtitleTrackController,null,ue),this.createController(_.subtitleStreamController,K,ue),this.createController(_.timelineController,null,de),this.emeController=this.createController(_.emeController,null,de),this.cmcdController=this.createController(_.cmcdController,null,de),this.latencyController=this.createController(t.default,null,de),this.coreComponents=de}var I=p.prototype;return I.createController=function(_,E,w){if(_){var S=E?new _(this,E):new _(this);return w&&w.push(S),S}return null},I.on=function(_,E,w){w===void 0&&(w=this),this._emitter.on(_,E,w)},I.once=function(_,E,w){w===void 0&&(w=this),this._emitter.once(_,E,w)},I.removeAllListeners=function(_){this._emitter.removeAllListeners(_)},I.off=function(_,E,w,S){w===void 0&&(w=this),this._emitter.off(_,E,w,S)},I.listeners=function(_){return this._emitter.listeners(_)},I.emit=function(_,E,w){return this._emitter.emit(_,E,w)},I.trigger=function(_,E){if(this.config.debug)return this.emit(_,_,E);try{return this.emit(_,_,E)}catch(w){n.logger.error("An internal error happened while handling event "+_+'. Error message: "'+w.message+'". Here is a stacktrace:',w),this.trigger(l.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:_,error:w})}return!1},I.listenerCount=function(_){return this._emitter.listenerCount(_)},I.destroy=function(){n.logger.log("destroy"),this.trigger(l.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(_){return _.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(_){return _.destroy()}),this.coreComponents.length=0},I.attachMedia=function(_){n.logger.log("attachMedia"),this._media=_,this.trigger(l.Events.MEDIA_ATTACHING,{media:_})},I.detachMedia=function(){n.logger.log("detachMedia"),this.trigger(l.Events.MEDIA_DETACHING,void 0),this._media=null},I.loadSource=function(_){this.stopLoad();var E=this.media,w=this.url,S=this.url=N.buildAbsoluteURL(self.location.href,_,{alwaysNormalize:!0});n.logger.log("loadSource:"+S),E&&w&&w!==S&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(l.Events.MANIFEST_LOADING,{url:_})},I.startLoad=function(_){_===void 0&&(_=-1),n.logger.log("startLoad("+_+")"),this.networkControllers.forEach(function(E){E.startLoad(_)})},I.stopLoad=function(){n.logger.log("stopLoad"),this.networkControllers.forEach(function(_){_.stopLoad()})},I.swapAudioCodec=function(){n.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},I.recoverMediaError=function(){n.logger.log("recoverMediaError");var _=this._media;this.detachMedia(),_&&this.attachMedia(_)},I.removeLevel=function(_,E){E===void 0&&(E=0),this.levelController.removeLevel(_,E)},x(p,[{key:"levels",get:function(){var _=this.levelController.levels;return _||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(_){n.logger.log("set currentLevel:"+_),this.loadLevel=_,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(_){n.logger.log("set nextLevel:"+_),this.levelController.manualLevel=_,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(_){n.logger.log("set loadLevel:"+_),this.levelController.manualLevel=_}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(_){this.levelController.nextLoadLevel=_}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(_){n.logger.log("set firstLevel:"+_),this.levelController.firstLevel=_}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(_){n.logger.log("set startLevel:"+_),_!==-1&&(_=Math.max(_,this.minAutoLevel)),this.levelController.startLevel=_}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(_){var E=!!_;E!==this.config.capLevelToPlayerSize&&(E?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=E)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(_){this._autoLevelCapping!==_&&(n.logger.log("set autoLevelCapping:"+_),this._autoLevelCapping=_)}},{key:"bandwidthEstimate",get:function(){var _=this.abrController.bwEstimator;return _?_.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var _=this.levels,E=this.config.minAutoBitrate;if(!_)return 0;for(var w=_.length,S=0;S<w;S++)if(_[S].maxBitrate>E)return S;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,E=this.autoLevelCapping,w;return E===-1&&_&&_.length?w=_.length-1:w=E,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(_){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,_)}},{key:"audioTracks",get:function(){var _=this.audioTrackController;return _?_.audioTracks:[]}},{key:"audioTrack",get:function(){var _=this.audioTrackController;return _?_.audioTrack:-1},set:function(_){var E=this.audioTrackController;E&&(E.audioTrack=_)}},{key:"subtitleTracks",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTrack:-1},set:function(_){var E=this.subtitleTrackController;E&&(E.subtitleTrack=_)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var _=this.subtitleTrackController;return _?_.subtitleDisplay:!1},set:function(_){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=_)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(_){this.config.lowLatencyMode=_}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return l.Events}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:s.hlsDefaultConfig},set:function(_){p.defaultConfig=_}}]),p}();b.defaultConfig=void 0},"./src/is-supported.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"isSupported",function(){return v}),C.d(g,"changeTypeSupported",function(){return T});var N=C("./src/utils/mediasource-helper.ts");function m(){return self.SourceBuffer||self.WebKitSourceBuffer}function v(){var y=Object(N.getMediaSource)();if(!y)return!1;var t=m(),h=y&&typeof y.isTypeSupported=="function"&&y.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!h&&!!i}function T(){var y,t=m();return typeof(t==null||((y=t.prototype)===null||y===void 0)?void 0:y.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return n}),C.d(g,"LoadError",function(){return d});var N=C("./src/polyfills/number.ts"),m=C("./src/errors.ts");function v(f,l){f.prototype=Object.create(l.prototype),f.prototype.constructor=f,i(f,l)}function T(f){var l=typeof Map=="function"?new Map:void 0;return T=function(r){if(r===null||!h(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(r))return l.get(r);l.set(r,x)}function x(){return y(r,arguments,c(this).constructor)}return x.prototype=Object.create(r.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),i(x,r)},T(f)}function y(f,l,o){return t()?y=Reflect.construct:y=function(x,b,p){var I=[null];I.push.apply(I,b);var O=Function.bind.apply(x,I),_=new O;return p&&i(_,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(f){return!1}}function h(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function i(f,l){return i=Object.setPrototypeOf||function(r,x){return r.__proto__=x,r},i(f,l)}function c(f){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},c(f)}var a=Math.pow(2,17),n=function(){function f(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var l=f.prototype;return l.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},l.abort=function(){this.loader&&this.loader.abort()},l.load=function(r,x){var b=this,p=r.url;if(!p)return Promise.reject(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var I=this.config,O=I.fLoader,_=I.loader;return new Promise(function(E,w){b.loader&&b.loader.destroy();var S=b.loader=r.loader=O?new O(I):new _(I),F=s(r),P={timeout:I.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:I.fragLoadingMaxRetryTimeout,highWaterMark:a};r.stats=S.stats,S.load(F,P,{onSuccess:function(G,z,A,B){b.resetLoader(r,S),E({frag:r,part:null,payload:G.data,networkDetails:B})},onError:function(G,z,A){b.resetLoader(r,S),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,response:G,networkDetails:A}))},onAbort:function(G,z,A){b.resetLoader(r,S),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,networkDetails:A}))},onTimeout:function(G,z,A){b.resetLoader(r,S),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,networkDetails:A}))},onProgress:function(G,z,A,B){x&&x({frag:r,part:null,payload:A,networkDetails:B})}})})},l.loadPart=function(r,x,b){var p=this;this.abort();var I=this.config,O=I.fLoader,_=I.loader;return new Promise(function(E,w){p.loader&&p.loader.destroy();var S=p.loader=r.loader=O?new O(I):new _(I),F=s(r,x),P={timeout:I.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:I.fragLoadingMaxRetryTimeout,highWaterMark:a};x.stats=S.stats,S.load(F,P,{onSuccess:function(G,z,A,B){p.resetLoader(r,S),p.updateStatsFromPart(r,x);var U={frag:r,part:x,payload:G.data,networkDetails:B};b(U),E(U)},onError:function(G,z,A){p.resetLoader(r,S),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,part:x,response:G,networkDetails:A}))},onAbort:function(G,z,A){r.stats.aborted=x.stats.aborted,p.resetLoader(r,S),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,part:x,networkDetails:A}))},onTimeout:function(G,z,A){p.resetLoader(r,S),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,part:x,networkDetails:A}))}})})},l.updateStatsFromPart=function(r,x){var b=r.stats,p=x.stats,I=p.total;if(b.loaded+=p.loaded,I){var O=Math.round(r.duration/x.duration),_=Math.min(Math.round(b.loaded/I),O),E=O-_,w=E*Math.round(b.loaded/_);b.total=b.loaded+w}else b.total=Math.max(b.loaded,b.total);var S=b.loading,F=p.loading;S.start?S.first+=F.first-F.start:(S.start=F.start,S.first=F.first),S.end=F.end},l.resetLoader=function(r,x){r.loader=null,this.loader===x&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),x.destroy()},f}();function s(f,l){l===void 0&&(l=null);var o=l||f,r={frag:f,part:l,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},x=o.byteRangeStartOffset,b=o.byteRangeEndOffset;return Object(N.isFiniteNumber)(x)&&Object(N.isFiniteNumber)(b)&&(r.rangeStart=x,r.rangeEnd=b),r}var d=function(f){v(l,f);function l(o){for(var r,x=arguments.length,b=new Array(x>1?x-1:0),p=1;p<x;p++)b[p-1]=arguments[p];return r=f.call.apply(f,[this].concat(b))||this,r.data=void 0,r.data=o,r}return l}(T(Error))},"./src/loader/fragment.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"ElementaryStreamTypes",function(){return n}),C.d(g,"BaseSegment",function(){return s}),C.d(g,"Fragment",function(){return d}),C.d(g,"Part",function(){return f});var N=C("./src/polyfills/number.ts"),m=C("./node_modules/url-toolkit/src/url-toolkit.js"),v=C.n(m),T=C("./src/utils/logger.ts"),y=C("./src/loader/level-key.ts"),t=C("./src/loader/load-stats.ts");function h(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,i(l,o)}function i(l,o){return i=Object.setPrototypeOf||function(x,b){return x.__proto__=b,x},i(l,o)}function c(l,o){for(var r=0;r<o.length;r++){var x=o[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function a(l,o,r){return o&&c(l.prototype,o),r&&c(l,r),l}var n;(function(l){l.AUDIO="audio",l.VIDEO="video",l.AUDIOVIDEO="audiovideo"})(n||(n={}));var s=function(){function l(r){var x;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(x={},x[n.AUDIO]=null,x[n.VIDEO]=null,x[n.AUDIOVIDEO]=null,x),this.baseurl=r}var o=l.prototype;return o.setByteRange=function(x,b){var p=x.split("@",2),I=[];p.length===1?I[0]=b?b.byteRangeEndOffset:0:I[0]=parseInt(p[1]),I[1]=parseInt(p[0])+I[0],this._byteRange=I},a(l,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(m.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(x){this._url=x}}]),l}(),d=function(l){h(o,l);function o(x,b){var p;return p=l.call(this,b)||this,p._decryptdata=null,p.rawProgramDateTime=null,p.programDateTime=null,p.tagList=[],p.duration=0,p.sn=0,p.levelkey=void 0,p.type=void 0,p.loader=null,p.level=-1,p.cc=0,p.startPTS=void 0,p.endPTS=void 0,p.appendedPTS=void 0,p.startDTS=void 0,p.endDTS=void 0,p.start=0,p.deltaPTS=void 0,p.maxStartPTS=void 0,p.minEndPTS=void 0,p.stats=new t.LoadStats,p.urlId=0,p.data=void 0,p.bitrateTest=!1,p.title=null,p.initSegment=null,p.type=x,p}var r=o.prototype;return r.createInitializationVector=function(b){for(var p=new Uint8Array(16),I=12;I<16;I++)p[I]=b>>8*(15-I)&255;return p},r.setDecryptDataFromLevelKey=function(b,p){var I=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(I=y.LevelKey.fromURI(b.uri),I.method=b.method,I.iv=this.createInitializationVector(p),I.keyFormat="identity"),I},r.setElementaryStreamInfo=function(b,p,I,O,_,E){E===void 0&&(E=!1);var w=this.elementaryStreams,S=w[b];if(!S){w[b]={startPTS:p,endPTS:I,startDTS:O,endDTS:_,partial:E};return}S.startPTS=Math.min(S.startPTS,p),S.endPTS=Math.max(S.endPTS,I),S.startDTS=Math.min(S.startDTS,O),S.endDTS=Math.max(S.endDTS,_)},r.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[n.AUDIO]=null,b[n.VIDEO]=null,b[n.AUDIOVIDEO]=null},a(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var b=this.sn;typeof b!="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'),b=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,b)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(N.isFiniteNumber)(this.programDateTime))return null;var b=Object(N.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;return!!((b=this.decryptdata)!==null&&b!==void 0&&b.keyFormat&&this.decryptdata.uri)}}]),o}(s),f=function(l){h(o,l);function o(r,x,b,p,I){var O;O=l.call(this,b)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new t.LoadStats,O.duration=r.decimalFloatingPoint("DURATION"),O.gap=r.bool("GAP"),O.independent=r.bool("INDEPENDENT"),O.relurl=r.enumeratedString("URI"),O.fragment=x,O.index=p;var _=r.enumeratedString("BYTERANGE");return _&&O.setByteRange(_,I),I&&(O.fragOffset=I.fragOffset+I.duration),O}return a(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 x=this.elementaryStreams;return!!(x.audio||x.video||x.audiovideo)}}]),o}(s)},"./src/loader/key-loader.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return T});var N=C("./src/events.ts"),m=C("./src/errors.ts"),v=C("./src/utils/logger.ts"),T=function(){function y(h){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=h,this._registerListeners()}var t=y.prototype;return t._registerListeners=function(){this.hls.on(N.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(N.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var c=this.loaders[i];c&&c.destroy()}this.loaders={}},t.onKeyLoading=function(i,c){var a=c.frag,n=a.type,s=this.loaders[n];if(!a.decryptdata){v.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=a.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var f=this.hls.config;if(s&&(v.logger.warn("abort previous key loader for type:"+n),s.abort()),!d){v.logger.warn("key uri is falsy");return}var l=f.loader,o=a.loader=this.loaders[n]=new l(f);this.decrypturl=d,this.decryptkey=null;var r={url:d,frag:a,responseType:"arraybuffer"},x={timeout:f.fragLoadingTimeOut,maxRetry:0,retryDelay:f.fragLoadingRetryDelay,maxRetryDelay:f.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(r,x,b)}else this.decryptkey&&(a.decryptdata.key=this.decryptkey,this.hls.trigger(N.Events.KEY_LOADED,{frag:a}))},t.loadsuccess=function(i,c,a){var n=a.frag;if(!n.decryptdata){v.logger.error("after key load, decryptdata unset");return}this.decryptkey=n.decryptdata.key=new Uint8Array(i.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(N.Events.KEY_LOADED,{frag:n})},t.loaderror=function(i,c){var a=c.frag,n=a.loader;n&&n.abort(),delete this.loaders[a.type],this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:a,response:i})},t.loadtimeout=function(i,c){var a=c.frag,n=a.loader;n&&n.abort(),delete this.loaders[a.type],this.hls.trigger(N.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:a})},y}()},"./src/loader/level-details.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"LevelDetails",function(){return y});var N=C("./src/polyfills/number.ts");function m(t,h){for(var i=0;i<h.length;i++){var c=h[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function v(t,h,i){return h&&m(t.prototype,h),i&&m(t,i),t}var T=10,y=function(){function t(i){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=i}var h=t.prototype;return h.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var a=this.lastPartSn-c.lastPartSn,n=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!n||!!a,this.advanced=this.endSN>c.endSN||a>0||a===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},v(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(N.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||T}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var a=this.driftEnd-this.driftStart;return a*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(M,g,C){"use strict";C.r(g),C.d(g,"LevelKey",function(){return y});var N=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(N);function v(t,h){for(var i=0;i<h.length;i++){var c=h[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function T(t,h,i){return h&&v(t.prototype,h),i&&v(t,i),t}var y=function(){t.fromURL=function(i,c){return new t(i,c)},t.fromURI=function(i){return new t(i)};function t(h,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(N.buildAbsoluteURL)(h,i,{alwaysNormalize:!0}):this._uri=h}return T(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"LoadStats",function(){return N});var N=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return o});var N=C("./src/polyfills/number.ts"),m=C("./node_modules/url-toolkit/src/url-toolkit.js"),v=C.n(m),T=C("./src/loader/fragment.ts"),y=C("./src/loader/level-details.ts"),t=C("./src/loader/level-key.ts"),h=C("./src/utils/attr-list.ts"),i=C("./src/utils/logger.ts"),c=C("./src/utils/codecs.ts"),a=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,n=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),d=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),f=/\.(mp4|m4s|m4v|m4a)$/i;function l(I){var O,_;return f.test((O=(_=m.parseURL(I))===null||_===void 0?void 0:_.path)!=null?O:"")}var o=function(){function I(){}return I.findGroup=function(_,E){for(var w=0;w<_.length;w++){var S=_[w];if(S.id===E)return S}},I.convertAVC1ToAVCOTI=function(_){var E=_.split(".");if(E.length>2){var w=E.shift()+".";return w+=parseInt(E.shift()).toString(16),w+=("000"+parseInt(E.shift()).toString(16)).substr(-4),w}return _},I.resolve=function(_,E){return m.buildAbsoluteURL(E,_,{alwaysNormalize:!0})},I.parseMasterPlaylist=function(_,E){var w=[],S={},F=!1;a.lastIndex=0;for(var P;(P=a.exec(_))!=null;)if(P[1]){var L=new h.AttrList(P[1]),G={attrs:L,bitrate:L.decimalInteger("AVERAGE-BANDWIDTH")||L.decimalInteger("BANDWIDTH"),name:L.NAME,url:I.resolve(P[2],E)},z=L.decimalResolution("RESOLUTION");z&&(G.width=z.width,G.height=z.height),r((L.CODECS||"").split(/[ ,]+/).filter(function(B){return B}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=I.convertAVC1ToAVCOTI(G.videoCodec)),w.push(G)}else if(P[3]){var A=new h.AttrList(P[3]);A["DATA-ID"]&&(F=!0,S[A["DATA-ID"]]=A)}return{levels:w,sessionData:F?S:null}},I.parseMasterPlaylistMedia=function(_,E,w,S){S===void 0&&(S=[]);var F,P=[],L=0;for(n.lastIndex=0;(F=n.exec(_))!==null;){var G=new h.AttrList(F[1]);if(G.TYPE===w){var z={attrs:G,bitrate:0,id:L++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:w,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?I.resolve(G.URI,E):""};if(S.length){var A=I.findGroup(S,z.groupId)||S[0];x(z,A,"audioCodec"),x(z,A,"textCodec")}P.push(z)}}return P},I.parseLevelPlaylist=function(_,E,w,S,F){var P=new y.LevelDetails(E),L=P.fragments,G=null,z=0,A=0,B=0,U=0,R=null,K=new T.Fragment(S,E),Z,ue,de,Ce=-1,Re=!1;for(s.lastIndex=0,P.m3u8=_;(Z=s.exec(_))!==null;){Re&&(Re=!1,K=new T.Fragment(S,E),K.start=B,K.sn=z,K.cc=U,K.level=w,G&&(K.initSegment=G,K.rawProgramDateTime=G.rawProgramDateTime));var me=Z[1];if(me){K.duration=parseFloat(me);var Oe=(" "+Z[2]).slice(1);K.title=Oe||null,K.tagList.push(Oe?["INF",me,Oe]:["INF",me])}else if(Z[3])Object(N.isFiniteNumber)(K.duration)&&(K.start=B,de&&(K.levelkey=de),K.sn=z,K.level=w,K.cc=U,K.urlId=F,L.push(K),K.relurl=(" "+Z[3]).slice(1),p(K,R),R=K,B+=K.duration,z++,A=0,Re=!0);else if(Z[4]){var be=(" "+Z[4]).slice(1);R?K.setByteRange(be,R):K.setByteRange(be)}else if(Z[5])K.rawProgramDateTime=(" "+Z[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),Ce===-1&&(Ce=L.length);else{if(Z=Z[0].match(d),!Z){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(ue=1;ue<Z.length&&!(typeof Z[ue]!="undefined");ue++);var ce=(" "+Z[ue]).slice(1),le=(" "+Z[ue+1]).slice(1),ne=Z[ue+2]?(" "+Z[ue+2]).slice(1):"";switch(ce){case"PLAYLIST-TYPE":P.type=le.toUpperCase();break;case"MEDIA-SEQUENCE":z=P.startSN=parseInt(le);break;case"SKIP":{var ge=new h.AttrList(le),te=ge.decimalInteger("SKIPPED-SEGMENTS");if(Object(N.isFiniteNumber)(te)){P.skippedSegments=te;for(var re=te;re--;)L.unshift(null);z+=te}var Se=ge.enumeratedString("RECENTLY-REMOVED-DATERANGES");Se&&(P.recentlyRemovedDateranges=Se.split(" "));break}case"TARGETDURATION":P.targetduration=parseFloat(le);break;case"VERSION":P.version=parseInt(le);break;case"EXTM3U":break;case"ENDLIST":P.live=!1;break;case"#":(le||ne)&&K.tagList.push(ne?[le,ne]:[le]);break;case"DIS":U++;case"GAP":K.tagList.push([ce]);break;case"BITRATE":K.tagList.push([ce,le]);break;case"DISCONTINUITY-SEQ":U=parseInt(le);break;case"KEY":{var ie,q=new h.AttrList(le),Y=q.enumeratedString("METHOD"),X=q.URI,he=q.hexadecimalInteger("IV"),fe=q.enumeratedString("KEYFORMATVERSIONS"),xe=q.enumeratedString("KEYID"),Ke=(ie=q.enumeratedString("KEYFORMAT"))!=null?ie:"identity",Ze=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ze.indexOf(Ke)>-1){i.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;Y&&(de=t.LevelKey.fromURL(E,X),X&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(de.method=Y,de.keyFormat=Ke,xe&&(de.keyID=xe),fe&&(de.keyFormatVersions=fe),de.iv=he));break}case"START":{var et=new h.AttrList(le),st=et.decimalFloatingPoint("TIME-OFFSET");Object(N.isFiniteNumber)(st)&&(P.startTimeOffset=st);break}case"MAP":{var ut=new h.AttrList(le);K.relurl=ut.URI,ut.BYTERANGE&&K.setByteRange(ut.BYTERANGE),K.level=w,K.sn="initSegment",de&&(K.levelkey=de),K.initSegment=null,G=K,Re=!0;break}case"SERVER-CONTROL":{var dt=new h.AttrList(le);P.canBlockReload=dt.bool("CAN-BLOCK-RELOAD"),P.canSkipUntil=dt.optionalFloat("CAN-SKIP-UNTIL",0),P.canSkipDateRanges=P.canSkipUntil>0&&dt.bool("CAN-SKIP-DATERANGES"),P.partHoldBack=dt.optionalFloat("PART-HOLD-BACK",0),P.holdBack=dt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Fe=new h.AttrList(le);P.partTarget=Fe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=P.partList;Ie||(Ie=P.partList=[]);var ot=A>0?Ie[Ie.length-1]:void 0,ft=A++,Qe=new T.Part(new h.AttrList(le),K,E,ft,ot);Ie.push(Qe),K.duration+=Qe.duration;break}case"PRELOAD-HINT":{var tt=new h.AttrList(le);P.preloadHint=tt;break}case"RENDITION-REPORT":{var Be=new h.AttrList(le);P.renditionReports=P.renditionReports||[],P.renditionReports.push(Be);break}default:i.logger.warn("line parsed but not handled: "+Z);break}}}R&&!R.relurl?(L.pop(),B-=R.duration,P.partList&&(P.fragmentHint=R)):P.partList&&(p(K,R),K.cc=U,P.fragmentHint=K);var ke=L.length,Ne=L[0],Ee=L[ke-1];if(B+=P.skippedSegments*P.targetduration,B>0&&ke&&Ee){P.averagetargetduration=B/ke;var Ae=Ee.sn;P.endSN=Ae!=="initSegment"?Ae:0,Ne&&(P.startCC=Ne.cc,Ne.initSegment||P.fragments.every(function(Le){return Le.relurl&&l(Le.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new T.Fragment(S,E),K.relurl=Ee.relurl,K.level=w,K.sn="initSegment",Ne.initSegment=K,P.needSidxRanges=!0))}else P.endSN=0,P.startCC=0;return P.fragmentHint&&(B+=P.fragmentHint.duration),P.totalduration=B,P.endCC=U,Ce>0&&b(L,Ce),P},I}();function r(I,O){["video","audio","text"].forEach(function(_){var E=I.filter(function(S){return Object(c.isCodecType)(S,_)});if(E.length){var w=E.filter(function(S){return S.lastIndexOf("avc1",0)===0||S.lastIndexOf("mp4a",0)===0});O[_+"Codec"]=w.length>0?w[0]:E[0],I=I.filter(function(S){return E.indexOf(S)===-1})}}),O.unknownCodecs=I}function x(I,O,_){var E=O[_];E&&(I[_]=E)}function b(I,O){for(var _=I[O],E=O;E--;){var w=I[E];if(!w)return;w.programDateTime=_.programDateTime-w.duration*1e3,_=w}}function p(I,O){I.rawProgramDateTime?I.programDateTime=Date.parse(I.rawProgramDateTime):O!=null&&O.programDateTime&&(I.programDateTime=O.endProgramDateTime),Object(N.isFiniteNumber)(I.programDateTime)||(I.programDateTime=null,I.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/polyfills/number.ts"),m=C("./src/events.ts"),v=C("./src/errors.ts"),T=C("./src/utils/logger.ts"),y=C("./src/utils/mp4-tools.ts"),t=C("./src/loader/m3u8-parser.ts"),h=C("./src/types/loader.ts"),i=C("./src/utils/attr-list.ts");function c(s){var d=s.type;switch(d){case h.PlaylistContextType.AUDIO_TRACK:return h.PlaylistLevelType.AUDIO;case h.PlaylistContextType.SUBTITLE_TRACK:return h.PlaylistLevelType.SUBTITLE;default:return h.PlaylistLevelType.MAIN}}function a(s,d){var f=s.url;return(f===void 0||f.indexOf("data:")===0)&&(f=d.url),f}var n=function(){function s(f){this.hls=void 0,this.loaders=Object.create(null),this.hls=f,this.registerListeners()}var d=s.prototype;return d.registerListeners=function(){var l=this.hls;l.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(m.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.on(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var l=this.hls;l.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(m.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.off(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(l){var o=this.hls.config,r=o.pLoader,x=o.loader,b=r||x,p=new b(o);return l.loader=p,this.loaders[l.type]=p,p},d.getInternalLoader=function(l){return this.loaders[l.type]},d.resetInternalLoader=function(l){this.loaders[l]&&delete this.loaders[l]},d.destroyInternalLoaders=function(){for(var l in this.loaders){var o=this.loaders[l];o&&o.destroy(),this.resetInternalLoader(l)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(l,o){var r=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:h.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},d.onLevelLoading=function(l,o){var r=o.id,x=o.level,b=o.url,p=o.deliveryDirectives;this.load({id:r,groupId:null,level:x,responseType:"text",type:h.PlaylistContextType.LEVEL,url:b,deliveryDirectives:p})},d.onAudioTrackLoading=function(l,o){var r=o.id,x=o.groupId,b=o.url,p=o.deliveryDirectives;this.load({id:r,groupId:x,level:null,responseType:"text",type:h.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:p})},d.onSubtitleTrackLoading=function(l,o){var r=o.id,x=o.groupId,b=o.url,p=o.deliveryDirectives;this.load({id:r,groupId:x,level:null,responseType:"text",type:h.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:p})},d.load=function(l){var o,r=this.hls.config,x=this.getInternalLoader(l);if(x){var b=x.context;if(b&&b.url===l.url){T.logger.trace("[playlist-loader]: playlist request ongoing");return}T.logger.log("[playlist-loader]: aborting previous loader for type: "+l.type),x.abort()}var p,I,O,_;switch(l.type){case h.PlaylistContextType.MANIFEST:p=r.manifestLoadingMaxRetry,I=r.manifestLoadingTimeOut,O=r.manifestLoadingRetryDelay,_=r.manifestLoadingMaxRetryTimeout;break;case h.PlaylistContextType.LEVEL:case h.PlaylistContextType.AUDIO_TRACK:case h.PlaylistContextType.SUBTITLE_TRACK:p=0,I=r.levelLoadingTimeOut;break;default:p=r.levelLoadingMaxRetry,I=r.levelLoadingTimeOut,O=r.levelLoadingRetryDelay,_=r.levelLoadingMaxRetryTimeout;break}if(x=this.createInternalLoader(l),(o=l.deliveryDirectives)!==null&&o!==void 0&&o.part){var E;if(l.type===h.PlaylistContextType.LEVEL&&l.level!==null?E=this.hls.levels[l.level].details:l.type===h.PlaylistContextType.AUDIO_TRACK&&l.id!==null?E=this.hls.audioTracks[l.id].details:l.type===h.PlaylistContextType.SUBTITLE_TRACK&&l.id!==null&&(E=this.hls.subtitleTracks[l.id].details),E){var w=E.partTarget,S=E.targetduration;w&&S&&(I=Math.min(Math.max(w*3,S*.8)*1e3,I))}}var F={timeout:I,maxRetry:p,retryDelay:O,maxRetryDelay:_,highWaterMark:0},P={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};x.load(l,F,P)},d.loadsuccess=function(l,o,r,x){if(x===void 0&&(x=null),r.isSidxRequest){this.handleSidxRequest(l,r),this.handlePlaylistLoaded(l,o,r,x);return}this.resetInternalLoader(r.type);var b=l.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,r,"no EXTM3U delimiter",x);return}o.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(l,o,r,x):this.handleMasterPlaylist(l,o,r,x)},d.loaderror=function(l,o,r){r===void 0&&(r=null),this.handleNetworkError(o,r,!1,l)},d.loadtimeout=function(l,o,r){r===void 0&&(r=null),this.handleNetworkError(o,r,!0)},d.handleMasterPlaylist=function(l,o,r,x){var b=this.hls,p=l.data,I=a(l,r),O=t.default.parseMasterPlaylist(p,I),_=O.levels,E=O.sessionData;if(!_.length){this.handleManifestParsingError(l,r,"no level found in manifest",x);return}var w=_.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),S=_.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),F=t.default.parseMasterPlaylistMedia(p,I,"AUDIO",w),P=t.default.parseMasterPlaylistMedia(p,I,"SUBTITLES",S),L=t.default.parseMasterPlaylistMedia(p,I,"CLOSED-CAPTIONS");if(F.length){var G=F.some(function(z){return!z.url});!G&&_[0].audioCodec&&!_[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 i.AttrList({}),bitrate:0,url:""}))}b.trigger(m.Events.MANIFEST_LOADED,{levels:_,audioTracks:F,subtitles:P,captions:L,url:I,stats:o,networkDetails:x,sessionData:E})},d.handleTrackOrLevelPlaylist=function(l,o,r,x){var b=this.hls,p=r.id,I=r.level,O=r.type,_=a(l,r),E=Object(N.isFiniteNumber)(p)?p:0,w=Object(N.isFiniteNumber)(I)?I:E,S=c(r),F=t.default.parseLevelPlaylist(l.data,_,w,S,E);if(!F.fragments.length){b.trigger(m.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof r.level=="number"?r.level:void 0});return}if(O===h.PlaylistContextType.MANIFEST){var P={attrs:new i.AttrList({}),bitrate:0,details:F,name:"",url:_};b.trigger(m.Events.MANIFEST_LOADED,{levels:[P],audioTracks:[],url:_,stats:o,networkDetails:x,sessionData:null})}if(o.parsing.end=performance.now(),F.needSidxRanges){var L,G=(L=F.fragments[0].initSegment)===null||L===void 0?void 0:L.url;this.load({url:G,isSidxRequest:!0,type:O,level:I,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}r.levelDetails=F,this.handlePlaylistLoaded(l,o,r,x)},d.handleSidxRequest=function(l,o){var r=Object(y.parseSegmentIndex)(new Uint8Array(l.data));if(!r)return;var x=r.references,b=o.levelDetails;x.forEach(function(p,I){var O=p.info,_=b.fragments[I];_.byteRange.length===0&&_.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),_.initSegment&&_.initSegment.setByteRange(String(r.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(l,o,r,x){this.hls.trigger(m.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===h.PlaylistContextType.MANIFEST,url:l.url,reason:r,response:l,context:o,networkDetails:x})},d.handleNetworkError=function(l,o,r,x){r===void 0&&(r=!1),T.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+l.type+" level: "+l.level+" id: "+l.id+' group-id: "'+l.groupId+'"');var b=v.ErrorDetails.UNKNOWN,p=!1,I=this.getInternalLoader(l);switch(l.type){case h.PlaylistContextType.MANIFEST:b=r?v.ErrorDetails.MANIFEST_LOAD_TIMEOUT:v.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case h.PlaylistContextType.LEVEL:b=r?v.ErrorDetails.LEVEL_LOAD_TIMEOUT:v.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.AUDIO_TRACK:b=r?v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.SUBTITLE_TRACK:b=r?v.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:v.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}I&&this.resetInternalLoader(l.type);var O={type:v.ErrorTypes.NETWORK_ERROR,details:b,fatal:p,url:l.url,loader:I,context:l,networkDetails:o};x&&(O.response=x),this.hls.trigger(m.Events.ERROR,O)},d.handlePlaylistLoaded=function(l,o,r,x){var b=r.type,p=r.level,I=r.id,O=r.groupId,_=r.loader,E=r.levelDetails,w=r.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(l,r,"invalid target duration",x);return}if(!_)return;E.live&&(_.getCacheAge&&(E.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(b){case h.PlaylistContextType.MANIFEST:case h.PlaylistContextType.LEVEL:this.hls.trigger(m.Events.LEVEL_LOADED,{details:E,level:p||0,id:I||0,stats:o,networkDetails:x,deliveryDirectives:w});break;case h.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(m.Events.AUDIO_TRACK_LOADED,{details:E,id:I||0,groupId:O||"",stats:o,networkDetails:x,deliveryDirectives:w});break;case h.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(m.Events.SUBTITLE_TRACK_LOADED,{details:E,id:I||0,groupId:O||"",stats:o,networkDetails:x,deliveryDirectives:w});break}},s}();g.default=n},"./src/polyfills/number.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"isFiniteNumber",function(){return N}),C.d(g,"MAX_SAFE_INTEGER",function(){return m});var N=Number.isFinite||function(v){return typeof v=="number"&&isFinite(v)},m=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(M,g,C){"use strict";C.r(g);var N=function(){function m(){}return m.getSilentFrame=function(T,y){switch(T){case"mp4a.40.2":if(y===1)return new Uint8Array([0,200,0,128,35,128]);if(y===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(y===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(y===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(y===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(y===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(y===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(y===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(y===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},m}();g.default=N},"./src/remux/mp4-generator.ts":function(M,g,C){"use strict";C.r(g);var N=Math.pow(2,32)-1,m=function(){function v(){}return v.init=function(){v.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var y;for(y in v.types)v.types.hasOwnProperty(y)&&(v.types[y]=[y.charCodeAt(0),y.charCodeAt(1),y.charCodeAt(2),y.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]);v.HDLR_TYPES={video:t,audio:h};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);v.STTS=v.STSC=v.STCO=c,v.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),v.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),v.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),v.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);v.FTYP=v.box(v.types.ftyp,a,s,a,n),v.DINF=v.box(v.types.dinf,v.box(v.types.dref,i))},v.box=function(y){for(var t=8,h=arguments.length,i=new Array(h>1?h-1:0),c=1;c<h;c++)i[c-1]=arguments[c];for(var a=i.length,n=a;a--;)t+=i[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=t&255,s.set(y,4),a=0,t=8;a<n;a++)s.set(i[a],t),t+=i[a].byteLength;return s},v.hdlr=function(y){return v.box(v.types.hdlr,v.HDLR_TYPES[y])},v.mdat=function(y){return v.box(v.types.mdat,y)},v.mdhd=function(y,t){t*=y;var h=Math.floor(t/(N+1)),i=Math.floor(t%(N+1));return v.box(v.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,y>>24&255,y>>16&255,y>>8&255,y&255,h>>24,h>>16&255,h>>8&255,h&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},v.mdia=function(y){return v.box(v.types.mdia,v.mdhd(y.timescale,y.duration),v.hdlr(y.type),v.minf(y))},v.mfhd=function(y){return v.box(v.types.mfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255]))},v.minf=function(y){return y.type==="audio"?v.box(v.types.minf,v.box(v.types.smhd,v.SMHD),v.DINF,v.stbl(y)):v.box(v.types.minf,v.box(v.types.vmhd,v.VMHD),v.DINF,v.stbl(y))},v.moof=function(y,t,h){return v.box(v.types.moof,v.mfhd(y),v.traf(h,t))},v.moov=function(y){for(var t=y.length,h=[];t--;)h[t]=v.trak(y[t]);return v.box.apply(null,[v.types.moov,v.mvhd(y[0].timescale,y[0].duration)].concat(h).concat(v.mvex(y)))},v.mvex=function(y){for(var t=y.length,h=[];t--;)h[t]=v.trex(y[t]);return v.box.apply(null,[v.types.mvex].concat(h))},v.mvhd=function(y,t){t*=y;var h=Math.floor(t/(N+1)),i=Math.floor(t%(N+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,y>>24&255,y>>16&255,y>>8&255,y&255,h>>24,h>>16&255,h>>8&255,h&255,i>>24,i>>16&255,i>>8&255,i&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return v.box(v.types.mvhd,c)},v.sdtp=function(y){var t=y.samples||[],h=new Uint8Array(4+t.length),i,c;for(i=0;i<t.length;i++)c=t[i].flags,h[i+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return v.box(v.types.sdtp,h)},v.stbl=function(y){return v.box(v.types.stbl,v.stsd(y),v.box(v.types.stts,v.STTS),v.box(v.types.stsc,v.STSC),v.box(v.types.stsz,v.STSZ),v.box(v.types.stco,v.STCO))},v.avc1=function(y){var t=[],h=[],i,c,a;for(i=0;i<y.sps.length;i++)c=y.sps[i],a=c.byteLength,t.push(a>>>8&255),t.push(a&255),t=t.concat(Array.prototype.slice.call(c));for(i=0;i<y.pps.length;i++)c=y.pps[i],a=c.byteLength,h.push(a>>>8&255),h.push(a&255),h=h.concat(Array.prototype.slice.call(c));var n=v.box(v.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|y.sps.length].concat(t).concat([y.pps.length]).concat(h))),s=y.width,d=y.height,f=y.pixelRatio[0],l=y.pixelRatio[1];return v.box(v.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,d>>8&255,d&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,v.box(v.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),v.box(v.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,l>>24,l>>16&255,l>>8&255,l&255])))},v.esds=function(y){var t=y.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(y.config).concat([6,1,2]))},v.mp4a=function(y){var t=y.samplerate;return v.box(v.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,y.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),v.box(v.types.esds,v.esds(y)))},v.mp3=function(y){var t=y.samplerate;return v.box(v.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,y.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},v.stsd=function(y){return y.type==="audio"?!y.isAAC&&y.codec==="mp3"?v.box(v.types.stsd,v.STSD,v.mp3(y)):v.box(v.types.stsd,v.STSD,v.mp4a(y)):v.box(v.types.stsd,v.STSD,v.avc1(y))},v.tkhd=function(y){var t=y.id,h=y.duration*y.timescale,i=y.width,c=y.height,a=Math.floor(h/(N+1)),n=Math.floor(h%(N+1));return v.box(v.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,i&255,0,0,c>>8&255,c&255,0,0]))},v.traf=function(y,t){var h=v.sdtp(y),i=y.id,c=Math.floor(t/(N+1)),a=Math.floor(t%(N+1));return v.box(v.types.traf,v.box(v.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),v.box(v.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,a>>24,a>>16&255,a>>8&255,a&255])),v.trun(y,h.length+16+20+8+16+8+8),h)},v.trak=function(y){return y.duration=y.duration||4294967295,v.box(v.types.trak,v.tkhd(y),v.mdia(y))},v.trex=function(y){var t=y.id;return v.box(v.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]))},v.trun=function(y,t){var h=y.samples||[],i=h.length,c=12+16*i,a=new Uint8Array(c),n,s,d,f,l,o;for(t+=8+c,a.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),n=0;n<i;n++)s=h[n],d=s.duration,f=s.size,l=s.flags,o=s.cts,a.set([d>>>24&255,d>>>16&255,d>>>8&255,d&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,l.degradPrio&240<<8,l.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*n);return v.box(v.types.trun,a)},v.initSegment=function(y){v.types||v.init();var t=v.moov(y),h=new Uint8Array(v.FTYP.byteLength+t.byteLength);return h.set(v.FTYP),h.set(t,v.FTYP.byteLength),h},v}();m.types=void 0,m.HDLR_TYPES=void 0,m.STTS=void 0,m.STSC=void 0,m.STCO=void 0,m.STSZ=void 0,m.VMHD=void 0,m.SMHD=void 0,m.STSD=void 0,m.FTYP=void 0,m.DINF=void 0,g.default=m},"./src/remux/mp4-remuxer.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return o}),C.d(g,"normalizePts",function(){return r});var N=C("./src/polyfills/number.ts"),m=C("./src/remux/aac-helper.ts"),v=C("./src/remux/mp4-generator.ts"),T=C("./src/events.ts"),y=C("./src/errors.ts"),t=C("./src/utils/logger.ts"),h=C("./src/types/loader.ts"),i=C("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(I){for(var O=1;O<arguments.length;O++){var _=arguments[O];for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(I[E]=_[E])}return I},c.apply(this,arguments)}var a=10*1e3,n=1024,s=1152,d=null,f=null,l=!1,o=function(){function I(_,E,w,S){if(S===void 0&&(S=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=_,this.config=E,this.typeSupported=w,this.ISGenerated=!1,d===null){var F=navigator.userAgent||"",P=F.match(/Chrome\/(\d+)/i);d=P?parseInt(P[1]):0}if(f===null){var L=navigator.userAgent.match(/Safari\/(\d+)/i);f=L?parseInt(L[1]):0}l=!!d&&d<75||!!f&&f<600}var O=I.prototype;return O.destroy=function(){},O.resetTimeStamp=function(E){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},O.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(E){var w=!1,S=E.reduce(function(F,P){var L=P.pts-F;return L<-4294967296?(w=!0,r(F,P.pts)):L>0?F:P.pts},E[0].pts);return w&&t.logger.debug("PTS rollover detected"),S},O.remux=function(E,w,S,F,P,L,G,z){var A,B,U,R,K,Z,ue=P,de=P,Ce=E.pid>-1,Re=w.pid>-1,me=w.samples.length,Oe=E.samples.length>0,be=me>1,ce=(!Ce||Oe)&&(!Re||be)||this.ISGenerated||G;if(ce){this.ISGenerated||(U=this.generateIS(E,w,P));var le=this.isVideoContiguous,ne=-1;if(be&&(ne=x(w.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,ne>0){t.logger.warn("[mp4-remuxer]: Dropped "+ne+" out of "+me+" video samples due to a missing keyframe");var ge=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(ne),w.dropped+=ne,de+=(w.samples[0].pts-ge)/(w.timescale||9e4)}else ne===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+me+" video samples"),Z=!1);if(this.ISGenerated){if(Oe&&be){var te=this.getVideoStartPts(w.samples),re=r(E.samples[0].pts,te)-te,Se=re/w.inputTimeScale;ue+=Math.max(0,Se),de+=Math.max(0,-Se)}if(Oe){if(E.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(E,w,P)),B=this.remuxAudio(E,ue,this.isAudioContiguous,L,Re||be||z===h.PlaylistLevelType.AUDIO?de:void 0),be){var ie=B?B.endPTS-B.startPTS:0;w.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(E,w,P)),A=this.remuxVideo(w,de,le,ie)}}else be&&(A=this.remuxVideo(w,de,le,0));A&&(A.firstKeyFrame=ne,A.independent=ne!==-1)}}return this.ISGenerated&&(S.samples.length&&(K=this.remuxID3(S,P)),F.samples.length&&(R=this.remuxText(F,P))),{audio:B,video:A,initSegment:U,independent:Z,text:R,id3:K}},O.generateIS=function(E,w,S){var F=E.samples,P=w.samples,L=this.typeSupported,G={},z=!Object(N.isFiniteNumber)(this._initPTS),A="audio/mp4",B,U,R;if(z&&(B=U=Infinity),E.config&&F.length&&(E.timescale=E.samplerate,E.isAAC||(L.mpeg?(A="audio/mpeg",E.codec=""):L.mp3&&(E.codec="mp3")),G.audio={id:"audio",container:A,codec:E.codec,initSegment:!E.isAAC&&L.mpeg?new Uint8Array(0):v.default.initSegment([E]),metadata:{channelCount:E.channelCount}},z&&(R=E.inputTimeScale,B=U=F[0].pts-Math.round(R*S))),w.sps&&w.pps&&P.length&&(w.timescale=w.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:v.default.initSegment([w]),metadata:{width:w.width,height:w.height}},z)){R=w.inputTimeScale;var K=this.getVideoStartPts(P),Z=Math.round(R*S);U=Math.min(U,r(P[0].dts,K)-Z),B=Math.min(B,K-Z)}if(Object.keys(G).length)return this.ISGenerated=!0,z&&(this._initPTS=B,this._initDTS=U),{tracks:G,initPTS:B,timescale:R}},O.remuxVideo=function(E,w,S,F){var P=E.inputTimeScale,L=E.samples,G=[],z=L.length,A=this._initPTS,B=this.nextAvcDts,U=8,R,K,Z,ue=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Ce=0,Re=!1;if(!S||B===null){var me=w*P,Oe=L[0].pts-r(L[0].dts,L[0].pts);B=me-Oe}for(var be=0;be<z;be++){var ce=L[be];if(ce.pts=r(ce.pts-A,B),ce.dts=r(ce.dts-A,B),ce.dts>ce.pts){var le=9e4*.2;Ce=Math.max(Math.min(Ce,ce.pts-ce.dts),-1*le)}ce.dts<L[be>0?be-1:be].dts&&(Re=!0)}Re&&L.sort(function(lr,dr){var Ot=lr.dts-dr.dts,Vr=lr.pts-dr.pts;return Ot||Vr}),K=L[0].dts,Z=L[L.length-1].dts;var ne=Math.round((Z-K)/(z-1));if(Ce<0){if(Ce<ne*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-ne,!0)+" ms");for(var ge=Ce,te=0;te<z;te++)L[te].dts=ge=Math.max(ge,L[te].pts-ne),L[te].pts=Math.max(ge,L[te].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(Ce,!0)+" ms to overcome this issue");for(var re=0;re<z;re++)L[re].dts=L[re].dts+Ce}K=L[0].dts}if(S){var Se=K-B,ie=Se>ne,q=Se<-1;if(ie||q){ie?t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(Se,!0)+" ms ("+Se+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-Se,!0)+" ms ("+Se+"dts) overlapping between fragments detected"),K=B;var Y=L[0].pts-Se;L[0].dts=K,L[0].pts=Y,t.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(Y,!0)+"/"+Object(i.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(Se,!0)+" ms")}}l&&(K=Math.max(0,K));for(var X=0,he=0,fe=0;fe<z;fe++){for(var xe=L[fe],Ke=xe.units,Ze=Ke.length,et=0,st=0;st<Ze;st++)et+=Ke[st].data.length;he+=et,X+=Ze,xe.length=et,xe.dts=Math.max(xe.dts,K),xe.pts=Math.max(xe.pts,xe.dts,0),ue=Math.min(xe.pts,ue),de=Math.max(xe.pts,de)}Z=L[z-1].dts;var ut=he+4*X+8,dt;try{dt=new Uint8Array(ut)}catch(lr){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:y.ErrorTypes.MUX_ERROR,details:y.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ut,reason:"fail allocating video mdat "+ut});return}var Fe=new DataView(dt.buffer);Fe.setUint32(0,ut),dt.set(v.default.types.mdat,4);for(var Ie=0;Ie<z;Ie++){for(var ot=L[Ie],ft=ot.units,Qe=0,tt=0,Be=ft.length;tt<Be;tt++){var ke=ft[tt],Ne=ke.data,Ee=ke.data.byteLength;Fe.setUint32(U,Ee),U+=4,dt.set(Ne,U),U+=Ee,Qe+=4+Ee}if(Ie<z-1)R=L[Ie+1].dts-ot.dts;else{var Ae=this.config,Le=ot.dts-L[Ie>0?Ie-1:Ie].dts;if(Ae.stretchShortVideoTrack&&this.nextAudioPts!==null){var Me=Math.floor(Ae.maxBufferHole*P),He=(F?ue+F*P:this.nextAudioPts)-ot.pts;He>Me?(R=He-Le,R<0&&(R=Le),t.logger.log("[mp4-remuxer]: It is approximately "+He/90+" ms to the next segment; using duration "+R/90+" ms for the last video frame.")):R=Le}else R=Le}var nt=Math.round(ot.pts-ot.dts);G.push(new b(ot.key,R,Qe,nt))}if(G.length&&d&&d<70){var vt=G[0].flags;vt.dependsOn=2,vt.isNonSync=0}console.assert(R!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=B=Z+R,this.isVideoContiguous=!0;var bt=v.default.moof(E.sequenceNumber++,K,c({},E,{samples:G})),Wt="video",Bt={data1:bt,data2:dt,startPTS:ue/P,endPTS:(de+R)/P,startDTS:K/P,endDTS:B/P,type:Wt,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(dt.length,"MDAT length must not be zero"),Bt},O.remuxAudio=function(E,w,S,F,P){var L=E.inputTimeScale,G=E.samplerate?E.samplerate:L,z=L/G,A=E.isAAC?n:s,B=A*z,U=this._initPTS,R=!E.isAAC&&this.typeSupported.mpeg,K=[],Z=E.samples,ue=R?0:8,de=this.nextAudioPts||-1,Ce=w*L;if(this.isAudioContiguous=S=S||Z.length&&de>0&&(F&&Math.abs(Ce-de)<9e3||Math.abs(r(Z[0].pts-U,Ce)-de)<20*B),Z.forEach(function(Ne){Ne.pts=r(Ne.pts-U,Ce)}),!S||de<0){if(Z=Z.filter(function(Ne){return Ne.pts>=0}),!Z.length)return;P===0?de=0:F?de=Math.max(0,Ce):de=Z[0].pts}if(E.isAAC)for(var Re=P!==void 0,me=this.config.maxAudioFramesDrift,Oe=0,be=de;Oe<Z.length;Oe++){var ce=Z[Oe],le=ce.pts,ne=le-be,ge=Math.abs(1e3*ne/L);if(ne<=-me*B&&Re)Oe===0&&(t.logger.warn("Audio frame @ "+(le/L).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ne/L)+" ms."),this.nextAudioPts=de=be=le);else if(ne>=me*B&&ge<a&&Re){var te=Math.round(ne/B);be=le-te*B,be<0&&(te--,be+=B),Oe===0&&(this.nextAudioPts=de=be),t.logger.warn("[mp4-remuxer]: Injecting "+te+" audio frame @ "+(be/L).toFixed(3)+"s due to "+Math.round(1e3*ne/L)+" ms gap.");for(var re=0;re<te;re++){var Se=Math.max(be,0),ie=m.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);ie||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=ce.unit.subarray()),Z.splice(Oe,0,{unit:ie,pts:Se}),be+=B,Oe++}}ce.pts=be,be+=B}for(var q=null,Y=null,X,he=0,fe=Z.length;fe--;)he+=Z[fe].unit.byteLength;for(var xe=0,Ke=Z.length;xe<Ke;xe++){var Ze=Z[xe],et=Ze.unit,st=Ze.pts;if(Y!==null){var ut=K[xe-1];ut.duration=Math.round((st-Y)/z)}else if(S&&E.isAAC&&(st=de),q=st,he>0){he+=ue;try{X=new Uint8Array(he)}catch(Ne){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:y.ErrorTypes.MUX_ERROR,details:y.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:he,reason:"fail allocating audio mdat "+he});return}if(!R){var dt=new DataView(X.buffer);dt.setUint32(0,he),X.set(v.default.types.mdat,4)}}else return;X.set(et,ue);var Fe=et.byteLength;ue+=Fe,K.push(new b(!0,A,Fe,0)),Y=st}var Ie=K.length;if(!Ie)return;var ot=K[K.length-1];this.nextAudioPts=de=Y+z*ot.duration;var ft=R?new Uint8Array(0):v.default.moof(E.sequenceNumber++,q/z,c({},E,{samples:K}));E.samples=[];var Qe=q/L,tt=de/L,Be="audio",ke={data1:ft,data2:X,startPTS:Qe,endPTS:tt,startDTS:Qe,endDTS:tt,type:Be,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(X.length,"MDAT length must not be zero"),ke},O.remuxEmptyAudio=function(E,w,S,F){var P=E.inputTimeScale,L=E.samplerate?E.samplerate:P,G=P/L,z=this.nextAudioPts,A=(z!==null?z:F.startDTS*P)+this._initDTS,B=F.endDTS*P+this._initDTS,U=G*n,R=Math.ceil((B-A)/U),K=m.default.getSilentFrame(E.manifestCodec||E.codec,E.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 Z=[],ue=0;ue<R;ue++){var de=A+ue*U;Z.push({unit:K,pts:de,dts:de})}return E.samples=Z,this.remuxAudio(E,w,S,!1)},O.remuxID3=function(E,w){var S=E.samples.length;if(!S)return;for(var F=E.inputTimeScale,P=this._initPTS,L=this._initDTS,G=0;G<S;G++){var z=E.samples[G];z.pts=r(z.pts-P,w*F)/F,z.dts=r(z.dts-L,w*F)/F}var A=E.samples;return E.samples=[],{samples:A}},O.remuxText=function(E,w){var S=E.samples.length;if(!S)return;for(var F=E.inputTimeScale,P=this._initPTS,L=0;L<S;L++){var G=E.samples[L];G.pts=r(G.pts-P,w*F)/F}E.samples.sort(function(A,B){return A.pts-B.pts});var z=E.samples;return E.samples=[],{samples:z}},I}();function r(I,O){var _;if(O===null)return I;for(O<I?_=-8589934592:_=8589934592;Math.abs(I-O)>4294967296;)I+=_;return I}function x(I){for(var O=0;O<I.length;O++)if(I[O].key)return O;return-1}var b=function(O,_,E,w){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=_,this.size=E,this.cts=w,this.flags=new p(O)},p=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/polyfills/number.ts"),m=C("./src/utils/mp4-tools.ts"),v=C("./src/loader/fragment.ts"),T=C("./src/utils/logger.ts"),y=function(){function i(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var c=i.prototype;return c.destroy=function(){},c.resetTimeStamp=function(n){this.initPTS=n,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(n,s,d){this.audioCodec=s,this.videoCodec=d,this.generateInitSegment(n),this.emitInitSegment=!0},c.generateInitSegment=function(n){var s=this.audioCodec,d=this.videoCodec;if(!n||!n.byteLength){this.initTracks=void 0,this.initData=void 0;return}var f=this.initData=Object(m.parseInitSegment)(n);s||(s=h(f.audio,v.ElementaryStreamTypes.AUDIO)),d||(d=h(f.video,v.ElementaryStreamTypes.VIDEO));var l={};f.audio&&f.video?l.audiovideo={container:"video/mp4",codec:s+","+d,initSegment:n,id:"main"}:f.audio?l.audio={container:"audio/mp4",codec:s,initSegment:n,id:"audio"}:f.video?l.video={container:"video/mp4",codec:d,initSegment:n,id:"main"}:T.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=l},c.remux=function(n,s,d,f,l){var o=this.initPTS,r=this.lastEndDTS,x={audio:void 0,video:void 0,text:f,id3:d,initSegment:void 0};Object(N.isFiniteNumber)(r)||(r=this.lastEndDTS=l||0);var b=s.samples;if(!b||!b.length)return x;var p={initPTS:void 0,timescale:1},I=this.initData;if((!I||!I.length)&&(this.generateInitSegment(b),I=this.initData),!I||!I.length)return T.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),x;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(N.isFiniteNumber)(o)||(this.initPTS=p.initPTS=o=t(I,b,r));var O=Object(m.getDuration)(b,I),_=r,E=O+_;Object(m.offsetStartDTS)(I,b,o),O>0?this.lastEndDTS=E:(T.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!I.audio,S=!!I.video,F="";w&&(F+="audio"),S&&(F+="video");var P={data1:b,startPTS:_,startDTS:_,endPTS:E,endDTS:E,type:F,hasAudio:w,hasVideo:S,nb:1,dropped:0};return x.audio=P.type==="audio"?P:void 0,x.video=P.type!=="audio"?P:void 0,x.text=f,x.id3=d,x.initSegment=p,x},i}(),t=function(c,a,n){return Object(m.getStartDTS)(c,a)-n};function h(i,c){var a=i==null?void 0:i.codec;return a&&a.length>4?a:a==="hvc1"?"hvc1.1.c.L120.90":a==="av01"?"av01.0.04M.08":a==="avc1"||c===v.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=y},"./src/task-loop.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return N});var N=function(){function m(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var v=m.prototype;return v.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},v.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},v.onHandlerDestroyed=function(){},v.hasInterval=function(){return!!this._tickInterval},v.hasNextTick=function(){return!!this._tickTimer},v.setInterval=function(y){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,y),!0)},v.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},v.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},v.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},v.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},v.doTick=function(){},m}()},"./src/types/cmcd.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"CMCDVersion",function(){return N}),C.d(g,"CMCDObjectType",function(){return m}),C.d(g,"CMCDStreamingFormat",function(){return v}),C.d(g,"CMCDStreamType",function(){return T});var N=1,m;(function(y){y.MANIFEST="m",y.AUDIO="a",y.VIDEO="v",y.MUXED="av",y.INIT="i",y.CAPTION="c",y.TIMED_TEXT="tt",y.KEY="k",y.OTHER="o"})(m||(m={}));var v;(function(y){y.DASH="d",y.HLS="h",y.SMOOTH="s",y.OTHER="o"})(v||(v={}));var T;(function(y){y.VOD="v",y.LIVE="l"})(T||(T={}))},"./src/types/level.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"HlsSkip",function(){return v}),C.d(g,"getSkipValue",function(){return T}),C.d(g,"HlsUrlParameters",function(){return y}),C.d(g,"Level",function(){return t});function N(h,i){for(var c=0;c<i.length;c++){var a=i[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(h,a.key,a)}}function m(h,i,c){return i&&N(h.prototype,i),c&&N(h,c),h}var v;(function(h){h.No="",h.Yes="YES",h.v2="v2"})(v||(v={}));function T(h,i){var c=h.canSkipUntil,a=h.canSkipDateRanges,n=h.endSN,s=i!==void 0?i-n:0;return c&&s<c?a?v.v2:v.Yes:v.No}var y=function(){function h(c,a,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=a,this.skip=n}var i=h.prototype;return i.addDirectives=function(a){var n=new self.URL(a);return this.msn!==void 0&&n.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&n.searchParams.set("_HLS_part",this.part.toString()),this.skip&&n.searchParams.set("_HLS_skip",this.skip),n.toString()},h}(),t=function(){function h(i){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return m(h,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(c){var a=c%this.url.length;this._urlId!==a&&(this.details=void 0,this._urlId=a)}}]),h}()},"./src/types/loader.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"PlaylistContextType",function(){return N}),C.d(g,"PlaylistLevelType",function(){return m});var N;(function(v){v.MANIFEST="manifest",v.LEVEL="level",v.AUDIO_TRACK="audioTrack",v.SUBTITLE_TRACK="subtitleTrack"})(N||(N={}));var m;(function(v){v.MAIN="main",v.AUDIO="audio",v.SUBTITLE="subtitle"})(m||(m={}))},"./src/types/transmuxer.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"ChunkMetadata",function(){return N});var N=function(T,y,t,h,i,c){h===void 0&&(h=0),i===void 0&&(i=-1),c===void 0&&(c=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=m(),this.buffering={audio:m(),video:m(),audiovideo:m()},this.level=T,this.sn=y,this.id=t,this.size=h,this.part=i,this.partial=c};function m(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"AttrList",function(){return v});var N=/^(\d+)x(\d+)$/,m=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,v=function(){function T(t){typeof t=="string"&&(t=T.parseAttrList(t));for(var h in t)t.hasOwnProperty(h)&&(this[h]=t[h])}var y=T.prototype;return y.decimalInteger=function(h){var i=parseInt(this[h],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},y.hexadecimalInteger=function(h){if(this[h]){var i=(this[h]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var c=new Uint8Array(i.length/2),a=0;a<i.length/2;a++)c[a]=parseInt(i.slice(a*2,a*2+2),16);return c}else return null},y.hexadecimalIntegerAsNumber=function(h){var i=parseInt(this[h],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},y.decimalFloatingPoint=function(h){return parseFloat(this[h])},y.optionalFloat=function(h,i){var c=this[h];return c?parseFloat(c):i},y.enumeratedString=function(h){return this[h]},y.bool=function(h){return this[h]==="YES"},y.decimalResolution=function(h){var i=N.exec(this[h]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},T.parseAttrList=function(h){var i,c={},a='"';for(m.lastIndex=0;(i=m.exec(h))!==null;){var n=i[2];n.indexOf(a)===0&&n.lastIndexOf(a)===n.length-1&&(n=n.slice(1,-1)),c[i[1]]=n}return c},T}()},"./src/utils/binary-search.ts":function(M,g,C){"use strict";C.r(g);var N={search:function(v,T){for(var y=0,t=v.length-1,h=null,i=null;y<=t;){h=(y+t)/2|0,i=v[h];var c=T(i);if(c>0)y=h+1;else if(c<0)t=h-1;else return i}return null}};g.default=N},"./src/utils/buffer-helper.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"BufferHelper",function(){return v});var N=C("./src/utils/logger.ts"),m={length:0,start:function(){return 0},end:function(){return 0}},v=function(){function T(){}return T.isBuffered=function(t,h){try{if(t){for(var i=T.getBuffered(t),c=0;c<i.length;c++)if(h>=i.start(c)&&h<=i.end(c))return!0}}catch(a){}return!1},T.bufferInfo=function(t,h,i){try{if(t){var c=T.getBuffered(t),a=[],n;for(n=0;n<c.length;n++)a.push({start:c.start(n),end:c.end(n)});return this.bufferedInfo(a,h,i)}}catch(s){}return{len:0,start:h,end:h,nextStart:void 0}},T.bufferedInfo=function(t,h,i){h=Math.max(0,h),t.sort(function(p,I){var O=p.start-I.start;return O||I.end-p.end});var c=[];if(i)for(var a=0;a<t.length;a++){var n=c.length;if(n){var s=c[n-1].end;t[a].start-s<i?t[a].end>s&&(c[n-1].end=t[a].end):c.push(t[a])}else c.push(t[a])}else c=t;for(var d=0,f,l=h,o=h,r=0;r<c.length;r++){var x=c[r].start,b=c[r].end;if(h+i>=x&&h<b)l=x,o=b,d=o-h;else if(h+i<x){f=x;break}}return{len:d,start:l||0,end:o||0,nextStart:f}},T.getBuffered=function(t){try{return t.buffered}catch(h){return N.logger.log("failed to get media.buffered",h),m}},T}()},"./src/utils/cea-608-parser.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"Row",function(){return o}),C.d(g,"CaptionScreen",function(){return r});var N=C("./src/utils/logger.ts"),m={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},v=function(E){var w=E;return m.hasOwnProperty(E)&&(w=m[E]),String.fromCharCode(w)},T=15,y=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},h={17:2,18:4,21:6,22:8,23:10,19:13,20:15},i={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},a=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],n;(function(_){_[_.ERROR=0]="ERROR",_[_.TEXT=1]="TEXT",_[_.WARNING=2]="WARNING",_[_.INFO=2]="INFO",_[_.DEBUG=3]="DEBUG",_[_.DATA=3]="DATA"})(n||(n={}));var s=function(){function _(){this.time=null,this.verboseLevel=n.ERROR}var E=_.prototype;return E.log=function(S,F){this.verboseLevel>=S&&N.logger.log(this.time+" ["+S+"] "+F)},_}(),d=function(E){for(var w=[],S=0;S<E.length;S++)w.push(E[S].toString(16));return w},f=function(){function _(w,S,F,P,L){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=w||"white",this.underline=S||!1,this.italics=F||!1,this.background=P||"black",this.flash=L||!1}var E=_.prototype;return E.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},E.setStyles=function(S){for(var F=["foreground","underline","italics","background","flash"],P=0;P<F.length;P++){var L=F[P];S.hasOwnProperty(L)&&(this[L]=S[L])}},E.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},E.equals=function(S){return this.foreground===S.foreground&&this.underline===S.underline&&this.italics===S.italics&&this.background===S.background&&this.flash===S.flash},E.copy=function(S){this.foreground=S.foreground,this.underline=S.underline,this.italics=S.italics,this.background=S.background,this.flash=S.flash},E.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},_}(),l=function(){function _(w,S,F,P,L,G){this.uchar=void 0,this.penState=void 0,this.uchar=w||" ",this.penState=new f(S,F,P,L,G)}var E=_.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(S,F){this.uchar=S,this.penState.copy(F)},E.setPenState=function(S){this.penState.copy(S)},E.equals=function(S){return this.uchar===S.uchar&&this.penState.equals(S.penState)},E.copy=function(S){this.uchar=S.uchar,this.penState.copy(S.penState)},E.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},_}(),o=function(){function _(w){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var S=0;S<y;S++)this.chars.push(new l);this.logger=w,this.pos=0,this.currPenState=new f}var E=_.prototype;return E.equals=function(S){for(var F=!0,P=0;P<y;P++)if(!this.chars[P].equals(S.chars[P])){F=!1;break}return F},E.copy=function(S){for(var F=0;F<y;F++)this.chars[F].copy(S.chars[F])},E.isEmpty=function(){for(var S=!0,F=0;F<y;F++)if(!this.chars[F].isEmpty()){S=!1;break}return S},E.setCursor=function(S){this.pos!==S&&(this.pos=S),this.pos<0?(this.logger.log(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>y&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=y)},E.moveCursor=function(S){var F=this.pos+S;if(S>1)for(var P=this.pos+1;P<F+1;P++)this.chars[P].setPenState(this.currPenState);this.setCursor(F)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(S){S>=144&&this.backSpace();var F=v(S);if(this.pos>=y){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)},E.clearFromPos=function(S){var F;for(F=S;F<y;F++)this.chars[F].reset()},E.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},E.clearToEndOfRow=function(){this.clearFromPos(this.pos)},E.getTextString=function(){for(var S=[],F=!0,P=0;P<y;P++){var L=this.chars[P].uchar;L!==" "&&(F=!1),S.push(L)}return F?"":S.join("")},E.setPenStyles=function(S){this.currPenState.setStyles(S);var F=this.chars[this.pos];F.setPenState(this.currPenState)},_}(),r=function(){function _(w){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var S=0;S<T;S++)this.rows.push(new o(w));this.logger=w,this.currRow=T-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=_.prototype;return E.reset=function(){for(var S=0;S<T;S++)this.rows[S].clear();this.currRow=T-1},E.equals=function(S){for(var F=!0,P=0;P<T;P++)if(!this.rows[P].equals(S.rows[P])){F=!1;break}return F},E.copy=function(S){for(var F=0;F<T;F++)this.rows[F].copy(S.rows[F])},E.isEmpty=function(){for(var S=!0,F=0;F<T;F++)if(!this.rows[F].isEmpty()){S=!1;break}return S},E.backSpace=function(){var S=this.rows[this.currRow];S.backSpace()},E.clearToEndOfRow=function(){var S=this.rows[this.currRow];S.clearToEndOfRow()},E.insertChar=function(S){var F=this.rows[this.currRow];F.insertChar(S)},E.setPen=function(S){var F=this.rows[this.currRow];F.setPenStyles(S)},E.moveCursor=function(S){var F=this.rows[this.currRow];F.moveCursor(S)},E.setCursor=function(S){this.logger.log(n.INFO,"setCursor: "+S);var F=this.rows[this.currRow];F.setCursor(S)},E.setPAC=function(S){this.logger.log(n.INFO,"pacData = "+JSON.stringify(S));var F=S.row-1;if(this.nrRollUpRows&&F<this.nrRollUpRows-1&&(F=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==F){for(var P=0;P<T;P++)this.rows[P].clear();var L=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var z=G.rows[L].cueStartTime,A=this.logger.time;if(z&&A!==null&&z<A)for(var B=0;B<this.nrRollUpRows;B++)this.rows[F-this.nrRollUpRows+B+1].copy(G.rows[L+B])}}this.currRow=F;var U=this.rows[this.currRow];if(S.indent!==null){var R=S.indent,K=Math.max(R-1,0);U.setCursor(S.indent),S.color=U.chars[K].penState.foreground}var Z={foreground:S.color,underline:S.underline,italics:S.italics,background:"black",flash:!1};this.setPen(Z)},E.setBkgData=function(S){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(S)),this.backSpace(),this.setPen(S),this.insertChar(32)},E.setRollUpRows=function(S){this.nrRollUpRows=S},E.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(n.TEXT,this.getDisplayText());var S=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(S,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(n.INFO,"Rolling up")},E.getDisplayText=function(S){S=S||!1;for(var F=[],P="",L=-1,G=0;G<T;G++){var z=this.rows[G].getTextString();z&&(L=G+1,S?F.push("Row "+L+": '"+z+"'"):F.push(z.trim()))}return F.length>0&&(S?P="["+F.join(" | ")+"]":P=F.join(`
`)),P},E.getTextAndFormat=function(){return this.rows},_}(),x=function(){function _(w,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=w,this.outputFilter=S,this.mode=null,this.verbose=0,this.displayedMemory=new r(F),this.nonDisplayedMemory=new r(F),this.lastOutputScreen=new r(F),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var E=_.prototype;return E.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},E.getHandler=function(){return this.outputFilter},E.setHandler=function(S){this.outputFilter=S},E.setPAC=function(S){this.writeScreen.setPAC(S)},E.setBkgData=function(S){this.writeScreen.setBkgData(S)},E.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},E.insertChars=function(S){for(var F=0;F<S.length;F++)this.writeScreen.insertChar(S[F]);var P=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,P+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(n.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(S){this.logger.log(n.INFO,"RU("+S+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(S)},E.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var S=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=S,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(S){this.logger.log(n.INFO,"TO("+S+") - Tab Offset"),this.writeScreen.moveCursor(S)},E.ccMIDROW=function(S){var F={flash:!1};if(F.underline=S%2===1,F.italics=S>=46,F.italics)F.foreground="white";else{var P=Math.floor(S/2)-16,L=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=L[P]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},E.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))},E.cueSplitAtTime=function(S){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,S,this.displayedMemory),this.cueStartTime=S))},_}(),b=function(){function _(w,S,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var P=new s;this.channels=[null,new x(w,S,P),new x(w+1,F,P)],this.cmdHistory=O(),this.logger=P}var E=_.prototype;return E.getHandler=function(S){return this.channels[S].getHandler()},E.setHandler=function(S,F){this.channels[S].setHandler(F)},E.addData=function(S,F){var P,L,G,z=!1;this.logger.time=S;for(var A=0;A<F.length;A+=2){if(L=F[A]&127,G=F[A+1]&127,L===0&&G===0)continue;if(this.logger.log(n.DATA,"["+d([F[A],F[A+1]])+"] -> ("+d([L,G])+")"),P=this.parseCmd(L,G),P||(P=this.parseMidrow(L,G)),P||(P=this.parsePAC(L,G)),P||(P=this.parseBackgroundAttributes(L,G)),!P&&(z=this.parseChars(L,G),z)){var B=this.currentChannel;if(B&&B>0){var U=this.channels[B];U.insertChars(z)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!P&&!z&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+d([L,G])+" orig: "+d([F[A],F[A+1]]))}},E.parseCmd=function(S,F){var P=this.cmdHistory,L=(S===20||S===28||S===21||S===29)&&F>=32&&F<=47,G=(S===23||S===31)&&F>=33&&F<=35;if(!(L||G))return!1;if(I(S,F,P))return p(null,null,P),this.logger.log(n.DEBUG,"Repeated command ("+d([S,F])+") is dropped"),!0;var z=S===20||S===21||S===23?1:2,A=this.channels[z];return S===20||S===21||S===28||S===29?F===32?A.ccRCL():F===33?A.ccBS():F===34?A.ccAOF():F===35?A.ccAON():F===36?A.ccDER():F===37?A.ccRU(2):F===38?A.ccRU(3):F===39?A.ccRU(4):F===40?A.ccFON():F===41?A.ccRDC():F===42?A.ccTR():F===43?A.ccRTD():F===44?A.ccEDM():F===45?A.ccCR():F===46?A.ccENM():F===47&&A.ccEOC():A.ccTO(F-32),p(S,F,P),this.currentChannel=z,!0},E.parseMidrow=function(S,F){var P=0;if((S===17||S===25)&&F>=32&&F<=47){if(S===17?P=1:P=2,P!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var L=this.channels[P];return L?(L.ccMIDROW(F),this.logger.log(n.DEBUG,"MIDROW ("+d([S,F])+")"),!0):!1}return!1},E.parsePAC=function(S,F){var P,L=this.cmdHistory,G=(S>=17&&S<=23||S>=25&&S<=31)&&F>=64&&F<=127,z=(S===16||S===24)&&F>=64&&F<=95;if(!(G||z))return!1;if(I(S,F,L))return p(null,null,L),!0;var A=S<=23?1:2;F>=64&&F<=95?P=A===1?t[S]:i[S]:P=A===1?h[S]:c[S];var B=this.channels[A];return B?(B.setPAC(this.interpretPAC(P,F)),p(S,F,L),this.currentChannel=A,!0):!1},E.interpretPAC=function(S,F){var P,L={color:null,italics:!1,indent:null,underline:!1,row:S};return F>95?P=F-96:P=F-64,L.underline=(P&1)===1,P<=13?L.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(P/2)]:P<=15?(L.italics=!0,L.color="white"):L.indent=Math.floor((P-16)/2)*4,L},E.parseChars=function(S,F){var P,L=null,G=null;if(S>=25?(P=2,G=S-8):(P=1,G=S),G>=17&&G<=19){var z;G===17?z=F+80:G===18?z=F+112:z=F+144,this.logger.log(n.INFO,"Special char '"+v(z)+"' in channel "+P),L=[z]}else S>=32&&S<=127&&(L=F===0?[S]:[S,F]);if(L){var A=d(L);this.logger.log(n.DEBUG,"Char codes = "+A.join(",")),p(S,F,this.cmdHistory)}return L},E.parseBackgroundAttributes=function(S,F){var P=(S===16||S===24)&&F>=32&&F<=47,L=(S===23||S===31)&&F>=45&&F<=47;if(!(P||L))return!1;var G,z={};S===16||S===24?(G=Math.floor((F-32)/2),z.background=a[G],F%2===1&&(z.background=z.background+"_semi")):F===45?z.background="transparent":(z.foreground="black",F===47&&(z.underline=!0));var A=S<=23?1:2,B=this.channels[A];return B.setBkgData(z),p(S,F,this.cmdHistory),!0},E.reset=function(){for(var S=0;S<Object.keys(this.channels).length;S++){var F=this.channels[S];F&&F.reset()}this.cmdHistory=O()},E.cueSplitAtTime=function(S){for(var F=0;F<this.channels.length;F++){var P=this.channels[F];P&&P.cueSplitAtTime(S)}},_}();function p(_,E,w){w.a=_,w.b=E}function I(_,E,w){return w.a===_&&w.b===E}function O(){return{a:null,b:null}}g.default=b},"./src/utils/codecs.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"isCodecType",function(){return m}),C.d(g,"isCodecSupportedInMp4",function(){return v});var N={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function m(T,y){var t=N[y];return!!t&&t[T.slice(0,4)]===!0}function v(T,y){return MediaSource.isTypeSupported((y||"video")+'/mp4;codecs="'+T+'"')}},"./src/utils/cues.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/utils/vttparser.ts"),m=C("./src/utils/webvtt-parser.ts"),v=C("./src/utils/texttrack-utils.ts"),T=/\s/,y={newCue:function(h,i,c,a){for(var n=[],s,d,f,l,o,r=self.VTTCue||self.TextTrackCue,x=0;x<a.rows.length;x++)if(s=a.rows[x],f=!0,l=0,o="",!s.isEmpty()){for(var b=0;b<s.chars.length;b++)T.test(s.chars[b].uchar)&&f?l++:(o+=s.chars[b].uchar,f=!1);s.cueStartTime=i,i===c&&(c+=1e-4),l>=16?l--:l++;var p=Object(N.fixLineBreaks)(o.trim()),I=Object(m.generateCueId)(i,c,p);(!h||!h.cues||!h.cues.getCueById(I))&&(d=new r(i,c,p),d.id=I,d.line=x+1,d.align="left",d.position=10+Math.min(80,Math.floor(l*8/32)*10),n.push(d))}return h&&n.length&&(n.sort(function(O,_){return O.line==="auto"||_.line==="auto"?0:O.line>8&&_.line>8?_.line-O.line:O.line-_.line}),n.forEach(function(O){return Object(v.addCueToTrack)(h,O)})),n}};g.default=y},"./src/utils/discontinuities.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"findFirstFragWithCC",function(){return T}),C.d(g,"shouldAlignOnDiscontinuities",function(){return y}),C.d(g,"findDiscontinuousReferenceFrag",function(){return t}),C.d(g,"adjustSlidingStart",function(){return i}),C.d(g,"alignStream",function(){return c}),C.d(g,"alignPDT",function(){return n}),C.d(g,"alignFragmentByPDTDelta",function(){return s}),C.d(g,"alignMediaPlaylistByPDT",function(){return d});var N=C("./src/polyfills/number.ts"),m=C("./src/utils/logger.ts"),v=C("./src/controller/level-helper.ts");function T(f,l){for(var o=null,r=0,x=f.length;r<x;r++){var b=f[r];if(b&&b.cc===l){o=b;break}}return o}function y(f,l,o){return!!(l.details&&(o.endCC>o.startCC||f&&f.cc<o.startCC))}function t(f,l){var o=f.fragments,r=l.fragments;if(!r.length||!o.length){m.logger.log("No fragments to align");return}var x=T(o,r[0].cc);if(!x||x&&!x.startPTS){m.logger.log("No frag in previous level to align on");return}return x}function h(f,l){if(f){var o=f.start+l;f.start=f.startPTS=o,f.endPTS=o+f.duration}}function i(f,l){for(var o=l.fragments,r=0,x=o.length;r<x;r++)h(o[r],f);l.fragmentHint&&h(l.fragmentHint,f),l.alignedSliding=!0}function c(f,l,o){if(!l)return;a(f,o,l),!o.alignedSliding&&l.details&&n(o,l.details),!o.alignedSliding&&l.details&&!o.skippedSegments&&Object(v.adjustSliding)(l.details,o)}function a(f,l,o){if(y(f,o,l)){var r=t(o.details,l);r&&Object(N.isFiniteNumber)(r.start)&&(m.logger.log("Adjusting PTS using last level due to CC increase within current level "+l.url),i(r.start,l))}}function n(f,l){if(!l.fragments.length||!f.hasProgramDateTime||!l.hasProgramDateTime)return;var o=l.fragments[0].programDateTime,r=f.fragments[0].programDateTime,x=(r-o)/1e3+l.fragments[0].start;x&&Object(N.isFiniteNumber)(x)&&(m.logger.log("Adjusting PTS using programDateTime delta "+(r-o)+"ms, sliding:"+x.toFixed(3)+" "+f.url+" "),i(x,f))}function s(f,l){var o=f.programDateTime;if(!o)return;var r=(o-l)/1e3;f.start=f.startPTS=r,f.endPTS=r+f.duration}function d(f,l){if(!l.fragments.length||!f.hasProgramDateTime||!l.hasProgramDateTime)return;var o=l.fragments[0].programDateTime,r=l.fragments[0].start,x=o-r*1e3;f.fragments.forEach(function(b){s(b,x)}),f.fragmentHint&&s(f.fragmentHint,x),f.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/utils/ewma.ts"),m=function(){function v(y,t,h){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=h,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new N.default(y),this.fast_=new N.default(t)}var T=v.prototype;return T.update=function(t,h){var i=this.slow_,c=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new N.default(t,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==h&&(this.fast_=new N.default(h,c.getEstimate(),c.getTotalWeight()))},T.sample=function(t,h){t=Math.max(t,this.minDelayMs_);var i=8*h,c=t/1e3,a=i/c;this.fast_.sample(c,a),this.slow_.sample(c,a)},T.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},T.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},T.destroy=function(){},v}();g.default=m},"./src/utils/ewma.ts":function(M,g,C){"use strict";C.r(g);var N=function(){function m(T,y,t){y===void 0&&(y=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_=y,this.totalWeight_=t}var v=m.prototype;return v.sample=function(y,t){var h=Math.pow(this.alpha_,y);this.estimate_=t*(1-h)+h*this.estimate_,this.totalWeight_+=y},v.getTotalWeight=function(){return this.totalWeight_},v.getEstimate=function(){if(this.alpha_){var y=1-Math.pow(this.alpha_,this.totalWeight_);if(y)return this.estimate_/y}return this.estimate_},m}();g.default=N},"./src/utils/fetch-loader.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"fetchSupported",function(){return s});var N=C("./src/polyfills/number.ts"),m=C("./src/loader/load-stats.ts"),v=C("./src/demux/chunk-cache.ts");function T(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,c(r,x)}function y(r){var x=typeof Map=="function"?new Map:void 0;return y=function(p){if(p===null||!i(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof x!="undefined"){if(x.has(p))return x.get(p);x.set(p,I)}function I(){return t(p,arguments,a(this).constructor)}return I.prototype=Object.create(p.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),c(I,p)},y(r)}function t(r,x,b){return h()?t=Reflect.construct:t=function(I,O,_){var E=[null];E.push.apply(E,O);var w=Function.bind.apply(I,E),S=new w;return _&&c(S,_.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(r){return!1}}function i(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function c(r,x){return c=Object.setPrototypeOf||function(p,I){return p.__proto__=I,p},c(r,x)}function a(r){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},a(r)}function n(){return n=Object.assign||function(r){for(var x=1;x<arguments.length;x++){var b=arguments[x];for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(r[p]=b[p])}return r},n.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(r){}return!1}var d=function(){function r(b){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=b.fetchSetup||l,this.controller=new self.AbortController,this.stats=new m.LoadStats}var x=r.prototype;return x.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},x.abortInternal=function(){var p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},x.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},x.load=function(p,I,O){var _=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var w=f(p,this.controller.signal),S=O.onProgress,F=p.responseType==="arraybuffer",P=F?"byteLength":"length";this.context=p,this.config=I,this.callbacks=O,this.request=this.fetchSetup(p,w),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){_.abortInternal(),O.onTimeout(E,p,_.response)},I.timeout),self.fetch(this.request).then(function(L){if(_.response=_.loader=L,!L.ok){var G=L.status,z=L.statusText;throw new o(z||"fetch, bad network response",G,L)}return E.loading.first=Math.max(self.performance.now(),E.loading.start),E.total=parseInt(L.headers.get("Content-Length")||"0"),S&&Object(N.isFiniteNumber)(I.highWaterMark)?_.loadProgressively(L,E,p,I.highWaterMark,S):F?L.arrayBuffer():L.text()}).then(function(L){var G=_.response;self.clearTimeout(_.requestTimeout),E.loading.end=Math.max(self.performance.now(),E.loading.first),E.loaded=E.total=L[P];var z={url:G.url,data:L};S&&!Object(N.isFiniteNumber)(I.highWaterMark)&&S(E,p,L,G),O.onSuccess(z,E,p,G)}).catch(function(L){if(self.clearTimeout(_.requestTimeout),E.aborted)return;var G=L.code||0;O.onError({code:G,text:L.message},p,L.details)})},x.getCacheAge=function(){var p=null;if(this.response){var I=this.response.headers.get("age");p=I?parseFloat(I):null}return p},x.loadProgressively=function(p,I,O,_,E){_===void 0&&(_=0);var w=new v.default,S=p.body.getReader(),F=function P(){return S.read().then(function(L){if(L.done)return w.dataLength&&E(I,O,w.flush(),p),Promise.resolve(new ArrayBuffer(0));var G=L.value,z=G.length;return I.loaded+=z,z<_||w.dataLength?(w.push(G),w.dataLength>=_&&E(I,O,w.flush(),p)):E(I,O,G,p),P()}).catch(function(){return Promise.reject()})};return F()},r}();function f(r,x){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:x,headers:new self.Headers(n({},r.headers))};return r.rangeEnd&&b.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),b}function l(r,x){return new self.Request(r.url,x)}var o=function(r){T(x,r);function x(b,p,I){var O;return O=r.call(this,b)||this,O.code=void 0,O.details=void 0,O.code=p,O.details=I,O}return x}(y(Error));g.default=d},"./src/utils/imsc1-ttml-parser.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"IMSC1_CODEC",function(){return i}),C.d(g,"parseIMSC1",function(){return s});var N=C("./src/utils/mp4-tools.ts"),m=C("./src/utils/vttparser.ts"),v=C("./src/utils/vttcue.ts"),T=C("./src/demux/id3.ts"),y=C("./src/utils/timescale-conversion.ts"),t=C("./src/utils/webvtt-parser.ts");function h(){return h=Object.assign||function(_){for(var E=1;E<arguments.length;E++){var w=arguments[E];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(_[S]=w[S])}return _},h.apply(this,arguments)}var i="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,a=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,n={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(_,E,w,S,F){var P=Object(N.findBox)(new Uint8Array(_),["mdat"]);if(P.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var L=P[0],G=Object(T.utf8ArrayToStr)(new Uint8Array(_,L.start,L.end-L.start)),z=Object(y.toTimescaleFromScale)(E,1,w);try{S(d(G,z))}catch(A){F(A)}}function d(_,E){var w=new DOMParser,S=w.parseFromString(_,"text/xml"),F=S.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var P={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},L=Object.keys(P).reduce(function(U,R){return U[R]=F.getAttribute("ttp:"+R)||P[R],U},{}),G=F.getAttribute("xml:space")!=="preserve",z=l(f(F,"styling","style")),A=l(f(F,"layout","region")),B=f(F,"body","[begin]");return[].map.call(B,function(U){var R=o(U,G);if(!R||!U.hasAttribute("begin"))return null;var K=p(U.getAttribute("begin"),L),Z=p(U.getAttribute("dur"),L),ue=p(U.getAttribute("end"),L);if(K===null)throw b(U);if(ue===null){if(Z===null)throw b(U);ue=K+Z}var de=new v.default(K-E,ue-E,R);de.id=Object(t.generateCueId)(de.startTime,de.endTime,de.text);var Ce=A[U.getAttribute("region")],Re=z[U.getAttribute("style")];de.position=10,de.size=80;var me=r(Ce,Re),Oe=me.textAlign;if(Oe){var be=n[Oe];be&&(de.lineAlign=be),de.align=Oe}return h(de,me),de}).filter(function(U){return U!==null})}function f(_,E,w){var S=_.getElementsByTagName(E)[0];return S?[].slice.call(S.querySelectorAll(w)):[]}function l(_){return _.reduce(function(E,w){var S=w.getAttribute("xml:id");return S&&(E[S]=w),E},{})}function o(_,E){return[].slice.call(_.childNodes).reduce(function(w,S,F){var P;return S.nodeName==="br"&&F?w+`
`:(P=S.childNodes)!==null&&P!==void 0&&P.length?o(S,E):E?w+S.textContent.trim().replace(/\s+/g," "):w+S.textContent},"")}function r(_,E){var w="http://www.w3.org/ns/ttml#styling",S=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return S.reduce(function(F,P){var L=x(E,w,P)||x(_,w,P);return L&&(F[P]=L),F},{})}function x(_,E,w){return _.hasAttributeNS(E,w)?_.getAttributeNS(E,w):null}function b(_){return new Error("Could not parse ttml timestamp "+_)}function p(_,E){if(!_)return null;var w=Object(m.parseTimeStamp)(_);return w===null&&(c.test(_)?w=I(_,E):a.test(_)&&(w=O(_,E))),w}function I(_,E){var w=c.exec(_),S=(w[4]|0)+(w[5]|0)/E.subFrameRate;return(w[1]|0)*3600+(w[2]|0)*60+(w[3]|0)+S/E.frameRate}function O(_,E){var w=a.exec(_),S=Number(w[1]),F=w[2];switch(F){case"h":return S*3600;case"m":return S*60;case"ms":return S*1e3;case"f":return S/E.frameRate;case"t":return S/E.tickRate}return S}},"./src/utils/logger.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"enableLogs",function(){return t}),C.d(g,"logger",function(){return h});var N=function(){},m={trace:N,debug:N,log:N,warn:N,info:N,error:N},v=m;function T(i){var c=self.console[i];return c?c.bind(self.console,"["+i+"] >"):N}function y(i){for(var c=arguments.length,a=new Array(c>1?c-1:0),n=1;n<c;n++)a[n-1]=arguments[n];a.forEach(function(s){v[s]=i[s]?i[s].bind(i):T(s)})}function t(i){if(self.console&&i===!0||typeof i=="object"){y(i,"debug","log","info","warn","error");try{v.log()}catch(c){v=m}}else v=m}var h=v},"./src/utils/mediakeys-helper.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"KeySystems",function(){return N}),C.d(g,"requestMediaKeySystemAccess",function(){return m});var N;(function(v){v.WIDEVINE="com.widevine.alpha",v.PLAYREADY="com.microsoft.playready"})(N||(N={}));var m=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"getMediaSource",function(){return N});function N(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"bin2str",function(){return y}),C.d(g,"readUint16",function(){return t}),C.d(g,"readUint32",function(){return h}),C.d(g,"writeUint32",function(){return i}),C.d(g,"findBox",function(){return c}),C.d(g,"parseSegmentIndex",function(){return a}),C.d(g,"parseInitSegment",function(){return n}),C.d(g,"getStartDTS",function(){return s}),C.d(g,"getDuration",function(){return d}),C.d(g,"computeRawDurationFromSamples",function(){return f}),C.d(g,"offsetStartDTS",function(){return l}),C.d(g,"segmentValidRange",function(){return o}),C.d(g,"appendUint8Array",function(){return r});var N=C("./src/utils/typed-array.ts"),m=C("./src/loader/fragment.ts"),v=Math.pow(2,32)-1,T=[].push;function y(x){return String.fromCharCode.apply(null,x)}function t(x,b){"data"in x&&(b+=x.start,x=x.data);var p=x[b]<<8|x[b+1];return p<0?65536+p:p}function h(x,b){"data"in x&&(b+=x.start,x=x.data);var p=x[b]<<24|x[b+1]<<16|x[b+2]<<8|x[b+3];return p<0?4294967296+p:p}function i(x,b,p){"data"in x&&(b+=x.start,x=x.data),x[b]=p>>24,x[b+1]=p>>16&255,x[b+2]=p>>8&255,x[b+3]=p&255}function c(x,b){var p=[];if(!b.length)return p;var I,O,_;"data"in x?(I=x.data,O=x.start,_=x.end):(I=x,O=0,_=I.byteLength);for(var E=O;E<_;){var w=h(I,E),S=y(I.subarray(E+4,E+8)),F=w>1?E+w:_;if(S===b[0])if(b.length===1)p.push({data:I,start:E+8,end:F});else{var P=c({data:I,start:E+8,end:F},b.slice(1));P.length&&T.apply(p,P)}E=F}return p}function a(x){var b=c(x,["moov"]),p=b[0],I=p?p.end:null,O=c(x,["sidx"]);if(!O||!O[0])return null;var _=[],E=O[0],w=E.data[0],S=w===0?8:16,F=h(E,S);S+=4;var P=0,L=0;w===0?S+=8:S+=16,S+=2;var G=E.end+L,z=t(E,S);S+=2;for(var A=0;A<z;A++){var B=S,U=h(E,B);B+=4;var R=U&2147483647,K=(U&2147483648)>>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=h(E,B);B+=4,_.push({referenceSize:R,subsegmentDuration:Z,info:{duration:Z/F,start:G,end:G+R-1}}),G+=R,B+=4,S=B}return{earliestPresentationTime:P,timescale:F,version:w,referencesCount:z,references:_,moovEndOffset:I}}function n(x){for(var b=[],p=c(x,["moov","trak"]),I=0;I<p.length;I++){var O=p[I],_=c(O,["tkhd"])[0];if(_){var E=_.data[_.start],w=E===0?12:20,S=h(_,w),F=c(O,["mdia","mdhd"])[0];if(F){E=F.data[F.start],w=E===0?12:20;var P=h(F,w),L=c(O,["mdia","hdlr"])[0];if(L){var G=y(L.data.subarray(L.start+8,L.start+12)),z={soun:m.ElementaryStreamTypes.AUDIO,vide:m.ElementaryStreamTypes.VIDEO}[G];if(z){var A=c(O,["mdia","minf","stbl","stsd"])[0],B=void 0;A&&(B=y(A.data.subarray(A.start+12,A.start+16))),b[S]={timescale:P,type:z},b[z]={timescale:P,id:S,codec:B}}}}}}var U=c(x,["moov","mvex","trex"]);return U.forEach(function(R){var K=h(R,4),Z=b[K];Z&&(Z.default={duration:h(R,12),flags:h(R,20)})}),b}function s(x,b){return c(b,["moof","traf"]).reduce(function(p,I){var O=c(I,["tfdt"])[0],_=O.data[O.start],E=c(I,["tfhd"]).reduce(function(w,S){var F=h(S,4),P=x[F];if(P){var L=h(O,4);_===1&&(L*=Math.pow(2,32),L+=h(O,8));var G=P.timescale||9e4,z=L/G;if(isFinite(z)&&(w===null||z<w))return z}return w},null);return E!==null&&isFinite(E)&&(p===null||E<p)?E:p},null)||0}function d(x,b){for(var p=0,I=0,O=0,_=c(x,["moof","traf"]),E=0;E<_.length;E++){var w=_[E],S=c(w,["tfhd"])[0],F=h(S,4),P=b[F];if(!P)continue;var L=P.default,G=h(S,0)|(L==null?void 0:L.flags),z=L==null?void 0:L.duration;G&8&&(G&2?z=h(S,12):z=h(S,8));for(var A=P.timescale||9e4,B=c(w,["trun"]),U=0;U<B.length;U++){if(z){var R=h(B[U],4);p=z*R}else p=f(B[U]);P.type===m.ElementaryStreamTypes.VIDEO?I+=p/A:P.type===m.ElementaryStreamTypes.AUDIO&&(O+=p/A)}}if(I===0&&O===0){var K=a(x);if(K!=null&&K.references)return K.references.reduce(function(Z,ue){return Z+ue.info.duration||0},0)}return I||O}function f(x){var b=h(x,0),p=8;b&1&&(p+=4),b&4&&(p+=4);for(var I=0,O=h(x,4),_=0;_<O;_++){if(b&256){var E=h(x,p);I+=E,p+=4}b&512&&(p+=4),b&1024&&(p+=4),b&2048&&(p+=4)}return I}function l(x,b,p){c(b,["moof","traf"]).forEach(function(I){c(I,["tfhd"]).forEach(function(O){var _=h(O,4),E=x[_];if(!E)return;var w=E.timescale||9e4;c(I,["tfdt"]).forEach(function(S){var F=S.data[S.start],P=h(S,4);if(F===0)i(S,4,P-p*w);else{P*=Math.pow(2,32),P+=h(S,8),P-=p*w,P=Math.max(P,0);var L=Math.floor(P/(v+1)),G=Math.floor(P%(v+1));i(S,4,L),i(S,8,G)}})})})}function o(x){var b={valid:null,remainder:null},p=c(x,["moof"]);if(p){if(p.length<2)return b.remainder=x,b}else return b;var I=p[p.length-1];return b.valid=Object(N.sliceUint8)(x,0,I.start-8),b.remainder=Object(N.sliceUint8)(x,I.start-8),b}function r(x,b){var p=new Uint8Array(x.length+b.length);return p.set(x),p.set(b,x.length),p}},"./src/utils/output-filter.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"default",function(){return N});var N=function(){function m(T,y){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=T,this.trackName=y}var v=m.prototype;return v.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},v.newCue=function(y,t,h){(this.startTime===null||this.startTime>y)&&(this.startTime=y),this.endTime=t,this.screen=h,this.timelineController.createCaptionsTrack(this.trackName)},v.reset=function(){this.cueRanges=[]},m}()},"./src/utils/texttrack-utils.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"sendAddTrackEvent",function(){return m}),C.d(g,"addCueToTrack",function(){return v}),C.d(g,"clearCurrentCues",function(){return T}),C.d(g,"removeCuesInRange",function(){return y}),C.d(g,"getCuesInRange",function(){return h});var N=C("./src/utils/logger.ts");function m(i,c){var a;try{a=new Event("addtrack")}catch(n){a=document.createEvent("Event"),a.initEvent("addtrack",!1,!1)}a.track=i,c.dispatchEvent(a)}function v(i,c){var a=i.mode;if(a==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(c.id))try{if(i.addCue(c),!i.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(s){N.logger.debug("[texttrack-utils]: "+s);var n=new self.TextTrackCue(c.startTime,c.endTime,c.text);n.id=c.id,i.addCue(n)}a==="disabled"&&(i.mode=a)}function T(i){var c=i.mode;if(c==="disabled"&&(i.mode="hidden"),i.cues)for(var a=i.cues.length;a--;)i.removeCue(i.cues[a]);c==="disabled"&&(i.mode=c)}function y(i,c,a){var n=i.mode;if(n==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var s=h(i.cues,c,a),d=0;d<s.length;d++)i.removeCue(s[d]);n==="disabled"&&(i.mode=n)}function t(i,c){if(c<i[0].startTime)return 0;var a=i.length-1;if(c>i[a].endTime)return-1;for(var n=0,s=a;n<=s;){var d=Math.floor((s+n)/2);if(c<i[d].startTime)s=d-1;else if(c>i[d].startTime&&n<a)n=d+1;else return d}return i[n].startTime-c<c-i[s].startTime?n:s}function h(i,c,a){var n=[],s=t(i,c);if(s>-1)for(var d=s,f=i.length;d<f;d++){var l=i[d];if(l.startTime>=c&&l.endTime<=a)n.push(l);else if(l.startTime>a)return n}return n}},"./src/utils/time-ranges.ts":function(M,g,C){"use strict";C.r(g);var N={toString:function(v){for(var T="",y=v.length,t=0;t<y;t++)T+="["+v.start(t).toFixed(3)+","+v.end(t).toFixed(3)+"]";return T}};g.default=N},"./src/utils/timescale-conversion.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"toTimescaleFromBase",function(){return m}),C.d(g,"toTimescaleFromScale",function(){return v}),C.d(g,"toMsFromMpegTsClock",function(){return T}),C.d(g,"toMpegTsClockFromTimescale",function(){return y});var N=9e4;function m(t,h,i,c){i===void 0&&(i=1),c===void 0&&(c=!1);var a=t*h*i;return c?Math.round(a):a}function v(t,h,i,c){return i===void 0&&(i=1),c===void 0&&(c=!1),m(t,h,1/i,c)}function T(t,h){return h===void 0&&(h=!1),m(t,1e3,1/N,h)}function y(t,h){return h===void 0&&(h=1),m(t,N,1/h)}},"./src/utils/typed-array.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"sliceUint8",function(){return N});function N(m,v,T){return Uint8Array.prototype.slice?m.slice(v,T):new Uint8Array(Array.prototype.slice.call(m,v,T))}},"./src/utils/vttcue.ts":function(M,g,C){"use strict";C.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var N=["","lr","rl"],m=["start","middle","end","left","right"];function v(i,c){if(typeof c!="string")return!1;if(!Array.isArray(i))return!1;var a=c.toLowerCase();return~i.indexOf(a)?a:!1}function T(i){return v(N,i)}function y(i){return v(m,i)}function t(i){for(var c=arguments.length,a=new Array(c>1?c-1:0),n=1;n<c;n++)a[n-1]=arguments[n];for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var f in d)i[f]=d[f]}return i}function h(i,c,a){var n=this,s={enumerable:!0};n.hasBeenReset=!1;var d="",f=!1,l=i,o=c,r=a,x=null,b="",p=!0,I="auto",O="start",_=50,E="middle",w=50,S="middle";Object.defineProperty(n,"id",t({},s,{get:function(){return d},set:function(P){d=""+P}})),Object.defineProperty(n,"pauseOnExit",t({},s,{get:function(){return f},set:function(P){f=!!P}})),Object.defineProperty(n,"startTime",t({},s,{get:function(){return l},set:function(P){if(typeof P!="number")throw new TypeError("Start time must be set to a number.");l=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",t({},s,{get:function(){return o},set:function(P){if(typeof P!="number")throw new TypeError("End time must be set to a number.");o=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",t({},s,{get:function(){return r},set:function(P){r=""+P,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",t({},s,{get:function(){return x},set:function(P){x=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",t({},s,{get:function(){return b},set:function(P){var L=T(P);if(L===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=L,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",t({},s,{get:function(){return p},set:function(P){p=!!P,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",t({},s,{get:function(){return I},set:function(P){if(typeof P!="number"&&P!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");I=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",t({},s,{get:function(){return O},set:function(P){var L=y(P);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");O=L,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",t({},s,{get:function(){return _},set:function(P){if(P<0||P>100)throw new Error("Position must be between 0 and 100.");_=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",t({},s,{get:function(){return E},set:function(P){var L=y(P);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");E=L,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",t({},s,{get:function(){return w},set:function(P){if(P<0||P>100)throw new Error("Size must be between 0 and 100.");w=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",t({},s,{get:function(){return S},set:function(P){var L=y(P);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");S=L,this.hasBeenReset=!0}})),n.displayState=void 0}return h.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},h}()},"./src/utils/vttparser.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"parseTimeStamp",function(){return v}),C.d(g,"fixLineBreaks",function(){return c}),C.d(g,"VTTParser",function(){return a});var N=C("./src/utils/vttcue.ts"),m=function(){function n(){}var s=n.prototype;return s.decode=function(f,l){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))},n}();function v(n){function s(f,l,o,r){return(f|0)*3600+(l|0)*60+(o|0)+parseFloat(r||0)}var d=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?s(d[2],d[3],0,d[4]):s(d[1],d[2],d[3],d[4]):null}var T=function(){function n(){this.values=Object.create(null)}var s=n.prototype;return s.set=function(f,l){!this.get(f)&&l!==""&&(this.values[f]=l)},s.get=function(f,l,o){return o?this.has(f)?this.values[f]:l[o]:this.has(f)?this.values[f]:l},s.has=function(f){return f in this.values},s.alt=function(f,l,o){for(var r=0;r<o.length;++r)if(l===o[r]){this.set(f,l);break}},s.integer=function(f,l){/^-?\d+$/.test(l)&&this.set(f,parseInt(l,10))},s.percent=function(f,l){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(l)){var o=parseFloat(l);if(o>=0&&o<=100)return this.set(f,o),!0}return!1},n}();function y(n,s,d,f){var l=f?n.split(f):[n];for(var o in l){if(typeof l[o]!="string")continue;var r=l[o].split(d);if(r.length!==2)continue;var x=r[0],b=r[1];s(x,b)}}var t=new N.default(0,0,""),h=t.align==="middle"?"middle":"center";function i(n,s,d){var f=n;function l(){var x=v(n);if(x===null)throw new Error("Malformed timestamp: "+f);return n=n.replace(/^[^\sa-zA-Z-]+/,""),x}function o(x,b){var p=new T;y(x,function(_,E){var w;switch(_){case"region":for(var S=d.length-1;S>=0;S--)if(d[S].id===E){p.set(_,d[S].region);break}break;case"vertical":p.alt(_,E,["rl","lr"]);break;case"line":w=E.split(","),p.integer(_,w[0]),p.percent(_,w[0])&&p.set("snapToLines",!1),p.alt(_,w[0],["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start",h,"end"]);break;case"position":w=E.split(","),p.percent(_,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":p.percent(_,E);break;case"align":p.alt(_,E,["start",h,"end","left","right"]);break}},/:/,/\s/),b.region=p.get("region",null),b.vertical=p.get("vertical","");var I=p.get("line","auto");I==="auto"&&t.line===-1&&(I=-1),b.line=I,b.lineAlign=p.get("lineAlign","start"),b.snapToLines=p.get("snapToLines",!0),b.size=p.get("size",100),b.align=p.get("align",h);var O=p.get("position","auto");O==="auto"&&t.position===50&&(O=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=O}function r(){n=n.replace(/^\s+/,"")}if(r(),s.startTime=l(),r(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+f);n=n.substr(3),r(),s.endTime=l(),r(),o(n,s)}function c(n){return n.replace(/<br(?: \/)?>/gi,`
`)}var a=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new m,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=n.prototype;return s.parse=function(f){var l=this;f&&(l.buffer+=l.decoder.decode(f,{stream:!0}));function o(){var O=l.buffer,_=0;for(O=c(O);_<O.length&&O[_]!=="\r"&&O[_]!==`
`;)++_;var E=O.substr(0,_);return O[_]==="\r"&&++_,O[_]===`
`&&++_,l.buffer=O.substr(_),E}function r(O){y(O,function(_,E){},/:/)}try{var x="";if(l.state==="INITIAL"){if(!/\r\n|\n/.test(l.buffer))return this;x=o();var b=x.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");l.state="HEADER"}for(var p=!1;l.buffer;){if(!/\r\n|\n/.test(l.buffer))return this;p?p=!1:x=o();switch(l.state){case"HEADER":/:/.test(x)?r(x):x||(l.state="ID");continue;case"NOTE":x||(l.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(x)){l.state="NOTE";break}if(!x)continue;if(l.cue=new N.default(0,0,""),l.state="CUE",x.indexOf("-->")===-1){l.cue.id=x;continue}case"CUE":if(!l.cue){l.state="BADCUE";continue}try{i(x,l.cue,l.regionList)}catch(O){l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":{var I=x.indexOf("-->")!==-1;if(!x||I&&(p=!0)){l.oncue&&l.cue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}if(l.cue===null)continue;l.cue.text&&(l.cue.text+=`
`),l.cue.text+=x}continue;case"BADCUE":x||(l.state="ID")}}}catch(O){l.state==="CUETEXT"&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state=l.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var f=this;try{if((f.cue||f.state==="HEADER")&&(f.buffer+=`
`,f.parse()),f.state==="INITIAL"||f.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(l){f.onparsingerror&&f.onparsingerror(l)}return f.onflush&&f.onflush(),this},n}()},"./src/utils/webvtt-parser.ts":function(M,g,C){"use strict";C.r(g),C.d(g,"generateCueId",function(){return a}),C.d(g,"parseWebVTT",function(){return s});var N=C("./src/polyfills/number.ts"),m=C("./src/utils/vttparser.ts"),v=C("./src/demux/id3.ts"),T=C("./src/utils/timescale-conversion.ts"),y=C("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,h=function(f,l,o){return o===void 0&&(o=0),f.substr(o,l.length)===l},i=function(f){var l=parseInt(f.substr(-3)),o=parseInt(f.substr(-6,2)),r=parseInt(f.substr(-9,2)),x=f.length>9?parseInt(f.substr(0,f.indexOf(":"))):0;if(!Object(N.isFiniteNumber)(l)||!Object(N.isFiniteNumber)(o)||!Object(N.isFiniteNumber)(r)||!Object(N.isFiniteNumber)(x))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+f);return l+=1e3*o,l+=60*1e3*r,l+=60*60*1e3*x,l},c=function(f){for(var l=5381,o=f.length;o;)l=l*33^f.charCodeAt(--o);return(l>>>0).toString()};function a(d,f,l){return c(d.toString())+c(f.toString())+c(l)}var n=function(f,l,o){var r=f[l],x=f[r.prevCC];if(!x||!x.new&&r.new){f.ccOffset=f.presentationOffset=r.start,r.new=!1;return}for(;(b=x)!==null&&b!==void 0&&b.new;){var b;f.ccOffset+=r.start-x.start,r.new=!1,r=x,x=f[r.prevCC]}f.presentationOffset=o};function s(d,f,l,o,r,x,b,p){var I=new m.VTTParser,O=Object(v.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(t,`
`).split(`
`),_=[],E=Object(T.toMpegTsClockFromTimescale)(f,l),w="00:00.000",S=0,F=0,P,L=!0,G=!1;I.oncue=function(z){var A=o[r],B=o.ccOffset,U=(S-E)/9e4;if(A!=null&&A.new&&(F!==void 0?B=o.ccOffset=A.start:n(o,r,U)),U&&(B=U-o.presentationOffset),G){var R=z.endTime-z.startTime,K=Object(y.normalizePts)((z.startTime+B-F)*9e4,x*9e4)/9e4;z.startTime=K,z.endTime=K+R}var Z=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(Z)),z.id||(z.id=a(z.startTime,z.endTime,Z)),z.endTime>0&&_.push(z)},I.onparsingerror=function(z){P=z},I.onflush=function(){if(P){p(P);return}b(_)},O.forEach(function(z){if(L)if(h(z,"X-TIMESTAMP-MAP=")){L=!1,G=!0,z.substr(16).split(",").forEach(function(A){h(A,"LOCAL:")?w=A.substr(6):h(A,"MPEGTS:")&&(S=parseInt(A.substr(7)))});try{F=i(w)/1e3}catch(A){G=!1,P=A}return}else z===""&&(L=!1);I.parse(z+`
`)}),I.flush()}},"./src/utils/xhr-loader.ts":function(M,g,C){"use strict";C.r(g);var N=C("./src/utils/logger.ts"),m=C("./src/loader/load-stats.ts"),v=/^age:\s*[\d.]+\s*$/m,T=function(){function y(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 m.LoadStats,this.retryDelay=0}var t=y.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},t.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(i,c,a){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=c,this.callbacks=a,this.retryDelay=c.retryDelay,this.loadInternal()},t.loadInternal=function(){var i=this.config,c=this.context;if(!i)return;var a=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var s=this.xhrSetup;try{if(s)try{s(a,c.url)}catch(l){a.open("GET",c.url,!0),s(a,c.url)}a.readyState||a.open("GET",c.url,!0);var d=this.context.headers;if(d)for(var f in d)a.setRequestHeader(f,d[f])}catch(l){this.callbacks.onError({code:a.status,text:l.message},c,a);return}c.rangeEnd&&a.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),a.onreadystatechange=this.readystatechange.bind(this),a.onprogress=this.loadprogress.bind(this),a.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),a.send()},t.readystatechange=function(){var i=this.context,c=this.loader,a=this.stats;if(!i||!c)return;var n=c.readyState,s=this.config;if(a.aborted)return;if(n>=2)if(self.clearTimeout(this.requestTimeout),a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start)),n===4){c.onreadystatechange=null,c.onprogress=null;var d=c.status;if(d>=200&&d<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var f,l;if(i.responseType==="arraybuffer"?(f=c.response,l=f.byteLength):(f=c.responseText,l=f.length),a.loaded=a.total=l,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(a,i,f,c),!this.callbacks)return;var r={url:c.responseURL,data:f};this.callbacks.onSuccess(r,a,i,c)}else a.retry>=s.maxRetry||d>=400&&d<499?(N.logger.error(d+" while loading "+i.url),this.callbacks.onError({code:d,text:c.statusText},i,c)):(N.logger.warn(d+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),a.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},t.loadtimeout=function(){N.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(i){var c=this.stats;c.loaded=i.loaded,i.lengthComputable&&(c.total=i.total)},t.getCacheAge=function(){var i=null;if(this.loader&&v.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");i=c?parseFloat(c):null}return i},y}();g.default=T}}).default})},vHTk:function(H,J,D){H.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.StreamCipher,m=g.algo,v=m.RC4=N.extend({_doReset:function(){for(var t=this._key,h=t.words,i=t.sigBytes,c=this._S=[],a=0;a<256;a++)c[a]=a;for(var a=0,n=0;a<256;a++){var s=a%i,d=h[s>>>2]>>>24-s%4*8&255;n=(n+c[a]+d)%256;var f=c[a];c[a]=c[n],c[n]=f}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,i=this._j,c=0,a=0;a<4;a++){h=(h+1)%256,i=(i+t[h])%256;var n=t[h];t[h]=t[i],t[i]=n,c|=t[(t[h]+t[i])%256]<<24-a*8}return this._i=h,this._j=i,c}g.RC4=N._createHelper(v);var y=m.RC4Drop=v.extend({cfg:v.cfg.extend({drop:192}),_doReset:function(){v._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)T.call(this)}});g.RC4Drop=N._createHelper(y)}(),M.RC4})},wCXF:function(H,J,D){"use strict";D.d(J,"a",function(){return et});var M=D("rePB"),g=D("VTBJ"),C=D("KQm4"),N=D("U8pU"),m=D("ODXe"),v=D("q1tI"),T=D("TSYQ"),y=D.n(T),t=D("Gytx"),h=D.n(t),i=D("Kwbf"),c=D("t23M"),a=D("qx4F"),n=D("6eGT"),s=D("IBYe"),d=D("Ff2n"),f=D("c+Xe"),l=D("fyJ8"),o=D("biw7");function r(Fe,Ie,ot,ft,Qe){var tt=ot[Fe]||{},Be=ot[Ie]||{},ke,Ne;tt.fixed==="left"?ke=ft.left[Fe]:Be.fixed==="right"&&(Ne=ft.right[Ie]);var Ee=!1,Ae=!1,Le=!1,Me=!1,He=ot[Ie+1],nt=ot[Fe-1];if(Qe==="rtl"){if(ke!==void 0){var vt=nt&&nt.fixed==="left";Me=!vt}else if(Ne!==void 0){var bt=He&&He.fixed==="right";Le=!bt}}else if(ke!==void 0){var Wt=He&&He.fixed==="left";Ee=!Wt}else if(Ne!==void 0){var Bt=nt&&nt.fixed==="right";Ae=!Bt}return{fixLeft:ke,fixRight:Ne,lastFixLeft:Ee,firstFixRight:Ae,lastFixRight:Le,firstFixLeft:Me,isSticky:ft.isSticky}}var x=D("sR1s");function b(Fe){var Ie=Fe.cells,ot=Fe.stickyOffsets,ft=Fe.flattenColumns,Qe=Fe.rowComponent,tt=Fe.cellComponent,Be=Fe.onHeaderRow,ke=Fe.index,Ne=v.useContext(o.a),Ee=Ne.prefixCls,Ae=Ne.direction,Le;Be&&(Le=Be(Ie.map(function(He){return He.column}),ke));var Me=Object(x.a)(Ie.map(function(He){return He.column}));return v.createElement(Qe,Object.assign({},Le),Ie.map(function(He,nt){var vt=He.column,bt=r(He.colStart,He.colEnd,ft,ot,Ae),Wt;return vt&&vt.onHeaderCell&&(Wt=He.column.onHeaderCell(vt)),v.createElement(l.a,Object.assign({},He,{ellipsis:vt.ellipsis,align:vt.align,component:tt,prefixCls:Ee,key:Me[nt]},bt,{additionalProps:Wt,rowType:"header"}))}))}b.displayName="HeaderRow";var p=b;function I(Fe){var Ie=[];function ot(Be,ke){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Ne]=Ie[Ne]||[];var Ee=ke,Ae=Be.filter(Boolean).map(function(Le){var Me={key:Le.key,className:Le.className||"",children:Le.title,column:Le,colStart:Ee},He=1,nt=Le.children;return nt&&nt.length>0&&(He=ot(nt,Ee,Ne+1).reduce(function(vt,bt){return vt+bt},0),Me.hasSubColumns=!0),"colSpan"in Le&&(He=Le.colSpan),"rowSpan"in Le&&(Me.rowSpan=Le.rowSpan),Me.colSpan=He,Me.colEnd=Me.colStart+He-1,Ie[Ne].push(Me),Ee+=He,He});return Ae}ot(Fe,0);for(var ft=Ie.length,Qe=function(ke){Ie[ke].forEach(function(Ne){!("rowSpan"in Ne)&&!Ne.hasSubColumns&&(Ne.rowSpan=ft-ke)})},tt=0;tt<ft;tt+=1)Qe(tt);return Ie}function O(Fe){var Ie=Fe.stickyOffsets,ot=Fe.columns,ft=Fe.flattenColumns,Qe=Fe.onHeaderRow,tt=v.useContext(o.a),Be=tt.prefixCls,ke=tt.getComponent,Ne=v.useMemo(function(){return I(ot)},[ot]),Ee=ke(["header","wrapper"],"thead"),Ae=ke(["header","row"],"tr"),Le=ke(["header","cell"],"th");return v.createElement(Ee,{className:"".concat(Be,"-thead")},Ne.map(function(Me,He){var nt=v.createElement(p,{key:He,flattenColumns:ft,cells:Me,stickyOffsets:Ie,rowComponent:Ae,cellComponent:Le,onHeaderRow:Qe,index:He});return nt}))}var _=O,E=D("hW8S");function w(Fe){for(var Ie=Fe.colWidths,ot=Fe.columns,ft=Fe.columCount,Qe=[],tt=ft||ot.length,Be=!1,ke=tt-1;ke>=0;ke-=1){var Ne=Ie[ke],Ee=ot&&ot[ke],Ae=Ee&&Ee[E.a];(Ne||Ae||Be)&&(Qe.unshift(v.createElement("col",Object.assign({key:ke,style:{width:Ne,minWidth:Ne}},Ae))),Be=!0)}return v.createElement("colgroup",null,Qe)}var S=w;function F(Fe,Ie){return Object(v.useMemo)(function(){for(var ot=[],ft=0;ft<Ie;ft+=1){var Qe=Fe[ft];if(Qe!==void 0)ot[ft]=Qe;else return null}return ot},[Fe.join("_"),Ie])}var P=v.forwardRef(function(Fe,Ie){var ot=Fe.noData,ft=Fe.columns,Qe=Fe.flattenColumns,tt=Fe.colWidths,Be=Fe.columCount,ke=Fe.stickyOffsets,Ne=Fe.direction,Ee=Fe.fixHeader,Ae=Fe.offsetHeader,Le=Fe.stickyClassName,Me=Fe.onScroll,He=Object(d.a)(Fe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),nt=v.useContext(o.a),vt=nt.prefixCls,bt=nt.scrollbarSize,Wt=nt.isSticky,Bt=Wt&&!Ee?0:bt,lr=v.useRef(null),dr=v.useCallback(function(fn){Object(f.b)(Ie,fn),Object(f.b)(lr,fn)},[]);v.useEffect(function(){var fn;function cn(Vt){var En=Vt.currentTarget,fr=Vt.deltaX;fr&&(Me({currentTarget:En,scrollLeft:En.scrollLeft+fr}),Vt.preventDefault())}return(fn=lr.current)===null||fn===void 0||fn.addEventListener("wheel",cn),function(){var Vt;(Vt=lr.current)===null||Vt===void 0||Vt.removeEventListener("wheel",cn)}},[]);var Ot=Qe[Qe.length-1],Vr={fixed:Ot?Ot.fixed:null,onHeaderCell:function(){return{className:"".concat(vt,"-cell-scrollbar")}}},Wr=Object(v.useMemo)(function(){return Bt?[].concat(Object(C.a)(ft),[Vr]):ft},[Bt,ft]),Yr=Object(v.useMemo)(function(){return Bt?[].concat(Object(C.a)(Qe),[Vr]):Qe},[Bt,Qe]),bn=Object(v.useMemo)(function(){var fn=ke.right,cn=ke.left;return Object(g.a)(Object(g.a)({},ke),{},{left:Ne==="rtl"?[].concat(Object(C.a)(cn.map(function(Vt){return Vt+Bt})),[0]):cn,right:Ne==="rtl"?fn:[].concat(Object(C.a)(fn.map(function(Vt){return Vt+Bt})),[0]),isSticky:Wt})},[Bt,ke,Wt]),Ar=F(tt,Be);return v.createElement("div",{style:Object(g.a)({overflow:"hidden"},Wt?{top:Ae}:{}),ref:dr,className:y()("".concat(vt,"-header"),Object(M.a)({},Le,!!Le))},v.createElement("table",{style:{tableLayout:"fixed",visibility:ot||Ar?null:"hidden"}},v.createElement(S,{colWidths:Ar?[].concat(Object(C.a)(Ar),[Bt]):[],columCount:Be+1,columns:Yr}),v.createElement(_,Object.assign({},He,{stickyOffsets:bn,columns:Wr,flattenColumns:Yr}))))});P.displayName="FixedHeader";var L=P,G=v.createContext(null),z=G;function A(Fe){var Ie=Fe.prefixCls,ot=Fe.children,ft=Fe.component,Qe=Fe.cellComponent,tt=Fe.fixHeader,Be=Fe.fixColumn,ke=Fe.horizonScroll,Ne=Fe.className,Ee=Fe.expanded,Ae=Fe.componentWidth,Le=Fe.colSpan,Me=v.useContext(o.a),He=Me.scrollbarSize;return v.useMemo(function(){var nt=ot;return Be&&(nt=v.createElement("div",{style:{width:Ae-(tt?He:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},nt)),v.createElement(ft,{className:Ne,style:{display:Ee?null:"none"}},v.createElement(l.a,{component:Qe,prefixCls:Ie,colSpan:Le},nt))},[ot,ft,tt,ke,Ne,Ee,Ae,Le,He])}var B=A;function U(Fe){var Ie=Fe.className,ot=Fe.style,ft=Fe.record,Qe=Fe.index,tt=Fe.rowKey,Be=Fe.getRowKey,ke=Fe.rowExpandable,Ne=Fe.expandedKeys,Ee=Fe.onRow,Ae=Fe.indent,Le=Ae===void 0?0:Ae,Me=Fe.rowComponent,He=Fe.cellComponent,nt=Fe.childrenColumnName,vt=v.useContext(o.a),bt=vt.prefixCls,Wt=vt.fixedInfoList,Bt=v.useContext(z),lr=Bt.fixHeader,dr=Bt.fixColumn,Ot=Bt.horizonScroll,Vr=Bt.componentWidth,Wr=Bt.flattenColumns,Yr=Bt.expandableType,bn=Bt.expandRowByClick,Ar=Bt.onTriggerExpand,fn=Bt.rowClassName,cn=Bt.expandedRowClassName,Vt=Bt.indentSize,En=Bt.expandIcon,fr=Bt.expandedRowRender,br=Bt.expandIconColumnIndex,Br=v.useState(!1),kn=Object(m.a)(Br,2),Kn=kn[0],dn=kn[1],sr=Ne&&Ne.has(Fe.recordKey);v.useEffect(function(){sr&&dn(!0)},[sr]);var Jn=Yr==="row"&&(!ke||ke(ft)),Tn=Yr==="nest",On=nt&&ft&&ft[nt],Jr=Jn||Tn,An;Ee&&(An=Ee(ft,Qe));var Zn=function(V){if(bn&&Jr&&Ar(ft,V),An&&An.onClick){for(var $,ee=arguments.length,ye=new Array(ee>1?ee-1:0),oe=1;oe<ee;oe++)ye[oe-1]=arguments[oe];($=An).onClick.apply($,[V].concat(ye))}},ri;typeof fn=="string"?ri=fn:typeof fn=="function"&&(ri=fn(ft,Qe,Le));var Nt=Object(x.a)(Wr),_r=v.createElement(Me,Object.assign({},An,{"data-row-key":tt,className:y()(Ie,"".concat(bt,"-row"),"".concat(bt,"-row-level-").concat(Le),ri,An&&An.className),style:Object(g.a)(Object(g.a)({},ot),An?An.style:null),onClick:Zn}),Wr.map(function(se,V){var $=se.render,ee=se.dataIndex,ye=se.className,oe=Nt[V],Ve=Wt[V],Tt;V===(br||0)&&Tn&&(Tt=v.createElement(v.Fragment,null,v.createElement("span",{style:{paddingLeft:"".concat(Vt*Le,"px")},className:"".concat(bt,"-row-indent indent-level-").concat(Le)}),En({prefixCls:bt,expanded:sr,expandable:On,record:ft,onExpand:Ar})));var Xt;return se.onCell&&(Xt=se.onCell(ft,Qe)),v.createElement(l.a,Object.assign({className:ye,ellipsis:se.ellipsis,align:se.align,component:He,prefixCls:bt,key:oe,record:ft,index:Qe,dataIndex:ee,render:$,shouldCellUpdate:se.shouldCellUpdate},Ve,{appendNode:Tt,additionalProps:Xt}))})),mi;if(Jn&&(Kn||sr)){var xi=fr(ft,Qe,Le+1,sr),Di=cn&&cn(ft,Qe,Le);mi=v.createElement(B,{expanded:sr,className:y()("".concat(bt,"-expanded-row"),"".concat(bt,"-expanded-row-level-").concat(Le+1),Di),prefixCls:bt,fixHeader:lr,fixColumn:dr,horizonScroll:Ot,component:Me,componentWidth:Vr,cellComponent:He,colSpan:Wr.length},xi)}var wi;return On&&sr&&(wi=(ft[nt]||[]).map(function(se,V){var $=Be(se,V);return v.createElement(U,Object.assign({},Fe,{key:$,rowKey:$,record:se,recordKey:$,index:V,indent:Le+1}))})),v.createElement(v.Fragment,null,_r,mi,wi)}U.displayName="BodyRow";var R=U,K=v.createContext(null),Z=K;function ue(Fe){var Ie=Fe.columnKey,ot=Fe.onColumnResize,ft=v.useRef();return v.useEffect(function(){ft.current&&ot(Ie,ft.current.offsetWidth)},[]),v.createElement(c.a,{onResize:function(tt){var Be=tt.offsetWidth;ot(Ie,Be)}},v.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},v.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(Fe){var Ie=Fe.data,ot=Fe.getRowKey,ft=Fe.measureColumnWidth,Qe=Fe.expandedKeys,tt=Fe.onRow,Be=Fe.rowExpandable,ke=Fe.emptyNode,Ne=Fe.childrenColumnName,Ee=v.useContext(Z),Ae=Ee.onColumnResize,Le=v.useContext(o.a),Me=Le.prefixCls,He=Le.getComponent,nt=v.useContext(z),vt=nt.fixHeader,bt=nt.horizonScroll,Wt=nt.flattenColumns,Bt=nt.componentWidth;return v.useMemo(function(){var lr=He(["body","wrapper"],"tbody"),dr=He(["body","row"],"tr"),Ot=He(["body","cell"],"td"),Vr;Ie.length?Vr=Ie.map(function(Yr,bn){var Ar=ot(Yr,bn);return v.createElement(R,{key:Ar,rowKey:Ar,record:Yr,recordKey:Ar,index:bn,rowComponent:dr,cellComponent:Ot,expandedKeys:Qe,onRow:tt,getRowKey:ot,rowExpandable:Be,childrenColumnName:Ne})}):Vr=v.createElement(B,{expanded:!0,className:"".concat(Me,"-placeholder"),prefixCls:Me,fixHeader:vt,fixColumn:bt,horizonScroll:bt,component:dr,componentWidth:Bt,cellComponent:Ot,colSpan:Wt.length},ke);var Wr=Object(x.a)(Wt);return v.createElement(lr,{className:"".concat(Me,"-tbody")},ft&&v.createElement("tr",{"aria-hidden":"true",className:"".concat(Me,"-measure-row"),style:{height:0}},Wr.map(function(Yr){return v.createElement(ue,{key:Yr,columnKey:Yr,onColumnResize:Ae})})),Vr)},[Ie,Me,tt,ft,Qe,ot,He,Bt,ke,Wt])}var Ce=v.memo(de);Ce.displayName="Body";var Re=Ce,me=D("wRmb"),Oe=D("xEkU"),be=D.n(Oe);function ce(Fe){var Ie=Object(v.useRef)(Fe),ot=Object(v.useState)({}),ft=Object(m.a)(ot,2),Qe=ft[1],tt=Object(v.useRef)(null),Be=Object(v.useRef)([]);function ke(Ne){tt.current===null&&(Be.current=[],tt.current=be()(function(){Be.current.forEach(function(Ee){Ie.current=Ee(Ie.current)}),tt.current=null,Qe({})})),Be.current.push(Ne)}return Object(v.useEffect)(function(){return function(){be.a.cancel(tt.current)}},[]),[Ie.current,ke]}function le(Fe){var Ie=Object(v.useRef)(Fe),ot=Object(v.useRef)(null);function ft(){window.clearTimeout(ot.current)}function Qe(Be){Ie.current=Be,ft(),ot.current=window.setTimeout(function(){Ie.current=null,ot.current=null},100)}function tt(){return Ie.current}return Object(v.useEffect)(function(){return ft},[]),[Qe,tt]}function ne(Fe,Ie,ot){var ft=Object(v.useMemo)(function(){for(var Qe=[],tt=[],Be=0,ke=0,Ne=0;Ne<Ie;Ne+=1)if(ot==="rtl"){tt[Ne]=ke,ke+=Fe[Ne]||0;var Ee=Ie-Ne-1;Qe[Ee]=Be,Be+=Fe[Ee]||0}else{Qe[Ne]=Be,Be+=Fe[Ne]||0;var Ae=Ie-Ne-1;tt[Ae]=ke,ke+=Fe[Ae]||0}return{left:Qe,right:tt}},[Fe,Ie,ot]);return ft}var ge=ne;function te(Fe){var Ie=Fe.className,ot=Fe.children;return v.createElement("div",{className:Ie},ot)}var re=te,Se=D("n6Qo");function ie(Fe){var Ie,ot=Fe.prefixCls,ft=Fe.record,Qe=Fe.onExpand,tt=Fe.expanded,Be=Fe.expandable,ke="".concat(ot,"-row-expand-icon");if(!Be)return v.createElement("span",{className:y()(ke,"".concat(ot,"-row-spaced"))});var Ne=function(Ae){Qe(ft,Ae),Ae.stopPropagation()};return v.createElement("span",{className:y()(ke,(Ie={},Object(M.a)(Ie,"".concat(ot,"-row-expanded"),tt),Object(M.a)(Ie,"".concat(ot,"-row-collapsed"),!tt),Ie)),onClick:Ne})}function q(Fe,Ie,ot){var ft=[];function Qe(tt){(tt||[]).forEach(function(Be,ke){ft.push(Ie(Be,ke)),Qe(Be[ot])})}return Qe(Fe),ft}var Y=D("zT1h"),X=D("y0+3"),he=function(Ie,ot){var ft,Qe,tt=Ie.scrollBodyRef,Be=Ie.onScroll,ke=Ie.offsetScroll,Ne=v.useContext(o.a),Ee=Ne.prefixCls,Ae=((ft=tt.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,Le=((Qe=tt.current)===null||Qe===void 0?void 0:Qe.clientWidth)||0,Me=Ae&&Le*(Le/Ae),He=v.useRef(),nt=ce({scrollLeft:0,isHiddenScrollBar:!1}),vt=Object(m.a)(nt,2),bt=vt[0],Wt=vt[1],Bt=v.useRef({delta:0,x:0}),lr=v.useState(!1),dr=Object(m.a)(lr,2),Ot=dr[0],Vr=dr[1],Wr=function(){Vr(!1)},Yr=function(Vt){Vt.persist(),Bt.current.delta=Vt.pageX-bt.scrollLeft,Bt.current.x=0,Vr(!0),Vt.preventDefault()},bn=function(Vt){var En,fr=Vt||((En=window)===null||En===void 0?void 0:En.event),br=fr.buttons;if(!Ot||br===0){Ot&&Vr(!1);return}var Br=Bt.current.x+Vt.pageX-Bt.current.x-Bt.current.delta;Br<=0&&(Br=0),Br+Me>=Le&&(Br=Le-Me),Be({scrollLeft:Br/Le*(Ae+2)}),Bt.current.x=Vt.pageX},Ar=function(){var Vt=Object(X.b)(tt.current).top,En=Vt+tt.current.offsetHeight,fr=document.documentElement.scrollTop+window.innerHeight;En-Object(a.a)()<=fr||Vt>=fr-ke?Wt(function(br){return Object(g.a)(Object(g.a)({},br),{},{isHiddenScrollBar:!0})}):Wt(function(br){return Object(g.a)(Object(g.a)({},br),{},{isHiddenScrollBar:!1})})},fn=function(Vt){Wt(function(En){return Object(g.a)(Object(g.a)({},En),{},{scrollLeft:Vt/Ae*Le||0})})};return v.useImperativeHandle(ot,function(){return{setScrollLeft:fn}}),v.useEffect(function(){var cn=Object(Y.a)(document.body,"mouseup",Wr,!1),Vt=Object(Y.a)(document.body,"mousemove",bn,!1);return Ar(),function(){cn.remove(),Vt.remove()}},[Me,Ot]),v.useEffect(function(){var cn=Object(Y.a)(window,"scroll",Ar,!1),Vt=Object(Y.a)(window,"resize",Ar,!1);return function(){cn.remove(),Vt.remove()}},[]),v.useEffect(function(){bt.isHiddenScrollBar||Wt(function(cn){var Vt,En;return Object(g.a)(Object(g.a)({},cn),{},{scrollLeft:tt.current.scrollLeft/((Vt=tt.current)===null||Vt===void 0?void 0:Vt.scrollWidth)*((En=tt.current)===null||En===void 0?void 0:En.clientWidth)})})},[bt.isHiddenScrollBar]),Ae<=Le||!Me||bt.isHiddenScrollBar?null:v.createElement("div",{style:{height:Object(a.a)(),width:Le,bottom:ke},className:"".concat(Ee,"-sticky-scroll")},v.createElement("div",{onMouseDown:Yr,ref:He,className:y()("".concat(Ee,"-sticky-scroll-bar"),Object(M.a)({},"".concat(Ee,"-sticky-scroll-bar-active"),Ot)),style:{width:"".concat(Me,"px"),transform:"translate3d(".concat(bt.scrollLeft,"px, 0, 0)")}}))},fe=v.forwardRef(he);function xe(Fe,Ie){return v.useMemo(function(){var ot=!!Fe;return{isSticky:ot,stickyClassName:ot?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(N.a)(Fe)==="object"&&Fe.offsetHeader||0,offsetScroll:Object(N.a)(Fe)==="object"&&Fe.offsetScroll||0}},[Fe,Ie])}var Ke=[],Ze={},et="rc-table-internal-hook",st=v.memo(function(Fe){var Ie=Fe.children;return Ie},function(Fe,Ie){return h()(Fe.props,Ie.props)?Fe.pingLeft!==Ie.pingLeft||Fe.pingRight!==Ie.pingRight:!1});function ut(Fe){var Ie,ot=Fe.prefixCls,ft=Fe.className,Qe=Fe.rowClassName,tt=Fe.style,Be=Fe.data,ke=Fe.rowKey,Ne=Fe.scroll,Ee=Fe.tableLayout,Ae=Fe.direction,Le=Fe.title,Me=Fe.footer,He=Fe.summary,nt=Fe.id,vt=Fe.showHeader,bt=Fe.components,Wt=Fe.emptyText,Bt=Fe.onRow,lr=Fe.onHeaderRow,dr=Fe.internalHooks,Ot=Fe.transformColumns,Vr=Fe.internalRefs,Wr=Fe.sticky,Yr=Be||Ke,bn=!!Yr.length,Ar=v.useState(0),fn=Object(m.a)(Ar,2),cn=fn[0],Vt=fn[1];v.useEffect(function(){Vt(Object(a.a)())});var En=v.useMemo(function(){return Object(x.c)(bt,{})},[bt]),fr=v.useCallback(function(Mr,Ft){return Object(x.b)(En,Mr)||Ft},[En]),br=v.useMemo(function(){return typeof ke=="function"?ke:function(Mr){var Ft=Mr&&Mr[ke];return Ft}},[ke]),Br=Object(E.c)(Fe),kn=Br.expandIcon,Kn=Br.expandedRowKeys,dn=Br.defaultExpandedRowKeys,sr=Br.defaultExpandAllRows,Jn=Br.expandedRowRender,Tn=Br.onExpand,On=Br.onExpandedRowsChange,Jr=Br.expandRowByClick,An=Br.rowExpandable,Zn=Br.expandIconColumnIndex,ri=Br.expandedRowClassName,Nt=Br.childrenColumnName,_r=Br.indentSize,mi=kn||ie,xi=Nt||"children",Di=v.useMemo(function(){return Jn?"row":Fe.expandable&&dr===et&&Fe.expandable.__PARENT_RENDER_ICON__||Yr.some(function(Mr){return Mr&&Object(N.a)(Mr)==="object"&&Mr[xi]})?"nest":!1},[!!Jn,Yr]),wi=v.useState(function(){return dn||(sr?q(Yr,br,xi):[])}),se=Object(m.a)(wi,2),V=se[0],$=se[1],ee=v.useMemo(function(){return new Set(Kn||V||[])},[Kn,V]),ye=v.useCallback(function(Mr){var Ft=br(Mr,Yr.indexOf(Mr)),Qt,gr=ee.has(Ft);gr?(ee.delete(Ft),Qt=Object(C.a)(ee)):Qt=[].concat(Object(C.a)(ee),[Ft]),$(Qt),Tn&&Tn(!gr,Mr),On&&On(Qt)},[br,ee,Yr,Tn,On]),oe=v.useState(0),Ve=Object(m.a)(oe,2),Tt=Ve[0],Xt=Ve[1],Er=Object(me.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Fe),Br),{},{expandable:!!Jn,expandedKeys:ee,getRowKey:br,onTriggerExpand:ye,expandIcon:mi,expandIconColumnIndex:Zn,direction:Ae}),dr===et?Ot:null),kt=Object(m.a)(Er,2),Pr=kt[0],Gr=kt[1],yn=v.useMemo(function(){return{columns:Pr,flattenColumns:Gr}},[Pr,Gr]),ni=v.useRef(),ii=v.useRef(),Bn=v.useRef(),Ni=v.useState(!1),Ki=Object(m.a)(Ni,2),Gn=Ki[0],Ti=Ki[1],Gi=v.useState(!1),Li=Object(m.a)(Gi,2),li=Li[0],ea=Li[1],Vi=ce(new Map),ta=Object(m.a)(Vi,2),oa=ta[0],ki=ta[1],qn=Object(x.a)(Gr),ji=qn.map(function(Mr){return oa.get(Mr)}),ha=v.useMemo(function(){return ji},[ji.join("_")]),xt=ge(ha,Gr.length,Ae),rt=Ne&&Object(x.d)(Ne.y),mt=Ne&&Object(x.d)(Ne.x),wt=mt&&Gr.some(function(Mr){var Ft=Mr.fixed;return Ft}),Lt=v.useRef(),It=xe(Wr,ot),Kt=It.isSticky,Ht=It.offsetHeader,ht=It.offsetScroll,St=It.stickyClassName,At,ur,ar;rt&&(ur={overflowY:"scroll",maxHeight:Ne.y}),mt&&(At={overflowX:"auto"},rt||(ur={overflowY:"hidden"}),ar={width:Ne.x===!0?"auto":Ne.x,minWidth:"100%"});var Zt=v.useCallback(function(Mr,Ft){ki(function(Qt){var gr=new Map(Qt);return gr.set(Mr,Ft),gr})},[]),$t=le(null),rr=Object(m.a)($t,2),cr=rr[0],lt=rr[1];function Rr(Mr,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Mr):Ft.scrollLeft!==Mr&&(Ft.scrollLeft=Mr)}var jr=function(Ft){var Qt=Ft.currentTarget,gr=Ft.scrollLeft,tr=typeof gr=="number"?gr:Qt.scrollLeft,gt=Qt||Ze;if(!lt()||lt()===gt){var yt;cr(gt),Rr(tr,ii.current),Rr(tr,Bn.current),Rr(tr,(yt=Lt.current)===null||yt===void 0?void 0:yt.setScrollLeft)}if(Qt){var Gt=Qt.scrollWidth,Pt=Qt.clientWidth;Ti(tr>0),ea(tr<Gt-Pt)}},xr=function(){Bn.current&&jr({currentTarget:Bn.current})},_t=function(Ft){var Qt=Ft.width;xr(),Xt(ni.current?ni.current.offsetWidth:Qt)};v.useEffect(function(){return xr},[]),v.useEffect(function(){mt&&xr()},[mt]),v.useEffect(function(){dr===et&&Vr&&(Vr.body.current=Bn.current)});var Rt=fr(["table"],"table"),Et=v.useMemo(function(){return Ee||(wt?Ne.x==="max-content"?"auto":"fixed":rt||Gr.some(function(Mr){var Ft=Mr.ellipsis;return Ft})?"fixed":"auto")},[rt,wt,Gr,Ee]),Mt,qt={colWidths:ha,columCount:Gr.length,stickyOffsets:xt,onHeaderRow:lr,fixHeader:rt},pr=v.useMemo(function(){return bn?null:typeof Wt=="function"?Wt():Wt},[bn,Wt]),er=v.createElement(Re,{data:Yr,measureColumnWidth:rt||mt||Kt,expandedKeys:ee,rowExpandable:An,getRowKey:br,onRow:Bt,emptyNode:pr,childrenColumnName:xi}),Ir=v.createElement(S,{colWidths:Gr.map(function(Mr){var Ft=Mr.width;return Ft}),columns:Gr}),Hr=He&&v.createElement(Se.b,null,He(Yr)),yr=fr(["body"]);if(rt||Kt){var at;typeof yr=="function"?(at=yr(Yr,{scrollbarSize:cn,ref:Bn,onScroll:jr}),qt.colWidths=Gr.map(function(Mr,Ft){var Qt=Mr.width,gr=Ft===Pr.length-1?Qt-cn:Qt;return typeof gr=="number"&&!Number.isNaN(gr)?gr:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):at=v.createElement("div",{style:Object(g.a)(Object(g.a)({},At),ur),onScroll:jr,ref:Bn,className:y()("".concat(ot,"-body"))},v.createElement(Rt,{style:Object(g.a)(Object(g.a)({},ar),{},{tableLayout:Et})},Ir,er,Hr),Kt&&v.createElement(fe,{ref:Lt,offsetScroll:ht,scrollBodyRef:Bn,onScroll:jr})),Mt=v.createElement(v.Fragment,null,vt!==!1&&v.createElement(L,Object.assign({noData:!Yr.length},qt,yn,{direction:Ae,offsetHeader:Ht,stickyClassName:St,ref:ii,onScroll:jr})),at)}else Mt=v.createElement("div",{style:Object(g.a)(Object(g.a)({},At),ur),className:y()("".concat(ot,"-content")),onScroll:jr,ref:Bn},v.createElement(Rt,{style:Object(g.a)(Object(g.a)({},ar),{},{tableLayout:Et})},Ir,vt!==!1&&v.createElement(_,Object.assign({},qt,yn)),er,Hr));var zt=Object(E.b)(Fe),sn=v.createElement("div",Object.assign({className:y()(ot,ft,(Ie={},Object(M.a)(Ie,"".concat(ot,"-rtl"),Ae==="rtl"),Object(M.a)(Ie,"".concat(ot,"-ping-left"),Gn),Object(M.a)(Ie,"".concat(ot,"-ping-right"),li),Object(M.a)(Ie,"".concat(ot,"-layout-fixed"),Ee==="fixed"),Object(M.a)(Ie,"".concat(ot,"-fixed-header"),rt),Object(M.a)(Ie,"".concat(ot,"-fixed-column"),wt),Object(M.a)(Ie,"".concat(ot,"-scroll-horizontal"),mt),Object(M.a)(Ie,"".concat(ot,"-has-fix-left"),Gr[0]&&Gr[0].fixed),Object(M.a)(Ie,"".concat(ot,"-has-fix-right"),Gr[Gr.length-1]&&Gr[Gr.length-1].fixed==="right"),Ie)),style:tt,id:nt,ref:ni},zt),v.createElement(st,{pingLeft:Gn,pingRight:li,props:Object(g.a)(Object(g.a)({},Fe),{},{stickyOffsets:xt,mergedExpandedKeys:ee})},Le&&v.createElement(re,{className:"".concat(ot,"-title")},Le(Yr)),v.createElement("div",{className:"".concat(ot,"-container")},Mt),Me&&v.createElement(re,{className:"".concat(ot,"-footer")},Me(Yr))));mt&&(sn=v.createElement(c.a,{onResize:_t},sn));var en=v.useMemo(function(){return{prefixCls:ot,getComponent:fr,scrollbarSize:cn,direction:Ae,fixedInfoList:Gr.map(function(Mr,Ft){return r(Ft,Ft,Gr,xt,Ae)}),isSticky:Kt}},[ot,fr,cn,Ae,Gr,xt,Ae,Kt]),mr=v.useMemo(function(){return Object(g.a)(Object(g.a)({},yn),{},{tableLayout:Et,rowClassName:Qe,expandedRowClassName:ri,componentWidth:Tt,fixHeader:rt,fixColumn:wt,horizonScroll:mt,expandIcon:mi,expandableType:Di,expandRowByClick:Jr,expandedRowRender:Jn,onTriggerExpand:ye,expandIconColumnIndex:Zn,indentSize:_r})},[yn,Et,Qe,ri,Tt,rt,wt,mt,mi,Di,Jr,Jn,ye,Zn,_r]),Dr=v.useMemo(function(){return{onColumnResize:Zt}},[Zt]);return v.createElement(o.a.Provider,{value:en},v.createElement(z.Provider,{value:mr},v.createElement(Z.Provider,{value:Dr},sn)))}ut.Column=s.a,ut.ColumnGroup=n.a,ut.Summary=Se.a,ut.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var dt=J.b=ut},wRmb:function(H,J,D){"use strict";D.d(J,"a",function(){return h});var M=D("rePB"),g=D("KQm4"),C=D("VTBJ"),N=D("Ff2n"),m=D("q1tI"),v=D.n(m),T=D("Kwbf"),y=D("Zm9Q"),t=D("hW8S");function h(s){return Object(y.a)(s).filter(function(d){return m.isValidElement(d)}).map(function(d){var f=d.key,l=d.props,o=l.children,r=Object(N.a)(l,["children"]),x=Object(C.a)({key:f},r);return o&&(x.children=h(o)),x})}function i(s){return s.reduce(function(d,f){var l=f.fixed,o=l===!0?"left":l,r=f.children;return r&&r.length>0?[].concat(Object(g.a)(d),Object(g.a)(i(r).map(function(x){return Object(C.a)({fixed:o},x)}))):[].concat(Object(g.a)(d),[Object(C.a)(Object(C.a)({},f),{},{fixed:o})])},[])}function c(s){for(var d=!0,f=0;f<s.length;f+=1){var l=s[f];if(d&&l.fixed!=="left")d=!1;else if(!d&&l.fixed==="left"){Object(T.a)(!1,"Index ".concat(f-1," of `columns` missing `fixed='left'` prop."));break}}for(var o=!0,r=s.length-1;r>=0;r-=1){var x=s[r];if(o&&x.fixed!=="right")o=!1;else if(!o&&x.fixed==="right"){Object(T.a)(!1,"Index ".concat(r+1," of `columns` missing `fixed='right'` prop."));break}}}function a(s){return s.map(function(d){var f=d.fixed,l=Object(N.a)(d,["fixed"]),o=f;return f==="left"?o="right":f==="right"&&(o="left"),Object(C.a)({fixed:o},l)})}function n(s,d){var f=s.prefixCls,l=s.columns,o=s.children,r=s.expandable,x=s.expandedKeys,b=s.getRowKey,p=s.onTriggerExpand,I=s.expandIcon,O=s.rowExpandable,_=s.expandIconColumnIndex,E=s.direction,w=s.expandRowByClick,S=m.useMemo(function(){return l||h(o)},[l,o]),F=m.useMemo(function(){if(r){var G,z=_||0,A=S[z],B=(G={},Object(M.a)(G,t.a,{className:"".concat(f,"-expand-icon-col")}),Object(M.a)(G,"title",""),Object(M.a)(G,"fixed",A?A.fixed:null),Object(M.a)(G,"className","".concat(f,"-row-expand-icon-cell")),Object(M.a)(G,"render",function(K,Z,ue){var de=b(Z,ue),Ce=x.has(de),Re=O?O(Z):!0,me=I({prefixCls:f,expanded:Ce,expandable:Re,record:Z,onExpand:p});return w?m.createElement("span",{onClick:function(be){return be.stopPropagation()}},me):me}),G),U=S.slice();return z>=0&&U.splice(z,0,B),U}return S},[r,S,b,x,I,E]),P=m.useMemo(function(){var G=F;return d&&(G=d(G)),G.length||(G=[{render:function(){return null}}]),G},[d,F,E]),L=m.useMemo(function(){return E==="rtl"?a(i(P)):i(P)},[P,E]);return[P,L]}J.b=n},wZgz:function(H,J,D){(function(M,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.BlockCipher,m=g.algo,v=[],T=[],y=[],t=[],h=[],i=[],c=[],a=[],n=[],s=[];(function(){for(var l=[],o=0;o<256;o++)o<128?l[o]=o<<1:l[o]=o<<1^283;for(var r=0,x=0,o=0;o<256;o++){var b=x^x<<1^x<<2^x<<3^x<<4;b=b>>>8^b&255^99,v[r]=b,T[b]=r;var p=l[r],I=l[p],O=l[I],_=l[b]*257^b*16843008;y[r]=_<<24|_>>>8,t[r]=_<<16|_>>>16,h[r]=_<<8|_>>>24,i[r]=_;var _=O*16843009^I*65537^p*257^r*16843008;c[b]=_<<24|_>>>8,a[b]=_<<16|_>>>16,n[b]=_<<8|_>>>24,s[b]=_,r?(r=p^l[l[l[O^p]]],x^=l[l[x]]):r=x=1}})();var d=[0,1,2,4,8,16,32,64,128,27,54],f=m.AES=N.extend({_doReset:function(){var l;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,r=o.words,x=o.sigBytes/4,b=this._nRounds=x+6,p=(b+1)*4,I=this._keySchedule=[],O=0;O<p;O++)O<x?I[O]=r[O]:(l=I[O-1],O%x?x>6&&O%x==4&&(l=v[l>>>24]<<24|v[l>>>16&255]<<16|v[l>>>8&255]<<8|v[l&255]):(l=l<<8|l>>>24,l=v[l>>>24]<<24|v[l>>>16&255]<<16|v[l>>>8&255]<<8|v[l&255],l^=d[O/x|0]<<24),I[O]=I[O-x]^l);for(var _=this._invKeySchedule=[],E=0;E<p;E++){var O=p-E;if(E%4)var l=I[O];else var l=I[O-4];E<4||O<=4?_[E]=l:_[E]=c[v[l>>>24]]^a[v[l>>>16&255]]^n[v[l>>>8&255]]^s[v[l&255]]}},encryptBlock:function(l,o){this._doCryptBlock(l,o,this._keySchedule,y,t,h,i,v)},decryptBlock:function(l,o){var r=l[o+1];l[o+1]=l[o+3],l[o+3]=r,this._doCryptBlock(l,o,this._invKeySchedule,c,a,n,s,T);var r=l[o+1];l[o+1]=l[o+3],l[o+3]=r},_doCryptBlock:function(l,o,r,x,b,p,I,O){for(var _=this._nRounds,E=l[o]^r[0],w=l[o+1]^r[1],S=l[o+2]^r[2],F=l[o+3]^r[3],P=4,L=1;L<_;L++){var G=x[E>>>24]^b[w>>>16&255]^p[S>>>8&255]^I[F&255]^r[P++],z=x[w>>>24]^b[S>>>16&255]^p[F>>>8&255]^I[E&255]^r[P++],A=x[S>>>24]^b[F>>>16&255]^p[E>>>8&255]^I[w&255]^r[P++],B=x[F>>>24]^b[E>>>16&255]^p[w>>>8&255]^I[S&255]^r[P++];E=G,w=z,S=A,F=B}var G=(O[E>>>24]<<24|O[w>>>16&255]<<16|O[S>>>8&255]<<8|O[F&255])^r[P++],z=(O[w>>>24]<<24|O[S>>>16&255]<<16|O[F>>>8&255]<<8|O[E&255])^r[P++],A=(O[S>>>24]<<24|O[F>>>16&255]<<16|O[E>>>8&255]<<8|O[w&255])^r[P++],B=(O[F>>>24]<<24|O[E>>>16&255]<<16|O[w>>>8&255]<<8|O[S&255])^r[P++];l[o]=G,l[o+1]=z,l[o+2]=A,l[o+3]=B},keySize:256/32});g.AES=N._createHelper(f)}(),M.AES})},wbyO:function(H,J,D){(function(M,g){H.exports=J=g(D("Ib8C"))})(this,function(M){return function(){var g=M,C=g.lib,N=C.WordArray,m=g.enc,v=m.Base64url={stringify:function(y,t=!0){var h=y.words,i=y.sigBytes,c=t?this._safe_map:this._map;y.clamp();for(var a=[],n=0;n<i;n+=3)for(var s=h[n>>>2]>>>24-n%4*8&255,d=h[n+1>>>2]>>>24-(n+1)%4*8&255,f=h[n+2>>>2]>>>24-(n+2)%4*8&255,l=s<<16|d<<8|f,o=0;o<4&&n+o*.75<i;o++)a.push(c.charAt(l>>>6*(3-o)&63));var r=c.charAt(64);if(r)for(;a.length%4;)a.push(r);return a.join("")},parse:function(y,t=!0){var h=y.length,i=t?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var a=0;a<i.length;a++)c[i.charCodeAt(a)]=a}var n=i.charAt(64);if(n){var s=y.indexOf(n);s!==-1&&(h=s)}return T(y,h,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function T(y,t,h){for(var i=[],c=0,a=0;a<t;a++)if(a%4){var n=h[y.charCodeAt(a-1)]<<a%4*2,s=h[y.charCodeAt(a)]>>>6-a%4*2,d=n|s;i[c>>>2]|=d<<24-c%4*8,c++}return N.create(i,c)}}(),M.enc.Base64url})},"y0+3":function(H,J,D){"use strict";D.d(J,"a",function(){return i}),D.d(J,"b",function(){return a});var M=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function N(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function m(n,s,d){if(s=s.toLowerCase(),d==="auto"){if(s==="height")return n.offsetHeight;if(s==="width")return n.offsetWidth}return s in g||(g[s]=M.test(s)),g[s]?parseFloat(d)||0:d}function v(n,s){var d=arguments.length,f=N(n);return s=C[s]?"cssFloat"in n.style?"cssFloat":"styleFloat":s,d===1?f:m(n,s,f[s]||n.style[s])}function T(n,s,d){var f=arguments.length;if(s=C[s]?"cssFloat"in n.style?"cssFloat":"styleFloat":s,f===3)return typeof d=="number"&&M.test(s)&&(d="".concat(d,"px")),n.style[s]=d,d;for(var l in s)s.hasOwnProperty(l)&&T(n,l,s[l]);return N(n)}function y(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),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:s}}function i(){var n=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:s}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function a(n){var s=n.getBoundingClientRect(),d=document.documentElement;return{left:s.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},"yTi+":function(H,J,D){H.exports=D.p+"static/AssistantCode3.fdd8db3c.jpeg"},zrhs:function(H,J,D){"use strict";var M=D("2qtc"),g=D("kLXV"),C=D("PpiC"),N=D("q1tI"),m=D.n(N),v=D("9kvl"),T=function(t){var h=t.shixunsDetail,i=t.globalSetting,c=t.loading,a=t.dispatch,n=Object(C.a)(t,["shixunsDetail","globalSetting","loading","dispatch"]);return m.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:h.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){a({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){a({type:"shixunsDetail/setActionTabs",payload:{}})}},m.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",m.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};J.a=Object(v.a)(function(y){var t=y.shixunsDetail,h=y.loading,i=y.globalSetting;return{shixunsDetail:t,globalSetting:i,loading:h.models.index}})(T)}}]);