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.c5a...

521 lines
1.8 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(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,O){"use strict";function M(a,o){a.cmdState.push(o)}function m(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function y(a){var o=a.cmdState.pop();o&&o.closeBracket()}function T(a){for(var o=a.cmdState,u=o.length-1;u>=0;u--){var h=o[u];if(h.name=="DEFAULT")continue;return h}return{styleIdentifier:function(){return null}}}function b(a,o,u){return function(){this.name=a,this.bracketNo=0,this.style=o,this.styles=u,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var p={};p.importmodule=b("importmodule","tag",["string","builtin"]),p.documentclass=b("documentclass","tag",["","atom"]),p.usepackage=b("usepackage","tag",["atom"]),p.begin=b("begin","tag",["atom"]),p.end=b("end","tag",["atom"]),p.label=b("label","tag",["atom"]),p.ref=b("ref","tag",["atom"]),p.eqref=b("eqref","tag",["atom"]),p.cite=b("cite","tag",["atom"]),p.bibitem=b("bibitem","tag",["atom"]),p.Bibitem=b("Bibitem","tag",["atom"]),p.RBibitem=b("RBibitem","tag",["atom"]),p.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function d(a,o){a.f=o}function n(a,o){var u;if(a.match(/^\\[a-zA-Z@]+/)){var h=a.current().slice(1);return u=p.hasOwnProperty(h)?p[h]:p.DEFAULT,u=new u,M(o,u),d(o,r),u.style}if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/\\]/))return"tag";if(a.match("\\["))return d(o,function(l,t){return c(l,t,"\\]")}),"keyword";if(a.match("\\("))return d(o,function(l,t){return c(l,t,"\\)")}),"keyword";if(a.match("$$"))return d(o,function(l,t){return c(l,t,"$$")}),"keyword";if(a.match("$"))return d(o,function(l,t){return c(l,t,"$")}),"keyword";var s=a.next();if(s=="%")return a.skipToEnd(),"comment";if(s=="}"||s=="]"){if(u=m(o),u)u.closeBracket(s),d(o,r);else return"error";return"bracket"}else return s=="{"||s=="["?(u=p.DEFAULT,u=new u,M(o,u),"bracket"):/\d/.test(s)?(a.eatWhile(/[\w.%]/),"atom"):(a.eatWhile(/[\w\-_]/),u=T(o),u.name=="begin"&&(u.argument=a.current()),u.styleIdentifier())}function c(a,o,u){if(a.eatSpace())return null;if(u&&a.match(u))return d(o,n),"keyword";if(a.match(/^\\[a-zA-Z@]+/))return"tag";if(a.match(/^[a-zA-Z]+/))return"variable-2";if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/]/))return"tag";if(a.match(/^[\^_&]/))return"tag";if(a.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(a.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var h=a.next();return h=="{"||h=="}"||h=="["||h=="]"||h=="("||h==")"?"bracket":h=="%"?(a.skipToEnd(),"comment"):"error"}function r(a,o){var u=a.peek(),h;return u=="{"||u=="["?(h=m(o),h.openBracket(u),a.eat(u),d(o,n),"bracket"):/[ \t\r]/.test(u)?(a.eat(u),null):(d(o,n),y(o),n(a,o))}return{startState:function(){var a=O.inMathMode?function(o,u){return c(o,u)}:n;return{cmdState:[],f:a}},copyState:function(a){return{cmdState:a.cmdState.slice(),f:a.f}},token:function(a,o){return o.f(a,o)},blankLine:function(a){a.f=n,a.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(F,q,j){},"19Vz":function(F,q,j){(function(N){N(j("VrN/"))})(function(N){N.defineOption("placeholder","",function(b,p,d){var n=d&&d!=N.Init;if(p&&!n)b.on("blur",m),b.on("change",y),b.on("swapDoc",y),N.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){M(b)}),y(b);else if(!p&&n){b.off("blur",m),b.off("change",y),b.off("swapDoc",y),N.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),g(b);var c=b.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}p&&!b.hasFocus()&&m(b)});function g(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function O(b){g(b);var p=b.state.placeholder=document.createElement("pre");p.style.cssText="height: 0; overflow: visible",p.style.direction=b.getOption("direction"),p.className="CodeMirror-placeholder CodeMirror-line-like";var d=b.getOption("placeholder");typeof d=="string"&&(d=document.createTextNode(d)),p.appendChild(d),b.display.lineSpace.insertBefore(p,b.display.lineSpace.firstChild)}function M(b){setTimeout(function(){var p=!1,d=b.getInputField();d.nodeName=="TEXTAREA"?p=!d.value:b.lineCount()==1&&(p=!/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent)),p?O(b):g(b)},20)}function m(b){T(b)&&O(b)}function y(b){var p=b.getWrapperElement(),d=T(b);p.className=p.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?O(b):g(b)}function T(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1ZF9":function(F,q,j){F.exports=j.p+"static/Authorize.cc9c212f.png"},"1eCo":function(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var g={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(M,m){var y=M.indentUnit,T={},b=m.htmlMode?g:O;for(var p in b)T[p]=b[p];for(var p in m)T[p]=m[p];var d,n;function c(w,k){function I(W){return k.tokenize=W,W(w,k)}var L=w.next();if(L=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?I(o("atom","]]>")):null:w.match("--")?I(o("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),I(u(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),k.tokenize=o("meta","?>"),"meta"):(d=w.eat("/")?"closeTag":"openTag",k.tokenize=r,"tag bracket");if(L=="&"){var V;return w.eat("#")?w.eat("x")?V=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):V=w.eatWhile(/[\d]/)&&w.eat(";"):V=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),V?"atom":"error"}else return w.eatWhile(/[^&<]/),null}c.isInText=!0;function r(w,k){var I=w.next();if(I==">"||I=="/"&&w.eat(">"))return k.tokenize=c,d=I==">"?"endTag":"selfcloseTag","tag bracket";if(I=="=")return d="equals",null;if(I=="<"){k.tokenize=c,k.state=t,k.tagName=k.tagStart=null;var L=k.tokenize(w,k);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(I)?(k.tokenize=a(I),k.stringStartCol=w.column(),k.tokenize(w,k)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(w){var k=function(I,L){for(;!I.eol();)if(I.next()==w){L.tokenize=r;break}return"string"};return k.isInAttribute=!0,k}function o(w,k){return function(I,L){for(;!I.eol();){if(I.match(k)){L.tokenize=c;break}I.next()}return w}}function u(w){return function(k,I){for(var L;(L=k.next())!=null;){if(L=="<")return I.tokenize=u(w+1),I.tokenize(k,I);if(L==">")if(w==1){I.tokenize=c;break}else return I.tokenize=u(w-1),I.tokenize(k,I)}return"meta"}}function h(w,k,I){this.prev=w.context,this.tagName=k,this.indent=w.indented,this.startOfLine=I,(T.doNotIndent.hasOwnProperty(k)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function s(w){w.context&&(w.context=w.context.prev)}function l(w,k){for(var I;;){if(!w.context)return;if(I=w.context.tagName,!T.contextGrabbers.hasOwnProperty(I)||!T.contextGrabbers[I].hasOwnProperty(k))return;s(w)}}function t(w,k,I){return w=="openTag"?(I.tagStart=k.column(),S):w=="closeTag"?x:t}function S(w,k,I){return w=="word"?(I.tagName=k.current(),n="tag",C):T.allowMissingTagName&&w=="endTag"?(n="tag bracket",C(w,k,I)):(n="error",S)}function x(w,k,I){if(w=="word"){var L=k.current();return I.context&&I.context.tagName!=L&&T.implicitlyClosed.hasOwnProperty(I.context.tagName)&&s(I),I.context&&I.context.tagName==L||T.matchClosing===!1?(n="tag",f):(n="tag error",R)}else return T.allowMissingTagName&&w=="endTag"?(n="tag bracket",f(w,k,I)):(n="error",R)}function f(w,k,I){return w!="endTag"?(n="error",f):(s(I),t)}function R(w,k,I){return n="error",f(w,k,I)}function C(w,k,I){if(w=="word")return n="attribute",v;if(w=="endTag"||w=="selfcloseTag"){var L=I.tagName,V=I.tagStart;return I.tagName=I.tagStart=null,w=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(L)?l(I,L):(l(I,L),I.context=new h(I,L,V==I.indented)),t}return n="error",C}function v(w,k,I){return w=="equals"?_:(T.allowMissing||(n="error"),C(w,k,I))}function _(w,k,I){return w=="string"?E:w=="word"&&T.allowUnquoted?(n="string",C):(n="error",C(w,k,I))}function E(w,k,I){return w=="string"?E:C(w,k,I)}return{startState:function(w){var k={tokenize:c,state:t,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(k.baseIndent=w),k},token:function(w,k){if(!k.tagName&&w.sol()&&(k.indented=w.indentation()),w.eatSpace())return null;d=null;var I=k.tokenize(w,k);return(I||d)&&I!="comment"&&(n=null,k.state=k.state(d||I,w,k),n&&(I=n=="error"?I+" error":n)),I},indent:function(w,k,I){var L=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+y;if(L&&L.noIndent)return N.Pass;if(w.tokenize!=r&&w.tokenize!=c)return I?I.match(/^(\s*)/)[0].length:0;if(w.tagName)return T.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+y*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/<!\[CDATA\[/.test(k))return 0;var V=k&&/^<(\/)?([\w_:\.-]*)/.exec(k);if(V&&V[1])for(;L;)if(L.tagName==V[2]){L=L.prev;break}else if(T.implicitlyClosed.hasOwnProperty(L.tagName))L=L.prev;else break;else if(V)for(;L;){var W=T.contextGrabbers[L.tagName];if(W&&W.hasOwnProperty(V[2]))L=L.prev;else break}for(;L&&L.prev&&!L.startOfLine;)L=L.prev;return L?L.indent+y:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(w){w.state==_&&(w.state=C)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var k=[],I=w.context;I;I=I.prev)I.tagName&&k.push(I.tagName);return k.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("MlIO"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.Hasher,m=g.x64,y=m.Word,T=m.WordArray,b=g.algo;function p(){return y.create.apply(y,arguments)}var d=[p(1116352408,3609767458),p(1899447441,602891725),p(3049323471,3964484399),p(3921009573,2173295548),p(961987163,4081628472),p(1508970993,3053834265),p(2453635748,2937671579),p(2870763221,3664609560),p(3624381080,2734883394),p(310598401,1164996542),p(607225278,1323610764),p(1426881987,3590304994),p(1925078388,4068182383),p(2162078206,991336113),p(2614888103,633803317),p(3248222580,3479774868),p(3835390401,2666613458),p(4022224774,944711139),p(264347078,2341262773),p(604807628,2007800933),p(770255983,1495990901),p(1249150122,1856431235),p(1555081692,3175218132),p(1996064986,2198950837),p(2554220882,3999719339),p(2821834349,766784016),p(2952996808,2566594879),p(3210313671,3203337956),p(3336571891,1034457026),p(3584528711,2466948901),p(113926993,3758326383),p(338241895,168717936),p(666307205,1188179964),p(773529912,1546045734),p(1294757372,1522805485),p(1396182291,2643833823),p(1695183700,2343527390),p(1986661051,1014477480),p(2177026350,1206759142),p(2456956037,344077627),p(2730485921,1290863460),p(2820302411,3158454273),p(3259730800,3505952657),p(3345764771,106217008),p(3516065817,3606008344),p(3600352804,1432725776),p(4094571909,1467031594),p(275423344,851169720),p(430227734,3100823752),p(506948616,1363258195),p(659060556,3750685593),p(883997877,3785050280),p(958139571,3318307427),p(1322822218,3812723403),p(1537002063,2003034995),p(1747873779,3602036899),p(1955562222,1575990012),p(2024104815,1125592928),p(2227730452,2716904306),p(2361852424,442776044),p(2428436474,593698344),p(2756734187,3733110249),p(3204031479,2999351573),p(3329325298,3815920427),p(3391569614,3928383900),p(3515267271,566280711),p(3940187606,3454069534),p(4118630271,4000239992),p(116418474,1914138554),p(174292421,2731055270),p(289380356,3203993006),p(460393269,320620315),p(685471733,587496836),p(852142971,1086792851),p(1017036298,365543100),p(1126000580,2618297676),p(1288033470,3409855158),p(1501505948,4234509866),p(1607167915,987167468),p(1816402316,1246189591)],n=[];(function(){for(var r=0;r<80;r++)n[r]=p()})();var c=b.SHA512=M.extend({_doReset:function(){this._hash=new T.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(r,a){for(var o=this._hash.words,u=o[0],h=o[1],s=o[2],l=o[3],t=o[4],S=o[5],x=o[6],f=o[7],R=u.high,C=u.low,v=h.high,_=h.low,E=s.high,w=s.low,k=l.high,I=l.low,L=t.high,V=t.low,W=S.high,H=S.low,G=x.high,B=x.low,P=f.high,z=f.low,J=R,ue=C,de=v,Se=_,Ae=E,pe=w,Oe=k,ye=I,ce=L,ae=V,re=W,fe=H,te=G,ne=B,Te=P,ie=z,Z=0;Z<80;Z++){var X,Q,_e=n[Z];if(Z<16)Q=_e.high=r[a+Z*2]|0,X=_e.low=r[a+Z*2+1]|0;else{var ve=n[Z-15],Re=ve.high,Je=ve.low,qe=(Re>>>1|Je<<31)^(Re>>>8|Je<<24)^Re>>>7,rt=(Je>>>1|Re<<31)^(Je>>>8|Re<<24)^(Je>>>7|Re<<25),ut=n[Z-2],dt=ut.high,ft=ut.low,Be=(dt>>>19|ft<<13)^(dt<<3|ft>>>29)^dt>>>6,Ie=(ft>>>19|dt<<13)^(ft<<3|dt>>>29)^(ft>>>6|dt<<26),at=n[Z-7],ct=at.high,$e=at.low,st=n[Z-16],Ue=st.high,Le=st.low;X=rt+$e,Q=qe+ct+(X>>>0<rt>>>0?1:0),X=X+Ie,Q=Q+Be+(X>>>0<Ie>>>0?1:0),X=X+Le,Q=Q+Ue+(X>>>0<Le>>>0?1:0),_e.high=Q,_e.low=X}var Me=ce&re^~ce&te,Ee=ae&fe^~ae&ne,Ce=J&de^J&Ae^de&Ae,ke=ue&Se^ue&pe^Se&pe,Ne=(J>>>28|ue<<4)^(J<<30|ue>>>2)^(J<<25|ue>>>7),He=(ue>>>28|J<<4)^(ue<<30|J>>>2)^(ue<<25|J>>>7),tt=(ce>>>14|ae<<18)^(ce>>>18|ae<<14)^(ce<<23|ae>>>9),vt=(ae>>>14|ce<<18)^(ae>>>18|ce<<14)^(ae<<23|ce>>>9),yt=d[Z],Wt=yt.high,Ht=yt.low,cr=ie+vt,dr=Te+tt+(cr>>>0<ie>>>0?1:0),cr=cr+Ee,dr=dr+Me+(cr>>>0<Ee>>>0?1:0),cr=cr+Ht,dr=dr+Wt+(cr>>>0<Ht>>>0?1:0),cr=cr+X,dr=dr+Q+(cr>>>0<X>>>0?1:0),St=He+ke,Kr=Ne+Ce+(St>>>0<He>>>0?1:0);Te=te,ie=ne,te=re,ne=fe,re=ce,fe=ae,ae=ye+cr|0,ce=Oe+dr+(ae>>>0<ye>>>0?1:0)|0,Oe=Ae,ye=pe,Ae=de,pe=Se,de=J,Se=ue,ue=cr+St|0,J=dr+Kr+(ue>>>0<cr>>>0?1:0)|0}C=u.low=C+ue,u.high=R+J+(C>>>0<ue>>>0?1:0),_=h.low=_+Se,h.high=v+de+(_>>>0<Se>>>0?1:0),w=s.low=w+pe,s.high=E+Ae+(w>>>0<pe>>>0?1:0),I=l.low=I+ye,l.high=k+Oe+(I>>>0<ye>>>0?1:0),V=t.low=V+ae,t.high=L+ce+(V>>>0<ae>>>0?1:0),H=S.low=H+fe,S.high=W+re+(H>>>0<fe>>>0?1:0),B=x.low=B+ne,x.high=G+te+(B>>>0<ne>>>0?1:0),z=f.low=z+ie,f.high=P+Te+(z>>>0<ie>>>0?1:0)},_doFinalize:function(){var r=this._data,a=r.words,o=this._nDataBytes*8,u=r.sigBytes*8;a[u>>>5]|=128<<24-u%32,a[(u+128>>>10<<5)+30]=Math.floor(o/4294967296),a[(u+128>>>10<<5)+31]=o,r.sigBytes=a.length*4,this._process();var h=this._hash.toX32();return h},clone:function(){var r=M.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});g.SHA512=M._createHelper(c),g.HmacSHA512=M._createHmacHelper(c)}(),N.SHA512})},"3y9D":function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=O.Hasher,y=g.algo,T=[],b=y.SHA1=m.extend({_doReset:function(){this._hash=new M.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(p,d){for(var n=this._hash.words,c=n[0],r=n[1],a=n[2],o=n[3],u=n[4],h=0;h<80;h++){if(h<16)T[h]=p[d+h]|0;else{var s=T[h-3]^T[h-8]^T[h-14]^T[h-16];T[h]=s<<1|s>>>31}var l=(c<<5|c>>>27)+u+T[h];h<20?l+=(r&a|~r&o)+1518500249:h<40?l+=(r^a^o)+1859775393:h<60?l+=(r&a|r&o|a&o)-1894007588:l+=(r^a^o)-899497514,u=o,o=a,a=r<<30|r>>>2,r=c,c=l}n[0]=n[0]+c|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0},_doFinalize:function(){var p=this._data,d=p.words,n=this._nDataBytes*8,c=p.sigBytes*8;return d[c>>>5]|=128<<24-c%32,d[(c+64>>>9<<4)+14]=Math.floor(n/4294967296),d[(c+64>>>9<<4)+15]=n,p.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var p=m.clone.call(this);return p._hash=this._hash.clone(),p}});g.SHA1=m._createHelper(b),g.HmacSHA1=m._createHmacHelper(b)}(),N.SHA1})},4:function(F,q){},"55Ip":function(F,q,j){"use strict";j.d(q,"a",function(){return l});var N=j("Ty5D"),g=j("dI71"),O=j("q1tI"),M=j.n(O),m=j("YS25"),y=j("17x9"),T=j.n(y),b=j("wx14"),p=j("zLVn"),d=j("9R94"),n=function(_){Object(g.a)(E,_);function E(){for(var k,I=arguments.length,L=new Array(I),V=0;V<I;V++)L[V]=arguments[V];return k=_.call.apply(_,[this].concat(L))||this,k.history=Object(m.a)(k.props),k}var w=E.prototype;return w.render=function(){return M.a.createElement(N.c,{history:this.history,children:this.props.children})},E}(M.a.Component),c=function(_){Object(g.a)(E,_);function E(){for(var k,I=arguments.length,L=new Array(I),V=0;V<I;V++)L[V]=arguments[V];return k=_.call.apply(_,[this].concat(L))||this,k.history=Object(m.b)(k.props),k}var w=E.prototype;return w.render=function(){return M.a.createElement(N.c,{history:this.history,children:this.props.children})},E}(M.a.Component),r=function(E,w){return typeof E=="function"?E(w):E},a=function(E,w){return typeof E=="string"?Object(m.c)(E,null,null,w):E},o=function(E){return E},u=M.a.forwardRef;typeof u=="undefined"&&(u=o);function h(_){return!!(_.metaKey||_.altKey||_.ctrlKey||_.shiftKey)}var s=u(function(_,E){var w=_.innerRef,k=_.navigate,I=_.onClick,L=Object(p.a)(_,["innerRef","navigate","onClick"]),V=L.target,W=Object(b.a)({},L,{onClick:function(G){try{I&&I(G)}catch(B){throw G.preventDefault(),B}!G.defaultPrevented&&G.button===0&&(!V||V==="_self")&&!h(G)&&(G.preventDefault(),k())}});return o!==u?W.ref=E||w:W.ref=w,M.a.createElement("a",W)}),l=u(function(_,E){var w=_.component,k=w===void 0?s:w,I=_.replace,L=_.to,V=_.innerRef,W=Object(p.a)(_,["component","replace","to","innerRef"]);return M.a.createElement(N.e.Consumer,null,function(H){H||Object(d.a)(!1);var G=H.history,B=a(r(L,H.location),H.location),P=B?G.createHref(B):"",z=Object(b.a)({},W,{href:P,navigate:function(){var ue=r(L,H.location),de=I?G.replace:G.push;de(ue)}});return o!==u?z.ref=E||V:z.innerRef=V,M.a.createElement(k,z)})});if(!1)var t,S;var x=function(E){return E},f=M.a.forwardRef;typeof f=="undefined"&&(f=x);function R(){for(var _=arguments.length,E=new Array(_),w=0;w<_;w++)E[w]=arguments[w];return E.filter(function(k){return k}).join(" ")}var C=f(function(_,E){var w=_["aria-current"],k=w===void 0?"page":w,I=_.activeClassName,L=I===void 0?"active":I,V=_.activeStyle,W=_.className,H=_.exact,G=_.isActive,B=_.location,P=_.sensitive,z=_.strict,J=_.style,ue=_.to,de=_.innerRef,Se=Object(p.a)(_,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return M.a.createElement(N.e.Consumer,null,function(Ae){Ae||Object(d.a)(!1);var pe=B||Ae.location,Oe=a(r(ue,pe),pe),ye=Oe.pathname,ce=ye&&ye.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ae=ce?Object(N.f)(pe.pathname,{path:ce,exact:H,sensitive:P,strict:z}):null,re=!!(G?G(ae,pe):ae),fe=re?R(W,L):W,te=re?Object(b.a)({},J,{},V):J,ne=Object(b.a)({"aria-current":re&&k||null,className:fe,style:te,to:Oe},Se);return x!==f?ne.ref=E||de:ne.innerRef=de,M.a.createElement(l,ne)})});if(!1)var v},"5VLF":function(F,q,j){"use strict";var N,g;function O(M,m,y){var T=function(b,p){return M.js_beautify(b,p)};return T.js=M.js_beautify,T.css=m.css_beautify,T.html=y.html_beautify,T.js_beautify=M.js_beautify,T.css_beautify=m.css_beautify,T.html_beautify=y.html_beautify,T}!(N=[j("6UM0"),j("TXwP"),j("psGv")],g=function(M,m,y){return O(M,m,y)}.apply(q,N),g!==void 0&&(F.exports=g))},"5hvy":function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("MlIO"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.WordArray,y=M.Hasher,T=O.x64,b=T.Word,p=O.algo,d=[],n=[],c=[];(function(){for(var o=1,u=0,h=0;h<24;h++){d[o+5*u]=(h+1)*(h+2)/2%64;var s=u%5,l=(2*o+3*u)%5;o=s,u=l}for(var o=0;o<5;o++)for(var u=0;u<5;u++)n[o+5*u]=u+(2*o+3*u)%5*5;for(var t=1,S=0;S<24;S++){for(var x=0,f=0,R=0;R<7;R++){if(t&1){var C=(1<<R)-1;C<32?f^=1<<C:x^=1<<C-32}t&128?t=t<<1^113:t<<=1}c[S]=b.create(x,f)}})();var r=[];(function(){for(var o=0;o<25;o++)r[o]=b.create()})();var a=p.SHA3=y.extend({cfg:y.cfg.extend({outputLength:512}),_doReset:function(){for(var o=this._state=[],u=0;u<25;u++)o[u]=new b.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(o,u){for(var h=this._state,s=this.blockSize/2,l=0;l<s;l++){var t=o[u+2*l],S=o[u+2*l+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var x=h[l];x.high^=S,x.low^=t}for(var f=0;f<24;f++){for(var R=0;R<5;R++){for(var C=0,v=0,_=0;_<5;_++){var x=h[R+5*_];C^=x.high,v^=x.low}var E=r[R];E.high=C,E.low=v}for(var R=0;R<5;R++)for(var w=r[(R+4)%5],k=r[(R+1)%5],I=k.high,L=k.low,C=w.high^(I<<1|L>>>31),v=w.low^(L<<1|I>>>31),_=0;_<5;_++){var x=h[R+5*_];x.high^=C,x.low^=v}for(var V=1;V<25;V++){var C,v,x=h[V],W=x.high,H=x.low,G=d[V];G<32?(C=W<<G|H>>>32-G,v=H<<G|W>>>32-G):(C=H<<G-32|W>>>64-G,v=W<<G-32|H>>>64-G);var B=r[n[V]];B.high=C,B.low=v}var P=r[0],z=h[0];P.high=z.high,P.low=z.low;for(var R=0;R<5;R++)for(var _=0;_<5;_++){var V=R+5*_,x=h[V],J=r[V],ue=r[(R+1)%5+5*_],de=r[(R+2)%5+5*_];x.high=J.high^~ue.high&de.high,x.low=J.low^~ue.low&de.low}var x=h[0],Se=c[f];x.high^=Se.high,x.low^=Se.low}},_doFinalize:function(){var o=this._data,u=o.words,h=this._nDataBytes*8,s=o.sigBytes*8,l=this.blockSize*32;u[s>>>5]|=1<<24-s%32,u[(g.ceil((s+1)/l)*l>>>5)-1]|=128,o.sigBytes=u.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,x=S/8,f=[],R=0;R<x;R++){var C=t[R],v=C.high,_=C.low;v=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,f.push(_),f.push(v)}return new m.init(f,S)},clone:function(){for(var o=y.clone.call(this),u=o._state=this._state.slice(0),h=0;h<25;h++)u[h]=u[h].clone();return o}});O.SHA3=y._createHelper(a),O.HmacSHA3=y._createHmacHelper(a)}(Math),N.SHA3})},"6+eU":function(F,q,j){"use strict";j.d(q,"a",function(){return f});var N=j("wx14"),g=j("rePB"),O=j("VTBJ"),M=j("1OyB"),m=j("vuIU"),y=j("Ji7U"),T=j("LK+K"),b=j("q1tI"),p=j.n(b),d=j("TSYQ"),n=j.n(d),c=function(C){var v,_="".concat(C.rootPrefixCls,"-item"),E=n()(_,"".concat(_,"-").concat(C.page),(v={},Object(g.a)(v,"".concat(_,"-active"),C.active),Object(g.a)(v,C.className,!!C.className),Object(g.a)(v,"".concat(_,"-disabled"),!C.page),v)),w=function(){C.onClick(C.page)},k=function(L){C.onKeyPress(L,C.onClick,C.page)};return p.a.createElement("li",{title:C.showTitle?C.page:null,className:E,onClick:w,onKeyPress:k,tabIndex:"0"},C.itemRender(C.page,"page",p.a.createElement("a",{rel:"nofollow"},C.page)))},r=c,a={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(R){Object(y.a)(v,R);var C=Object(T.a)(v);function v(){var _;Object(M.a)(this,v);for(var E=arguments.length,w=new Array(E),k=0;k<E;k++)w[k]=arguments[k];return _=C.call.apply(C,[this].concat(w)),_.state={goInputText:""},_.buildOptionText=function(I){return"".concat(I," ").concat(_.props.locale.items_per_page)},_.changeSize=function(I){_.props.changeSize(Number(I))},_.handleChange=function(I){_.setState({goInputText:I.target.value})},_.handleBlur=function(I){var L=_.props,V=L.goButton,W=L.quickGo,H=L.rootPrefixCls,G=_.state.goInputText;if(V||G==="")return;if(I.relatedTarget&&(I.relatedTarget.className.indexOf("".concat(H,"-prev"))>=0||I.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;_.setState({goInputText:""}),W(_.getValidValue())},_.go=function(I){var L=_.state.goInputText;if(L==="")return;(I.keyCode===a.ENTER||I.type==="click")&&(_.setState({goInputText:""}),_.props.quickGo(_.getValidValue()))},_}return Object(m.a)(v,[{key:"getValidValue",value:function(){var E=this.state,w=E.goInputText,k=E.current;return!w||isNaN(w)?k:Number(w)}},{key:"getPageSizeOptions",value:function(){var E=this.props,w=E.pageSize,k=E.pageSizeOptions;return k.some(function(I){return I.toString()===w.toString()})?k:k.concat([w.toString()]).sort(function(I,L){var V=isNaN(Number(I))?0:Number(I),W=isNaN(Number(L))?0:Number(L);return V-W})}},{key:"render",value:function(){var E=this,w=this.props,k=w.pageSize,I=w.locale,L=w.rootPrefixCls,V=w.changeSize,W=w.quickGo,H=w.goButton,G=w.selectComponentClass,B=w.buildOptionText,P=w.selectPrefixCls,z=w.disabled,J=this.state.goInputText,ue="".concat(L,"-options"),de=G,Se=null,Ae=null,pe=null;if(!V&&!W)return null;var Oe=this.getPageSizeOptions();if(V&&de){var ye=Oe.map(function(ce,ae){return p.a.createElement(de.Option,{key:ae,value:ce.toString()},(B||E.buildOptionText)(ce))});Se=p.a.createElement(de,{disabled:z,prefixCls:P,showSearch:!1,className:"".concat(ue,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(k||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},ye)}return W&&(H&&(pe=typeof H=="boolean"?p.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:z,className:"".concat(ue,"-quick-jumper-button")},I.jump_to_confirm):p.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),Ae=p.a.createElement("div",{className:"".concat(ue,"-quick-jumper")},I.jump_to,p.a.createElement("input",{disabled:z,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),I.page,pe)),p.a.createElement("li",{className:"".concat(ue)},Se,Ae)}}]),v}(p.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var u=o,h=j("N2Kk");function s(){}function l(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function t(R,C,v){return v}function S(R,C,v){var _=typeof R=="undefined"?C.pageSize:R;return Math.floor((v.total-1)/_)+1}var x=function(R){Object(y.a)(v,R);var C=Object(T.a)(v);function v(_){var E;Object(M.a)(this,v),E=C.call(this,_),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(S(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(V,W){var H=E.props.prefixCls,G=V||p.a.createElement("button",{type:"button","aria-label":W,className:"".concat(H,"-item-link")});return typeof V=="function"&&(G=p.a.createElement(V,Object(O.a)({},E.props))),G},E.savePaginationNode=function(V){E.paginationNode=V},E.isValid=function(V){return l(V)&&V!==E.state.current},E.shouldDisplayQuickJumper=function(){var V=E.props,W=V.showQuickJumper,H=V.pageSize,G=V.total;return G<=H?!1:W},E.handleKeyDown=function(V){(V.keyCode===a.ARROW_UP||V.keyCode===a.ARROW_DOWN)&&V.preventDefault()},E.handleKeyUp=function(V){var W=E.getValidValue(V),H=E.state.currentInputValue;W!==H&&E.setState({currentInputValue:W}),V.keyCode===a.ENTER?E.handleChange(W):V.keyCode===a.ARROW_UP?E.handleChange(W-1):V.keyCode===a.ARROW_DOWN&&E.handleChange(W+1)},E.changePageSize=function(V){var W=E.state.current,H=S(V,E.state,E.props);W=W>H?H:W,H===0&&(W=E.state.current),typeof V=="number"&&("pageSize"in E.props||E.setState({pageSize:V}),"current"in E.props||E.setState({current:W,currentInputValue:W})),E.props.onShowSizeChange(W,V),"onChange"in E.props&&E.props.onChange&&E.props.onChange(W,V)},E.handleChange=function(V){var W=E.props.disabled,H=V;if(E.isValid(H)&&!W){var G=S(void 0,E.state,E.props);H>G?H=G:H<1&&(H=1),"current"in E.props||E.setState({current:H,currentInputValue:H});var B=E.state.pageSize;return E.props.onChange(H,B),H}return E.state.current},E.prev=function(){E.hasPrev()&&E.handleChange(E.state.current-1)},E.next=function(){E.hasNext()&&E.handleChange(E.state.current+1)},E.jumpPrev=function(){E.handleChange(E.getJumpPrevPage())},E.jumpNext=function(){E.handleChange(E.getJumpNextPage())},E.hasPrev=function(){return E.state.current>1},E.hasNext=function(){return E.state.current<S(void 0,E.state,E.props)},E.runIfEnter=function(V,W){if(V.key==="Enter"||V.charCode===13){for(var H=arguments.length,G=new Array(H>2?H-2:0),B=2;B<H;B++)G[B-2]=arguments[B];W.apply(void 0,G)}},E.runIfEnterPrev=function(V){E.runIfEnter(V,E.prev)},E.runIfEnterNext=function(V){E.runIfEnter(V,E.next)},E.runIfEnterJumpPrev=function(V){E.runIfEnter(V,E.jumpPrev)},E.runIfEnterJumpNext=function(V){E.runIfEnter(V,E.jumpNext)},E.handleGoTO=function(V){(V.keyCode===a.ENTER||V.type==="click")&&E.handleChange(E.state.currentInputValue)};var w=_.onChange!==s,k="current"in _;k&&!w&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var I=_.defaultCurrent;"current"in _&&(I=_.current);var L=_.defaultPageSize;return"pageSize"in _&&(L=_.pageSize),I=Math.min(I,S(L,void 0,_)),E.state={current:I,currentInputValue:I,pageSize:L},E}return Object(m.a)(v,[{key:"componentDidUpdate",value:function(E,w){var k=this.props.prefixCls;if(w.current!==this.state.current&&this.paginationNode){var I=this.paginationNode.querySelector(".".concat(k,"-item-").concat(w.current));I&&document.activeElement===I&&I.blur()}}},{key:"getValidValue",value:function(E){var w=E.target.value,k=S(void 0,this.state,this.props),I=this.state.currentInputValue,L;return w===""?L=w:isNaN(Number(w))?L=I:w>=k?L=k:L=Number(w),L}},{key:"getShowSizeChanger",value:function(){var E=this.props,w=E.showSizeChanger,k=E.total,I=E.totalBoundaryShowSizeChanger;return typeof w!="undefined"?w:k>I}},{key:"renderPrev",value:function(E){var w=this.props,k=w.prevIcon,I=w.itemRender,L=I(E,"prev",this.getItemIcon(k,"prev page")),V=!this.hasPrev();return Object(b.isValidElement)(L)?Object(b.cloneElement)(L,{disabled:V}):L}},{key:"renderNext",value:function(E){var w=this.props,k=w.nextIcon,I=w.itemRender,L=I(E,"next",this.getItemIcon(k,"next page")),V=!this.hasNext();return Object(b.isValidElement)(L)?Object(b.cloneElement)(L,{disabled:V}):L}},{key:"render",value:function(){var E=this,w=this.props,k=w.prefixCls,I=w.className,L=w.style,V=w.disabled,W=w.hideOnSinglePage,H=w.total,G=w.locale,B=w.showQuickJumper,P=w.showLessItems,z=w.showTitle,J=w.showTotal,ue=w.simple,de=w.itemRender,Se=w.showPrevNextJumpers,Ae=w.jumpPrevIcon,pe=w.jumpNextIcon,Oe=w.selectComponentClass,ye=w.selectPrefixCls,ce=w.pageSizeOptions,ae=this.state,re=ae.current,fe=ae.pageSize,te=ae.currentInputValue;if(W===!0&&H<=fe)return null;var ne=S(void 0,this.state,this.props),Te=[],ie=null,Z=null,X=null,Q=null,_e=null,ve=B&&B.goButton,Re=P?1:2,Je=re-1>0?re-1:0,qe=re+1<ne?re+1:ne,rt=Object.keys(this.props).reduce(function(Ee,Ce){return(Ce.substr(0,5)==="data-"||Ce.substr(0,5)==="aria-"||Ce==="role")&&(Ee[Ce]=E.props[Ce]),Ee},{});if(ue)return ve&&(typeof ve=="boolean"?_e=p.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},G.jump_to_confirm):_e=p.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ve),_e=p.a.createElement("li",{title:z?"".concat(G.jump_to).concat(re,"/").concat(ne):null,className:"".concat(k,"-simple-pager")},_e)),p.a.createElement("ul",Object(N.a)({className:n()(k,"".concat(k,"-simple"),Object(g.a)({},"".concat(k,"-disabled"),V),I),style:L,ref:this.savePaginationNode},rt),p.a.createElement("li",{title:z?G.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(g.a)({},"".concat(k,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Je)),p.a.createElement("li",{title:z?"".concat(re,"/").concat(ne):null,className:"".concat(k,"-simple-pager")},p.a.createElement("input",{type:"text",value:te,disabled:V,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),p.a.createElement("span",{className:"".concat(k,"-slash")},"/"),ne),p.a.createElement("li",{title:z?G.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(g.a)({},"".concat(k,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(qe)),_e);if(ne<=3+Re*2){var ut={locale:G,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:z,itemRender:de};ne||Te.push(p.a.createElement(r,Object(N.a)({},ut,{key:"noPager",page:ne,className:"".concat(k,"-disabled")})));for(var dt=1;dt<=ne;dt+=1){var ft=re===dt;Te.push(p.a.createElement(r,Object(N.a)({},ut,{key:dt,page:dt,active:ft})))}}else{var Be=P?G.prev_3:G.prev_5,Ie=P?G.next_3:G.next_5;Se&&(ie=p.a.createElement("li",{title:z?Be:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(k,"-jump-prev"),Object(g.a)({},"".concat(k,"-jump-prev-custom-icon"),!!Ae))},de(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ae,"prev page"))),Z=p.a.createElement("li",{title:z?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(k,"-jump-next"),Object(g.a)({},"".concat(k,"-jump-next-custom-icon"),!!pe))},de(this.getJumpNextPage(),"jump-next",this.getItemIcon(pe,"next page")))),Q=p.a.createElement(r,{locale:G,last:!0,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ne,page:ne,active:!1,showTitle:z,itemRender:de}),X=p.a.createElement(r,{locale:G,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:z,itemRender:de});var at=Math.max(1,re-Re),ct=Math.min(re+Re,ne);re-1<=Re&&(ct=1+Re*2),ne-re<=Re&&(at=ne-Re*2);for(var $e=at;$e<=ct;$e+=1){var st=re===$e;Te.push(p.a.createElement(r,{locale:G,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:$e,page:$e,active:st,showTitle:z,itemRender:de}))}re-1>=Re*2&&re!==1+2&&(Te[0]=Object(b.cloneElement)(Te[0],{className:"".concat(k,"-item-after-jump-prev")}),Te.unshift(ie)),ne-re>=Re*2&&re!==ne-2&&(Te[Te.length-1]=Object(b.cloneElement)(Te[Te.length-1],{className:"".concat(k,"-item-before-jump-next")}),Te.push(Z)),at!==1&&Te.unshift(X),ct!==ne&&Te.push(Q)}var Ue=null;J&&(Ue=p.a.createElement("li",{className:"".concat(k,"-total-text")},J(H,[H===0?0:(re-1)*fe+1,re*fe>H?H:re*fe])));var Le=!this.hasPrev()||!ne,Me=!this.hasNext()||!ne;return p.a.createElement("ul",Object(N.a)({className:n()(k,I,Object(g.a)({},"".concat(k,"-disabled"),V)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},rt),Ue,p.a.createElement("li",{title:z?G.prev_page:null,onClick:this.prev,tabIndex:Le?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(g.a)({},"".concat(k,"-disabled"),Le)),"aria-disabled":Le},this.renderPrev(Je)),Te,p.a.createElement("li",{title:z?G.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(g.a)({},"".concat(k,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(qe)),p.a.createElement(u,{disabled:V,locale:G,rootPrefixCls:k,selectComponentClass:Oe,selectPrefixCls:ye,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:fe,pageSizeOptions:ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ve}))}}],[{key:"getDerivedStateFromProps",value:function(E,w){var k={};if("current"in E&&(k.current=E.current,E.current!==w.current&&(k.currentInputValue=k.current)),"pageSize"in E&&E.pageSize!==w.pageSize){var I=w.current,L=S(E.pageSize,w,E);I=I>L?L:I,"current"in E||(k.current=I,k.currentInputValue=I),k.pageSize=E.pageSize}return k}}]),v}(p.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:s,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:s,locale:h.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var f=x},"6RRn":function(F,q,j){"use strict";var N=j("wCXF"),g=j("n6Qo");j.d(q,"b",function(){return g.a});var O=j("IBYe"),M=j("6eGT"),m=j("hW8S");j.d(q,"a",function(){return m.a}),q.c=N.b},"6UM0":function(F,q,j){var N,g;(function(){var O;(function(){"use strict";var m=[function(p,d,n){var c=n(1).Beautifier,r=n(5).Options;function a(o,u){var h=new c(o,u);return h.beautify()}p.exports=a,p.exports.defaultOptions=function(){return new r}},function(p,d,n){var c=n(2).Output,r=n(3).Token,a=n(4),o=n(5).Options,u=n(7).Tokenizer,h=n(7).line_starters,s=n(7).positionable_operators,l=n(7).TOKEN;function t(P,z){return z.indexOf(P)!==-1}function S(P){return P.replace(/^\s+/g,"")}function x(P){for(var z={},J=0;J<P.length;J++)z[P[J].replace(/-/g,"_")]=P[J];return z}function f(P,z){return P&&P.type===l.RESERVED&&P.text===z}function R(P,z){return P&&P.type===l.RESERVED&&t(P.text,z)}var C=["case","return","do","if","throw","else","await","break","continue","async"],v=["before-newline","after-newline","preserve-newline"],_=x(v),E=[_.before_newline,_.preserve_newline],w={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function k(P,z){if(z.multiline_frame||z.mode===w.ForInitializer||z.mode===w.Conditional)return;P.remove_indent(z.start_line_index)}function I(P){P=P.replace(a.allLineBreaks,`
`);for(var z=[],J=P.indexOf(`
`);J!==-1;)z.push(P.substring(0,J)),P=P.substring(J+1),J=P.indexOf(`
`);return P.length&&z.push(P),z}function L(P){return P===w.ArrayLiteral}function V(P){return t(P,[w.Expression,w.ForInitializer,w.Conditional])}function W(P,z){for(var J=0;J<P.length;J++){var ue=P[J].trim();if(ue.charAt(0)!==z)return!1}return!0}function H(P,z){for(var J=0,ue=P.length,de;J<ue;J++)if(de=P[J],de&&de.indexOf(z)!==0)return!1;return!0}function G(P,z){z=z||{},this._source_text=P||"",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 o(z)}G.prototype.create_flags=function(P,z){var J=0;P&&(J=P.indentation_level,!this._output.just_added_newline()&&P.line_indent_level>J&&(J=P.line_indent_level));var ue={mode:z,parent:P,last_token:P?P.last_token:new r(l.START_BLOCK,""),last_word:P?P.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:J,alignment:0,line_indent_level:P?P.line_indent_level:J,start_line_index:this._output.get_line_number(),ternary_depth:0};return ue},G.prototype._reset=function(P){var z=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(w.BlockStatement);var J=new u(P,this._options);return this._tokens=J.tokenize(),P},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,z=this._reset(this._source_text),J=this._options.eol;this._options.eol==="auto"&&(J=`
`,z&&a.lineBreak.test(z||"")&&(J=z.match(a.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 P=this._output.get_code(J),P},G.prototype.handle_token=function(P,z){P.type===l.START_EXPR?this.handle_start_expr(P):P.type===l.END_EXPR?this.handle_end_expr(P):P.type===l.START_BLOCK?this.handle_start_block(P):P.type===l.END_BLOCK?this.handle_end_block(P):P.type===l.WORD?this.handle_word(P):P.type===l.RESERVED?this.handle_word(P):P.type===l.SEMICOLON?this.handle_semicolon(P):P.type===l.STRING?this.handle_string(P):P.type===l.EQUALS?this.handle_equals(P):P.type===l.OPERATOR?this.handle_operator(P):P.type===l.COMMA?this.handle_comma(P):P.type===l.BLOCK_COMMENT?this.handle_block_comment(P,z):P.type===l.COMMENT?this.handle_comment(P,z):P.type===l.DOT?this.handle_dot(P):P.type===l.EOF?this.handle_eof(P):P.type===l.UNKNOWN?this.handle_unknown(P,z):this.handle_unknown(P,z)},G.prototype.handle_whitespace_and_comments=function(P,z){var J=P.newlines,ue=this._options.keep_array_indentation&&L(this._flags.mode);if(P.comments_before)for(var de=P.comments_before.next();de;)this.handle_whitespace_and_comments(de,z),this.handle_token(de,z),de=P.comments_before.next();if(ue)for(var Se=0;Se<J;Se+=1)this.print_newline(Se>0,z);else if(this._options.max_preserve_newlines&&J>this._options.max_preserve_newlines&&(J=this._options.max_preserve_newlines),this._options.preserve_newlines&&J>1){this.print_newline(!1,z);for(var Ae=1;Ae<J;Ae+=1)this.print_newline(!0,z)}};var B=["async","break","continue","return","throw","yield"];G.prototype.allow_wrap_or_preserved_newline=function(P,z){if(z=z===void 0?!1:z,this._output.just_added_newline())return;var J=this._options.preserve_newlines&&P.newlines||z,ue=t(this._flags.last_token.text,s)||t(P.text,s);if(ue){var de=t(this._flags.last_token.text,s)&&t(this._options.operator_position,E)||t(P.text,s);J=J&&de}if(J)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(R(this._flags.last_token,B))return;this._output.set_wrap_point()}},G.prototype.print_newline=function(P,z){if(!z&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var J=this._tokens.peek();this._flags.mode===w.Statement&&!(this._flags.if_block&&f(J,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},G.prototype.print_token_line_indentation=function(P){this._output.just_added_newline()&&(this._options.keep_array_indentation&&P.newlines&&(P.text==="["||L(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(P.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))},G.prototype.print_token=function(P){if(this._output.raw){this._output.add_raw_token(P);return}if(this._options.comma_first&&P.previous&&P.previous.type===l.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var z=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(z),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(P),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(P),this._output.non_breaking_space=!0,this._output.add_token(P.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},G.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.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))},G.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===w.Statement&&k(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===w.ObjectLiteral&&this._flags.mode===w.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(P){var z=!1;return z=z||R(this._flags.last_token,["var","let","const"])&&P.type===l.WORD,z=z||f(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===w.ObjectLiteral&&this._flags.mode===w.Statement)&&R(this._flags.last_token,B)&&!P.newlines,z=z||f(this._flags.last_token,"else")&&!(f(P,"if")&&!P.comments_before),z=z||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===w.ForInitializer||this._previous_flags.mode===w.Conditional),z=z||this._flags.last_token.type===l.WORD&&this._flags.mode===w.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==l.WORD&&P.type!==l.RESERVED,z=z||this._flags.mode===w.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),z?(this.set_mode(w.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,R(P,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var z=w.Expression;if(P.text==="["){if(this._flags.last_token.type===l.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,h)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=w.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())),t(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,z=w.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=w.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,h)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var J=this._tokens.peek(-3);if(this._options.space_after_named_function&&J){var ue=this._tokens.peek(-4);R(J,["async","function"])||J.text==="*"&&R(ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===w.ObjectLiteral?(J.text==="{"||J.text===","||J.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(P);(this._flags.last_token.type===l.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===w.ObjectLiteral&&t(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===l.START_BLOCK?this.print_newline():(this._flags.last_token.type===l.END_EXPR||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===l.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(P){for(;this._flags.mode===w.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&L(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===l.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(P),this.restore_mode(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===w.Conditional&&(this._previous_flags.mode=w.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var z=this._tokens.peek(),J=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(w.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(w.BlockStatement):J&&(t(J.text,[":",","])&&t(z.type,[l.STRING,l.WORD,l.RESERVED])||t(z.text,["get","set","..."])&&t(J.type,[l.WORD,l.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(J.text,[":",","])?this.set_mode(w.BlockStatement):this.set_mode(w.ObjectLiteral):this._flags.last_token.type===l.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(w.BlockStatement):t(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(w.ObjectLiteral):this.set_mode(w.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ue=!z.comments_before&&z.text==="}",de=ue&&this._flags.last_word==="function"&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var Se=0,Ae=null;this._flags.inline_frame=!0;do if(Se+=1,Ae=this._tokens.peek(Se-1),Ae.newlines){this._flags.inline_frame=!1;break}while(Ae.type!==l.EOF&&!(Ae.type===l.END_BLOCK&&Ae.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(de||this._flags.last_token.type===l.EQUALS||R(this._flags.last_token,C)&&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===l.START_EXPR||this._flags.last_token.type===l.COMMA)&&((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(this._flags.last_token.type===l.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!ue&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===w.Statement;)this.restore_mode();var z=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(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(P)},G.prototype.handle_word=function(P){if(P.type===l.RESERVED){if(t(P.text,["set","get"])&&this._flags.mode!==w.ObjectLiteral)P.type=l.WORD;else if(P.text==="import"&&t(this._tokens.peek().text,["(","."]))P.type=l.WORD;else if(t(P.text,["as","from"])&&!this._flags.import_block)P.type=l.WORD;else if(this._flags.mode===w.ObjectLiteral){var z=this._tokens.peek();z.text===":"&&(P.type=l.WORD)}}if(this.start_of_statement(P)?R(this._flags.last_token,["var","let","const"])&&P.type===l.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!V(this._flags.mode)&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==l.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(f(P,"while")){this._output.space_before_token=!0,this.print_token(P),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&&f(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===w.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(P,["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(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),f(P,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===l.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,B)?this._output.space_before_token=!0:f(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===l.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(V(this._flags.mode)||L(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var J="NONE";if(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?J="SPACE":R(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?J="NEWLINE":(J="SPACE",this._output.space_before_token=!0):J="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===w.BlockStatement?J="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&V(this._flags.mode)?J="SPACE":this._flags.last_token.type===l.STRING?J="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===w.ObjectLiteral&&t(this._last_last_text,["{",","]))?J="SPACE":this._flags.last_token.type===l.START_BLOCK?this._flags.inline_frame?J="SPACE":J="NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,J="NEWLINE"),R(P,h)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?J="SPACE":J="NEWLINE"),R(P,["else","catch","finally"]))if((!(this._flags.last_token.type===l.END_BLOCK&&this._previous_flags.mode===w.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.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 J==="NEWLINE"?R(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?(this._flags.last_token.type!==l.START_EXPR||!R(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(f(P,"if")&&f(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(P,h)&&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():J==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===l.WORD||P.previous.type===l.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===l.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&f(P,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var z=this._tokens.peek();this._flags.mode===w.Statement&&!(this._flags.if_block&&f(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},G.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===l.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===l.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},G.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},G.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(V(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(P)):this._flags.mode===w.ObjectLiteral||this._flags.mode===w.Statement&&this._flags.parent.mode===w.ObjectLiteral?(this._flags.mode===w.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},G.prototype.handle_operator=function(P){var z=P.text==="*"&&(R(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),J=t(P.text,["-","+"])&&(t(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||t(this._flags.last_token.text,h)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var ue=!z;this.handle_whitespace_and_comments(P,ue)}if(P.text==="*"&&this._flags.last_token.type===l.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===l.OPERATOR&&t(this._options.operator_position,E)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==l.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,Se=!0,Ae=!1;if(P.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Ae=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!J&&!z&&this._options.preserve_newlines&&t(P.text,s)){var pe=P.text===":",Oe=pe&&Ae,ye=pe&&!Ae;switch(this._options.operator_position){case _.before_newline:this._output.space_before_token=!ye,this.print_token(P),(!pe||Oe)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case _.after_newline:this._output.space_before_token=!0,!pe||Oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case _.preserve_newline:ye||this.allow_wrap_or_preserved_newline(P),de=!(this._output.just_added_newline()||ye),this._output.space_before_token=de,this.print_token(P),this._output.space_before_token=!0;return}}if(z){this.allow_wrap_or_preserved_newline(P),de=!1;var ce=this._tokens.peek();Se=ce&&t(ce.type,[l.WORD,l.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),de=this._flags.last_token.type===l.START_BLOCK,Se=!1;else if(t(P.text,["--","++","!","~"])||J){if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),de=!1,Se=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var ae=R(this._flags.last_token,C)&&P.newlines;ae&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ae,!0)}this._flags.last_token.text===";"&&V(this._flags.mode)&&(de=!0),this._flags.last_token.type===l.RESERVED?de=!0:this._flags.last_token.type===l.END_EXPR?de=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===l.OPERATOR&&(de=t(P.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(P.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Se=!0)),(this._flags.mode===w.BlockStatement&&!this._flags.inline_frame||this._flags.mode===w.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(P),this._output.space_before_token=Se},G.prototype.handle_block_comment=function(P,z){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,z),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,z)},G.prototype.print_block_commment=function(P,z){var J=I(P.text),ue,de=!1,Se=!1,Ae=P.whitespace_before,pe=Ae.length;if(this.print_newline(!1,z),this.print_token_line_indentation(P),this._output.add_token(J[0]),this.print_newline(!1,z),J.length>1){for(J=J.slice(1),de=W(J,"*"),Se=H(J,Ae),de&&(this._flags.alignment=1),ue=0;ue<J.length;ue++)de?(this.print_token_line_indentation(P),this._output.add_token(S(J[ue]))):Se&&J[ue]?(this.print_token_line_indentation(P),this._output.add_token(J[ue].substring(pe))):(this._output.current_line.set_indent(-1),this._output.add_token(J[ue])),this.print_newline(!1,z);this._flags.alignment=0}},G.prototype.handle_comment=function(P,z){P.newlines?this.print_newline(!1,z):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,z)},G.prototype.handle_dot=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),R(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(P,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(P)},G.prototype.handle_unknown=function(P,z){this.print_token(P),P.text[P.text.length-1]===`
`&&this.print_newline(!1,z)},G.prototype.handle_eof=function(P){for(;this._flags.mode===w.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},p.exports.Beautifier=G},function(p){function d(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var r=new d(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},d.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},d.prototype.has_match=function(r){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(r))return!0;return!1},d.prototype.set_indent=function(r,a){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var a=r.lastIndexOf(`
`);a!==-1?this.__character_count=r.length-a:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function n(r,a){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),a=a||"",r.indent_level>0&&(a=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}n.prototype.get_indent_size=function(r,a){var o=this.__base_string_length;return a=a||0,r<0&&(o=0),o+=r*this.__indent_size,o+=a,o},n.prototype.get_indent_string=function(r,a){var o=this.__base_string;return a=a||0,r<0&&(r=0,o=""),a+=r*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,a=0,o="";this.__indent_size&&r>=this.__indent_size&&(a=Math.floor(r/this.__indent_size),r-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function c(r,a){this.__indent_cache=new n(r,a),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(r,a){return this.__indent_cache.get_indent_string(r,a)},c.prototype.get_indent_size=function(r,a){return this.__indent_cache.get_indent_size(r,a)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(r){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return r!==`
`&&(o=o.replace(/[\n]/g,r)),o},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(r,a){return r=r||0,a=a||0,this.next_line.set_indent(r,a),this.__lines.length>1?(this.current_line.set_indent(r,a),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(r){for(var a=0;a<r.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),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(r){for(var a=this.__lines.length;r<a;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&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(r,a){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(r)!==0&&u.item(-1)!==a){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=c},function(p){function d(n,c,r,a){this.type=n,this.text=c,this.comments_before=null,this.newlines=r||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}p.exports.Token=d},function(p,d){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\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",a="\\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",o="(?:\\\\u[0-9a-fA-F]{4}|["+n+r+"])",u="(?:\\\\u[0-9a-fA-F]{4}|["+c+r+a+"])*";d.identifier=new RegExp(o+u,"g"),d.identifierStart=new RegExp(o),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+r+a+"])+");var h=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;d.newline=/[\n\r\u2028\u2029]/,d.lineBreak=new RegExp(`\r
|`+d.newline.source),d.allLineBreaks=new RegExp(d.lineBreak.source,"g")},function(p,d,n){var c=n(6).Options,r=["before-newline","after-newline","preserve-newline"];function a(o){c.call(this,o,"js");var u=this.raw_options.brace_style||null;u==="expand-strict"?this.raw_options.brace_style="expand":u==="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 h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var s=0;s<h.length;s++)h[s]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=h[s];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",r),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}a.prototype=new c,p.exports.Options=a},function(p){function d(r,a){this.raw_options=n(r,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(r,a){var o=this.raw_options[r],u=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(u=o.concat()):typeof o=="string"&&(u=o.split(/[^a-zA-Z0-9_\/\-]+/)),u},d.prototype._get_boolean=function(r,a){var o=this.raw_options[r],u=o===void 0?!!a:!!o;return u},d.prototype._get_characters=function(r,a){var o=this.raw_options[r],u=a||"";return typeof o=="string"&&(u=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},d.prototype._get_number=function(r,a){var o=this.raw_options[r];a=parseInt(a,10),isNaN(a)&&(a=0);var u=parseInt(o,10);return isNaN(u)&&(u=a),u},d.prototype._get_selection=function(r,a,o){var u=this._get_selection_list(r,a,o);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[r]+"'");return u[0]},d.prototype._get_selection_list=function(r,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var u=this._get_array(r,o);if(!this._is_valid_selection(u,a))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[r]+"'");return u},d.prototype._is_valid_selection=function(r,a){return r.length&&a.length&&!r.some(function(o){return a.indexOf(o)===-1})};function n(r,a){var o={};r=c(r);var u;for(u in r)u!==a&&(o[u]=r[u]);if(a&&r[a])for(u in r[a])o[u]=r[a][u];return o}function c(r){var a={},o;for(o in r){var u=o.replace(/-/g,"_");a[u]=r[o]}return a}p.exports.Options=d,p.exports.normalizeOpts=c,p.exports.mergeOpts=n},function(p,d,n){var c=n(8).InputScanner,r=n(9).Tokenizer,a=n(9).TOKEN,o=n(13).Directives,u=n(4),h=n(12).Pattern,s=n(14).TemplatablePattern;function l(W,H){return H.indexOf(W)!==-1}var t={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:a.START,RAW:a.RAW,EOF:a.EOF},S=new o(/\/\*/,/\*\//),x=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,f=/[0-9]/,R=/[^\d\.]/,C=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var _=new RegExp(v),E="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),w=E.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),k=new RegExp("^(?:"+w.join("|")+")$"),I,L=function(W,H){r.call(this,W,H),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new h(this._input),B=new s(this._input).read_options(this._options);this.__patterns={template:B,identifier:B.starting_with(u.identifier).matching(u.identifierMatch),number:G.matching(x),punct:G.matching(_),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(/<!--/),html_comment_end:G.matching(/-->/),include:G.starting_with(/#include/).until_after(u.lineBreak),shebang:G.starting_with(/#!/).until_after(u.lineBreak),xml:G.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:B.until(/['\\\n\r\u2028\u2029]/),double_quote:B.until(/["\\\n\r\u2028\u2029]/),template_text:B.until(/[`\\$]/),template_expression:B.until(/[`}\\]/)}};L.prototype=new r,L.prototype._is_comment=function(W){return W.type===t.COMMENT||W.type===t.BLOCK_COMMENT||W.type===t.UNKNOWN},L.prototype._is_opening=function(W){return W.type===t.START_BLOCK||W.type===t.START_EXPR},L.prototype._is_closing=function(W,H){return(W.type===t.END_BLOCK||W.type===t.END_EXPR)&&H&&(W.text==="]"&&H.text==="["||W.text===")"&&H.text==="("||W.text==="}"&&H.text==="{")},L.prototype._reset=function(){I=!1},L.prototype._get_next_token=function(W,H){var G=null;this._readWhitespace();var B=this._input.peek();return B===null?this._create_token(t.EOF,""):(G=G||this._read_non_javascript(B),G=G||this._read_string(B),G=G||this._read_word(W),G=G||this._read_singles(B),G=G||this._read_comment(B),G=G||this._read_regexp(B,W),G=G||this._read_xml(B,W),G=G||this._read_punctuation(),G=G||this._create_token(t.UNKNOWN,this._input.next()),G)},L.prototype._read_word=function(W){var H;if(H=this.__patterns.identifier.read(),H!=="")return H=H.replace(u.allLineBreaks,`
`),!(W.type===t.DOT||W.type===t.RESERVED&&(W.text==="set"||W.text==="get"))&&k.test(H)?(H==="in"||H==="of")&&(W.type===t.WORD||W.type===t.STRING)?this._create_token(t.OPERATOR,H):this._create_token(t.RESERVED,H):this._create_token(t.WORD,H);if(H=this.__patterns.number.read(),H!=="")return this._create_token(t.WORD,H)},L.prototype._read_singles=function(W){var H=null;return W==="("||W==="["?H=this._create_token(t.START_EXPR,W):W===")"||W==="]"?H=this._create_token(t.END_EXPR,W):W==="{"?H=this._create_token(t.START_BLOCK,W):W==="}"?H=this._create_token(t.END_BLOCK,W):W===";"?H=this._create_token(t.SEMICOLON,W):W==="."&&R.test(this._input.peek(1))?H=this._create_token(t.DOT,W):W===","&&(H=this._create_token(t.COMMA,W)),H&&this._input.next(),H},L.prototype._read_punctuation=function(){var W=this.__patterns.punct.read();if(W!=="")return W==="="?this._create_token(t.EQUALS,W):W==="?."?this._create_token(t.DOT,W):this._create_token(t.OPERATOR,W)},L.prototype._read_non_javascript=function(W){var H="";if(W==="#"){if(this._is_first_token()&&(H=this.__patterns.shebang.read(),H))return this._create_token(t.UNKNOWN,H.trim()+`
`);if(H=this.__patterns.include.read(),H)return this._create_token(t.UNKNOWN,H.trim()+`
`);W=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(f)){do W=this._input.next(),G+=W;while(this._input.hasNext()&&W!=="#"&&W!=="=");return W==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,G)}this._input.back()}else if(W==="<"&&this._is_first_token()){if(H=this.__patterns.html_comment_start.read(),H){for(;this._input.hasNext()&&!this._input.testChar(u.newline);)H+=this._input.next();return I=!0,this._create_token(t.COMMENT,H)}}else if(I&&W==="-"&&(H=this.__patterns.html_comment_end.read(),H))return I=!1,this._create_token(t.COMMENT,H);return null},L.prototype._read_comment=function(W){var H=null;if(W==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var B=S.get_directives(G);B&&B.ignore==="start"&&(G+=S.readIgnored(this._input)),G=G.replace(u.allLineBreaks,`
`),H=this._create_token(t.BLOCK_COMMENT,G),H.directives=B}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),H=this._create_token(t.COMMENT,G))}return H},L.prototype._read_string=function(W){if(W==="`"||W==="'"||W==='"'){var H=this._input.next();return this.has_char_escapes=!1,W==="`"?H+=this._read_string_recursive("`",!0,"${"):H+=this._read_string_recursive(W),this.has_char_escapes&&this._options.unescape_strings&&(H=V(H)),this._input.peek()===W&&(H+=this._input.next()),H=H.replace(u.allLineBreaks,`
`),this._create_token(t.STRING,H)}return null},L.prototype._allow_regexp_or_xml=function(W){return W.type===t.RESERVED&&l(W.text,["return","case","throw","else","do","typeof","yield"])||W.type===t.END_EXPR&&W.text===")"&&W.opened.previous.type===t.RESERVED&&l(W.opened.previous.text,["if","while","for"])||l(W.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},L.prototype._read_regexp=function(W,H){if(W==="/"&&this._allow_regexp_or_xml(H)){for(var G=this._input.next(),B=!1,P=!1;this._input.hasNext()&&(B||P||this._input.peek()!==W)&&!this._input.testChar(u.newline);)G+=this._input.peek(),B?B=!1:(B=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===W&&(G+=this._input.next(),G+=this._input.read(u.identifier)),this._create_token(t.STRING,G)}return null},L.prototype._read_xml=function(W,H){if(this._options.e4x&&W==="<"&&this._allow_regexp_or_xml(H)){var G="",B=this.__patterns.xml.read_match();if(B){for(var P=B[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=P.indexOf("{")===0,J=0;B;){var ue=!!B[1],de=B[2],Se=!!B[B.length-1]||de.slice(0,8)==="![CDATA[";if(!Se&&(de===P||z&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ue?--J:++J),G+=B[0],J<=0)break;B=this.__patterns.xml.read_match()}return B||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(u.allLineBreaks,`
`),this._create_token(t.STRING,G)}}return null};function V(W){for(var H="",G=0,B=new c(W),P=null;B.hasNext();)if(P=B.match(/([\s]|[^\\]|\\\\)+/g),P&&(H+=P[0]),B.peek()==="\\"){if(B.next(),B.peek()==="x")P=B.match(/x([0-9A-Fa-f]{2})/g);else if(B.peek()==="u")P=B.match(/u([0-9A-Fa-f]{4})/g);else{H+="\\",B.hasNext()&&(H+=B.next());continue}if(!P)return W;if(G=parseInt(P[1],16),G>126&&G<=255&&P[0].indexOf("x")===0)return W;if(G>=0&&G<32){H+="\\"+P[0];continue}else G===34||G===39||G===92?H+="\\"+String.fromCharCode(G):H+=String.fromCharCode(G)}return H}L.prototype._read_string_recursive=function(W,H,G){var B,P;W==="'"?P=this.__patterns.single_quote:W==='"'?P=this.__patterns.double_quote:W==="`"?P=this.__patterns.template_text:W==="}"&&(P=this.__patterns.template_expression);for(var z=P.read(),J="";this._input.hasNext();){if(J=this._input.next(),J===W||!H&&u.newline.test(J)){this._input.back();break}else J==="\\"&&this._input.hasNext()?(B=this._input.peek(),B==="x"||B==="u"?this.has_char_escapes=!0:B==="\r"&&this._input.peek(1)===`
`&&this._input.next(),J+=this._input.next()):G&&(G==="${"&&J==="$"&&this._input.peek()==="{"&&(J+=this._input.next()),G===J&&(W==="`"?J+=this._read_string_recursive("}",H,"`"):J+=this._read_string_recursive("`",H,"${"),this._input.hasNext()&&(J+=this._input.next())));J+=P.read(),z+=J}return z},p.exports.Tokenizer=L,p.exports.TOKEN=t,p.exports.positionable_operators=C.slice(),p.exports.line_starters=E.slice()},function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function n(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},n.prototype.peek=function(c){var r=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(r=this.__input.charAt(c)),r},n.prototype.__match=function(c,r){c.lastIndex=r;var a=c.exec(this.__input);return a&&!(d&&c.sticky)&&(a.index!==r&&(a=null)),a},n.prototype.test=function(c,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(c,r):!1},n.prototype.testChar=function(c,r){var a=this.peek(r);return c.lastIndex=0,a!==null&&c.test(a)},n.prototype.match=function(c){var r=this.__match(c,this.__position);return r?this.__position+=r[0].length:r=null,r},n.prototype.read=function(c,r,a){var o="",u;return c&&(u=this.match(c),u&&(o+=u[0])),r&&(u||!c)&&(o+=this.readUntil(r,a)),o},n.prototype.readUntil=function(c,r){var a="",o=this.__position;c.lastIndex=this.__position;var u=c.exec(this.__input);return u?(o=u.index,r&&(o+=u[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},n.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},n.prototype.get_regexp=function(c,r){var a=null,o="g";return r&&d&&(o="y"),typeof c=="string"&&c!==""?a=new RegExp(c,o):c&&(a=new RegExp(c.source,o)),a},n.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(c){var r=this.__position,a=this.readUntilAfter(c);return this.__position=r,a},n.prototype.lookBack=function(c){var r=this.__position-1;return r>=c.length&&this.__input.substring(r-c.length,r).toLowerCase()===c},p.exports.InputScanner=n},function(p,d,n){var c=n(8).InputScanner,r=n(3).Token,a=n(10).TokenStream,o=n(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},h=function(s,l){this._input=new c(s),this._options=l||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};h.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var s,l=new r(u.START,""),t=null,S=[],x=new a;l.type!==u.EOF;){for(s=this._get_next_token(l,t);this._is_comment(s);)x.add(s),s=this._get_next_token(l,t);x.isEmpty()||(s.comments_before=x,x=new a),s.parent=t,this._is_opening(s)?(S.push(t),t=s):t&&this._is_closing(s,t)&&(s.opened=t,t.closed=s,t=S.pop(),s.parent=t),s.previous=l,l.next=s,this.__tokens.add(s),l=s}return this.__tokens},h.prototype._is_first_token=function(){return this.__tokens.isEmpty()},h.prototype._reset=function(){},h.prototype._get_next_token=function(s,l){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(u.RAW,t):this._create_token(u.EOF,"")},h.prototype._is_comment=function(s){return!1},h.prototype._is_opening=function(s){return!1},h.prototype._is_closing=function(s,l){return!1},h.prototype._create_token=function(s,l){var t=new r(s,l,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},h.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},p.exports.Tokenizer=h,p.exports.TOKEN=u},function(p){function d(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position<this.__tokens_length},d.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},d.prototype.peek=function(n){var c=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(c=this.__tokens[n]),c},d.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},p.exports.TokenStream=d},function(p,d,n){var c=n(12).Pattern;function r(a,o){c.call(this,a,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new c,r.prototype.__set_whitespace_patterns=function(a,o){a+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var o=this.__split(this._newline_regexp,a);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return a},r.prototype.matching=function(a,o){var u=this._create();return u.__set_whitespace_patterns(a,o),u._update(),u},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(a,o){a.lastIndex=0;for(var u=0,h=[],s=a.exec(o);s;)h.push(o.substring(u,s.index)),u=s.index+s[0].length,s=a.exec(o);return u<o.length?h.push(o.substring(u,o.length)):h.push(""),h},p.exports.WhitespacePattern=r},function(p){function d(n,c){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}d.prototype.read=function(){var n=this._input.read(this._starting_pattern);return(!this._starting_pattern||n)&&(n+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),n},d.prototype.read_match=function(){return this._input.match(this._match_pattern)},d.prototype.until_after=function(n){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(n),c._update(),c},d.prototype.until=function(n){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(n),c._update(),c},d.prototype.starting_with=function(n){var c=this._create();return c._starting_pattern=this._input.get_regexp(n,!0),c._update(),c},d.prototype.matching=function(n){var c=this._create();return c._match_pattern=this._input.get_regexp(n,!0),c._update(),c},d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){},p.exports.Pattern=d},function(p){function d(n,c){n=typeof n=="string"?n:n.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(n);r;)c[r[1]]=r[2],r=this.__directive_pattern.exec(n);return c},d.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},function(p,d,n){var c=n(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(o,u){c.call(this,o,u),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var h=new c(o);this.__patterns={handlebars_comment:h.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:h.starting_with(/{{{/).until_after(/}}}/),handlebars:h.starting_with(/{{/).until_after(/}}/),php:h.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:h.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:h.starting_with(/{%/).until_after(/%}/),django_value:h.starting_with(/{{/).until_after(/}}/),django_comment:h.starting_with(/{#/).until_after(/#}/),smarty:h.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:h.starting_with(/{\*/).until_after(/\*}/),smarty_literal:h.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new c,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(o){var u=this._create();return u._disabled[o]=!0,u._update(),u},a.prototype.read_options=function(o){var u=this._create();for(var h in r)u._disabled[h]=o.templating.indexOf(h)===-1;return u._update(),u},a.prototype.exclude=function(o){var u=this._create();return u._excluded[o]=!0,u._update(),u},a.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),o+=u,u=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},a.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},a.prototype._read_template=function(){var o="",u=this._input.peek();if(u==="<"){var h=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&h==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&h==="%"&&(o=o||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},p.exports.TemplatablePattern=a}],y={};function T(p){var d=y[p];if(d!==void 0)return d.exports;var n=y[p]={exports:{}};return m[p](n,n.exports,T),n.exports}var b=T(0);O=b})();var M=O;!(N=[],g=function(){return{js_beautify:M}}.apply(q,N),g!==void 0&&(F.exports=g))})()},"6eGT":function(F,q,j){"use strict";function N(g){return null}q.a=N},"7Cbv":function(F,q,j){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function O(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(g)}var M=/^(?:[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(r){return typeof r=="string"&&M.test(r)}for(var y=m,T=[],b=0;b<256;++b)T.push((b+256).toString(16).substr(1));function p(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(T[r[a+0]]+T[r[a+1]]+T[r[a+2]]+T[r[a+3]]+"-"+T[r[a+4]]+T[r[a+5]]+"-"+T[r[a+6]]+T[r[a+7]]+"-"+T[r[a+8]]+T[r[a+9]]+"-"+T[r[a+10]]+T[r[a+11]]+T[r[a+12]]+T[r[a+13]]+T[r[a+14]]+T[r[a+15]]).toLowerCase();if(!y(o))throw TypeError("Stringified UUID is invalid");return o}var d=p;function n(r,a,o){r=r||{};var u=r.random||(r.rng||O)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,a){o=o||0;for(var h=0;h<16;++h)a[o+h]=u[h];return a}return d(u)}var c=q.a=n},"7ahc":function(F,q,j){"use strict";j.d(q,"a",function(){return S});var N=j("k1fw"),g=j("0Owb"),O=j("+L6B"),M=j("2/Rp"),m=j("y8nQ"),y=j("Vl3Y"),T=j("tJVT"),b=j("OaEy"),p=j("2fM7"),d=j("q1tI"),n=j.n(d),c=j("VrN/"),r=j.n(c),a=j("p77/"),o=j.n(a),u=j("c5Ni"),h=j.n(u),s=p.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},t={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};q.b=function(x){var f=x.callback,R=x.onCancel,C=Object(d.useState)("python"),v=Object(T.a)(C,2),_=v[0],E=v[1];function w(I){E(t[I][1])}function k(I){f(I)}return n.a.createElement(y.a,Object(g.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:k}),n.a.createElement(y.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(p.a,{onChange:w},Object.keys(t).map(function(I){return n.a.createElement(s,{key:I,value:I},t[I][0])}))),n.a.createElement(y.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(S,{mode:_})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(M.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function S(x){var f=x.value,R=x.onChange,C=x.mode,v=x.options,_=v===void 0?{}:v,E=Object(d.useRef)(),w=Object(d.useState)(),k=Object(T.a)(w,2),I=k[0],L=k[1];return Object(d.useEffect)(function(){if(I){function V(W){var H=W.getValue();R&&R(H)}return I.on("change",V),function(){I.off("change",V)}}},[I,R]),Object(d.useEffect)(function(){I&&I.setOption("mode",C)},[I,C]),Object(d.useEffect)(function(){I&&((f!==I.getValue()||f==="")&&setTimeout(function(){I.setValue(f||" ")},300))},[I,f]),Object(d.useEffect)(function(){if(E.current&&!I){var V=r.a.fromTextArea(E.current,Object(N.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_));L(V)}},[E.current,I]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:E}))}},"815F":function(F,q,j){"use strict";j.d(q,"e",function(){return T}),j.d(q,"c",function(){return p}),j.d(q,"d",function(){return d}),j.d(q,"a",function(){return c}),j.d(q,"f",function(){return r}),j.d(q,"b",function(){return a});var N=j("KQm4"),g=j("VTBJ"),O=j("Ff2n"),M=j("Zm9Q"),m=j("Kwbf"),y=j("OZM5");function T(o,u){return o!=null?o:u}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=new Map;function h(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(s||[]).forEach(function(t){var S=t.key,x=t.children;Object(m.a)(S!=null,"Tree node must have a certain key: [".concat(l).concat(S,"]"));var f=String(S);Object(m.a)(!u.has(f)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(f)),u.set(f,!0),h(x,"".concat(l).concat(f," > "))})}h(o)}function p(o){function u(h){var s=Object(M.a)(h);return s.map(function(l){if(!Object(y.i)(l))return Object(m.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var t=l.key,S=l.props,x=S.children,f=Object(O.a)(S,["children"]),R=Object(g.a)({key:t},f),C=u(x);return C.length&&(R.children=C),R}).filter(function(l){return l})}return u(o)}function d(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=new Set(u===!0?[]:u),s=[];function l(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(x,f){var R=Object(y.h)(S?S.pos:"0",f),C=T(x.key,R),v=Object(g.a)(Object(g.a)({},x),{},{parent:S,pos:R,children:null,data:x,isStart:[].concat(Object(N.a)(S?S.isStart:[]),[f===0]),isEnd:[].concat(Object(N.a)(S?S.isEnd:[]),[f===t.length-1])});return s.push(v),u===!0||h.has(C)?v.children=l(x.children||[],v):v.children=[],v})}return l(o),s}function n(o,u,h){var s;h?typeof h=="string"?s=function(S){return S[h]}:typeof h=="function"&&(s=function(S){return h(S)}):s=function(S,x){return T(S.key,x)};function l(t,S,x){var f=t?t.children:o,R=t?Object(y.h)(x.pos,S):"0";if(t){var C=s(t,R),v={node:t,index:S,pos:R,key:C,parentPos:x.node?x.pos:null,level:x.level+1};u(v)}f&&f.forEach(function(_,E){l(_,E,{node:t,pos:R,level:x?x.level+1:-1})})}l(null)}function c(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=u.initWrapper,s=u.processEntity,l=u.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},x={},f={posEntities:S,keyEntities:x};return h&&(f=h(f)||f),n(o,function(R){var C=R.node,v=R.index,_=R.pos,E=R.key,w=R.parentPos,k=R.level,I={node:C,index:v,key:E,pos:_,level:k},L=T(E,_);S[_]=I,x[L]=I,I.parent=S[w],I.parent&&(I.parent.children=I.parent.children||[],I.parent.children.push(I)),s&&s(I,f)},t),l&&l(f),f}function r(o,u){var h=u.expandedKeys,s=u.selectedKeys,l=u.loadedKeys,t=u.loadingKeys,S=u.checkedKeys,x=u.halfCheckedKeys,f=u.dragOverNodeKey,R=u.dropPosition,C=u.keyEntities,v=C[o],_={eventKey:o,expanded:h.indexOf(o)!==-1,selected:s.indexOf(o)!==-1,loaded:l.indexOf(o)!==-1,loading:t.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:x.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:f===o&&R===0,dragOverGapTop:f===o&&R===-1,dragOverGapBottom:f===o&&R===1};return _}function a(o){var u=o.data,h=o.expanded,s=o.selected,l=o.checked,t=o.loaded,S=o.loading,x=o.halfChecked,f=o.dragOver,R=o.dragOverGapTop,C=o.dragOverGapBottom,v=o.pos,_=o.active,E=Object(g.a)(Object(g.a)({},u),{},{expanded:h,selected:s,checked:l,loaded:t,loading:S,halfChecked:x,dragOver:f,dragOverGapTop:R,dragOverGapBottom:C,pos:v,active:_});return"props"in E||Object.defineProperty(E,"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`."),o}}),E}},"8EBN":function(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g<N.modeInfo.length;g++){var O=N.modeInfo[g];O.mimes&&(O.mime=O.mimes[0])}N.findModeByMIME=function(M){M=M.toLowerCase();for(var m=0;m<N.modeInfo.length;m++){var y=N.modeInfo[m];if(y.mime==M)return y;if(y.mimes){for(var T=0;T<y.mimes.length;T++)if(y.mimes[T]==M)return y}}if(/\+xml$/.test(M))return N.findModeByMIME("application/xml");if(/\+json$/.test(M))return N.findModeByMIME("application/json")},N.findModeByExtension=function(M){M=M.toLowerCase();for(var m=0;m<N.modeInfo.length;m++){var y=N.modeInfo[m];if(y.ext){for(var T=0;T<y.ext.length;T++)if(y.ext[T]==M)return y}}},N.findModeByFileName=function(M){for(var m=0;m<N.modeInfo.length;m++){var y=N.modeInfo[m];if(y.file&&y.file.test(M))return y}var T=M.lastIndexOf("."),b=T>-1&&M.substring(T+1,M.length);if(b)return N.findModeByExtension(b)},N.findModeByName=function(M){M=M.toLowerCase();for(var m=0;m<N.modeInfo.length;m++){var y=N.modeInfo[m];if(y.name.toLowerCase()==M)return y;if(y.alias){for(var T=0;T<y.alias.length;T++)if(y.alias[T].toLowerCase()==M)return y}}}})},"8hTe":function(F,q,j){F.exports={button:"button___1wy9m"}},"9Bee":function(F,q,j){"use strict";var N=j("DYRE"),g=j("zeV3"),O=j("+L6B"),M=j("2/Rp"),m=j("k1fw"),y=j("9og8"),T=j("tJVT"),b=j("WmNS"),p=j.n(b),d=j("q1tI"),n=j.n(d),c=j("vg9a"),r=j("DlQD"),a=j.n(r),o=j("rUJ1");function u(le,K){var Y=le.match(/^(\s+)(?:```)/);if(Y===null)return K;var ee=Y[1];return K.split(`
`).map(function(ge){var se=ge.match(/^\s+/);if(se===null)return ge;var Ke=Object(T.a)(se,1),Ct=Ke[0];return Ct.length>=ee.length?ge.slice(ee.length):ge}).join(`
`)}var h=[],s=["<ul>"],l=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){h.length=0,s=["<ul>"]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(le,K,Y,ee){if(K>=le.length||le[K].level<=Y)return K;var ge=le[K];ee.push("<li><a href='#"+ge.anchor+"'>"+ge.text+"</a>"),K++;var se=[];return K=f(le,K,ge.level,se),se.length>0&&(ee.push("<ul>"),se.forEach(function(Ke){ee.push(Ke)}),ee.push("</ul>")),ee.push("</li>"),K=f(le,K,Y,ee),K}function R(){return f(h,0,0,s),s.push("</ul>"),s.join("")}var C={heading:function(K){var Y=t.exec(K);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},fences:function(K){var Y=this.rules.block.fences.exec(K);if(Y){var ee=Y[0],ge=u(ee,Y[3]||""),se=Y[2]?Y[2].trim():Y[2];if(["latex","katex","math"].indexOf(se)>=0){var Ke=E(),Ct=ge;ge=Ke,w[Ke]={type:"block",expression:Ct}}return{type:"code",raw:ee,lang:se,text:ge}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,E=function(){return"__special_katext_id_".concat(_++,"__")},w={};function k(){return w}function I(){_=0,w={}}function L(le){return le=le.replace(v,function(K,Y){var ee=E();return w[ee]={type:"inline",expression:Y},ee}),le}var V=l.listitem;l.listitem=function(le){return V(L(le))};var W=l.paragraph;l.paragraph=function(le){return W(L(le))};var H=l.tablecell;l.tablecell=function(le,K){return H(L(le),K)},l.code=function(le,K,Y){var ee=(K||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"<p class='editormd-tex'>".concat(le,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(K,'">').concat(Y?le:Object(o.escape)(le,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(Y?le:Object(o.escape)(le,!0))+"</code></pre>"},l.heading=function(le,K,Y){var ee=this.options.headerPrefix+Y.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return h.push({anchor:ee,level:K,text:le}),"<h"+K+' id="'+ee+'">'+le+"</h"+K+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:C,renderer:l});var G=a.a,B=j("SJMd"),P=j("ulZh"),z=j.n(P),J=j("m3rI"),ue=j("Oy/b"),de=j("p5ED"),Se=j("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 Ae=function(le,K){return(Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ee){Y.__proto__=ee}||function(Y,ee){for(var ge in ee)Object.prototype.hasOwnProperty.call(ee,ge)&&(Y[ge]=ee[ge])})(le,K)};function pe(le,K){function Y(){this.constructor=le}Ae(le,K),le.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}function Oe(le,K,Y,ee){return new(Y||(Y=Promise))(function(ge,se){function Ke(Er){try{Xt(ee.next(Er))}catch(Pt){se(Pt)}}function Ct(Er){try{Xt(ee.throw(Er))}catch(Pt){se(Pt)}}function Xt(Er){var Pt;Er.done?ge(Er.value):(Pt=Er.value,Pt instanceof Y?Pt:new Y(function(Lr){Lr(Pt)})).then(Ke,Ct)}Xt((ee=ee.apply(le,K||[])).next())})}function ye(le,K){var Y,ee,ge,se,Ke={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return se={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ct(Xt){return function(Er){return function(Pt){if(Y)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(Y=1,ee&&(ge=2&Pt[0]?ee.return:Pt[0]?ee.throw||((ge=ee.return)&&ge.call(ee),0):ee.next)&&!(ge=ge.call(ee,Pt[1])).done)return ge;switch(ee=0,ge&&(Pt=[2&Pt[0],ge.value]),Pt[0]){case 0:case 1:ge=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ee=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ge=Ke.trys,(ge=ge.length>0&&ge[ge.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ge||Pt[1]>ge[0]&&Pt[1]<ge[3])){Ke.label=Pt[1];break}if(Pt[0]===6&&Ke.label<ge[1]){Ke.label=ge[1],ge=Pt;break}if(ge&&Ke.label<ge[2]){Ke.label=ge[2],Ke.ops.push(Pt);break}ge[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Pt=K.call(le,Ke)}catch(Lr){Pt=[6,Lr],ee=0}finally{Y=ge=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([Xt,Er])}}}function ce(){for(var le=0,K=0,Y=arguments.length;K<Y;K++)le+=arguments[K].length;var ee=Array(le),ge=0;for(K=0;K<Y;K++)for(var se=arguments[K],Ke=0,Ct=se.length;Ke<Ct;Ke++,ge++)ee[ge]=se[Ke];return ee}var ae=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(K,Y){for(var ee=0,ge=Y;ee<ge.length;ee++){var se=ge[ee],Ke=se[0],Ct=se[1];K.setAttribute(Ke,Ct)}},le.createRect=function(K,Y,ee){var ge=document.createElementNS("http://www.w3.org/2000/svg","rect");return ge.setAttribute("width",K.toString()),ge.setAttribute("height",Y.toString()),ee&&le.setAttributes(ge,ee),ge},le.createLine=function(K,Y,ee,ge,se){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",K.toString()),Ke.setAttribute("y1",Y.toString()),Ke.setAttribute("x2",ee.toString()),Ke.setAttribute("y2",ge.toString()),se&&le.setAttributes(Ke,se),Ke},le.createPolygon=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",K),Y&&le.setAttributes(ee,Y),ee},le.createCircle=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(K/2).toString()),ee.setAttribute("cy",(K/2).toString()),ee.setAttribute("r",K.toString()),Y&&le.setAttributes(ee,Y),ee},le.createEllipse=function(K,Y,ee){var ge=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ge.setAttribute("cx",(K/2).toString()),ge.setAttribute("cy",(Y/2).toString()),ge.setAttribute("rx",(K/2).toString()),ge.setAttribute("ry",(Y/2).toString()),ee&&le.setAttributes(ge,ee),ge},le.createGroup=function(K){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&le.setAttributes(Y,K),Y},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(K,Y,ee,ge,se,Ke,Ct){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Xt,[["id",K],["orient",Y],["markerWidth",ee.toString()],["markerHeight",ge.toString()],["refX",se.toString()],["refY",Ke.toString()]]),Xt.appendChild(Ct),Xt},le.createText=function(K){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),K&&le.setAttributes(Y,K),Y},le.createTSpan=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=K,Y&&le.setAttributes(ee,Y),ee},le.createImage=function(K){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&le.setAttributes(Y,K),Y},le.createPoint=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=K,ee.y=Y,ee},le.createPath=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",K),Y&&le.setAttributes(ee,Y),ee},le}(),re=function(){function le(){}return le.addKey=function(K){le.key=K},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),fe=function(){function le(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return le.prototype.rasterize=function(K,Y,ee){var ge=this;return new Promise(function(se){var Ke=ee!==void 0?ee:document.createElement("canvas");K===null&&(ge.markersOnly=!0,ge.naturalSize=!1);var Ct=document.createElementNS("http://www.w3.org/2000/svg","svg");Ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ct.setAttribute("width",Y.width.baseVal.valueAsString),Ct.setAttribute("height",Y.height.baseVal.valueAsString),Ct.setAttribute("viewBox","0 0 "+Y.viewBox.baseVal.width.toString()+" "+Y.viewBox.baseVal.height.toString()),Ct.innerHTML=Y.innerHTML,ge.naturalSize===!0?(Ct.width.baseVal.value=K.naturalWidth,Ct.height.baseVal.value=K.naturalHeight):ge.width!==void 0&&ge.height!==void 0&&(Ct.width.baseVal.value=ge.width,Ct.height.baseVal.value=ge.height),Ke.width=Ct.width.baseVal.value,Ke.height=Ct.height.baseVal.value;var Xt=Ct.outerHTML,Er=Ke.getContext("2d");ge.markersOnly!==!0&&Er.drawImage(K,0,0,Ke.width,Ke.height);var Pt=window.URL,Lr=new Image(Ke.width,Ke.height);Lr.setAttribute("crossOrigin","anonymous");var Gr=new Blob([Xt],{type:"image/svg+xml"}),_n=Pt.createObjectURL(Gr);Lr.onload=function(){Er.drawImage(Lr,0,0),Pt.revokeObjectURL(_n);var Zn=Ke.toDataURL(ge.imageType,ge.imageQuality);se(Zn)},Lr.src=_n})},le}(),te=function(){},ne=function(){function le(K){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(K){return this.styleSheet===void 0&&this.addStyleSheet(),K.name=""+this.classNamePrefix+K.localName,this.classes.push(K),this.styleSheet.sheet.insertRule("."+K.name+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length),K},le.prototype.addRule=function(K){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(K),this.styleSheet.sheet.insertRule(K.selector+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var K;this.styleSheet=document.createElement("style"),((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).appendChild(this.styleSheet),this.addRule(new Te("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Te("@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;
`))},le.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),Te=function(le,K){this.selector=le,this.style=K},ie=function(le,K){this.localName=le,this.style=K},Z=function(){function le(K,Y,ee,ge,se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=K,this.displayMode=Y,this.markerItems=ee,this.uiStyleSettings=ge,this.styles=se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return le.prototype.show=function(K){var Y=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,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(se){var Ke=document.createElement("div");Ke.className=""+Y.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",se.typeName),Ke.innerHTML=se.icon,Ke.addEventListener("click",function(){Y.markerToolbarButtonClicked(Ke,se)}),Y.buttons.push(Ke),Y.markerButtons.push(Ke)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ge=document.createElement("div");ge.className=this.toolbarBlockStyleClass.name,ge.style.whiteSpace="nowrap",ge.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ge),this.addActionButton(ge,'<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(ge,'<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()},le.prototype.addButtonClickListener=function(K){this.buttonClickListeners.push(K)},le.prototype.removeButtonClickListener=function(K){this.buttonClickListeners.indexOf(K)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(K),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var K=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Y=0;Y<this.markerButtons.length;Y++)Y<K||Y===K&&this.markerButtons.length-1===K?this.markerButtonBlock.appendChild(this.markerButtons[Y]):(Y===K&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Y]))}},le.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")},le.prototype.resetButtonStyles=function(){var K=this;this.buttons.forEach(function(Y){Y.className=Y.className.replace(K.uiStyleSettings.toolbarButtonStyleColorsClassName?K.uiStyleSettings.toolbarButtonStyleColorsClassName:K.toolbarButtonStyleColorsClass.name,"").trim(),Y.className=Y.className.replace(K.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?K.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:K.toolbarActiveButtonStyleColorsClass.name,"").trim(),Y.className+=" "+(K.uiStyleSettings.toolbarButtonStyleColorsClassName?K.uiStyleSettings.toolbarButtonStyleColorsClassName:K.toolbarButtonStyleColorsClass.name)})},le.prototype.addActionButton=function(K,Y,ee){var ge=this,se=document.createElement("div");switch(se.className=""+this.toolbarButtonStyleClass.name,se.innerHTML=Y,se.setAttribute("data-action",ee),se.addEventListener("click",function(){ge.actionToolbarButtonClicked(se,ee)}),ee){case"select":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":se.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":se.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":se.style.fill=this.uiStyleSettings.closeButtonColor}K.appendChild(se),this.buttons.push(se)},le.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 K=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ie("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*K)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*K)+`px;
padding: `+K+`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 Te("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},le.prototype.markerToolbarButtonClicked=function(K,Y){this.setActiveButton(K),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(K,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(K){this.resetButtonStyles(),K.className=K.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),K.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(K){var Y=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===K});Y&&this.setActiveButton(Y)},le.prototype.setCurrentMarker=function(K){var Y=this;this.currentMarker=K,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){Y.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},le}(),X=function(){function le(K,Y,ee,ge){this.panels=[],this.panelButtons=[],this.markerjsContainer=K,this.displayMode=Y,this.uiStyleSettings=ee,this.styles=ge,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var K;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 Y=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: `+((K=this.uiStyleSettings.toolboxBackgroundColor)!==null&&K!==void 0?K:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
padding: `+Y+`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 Te("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},le.prototype.show=function(K){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(K){var Y,ee,ge=this;this.panels=K,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y: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(se){var Ke;se.uiStyleSettings=ge.uiStyleSettings;var Ct=document.createElement("div");Ct.className=ge.toolboxButtonStyleClass.name+" "+((Ke=ge.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ge.toolboxButtonStyleColorsClass.name),Ct.innerHTML=se.icon,Ct.title=se.title,Ct.addEventListener("click",function(){ge.panelButtonClick(se)}),ge.panelButtons.push(Ct),ge.buttonRow.appendChild(Ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(K){var Y=this,ee=-1;if(K!==this.activePanel){ee=this.panels.indexOf(K),this.panelRow.innerHTML="";var ge=K.getUi();ge.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ge),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=K}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(se,Ke){var Ct,Xt;se.className=Y.toolboxButtonStyleClass.name+" "+(Ke===ee?""+((Ct=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:Y.toolboxActiveButtonStyleColorsClass.name):""+((Xt=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:Y.toolboxButtonStyleColorsClass.name))})},le}(),Q=function(le,K){this.title=le,this.icon=K},_e=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ee,Ke.currentColor=ge,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(ge){var se=Y.getColorBox(ge);ee.appendChild(se),Y.colorBoxes.push(se)}),ee},K.prototype.getColorBox=function(Y){var ee=this,ge=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-ge,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=se-2+"px",Ke.style.height=se-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(se+2)/2+"px",Ke.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ee.setCurrentColor(Y,Ke)});var Ct=document.createElement("div");return Ct.style.display="inline-block",Ct.style.width=se-2+"px",Ct.style.height=se-2+"px",Ct.style.backgroundColor=Y,Ct.style.borderRadius=se/2+"px",Y==="transparent"&&(Ct.style.fill=this.uiStyleSettings.toolboxAccentColor,Ct.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Ke.appendChild(Ct),Ke},K.prototype.setCurrentColor=function(Y,ee){var ge=this;this.currentColor=Y,this.colorBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},K}(Q),ve=function(){function le(K,Y,ee){this._state="new",this._isSelected=!1,this._container=K,this._overlayContainer=Y,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(K){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(K,Y){},le.prototype.dblClick=function(K,Y){},le.prototype.manipulate=function(K){},le.prototype.pointerUp=function(K){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(K){this.container.childNodes.length>0?this.container.insertBefore(K,this.container.childNodes[0]):this.container.appendChild(K)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(K){this._state=K.state,this.notes=K.notes},le.prototype.scale=function(K,Y){},le.prototype.colorChanged=function(K){this.onColorChanged&&this.onColorChanged(K),this.stateChanged()},le.prototype.fillColorChanged=function(K){this.onFillColorChanged&&this.onFillColorChanged(K),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var K=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),K.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(K)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),Re=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(K){return this.topLeft.ownsTarget(K)?this.topLeft:this.topCenter.ownsTarget(K)?this.topCenter:this.topRight.ownsTarget(K)?this.topRight:this.centerLeft.ownsTarget(K)?this.centerLeft:this.centerRight.ownsTarget(K)?this.centerRight:this.bottomLeft.ownsTarget(K)?this.bottomLeft:this.bottomCenter.ownsTarget(K)?this.bottomCenter:this.bottomRight.ownsTarget(K)?this.bottomRight:void 0},le}(),Je=function(){function le(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},le}(),qe=function(){function le(){}return le.toITransformMatrix=function(K){return{a:K.a,b:K.b,c:K.c,d:K.d,e:K.e,f:K.f}},le.toSVGMatrix=function(K,Y){return K.a=Y.a,K.b=Y.b,K.c=Y.c,K.d=Y.d,K.e=Y.e,K.f=Y.f,K},le}(),rt=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.left=0,se.top=0,se.width=0,se.height=0,se.defaultSize={x:50,y:20},se.offsetX=0,se.offsetY=0,se.rotationAngle=0,se.CB_DISTANCE=10,se._suppressMarkerCreateEvent=!1,se.container.transform.baseVal.appendItem(ae.createTransform()),se.setupControlBox(),se}return pe(K,le),Object.defineProperty(K.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var ee=ae.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ge=this.unrotatePoint(Y);if(this.manipulationStartX=ge.x,this.manipulationStartY=ge.y,this.offsetX=ge.x-this.left,this.offsetY=ge.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 se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=se.x-this.width/2,this.top=se.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},K.prototype.pointerUp=function(Y){var ee=this.state;le.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},K.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},K.prototype.manipulate=function(Y){var ee=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):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(Y)},K.prototype.resize=function(Y){var ee=this.manipulationStartLeft,ge=this.manipulationStartWidth,se=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+Y.x-this.manipulationStartX,ge=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ge=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:se=this.manipulationStartTop+Y.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+Y.y-this.manipulationStartY}ge>=0?(this.left=ee,this.width=ge):(this.left=ee+ge,this.width=-ge),Ke>=0?(this.top=se,this.height=Ke):(this.top=se+Ke,this.height=-Ke),this.setSize()},K.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},K.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var ee=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},K.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},K.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ee=this.container.getCTM(),ge=ae.createPoint(Y.x,Y.y);return{x:(ge=ge.matrixTransform(ee)).x,y:ge.y}},K.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ee=this.container.getCTM();ee=ee.inverse();var ge=ae.createPoint(Y.x,Y.y);return{x:(ge=ge.matrixTransform(ee)).x,y:ge.y}},K.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=ae.createGroup();var Y=ae.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=ae.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=ae.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 Re,this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){var Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,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()},K.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()},K.prototype.createGrip=function(){var Y=new Je;return Y.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(Y.visual),Y},K.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,ee=-Y/2,ge=ee,se=(this.width+this.CB_DISTANCE)/2-Y/2,Ke=(this.height+this.CB_DISTANCE)/2-Y/2,Ct=this.height+this.CB_DISTANCE-Y/2,Xt=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,ge),this.positionGrip(this.controlGrips.topCenter.visual,se,ge),this.positionGrip(this.controlGrips.topRight.visual,Xt,ge),this.positionGrip(this.controlGrips.centerLeft.visual,ee,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Xt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Ct),this.positionGrip(this.controlGrips.bottomCenter.visual,se,Ct),this.positionGrip(this.controlGrips.bottomRight.visual,Xt,Ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,ge-3*this.CB_DISTANCE)},K.prototype.positionGrip=function(Y,ee,ge){var se=Y.transform.baseVal.getItem(0);se.setTranslate(ee,ge),Y.transform.baseVal.replaceItem(se,0)},K.prototype.hideControlBox=function(){this.controlBox.style.display="none"},K.prototype.showControlBox=function(){this.controlBox.style.display=""},K.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;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(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee);var ge=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:ge.x*Y,y:ge.y*ee});this.left=se.x,this.top=se.y,this.width=this.width*Y,this.height=this.height*ee,this.adjustControlBox()},K}(ve),ut=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},K.prototype.createVisual=function(){this.visual=ae.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)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},K.prototype.setSize=function(){le.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},K.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},K.prototype.restoreState=function(Y){var ee=Y;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setSize()},K.title="Rectangle marker",K}(rt),dt=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ee,Ke.currentWidth=ge,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(ge){var se=document.createElement("div");se.style.display="flex",se.style.flexGrow="2",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=ge===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentWidth(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.innerText=ge.toString(),Ke.style.marginRight="5px",se.appendChild(Ke);var Ct=document.createElement("div");Ct.style.minHeight="20px",Ct.style.flexGrow="2",Ct.style.display="flex",Ct.style.alignItems="center";var Xt=document.createElement("hr");Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop=ge+"px solid "+Y.uiStyleSettings.toolboxColor,Xt.style.flexGrow="2",Ct.appendChild(Xt),se.appendChild(Ct),Y.widthBoxes.push(se)}),ee},K.prototype.setCurrentWidth=function(Y,ee){var ge=this;this.currentWidth=Y,this.widthBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},K}(Q),ft=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ee,Ke.currentStyle=ge,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(ge){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/Y.styles.length-5+"%",se.style.borderColor=ge===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentStyle(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Ct=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Y.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ge!==""?'stroke-dasharray="'+ge+'"':"")+` />
</svg>`;Ke.innerHTML=Ct,se.appendChild(Ke),Y.styleBoxes.push(se)}),ee},K.prototype.setCurrentStyle=function(Y,ee){var ge=this;this.currentStyle=Y,this.styleBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},K}(Q),Be=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.strokePanel=new _e("Line color",ge.defaultColorSet,ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return pe(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="FrameMarker",K.title="Frame marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',K}(ut),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},at=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.x1=0,se.y1=0,se.x2=0,se.y2=0,se.defaultLength=50,se.manipulationStartX=0,se.manipulationStartY=0,se.manipulationStartX1=0,se.manipulationStartY1=0,se.manipulationStartX2=0,se.manipulationStartY2=0,se.setupControlBox(),se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.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")},K.prototype.pointerUp=function(Y){var ee=this.state;le.prototype.pointerUp.call(this,Y),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(Y),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},K.prototype.adjustVisual=function(){},K.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},K.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.y}this.adjustVisual(),this.adjustControlBox()},K.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){this.positionGrips()},K.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},K.prototype.createGrip=function(){var Y=new Je;return Y.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(Y.visual),Y},K.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},K.prototype.positionGrip=function(Y,ee,ge){var se=Y.transform.baseVal.getItem(0);se.setTranslate(ee,ge),Y.transform.baseVal.replaceItem(se,0)},K.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.x1=this.x1*Y,this.y1=this.y1*ee,this.x2=this.x2*Y,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},K}(ve),ct=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.strokePanel=new _e("Line color",ge.defaultColorSet,ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.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)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},K.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()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},K.typeName="LineMarker",K.title="Line marker",K.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',K}(at),$e=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ee,Ke.currentFont=ge,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(ge){var se=document.createElement("div");se.style.display="inline-block",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/Y.fonts.length-5+"%",se.style.borderColor=ge===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentFont(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ge,Ke.style.overflow="hidden";var Ct=document.createElement("div");Ct.style.whiteSpace="nowrap",Ct.style.overflow="hidden",Ct.style.textOverflow="ellipsis",Ct.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Ct),se.appendChild(Ke),Y.fontBoxes.push(se)}),ee},K.prototype.setCurrentFont=function(Y,ee){var ge=this;this.currentFont=Y,this.fontBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},K}(Q),st=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="your text here",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=ge.defaultColor,se.fontFamily=ge.defaultFontFamily,se.defaultSize={x:100,y:30},se.setColor=se.setColor.bind(se),se.setFont=se.setFont.bind(se),se.renderText=se.renderText.bind(se),se.sizeText=se.sizeText.bind(se),se.textEditDivClicked=se.textEditDivClicked.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.setSize=se.setSize.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.colorPanel=new _e("Color",ge.defaultColorSet,ge.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new $e("Font",ge.defaultFontFamilies,ge.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return pe(K,le),K.prototype.ownsTarget=function(Y){if(le.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(ge){ge===Y&&(ee=!0)}),ee},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.renderText=function(){var Y=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){Y.textElement.appendChild(ae.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},K.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),ee=1;if(Y.width>0&&Y.height>0){var ge=(1*this.width-this.width*this.padding*2/100)/Y.width,se=(1*this.height-this.height*this.padding*2/100)/Y.height;ee=Math.min(ge,se)}return ee},K.prototype.getTextPosition=function(Y){var ee=this.textElement.getBBox(),ge=0,se=0;return ee.width>0&&ee.height>0&&(ge=(this.width-ee.width*Y)/2,se=this.height/2-ee.height*Y/2),{x:ge,y:se}},K.prototype.sizeText=function(){var Y=this.textElement.getBBox(),ee=this.getTextScale(),ge=this.getTextPosition(ee);ge.y-=Y.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ge.x+"px, "+ge.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ge.x,ge.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},K.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},K.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},K.prototype.pointerUp=function(Y){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,Y),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},K.prototype.showTextEditor=function(){var Y=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(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,Y.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 ge=ee.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(ge)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},K.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Y=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ge=this.textElement.getBBox(),se={x:ge.width*Y,y:ge.height*Y};ee.x-=se.x/2,ee.y-=se.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*Y,12)+"px",this.textElement.style.display="none"}},K.prototype.textEditDivClicked=function(Y){this.text=Y.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},K.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},K.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},K.prototype.dblClick=function(Y,ee){le.prototype.dblClick.call(this,Y,ee),this.showTextEditor()},K.prototype.setColor=function(Y){this.textElement&&ae.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},K.prototype.setFont=function(Y){this.textElement&&ae.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},K.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},K.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){var ee=Y;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},K.typeName="TextMarker",K.title="Text marker",K.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>',K}(rt),Ue=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=ge.defaultColor,se.lineWidth=ge.defaultStrokeWidth,se.pixelRatio=ge.freehandPixelRatio,se.setColor=se.setColor.bind(se),se.addCanvas=se.addCanvas.bind(se),se.finishCreation=se.finishCreation.bind(se),se.setLineWidth=se.setLineWidth.bind(se),se.colorPanel=new _e("Color",ge.defaultColorSet,ge.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var Y=ae.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(Y,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(Y.x,Y.y),this.drawing=!0):le.prototype.pointerDown.call(this,Y,ee)},K.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,Y)},K.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)},K.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},K.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},K.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ge=ee[0],se=ee[1],Ke=ee[2],Ct=ee[3],Xt=!1,Er=0;Er<this.canvasElement.height;Er++)for(var Pt=0;Pt<this.canvasElement.width;Pt++)Y.data[Er*this.canvasElement.width*4+4*Pt+3]>0&&(Xt=!0,Er<se&&(se=Er),Pt<ge&&(ge=Pt),Er>Ct&&(Ct=Er),Pt>Ke&&(Ke=Pt));if(Xt){this.left=ge/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Ke-ge)/this.pixelRatio,this.height=(Ct-se)/this.pixelRatio;var Lr=document.createElement("canvas");Lr.width=Ke-ge,Lr.height=Ct-se,Lr.getContext("2d").putImageData(this.canvasContext.getImageData(ge,se,Ke-ge,Ct-se),0,0),this.drawingImgUrl=Lr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},K.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},K.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},K.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){this.createVisual(),le.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setDrawingImage()},K.typeName="FreehandMarker",K.title="Freehand marker",K.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>',K}(rt),Le=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ge||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return se.typeBoxes=[],se.currentType=ee,se.setCurrentType=se.setCurrentType.bind(se),se}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var ge=function(Ct){var Xt="both";switch(Ct){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===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",Er.addEventListener("click",function(){Y.setCurrentType(Xt,Er)}),ee.appendChild(Er),Xt==="both"||Xt==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Pt.style.marginLeft="5px",Er.appendChild(Pt)}var Lr=document.createElement("div");Lr.style.display="flex",Lr.style.alignItems="center",Lr.style.minHeight="20px",Lr.style.flexGrow="2";var Gr=document.createElement("hr");if(Gr.style.minWidth="20px",Gr.style.border="0px",Gr.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),Gr.style.flexGrow="2",Lr.appendChild(Gr),Er.appendChild(Lr),Xt==="both"||Xt==="end"){var _n=document.createElement("div");_n.style.display="flex",_n.style.alignItems="center",_n.style.minHeight="20px",_n.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,_n.style.marginRight="5px",Er.appendChild(_n)}se.typeBoxes.push(Er)},se=this,Ke=0;Ke<4;Ke++)ge(Ke);return ee},K.prototype.setCurrentType=function(Y,ee){var ge=this;this.currentType=Y,this.typeBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings!==void 0?ge.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},K}(Q),Me=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.arrowType="end",se.arrowBaseHeight=10,se.arrowBaseWidth=10,se.getArrowPoints=se.getArrowPoints.bind(se),se.setArrowType=se.setArrowType.bind(se),se.arrowTypePanel=new Le("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},K.prototype.getArrowPoints=function(Y,ee){var ge=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return Y-ge/2+","+(ee+se/2)+" "+Y+","+(ee-se/2)+" "+(Y+ge/2)+","+(ee+se/2)},K.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(le.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",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Y=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(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var ge=this.arrow2.transform.baseVal.getItem(0);ge.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ge,0)}},K.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},K.typeName="ArrowMarker",K.title="Arrow marker",K.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',K}(ct),Ee=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.fillColor=ge.defaultFillColor,se.strokeWidth=0,se.fillPanel=new _e("Color",ge.defaultColorSet,ge.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return pe(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="CoverMarker",K.title="Cover marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',K}(ut),Ce=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ee,Ke.currentOpacity=ge,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=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(ge){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="center",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=ge===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentOpacity(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.innerText=100*ge+"%",se.appendChild(Ke),Y.opacityBoxes.push(se)}),ee},K.prototype.setCurrentOpacity=function(Y,ee){var ge=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},K}(Q),ke=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=ge.defaultHighlightColor,se.strokeWidth=0,se.opacity=ge.defaultHighlightOpacity,se.fillPanel=new _e("Color",ge.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new Ce("Opacity",ge.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return pe(K,le),K.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="HighlightMarker",K.title="Highlight marker",K.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>',K}(Ee),Ne='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',He=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.bgColor="transparent",se.tipPosition={x:0,y:0},se.tipBase1Position={x:0,y:0},se.tipBase2Position={x:0,y:0},se.tipMoving=!1,se.color=ge.defaultStrokeColor,se.bgColor=ge.defaultFillColor,se.fontFamily=ge.defaultFontFamily,se.defaultSize={x:100,y:30},se.setBgColor=se.setBgColor.bind(se),se.getTipPoints=se.getTipPoints.bind(se),se.positionTip=se.positionTip.bind(se),se.setTipPoints=se.setTipPoints.bind(se),se.colorPanel=new _e("Text color",ge.defaultColorSet,se.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new _e("Fill color",ge.defaultColorSet,se.bgColor,Ne),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new $e("Font",ge.defaultFontFamilies,ge.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new Je,se.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return pe(K,le),K.prototype.ownsTarget=function(Y){return le.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},K.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},K.prototype.pointerDown=function(Y,ee){this.state==="new"&&le.prototype.pointerDown.call(this,Y,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,Y,ee)},K.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,Y);else{var ee=this.state==="creating";le.prototype.pointerUp.call(this,Y),this.setTipPoints(ee),this.positionTip()}},K.prototype.manipulate=function(Y){if(this.tipMoving){var ee=this.unrotatePoint(Y);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,Y)},K.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",Y]]),ae.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},K.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},K.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var ee=Math.min(this.height/2,15),ge=this.height/5;Y&&(this.tipPosition={x:ee+ge/2,y:this.height+20});var se=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ge=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:0},this.tipBase2Position={x:ee+ge,y:0}):(this.tipBase1Position={x:0,y:ee},this.tipBase2Position={x:0,y:ee+ge}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ge=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-ge,y:0},this.tipBase2Position={x:this.width-ee,y:0}):(this.tipBase1Position={x:this.width,y:ee},this.tipBase2Position={x:this.width,y:ee+ge}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?se<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ge=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-ge,y:this.height},this.tipBase2Position={x:this.width-ee,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ee-ge},this.tipBase2Position={x:this.width,y:this.height-ee}):se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ge=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:this.height},this.tipBase2Position={x:ee+ge,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ee},this.tipBase2Position={x:0,y:this.height-ee-ge})},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.positionTip()},K.prototype.positionTip=function(){ae.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Y=this.tipGrip.visual.transform.baseVal.getItem(0);Y.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Y,0)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.select=function(){this.positionTip(),le.prototype.select.call(this)},K.prototype.getState=function(){var Y=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){var ee=Y;this.bgColor=ee.bgColor,this.tipPosition=ee.tipPosition,le.prototype.restoreState.call(this,Y),this.createTip(),this.setTipPoints()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.tipPosition={x:this.tipPosition.x*Y,y:this.tipPosition.y*ee},this.positionTip()},K.typeName="CalloutMarker",K.title="Callout marker",K.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>',K}(st),tt=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.fillColor=ge.defaultFillColor,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.setOpacity=se.setOpacity.bind(se),se.createVisual=se.createVisual.bind(se),se.strokePanel=new _e("Line color",ce(ge.defaultColorSet,["transparent"]),ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new _e("Fill color",ce(ge.defaultColorSet,["transparent"]),se.fillColor,Ne),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.opacityPanel=new Ce("Opacity",ge.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},K.prototype.createVisual=function(){this.visual=ae.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)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},K.prototype.setSize=function(){le.prototype.setSize.call(this),ae.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},K.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},K.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){var ee=Y;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setSize()},K.typeName="EllipseMarker",K.title="Ellipse marker",K.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>',K}(rt),vt=function(le){function K(Y,ee,ge){return le.call(this,Y,ee,ge)||this}return pe(K,le),Object.defineProperty(K.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.tip1&&Y!==this.tip2)},K.prototype.createTips=function(){this.tip1=ae.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(ae.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ae.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(ae.createTransform()),this.visual.appendChild(this.tip2)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ae.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()]]),ae.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 Y=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(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var ge=this.tip2.transform.baseVal.getItem(0);ge.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ge,0)}},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},K.typeName="MeasurementMarker",K.title="Measurement marker",K.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>',K}(ct),yt=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokePanel.colors=ge.defaultColorSet,se.fillColor="transparent",se}return pe(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="EllipseFrameMarker",K.title="Ellipse frame marker",K.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>',K}(tt),Wt=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(K){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(K)||(this.undoStack.push(K),JSON.stringify(this.lastRedoStep)!==JSON.stringify(K)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(K){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=K)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var K=this.undoStack.pop();return K!==void 0&&this.redoStack.push(K),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),Ht=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.curveX=0,se.curveY=0,se.manipulationStartCurveX=0,se.manipulationStartCurveY=0,se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.positionGrips=se.positionGrips.bind(se),se.addControlGrips=se.addControlGrips.bind(se),se.adjustVisual=se.adjustVisual.bind(se),se.setupControlBox=se.setupControlBox.bind(se),se.resize=se.resize.bind(se),se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.strokePanel=new _e("Line color",ge.defaultColorSet,ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},K.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.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)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},K.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.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)},K.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},K.prototype.positionGrips=function(){le.prototype.positionGrips.call(this);var Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/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()))},K.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),le.prototype.resize.call(this,Y),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},K.prototype.scale=function(Y,ee){this.curveX=this.curveX*Y,this.curveY=this.curveY*ee,le.prototype.scale.call(this,Y,ee)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},K.typeName="CurveMarker",K.title="Curve marker",K.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>',K}(at),cr=function(){function le(K,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=K,this.cancelable=Y}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),dr=function(le){function K(Y,ee,ge){var se=le.call(this,Y,!1)||this;return se.dataUrl=ee,se.state=ge,se}return pe(K,le),K}(cr),St=function(le){function K(Y,ee,ge){ge===void 0&&(ge=!1);var se=le.call(this,Y,ge)||this;return se.marker=ee,se}return pe(K,le),K}(cr),Kr=function(){function le(){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 le.prototype.addEventListener=function(K,Y){this[K].push(Y)},le.prototype.removeEventListener=function(K,Y){var ee=this[K].indexOf(Y);ee>-1&&this[K].splice(ee,1)},le}(),Vr=function(){function le(K){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 Kr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new ne(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=K,this.targetRoot=document.body,this.width=K.clientWidth,this.height=K.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(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[Be,Ue,Me,st,yt,tt,ke,He,vt,Ee,ct,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Be,Ue,Me,st,tt,ke,He]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Be,Ue,Me,st,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(K){var Y=this;this._availableMarkerTypes.splice(0),K.forEach(function(ee){if(typeof ee=="string"){var ge=Y.ALL_MARKER_TYPES.find(function(se){return se.typeName===ee});ge!==void 0&&Y._availableMarkerTypes.push(ge)}else Y._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(K){this._zoomLevel=K,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var K=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(Y){return Y(new cr(K))})},le.prototype.render=function(){return Oe(this,void 0,void 0,function(){var K;return ye(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(K=new fe).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.markersOnly=this.renderMarkersOnly,K.width=this.renderWidth,K.height=this.renderHeight,[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},le.prototype.close=function(K){var Y=this;if(K===void 0&&(K=!1),this.isOpen){var ee=!1;K||this.eventListeners.beforeclose.forEach(function(ge){var se=new cr(Y,!0);ge(se),se.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(ge){return ge(new cr(Y))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var K,Y=[],ee=0;ee<arguments.length;ee++)Y[ee]=arguments[ee];(K=this._availableMarkerTypes).push.apply(K,Y)},le.prototype.addRenderEventListener=function(K){this.addEventListener("render",function(Y){K(Y.dataUrl,Y.state)})},le.prototype.removeRenderEventListener=function(K){},le.prototype.addCloseEventListener=function(K){this.addEventListener("close",function(){K()})},le.prototype.removeCloseEventListener=function(K){},le.prototype.setupResizeObserver=function(){var K=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return K.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},le.prototype.onPopupTargetResize=function(){var K=1*this.target.clientWidth/this.target.clientHeight,Y=this.editorCanvas.clientWidth/K>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*K:this.editorCanvas.clientWidth,ee=Y<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/K;this.resize(Y,ee)},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.prototype.resize=function(K,Y){this._isResizing=!0;var ee=K/this.imageWidth,ge=Y/this.imageHeight;this.imageWidth=Math.round(K),this.imageHeight=Math.round(Y),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,ge),this._isResizing=!1},le.prototype.scaleMarkers=function(K,Y){var ee,ge=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(K,Y):(ee=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(se){se!==ge._currentMarker&&se.scale(K,Y)}),ee!==void 0&&this.setCurrentMarker(ee)},le.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"},le.prototype.setTopLeft=function(){var K=this.editingTarget.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=K.left-Y.left,this.top=K.top-Y.top},le.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)},le.prototype.addDefs=function(){for(var K,Y=[],ee=0;ee<arguments.length;ee++)Y[ee]=arguments[ee];this.defs=ae.createDefs(),this.addDefsToImage(),(K=this.defs).append.apply(K,Y)},le.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},le.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)},le.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},le.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},le.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)},le.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},le.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)},le.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 K=document.createElement("a");K.href="https://markerjs.com/",K.target="_blank",K.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>',K.title="Powered by marker.js",K.style.display="grid",K.style.alignItems="center",K.style.justifyItems="center",K.style.padding="3px",K.style.width="20px",K.style.height="20px",this.logoUI.appendChild(K),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.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")},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"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 Z(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 X(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},le.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.removeMarker=function(K){this.markerImage.removeChild(K.container),this.markers.indexOf(K)>-1&&this.markers.splice(this.markers.indexOf(K),1),K.dispose()},le.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())},le.prototype.toolbarButtonClicked=function(K,Y){if(K==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(K==="action")switch(Y){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()}},le.prototype.deleteSelectedMarker=function(){var K=this;if(this._currentMarker!==void 0){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ge){var se=new St(K,K._currentMarker,!0);ge(se),se.defaultPrevented&&(Y=!0)}),!Y){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(ge){return ge(new St(K,ee))})}}},le.prototype.clear=function(){var K=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ct=new St(K,void 0,!0);Ke(Ct),Ct.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var ee=function(Ke){var Ct=ge.markers[Ke];ge.setCurrentMarker(ge.markers[Ke]),ge._currentMarker.dispose(),ge.markerImage.removeChild(ge._currentMarker.container),ge.markers.splice(ge.markers.indexOf(ge._currentMarker),1),ge.eventListeners.markerdelete.forEach(function(Xt){return Xt(new St(K,Ct))})},ge=this,se=this.markers.length-1;se>=0;se--)ee(se);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var K;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=(K=this._currentMarker.notes)!==null&&K!==void 0?K:"",this.overlayContainer.appendChild(this.notesArea))},le.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)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var K=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===Y.width&&ee.height===Y.height){var ge=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),ge<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(se){return se(new cr(K))})}else this.undoRedoManager.replaceLastUndoStep(Y),this.eventListeners.statechange.forEach(function(se){return se(new cr(K))})}},le.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},le.prototype.undoStep=function(){var K=this,Y=this.undoRedoManager.undo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new cr(K))}))},le.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},le.prototype.redoStep=function(){var K=this,Y=this.undoRedoManager.redo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new cr(K))}))},le.prototype.stepZoom=function(){var K=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=K<this.zoomSteps.length-1?this.zoomSteps[K+1]:this.zoomSteps[0]},le.prototype.panTo=function(K){this.contentDiv.scrollBy({left:this.prevPanPoint.x-K.x,top:this.prevPanPoint.y-K.y}),this.prevPanPoint=K},le.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var K,Y,ee=this;return ye(this,function(ge){switch(ge.label){case 0:return[4,this.render()];case 1:return K=ge.sent(),Y=this.getState(),this.eventListeners.render.forEach(function(se){return se(new dr(ee,K,Y))}),this.close(!0),[2]}})})},le.prototype.getState=function(K){K===!0&&this.setCurrentMarker();var Y={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ee){return Y.markers.push(ee.getState())}),Y},le.prototype.restoreState=function(K){var Y=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);K.markers.forEach(function(ee){var ge=Y._availableMarkerTypes.find(function(Ke){return Ke.typeName===ee.typeName});if(ge!==void 0){var se=Y.addNewMarker(ge);se.restoreState(ee),Y.markers.push(se)}}),K.width&&K.height&&(K.width!==this.imageWidth||K.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/K.width,this.imageHeight/K.height),this.eventListeners.restorestate.forEach(function(ee){return ee(new cr(Y))})},le.prototype.addNewMarker=function(K){var Y=ae.createGroup();return this.markerImage.appendChild(Y),new K(Y,this.overlayContainer,this.settings)},le.prototype.createNewMarker=function(K){var Y,ee=this;(Y=typeof K=="string"?this._availableMarkerTypes.find(function(ge){return ge.typeName===K}):K)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Y),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(Y.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ge){return ge(new St(ee,ee._currentMarker))}))},le.prototype.markerCreated=function(K){var Y=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(K),this.setCurrentMarker(K),K instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ee){return ee(new St(Y,Y._currentMarker))})},le.prototype.colorChanged=function(K){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=K,this.settings.defaultStrokeColor=K)},le.prototype.fillColorChanged=function(K){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=K)},le.prototype.markerStateChanged=function(K){var Y=this;this.eventListeners.markerchange.forEach(function(ee){return ee(new St(Y,K))})},le.prototype.setCurrentMarker=function(K){var Y=this;this._currentMarker!==K&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ee){return ee(new St(Y,Y._currentMarker))})),this._currentMarker=K,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 St(Y,Y._currentMarker))}))},le.prototype.onPointerDown=function(K){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||K.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Y=this.markers.find(function(ee){return ee.ownsTarget(K.target)});Y!==void 0?(this.setCurrentMarker(Y),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(K.clientX,K.clientY),K.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:K.clientX,y:K.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(K.clientX,K.clientY))},le.prototype.onDblClick=function(K){if(this._isFocused||this.focus(),this.mode==="select"){var Y=this.markers.find(function(ee){return ee.ownsTarget(K.target)});Y!==void 0&&Y!==this._currentMarker&&this.setCurrentMarker(Y),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(K.clientX,K.clientY),K.target):this.setCurrentMarker()}},le.prototype.onPointerMove=function(K){this.touchPoints!==1&&K.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||K.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(K.clientX,K.clientY)):this.zoomLevel>1&&this.panTo({x:K.clientX,y:K.clientY}))},le.prototype.onPointerUp=function(K){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(K.clientX,K.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(K){this._currentMarker===void 0||this.notesArea!==void 0||K.key!=="Delete"&&K.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.markerImage.getBoundingClientRect();return{x:(K-ee.left)/this.zoomLevel,y:(Y-ee.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"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()},le.prototype.addLicenseKey=function(K){re.addKey(K)},le.prototype.addEventListener=function(K,Y){this.eventListeners.addEventListener(K,Y)},le.prototype.removeEventListener=function(K,Y){this.eventListeners.removeEventListener(K,Y)},le.prototype.renderState=function(K){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(K),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var K=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Y){return Y(new cr(K))}))},le.prototype.blur=function(){var K=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new cr(K))}))},le.instanceCounter=0,le}();/* **********************************
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(le,K){return(Yr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ee){Y.__proto__=ee}||function(Y,ee){for(var ge in ee)Object.prototype.hasOwnProperty.call(ee,ge)&&(Y[ge]=ee[ge])})(le,K)};function vn(le,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function Y(){this.constructor=le}Yr(le,K),le.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}function Or(le,K,Y,ee){return new(Y||(Y=Promise))(function(ge,se){function Ke(Er){try{Xt(ee.next(Er))}catch(Pt){se(Pt)}}function Ct(Er){try{Xt(ee.throw(Er))}catch(Pt){se(Pt)}}function Xt(Er){var Pt;Er.done?ge(Er.value):(Pt=Er.value,Pt instanceof Y?Pt:new Y(function(Lr){Lr(Pt)})).then(Ke,Ct)}Xt((ee=ee.apply(le,K||[])).next())})}function dn(le,K){var Y,ee,ge,se,Ke={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return se={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ct(Xt){return function(Er){return function(Pt){if(Y)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(Y=1,ee&&(ge=2&Pt[0]?ee.return:Pt[0]?ee.throw||((ge=ee.return)&&ge.call(ee),0):ee.next)&&!(ge=ge.call(ee,Pt[1])).done)return ge;switch(ee=0,ge&&(Pt=[2&Pt[0],ge.value]),Pt[0]){case 0:case 1:ge=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ee=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ge=Ke.trys,(ge=ge.length>0&&ge[ge.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ge||Pt[1]>ge[0]&&Pt[1]<ge[3])){Ke.label=Pt[1];break}if(Pt[0]===6&&Ke.label<ge[1]){Ke.label=ge[1],ge=Pt;break}if(ge&&Ke.label<ge[2]){Ke.label=ge[2],Ke.ops.push(Pt);break}ge[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Pt=K.call(le,Ke)}catch(Lr){Pt=[6,Lr],ee=0}finally{Y=ge=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([Xt,Er])}}}var hn=function(){function le(){}return le.addKey=function(K){le.key=K},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),Tt=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(K,Y){for(var ee=0,ge=Y;ee<ge.length;ee++){var se=ge[ee],Ke=se[0],Ct=se[1];K.setAttribute(Ke,Ct)}},le.createRect=function(K,Y,ee){var ge=document.createElementNS("http://www.w3.org/2000/svg","rect");return ge.setAttribute("width",K.toString()),ge.setAttribute("height",Y.toString()),ee&&le.setAttributes(ge,ee),ge},le.createLine=function(K,Y,ee,ge,se){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",K.toString()),Ke.setAttribute("y1",Y.toString()),Ke.setAttribute("x2",ee.toString()),Ke.setAttribute("y2",ge.toString()),se&&le.setAttributes(Ke,se),Ke},le.createPolygon=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",K),Y&&le.setAttributes(ee,Y),ee},le.createCircle=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(K/2).toString()),ee.setAttribute("cy",(K/2).toString()),ee.setAttribute("r",K.toString()),Y&&le.setAttributes(ee,Y),ee},le.createEllipse=function(K,Y,ee){var ge=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ge.setAttribute("cx",(K/2).toString()),ge.setAttribute("cy",(Y/2).toString()),ge.setAttribute("rx",(K/2).toString()),ge.setAttribute("ry",(Y/2).toString()),ee&&le.setAttributes(ge,ee),ge},le.createGroup=function(K){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&le.setAttributes(Y,K),Y},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(K,Y,ee,ge,se,Ke,Ct){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Xt,[["id",K],["orient",Y],["markerWidth",ee.toString()],["markerHeight",ge.toString()],["refX",se.toString()],["refY",Ke.toString()]]),Xt.appendChild(Ct),Xt},le.createText=function(K){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),K&&le.setAttributes(Y,K),Y},le.createTSpan=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=K,Y&&le.setAttributes(ee,Y),ee},le.createImage=function(K){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&le.setAttributes(Y,K),Y},le.createPoint=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=K,ee.y=Y,ee},le.createPath=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",K),Y&&le.setAttributes(ee,Y),ee},le.createElement=function(K,Y){var ee=document.createElementNS("http://www.w3.org/2000/svg",K);return Y&&le.setAttributes(ee,Y),ee},le.getHollowRectanglePath=function(K,Y,ee,ge,se,Ke,Ct,Xt){return"M"+K+","+Y+"V"+(Y+ge)+"H"+(K+ee)+"V"+Y+"H"+se+"V"+Ke+"H"+(se+Ct)+"V"+(Ke+Xt)+"H"+se+"V"+Y+"Z"},le}(),gr=function(){function le(K){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(K){return this.styleSheet===void 0&&this.addStyleSheet(),K.name=""+this.classNamePrefix+K.localName,this.classes.push(K),this.styleSheet.sheet.insertRule("."+K.name+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length),K},le.prototype.addRule=function(K){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(K),this.styleSheet.sheet.insertRule(K.selector+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var K;this.styleSheet=document.createElement("style"),((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).appendChild(this.styleSheet),this.addRule(new Br("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Br("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Br("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new zr("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new zr("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},le.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),Br=function(le,K){this.selector=le,this.style=K},zr=function(le,K){this.localName=le,this.style=K},an=function(){function le(){this.blocks=[],this.display=""}return le.prototype.addButtonBlock=function(K){K.className=this.blockClassName,K.buttonClassName=this.buttonClassName,K.buttonColorsClassName=this.buttonColorsClassName,K.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(K)},le.prototype.addElementBlock=function(K){K.className===void 0&&(K.className=this.blockClassName),this.blocks.push(K)},le.prototype.getUI=function(){var K=document.createElement("div");return K.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,K.style.display=this.display,this.blocks.forEach(function(Y){return K.appendChild(Y.getUI())}),K},le}(),gi=function(){function le(){}return le.prototype.getUI=function(){var K=document.createElement("div");if(K.className=this.className,this.minWidth!==void 0&&(K.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":K.style.justifyContent="flex-start";break;case"center":K.style.justifyContent="center";break;case"end":K.style.justifyContent="flex-end"}return K.style.whiteSpace="nowrap",K},le}(),Ei=function(le){function K(){var Y=le!==null&&le.apply(this,arguments)||this;return Y.buttons=[],Y}return vn(K,le),K.prototype.addButton=function(Y){Y.className=this.buttonClassName,Y.colorsClassName=this.buttonColorsClassName,Y.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(Y)},K.prototype.getUI=function(){var Y=le.prototype.getUI.call(this);return this.buttons.forEach(function(ee){return Y.appendChild(ee.getUI())}),Y},K}(gi),bn=function(){function le(K,Y){this._isActive=!1,this._isHidden=!1,this._icon=K,this.title=Y,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(le.prototype,"icon",{get:function(){return this._icon},set:function(K){this._icon=K,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isActive",{get:function(){return this._isActive},set:function(K){this._isActive=K,this.adjustClassName()},enumerable:!1,configurable:!0}),le.prototype.getUI=function(){var K=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 K.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},le.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,"")))},le.prototype.hide=function(){this._isHidden=!0},le}(),lr=function(le){function K(){var Y=le!==null&&le.apply(this,arguments)||this;return Y.elements=[],Y}return vn(K,le),K.prototype.addElement=function(Y){this.elements.push(Y)},K.prototype.getUI=function(){var Y=le.prototype.getUI.call(this);return this.elements.forEach(function(ee){return Y.appendChild(ee)}),Y},K}(gi),Yn=function(){function le(K,Y){this.horizontal=K,this.vertical=Y}return Object.defineProperty(le.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),le.prototype.getVerticalLength=function(K){return K/this.ratio},le.prototype.getHorizontalLength=function(K){return K*this.ratio},le}(),ci=function(){function le(){}return le.getIcon=function(K,Y){if(K>0&&Y>0){var ee=new Yn(K,Y),ge=ee.ratio>=1?20:ee.getHorizontalLength(20),se=ee.ratio<1?20:ee.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var Ct=Tt.createDefs();Ke.appendChild(Ct);var Xt=Tt.createElement("clipPath",[["id","text-bg-clip"]]);Ct.appendChild(Xt);var Er=Tt.createPath(Tt.getHollowRectanglePath((24-ge)/2,(24-se)/2,ge,se,(24-ge)/2+2,(24-se)/2+2,ge-4,se-4));Ke.appendChild(Er);var Pt=Tt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Tt.createTSpan(K+":"+Y)),Ke.appendChild(Pt);var Lr=Pt.getBBox();Tt.setAttributes(Pt,[["x",((24-Lr.width)/2).toString()],["y",((24-Lr.height)/2-Lr.y).toString()]]);var Gr=Tt.createPath(Tt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Lr.width))/2,(24-Math.ceil(Lr.height))/2,Math.ceil(Lr.width),Math.ceil(Lr.height)));return Xt.appendChild(Gr),Tt.setAttributes(Er,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},le}(),Hn=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee)||this;return se.isDropdownOpen=!1,se.onClick=se.dropdownButtonClicked,se.dropdownButtons=ge,se}return vn(K,le),K.prototype.setupDropdown=function(){var Y=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=Y.className,ee.colorsClassName=Y.colorsClassName,Y.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},K.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},K.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},K.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},K.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},K.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},K}(bn),qr=function(){function le(K,Y){this.GRIP_SIZE=10,this.color=K,this.fillColor=Y,this.visual=Tt.createGroup(),this.visual.appendChild(Tt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Tt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},le.prototype.setCenter=function(K,Y){this.visual.childNodes.forEach(function(ee){return Tt.setAttributes(ee,[["cx",K.toString()],["cy",Y.toString()]])})},le}(),Un=function(){function le(K,Y,ee,ge){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=K,this.canvasHeight=Y,this.margin=ee,this.container=ge,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(le.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(K){this._aspectRatio=K,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.gridContainer&&Tt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(K){this._zoomFactor=K,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),le.prototype.open=function(){var K=this;this.cropShadeElement=Tt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Tt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Y=0;Y<this.numberOfGridLines;Y++)this.horizontalGridLines.push(Tt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Tt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ee){return K.gridContainer.appendChild(ee)}),this.verticalGridLines.forEach(function(ee){return K.gridContainer.appendChild(ee)}),this.cropRectElement=Tt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},le.prototype.setCropRectangle=function(K){this.cropRect=K;var Y=Object.assign({},this.cropRect);this.zoomFactor!==1&&(Y.width=this.cropRect.width*this.zoomFactor,Y.height=this.cropRect.height*this.zoomFactor,Y.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-Y.width/2,Y.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Y.height/2),Tt.setAttributes(this.cropRectElement,[["x",Y.x.toString()],["y",Y.y.toString()],["width",Y.width.toString()],["height",Y.height.toString()]]);var ee=Y.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(se,Ke){var Ct=Y.y+ee*(Ke+1);Tt.setAttributes(se,[["x1",""+Y.x],["y1",""+Ct],["x2",""+(Y.x+Y.width)],["y2",""+Ct]])});var ge=Y.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(se,Ke){var Ct=Y.x+ge*(Ke+1);Tt.setAttributes(se,[["x1",""+Ct],["y1",""+Y.y],["x2",""+Ct],["y2",""+(Y.y+Y.height)]])}),Tt.setAttributes(this.cropShadeElement,[["d",Tt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Y.x,Y.y,Y.width,Y.height)]]),this.topLeftGrip.setCenter(Y.x,Y.y),this.topRightGrip.setCenter(Y.x+Y.width,Y.y),this.bottomLeftGrip.setCenter(Y.x,Y.y+Y.height),this.bottomRightGrip.setCenter(Y.x+Y.width,Y.y+Y.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},le.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)},le.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.container.getBoundingClientRect();return{x:K-ee.left+this.margin,y:Y-ee.top+this.margin}},le.prototype.onPointerDown=function(K){this.container.setPointerCapture(K.pointerId),this.previousPoint=this.clientToLocalCoordinates(K.clientX,K.clientY),this.cropRectElement===K.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(K.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(K.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(K.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(K.target)&&(this.activeGrip=this.bottomRightGrip)},le.prototype.onPointerMove=function(K){if(this.isMoving)this.move(this.clientToLocalCoordinates(K.clientX,K.clientY));else if(this.activeGrip){var Y=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize(Y)}K.preventDefault()},le.prototype.onPointerUp=function(K){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(K.pointerId)},le.prototype.move=function(K){var Y=K.x-this.previousPoint.x,ee=K.y-this.previousPoint.y;this.zoomFactor!==1&&(Y=-Y/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Y),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=K},le.prototype.resize=function(K){var Y=Object.assign({},this.cropRect),ee=K.x-this.previousPoint.x,ge=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Y.x+ee<this.margin&&(ee=this.margin-Y.x),Y.x+=ee,Y.width=this.cropRect.x+this.cropRect.width-Y.x;break;case this.bottomRightGrip:case this.topRightGrip:Y.width+ee>this.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-Y.width),Y.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Y.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),Y.height=this.aspectRatio.getVerticalLength(Y.width)):(Y.y+=ge,Y.height=this.cropRect.y+this.cropRect.height-Y.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Y.height=this.aspectRatio.getVerticalLength(Y.width):Y.height+=ge}Y.width<10&&(Y.x=this.cropRect.x,Y.width=10),Y.height<10&&(Y.y=this.cropRect.y,Y.height=10),this.previousPoint=K,Y.x>=this.margin&&Y.y>=this.margin&&Y.x-this.margin+Y.width<=this.canvasWidth&&Y.y-this.margin+Y.height<=this.canvasHeight&&(this.cropRect=Y,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},le.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var K=this.cropRect.x+this.cropRect.width/2,Y=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),ge=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidth<ge/this.canvasHeight?this.cropRect.width=ee:this.cropRect.height=ge,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=K-this.cropRect.width/2,this.cropRect.y=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)}},le.prototype.getRescaledRect=function(K,Y,ee,ge,se,Ke){var Ct=ee/K,Xt=ge/Y;return{x:(se.x-Ke)*Ct+Ke,y:(se.y-Ke)*Xt+Ke,width:se.width*Ct,height:se.height*Xt}},le.prototype.scaleCanvas=function(K,Y){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,Y,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=Y,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},le}(),di=function(){function le(K){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=K,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(le.prototype,"angle",{get:function(){return this._angle},set:function(K){this._angle=K,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),le.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},le.prototype.onPointerDown=function(K){this.controlContainer.setPointerCapture(K.pointerId),this.isDragging=!0,this.previousPoint={x:K.clientX,y:K.clientY}},le.prototype.onPointerMove=function(K){this.isDragging&&(this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.previousPoint.x=K.clientX)},le.prototype.onPointerUp=function(K){this.isDragging&&this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(K.pointerId)},le.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var K=this.angleLabelText.getBBox();Tt.setAttributes(this.angleLabelElement,[["x",((this.width-K.width)/2).toString()],["y",(this.height/2).toString()]])}},le.prototype.positionScaleShape=function(){if(this.scaleShape){var K=this.scaleShape.transform.baseVal.getItem(0);K.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(K,0)}},le.prototype.getVisual=function(){var K=document.createElementNS("http://www.w3.org/2000/svg","svg");K.setAttribute("xmlns","http://www.w3.org/2000/svg"),K.setAttribute("width",this.width+"px"),K.setAttribute("height",this.height+"px"),K.setAttribute("viewBox","0 0 "+this.width+" "+this.height),K.style.flexShrink="0",document.body.appendChild(K);for(var Y="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var ge=ee%5==0?this.height/3:this.height/6;Y+="h4v"+-ge+"h1v"+ge}Y+="v1H0Z",this.scaleShape=Tt.createPath(Y);var se=Tt.createTransform();this.scaleShape.transform.baseVal.appendItem(se),K.appendChild(this.scaleShape),this.angleLabelElement=Tt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Tt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Tt.createTSpan("");return Ke.innerHTML="&deg;",this.angleLabelElement.appendChild(Ke),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},le}(),vi=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function(K,Y,ee,ge,se,Ke,Ct){var Xt=this;return new Promise(function(Er){var Pt=document.createElement("canvas");Pt.width=K.width.baseVal.value-2*ge,Pt.height=K.height.baseVal.value-2*ge;var Lr=1,Gr=1;Xt.naturalSize===!0?(Lr=Y.naturalWidth/(K.width.baseVal.value-2*ge)/Ke,Gr=Y.naturalHeight/(K.height.baseVal.value-2*ge)/Ct,Pt.width=Y.naturalWidth/Ke,Pt.height=Y.naturalHeight/Ct):Xt.width!==void 0&&Xt.height!==void 0&&(Lr=Xt.width/ee.width,Gr=Xt.height/ee.height,Pt.width*=Lr,Pt.height*=Gr);var _n=Pt.getContext("2d");_n.translate(Pt.width/2,Pt.height/2),_n.rotate(se*Math.PI/180),_n.scale(Ke,Ct),_n.translate(-Pt.width/2,-Pt.height/2),_n.drawImage(Y,0,0,Pt.width,Pt.height);var Zn=document.createElement("canvas");Zn.width=ee.width*Lr,Zn.height=ee.height*Gr,Zn.getContext("2d").putImageData(_n.getImageData((ee.x-ge)*Lr,(ee.y-ge)*Gr,ee.width*Lr,ee.height*Gr),0,0),Er(Zn.toDataURL(Xt.imageType,Xt.imageQuality))})},le}(),Ut=function(){function le(K){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=le.instanceCounter++,this.styles=new gr(this.instanceNo),this.target=K,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(K){this._zoomToCropEnabled=K,K?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"gridLines",{get:function(){return this._gridLines},set:function(K){this._gridLines=K,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(K){this._rotationAngle=K,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"aspectRatio",{get:function(){var K;return(K=this._aspectRatio)!==null&&K!==void 0?K:this.aspectRatios[0]},set:function(K){this._aspectRatio=K},enumerable:!1,configurable:!0}),le.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},le.prototype.show=function(){this.showUI(),this.open()},le.prototype.close=function(K){K===void 0&&(K=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),K||this.closeEventListeners.forEach(function(Y){return Y()}),this._isOpen=!1)},le.prototype.addRenderEventListener=function(K){this.renderEventListeners.push(K)},le.prototype.removeRenderEventListener=function(K){this.renderEventListeners.indexOf(K)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(K),1)},le.prototype.addCloseEventListener=function(K){this.closeEventListeners.push(K)},le.prototype.removeCloseEventListener=function(K){this.closeEventListeners.indexOf(K)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(K),1)},le.prototype.setupResizeObserver=function(){var K=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.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))},le.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var K=1*this.target.clientWidth/this.target.clientHeight,Y=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=Y+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/K;this.resize(Y,ee)}},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.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",Tt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},le.prototype.resize=function(K,Y){this.imageWidth=Math.round(K),this.imageHeight=Math.round(Y),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()},le.prototype.setEditingTarget=function(){var K=document.createElement("canvas");K.width=this.target.naturalWidth,K.height=this.target.naturalHeight,K.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var Y=K.toDataURL();Tt.setAttributes(this.editingTarget,[["href",Y]]),this.setEditingTargetSize()},le.prototype.setTopLeft=function(){var K=this.target.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=K.left-Y.left-this.CANVAS_MARGIN,this.top=K.top-Y.top-this.CANVAS_MARGIN},le.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=Tt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Tt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Tt.createGroup(),this.editingTargetRotationScaleContainer=Tt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var K=Tt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(K);var Y=Tt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(Y),this.editingTargetContainer=Tt.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)},le.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},le.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Tt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Un(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()},le.prototype.zoomToCrop=function(){if(this.cropRect){var K=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,Y=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=K+"px "+Y+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-K+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-Y+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},le.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)},le.prototype.cropRectChanged=function(K){this.cropRect=K,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},le.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 K=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,Y=this.target.offsetTop>K+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=Y+"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},le.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},le.prototype.addTopToolbar=function(){var K=this;this.topToolbar=new an,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 Y=new Ei;Y.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Y);var ee=[];this.aspectRatios.forEach(function(Gr){var _n=new bn(ci.getIcon(Gr.horizontal,Gr.vertical),Gr.horizontal===0&&Gr.vertical===0?"FREE":Gr.horizontal+":"+Gr.vertical);_n.onClick=function(){return K.ratioButtonClicked(Gr)},ee.push(_n)}),this.aspectRatioButton=new Hn(ci.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,Y.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ge=new bn('<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");ge.isActive=this.isGridVisible,ge.onClick=function(){K.isGridVisible=!K.isGridVisible,ge.isActive=K.isGridVisible},Y.addButton(ge);var se=new bn('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(se.isActive=this.zoomToCropEnabled,se.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,se.isActive=K.zoomToCropEnabled},Y.addButton(se),!hn.isLicensed){var Ke=new lr;this.topToolbar.addElementBlock(Ke);var Ct=document.createElement("div");Ct.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>',Ct.appendChild(Xt),Ke.addElement(Ct)}var Er=new Ei;Er.minWidth=3*this.toolbarHeight+"px",Er.contentAlign="end",this.topToolbar.addButtonBlock(Er);var Pt=new bn('<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");Pt.onClick=this.startRenderAndClose,Er.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Lr=new bn('<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");Lr.onClick=this.close,Er.addButton(Lr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Lr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new an,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 Y=new Ei;Y.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Y);var ee=new bn('<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,Y.addButton(ee);var ge=new bn('<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");ge.onClick=this.rotateRightButtonClicked,Y.addButton(ge);var se=new lr;se.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(se),this.straightener=new di("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){K.rotateBy(Er),K.straightener.angle=K.rotationAngle},se.addElement(this.straightener.getUI());var Ke=new Ei;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Ct=new bn('<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");Ct.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Ct);var Xt=new bn('<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,Ke.addButton(Xt)},le.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ci.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},le.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Yn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},le.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},le.prototype.restoreState=function(K){if(K){var Y=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Y),this.cropRectChanged(Y),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.cropImage.getBoundingClientRect();return{x:K-ee.left,y:Y-ee.top}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var K=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=K+"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()},le.prototype.rotateLeftButtonClicked=function(){var K=this.rotationAngle-90;this.rotationAngle%90!=0&&(K+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(K)},le.prototype.rotateRightButtonClicked=function(){var K=this.rotationAngle+90;this.rotationAngle%90!=0&&(K-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(K)},le.prototype.rotateTo=function(K){K=(K=K>180?K-360:K)<=-180?K+360:K,this.rotationAngle=K,this.applyRotation()},le.prototype.rotateBy=function(K){this.rotateTo((this.rotationAngle+K)%360)},le.prototype.applyRotation=function(){var K=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var Y=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Y,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=K},le.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},le.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},le.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},le.prototype.startRenderAndClose=function(){return Or(this,void 0,void 0,function(){var K,Y;return dn(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return K=ee.sent(),Y=this.getState(),this.renderEventListeners.forEach(function(ge){return ge(K,Y)}),this.close(!0),[2]}})})},le.prototype.render=function(){return Or(this,void 0,void 0,function(){var K;return dn(this,function(Y){switch(Y.label){case 0:return(K=new vi).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),Tt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,K.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 Y.sent(),[4,K.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,Y.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new zr("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 zr("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new zr("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new zr("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*K)+`px;
height: `+(this.toolbarHeight-2*K)+`px;
padding: `+K+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new zr("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new zr("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Br("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Br("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new zr("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 zr("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new zr("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 zr("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*K)+`px;
padding: `+K+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new zr("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},le.instanceCounter=0,le}(),_r=j("8hTe"),hi=j.n(_r),xi=/<pre[^>]*>/g;function Di(le){var K=document.createElement("div");return K.innerHTML=le,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var wi=q.a=function(le){var K=le.value,Y=K===void 0?"":K,ee=le.edit,ge=ee===void 0?!1:ee,se=le.className,Ke=le.showTextOnly,Ct=le.showLines,Xt=le.replaces,Er=le.zoomImg,Pt=le.hasMask,Lr=le.style,Gr=Lr===void 0?{}:Lr,_n=le.stylesPrev,Zn=_n===void 0?{}:_n,qn=String(Y),Nn=Object(d.useRef)(),Ni=Object(d.useRef)(),Gi=Object(d.useState)(""),Wn=Object(T.a)(Gi,2),Ti=Wn[0],Ki=Wn[1],ki=Object(d.useState)("office"),ni=Object(T.a)(ki,2),ea=ni[0],Vi=ni[1],ta=function(){var mt=new Ut(Ni.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var wt=Object(y.a)(p.a.mark(function Lt(Dt){var Kt;return p.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Nn.current.style.display="none",ht.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt}});case 3:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(J.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 Vr(Ni.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var wt=Object(y.a)(p.a.mark(function Lt(Dt){var Kt;return p.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Nn.current.style.display="none",!Ni.current){ht.next=6;break}return ht.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt.dataUrl}});case 4:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(J.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},Li=Object(d.useMemo)(function(){Nn.current&&(Nn.current.style.zIndex=-1);try{var et=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;qn=qn.replace(et,"("+J.a.API_SERVER+"/api/attachments/").replace(mt,'"'+J.a.API_SERVER+"/api/attachments/").replace(wt,'"'+J.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(zt){}var Lt=G(qn),Dt=k();if(qn.match(/\[TOC\]/)&&(Lt=Lt.replace("<p>[TOC]</p>",R()),S()),Lt=Lt.replace(/(__special_katext_id_\d+__)/g,function(zt,ht){var Ot=Dt[ht],Rt=Ot.type,ur=Ot.expression;return Object(ue.renderToString)(Di(ur)||"",{displayMode:Rt==="block",throwOnError:!1,output:"html"})}),Lt=Lt.replace(/▁/g,"\u2581\u2581\u2581"),I(),Ke){var Kt=document.createElement("div");return Kt.innerHTML=Lt,Kt.innerText}return setTimeout(function(){return ha()},500),Lt},[qn]),$n=Object(d.useRef)();x.WebkitLineClamp=Ct,Ct&&(Gr=Object(m.a)(Object(m.a)({},Gr),x));function ji(et){var mt=et.target;if(mt.tagName.toUpperCase()==="IMG"){if(Er){var wt=mt.getAttribute("src");Ki(wt),Vi("image")}}else if(mt.tagName.toUpperCase()==="A"){var Lt=mt.getAttribute("href");if(Lt.indexOf("office")>-1)et.preventDefault(),Ki(Lt),Vi("office");else if(Lt.indexOf("application/pdf")>-1)et.preventDefault(),Ki(Lt),Vi("pdf");else if(Lt.indexOf("text/html")>-1)et.preventDefault(),Ki(Lt),Vi("html");else if(Lt.startsWith("#")){et.preventDefault();var Dt=document.getElementById(Lt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}var ha=function(){var mt,wt=(mt=$n.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(z.a.isSupported()){var Dt=new z.a;Dt.loadSource(Lt.src),Dt.attachMedia(Lt)}}})};Object(d.useEffect)(function(){if($n.current&&Li&&(Li.match(xi)&&window.PR.prettyPrint()),$n.current)return $n.current.addEventListener("click",ji),function(){$n.current.removeEventListener("click",ji),I(),S()}},[Li,$n.current,ji]);var xt=function(mt){if(!ge)return;mt.target.nodeName==="IMG"?(Nn.current.style.zIndex=1,Nn.current.style.display="flex",Nn.current.style.width=mt.target.clientWidth+"px",Nn.current.style.height=mt.target.clientHeight+"px",Nn.current.style.top=mt.target.offsetTop+"px",Nn.current.style.left=mt.target.offsetLeft+"px",Ni.current.src=mt.target.getAttribute("src")):Nn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:$n,style:Object(m.a)({},Gr),className:"".concat(se||""," markdown-body ").concat(hi.a.mdBody),onMouseOver:xt,dangerouslySetInnerHTML:{__html:Li}}),n.a.createElement("div",{ref:Nn,className:hi.a.button},n.a.createElement(g.a,null,n.a.createElement(M.a,{onClick:function(){return ta()}},"\u88C1\u526A"),n.a.createElement(M.a,{onClick:function(){return oa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Ni,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(de.a,{close:!0,data:Ti,type:Ti!=null&&Ti.length?ea:"",style:Object(m.a)({},Zn),onClose:function(){return Ki("")}}))}},"9OqN":function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CTR=function(){var g=N.lib.BlockCipherMode.extend(),O=g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,T=y.blockSize,b=this._iv,p=this._counter;b&&(p=this._counter=b.slice(0),this._iv=void 0);var d=p.slice(0);y.encryptBlock(d,0),p[T-1]=p[T-1]+1|0;for(var n=0;n<T;n++)M[m+n]^=d[n]}});return g.Decryptor=O,g}(),N.mode.CTR})},"9VGf":function(F,q,j){"use strict";j.d(q,"a",function(){return O});var N=j("q1tI"),g=j.n(N);function O(M,m){var y=Object(N.useRef)();Object(N.useEffect)(function(){y.current=M}),Object(N.useEffect)(function(){function T(){y.current()}if(m!==null){var b=setInterval(T,m);return function(){return clearInterval(b)}}},[m])}},ALsQ:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CFB=function(){var g=N.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,T=y.blockSize;O.call(this,M,m,T,y),this._prevBlock=M.slice(m,m+T)}}),g.Decryptor=g.extend({processBlock:function(M,m){var y=this._cipher,T=y.blockSize,b=M.slice(m,m+T);O.call(this,M,m,T,y),this._prevBlock=b}});function O(M,m,y,T){var b,p=this._iv;p?(b=p.slice(0),this._iv=void 0):b=this._prevBlock,T.encryptBlock(b,0);for(var d=0;d<y;d++)M[m+d]^=b[d]}return g}(),N.mode.CFB})},BJfS:function(F,q){var j=function(N){return N.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}).toLowerCase()};F.exports=j},BU3w:function(F,q,j){"use strict";j.d(q,"a",function(){return y});var N=j("MNnm"),g="rc-util-key";function O(T){if(T.attachTo)return T.attachTo;var b=document.querySelector("head");return b||document.body}function M(T){var b,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var d=document.createElement("style");if((b=p.csp)===null||b===void 0?void 0:b.nonce){var n;d.nonce=(n=p.csp)===null||n===void 0?void 0:n.nonce}d.innerHTML=T;var c=O(p),r=c.firstChild;return p.prepend&&c.prepend?c.prepend(d):p.prepend&&r?c.insertBefore(d,r):c.appendChild(d),d}var m=new Map;function y(T,b){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=O(p);if(!m.has(d)){var n=M("",p),c=n.parentNode;m.set(d,c),c.removeChild(n)}var r=Array.from(m.get(d).children).find(function(s){return s.tagName==="STYLE"&&s[g]===b});if(r){var a,o;if(((a=p.csp)===null||a===void 0?void 0:a.nonce)&&r.nonce!==((o=p.csp)===null||o===void 0?void 0:o.nonce)){var u;r.nonce=(u=p.csp)===null||u===void 0?void 0:u.nonce}return r.innerHTML!==T&&(r.innerHTML=T),r}var h=M(T,p);return h[g]=b,h}},Bd2K:function(F,q,j){(function(N){N(j("VrN/"),j("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(p,d,n){if(n!=N.Init&&n&&p.removeKeyMap("autoCloseTags"),!d)return;var c={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(c["'/'"]=function(r){return y(r)}),(typeof d!="object"||d.whenOpening!==!1)&&(c["'>'"]=function(r){return M(r)}),p.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 M(p){if(p.getOption("disableInput"))return N.Pass;for(var d=p.listSelections(),n=[],c=p.getOption("autoCloseTags"),r=0;r<d.length;r++){if(!d[r].empty())return N.Pass;var a=d[r].head,o=p.getTokenAt(a),u=N.innerMode(p.getMode(),o.state),h=u.state,s=u.mode.xmlCurrentTag&&u.mode.xmlCurrentTag(h),l=s&&s.name;if(!l)return N.Pass;var t=u.mode.configuration=="html",S=typeof c=="object"&&c.dontCloseTags||t&&g,x=typeof c=="object"&&c.indentTags||t&&O;o.end>a.ch&&(l=l.slice(0,l.length-o.end+a.ch));var f=l.toLowerCase();if(!l||o.type=="string"&&(o.end!=a.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&s.close||o.string.indexOf("/")==a.ch-o.start-1||S&&T(S,f)>-1||b(p,u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(h)||[],l,a,!0))return N.Pass;var R=typeof c=="object"&&c.emptyTags;if(R&&T(R,l)>-1){n[r]={text:"/>",newPos:N.Pos(a.line,a.ch+2)};continue}var C=x&&T(x,f)>-1;n[r]={indent:C,text:">"+(C?`
`:"")+"</"+l+">",newPos:C?N.Pos(a.line+1,0):N.Pos(a.line,a.ch+1)}}for(var v=typeof c=="object"&&c.dontIndentOnAutoClose,r=d.length-1;r>=0;r--){var _=n[r];p.replaceRange(_.text,d[r].head,d[r].anchor,"+insert");var E=p.listSelections().slice(0);E[r]={head:_.newPos,anchor:_.newPos},p.setSelections(E),!v&&_.indent&&(p.indentLine(_.newPos.line,null,!0),p.indentLine(_.newPos.line+1,null,!0))}}function m(p,d){for(var n=p.listSelections(),c=[],r=d?"/":"</",a=p.getOption("autoCloseTags"),o=typeof a=="object"&&a.dontIndentOnSlash,u=0;u<n.length;u++){if(!n[u].empty())return N.Pass;var h=n[u].head,s=p.getTokenAt(h),l=N.innerMode(p.getMode(),s.state),t=l.state;if(d&&(s.type=="string"||s.string.charAt(0)!="<"||s.start!=h.ch-1))return N.Pass;var S,x=l.mode.name!="xml"&&p.getMode().name=="htmlmixed";if(x&&l.mode.name=="javascript")S=r+"script";else if(x&&l.mode.name=="css")S=r+"style";else{var f=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(t);if(!f||f.length&&b(p,f,f[f.length-1],h))return N.Pass;S=r+f[f.length-1]}p.getLine(h.line).charAt(s.end)!=">"&&(S+=">"),c[u]=S}if(p.replaceSelections(c),n=p.listSelections(),!o)for(var u=0;u<n.length;u++)(u==n.length-1||n[u].head.line<n[u+1].head.line)&&p.indentLine(n[u].head.line)}function y(p){return p.getOption("disableInput")?N.Pass:m(p,!0)}N.commands.closeTag=function(p){return m(p)};function T(p,d){if(p.indexOf)return p.indexOf(d);for(var n=0,c=p.length;n<c;++n)if(p[n]==d)return n;return-1}function b(p,d,n,c,r){if(!N.scanForClosingTag)return!1;var a=Math.min(p.lastLine()+1,c.line+500),o=N.scanForClosingTag(p,c,null,a);if(!o||o.tag!=n)return!1;for(var u=r?1:0,h=d.length-1;h>=0&&d[h]==n;h--)++u;c=o.to;for(var h=1;h<u;h++){var s=N.scanForClosingTag(p,c,null,a);if(!s||s.tag!=n)return!1;c=s.to}return!0}})},BjJ7:function(F,q,j){"use strict";j.d(q,"d",function(){return g}),j.d(q,"c",function(){return O}),j.d(q,"e",function(){return M}),j.d(q,"b",function(){return m}),j.d(q,"a",function(){return T});var N=j("m3rI");function g(b){var p=!0;if(b.length>0){for(var d=0;d<b.length;d++)if(b[d].compile_success==0||!b[d].compile_success){p=!1;break}}else p=!1;return p}function O(b){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",d=[],n=0;n<b.length;n++){var c=b[n],r=p?"".concat(p,"/").concat(c.name):"".concat(c.name);d.push({title:c.name,isLeaf:!(c.type==="tree"),key:r})}return d}function M(b,p,d){for(var n=0;n<b.length;n++){var c=b[n];if(c.key===p){c.children=d;break}c.children&&M(c.children,p,d)}return b}function m(b,p,d){var n;return function(){var c=this,r=arguments,a=function(){n=null,d||b.apply(c,r)},o=d&&!n;clearTimeout(n),n=setTimeout(a,p),o&&b.apply(c,r)}}var y=!0,T=N.a.API_SERVER},"C+DQ":function(F,q,j){},Dgm7:function(F,q,j){F.exports=j.p+"static/auth.ea067b42.png"},DlQD:function(F,q,j){(function(N,g){F.exports=g()})(this,function(){"use strict";function N(Ue,Le){for(var Me=0;Me<Le.length;Me++){var Ee=Le[Me];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(Ue,Ee.key,Ee)}}function g(Ue,Le,Me){return Le&&N(Ue.prototype,Le),Me&&N(Ue,Me),Ue}function O(Ue,Le){if(!Ue)return;if(typeof Ue=="string")return M(Ue,Le);var Me=Object.prototype.toString.call(Ue).slice(8,-1);if(Me==="Object"&&Ue.constructor&&(Me=Ue.constructor.name),Me==="Map"||Me==="Set")return Array.from(Ue);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return M(Ue,Le)}function M(Ue,Le){(Le==null||Le>Ue.length)&&(Le=Ue.length);for(var Me=0,Ee=new Array(Le);Me<Le;Me++)Ee[Me]=Ue[Me];return Ee}function m(Ue,Le){var Me;if(typeof Symbol=="undefined"||Ue[Symbol.iterator]==null){if(Array.isArray(Ue)||(Me=O(Ue))||Le&&Ue&&typeof Ue.length=="number"){Me&&(Ue=Me);var Ee=0;return function(){return Ee>=Ue.length?{done:!0}:{done:!1,value:Ue[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 Me=Ue[Symbol.iterator](),Me.next.bind(Me)}function y(Ue,Le){return Le={exports:{}},Ue(Le,Le.exports),Le.exports}var T=y(function(Ue){function Le(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Me(Ee){Ue.exports.defaults=Ee}Ue.exports={defaults:Le(),getDefaults:Le,changeDefaults:Me}}),b=T.defaults,p=T.getDefaults,d=T.changeDefaults,n=/[&<>"']/,c=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=function(Le){return o[Le]};function h(Ue,Le){if(Le){if(n.test(Ue))return Ue.replace(c,u)}else if(r.test(Ue))return Ue.replace(a,u);return Ue}var s=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(Ue){return Ue.replace(s,function(Le,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(Ue,Le){Ue=Ue.source||Ue,Le=Le||"";var Me={replace:function(Ce,ke){return ke=ke.source||ke,ke=ke.replace(t,"$1"),Ue=Ue.replace(Ce,ke),Me},getRegex:function(){return new RegExp(Ue,Le)}};return Me}var x=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Ue,Le,Me){if(Ue){var Ee;try{Ee=decodeURIComponent(l(Me)).replace(x,"").toLowerCase()}catch(Ce){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Le&&!f.test(Me)&&(Me=w(Le,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(Ce){return null}return Me}var C={},v=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(Ue,Le){C[" "+Ue]||(v.test(Ue)?C[" "+Ue]=Ue+"/":C[" "+Ue]=V(Ue,"/",!0)),Ue=C[" "+Ue];var Me=Ue.indexOf(":")===-1;return Le.substring(0,2)==="//"?Me?Le:Ue.replace(_,"$1")+Le:Le.charAt(0)==="/"?Me?Le:Ue.replace(E,"$1")+Le:Ue+Le}var k={exec:function(){}};function I(Ue){for(var Le=1,Me,Ee;Le<arguments.length;Le++){Me=arguments[Le];for(Ee in Me)Object.prototype.hasOwnProperty.call(Me,Ee)&&(Ue[Ee]=Me[Ee])}return Ue}function L(Ue,Le){var Me=Ue.replace(/\|/g,function(ke,Ne,He){for(var tt=!1,vt=Ne;--vt>=0&&He[vt]==="\\";)tt=!tt;return tt?"|":" |"}),Ee=Me.split(/ \|/),Ce=0;if(Ee.length>Le)Ee.splice(Le);else for(;Ee.length<Le;)Ee.push("");for(;Ce<Ee.length;Ce++)Ee[Ce]=Ee[Ce].trim().replace(/\\\|/g,"|");return Ee}function V(Ue,Le,Me){var Ee=Ue.length;if(Ee===0)return"";for(var Ce=0;Ce<Ee;){var ke=Ue.charAt(Ee-Ce-1);if(ke===Le&&!Me)Ce++;else if(ke!==Le&&Me)Ce++;else break}return Ue.substr(0,Ee-Ce)}function W(Ue,Le){if(Ue.indexOf(Le[1])===-1)return-1;for(var Me=Ue.length,Ee=0,Ce=0;Ce<Me;Ce++)if(Ue[Ce]==="\\")Ce++;else if(Ue[Ce]===Le[0])Ee++;else if(Ue[Ce]===Le[1]&&(Ee--,Ee<0))return Ce;return-1}function H(Ue){Ue&&Ue.sanitize&&!Ue.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var G={escape:h,unescape:l,edit:S,cleanUrl:R,resolveUrl:w,noopTest:k,merge:I,splitCells:L,rtrim:V,findClosingBracket:W,checkSanitizeDeprecation:H},B=T.defaults,P=G.rtrim,z=G.splitCells,J=G.escape,ue=G.findClosingBracket;function de(Ue,Le,Me){var Ee=Le.href,Ce=Le.title?J(Le.title):null,ke=Ue[1].replace(/\\([\[\]])/g,"$1");return Ue[0].charAt(0)!=="!"?{type:"link",raw:Me,href:Ee,title:Ce,text:ke}:{type:"image",raw:Me,href:Ee,title:Ce,text:J(ke)}}function Se(Ue,Le){var Me=Ue.match(/^(\s+)(?:```)/);if(Me===null)return Le;var Ee=Me[1];return Le.split(`
`).map(function(Ce){var ke=Ce.match(/^\s+/);if(ke===null)return Ce;var Ne=ke[0];return Ne.length>=Ee.length?Ce.slice(Ee.length):Ce}).join(`
`)}var Ae=function(){function Ue(Me){this.options=Me||B}var Le=Ue.prototype;return Le.space=function(Ee){var Ce=this.rules.block.newline.exec(Ee);if(Ce)return Ce[0].length>1?{type:"space",raw:Ce[0]}:{raw:`
`}},Le.code=function(Ee,Ce){var ke=this.rules.block.code.exec(Ee);if(ke){var Ne=Ce[Ce.length-1];if(Ne&&Ne.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var He=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?He:P(He,`
`)}}},Le.fences=function(Ee){var Ce=this.rules.block.fences.exec(Ee);if(Ce){var ke=Ce[0],Ne=Se(ke,Ce[3]||"");return{type:"code",raw:ke,lang:Ce[2]?Ce[2].trim():Ce[2],text:Ne}}},Le.heading=function(Ee){var Ce=this.rules.block.heading.exec(Ee);if(Ce)return{type:"heading",raw:Ce[0],depth:Ce[1].length,text:Ce[2]}},Le.nptable=function(Ee){var Ce=this.rules.block.nptable.exec(Ee);if(Ce){var ke={type:"table",header:z(Ce[1].replace(/^ *| *\| *$/g,"")),align:Ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ce[3]?Ce[3].replace(/\n$/,"").split(`
`):[],raw:Ce[0]};if(ke.header.length===ke.align.length){var Ne=ke.align.length,He;for(He=0;He<Ne;He++)/^ *-+: *$/.test(ke.align[He])?ke.align[He]="right":/^ *:-+: *$/.test(ke.align[He])?ke.align[He]="center":/^ *:-+ *$/.test(ke.align[He])?ke.align[He]="left":ke.align[He]=null;for(Ne=ke.cells.length,He=0;He<Ne;He++)ke.cells[He]=z(ke.cells[He],ke.header.length);return ke}}},Le.hr=function(Ee){var Ce=this.rules.block.hr.exec(Ee);if(Ce)return{type:"hr",raw:Ce[0]}},Le.blockquote=function(Ee){var Ce=this.rules.block.blockquote.exec(Ee);if(Ce){var ke=Ce[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ce[0],text:ke}}},Le.list=function(Ee){var Ce=this.rules.block.list.exec(Ee);if(Ce){for(var ke=Ce[0],Ne=Ce[2],He=Ne.length>1,tt=Ne[Ne.length-1]===")",vt={type:"list",raw:ke,ordered:He,start:He?+Ne.slice(0,-1):"",loose:!1,items:[]},yt=Ce[0].match(this.rules.block.item),Wt=!1,Ht,cr,dr,St,Kr,Vr,Yr,vn=yt.length,Or=0;Or<vn;Or++)Ht=yt[Or],ke=Ht,cr=Ht.length,Ht=Ht.replace(/^ *([*+-]|\d+[.)]) */,""),~Ht.indexOf(`
`)&&(cr-=Ht.length,Ht=this.options.pedantic?Ht.replace(/^ {1,4}/gm,""):Ht.replace(new RegExp("^ {1,"+cr+"}","gm"),"")),Or!==vn-1&&(dr=this.rules.block.bullet.exec(yt[Or+1])[0],(He?dr.length===1||!tt&&dr[dr.length-1]===")":dr.length>1||this.options.smartLists&&dr!==Ne)&&(St=yt.slice(Or+1).join(`
`),vt.raw=vt.raw.substring(0,vt.raw.length-St.length),Or=vn-1)),Kr=Wt||/\n\n(?!\s*$)/.test(Ht),Or!==vn-1&&(Wt=Ht.charAt(Ht.length-1)===`
`,Kr||(Kr=Wt)),Kr&&(vt.loose=!0),Vr=/^\[[ xX]\] /.test(Ht),Yr=void 0,Vr&&(Yr=Ht[1]!==" ",Ht=Ht.replace(/^\[[ xX]\] +/,"")),vt.items.push({type:"list_item",raw:ke,task:Vr,checked:Yr,loose:Kr,text:Ht});return vt}},Le.html=function(Ee){var Ce=this.rules.block.html.exec(Ee);if(Ce)return{type:this.options.sanitize?"paragraph":"html",raw:Ce[0],pre:!this.options.sanitizer&&(Ce[1]==="pre"||Ce[1]==="script"||Ce[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):J(Ce[0]):Ce[0]}},Le.def=function(Ee){var Ce=this.rules.block.def.exec(Ee);if(Ce){Ce[3]&&(Ce[3]=Ce[3].substring(1,Ce[3].length-1));var ke=Ce[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Ce[0],href:Ce[2],title:Ce[3]}}},Le.table=function(Ee){var Ce=this.rules.block.table.exec(Ee);if(Ce){var ke={type:"table",header:z(Ce[1].replace(/^ *| *\| *$/g,"")),align:Ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ce[3]?Ce[3].replace(/\n$/,"").split(`
`):[]};if(ke.header.length===ke.align.length){ke.raw=Ce[0];var Ne=ke.align.length,He;for(He=0;He<Ne;He++)/^ *-+: *$/.test(ke.align[He])?ke.align[He]="right":/^ *:-+: *$/.test(ke.align[He])?ke.align[He]="center":/^ *:-+ *$/.test(ke.align[He])?ke.align[He]="left":ke.align[He]=null;for(Ne=ke.cells.length,He=0;He<Ne;He++)ke.cells[He]=z(ke.cells[He].replace(/^ *\| *| *\| *$/g,""),ke.header.length);return ke}}},Le.lheading=function(Ee){var Ce=this.rules.block.lheading.exec(Ee);if(Ce)return{type:"heading",raw:Ce[0],depth:Ce[2].charAt(0)==="="?1:2,text:Ce[1]}},Le.paragraph=function(Ee){var Ce=this.rules.block.paragraph.exec(Ee);if(Ce)return{type:"paragraph",raw:Ce[0],text:Ce[1].charAt(Ce[1].length-1)===`
`?Ce[1].slice(0,-1):Ce[1]}},Le.text=function(Ee,Ce){var ke=this.rules.block.text.exec(Ee);if(ke){var Ne=Ce[Ce.length-1];return Ne&&Ne.type==="text"?{raw:ke[0],text:ke[0]}:{type:"text",raw:ke[0],text:ke[0]}}},Le.escape=function(Ee){var Ce=this.rules.inline.escape.exec(Ee);if(Ce)return{type:"escape",raw:Ce[0],text:J(Ce[1])}},Le.tag=function(Ee,Ce,ke){var Ne=this.rules.inline.tag.exec(Ee);if(Ne)return!Ce&&/^<a /i.test(Ne[0])?Ce=!0:Ce&&/^<\/a>/i.test(Ne[0])&&(Ce=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ne[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ne[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Ne[0],inLink:Ce,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):J(Ne[0]):Ne[0]}},Le.link=function(Ee){var Ce=this.rules.inline.link.exec(Ee);if(Ce){var ke=ue(Ce[2],"()");if(ke>-1){var Ne=Ce[0].indexOf("!")===0?5:4,He=Ne+Ce[1].length+ke;Ce[2]=Ce[2].substring(0,ke),Ce[0]=Ce[0].substring(0,He).trim(),Ce[3]=""}var tt=Ce[2],vt="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(tt);yt?(tt=yt[1],vt=yt[3]):vt=""}else vt=Ce[3]?Ce[3].slice(1,-1):"";tt=tt.trim().replace(/^<([\s\S]*)>$/,"$1");var Wt=de(Ce,{href:tt&&tt.replace(this.rules.inline._escapes,"$1"),title:vt&&vt.replace(this.rules.inline._escapes,"$1")},Ce[0]);return Wt}},Le.reflink=function(Ee,Ce){var ke;if((ke=this.rules.inline.reflink.exec(Ee))||(ke=this.rules.inline.nolink.exec(Ee))){var Ne=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ne=Ce[Ne.toLowerCase()],!Ne||!Ne.href){var He=ke[0].charAt(0);return{type:"text",raw:He,text:He}}var tt=de(ke,Ne,ke[0]);return tt}},Le.strong=function(Ee,Ce,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.strong.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ce=Ce.slice(-1*Ee.length);var He=Ne[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;He.lastIndex=0;for(var tt;(Ne=He.exec(Ce))!=null;)if(tt=this.rules.inline.strong.middle.exec(Ce.slice(0,Ne.index+3)),tt)return{type:"strong",raw:Ee.slice(0,tt[0].length),text:Ee.slice(2,tt[0].length-2)}}},Le.em=function(Ee,Ce,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.em.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ce=Ce.slice(-1*Ee.length);var He=Ne[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;He.lastIndex=0;for(var tt;(Ne=He.exec(Ce))!=null;)if(tt=this.rules.inline.em.middle.exec(Ce.slice(0,Ne.index+2)),tt)return{type:"em",raw:Ee.slice(0,tt[0].length),text:Ee.slice(1,tt[0].length-1)}}},Le.codespan=function(Ee){var Ce=this.rules.inline.code.exec(Ee);if(Ce){var ke=Ce[2].replace(/\n/g," "),Ne=/[^ ]/.test(ke),He=ke.startsWith(" ")&&ke.endsWith(" ");return Ne&&He&&(ke=ke.substring(1,ke.length-1)),ke=J(ke,!0),{type:"codespan",raw:Ce[0],text:ke}}},Le.br=function(Ee){var Ce=this.rules.inline.br.exec(Ee);if(Ce)return{type:"br",raw:Ce[0]}},Le.del=function(Ee){var Ce=this.rules.inline.del.exec(Ee);if(Ce)return{type:"del",raw:Ce[0],text:Ce[1]}},Le.autolink=function(Ee,Ce){var ke=this.rules.inline.autolink.exec(Ee);if(ke){var Ne,He;return ke[2]==="@"?(Ne=J(this.options.mangle?Ce(ke[1]):ke[1]),He="mailto:"+Ne):(Ne=J(ke[1]),He=Ne),{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.url=function(Ee,Ce){var ke;if(ke=this.rules.inline.url.exec(Ee)){var Ne,He;if(ke[2]==="@")Ne=J(this.options.mangle?Ce(ke[0]):ke[0]),He="mailto:"+Ne;else{var tt;do tt=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(tt!==ke[0]);Ne=J(ke[0]),ke[1]==="www."?He="http://"+Ne:He=Ne}return{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.inlineText=function(Ee,Ce,ke){var Ne=this.rules.inline.text.exec(Ee);if(Ne){var He;return Ce?He=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):J(Ne[0]):Ne[0]:He=J(this.options.smartypants?ke(Ne[0]):Ne[0]),{type:"text",raw:Ne[0],text:He}}},Ue}(),pe=G.noopTest,Oe=G.edit,ye=G.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:pe,table:pe,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=ye({},ce),ce.gfm=ye({},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=ye({},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:pe,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 ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:pe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:pe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ae._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ae.punctuation=Oe(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=Oe(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=Oe(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=Oe(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=Oe(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=Oe(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=Oe(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=Oe(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=Oe(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=Oe(ae._blockSkip,"g").getRegex(),ae.overlapSkip=Oe(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._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])?)+(?![-_])/,ae.autolink=Oe(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=Oe(ae.tag).replace("comment",ce._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=Oe(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=Oe(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=Oe(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=ye({},ae),ae.pedantic=ye({},ae.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",ae._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=ye({},ae.normal,{escape:Oe(ae.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ae.gfm.url=Oe(ae.gfm.url,"i").replace("email",ae.gfm._extended_email).getRegex(),ae.breaks=ye({},ae.gfm,{br:Oe(ae.br).replace("{2,}","*").getRegex(),text:Oe(ae.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var re={block:ce,inline:ae},fe=T.defaults,te=re.block,ne=re.inline;function Te(Ue){return Ue.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ie(Ue){var Le="",Me,Ee,Ce=Ue.length;for(Me=0;Me<Ce;Me++)Ee=Ue.charCodeAt(Me),Math.random()>.5&&(Ee="x"+Ee.toString(16)),Le+="&#"+Ee+";";return Le}var Z=function(){function Ue(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||fe,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:te.normal,inline:ne.normal};this.options.pedantic?(Ee.block=te.pedantic,Ee.inline=ne.pedantic):this.options.gfm&&(Ee.block=te.gfm,this.options.breaks?Ee.inline=ne.breaks:Ee.inline=ne.gfm),this.tokenizer.rules=Ee}Ue.lex=function(Ee,Ce){var ke=new Ue(Ce);return ke.lex(Ee)};var Le=Ue.prototype;return Le.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},Le.blockTokens=function(Ee,Ce,ke){Ce===void 0&&(Ce=[]),ke===void 0&&(ke=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Ne,He,tt,vt;Ee;){if(Ne=this.tokenizer.space(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.type&&Ce.push(Ne);continue}if(Ne=this.tokenizer.code(Ee,Ce)){Ee=Ee.substring(Ne.raw.length),Ne.type?Ce.push(Ne):(vt=Ce[Ce.length-1],vt.raw+=`
`+Ne.raw,vt.text+=`
`+Ne.text);continue}if(Ne=this.tokenizer.fences(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.heading(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.hr(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.tokens=this.blockTokens(Ne.text,[],ke),Ce.push(Ne);continue}if(Ne=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Ne.raw.length),tt=Ne.items.length,He=0;He<tt;He++)Ne.items[He].tokens=this.blockTokens(Ne.items[He].text,[],!1);Ce.push(Ne);continue}if(Ne=this.tokenizer.html(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(ke&&(Ne=this.tokenizer.def(Ee))){Ee=Ee.substring(Ne.raw.length),this.tokens.links[Ne.tag]||(this.tokens.links[Ne.tag]={href:Ne.href,title:Ne.title});continue}if(Ne=this.tokenizer.table(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.lheading(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(ke&&(Ne=this.tokenizer.paragraph(Ee))){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.text(Ee,Ce)){Ee=Ee.substring(Ne.raw.length),Ne.type?Ce.push(Ne):(vt=Ce[Ce.length-1],vt.raw+=`
`+Ne.raw,vt.text+=`
`+Ne.text);continue}if(Ee){var yt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(yt);break}else throw new Error(yt)}}return Ce},Le.inline=function(Ee){var Ce,ke,Ne,He,tt,vt,yt=Ee.length;for(Ce=0;Ce<yt;Ce++){vt=Ee[Ce];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,ke=0;ke<He;ke++)vt.tokens.header[ke]=[],this.inlineTokens(vt.header[ke],vt.tokens.header[ke]);for(He=vt.cells.length,ke=0;ke<He;ke++)for(tt=vt.cells[ke],vt.tokens.cells[ke]=[],Ne=0;Ne<tt.length;Ne++)vt.tokens.cells[ke][Ne]=[],this.inlineTokens(tt[Ne],vt.tokens.cells[ke][Ne]);break}case"blockquote":{this.inline(vt.tokens);break}case"list":{for(He=vt.items.length,ke=0;ke<He;ke++)this.inline(vt.items[ke].tokens);break}}}return Ee},Le.inlineTokens=function(Ee,Ce,ke,Ne,He){Ce===void 0&&(Ce=[]),ke===void 0&&(ke=!1),Ne===void 0&&(Ne=!1),He===void 0&&(He="");var tt,vt=Ee,yt;if(this.tokens.links){var Wt=Object.keys(this.tokens.links);if(Wt.length>0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(vt))!=null;)Wt.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(vt=vt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(vt))!=null;)vt=vt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ee;){if(tt=this.tokenizer.escape(Ee)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.tag(Ee,ke,Ne)){Ee=Ee.substring(tt.raw.length),ke=tt.inLink,Ne=tt.inRawBlock,Ce.push(tt);continue}if(tt=this.tokenizer.link(Ee)){Ee=Ee.substring(tt.raw.length),tt.type==="link"&&(tt.tokens=this.inlineTokens(tt.text,[],!0,Ne)),Ce.push(tt);continue}if(tt=this.tokenizer.reflink(Ee,this.tokens.links)){Ee=Ee.substring(tt.raw.length),tt.type==="link"&&(tt.tokens=this.inlineTokens(tt.text,[],!0,Ne)),Ce.push(tt);continue}if(tt=this.tokenizer.strong(Ee,vt,He)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],ke,Ne),Ce.push(tt);continue}if(tt=this.tokenizer.em(Ee,vt,He)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],ke,Ne),Ce.push(tt);continue}if(tt=this.tokenizer.codespan(Ee)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.br(Ee)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.del(Ee)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],ke,Ne),Ce.push(tt);continue}if(tt=this.tokenizer.autolink(Ee,ie)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(!ke&&(tt=this.tokenizer.url(Ee,ie))){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.inlineText(Ee,Ne,Te)){Ee=Ee.substring(tt.raw.length),He=tt.raw.slice(-1),Ce.push(tt);continue}if(Ee){var Ht="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(Ht);break}else throw new Error(Ht)}}return Ce},g(Ue,null,[{key:"rules",get:function(){return{block:te,inline:ne}}}]),Ue}(),X=T.defaults,Q=G.cleanUrl,_e=G.escape,ve=function(){function Ue(Me){this.options=Me||X}var Le=Ue.prototype;return Le.code=function(Ee,Ce,ke){var Ne=(Ce||"").match(/\S*/)[0];if(this.options.highlight){var He=this.options.highlight(Ee,Ne);He!=null&&He!==Ee&&(ke=!0,Ee=He)}return Ne?'<pre><code class="'+this.options.langPrefix+_e(Ne,!0)+'">'+(ke?Ee:_e(Ee,!0))+`</code></pre>
`:"<pre><code>"+(ke?Ee:_e(Ee,!0))+`</code></pre>
`},Le.blockquote=function(Ee){return`<blockquote>
`+Ee+`</blockquote>
`},Le.html=function(Ee){return Ee},Le.heading=function(Ee,Ce,ke,Ne){return this.options.headerIds?"<h"+Ce+' id="'+this.options.headerPrefix+Ne.slug(ke)+'">'+Ee+"</h"+Ce+`>
`:"<h"+Ce+">"+Ee+"</h"+Ce+`>
`},Le.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Le.list=function(Ee,Ce,ke){var Ne=Ce?"ol":"ul",He=Ce&&ke!==1?' start="'+ke+'"':"";return"<"+Ne+He+`>
`+Ee+"</"+Ne+`>
`},Le.listitem=function(Ee){return"<li>"+Ee+`</li>
`},Le.checkbox=function(Ee){return"<input "+(Ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Le.paragraph=function(Ee){return"<p>"+Ee+`</p>
`},Le.table=function(Ee,Ce){return Ce&&(Ce="<tbody>"+Ce+"</tbody>"),`<table>
<thead>
`+Ee+`</thead>
`+Ce+`</table>
`},Le.tablerow=function(Ee){return`<tr>
`+Ee+`</tr>
`},Le.tablecell=function(Ee,Ce){var ke=Ce.header?"th":"td",Ne=Ce.align?"<"+ke+' align="'+Ce.align+'">':"<"+ke+">";return Ne+Ee+"</"+ke+`>
`},Le.strong=function(Ee){return"<strong>"+Ee+"</strong>"},Le.em=function(Ee){return"<em>"+Ee+"</em>"},Le.codespan=function(Ee){return"<code>"+Ee+"</code>"},Le.br=function(){return this.options.xhtml?"<br/>":"<br>"},Le.del=function(Ee){return"<del>"+Ee+"</del>"},Le.link=function(Ee,Ce,ke){if(Ee=Q(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Ne='<a href="'+_e(Ee)+'"';return Ce&&(Ne+=' title="'+Ce+'"'),Ne+=">"+ke+"</a>",Ne},Le.image=function(Ee,Ce,ke){if(Ee=Q(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Ne='<img src="'+Ee+'" alt="'+ke+'"';return Ce&&(Ne+=' title="'+Ce+'"'),Ne+=this.options.xhtml?"/>":">",Ne},Le.text=function(Ee){return Ee},Ue}(),Re=function(){function Ue(){}var Le=Ue.prototype;return Le.strong=function(Ee){return Ee},Le.em=function(Ee){return Ee},Le.codespan=function(Ee){return Ee},Le.del=function(Ee){return Ee},Le.html=function(Ee){return Ee},Le.text=function(Ee){return Ee},Le.link=function(Ee,Ce,ke){return""+ke},Le.image=function(Ee,Ce,ke){return""+ke},Le.br=function(){return""},Ue}(),Je=function(){function Ue(){this.seen={}}var Le=Ue.prototype;return Le.slug=function(Ee){var Ce=Ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ce)){var ke=Ce;do this.seen[ke]++,Ce=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Ce))}return this.seen[Ce]=0,Ce},Ue}(),qe=T.defaults,rt=G.unescape,ut=function(){function Ue(Me){this.options=Me||qe,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Re,this.slugger=new Je}Ue.parse=function(Ee,Ce){var ke=new Ue(Ce);return ke.parse(Ee)};var Le=Ue.prototype;return Le.parse=function(Ee,Ce){Ce===void 0&&(Ce=!0);var ke="",Ne,He,tt,vt,yt,Wt,Ht,cr,dr,St,Kr,Vr,Yr,vn,Or,dn,hn,Tt,gr=Ee.length;for(Ne=0;Ne<gr;Ne++){St=Ee[Ne];switch(St.type){case"space":continue;case"hr":{ke+=this.renderer.hr();continue}case"heading":{ke+=this.renderer.heading(this.parseInline(St.tokens),St.depth,rt(this.parseInline(St.tokens,this.textRenderer)),this.slugger);continue}case"code":{ke+=this.renderer.code(St.text,St.lang,St.escaped);continue}case"table":{for(cr="",Ht="",vt=St.header.length,He=0;He<vt;He++)Ht+=this.renderer.tablecell(this.parseInline(St.tokens.header[He]),{header:!0,align:St.align[He]});for(cr+=this.renderer.tablerow(Ht),dr="",vt=St.cells.length,He=0;He<vt;He++){for(Wt=St.tokens.cells[He],Ht="",yt=Wt.length,tt=0;tt<yt;tt++)Ht+=this.renderer.tablecell(this.parseInline(Wt[tt]),{header:!1,align:St.align[tt]});dr+=this.renderer.tablerow(Ht)}ke+=this.renderer.table(cr,dr);continue}case"blockquote":{dr=this.parse(St.tokens),ke+=this.renderer.blockquote(dr);continue}case"list":{for(Kr=St.ordered,Vr=St.start,Yr=St.loose,vt=St.items.length,dr="",He=0;He<vt;He++)Or=St.items[He],dn=Or.checked,hn=Or.task,vn="",Or.task&&(Tt=this.renderer.checkbox(dn),Yr?Or.tokens.length>0&&Or.tokens[0].type==="text"?(Or.tokens[0].text=Tt+" "+Or.tokens[0].text,Or.tokens[0].tokens&&Or.tokens[0].tokens.length>0&&Or.tokens[0].tokens[0].type==="text"&&(Or.tokens[0].tokens[0].text=Tt+" "+Or.tokens[0].tokens[0].text)):Or.tokens.unshift({type:"text",text:Tt}):vn+=Tt),vn+=this.parse(Or.tokens,Yr),dr+=this.renderer.listitem(vn,hn,dn);ke+=this.renderer.list(dr,Kr,Vr);continue}case"html":{ke+=this.renderer.html(St.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(dr=St.tokens?this.parseInline(St.tokens):St.text;Ne+1<gr&&Ee[Ne+1].type==="text";)St=Ee[++Ne],dr+=`
`+(St.tokens?this.parseInline(St.tokens):St.text);ke+=Ce?this.renderer.paragraph(dr):dr;continue}default:{var Br='Token with "'+St.type+'" type was not found.';if(this.options.silent){console.error(Br);return}else throw new Error(Br)}}}return ke},Le.parseInline=function(Ee,Ce){Ce=Ce||this.renderer;var ke="",Ne,He,tt=Ee.length;for(Ne=0;Ne<tt;Ne++){He=Ee[Ne];switch(He.type){case"escape":{ke+=Ce.text(He.text);break}case"html":{ke+=Ce.html(He.text);break}case"link":{ke+=Ce.link(He.href,He.title,this.parseInline(He.tokens,Ce));break}case"image":{ke+=Ce.image(He.href,He.title,He.text);break}case"strong":{ke+=Ce.strong(this.parseInline(He.tokens,Ce));break}case"em":{ke+=Ce.em(this.parseInline(He.tokens,Ce));break}case"codespan":{ke+=Ce.codespan(He.text);break}case"br":{ke+=Ce.br();break}case"del":{ke+=Ce.del(this.parseInline(He.tokens,Ce));break}case"text":{ke+=Ce.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 ke},Ue}(),dt=G.merge,ft=G.checkSanitizeDeprecation,Be=G.escape,Ie=T.getDefaults,at=T.changeDefaults,ct=T.defaults;function $e(Ue,Le,Me){if(typeof Ue=="undefined"||Ue===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ue!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ue)+", string expected");if(typeof Le=="function"&&(Me=Le,Le=null),Le=dt({},$e.defaults,Le||{}),ft(Le),Me){var Ee=Le.highlight,Ce;try{Ce=Z.lex(Ue,Le)}catch(tt){return Me(tt)}var ke=function(vt){var yt;if(!vt)try{yt=ut.parse(Ce,Le)}catch(Wt){vt=Wt}return Le.highlight=Ee,vt?Me(vt):Me(null,yt)};if(!Ee||Ee.length<3)return ke();if(delete Le.highlight,!Ce.length)return ke();var Ne=0;$e.walkTokens(Ce,function(tt){tt.type==="code"&&(Ne++,setTimeout(function(){Ee(tt.text,tt.lang,function(vt,yt){if(vt)return ke(vt);yt!=null&&yt!==tt.text&&(tt.text=yt,tt.escaped=!0),Ne--,Ne===0&&ke()})},0))}),Ne===0&&ke();return}try{var He=Z.lex(Ue,Le);return Le.walkTokens&&$e.walkTokens(He,Le.walkTokens),ut.parse(He,Le)}catch(tt){if(tt.message+=`
Please report this to https://github.com/markedjs/marked.`,Le.silent)return"<p>An error occurred:</p><pre>"+Be(tt.message+"",!0)+"</pre>";throw tt}}$e.options=$e.setOptions=function(Ue){return dt($e.defaults,Ue),at($e.defaults),$e},$e.getDefaults=Ie,$e.defaults=ct,$e.use=function(Ue){var Le=dt({},Ue);if(Ue.renderer&&function(){var Ee=$e.defaults.renderer||new ve,Ce=function(He){var tt=Ee[He];Ee[He]=function(){for(var vt=arguments.length,yt=new Array(vt),Wt=0;Wt<vt;Wt++)yt[Wt]=arguments[Wt];var Ht=Ue.renderer[He].apply(Ee,yt);return Ht===!1&&(Ht=tt.apply(Ee,yt)),Ht}};for(var ke in Ue.renderer)Ce(ke);Le.renderer=Ee}(),Ue.tokenizer&&function(){var Ee=$e.defaults.tokenizer||new Ae,Ce=function(He){var tt=Ee[He];Ee[He]=function(){for(var vt=arguments.length,yt=new Array(vt),Wt=0;Wt<vt;Wt++)yt[Wt]=arguments[Wt];var Ht=Ue.tokenizer[He].apply(Ee,yt);return Ht===!1&&(Ht=tt.apply(Ee,yt)),Ht}};for(var ke in Ue.tokenizer)Ce(ke);Le.tokenizer=Ee}(),Ue.walkTokens){var Me=$e.defaults.walkTokens;Le.walkTokens=function(Ee){Ue.walkTokens(Ee),Me&&Me(Ee)}}$e.setOptions(Le)},$e.walkTokens=function(Ue,Le){for(var Me=m(Ue),Ee;!(Ee=Me()).done;){var Ce=Ee.value;Le(Ce);switch(Ce.type){case"table":{for(var ke=m(Ce.tokens.header),Ne;!(Ne=ke()).done;){var He=Ne.value;$e.walkTokens(He,Le)}for(var tt=m(Ce.tokens.cells),vt;!(vt=tt()).done;)for(var yt=vt.value,Wt=m(yt),Ht;!(Ht=Wt()).done;){var cr=Ht.value;$e.walkTokens(cr,Le)}break}case"list":{$e.walkTokens(Ce.items,Le);break}default:Ce.tokens&&$e.walkTokens(Ce.tokens,Le)}}},$e.Parser=ut,$e.parser=ut.parse,$e.Renderer=ve,$e.TextRenderer=Re,$e.Lexer=Z,$e.lexer=Z.lex,$e.Tokenizer=Ae,$e.Slugger=Je,$e.parse=$e;var st=$e;return st})},E4JC:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.StreamCipher,m=g.algo,y=[],T=[],b=[],p=m.Rabbit=M.extend({_doReset:function(){for(var n=this._key.words,c=this.cfg.iv,r=0;r<4;r++)n[r]=(n[r]<<8|n[r]>>>24)&16711935|(n[r]<<24|n[r]>>>8)&4278255360;var a=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],o=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var r=0;r<4;r++)d.call(this);for(var r=0;r<8;r++)o[r]^=a[r+4&7];if(c){var u=c.words,h=u[0],s=u[1],l=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,t=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,S=l>>>16|t&4294901760,x=t<<16|l&65535;o[0]^=l,o[1]^=S,o[2]^=t,o[3]^=x,o[4]^=l,o[5]^=S,o[6]^=t,o[7]^=x;for(var r=0;r<4;r++)d.call(this)}},_doProcessBlock:function(n,c){var r=this._X;d.call(this),y[0]=r[0]^r[5]>>>16^r[3]<<16,y[1]=r[2]^r[7]>>>16^r[5]<<16,y[2]=r[4]^r[1]>>>16^r[7]<<16,y[3]=r[6]^r[3]>>>16^r[1]<<16;for(var a=0;a<4;a++)y[a]=(y[a]<<8|y[a]>>>24)&16711935|(y[a]<<24|y[a]>>>8)&4278255360,n[c+a]^=y[a]},blockSize:128/32,ivSize:64/32});function d(){for(var n=this._X,c=this._C,r=0;r<8;r++)T[r]=c[r];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 r=0;r<8;r++){var a=n[r]+c[r],o=a&65535,u=a>>>16,h=((o*o>>>17)+o*u>>>15)+u*u,s=((a&4294901760)*a|0)+((a&65535)*a|0);b[r]=h^s}n[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,n[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,n[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,n[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,n[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,n[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,n[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,n[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.Rabbit=M._createHelper(p)}(),N.Rabbit})},ELLl:function(F,q,j){(function(N){N(j("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,u,h){h&&h!=N.Init&&(o.removeKeyMap(m),o.state.closeBrackets=null),u&&(y(M(u,"pairs")),o.state.closeBrackets=u,o.addKeyMap(m))});function M(o,u){return u=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[u]!=null?o[u]:g[u]}var m={Backspace:p,Enter:d};function y(o){for(var u=0;u<o.length;u++){var h=o.charAt(u),s="'"+h+"'";m[s]||(m[s]=T(h))}}y(g.pairs+"`");function T(o){return function(u){return c(u,o)}}function b(o){var u=o.state.closeBrackets;if(!u||u.override)return u;var h=o.getModeAt(o.getCursor());return h.closeBrackets||u}function p(o){var u=b(o);if(!u||o.getOption("disableInput"))return N.Pass;for(var h=M(u,"pairs"),s=o.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return N.Pass;var t=r(o,s[l].head);if(!t||h.indexOf(t)%2!=0)return N.Pass}for(var l=s.length-1;l>=0;l--){var S=s[l].head;o.replaceRange("",O(S.line,S.ch-1),O(S.line,S.ch+1),"+delete")}}function d(o){var u=b(o),h=u&&M(u,"explode");if(!h||o.getOption("disableInput"))return N.Pass;for(var s=o.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return N.Pass;var t=r(o,s[l].head);if(!t||h.indexOf(t)%2!=0)return N.Pass}o.operation(function(){var S=o.lineSeparator()||`
`;o.replaceSelection(S+S,null),o.execCommand("goCharLeft"),s=o.listSelections();for(var x=0;x<s.length;x++){var f=s[x].head.line;o.indentLine(f,null,!0),o.indentLine(f+1,null,!0)}})}function n(o){var u=N.cmpPos(o.anchor,o.head)>0;return{anchor:new O(o.anchor.line,o.anchor.ch+(u?-1:1)),head:new O(o.head.line,o.head.ch+(u?1:-1))}}function c(o,u){var h=b(o);if(!h||o.getOption("disableInput"))return N.Pass;var s=M(h,"pairs"),l=s.indexOf(u);if(l==-1)return N.Pass;for(var t=M(h,"closeBefore"),S=M(h,"triples"),x=s.charAt(l+1)==u,f=o.listSelections(),R=l%2==0,C,v=0;v<f.length;v++){var _=f[v],E=_.head,w,k=o.getRange(E,O(E.line,E.ch+1));if(R&&!_.empty())w="surround";else if((x||!R)&&k==u)x&&a(o,E)?w="both":S.indexOf(u)>=0&&o.getRange(E,O(E.line,E.ch+3))==u+u+u?w="skipThree":w="skip";else if(x&&E.ch>1&&S.indexOf(u)>=0&&o.getRange(O(E.line,E.ch-2),E)==u+u){if(E.ch>2&&/\bstring/.test(o.getTokenTypeAt(O(E.line,E.ch-2))))return N.Pass;w="addFour"}else if(x){var I=E.ch==0?" ":o.getRange(O(E.line,E.ch-1),E);if(!N.isWordChar(k)&&I!=u&&!N.isWordChar(I))w="both";else return N.Pass}else if(R&&(k.length===0||/\s/.test(k)||t.indexOf(k)>-1))w="both";else return N.Pass;if(!C)C=w;else if(C!=w)return N.Pass}var L=l%2?s.charAt(l-1):u,V=l%2?u:s.charAt(l+1);o.operation(function(){if(C=="skip")o.execCommand("goCharRight");else if(C=="skipThree")for(var W=0;W<3;W++)o.execCommand("goCharRight");else if(C=="surround"){for(var H=o.getSelections(),W=0;W<H.length;W++)H[W]=L+H[W]+V;o.replaceSelections(H,"around"),H=o.listSelections().slice();for(var W=0;W<H.length;W++)H[W]=n(H[W]);o.setSelections(H)}else C=="both"?(o.replaceSelection(L+V,null),o.triggerElectric(L+V),o.execCommand("goCharLeft")):C=="addFour"&&(o.replaceSelection(L+L+L+L,"before"),o.execCommand("goCharRight"))})}function r(o,u){var h=o.getRange(O(u.line,u.ch-1),O(u.line,u.ch+1));return h.length==2?h:null}function a(o,u){var h=o.getTokenAt(O(u.line,u.ch+1));return/\bstring/.test(h.type)&&h.start==u.ch&&(u.ch==0||!/\bstring/.test(o.getTokenTypeAt(u)))}})},ELcG:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(g){var O=N,M=O.lib,m=M.WordArray,y=M.Hasher,T=O.algo,b=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]),p=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]),d=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]),n=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]),r=m.create([1352829926,1548603684,1836072691,2053994217,0]),a=T.RIPEMD160=y.extend({_doReset:function(){this._hash=m.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,x){for(var f=0;f<16;f++){var R=x+f,C=S[R];S[R]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var v=this._hash.words,_=c.words,E=r.words,w=b.words,k=p.words,I=d.words,L=n.words,V,W,H,G,B,P,z,J,ue,de;P=V=v[0],z=W=v[1],J=H=v[2],ue=G=v[3],de=B=v[4];for(var Se,f=0;f<80;f+=1)Se=V+S[x+w[f]]|0,f<16?Se+=o(W,H,G)+_[0]:f<32?Se+=u(W,H,G)+_[1]:f<48?Se+=h(W,H,G)+_[2]:f<64?Se+=s(W,H,G)+_[3]:Se+=l(W,H,G)+_[4],Se=Se|0,Se=t(Se,I[f]),Se=Se+B|0,V=B,B=G,G=t(H,10),H=W,W=Se,Se=P+S[x+k[f]]|0,f<16?Se+=l(z,J,ue)+E[0]:f<32?Se+=s(z,J,ue)+E[1]:f<48?Se+=h(z,J,ue)+E[2]:f<64?Se+=u(z,J,ue)+E[3]:Se+=o(z,J,ue)+E[4],Se=Se|0,Se=t(Se,L[f]),Se=Se+de|0,P=de,de=ue,ue=t(J,10),J=z,z=Se;Se=v[1]+H+ue|0,v[1]=v[2]+G+de|0,v[2]=v[3]+B+P|0,v[3]=v[4]+V+z|0,v[4]=v[0]+W+J|0,v[0]=Se},_doFinalize:function(){var S=this._data,x=S.words,f=this._nDataBytes*8,R=S.sigBytes*8;x[R>>>5]|=128<<24-R%32,x[(R+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,S.sigBytes=(x.length+1)*4,this._process();for(var C=this._hash,v=C.words,_=0;_<5;_++){var E=v[_];v[_]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return C},clone:function(){var S=y.clone.call(this);return S._hash=this._hash.clone(),S}});function o(S,x,f){return S^x^f}function u(S,x,f){return S&x|~S&f}function h(S,x,f){return(S|~x)^f}function s(S,x,f){return S&f|x&~f}function l(S,x,f){return S^(x|~f)}function t(S,x){return S<<x|S>>>32-x}O.RIPEMD160=y._createHelper(a),O.HmacRIPEMD160=y._createHmacHelper(a)}(Math),N.RIPEMD160})},ETIr:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.enc,y=m.Base64={stringify:function(b){var p=b.words,d=b.sigBytes,n=this._map;b.clamp();for(var c=[],r=0;r<d;r+=3)for(var a=p[r>>>2]>>>24-r%4*8&255,o=p[r+1>>>2]>>>24-(r+1)%4*8&255,u=p[r+2>>>2]>>>24-(r+2)%4*8&255,h=a<<16|o<<8|u,s=0;s<4&&r+s*.75<d;s++)c.push(n.charAt(h>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;c.length%4;)c.push(l);return c.join("")},parse:function(b){var p=b.length,d=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var c=0;c<d.length;c++)n[d.charCodeAt(c)]=c}var r=d.charAt(64);if(r){var a=b.indexOf(r);a!==-1&&(p=a)}return T(b,p,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function T(b,p,d){for(var n=[],c=0,r=0;r<p;r++)if(r%4){var a=d[b.charCodeAt(r-1)]<<r%4*2,o=d[b.charCodeAt(r)]>>>6-r%4*2,u=a|o;n[c>>>2]|=u<<24-c%4*8,c++}return M.create(n,c)}}(),N.enc.Base64})},"F+F2":function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,O=g.lib,M=O.WordArray,m=M.init,y=M.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 b=T.byteLength,p=[],d=0;d<b;d++)p[d>>>2]|=T[d]<<24-d%4*8;m.call(this,p,b)}else m.apply(this,arguments)};y.prototype=M}(),N.lib.WordArray})},GRO8:function(F,q,j){"use strict";j.r(q);var N=j("k1fw"),g=j("2qtc"),O=j("kLXV"),M=j("lUTK"),m=j("BvKs"),y=j("+L6B"),T=j("2/Rp"),b=j("T2oS"),p=j("W9HT"),d=j("sPJy"),n=j("bE4q"),c=j("miYZ"),r=j("tsqr"),a=j("9og8"),o=j("tJVT"),u=j("PpiC"),h=j("WmNS"),s=j.n(h),l=j("q1tI"),t=j.n(l),S=j("Ty5D"),x=j("55Ip"),f=j("9kvl"),R=j("KeDT"),C=j.n(R),v=j("zrhs"),_=j("DZo9"),E=j("8z0m"),w=j("LtfV"),k=j("KhGG"),I=E.a.Dragger,L=function(et){var mt=et.user,wt=et.dispatch,Lt=et.classroomList,Dt=et.shixunsDetail,Kt=et.getResults,zt=Object(S.i)(),ht=Object(l.useState)(),Ot=Object(o.a)(ht,2),Rt=Ot[0],ur=Ot[1],ar=Object(l.useState)([]),Zt=Object(o.a)(ar,2),$t=Zt[0],rr=Zt[1],sr=Object(l.useState)(!1),ot=Object(o.a)(sr,2),Ar=ot[0],Nr=ot[1],fr={onRemove:function(){rr([])},beforeUpload:function(It){if(console.log(It),(It==null?void 0:It.size)>1024*1024*500)return r.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Et=[];return Et.push(It),rr([].concat(Et)),!1},fileList:$t};return t.a.createElement(O.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:Ar,onOk:Object(a.a)(s.a.mark(function _t(){var It,Et,Nt;return s.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 r.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),pr.abrupt("return");case 3:return Nr(!0),pr.next=6,Object(k.c)($t[0],{login:(It=mt.userInfo)===null||It===void 0?void 0:It.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(Et=$t[0])===null||Et===void 0?void 0:Et.name});case 6:Nt=pr.sent,(Nt==null?void 0:Nt.status)===0?(r.b.info("\u63D0\u4EA4\u6210\u529F"),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Nr(!1),rr([]),Kt(Dt.actionTabs.params.value)):(Nr(!1),r.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return pr.stop()}},_t)})),onCancel:function(){rr([]),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(I,fr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(w.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},V=Object(f.a)(function(xt){var et=xt.user,mt=xt.classroomList,wt=xt.shixunsDetail;return{user:et,classroomList:mt,shixunsDetail:wt}})(L),W=j("14J3"),H=j("BMrR"),G=j("5NDa"),B=j("5rEg"),P=j("9Bee"),z=j("m3rI"),J=j("ErOA"),ue=j("NLgs"),de=j("fV52"),Se=j("3I+P"),Ae=j("OaEy"),pe=j("2fM7"),Oe=j("5bA4"),ye=j("UESt"),ce=pe.a.Option;function ae(xt){var et=xt.rewarddata,mt=xt.getlistdatas,wt=xt.is_signed,Lt=xt.dispatch,Dt=xt.userlist,Kt=Object(l.useRef)(null),zt=Object(l.useState)(!1),ht=Object(o.a)(zt,2),Ot=ht[0],Rt=ht[1],ur=Object(l.useState)(void 0),ar=Object(o.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(l.useState)(""),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(void 0),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(void 0),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(void 0),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1];function it(mr){return Gt.apply(this,arguments)}function Gt(){return Gt=Object(a.a)(s.a.mark(function mr(Ir){var Pr;return s.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(!Ir.user_received){Qt.next=3;break}return window.open(Ir.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 r.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Qt.abrupt("return");case 8:if(!(Ir.click_event==="Pop")){Qt.next=14;break}return Ar(Ir.id),Rt(!0),Qt.abrupt("return");case 14:$t(void 0);case 15:return Qt.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:Ir.id}});case 17:Pr=Qt.sent,Pr&&Pr.status===0&&(mt(),Ir.click_event==="Link"?(r.b.info("\u9886\u53D6\u6210\u529F"),window.open(Ir.click_info)):r.b.info(Ir.click_info));case 19:case"end":return Qt.stop()}},mr)})),Gt.apply(this,arguments)}function ln(){return en.apply(this,arguments)}function en(){return en=Object(a.a)(s.a.mark(function mr(){var Ir;return s.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Dt&&!Dt.real_name)){Ft.next=4;break}if(_t){Ft.next=4;break}return r.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Dt&&!Dt.email)){Ft.next=8;break}if(qt){Ft.next=8;break}return r.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){Ft.next=12;break}if(Ur){Ft.next=12;break}return r.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Zt){Ft.next=15;break}return r.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:ot,className:Zt,name:_t,mail:qt,phone:Ur}});case 17:Ir=Ft.sent,Ir&&Ir.status===0&&(Rt(!1),mt(),r.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 t.a.createElement("div",null,t.a.createElement(O.a,{visible:Ot,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Rt(!1)},onOk:function(){ln()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(B.a,{className:Dt&&Dt.real_name?"":C.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||_t,disabled:Dt&&Dt.real_name||!1,onChange:function(Ir){return It(Ir.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(B.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||qt,disabled:Dt&&Dt.email||!1,onChange:function(Ir){return pr(Ir.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(B.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||Ur,disabled:Dt&&Dt.phone||!1,onChange:function(Ir){return br(Ir.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(pe.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(Ir){$t(Ir)}},t.a.createElement(ce,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ce,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ce,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ce,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ce,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ce,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ce,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ce,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ce,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ce,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ce,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ce,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ce,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),et&&et.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:C.a.spanprev,onClick:function(){Kt.current.prev()}},t.a.createElement(Oe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Se.a,{ref:Kt,className:C.a.divwidth,slidesToShow:3,slidesToScroll:1},et&&et.map(function(mr,Ir){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?t.a.createElement("p",{className:C.a.receiveclick,onClick:function(){return it(mr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:C.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:C.a.spannext,onClick:function(){Kt.current.next()}},t.a.createElement(ye.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:C.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},et&&et.map(function(mr,Ir){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?t.a.createElement("p",{className:C.a.receiveclick,onClick:function(){return it(mr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:C.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=ae,fe=function(et,mt){var wt=et.StaffDetail,Lt=et.HeaderDetail,Dt=et.ItemData,Kt=et.setIssee,zt=et.ModelType,ht=et.dispatch,Ot=et.userinfo,Rt=et.Editable,ur=Object(l.useState)(!1),ar=Object(o.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(l.useState)([]),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(""),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(""),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(!1),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1],it=Object(S.i)(),Gt=it.identifier,ln=Object(l.useRef)(null),en=Object(l.useRef)(null);ln.current=wt==null?void 0:wt.enrolled,Object(l.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 vr;if((Qt==null||((vr=Qt.target)===null||vr===void 0)?void 0:vr.id)==="modal-upload"){if(!Object(ue.e)(ht))return;if(!ln.current){O.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(l.useEffect)(function(){if(Lt!=null&&Lt.upload_file){var Ft,Qt,vr;Ar([{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),It(Lt==null||((Qt=Lt.upload_file)===null||Qt===void 0||((vr=Qt.url)===null||vr===void 0))?void 0:vr.split("/")[3])}},[Lt==null?void 0:Lt.upload_file]);var Ir={name:"file",multiple:!1,withCredentials:!0,action:z.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:ot,onChange:function(Qt){var vr=Qt.file.status,tr=[Object(N.a)({},Qt.file)];if(Ar(tr),Qt.file.status==="uploading"&&br(!0),vr==="done"){var gt,bt;It((gt=tr[0])===null||gt===void 0||((bt=gt.response)===null||bt===void 0)?void 0:bt.id),br(!1)}vr==="error"&&(Ar([]),br(!1))},beforeUpload:function(Qt){var vr=Qt.size/1024/1024<1e3;return vr?Promise.resolve():(r.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Pr=function(){$t(!0)};return Object(l.useImperativeHandle)(mt,function(){return{handleVisible:Pr}}),t.a.createElement("div",{ref:en},zt==="reward"?t.a.createElement(re,{userlist:Ot,dispatch:ht,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((Ot==null?void 0:Ot.admin)||(Ot==null?void 0:Ot.business)||Rt)&&t.a.createElement(T.a,{onClick:function(){return Kt(!1)}},"\u7F16\u8F91")),t.a.createElement(P.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(Ft,Qt){return t.a.createElement("div",null,t.a.createElement("a",{href:(z.a===null||z.a===void 0?void 0:z.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Ft.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),t.a.createElement(O.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Zt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Ur,onCancel:function(){return $t(!1)},onOk:Object(a.a)(s.a.mark(function Ft(){var Qt;return s.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 br(!0),tr.next=6,Object(J.a)("/api/competitions/".concat(Gt,"/upload_file.json"),{method:"post",body:{attachment_id:_t,upload_file_url:qt}});case 6:Qt=tr.sent,Qt.status===0&&($t(!1),br(!1));case 8:case"end":return tr.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(H.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(B.a,{style:{width:416},value:qt,onChange:function(Qt){var vr;return pr((vr=Qt.target)===null||vr===void 0?void 0:vr.value)}})),t.a.createElement(H.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(E.a,Ir,t.a.createElement(T.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},te=Object(l.forwardRef)(fe),ne=j("Ot1p"),Te=j("hJwl");function ie(xt){var et=xt.ItemData,mt=xt.setIssee,wt=xt.MenuItem,Lt=xt.dispatch,Dt=xt.identifier,Kt=xt.ModelType,zt=xt.userinfo,ht=xt.getrightdatas,Ot=Object(l.useState)([]),Rt=Object(o.a)(Ot,2),ur=Rt[0],ar=Rt[1],Zt=Object(l.useState)(et.md_content),$t=Object(o.a)(Zt,2),rr=$t[0],sr=$t[1];Object(l.useEffect)(function(){var It,Et=[];et==null||((It=et.attachments)===null||It===void 0)||It.map(function(Nt){var qt={uid:Nt.id,name:Nt.title,response:{id:Nt.id}};Et.push(qt)}),ar(Et)},[et==null?void 0:et.attachments]);function ot(){var It,Et=[];return et==null||((It=et.attachments)===null||It===void 0)||It.map(function(Nt){var qt={uid:Nt==null?void 0:Nt.id,name:Nt.title,response:{id:Nt.id}};Et.push(qt)}),Et}var Ar={name:"file",multiple:!0,withCredentials:!0,action:z.a.API_SERVER+"/api/attachments.json",defaultFileList:ot(),onRemove:function(Et){Object(Te.t)({id:Et.uid})},onChange:function(Et){var Nt=Et.file.status;Nt!=="uploading",Nt==="removed"&&ar(Et.fileList),Nt==="done"?(ar(Et.fileList),r.b.success("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Nt==="error"&&r.b.error("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Et){var Nt=Et.size/1024/1024<150;return Nt||r.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Nt}};console.log(Ar);function Nr(){return fr.apply(this,arguments)}function fr(){return fr=Object(a.a)(s.a.mark(function It(){var Et;return s.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:et.id,md_content_id:et.md_id,content:rr,identifier:Dt}});case 2:Et=qt.sent,Et&&(r.b.info("\u63D0\u4EA4\u6210\u529F"),mt(!0),ht(wt));case 4:case"end":return qt.stop()}},It)})),fr.apply(this,arguments)}function _t(It){var Et=[];return It&&It.map(function(Nt){Et.push(Nt.response.id)}),Et}return t.a.createElement("div",null,Kt==="reward"?t.a.createElement(re,{userlist:zt,dispatch:Lt,rewarddata:et.reward_setting,is_signed:et.is_signed}):null,t.a.createElement(ne.a,{defaultValue:rr,onChange:function(Et){return sr(Et)}}),t.a.createElement(E.a,Ar,t.a.createElement(T.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Nr()}},"\u63D0\u4EA4"),t.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mt(!0)}},"\u53D6\u6D88")))}var Z=ie,X=j("g9YV"),Q=j("wCAj"),_e=j("Znn+"),ve=j("ZTPi");function Re(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Je=Re,qe=j("5Dmo"),rt=j("3S7+"),ut=j("jCWc"),dt=j("kPKH"),ft=j("IzEo"),Be=j("bx4M");function Ie(xt){var et=xt.oneItem,mt=xt.towItem,wt=xt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(H.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(dt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(Be.a,{title:t.a.createElement("div",{className:C.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:z.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(mt==null?void 0:mt.user_login,"/classrooms")},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(mt==null?void 0:mt.user_image)}),(mt==null?void 0:mt.competition_prize)&&t.a.createElement("p",{className:C.a.prize},mt==null?void 0:mt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},mt==null?void 0:mt.record_user_name)))),className:C.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},mt==null?void 0:mt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},mt==null?void 0:mt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(mt==null?void 0:mt.extra_score)+parseFloat(mt==null?void 0:mt.score),"\u5206"))),t.a.createElement(dt.a,{span:6},t.a.createElement(Be.a,{title:t.a.createElement("div",{className:C.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:z.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(et==null?void 0:et.user_login,"/classrooms")},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(et==null?void 0:et.user_image)}),(et==null?void 0:et.competition_prize)&&t.a.createElement("p",{className:C.a.prize},et==null?void 0:et.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},et==null?void 0:et.record_user_name)))),className:C.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},et==null?void 0:et.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},et==null?void 0:et.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(et==null?void 0:et.extra_score)+parseFloat(et==null?void 0:et.score),"\u5206"))),t.a.createElement(dt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(Be.a,{title:t.a.createElement("div",{className:C.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:z.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(wt==null?void 0:wt.user_login,"/classrooms")},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(wt==null?void 0:wt.user_image)}),(wt==null?void 0:wt.competition_prize)&&t.a.createElement("p",{className:C.a.prize},wt==null?void 0:wt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},wt==null?void 0:wt.record_user_name)))),className:C.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},wt==null?void 0:wt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},wt==null?void 0:wt.spend_time),t.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 at=Ie;function ct(xt){var et,mt,wt,Lt,Dt,Kt,zt,ht,Ot,Rt,ur,ar,Zt,$t,rr,sr,ot,Ar,Nr,fr,_t,It,Et,Nt,qt,pr,er,Rr,Ur,br,it=xt.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(at,{oneItem:it==null?void 0:it.teams[0],towItem:it==null?void 0:it.teams[1],threeItem:it==null?void 0:it.teams[2]}),(it==null||((et=it.user_ranks)===null||et===void 0)?void 0:et.length)>0&&t.a.createElement("div",{className:C.a.myTeam},(it==null||((mt=it.user_ranks)===null||mt===void 0||((wt=mt[0])===null||wt===void 0))?void 0:wt.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(it==null||((Lt=it.user_ranks)===null||Lt===void 0||((Dt=Lt[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(it==null||((Kt=it.user_ranks)===null||Kt===void 0||((zt=Kt[0])===null||zt===void 0))?void 0:zt.success)===!1?"\u5426":it!=null&&(ht=it.user_ranks)!==null&&ht!==void 0&&(Ot=ht[0])!==null&&Ot!==void 0&&Ot.success?"\u662F":"")),(it==null||((Rt=it.user_ranks)===null||Rt===void 0||((ur=Rt[0])===null||ur===void 0))?void 0:ur.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(it==null||((ar=it.user_ranks)===null||ar===void 0||((Zt=ar[0])===null||Zt===void 0))?void 0:Zt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(it==null||(($t=it.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"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",it==null||((sr=it.user_ranks)===null||sr===void 0||((ot=sr[0])===null||ot===void 0))?void 0:ot.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6218\u961F\u540D"},it==null||((Ar=it.user_ranks)===null||Ar===void 0||((Nr=Ar[0])===null||Nr===void 0))?void 0:Nr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u65F6\u95F4"},it==null||((fr=it.user_ranks)===null||fr===void 0||((_t=fr[0])===null||_t===void 0))?void 0:_t.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(rt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},it==null||((It=it.user_ranks)===null||It===void 0||((Et=It[0])===null||Et===void 0))?void 0:Et.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},it==null||((Nt=it.user_ranks)===null||Nt===void 0||((qt=Nt[0])===null||qt===void 0))?void 0:qt.score)),t.a.createElement("span",null,t.a.createElement(rt.a,{title:"\u603B\u5206"},parseFloat(it==null||((pr=it.user_ranks)===null||pr===void 0||((er=pr[0])===null||er===void 0))?void 0:er.extra_score)+parseFloat(it==null||((Rr=it.user_ranks)===null||Rr===void 0||((Ur=Rr[0])===null||Ur===void 0))?void 0:Ur.score)||0))),it==null||((br=it.teams)===null||br===void 0)?void 0:br.map(function(Gt,ln){return t.a.createElement("div",{className:C.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},ln+1),t.a.createElement(x.a,{to:"/users/".concat(Gt==null?void 0:Gt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(Gt==null?void 0:Gt.user_image)}),(Gt==null?void 0:Gt.competition_prize)&&t.a.createElement("span",{className:C.a.spanrightradius},Gt==null?void 0:Gt.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6218\u961F\u540D"},Gt==null?void 0:Gt.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},Gt.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(rt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Gt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Gt.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(rt.a,{title:"\u603B\u5206"},parseFloat(Gt.extra_score)+parseFloat(Gt.score))))}))}var $e=ct,st=ve.a.TabPane;function Ue(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.ChartRules,ht=xt.ItemData,Ot=xt.getCharts,Rt=xt.Selectkey,ur=xt.getChartRules,ar=xt.userinfo,Zt=xt.Editable,$t=xt.HeaderDetail,rr=Object(l.useState)(!1),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(""),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(!0),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1],it=Object(l.useState)(),Gt=Object(o.a)(it,2),ln=Gt[0],en=Gt[1],mr=Object(S.i)(),Ir=mr.identifier;Object(l.useEffect)(function(){if(qt){var vr,tr=zt==null||((vr=zt.stages)===null||vr===void 0)?void 0:vr[0];if(br(tr),tr!=null&&tr.id){var gt,bt,Vt;(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog")&&Ot(tr==null?void 0:tr.id),It(((gt=zt.rule_contents)===null||gt===void 0||((bt=gt.filter(function(un){return parseInt(un.competition_stage_id)===parseInt(tr==null?void 0:tr.id)}))===null||bt===void 0||((Vt=bt[0])===null||Vt===void 0))?void 0:Vt.content)||"")}else{var Mt,Dr,on;($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog",It(((Mt=zt.rule_contents)===null||Mt===void 0||((Dr=Mt.filter(function(un){return parseInt(un.competition_stage_id)===0}))===null||Dr===void 0||((on=Dr[0])===null||on===void 0))?void 0:on.content)||"")}}},[zt]);function Pr(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(a.a)(s.a.mark(function vr(){var tr,gt,bt,Vt,Mt,Dr,on,un,Cr;return s.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:if(_t){jr.next=3;break}return r.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),jr.abrupt("return");case 3:if(pr(!1),tr=Ur==null?void 0:Ur.id,!tr){jr.next=12;break}return jr.next=8,Object(J.a)("/api/competitions/".concat(Ir,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:_t,md_content_id:(gt=zt.rule_contents)===null||gt===void 0||((bt=gt.filter(function(pn){return parseInt(pn.competition_stage_id)===parseInt(tr)}))===null||bt===void 0||((Vt=bt[0])===null||Vt===void 0))?void 0:Vt.id,stage_id:Ur==null?void 0:Ur.id}});case 8:Mt=jr.sent,Mt.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),Ar(!1),ur()),jr.next=16;break;case 12:return jr.next=14,Object(J.a)("/api/competitions/".concat(Ir,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:_t,md_content_id:(Dr=zt.rule_contents)===null||Dr===void 0||((on=Dr.filter(function(pn){return parseInt(pn.competition_stage_id)===0}))===null||on===void 0||((un=on[0])===null||un===void 0))?void 0:un.id,stage_id:Ur==null?void 0:Ur.id}});case 14:Cr=jr.sent,Cr.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),Ar(!1),ur());case 16:case"end":return jr.stop()}},vr)})),Ft.apply(this,arguments)}var Qt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(tr,gt,bt){return t.a.createElement("span",null,bt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(tr){return t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(tr)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(tr){return t.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 t.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 t.a.createElement("span",null,tr||"--")}}];return t.a.createElement("div",null,(zt==null||((et=zt.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Je,null),(zt==null||((mt=zt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ve.a,{animated:!0,tabBarExtraContent:((ar==null?void 0:ar.admin)||(ar==null?void 0:ar.business)||Zt)&&t.a.createElement(T.a,{onClick:function(){Ar(!0)}},"\u7F16\u8F91"),onChange:function(tr){var gt,bt,Vt,Mt,Dr;Ar(!1);var on=zt==null||((gt=zt.stages)===null||gt===void 0)?void 0:gt.filter(function(Cr){return parseInt(tr)===parseInt(Cr==null?void 0:Cr.id)})[0];br(on);var un=on==null||((bt=on.children)===null||bt===void 0)?void 0:bt[0];en(un),It(((Vt=zt.rule_contents)===null||Vt===void 0||((Mt=Vt.filter(function(Cr){return parseInt(Cr.competition_stage_id)===parseInt(on==null?void 0:on.id)}))===null||Mt===void 0||((Dr=Mt[0])===null||Dr===void 0))?void 0:Dr.content)||""),Ot((un==null?void 0:un.id)||tr)}},zt&&zt.stages.map(function(vr,tr){return t.a.createElement(st,{tab:vr.name,key:vr.id===null?0:vr.id},ot===!1&&zt&&zt.rule_contents.map(function(gt,bt){if(vr.id===gt.competition_stage_id)return t.a.createElement(P.a,{key:bt,value:gt.content===void 0||gt.content===null?"":gt.content});if(vr.id===null&&gt.competition_stage_id===0)return t.a.createElement(P.a,{key:bt,value:gt.content===void 0||gt.content===null?"":gt.content})}))})),(Ur==null||((wt=Ur.children)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{activeKey:(ln==null?void 0:ln.id)+"",onChange:function(tr){var gt,bt=Ur==null||((gt=Ur.children)===null||gt===void 0)?void 0:gt.filter(function(Vt){return parseInt(tr)===parseInt(Vt==null?void 0:Vt.id)})[0];en(bt),Ot(tr)}},Ur==null||((Lt=Ur.children)===null||Lt===void 0)?void 0:Lt.map(function(vr,tr){return t.a.createElement(st,{tab:vr.name,key:vr.id===null?0:vr.id})})),ot&&t.a.createElement("div",null,t.a.createElement(ne.a,{defaultValue:_t,onChange:function(tr){It(tr)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Pr()}},"\u63D0\u4EA4"),t.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Ar(!1)}},"\u53D6\u6D88"))),(ht==null||((Dt=ht.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog"||($t==null?void 0:$t.task)==="Jittor-3")?t.a.createElement(Q.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&&t.a.createElement($e,{ItemData:ht}))}var Le=Ue,Me=j("/zsF"),Ee=j("PArb");function Ce(xt){var et,mt,wt,Lt,Dt,Kt,zt,ht=xt.Prize,Ot=Object(S.i)(),Rt=Object(l.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(o.a)(Rt,2),ar=ur[0],Zt=ur[1],$t=function(){var rr=Object(a.a)(s.a.mark(function sr(ot){var Ar;return s.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,Object(Te.u)({type:ot.type,id:Ot.identifier});case 2:Ar=fr.sent,(Ar==null?void 0:Ar.status)===0&&(location.href="/competitions/exports?id=".concat(Ot.identifier,"&type=").concat(ot.type));case 4:case"end":return fr.stop()}},sr)}));return function(ot){return rr.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:C.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ht==null||((et=ht.personal_certifications)===null||et===void 0)?void 0:et.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:z.a.API_SERVER+"".concat(ht==null||((mt=ht.personal_certifications[0])===null||mt===void 0)?void 0:mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ht==null||((wt=ht.team_certifications)===null||wt===void 0)?void 0:wt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:z.a.API_SERVER+"".concat(ht==null||((Lt=ht.team_certifications[0])===null||Lt===void 0)?void 0:Lt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(Ee.a,null),(ht==null||((Dt=ht.teams)===null||Dt===void 0)?void 0:Dt.length)>0?t.a.createElement("div",null,t.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"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ht==null?void 0:ht.teams)&&(ht==null||((zt=ht.teams[0])===null||zt===void 0)?void 0:zt.team_members.map(function(rr,sr){var ot,Ar,Nr,fr,_t,It;return t.a.createElement("p",{className:C.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.role),t.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.name),t.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"),t.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"),t.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.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"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ht==null?void 0:ht.teams)&&(ht==null||((ot=ht.teams[0])===null||ot===void 0||((Ar=ot.bank_account)===null||Ar===void 0))?void 0:Ar.bank),(ht==null?void 0:ht.teams)&&(ht==null||((Nr=ht.teams[0])===null||Nr===void 0||((fr=Nr.bank_account)===null||fr===void 0))?void 0:fr.second_bank),(ht==null?void 0:ht.teams)&&(ht==null||((_t=ht.teams[0])===null||_t===void 0||((It=_t.bank_account)===null||It===void 0))?void 0:It.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(H.a,{gutter:[20,20]},ar.map(function(rr,sr){return t.a.createElement(dt.a,{key:sr},t.a.createElement(T.a,{type:"primary",onClick:function(){return $t(rr)}},rr.name))})))}var ke=Ce,Ne=j("0Owb"),He=j("7Kak"),tt=j("9yH6"),vt=j("y8nQ"),yt=j("Vl3Y"),Wt=j("1vsH"),Ht=j("Dgm7"),cr=j.n(Ht),dr=j("NnUe"),St=j.n(dr),Kr=E.a.Dragger,Vr=10,Yr=function(et){var mt=et.user,wt=et.account,Lt=et.globalSetting,Dt=et.loading,Kt=et.dispatch,zt=Object(u.a)(et,["user","account","globalSetting","loading","dispatch"]),ht=yt.a.useForm(),Ot=Object(o.a)(ht,1),Rt=Ot[0],ur=Object(l.useState)({}),ar=Object(o.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(l.useState)(!0),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1],it=Object(l.useState)(),Gt=Object(o.a)(it,2),ln=Gt[0],en=Gt[1];Object(l.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};It(tr.name),Ar(tr.show_realname),Rt.setFieldsValue(gt),$t(gt)},[wt.basicInfo]);var mr=function(gt){if(gt.file.status==="uploading"){en(!0);return}if(gt.file.status==="done"){var bt;console.log(gt.file,gt.file.response),br((bt=gt.file.response)===null||bt===void 0?void 0:bt.id),Object(Wt.D)(gt.file.originFileObj,function(Vt){pr(Vt),en(!1)})}},Ir=function(gt){$t(Object(N.a)({},Rt.getFieldsValue())),"name"in gt&&It(gt.name)},Pr=function(){var gt=!ot;Ar(gt);var bt=gt?_t:Object(Wt.H)(_t);Rt.setFieldsValue({name:bt})},Ft=function(){var tr=Object(a.a)(s.a.mark(function gt(bt){var Vt,Mt,Dr,on,un,Cr,tn,jr;return s.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Dr=bt||{},on=Dr.name,un=Dr.gender,Cr=Dr.idNumber,qt){Xr.next=4;break}return r.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Xr.abrupt("return");case 4:return Xr.next=6,Kt({type:"account/applyRealNameAuth",payload:{id:((Vt=wt.basicInfo)===null||Vt===void 0?void 0:Vt.id)||((Mt=mt.userInfo)===null||Mt===void 0?void 0:Mt.login),name:on,gender:un,id_number:Cr,show_realname:ot,attachment_ids:[Ur]}});case 6:tn=Xr.sent,Qt(),tn&&(r.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Kt({type:"account/getBasicInfo",payload:{login:(jr=mt.userInfo)===null||jr===void 0?void 0:jr.login}}));case 9:case"end":return Xr.stop()}},gt)}));return function(bt){return tr.apply(this,arguments)}}(),Qt=function(){Kt({type:"account/setActionTabs",payload:{}})},vr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(z.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:mr,beforeUpload:function(gt){var bt=gt.type==="image/jpeg"||gt.type==="image/png"||gt.type==="image/jpg"||gt.type==="image/bmp";return bt||r.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),bt}};return t.a.createElement(O.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},t.a.createElement(p.a,{spinning:!!ln},t.a.createElement(yt.a,{className:St.a.formWrap,form:Rt,layout:"horizontal",onValuesChange:Ir,onFinish:Ft},t.a.createElement(yt.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(Vr,"\u4E2A\u5B57\u7B26")},{validator:Wt.K}],extra:t.a.createElement("span",null,ot?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(B.a,{disabled:!ot,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Vr,"\u4E2A\u5B57\u7B26"),maxLength:Vr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(ot?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Pr})})),t.a.createElement(yt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(tt.a.Group,null,t.a.createElement(tt.a,{value:0},"\u7537"),t.a.createElement(tt.a,{value:1},"\u5973"))),t.a.createElement(yt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(B.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(yt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:cr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(Kr,Object(Ne.a)({},vr,{accept:".png,.jpg,.bmp,.jpeg"}),qt?t.a.createElement("img",{src:qt,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:Qt},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},vn=Object(f.a)(function(xt){var et=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:et,account:mt,globalSetting:Lt,loading:wt.effects}})(Yr),Or=j("O3gP"),dn=j("lrIw"),hn=j("KXlV"),Tt=j.n(hn),gr=j("Sjjz"),Br=j.n(gr),zr=B.a.TextArea,an=function(et){var mt=et.account,wt=et.globalSetting,Lt=et.loading,Dt=et.dispatch,Kt=et.schoolName,zt=et.departmentName,ht=et.visible,Ot=et.onClose,Rt=Ot===void 0?function(){}:Ot,ur=et.onSuccess,ar=ur===void 0?function(){}:ur,Zt=Object(u.a)(et,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),$t=yt.a.useForm(),rr=Object(o.a)($t,1),sr=rr[0],ot=Object(l.useRef)();Object(l.useEffect)(function(){ot.current=Zt.schoolId},[Zt.schoolId]),Object(l.useEffect)(function(){sr.setFieldsValue({department:zt})},[zt]);var Ar=function(){var Nr=Object(a.a)(s.a.mark(function fr(_t){var It,Et,Nt,qt;return s.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return It=_t||{},Et=It.department,Nt=It.remarks,er.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:ot.current,name:Et,remarks:Nt}});case 3:qt=er.sent,Rt(),qt&&(r.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),ar(Et));case 6:case"end":return er.stop()}},fr)}));return function(_t){return Nr.apply(this,arguments)}}();return t.a.createElement(O.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},t.a.createElement(yt.a,{className:Br.a.formWrap,form:sr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Ar},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Kt),t.a.createElement(yt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(B.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(zr,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Br.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:function(){Rt()}},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},gi=Object(f.a)(function(xt){var et=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:et,globalSetting:wt,loading:mt.effects}})(an),Ei=j("6UJt"),bn=j("DFOY"),lr=j("jO45"),Yn=j("jN4g"),ci=j("gJ3r"),Hn=j("jwmR"),qr=j.n(Hn),Un=function(et,mt){return mt.some(function(wt){return wt.label.toLowerCase().indexOf(et.toLowerCase())>-1})},di=B.a.TextArea,vi=function(et){var mt=et.account,wt=et.globalSetting,Lt=et.loading,Dt=et.dispatch,Kt=et.schoolName,zt=et.visible,ht=et.onClose,Ot=ht===void 0?function(){}:ht,Rt=et.onSuccess,ur=Rt===void 0?function(){}:Rt,ar=Object(u.a)(et,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Zt=yt.a.useForm(),$t=Object(o.a)(Zt,1),rr=$t[0];Object(l.useEffect)(function(){rr.setFieldsValue({name:Kt})},[Kt]);var sr=function(){var ot=Object(a.a)(s.a.mark(function Ar(Nr){var fr,_t,It,Et,Nt,qt,pr;return s.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return fr=Nr||{},_t=fr.name,It=fr.city,Et=It===void 0?[]:It,Nt=fr.address,qt=fr.remarks,Rr.next=3,Dt({type:"account/appplySchool",payload:{name:_t,province:Et[0],city:Et[1],address:Nt,remarks:qt}});case 3:pr=Rr.sent,Ot(),pr&&(r.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),ur(_t));case 6:case"end":return Rr.stop()}},Ar)}));return function(Nr){return ot.apply(this,arguments)}}();return t.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:zt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:qr.a.formWrap,form:rr,labelCol:{span:4},wrapperCol:{span:20},onFinish:sr},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(B.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(qr.a.flexRow," ").concat(qr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:qr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(lr.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Yn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(yt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(bn.a,{allowClear:!0,size:"large",options:ci.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Un}})),t.a.createElement(yt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(B.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(di,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:qr.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:function(){Ot()}},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplySchool"]},"\u4FDD\u5B58")))))},Ut=Object(f.a)(function(xt){var et=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:et,globalSetting:wt,loading:mt.effects}})(vi),_r=pe.a.Option,hi=E.a.Dragger,xi=function(et){var mt,wt,Lt=et.user,Dt=et.account,Kt=et.globalSetting,zt=et.loading,ht=et.dispatch,Ot=et.Scoid,Rt=Object(u.a)(et,["user","account","globalSetting","loading","dispatch","Scoid"]),ur=yt.a.useForm(),ar=Object(o.a)(ur,1),Zt=ar[0],$t=Object(l.useState)({}),rr=Object(o.a)($t,2),sr=rr[0],ot=rr[1],Ar=Object(l.useState)([]),Nr=Object(o.a)(Ar,2),fr=Nr[0],_t=Nr[1],It=Object(l.useState)([]),Et=Object(o.a)(It,2),Nt=Et[0],qt=Et[1],pr=Object(l.useState)([]),er=Object(o.a)(pr,2),Rr=er[0],Ur=er[1],br=Object(l.useState)([]),it=Object(o.a)(br,2),Gt=it[0],ln=it[1],en=Object(l.useState)(),mr=Object(o.a)(en,2),Ir=mr[0],Pr=mr[1],Ft=Object(l.useState)(),Qt=Object(o.a)(Ft,2),vr=Qt[0],tr=Qt[1],gt=Object(l.useState)(),bt=Object(o.a)(gt,2),Vt=bt[0],Mt=bt[1],Dr=Object(l.useState)(),on=Object(o.a)(Dr,2),un=on[0],Cr=on[1],tn=Object(l.useState)(),jr=Object(o.a)(tn,2),pn=jr[0],Xr=jr[1];Object(l.useEffect)(function(){mn()},[]),Object(l.useEffect)(function(){Object(a.a)(s.a.mark(function Xe(){var ze;return s.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(Ot){pt.next=2;break}return pt.abrupt("return");case 2:return pt.next=4,Xn(Ot);case 4:ze=pt.sent,Ur(ze==null?void 0:ze.departments);case 6:case"end":return pt.stop()}},Xe)}))()},[Ot]);var mn=function(){var Xe=Object(a.a)(s.a.mark(function ze(){var Ze;return s.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,ht({type:"account/getSchoolOption"});case 2:Ze=kt.sent,_t(Ze==null?void 0:Ze.schools);case 4:case"end":return kt.stop()}},ze)}));return function(){return Xe.apply(this,arguments)}}(),Xn=function(ze){return ht({type:"account/getDepartmentOption",payload:{id:ze}})};Object(l.useEffect)(function(){if(!Dt.basicInfo)return;var Xe=Dt.basicInfo,ze={identity:Xe.identity,school:Xe.school_name,department:Xe.department_name,studentNo:Xe.student_id,jobTitle:Xe.identity=="teacher"?Xe.technical_title:"\u6559\u6388",manager:Xe.identity=="professional"?Xe.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Zt.setFieldsValue(ze),ot(ze)},[Dt.basicInfo]);var Pe=function(){Cr(!0)},Ve=function(){if(!fr.find(function(ze){return ze.name===sr.school})){r.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Xr(!0)},Qe=function(ze){if(ot(Object(N.a)({},Zt.getFieldsValue())),"school"in ze){qt(fr.filter(function(pt){return pt.name.includes(ze.school)}));var Ze=(fr.find(function(pt){return pt.name===ze.school})||{}).id;Ze?Fe(ze.school):(Zt.setFieldsValue({department:""}),ot(Object(N.a)(Object(N.a)({},sr),{school:ze.school,department:""})))}},Fe=function(){var Xe=Object(a.a)(s.a.mark(function ze(Ze,pt){var kt,jt,Yt,kr,Jr,$r;return s.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return kr=(kt=fr.find(function(rn){return rn.name===Ze}))===null||kt===void 0?void 0:kt.id,Hr.next=3,Xn(kr);case 3:if(Hr.t0=Hr.sent,Hr.t0){Hr.next=6;break}Hr.t0={};case 6:Jr=Hr.t0,Ur(Jr==null?void 0:Jr.departments),$r=pt||(Jr==null||((jt=Jr.departments)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.name),Zt.setFieldsValue({department:$r}),ot(Object(N.a)(Object(N.a)({},sr),{school:Ze,department:$r}));case 11:case"end":return Hr.stop()}},ze)}));return function(Ze,pt){return Xe.apply(this,arguments)}}(),be=function(){var Xe=Object(a.a)(s.a.mark(function ze(Ze){return s.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,mn();case 2:Zt.setFieldsValue({school:Ze,department:""}),ot(Object(N.a)(Object(N.a)({},sr),{school:Ze,department:""}));case 4:case"end":return kt.stop()}},ze)}));return function(Ze){return Xe.apply(this,arguments)}}(),De=function(ze){if(ze.file.status==="uploading"){Mt(!0);return}if(ze.file.status==="done"){var Ze;console.log(ze.file,ze.file.response),tr((Ze=ze.file.response)===null||Ze===void 0?void 0:Ze.id),Object(Wt.D)(ze.file.originFileObj,function(pt){Pr(pt),Mt(!1)})}},we=function(){var Xe=Object(a.a)(s.a.mark(function ze(Ze){var pt,kt,jt,Yt,kr,Jr,$r,Zr,Hr,rn,nn,yn,cn,In,fn,Mr;return s.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(kr=Ze||{},Jr=kr.school,$r=kr.department,Zr=kr.identity,Hr=kr.studentNo,rn=kr.jobTitle,nn=kr.manager,Ir){sn.next=4;break}return r.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),sn.abrupt("return");case 4:return yn=(pt=fr.find(function(gn){return gn.name===Jr}))===null||pt===void 0?void 0:pt.id,cn=(kt=Rr.find(function(gn){return gn.name===$r}))===null||kt===void 0?void 0:kt.id,Zr==="student"?In=Hr:Zr==="teacher"?In=rn:In=nn,sn.next=9,ht({type:"account/applyProfessionalAuth",payload:{id:((jt=Dt.basicInfo)===null||jt===void 0?void 0:jt.id)||((Yt=Lt.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:yn,department_id:cn,identity:Zr,extra:In,attachment_ids:[vr]}});case 9:fn=sn.sent,je(),fn&&(r.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ht({type:"account/getBasicInfo",payload:{login:(Mr=Lt.userInfo)===null||Mr===void 0?void 0:Mr.login}}));case 12:case"end":return sn.stop()}},ze)}));return function(Ze){return Xe.apply(this,arguments)}}(),je=function(){ht({type:"account/setActionTabs",payload:{}})},Ge={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(z.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:De,beforeUpload:function(ze){var Ze=ze.type==="image/jpeg"||ze.type==="image/png"||ze.type==="image/jpg"||ze.type==="image/bmp";return Ze||r.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ze}};return t.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(p.a,{spinning:!!Vt},t.a.createElement(yt.a,{className:St.a.formWrap,form:Zt,layout:"horizontal",onValuesChange:Qe,onFinish:we},t.a.createElement(H.a,{gutter:[10,0]},t.a.createElement(dt.a,{flex:"300px"},t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(pe.a,null,t.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(_r,{value:"student"},"\u5B66\u751F"),t.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),sr.identity==="student"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:sr.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(B.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),sr.identity==="teacher"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:sr.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(pe.a,null,t.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),sr.identity==="professional"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:sr.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(pe.a,null,t.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(yt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:sr.school&&!(fr!=null&&fr.find(function(Xe){return Xe.name===sr.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",sr.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Pe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(dn.a,{showSearch:!0,options:Nt==null?void 0:Nt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:sr.department&&!(Rr!=null&&Rr.find(function(Xe){return Xe.name===sr.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},sr.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(sr.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ve},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(dn.a,{showSearch:!0,onChange:function(ze){return ln(Rr.filter(function(Ze){return Ze.name.includes(ze)}))},options:Gt==null?void 0:Gt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:Tt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(hi,Object(Ne.a)({},Ge,{accept:".png,.jpg,.bmp,.jpeg"}),Ir?t.a.createElement("img",{src:Ir,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:zt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Kt!=null&&(mt=Kt.setting)!==null&&mt!==void 0&&mt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(Ut,{visible:un,onClose:function(){return Cr(!1)},schoolName:sr.school,onSuccess:be}),t.a.createElement(gi,{visible:pn,onClose:function(){return Xr(!1)},schoolId:(wt=fr.find(function(Xe){return Xe.name===sr.school}))===null||wt===void 0?void 0:wt.id,schoolName:sr.school,departmentName:sr.department,onSuccess:function(ze){return Fe(sr.school,ze)}}))},Di=Object(f.a)(function(xt){var et=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:et,account:mt,globalSetting:Lt,loading:wt.effects}})(xi),wi=j("aCH8"),le=j.n(wi);function K(xt){var et=xt.type,mt=xt.dispatch,wt=xt.userid,Lt=xt.isshow,Dt=xt.setPhoneshow,Kt=xt.setEmailshow,zt="79e33abd4b6588941ab7622aed1e67e8",ht=Object(l.useState)(""),Ot=Object(o.a)(ht,2),Rt=Ot[0],ur=Ot[1],ar=Object(l.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Zt=Object(o.a)(ar,2),$t=Zt[0],rr=Zt[1],sr=Object(l.useState)(60),ot=Object(o.a)(sr,2),Ar=ot[0],Nr=ot[1],fr=Object(l.useState)(!1),_t=Object(o.a)(fr,2),It=_t[0],Et=_t[1],Nt=Object(l.useState)(""),qt=Object(o.a)(Nt,2),pr=qt[0],er=qt[1];function Rr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(a.a)(s.a.mark(function mr(){var Ir;return s.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Rt){Ft.next=3;break}return et===3?r.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):r.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:et,login:Rt,smscode:le()(zt+Rt)}});case 5:Ir=Ft.sent,Ir.status===1&&(r.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),br(),Et(!0));case 7:case"end":return Ft.stop()}},mr)})),Ur.apply(this,arguments)}function br(){Nr(60);var mr=setInterval(function(){--Ar,Ar>-1?Nr(Ar):(clearInterval(mr),Et(!1))},1e3)}function it(){return Gt.apply(this,arguments)}function Gt(){return Gt=Object(a.a)(s.a.mark(function mr(){var Ir;return s.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:Rt}});case 2:Ir=Ft.sent,Ir.status===0&&(r.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return Ft.stop()}},mr)})),Gt.apply(this,arguments)}function ln(){return en.apply(this,arguments)}function en(){return en=Object(a.a)(s.a.mark(function mr(){var Ir;return s.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:Rt}});case 2:Ir=Ft.sent,Ir.status===0&&(r.b.info("\u7ED1\u5B9A\u6210\u529F"),Kt("none"));case 4:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return t.a.createElement("div",{style:{display:Lt}},t.a.createElement("p",null,t.a.createElement(B.a,{value:Rt,onChange:function(Ir){return ur(Ir.target.value)},placeholder:et===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(B.a,{value:pr,onChange:function(Ir){return er(Ir.target.value)},placeholder:et===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(T.a,{disabled:It,onClick:function(){return Rr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},It?"\u91CD\u65B0\u53D1\u9001".concat(Ar,"s"):$t),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(T.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!pr){r.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}et===3?it():ln()}},"\u786E\u8BA4"),t.a.createElement(T.a,{style:{marginLeft:"20px"},onClick:function(){et===3?Dt("none"):Kt("none")}},"\u53D6\u6D88")))}var Y=K;function ee(xt){var et=xt.dispatch,mt=xt.userid,wt={wrapperCol:{offset:3,span:21}},Lt=yt.a.useForm(),Dt=Object(o.a)(Lt,1),Kt=Dt[0],zt=Object(S.i)(),ht=zt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(yt.a,{form:Kt,name:"basic"},t.a.createElement(yt.a.Item,Object(Ne.a)({},wt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(B.a,null)),t.a.createElement(yt.a.Item,Object(Ne.a)({},wt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(B.a,null)),t.a.createElement(yt.a.Item,Object(Ne.a)({},wt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(B.a,null)),t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{type:"primary",htmlType:"submit",onClick:Object(a.a)(s.a.mark(function Ot(){return s.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:Kt.validateFields().then(function(){var ar=Object(a.a)(s.a.mark(function Zt($t){var rr;return s.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,et({type:"competitions/setleader",payload:Object(N.a)({identifier:ht,user_id:mt},$t)});case 2:rr=ot.sent,rr.status===0&&r.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return ot.stop()}},Zt)}));return function(Zt){return ar.apply(this,arguments)}}());case 1:case"end":return ur.stop()}},Ot)}))},"\u63D0\u4EA4"))))}var ge=ee,se={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(xt){var et,mt,wt,Lt,Dt,Kt,zt,ht,Ot=xt.Prize,Rt=xt.Accounts,ur=xt.dispatch,ar=xt.userid,Zt=Object(l.useState)("none"),$t=Object(o.a)(Zt,2),rr=$t[0],sr=$t[1],ot=Object(l.useState)("none"),Ar=Object(o.a)(ot,2),Nr=Ar[0],fr=Ar[1];function _t(Et){return It.apply(this,arguments)}function It(){return It=Object(a.a)(s.a.mark(function Et(Nt){var qt;return s.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!(Nt==="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&&r.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return er.stop()}},Et)})),It.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.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),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,Rt==null?void 0:Rt.name),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(T.a,{type:"primary",onClick:function(){return _t("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.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),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,Rt&&Rt.identity&&se[Rt.identity]),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(T.a,{type:"primary",onClick:function(){return _t("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(T.a,{type:"primary",onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.phone)||"--"),rr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){sr("block")}},"\u66F4\u6362"):null),t.a.createElement(Y,{type:3,dispatch:ur,userid:Rt==null?void 0:Rt.id,isshow:rr,setPhoneshow:sr,setEmailshow:fr}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.mail)||"--"),Nr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){fr("block")}},"\u66F4\u6362"):null),t.a.createElement(Y,{type:4,dispatch:ur,userid:Rt==null?void 0:Rt.id,isshow:Nr,setEmailshow:fr,setPhoneshow:sr})),Ot!=null&&Ot.leader&&Ot!==null&&Ot!==void 0&&Ot.teams&&Ot!==null&&Ot!==void 0&&(et=Ot.teams[0])!==null&&et!==void 0&&(mt=et.bank_account)!==null&&mt!==void 0&&mt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(ge,{dispatch:ur,userid:ar})),Ot!=null&&Ot.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((wt=Ot.teams[0])===null||wt===void 0||((Lt=wt.bank_account)===null||Lt===void 0))?void 0:Lt.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Dt=Ot.teams[0])===null||Dt===void 0||((Kt=Dt.bank_account)===null||Kt===void 0))?void 0:Kt.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((zt=Ot.teams[0])===null||zt===void 0||((ht=zt.bank_account)===null||ht===void 0))?void 0:ht.card_no)||"--"))):null,t.a.createElement(Di,{Scoid:Rt==null?void 0:Rt.school_id}),t.a.createElement(vn,null))}var Ct=Ke,Xt=ve.a.TabPane;function Er(xt){var et=xt.Prize,mt=xt.Accounts,wt=xt.getAccounts,Lt=xt.dispatch,Dt=xt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ve.a,{defaultActiveKey:"1",onChange:function(zt){zt==="2"&&wt()}},t.a.createElement(Xt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(ke,{Prize:et})),t.a.createElement(Xt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Ct,{userid:Dt,dispatch:Lt,Prize:et,Accounts:mt})))))}var Pt=Er,Lr=j("xKgJ"),Gr=j("wd/R"),_n=j.n(Gr),Zn=ve.a.TabPane;function qn(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.ChartRules,ht=xt.ItemData,Ot=xt.getCharts,Rt=xt.Selectkey,ur=xt.HeaderDetail,ar=xt.getChartRules,Zt=xt.userinfo,$t=xt.Editable,rr=xt.dispatch,sr=xt.StaffDetail,ot=Object(l.useState)(!1),Ar=Object(o.a)(ot,2),Nr=Ar[0],fr=Ar[1],_t=Object(l.useState)(""),It=Object(o.a)(_t,2),Et=It[0],Nt=It[1],qt=Object(l.useState)(!0),pr=Object(o.a)(qt,2),er=pr[0],Rr=pr[1],Ur=Object(l.useState)(),br=Object(o.a)(Ur,2),it=br[0],Gt=br[1],ln=Object(l.useState)(),en=Object(o.a)(ln,2),mr=en[0],Ir=en[1],Pr=Object(S.i)(),Ft=Pr.identifier;Object(l.useEffect)(function(){if(er){var gt,bt,Vt,Mt,Dr=zt==null||((gt=zt.stages)===null||gt===void 0)?void 0:gt[0];Gt(Dr);var on=zt==null||((bt=zt.stages)===null||bt===void 0||((Vt=bt[0])===null||Vt===void 0||((Mt=Vt.children)===null||Mt===void 0)))?void 0:Mt[0];if(Ir(on),Dr!=null&&Dr.id){var un,Cr,tn;Ot(Dr==null?void 0:Dr.id),Nt(((un=zt.rule_contents)===null||un===void 0||((Cr=un.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(Dr==null?void 0:Dr.id)}))===null||Cr===void 0||((tn=Cr[0])===null||tn===void 0))?void 0:tn.content)||"")}else{var jr,pn,Xr;Ot(0),Nt(((jr=zt.rule_contents)===null||jr===void 0||((pn=jr.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)||"")}}},[zt]);function Qt(){return vr.apply(this,arguments)}function vr(){return vr=Object(a.a)(s.a.mark(function gt(){var bt,Vt,Mt,Dr,on,un,Cr,tn,jr;return s.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Et){Xr.next=3;break}return r.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Xr.abrupt("return");case 3:if(Rr(!1),bt=it==null?void 0:it.id,!bt){Xr.next=12;break}return Xr.next=8,Object(J.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:Et,md_content_id:(Vt=zt.rule_contents)===null||Vt===void 0||((Mt=Vt.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(bt)}))===null||Mt===void 0||((Dr=Mt[0])===null||Dr===void 0))?void 0:Dr.id,stage_id:it==null?void 0:it.id}});case 8:on=Xr.sent,on.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),fr(!1),ar()),Xr.next=16;break;case 12:return Xr.next=14,Object(J.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:Et,md_content_id:(un=zt.rule_contents)===null||un===void 0||((Cr=un.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||Cr===void 0||((tn=Cr[0])===null||tn===void 0))?void 0:tn.id,stage_id:it==null?void 0:it.id}});case 14:jr=Xr.sent,jr.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),fr(!1),ar());case 16:case"end":return Xr.stop()}},gt)})),vr.apply(this,arguments)}var tr=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(bt,Vt,Mt){return t.a.createElement("span",null,bt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(bt){return t.a.createElement(rt.a,{title:bt},t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=10?(bt==null?void 0:bt.substr(0,10))+"...":bt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(bt){return t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=6?(bt==null?void 0:bt.substr(0,6))+"...":bt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(bt){return t.a.createElement("span",null,bt===1?"\u8BA1\u7B97\u4E2D":bt===2?"\u5B8C\u6210":bt===0?"\u5F85\u8BA1\u7B97":bt===3&&"\u9519\u8BEF")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){return(bt==null?void 0:bt.length)>0?bt==null?void 0:bt.map(function(Vt,Mt){return t.a.createElement("span",null,Vt==null?void 0:Vt.name,"\uFF1A",Vt==null?void 0:Vt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(bt){return t.a.createElement("span",null,bt||"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="score"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="fid"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="total_score"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.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(bt){return t.a.createElement("span",null,bt||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.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(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Coffee"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.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(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Easyship"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.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(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scar"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.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(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scarf"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.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(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Total"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(bt){return t.a.createElement("a",{href:bt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(gt){return!!gt});return t.a.createElement("div",null,(zt==null||((et=zt.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Je,null),(zt==null||((mt=zt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ve.a,{animated:!0,tabBarExtraContent:Zt!=null&&Zt.admin||Zt!=null&&Zt.business||$t?t.a.createElement(T.a,{onClick:function(){fr(!0)}},"\u7F16\u8F91"):sr.enrolled&&(it==null?void 0:it.start_time)&&(it==null?void 0:it.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",_n()(it==null?void 0:it.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",_n()(it==null?void 0:it.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(T.a,{style:{marginLeft:"20px"},disabled:_n()(it==null?void 0:it.start_time).unix()>_n()(_n()().format("YYYY-MM-DD HH:mm:s")).unix()||_n()(_n()().format("YYYY-MM-DD HH:mm:s")).unix()>_n()(it==null?void 0:it.end_time).unix(),onClick:function(){rr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(mr==null?void 0:mr.id)||(it==null?void 0:it.id),id:ur==null?void 0:ur.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(bt){var Vt,Mt,Dr,on,un;fr(!1);var Cr=zt==null||((Vt=zt.stages)===null||Vt===void 0)?void 0:Vt.filter(function(jr){return parseInt(bt)===parseInt(jr==null?void 0:jr.id)})[0],tn=Cr==null||((Mt=Cr.children)===null||Mt===void 0)?void 0:Mt[0];Ir(tn),Gt(Cr),Nt(((Dr=zt.rule_contents)===null||Dr===void 0||((on=Dr.filter(function(jr){return parseInt(jr.competition_stage_id)===parseInt(Cr==null?void 0:Cr.id)}))===null||on===void 0||((un=on[0])===null||un===void 0))?void 0:un.content)||""),Ot((tn==null?void 0:tn.id)||bt)}},zt&&zt.stages.map(function(gt,bt){return t.a.createElement(Zn,{tab:gt.name,key:gt.id===null?0:gt.id},Nr===!1&&zt&&zt.rule_contents.map(function(Vt,Mt){if(gt.id===Vt.competition_stage_id)return t.a.createElement(P.a,{key:Mt,value:Vt.content===void 0||Vt.content===null?"":Vt.content});if(gt.id===null&&Vt.competition_stage_id===0)return t.a.createElement(P.a,{key:Mt,value:Vt.content===void 0||Vt.content===null?"":Vt.content})}))})),(it==null||((wt=it.children)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{activeKey:(mr==null?void 0:mr.id)+"",onChange:function(bt){var Vt,Mt=it==null||((Vt=it.children)===null||Vt===void 0)?void 0:Vt.filter(function(Dr){return parseInt(bt)===parseInt(Dr==null?void 0:Dr.id)})[0];Ir(Mt),Ot(bt)}},it==null||((Lt=it.children)===null||Lt===void 0)?void 0:Lt.map(function(gt,bt){return t.a.createElement(Zn,{tab:gt.name,key:gt.id===null?0:gt.id})})),Nr&&t.a.createElement("div",null,t.a.createElement(ne.a,{defaultValue:Et,onChange:function(bt){Nt(bt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Qt()}},"\u63D0\u4EA4"),t.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return fr(!1)}},"\u53D6\u6D88"))),((Dt=ur.competition_modules.filter(function(gt){return gt.id===Rt}))===null||Dt===void 0||((Kt=Dt[0])===null||Kt===void 0)?void 0:Kt.show_leaderboard)&&t.a.createElement(Q.a,{dataSource:ht==null?void 0:ht.results,columns:tr}))}var Nn=qn,Ni=j("DjyN"),Gi=j("NUBc"),Wn=ve.a.TabPane;function Ti(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.loading,ht=xt.ChartRules,Ot=xt.ItemData,Rt=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,sr=xt.dispatch,ot=xt.StaffDetail,Ar=Object(l.useState)(!1),Nr=Object(o.a)(Ar,2),fr=Nr[0],_t=Nr[1],It=Object(l.useState)(""),Et=Object(o.a)(It,2),Nt=Et[0],qt=Et[1],pr=Object(l.useState)(!0),er=Object(o.a)(pr,2),Rr=er[0],Ur=er[1],br=Object(l.useState)(),it=Object(o.a)(br,2),Gt=it[0],ln=it[1],en=Object(l.useState)(),mr=Object(o.a)(en,2),Ir=mr[0],Pr=mr[1],Ft=Object(S.i)(),Qt=Ft.identifier,vr=Object(l.useState)({page:1,limit:10,sort:"desc"}),tr=Object(o.a)(vr,2),gt=tr[0],bt=tr[1];Object(l.useEffect)(function(){var Mt;Rr&&ht!==null&&ht!==void 0&&(Mt=ht.stages)!==null&&Mt!==void 0&&Mt[0]&&Vt()},[ht==null||((et=ht.stages)===null||et===void 0)?void 0:et[0]]);var Vt=function(){var Mt=Object(a.a)(s.a.mark(function Dr(){var on,un,Cr,tn,jr,pn;return s.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return jr=ht==null||((on=ht.stages)===null||on===void 0)?void 0:on[0],ln(jr),pn=ht==null||((un=ht.stages)===null||un===void 0||((Cr=un[0])===null||Cr===void 0||((tn=Cr.children)===null||tn===void 0)))?void 0:tn[0],Pr(pn),gt.id=(pn==null?void 0:pn.id)||(jr==null?void 0:jr.id),bt(Object(N.a)({},gt)),mn.next=7,Rt(Object(N.a)(Object(N.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return mn.stop()}},Dr)}));return function(){return Mt.apply(this,arguments)}}();return t.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Mt=Object(a.a)(s.a.mark(function Dr(on){var un,Cr,tn,jr,pn,Xr,mn;return s.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return _t(!1),Xr=ht==null||((un=ht.stages)===null||un===void 0)?void 0:un.filter(function(Ve){return parseInt(on)===parseInt(Ve==null?void 0:Ve.id)})[0],mn=Xr==null||((Cr=Xr.children)===null||Cr===void 0)?void 0:Cr[0],Pr(mn),ln(Xr),qt(((tn=ht.rule_contents)===null||tn===void 0||((jr=tn.filter(function(Ve){return parseInt(Ve.competition_stage_id)===parseInt(Xr==null?void 0:Xr.id)}))===null||jr===void 0||((pn=jr[0])===null||pn===void 0))?void 0:pn.content)||""),gt.page=1,gt.limit=10,gt.id=(mn==null?void 0:mn.id)||on,bt(Object(N.a)({},gt)),Pe.next=9,Rt(Object(N.a)({},gt));case 9:case"end":return Pe.stop()}},Dr)}));return function(Dr){return Mt.apply(this,arguments)}}()},ht&&ht.stages.map(function(Mt,Dr){return t.a.createElement(Wn,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),(Gt==null||((Lt=Gt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&t.a.createElement(ve.a,{activeKey:(Ir==null?void 0:Ir.id)+"",onChange:function(){var Mt=Object(a.a)(s.a.mark(function Dr(on){var un,Cr;return s.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return Cr=Gt==null||((un=Gt.children)===null||un===void 0)?void 0:un.filter(function(pn){return parseInt(on)===parseInt(pn==null?void 0:pn.id)})[0],Pr(Cr),gt.page=1,gt.limit=10,gt.id=on,bt(Object(N.a)({},gt)),jr.next=5,Rt(Object(N.a)({},gt));case 5:case"end":return jr.stop()}},Dr)}));return function(Dr){return Mt.apply(this,arguments)}}()},Gt==null||((Dt=Gt.children)===null||Dt===void 0)?void 0:Dt.map(function(Mt,Dr){return t.a.createElement(Wn,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){gt.page=1,gt.sort=gt.sort==="desc"?"asc":"desc",bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",gt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(gt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(B.a.Search,{onSearch:function(Dr){gt.page=1,gt.search=Dr,bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(p.a,{spinning:zt},Ot==null||((Kt=Ot.results)===null||Kt===void 0)?void 0:Kt.map(function(Mt,Dr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Dr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/"+(Mt==null?void 0:Mt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},Mt==null?void 0:Mt.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Mt==null?void 0:Mt.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Mt==null?void 0:Mt.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Mt==null?void 0:Mt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Mt==null?void 0:Mt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Mt==null?void 0:Mt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Mt==null?void 0:Mt.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(Gi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(Dr,on){gt.page=Dr,bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))}})))}var Ki=Ti,ki=function(et){var mt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],wt=["","\u5341","\u767E","\u5343","\u4E07"];et=parseInt(et);var Lt=function(ht){for(var Ot=ht.toString().split("").reverse(),Rt="",ur=0;ur<Ot.length;ur++)Rt=(ur==0&&Ot[ur]==0||ur>0&&Ot[ur]==0&&Ot[ur-1]==0?"":mt[Ot[ur]]+(Ot[ur]==0?wt[0]:wt[ur]))+Rt;return Rt},Dt=Math.floor(et/1e4),Kt=et%1e4;return Kt.toString().length<4&&(Kt="0"+Kt),Dt?Lt(Dt)+"\u4E07"+Lt(Kt):Lt(et)};function ni(xt){var et,mt=xt.item,wt=xt.index,Lt=xt.StaffDetail,Dt=Object(l.useState)(!0),Kt=Object(o.a)(Dt,2),zt=Kt[0],ht=Kt[1],Ot=Object(l.useState)(!0),Rt=Object(o.a)(Ot,2),ur=Rt[0],ar=Rt[1],Zt=Object(l.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/"+(mt==null?void 0:mt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",ki(wt+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},mt==null?void 0:mt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},mt==null?void 0:mt.challenges_count)," ")),t.a.createElement("div",{ref:Zt},t.a.createElement(P.a,{style:{maxHeight:zt&&100},value:mt==null?void 0:mt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ht(!zt)}},zt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(zt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:ur&&58,overflow:"hidden"}},mt==null||((et=mt.challenges)===null||et===void 0)?void 0:et.map(function($t,rr){return t.a.createElement("div",{style:{marginTop:rr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",rr+1,"\u5173",$t==null?void 0:$t.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){ar(!ur)}},ur?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(ur?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Lt==null?void 0:Lt.enrolled)&&t.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=ni,Vi=ve.a.TabPane;function ta(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.loading,ht=xt.ChartRules,Ot=xt.ItemData,Rt=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,sr=xt.dispatch,ot=xt.StaffDetail,Ar=Object(l.useState)(!1),Nr=Object(o.a)(Ar,2),fr=Nr[0],_t=Nr[1],It=Object(l.useState)(""),Et=Object(o.a)(It,2),Nt=Et[0],qt=Et[1],pr=Object(l.useState)(!0),er=Object(o.a)(pr,2),Rr=er[0],Ur=er[1],br=Object(l.useState)(),it=Object(o.a)(br,2),Gt=it[0],ln=it[1],en=Object(l.useState)(),mr=Object(o.a)(en,2),Ir=mr[0],Pr=mr[1],Ft=Object(S.i)(),Qt=Ft.identifier,vr=Object(l.useState)({page:1,limit:10}),tr=Object(o.a)(vr,2),gt=tr[0],bt=tr[1],Vt=Object(l.useState)(),Mt=Object(o.a)(Vt,2),Dr=Mt[0],on=Mt[1];Object(l.useEffect)(function(){var Cr;Rr&&ht!==null&&ht!==void 0&&(Cr=ht.stages)!==null&&Cr!==void 0&&Cr[0]&&un()},[ht==null||((et=ht.stages)===null||et===void 0)?void 0:et[0]]);var un=function(){var Cr=Object(a.a)(s.a.mark(function tn(){var jr,pn,Xr,mn,Xn,Pe;return s.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Xn=ht==null||((jr=ht.stages)===null||jr===void 0)?void 0:jr[0],ln(Xn),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],Pr(Pe),gt.id=(Pe==null?void 0:Pe.id)||(Xn==null?void 0:Xn.id),bt(Object(N.a)({},gt)),Qe.next=7,Rt(Object(N.a)(Object(N.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return Qe.stop()}},tn)}));return function(){return Cr.apply(this,arguments)}}();return t.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Cr=Object(a.a)(s.a.mark(function tn(jr){var pn,Xr,mn,Xn,Pe,Ve,Qe;return s.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return _t(!1),Ve=ht==null||((pn=ht.stages)===null||pn===void 0)?void 0:pn.filter(function(De){return parseInt(jr)===parseInt(De==null?void 0:De.id)})[0],Qe=Ve==null||((Xr=Ve.children)===null||Xr===void 0)?void 0:Xr[0],Pr(Qe),ln(Ve),qt(((mn=ht.rule_contents)===null||mn===void 0||((Xn=mn.filter(function(De){return parseInt(De.competition_stage_id)===parseInt(Ve==null?void 0:Ve.id)}))===null||Xn===void 0||((Pe=Xn[0])===null||Pe===void 0))?void 0:Pe.content)||""),gt.page=1,gt.limit=10,gt.id=(Qe==null?void 0:Qe.id)||jr,bt(Object(N.a)({},gt)),be.next=9,Rt(Object(N.a)({},gt));case 9:case"end":return be.stop()}},tn)}));return function(tn){return Cr.apply(this,arguments)}}()},ht&&ht.stages.map(function(Cr,tn){return t.a.createElement(Vi,{tab:Cr.name,key:Cr.id===null?0:Cr.id})})),(Gt==null||((Lt=Gt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&t.a.createElement(ve.a,{activeKey:(Ir==null?void 0:Ir.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Cr=Object(a.a)(s.a.mark(function tn(jr){var pn,Xr;return s.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xr=Gt==null||((pn=Gt.children)===null||pn===void 0)?void 0:pn.filter(function(Pe){return parseInt(jr)===parseInt(Pe==null?void 0:Pe.id)})[0],Pr(Xr),gt.page=1,gt.limit=10,gt.id=jr,bt(Object(N.a)({},gt)),Xn.next=5,Rt(Object(N.a)({},gt));case 5:case"end":return Xn.stop()}},tn)}));return function(tn){return Cr.apply(this,arguments)}}()},Gt==null||((Dt=Gt.children)===null||Dt===void 0)?void 0:Dt.map(function(Cr,tn){return t.a.createElement(Vi,{tab:Cr.name,key:Cr.id===null?0:Cr.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},Ot==null?void 0:Ot.start_time,"~",Ot==null?void 0:Ot.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(Ot==null?void 0:Ot.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(p.a,{spinning:zt},Ot==null||((Kt=Ot.results)===null||Kt===void 0)?void 0:Kt.map(function(Cr,tn){return t.a.createElement(ea,{StaffDetail:ot,item:Cr,index:tn})})),t.a.createElement(Gi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(tn,jr){gt.page=tn,bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))}})))}var oa=ta,Li=j("UfjD"),$n=j("qHvr"),ji=function(et){var mt,wt,Lt,Dt,Kt,zt,ht,Ot,Rt=et.globalSetting,ur=et.loading,ar=et.dispatch,Zt=et.user,$t=Object(u.a)(et,["globalSetting","loading","dispatch","user"]),rr=Object(l.useState)({avatar_url:""}),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)([]),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(S.i)(),Nt=Et.identifier,qt=Object(l.useState)([]),pr=Object(o.a)(qt,2),er=pr[0],Rr=pr[1],Ur=Object(l.useState)(!0),br=Object(o.a)(Ur,2),it=br[0],Gt=br[1],ln=Object(l.useState)([]),en=Object(o.a)(ln,2),mr=en[0],Ir=en[1],Pr=Object(l.useState)([]),Ft=Object(o.a)(Pr,2),Qt=Ft[0],vr=Ft[1],tr=Object(l.useState)(!1),gt=Object(o.a)(tr,2),bt=gt[0],Vt=gt[1],Mt=Object(l.useState)(!1),Dr=Object(o.a)(Mt,2),on=Dr[0],un=Dr[1],Cr=Object(l.useState)(!1),tn=Object(o.a)(Cr,2),jr=tn[0],pn=tn[1],Xr=Object(l.useState)([]),mn=Object(o.a)(Xr,2),Xn=mn[0],Pe=mn[1],Ve=Object(l.useState)([]),Qe=Object(o.a)(Ve,2),Fe=Qe[0],be=Qe[1],De=Object(l.useState)([]),we=Object(o.a)(De,2),je=we[0],Ge=we[1],Xe=Object(l.useState)(!1),ze=Object(o.a)(Xe,2),Ze=ze[0],pt=ze[1],kt=Object(l.useState)([]),jt=Object(o.a)(kt,2),Yt=jt[0],kr=jt[1],Jr=Object(l.useState)(),$r=Object(o.a)(Jr,2),Zr=$r[0],Hr=$r[1],rn=Object(l.useState)(!0),nn=Object(o.a)(rn,2),yn=nn[0],cn=nn[1],In=Object(l.useState)(!1),fn=Object(o.a)(In,2),Mr=fn[0],Fr=fn[1],sn=Object(l.useState)(!1),gn=Object(o.a)(sn,2),wr=gn[0],xn=gn[1],zn=Object(l.useState)(!1),Sn=Object(o.a)(zn,2),Ln=Sn[0],Cn=Sn[1],Jn=Object(l.useState)(!1),ii=Object(o.a)(Jn,2),Gn=ii[0],fi=ii[1],Xi=Object(l.useState)(!1),Si=Object(o.a)(Xi,2),ai=Si[0],Pn=Si[1],Mn=Object(l.useState)(!0),Kn=Object(o.a)(Mn,2),Bn=Kn[0],ei=Kn[1],Ai=Object(S.h)(),ra=Object(l.useRef)(null);Object(l.useEffect)(function(){Nt&&An(),Object(Wt.X)("\u7ADE\u8D5B")},[Nt]);function An(){return Fi.apply(this,arguments)}function Fi(){return Fi=Object(a.a)(s.a.mark(function xr(){var Tr;return s.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return wn.t0=It,wn.next=3,ar({type:"competitions/getStaff",payload:{identifier:Nt}});case 3:return wn.t1=wn.sent,(0,wn.t0)(wn.t1),wn.next=7,ar({type:"competitions/getHeader",payload:{identifier:Nt}});case 7:Tr=wn.sent,Ar(Tr),Object(Wt.X)((Tr==null?void 0:Tr.name)||"\u7ADE\u8D5B");case 10:case"end":return wn.stop()}},xr)})),Fi.apply(this,arguments)}Object(l.useEffect)(function(){var xr;Hr(parseInt(Ai==null||((xr=Ai.query)===null||xr===void 0)?void 0:xr.type)===1)},[Ai]),Object(l.useEffect)(function(){var xr;if((ot==null||((xr=ot.competition_modules)===null||xr===void 0)?void 0:xr.length)>0){var Tr,or;if((Ai==null||((Tr=Ai.query)===null||Tr===void 0)?void 0:Tr.active)==="\u8D5B\u9898\u53D1\u5E03"){var wn,hr=ot==null||((wn=ot.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(ot==null||((or=ot.competition_modules)===null||or===void 0)?void 0:or[0])}},[ot]);function Ui(xr){return Dn.apply(this,arguments)}function Dn(){return Dn=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Ge(Tr.id),je=Tr.id,Ir(Tr),!(Tr.module_type==="entrance")){hr.next=9;break}return hr.next=6,ar({type:"competitions/getItem",payload:{url:Tr.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:Tr.module_url}});case 11:or=hr.sent;case 12:Vt(!1),pn(!1),pt(!1),Rr(or),Fr(!1),xn(!1),vr(Tr.module_type),Tr.module_type==="chart"?(Vt(!0),Gt(!1),Ba()):Tr.module_type==="certificate"?(pn(!0),Vt(!1),Gt(!1),ba()):Tr.module_type==="md_tab"?(pt(!0),Gt(!1),localStorage.setItem("issee","2"),Vt(!1),pn(!1),ua()):Tr.module_type==="md_shixun"?(Fr(!0),Gt(!1),ua()):Tr.module_type==="entrance"?(xn(!0),Gt(!1),ua()):(Gt(!0),localStorage.setItem("issee","1"));case 20:case"end":return hr.stop()}},xr)})),Dn.apply(this,arguments)}function On(xr,Tr,or){return ti.apply(this,arguments)}function ti(){return ti=Object(a.a)(s.a.mark(function xr(Tr,or,wn){var hr,pa;return s.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(Tr.stopPropagation(),Object(ue.e)(ar)){jn.next=3;break}return jn.abrupt("return");case 3:if(!(ot!=null&&ot.is_authentication&&!(Zt!=null&&(hr=Zt.userInfo)!==null&&hr!==void 0&&hr.authentication))){jn.next=6;break}return ar({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),jn.abrupt("return");case 6:if(!(ot!=null&&ot.enroll_url)){jn.next=9;break}return Object(Wt.S)(ot==null?void 0:ot.enroll_url),jn.abrupt("return");case 9:if(!(wn==="ismodel")){jn.next=23;break}if(!(or.member_of_course===!0)){jn.next=14;break}Object(Wt.S)("/classrooms/".concat(or.course_id)),jn.next=21;break;case 14:if(or.invite_code){jn.next=17;break}return r.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"),jn.abrupt("return");case 17:return jn.next=19,ar({type:"competitions/addApplytojoincourse",payload:{invite_code:or.invite_code,student:1}});case 19:pa=jn.sent,pa.status===0&&Object(Wt.S)("/classrooms/".concat(or.course_id));case 21:jn.next=27;break;case 23:if(!(_t.enrolled===!0)){jn.next=26;break}return Object(Wt.S)(wn),jn.abrupt("return");case 26:Cn(!0);case 27:case"end":return jn.stop()}},xr)})),ti.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(a.a)(s.a.mark(function xr(){return s.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=un,or.next=3,ar({type:"competitions/ChartRules",payload:{identifier:Nt}});case 3:return or.t1=or.sent,or.next=6,(0,or.t0)(or.t1);case 6:case"end":return or.stop()}},xr)})),wa.apply(this,arguments)}function sa(xr){return la.apply(this,arguments)}function la(){return la=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Charts",payload:{identifier:Nt,stage_id:Tr}});case 2:or=hr.sent,Rr(or);case 4:case"end":return hr.stop()}},xr)})),la.apply(this,arguments)}function ka(xr){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return cn(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(N.a)({identifier:Nt,stage_id:Tr==null?void 0:Tr.id},Tr)});case 3:or=hr.sent,Rr(or),cn(!1);case 6:case"end":return hr.stop()}},xr)})),Ta.apply(this,arguments)}function La(xr){return Ha.apply(this,arguments)}function Ha(){return Ha=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return cn(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(N.a)({identifier:Nt,stage_id:Tr==null?void 0:Tr.id,module_type:"entrance"},Tr)});case 3:or=hr.sent,Rr(or),cn(!1);case 6:case"end":return hr.stop()}},xr)})),Ha.apply(this,arguments)}function Xa(xr){return Pa.apply(this,arguments)}function Pa(){return Pa=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Results",payload:{identifier:Nt,stage_id:Tr}});case 2:if(or=hr.sent,!(localStorage.getItem("issee")==="1")){hr.next=5;break}return hr.abrupt("return");case 5:Rr(or);case 6:case"end":return hr.stop()}},xr)})),Pa.apply(this,arguments)}function ua(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(a.a)(s.a.mark(function xr(){return s.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:Nt,competition_module_id:je}});case 3:or.t1=or.sent,(0,or.t0)(or.t1);case 5:case"end":return or.stop()}},xr)})),Sa.apply(this,arguments)}function ba(){return ca.apply(this,arguments)}function ca(){return ca=Object(a.a)(s.a.mark(function xr(){var Tr,or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Prize",payload:{identifier:Nt,user_id:Zt==null||((Tr=Zt.userInfo)===null||Tr===void 0)?void 0:Tr.user_id}});case 2:or=hr.sent,Pe(or);case 4:case"end":return hr.stop()}},xr)})),ca.apply(this,arguments)}function co(){return _a.apply(this,arguments)}function _a(){return _a=Object(a.a)(s.a.mark(function xr(){var Tr,or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Accounts",payload:{id:Zt==null||((Tr=Zt.userInfo)===null||Tr===void 0)?void 0:Tr.user_id}});case 2:or=hr.sent,be(or);case 4:case"end":return hr.stop()}},xr)})),_a.apply(this,arguments)}function Ca(xr){return da.apply(this,arguments)}function da(){return da=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Bn){hr.next=2;break}return hr.abrupt("return");case 2:if(ei(!1),!fa()){hr.next=5;break}return hr.abrupt("return");case 5:return hr.next=7,ar({type:"competitions/AddTeam",payload:{identifier:Nt,name:Tr}});case 7:or=hr.sent,or&&or.status===0?(r.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),An(),fi(!1)):ei(!0);case 9:case"end":return hr.stop()}},xr)})),da.apply(this,arguments)}function fa(){var xr,Tr;if(Zt!=null&&(xr=Zt.userInfo)!==null&&xr!==void 0&&xr.is_teacher){var or;if(_t!=null&&(or=_t.teacher_staff)!==null&&or!==void 0&&or.mutiple_limited&&(_t!=null&&_t.enrolled))return r.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ei(!0),!0}else{var wn;if(_t!=null&&(wn=_t.member_staff)!==null&&wn!==void 0&&wn.mutiple_limited&&(_t!=null&&_t.enrolled))return r.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ei(!0),!0}if(_t!=null&&_t.enroll_ended)return r.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ei(!0),!0;if(Zt!=null&&(Tr=Zt.userInfo)!==null&&Tr!==void 0&&Tr.is_teacher){if(!_t.teacher_staff)return r.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ei(!0),!0}else if(!(_t!=null&&_t.member_staff))return r.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ei(!0),!0}function Yi(xr){return na.apply(this,arguments)}function na(){return na=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Bn){hr.next=2;break}return hr.abrupt("return");case 2:if(!fa()){hr.next=4;break}return hr.abrupt("return");case 4:return ei(!1),hr.next=7,ar({type:"competitions/JoinTeam",payload:{identifier:Nt,invite_code:Tr}});case 7:or=hr.sent,or&&or.status===0?(r.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),Pn(!1),ei(!0),An()):ei(!0);case 9:case"end":return hr.stop()}},xr)})),na.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(n.a,{className:"mt10",separator:">"},t.a.createElement(n.a.Item,null,t.a.createElement(x.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,ot.name,ot.sub_title?"-"+ot.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(p.a,{spinning:ur.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(ot==null?void 0:ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:z.a.IMG_SERVER+"/"+(ot==null?void 0:ot.avatar_url)}),!(ot!=null&&ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:z.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(C.a.titlesize)},ot.name,ot.sub_title?"-"+ot.sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u5956\u91D1"),ot!=null&&ot.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(ot&&ot.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.member_count).toLocaleString()))),t.a.createElement("p",{className:C.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),ot.start_time,"~",ot.end_time),t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),ot.enroll_end_time),ot.competition_status==="ended"?t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,ot.competition_status==="progressing"?t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(ot==null?void 0:ot.mode)<=2&&_t.enrolled&&t.a.createElement(T.a,{onClick:function(Tr){if((ot==null?void 0:ot.mode)===1){var or;Ui((or=ot.competition_modules)===null||or===void 0?void 0:or.find(function(wn){return wn.module_type==="entrance"}))}else On(Tr,ot,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(ot==null?void 0:ot.mode)===2||(ot==null?void 0:ot.mode)===1&&((mt=ot.competition_modules)===null||mt===void 0||((wt=mt.filter(function(xr){return xr.module_type==="entrance"}))===null||wt===void 0)?void 0:wt.length)>0?"":"none"},className:C.a.buttonsize},(ot==null?void 0:ot.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(ot==null?void 0:ot.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),ot.competition_status==="ended"?t.a.createElement(T.a,{type:"primary",className:C.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement(T.a,{type:"primary",className:C.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,ot.competition_status!=="nearly_published"&&ot.enroll_end&&ot.competition_status!=="ended"?t.a.createElement(T.a,{type:"primary",className:C.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,ot.competition_status==="progressing"&&ot.enroll_end!=!0?t.a.createElement(T.a,{type:"primary",disabled:_t.enrolled&&!ot.need_attachment,className:C.a.buttonsize,onClick:function(Tr){if(_t.enrolled&&ot.need_attachment){var or;(or=ra.current)===null||or===void 0||or.handleVisible();return}On(Tr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))}},_t.enrolled?ot.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":ot!=null&&ot.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Zt.userInfo.real_name!="\u6E38\u5BA2"&&!(ot!=null&&ot.enroll_url)&&t.a.createElement("span",{onClick:function(Tr){return On(Tr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))},className:C.a.myteam},Object(Lr.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:C.a.bootmdetail},t.a.createElement("div",{className:C.a.flex1},t.a.createElement(m.a,{selectedKeys:["".concat(je)]},ot&&ot.competition_modules&&ot.competition_modules.map(function(xr,Tr){if(xr.module_type!="enroll")return t.a.createElement(m.a.Item,{className:C.a.menuItem,onClick:function(){if(xr!=null&&xr.is_authentication){if(!Object(ue.e)(ar))return;r.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Ui(xr)},key:xr.id},xr.name)}))),t.a.createElement("div",{className:C.a.flex6,style:{padding:(Mr||wr)&&0}},jr?t.a.createElement(Pt,{dispatch:ar,userid:Zt==null||((Lt=Zt.userInfo)===null||Lt===void 0)?void 0:Lt.user_id,Prize:Xn,Accounts:Fe,getAccounts:co}):null,bt?t.a.createElement(Le,{HeaderDetail:ot,userinfo:Zt.userInfo,Editable:ot==null||((Dt=ot.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:sa,getChartRules:Ba,Selectkey:je,ChartRules:on,ItemData:er}):null,it?t.a.createElement(te,{ref:ra,StaffDetail:_t,HeaderDetail:ot,userinfo:Zt.userInfo,Editable:ot==null||((Kt=ot.permission)===null||Kt===void 0)?void 0:Kt.editable,ItemData:er,setIssee:Gt,ModelType:Qt,dispatch:ar}):null,!it&&!Mr&&!wr&&!bt&&!jr&&!Ze?t.a.createElement(Z,{userinfo:Zt.userInfo,ModelType:Qt,getrightdatas:Ui,dispatch:ar,MenuItem:mr,setIssee:Gt,identifier:Nt,ItemData:er}):null,Ze&&t.a.createElement(Nn,{dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:ot,Editable:ot==null||((zt=ot.permission)===null||zt===void 0)?void 0:zt.editable,getCharts:Xa,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),Mr&&t.a.createElement(Ki,{loading:yn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:ot,Editable:ot==null||((ht=ot.permission)===null||ht===void 0)?void 0:ht.editable,getCharts:ka,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),wr&&t.a.createElement(oa,{loading:yn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:ot,Editable:ot==null||((Ot=ot.permission)===null||Ot===void 0)?void 0:Ot.editable,getCharts:La,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}))),t.a.createElement(v.a,null),t.a.createElement(V,{getResults:Xa}),t.a.createElement(O.a,{visible:Zr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Hr(!1)}},t.a.createElement("div",{className:C.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(T.a,{type:"primary",onClick:function(){return Object(Wt.S)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(O.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Ln,onCancel:function(){Cn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(T.a,{type:"primary",style:{height:40},onClick:function(){Pn(!0),Cn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(T.a,{style:{height:40},onClick:function(){fi(!0),Cn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ai?t.a.createElement(Li.a,{isjoin:ai,setJoin:Pn,JoinTeams:Yi}):null,Gn?t.a.createElement($n.a,{isAddmodle:Gn,setIsAdd:fi,createTeam:Ca}):null)},ha=q.default=Object(f.a)(function(xt){var et=xt.loading,mt=xt.globalSetting,wt=xt.user;return{globalSetting:mt,loading:et,user:wt}})(ji)},GRuw:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("lPiR"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.algo,y=m.SHA256,T=m.SHA224=y.extend({_doReset:function(){this._hash=new M.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=y._doFinalize.call(this);return b.sigBytes-=4,b}});g.SHA224=y._createHelper(T),g.HmacSHA224=y._createHmacHelper(T)}(),N.SHA224})},GfqC:function(F,q,j){"use strict";var N=j("q1tI"),g=j.n(N),O=j("TSYQ"),M=j.n(O);function m(G,B){var P="cannot "+G.method+" "+G.action+" "+B.status+"'",z=new Error(P);return z.status=B.status,z.method=G.method,z.url=G.action,z}function y(G){var B=G.responseText||G.response;if(!B)return B;try{return JSON.parse(B)}catch(P){return B}}function T(G){var B=new XMLHttpRequest;G.onProgress&&B.upload&&(B.upload.onprogress=function(ue){ue.total>0&&(ue.percent=ue.loaded/ue.total*100),G.onProgress(ue)});var P=new FormData;G.data&&Object.keys(G.data).forEach(function(J){var ue=G.data[J];if(Array.isArray(ue)){ue.forEach(function(de){P.append(J+"[]",de)});return}P.append(J,G.data[J])}),G.file instanceof Blob?P.append(G.filename,G.file,G.file.name):P.append(G.filename,G.file),B.onerror=function(ue){G.onError(ue)},B.onload=function(){return B.status<200||B.status>=300?G.onError(m(G,B),y(B)):G.onSuccess(y(B),B)},B.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var z=G.headers||{};return z["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(z).forEach(function(J){z[J]!==null&&B.setRequestHeader(J,z[J])}),B.send(P),{abort:function(){B.abort()}}}var b=+new Date,p=0;function d(){return"rc-upload-"+b+"-"+ ++p}function n(G,B){return G.indexOf(B,G.length-B.length)!==-1}var c=function(G,B){if(G&&B){var P=Array.isArray(B)?B:B.split(","),z=G.name||"",J=G.type||"",ue=J.replace(/\/.*$/,"");return P.some(function(de){var Se=de.trim();return Se.charAt(0)==="."?n(z.toLowerCase(),Se.toLowerCase()):/\/\*$/.test(Se)?ue===Se.replace(/\/.*$/,""):J===Se})}return!0};function r(G,B){var P=G.createReader(),z=[];function J(){P.readEntries(function(ue){var de=Array.prototype.slice.apply(ue);z=z.concat(de);var Se=!de.length;Se?B(z):J()})}J()}var a=function(B,P,z){var J=function ue(de,Se){Se=Se||"",de.isFile?de.file(function(Ae){z(Ae)&&(de.fullPath&&!Ae.webkitRelativePath&&(Object.defineProperties(Ae,{webkitRelativePath:{writable:!0}}),Ae.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(Ae,{webkitRelativePath:{writable:!1}})),P([Ae]))}):de.isDirectory&&r(de,function(Ae){Ae.forEach(function(pe){ue(pe,""+Se+de.name+"/")})})};B.forEach(function(ue){J(ue.webkitGetAsEntry())})},o=a,u=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var P=arguments[B];for(var z in P)Object.prototype.hasOwnProperty.call(P,z)&&(G[z]=P[z])}return G},h=function(){function G(B,P){var z=[],J=!0,ue=!1,de=void 0;try{for(var Se=B[Symbol.iterator](),Ae;!(J=(Ae=Se.next()).done)&&!(z.push(Ae.value),P&&z.length===P);J=!0);}catch(pe){ue=!0,de=pe}finally{try{!J&&Se.return&&Se.return()}finally{if(ue)throw de}}return z}return function(B,P){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return G(B,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function G(B,P){for(var z=0;z<P.length;z++){var J=P[z];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}return function(B,P,z){return P&&G(B.prototype,P),z&&G(B,z),B}}();function l(G,B,P){return B in G?Object.defineProperty(G,B,{value:P,enumerable:!0,configurable:!0,writable:!0}):G[B]=P,G}function t(G,B){var P={};for(var z in G){if(B.indexOf(z)>=0)continue;if(!Object.prototype.hasOwnProperty.call(G,z))continue;P[z]=G[z]}return P}function S(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function x(G,B){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:G}function f(G,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);G.prototype=Object.create(B&&B.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(G,B):G.__proto__=B)}var R=function(B){return Object.keys(B).reduce(function(P,z){return(z.substr(0,5)==="data-"||z.substr(0,5)==="aria-"||z==="role")&&(P[z]=B[z]),P},{})},C=function(G){f(B,G);function B(){var P,z,J,ue;S(this,B);for(var de=arguments.length,Se=Array(de),Ae=0;Ae<de;Ae++)Se[Ae]=arguments[Ae];return ue=(z=(J=x(this,(P=B.__proto__||Object.getPrototypeOf(B)).call.apply(P,[this].concat(Se))),J),J.state={uid:d()},J.reqs={},J.onChange=function(pe){var Oe=pe.target.files;J.uploadFiles(Oe),J.reset()},J.onClick=function(pe){var Oe=J.fileInput;if(!Oe)return;var ye=J.props,ce=ye.children,ae=ye.onClick;ce&&ce.type==="button"&&(Oe.parentNode.focus(),Oe.parentNode.querySelector("button").blur()),Oe.click(),ae&&ae(pe)},J.onKeyDown=function(pe){pe.key==="Enter"&&J.onClick()},J.onFileDrop=function(pe){var Oe=J.props.multiple;if(pe.preventDefault(),pe.type==="dragover")return;if(J.props.directory)o(Array.prototype.slice.call(pe.dataTransfer.items),J.uploadFiles,function(ce){return c(ce,J.props.accept)});else{var ye=Array.prototype.slice.call(pe.dataTransfer.files).filter(function(ce){return c(ce,J.props.accept)});Oe===!1&&(ye=ye.slice(0,1)),J.uploadFiles(ye)}},J.uploadFiles=function(pe){var Oe=Array.prototype.slice.call(pe);Oe.map(function(ye){return ye.uid=d(),ye}).forEach(function(ye){J.upload(ye,Oe)})},J.saveFileInput=function(pe){J.fileInput=pe},z),x(J,ue)}return s(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(z,J){var ue=this,de=this.props;if(!de.beforeUpload)return setTimeout(function(){return ue.post(z)},0);var Se=de.beforeUpload(z,J);Se&&Se.then?Se.then(function(Ae){var pe=Object.prototype.toString.call(Ae);return pe==="[object File]"||pe==="[object Blob]"?ue.post(Ae):ue.post(z)}).catch(function(Ae){console.log(Ae)}):Se!==!1&&setTimeout(function(){return ue.post(z)},0);return}},{key:"post",value:function(z){var J=this;if(!this._isMounted)return;var ue=this.props,de=ue.onStart,Se=ue.onProgress,Ae=ue.transformFile,pe=Ae===void 0?function(Oe){return Oe}:Ae;new Promise(function(Oe){var ye=ue.action;return typeof ye=="function"&&(ye=ye(z)),Oe(ye)}).then(function(Oe){var ye=z.uid,ce=ue.customRequest||T,ae=Promise.resolve(pe(z)).then(function(re){var fe=ue.data;return typeof fe=="function"&&(fe=fe(re)),Promise.all([re,fe])}).catch(function(re){console.error(re)});ae.then(function(re){var fe=h(re,2),te=fe[0],ne=fe[1],Te={action:Oe,filename:ue.name,data:ne,file:te,headers:ue.headers,withCredentials:ue.withCredentials,method:ue.method||"post",onProgress:Se?function(ie){Se(ie,z)}:null,onSuccess:function(Z,X){delete J.reqs[ye],ue.onSuccess(Z,z,X)},onError:function(Z,X){delete J.reqs[ye],ue.onError(Z,X,z)}};de(z),J.reqs[ye]=ce(Te)})})}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(z){var J=this.reqs;if(z){var ue=z;z&&z.uid&&(ue=z.uid),J[ue]&&J[ue].abort&&J[ue].abort(),delete J[ue]}else Object.keys(J).forEach(function(de){J[de]&&J[de].abort&&J[de].abort(),delete J[de]})}},{key:"render",value:function(){var z,J=this.props,ue=J.component,de=J.prefixCls,Se=J.className,Ae=J.disabled,pe=J.id,Oe=J.style,ye=J.multiple,ce=J.accept,ae=J.children,re=J.directory,fe=J.openFileDialogOnClick,te=J.onMouseEnter,ne=J.onMouseLeave,Te=t(J,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=M()((z={},l(z,de,!0),l(z,de+"-disabled",Ae),l(z,Se,Se),z)),Z=Ae?{}:{onClick:fe?this.onClick:function(){},onKeyDown:fe?this.onKeyDown:function(){},onMouseEnter:te,onMouseLeave:ne,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(ue,u({},Z,{className:ie,role:"button",style:Oe}),g.a.createElement("input",u({},R(Te),{id:pe,type:"file",ref:this.saveFileInput,onClick:function(Q){return Q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ce,directory:re?"directory":null,webkitdirectory:re?"webkitdirectory":null,multiple:ye,onChange:this.onChange})),ae)}}]),B}(N.Component),v=C,_=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var P=arguments[B];for(var z in P)Object.prototype.hasOwnProperty.call(P,z)&&(G[z]=P[z])}return G},E=function(){function G(B,P){for(var z=0;z<P.length;z++){var J=P[z];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}return function(B,P,z){return P&&G(B.prototype,P),z&&G(B,z),B}}();function w(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function k(G,B){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:G}function I(G,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);G.prototype=Object.create(B&&B.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(G,B):G.__proto__=B)}function L(){}var V=function(G){I(B,G);function B(){var P,z,J,ue;w(this,B);for(var de=arguments.length,Se=Array(de),Ae=0;Ae<de;Ae++)Se[Ae]=arguments[Ae];return ue=(z=(J=k(this,(P=B.__proto__||Object.getPrototypeOf(B)).call.apply(P,[this].concat(Se))),J),J.saveUploader=function(pe){J.uploader=pe},z),k(J,ue)}return E(B,[{key:"abort",value:function(z){this.uploader.abort(z)}},{key:"render",value:function(){return g.a.createElement(v,_({},this.props,{ref:this.saveUploader}))}}]),B}(N.Component);V.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 W=V,H=q.a=W},HmJG:function(F,q,j){},IBYe:function(F,q,j){"use strict";function N(g){return null}q.a=N},Ib8C:function(F,q,j){(function(N){(function(g,O){F.exports=q=O()})(this,function(){var g=g||function(O,M){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 N!="undefined"&&N.crypto&&(m=N.crypto),!m&&!0)try{m=j(4)}catch(l){}var y=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch(l){}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch(l){}}throw new Error("Native crypto module could not be used to get secure random number.")},T=Object.create||function(){function l(){}return function(t){var S;return l.prototype=t,S=new l,l.prototype=null,S}}(),b={},p=b.lib={},d=p.Base=function(){return{extend:function(l){var t=T(this);return l&&t.mixIn(l),(!t.hasOwnProperty("init")||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var t in l)l.hasOwnProperty(t)&&(this[t]=l[t]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=p.WordArray=d.extend({init:function(l,t){l=this.words=l||[],t!=M?this.sigBytes=t:this.sigBytes=l.length*4},toString:function(l){return(l||r).stringify(this)},concat:function(l){var t=this.words,S=l.words,x=this.sigBytes,f=l.sigBytes;if(this.clamp(),x%4)for(var R=0;R<f;R++){var C=S[R>>>2]>>>24-R%4*8&255;t[x+R>>>2]|=C<<24-(x+R)%4*8}else for(var v=0;v<f;v+=4)t[x+v>>>2]=S[v>>>2];return this.sigBytes+=f,this},clamp:function(){var l=this.words,t=this.sigBytes;l[t>>>2]&=4294967295<<32-t%4*8,l.length=O.ceil(t/4)},clone:function(){var l=d.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var t=[],S=0;S<l;S+=4)t.push(y());return new n.init(t,l)}}),c=b.enc={},r=c.Hex={stringify:function(l){for(var t=l.words,S=l.sigBytes,x=[],f=0;f<S;f++){var R=t[f>>>2]>>>24-f%4*8&255;x.push((R>>>4).toString(16)),x.push((R&15).toString(16))}return x.join("")},parse:function(l){for(var t=l.length,S=[],x=0;x<t;x+=2)S[x>>>3]|=parseInt(l.substr(x,2),16)<<24-x%8*4;return new n.init(S,t/2)}},a=c.Latin1={stringify:function(l){for(var t=l.words,S=l.sigBytes,x=[],f=0;f<S;f++){var R=t[f>>>2]>>>24-f%4*8&255;x.push(String.fromCharCode(R))}return x.join("")},parse:function(l){for(var t=l.length,S=[],x=0;x<t;x++)S[x>>>2]|=(l.charCodeAt(x)&255)<<24-x%4*8;return new n.init(S,t)}},o=c.Utf8={stringify:function(l){try{return decodeURIComponent(escape(a.stringify(l)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(l){return a.parse(unescape(encodeURIComponent(l)))}},u=p.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=o.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var t,S=this._data,x=S.words,f=S.sigBytes,R=this.blockSize,C=R*4,v=f/C;l?v=O.ceil(v):v=O.max((v|0)-this._minBufferSize,0);var _=v*R,E=O.min(_*4,f);if(_){for(var w=0;w<_;w+=R)this._doProcessBlock(x,w);t=x.splice(0,_),S.sigBytes-=E}return new n.init(t,E)},clone:function(){var l=d.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0}),h=p.Hasher=u.extend({cfg:d.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(l){return function(t,S){return new l.init(S).finalize(t)}},_createHmacHelper:function(l){return function(t,S){return new s.HMAC.init(l,S).finalize(t)}}}),s=b.algo={};return b}(Math);return g})}).call(this,j("IyRk"))},K3mO:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.Base,m=O.WordArray,y=g.algo,T=y.MD5,b=y.EvpKDF=M.extend({cfg:M.extend({keySize:128/32,hasher:T,iterations:1}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,d){for(var n,c=this.cfg,r=c.hasher.create(),a=m.create(),o=a.words,u=c.keySize,h=c.iterations;o.length<u;){n&&r.update(n),n=r.update(p).finalize(d),r.reset();for(var s=1;s<h;s++)n=r.finalize(n),r.reset();a.concat(n)}return a.sigBytes=u*4,a}});g.EvpKDF=function(p,d,n){return b.create(n).compute(p,d)}}(),N.EvpKDF})},KXlV:function(F,q,j){F.exports=j.p+"static/job.65c6034f.png"},KeDT:function(F,q,j){F.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(F,q,j){"use strict";j.d(q,"a",function(){return f}),j.d(q,"c",function(){return v});var N=j("0Owb"),g=j("miYZ"),O=j("tsqr"),M=j("oBTY"),m=j("tJVT"),y=j("PpiC"),T=j("k1fw"),b=j("9og8"),p=j("DZo9"),d=j("8z0m"),n=j("WmNS"),c=j.n(n),r=j("q1tI"),a=j.n(r),o=j("ErOA"),u=j("NFKh"),h=j.n(u),s=j("7Cbv"),l=j("9kvl"),t=j("mxV5"),S=j.n(t),x=d.a.Dragger,f=function(w){var k="bf3c199c2470cb477d907b1e0917c17b",I="5183666c72eec9e4",L=h.a.enc.Utf8.parse(k),V=h.a.enc.Utf8.parse(I),W=h.a.AES.decrypt(w,L,{iv:V,mode:h.a.mode.CBC});return W.toString(h.a.enc.Utf8)},R,C=function(){var E=Object(b.a)(c.a.mark(function w(k){var I,L,V,W,H,G,B,P,z,J,ue;return c.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return B=k.identifier,P=k.oldFilename,z=k.newFilename,Se.next=3,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return J=Se.sent,J.data=JSON.parse(f(J.data)),ue=new S.a({endpoint:J==null||((I=J.data)===null||I===void 0)?void 0:I.end_point,region:J==null||((L=J.data)===null||L===void 0)?void 0:L.region,accessKeyId:J==null||((V=J.data)===null||V===void 0)?void 0:V.access_key_id,accessKeySecret:J==null||((W=J.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:J==null||((H=J.data)===null||H===void 0)?void 0:H.bucket,stsToken:J==null||((G=J.data)===null||G===void 0)?void 0:G.security_token}),Se.abrupt("return",new Promise(function(Ae,pe){console.log(11111,"".concat(B,"/").concat(P),"".concat(B,"/").concat(z),J.data),ue.copy("/".concat(B,"/").concat(P),"/".concat(B,"/").concat(z)).then(function(Oe){console.log("\u62F7\u8D1D\u6210\u529F",Oe)}).catch(function(Oe){console.log(Oe)})}));case 7:case"end":return Se.stop()}},w)}));return function(k){return E.apply(this,arguments)}}(),v=function(){var E=Object(b.a)(c.a.mark(function w(k,I,L){var V,W,H,G,B,P,z,J,ue,de;return c.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return I.file_name=k.name,Ae.next=3,Object(o.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return z=Ae.sent,console.log("decrypt(res.data):",f(z.data)),z.data=JSON.parse(f(z.data)),J=k.name.split("."),J.pop(),ue=I.realFileName?J:Object(s.a)(),de=new S.a({endpoint:z==null||((V=z.data)===null||V===void 0)?void 0:V.end_point,region:z==null||((W=z.data)===null||W===void 0)?void 0:W.region,accessKeyId:z==null||((H=z.data)===null||H===void 0)?void 0:H.access_key_id,accessKeySecret:z==null||((G=z.data)===null||G===void 0)?void 0:G.access_key_secret,bucket:z==null||((B=z.data)===null||B===void 0)?void 0:B.bucket,stsToken:z==null||((P=z.data)===null||P===void 0)?void 0:P.security_token}),Ae.abrupt("return",new Promise(function(pe,Oe){var ye;de.multipartUpload("".concat(ue),new Blob([k],{type:k.type}),Object(T.a)(Object(T.a)({timeout:200*1e3,partSize:102400},L),{},{callback:{url:z==null||((ye=z.data)===null||ye===void 0)?void 0:ye.callback_url,host:z==null?void 0:z.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(I)}})).then(function(ce){var ae;k.response=(ae=ce.data)===null||ae===void 0?void 0:ae.data,pe(ce==null?void 0:ce.data)}).catch(function(ce){Oe(ce),console.log("err:",ce)})}));case 11:case"end":return Ae.stop()}},w)}));return function(k,I,L){return E.apply(this,arguments)}}(),_=function(w){var k=w.user,I=w.cancelUpload,L=Object(y.a)(w,["user","cancelUpload"]),V=Object(r.useState)([]),W=Object(m.a)(V,2),H=W[0],G=W[1],B=Object(r.useState)(),P=Object(m.a)(B,2),z=P[0],J=P[1],ue={onRemove:function(Ae){G(Object(M.a)(H.filter(function(pe){return pe.name!==Ae.name}))),L.onChange(H.filter(function(pe){return pe.name!==Ae.name}))},disabled:L.disabled,multiple:!0,fileList:H==null?void 0:H.map(function(Se){return Se.file}),customRequest:function(){},beforeUpload:function(){var Se=Object(b.a)(c.a.mark(function pe(Oe){var ye;return c.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(ye=L.maxSize||1024*1024*1024*1,!H.filter(function(re){return re.name===Oe.name}).length){ae.next=4;break}return O.b.info("".concat(Oe.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ae.abrupt("return");case 4:if(!((Oe==null?void 0:Oe.size)>ye)){ae.next=7;break}return O.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ye/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ae.abrupt("return",!1);case 7:return H.push({name:Oe.name,file:Oe}),G(Object(M.a)(H)),L.onChange(H),ae.abrupt("return",!1);case 11:case"end":return ae.stop()}},pe)}));function Ae(pe){return Se.apply(this,arguments)}return Ae}()},de=function(){var Se=Object(b.a)(c.a.mark(function Ae(pe,Oe){var ye,ce,ae,re,fe,te,ne,Te,ie,Z;return c.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return Oe.file_name=pe.name,ne=pe.name,Q.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Te=Q.sent,Te.data=JSON.parse(f(Te.data)),!((Te==null?void 0:Te.status)!==0)){Q.next=12;break}return H[H.findIndex(function(_e){return _e.name===ne})].status="error",H[H.findIndex(function(_e){return _e.name===ne})].file.status="error",L.onChange(H),O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return z=new S.a({endpoint:Te==null||((ye=Te.data)===null||ye===void 0)?void 0:ye.end_point,region:Te==null||((ce=Te.data)===null||ce===void 0)?void 0:ce.region,accessKeyId:Te==null||((ae=Te.data)===null||ae===void 0)?void 0:ae.access_key_id,accessKeySecret:Te==null||((re=Te.data)===null||re===void 0)?void 0:re.access_key_secret,bucket:Te==null||((fe=Te.data)===null||fe===void 0)?void 0:fe.bucket,stsToken:Te==null||((te=Te.data)===null||te===void 0)?void 0:te.security_token}),console.log(pe,"file"),J(z),ie=pe.name.split("."),ie.pop(),Z=Oe.realFileName?ie:Object(s.a)(),Q.abrupt("return",new Promise(function(_e,ve){try{var Re;z.multipartUpload("".concat(L.identifier,"/").concat(Z).concat(ne.indexOf(".")>-1?"."+ne.split(".").pop():""),new Blob([pe.file],{type:pe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(qe,rt,ut){try{console.log("\u8FDB\u5EA6",qe,rt,ut);var dt=H.findIndex(function(ft){return ft.name===ne});H[dt].file.percent=qe*100,H[dt].tempCheckpoint=rt,G(Object(M.a)(H))}catch(ft){}},checkpoint:H[H.findIndex(function(Je){return Je.name===ne})].tempCheckpoint,callback:{customValue:{id:ne+""},url:Te==null||((Re=Te.data)===null||Re===void 0)?void 0:Re.callback_url,host:Te==null?void 0:Te.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(Oe)}}).then(function(Je){var qe,rt=H.findIndex(function(Ie){return Ie.name===ne}),ut="done";if(((qe=Je.data)===null||qe===void 0?void 0:qe.status)===0){var dt;pe.response=(dt=Je.data)===null||dt===void 0?void 0:dt.data;var ft=H.findIndex(function(Ie){return Ie.name===ne});H[ft].status="done",H[ft].file.status="done"}else{var Be;O.b.warn((Be=Je.data)===null||Be===void 0?void 0:Be.message),ut="error"}H[rt].status=ut,H[rt].file.status=ut,L.onChange(H),_e(Je==null?void 0:Je.data)}).catch(function(Je){H[H.findIndex(function(qe){return qe.name===ne})].status="error",H[H.findIndex(function(qe){return qe.name===ne})].file.status="error",O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),G(Object(M.a)(H)),L.onChange(H),ve(Je),console.log("err:",Je)})}catch(Je){}}));case 19:case"end":return Q.stop()}},Ae)}));return function(pe,Oe){return Se.apply(this,arguments)}}();return Object(r.useEffect)(function(){H.every(function(Se){return Se==="done"||Se==="error"})&&L.onComplete(H)},[H]),Object(r.useEffect)(function(){if(I){var Se;(Se=z)===null||Se===void 0||Se.cancel()}},[I]),Object(r.useEffect)(function(){L.uploading&&H.map(function(){var Se=Object(b.a)(c.a.mark(function Ae(pe){var Oe,ye;return c.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!((!pe.status||pe.status==="error")&&!I)){ae.next=6;break}return pe.status="uploading",pe.file.status="uploading",ae.next=5,de(pe,{login:k==null||((Oe=k.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:ye=ae.sent;case 6:case"end":return ae.stop()}},Ae)}));return function(Ae){return Se.apply(this,arguments)}}())},[L.uploading]),a.a.createElement(x,Object(N.a)({},ue,{height:L.height,className:L.className}),a.a.createElement("p",{className:"ant-upload-hint"},L.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};q.b=Object(l.a)(function(E){var w=E.loading,k=E.globalSetting,I=E.user;return{globalSetting:k,loading:w.models.competitions,user:I}})(_)},KmYQ:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(g,O){var M=O*4;g.clamp(),g.sigBytes+=M-(g.sigBytes%M||M)},unpad:function(g){for(var O=g.words,M=g.sigBytes-1,M=g.sigBytes-1;M>=0;M--)if(O[M>>>2]>>>24-M%4*8&255){g.sigBytes=M+1;break}}},N.pad.ZeroPadding})},LdHM:function(F,q,j){"use strict";j.d(q,"b",function(){return t}),j.d(q,"a",function(){return x});var N=j("1OyB"),g=j("vuIU"),O=j("Ji7U"),M=j("LK+K"),m=j("q1tI"),y=j("rePB"),T=j("Ff2n"),b=j("ODXe"),p=j("4IlW"),d=j("bX4T"),n=j("YrtM"),c=j("TSYQ"),r=j.n(c),a=j("+nKL"),o=j("8OUc"),u=function(z,J){var ue=z.prefixCls,de=z.id,Se=z.flattenOptions,Ae=z.childrenAsData,pe=z.values,Oe=z.searchValue,ye=z.multiple,ce=z.defaultActiveFirstOption,ae=z.height,re=z.itemHeight,fe=z.notFoundContent,te=z.open,ne=z.menuItemSelectedIcon,Te=z.virtual,ie=z.onSelect,Z=z.onToggleOpen,X=z.onActiveValue,Q=z.onScroll,_e=z.onMouseEnter,ve="".concat(ue,"-item"),Re=Object(n.a)(function(){return Se},[te,Se],function(st,Ue){return Ue[0]&&st[1]!==Ue[1]}),Je=m.useRef(null),qe=function(Ue){Ue.preventDefault()},rt=function(Ue){Je.current&&Je.current.scrollTo({index:Ue})},ut=function(Ue){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=Re.length,Ee=0;Ee<Me;Ee+=1){var Ce=(Ue+Ee*Le+Me)%Me,ke=Re[Ce],Ne=ke.group,He=ke.data;if(!Ne&&!He.disabled)return Ce}return-1},dt=m.useState(function(){return ut(0)}),ft=Object(b.a)(dt,2),Be=ft[0],Ie=ft[1],at=function(Ue){Ie(Ue);var Le=Re[Ue];if(!Le){X(null,-1);return}X(Le.data.value,Ue)};m.useEffect(function(){at(ce!==!1?ut(0):-1)},[Re.length,Oe]),m.useEffect(function(){var st=setTimeout(function(){if(!ye&&te&&pe.size===1){var Ue=Array.from(pe)[0],Le=Re.findIndex(function(Me){var Ee=Me.data;return Ee.value===Ue});at(Le),rt(Le)}});return function(){return clearTimeout(st)}},[te]);var ct=function(Ue){Ue!==void 0&&ie(Ue,{selected:!pe.has(Ue)}),ye||Z(!1)};if(m.useImperativeHandle(J,function(){return{onKeyDown:function(Ue){var Le=Ue.which;switch(Le){case p.a.UP:case p.a.DOWN:{var Me=0;if(Le===p.a.UP?Me=-1:Le===p.a.DOWN&&(Me=1),Me!==0){var Ee=ut(Be+Me,Me);rt(Ee),at(Ee)}break}case p.a.ENTER:{var Ce=Re[Be];Ce&&!Ce.data.disabled?ct(Ce.data.value):ct(void 0),te&&Ue.preventDefault();break}case p.a.ESC:Z(!1)}},onKeyUp:function(){},scrollTo:function(Ue){rt(Ue)}}}),Re.length===0)return m.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(ve,"-empty"),onMouseDown:qe},fe);function $e(st){var Ue=Re[st];if(!Ue)return null;var Le=Ue.data||{},Me=Le.value,Ee=Le.label,Ce=Le.children,ke=Object(d.a)(Le,!0),Ne=Ae?Ce:Ee;return Ue?m.createElement("div",Object.assign({"aria-label":typeof Ne=="string"?Ne:null},ke,{key:st,role:"option",id:"".concat(de,"_list_").concat(st),"aria-selected":pe.has(Me)}),Me):null}return m.createElement(m.Fragment,null,m.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},$e(Be-1),$e(Be),$e(Be+1)),m.createElement(a.a,{itemKey:"key",ref:Je,data:Re,height:ae,itemHeight:re,fullHeight:!1,onMouseDown:qe,onScroll:Q,virtual:Te,onMouseEnter:_e},function(st,Ue){var Le,Me=st.group,Ee=st.groupOption,Ce=st.data,ke=Ce.label,Ne=Ce.key;if(Me)return m.createElement("div",{className:r()(ve,"".concat(ve,"-group"))},ke!==void 0?ke:Ne);var He=Ce.disabled,tt=Ce.value,vt=Ce.title,yt=Ce.children,Wt=Ce.style,Ht=Ce.className,cr=Object(T.a)(Ce,["disabled","value","title","children","style","className"]),dr=pe.has(tt),St="".concat(ve,"-option"),Kr=r()(ve,St,Ht,(Le={},Object(y.a)(Le,"".concat(St,"-grouped"),Ee),Object(y.a)(Le,"".concat(St,"-active"),Be===Ue&&!He),Object(y.a)(Le,"".concat(St,"-disabled"),He),Object(y.a)(Le,"".concat(St,"-selected"),dr),Le)),Vr=Ae?yt:ke,Yr=!ne||typeof ne=="function"||dr;return m.createElement("div",Object.assign({},cr,{"aria-selected":dr,className:Kr,title:vt,onMouseMove:function(){if(Be===Ue||He)return;at(Ue)},onClick:function(){He||ct(tt)},style:Wt}),m.createElement("div",{className:"".concat(St,"-content")},Vr||tt),m.isValidElement(ne)||dr,Yr&&m.createElement(o.a,{className:"".concat(ve,"-option-state"),customizeIcon:ne,customizeIconProps:{isSelected:dr}},dr?"\u2713":null))}))},h=m.forwardRef(u);h.displayName="OptionList";var s=h,l=function(){return null};l.isSelectOption=!0;var t=l,S=function(){return null};S.isSelectOptGroup=!0;var x=S,f=j("VTBJ"),R=j("Zm9Q");function C(P){var z=P.key,J=P.props,ue=J.children,de=J.value,Se=Object(T.a)(J,["children","value"]);return Object(f.a)({key:z,value:de!==void 0?de:z,children:ue},Se)}function v(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(P).map(function(J,ue){if(!m.isValidElement(J)||!J.type)return null;var de=J.type.isSelectOptGroup,Se=J.key,Ae=J.props,pe=Ae.children,Oe=Object(T.a)(Ae,["children"]);return z||!de?C(J):Object(f.a)(Object(f.a)({key:"__RC_SELECT_GRP__".concat(Se===null?ue:Se,"__"),label:Se},Oe),{},{options:v(pe)})}).filter(function(J){return J})}var _=j("2Qr1"),E=j("qNPg"),w=j("U8pU"),k=j("Kwbf"),I=j("WKfj");function L(P){var z=P.mode,J=P.options,ue=P.children,de=P.backfill,Se=P.allowClear,Ae=P.placeholder,pe=P.getInputElement,Oe=P.showSearch,ye=P.onSearch,ce=P.defaultOpen,ae=P.autoFocus,re=P.labelInValue,fe=P.value,te=P.inputValue,ne=P.optionLabelProp,Te=z==="multiple"||z==="tags",ie=Oe!==void 0?Oe:Te||z==="combobox",Z=J||v(ue);if(Object(k.a)(z!=="tags"||Z.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var X=Z.some(function(ve){return ve.options?ve.options.some(function(Re){return typeof("value"in Re?Re.value:Re.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(k.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(k.a)(z!=="combobox"||!ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(k.a)(z==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(k.a)(z==="combobox"||!pe,"`getInputElement` only work with `combobox` mode."),Object(k.b)(z!=="combobox"||!pe||!Se||!Ae,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ye&&!ie&&z!=="combobox"&&z!=="tags"&&Object(k.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(k.b)(!ce||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var Q=Object(I.d)(fe);Object(k.a)(!re||Q.every(function(ve){return Object(w.a)(ve)==="object"&&("key"in ve||"value"in ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(k.a)(!Te||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(ue){var _e=null;Object(R.a)(ue).some(function(ve){if(!m.isValidElement(ve)||!ve.type)return!1;var Re=ve.type;if(Re.isSelectOption)return!1;if(Re.isSelectOptGroup){var Je=Object(R.a)(ve.props.children).every(function(qe){return!m.isValidElement(qe)||!ve.type||qe.type.isSelectOption?!0:(_e=qe.type,!1)});return!Je}return _e=Re,!0}),_e&&Object(k.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_e.displayName||_e.name||_e,"`.")),Object(k.a)(te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var V=L,W=Object(E.a)({prefixCls:"rc-select",components:{optionList:s},convertChildrenToData:v,flattenOptions:_.d,getLabeledValue:_.e,filterOptions:_.b,isValueDisabled:_.g,findValueOption:_.c,warningProps:V,fillOptionsWithMissingValue:_.a}),H=function(P){Object(O.a)(J,P);var z=Object(M.a)(J);function J(){var ue;return Object(N.a)(this,J),ue=z.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)(J,[{key:"render",value:function(){return m.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),J}(m.Component);H.Option=t,H.OptGroup=x;var G=H,B=q.c=G},M8RZ:function(F,q,j){"use strict";j.d(q,"a",function(){return p});var N=j("fWQN"),g=j("mtLc"),O=j("yKVA"),M=j("879j"),m=j("q1tI"),y=j.n(m),T=j("i8i4"),b=j.n(T),p=function(d){Object(O.a)(c,d);var n=Object(M.a)(c);function c(r){var a;Object(N.a)(this,c),a=n.call(this,r);var o=window.document;return a.node=o.createElement("div"),o.body.appendChild(a.node),a}return Object(g.a)(c,[{key:"render",value:function(){var a=this.props.children;return Object(T.createPortal)(a,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(y.a.Component)},MlIO:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.Base,y=M.WordArray,T=O.x64={},b=T.Word=m.extend({init:function(d,n){this.high=d,this.low=n}}),p=T.WordArray=m.extend({init:function(d,n){d=this.words=d||[],n!=g?this.sigBytes=n:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,n=d.length,c=[],r=0;r<n;r++){var a=d[r];c.push(a.high),c.push(a.low)}return y.create(c,this.sigBytes)},clone:function(){for(var d=m.clone.call(this),n=d.words=this.words.slice(0),c=n.length,r=0;r<c;r++)n[r]=n[r].clone();return d}})}(),N})},NFKh:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("MlIO"),j("F+F2"),j("qM6L"),j("ETIr"),j("wbyO"),j("cv67"),j("3y9D"),j("lPiR"),j("GRuw"),j("1uat"),j("uGsb"),j("5hvy"),j("ELcG"),j("WYAk"),j("e7zE"),j("K3mO"),j("OLod"),j("ALsQ"),j("9OqN"),j("qu8F"),j("S6kV"),j("gb/T"),j("qBft"),j("oRuE"),j("jO9C"),j("KmYQ"),j("uGxW"),j("bQjk"),j("wZgz"),j("pA7S"),j("w7YG"),j("E4JC"),j("PVpz"))})(this,function(N){return N})},NLgs:function(F,q,j){"use strict";j.d(q,"e",function(){return t}),j.d(q,"f",function(){return S}),j.d(q,"d",function(){return f}),j.d(q,"c",function(){return R}),j.d(q,"a",function(){return C}),j.d(q,"b",function(){return v});var N=j("miYZ"),g=j("tsqr"),O=j("9og8"),M=j("2qtc"),m=j("kLXV"),y=j("WmNS"),T=j.n(y),b=j("q1tI"),p=j.n(b),d=j("9kvl"),n=j("xKgJ"),c=j("1vsH"),r=j("RCxd"),a=j("yTi+"),o=j.n(a),u=j("1ZF9"),h=j.n(u),s=j("NoGO"),l=j.n(s),t=function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(S(E)&&x(w))},S=function(E){return Object(n.p)()?!0:(E({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},x=function(){var E,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,k=Object(d.c)()._store.getState(),I=k.user;return(E=I.userInfo)!==null&&E!==void 0&&E.profile_completed?!0:(m.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:w?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){d.d.push("/account/profile/edit")}}),!1)},f=function(){var E,w=Object(d.c)()._store.getState(),k=w.user;return(E=k.userInfo)!==null&&E!==void 0&&E.professional_certification?!0:(m.a.confirm({title:"\u63D0\u793A",centered:!0,content:p.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)},R=function(){return Object(n.a)()?!0:(m.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:p.a.createElement("div",{className:"tc",style:{marginLeft:-38}},p.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),p.a.createElement("img",{src:l.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},C=function(E,w){return E?!0:(m.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:p.a.createElement("div",null,p.a.createElement("p",null,w||"\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"),p.a.createElement("div",{style:{marginLeft:"110px"}},p.a.createElement("img",{src:h.a,width:200}),p.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)},v=function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",k=Object(d.c)()._store.getState(),I=k.shixunsDetail.detail;return(I==null?void 0:I.public)===2||(I==null?void 0:I.public)===1||(I==null?void 0:I.shixun_status)===3?(m.a.info({centered:!0,icon:p.a.createElement(r.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:p.a.createElement("div",{className:"tc",style:{marginLeft:-38}},p.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},p.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(I==null?void 0:I.public)===2?"\u5DF2\u516C\u5F00":(I==null?void 0:I.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",w,"\u3002"),p.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),p.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:o.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(I==null?void 0:I.shixun_status)===2?(m.a.confirm({centered:!0,icon:p.a.createElement(r.a,null),title:"\u63D0\u793A",content:p.a.createElement("div",null,p.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",w,"\u3002"),p.a.createElement("br",null),p.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:p.a.createElement(r.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 V=Object(O.a)(T.a.mark(function H(){var G;return T.a.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,E({type:"shixunsDetail/cancelRelease",payload:{id:I==null?void 0:I.identifier}});case 2:G=P.sent,G.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),E({type:"shixunsDetail/getShixunsDetail",payload:{id:I==null?void 0:I.identifier}}),E({type:"practiceSetting/getCommonData",payload:{id:I==null?void 0:I.identifier}}));case 4:case"end":return P.stop()}},H)}));function W(){return V.apply(this,arguments)}return W}()})}}),!0):!1}},NnUe:function(F,q,j){F.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(F,q,j){F.exports=j.p+"static/newqrcode.d852fdfc.png"},NvD2:function(F,q,j){"use strict";j.d(q,"a",function(){return y});var N=j("Kwbf");function g(T,b){var p=new Set;return T.forEach(function(d){b.has(d)||p.add(d)}),p}function O(T){var b=T||{},p=b.disabled,d=b.disableCheckbox,n=b.checkable;return!!(p||d)||n===!1}function M(T,b,p,d){for(var n=new Set(T),c=new Set,r=0;r<=p;r+=1){var a=b.get(r)||new Set;a.forEach(function(s){var l=s.key,t=s.node,S=s.children,x=S===void 0?[]:S;n.has(l)&&!d(t)&&x.filter(function(f){return!d(f.node)}).forEach(function(f){n.add(f.key)})})}for(var o=new Set,u=p;u>=0;u-=1){var h=b.get(u)||new Set;h.forEach(function(s){var l=s.parent,t=s.node;if(d(t)||!s.parent||o.has(s.parent.key))return;if(d(s.parent.node)){o.add(l.key);return}var S=!0,x=!1;(l.children||[]).filter(function(f){return!d(f.node)}).forEach(function(f){var R=f.key,C=n.has(R);S&&!C&&(S=!1),!x&&(C||c.has(R))&&(x=!0)}),S&&n.add(l.key),x&&c.add(l.key),o.add(l.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(g(c,n))}}function m(T,b,p,d,n){for(var c=new Set(T),r=new Set(b),a=0;a<=d;a+=1){var o=p.get(a)||new Set;o.forEach(function(l){var t=l.key,S=l.node,x=l.children,f=x===void 0?[]:x;!c.has(t)&&!r.has(t)&&!n(S)&&f.filter(function(R){return!n(R.node)}).forEach(function(R){c.delete(R.key)})})}r=new Set;for(var u=new Set,h=d;h>=0;h-=1){var s=p.get(h)||new Set;s.forEach(function(l){var t=l.parent,S=l.node;if(n(S)||!l.parent||u.has(l.parent.key))return;if(n(l.parent.node)){u.add(t.key);return}var x=!0,f=!1;(t.children||[]).filter(function(R){return!n(R.node)}).forEach(function(R){var C=R.key,v=c.has(C);x&&!v&&(x=!1),!f&&(v||r.has(C))&&(f=!0)}),x||c.delete(t.key),f&&r.add(t.key),u.add(t.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(r,c))}}function y(T,b,p,d){var n=[],c;d?c=d:c=O;var r=new Set(T.filter(function(h){var s=!!p[h];return s||n.push(h),s})),a=new Map,o=0;Object.keys(p).forEach(function(h){var s=p[h],l=s.level,t=a.get(l);t||(t=new Set,a.set(l,t)),t.add(s),o=Math.max(o,l)}),Object(N.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(h){return"'".concat(h,"'")}).join(", ")));var u;return b===!0?u=M(r,a,o,c):u=m(r,b.halfCheckedKeys,a,o,c),u}},OLod:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var O=N,M=O.lib,m=M.Base,y=M.WordArray,T=M.BufferedBlockAlgorithm,b=O.enc,p=b.Utf8,d=b.Base64,n=O.algo,c=n.EvpKDF,r=M.Cipher=T.extend({cfg:m.extend(),createEncryptor:function(E,w){return this.create(this._ENC_XFORM_MODE,E,w)},createDecryptor:function(E,w){return this.create(this._DEC_XFORM_MODE,E,w)},init:function(E,w,k){this.cfg=this.cfg.extend(k),this._xformMode=E,this._key=w,this.reset()},reset:function(){T.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var w=this._doFinalize();return w},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(w){return typeof w=="string"?_:R}return function(w){return{encrypt:function(k,I,L){return E(I).encrypt(w,k,I,L)},decrypt:function(k,I,L){return E(I).decrypt(w,k,I,L)}}}}()}),a=M.StreamCipher=r.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),o=O.mode={},u=M.BlockCipherMode=m.extend({createEncryptor:function(E,w){return this.Encryptor.create(E,w)},createDecryptor:function(E,w){return this.Decryptor.create(E,w)},init:function(E,w){this._cipher=E,this._iv=w}}),h=o.CBC=function(){var E=u.extend();E.Encryptor=E.extend({processBlock:function(k,I){var L=this._cipher,V=L.blockSize;w.call(this,k,I,V),L.encryptBlock(k,I),this._prevBlock=k.slice(I,I+V)}}),E.Decryptor=E.extend({processBlock:function(k,I){var L=this._cipher,V=L.blockSize,W=k.slice(I,I+V);L.decryptBlock(k,I),w.call(this,k,I,V),this._prevBlock=W}});function w(k,I,L){var V,W=this._iv;W?(V=W,this._iv=g):V=this._prevBlock;for(var H=0;H<L;H++)k[I+H]^=V[H]}return E}(),s=O.pad={},l=s.Pkcs7={pad:function(E,w){for(var k=w*4,I=k-E.sigBytes%k,L=I<<24|I<<16|I<<8|I,V=[],W=0;W<I;W+=4)V.push(L);var H=y.create(V,I);E.concat(H)},unpad:function(E){var w=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=w}},t=M.BlockCipher=r.extend({cfg:r.cfg.extend({mode:h,padding:l}),reset:function(){var E;r.reset.call(this);var w=this.cfg,k=w.iv,I=w.mode;this._xformMode==this._ENC_XFORM_MODE?E=I.createEncryptor:(E=I.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,k&&k.words):(this._mode=E.call(I,this,k&&k.words),this._mode.__creator=E)},_doProcessBlock:function(E,w){this._mode.processBlock(E,w)},_doFinalize:function(){var E,w=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(w.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),w.unpad(E)),E},blockSize:128/32}),S=M.CipherParams=m.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),x=O.format={},f=x.OpenSSL={stringify:function(E){var w,k=E.ciphertext,I=E.salt;return I?w=y.create([1398893684,1701076831]).concat(I).concat(k):w=k,w.toString(d)},parse:function(E){var w,k=d.parse(E),I=k.words;return I[0]==1398893684&&I[1]==1701076831&&(w=y.create(I.slice(2,4)),I.splice(0,4),k.sigBytes-=16),S.create({ciphertext:k,salt:w})}},R=M.SerializableCipher=m.extend({cfg:m.extend({format:f}),encrypt:function(E,w,k,I){I=this.cfg.extend(I);var L=E.createEncryptor(k,I),V=L.finalize(w),W=L.cfg;return S.create({ciphertext:V,key:k,iv:W.iv,algorithm:E,mode:W.mode,padding:W.padding,blockSize:E.blockSize,formatter:I.format})},decrypt:function(E,w,k,I){I=this.cfg.extend(I),w=this._parse(w,I.format);var L=E.createDecryptor(k,I).finalize(w.ciphertext);return L},_parse:function(E,w){return typeof E=="string"?w.parse(E,this):E}}),C=O.kdf={},v=C.OpenSSL={execute:function(E,w,k,I){I||(I=y.random(64/8));var L=c.create({keySize:w+k}).compute(E,I),V=y.create(L.words.slice(w),k*4);return L.sigBytes=w*4,S.create({key:L,iv:V,salt:I})}},_=M.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:v}),encrypt:function(E,w,k,I){I=this.cfg.extend(I);var L=I.kdf.execute(k,E.keySize,E.ivSize);I.iv=L.iv;var V=R.encrypt.call(this,E,w,L.key,I);return V.mixIn(L),V},decrypt:function(E,w,k,I){I=this.cfg.extend(I),w=this._parse(w,I.format);var L=I.kdf.execute(k,E.keySize,E.ivSize,w.salt);I.iv=L.iv;var V=R.decrypt.call(this,E,w,L.key,I);return V}})}()})},OZM5:function(F,q,j){"use strict";j.d(q,"b",function(){return d}),j.d(q,"a",function(){return n}),j.d(q,"k",function(){return c}),j.d(q,"h",function(){return r}),j.d(q,"i",function(){return a}),j.d(q,"g",function(){return o}),j.d(q,"c",function(){return u}),j.d(q,"d",function(){return h}),j.d(q,"j",function(){return t}),j.d(q,"e",function(){return S}),j.d(q,"f",function(){return x});var N=j("KQm4"),g=j("U8pU"),O=j("Ff2n"),M=j("q1tI"),m=j.n(M),y=j("Kwbf"),T=j("WaYH"),b=.25,p=2;function d(f,R){var C=f.slice(),v=C.indexOf(R);return v>=0&&C.splice(v,1),C}function n(f,R){var C=f.slice();return C.indexOf(R)===-1&&C.push(R),C}function c(f){return f.split("-")}function r(f,R){return"".concat(f,"-").concat(R)}function a(f){return f&&f.type&&f.type.isTreeNode}function o(f,R){var C=[f],v=R[f];function _(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(w){var k=w.key,I=w.children;C.push(k),_(I)})}return _(v.children),C}function u(f,R){var C=f.clientY,v=R.selectHandle.getBoundingClientRect(),_=v.top,E=v.bottom,w=v.height,k=Math.max(w*b,p);return C<=_+k?-1:C>=E-k?1:0}function h(f,R){if(!f)return;var C=R.multiple;return C?f.slice():f.length?[f[0]]:f}var s=function(R){return R};function l(f,R){if(!f)return[];var C=R||{},v=C.processProps,_=v===void 0?s:v,E=Array.isArray(f)?f:[f];return E.map(function(w){var k=w.children,I=Object(O.a)(w,["children"]),L=l(k,R);return m.a.createElement(T.a,Object.assign({},_(I)),L)})}function t(f){if(!f)return null;var R;if(Array.isArray(f))R={checkedKeys:f,halfCheckedKeys:void 0};else if(Object(g.a)(f)==="object")R={checkedKeys:f.checked||void 0,halfCheckedKeys:f.halfChecked||void 0};else return Object(y.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function S(f,R){var C=new Set;function v(_){if(C.has(_))return;var E=R[_];if(!E)return;C.add(_);var w=E.parent,k=E.node;if(k.disabled)return;w&&v(w.key)}return(f||[]).forEach(function(_){v(_)}),Object(N.a)(C)}function x(f){var R={};return Object.keys(f).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(R[C]=f[C])}),R}},Ot1p:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("rAM+"),M=j("miYZ"),m=j("tsqr"),y=j("9og8"),T=j("tJVT"),b=j("jrin"),p=j("WmNS"),d=j.n(p),n=j("q1tI"),c=j.n(n),r=j("VrN/"),a=j.n(r),o=j("bdgK"),u=j("p77/"),h=j("Bd2K"),s=j("ELLl"),l=j("19Vz"),t=j("lZu9"),S=j("+NIl"),x=j("kSUc"),f=j("9Bee"),R=function(He){var tt=He.value,vt=tt===void 0?"":tt,yt=He.className,Wt=He.showTextOnly,Ht=He.showLines,cr=He.style,dr=cr===void 0?{}:cr,St=Object(n.useMemo)(function(){return""},[vt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:St}}))},C=j("0Owb"),v=j("dejd"),_=j("C+DQ"),E=j("1vsH"),w=j("m3rI"),k=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function I(He){var tt=He.onActionCallback,vt=He.title,yt=He.icon,Wt=He.actionName,Ht=He.className,cr=Ht===void 0?"":Ht,dr=He.children;function St(){tt(Wt)}return c.a.createElement("a",{title:vt,className:cr,onClick:St},c.a.createElement("i",{className:"md-iconfont ".concat(yt)}),dr)}var L=function(He){var tt=He.watch,vt=He.showNullButton,yt=He.onActionCallback,Wt=He.fullScreen,Ht=He.insertTemp,cr=He.hidetoolBar,dr=He.uuid,St=He.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(E.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(E.F)("_educoder_session"),"&key=").concat(dr,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var Kr=[].concat(k,[{title:"".concat(tt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(tt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!cr&&Kr.map(function(Vr,Yr){return c.a.createElement("li",{key:Yr},Vr.actionName?c.a.createElement(I,Object(C.a)({},Vr,{onActionCallback:yt})):c.a.createElement("span",{className:"v-line"}))}),vt?c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:yt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ht&&c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ht),onActionCallback:yt},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(I,{icon:"".concat(Wt?"icon-shrink":"icon-enlarge"),title:Wt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yt})))},V=j("M8RZ"),W=j("+L6B"),H=j("2/Rp"),G=j("y8nQ"),B=j("Vl3Y"),P=j("5NDa"),z=j("5rEg"),J={labelCol:{span:4},wrapperCol:{span:20}},ue=function(He){var tt=He.callback,vt=He.onCancel;function yt(Wt){tt(Wt)}return c.a.createElement(B.a,Object(C.a)({},J,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:yt}),c.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(z.a,null)),c.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(z.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(H.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},de=j("7ahc"),Se=j("HmJG"),Ae=j("BjJ7"),pe=B.a.useForm,Oe={width:280,marginRight:10},ye={labelCol:{span:5},wrapperCol:{span:19}},ce=function(He){var tt=He.callback,vt=He.onCancel,yt=pe(),Wt=Object(T.a)(yt,1),Ht=Wt[0];function cr(Kr){tt(Kr)}function dr(Kr,Vr){if(Kr.status===-1){m.b.error(Kr.message);return}Ht.setFieldsValue({src:"/api/attachments/".concat(Kr.id),type:Vr.type})}function St(Kr){var Vr=Kr.target.files[0];re(Vr,dr)}return c.a.createElement(B.a,Object(C.a)({form:Ht},ye,{className:"upload-image-panel",onFinish:cr}),c.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},c.a.createElement(z.a,{style:Oe})),c.a.createElement(ae,{onFileChange:St}))),c.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(z.a,{style:{width:264}})),c.a.createElement(B.a.Item,{style:{textAlign:"right"}},c.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(H.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))};function ae(He){var tt=He.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:tt}))}function re(He,tt){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 yt=new window.XMLHttpRequest;yt.withCredentials=!0,yt.addEventListener("load",function(Wt){tt(JSON.parse(Wt.target.responseText),He)},!1),yt.addEventListener("error",function(Wt){console.error(Wt)},!1),yt.open("POST","".concat(Ae.a,"/api/attachments.json")),yt.send(vt)}var fe=j("giR+"),te=j("fyUT"),ne=j("7Kak"),Te=j("9yH6"),ie=Te.a.Group,Z={margin:"0 8px"},X=function(He){var tt=He.callback,vt=He.onCancel;function yt(Wt){tt(Wt)}return c.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:yt},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:Z},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:Z},"\u884C\u6570"),c.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(te.a,null)),c.a.createElement("span",{style:Z},"\u5217\u6570"),c.a.createElement(B.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:Z},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(B.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(Te.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Te.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Te.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Te.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(H.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},Q=j("ErOA"),_e=j("7Cbv"),ve="link",Re="upload-image",Je="code-block",qe="add-table",rt="------------",ut={default:rt,left:":".concat(rt),center:":".concat(rt,":"),right:"".concat(rt,":")},dt=j("9VGf"),ft,Be;function Ie(){}var at=0,ct=1e4,$e="\u2581",st=`
**\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 Ue(He){return/^\d+$/.test(He)?"".concat(He,"px"):He}var Le=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Le?"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"],Ce=(ft={},Object(b.a)(ft,Me+"-B","bold"),Object(b.a)(ft,Me+"-I","italic"),ft),ke=(Be={},Object(b.a)(Be,ve,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Be,Je,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Be,Re,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Be,qe,"\u6DFB\u52A0\u8868\u683C"),Be),Ne=q.a=function(He){var tt=He.defaultValue,vt=tt===void 0?"":tt,yt=He.onChange,Wt=He.width,Ht=Wt===void 0?"100%":Wt,cr=He.height,dr=cr===void 0?400:cr,St=He.miniToolbar,Kr=St===void 0?!1:St,Vr=He.isFocus,Yr=Vr===void 0?!1:Vr,vn=He.watch,Or=He.insertTemp,dn=He.mode,hn=dn===void 0?"markdown":dn,Tt=He.id,gr=Tt===void 0?"markdown-editor-id":Tt,Br=He.showResizeBar,zr=Br===void 0?!1:Br,an=He.noStorage,gi=an===void 0?!1:an,Ei=He.showNullButton,bn=Ei===void 0?!1:Ei,lr=He.hidetoolBar,Yn=lr===void 0?!1:lr,ci=He.fullScreen,Hn=ci===void 0?!1:ci,qr=He.onBlur,Un=He.onCMBeforeChange,di=He.onFullScreen,vi=He.className,Ut=vi===void 0?"":vi,_r=He.disablePaste,hi=_r===void 0?!1:_r,xi=He.placeholder,Di=xi===void 0?"":xi,wi=He.values,le=wi===void 0?"":wi,K=Object(n.useState)(null),Y=Object(T.a)(K,2),ee=Y[0],ge=Y[1],se=Object(n.useState)(vt),Ke=Object(T.a)(se,2),Ct=Ke[0],Xt=Ke[1],Er=Object(n.useState)(vn),Pt=Object(T.a)(Er,2),Lr=Pt[0],Gr=Pt[1],_n=Object(n.useState)(Hn),Zn=Object(T.a)(_n,2),qn=Zn[0],Nn=Zn[1],Ni=Object(n.useState)(""),Gi=Object(T.a)(Ni,2),Wn=Gi[0],Ti=Gi[1],Ki=Object(n.useState)(0),ki=Object(T.a)(Ki,2),ni=ki[0],ea=ki[1],Vi=Object(n.useState)(dr),ta=Object(T.a)(Vi,2),oa=ta[0],Li=ta[1],$n=Object(n.useState)(!1),ji=Object(T.a)($n,2),ha=ji[0],xt=ji[1],et=Object(n.useRef)(Object(_e.a)()),mt=Object(n.useRef)(!1),wt=Object(n.useRef)(),Lt=Object(n.useRef)(),Dt=Object(n.useRef)(),Kt=Object(n.useRef)(),zt=Object(n.useRef)(),ht=function(){var _t=Object(y.a)(d.a.mark(function It(){var Et,Nt;return d.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return pr.next=2,Object(Q.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:et.current}});case 2:Nt=pr.sent,Nt!=null&&(Et=Nt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",ee,Lt),Nt.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(w.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):er.content_type.indexOf("pdf")>-1?ee.replaceSelection('<a href="'.concat(w.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(w.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,")"))}));case 4:case"end":return pr.stop()}},It)}));return function(){return _t.apply(this,arguments)}}();Object(n.useEffect)(function(){Xt(le),ee==null||ee.setValue(le)},[le]),Object(n.useEffect)(function(){di==null||di(qn)},[qn]),Object(n.useEffect)(function(){if(Lt.current){var _t=a.a.fromTextArea(Lt.current,{mode:hn,lineNumbers:!Kr,lineWrapping:!0,value:vt,autoCloseTags:!0,autoCloseBrackets:!0});Yr&&_t.focus();function It(Et,Nt){if(hi){Nt.preventDefault();return}var qt=Nt.clipboardData;if(qt){var pr=qt.types.toString(),er=qt.items;if(pr==="Files"||qt.types.indexOf("Files")>-1){if(Nt.preventDefault(),hn=="stex")return;try{var Rr,Ur=er[1];((Rr=er[0])===null||Rr===void 0?void 0:Rr.kind)==="file"&&(Ur=er[0]);var br=Ur.getAsFile(),it=br.name.split(".").pop();re(br,function(Gt){if(Gt.id){var ln,en,mr;(br==null||((ln=br.type)===null||ln===void 0)?void 0:ln.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(br==null||((en=br.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,'"></video>')):(br==null||((mr=br.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(br.type,'&disposition=inline" target="_blank">').concat(br.name,"</a>")):Ee.includes(it)?_t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,'?type=office&disposition=inline" target="_blank">').concat(br.name,"</a>")):_t.replaceSelection("[".concat(br.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})}catch(Gt){m.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return _t.on("paste",It),_t.on("dragleave",function(Et,Nt){Dt.current.classList.remove("mouse-hover-md")}),_t.on("dragover",function(Et,Nt){Dt.current.classList.add("mouse-hover-md")}),_t.on("drop",function(Et,Nt){Dt.current.classList.add("mouse-hover-md");var qt;if(qt=Nt.dataTransfer.files,qt.length>0){Nt.preventDefault(),Nt.stopPropagation();for(var pr=function(Ur){var br=qt[Ur],it=br.name.split(".").pop();re(br,function(Gt){if(Gt.id){var ln,en,mr;(br==null||((ln=br.type)===null||ln===void 0)?void 0:ln.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(br==null||((en=br.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,'"></video>')):(br==null||((mr=br.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(br.type,'&disposition=inline" target="_blank">').concat(br.name,"</a>")):Ee.includes(it)?_t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,'?type=office&disposition=inline" target="_blank">').concat(br.name,"</a>")):_t.replaceSelection("[".concat(br.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})},er=0;er<qt.length;er++)pr(er)}}),ge(_t),function(){_t.off("paste",It)}}},[]);var Ot=Object(n.useCallback)(function(){if(Dt.current)try{}catch(_t){console.log(_t,"---- to set md editor body height")}},[oa,Dt,qn]);Object(n.useEffect)(function(){function _t(){var Et=new o.default(function(Nt){var qt=Object(O.a)(Nt),pr;try{for(qt.s();!(pr=qt.n()).done;){var er=pr.value;(er.target.offsetHeight>0||er.target.offsetWidth>0)&&(Ot(),ee.setSize("100%","100%"),ee.refresh())}}catch(Rr){qt.e(Rr)}finally{qt.f()}});return Et.observe(Lt.current.parentElement),Et}if(ee){var It=_t();return function(){It.unobserve(Lt.current.parentElement)}}},[ee,Ot]),Object(n.useEffect)(function(){if(ee){for(var _t=[],It=function(){var er=Nt[Et];qt=Object(T.a)(er,2);var Rr=qt[0],Ur=qt[1],br=Object(b.a)({},Rr,function(){Rt(Ur)});_t.push(br),ee.addKeyMap(br)},Et=0,Nt=Object.entries(Ce);Et<Nt.length;Et++){var qt;It()}return wt.current=setInterval(function(){mt.current&&ht()},4e3),function(){clearInterval(wt.current);var pr=Object(O.a)(_t),er;try{for(pr.s();!(er=pr.n()).done;){var Rr=er.value;ee.removeKeyMap(Rr)}}catch(Ur){pr.e(Ur)}finally{pr.f()}}}},[ee]),Object(n.useEffect)(function(){Hn!==qn&&Nn(Hn)},[Hn]),Object(dt.a)(function(){if(!gi&&ni>0){var _t=new Date().getTime(),It=window.sessionStorage.getItem(gr);_t>=ni+ct&&(!It||It!==Ct)&&(window.sessionStorage.setItem(gr,Ct),xt(!0))}},ct),Object(n.useEffect)(function(){Gr(vn)},[ee,vn]),Object(n.useEffect)(function(){ee&&(Yr&&ee.focus())},[ee,Yr]),Object(n.useEffect)(function(){if(Lr&&ee){var _t=ee.getScrollerElement();function It(Et){var Nt=Et.target;if(zt.current){var qt=Nt.scrollTop/Nt.scrollHeight;zt.current.scrollTop=zt.current.scrollHeight*qt}}return _t.addEventListener("scroll",It),function(){_t.removeEventListener("scroll",It)}}},[ee,Lr]),Object(n.useEffect)(function(){if(ee&&Un){function _t(It,Et){Un(It,Et)}return ee.on("beforeChange",_t),function(){ee.off("beforeChange",_t)}}},[ee,Un]),Object(n.useEffect)(function(){if(ee&&qr){function _t(){qr(ee.getValue())}return ee.on("blur",_t),function(){ee.off("blur",_t)}}},[ee,qr]),Object(n.useEffect)(function(){if(ee){function _t(It){var Et=It.getValue();Xt(Et),ea(new Date().getTime()),It.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),yt&&yt(Et)}return ee.on("change",_t),function(){ee.off("change",_t)}}},[ee,yt]),Object(n.useEffect)(function(){ee&&(vt==null?(ee.setValue(""),Xt("")):vt!==ee.getValue()&&(ee.setValue(vt),Xt(vt),ee.setCursor(ee.lineCount(),0)))},[ee,vt]);var Rt=Object(n.useCallback)(function(_t){var It=ee.getCursor(),Et=ee.getSelection(),Nt=Et.split(`
`);switch(_t){case"bold":return ee.replaceSelection("**"+Et+"**"),Et===""&&ee.setCursor(It.line,It.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Et+"*"),Et===""&&ee.setCursor(It.line,It.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Et+"`"),Et===""&&ee.setCursor(It.line,It.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Et+"$$`"),Et===""&&ee.setCursor(It.line,It.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Et+"\n```"),ee.setCursor(It.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(Nt.map(function(qt){return qt===""?"":"- ".concat(qt)}).join(`
`)),ee.focus();case"list-ol":return Et===""?ee.replaceSelection("1. "+Et):ee.replaceSelection(Nt.map(function(qt,pr){return qt===""?"":"".concat(pr+1,". ").concat(qt)}).join(`
`)),ee.focus();case"add-null-ch":return Et===""&&ee.setCursor(It.line,It.ch+1),ee.replaceSelection($e),ee.focus();case"inster-template-1":return Et===""&&ee.setCursor(It.line,It.ch),ee.replaceSelection(st),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Gr(!Lr),ee.focus();case"trigger-full-screen":return Nn(!qn),ee.focus();case ve:Ti(ve);return;case Je:Ti(Je);return;case Re:Ti(Re);return;case qe:Ti(qe);return;default:throw new Error}},[ee,Lr,qn]),ur=Object(n.useCallback)(function(_t){Ti("");switch(Wn){case ve:var It=_t.title,Et=_t.link;return ee.replaceSelection("[".concat(It,"](").concat(Et,")")),ee.focus();case Je:var Nt=_t.language,qt=_t.content;return ee.replaceSelection(["```"+Nt,qt,"```"].join(`
`)),ee.focus();case Re:var pr=_t.src,er=_t.alt;return er?ee.replaceSelection("![ ".concat(er," ]( ").concat(pr,' "').concat(er,'" )')):ee.replaceSelection("![,](".concat(pr,")")),ee.focus();case qe:for(var Rr=_t.row,Ur=_t.col,br=_t.align,it=`
`,Gt=0;Gt<Rr;Gt++){for(var ln=[],en=[],mr=0;mr<Ur;mr++)Gt===1&&en.push(ut[br]),ln.push(" ");Gt===1&&(it+="| ".concat(en.join(" | "),` |
`)),it+="| ".concat(ln.join(Ur===1?"":" | "),` |
`)}return ee.replaceSelection(it+`
`),ee.focus();default:throw new Error}},[ee,Wn]),ar=Object(n.useMemo)(function(){switch(Wn){case ve:return c.a.createElement(ue,{callback:ur,onCancel:Zt});case Je:return c.a.createElement(de.b,{callback:ur,onCancel:Zt});case Re:return c.a.createElement(ce,{callback:ur,onCancel:Zt});case qe:return c.a.createElement(X,{callback:ur,onCancel:Zt});default:return null}},[Wn]);function Zt(){Ti("")}Object(n.useEffect)(function(){if(Kt.current){var _t=Kt.current,It=!1,Et=0;function Nt(er){It=!0,Et=er.pageY}function qt(){It=!1}function pr(er){if(It){var Rr=er.pageY-Et;Rr<0&&(Rr=0),Rr>300&&(Rr=300);var Ur=dr+Rr+"px";Li(Ur)}}return _t.addEventListener("mousedown",Nt),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",qt),function(){_t.removeEventListener("mousedown",Nt),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",qt)}}},[ee,Kt]),Object(n.useEffect)(function(){Li(dr)},[dr]);var $t=Ue(Ht),rr=Ue(oa),sr={width:$t,height:rr},ot=Object(n.useMemo)(function(){if(ni){var _t=new Date(ni),It=_t.getHours(),Et=_t.getMinutes(),Nt=_t.getSeconds();return It=It<10?"0"+It:It,Et=Et<10?"0"+Et:Et,Nt=Nt<10?"0"+Nt:Nt,"".concat(It,":").concat(Et,":").concat(Nt)}return 0},[ni]);function Ar(){window.sessionStorage.removeItem(gr),xt(!1),ea(0)}function Nr(){xt(!1),ea(0),ee.setValue(window.sessionStorage.getItem(gr))}function fr(_t,It){var Et=ee.getValue();Et=Et.replace(_t,It),Xt(Et),ee==null||ee.setValue(Et)}return c.a.createElement(n.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dt},c.a.createElement("div",{className:"markdown-editor-container ".concat(Ut," ").concat(Lr?"on-preview":""," ").concat(Kr?"mini":""," ").concat(qn?"full-screen":""),style:sr},c.a.createElement(L,{insertTemp:Or,watch:Lr,fullScreen:qn,showNullButton:bn,onActionCallback:Rt,hidetoolBar:Yn,uuid:et.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})),Lr?c.a.createElement("div",{ref:zt,className:"preview-container"},hn==="stex"&&c.a.createElement(R,{value:Ct}),hn!=="stex"&&c.a.createElement(f.a,{edit:!0,value:Ct,replaces:fr})):null))),zr?c.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,c.a.createElement(V.a,null,ke[Wn]?c.a.createElement(g.a,{centered:!0,title:ke[Wn],visible:!0,onCancel:Zt,footer:null,className:"markdown-popup-form"},ar):null))}},PVpz:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.StreamCipher,m=g.algo,y=[],T=[],b=[],p=m.RabbitLegacy=M.extend({_doReset:function(){var n=this._key.words,c=this.cfg.iv,r=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],a=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)a[o]^=r[o+4&7];if(c){var u=c.words,h=u[0],s=u[1],l=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,t=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,S=l>>>16|t&4294901760,x=t<<16|l&65535;a[0]^=l,a[1]^=S,a[2]^=t,a[3]^=x,a[4]^=l,a[5]^=S,a[6]^=t,a[7]^=x;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(n,c){var r=this._X;d.call(this),y[0]=r[0]^r[5]>>>16^r[3]<<16,y[1]=r[2]^r[7]>>>16^r[5]<<16,y[2]=r[4]^r[1]>>>16^r[7]<<16,y[3]=r[6]^r[3]>>>16^r[1]<<16;for(var a=0;a<4;a++)y[a]=(y[a]<<8|y[a]>>>24)&16711935|(y[a]<<24|y[a]>>>8)&4278255360,n[c+a]^=y[a]},blockSize:128/32,ivSize:64/32});function d(){for(var n=this._X,c=this._C,r=0;r<8;r++)T[r]=c[r];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 r=0;r<8;r++){var a=n[r]+c[r],o=a&65535,u=a>>>16,h=((o*o>>>17)+o*u>>>15)+u*u,s=((a&4294901760)*a|0)+((a&65535)*a|0);b[r]=h^s}n[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,n[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,n[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,n[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,n[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,n[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,n[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,n[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.RabbitLegacy=M._createHelper(p)}(),N.RabbitLegacy})},RxwV:function(F,q,j){"use strict";var N=j("q1tI"),g=j("uciX"),O=j("2W6z"),M=j.n(O),m=j("4IlW"),y=j("uK0f"),T=j.n(y);function b(Oe,ye){if(Oe===ye)return!0;if(!Oe||!ye)return!1;var ce=Oe.length;if(ye.length!==ce)return!1;for(var ae=0;ae<ce;ae++)if(Oe[ae]!==ye[ae])return!1;return!0}function p(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(ce){return typeof ce}:p=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},p(Oe)}function d(Oe,ye){if(!(Oe instanceof ye))throw new TypeError("Cannot call a class as a function")}function n(Oe,ye){for(var ce=0;ce<ye.length;ce++){var ae=ye[ce];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(Oe,ae.key,ae)}}function c(Oe,ye,ce){return ye&&n(Oe.prototype,ye),ce&&n(Oe,ce),Oe}function r(Oe,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(ye&&ye.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),ye&&a(Oe,ye)}function a(Oe,ye){return a=Object.setPrototypeOf||function(ae,re){return ae.__proto__=re,ae},a(Oe,ye)}function o(Oe){var ye=s();return function(){var ce=l(Oe),ae;if(ye){var re=l(this).constructor;ae=Reflect.construct(ce,arguments,re)}else ae=ce.apply(this,arguments);return u(this,ae)}}function u(Oe,ye){return ye&&(p(ye)==="object"||typeof ye=="function")?ye:h(Oe)}function h(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function s(){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 l(Oe){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(ce){return ce.__proto__||Object.getPrototypeOf(ce)},l(Oe)}var t=function(){var Oe=function(ye){r(ae,ye);var ce=o(ae);function ae(){var re;return d(this,ae),re=ce.apply(this,arguments),re.menuItems={},re.saveMenuItem=function(fe){return function(te){re.menuItems[fe]=te}},re}return c(ae,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(fe){!fe.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(fe){var te=this.props,ne=te.fieldNames,Te=te.defaultFieldNames;return ne[fe]||Te[fe]}},{key:"getOption",value:function(fe,te){var ne=this.props,Te=ne.prefixCls,ie=ne.expandTrigger,Z=ne.expandIcon,X=ne.loadingIcon,Q=this.props.onSelect.bind(this,fe,te),_e=this.props.onItemDoubleClick.bind(this,fe,te),ve={onClick:Q,onDoubleClick:_e},Re="".concat(Te,"-menu-item"),Je=null,qe=fe[this.getFieldName("children")]&&fe[this.getFieldName("children")].length>0;(qe||fe.isLeaf===!1)&&(Re+=" ".concat(Te,"-menu-item-expand"),fe.loading||(Je=N.createElement("span",{className:"".concat(Te,"-menu-item-expand-icon")},Z))),ie==="hover"&&(qe||fe.isLeaf===!1)&&(ve={onMouseEnter:this.delayOnSelect.bind(this,Q),onMouseLeave:this.delayOnSelect.bind(this),onClick:Q}),this.isActiveOption(fe,te)&&(Re+=" ".concat(Te,"-menu-item-active"),ve.ref=this.saveMenuItem(te)),fe.disabled&&(Re+=" ".concat(Te,"-menu-item-disabled"));var rt=null;fe.loading&&(Re+=" ".concat(Te,"-menu-item-loading"),rt=X||null);var ut="";return"title"in fe?ut=fe.title:typeof fe[this.getFieldName("label")]=="string"&&(ut=fe[this.getFieldName("label")]),N.createElement("li",Object.assign({key:fe[this.getFieldName("value")],className:Re,title:ut},ve,{role:"menuitem",onMouseDown:function(ft){return ft.preventDefault()}}),fe[this.getFieldName("label")],Je,rt)}},{key:"getActiveOptions",value:function(fe){var te=this,ne=this.props.options,Te=fe||this.props.activeValue;return T()(ne,function(ie,Z){return ie[te.getFieldName("value")]===Te[Z]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var fe=this,te=this.props.options,ne=this.getActiveOptions().map(function(Te){return Te[fe.getFieldName("children")]}).filter(function(Te){return!!Te});return ne.unshift(te),ne}},{key:"delayOnSelect",value:function(fe){for(var te=this,ne=arguments.length,Te=new Array(ne>1?ne-1:0),ie=1;ie<ne;ie++)Te[ie-1]=arguments[ie];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof fe=="function"&&(this.delayTimer=window.setTimeout(function(){fe(Te),te.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var fe=this.getShowOptions().length,te=0;te<fe;te++){var ne=this.menuItems[te];ne&&ne.parentElement&&(ne.parentElement.scrollTop=ne.offsetTop)}}},{key:"isActiveOption",value:function(fe,te){var ne=this.props.activeValue,Te=ne===void 0?[]:ne;return Te[te]===fe[this.getFieldName("value")]}},{key:"render",value:function(){var fe=this,te=this.props,ne=te.prefixCls,Te=te.dropdownMenuColumnStyle;return N.createElement("div",null,this.getShowOptions().map(function(ie,Z){return N.createElement("ul",{className:"".concat(ne,"-menu"),key:Z,style:Te},ie.map(function(X){return fe.getOption(X,Z)}))}))}}]),ae}(N.Component);return Oe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Oe}(),S=t,x={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},f=x;function R(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(ce){return typeof ce}:R=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},R(Oe)}function C(Oe,ye){if(Oe==null)return{};var ce=v(Oe,ye),ae,re;if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(Oe);for(re=0;re<fe.length;re++){if(ae=fe[re],ye.indexOf(ae)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Oe,ae))continue;ce[ae]=Oe[ae]}}return ce}function v(Oe,ye){if(Oe==null)return{};var ce={},ae=Object.keys(Oe),re,fe;for(fe=0;fe<ae.length;fe++){if(re=ae[fe],ye.indexOf(re)>=0)continue;ce[re]=Oe[re]}return ce}function _(Oe){return I(Oe)||k(Oe)||w(Oe)||E()}function E(){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 w(Oe,ye){if(!Oe)return;if(typeof Oe=="string")return L(Oe,ye);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,ye)}function k(Oe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Oe))return Array.from(Oe)}function I(Oe){if(Array.isArray(Oe))return L(Oe)}function L(Oe,ye){(ye==null||ye>Oe.length)&&(ye=Oe.length);for(var ce=0,ae=new Array(ye);ce<ye;ce++)ae[ce]=Oe[ce];return ae}function V(Oe,ye){if(!(Oe instanceof ye))throw new TypeError("Cannot call a class as a function")}function W(Oe,ye){for(var ce=0;ce<ye.length;ce++){var ae=ye[ce];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(Oe,ae.key,ae)}}function H(Oe,ye,ce){return ye&&W(Oe.prototype,ye),ce&&W(Oe,ce),Oe}function G(Oe,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(ye&&ye.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),ye&&B(Oe,ye)}function B(Oe,ye){return B=Object.setPrototypeOf||function(ae,re){return ae.__proto__=re,ae},B(Oe,ye)}function P(Oe){var ye=ue();return function(){var ce=de(Oe),ae;if(ye){var re=de(this).constructor;ae=Reflect.construct(ce,arguments,re)}else ae=ce.apply(this,arguments);return z(this,ae)}}function z(Oe,ye){return ye&&(R(ye)==="object"||typeof ye=="function")?ye:J(Oe)}function J(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 Se=function(){var Oe=function(ye){G(ae,ye);var ce=P(ae);function ae(re){var fe;V(this,ae),fe=ce.call(this,re),fe.setPopupVisible=function(ne){var Te=fe.state.value;"popupVisible"in fe.props||fe.setState({popupVisible:ne}),ne&&!fe.state.popupVisible&&fe.setState({activeValue:Te}),fe.props.onPopupVisibleChange(ne)},fe.handleChange=function(ne,Te,ie){var Z=Te.visible;(ie.type!=="keydown"||ie.keyCode===m.a.ENTER)&&(fe.props.onChange(ne.map(function(X){return X[fe.getFieldName("value")]}),ne),fe.setPopupVisible(Z))},fe.handlePopupVisibleChange=function(ne){fe.setPopupVisible(ne)},fe.handleMenuSelect=function(ne,Te,ie){var Z=fe.trigger.getRootDomNode();Z&&Z.focus&&Z.focus();var X=fe.props,Q=X.changeOnSelect,_e=X.loadData,ve=X.expandTrigger;if(!ne||ne.disabled)return;var Re=fe.state.activeValue;Re=Re.slice(0,Te+1),Re[Te]=ne[fe.getFieldName("value")];var Je=fe.getActiveOptions(Re);if(ne.isLeaf===!1&&!ne[fe.getFieldName("children")]&&_e){Q&&fe.handleChange(Je,{visible:!0},ie),fe.setState({activeValue:Re}),_e(Je);return}var qe={};!ne[fe.getFieldName("children")]||!ne[fe.getFieldName("children")].length?(fe.handleChange(Je,{visible:!1},ie),qe.value=Re):Q&&(ie.type==="click"||ie.type==="keydown")&&(ve==="hover"?fe.handleChange(Je,{visible:!1},ie):fe.handleChange(Je,{visible:!0},ie),qe.value=Re),qe.activeValue=Re,("value"in fe.props||ie.type==="keydown"&&ie.keyCode!==m.a.ENTER)&&delete qe.value,fe.setState(qe)},fe.handleItemDoubleClick=function(){var ne=fe.props.changeOnSelect;ne&&fe.setPopupVisible(!1)},fe.handleKeyDown=function(ne){var Te=fe.props.children;if(Te&&Te.props.onKeyDown){Te.props.onKeyDown(ne);return}var ie=_(fe.state.activeValue),Z=ie.length-1<0?0:ie.length-1,X=fe.getCurrentLevelOptions(),Q=X.map(function(Je){return Je[fe.getFieldName("value")]}).indexOf(ie[Z]);if(ne.keyCode!==m.a.DOWN&&ne.keyCode!==m.a.UP&&ne.keyCode!==m.a.LEFT&&ne.keyCode!==m.a.RIGHT&&ne.keyCode!==m.a.ENTER&&ne.keyCode!==m.a.SPACE&&ne.keyCode!==m.a.BACKSPACE&&ne.keyCode!==m.a.ESC&&ne.keyCode!==m.a.TAB)return;if(!fe.state.popupVisible&&ne.keyCode!==m.a.BACKSPACE&&ne.keyCode!==m.a.LEFT&&ne.keyCode!==m.a.RIGHT&&ne.keyCode!==m.a.ESC&&ne.keyCode!==m.a.TAB){fe.setPopupVisible(!0);return}if(ne.keyCode===m.a.DOWN||ne.keyCode===m.a.UP){ne.preventDefault();var _e=Q;_e!==-1?ne.keyCode===m.a.DOWN?(_e+=1,_e=_e>=X.length?0:_e):(_e-=1,_e=_e<0?X.length-1:_e):_e=0,ie[Z]=X[_e][fe.getFieldName("value")]}else if(ne.keyCode===m.a.LEFT||ne.keyCode===m.a.BACKSPACE)ne.preventDefault(),ie.splice(ie.length-1,1);else if(ne.keyCode===m.a.RIGHT)ne.preventDefault(),X[Q]&&X[Q][fe.getFieldName("children")]&&ie.push(X[Q][fe.getFieldName("children")][0][fe.getFieldName("value")]);else if(ne.keyCode===m.a.ESC||ne.keyCode===m.a.TAB){fe.setPopupVisible(!1);return}(!ie||ie.length===0)&&fe.setPopupVisible(!1);var ve=fe.getActiveOptions(ie),Re=ve[ve.length-1];fe.handleMenuSelect(Re,ve.length-1,ne),fe.props.onKeyDown&&fe.props.onKeyDown(ne)},fe.saveTrigger=function(ne){fe.trigger=ne};var te=[];return"value"in re?te=re.value||[]:"defaultValue"in re&&(te=re.defaultValue||[]),M()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),fe.state={popupVisible:re.popupVisible,activeValue:te,value:te,prevProps:re},fe.defaultFieldNames={label:"label",value:"value",children:"children"},fe}return H(ae,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(fe){var te=this.defaultFieldNames,ne=this.props,Te=ne.fieldNames,ie=ne.filedNames;return"filedNames"in this.props?ie[fe]||te[fe]:Te[fe]||te[fe]}},{key:"getFieldNames",value:function(){var fe=this.props,te=fe.fieldNames,ne=fe.filedNames;return"filedNames"in this.props?ne:te}},{key:"getCurrentLevelOptions",value:function(){var fe=this,te=this.props.options,ne=te===void 0?[]:te,Te=this.state.activeValue,ie=Te===void 0?[]:Te,Z=T()(ne,function(X,Q){return X[fe.getFieldName("value")]===ie[Q]},{childrenKeyName:this.getFieldName("children")});return Z[Z.length-2]?Z[Z.length-2][this.getFieldName("children")]:_(ne).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(fe){var te=this;return T()(this.props.options||[],function(ne,Te){return ne[te.getFieldName("value")]===fe[Te]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var fe=this.props,te=fe.prefixCls,ne=fe.transitionName,Te=fe.popupClassName,ie=fe.options,Z=ie===void 0?[]:ie,X=fe.disabled,Q=fe.builtinPlacements,_e=fe.popupPlacement,ve=fe.children,Re=fe.dropdownRender,Je=C(fe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),qe=N.createElement("div",null),rt="";Z&&Z.length>0?qe=N.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):rt=" ".concat(te,"-menus-empty");var ut=qe;return Re&&(ut=Re(qe)),N.createElement(g.a,Object.assign({ref:this.saveTrigger},Je,{popupPlacement:_e,builtinPlacements:Q,popupTransitionName:ne,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(te,"-menus"),popupClassName:Te+rt,popup:ut}),N.cloneElement(ve,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(fe,te){var ne=te.prevProps,Te=ne===void 0?{}:ne,ie={prevProps:fe};return"value"in fe&&!b(Te.value,fe.value)&&(ie.value=fe.value||[],"loadData"in fe||(ie.activeValue=fe.value||[])),"popupVisible"in fe&&(ie.popupVisible=fe.popupVisible),ie}}]),ae}(N.Component);return Oe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:f,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Oe}(),Ae=Se,pe=q.a=Ae},S6kV:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.OFB=function(){var g=N.lib.BlockCipherMode.extend(),O=g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,T=y.blockSize,b=this._iv,p=this._keystream;b&&(p=this._keystream=b.slice(0),this._iv=void 0),y.encryptBlock(p,0);for(var d=0;d<T;d++)M[m+d]^=p[d]}});return g.Decryptor=O,g}(),N.mode.OFB})},"SA+Z":function(F,q,j){var N=j("wTVA"),g=j("EbDI"),O=j("ZhPi"),M=j("wkBT");function m(y){return N(y)||g(y)||O(y)||M()}F.exports=m,F.exports.__esModule=!0,F.exports.default=F.exports},SJMd:function(F,q){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var j,N,g,O=!1,M,m;window.PR_SHOULD_USE_CONTINUATION=!0;var y,T;(function(){var b=window,p=["break,continue,do,else,for,if,return,while"],d=[p,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[d,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],r=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o="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",u=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],h="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",s=[p,"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"],l=[p,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[p,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[c,a,r,u,h,s,l,t],x=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,f="str",R="kwd",C="com",v="typ",_="lit",E="pun",w="pln",k="tag",I="dec",L="src",V="atn",W="atv",H="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ie){for(var Z=0,X=!1,Q=!1,_e=0,ve=ie.length;_e<ve;++_e){var Re=ie[_e];if(Re.ignoreCase)Q=!0;else if(/[a-z]/i.test(Re.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Q=!1;break}}var Je={b:8,t:9,n:10,v:11,f:12,r:13};function qe(Be){var Ie=Be.charCodeAt(0);if(Ie!==92)return Ie;var at=Be.charAt(1);return Ie=Je[at],Ie||("0"<=at&&at<="7"?parseInt(Be.substring(1),8):at==="u"||at==="x"?parseInt(Be.substring(2),16):Be.charCodeAt(1))}function rt(Be){if(Be<32)return(Be<16?"\\x0":"\\x")+Be.toString(16);var Ie=String.fromCharCode(Be);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function ut(Be){var Ie=Be.substring(1,Be.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")),at=[],ct=Ie[0]==="^",$e=["["];ct&&$e.push("^");for(var st=ct?1:0,Ue=Ie.length;st<Ue;++st){var Le=Ie[st];if(/\\[bdsw]/i.test(Le))$e.push(Le);else{var Me=qe(Le),Ee;st+2<Ue&&Ie[st+1]==="-"?(Ee=qe(Ie[st+2]),st+=2):Ee=Me,at.push([Me,Ee]),Ee<65||Me>122||(Ee<65||Me>90||at.push([Math.max(65,Me)|32,Math.min(Ee,90)|32]),Ee<97||Me>122||at.push([Math.max(97,Me)&~32,Math.min(Ee,122)&~32]))}}at.sort(function(He,tt){return He[0]-tt[0]||tt[1]-He[1]});for(var Ce=[],ke=[],st=0;st<at.length;++st){var Ne=at[st];Ne[0]<=ke[1]+1?ke[1]=Math.max(ke[1],Ne[1]):Ce.push(ke=Ne)}for(var st=0;st<Ce.length;++st){var Ne=Ce[st];$e.push(rt(Ne[0])),Ne[1]>Ne[0]&&(Ne[1]+1>Ne[0]&&$e.push("-"),$e.push(rt(Ne[1])))}return $e.push("]"),$e.join("")}function dt(Be){for(var Ie=Be.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")),at=Ie.length,ct=[],$e=0,st=0;$e<at;++$e){var Ue=Ie[$e];if(Ue==="(")++st;else if(Ue.charAt(0)==="\\"){var Le=+Ue.substring(1);Le&&(Le<=st?ct[Le]=-1:Ie[$e]=rt(Le))}}for(var $e=1;$e<ct.length;++$e)ct[$e]===-1&&(ct[$e]=++Z);for(var $e=0,st=0;$e<at;++$e){var Ue=Ie[$e];if(Ue==="(")++st,ct[st]||(Ie[$e]="(?:");else if(Ue.charAt(0)==="\\"){var Le=+Ue.substring(1);Le&&Le<=st&&(Ie[$e]="\\"+ct[Le])}}for(var $e=0;$e<at;++$e)Ie[$e]==="^"&&Ie[$e+1]!=="^"&&(Ie[$e]="");if(Be.ignoreCase&&X)for(var $e=0;$e<at;++$e){var Ue=Ie[$e],Me=Ue.charAt(0);Ue.length>=2&&Me==="["?Ie[$e]=ut(Ue):Me!=="\\"&&(Ie[$e]=Ue.replace(/[a-zA-Z]/g,function(ke){var Ne=ke.charCodeAt(0);return"["+String.fromCharCode(Ne&~32,Ne|32)+"]"}))}return Ie.join("")}for(var ft=[],_e=0,ve=ie.length;_e<ve;++_e){var Re=ie[_e];if(Re.global||Re.multiline)throw new Error(""+Re);ft.push("(?:"+dt(Re)+")")}return new RegExp(ft.join("|"),Q?"gi":"g")}function P(ie,Z){var X=/(?:^|\s)nocode(?:\s|$)/,Q=[],_e=0,ve=[],Re=0;function Je(qe){var rt=qe.nodeType;if(rt==1){if(X.test(qe.className))return;for(var ut=qe.firstChild;ut;ut=ut.nextSibling)Je(ut);var dt=qe.nodeName.toLowerCase();(dt==="br"||dt==="li")&&(Q[Re]=`
`,ve[Re<<1]=_e++,ve[Re++<<1|1]=qe)}else if(rt==3||rt==4){var ft=qe.nodeValue;ft.length&&(Z?ft=ft.replace(/\r\n?/g,`
`):ft=ft.replace(/[ \t\r\n]+/g," "),Q[Re]=ft,ve[Re<<1]=_e,_e+=ft.length,ve[Re++<<1|1]=qe)}}return Je(ie),{sourceCode:Q.join("").replace(/\n$/,""),spans:ve}}function z(ie,Z,X,Q,_e){if(!X)return;var ve={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:Z,decorations:null};Q(ve),_e.push.apply(_e,ve.decorations)}var J=/\S/;function ue(ie){for(var Z=void 0,X=ie.firstChild;X;X=X.nextSibling){var Q=X.nodeType;Z=Q===1?Z?ie:X:Q===3&&J.test(X.nodeValue)?ie:Z}return Z===ie?void 0:Z}function de(ie,Z){var X={},Q;(function(){for(var Re=ie.concat(Z),Je=[],qe={},rt=0,ut=Re.length;rt<ut;++rt){var dt=Re[rt],ft=dt[3];if(ft)for(var Be=ft.length;--Be>=0;)X[ft.charAt(Be)]=dt;var Ie=dt[1],at=""+Ie;qe.hasOwnProperty(at)||(Je.push(Ie),qe[at]=null)}Je.push(/[\0-\uffff]/),Q=B(Je)})();var _e=Z.length,ve=function(Re){for(var Je=Re.sourceCode,qe=Re.basePos,rt=Re.sourceNode,ut=[qe,w],dt=0,ft=Je.match(Q)||[],Be={},Ie=0,at=ft.length;Ie<at;++Ie){var ct=ft[Ie],$e=Be[ct],st=void 0,Ue;if(typeof $e=="string")Ue=!1;else{var Le=X[ct.charAt(0)];if(Le)st=ct.match(Le[1]),$e=Le[0];else{for(var Me=0;Me<_e;++Me)if(Le=Z[Me],st=ct.match(Le[1]),st){$e=Le[0];break}st||($e=w)}Ue=$e.length>=5&&$e.substring(0,5)==="lang-",Ue&&!(st&&typeof st[1]=="string")&&(Ue=!1,$e=L),Ue||(Be[ct]=$e)}var Ee=dt;if(dt+=ct.length,!Ue)ut.push(qe+Ee,$e);else{var Ce=st[1],ke=ct.indexOf(Ce),Ne=ke+Ce.length;st[2]&&(Ne=ct.length-st[2].length,ke=Ne-Ce.length);var He=$e.substring(5);z(rt,qe+Ee,ct.substring(0,ke),ve,ut),z(rt,qe+Ee+ke,Ce,ae(He,Ce),ut),z(rt,qe+Ee+Ne,ct.substring(Ne),ve,ut)}}Re.decorations=ut};return ve}function Se(ie){var Z=[],X=[];ie.tripleQuotedStrings?Z.push([f,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?Z.push([f,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Z.push([f,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&X.push([f,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ie.hashComments;Q&&(ie.cStyleComments?(Q>1?Z.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Z.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([f,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Z.push([C,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(X.push([C,/^\/\/[^\r\n]*/,null]),X.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var _e=ie.regexLiterals;if(_e){var ve=_e>1?"":`
\r`,Re=ve?".":"[\\S\\s]",Je="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+Re+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+Re+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+G+"("+Je+")")])}var qe=ie.types;qe&&X.push([v,qe]);var rt=(""+ie.keywords).replace(/^ | $/g,"");rt.length&&X.push([R,new RegExp("^(?:"+rt.replace(/[\s,]+/g,"|")+")\\b"),null]),Z.push([w,/^\s+/,null,` \r
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(ut+="(?!s*/)"),X.push([_,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[_,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[E,new RegExp(ut),null]),de(Z,X)}var Ae=Se({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function pe(ie,Z,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,_e=/\r\n?|\n/,ve=ie.ownerDocument,Re=ve.createElement("li");ie.firstChild;)Re.appendChild(ie.firstChild);var Je=[Re];function qe(Ie){var at=Ie.nodeType;if(at==1&&!Q.test(Ie.className))if(Ie.nodeName==="br")rt(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var ct=Ie.firstChild;ct;ct=ct.nextSibling)qe(ct);else if((at==3||at==4)&&X){var $e=Ie.nodeValue,st=$e.match(_e);if(st){var Ue=$e.substring(0,st.index);Ie.nodeValue=Ue;var Le=$e.substring(st.index+st[0].length);if(Le){var Me=Ie.parentNode;Me.insertBefore(ve.createTextNode(Le),Ie.nextSibling)}rt(Ie),Ue||Ie.parentNode.removeChild(Ie)}}}function rt(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function at(st,Ue){var Le=Ue?st.cloneNode(!1):st,Me=st.parentNode;if(Me){var Ee=at(Me,1),Ce=st.nextSibling;Ee.appendChild(Le);for(var ke=Ce;ke;ke=Ce)Ce=ke.nextSibling,Ee.appendChild(ke)}return Le}for(var ct=at(Ie.nextSibling,0),$e;($e=ct.parentNode)&&$e.nodeType===1;)ct=$e;Je.push(ct)}for(var ut=0;ut<Je.length;++ut)qe(Je[ut]);Z===(Z|0)&&Je[0].setAttribute("value",Z);var dt=ve.createElement("ol");dt.className="linenums";for(var ft=Math.max(0,Z-1|0)||0,ut=0,Be=Je.length;ut<Be;++ut)Re=Je[ut],Re.className="L"+(ut+ft)%10,Re.firstChild||Re.appendChild(ve.createTextNode("\xA0")),dt.appendChild(Re);ie.appendChild(dt)}function Oe(ie){var Z=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Z=Z&&+Z[1]<=8;var X=/\n/g,Q=ie.sourceCode,_e=Q.length,ve=0,Re=ie.spans,Je=Re.length,qe=0,rt=ie.decorations,ut=rt.length,dt=0;rt[ut]=_e;var ft,Be;for(Be=ft=0;Be<ut;)rt[Be]!==rt[Be+2]?(rt[ft++]=rt[Be++],rt[ft++]=rt[Be++]):Be+=2;for(ut=ft,Be=ft=0;Be<ut;){for(var Ie=rt[Be],at=rt[Be+1],ct=Be+2;ct+2<=ut&&rt[ct+1]===at;)ct+=2;rt[ft++]=Ie,rt[ft++]=at,Be=ct}ut=rt.length=ft;var $e=ie.sourceNode,st="";$e&&(st=$e.style.display,$e.style.display="none");try{for(var Ue=null;qe<Je;){var Le=Re[qe],Me=Re[qe+2]||_e,Ee=rt[dt+2]||_e,ct=Math.min(Me,Ee),Ce=Re[qe+1],ke;if(Ce.nodeType!==1&&(ke=Q.substring(ve,ct))){Z&&(ke=ke.replace(X,"\r")),Ce.nodeValue=ke;var Ne=Ce.ownerDocument,He=Ne.createElement("span");He.className=rt[dt+1];var tt=Ce.parentNode;tt.replaceChild(He,Ce),He.appendChild(Ce),ve<Me&&(Re[qe+1]=Ce=Ne.createTextNode(Q.substring(ct,Me)),tt.insertBefore(Ce,He.nextSibling))}ve=ct,ve>=Me&&(qe+=2),ve>=Ee&&(dt+=2)}}finally{$e&&($e.style.display=st)}}var ye={};function ce(ie,Z){for(var X=Z.length;--X>=0;){var Q=Z[X];ye.hasOwnProperty(Q)?b.console&&console.warn("cannot override language handler %s",Q):ye[Q]=ie}}function ae(ie,Z){return ie&&ye.hasOwnProperty(ie)||(ie=/^\s*</.test(Z)?"default-markup":"default-code"),ye[ie]}ce(Ae,["default-code"]),ce(de([],[[w,/^[^<?]+/],[I,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["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([[w,/^[\s]+/,null,` \r
`],[W,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[k,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[V,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["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([],[[W,/^[\s\S]+/]]),["uq.val"]),ce(Se({keywords:c,hashComments:!0,cStyleComments:!0,types:x}),["c","cc","cpp","cxx","cyc","m"]),ce(Se({keywords:"null,true,false"}),["json"]),ce(Se({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:x}),["cs"]),ce(Se({keywords:r,cStyleComments:!0}),["java"]),ce(Se({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ce(Se({keywords:s,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ce(Se({keywords:h,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ce(Se({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ce(Se({keywords:u,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ce(Se({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ce(de([],[[f,/^[\s\S]+/]]),["regex"]);function re(ie){var Z=ie.langExtension;try{var X=P(ie.sourceNode,ie.pre),Q=X.sourceCode;ie.sourceCode=Q,ie.spans=X.spans,ie.basePos=0,ae(Z,Q)(ie),Oe(ie)}catch(_e){b.console&&console.log(_e&&_e.stack||_e)}}function fe(ie,Z,X){var Q=X||!1,_e=Z||null,ve=document.createElement("div");ve.innerHTML="<pre>"+ie+"</pre>",ve=ve.firstChild,Q&&pe(ve,Q,!0);var Re={langExtension:_e,numberLines:Q,sourceNode:ve,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Re),ve.innerHTML}function te(ie,Z){var X=Z||document.body,Q=X.ownerDocument||document;function _e(Le){return X.getElementsByTagName(Le)}for(var ve=[_e("pre"),_e("code"),_e("xmp")],Re=[],Je=0;Je<ve.length;++Je)for(var qe=0,rt=ve[Je].length;qe<rt;++qe)Re.push(ve[Je][qe]);ve=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var dt=0,ft=/\blang(?:uage)?-([\w.]+)(?!\S)/,Be=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,at=/pre|xmp/i,ct=/^code$/i,$e=/^(?:pre|code|xmp)$/i,st={};function Ue(){for(var Le=b.PR_SHOULD_USE_CONTINUATION?ut.now()+250:Infinity;dt<Re.length&&ut.now()<Le;dt++){for(var Me=Re[dt],Ee=st,Ce=Me;Ce=Ce.previousSibling;){var ke=Ce.nodeType,Ne=(ke===7||ke===8)&&Ce.nodeValue;if(Ne?!/^\??prettify\b/.test(Ne):ke!==3||/\S/.test(Ce.nodeValue))break;if(Ne){Ee={},Ne.replace(/\b(\w+)=([\w:.%+-]+)/g,function(vn,Or,dn){Ee[Or]=dn});break}}var He=Me.className;if((Ee!==st||Be.test(He))&&!Ie.test(He)){for(var tt=!1,vt=Me.parentNode;vt;vt=vt.parentNode){var yt=vt.tagName;if($e.test(yt)&&vt.className&&Be.test(vt.className)){tt=!0;break}}if(!tt){Me.className+=" prettyprinted";var Wt=Ee.lang;if(!Wt){Wt=He.match(ft);var Ht;!Wt&&(Ht=ue(Me))&&ct.test(Ht.tagName)&&(Wt=Ht.className.match(ft)),Wt&&(Wt=Wt[1])}var cr;if(at.test(Me.tagName))cr=1;else{var dr=Me.currentStyle,St=Q.defaultView,Kr=dr?dr.whiteSpace:St&&St.getComputedStyle?St.getComputedStyle(Me,null).getPropertyValue("white-space"):0;cr=Kr&&Kr.substring(0,3)==="pre"}var Vr=Ee.linenums;(Vr=Vr==="true"||+Vr)||(Vr=He.match(/\blinenums\b(?::(\d+))?/),Vr=Vr?Vr[1]&&Vr[1].length?+Vr[1]:!0:!1),Vr&&pe(Me,Vr,cr);var Yr={langExtension:Wt,sourceNode:Me,numberLines:Vr,pre:cr,sourceCode:null,basePos:null,spans:null,decorations:null};re(Yr)}}}dt<Re.length?b.setTimeout(Ue,250):typeof ie=="function"&&ie()}Ue()}var ne=b.PR={createSimpleLexer:de,registerLangHandler:ce,sourceDecorator:Se,PR_ATTRIB_NAME:V,PR_ATTRIB_VALUE:W,PR_COMMENT:C,PR_DECLARATION:I,PR_KEYWORD:R,PR_LITERAL:_,PR_NOCODE:H,PR_PLAIN:w,PR_PUNCTUATION:E,PR_SOURCE:L,PR_STRING:f,PR_TAG:k,PR_TYPE:v,prettyPrintOne:O?b.prettyPrintOne=fe:y=fe,prettyPrint:T=O?b.prettyPrint=te:T=te},Te=b.define;typeof Te=="function"&&Te.amd&&Te("google-code-prettify",[],function(){return ne})})()},Sjjz:function(F,q,j){F.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},TXwP:function(F,q,j){var N,g;(function(){var O;(function(){"use strict";var m=[,,function(p){function d(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var r=new d(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},d.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},d.prototype.has_match=function(r){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(r))return!0;return!1},d.prototype.set_indent=function(r,a){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var a=r.lastIndexOf(`
`);a!==-1?this.__character_count=r.length-a:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function n(r,a){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),a=a||"",r.indent_level>0&&(a=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}n.prototype.get_indent_size=function(r,a){var o=this.__base_string_length;return a=a||0,r<0&&(o=0),o+=r*this.__indent_size,o+=a,o},n.prototype.get_indent_string=function(r,a){var o=this.__base_string;return a=a||0,r<0&&(r=0,o=""),a+=r*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,a=0,o="";this.__indent_size&&r>=this.__indent_size&&(a=Math.floor(r/this.__indent_size),r-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function c(r,a){this.__indent_cache=new n(r,a),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(r,a){return this.__indent_cache.get_indent_string(r,a)},c.prototype.get_indent_size=function(r,a){return this.__indent_cache.get_indent_size(r,a)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(r){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return r!==`
`&&(o=o.replace(/[\n]/g,r)),o},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(r,a){return r=r||0,a=a||0,this.next_line.set_indent(r,a),this.__lines.length>1?(this.current_line.set_indent(r,a),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(r){for(var a=0;a<r.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),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(r){for(var a=this.__lines.length;r<a;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&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(r,a){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(r)!==0&&u.item(-1)!==a){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=c},,,,function(p){function d(r,a){this.raw_options=n(r,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(r,a){var o=this.raw_options[r],u=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(u=o.concat()):typeof o=="string"&&(u=o.split(/[^a-zA-Z0-9_\/\-]+/)),u},d.prototype._get_boolean=function(r,a){var o=this.raw_options[r],u=o===void 0?!!a:!!o;return u},d.prototype._get_characters=function(r,a){var o=this.raw_options[r],u=a||"";return typeof o=="string"&&(u=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},d.prototype._get_number=function(r,a){var o=this.raw_options[r];a=parseInt(a,10),isNaN(a)&&(a=0);var u=parseInt(o,10);return isNaN(u)&&(u=a),u},d.prototype._get_selection=function(r,a,o){var u=this._get_selection_list(r,a,o);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[r]+"'");return u[0]},d.prototype._get_selection_list=function(r,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var u=this._get_array(r,o);if(!this._is_valid_selection(u,a))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[r]+"'");return u},d.prototype._is_valid_selection=function(r,a){return r.length&&a.length&&!r.some(function(o){return a.indexOf(o)===-1})};function n(r,a){var o={};r=c(r);var u;for(u in r)u!==a&&(o[u]=r[u]);if(a&&r[a])for(u in r[a])o[u]=r[a][u];return o}function c(r){var a={},o;for(o in r){var u=o.replace(/-/g,"_");a[u]=r[o]}return a}p.exports.Options=d,p.exports.normalizeOpts=c,p.exports.mergeOpts=n},,function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function n(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},n.prototype.peek=function(c){var r=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(r=this.__input.charAt(c)),r},n.prototype.__match=function(c,r){c.lastIndex=r;var a=c.exec(this.__input);return a&&!(d&&c.sticky)&&(a.index!==r&&(a=null)),a},n.prototype.test=function(c,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(c,r):!1},n.prototype.testChar=function(c,r){var a=this.peek(r);return c.lastIndex=0,a!==null&&c.test(a)},n.prototype.match=function(c){var r=this.__match(c,this.__position);return r?this.__position+=r[0].length:r=null,r},n.prototype.read=function(c,r,a){var o="",u;return c&&(u=this.match(c),u&&(o+=u[0])),r&&(u||!c)&&(o+=this.readUntil(r,a)),o},n.prototype.readUntil=function(c,r){var a="",o=this.__position;c.lastIndex=this.__position;var u=c.exec(this.__input);return u?(o=u.index,r&&(o+=u[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},n.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},n.prototype.get_regexp=function(c,r){var a=null,o="g";return r&&d&&(o="y"),typeof c=="string"&&c!==""?a=new RegExp(c,o):c&&(a=new RegExp(c.source,o)),a},n.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(c){var r=this.__position,a=this.readUntilAfter(c);return this.__position=r,a},n.prototype.lookBack=function(c){var r=this.__position-1;return r>=c.length&&this.__input.substring(r-c.length,r).toLowerCase()===c},p.exports.InputScanner=n},,,,,function(p){function d(n,c){n=typeof n=="string"?n:n.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(n);r;)c[r[1]]=r[2],r=this.__directive_pattern.exec(n);return c},d.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},,function(p,d,n){var c=n(16).Beautifier,r=n(17).Options;function a(o,u){var h=new c(o,u);return h.beautify()}p.exports=a,p.exports.defaultOptions=function(){return new r}},function(p,d,n){var c=n(17).Options,r=n(2).Output,a=n(8).InputScanner,o=n(13).Directives,u=new o(/\/\*/,/\*\//),h=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,l=/\s/,t=/(?:\s|\n)+/g,S=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,x=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(R,C){this._source_text=R||"",this._options=new c(C),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"]}f.prototype.eatString=function(R){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return C},f.prototype.eatWhitespace=function(R){for(var C=l.test(this._input.peek()),v=0;l.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===`
`&&((v===0||v<this._options.max_preserve_newlines)&&(v++,this._output.add_new_line(!0)));return C},f.prototype.foundNestedPseudoClass=function(){for(var R=0,C=1,v=this._input.peek(C);v;){if(v==="{")return!0;if(v==="(")R+=1;else if(v===")"){if(R===0)return!1;R-=1}else if(v===";"||v==="}")return!1;C++,v=this._input.peek(C)}return!1},f.prototype.print_string=function(R){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(R)},f.prototype.preserveSingleSpace=function(R){R&&(this._output.space_before_token=!0)},f.prototype.indent=function(){this._indentLevel++},f.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,C=this._options.eol;C==="auto"&&(C=`
`,R&&h.test(R||"")&&(C=R.match(h)[0])),R=R.replace(s,`
`);var v=R.match(/^[\t ]*/)[0];this._output=new r(this._options,v),this._input=new a(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var _=0,E=!1,w=!1,k=!1,I=!1,L=!1,V=!1,W=this._ch,H=!1,G,B,P;G=this._input.read(t),B=G!=="",P=W,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),W=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(S),J=u.get_directives(z);J&&J.ignore==="start"&&(z+=u.readIgnored(this._input)),this.print_string(z),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(x)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(B),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"?I=!0:ue==="import"&&(L=!0),ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,ue in this.CONDITIONAL_GROUP_RULE&&(k=!0)):!E&&_===0&&ue.indexOf(":")!==-1&&(w=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(B),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")w&&(w=!1,this.outdent()),k?(k=!1,E=this._indentLevel>=this._nestedLevel):E=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&E&&(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)):(P==="("?this._output.space_before_token=!1:P!==","&&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(),P==="{"&&this._output.trim(!0),L=!1,I=!1,w&&(this.outdent(),w=!1),this.print_string(this._ch),E=!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])){H=!0;break}(E||k)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!I&&_===0?(this.print_string(":"),w||(w=!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 Se=P==='"'||P==="'";this.preserveSingleSpace(Se||B),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")H=!1,_===0?(w&&(this.outdent(),w=!1),I=!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(),_++,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(")")),_&&(_--,this.outdent()));else{var Ae=!1;this._input.lookBack("with")&&(Ae=!0),this.preserveSingleSpace(B||Ae),this.print_string(this._ch),w&&P==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),V=!0):(this.eatWhitespace(),_++,this.indent())}else if(this._ch===")")_&&(_--,this.outdent()),V&&this._input.peek()===";"&&this._options.selector_separator_newline&&(V=!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&&(!w||V)&&_===0&&!L&&!I?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!w&&_===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&&l.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(B),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),l.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var pe=P==='"'||P==="'";this.preserveSingleSpace(pe||B),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&H&&this._output.add_new_line()}var Oe=this._output.get_code(C);return Oe},p.exports.Beautifier=f},function(p,d,n){var c=n(6).Options;function r(a){c.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var h=0;h<u.length;h++)u[h]!=="expand"?this.brace_style="collapse":this.brace_style=u[h]}r.prototype=new c,p.exports.Options=r}],y={};function T(p){var d=y[p];if(d!==void 0)return d.exports;var n=y[p]={exports:{}};return m[p](n,n.exports,T),n.exports}var b=T(15);O=b})();var M=O;!(N=[],g=function(){return{css_beautify:M}}.apply(q,N),g!==void 0&&(F.exports=g))})()},UfjD:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("5NDa"),M=j("5rEg"),m=j("miYZ"),y=j("tsqr"),T=j("tJVT"),b=j("q1tI"),p=j.n(b),d=j("4i/N");function n(c){var r=c.isjoin,a=c.setJoin,o=c.JoinTeams,u=Object(b.useState)(""),h=Object(T.a)(u,2),s=h[0],l=h[1];return p.a.createElement(g.a,{centered:!0,title:p.a.createElement("div",{style:{alignItems:"center",display:"flex"}},p.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),p.a.createElement(d.a,{onClick:function(){return a(!1)},style:{cursor:"porint"}})),visible:r,closable:!1,destroyOnClose:!0,onOk:function(){if(!s){y.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}o(s)},onCancel:function(){return a(!1)}},p.a.createElement("div",null,p.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},p.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",p.a.createElement(M.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:s,maxLength:60,addonAfter:String(s&&s.length||0)+"/60",onChange:function(S){return l(S.target.value)}}))))}q.a=n},"VrN/":function(F,q,j){(function(N,g){F.exports=g()})(this,function(){"use strict";var N=navigator.userAgent,g=navigator.platform,O=/gecko\/\d/i.test(N),M=/MSIE \d/.test(N),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),y=/Edge\/(\d+)/.exec(N),T=M||m||y,b=T&&(M?document.documentMode||6:+(y||m)[1]),p=!y&&/WebKit\//.test(N),d=p&&/Qt\/\d+\.\d+/.test(N),n=!y&&/Chrome\//.test(N),c=/Opera\//.test(N),r=/Apple Computer/.test(navigator.vendor),a=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),o=/PhantomJS/.test(N),u=!y&&/AppleWebKit/.test(N)&&/Mobile\/\w+/.test(N),h=/Android/.test(N),s=u||h||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),l=u||/Mac/.test(g),t=/\bCrOS\b/.test(N),S=/win/i.test(g),x=c&&N.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(c=!1,p=!0);var f=l&&(d||c&&(x==null||x<12.11)),R=O||T&&b>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var v=function(e,i){var D=e.className,A=C(i).exec(D);if(A){var U=D.slice(A.index+A[0].length);e.className=D.slice(0,A.index)+(U?A[1]+U:"")}};function _(e){for(var i=e.childNodes.length;i>0;--i)e.removeChild(e.firstChild);return e}function E(e,i){return _(e).appendChild(i)}function w(e,i,D,A){var U=document.createElement(e);if(D&&(U.className=D),A&&(U.style.cssText=A),typeof i=="string")U.appendChild(document.createTextNode(i));else if(i)for(var $=0;$<i.length;++$)U.appendChild(i[$]);return U}function k(e,i,D,A){var U=w(e,i,D,A);return U.setAttribute("role","presentation"),U}var I;document.createRange?I=function(e,i,D,A){var U=document.createRange();return U.setEnd(A||e,D),U.setStart(e,i),U}:I=function(e,i,D){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(U){return A}return A.collapse(!0),A.moveEnd("character",D),A.moveStart("character",i),A};function L(e,i){if(i.nodeType==3&&(i=i.parentNode),e.contains)return e.contains(i);do if(i.nodeType==11&&(i=i.host),i==e)return!0;while(i=i.parentNode)}function V(){var e;try{e=document.activeElement}catch(i){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function W(e,i){var D=e.className;C(i).test(D)||(e.className+=(D?" ":"")+i)}function H(e,i){for(var D=e.split(" "),A=0;A<D.length;A++)D[A]&&!C(D[A]).test(i)&&(i+=" "+D[A]);return i}var G=function(e){e.select()};u?G=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:T&&(G=function(e){try{e.select()}catch(i){}});function B(e){var i=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,i)}}function P(e,i,D){i||(i={});for(var A in e)e.hasOwnProperty(A)&&(D!==!1||!i.hasOwnProperty(A))&&(i[A]=e[A]);return i}function z(e,i,D,A,U){i==null&&(i=e.search(/[^\s\u00a0]/),i==-1&&(i=e.length));for(var $=A||0,oe=U||0;;){var he=e.indexOf(" ",$);if(he<0||he>=i)return oe+(i-$);oe+=he-$,oe+=D-oe%D,$=he+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,i){this.f=i;var D=+new Date+e;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=D)};function ue(e,i){for(var D=0;D<e.length;++D)if(e[D]==i)return D;return-1}var de=50,Se={toString:function(){return"CodeMirror.Pass"}},Ae={scroll:!1},pe={origin:"*mouse"},Oe={origin:"+move"};function ye(e,i,D){for(var A=0,U=0;;){var $=e.indexOf(" ",A);$==-1&&($=e.length);var oe=$-A;if($==e.length||U+oe>=i)return A+Math.min(oe,i-U);if(U+=$-A,U+=D-U%D,A=$+1,U>=i)return A}}var ce=[""];function ae(e){for(;ce.length<=e;)ce.push(re(ce)+" ");return ce[e]}function re(e){return e[e.length-1]}function fe(e,i){for(var D=[],A=0;A<e.length;A++)D[A]=i(e[A],A);return D}function te(e,i,D){for(var A=0,U=D(i);A<e.length&&D(e[A])<=U;)A++;e.splice(A,0,i)}function ne(){}function Te(e,i){var D;return Object.create?D=Object.create(e):(ne.prototype=e,D=new ne),i&&P(i,D),D}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Z(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function X(e,i){return i?i.source.indexOf("\\w")>-1&&Z(e)?!0:i.test(e):Z(e)}function Q(e){for(var i in e)if(e.hasOwnProperty(i)&&e[i])return!1;return!0}var _e=/[\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 ve(e){return e.charCodeAt(0)>=768&&_e.test(e)}function Re(e,i,D){for(;(D<0?i>0:i<e.length)&&ve(e.charAt(i));)i+=D;return i}function Je(e,i,D){for(var A=i>D?-1:1;;){if(i==D)return i;var U=(i+D)/2,$=A<0?Math.ceil(U):Math.floor(U);if($==i)return e($)?i:D;e($)?D=$:i=$+A}}function qe(e,i,D,A){if(!e)return A(i,D,"ltr",0);for(var U=!1,$=0;$<e.length;++$){var oe=e[$];(oe.from<D&&oe.to>i||i==D&&oe.to==i)&&(A(Math.max(oe.from,i),Math.min(oe.to,D),oe.level==1?"rtl":"ltr",$),U=!0)}U||A(i,D,"ltr")}var rt=null;function ut(e,i,D){var A;rt=null;for(var U=0;U<e.length;++U){var $=e[U];if($.from<i&&$.to>i)return U;$.to==i&&($.from!=$.to&&D=="before"?A=U:rt=U),$.from==i&&($.from!=$.to&&D!="before"?A=U:rt=U)}return A!=null?A:rt}var dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(xe){return xe<=247?e.charAt(xe):1424<=xe&&xe<=1524?"R":1536<=xe&&xe<=1785?i.charAt(xe-1536):1774<=xe&&xe<=2220?"r":8192<=xe&&xe<=8203?"w":xe==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,$=/[LRr]/,oe=/[Lb1n]/,he=/[1n]/;function me(xe,We,Ye){this.level=xe,this.from=We,this.to=Ye}return function(xe,We){var Ye=We=="ltr"?"L":"R";if(xe.length==0||We=="ltr"&&!A.test(xe))return!1;for(var lt=xe.length,nt=[],At=0;At<lt;++At)nt.push(D(xe.charCodeAt(At)));for(var Bt=0,Jt=Ye;Bt<lt;++Bt){var nr=nt[Bt];nr=="m"?nt[Bt]=Jt:Jt=nr}for(var yr=0,ir=Ye;yr<lt;++yr){var Sr=nt[yr];Sr=="1"&&ir=="r"?nt[yr]="n":$.test(Sr)&&(ir=Sr,Sr=="r"&&(nt[yr]="R"))}for(var Qr=1,Wr=nt[0];Qr<lt-1;++Qr){var En=nt[Qr];En=="+"&&Wr=="1"&&nt[Qr+1]=="1"?nt[Qr]="1":En==","&&Wr==nt[Qr+1]&&(Wr=="1"||Wr=="n")&&(nt[Qr]=Wr),Wr=En}for(var Vn=0;Vn<lt;++Vn){var Ci=nt[Vn];if(Ci==",")nt[Vn]="N";else if(Ci=="%"){var ri=void 0;for(ri=Vn+1;ri<lt&&nt[ri]=="%";++ri);for(var qi=Vn&&nt[Vn-1]=="!"||ri<lt&&nt[ri]=="1"?"1":"N",Ji=Vn;Ji<ri;++Ji)nt[Ji]=qi;Vn=ri-1}}for(var pi=0,Qi=Ye;pi<lt;++pi){var Ii=nt[pi];Qi=="L"&&Ii=="1"?nt[pi]="L":$.test(Ii)&&(Qi=Ii)}for(var _i=0;_i<lt;++_i)if(U.test(nt[_i])){var mi=void 0;for(mi=_i+1;mi<lt&&U.test(nt[mi]);++mi);for(var oi=(_i?nt[_i-1]:Ye)=="L",Zi=(mi<lt?nt[mi]:Ye)=="L",lo=oi==Zi?oi?"L":"R":Ye,Ua=_i;Ua<mi;++Ua)nt[Ua]=lo;_i=mi-1}for(var Mi=[],xa,Oi=0;Oi<lt;)if(oe.test(nt[Oi])){var ps=Oi;for(++Oi;Oi<lt&&oe.test(nt[Oi]);++Oi);Mi.push(new me(0,ps,Oi))}else{var Da=Oi,Ka=Mi.length,Va=We=="rtl"?1:0;for(++Oi;Oi<lt&&nt[Oi]!="L";++Oi);for(var zi=Da;zi<Oi;)if(he.test(nt[zi])){Da<zi&&(Mi.splice(Ka,0,new me(1,Da,zi)),Ka+=Va);var uo=zi;for(++zi;zi<Oi&&he.test(nt[zi]);++zi);Mi.splice(Ka,0,new me(2,uo,zi)),Ka+=Va,Da=zi}else++zi;Da<Oi&&Mi.splice(Ka,0,new me(1,Da,Oi))}return We=="ltr"&&(Mi[0].level==1&&(xa=xe.match(/^\s+/))&&(Mi[0].from=xa[0].length,Mi.unshift(new me(0,0,xa[0].length))),re(Mi).level==1&&(xa=xe.match(/\s+$/))&&(re(Mi).to-=xa[0].length,Mi.push(new me(0,lt-xa[0].length,lt)))),We=="rtl"?Mi.reverse():Mi}}();function ft(e,i){var D=e.order;return D==null&&(D=e.order=dt(e.text,i)),D}var Be=[],Ie=function(e,i,D){if(e.addEventListener)e.addEventListener(i,D,!1);else if(e.attachEvent)e.attachEvent("on"+i,D);else{var A=e._handlers||(e._handlers={});A[i]=(A[i]||Be).concat(D)}};function at(e,i){return e._handlers&&e._handlers[i]||Be}function ct(e,i,D){if(e.removeEventListener)e.removeEventListener(i,D,!1);else if(e.detachEvent)e.detachEvent("on"+i,D);else{var A=e._handlers,U=A&&A[i];if(U){var $=ue(U,D);$>-1&&(A[i]=U.slice(0,$).concat(U.slice($+1)))}}}function $e(e,i){var D=at(e,i);if(!D.length)return;for(var A=Array.prototype.slice.call(arguments,2),U=0;U<D.length;++U)D[U].apply(null,A)}function st(e,i,D){return typeof i=="string"&&(i={type:i,preventDefault:function(){this.defaultPrevented=!0}}),$e(e,D||i.type,e,i),ke(i)||i.codemirrorIgnore}function Ue(e){var i=e._handlers&&e._handlers.cursorActivity;if(!i)return;for(var D=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<i.length;++A)ue(D,i[A])==-1&&D.push(i[A])}function Le(e,i){return at(e,i).length>0}function Me(e){e.prototype.on=function(i,D){Ie(this,i,D)},e.prototype.off=function(i,D){ct(this,i,D)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ne(e){Ee(e),Ce(e)}function He(e){return e.target||e.srcElement}function tt(e){var i=e.which;return i==null&&(e.button&1?i=1:e.button&2?i=3:e.button&4&&(i=2)),l&&e.ctrlKey&&i==1&&(i=3),i}var vt=function(){if(T&&b<9)return!1;var e=w("div");return"draggable"in e||"dragDrop"in e}(),yt;function Wt(e){if(yt==null){var i=w("span","\u200B");E(e,w("span",[i,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=i.offsetWidth<=1&&i.offsetHeight>2&&!(T&&b<8))}var D=yt?w("span","\u200B"):w("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var Ht;function cr(e){if(Ht!=null)return Ht;var i=E(e,document.createTextNode("A\u062EA")),D=I(i,0,1).getBoundingClientRect(),A=I(i,1,2).getBoundingClientRect();return _(e),!D||D.left==D.right?!1:Ht=A.right-D.right<3}var dr=`
b`.split(/\n/).length!=3?function(e){for(var i=0,D=[],A=e.length;i<=A;){var U=e.indexOf(`
`,i);U==-1&&(U=e.length);var $=e.slice(i,e.charAt(U-1)=="\r"?U-1:U),oe=$.indexOf("\r");oe!=-1?(D.push($.slice(0,oe)),i+=oe+1):(D.push($),i=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},St=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(i){return!1}}:function(e){var i;try{i=e.ownerDocument.selection.createRange()}catch(D){}return!i||i.parentElement()!=e?!1:i.compareEndPoints("StartToEnd",i)!=0},Kr=function(){var e=w("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Vr=null;function Yr(e){if(Vr!=null)return Vr;var i=E(e,w("span","x")),D=i.getBoundingClientRect(),A=I(i,0,1).getBoundingClientRect();return Vr=Math.abs(D.left-A.left)>1}var vn={},Or={};function dn(e,i){arguments.length>2&&(i.dependencies=Array.prototype.slice.call(arguments,2)),vn[e]=i}function hn(e,i){Or[e]=i}function Tt(e){if(typeof e=="string"&&Or.hasOwnProperty(e))e=Or[e];else if(e&&typeof e.name=="string"&&Or.hasOwnProperty(e.name)){var i=Or[e.name];typeof i=="string"&&(i={name:i}),e=Te(i,e),e.name=i.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gr(e,i){i=Tt(i);var D=vn[i.name];if(!D)return gr(e,"text/plain");var A=D(e,i);if(Br.hasOwnProperty(i.name)){var U=Br[i.name];for(var $ in U){if(!U.hasOwnProperty($))continue;A.hasOwnProperty($)&&(A["_"+$]=A[$]),A[$]=U[$]}}if(A.name=i.name,i.helperType&&(A.helperType=i.helperType),i.modeProps)for(var oe in i.modeProps)A[oe]=i.modeProps[oe];return A}var Br={};function zr(e,i){var D=Br.hasOwnProperty(e)?Br[e]:Br[e]={};P(i,D)}function an(e,i){if(i===!0)return i;if(e.copyState)return e.copyState(i);var D={};for(var A in i){var U=i[A];U instanceof Array&&(U=U.concat([])),D[A]=U}return D}function gi(e,i){for(var D;e.innerMode&&!(D=e.innerMode(i),!D||D.mode==e);)i=D.state,e=D.mode;return D||{mode:e,state:i}}function Ei(e,i,D){return e.startState?e.startState(i,D):!0}var bn=function(e,i,D){this.pos=this.start=0,this.string=e,this.tabSize=i||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};bn.prototype.eol=function(){return this.pos>=this.string.length},bn.prototype.sol=function(){return this.pos==this.lineStart},bn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},bn.prototype.eat=function(e){var i=this.string.charAt(this.pos),D;if(typeof e=="string"?D=i==e:D=i&&(e.test?e.test(i):e(i)),D)return++this.pos,i},bn.prototype.eatWhile=function(e){for(var i=this.pos;this.eat(e););return this.pos>i},bn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},bn.prototype.skipToEnd=function(){this.pos=this.string.length},bn.prototype.skipTo=function(e){var i=this.string.indexOf(e,this.pos);if(i>-1)return this.pos=i,!0},bn.prototype.backUp=function(e){this.pos-=e},bn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},bn.prototype.indentation=function(){return z(this.string,null,this.tabSize)-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},bn.prototype.match=function(e,i,D){if(typeof e=="string"){var A=function(oe){return D?oe.toLowerCase():oe},U=this.string.substr(this.pos,e.length);if(A(U)==A(e))return i!==!1&&(this.pos+=e.length),!0}else{var $=this.string.slice(this.pos).match(e);return $&&$.index>0?null:($&&i!==!1&&(this.pos+=$[0].length),$)}},bn.prototype.current=function(){return this.string.slice(this.start,this.pos)},bn.prototype.hideFirstChars=function(e,i){this.lineStart+=e;try{return i()}finally{this.lineStart-=e}},bn.prototype.lookAhead=function(e){var i=this.lineOracle;return i&&i.lookAhead(e)},bn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function lr(e,i){if(i-=e.first,i<0||i>=e.size)throw new Error("There is no line "+(i+e.first)+" in the document.");for(var D=e;!D.lines;)for(var A=0;;++A){var U=D.children[A],$=U.chunkSize();if(i<$){D=U;break}i-=$}return D.lines[i]}function Yn(e,i,D){var A=[],U=i.line;return e.iter(i.line,D.line+1,function($){var oe=$.text;U==D.line&&(oe=oe.slice(0,D.ch)),U==i.line&&(oe=oe.slice(i.ch)),A.push(oe),++U}),A}function ci(e,i,D){var A=[];return e.iter(i,D,function(U){A.push(U.text)}),A}function Hn(e,i){var D=i-e.height;if(D)for(var A=e;A;A=A.parent)A.height+=D}function qr(e){if(e.parent==null)return null;for(var i=e.parent,D=ue(i.lines,e),A=i.parent;A;i=A,A=A.parent)for(var U=0;!(A.children[U]==i);++U)D+=A.children[U].chunkSize();return D+i.first}function Un(e,i){var D=e.first;e:do{for(var A=0;A<e.children.length;++A){var U=e.children[A],$=U.height;if(i<$){e=U;continue e}i-=$,D+=U.chunkSize()}return D}while(!e.lines);for(var oe=0;oe<e.lines.length;++oe){var he=e.lines[oe],me=he.height;if(i<me)break;i-=me}return D+oe}function di(e,i){return i>=e.first&&i<e.first+e.size}function vi(e,i){return String(e.lineNumberFormatter(i+e.firstLineNumber))}function Ut(e,i,D){if(D===void 0&&(D=null),!(this instanceof Ut))return new Ut(e,i,D);this.line=e,this.ch=i,this.sticky=D}function _r(e,i){return e.line-i.line||e.ch-i.ch}function hi(e,i){return e.sticky==i.sticky&&_r(e,i)==0}function xi(e){return Ut(e.line,e.ch)}function Di(e,i){return _r(e,i)<0?i:e}function wi(e,i){return _r(e,i)<0?e:i}function le(e,i){return Math.max(e.first,Math.min(i,e.first+e.size-1))}function K(e,i){if(i.line<e.first)return Ut(e.first,0);var D=e.first+e.size-1;return i.line>D?Ut(D,lr(e,D).text.length):Y(i,lr(e,i.line).text.length)}function Y(e,i){var D=e.ch;return D==null||D>i?Ut(e.line,i):D<0?Ut(e.line,0):e}function ee(e,i){for(var D=[],A=0;A<i.length;A++)D[A]=K(e,i[A]);return D}var ge=function(e,i){this.state=e,this.lookAhead=i},se=function(e,i,D,A){this.state=i,this.doc=e,this.line=D,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};se.prototype.lookAhead=function(e){var i=this.doc.getLine(this.line+e);return i!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),i},se.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},se.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},se.fromSaved=function(e,i,D){return i instanceof ge?new se(e,an(e.mode,i.state),D,i.lookAhead):new se(e,an(e.mode,i),D)},se.prototype.save=function(e){var i=e!==!1?an(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ge(i,this.maxLookAhead):i};function Ke(e,i,D,A){var U=[e.state.modeGen],$={};qn(e,i.text,e.doc.mode,D,function(xe,We){return U.push(xe,We)},$,A);for(var oe=D.state,he=function(xe){D.baseTokens=U;var We=e.state.overlays[xe],Ye=1,lt=0;D.state=!0,qn(e,i.text,We.mode,D,function(nt,At){for(var Bt=Ye;lt<nt;){var Jt=U[Ye];Jt>nt&&U.splice(Ye,1,nt,U[Ye+1],Jt),Ye+=2,lt=Math.min(nt,Jt)}if(!At)return;if(We.opaque)U.splice(Bt,Ye-Bt,nt,"overlay "+At),Ye=Bt+2;else for(;Bt<Ye;Bt+=2){var nr=U[Bt+1];U[Bt+1]=(nr?nr+" ":"")+"overlay "+At}},$),D.state=oe,D.baseTokens=null,D.baseTokenPos=1},me=0;me<e.state.overlays.length;++me)he(me);return{styles:U,classes:$.bgClass||$.textClass?$:null}}function Ct(e,i,D){if(!i.styles||i.styles[0]!=e.state.modeGen){var A=Xt(e,qr(i)),U=i.text.length>e.options.maxHighlightLength&&an(e.doc.mode,A.state),$=Ke(e,i,A);U&&(A.state=U),i.stateAfter=A.save(!U),i.styles=$.styles,$.classes?i.styleClasses=$.classes:i.styleClasses&&(i.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return i.styles}function Xt(e,i,D){var A=e.doc,U=e.display;if(!A.mode.startState)return new se(A,!0,i);var $=Nn(e,i,D),oe=$>A.first&&lr(A,$-1).stateAfter,he=oe?se.fromSaved(A,oe,$):new se(A,Ei(A.mode),$);return A.iter($,i,function(me){Er(e,me.text,he);var xe=he.line;me.stateAfter=xe==i-1||xe%5==0||xe>=U.viewFrom&&xe<U.viewTo?he.save():null,he.nextLine()}),D&&(A.modeFrontier=he.line),he}function Er(e,i,D,A){var U=e.doc.mode,$=new bn(i,e.options.tabSize,D);for($.start=$.pos=A||0,i==""&&Pt(U,D.state);!$.eol();)Lr(U,$,D.state),$.start=$.pos}function Pt(e,i){if(e.blankLine)return e.blankLine(i);if(!e.innerMode)return;var D=gi(e,i);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function Lr(e,i,D,A){for(var U=0;U<10;U++){A&&(A[0]=gi(e,D).mode);var $=e.token(i,D);if(i.pos>i.start)return $}throw new Error("Mode "+e.name+" failed to advance stream.")}var Gr=function(e,i,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=i||null,this.state=D};function _n(e,i,D,A){var U=e.doc,$=U.mode,oe;i=K(U,i);var he=lr(U,i.line),me=Xt(e,i.line,D),xe=new bn(he.text,e.options.tabSize,me),We;for(A&&(We=[]);(A||xe.pos<i.ch)&&!xe.eol();)xe.start=xe.pos,oe=Lr($,xe,me.state),A&&We.push(new Gr(xe,oe,an(U.mode,me.state)));return A?We:new Gr(xe,oe,me.state)}function Zn(e,i){if(e)for(;;){var D=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;e=e.slice(0,D.index)+e.slice(D.index+D[0].length);var A=D[1]?"bgClass":"textClass";i[A]==null?i[A]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(i[A])||(i[A]+=" "+D[2])}return e}function qn(e,i,D,A,U,$,oe){var he=D.flattenSpans;he==null&&(he=e.options.flattenSpans);var me=0,xe=null,We=new bn(i,e.options.tabSize,A),Ye,lt=e.options.addModeClass&&[null];for(i==""&&Zn(Pt(D,A.state),$);!We.eol();){if(We.pos>e.options.maxHighlightLength?(he=!1,oe&&Er(e,i,A,We.pos),We.pos=i.length,Ye=null):Ye=Zn(Lr(D,We,A.state,lt),$),lt){var nt=lt[0].name;nt&&(Ye="m-"+(Ye?nt+" "+Ye:nt))}if(!he||xe!=Ye){for(;me<We.start;)me=Math.min(We.start,me+5e3),U(me,xe);xe=Ye}We.start=We.pos}for(;me<We.pos;){var At=Math.min(We.pos,me+5e3);U(At,xe),me=At}}function Nn(e,i,D){for(var A,U,$=e.doc,oe=D?-1:i-(e.doc.mode.innerMode?1e3:100),he=i;he>oe;--he){if(he<=$.first)return $.first;var me=lr($,he-1),xe=me.stateAfter;if(xe&&(!D||he+(xe instanceof ge?xe.lookAhead:0)<=$.modeFrontier))return he;var We=z(me.text,null,e.options.tabSize);(U==null||A>We)&&(U=he-1,A=We)}return U}function Ni(e,i){if(e.modeFrontier=Math.min(e.modeFrontier,i),e.highlightFrontier<i-10)return;for(var D=e.first,A=i-1;A>D;A--){var U=lr(e,A).stateAfter;if(U&&(!(U instanceof ge)||A+U.lookAhead<i)){D=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,D)}var Gi=!1,Wn=!1;function Ti(){Gi=!0}function Ki(){Wn=!0}function ki(e,i,D){this.marker=e,this.from=i,this.to=D}function ni(e,i){if(e)for(var D=0;D<e.length;++D){var A=e[D];if(A.marker==i)return A}}function ea(e,i){for(var D,A=0;A<e.length;++A)e[A]!=i&&(D||(D=[])).push(e[A]);return D}function Vi(e,i){e.markedSpans=e.markedSpans?e.markedSpans.concat([i]):[i],i.marker.attachLine(e)}function ta(e,i,D){var A;if(e)for(var U=0;U<e.length;++U){var $=e[U],oe=$.marker,he=$.from==null||(oe.inclusiveLeft?$.from<=i:$.from<i);if(he||$.from==i&&oe.type=="bookmark"&&(!D||!$.marker.insertLeft)){var me=$.to==null||(oe.inclusiveRight?$.to>=i:$.to>i);(A||(A=[])).push(new ki(oe,$.from,me?null:$.to))}}return A}function oa(e,i,D){var A;if(e)for(var U=0;U<e.length;++U){var $=e[U],oe=$.marker,he=$.to==null||(oe.inclusiveRight?$.to>=i:$.to>i);if(he||$.from==i&&oe.type=="bookmark"&&(!D||$.marker.insertLeft)){var me=$.from==null||(oe.inclusiveLeft?$.from<=i:$.from<i);(A||(A=[])).push(new ki(oe,me?null:$.from-i,$.to==null?null:$.to-i))}}return A}function Li(e,i){if(i.full)return null;var D=di(e,i.from.line)&&lr(e,i.from.line).markedSpans,A=di(e,i.to.line)&&lr(e,i.to.line).markedSpans;if(!D&&!A)return null;var U=i.from.ch,$=i.to.ch,oe=_r(i.from,i.to)==0,he=ta(D,U,oe),me=oa(A,$,oe),xe=i.text.length==1,We=re(i.text).length+(xe?U:0);if(he)for(var Ye=0;Ye<he.length;++Ye){var lt=he[Ye];if(lt.to==null){var nt=ni(me,lt.marker);nt?xe&&(lt.to=nt.to==null?null:nt.to+We):lt.to=U}}if(me)for(var At=0;At<me.length;++At){var Bt=me[At];if(Bt.to!=null&&(Bt.to+=We),Bt.from==null){var Jt=ni(he,Bt.marker);Jt||(Bt.from=We,xe&&(he||(he=[])).push(Bt))}else Bt.from+=We,xe&&(he||(he=[])).push(Bt)}he&&(he=$n(he)),me&&me!=he&&(me=$n(me));var nr=[he];if(!xe){var yr=i.text.length-2,ir;if(yr>0&&he)for(var Sr=0;Sr<he.length;++Sr)he[Sr].to==null&&(ir||(ir=[])).push(new ki(he[Sr].marker,null,null));for(var Qr=0;Qr<yr;++Qr)nr.push(ir);nr.push(me)}return nr}function $n(e){for(var i=0;i<e.length;++i){var D=e[i];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&e.splice(i--,1)}return e.length?e:null}function ji(e,i,D){var A=null;if(e.iter(i.line,D.line+1,function(nt){if(nt.markedSpans)for(var At=0;At<nt.markedSpans.length;++At){var Bt=nt.markedSpans[At].marker;Bt.readOnly&&(!A||ue(A,Bt)==-1)&&(A||(A=[])).push(Bt)}}),!A)return null;for(var U=[{from:i,to:D}],$=0;$<A.length;++$)for(var oe=A[$],he=oe.find(0),me=0;me<U.length;++me){var xe=U[me];if(_r(xe.to,he.from)<0||_r(xe.from,he.to)>0)continue;var We=[me,1],Ye=_r(xe.from,he.from),lt=_r(xe.to,he.to);(Ye<0||!oe.inclusiveLeft&&!Ye)&&We.push({from:xe.from,to:he.from}),(lt>0||!oe.inclusiveRight&&!lt)&&We.push({from:he.to,to:xe.to}),U.splice.apply(U,We),me+=We.length-3}return U}function ha(e){var i=e.markedSpans;if(!i)return;for(var D=0;D<i.length;++D)i[D].marker.detachLine(e);e.markedSpans=null}function xt(e,i){if(!i)return;for(var D=0;D<i.length;++D)i[D].marker.attachLine(e);e.markedSpans=i}function et(e){return e.inclusiveLeft?-1:0}function mt(e){return e.inclusiveRight?1:0}function wt(e,i){var D=e.lines.length-i.lines.length;if(D!=0)return D;var A=e.find(),U=i.find(),$=_r(A.from,U.from)||et(e)-et(i);if($)return-$;var oe=_r(A.to,U.to)||mt(e)-mt(i);return oe||i.id-e.id}function Lt(e,i){var D=Wn&&e.markedSpans,A;if(D)for(var U=void 0,$=0;$<D.length;++$)U=D[$],U.marker.collapsed&&(i?U.from:U.to)==null&&(!A||wt(A,U.marker)<0)&&(A=U.marker);return A}function Dt(e){return Lt(e,!0)}function Kt(e){return Lt(e,!1)}function zt(e,i){var D=Wn&&e.markedSpans,A;if(D)for(var U=0;U<D.length;++U){var $=D[U];$.marker.collapsed&&($.from==null||$.from<i)&&($.to==null||$.to>i)&&(!A||wt(A,$.marker)<0)&&(A=$.marker)}return A}function ht(e,i,D,A,U){var $=lr(e,i),oe=Wn&&$.markedSpans;if(oe)for(var he=0;he<oe.length;++he){var me=oe[he];if(!me.marker.collapsed)continue;var xe=me.marker.find(0),We=_r(xe.from,D)||et(me.marker)-et(U),Ye=_r(xe.to,A)||mt(me.marker)-mt(U);if(We>=0&&Ye<=0||We<=0&&Ye>=0)continue;if(We<=0&&(me.marker.inclusiveRight&&U.inclusiveLeft?_r(xe.to,D)>=0:_r(xe.to,D)>0)||We>=0&&(me.marker.inclusiveRight&&U.inclusiveLeft?_r(xe.from,A)<=0:_r(xe.from,A)<0))return!0}}function Ot(e){for(var i;i=Dt(e);)e=i.find(-1,!0).line;return e}function Rt(e){for(var i;i=Kt(e);)e=i.find(1,!0).line;return e}function ur(e){for(var i,D;i=Kt(e);)e=i.find(1,!0).line,(D||(D=[])).push(e);return D}function ar(e,i){var D=lr(e,i),A=Ot(D);return D==A?i:qr(A)}function Zt(e,i){if(i>e.lastLine())return i;var D=lr(e,i),A;if(!$t(e,D))return i;for(;A=Kt(D);)D=A.find(1,!0).line;return qr(D)+1}function $t(e,i){var D=Wn&&i.markedSpans;if(D)for(var A=void 0,U=0;U<D.length;++U){if(A=D[U],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&rr(e,i,A))return!0}}function rr(e,i,D){if(D.to==null){var A=D.marker.find(1,!0);return rr(e,A.line,ni(A.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==i.text.length)return!0;for(var U=void 0,$=0;$<i.markedSpans.length;++$)if(U=i.markedSpans[$],U.marker.collapsed&&!U.marker.widgetNode&&U.from==D.to&&(U.to==null||U.to!=D.from)&&(U.marker.inclusiveLeft||D.marker.inclusiveRight)&&rr(e,i,U))return!0}function sr(e){e=Ot(e);for(var i=0,D=e.parent,A=0;A<D.lines.length;++A){var U=D.lines[A];if(U==e)break;i+=U.height}for(var $=D.parent;$;D=$,$=D.parent)for(var oe=0;oe<$.children.length;++oe){var he=$.children[oe];if(he==D)break;i+=he.height}return i}function ot(e){if(e.height==0)return 0;for(var i=e.text.length,D,A=e;D=Dt(A);){var U=D.find(0,!0);A=U.from.line,i+=U.from.ch-U.to.ch}for(A=e;D=Kt(A);){var $=D.find(0,!0);i-=A.text.length-$.from.ch,A=$.to.line,i+=A.text.length-$.to.ch}return i}function Ar(e){var i=e.display,D=e.doc;i.maxLine=lr(D,D.first),i.maxLineLength=ot(i.maxLine),i.maxLineChanged=!0,D.iter(function(A){var U=ot(A);U>i.maxLineLength&&(i.maxLineLength=U,i.maxLine=A)})}var Nr=function(e,i,D){this.text=e,xt(this,i),this.height=D?D(this):1};Nr.prototype.lineNo=function(){return qr(this)},Me(Nr);function fr(e,i,D,A){e.text=i,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ha(e),xt(e,D);var U=A?A(e):1;U!=e.height&&Hn(e,U)}function _t(e){e.parent=null,ha(e)}var It={},Et={};function Nt(e,i){if(!e||/^\s*$/.test(e))return null;var D=i.addModeClass?Et:It;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function qt(e,i){var D=k("span",null,null,p?"padding-right: .1px":null),A={pre:k("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};i.measure={};for(var U=0;U<=(i.rest?i.rest.length:0);U++){var $=U?i.rest[U-1]:i.line,oe=void 0;A.pos=0,A.addToken=er,cr(e.display.measure)&&(oe=ft($,e.doc.direction))&&(A.addToken=Ur(A.addToken,oe)),A.map=[];var he=i!=e.display.externalMeasured&&qr($);it($,A,Ct(e,$,he)),$.styleClasses&&($.styleClasses.bgClass&&(A.bgClass=H($.styleClasses.bgClass,A.bgClass||"")),$.styleClasses.textClass&&(A.textClass=H($.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Wt(e.display.measure))),U==0?(i.measure.map=A.map,i.measure.cache={}):((i.measure.maps||(i.measure.maps=[])).push(A.map),(i.measure.caches||(i.measure.caches=[])).push({}))}if(p){var me=A.content.lastChild;(/\bcm-tab\b/.test(me.className)||me.querySelector&&me.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return $e(e,"renderLine",e,i.line,A.pre),A.pre.className&&(A.textClass=H(A.pre.className,A.textClass||"")),A}function pr(e){var i=w("span","\u2022","cm-invalidchar");return i.title="\\u"+e.charCodeAt(0).toString(16),i.setAttribute("aria-label",i.title),i}function er(e,i,D,A,U,$,oe){if(!i)return;var he=e.splitSpaces?Rr(i,e.trailingSpace):i,me=e.cm.state.specialChars,xe=!1,We;if(!me.test(i))e.col+=i.length,We=document.createTextNode(he),e.map.push(e.pos,e.pos+i.length,We),T&&b<9&&(xe=!0),e.pos+=i.length;else{We=document.createDocumentFragment();for(var Ye=0;;){me.lastIndex=Ye;var lt=me.exec(i),nt=lt?lt.index-Ye:i.length-Ye;if(nt){var At=document.createTextNode(he.slice(Ye,Ye+nt));T&&b<9?We.appendChild(w("span",[At])):We.appendChild(At),e.map.push(e.pos,e.pos+nt,At),e.col+=nt,e.pos+=nt}if(!lt)break;Ye+=nt+1;var Bt=void 0;if(lt[0]==" "){var Jt=e.cm.options.tabSize,nr=Jt-e.col%Jt;Bt=We.appendChild(w("span",ae(nr),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),e.col+=nr}else lt[0]=="\r"||lt[0]==`
`?(Bt=We.appendChild(w("span",lt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",lt[0]),e.col+=1):(Bt=e.cm.options.specialCharPlaceholder(lt[0]),Bt.setAttribute("cm-text",lt[0]),T&&b<9?We.appendChild(w("span",[Bt])):We.appendChild(Bt),e.col+=1);e.map.push(e.pos,e.pos+1,Bt),e.pos++}}if(e.trailingSpace=he.charCodeAt(i.length-1)==32,D||A||U||xe||$||oe){var yr=D||"";A&&(yr+=A),U&&(yr+=U);var ir=w("span",[We],yr,$);if(oe)for(var Sr in oe)oe.hasOwnProperty(Sr)&&Sr!="style"&&Sr!="class"&&ir.setAttribute(Sr,oe[Sr]);return e.content.appendChild(ir)}e.content.appendChild(We)}function Rr(e,i){if(e.length>1&&!/ /.test(e))return e;for(var D=i,A="",U=0;U<e.length;U++){var $=e.charAt(U);$==" "&&D&&(U==e.length-1||e.charCodeAt(U+1)==32)&&($="\xA0"),A+=$,D=$==" "}return A}function Ur(e,i){return function(D,A,U,$,oe,he,me){U=U?U+" cm-force-border":"cm-force-border";for(var xe=D.pos,We=xe+A.length;;){for(var Ye=void 0,lt=0;lt<i.length&&!(Ye=i[lt],Ye.to>xe&&Ye.from<=xe);lt++);if(Ye.to>=We)return e(D,A,U,$,oe,he,me);e(D,A.slice(0,Ye.to-xe),U,$,null,he,me),$=null,A=A.slice(Ye.to-xe),xe=Ye.to}}}function br(e,i,D,A){var U=!A&&D.widgetNode;U&&e.map.push(e.pos,e.pos+i,U),!A&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",D.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=i,e.trailingSpace=!1}function it(e,i,D){var A=e.markedSpans,U=e.text,$=0;if(!A){for(var oe=1;oe<D.length;oe+=2)i.addToken(i,U.slice($,$=D[oe]),Nt(D[oe+1],i.cm.options));return}for(var he=U.length,me=0,xe=1,We="",Ye,lt,nt=0,At,Bt,Jt,nr,yr;;){if(nt==me){At=Bt=Jt=lt="",yr=null,nr=null,nt=Infinity;for(var ir=[],Sr=void 0,Qr=0;Qr<A.length;++Qr){var Wr=A[Qr],En=Wr.marker;if(En.type=="bookmark"&&Wr.from==me&&En.widgetNode)ir.push(En);else if(Wr.from<=me&&(Wr.to==null||Wr.to>me||En.collapsed&&Wr.to==me&&Wr.from==me)){if(Wr.to!=null&&Wr.to!=me&&nt>Wr.to&&(nt=Wr.to,Bt=""),En.className&&(At+=" "+En.className),En.css&&(lt=(lt?lt+";":"")+En.css),En.startStyle&&Wr.from==me&&(Jt+=" "+En.startStyle),En.endStyle&&Wr.to==nt&&(Sr||(Sr=[])).push(En.endStyle,Wr.to),En.title&&((yr||(yr={})).title=En.title),En.attributes)for(var Vn in En.attributes)(yr||(yr={}))[Vn]=En.attributes[Vn];En.collapsed&&(!nr||wt(nr.marker,En)<0)&&(nr=Wr)}else Wr.from>me&&nt>Wr.from&&(nt=Wr.from)}if(Sr)for(var Ci=0;Ci<Sr.length;Ci+=2)Sr[Ci+1]==nt&&(Bt+=" "+Sr[Ci]);if(!nr||nr.from==me)for(var ri=0;ri<ir.length;++ri)br(i,0,ir[ri]);if(nr&&(nr.from||0)==me){if(br(i,(nr.to==null?he+1:nr.to)-me,nr.marker,nr.from==null),nr.to==null)return;nr.to==me&&(nr=!1)}}if(me>=he)break;for(var qi=Math.min(he,nt);;){if(We){var Ji=me+We.length;if(!nr){var pi=Ji>qi?We.slice(0,qi-me):We;i.addToken(i,pi,Ye?Ye+At:At,Jt,me+pi.length==nt?Bt:"",lt,yr)}if(Ji>=qi){We=We.slice(qi-me),me=qi;break}me=Ji,Jt=""}We=U.slice($,$=D[xe++]),Ye=Nt(D[xe++],i.cm.options)}}}function Gt(e,i,D){this.line=i,this.rest=ur(i),this.size=this.rest?qr(re(this.rest))-D+1:1,this.node=this.text=null,this.hidden=$t(e,i)}function ln(e,i,D){for(var A=[],U,$=i;$<D;$=U){var oe=new Gt(e.doc,lr(e.doc,$),$);U=$+oe.size,A.push(oe)}return A}var en=null;function mr(e){en?en.ops.push(e):e.ownsGroup=en={ops:[e],delayedCallbacks:[]}}function Ir(e){var i=e.delayedCallbacks,D=0;do{for(;D<i.length;D++)i[D].call(null);for(var A=0;A<e.ops.length;A++){var U=e.ops[A];if(U.cursorActivityHandlers)for(;U.cursorActivityCalled<U.cursorActivityHandlers.length;)U.cursorActivityHandlers[U.cursorActivityCalled++].call(null,U.cm)}}while(D<i.length)}function Pr(e,i){var D=e.ownsGroup;if(!D)return;try{Ir(D)}finally{en=null,i(D)}}var Ft=null;function Qt(e,i){var D=at(e,i);if(!D.length)return;var A=Array.prototype.slice.call(arguments,2),U;en?U=en.delayedCallbacks:Ft?U=Ft:(U=Ft=[],setTimeout(vr,0));for(var $=function(he){U.push(function(){return D[he].apply(null,A)})},oe=0;oe<D.length;++oe)$(oe)}function vr(){var e=Ft;Ft=null;for(var i=0;i<e.length;++i)e[i]()}function tr(e,i,D,A){for(var U=0;U<i.changes.length;U++){var $=i.changes[U];$=="text"?Mt(e,i):$=="gutter"?on(e,i,D,A):$=="class"?Dr(e,i):$=="widget"&&un(e,i,A)}i.changes=null}function gt(e){return e.node==e.text&&(e.node=w("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),T&&b<8&&(e.node.style.zIndex=2)),e.node}function bt(e,i){var D=i.bgClass?i.bgClass+" "+(i.line.bgClass||""):i.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),i.background)D?i.background.className=D:(i.background.parentNode.removeChild(i.background),i.background=null);else if(D){var A=gt(i);i.background=A.insertBefore(w("div",null,D),A.firstChild),e.display.input.setUneditable(i.background)}}function Vt(e,i){var D=e.display.externalMeasured;return D&&D.line==i.line?(e.display.externalMeasured=null,i.measure=D.measure,D.built):qt(e,i)}function Mt(e,i){var D=i.text.className,A=Vt(e,i);i.text==i.node&&(i.node=A.pre),i.text.parentNode.replaceChild(A.pre,i.text),i.text=A.pre,A.bgClass!=i.bgClass||A.textClass!=i.textClass?(i.bgClass=A.bgClass,i.textClass=A.textClass,Dr(e,i)):D&&(i.text.className=D)}function Dr(e,i){bt(e,i),i.line.wrapClass?gt(i).className=i.line.wrapClass:i.node!=i.text&&(i.node.className="");var D=i.textClass?i.textClass+" "+(i.line.textClass||""):i.line.textClass;i.text.className=D||""}function on(e,i,D,A){if(i.gutter&&(i.node.removeChild(i.gutter),i.gutter=null),i.gutterBackground&&(i.node.removeChild(i.gutterBackground),i.gutterBackground=null),i.line.gutterClass){var U=gt(i);i.gutterBackground=w("div",null,"CodeMirror-gutter-background "+i.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(i.gutterBackground),U.insertBefore(i.gutterBackground,i.text)}var $=i.line.gutterMarkers;if(e.options.lineNumbers||$){var oe=gt(i),he=i.gutter=w("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(he),oe.insertBefore(he,i.text),i.line.gutterClass&&(he.className+=" "+i.line.gutterClass),e.options.lineNumbers&&(!$||!$["CodeMirror-linenumbers"])&&(i.lineNumber=he.appendChild(w("div",vi(e.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),$)for(var me=0;me<e.display.gutterSpecs.length;++me){var xe=e.display.gutterSpecs[me].className,We=$.hasOwnProperty(xe)&&$[xe];We&&he.appendChild(w("div",[We],"CodeMirror-gutter-elt","left: "+A.gutterLeft[xe]+"px; width: "+A.gutterWidth[xe]+"px"))}}}function un(e,i,D){i.alignable&&(i.alignable=null);for(var A=C("CodeMirror-linewidget"),U=i.node.firstChild,$=void 0;U;U=$)$=U.nextSibling,A.test(U.className)&&i.node.removeChild(U);tn(e,i,D)}function Cr(e,i,D,A){var U=Vt(e,i);return i.text=i.node=U.pre,U.bgClass&&(i.bgClass=U.bgClass),U.textClass&&(i.textClass=U.textClass),Dr(e,i),on(e,i,D,A),tn(e,i,A),i.node}function tn(e,i,D){if(jr(e,i.line,i,D,!0),i.rest)for(var A=0;A<i.rest.length;A++)jr(e,i.rest[A],i,D,!1)}function jr(e,i,D,A,U){if(!i.widgets)return;for(var $=gt(D),oe=0,he=i.widgets;oe<he.length;++oe){var me=he[oe],xe=w("div",[me.node],"CodeMirror-linewidget"+(me.className?" "+me.className:""));me.handleMouseEvents||xe.setAttribute("cm-ignore-events","true"),pn(me,xe,D,A),e.display.input.setUneditable(xe),U&&me.above?$.insertBefore(xe,D.gutter||D.text):$.appendChild(xe),Qt(me,"redraw")}}function pn(e,i,D,A){if(e.noHScroll){(D.alignable||(D.alignable=[])).push(i);var U=A.wrapperWidth;i.style.left=A.fixedPos+"px",e.coverGutter||(U-=A.gutterTotalWidth,i.style.paddingLeft=A.gutterTotalWidth+"px"),i.style.width=U+"px"}e.coverGutter&&(i.style.zIndex=5,i.style.position="relative",e.noHScroll||(i.style.marginLeft=-A.gutterTotalWidth+"px"))}function Xr(e){if(e.height!=null)return e.height;var i=e.doc.cm;if(!i)return 0;if(!L(document.body,e.node)){var D="position: relative;";e.coverGutter&&(D+="margin-left: -"+i.display.gutters.offsetWidth+"px;"),e.noHScroll&&(D+="width: "+i.display.wrapper.clientWidth+"px;"),E(i.display.measure,w("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function mn(e,i){for(var D=He(i);D!=e.wrapper;D=D.parentNode)if(!D||D.nodeType==1&&D.getAttribute("cm-ignore-events")=="true"||D.parentNode==e.sizer&&D!=e.mover)return!0}function Xn(e){return e.lineSpace.offsetTop}function Pe(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ve(e){if(e.cachedPaddingH)return e.cachedPaddingH;var i=E(e.measure,w("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(i):i.currentStyle,A={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function Qe(e){return de-e.display.nativeBarWidth}function Fe(e){return e.display.scroller.clientWidth-Qe(e)-e.display.barWidth}function be(e){return e.display.scroller.clientHeight-Qe(e)-e.display.barHeight}function De(e,i,D){var A=e.options.lineWrapping,U=A&&Fe(e);if(!i.measure.heights||A&&i.measure.width!=U){var $=i.measure.heights=[];if(A){i.measure.width=U;for(var oe=i.text.firstChild.getClientRects(),he=0;he<oe.length-1;he++){var me=oe[he],xe=oe[he+1];Math.abs(me.bottom-xe.bottom)>2&&$.push((me.bottom+xe.top)/2-D.top)}}$.push(D.bottom-D.top)}}function we(e,i,D){if(e.line==i)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==i)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var U=0;U<e.rest.length;U++)if(qr(e.rest[U])>D)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function je(e,i){i=Ot(i);var D=qr(i),A=e.display.externalMeasured=new Gt(e.doc,i,D);A.lineN=D;var U=A.built=qt(e,A);return A.text=U.pre,E(e.display.lineMeasure,U.pre),A}function Ge(e,i,D,A){return Ze(e,ze(e,i),D,A)}function Xe(e,i){if(i>=e.display.viewFrom&&i<e.display.viewTo)return e.display.view[Pn(e,i)];var D=e.display.externalMeasured;if(D&&i>=D.lineN&&i<D.lineN+D.size)return D}function ze(e,i){var D=qr(i),A=Xe(e,D);A&&!A.text?A=null:A&&A.changes&&(tr(e,A,D,Gn(e)),e.curOp.forceUpdate=!0),A||(A=je(e,i));var U=we(A,i,D);return{line:i,view:A,rect:null,map:U.map,cache:U.cache,before:U.before,hasHeights:!1}}function Ze(e,i,D,A,U){i.before&&(D=-1);var $=D+(A||""),oe;return i.cache.hasOwnProperty($)?oe=i.cache[$]:(i.rect||(i.rect=i.view.text.getBoundingClientRect()),i.hasHeights||(De(e,i.view,i.rect),i.hasHeights=!0),oe=Yt(e,i,D,A),oe.bogus||(i.cache[$]=oe)),{left:oe.left,right:oe.right,top:U?oe.rtop:oe.top,bottom:U?oe.rbottom:oe.bottom}}var pt={left:0,right:0,top:0,bottom:0};function kt(e,i,D){for(var A,U,$,oe,he,me,xe=0;xe<e.length;xe+=3)if(he=e[xe],me=e[xe+1],i<he?(U=0,$=1,oe="left"):i<me?(U=i-he,$=U+1):(xe==e.length-3||i==me&&e[xe+3]>i)&&($=me-he,U=$-1,i>=me&&(oe="right")),U!=null){if(A=e[xe+2],he==me&&D==(A.insertLeft?"left":"right")&&(oe=D),D=="left"&&U==0)for(;xe&&e[xe-2]==e[xe-3]&&e[xe-1].insertLeft;)A=e[(xe-=3)+2],oe="left";if(D=="right"&&U==me-he)for(;xe<e.length-3&&e[xe+3]==e[xe+4]&&!e[xe+5].insertLeft;)A=e[(xe+=3)+2],oe="right";break}return{node:A,start:U,end:$,collapse:oe,coverStart:he,coverEnd:me}}function jt(e,i){var D=pt;if(i=="left")for(var A=0;A<e.length&&!((D=e[A]).left!=D.right);A++);else for(var U=e.length-1;U>=0&&!((D=e[U]).left!=D.right);U--);return D}function Yt(e,i,D,A){var U=kt(i.map,D,A),$=U.node,oe=U.start,he=U.end,me=U.collapse,xe;if($.nodeType==3){for(var We=0;We<4;We++){for(;oe&&ve(i.line.text.charAt(U.coverStart+oe));)--oe;for(;U.coverStart+he<U.coverEnd&&ve(i.line.text.charAt(U.coverStart+he));)++he;if(T&&b<9&&oe==0&&he==U.coverEnd-U.coverStart?xe=$.parentNode.getBoundingClientRect():xe=jt(I($,oe,he).getClientRects(),A),xe.left||xe.right||oe==0)break;he=oe,oe=oe-1,me="right"}T&&b<11&&(xe=kr(e.display.measure,xe))}else{oe>0&&(me=A="right");var Ye;e.options.lineWrapping&&(Ye=$.getClientRects()).length>1?xe=Ye[A=="right"?Ye.length-1:0]:xe=$.getBoundingClientRect()}if(T&&b<9&&!oe&&(!xe||!xe.left&&!xe.right)){var lt=$.parentNode.getClientRects()[0];lt?xe={left:lt.left,right:lt.left+ii(e.display),top:lt.top,bottom:lt.bottom}:xe=pt}for(var nt=xe.top-i.rect.top,At=xe.bottom-i.rect.top,Bt=(nt+At)/2,Jt=i.view.measure.heights,nr=0;nr<Jt.length-1&&!(Bt<Jt[nr]);nr++);var yr=nr?Jt[nr-1]:0,ir=Jt[nr],Sr={left:(me=="right"?xe.right:xe.left)-i.rect.left,right:(me=="left"?xe.left:xe.right)-i.rect.left,top:yr,bottom:ir};return!xe.left&&!xe.right&&(Sr.bogus=!0),e.options.singleCursorHeightPerLine||(Sr.rtop=nt,Sr.rbottom=At),Sr}function kr(e,i){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Yr(e))return i;var D=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:i.left*D,right:i.right*D,top:i.top*A,bottom:i.bottom*A}}function Jr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var i=0;i<e.rest.length;i++)e.measure.caches[i]={}}function $r(e){e.display.externalMeasure=null,_(e.display.lineMeasure);for(var i=0;i<e.display.view.length;i++)Jr(e.display.view[i])}function Zr(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 Hr(){return n&&h?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function rn(){return n&&h?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function nn(e){var i=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(i+=Xr(e.widgets[D]));return i}function yn(e,i,D,A,U){if(!U){var $=nn(i);D.top+=$,D.bottom+=$}if(A=="line")return D;A||(A="local");var oe=sr(i);if(A=="local"?oe+=Xn(e.display):oe-=e.display.viewOffset,A=="page"||A=="window"){var he=e.display.lineSpace.getBoundingClientRect();oe+=he.top+(A=="window"?0:rn());var me=he.left+(A=="window"?0:Hr());D.left+=me,D.right+=me}return D.top+=oe,D.bottom+=oe,D}function cn(e,i,D){if(D=="div")return i;var A=i.left,U=i.top;if(D=="page")A-=Hr(),U-=rn();else if(D=="local"||!D){var $=e.display.sizer.getBoundingClientRect();A+=$.left,U+=$.top}var oe=e.display.lineSpace.getBoundingClientRect();return{left:A-oe.left,top:U-oe.top}}function In(e,i,D,A,U){return A||(A=lr(e.doc,i.line)),yn(e,A,Ge(e,A,i.ch,U),D)}function fn(e,i,D,A,U,$){A=A||lr(e.doc,i.line),U||(U=ze(e,A));function oe(At,Bt){var Jt=Ze(e,U,At,Bt?"right":"left",$);return Bt?Jt.left=Jt.right:Jt.right=Jt.left,yn(e,A,Jt,D)}var he=ft(A,e.doc.direction),me=i.ch,xe=i.sticky;if(me>=A.text.length?(me=A.text.length,xe="before"):me<=0&&(me=0,xe="after"),!he)return oe(xe=="before"?me-1:me,xe=="before");function We(At,Bt,Jt){var nr=he[Bt],yr=nr.level==1;return oe(Jt?At-1:At,yr!=Jt)}var Ye=ut(he,me,xe),lt=rt,nt=We(me,Ye,xe=="before");return lt!=null&&(nt.other=We(me,lt,xe!="before")),nt}function Mr(e,i){var D=0;i=K(e.doc,i),e.options.lineWrapping||(D=ii(e.display)*i.ch);var A=lr(e.doc,i.line),U=sr(A)+Xn(e.display);return{left:D,right:D,top:U,bottom:U+A.height}}function Fr(e,i,D,A,U){var $=Ut(e,i,D);return $.xRel=U,A&&($.outside=A),$}function sn(e,i,D){var A=e.doc;if(D+=e.display.viewOffset,D<0)return Fr(A.first,0,null,-1,-1);var U=Un(A,D),$=A.first+A.size-1;if(U>$)return Fr(A.first+A.size-1,lr(A,$).text.length,null,1,1);i<0&&(i=0);for(var oe=lr(A,U);;){var he=zn(e,oe,U,i,D),me=zt(oe,he.ch+(he.xRel>0||he.outside>0?1:0));if(!me)return he;var xe=me.find(1);if(xe.line==U)return xe;oe=lr(A,U=xe.line)}}function gn(e,i,D,A){A-=nn(i);var U=i.text.length,$=Je(function(oe){return Ze(e,D,oe-1).bottom<=A},U,0);return U=Je(function(oe){return Ze(e,D,oe).top>A},$,U),{begin:$,end:U}}function wr(e,i,D,A){D||(D=ze(e,i));var U=yn(e,i,Ze(e,D,A),"line").top;return gn(e,i,D,U)}function xn(e,i,D,A){return e.bottom<=D?!1:e.top>D?!0:(A?e.left:e.right)>i}function zn(e,i,D,A,U){U-=sr(i);var $=ze(e,i),oe=nn(i),he=0,me=i.text.length,xe=!0,We=ft(i,e.doc.direction);if(We){var Ye=(e.options.lineWrapping?Ln:Sn)(e,i,D,$,We,A,U);xe=Ye.level!=1,he=xe?Ye.from:Ye.to-1,me=xe?Ye.to:Ye.from-1}var lt=null,nt=null,At=Je(function(Qr){var Wr=Ze(e,$,Qr);return Wr.top+=oe,Wr.bottom+=oe,xn(Wr,A,U,!1)?(Wr.top<=U&&Wr.left<=A&&(lt=Qr,nt=Wr),!0):!1},he,me),Bt,Jt,nr=!1;if(nt){var yr=A-nt.left<nt.right-A,ir=yr==xe;At=lt+(ir?0:1),Jt=ir?"after":"before",Bt=yr?nt.left:nt.right}else{!xe&&(At==me||At==he)&&At++,Jt=At==0?"after":At==i.text.length?"before":Ze(e,$,At-(xe?1:0)).bottom+oe<=U==xe?"after":"before";var Sr=fn(e,Ut(D,At,Jt),"line",i,$);Bt=Sr.left,nr=U<Sr.top?-1:U>=Sr.bottom?1:0}return At=Re(i.text,At,1),Fr(D,At,Jt,nr,A-Bt)}function Sn(e,i,D,A,U,$,oe){var he=Je(function(Ye){var lt=U[Ye],nt=lt.level!=1;return xn(fn(e,Ut(D,nt?lt.to:lt.from,nt?"before":"after"),"line",i,A),$,oe,!0)},0,U.length-1),me=U[he];if(he>0){var xe=me.level!=1,We=fn(e,Ut(D,xe?me.from:me.to,xe?"after":"before"),"line",i,A);xn(We,$,oe,!0)&&We.top>oe&&(me=U[he-1])}return me}function Ln(e,i,D,A,U,$,oe){var he=gn(e,i,A,oe),me=he.begin,xe=he.end;/\s/.test(i.text.charAt(xe-1))&&xe--;for(var We=null,Ye=null,lt=0;lt<U.length;lt++){var nt=U[lt];if(nt.from>=xe||nt.to<=me)continue;var At=nt.level!=1,Bt=Ze(e,A,At?Math.min(xe,nt.to)-1:Math.max(me,nt.from)).right,Jt=Bt<$?$-Bt+1e9:Bt-$;(!We||Ye>Jt)&&(We=nt,Ye=Jt)}return We||(We=U[U.length-1]),We.from<me&&(We={from:me,to:We.to,level:We.level}),We.to>xe&&(We={from:We.from,to:xe,level:We.level}),We}var Cn;function Jn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Cn==null){Cn=w("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)Cn.appendChild(document.createTextNode("x")),Cn.appendChild(w("br"));Cn.appendChild(document.createTextNode("x"))}E(e.measure,Cn);var D=Cn.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),_(e.measure),D||1}function ii(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var i=w("span","xxxxxxxxxx"),D=w("pre",[i],"CodeMirror-line-like");E(e.measure,D);var A=i.getBoundingClientRect(),U=(A.right-A.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function Gn(e){for(var i=e.display,D={},A={},U=i.gutters.clientLeft,$=i.gutters.firstChild,oe=0;$;$=$.nextSibling,++oe){var he=e.display.gutterSpecs[oe].className;D[he]=$.offsetLeft+$.clientLeft+U,A[he]=$.clientWidth}return{fixedPos:fi(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:D,gutterWidth:A,wrapperWidth:i.wrapper.clientWidth}}function fi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var i=Jn(e.display),D=e.options.lineWrapping,A=D&&Math.max(5,e.display.scroller.clientWidth/ii(e.display)-3);return function(U){if($t(e.doc,U))return 0;var $=0;if(U.widgets)for(var oe=0;oe<U.widgets.length;oe++)U.widgets[oe].height&&($+=U.widgets[oe].height);return D?$+(Math.ceil(U.text.length/A)||1)*i:$+i}}function Si(e){var i=e.doc,D=Xi(e);i.iter(function(A){var U=D(A);U!=A.height&&Hn(A,U)})}function ai(e,i,D,A){var U=e.display;if(!D&&He(i).getAttribute("cm-not-content")=="true")return null;var $,oe,he=U.lineSpace.getBoundingClientRect();try{$=i.clientX-he.left,oe=i.clientY-he.top}catch(Ye){return null}var me=sn(e,$,oe),xe;if(A&&me.xRel>0&&(xe=lr(e.doc,me.line).text).length==me.ch){var We=z(xe,xe.length,e.options.tabSize)-xe.length;me=Ut(me.line,Math.max(0,Math.round(($-Ve(e.display).left)/ii(e.display))-We))}return me}function Pn(e,i){if(i>=e.display.viewTo)return null;if(i-=e.display.viewFrom,i<0)return null;for(var D=e.display.view,A=0;A<D.length;A++)if(i-=D[A].size,i<0)return A}function Mn(e,i,D,A){i==null&&(i=e.doc.first),D==null&&(D=e.doc.first+e.doc.size),A||(A=0);var U=e.display;if(A&&D<U.viewTo&&(U.updateLineNumbers==null||U.updateLineNumbers>i)&&(U.updateLineNumbers=i),e.curOp.viewChanged=!0,i>=U.viewTo)Wn&&ar(e.doc,i)<U.viewTo&&Bn(e);else if(D<=U.viewFrom)Wn&&Zt(e.doc,D+A)>U.viewFrom?Bn(e):(U.viewFrom+=A,U.viewTo+=A);else if(i<=U.viewFrom&&D>=U.viewTo)Bn(e);else if(i<=U.viewFrom){var $=ei(e,D,D+A,1);$?(U.view=U.view.slice($.index),U.viewFrom=$.lineN,U.viewTo+=A):Bn(e)}else if(D>=U.viewTo){var oe=ei(e,i,i,-1);oe?(U.view=U.view.slice(0,oe.index),U.viewTo=oe.lineN):Bn(e)}else{var he=ei(e,i,i,-1),me=ei(e,D,D+A,1);he&&me?(U.view=U.view.slice(0,he.index).concat(ln(e,he.lineN,me.lineN)).concat(U.view.slice(me.index)),U.viewTo+=A):Bn(e)}var xe=U.externalMeasured;xe&&(D<xe.lineN?xe.lineN+=A:i<xe.lineN+xe.size&&(U.externalMeasured=null))}function Kn(e,i,D){e.curOp.viewChanged=!0;var A=e.display,U=e.display.externalMeasured;if(U&&i>=U.lineN&&i<U.lineN+U.size&&(A.externalMeasured=null),i<A.viewFrom||i>=A.viewTo)return;var $=A.view[Pn(e,i)];if($.node==null)return;var oe=$.changes||($.changes=[]);ue(oe,D)==-1&&oe.push(D)}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,i,D,A){var U=Pn(e,i),$,oe=e.display.view;if(!Wn||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var he=e.display.viewFrom,me=0;me<U;me++)he+=oe[me].size;if(he!=i){if(A>0){if(U==oe.length-1)return null;$=he+oe[U].size-i,U++}else $=he-i;i+=$,D+=$}for(;ar(e.doc,D)!=D;){if(U==(A<0?0:oe.length-1))return null;D+=A*oe[U-(A<0?1:0)].size,U+=A}return{index:U,lineN:D}}function Ai(e,i,D){var A=e.display,U=A.view;U.length==0||i>=A.viewTo||D<=A.viewFrom?(A.view=ln(e,i,D),A.viewFrom=i):(A.viewFrom>i?A.view=ln(e,i,A.viewFrom).concat(A.view):A.viewFrom<i&&(A.view=A.view.slice(Pn(e,i))),A.viewFrom=i,A.viewTo<D?A.view=A.view.concat(ln(e,A.viewTo,D)):A.viewTo>D&&(A.view=A.view.slice(0,Pn(e,D)))),A.viewTo=D}function ra(e){for(var i=e.display.view,D=0,A=0;A<i.length;A++){var U=i[A];!U.hidden&&(!U.node||U.changes)&&++D}return D}function An(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fi(e,i){i===void 0&&(i=!0);for(var D=e.doc,A={},U=A.cursors=document.createDocumentFragment(),$=A.selection=document.createDocumentFragment(),oe=0;oe<D.sel.ranges.length;oe++){if(!i&&oe==D.sel.primIndex)continue;var he=D.sel.ranges[oe];if(he.from().line>=e.display.viewTo||he.to().line<e.display.viewFrom)continue;var me=he.empty();(me||e.options.showCursorWhenSelecting)&&Ui(e,he.head,U),me||On(e,he,$)}return A}function Ui(e,i,D){var A=fn(e,i,"div",null,null,!e.options.singleCursorHeightPerLine),U=D.appendChild(w("div","\xA0","CodeMirror-cursor"));if(U.style.left=A.left+"px",U.style.top=A.top+"px",U.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var $=D.appendChild(w("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$.style.display="",$.style.left=A.other.left+"px",$.style.top=A.other.top+"px",$.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function Dn(e,i){return e.top-i.top||e.left-i.left}function On(e,i,D){var A=e.display,U=e.doc,$=document.createDocumentFragment(),oe=Ve(e.display),he=oe.left,me=Math.max(A.sizerWidth,Fe(e)-A.sizer.offsetLeft)-oe.right,xe=U.direction=="ltr";function We(ir,Sr,Qr,Wr){Sr<0&&(Sr=0),Sr=Math.round(Sr),Wr=Math.round(Wr),$.appendChild(w("div",null,"CodeMirror-selected","position: absolute; left: "+ir+`px;
top: `+Sr+"px; width: "+(Qr==null?me-ir:Qr)+`px;
height: `+(Wr-Sr)+"px"))}function Ye(ir,Sr,Qr){var Wr=lr(U,ir),En=Wr.text.length,Vn,Ci;function ri(pi,Qi){return In(e,Ut(ir,pi),"div",Wr,Qi)}function qi(pi,Qi,Ii){var _i=wr(e,Wr,null,pi),mi=Qi=="ltr"==(Ii=="after")?"left":"right",oi=Ii=="after"?_i.begin:_i.end-(/\s/.test(Wr.text.charAt(_i.end-1))?2:1);return ri(oi,mi)[mi]}var Ji=ft(Wr,U.direction);return qe(Ji,Sr||0,Qr==null?En:Qr,function(pi,Qi,Ii,_i){var mi=Ii=="ltr",oi=ri(pi,mi?"left":"right"),Zi=ri(Qi-1,mi?"right":"left"),lo=Sr==null&&pi==0,Ua=Qr==null&&Qi==En,Mi=_i==0,xa=!Ji||_i==Ji.length-1;if(Zi.top-oi.top<=3){var Oi=(xe?lo:Ua)&&Mi,ps=(xe?Ua:lo)&&xa,Da=Oi?he:(mi?oi:Zi).left,Ka=ps?me:(mi?Zi:oi).right;We(Da,oi.top,Ka-Da,oi.bottom)}else{var Va,zi,uo,ms;mi?(Va=xe&&lo&&Mi?he:oi.left,zi=xe?me:qi(pi,Ii,"before"),uo=xe?he:qi(Qi,Ii,"after"),ms=xe&&Ua&&xa?me:Zi.right):(Va=xe?qi(pi,Ii,"before"):he,zi=!xe&&lo&&Mi?me:oi.right,uo=!xe&&Ua&&xa?he:Zi.left,ms=xe?qi(Qi,Ii,"after"):me),We(Va,oi.top,zi-Va,oi.bottom),oi.bottom<Zi.top&&We(he,oi.bottom,null,Zi.top),We(uo,Zi.top,ms-uo,Zi.bottom)}(!Vn||Dn(oi,Vn)<0)&&(Vn=oi),Dn(Zi,Vn)<0&&(Vn=Zi),(!Ci||Dn(oi,Ci)<0)&&(Ci=oi),Dn(Zi,Ci)<0&&(Ci=Zi)}),{start:Vn,end:Ci}}var lt=i.from(),nt=i.to();if(lt.line==nt.line)Ye(lt.line,lt.ch,nt.ch);else{var At=lr(U,lt.line),Bt=lr(U,nt.line),Jt=Ot(At)==Ot(Bt),nr=Ye(lt.line,lt.ch,Jt?At.text.length+1:null).end,yr=Ye(nt.line,Jt?0:null,nt.ch).start;Jt&&(nr.top<yr.top-2?(We(nr.right,nr.top,null,nr.bottom),We(he,yr.top,yr.left,yr.bottom)):We(nr.right,nr.top,yr.left-nr.right,nr.bottom)),nr.bottom<yr.top&&We(he,nr.bottom,null,yr.top)}D.appendChild($)}function ti(e){if(!e.state.focused)return;var i=e.display;clearInterval(i.blinker);var D=!0;i.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?i.blinker=setInterval(function(){e.hasFocus()||la(e),i.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(i.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,i){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||($e(e,"focus",e,i),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ti(e)}function la(e,i){if(e.state.delayingBlurEvent)return;e.state.focused&&($e(e,"blur",e,i),e.state.focused=!1,v(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var i=e.display,D=i.lineDiv.offsetTop,A=0;A<i.view.length;A++){var U=i.view[A],$=e.options.lineWrapping,oe=void 0,he=0;if(U.hidden)continue;if(T&&b<8){var me=U.node.offsetTop+U.node.offsetHeight;oe=me-D,D=me}else{var xe=U.node.getBoundingClientRect();oe=xe.bottom-xe.top,!$&&U.text.firstChild&&(he=U.text.firstChild.getBoundingClientRect().right-xe.left-1)}var We=U.line.height-oe;if((We>.005||We<-.005)&&(Hn(U.line,oe),Ta(U.line),U.rest))for(var Ye=0;Ye<U.rest.length;Ye++)Ta(U.rest[Ye]);if(he>e.display.sizerWidth){var lt=Math.ceil(he/ii(e.display));lt>e.display.maxLineLength&&(e.display.maxLineLength=lt,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function Ta(e){if(e.widgets)for(var i=0;i<e.widgets.length;++i){var D=e.widgets[i],A=D.node.parentNode;A&&(D.height=A.offsetHeight)}}function La(e,i,D){var A=D&&D.top!=null?Math.max(0,D.top):e.scroller.scrollTop;A=Math.floor(A-Xn(e));var U=D&&D.bottom!=null?D.bottom:A+e.wrapper.clientHeight,$=Un(i,A),oe=Un(i,U);if(D&&D.ensure){var he=D.ensure.from.line,me=D.ensure.to.line;he<$?($=he,oe=Un(i,sr(lr(i,he))+e.wrapper.clientHeight)):Math.min(me,i.lastLine())>=oe&&($=Un(i,sr(lr(i,me))-e.wrapper.clientHeight),oe=me)}return{from:$,to:Math.max(oe,$+1)}}function Ha(e,i){if(st(e,"scrollCursorIntoView"))return;var D=e.display,A=D.sizer.getBoundingClientRect(),U=null;if(i.top+A.top<0?U=!0:i.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!o){var $=w("div","\u200B",null,`position: absolute;
top: `+(i.top-D.viewOffset-Xn(e.display))+`px;
height: `+(i.bottom-i.top+Qe(e)+D.barHeight)+`px;
left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");e.display.lineSpace.appendChild($),$.scrollIntoView(U),e.display.lineSpace.removeChild($)}}function Xa(e,i,D,A){A==null&&(A=0);var U;!e.options.lineWrapping&&i==D&&(i=i.ch?Ut(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i,D=i.sticky=="before"?Ut(i.line,i.ch+1,"before"):i);for(var $=0;$<5;$++){var oe=!1,he=fn(e,i),me=!D||D==i?he:fn(e,D);U={left:Math.min(he.left,me.left),top:Math.min(he.top,me.top)-A,right:Math.max(he.left,me.left),bottom:Math.max(he.bottom,me.bottom)+A};var xe=ua(e,U),We=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(xe.scrollTop!=null&&(da(e,xe.scrollTop),Math.abs(e.doc.scrollTop-We)>1&&(oe=!0)),xe.scrollLeft!=null&&(Yi(e,xe.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(oe=!0)),!oe)break}return U}function Pa(e,i){var D=ua(e,i);D.scrollTop!=null&&da(e,D.scrollTop),D.scrollLeft!=null&&Yi(e,D.scrollLeft)}function ua(e,i){var D=e.display,A=Jn(e.display);i.top<0&&(i.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,$=be(e),oe={};i.bottom-i.top>$&&(i.bottom=i.top+$);var he=e.doc.height+Pe(D),me=i.top<A,xe=i.bottom>he-A;if(i.top<U)oe.scrollTop=me?0:i.top;else if(i.bottom>U+$){var We=Math.min(i.top,(xe?he:i.bottom)-$);We!=U&&(oe.scrollTop=We)}var Ye=e.options.fixedGutter?0:D.gutters.offsetWidth,lt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Ye,nt=Fe(e)-D.gutters.offsetWidth,At=i.right-i.left>nt;return At&&(i.right=i.left+nt),i.left<10?oe.scrollLeft=0:i.left<lt?oe.scrollLeft=Math.max(0,i.left+Ye-(At?0:10)):i.right>nt+lt-3&&(oe.scrollLeft=i.right+(At?0:10)-nt),oe}function Sa(e,i){if(i==null)return;_a(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+i}function ba(e){_a(e);var i=e.getCursor();e.curOp.scrollToPos={from:i,to:i,margin:e.options.cursorScrollMargin}}function ca(e,i,D){(i!=null||D!=null)&&_a(e),i!=null&&(e.curOp.scrollLeft=i),D!=null&&(e.curOp.scrollTop=D)}function co(e,i){_a(e),e.curOp.scrollToPos=i}function _a(e){var i=e.curOp.scrollToPos;if(i){e.curOp.scrollToPos=null;var D=Mr(e,i.from),A=Mr(e,i.to);Ca(e,D,A,i.margin)}}function Ca(e,i,D,A){var U=ua(e,{left:Math.min(i.left,D.left),top:Math.min(i.top,D.top)-A,right:Math.max(i.right,D.right),bottom:Math.max(i.bottom,D.bottom)+A});ca(e,U.scrollLeft,U.scrollTop)}function da(e,i){if(Math.abs(e.doc.scrollTop-i)<2)return;O||za(e,{top:i}),fa(e,i,!0),O&&za(e),Wa(e,100)}function fa(e,i,D){if(i=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,i)),e.display.scroller.scrollTop==i&&!D)return;e.doc.scrollTop=i,e.display.scrollbars.setScrollTop(i),e.display.scroller.scrollTop!=i&&(e.display.scroller.scrollTop=i)}function Yi(e,i,D,A){if(i=Math.max(0,Math.min(i,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?i==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-i)<2)&&!A)return;e.doc.scrollLeft=i,Tn(e),e.display.scroller.scrollLeft!=i&&(e.display.scroller.scrollLeft=i),e.display.scrollbars.setScrollLeft(i)}function na(e){var i=e.display,D=i.gutters.offsetWidth,A=Math.round(e.doc.height+Pe(e.display));return{clientHeight:i.scroller.clientHeight,viewHeight:i.wrapper.clientHeight,scrollWidth:i.scroller.scrollWidth,clientWidth:i.scroller.clientWidth,viewWidth:i.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:A,scrollHeight:A+Qe(e)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:D}}var xr=function(e,i,D){this.cm=D;var A=this.vert=w("div",[w("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=w("div",[w("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=U.tabIndex=-1,e(A),e(U),Ie(A,"scroll",function(){A.clientHeight&&i(A.scrollTop,"vertical")}),Ie(U,"scroll",function(){U.clientWidth&&i(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(e){var i=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=i?A+"px":"0";var U=e.viewHeight-(i?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+U)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=D?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var $=e.viewWidth-e.barLeft-(D?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?A:0,bottom:i?A:0}},xr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var e=l&&!a?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},xr.prototype.enableZeroWidthBar=function(e,i,D){e.style.pointerEvents="auto";function A(){var U=e.getBoundingClientRect(),$=D=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);$!=e?e.style.pointerEvents="none":i.set(1e3,A)}i.set(1e3,A)},xr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Tr=function(){};Tr.prototype.update=function(){return{bottom:0,right:0}},Tr.prototype.setScrollLeft=function(){},Tr.prototype.setScrollTop=function(){},Tr.prototype.clear=function(){};function or(e,i){i||(i=na(e));var D=e.display.barWidth,A=e.display.barHeight;wn(e,i);for(var U=0;U<4&&D!=e.display.barWidth||A!=e.display.barHeight;U++)D!=e.display.barWidth&&e.options.lineWrapping&&ka(e),wn(e,na(e)),D=e.display.barWidth,A=e.display.barHeight}function wn(e,i){var D=e.display,A=D.scrollbars.update(i);D.sizer.style.paddingRight=(D.barWidth=A.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=A.bottom)+"px",D.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=A.bottom+"px",D.scrollbarFiller.style.width=A.right+"px"):D.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=A.bottom+"px",D.gutterFiller.style.width=i.gutterWidth+"px"):D.gutterFiller.style.display=""}var hr={native:xr,null:Tr};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&v(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new hr[e.options.scrollbarStyle](function(i){e.display.wrapper.insertBefore(i,e.display.scrollbarFiller),Ie(i,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,D){D=="horizontal"?Yi(e,i):da(e,i)},e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var Ya=0;function jn(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 i=e.curOp;i&&Pr(i,function(D){for(var A=0;A<D.ops.length;A++)D.ops[A].cm.curOp=null;Io(D)})}function Io(e){for(var i=e.ops,D=0;D<i.length;D++)Jo(i[D]);for(var A=0;A<i.length;A++)Qo(i[A]);for(var U=0;U<i.length;U++)Zo(i[U]);for(var $=0;$<i.length;$++)ho(i[$]);for(var oe=0;oe<i.length;oe++)qo(i[oe])}function Jo(e){var i=e.cm,D=i.display;Do(i),e.updateMaxLine&&Ar(i),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<D.viewFrom||e.scrollToPos.to.line>=D.viewTo)||D.maxLineChanged&&i.options.lineWrapping,e.update=e.mustUpdate&&new ia(i,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var i=e.cm,D=i.display;e.updatedDisplay&&ka(i),e.barMeasure=na(i),D.maxLineChanged&&!i.options.lineWrapping&&(e.adjustWidthTo=Ge(i,D.maxLine,D.maxLine.text.length).left+3,i.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Qe(i)+i.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Fe(i))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function ho(e){var i=e.cm;e.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<i.doc.scrollLeft&&Yi(i,Math.min(i.display.scroller.scrollLeft,e.maxScrollLeft),!0),i.display.maxLineChanged=!1);var D=e.focus&&e.focus==V();e.preparedSelection&&i.display.input.showSelection(e.preparedSelection,D),(e.updatedDisplay||e.startHeight!=i.doc.height)&&or(i,e.barMeasure),e.updatedDisplay&&kn(i,e.barMeasure),e.selectionChanged&&ti(i),i.state.focused&&e.updateInput&&i.display.input.reset(e.typing),D&&Ba(e.cm)}function qo(e){var i=e.cm,D=i.display,A=i.doc;if(e.updatedDisplay&&$a(i,e.update),D.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),e.scrollTop!=null&&fa(i,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Yi(i,e.scrollLeft,!0,!0),e.scrollToPos){var U=Xa(i,K(A,e.scrollToPos.from),K(A,e.scrollToPos.to),e.scrollToPos.margin);Ha(i,U)}var $=e.maybeHiddenMarkers,oe=e.maybeUnhiddenMarkers;if($)for(var he=0;he<$.length;++he)$[he].lines.length||$e($[he],"hide");if(oe)for(var me=0;me<oe.length;++me)oe[me].lines.length&&$e(oe[me],"unhide");D.wrapper.offsetHeight&&(A.scrollTop=i.display.scroller.scrollTop),e.changeObjs&&$e(i,"changes",i,e.changeObjs),e.update&&e.update.finish()}function Bi(e,i){if(e.curOp)return i();jn(e);try{return i()}finally{Oa(e)}}function si(e,i){return function(){if(e.curOp)return i.apply(e,arguments);jn(e);try{return i.apply(e,arguments)}finally{Oa(e)}}}function Ri(e){return function(){if(this.curOp)return e.apply(this,arguments);jn(this);try{return e.apply(this,arguments)}finally{Oa(this)}}}function li(e){return function(){var i=this.cm;if(!i||i.curOp)return e.apply(this,arguments);jn(i);try{return e.apply(this,arguments)}finally{Oa(i)}}}function Wa(e,i){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(i,B(es,e))}function es(e){var i=e.doc;if(i.highlightFrontier>=e.display.viewTo)return;var D=+new Date+e.options.workTime,A=Xt(e,i.highlightFrontier),U=[];i.iter(A.line,Math.min(i.first+i.size,e.display.viewTo+500),function($){if(A.line>=e.display.viewFrom){var oe=$.styles,he=$.text.length>e.options.maxHighlightLength?an(i.mode,A.state):null,me=Ke(e,$,A,!0);he&&(A.state=he),$.styles=me.styles;var xe=$.styleClasses,We=me.classes;We?$.styleClasses=We:xe&&($.styleClasses=null);for(var Ye=!oe||oe.length!=$.styles.length||xe!=We&&(!xe||!We||xe.bgClass!=We.bgClass||xe.textClass!=We.textClass),lt=0;!Ye&&lt<oe.length;++lt)Ye=oe[lt]!=$.styles[lt];Ye&&U.push(A.line),$.stateAfter=A.save(),A.nextLine()}else $.text.length<=e.options.maxHighlightLength&&Er(e,$.text,A),$.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>D)return Wa(e,e.options.workDelay),!0}),i.highlightFrontier=A.line,i.modeFrontier=Math.max(i.modeFrontier,A.line),U.length&&Bi(e,function(){for(var $=0;$<U.length;$++)Kn(e,U[$],"text")})}var ia=function(e,i,D){var A=e.display;this.viewport=i,this.visible=La(A,e.doc,i),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Fe(e),this.force=D,this.dims=Gn(e),this.events=[]};ia.prototype.signal=function(e,i){Le(e,i)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)$e.apply(null,this.events[e])};function Do(e){var i=e.display;!i.scrollbarsClipped&&i.scroller.offsetWidth&&(i.nativeBarWidth=i.scroller.offsetWidth-i.scroller.clientWidth,i.heightForcer.style.height=Qe(e)+"px",i.sizer.style.marginBottom=-i.nativeBarWidth+"px",i.sizer.style.borderRightWidth=Qe(e)+"px",i.scrollbarsClipped=!0)}function ko(e){if(e.hasFocus())return null;var i=V();if(!i||!L(e.display.lineDiv,i))return null;var D={activeElt:i};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&L(e.display.lineDiv,A.anchorNode)&&(D.anchorNode=A.anchorNode,D.anchorOffset=A.anchorOffset,D.focusNode=A.focusNode,D.focusOffset=A.focusOffset)}return D}function Lo(e){if(!e||!e.activeElt||e.activeElt==V())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode)){var i=window.getSelection(),D=document.createRange();D.setEnd(e.anchorNode,e.anchorOffset),D.collapse(!1),i.removeAllRanges(),i.addRange(D),i.extend(e.focusNode,e.focusOffset)}}function Aa(e,i){var D=e.display,A=e.doc;if(i.editorIsHidden)return Bn(e),!1;if(!i.force&&i.visible.from>=D.viewFrom&&i.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&ra(e)==0)return!1;yi(e)&&(Bn(e),i.dims=Gn(e));var U=A.first+A.size,$=Math.max(i.visible.from-e.options.viewportMargin,A.first),oe=Math.min(U,i.visible.to+e.options.viewportMargin);D.viewFrom<$&&$-D.viewFrom<20&&($=Math.max(A.first,D.viewFrom)),D.viewTo>oe&&D.viewTo-oe<20&&(oe=Math.min(U,D.viewTo)),Wn&&($=ar(e.doc,$),oe=Zt(e.doc,oe));var he=$!=D.viewFrom||oe!=D.viewTo||D.lastWrapHeight!=i.wrapperHeight||D.lastWrapWidth!=i.wrapperWidth;Ai(e,$,oe),D.viewOffset=sr(lr(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var me=ra(e);if(!he&&me==0&&!i.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var xe=ko(e);return me>4&&(D.lineDiv.style.display="none"),Po(e,D.updateLineNumbers,i.dims),me>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Lo(xe),_(D.cursorDiv),_(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,he&&(D.lastWrapHeight=i.wrapperHeight,D.lastWrapWidth=i.wrapperWidth,Wa(e,400)),D.updateLineNumbers=null,!0}function $a(e,i){for(var D=i.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||i.oldDisplayWidth==Fe(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Pe(e.display)-be(e),D.top)}),i.visible=La(e.display,e.doc,D),i.visible.from>=e.display.viewFrom&&i.visible.to<=e.display.viewTo)break}else A&&(i.visible=La(e.display,e.doc,D));if(!Aa(e,i))break;ka(e);var U=na(e);An(e),or(e,U),kn(e,U),i.force=!1}i.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(i.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,i){var D=new ia(e,i);if(Aa(e,D)){ka(e),$a(e,D);var A=na(e);An(e),or(e,A),kn(e,A),D.finish()}}function Po(e,i,D){var A=e.display,U=e.options.lineNumbers,$=A.lineDiv,oe=$.firstChild;function he(At){var Bt=At.nextSibling;return p&&l&&e.display.currentWheelTarget==At?At.style.display="none":At.parentNode.removeChild(At),Bt}for(var me=A.view,xe=A.viewFrom,We=0;We<me.length;We++){var Ye=me[We];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=$){var lt=Cr(e,Ye,xe,D);$.insertBefore(lt,oe)}else{for(;oe!=Ye.node;)oe=he(oe);var nt=U&&i!=null&&i<=xe&&Ye.lineNumber;Ye.changes&&(ue(Ye.changes,"gutter")>-1&&(nt=!1),tr(e,Ye,xe,D)),nt&&(_(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(vi(e.options,xe)))),oe=Ye.node.nextSibling}xe+=Ye.size}for(;oe;)oe=he(oe)}function Ja(e){var i=e.gutters.offsetWidth;e.sizer.style.marginLeft=i+"px"}function kn(e,i){e.display.sizer.style.minHeight=i.docHeight+"px",e.display.heightForcer.style.top=i.docHeight+"px",e.display.gutters.style.height=i.docHeight+e.display.barHeight+Qe(e)+"px"}function Tn(e){var i=e.display,D=i.view;if(!i.alignWidgets&&(!i.gutters.firstChild||!e.options.fixedGutter))return;for(var A=fi(i)-i.scroller.scrollLeft+e.doc.scrollLeft,U=i.gutters.offsetWidth,$=A+"px",oe=0;oe<D.length;oe++)if(!D[oe].hidden){e.options.fixedGutter&&(D[oe].gutter&&(D[oe].gutter.style.left=$),D[oe].gutterBackground&&(D[oe].gutterBackground.style.left=$));var he=D[oe].alignable;if(he)for(var me=0;me<he.length;me++)he[me].style.left=$}e.options.fixedGutter&&(i.gutters.style.left=A+U+"px")}function yi(e){if(!e.options.lineNumbers)return!1;var i=e.doc,D=vi(e.options,i.first+i.size-1),A=e.display;if(D.length!=A.lineNumChars){var U=A.measure.appendChild(w("div",[w("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$=U.firstChild.offsetWidth,oe=U.offsetWidth-$;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max($,A.lineGutter.offsetWidth-oe)+1,A.lineNumWidth=A.lineNumInnerWidth+oe,A.lineNumChars=A.lineNumInnerWidth?D.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ja(e.display),!0}return!1}function Hi(e,i){for(var D=[],A=!1,U=0;U<e.length;U++){var $=e[U],oe=null;if(typeof $!="string"&&(oe=$.style,$=$.className),$=="CodeMirror-linenumbers")if(i)A=!0;else continue;D.push({className:$,style:oe})}return i&&!A&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function Ma(e){var i=e.gutters,D=e.gutterSpecs;_(i),e.lineGutter=null;for(var A=0;A<D.length;++A){var U=D[A],$=U.className,oe=U.style,he=i.appendChild(w("div",null,"CodeMirror-gutter "+$));oe&&(he.style.cssText=oe),$=="CodeMirror-linenumbers"&&(e.lineGutter=he,he.style.width=(e.lineNumWidth||1)+"px")}i.style.display=D.length?"":"none",Ja(e)}function ma(e){Ma(e.display),Mn(e),Tn(e)}function Ga(e,i,D,A){var U=this;this.input=D,U.scrollbarFiller=w("div",null,"CodeMirror-scrollbar-filler"),U.scrollbarFiller.setAttribute("cm-not-content","true"),U.gutterFiller=w("div",null,"CodeMirror-gutter-filler"),U.gutterFiller.setAttribute("cm-not-content","true"),U.lineDiv=k("div",null,"CodeMirror-code"),U.selectionDiv=w("div",null,null,"position: relative; z-index: 1"),U.cursorDiv=w("div",null,"CodeMirror-cursors"),U.measure=w("div",null,"CodeMirror-measure"),U.lineMeasure=w("div",null,"CodeMirror-measure"),U.lineSpace=k("div",[U.measure,U.lineMeasure,U.selectionDiv,U.cursorDiv,U.lineDiv],null,"position: relative; outline: none");var $=k("div",[U.lineSpace],"CodeMirror-lines");U.mover=w("div",[$],null,"position: relative"),U.sizer=w("div",[U.mover],"CodeMirror-sizer"),U.sizerWidth=null,U.heightForcer=w("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),U.gutters=w("div",null,"CodeMirror-gutters"),U.lineGutter=null,U.scroller=w("div",[U.sizer,U.heightForcer,U.gutters],"CodeMirror-scroll"),U.scroller.setAttribute("tabIndex","-1"),U.wrapper=w("div",[U.scrollbarFiller,U.gutterFiller,U.scroller],"CodeMirror"),T&&b<8&&(U.gutters.style.zIndex=-1,U.scroller.style.paddingRight=0),!p&&!(O&&s)&&(U.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(U.wrapper):e(U.wrapper)),U.viewFrom=U.viewTo=i.first,U.reportedViewFrom=U.reportedViewTo=i.first,U.view=[],U.renderedView=null,U.externalMeasured=null,U.viewOffset=0,U.lastWrapHeight=U.lastWrapWidth=0,U.updateLineNumbers=null,U.nativeBarWidth=U.barHeight=U.barWidth=0,U.scrollbarsClipped=!1,U.lineNumWidth=U.lineNumInnerWidth=U.lineNumChars=null,U.alignWidgets=!1,U.cachedCharWidth=U.cachedTextHeight=U.cachedPaddingH=null,U.maxLine=null,U.maxLineLength=0,U.maxLineChanged=!1,U.wheelDX=U.wheelDY=U.wheelStartX=U.wheelStartY=null,U.shift=!1,U.selForContextMenu=null,U.activeTouch=null,U.gutterSpecs=Hi(A.gutters,A.lineNumbers),Ma(U),D.init(U)}var Ea=0,bi=null;T?bi=-.53:O?bi=15:n?bi=-.7:r&&(bi=-1/3);function Qa(e){var i=e.wheelDeltaX,D=e.wheelDeltaY;return i==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(i=e.detail),D==null&&e.detail&&e.axis==e.VERTICAL_AXIS?D=e.detail:D==null&&(D=e.wheelDelta),{x:i,y:D}}function fo(e){var i=Qa(e);return i.x*=bi,i.y*=bi,i}function po(e,i){var D=Qa(i),A=D.x,U=D.y,$=e.display,oe=$.scroller,he=oe.scrollWidth>oe.clientWidth,me=oe.scrollHeight>oe.clientHeight;if(!(A&&he||U&&me))return;if(U&&l&&p){e:for(var xe=i.target,We=$.view;xe!=oe;xe=xe.parentNode)for(var Ye=0;Ye<We.length;Ye++)if(We[Ye].node==xe){e.display.currentWheelTarget=xe;break e}}if(A&&!O&&!c&&bi!=null){U&&me&&da(e,Math.max(0,oe.scrollTop+U*bi)),Yi(e,Math.max(0,oe.scrollLeft+A*bi)),(!U||U&&me)&&Ee(i),$.wheelStartX=null;return}if(U&&bi!=null){var lt=U*bi,nt=e.doc.scrollTop,At=nt+$.wrapper.clientHeight;lt<0?nt=Math.max(0,nt+lt-50):At=Math.min(e.doc.height,At+lt+50),za(e,{top:nt,bottom:At})}Ea<20&&($.wheelStartX==null?($.wheelStartX=oe.scrollLeft,$.wheelStartY=oe.scrollTop,$.wheelDX=A,$.wheelDY=U,setTimeout(function(){if($.wheelStartX==null)return;var Bt=oe.scrollLeft-$.wheelStartX,Jt=oe.scrollTop-$.wheelStartY,nr=Jt&&$.wheelDY&&Jt/$.wheelDY||Bt&&$.wheelDX&&Bt/$.wheelDX;if($.wheelStartX=$.wheelStartY=null,!nr)return;bi=(bi*Ea+nr)/(Ea+1),++Ea},200)):($.wheelDX+=A,$.wheelDY+=U))}var Wi=function(e,i){this.ranges=e,this.primIndex=i};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 i=0;i<this.ranges.length;i++){var D=this.ranges[i],A=e.ranges[i];if(!hi(D.anchor,A.anchor)||!hi(D.head,A.head))return!1}return!0},Wi.prototype.deepCopy=function(){for(var e=[],i=0;i<this.ranges.length;i++)e[i]=new Rn(xi(this.ranges[i].anchor),xi(this.ranges[i].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,i){i||(i=e);for(var D=0;D<this.ranges.length;D++){var A=this.ranges[D];if(_r(i,A.from())>=0&&_r(e,A.to())<=0)return D}return-1};var Rn=function(e,i){this.anchor=e,this.head=i};Rn.prototype.from=function(){return wi(this.anchor,this.head)},Rn.prototype.to=function(){return Di(this.anchor,this.head)},Rn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,i,D){var A=e&&e.options.selectionsMayTouch,U=i[D];i.sort(function(lt,nt){return _r(lt.from(),nt.from())}),D=ue(i,U);for(var $=1;$<i.length;$++){var oe=i[$],he=i[$-1],me=_r(he.to(),oe.from());if(A&&!oe.empty()?me>0:me>=0){var xe=wi(he.from(),oe.from()),We=Di(he.to(),oe.to()),Ye=he.empty()?oe.from()==oe.head:he.from()==he.head;$<=D&&--D,i.splice(--$,2,new Rn(Ye?We:xe,Ye?xe:We))}}return new Wi(i,D)}function ga(e,i){return new Wi([new Rn(e,i||e)],0)}function va(e){return e.text?Ut(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,i){if(_r(e,i.from)<0)return e;if(_r(e,i.to)<=0)return va(i);var D=e.line+i.text.length-(i.to.line-i.from.line)-1,A=e.ch;return e.line==i.to.line&&(A+=va(i).ch-i.to.ch),Ut(D,A)}function Za(e,i){for(var D=[],A=0;A<e.sel.ranges.length;A++){var U=e.sel.ranges[A];D.push(new Rn(mo(U.anchor,i),mo(U.head,i)))}return aa(e.cm,D,e.sel.primIndex)}function Mo(e,i,D){return e.line==i.line?Ut(D.line,e.ch-i.ch+D.ch):Ut(D.line+(e.line-i.line),e.ch)}function No(e,i,D){for(var A=[],U=Ut(e.first,0),$=U,oe=0;oe<i.length;oe++){var he=i[oe],me=Mo(he.from,U,$),xe=Mo(va(he),U,$);if(U=he.to,$=xe,D=="around"){var We=e.sel.ranges[oe],Ye=_r(We.head,We.anchor)<0;A[oe]=new Rn(Ye?xe:me,Ye?me:xe)}else A[oe]=new Rn(me,me)}return new Wi(A,e.sel.primIndex)}function Ra(e){e.doc.mode=gr(e.options,e.doc.modeOption),go(e)}function go(e){e.doc.iter(function(i){i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Wa(e,100),e.state.modeGen++,e.curOp&&Mn(e)}function gs(e,i){return i.from.ch==0&&i.to.ch==0&&re(i.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,i,D,A){function U(yr){return D?D[yr]:null}function $(yr,ir,Sr){fr(yr,ir,Sr,A),Qt(yr,"change",yr,i)}function oe(yr,ir){for(var Sr=[],Qr=yr;Qr<ir;++Qr)Sr.push(new Nr(xe[Qr],U(Qr),A));return Sr}var he=i.from,me=i.to,xe=i.text,We=lr(e,he.line),Ye=lr(e,me.line),lt=re(xe),nt=U(xe.length-1),At=me.line-he.line;if(i.full)e.insert(0,oe(0,xe.length)),e.remove(xe.length,e.size-xe.length);else if(gs(e,i)){var Bt=oe(0,xe.length-1);$(Ye,Ye.text,nt),At&&e.remove(he.line,At),Bt.length&&e.insert(he.line,Bt)}else if(We==Ye)if(xe.length==1)$(We,We.text.slice(0,he.ch)+lt+We.text.slice(me.ch),nt);else{var Jt=oe(1,xe.length-1);Jt.push(new Nr(lt+We.text.slice(me.ch),nt,A)),$(We,We.text.slice(0,he.ch)+xe[0],U(0)),e.insert(he.line+1,Jt)}else if(xe.length==1)$(We,We.text.slice(0,he.ch)+xe[0]+Ye.text.slice(me.ch),U(0)),e.remove(he.line+1,At);else{$(We,We.text.slice(0,he.ch)+xe[0],U(0)),$(Ye,lt+Ye.text.slice(me.ch),nt);var nr=oe(1,xe.length-1);At>1&&e.remove(he.line+1,At-1),e.insert(he.line+1,nr)}Qt(e,"change",e,i)}function Na(e,i,D){function A(U,$,oe){if(U.linked)for(var he=0;he<U.linked.length;++he){var me=U.linked[he];if(me.doc==$)continue;var xe=oe&&me.sharedHist;if(D&&!xe)continue;i(me.doc,xe),A(me.doc,U,xe)}}A(e,null,!0)}function vs(e,i){if(i.cm)throw new Error("This document is already in use.");e.doc=i,i.cm=e,Si(e),Ra(e),ys(e),e.options.lineWrapping||Ar(e),e.options.mode=i.modeOption,Mn(e)}function ys(e){(e.doc.direction=="rtl"?W:v)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Bi(e,function(){ys(e),Mn(e)})}function jo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,i){var D={from:xi(i.from),to:va(i),text:Yn(e,i.from,i.to)};return Es(e,D,i.from.line,i.to.line+1),Na(e,function(A){return Es(A,D,i.from.line,i.to.line+1)},!0),D}function bs(e){for(;e.length;){var i=re(e);if(i.ranges)e.pop();else break}}function ml(e,i){if(i)return bs(e.done),re(e.done);if(e.done.length&&!re(e.done).ranges)return re(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function _s(e,i,D,A){var U=e.history;U.undone.length=0;var $=+new Date,oe,he;if((U.lastOp==A||U.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&U.lastModTime>$-(e.cm?e.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(oe=ml(U,U.lastOp==A)))he=re(oe.changes),_r(i.from,i.to)==0&&_r(i.from,he.to)==0?he.to=va(i):oe.changes.push(rs(e,i));else{var me=re(U.done);for((!me||!me.ranges)&&Fo(e.sel,U.done),oe={changes:[rs(e,i)],generation:U.generation},U.done.push(oe);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(D),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=$,U.lastOp=U.lastSelOp=A,U.lastOrigin=U.lastSelOrigin=i.origin,he||$e(e,"historyAdded")}function gl(e,i,D,A){var U=i.charAt(0);return U=="*"||U=="+"&&D.ranges.length==A.ranges.length&&D.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,i,D,A){var U=e.history,$=A&&A.origin;D==U.lastSelOp||$&&U.lastSelOrigin==$&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==$||gl(e,$,re(U.done),i))?U.done[U.done.length-1]=i:Fo(i,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=$,U.lastSelOp=D,A&&A.clearRedo!==!1&&bs(U.undone)}function Fo(e,i){var D=re(i);D&&D.ranges&&D.equals(e)||i.push(e)}function Es(e,i,D,A){var U=i["spans_"+e.id],$=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,A),function(oe){oe.markedSpans&&((U||(U=i["spans_"+e.id]={}))[$]=oe.markedSpans),++$})}function yl(e){if(!e)return null;for(var i,D=0;D<e.length;++D)e[D].marker.explicitlyCleared?i||(i=e.slice(0,D)):i&&i.push(e[D]);return i?i.length?i:null:e}function bl(e,i){var D=i["spans_"+e.id];if(!D)return null;for(var A=[],U=0;U<i.text.length;++U)A.push(yl(D[U]));return A}function xs(e,i){var D=bl(e,i),A=Li(e,i);if(!D)return A;if(!A)return D;for(var U=0;U<D.length;++U){var $=D[U],oe=A[U];if($&&oe){e:for(var he=0;he<oe.length;++he){for(var me=oe[he],xe=0;xe<$.length;++xe)if($[xe].marker==me.marker)continue e;$.push(me)}}else oe&&(D[U]=oe)}return D}function qa(e,i,D){for(var A=[],U=0;U<e.length;++U){var $=e[U];if($.ranges){A.push(D?Wi.prototype.deepCopy.call($):$);continue}var oe=$.changes,he=[];A.push({changes:he});for(var me=0;me<oe.length;++me){var xe=oe[me],We=void 0;if(he.push({from:xe.from,to:xe.to,text:xe.text}),i)for(var Ye in xe)(We=Ye.match(/^spans_(\d+)$/))&&(ue(i,Number(We[1]))>-1&&(re(he)[Ye]=xe[Ye],delete xe[Ye]))}}return A}function ns(e,i,D,A){if(A){var U=e.anchor;if(D){var $=_r(i,U)<0;$!=_r(D,U)<0?(U=i,i=D):$!=_r(i,D)<0&&(i=D)}return new Rn(U,i)}else return new Rn(D||i,i)}function Uo(e,i,D,A,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),Pi(e,new Wi([ns(e.sel.primary(),i,D,U)],0),A)}function ws(e,i,D){for(var A=[],U=e.cm&&(e.cm.display.shift||e.extend),$=0;$<e.sel.ranges.length;$++)A[$]=ns(e.sel.ranges[$],i[$],null,U);var oe=aa(e.cm,A,e.sel.primIndex);Pi(e,oe,D)}function is(e,i,D,A){var U=e.sel.ranges.slice(0);U[i]=D,Pi(e,aa(e.cm,U,e.sel.primIndex),A)}function Ts(e,i,D,A){Pi(e,ga(i,D),A)}function _l(e,i,D){var A={ranges:i.ranges,update:function(U){this.ranges=[];for(var $=0;$<U.length;$++)this.ranges[$]=new Rn(K(e,U[$].anchor),K(e,U[$].head))},origin:D&&D.origin};return $e(e,"beforeSelectionChange",e,A),e.cm&&$e(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=i.ranges?aa(e.cm,A.ranges,A.ranges.length-1):i}function Ss(e,i,D){var A=e.history.done,U=re(A);U&&U.ranges?(A[A.length-1]=i,Bo(e,i,D)):Pi(e,i,D)}function Pi(e,i,D){Bo(e,i,D),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,D)}function Bo(e,i,D){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(i=_l(e,i,D));var A=D&&D.bias||(_r(i.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,i,A,!0)),!(D&&D.scroll===!1)&&e.cm&&ba(e.cm)}function Cs(e,i){if(i.equals(e.sel))return;e.sel=i,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ue(e.cm)),Qt(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,i,D,A){for(var U,$=0;$<i.ranges.length;$++){var oe=i.ranges[$],he=i.ranges.length==e.sel.ranges.length&&e.sel.ranges[$],me=Ho(e,oe.anchor,he&&he.anchor,D,A),xe=Ho(e,oe.head,he&&he.head,D,A);(U||me!=oe.anchor||xe!=oe.head)&&(U||(U=i.ranges.slice(0,$)),U[$]=new Rn(me,xe))}return U?aa(e.cm,U,i.primIndex):i}function eo(e,i,D,A,U){var $=lr(e,i.line);if($.markedSpans)for(var oe=0;oe<$.markedSpans.length;++oe){var he=$.markedSpans[oe],me=he.marker,xe="selectLeft"in me?!me.selectLeft:me.inclusiveLeft,We="selectRight"in me?!me.selectRight:me.inclusiveRight;if((he.from==null||(xe?he.from<=i.ch:he.from<i.ch))&&(he.to==null||(We?he.to>=i.ch:he.to>i.ch))){if(U&&($e(me,"beforeCursorEnter"),me.explicitlyCleared))if($.markedSpans){--oe;continue}else break;if(!me.atomic)continue;if(D){var Ye=me.find(A<0?1:-1),lt=void 0;if((A<0?We:xe)&&(Ye=Rs(e,Ye,-A,Ye&&Ye.line==i.line?$:null)),Ye&&Ye.line==i.line&&(lt=_r(Ye,D))&&(A<0?lt<0:lt>0))return eo(e,Ye,i,A,U)}var nt=me.find(A<0?-1:1);return(A<0?xe:We)&&(nt=Rs(e,nt,A,nt.line==i.line?$:null)),nt?eo(e,nt,i,A,U):null}}return i}function Ho(e,i,D,A,U){var $=A||1,oe=eo(e,i,D,$,U)||!U&&eo(e,i,D,$,!0)||eo(e,i,D,-$,U)||!U&&eo(e,i,D,-$,!0);return oe||(e.cantEdit=!0,Ut(e.first,0))}function Rs(e,i,D,A){return D<0&&i.ch==0?i.line>e.first?K(e,Ut(i.line-1)):null:D>0&&i.ch==(A||lr(e,i.line)).text.length?i.line<e.first+e.size-1?Ut(i.line+1,0):null:new Ut(i.line,i.ch+D)}function Is(e){e.setSelection(Ut(e.firstLine(),0),Ut(e.lastLine()),Ae)}function Ds(e,i,D){var A={canceled:!1,from:i.from,to:i.to,text:i.text,origin:i.origin,cancel:function(){return A.canceled=!0}};return D&&(A.update=function(U,$,oe,he){U&&(A.from=K(e,U)),$&&(A.to=K(e,$)),oe&&(A.text=oe),he!==void 0&&(A.origin=he)}),$e(e,"beforeChange",e,A),e.cm&&$e(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function to(e,i,D){if(e.cm){if(!e.cm.curOp)return si(e.cm,to)(e,i,D);if(e.cm.state.suppressEdits)return}if((Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))&&(i=Ds(e,i,!0),!i))return;var A=Gi&&!D&&ji(e,i.from,i.to);if(A)for(var U=A.length-1;U>=0;--U)ks(e,{from:A[U].from,to:A[U].to,text:U?[""]:i.text,origin:i.origin});else ks(e,i)}function ks(e,i){if(i.text.length==1&&i.text[0]==""&&_r(i.from,i.to)==0)return;var D=Za(e,i);_s(e,i,D,e.cm?e.cm.curOp.id:NaN),vo(e,i,D,Li(e,i));var A=[];Na(e,function(U,$){!$&&ue(A,U.history)==-1&&(Ns(U.history,i),A.push(U.history)),vo(U,i,null,Li(U,i))})}function Wo(e,i,D){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!D)return;for(var U=e.history,$,oe=e.sel,he=i=="undo"?U.done:U.undone,me=i=="undo"?U.undone:U.done,xe=0;xe<he.length&&!($=he[xe],D?$.ranges&&!$.equals(e.sel):!$.ranges);xe++);if(xe==he.length)return;for(U.lastOrigin=U.lastSelOrigin=null;;)if($=he.pop(),$.ranges){if(Fo($,me),D&&!$.equals(e.sel)){Pi(e,$,{clearRedo:!1});return}oe=$}else if(A){he.push($);return}else break;var We=[];Fo(oe,me),me.push({changes:We,generation:U.generation}),U.generation=$.generation||++U.maxGeneration;for(var Ye=Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"),lt=function(Bt){var Jt=$.changes[Bt];if(Jt.origin=i,Ye&&!Ds(e,Jt,!1))return he.length=0,{};We.push(rs(e,Jt));var nr=Bt?Za(e,Jt):re(he);vo(e,Jt,nr,xs(e,Jt)),!Bt&&e.cm&&e.cm.scrollIntoView({from:Jt.from,to:va(Jt)});var yr=[];Na(e,function(ir,Sr){!Sr&&ue(yr,ir.history)==-1&&(Ns(ir.history,Jt),yr.push(ir.history)),vo(ir,Jt,null,xs(ir,Jt))})},nt=$.changes.length-1;nt>=0;--nt){var At=lt(nt);if(At)return At.v}}function Ls(e,i){if(i==0)return;if(e.first+=i,e.sel=new Wi(fe(e.sel.ranges,function(U){return new Rn(Ut(U.anchor.line+i,U.anchor.ch),Ut(U.head.line+i,U.head.ch))}),e.sel.primIndex),e.cm){Mn(e.cm,e.first,e.first-i,i);for(var D=e.cm.display,A=D.viewFrom;A<D.viewTo;A++)Kn(e.cm,A,"gutter")}}function vo(e,i,D,A){if(e.cm&&!e.cm.curOp)return si(e.cm,vo)(e,i,D,A);if(i.to.line<e.first){Ls(e,i.text.length-1-(i.to.line-i.from.line));return}if(i.from.line>e.lastLine())return;if(i.from.line<e.first){var U=i.text.length-1-(e.first-i.from.line);Ls(e,U),i={from:Ut(e.first,0),to:Ut(i.to.line+U,i.to.ch),text:[re(i.text)],origin:i.origin}}var $=e.lastLine();i.to.line>$&&(i={from:i.from,to:Ut($,lr(e,$).text.length),text:[i.text[0]],origin:i.origin}),i.removed=Yn(e,i.from,i.to),D||(D=Za(e,i)),e.cm?El(e.cm,i,A):ts(e,i,A),Bo(e,D,Ae),e.cantEdit&&Ho(e,Ut(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,i,D){var A=e.doc,U=e.display,$=i.from,oe=i.to,he=!1,me=$.line;e.options.lineWrapping||(me=qr(Ot(lr(A,$.line))),A.iter(me,oe.line+1,function(nt){if(nt==U.maxLine)return he=!0,!0})),A.sel.contains(i.from,i.to)>-1&&Ue(e),ts(A,i,D,Xi(e)),e.options.lineWrapping||(A.iter(me,$.line+i.text.length,function(nt){var At=ot(nt);At>U.maxLineLength&&(U.maxLine=nt,U.maxLineLength=At,U.maxLineChanged=!0,he=!1)}),he&&(e.curOp.updateMaxLine=!0)),Ni(A,$.line),Wa(e,400);var xe=i.text.length-(oe.line-$.line)-1;i.full?Mn(e):$.line==oe.line&&i.text.length==1&&!gs(e.doc,i)?Kn(e,$.line,"text"):Mn(e,$.line,oe.line+1,xe);var We=Le(e,"changes"),Ye=Le(e,"change");if(Ye||We){var lt={from:$,to:oe,text:i.text,removed:i.removed,origin:i.origin};Ye&&Qt(e,"change",e,lt),We&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(lt)}e.display.selForContextMenu=null}function ro(e,i,D,A,U){var $;A||(A=D),_r(A,D)<0&&($=[A,D],D=$[0],A=$[1]),typeof i=="string"&&(i=e.splitLines(i)),to(e,{from:D,to:A,text:i,origin:U})}function Ps(e,i,D,A){D<e.line?e.line+=A:i<e.line&&(e.line=i,e.ch=0)}function Ms(e,i,D,A){for(var U=0;U<e.length;++U){var $=e[U],oe=!0;if($.ranges){$.copied||($=e[U]=$.deepCopy(),$.copied=!0);for(var he=0;he<$.ranges.length;he++)Ps($.ranges[he].anchor,i,D,A),Ps($.ranges[he].head,i,D,A);continue}for(var me=0;me<$.changes.length;++me){var xe=$.changes[me];if(D<xe.from.line)xe.from=Ut(xe.from.line+A,xe.from.ch),xe.to=Ut(xe.to.line+A,xe.to.ch);else if(i<=xe.to.line){oe=!1;break}}oe||(e.splice(0,U+1),U=0)}}function Ns(e,i){var D=i.from.line,A=i.to.line,U=i.text.length-(A-D)-1;Ms(e.done,D,A,U),Ms(e.undone,D,A,U)}function yo(e,i,D,A){var U=i,$=i;return typeof i=="number"?$=lr(e,le(e,i)):U=qr(i),U==null?null:(A($,U)&&e.cm&&Kn(e.cm,U,D),$)}function bo(e){this.lines=e,this.parent=null;for(var i=0,D=0;D<e.length;++D)e[D].parent=this,i+=e[D].height;this.height=i}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,i){for(var D=e,A=e+i;D<A;++D){var U=this.lines[D];this.height-=U.height,_t(U),Qt(U,"delete")}this.lines.splice(e,i)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,i,D){this.height+=D,this.lines=this.lines.slice(0,e).concat(i).concat(this.lines.slice(e));for(var A=0;A<i.length;++A)i[A].parent=this},iterN:function(e,i,D){for(var A=e+i;e<A;++e)if(D(this.lines[e]))return!0}};function _o(e){this.children=e;for(var i=0,D=0,A=0;A<e.length;++A){var U=e[A];i+=U.chunkSize(),D+=U.height,U.parent=this}this.size=i,this.height=D,this.parent=null}_o.prototype={chunkSize:function(){return this.size},removeInner:function(e,i){this.size-=i;for(var D=0;D<this.children.length;++D){var A=this.children[D],U=A.chunkSize();if(e<U){var $=Math.min(i,U-e),oe=A.height;if(A.removeInner(e,$),this.height-=oe-A.height,U==$&&(this.children.splice(D--,1),A.parent=null),(i-=$)==0)break;e=0}else e-=U}if(this.size-i<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var he=[];this.collapse(he),this.children=[new bo(he)],this.children[0].parent=this}},collapse:function(e){for(var i=0;i<this.children.length;++i)this.children[i].collapse(e)},insertInner:function(e,i,D){this.size+=i.length,this.height+=D;for(var A=0;A<this.children.length;++A){var U=this.children[A],$=U.chunkSize();if(e<=$){if(U.insertInner(e,i,D),U.lines&&U.lines.length>50){for(var oe=U.lines.length%25+25,he=oe;he<U.lines.length;){var me=new bo(U.lines.slice(he,he+=25));U.height-=me.height,this.children.splice(++A,0,me),me.parent=this}U.lines=U.lines.slice(0,oe),this.maybeSpill()}break}e-=$}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var i=e.children.splice(e.children.length-5,5),D=new _o(i);if(e.parent){e.size-=D.size,e.height-=D.height;var U=ue(e.parent.children,e);e.parent.children.splice(U+1,0,D)}else{var A=new _o(e.children);A.parent=e,e.children=[A,D],e=A}D.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,i,D){for(var A=0;A<this.children.length;++A){var U=this.children[A],$=U.chunkSize();if(e<$){var oe=Math.min(i,$-e);if(U.iterN(e,oe,D))return!0;if((i-=oe)==0)break;e=0}else e-=$}}};var Eo=function(e,i,D){if(D)for(var A in D)D.hasOwnProperty(A)&&(this[A]=D[A]);this.doc=e,this.node=i};Eo.prototype.clear=function(){var e=this.doc.cm,i=this.line.widgets,D=this.line,A=qr(D);if(A==null||!i)return;for(var U=0;U<i.length;++U)i[U]==this&&i.splice(U--,1);i.length||(D.widgets=null);var $=Xr(this);Hn(D,Math.max(0,D.height-$)),e&&(Bi(e,function(){js(e,D,-$),Kn(e,A,"widget")}),Qt(e,"lineWidgetCleared",e,this,A))},Eo.prototype.changed=function(){var e=this,i=this.height,D=this.doc.cm,A=this.line;this.height=null;var U=Xr(this)-i;if(!U)return;$t(this.doc,A)||Hn(A,A.height+U),D&&Bi(D,function(){D.curOp.forceUpdate=!0,js(D,A,U),Qt(D,"lineWidgetChanged",D,e,qr(A))})},Me(Eo);function js(e,i,D){sr(i)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,D)}function xl(e,i,D,A){var U=new Eo(e,D,A),$=e.cm;return $&&U.noHScroll&&($.display.alignWidgets=!0),yo(e,i,"widget",function(oe){var he=oe.widgets||(oe.widgets=[]);if(U.insertAt==null?he.push(U):he.splice(Math.min(he.length-1,Math.max(0,U.insertAt)),0,U),U.line=oe,$&&!$t(e,oe)){var me=sr(oe)<e.scrollTop;Hn(oe,oe.height+Xr(U)),me&&Sa($,U.height),$.curOp.forceUpdate=!0}return!0}),$&&Qt($,"lineWidgetAdded",$,U,typeof i=="number"?i:qr(i)),U}var Fs=0,ja=function(e,i){this.lines=[],this.type=i,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,i=e&&!e.curOp;if(i&&jn(e),Le(this,"clear")){var D=this.find();D&&Qt(this,"clear",D.from,D.to)}for(var A=null,U=null,$=0;$<this.lines.length;++$){var oe=this.lines[$],he=ni(oe.markedSpans,this);e&&!this.collapsed?Kn(e,qr(oe),"text"):e&&(he.to!=null&&(U=qr(oe)),he.from!=null&&(A=qr(oe))),oe.markedSpans=ea(oe.markedSpans,he),he.from==null&&this.collapsed&&!$t(this.doc,oe)&&e&&Hn(oe,Jn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var me=0;me<this.lines.length;++me){var xe=Ot(this.lines[me]),We=ot(xe);We>e.display.maxLineLength&&(e.display.maxLine=xe,e.display.maxLineLength=We,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Mn(e,A,U+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,A,U),i&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,i){e==null&&this.type=="bookmark"&&(e=1);for(var D,A,U=0;U<this.lines.length;++U){var $=this.lines[U],oe=ni($.markedSpans,this);if(oe.from!=null&&(D=Ut(i?$:qr($),oe.from),e==-1))return D;if(oe.to!=null&&(A=Ut(i?$:qr($),oe.to),e==1))return A}return D&&{from:D,to:A}},ja.prototype.changed=function(){var e=this,i=this.find(-1,!0),D=this,A=this.doc.cm;if(!i||!A)return;Bi(A,function(){var U=i.line,$=qr(i.line),oe=Xe(A,$);if(oe&&(Jr(oe),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!$t(D.doc,U)&&D.height!=null){var he=D.height;D.height=null;var me=Xr(D)-he;me&&Hn(U,U.height+me)}Qt(A,"markerChanged",A,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(!i.maybeHiddenMarkers||ue(i.maybeHiddenMarkers,this)==-1)&&(i.maybeUnhiddenMarkers||(i.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 i=this.doc.cm.curOp;(i.maybeHiddenMarkers||(i.maybeHiddenMarkers=[])).push(this)}},Me(ja);function no(e,i,D,A,U){if(A&&A.shared)return wl(e,i,D,A,U);if(e.cm&&!e.cm.curOp)return si(e.cm,no)(e,i,D,A,U);var $=new ja(e,U),oe=_r(i,D);if(A&&P(A,$,!1),oe>0||oe==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=k("span",[$.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(ht(e,i.line,i,D,$)||i.line!=D.line&&ht(e,D.line,i,D,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ki()}$.addToHistory&&_s(e,{from:i,to:D,origin:"markText"},e.sel,NaN);var he=i.line,me=e.cm,xe;if(e.iter(he,D.line+1,function(Ye){me&&$.collapsed&&!me.options.lineWrapping&&Ot(Ye)==me.display.maxLine&&(xe=!0),$.collapsed&&he!=i.line&&Hn(Ye,0),Vi(Ye,new ki($,he==i.line?i.ch:null,he==D.line?D.ch:null)),++he}),$.collapsed&&e.iter(i.line,D.line+1,function(Ye){$t(e,Ye)&&Hn(Ye,0)}),$.clearOnEnter&&Ie($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(Ti(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),$.collapsed&&($.id=++Fs,$.atomic=!0),me){if(xe&&(me.curOp.updateMaxLine=!0),$.collapsed)Mn(me,i.line,D.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var We=i.line;We<=D.line;We++)Kn(me,We,"text");$.atomic&&Os(me.doc),Qt(me,"markerAdded",me,$)}return $}var xo=function(e,i){this.markers=e,this.primary=i;for(var D=0;D<e.length;++D)e[D].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,i){return this.primary.find(e,i)},Me(xo);function wl(e,i,D,A,U){A=P(A),A.shared=!1;var $=[no(e,i,D,A,U)],oe=$[0],he=A.widgetNode;return Na(e,function(me){he&&(A.widgetNode=he.cloneNode(!0)),$.push(no(me,K(me,i),K(me,D),A,U));for(var xe=0;xe<me.linked.length;++xe)if(me.linked[xe].isParent)return;oe=re($)}),new xo($,oe)}function Us(e){return e.findMarks(Ut(e.first,0),e.clipPos(Ut(e.lastLine())),function(i){return i.parent})}function Tl(e,i){for(var D=0;D<i.length;D++){var A=i[D],U=A.find(),$=e.clipPos(U.from),oe=e.clipPos(U.to);if(_r($,oe)){var he=no(e,$,oe,A.primary,A.primary.type);A.markers.push(he),he.parent=A}}}function Sl(e){for(var i=function(A){var U=e[A],$=[U.primary.doc];Na(U.primary.doc,function(me){return $.push(me)});for(var oe=0;oe<U.markers.length;oe++){var he=U.markers[oe];ue($,he.doc)==-1&&(he.parent=null,U.markers.splice(oe--,1))}},D=0;D<e.length;D++)i(D)}var Cl=0,$i=function(e,i,D,A,U){if(!(this instanceof $i))return new $i(e,i,D,A,U);D==null&&(D=0),_o.call(this,[new bo([new Nr("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var $=Ut(D,0);this.sel=ga($),this.history=new jo(null),this.id=++Cl,this.modeOption=i,this.lineSep=A,this.direction=U=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:$,to:$,text:e}),Pi(this,ga($),Ae)};$i.prototype=Te(_o.prototype,{constructor:$i,iter:function(e,i,D){D?this.iterN(e-this.first,i-e,D):this.iterN(this.first,this.first+this.size,e)},insert:function(e,i){for(var D=0,A=0;A<i.length;++A)D+=i[A].height;this.insertInner(e-this.first,i,D)},remove:function(e,i){this.removeInner(e-this.first,i)},getValue:function(e){var i=ci(this,this.first,this.first+this.size);return e===!1?i:i.join(e||this.lineSeparator())},setValue:li(function(e){var i=Ut(this.first,0),D=this.first+this.size-1;to(this,{from:i,to:Ut(D,lr(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ca(this.cm,0,0),Pi(this,ga(i),Ae)}),replaceRange:function(e,i,D,A){i=K(this,i),D=D?K(this,D):i,ro(this,e,i,D,A)},getRange:function(e,i,D){var A=Yn(this,K(this,e),K(this,i));return D===!1?A:A.join(D||this.lineSeparator())},getLine:function(e){var i=this.getLineHandle(e);return i&&i.text},getLineHandle:function(e){if(di(this,e))return lr(this,e)},getLineNumber:function(e){return qr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=lr(this,e)),Ot(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return K(this,e)},getCursor:function(e){var i=this.sel.primary(),D;return e==null||e=="head"?D=i.head:e=="anchor"?D=i.anchor:e=="end"||e=="to"||e===!1?D=i.to():D=i.from(),D},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:li(function(e,i,D){Ts(this,K(this,typeof e=="number"?Ut(e,i||0):e),null,D)}),setSelection:li(function(e,i,D){Ts(this,K(this,e),K(this,i||e),D)}),extendSelection:li(function(e,i,D){Uo(this,K(this,e),i&&K(this,i),D)}),extendSelections:li(function(e,i){ws(this,ee(this,e),i)}),extendSelectionsBy:li(function(e,i){var D=fe(this.sel.ranges,e);ws(this,ee(this,D),i)}),setSelections:li(function(e,i,D){if(!e.length)return;for(var A=[],U=0;U<e.length;U++)A[U]=new Rn(K(this,e[U].anchor),K(this,e[U].head));i==null&&(i=Math.min(e.length-1,this.sel.primIndex)),Pi(this,aa(this.cm,A,i),D)}),addSelection:li(function(e,i,D){var A=this.sel.ranges.slice(0);A.push(new Rn(K(this,e),K(this,i||e))),Pi(this,aa(this.cm,A,A.length-1),D)}),getSelection:function(e){for(var i=this.sel.ranges,D,A=0;A<i.length;A++){var U=Yn(this,i[A].from(),i[A].to());D=D?D.concat(U):U}return e===!1?D:D.join(e||this.lineSeparator())},getSelections:function(e){for(var i=[],D=this.sel.ranges,A=0;A<D.length;A++){var U=Yn(this,D[A].from(),D[A].to());e!==!1&&(U=U.join(e||this.lineSeparator())),i[A]=U}return i},replaceSelection:function(e,i,D){for(var A=[],U=0;U<this.sel.ranges.length;U++)A[U]=e;this.replaceSelections(A,i,D||"+input")},replaceSelections:li(function(e,i,D){for(var A=[],U=this.sel,$=0;$<U.ranges.length;$++){var oe=U.ranges[$];A[$]={from:oe.from(),to:oe.to(),text:this.splitLines(e[$]),origin:D}}for(var he=i&&i!="end"&&No(this,A,i),me=A.length-1;me>=0;me--)to(this,A[me]);he?Ss(this,he):this.cm&&ba(this.cm)}),undo:li(function(){Wo(this,"undo")}),redo:li(function(){Wo(this,"redo")}),undoSelection:li(function(){Wo(this,"undo",!0)}),redoSelection:li(function(){Wo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,i=0,D=0,A=0;A<e.done.length;A++)e.done[A].ranges||++i;for(var U=0;U<e.undone.length;U++)e.undone[U].ranges||++D;return{undo:i,redo:D}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Na(this,function(i){return i.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qa(this.history.done),undone:qa(this.history.undone)}},setHistory:function(e){var i=this.history=new jo(this.history.maxGeneration);i.done=qa(e.done.slice(0),null,!0),i.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:li(function(e,i,D){return yo(this,e,"gutter",function(A){var U=A.gutterMarkers||(A.gutterMarkers={});return U[i]=D,!D&&Q(U)&&(A.gutterMarkers=null),!0})}),clearGutter:li(function(e){var i=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[e]&&yo(i,D,"gutter",function(){return D.gutterMarkers[e]=null,Q(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(e){var i;if(typeof e=="number"){if(!di(this,e))return null;if(i=e,e=lr(this,e),!e)return null}else if(i=qr(e),i==null)return null;return{line:i,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:li(function(e,i,D){return yo(this,e,i=="gutter"?"gutter":"class",function(A){var U=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass";if(!A[U])A[U]=D;else{if(C(D).test(A[U]))return!1;A[U]+=" "+D}return!0})}),removeLineClass:li(function(e,i,D){return yo(this,e,i=="gutter"?"gutter":"class",function(A){var U=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass",$=A[U];if($)if(D==null)A[U]=null;else{var oe=$.match(C(D));if(!oe)return!1;var he=oe.index+oe[0].length;A[U]=$.slice(0,oe.index)+(!oe.index||he==$.length?"":" ")+$.slice(he)||null}else return!1;return!0})}),addLineWidget:li(function(e,i,D){return xl(this,e,i,D)}),removeLineWidget:function(e){e.clear()},markText:function(e,i,D){return no(this,K(this,e),K(this,i),D,D&&D.type||"range")},setBookmark:function(e,i){var D={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:!1,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};return e=K(this,e),no(this,e,e,D,"bookmark")},findMarksAt:function(e){e=K(this,e);var i=[],D=lr(this,e.line).markedSpans;if(D)for(var A=0;A<D.length;++A){var U=D[A];(U.from==null||U.from<=e.ch)&&(U.to==null||U.to>=e.ch)&&i.push(U.marker.parent||U.marker)}return i},findMarks:function(e,i,D){e=K(this,e),i=K(this,i);var A=[],U=e.line;return this.iter(e.line,i.line+1,function($){var oe=$.markedSpans;if(oe)for(var he=0;he<oe.length;he++){var me=oe[he];!(me.to!=null&&U==e.line&&e.ch>=me.to||me.from==null&&U!=e.line||me.from!=null&&U==i.line&&me.from>=i.ch)&&(!D||D(me.marker))&&A.push(me.marker.parent||me.marker)}++U}),A},getAllMarks:function(){var e=[];return this.iter(function(i){var D=i.markedSpans;if(D)for(var A=0;A<D.length;++A)D[A].from!=null&&e.push(D[A].marker)}),e},posFromIndex:function(e){var i,D=this.first,A=this.lineSeparator().length;return this.iter(function(U){var $=U.text.length+A;if($>e)return i=e,!0;e-=$,++D}),K(this,Ut(D,i))},indexFromPos:function(e){e=K(this,e);var i=e.ch;if(e.line<this.first||e.ch<0)return 0;var D=this.lineSeparator().length;return this.iter(this.first,e.line,function(A){i+=A.text.length+D}),i},copy:function(e){var i=new $i(ci(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return i.scrollTop=this.scrollTop,i.scrollLeft=this.scrollLeft,i.sel=this.sel,i.extend=!1,e&&(i.history.undoDepth=this.history.undoDepth,i.setHistory(this.getHistory())),i},linkedDoc:function(e){e||(e={});var i=this.first,D=this.first+this.size;e.from!=null&&e.from>i&&(i=e.from),e.to!=null&&e.to<D&&(D=e.to);var A=new $i(ci(this,i,D),e.mode||this.modeOption,i,this.lineSep,this.direction);return e.sharedHist&&(A.history=this.history),(this.linked||(this.linked=[])).push({doc:A,sharedHist:e.sharedHist}),A.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(A,Us(this)),A},unlinkDoc:function(e){if(e instanceof Qn&&(e=e.doc),this.linked)for(var i=0;i<this.linked.length;++i){var D=this.linked[i];if(D.doc!=e)continue;this.linked.splice(i,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var A=[e.id];Na(e,function(U){return A.push(U.id)},!0),e.history=new jo(null),e.history.done=qa(this.history.done,A),e.history.undone=qa(this.history.undone,A)}},iterLinkedDocs:function(e){Na(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:li(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(i){return i.order=null}),this.cm&&pl(this.cm)})}),$i.prototype.eachLine=$i.prototype.iter;var Bs=0;function Ol(e){var i=this;if(Hs(i),st(i,e)||mn(i.display,e))return;Ee(e),T&&(Bs=+new Date);var D=ai(i,e,!0),A=e.dataTransfer.files;if(!D||i.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var U=A.length,$=Array(U),oe=0,he=function(){++oe==U&&si(i,function(){D=K(i.doc,D);var nt={from:D,to:D,text:i.doc.splitLines($.filter(function(At){return At!=null}).join(i.doc.lineSeparator())),origin:"paste"};to(i.doc,nt),Ss(i.doc,ga(K(i.doc,D),K(i.doc,va(nt))))})()},me=function(nt,At){if(i.options.allowDropFileTypes&&ue(i.options.allowDropFileTypes,nt.type)==-1){he();return}var Bt=new FileReader;Bt.onerror=function(){return he()},Bt.onload=function(){var Jt=Bt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Jt)){he();return}$[At]=Jt,he()},Bt.readAsText(nt)},xe=0;xe<A.length;xe++)me(A[xe],xe);else{if(i.state.draggingText&&i.doc.sel.contains(D)>-1){i.state.draggingText(e),setTimeout(function(){return i.display.input.focus()},20);return}try{var We=e.dataTransfer.getData("Text");if(We){var Ye;if(i.state.draggingText&&!i.state.draggingText.copy&&(Ye=i.listSelections()),Bo(i.doc,ga(D,D)),Ye)for(var lt=0;lt<Ye.length;++lt)ro(i.doc,"",Ye[lt].anchor,Ye[lt].head,"drag");i.replaceSelection(We,"around","paste"),i.display.input.focus()}}catch(nt){}}}function Al(e,i){if(T&&(!e.state.draggingText||+new Date-Bs<100)){Ne(i);return}if(st(e,i)||mn(e.display,i))return;if(i.dataTransfer.setData("Text",e.getSelection()),i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setDragImage&&!r){var D=w("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(D.width=D.height=1,e.display.wrapper.appendChild(D),D._top=D.offsetTop),i.dataTransfer.setDragImage(D,0,0),c&&D.parentNode.removeChild(D)}}function Rl(e,i){var D=ai(e,i);if(!D)return;var A=document.createDocumentFragment();Ui(e,D,A),e.display.dragCursor||(e.display.dragCursor=w("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,A)}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 i=document.getElementsByClassName("CodeMirror"),D=[],A=0;A<i.length;A++){var U=i[A].CodeMirror;U&&D.push(U)}D.length&&D[0].operation(function(){for(var $=0;$<D.length;$++)e(D[$])})}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(kl)},100))}),Ie(window,"blur",function(){return Ws(la)})}function kl(e){var i=e.display;i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.scrollbarsClipped=!1,e.setSize()}for(var Fa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},wo=0;wo<10;wo++)Fa[wo+48]=Fa[wo+96]=String(wo);for(var zo=65;zo<=90;zo++)Fa[zo]=String.fromCharCode(zo);for(var 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=l?Ia.macDefault:Ia.pcDefault;function Ll(e){var i=e.split(/-(?!$)/);e=i[i.length-1];for(var D,A,U,$,oe=0;oe<i.length-1;oe++){var he=i[oe];if(/^(cmd|meta|m)$/i.test(he))$=!0;else if(/^a(lt)?$/i.test(he))D=!0;else if(/^(c|ctrl|control)$/i.test(he))A=!0;else if(/^s(hift)?$/i.test(he))U=!0;else throw new Error("Unrecognized modifier name: "+he)}return D&&(e="Alt-"+e),A&&(e="Ctrl-"+e),$&&(e="Cmd-"+e),U&&(e="Shift-"+e),e}function Pl(e){var i={};for(var D in e)if(e.hasOwnProperty(D)){var A=e[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(A=="..."){delete e[D];continue}for(var U=fe(D.split(" "),Ll),$=0;$<U.length;$++){var oe=void 0,he=void 0;$==U.length-1?(he=U.join(" "),oe=A):(he=U.slice(0,$+1).join(" "),oe="...");var me=i[he];if(!me)i[he]=oe;else if(me!=oe)throw new Error("Inconsistent bindings for "+he)}delete e[D]}for(var xe in i)e[xe]=i[xe];return e}function io(e,i,D,A){i=Go(i);var U=i.call?i.call(e,A):i[e];if(U===!1)return"nothing";if(U==="...")return"multi";if(U!=null&&D(U))return"handled";if(i.fallthrough){if(Object.prototype.toString.call(i.fallthrough)!="[object Array]")return io(e,i.fallthrough,D,A);for(var $=0;$<i.fallthrough.length;$++){var oe=io(e,i.fallthrough[$],D,A);if(oe)return oe}}}function Gs(e){var i=typeof e=="string"?e:Fa[e.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function Ks(e,i,D){var A=e;return i.altKey&&A!="Alt"&&(e="Alt-"+e),(f?i.metaKey:i.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(f?i.ctrlKey:i.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!D&&i.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Vs(e,i){if(c&&e.keyCode==34&&e.char)return!1;var D=Fa[e.keyCode];return D==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(D=e.code),Ks(D,e,i))}function Go(e){return typeof e=="string"?Ia[e]:e}function ao(e,i){for(var D=e.doc.sel.ranges,A=[],U=0;U<D.length;U++){for(var $=i(D[U]);A.length&&_r($.from,re(A).to)<=0;){var oe=A.pop();if(_r(oe.from,$.from)<0){$.from=oe.from;break}}A.push($)}Bi(e,function(){for(var he=A.length-1;he>=0;he--)ro(e.doc,"",A[he].from,A[he].to,"+delete");ba(e)})}function as(e,i,D){var A=Re(e.text,i+D,D);return A<0||A>e.text.length?null:A}function os(e,i,D){var A=as(e,i.ch,D);return A==null?null:new Ut(i.line,A,D<0?"after":"before")}function ss(e,i,D,A,U){if(e){i.doc.direction=="rtl"&&(U=-U);var $=ft(D,i.doc.direction);if($){var oe=U<0?re($):$[0],he=U<0==(oe.level==1),me=he?"after":"before",xe;if(oe.level>0||i.doc.direction=="rtl"){var We=ze(i,D);xe=U<0?D.text.length-1:0;var Ye=Ze(i,We,xe).top;xe=Je(function(lt){return Ze(i,We,lt).top==Ye},U<0==(oe.level==1)?oe.from:oe.to-1,xe),me=="before"&&(xe=as(D,xe,1))}else xe=U<0?oe.to:oe.from;return new Ut(A,xe,me)}}return new Ut(A,U<0?D.text.length:0,U<0?"before":"after")}function Ml(e,i,D,A){var U=ft(i,e.doc.direction);if(!U)return os(i,D,A);D.ch>=i.text.length?(D.ch=i.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var $=ut(U,D.ch,D.sticky),oe=U[$];if(e.doc.direction=="ltr"&&oe.level%2==0&&(A>0?oe.to>D.ch:oe.from<D.ch))return os(i,D,A);var he=function(nr,yr){return as(i,nr instanceof Ut?nr.ch:nr,yr)},me,xe=function(nr){return e.options.lineWrapping?(me=me||ze(e,i),wr(e,i,me,nr)):{begin:0,end:i.text.length}},We=xe(D.sticky=="before"?he(D,-1):D.ch);if(e.doc.direction=="rtl"||oe.level==1){var Ye=oe.level==1==A<0,lt=he(D,Ye?1:-1);if(lt!=null&&(Ye?lt<=oe.to&&lt<=We.end:lt>=oe.from&&lt>=We.begin)){var nt=Ye?"before":"after";return new Ut(D.line,lt,nt)}}var At=function(nr,yr,ir){for(var Sr=function(Vn,Ci){return Ci?new Ut(D.line,he(Vn,1),"before"):new Ut(D.line,Vn,"after")};nr>=0&&nr<U.length;nr+=yr){var Qr=U[nr],Wr=yr>0==(Qr.level!=1),En=Wr?ir.begin:he(ir.end,-1);if(Qr.from<=En&&En<Qr.to)return Sr(En,Wr);if(En=Wr?Qr.from:he(Qr.to,-1),ir.begin<=En&&En<ir.end)return Sr(En,Wr)}},Bt=At($+A,A,We);if(Bt)return Bt;var Jt=A>0?We.end:he(We.begin,-1);return Jt!=null&&!(A>0&&Jt==i.text.length)&&(Bt=At(A>0?0:U.length-1,A,xe(Jt)),Bt)?Bt:null}var So={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ae)},killLine:function(e){return ao(e,function(i){if(i.empty()){var D=lr(e.doc,i.head.line).text.length;return i.head.ch==D&&i.head.line<e.lastLine()?{from:i.head,to:Ut(i.head.line+1,0)}:{from:i.head,to:Ut(i.head.line,D)}}else return{from:i.from(),to:i.to()}})},deleteLine:function(e){return ao(e,function(i){return{from:Ut(i.from().line,0),to:K(e.doc,Ut(i.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(i){return{from:Ut(i.from().line,0),to:i.from()}})},delWrappedLineLeft:function(e){return ao(e,function(i){var D=e.charCoords(i.head,"div").top+5,A=e.coordsChar({left:0,top:D},"div");return{from:A,to:i.from()}})},delWrappedLineRight:function(e){return ao(e,function(i){var D=e.charCoords(i.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div");return{from:i.from(),to:A}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(i){return Xs(e,i.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(i){return Ys(e,i.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(i){return Nl(e,i.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(i){var D=e.cursorCoords(i.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(i){var D=e.cursorCoords(i.head,"div").top+5;return e.coordsChar({left:0,top:D},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(i){var D=e.cursorCoords(i.head,"div").top+5,A=e.coordsChar({left:0,top:D},"div");return A.ch<e.getLine(A.line).search(/\S/)?Ys(e,i.head):A},Oe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var i=[],D=e.listSelections(),A=e.options.tabSize,U=0;U<D.length;U++){var $=D[U].from(),oe=z(e.getLine($.line),$.ch,A);i.push(ae(A-oe%A))}e.replaceSelections(i)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Bi(e,function(){for(var i=e.listSelections(),D=[],A=0;A<i.length;A++){if(!i[A].empty())continue;var U=i[A].head,$=lr(e.doc,U.line).text;if($){if(U.ch==$.length&&(U=new Ut(U.line,U.ch-1)),U.ch>0)U=new Ut(U.line,U.ch+1),e.replaceRange($.charAt(U.ch-1)+$.charAt(U.ch-2),Ut(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var oe=lr(e.doc,U.line-1).text;oe&&(U=new Ut(U.line,1),e.replaceRange($.charAt(0)+e.doc.lineSeparator()+oe.charAt(oe.length-1),Ut(U.line-1,oe.length-1),U,"+transpose"))}}D.push(new Rn(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return Bi(e,function(){for(var i=e.listSelections(),D=i.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),i[D].anchor,i[D].head,"+input");i=e.listSelections();for(var A=0;A<i.length;A++)e.indentLine(i[A].from().line,null,!0);ba(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,i){var D=lr(e.doc,i),A=Ot(D);return A!=D&&(i=qr(A)),ss(!0,e,A,i,1)}function Nl(e,i){var D=lr(e.doc,i),A=Rt(D);return A!=D&&(i=qr(A)),ss(!0,e,D,i,-1)}function Ys(e,i){var D=Xs(e,i.line),A=lr(e.doc,D.line),U=ft(A,e.doc.direction);if(!U||U[0].level==0){var $=Math.max(D.ch,A.text.search(/\S/)),oe=i.line==D.line&&i.ch<=$&&i.ch;return Ut(D.line,oe?0:$,D.sticky)}return D}function Ko(e,i,D){if(typeof i=="string"&&(i=So[i],!i))return!1;e.display.input.ensurePolled();var A=e.display.shift,U=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),D&&(e.display.shift=!1),U=i(e)!=Se}finally{e.display.shift=A,e.state.suppressEdits=!1}return U}function jl(e,i,D){for(var A=0;A<e.state.keyMaps.length;A++){var U=io(i,e.state.keyMaps[A],D,e);if(U)return U}return e.options.extraKeys&&io(i,e.options.extraKeys,D,e)||io(i,e.options.keyMap,D,e)}var Fl=new J;function Co(e,i,D,A){var U=e.state.keySeq;if(U){if(Gs(i))return"handled";if(/\'$/.test(i)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==U&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,U+" "+i,D,A))return!0}return $s(e,i,D,A)}function $s(e,i,D,A){var U=jl(e,i,A);return U=="multi"&&(e.state.keySeq=i),U=="handled"&&Qt(e,"keyHandled",e,i,D),(U=="handled"||U=="multi")&&(Ee(D),ti(e)),!!U}function Js(e,i){var D=Vs(i,!0);return D?i.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+D,i,function(A){return Ko(e,A,!0)})||Co(e,D,i,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Ko(e,A)}):Co(e,D,i,function(A){return Ko(e,A)}):!1}function Ul(e,i,D){return Co(e,"'"+D+"'",i,function(A){return Ko(e,A,!0)})}var ls=null;function Qs(e){var i=this;if(e.target&&e.target!=i.display.input.getField())return;if(i.curOp.focus=V(),st(i,e))return;T&&b<11&&e.keyCode==27&&(e.returnValue=!1);var D=e.keyCode;i.display.shift=D==16||e.shiftKey;var A=Js(i,e);c&&(ls=A?D:null,!A&&D==88&&!Kr&&(l?e.metaKey:e.ctrlKey)&&i.replaceSelection("",null,"cut")),O&&!l&&!A&&D==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)&&Bl(i)}function Bl(e){var i=e.display.lineDiv;W(i,"CodeMirror-crosshair");function D(A){(A.keyCode==18||!A.altKey)&&(v(i,"CodeMirror-crosshair"),ct(document,"keyup",D),ct(document,"mouseover",D))}Ie(document,"keyup",D),Ie(document,"mouseover",D)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function el(e){var i=this;if(e.target&&e.target!=i.display.input.getField())return;if(mn(i.display,e)||st(i,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var D=e.keyCode,A=e.charCode;if(c&&D==ls){ls=null,Ee(e);return}if(c&&(!e.which||e.which<10)&&Js(i,e))return;var U=String.fromCharCode(A==null?D:A);if(U=="\b")return;if(Ul(i,e,U))return;i.display.input.onKeyPress(e)}var Hl=400,us=function(e,i,D){this.time=e,this.pos=i,this.button=D};us.prototype.compare=function(e,i,D){return this.time+Hl>e&&_r(i,this.pos)==0&&D==this.button};var Oo,Ao;function Wl(e,i){var D=+new Date;return Ao&&Ao.compare(D,e,i)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(D,e,i)?(Ao=new us(D,e,i),Oo=null,"double"):(Oo=new us(D,e,i),Ao=null,"single")}function tl(e){var i=this,D=i.display;if(st(i,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,mn(D,e)){p||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(i,e))return;var A=ai(i,e),U=tt(e),$=A?Wl(A,U):"single";if(window.focus(),U==1&&i.state.selectingText&&i.state.selectingText(e),A&&zl(i,U,A,$,e))return;U==1?A?Kl(i,A,$,e):He(e)==D.scroller&&Ee(e):U==2?(A&&Uo(i.doc,A),setTimeout(function(){return D.input.focus()},20)):U==3&&(R?i.display.input.onContextMenu(e):wa(i))}function zl(e,i,D,A,U){var $="Click";return A=="double"?$="Double"+$:A=="triple"&&($="Triple"+$),$=(i==1?"Left":i==2?"Middle":"Right")+$,Co(e,Ks($,U),U,function(oe){if(typeof oe=="string"&&(oe=So[oe]),!oe)return!1;var he=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),he=oe(e,D)!=Se}finally{e.state.suppressEdits=!1}return he})}function Gl(e,i,D){var A=e.getOption("configureMouse"),U=A?A(e,i,D):{};if(U.unit==null){var $=t?D.shiftKey&&D.metaKey:D.altKey;U.unit=$?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||D.shiftKey),U.addNew==null&&(U.addNew=l?D.metaKey:D.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(l?D.altKey:D.ctrlKey)),U}function Kl(e,i,D,A){T?setTimeout(B(Ba,e),0):e.curOp.focus=V();var U=Gl(e,D,A),$=e.doc.sel,oe;e.options.dragDrop&&vt&&!e.isReadOnly()&&D=="single"&&(oe=$.contains(i))>-1&&(_r((oe=$.ranges[oe]).from(),i)<0||i.xRel>0)&&(_r(oe.to(),i)>0||i.xRel<0)?Vl(e,A,i,U):Xl(e,A,i,U)}function Vl(e,i,D,A){var U=e.display,$=!1,oe=si(e,function(xe){p&&(U.scroller.draggable=!1),e.state.draggingText=!1,ct(U.wrapper.ownerDocument,"mouseup",oe),ct(U.wrapper.ownerDocument,"mousemove",he),ct(U.scroller,"dragstart",me),ct(U.scroller,"drop",oe),$||(Ee(xe),A.addNew||Uo(e.doc,D,null,null,A.extend),p&&!r||T&&b==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),he=function(xe){$=$||Math.abs(i.clientX-xe.clientX)+Math.abs(i.clientY-xe.clientY)>=10},me=function(){return $=!0};p&&(U.scroller.draggable=!0),e.state.draggingText=oe,oe.copy=!A.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Ie(U.wrapper.ownerDocument,"mouseup",oe),Ie(U.wrapper.ownerDocument,"mousemove",he),Ie(U.scroller,"dragstart",me),Ie(U.scroller,"drop",oe),wa(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,i,D){if(D=="char")return new Rn(i,i);if(D=="word")return e.findWordAt(i);if(D=="line")return new Rn(Ut(i.line,0),K(e.doc,Ut(i.line+1,0)));var A=D(e,i);return new Rn(A.from,A.to)}function Xl(e,i,D,A){var U=e.display,$=e.doc;Ee(i);var oe,he,me=$.sel,xe=me.ranges;if(A.addNew&&!A.extend?(he=$.sel.contains(D),he>-1?oe=xe[he]:oe=new Rn(D,D)):(oe=$.sel.primary(),he=$.sel.primIndex),A.unit=="rectangle")A.addNew||(oe=new Rn(D,D)),D=ai(e,i,!0,!0),he=-1;else{var We=rl(e,D,A.unit);A.extend?oe=ns(oe,We.anchor,We.head,A.extend):oe=We}A.addNew?he==-1?(he=xe.length,Pi($,aa(e,xe.concat([oe]),he),{scroll:!1,origin:"*mouse"})):xe.length>1&&xe[he].empty()&&A.unit=="char"&&!A.extend?(Pi($,aa(e,xe.slice(0,he).concat(xe.slice(he+1)),0),{scroll:!1,origin:"*mouse"}),me=$.sel):is($,he,oe,pe):(he=0,Pi($,new Wi([oe],0),pe),me=$.sel);var Ye=D;function lt(ir){if(_r(Ye,ir)==0)return;if(Ye=ir,A.unit=="rectangle"){for(var Sr=[],Qr=e.options.tabSize,Wr=z(lr($,D.line).text,D.ch,Qr),En=z(lr($,ir.line).text,ir.ch,Qr),Vn=Math.min(Wr,En),Ci=Math.max(Wr,En),ri=Math.min(D.line,ir.line),qi=Math.min(e.lastLine(),Math.max(D.line,ir.line));ri<=qi;ri++){var Ji=lr($,ri).text,pi=ye(Ji,Vn,Qr);Vn==Ci?Sr.push(new Rn(Ut(ri,pi),Ut(ri,pi))):Ji.length>pi&&Sr.push(new Rn(Ut(ri,pi),Ut(ri,ye(Ji,Ci,Qr))))}Sr.length||Sr.push(new Rn(D,D)),Pi($,aa(e,me.ranges.slice(0,he).concat(Sr),he),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ir)}else{var Qi=oe,Ii=rl(e,ir,A.unit),_i=Qi.anchor,mi;_r(Ii.anchor,_i)>0?(mi=Ii.head,_i=wi(Qi.from(),Ii.anchor)):(mi=Ii.anchor,_i=Di(Qi.to(),Ii.head));var oi=me.ranges.slice(0);oi[he]=Yl(e,new Rn(K($,_i),mi)),Pi($,aa(e,oi,he),pe)}}var nt=U.wrapper.getBoundingClientRect(),At=0;function Bt(ir){var Sr=++At,Qr=ai(e,ir,!0,A.unit=="rectangle");if(!Qr)return;if(_r(Qr,Ye)!=0){e.curOp.focus=V(),lt(Qr);var Wr=La(U,$);(Qr.line>=Wr.to||Qr.line<Wr.from)&&setTimeout(si(e,function(){At==Sr&&Bt(ir)}),150)}else{var En=ir.clientY<nt.top?-20:ir.clientY>nt.bottom?20:0;En&&setTimeout(si(e,function(){if(At!=Sr)return;U.scroller.scrollTop+=En,Bt(ir)}),50)}}function Jt(ir){e.state.selectingText=!1,At=Infinity,ir&&(Ee(ir),U.input.focus()),ct(U.wrapper.ownerDocument,"mousemove",nr),ct(U.wrapper.ownerDocument,"mouseup",yr),$.history.lastSelOrigin=null}var nr=si(e,function(ir){ir.buttons===0||!tt(ir)?Jt(ir):Bt(ir)}),yr=si(e,Jt);e.state.selectingText=yr,Ie(U.wrapper.ownerDocument,"mousemove",nr),Ie(U.wrapper.ownerDocument,"mouseup",yr)}function Yl(e,i){var D=i.anchor,A=i.head,U=lr(e.doc,D.line);if(_r(D,A)==0&&D.sticky==A.sticky)return i;var $=ft(U);if(!$)return i;var oe=ut($,D.ch,D.sticky),he=$[oe];if(he.from!=D.ch&&he.to!=D.ch)return i;var me=oe+(he.from==D.ch==(he.level!=1)?0:1);if(me==0||me==$.length)return i;var xe;if(A.line!=D.line)xe=(A.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var We=ut($,A.ch,A.sticky),Ye=We-oe||(A.ch-D.ch)*(he.level==1?-1:1);We==me-1||We==me?xe=Ye<0:xe=Ye>0}var lt=$[me+(xe?-1:0)],nt=xe==(lt.level==1),At=nt?lt.from:lt.to,Bt=nt?"after":"before";return D.ch==At&&D.sticky==Bt?i:new Rn(new Ut(D.line,At,Bt),A)}function nl(e,i,D,A){var U,$;if(i.touches)U=i.touches[0].clientX,$=i.touches[0].clientY;else try{U=i.clientX,$=i.clientY}catch(lt){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&Ee(i);var oe=e.display,he=oe.lineDiv.getBoundingClientRect();if($>he.bottom||!Le(e,D))return ke(i);$-=he.top-oe.viewOffset;for(var me=0;me<e.display.gutterSpecs.length;++me){var xe=oe.gutters.childNodes[me];if(xe&&xe.getBoundingClientRect().right>=U){var We=Un(e.doc,$),Ye=e.display.gutterSpecs[me];return $e(e,D,e,We,Ye.className,i),ke(i)}}}function cs(e,i){return nl(e,i,"gutterClick",!0)}function il(e,i){if(mn(e.display,i)||$l(e,i))return;if(st(e,i,"contextmenu"))return;R||e.display.input.onContextMenu(i)}function $l(e,i){return Le(e,"gutterContextMenu")?nl(e,i,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Zr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var i=e.optionHandlers;function D(A,U,$,oe){e.defaults[A]=U,$&&(i[A]=oe?function(he,me,xe){xe!=oo&&$(he,me,xe)}:$)}e.defineOption=D,e.Init=oo,D("value","",function(A,U){return A.setValue(U)},!0),D("mode",null,function(A,U){A.doc.modeOption=U,Ra(A)},!0),D("indentUnit",2,Ra,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(A){go(A),Zr(A),Mn(A)},!0),D("lineSeparator",null,function(A,U){if(A.doc.lineSep=U,!U)return;var $=[],oe=A.doc.first;A.doc.iter(function(me){for(var xe=0;;){var We=me.text.indexOf(U,xe);if(We==-1)break;xe=We+U.length,$.push(Ut(oe,We))}oe++});for(var he=$.length-1;he>=0;he--)ro(A.doc,U,$[he],Ut($[he].line,$[he].ch+U.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,U,$){A.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),$!=oo&&A.refresh()}),D("specialCharPlaceholder",pr,function(A){return A.refresh()},!0),D("electricChars",!0),D("inputStyle",s?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(A,U){return A.getInputField().spellcheck=U},!0),D("autocorrect",!1,function(A,U){return A.getInputField().autocorrect=U},!0),D("autocapitalize",!1,function(A,U){return A.getInputField().autocapitalize=U},!0),D("rtlMoveVisually",!S),D("wholeLineUpdateBefore",!0),D("theme","default",function(A){al(A),ma(A)},!0),D("keyMap","default",function(A,U,$){var oe=Go(U),he=$!=oo&&Go($);he&&he.detach&&he.detach(A,oe),oe.attach&&oe.attach(A,he||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(A,U){A.display.gutterSpecs=Hi(U,A.options.lineNumbers),ma(A)},!0),D("fixedGutter",!0,function(A,U){A.display.gutters.style.left=U?fi(A.display)+"px":"0",A.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(A){return or(A)},!0),D("scrollbarStyle","native",function(A){pa(A),or(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),D("lineNumbers",!1,function(A,U){A.display.gutterSpecs=Hi(A.options.gutters,U),ma(A)},!0),D("firstLineNumber",1,ma,!0),D("lineNumberFormatter",function(A){return A},ma,!0),D("showCursorWhenSelecting",!1,An,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(A,U){U=="nocursor"&&(la(A),A.display.input.blur()),A.display.input.readOnlyChanged(U)}),D("screenReaderLabel",null,function(A,U){U=U===""?null:U,A.display.input.screenReaderLabelChanged(U)}),D("disableInput",!1,function(A,U){U||A.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,An,!0),D("singleCursorHeightPerLine",!0,An,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,go,!0),D("addModeClass",!1,go,!0),D("pollInterval",100),D("undoDepth",200,function(A,U){return A.doc.history.undoDepth=U}),D("historyEventDelay",1250),D("viewportMargin",10,function(A){return A.refresh()},!0),D("maxHighlightLength",1e4,go,!0),D("moveInputWithCursor",!0,function(A,U){U||A.display.input.resetPosition()}),D("tabindex",null,function(A,U){return A.display.input.getField().tabIndex=U||""}),D("autofocus",null),D("direction","ltr",function(A,U){return A.doc.setDirection(U)},!0),D("phrases",null)}function Ql(e,i,D){var A=D&&D!=oo;if(!i!=!A){var U=e.display.dragFunctions,$=i?Ie:ct;$(e.display.scroller,"dragstart",U.start),$(e.display.scroller,"dragenter",U.enter),$(e.display.scroller,"dragover",U.over),$(e.display.scroller,"dragleave",U.leave),$(e.display.scroller,"drop",U.drop)}}function Zl(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(v(e.display.wrapper,"CodeMirror-wrap"),Ar(e)),Si(e),Mn(e),Zr(e),setTimeout(function(){return or(e)},100)}function Qn(e,i){var D=this;if(!(this instanceof Qn))return new Qn(e,i);this.options=i=i?P(i):{},P(ol,i,!1);var A=i.value;typeof A=="string"?A=new $i(A,i.mode,null,i.lineSeparator,i.direction):i.mode&&(A.modeOption=i.mode),this.doc=A;var U=new Qn.inputStyles[i.inputStyle](this),$=this.display=new Ga(e,A,U,i);$.wrapper.CodeMirror=this,al(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},i.autofocus&&!s&&$.input.focus(),T&&b<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Il(),jn(this),this.curOp.forceUpdate=!0,vs(this,A),i.autofocus&&!s||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&sa(D)},20):la(this);for(var oe in Vo)Vo.hasOwnProperty(oe)&&Vo[oe](this,i[oe],oo);yi(this),i.finishInit&&i.finishInit(this);for(var he=0;he<ds.length;++he)ds[he](this);Oa(this),p&&i.lineWrapping&&getComputedStyle($.lineDiv).textRendering=="optimizelegibility"&&($.lineDiv.style.textRendering="auto")}Qn.defaults=ol,Qn.optionHandlers=Vo;function ql(e){var i=e.display;Ie(i.scroller,"mousedown",si(e,tl)),T&&b<11?Ie(i.scroller,"dblclick",si(e,function(me){if(st(e,me))return;var xe=ai(e,me);if(!xe||cs(e,me)||mn(e.display,me))return;Ee(me);var We=e.findWordAt(xe);Uo(e.doc,We.anchor,We.head)})):Ie(i.scroller,"dblclick",function(me){return st(e,me)||Ee(me)}),Ie(i.scroller,"contextmenu",function(me){return il(e,me)}),Ie(i.input.getField(),"contextmenu",function(me){i.scroller.contains(me.target)||il(e,me)});var D,A={end:0};function U(){i.activeTouch&&(D=setTimeout(function(){return i.activeTouch=null},1e3),A=i.activeTouch,A.end=+new Date)}function $(me){if(me.touches.length!=1)return!1;var xe=me.touches[0];return xe.radiusX<=1&&xe.radiusY<=1}function oe(me,xe){if(xe.left==null)return!0;var We=xe.left-me.left,Ye=xe.top-me.top;return We*We+Ye*Ye>20*20}Ie(i.scroller,"touchstart",function(me){if(!st(e,me)&&!$(me)&&!cs(e,me)){i.input.ensurePolled(),clearTimeout(D);var xe=+new Date;i.activeTouch={start:xe,moved:!1,prev:xe-A.end<=300?A:null},me.touches.length==1&&(i.activeTouch.left=me.touches[0].pageX,i.activeTouch.top=me.touches[0].pageY)}}),Ie(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ie(i.scroller,"touchend",function(me){var xe=i.activeTouch;if(xe&&!mn(i,me)&&xe.left!=null&&!xe.moved&&new Date-xe.start<300){var We=e.coordsChar(i.activeTouch,"page"),Ye;!xe.prev||oe(xe,xe.prev)?Ye=new Rn(We,We):!xe.prev.prev||oe(xe,xe.prev.prev)?Ye=e.findWordAt(We):Ye=new Rn(Ut(We.line,0),K(e.doc,Ut(We.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),Ee(me)}U()}),Ie(i.scroller,"touchcancel",U),Ie(i.scroller,"scroll",function(){i.scroller.clientHeight&&(da(e,i.scroller.scrollTop),Yi(e,i.scroller.scrollLeft,!0),$e(e,"scroll",e))}),Ie(i.scroller,"mousewheel",function(me){return po(e,me)}),Ie(i.scroller,"DOMMouseScroll",function(me){return po(e,me)}),Ie(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(me){st(e,me)||Ne(me)},over:function(me){st(e,me)||(Rl(e,me),Ne(me))},start:function(me){return Al(e,me)},drop:si(e,Ol),leave:function(me){st(e,me)||Hs(e)}};var he=i.input.getField();Ie(he,"keyup",function(me){return Zs.call(e,me)}),Ie(he,"keydown",si(e,Qs)),Ie(he,"keypress",si(e,el)),Ie(he,"focus",function(me){return sa(e,me)}),Ie(he,"blur",function(me){return la(e,me)})}var ds=[];Qn.defineInitHook=function(e){return ds.push(e)};function Ro(e,i,D,A){var U=e.doc,$;D==null&&(D="add"),D=="smart"&&(U.mode.indent?$=Xt(e,i).state:D="prev");var oe=e.options.tabSize,he=lr(U,i),me=z(he.text,null,oe);he.stateAfter&&(he.stateAfter=null);var xe=he.text.match(/^\s*/)[0],We;if(!A&&!/\S/.test(he.text))We=0,D="not";else if(D=="smart"&&(We=U.mode.indent($,he.text.slice(xe.length),he.text),We==Se||We>150)){if(!A)return;D="prev"}D=="prev"?i>U.first?We=z(lr(U,i-1).text,null,oe):We=0:D=="add"?We=me+e.options.indentUnit:D=="subtract"?We=me-e.options.indentUnit:typeof D=="number"&&(We=me+D),We=Math.max(0,We);var Ye="",lt=0;if(e.options.indentWithTabs)for(var nt=Math.floor(We/oe);nt;--nt)lt+=oe,Ye+=" ";if(lt<We&&(Ye+=ae(We-lt)),Ye!=xe)return ro(U,Ye,Ut(i,0),Ut(i,xe.length),"+input"),he.stateAfter=null,!0;for(var At=0;At<U.sel.ranges.length;At++){var Bt=U.sel.ranges[At];if(Bt.head.line==i&&Bt.head.ch<xe.length){var Jt=Ut(i,xe.length);is(U,At,new Rn(Jt,Jt));break}}}var ya=null;function Xo(e){ya=e}function hs(e,i,D,A,U){var $=e.doc;e.display.shift=!1,A||(A=$.sel);var oe=+new Date-200,he=U=="paste"||e.state.pasteIncoming>oe,me=dr(i),xe=null;if(he&&A.ranges.length>1)if(ya&&ya.text.join(`
`)==i){if(A.ranges.length%ya.text.length==0){xe=[];for(var We=0;We<ya.text.length;We++)xe.push($.splitLines(ya.text[We]))}}else me.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(xe=fe(me,function(nr){return[nr]}));for(var Ye=e.curOp.updateInput,lt=A.ranges.length-1;lt>=0;lt--){var nt=A.ranges[lt],At=nt.from(),Bt=nt.to();nt.empty()&&(D&&D>0?At=Ut(At.line,At.ch-D):e.state.overwrite&&!he?Bt=Ut(Bt.line,Math.min(lr($,Bt.line).text.length,Bt.ch+re(me).length)):he&&ya&&ya.lineWise&&ya.text.join(`
`)==me.join(`
`)&&(At=Bt=Ut(At.line,0)));var Jt={from:At,to:Bt,text:xe?xe[lt%xe.length]:me,origin:U||(he?"paste":e.state.cutIncoming>oe?"cut":"+input")};to(e.doc,Jt),Qt(e,"inputRead",e,Jt)}i&&!he&&ll(e,i),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,i){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&Bi(i,function(){return hs(i,D,0,null,"paste")}),!0}function ll(e,i){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,A=D.ranges.length-1;A>=0;A--){var U=D.ranges[A];if(U.head.ch>100||A&&D.ranges[A-1].head.line==U.head.line)continue;var $=e.getModeAt(U.head),oe=!1;if($.electricChars){for(var he=0;he<$.electricChars.length;he++)if(i.indexOf($.electricChars.charAt(he))>-1){oe=Ro(e,U.head.line,"smart");break}}else $.electricInput&&($.electricInput.test(lr(e.doc,U.head.line).text.slice(0,U.head.ch))&&(oe=Ro(e,U.head.line,"smart")));oe&&Qt(e,"electricInput",e,U.head.line)}}function ul(e){for(var i=[],D=[],A=0;A<e.doc.sel.ranges.length;A++){var U=e.doc.sel.ranges[A].head.line,$={anchor:Ut(U,0),head:Ut(U+1,0)};D.push($),i.push(e.getRange($.anchor,$.head))}return{text:i,ranges:D}}function cl(e,i,D,A){e.setAttribute("autocorrect",D?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!i)}function dl(){var e=w("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),i=w("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return p?e.style.width="1000px":e.setAttribute("wrap","off"),u&&(e.style.border="1px solid black"),cl(e),i}function eu(e){var i=e.optionHandlers,D=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,U){var $=this.options,oe=$[A];if($[A]==U&&A!="mode")return;$[A]=U,i.hasOwnProperty(A)&&si(this,i[A])(this,U,oe),$e(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,U){this.state.keyMaps[U?"push":"unshift"](Go(A))},removeKeyMap:function(A){for(var U=this.state.keyMaps,$=0;$<U.length;++$)if(U[$]==A||U[$].name==A)return U.splice($,1),!0},addOverlay:Ri(function(A,U){var $=A.token?A:e.getMode(this.options,A);if($.startState)throw new Error("Overlays may not be stateful.");te(this.state.overlays,{mode:$,modeSpec:A,opaque:U&&U.opaque,priority:U&&U.priority||0},function(oe){return oe.priority}),this.state.modeGen++,Mn(this)}),removeOverlay:Ri(function(A){for(var U=this.state.overlays,$=0;$<U.length;++$){var oe=U[$].modeSpec;if(oe==A||typeof A=="string"&&oe.name==A){U.splice($,1),this.state.modeGen++,Mn(this);return}}}),indentLine:Ri(function(A,U,$){typeof U!="string"&&typeof U!="number"&&(U==null?U=this.options.smartIndent?"smart":"prev":U=U?"add":"subtract"),di(this.doc,A)&&Ro(this,A,U,$)}),indentSelection:Ri(function(A){for(var U=this.doc.sel.ranges,$=-1,oe=0;oe<U.length;oe++){var he=U[oe];if(he.empty())he.head.line>$&&(Ro(this,he.head.line,A,!0),$=he.head.line,oe==this.doc.sel.primIndex&&ba(this));else{var me=he.from(),xe=he.to(),We=Math.max($,me.line);$=Math.min(this.lastLine(),xe.line-(xe.ch?0:1))+1;for(var Ye=We;Ye<$;++Ye)Ro(this,Ye,A);var lt=this.doc.sel.ranges;me.ch==0&&U.length==lt.length&&lt[oe].from().ch>0&&is(this.doc,oe,new Rn(me,lt[oe].to()),Ae)}}}),getTokenAt:function(A,U){return _n(this,A,U)},getLineTokens:function(A,U){return _n(this,Ut(A),U,!0)},getTokenTypeAt:function(A){A=K(this.doc,A);var U=Ct(this,lr(this.doc,A.line)),$=0,oe=(U.length-1)/2,he=A.ch,me;if(he==0)me=U[2];else for(;;){var xe=$+oe>>1;if((xe?U[xe*2-1]:0)>=he)oe=xe;else if(U[xe*2+1]<he)$=xe+1;else{me=U[xe*2+2];break}}var We=me?me.indexOf("overlay "):-1;return We<0?me:We==0?null:me.slice(0,We-1)},getModeAt:function(A){var U=this.doc.mode;return U.innerMode?e.innerMode(U,this.getTokenAt(A).state).mode:U},getHelper:function(A,U){return this.getHelpers(A,U)[0]},getHelpers:function(A,U){var $=[];if(!D.hasOwnProperty(U))return $;var oe=D[U],he=this.getModeAt(A);if(typeof he[U]=="string")oe[he[U]]&&$.push(oe[he[U]]);else if(he[U])for(var me=0;me<he[U].length;me++){var xe=oe[he[U][me]];xe&&$.push(xe)}else he.helperType&&oe[he.helperType]?$.push(oe[he.helperType]):oe[he.name]&&$.push(oe[he.name]);for(var We=0;We<oe._global.length;We++){var Ye=oe._global[We];Ye.pred(he,this)&&ue($,Ye.val)==-1&&$.push(Ye.val)}return $},getStateAfter:function(A,U){var $=this.doc;return A=le($,A==null?$.first+$.size-1:A),Xt(this,A+1,U).state},cursorCoords:function(A,U){var $,oe=this.doc.sel.primary();return A==null?$=oe.head:typeof A=="object"?$=K(this.doc,A):$=A?oe.from():oe.to(),fn(this,$,U||"page")},charCoords:function(A,U){return In(this,K(this.doc,A),U||"page")},coordsChar:function(A,U){return A=cn(this,A,U||"page"),sn(this,A.left,A.top)},lineAtHeight:function(A,U){return A=cn(this,{top:A,left:0},U||"page").top,Un(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,U,$){var oe=!1,he;if(typeof A=="number"){var me=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>me&&(A=me,oe=!0),he=lr(this.doc,A)}else he=A;return yn(this,he,{top:0,left:0},U||"page",$||oe).top+(oe?this.doc.height-sr(he):0)},defaultTextHeight:function(){return Jn(this.display)},defaultCharWidth:function(){return ii(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,U,$,oe,he){var me=this.display;A=fn(this,K(this.doc,A));var xe=A.bottom,We=A.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),me.sizer.appendChild(U),oe=="over")xe=A.top;else if(oe=="above"||oe=="near"){var Ye=Math.max(me.wrapper.clientHeight,this.doc.height),lt=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(oe=="above"||A.bottom+U.offsetHeight>Ye)&&A.top>U.offsetHeight?xe=A.top-U.offsetHeight:A.bottom+U.offsetHeight<=Ye&&(xe=A.bottom),We+U.offsetWidth>lt&&(We=lt-U.offsetWidth)}U.style.top=xe+"px",U.style.left=U.style.right="",he=="right"?(We=me.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(he=="left"?We=0:he=="middle"&&(We=(me.sizer.clientWidth-U.offsetWidth)/2),U.style.left=We+"px"),$&&Pa(this,{left:We,top:xe,right:We+U.offsetWidth,bottom:xe+U.offsetHeight})},triggerOnKeyDown:Ri(Qs),triggerOnKeyPress:Ri(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Ri(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:Ri(function(A){ll(this,A)}),findPosH:function(A,U,$,oe){var he=1;U<0&&(he=-1,U=-U);for(var me=K(this.doc,A),xe=0;xe<U&&!(me=fs(this.doc,me,he,$,oe),me.hitSide);++xe);return me},moveH:Ri(function(A,U){var $=this;this.extendSelectionsBy(function(oe){return $.display.shift||$.doc.extend||oe.empty()?fs($.doc,oe.head,A,U,$.options.rtlMoveVisually):A<0?oe.from():oe.to()},Oe)}),deleteH:Ri(function(A,U){var $=this.doc.sel,oe=this.doc;$.somethingSelected()?oe.replaceSelection("",null,"+delete"):ao(this,function(he){var me=fs(oe,he.head,A,U,!1);return A<0?{from:me,to:he.head}:{from:he.head,to:me}})}),findPosV:function(A,U,$,oe){var he=1,me=oe;U<0&&(he=-1,U=-U);for(var xe=K(this.doc,A),We=0;We<U;++We){var Ye=fn(this,xe,"div");if(me==null?me=Ye.left:Ye.left=me,xe=hl(this,Ye,he,$),xe.hitSide)break}return xe},moveV:Ri(function(A,U){var $=this,oe=this.doc,he=[],me=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(We){if(me)return A<0?We.from():We.to();var Ye=fn($,We.head,"div");We.goalColumn!=null&&(Ye.left=We.goalColumn),he.push(Ye.left);var lt=hl($,Ye,A,U);return U=="page"&&We==oe.sel.primary()&&Sa($,In($,lt,"div").top-Ye.top),lt},Oe),he.length)for(var xe=0;xe<oe.sel.ranges.length;xe++)oe.sel.ranges[xe].goalColumn=he[xe]}),findWordAt:function(A){var U=this.doc,$=lr(U,A.line).text,oe=A.ch,he=A.ch;if($){var me=this.getHelper(A,"wordChars");(A.sticky=="before"||he==$.length)&&oe?--oe:++he;for(var xe=$.charAt(oe),We=X(xe,me)?function(Ye){return X(Ye,me)}:/\s/.test(xe)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!X(Ye)};oe>0&&We($.charAt(oe-1));)--oe;for(;he<$.length&&We($.charAt(he));)++he}return new Rn(Ut(A.line,oe),Ut(A.line,he))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):v(this.display.cursorDiv,"CodeMirror-overwrite"),$e(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==V()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ri(function(A,U){ca(this,A,U)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Qe(this)-this.display.barHeight,width:A.scrollWidth-Qe(this)-this.display.barWidth,clientHeight:be(this),clientWidth:Fe(this)}},scrollIntoView:Ri(function(A,U){A==null?(A={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof A=="number"?A={from:Ut(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=U||0,A.from.line!=null?co(this,A):Ca(this,A.from,A.to,A.margin)}),setSize:Ri(function(A,U){var $=this,oe=function(me){return typeof me=="number"||/^\d+$/.test(String(me))?me+"px":me};A!=null&&(this.display.wrapper.style.width=oe(A)),U!=null&&(this.display.wrapper.style.height=oe(U)),this.options.lineWrapping&&$r(this);var he=this.display.viewFrom;this.doc.iter(he,this.display.viewTo,function(me){if(me.widgets){for(var xe=0;xe<me.widgets.length;xe++)if(me.widgets[xe].noHScroll){Kn($,he,"widget");break}}++he}),this.curOp.forceUpdate=!0,$e(this,"refresh",this)}),operation:function(A){return Bi(this,A)},startOperation:function(){return jn(this)},endOperation:function(){return Oa(this)},refresh:Ri(function(){var A=this.display.cachedTextHeight;Mn(this),this.curOp.forceUpdate=!0,Zr(this),ca(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(A==null||Math.abs(A-Jn(this.display))>.5||this.options.lineWrapping)&&Si(this),$e(this,"refresh",this)}),swapDoc:Ri(function(A){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,A),Zr(this),this.display.input.reset(),ca(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Qt(this,"swapDoc",this,U),U}),phrase:function(A){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,A)?U[A]:A},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(A,U,$){D.hasOwnProperty(A)||(D[A]=e[A]={_global:[]}),D[A][U]=$},e.registerGlobalHelper=function(A,U,$,oe){e.registerHelper(A,U,oe),D[A]._global.push({pred:$,val:oe})}}function fs(e,i,D,A,U){var $=i,oe=D,he=lr(e,i.line),me=U&&e.direction=="rtl"?-D:D;function xe(){var yr=i.line+me;return yr<e.first||yr>=e.first+e.size?!1:(i=new Ut(yr,i.ch,i.sticky),he=lr(e,yr))}function We(yr){var ir;if(A=="codepoint"){var Sr=he.text.charCodeAt(i.ch+(A>0?0:-1));isNaN(Sr)?ir=null:ir=new Ut(i.line,Math.max(0,Math.min(he.text.length,i.ch+D*(Sr>=55296&&Sr<56320?2:1))),-D)}else U?ir=Ml(e.cm,he,i,D):ir=os(he,i,D);if(ir==null)if(!yr&&xe())i=ss(U,e.cm,he,i.line,me);else return!1;else i=ir;return!0}if(A=="char"||A=="codepoint")We();else if(A=="column")We(!0);else if(A=="word"||A=="group")for(var Ye=null,lt=A=="group",nt=e.cm&&e.cm.getHelper(i,"wordChars"),At=!0;!(D<0&&!We(!At));At=!1){var Bt=he.text.charAt(i.ch)||`
`,Jt=X(Bt,nt)?"w":lt&&Bt==`
`?"n":!lt||/\s/.test(Bt)?null:"p";if(lt&&!At&&!Jt&&(Jt="s"),Ye&&Ye!=Jt){D<0&&(D=1,We(),i.sticky="after");break}if(Jt&&(Ye=Jt),D>0&&!We(!At))break}var nr=Ho(e,i,$,oe,!0);return hi($,nr)&&(nr.hitSide=!0),nr}function hl(e,i,D,A){var U=e.doc,$=i.left,oe;if(A=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(he-.5*Jn(e.display),3);oe=(D>0?i.bottom:i.top)+D*me}else A=="line"&&(oe=D>0?i.bottom+3:i.top-3);for(var xe;!(xe=sn(e,$,oe),!xe.outside);){if(D<0?oe<=0:oe>=U.height){xe.hitSide=!0;break}oe+=D*5}return xe}var Fn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fn.prototype.init=function(e){var i=this,D=this,A=D.cm,U=D.div=e.lineDiv;cl(U,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function $(he){for(var me=he.target;me;me=me.parentNode){if(me==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}Ie(U,"paste",function(he){if(!$(he)||st(A,he)||sl(he,A))return;b<=11&&setTimeout(si(A,function(){return i.updateFromDOM()}),20)}),Ie(U,"compositionstart",function(he){i.composing={data:he.data,done:!1}}),Ie(U,"compositionupdate",function(he){i.composing||(i.composing={data:he.data,done:!1})}),Ie(U,"compositionend",function(he){i.composing&&(he.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),Ie(U,"touchstart",function(){return D.forceCompositionEnd()}),Ie(U,"input",function(){i.composing||i.readFromDOMSoon()});function oe(he){if(!$(he)||st(A,he))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()}),he.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var me=ul(A);Xo({lineWise:!0,text:me.text}),he.type=="cut"&&A.operation(function(){A.setSelections(me.ranges,0,Ae),A.replaceSelection("",null,"cut")})}else return;if(he.clipboardData){he.clipboardData.clearData();var xe=ya.text.join(`
`);if(he.clipboardData.setData("Text",xe),he.clipboardData.getData("Text")==xe){he.preventDefault();return}}var We=dl(),Ye=We.firstChild;A.display.lineSpace.insertBefore(We,A.display.lineSpace.firstChild),Ye.value=ya.text.join(`
`);var lt=document.activeElement;G(Ye),setTimeout(function(){A.display.lineSpace.removeChild(We),lt.focus(),lt==U&&D.showPrimarySelection()},50)}Ie(U,"copy",oe),Ie(U,"cut",oe)},Fn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=Fi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Fn.prototype.showSelection=function(e,i){if(!e||!this.cm.display.view.length)return;(e.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Fn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fn.prototype.showPrimarySelection=function(){var e=this.getSelection(),i=this.cm,D=i.doc.sel.primary(),A=D.from(),U=D.to();if(i.display.viewTo==i.display.viewFrom||A.line>=i.display.viewTo||U.line<i.display.viewFrom){e.removeAllRanges();return}var $=Yo(i,e.anchorNode,e.anchorOffset),oe=Yo(i,e.focusNode,e.focusOffset);if($&&!$.bad&&oe&&!oe.bad&&_r(wi($,oe),A)==0&&_r(Di($,oe),U)==0)return;var he=i.display.view,me=A.line>=i.display.viewFrom&&fl(i,A)||{node:he[0].measure.map[2],offset:0},xe=U.line<i.display.viewTo&&fl(i,U);if(!xe){var We=he[he.length-1].measure,Ye=We.maps?We.maps[We.maps.length-1]:We.map;xe={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!me||!xe){e.removeAllRanges();return}var lt=e.rangeCount&&e.getRangeAt(0),nt;try{nt=I(me.node,me.offset,xe.offset,xe.node)}catch(At){}nt&&(!O&&i.state.focused?(e.collapse(me.node,me.offset),nt.collapsed||(e.removeAllRanges(),e.addRange(nt))):(e.removeAllRanges(),e.addRange(nt)),lt&&e.anchorNode==null?e.addRange(lt):O&&this.startGracePeriod()),this.rememberSelection()},Fn.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)},Fn.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},Fn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Fn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var i=e.getRangeAt(0).commonAncestorContainer;return L(this.div,i)},Fn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fn.prototype.blur=function(){this.div.blur()},Fn.prototype.getField=function(){return this.div},Fn.prototype.supportsTouch=function(){return!0},Fn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Bi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function i(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Fn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Fn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),i=this.cm;if(h&&n&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var D=Yo(i,e.anchorNode,e.anchorOffset),A=Yo(i,e.focusNode,e.focusOffset);D&&A&&Bi(i,function(){Pi(i.doc,ga(D,A),Ae),(D.bad||A.bad)&&(i.curOp.selectionChanged=!0)})},Fn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,i=e.display,D=e.doc.sel.primary(),A=D.from(),U=D.to();if(A.ch==0&&A.line>e.firstLine()&&(A=Ut(A.line-1,lr(e.doc,A.line-1).length)),U.ch==lr(e.doc,U.line).text.length&&U.line<e.lastLine()&&(U=Ut(U.line+1,0)),A.line<i.viewFrom||U.line>i.viewTo-1)return!1;var $,oe,he;A.line==i.viewFrom||($=Pn(e,A.line))==0?(oe=qr(i.view[0].line),he=i.view[0].node):(oe=qr(i.view[$].line),he=i.view[$-1].node.nextSibling);var me=Pn(e,U.line),xe,We;if(me==i.view.length-1?(xe=i.viewTo-1,We=i.lineDiv.lastChild):(xe=qr(i.view[me+1].line)-1,We=i.view[me+1].node.previousSibling),!he)return!1;for(var Ye=e.doc.splitLines(ru(e,he,We,oe,xe)),lt=Yn(e.doc,Ut(oe,0),Ut(xe,lr(e.doc,xe).text.length));Ye.length>1&&lt.length>1;)if(re(Ye)==re(lt))Ye.pop(),lt.pop(),xe--;else if(Ye[0]==lt[0])Ye.shift(),lt.shift(),oe++;else break;for(var nt=0,At=0,Bt=Ye[0],Jt=lt[0],nr=Math.min(Bt.length,Jt.length);nt<nr&&Bt.charCodeAt(nt)==Jt.charCodeAt(nt);)++nt;for(var yr=re(Ye),ir=re(lt),Sr=Math.min(yr.length-(Ye.length==1?nt:0),ir.length-(lt.length==1?nt:0));At<Sr&&yr.charCodeAt(yr.length-At-1)==ir.charCodeAt(ir.length-At-1);)++At;if(Ye.length==1&&lt.length==1&&oe==A.line)for(;nt&&nt>A.ch&&yr.charCodeAt(yr.length-At-1)==ir.charCodeAt(ir.length-At-1);)nt--,At++;Ye[Ye.length-1]=yr.slice(0,yr.length-At).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(nt).replace(/\u200b+$/,"");var Qr=Ut(oe,nt),Wr=Ut(xe,lt.length?re(lt).length-At:0);if(Ye.length>1||Ye[0]||_r(Qr,Wr))return ro(e.doc,Ye,Qr,Wr,"+input"),!0},Fn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fn.prototype.reset=function(){this.forceCompositionEnd()},Fn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Fn.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)},Fn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Bi(this.cm,function(){return Mn(e.cm)})},Fn.prototype.setUneditable=function(e){e.contentEditable="false"},Fn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||si(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Fn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fn.prototype.onContextMenu=function(){},Fn.prototype.resetPosition=function(){},Fn.prototype.needsContentAttribute=!0;function fl(e,i){var D=Xe(e,i.line);if(!D||D.hidden)return null;var A=lr(e.doc,i.line),U=we(D,A,i.line),$=ft(A,e.doc.direction),oe="left";if($){var he=ut($,i.ch);oe=he%2?"right":"left"}var me=kt(U.map,i.ch,oe);return me.offset=me.collapse=="right"?me.end:me.start,me}function tu(e){for(var i=e;i;i=i.parentNode)if(/CodeMirror-gutter-wrapper/.test(i.className))return!0;return!1}function so(e,i){return i&&(e.bad=!0),e}function ru(e,i,D,A,U){var $="",oe=!1,he=e.doc.lineSeparator(),me=!1;function xe(nt){return function(At){return At.id==nt}}function We(){oe&&($+=he,me&&($+=he),oe=me=!1)}function Ye(nt){nt&&(We(),$+=nt)}function lt(nt){if(nt.nodeType==1){var At=nt.getAttribute("cm-text");if(At){Ye(At);return}var Bt=nt.getAttribute("cm-marker"),Jt;if(Bt){var nr=e.findMarks(Ut(A,0),Ut(U+1,0),xe(+Bt));nr.length&&(Jt=nr[0].find(0))&&Ye(Yn(e.doc,Jt.from,Jt.to).join(he));return}if(nt.getAttribute("contenteditable")=="false")return;var yr=/^(pre|div|p|li|table|br)$/i.test(nt.nodeName);if(!/^br$/i.test(nt.nodeName)&&nt.textContent.length==0)return;yr&&We();for(var ir=0;ir<nt.childNodes.length;ir++)lt(nt.childNodes[ir]);/^(pre|p)$/i.test(nt.nodeName)&&(me=!0),yr&&(oe=!0)}else nt.nodeType==3&&Ye(nt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(lt(i),i==D);)i=i.nextSibling,me=!1;return $}function Yo(e,i,D){var A;if(i==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[D],!A)return so(e.clipPos(Ut(e.display.viewTo-1)),!0);i=null,D=0}else for(A=i;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var U=0;U<e.display.view.length;U++){var $=e.display.view[U];if($.node==A)return nu($,i,D)}}function nu(e,i,D){var A=e.text.firstChild,U=!1;if(!i||!L(A,i))return so(Ut(qr(e.line),0),!0);if(i==A&&(U=!0,i=A.childNodes[D],D=0,!i)){var $=e.rest?re(e.rest):e.line;return so(Ut(qr($),$.text.length),U)}var oe=i.nodeType==3?i:null,he=i;for(!oe&&i.childNodes.length==1&&i.firstChild.nodeType==3&&(oe=i.firstChild,D&&(D=oe.nodeValue.length));he.parentNode!=A;)he=he.parentNode;var me=e.measure,xe=me.maps;function We(Jt,nr,yr){for(var ir=-1;ir<(xe?xe.length:0);ir++)for(var Sr=ir<0?me.map:xe[ir],Qr=0;Qr<Sr.length;Qr+=3){var Wr=Sr[Qr+2];if(Wr==Jt||Wr==nr){var En=qr(ir<0?e.line:e.rest[ir]),Vn=Sr[Qr]+yr;return(yr<0||Wr!=Jt)&&(Vn=Sr[Qr+(yr?1:0)]),Ut(En,Vn)}}}var Ye=We(oe,he,D);if(Ye)return so(Ye,U);for(var lt=he.nextSibling,nt=oe?oe.nodeValue.length-D:0;lt;lt=lt.nextSibling){if(Ye=We(lt,lt.firstChild,0),Ye)return so(Ut(Ye.line,Ye.ch-nt),U);nt+=lt.textContent.length}for(var At=he.previousSibling,Bt=D;At;At=At.previousSibling){if(Ye=We(At,At.firstChild,-1),Ye)return so(Ut(Ye.line,Ye.ch+Bt),U);Bt+=At.textContent.length}}var ui=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};ui.prototype.init=function(e){var i=this,D=this,A=this.cm;this.createField(e);var U=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),u&&(U.style.width="0px"),Ie(U,"input",function(){T&&b>=9&&i.hasSelection&&(i.hasSelection=null),D.poll()}),Ie(U,"paste",function(oe){if(st(A,oe)||sl(oe,A))return;A.state.pasteIncoming=+new Date,D.fastPoll()});function $(oe){if(st(A,oe))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var he=ul(A);Xo({lineWise:!0,text:he.text}),oe.type=="cut"?A.setSelections(he.ranges,null,Ae):(D.prevInput="",U.value=he.text.join(`
`),G(U))}else return;oe.type=="cut"&&(A.state.cutIncoming=+new Date)}Ie(U,"cut",$),Ie(U,"copy",$),Ie(e.scroller,"paste",function(oe){if(mn(e,oe)||st(A,oe))return;if(!U.dispatchEvent){A.state.pasteIncoming=+new Date,D.focus();return}var he=new Event("paste");he.clipboardData=oe.clipboardData,U.dispatchEvent(he)}),Ie(e.lineSpace,"selectstart",function(oe){mn(e,oe)||Ee(oe)}),Ie(U,"compositionstart",function(){var oe=A.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:oe,range:A.markText(oe,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},ui.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},ui.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ui.prototype.prepareSelection=function(){var e=this.cm,i=e.display,D=e.doc,A=Fi(e);if(e.options.moveInputWithCursor){var U=fn(e,D.sel.primary().head,"div"),$=i.wrapper.getBoundingClientRect(),oe=i.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,U.top+oe.top-$.top)),A.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,U.left+oe.left-$.left))}return A},ui.prototype.showSelection=function(e){var i=this.cm,D=i.display;E(D.cursorDiv,e.cursors),E(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ui.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var i=this.cm;if(i.somethingSelected()){this.prevInput="";var D=i.getSelection();this.textarea.value=D,i.state.focused&&G(this.textarea),T&&b>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",T&&b>=9&&(this.hasSelection=null))},ui.prototype.getField=function(){return this.textarea},ui.prototype.supportsTouch=function(){return!1},ui.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!s||V()!=this.textarea))try{this.textarea.focus()}catch(e){}},ui.prototype.blur=function(){this.textarea.blur()},ui.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ui.prototype.receivedFocus=function(){this.slowPoll()},ui.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()})},ui.prototype.fastPoll=function(){var e=!1,i=this;i.pollingFast=!0;function D(){var A=i.poll();!A&&!e?(e=!0,i.polling.set(60,D)):(i.pollingFast=!1,i.slowPoll())}i.polling.set(20,D)},ui.prototype.poll=function(){var e=this,i=this.cm,D=this.textarea,A=this.prevInput;if(this.contextMenuPending||!i.state.focused||St(D)&&!A&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var U=D.value;if(U==A&&!i.somethingSelected())return!1;if(T&&b>=9&&this.hasSelection===U||l&&/[\uf700-\uf7ff]/.test(U))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var $=U.charCodeAt(0);if($==8203&&!A&&(A="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,he=Math.min(A.length,U.length);oe<he&&A.charCodeAt(oe)==U.charCodeAt(oe);)++oe;return Bi(i,function(){hs(i,U.slice(oe),A.length-oe,null,e.composing?"*compose":null),U.length>1e3||U.indexOf(`
`)>-1?D.value=e.prevInput="":e.prevInput=U,e.composing&&(e.composing.range.clear(),e.composing.range=i.markText(e.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ui.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ui.prototype.onKeyPress=function(){T&&b>=9&&(this.hasSelection=null),this.fastPoll()},ui.prototype.onContextMenu=function(e){var i=this,D=i.cm,A=D.display,U=i.textarea;i.contextMenuPending&&i.contextMenuPending();var $=ai(D,e),oe=A.scroller.scrollTop;if(!$||c)return;var he=D.options.resetSelectionOnContextMenu;he&&D.doc.sel.contains($)==-1&&si(D,Pi)(D.doc,ga($),Ae);var me=U.style.cssText,xe=i.wrapper.style.cssText,We=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",U.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;p&&(Ye=window.scrollY),A.input.focus(),p&&window.scrollTo(null,Ye),A.input.reset(),D.somethingSelected()||(U.value=i.prevInput=" "),i.contextMenuPending=nt,A.selForContextMenu=D.doc.sel,clearTimeout(A.detectingSelectAll);function lt(){if(U.selectionStart!=null){var Bt=D.somethingSelected(),Jt="\u200B"+(Bt?U.value:"");U.value="\u21DA",U.value=Jt,i.prevInput=Bt?"":"\u200B",U.selectionStart=1,U.selectionEnd=Jt.length,A.selForContextMenu=D.doc.sel}}function nt(){if(i.contextMenuPending!=nt)return;if(i.contextMenuPending=!1,i.wrapper.style.cssText=xe,U.style.cssText=me,T&&b<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=oe),U.selectionStart!=null){(!T||T&&b<9)&&lt();var Bt=0,Jt=function(){A.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&i.prevInput=="\u200B"?si(D,Is)(D):Bt++<10?A.detectingSelectAll=setTimeout(Jt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Jt,200)}}if(T&&b>=9&&lt(),R){Ne(e);var At=function(){ct(window,"mouseup",At),setTimeout(nt,20)};Ie(window,"mouseup",At)}else setTimeout(nt,50)},ui.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ui.prototype.setUneditable=function(){},ui.prototype.needsContentAttribute=!1;function iu(e,i){if(i=i?P(i):{},i.value=e.value,!i.tabindex&&e.tabIndex&&(i.tabindex=e.tabIndex),!i.placeholder&&e.placeholder&&(i.placeholder=e.placeholder),i.autofocus==null){var D=V();i.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function A(){e.value=he.getValue()}var U;if(e.form&&(Ie(e.form,"submit",A),!i.leaveSubmitMethodAlone)){var $=e.form;U=$.submit;try{var oe=$.submit=function(){A(),$.submit=U,$.submit(),$.submit=oe}}catch(me){}}i.finishInit=function(me){me.save=A,me.getTextArea=function(){return e},me.toTextArea=function(){me.toTextArea=isNaN,A(),e.parentNode.removeChild(me.getWrapperElement()),e.style.display="",e.form&&(ct(e.form,"submit",A),!i.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var he=Qn(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},i);return he}function au(e){e.off=ct,e.on=Ie,e.wheelEventPixels=fo,e.Doc=$i,e.splitLines=dr,e.countColumn=z,e.findColumn=ye,e.isWordChar=Z,e.Pass=Se,e.signal=$e,e.Line=Nr,e.changeEnd=va,e.scrollbarModel=hr,e.Pos=Ut,e.cmpPos=_r,e.modes=vn,e.mimeModes=Or,e.resolveMode=Tt,e.getMode=gr,e.modeExtensions=Br,e.extendMode=zr,e.copyState=an,e.startState=Ei,e.innerMode=gi,e.commands=So,e.keyMap=Ia,e.keyName=Vs,e.isModifierKey=Gs,e.lookupKey=io,e.normalizeKeyMap=Pl,e.StringStream=bn,e.SharedTextMarker=xo,e.TextMarker=ja,e.LineWidget=Eo,e.e_preventDefault=Ee,e.e_stopPropagation=Ce,e.e_stop=Ne,e.addClass=W,e.contains=L,e.rmClass=v,e.keyNames=Fa}Jl(Qn),eu(Qn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var $o in $i.prototype)$i.prototype.hasOwnProperty($o)&&ue(ou,$o)<0&&(Qn.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}($i.prototype[$o]));return Me($i),Qn.inputStyles={textarea:ui,contenteditable:Fn},Qn.defineMode=function(e){!Qn.defaults.mode&&e!="null"&&(Qn.defaults.mode=e),dn.apply(this,arguments)},Qn.defineMIME=hn,Qn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Qn.defineMIME("text/plain","null"),Qn.defineExtension=function(e,i){Qn.prototype[e]=i},Qn.defineDocExtension=function(e,i){$i.prototype[e]=i},Qn.fromTextArea=iu,au(Qn),Qn.version="5.58.2",Qn})},WYAk:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){(function(){var g=N,O=g.lib,M=O.Base,m=g.enc,y=m.Utf8,T=g.algo,b=T.HMAC=M.extend({init:function(p,d){p=this._hasher=new p.init,typeof d=="string"&&(d=y.parse(d));var n=p.blockSize,c=n*4;d.sigBytes>c&&(d=p.finalize(d)),d.clamp();for(var r=this._oKey=d.clone(),a=this._iKey=d.clone(),o=r.words,u=a.words,h=0;h<n;h++)o[h]^=1549556828,u[h]^=909522486;r.sigBytes=a.sigBytes=c,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var d=this._hasher,n=d.finalize(p);d.reset();var c=d.finalize(this._oKey.clone().concat(n));return c}})})()})},WaYH:function(F,q,j){"use strict";var N=j("rePB"),g=j("Ff2n"),O=j("VTBJ"),M=j("1OyB"),m=j("vuIU"),y=j("JX7q"),T=j("Ji7U"),b=j("LK+K"),p=j("q1tI"),d=j("TSYQ"),n=j.n(d),c=j("sboe"),r=j("OZM5"),a=function(R){var C=R.prefixCls,v=R.level,_=R.isStart,E=R.isEnd;if(!v)return null;for(var w="".concat(C,"-indent-unit"),k=[],I=0;I<v;I+=1){var L;k.push(p.createElement("span",{key:I,className:n()(w,(L={},Object(N.a)(L,"".concat(w,"-start"),_[I+1]),Object(N.a)(L,"".concat(w,"-end"),E[I+1]),Object(N.a)(L,"".concat(w,"-end-first-level"),!I&&E[0]),L))}))}return p.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},k)},o=a,u=j("815F"),h="open",s="close",l="---",t=function(f){Object(T.a)(C,f);var R=Object(b.a)(C);function C(){var v;return Object(M.a)(this,C),v=R.apply(this,arguments),v.state={dragNodeHighlight:!1},v.onSelectorClick=function(_){var E=v.props.context.onNodeClick;E(_,Object(u.b)(v.props)),v.isSelectable()?v.onSelect(_):v.onCheck(_)},v.onSelectorDoubleClick=function(_){var E=v.props.context.onNodeDoubleClick;E(_,Object(u.b)(v.props))},v.onSelect=function(_){if(v.isDisabled())return;var E=v.props.context.onNodeSelect;_.preventDefault(),E(_,Object(u.b)(v.props))},v.onCheck=function(_){if(v.isDisabled())return;var E=v.props,w=E.disableCheckbox,k=E.checked,I=v.props.context.onNodeCheck;if(!v.isCheckable()||w)return;_.preventDefault();var L=!k;I(_,Object(u.b)(v.props),L)},v.onMouseEnter=function(_){var E=v.props.context.onNodeMouseEnter;E(_,Object(u.b)(v.props))},v.onMouseLeave=function(_){var E=v.props.context.onNodeMouseLeave;E(_,Object(u.b)(v.props))},v.onContextMenu=function(_){var E=v.props.context.onNodeContextMenu;E(_,Object(u.b)(v.props))},v.onDragStart=function(_){var E=v.props.context.onNodeDragStart;_.stopPropagation(),v.setState({dragNodeHighlight:!0}),E(_,Object(y.a)(v));try{_.dataTransfer.setData("text/plain","")}catch(w){}},v.onDragEnter=function(_){var E=v.props.context.onNodeDragEnter;_.preventDefault(),_.stopPropagation(),E(_,Object(y.a)(v))},v.onDragOver=function(_){var E=v.props.context.onNodeDragOver;_.preventDefault(),_.stopPropagation(),E(_,Object(y.a)(v))},v.onDragLeave=function(_){var E=v.props.context.onNodeDragLeave;_.stopPropagation(),E(_,Object(y.a)(v))},v.onDragEnd=function(_){var E=v.props.context.onNodeDragEnd;_.stopPropagation(),v.setState({dragNodeHighlight:!1}),E(_,Object(y.a)(v))},v.onDrop=function(_){var E=v.props.context.onNodeDrop;_.preventDefault(),_.stopPropagation(),v.setState({dragNodeHighlight:!1}),E(_,Object(y.a)(v))},v.onExpand=function(_){var E=v.props.context.onNodeExpand;E(_,Object(u.b)(v.props))},v.setSelectHandle=function(_){v.selectHandle=_},v.getNodeState=function(){var _=v.props.expanded;return v.isLeaf()?null:_?h:s},v.hasChildren=function(){var _=v.props.eventKey,E=v.props.context.keyEntities,w=E[_]||{},k=w.children;return!!(k||[]).length},v.isLeaf=function(){var _=v.props,E=_.isLeaf,w=_.loaded,k=v.props.context.loadData,I=v.hasChildren();return E===!1?!1:E||!k&&!I||k&&w&&!I},v.isDisabled=function(){var _=v.props.disabled,E=v.props.context.disabled;return!!(E||_)},v.isCheckable=function(){var _=v.props.checkable,E=v.props.context.checkable;return!E||_===!1?!1:E},v.syncLoadData=function(_){var E=_.expanded,w=_.loading,k=_.loaded,I=v.props.context,L=I.loadData,V=I.onNodeLoad;if(w)return;L&&E&&!v.isLeaf()&&(!v.hasChildren()&&!k&&V(Object(u.b)(v.props)))},v.renderSwitcher=function(){var _=v.props,E=_.expanded,w=_.switcherIcon,k=v.props.context,I=k.prefixCls,L=k.switcherIcon,V=w||L;if(v.isLeaf())return p.createElement("span",{className:n()("".concat(I,"-switcher"),"".concat(I,"-switcher-noop"))},typeof V=="function"?V(Object(O.a)(Object(O.a)({},v.props),{},{isLeaf:!0})):V);var W=n()("".concat(I,"-switcher"),"".concat(I,"-switcher_").concat(E?h:s));return p.createElement("span",{onClick:v.onExpand,className:W},typeof V=="function"?V(Object(O.a)(Object(O.a)({},v.props),{},{isLeaf:!1})):V)},v.renderCheckbox=function(){var _=v.props,E=_.checked,w=_.halfChecked,k=_.disableCheckbox,I=v.props.context.prefixCls,L=v.isDisabled(),V=v.isCheckable();if(!V)return null;var W=typeof V!="boolean"?V:null;return p.createElement("span",{className:n()("".concat(I,"-checkbox"),E&&"".concat(I,"-checkbox-checked"),!E&&w&&"".concat(I,"-checkbox-indeterminate"),(L||k)&&"".concat(I,"-checkbox-disabled")),onClick:v.onCheck},W)},v.renderIcon=function(){var _=v.props.loading,E=v.props.context.prefixCls;return p.createElement("span",{className:n()("".concat(E,"-iconEle"),"".concat(E,"-icon__").concat(v.getNodeState()||"docu"),_&&"".concat(E,"-icon_loading"))})},v.renderSelector=function(){var _=v.state.dragNodeHighlight,E=v.props,w=E.title,k=E.selected,I=E.icon,L=E.loading,V=E.data,W=v.props.context,H=W.prefixCls,G=W.showIcon,B=W.icon,P=W.draggable,z=W.loadData,J=W.titleRender,ue=v.isDisabled(),de="".concat(H,"-node-content-wrapper"),Se;if(G){var Ae=I||B;Se=Ae?p.createElement("span",{className:n()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof Ae=="function"?Ae(v.props):Ae):v.renderIcon()}else z&&L&&(Se=v.renderIcon());var pe;typeof w=="function"?pe=w(V):J?pe=J(V):pe=w;var Oe=p.createElement("span",{className:"".concat(H,"-title")},pe);return p.createElement("span",{ref:v.setSelectHandle,title:typeof w=="string"?w:"",className:n()("".concat(de),"".concat(de,"-").concat(v.getNodeState()||"normal"),!ue&&(k||_)&&"".concat(H,"-node-selected"),!ue&&P&&"draggable"),draggable:!ue&&P||void 0,"aria-grabbed":!ue&&P||void 0,onMouseEnter:v.onMouseEnter,onMouseLeave:v.onMouseLeave,onContextMenu:v.onContextMenu,onClick:v.onSelectorClick,onDoubleClick:v.onSelectorDoubleClick,onDragStart:P?v.onDragStart:void 0},Se,Oe)},v}return Object(m.a)(C,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var _=this.props.selectable,E=this.props.context.selectable;return typeof _=="boolean"?_:E}},{key:"render",value:function(){var _,E=this.props,w=E.eventKey,k=E.className,I=E.style,L=E.dragOver,V=E.dragOverGapTop,W=E.dragOverGapBottom,H=E.isLeaf,G=E.isStart,B=E.isEnd,P=E.expanded,z=E.selected,J=E.checked,ue=E.halfChecked,de=E.loading,Se=E.domRef,Ae=E.active,pe=E.onMouseMove,Oe=Object(g.a)(E,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ye=this.props.context,ce=ye.prefixCls,ae=ye.filterTreeNode,re=ye.draggable,fe=ye.keyEntities,te=this.isDisabled(),ne=Object(r.f)(Oe),Te=fe[w]||{},ie=Te.level,Z=B[B.length-1];return p.createElement("div",Object.assign({ref:Se,className:n()(k,"".concat(ce,"-treenode"),(_={},Object(N.a)(_,"".concat(ce,"-treenode-disabled"),te),Object(N.a)(_,"".concat(ce,"-treenode-switcher-").concat(P?"open":"close"),!H),Object(N.a)(_,"".concat(ce,"-treenode-checkbox-checked"),J),Object(N.a)(_,"".concat(ce,"-treenode-checkbox-indeterminate"),ue),Object(N.a)(_,"".concat(ce,"-treenode-selected"),z),Object(N.a)(_,"".concat(ce,"-treenode-loading"),de),Object(N.a)(_,"".concat(ce,"-treenode-active"),Ae),Object(N.a)(_,"".concat(ce,"-treenode-leaf-last"),Z),Object(N.a)(_,"drag-over",!te&&L),Object(N.a)(_,"drag-over-gap-top",!te&&V),Object(N.a)(_,"drag-over-gap-bottom",!te&&W),Object(N.a)(_,"filter-node",ae&&ae(Object(u.b)(this.props))),_)),style:I,onDragEnter:re?this.onDragEnter:void 0,onDragOver:re?this.onDragOver:void 0,onDragLeave:re?this.onDragLeave:void 0,onDrop:re?this.onDrop:void 0,onDragEnd:re?this.onDragEnd:void 0,onMouseMove:pe},ne),p.createElement(o,{prefixCls:ce,level:ie,isStart:G,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(p.Component),S=function(R){return p.createElement(c.a.Consumer,null,function(C){return p.createElement(t,Object.assign({},R,{context:C}))})};S.displayName="TreeNode",S.defaultProps={title:l},S.isTreeNode=1;var x=q.a=S},Y1PL:function(F,q,j){"use strict";j.r(q),j.d(q,"ResizableTextArea",function(){return ue});var N=j("wx14"),g=j("1OyB"),O=j("vuIU"),M=j("Ji7U"),m=j("LK+K"),y=j("q1tI"),T=j("VTBJ"),b=j("rePB"),p=j("Zm9Q"),d=j("Kwbf"),n=j("c+Xe"),c=j("m+aA"),r=j("bdgK"),a=new Map;function o(Ae){Ae.forEach(function(pe){var Oe,ye=pe.target;(Oe=a.get(ye))===null||Oe===void 0||Oe.forEach(function(ce){return ce(ye)})})}var u=new r.default(o),h=null,s=null;function l(Ae,pe){a.has(Ae)||(a.set(Ae,new Set),u.observe(Ae)),a.get(Ae).add(pe)}function t(Ae,pe){a.has(Ae)&&(a.get(Ae).delete(pe),a.get(Ae).size||(u.unobserve(Ae),a.delete(Ae)))}var S=function(Ae){Object(M.a)(Oe,Ae);var pe=Object(m.a)(Oe);function Oe(){return Object(g.a)(this,Oe),pe.apply(this,arguments)}return Object(O.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(y.Component),x=y.createContext(null);function f(Ae){var pe=Ae.children,Oe=Ae.onBatchResize,ye=y.useRef(0),ce=y.useRef([]),ae=y.useContext(x),re=y.useCallback(function(fe,te,ne){ye.current+=1;var Te=ye.current;ce.current.push({size:fe,element:te,data:ne}),Promise.resolve().then(function(){Te===ye.current&&(Oe==null||Oe(ce.current),ce.current=[])}),ae==null||ae(fe,te,ne)},[Oe,ae]);return y.createElement(x.Provider,{value:re},pe)}function R(Ae){var pe=Ae.children,Oe=Ae.disabled,ye=y.useRef(null),ce=y.useRef(null),ae=y.useContext(x),re=y.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),fe=y.isValidElement(pe)&&Object(n.c)(pe),te=fe?pe.ref:null,ne=y.useMemo(function(){return Object(n.a)(te,ye)},[te,ye]),Te=y.useRef(Ae);Te.current=Ae;var ie=y.useCallback(function(Z){var X=Te.current,Q=X.onResize,_e=X.data,ve=Z.getBoundingClientRect(),Re=ve.width,Je=ve.height,qe=Z.offsetWidth,rt=Z.offsetHeight,ut=Math.floor(Re),dt=Math.floor(Je);if(re.current.width!==ut||re.current.height!==dt||re.current.offsetWidth!==qe||re.current.offsetHeight!==rt){var ft={width:ut,height:dt,offsetWidth:qe,offsetHeight:rt};re.current=ft;var Be=qe===Math.round(Re)?Re:qe,Ie=rt===Math.round(Je)?Je:rt,at=Object(T.a)(Object(T.a)({},ft),{},{offsetWidth:Be,offsetHeight:Ie});ae==null||ae(at,Z,_e),Q&&Promise.resolve().then(function(){Q(at,Z)})}},[]);return y.useEffect(function(){var Z=Object(c.a)(ye.current)||Object(c.a)(ce.current);return Z&&!Oe&&l(Z,ie),function(){return t(Z,ie)}},[ye.current,Oe]),y.createElement(S,{ref:ce},fe?y.cloneElement(pe,{ref:ne}):pe)}var C="rc-observer-key";function v(Ae){var pe=Ae.children,Oe=Object(p.a)(pe);return Oe.map(function(ye,ce){var ae=(ye==null?void 0:ye.key)||"".concat(C,"-").concat(ce);return y.createElement(R,Object(N.a)({},Ae,{key:ae}),ye)})}v.Collection=f;var _=v,E=j("bT9E"),w=j("TSYQ"),k=j.n(w),I=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,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"],V={},W;function H(Ae){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(pe&&V[Oe])return V[Oe];var ye=window.getComputedStyle(Ae),ce=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),ae=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),re=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),fe=L.map(function(ne){return"".concat(ne,":").concat(ye.getPropertyValue(ne))}).join(";"),te={sizingStyle:fe,paddingSize:ae,borderSize:re,boxSizing:ce};return pe&&Oe&&(V[Oe]=te),te}function G(Ae){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;W||(W=document.createElement("textarea"),W.setAttribute("tab-index","-1"),W.setAttribute("aria-hidden","true"),document.body.appendChild(W)),Ae.getAttribute("wrap")?W.setAttribute("wrap",Ae.getAttribute("wrap")):W.removeAttribute("wrap");var ce=H(Ae,pe),ae=ce.paddingSize,re=ce.borderSize,fe=ce.boxSizing,te=ce.sizingStyle;W.setAttribute("style","".concat(te,";").concat(I)),W.value=Ae.value||Ae.placeholder||"";var ne=Number.MIN_SAFE_INTEGER,Te=Number.MAX_SAFE_INTEGER,ie=W.scrollHeight,Z;if(fe==="border-box"?ie+=re:fe==="content-box"&&(ie-=ae),Oe!==null||ye!==null){W.value=" ";var X=W.scrollHeight-ae;Oe!==null&&(ne=X*Oe,fe==="border-box"&&(ne=ne+ae+re),ie=Math.max(ne,ie)),ye!==null&&(Te=X*ye,fe==="border-box"&&(Te=Te+ae+re),Z=ie>Te?"":"hidden",ie=Math.min(Te,ie))}return{height:ie,minHeight:ne,maxHeight:Te,overflowY:Z,resize:"none"}}var B=j("Gytx"),P=j.n(B),z;(function(Ae){Ae[Ae.NONE=0]="NONE",Ae[Ae.RESIZING=1]="RESIZING",Ae[Ae.RESIZED=2]="RESIZED"})(z||(z={}));var J=function(Ae){Object(M.a)(Oe,Ae);var pe=Object(m.a)(Oe);function Oe(ye){var ce;return Object(g.a)(this,Oe),ce=pe.call(this,ye),ce.nextFrameActionId=void 0,ce.resizeFrameId=void 0,ce.textArea=void 0,ce.saveTextArea=function(ae){ce.textArea=ae},ce.handleResize=function(ae){var re=ce.state.resizeStatus,fe=ce.props,te=fe.autoSize,ne=fe.onResize;if(re!==z.NONE)return;typeof ne=="function"&&ne(ae),te&&ce.resizeOnNextFrame()},ce.resizeOnNextFrame=function(){cancelAnimationFrame(ce.nextFrameActionId),ce.nextFrameActionId=requestAnimationFrame(ce.resizeTextarea)},ce.resizeTextarea=function(){var ae=ce.props.autoSize;if(!ae||!ce.textArea)return;var re=ae.minRows,fe=ae.maxRows,te=G(ce.textArea,!1,re,fe);ce.setState({textareaStyles:te,resizeStatus:z.RESIZING},function(){cancelAnimationFrame(ce.resizeFrameId),ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:z.RESIZED},function(){ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:z.NONE}),ce.fixFirefoxAutoScroll()})})})})},ce.renderTextArea=function(){var ae=ce.props,re=ae.prefixCls,fe=re===void 0?"rc-textarea":re,te=ae.autoSize,ne=ae.onResize,Te=ae.className,ie=ae.disabled,Z=ce.state,X=Z.textareaStyles,Q=Z.resizeStatus,_e=Object(E.a)(ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ve=k()(fe,Te,Object(b.a)({},"".concat(fe,"-disabled"),ie));"value"in _e&&(_e.value=_e.value||"");var Re=Object(T.a)(Object(T.a)(Object(T.a)({},ce.props.style),X),Q===z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return y.createElement(_,{onResize:ce.handleResize,disabled:!(te||ne)},y.createElement("textarea",Object(N.a)({},_e,{className:ve,style:Re,ref:ce.saveTextArea})))},ce.state={textareaStyles:{},resizeStatus:z.NONE},ce}return Object(O.a)(Oe,[{key:"componentDidUpdate",value:function(ce){(ce.value!==this.props.value||!P()(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,ae=this.textArea.selectionEnd;this.textArea.setSelectionRange(ce,ae)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(y.Component),ue=J,de=function(Ae){Object(M.a)(Oe,Ae);var pe=Object(m.a)(Oe);function Oe(ye){var ce;Object(g.a)(this,Oe),ce=pe.call(this,ye),ce.resizableTextArea=void 0,ce.focus=function(){ce.resizableTextArea.textArea.focus()},ce.saveTextArea=function(re){ce.resizableTextArea=re},ce.handleChange=function(re){var fe=ce.props.onChange;ce.setValue(re.target.value,function(){ce.resizableTextArea.resizeTextarea()}),fe&&fe(re)},ce.handleKeyDown=function(re){var fe=ce.props,te=fe.onPressEnter,ne=fe.onKeyDown;re.keyCode===13&&te&&te(re),ne&&ne(re)};var ae=typeof ye.value=="undefined"||ye.value===null?ye.defaultValue:ye.value;return ce.state={value:ae},ce}return Object(O.a)(Oe,[{key:"setValue",value:function(ce,ae){"value"in this.props||this.setState({value:ce},ae)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return y.createElement(ue,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ce){return"value"in ce?{value:ce.value}:null}}]),Oe}(y.Component),Se=q.default=de},ZW9T:function(F,q,j){"use strict";j.d(q,"a",function(){return G});var N=j("k1fw"),g=j("miYZ"),O=j("tsqr"),M=j("rAM+"),m=j("tJVT"),y=j("PpiC"),T=j("q1tI"),b=j.n(T),p=j("bdgK"),d=j("oBTY"),n=j("9og8"),c=j("WmNS"),r=j.n(c),a={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"]},o={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"]},u={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","for","friend","gcnew","generic","goto","if","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:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"for",content:["for( ; ; ){"," $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 <sstream>",content:["#include <sstream>"].join(`
`)},{label:"#include <string>",content:["#include <string>"].join(`
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
`)}]},h={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(`
`)}]},s=j("5VLF"),l=j.n(s),t={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"]}},S=function(P,z){return z.map(function(J){return{label:J,kind:P.languages.CompletionItemKind.Keyword,insertText:J}})},x=function(P){return Object.keys(t.tables).map(function(z){return{label:z,kind:P.languages.CompletionItemKind.Variable,insertText:z}})},f=function(P,z){var J=t.tables[P];return J?J.map(function(ue){return{label:ue,kind:z.languages.CompletionItemKind.Field,insertText:ue}}):[]};function R(B,P,z,J,ue){var de=P.getWordUntilPosition(z),Se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},Ae=J.map(function(pe){return{label:pe,kind:B.languages.CompletionItemKind.Keyword,insertText:pe,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return ue.map(function(pe){Ae.push(Object(N.a)(Object(N.a)({},pe),{},{range:Se}))}),Ae}var C=function(B){t.languages.map(function(ue){return B.languages.registerDocumentFormattingEditProvider(ue,{provideDocumentFormattingEdits:function(Se,Ae,pe){return Object(n.a)(r.a.mark(function Oe(){var ye;return r.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ye=l()(Se.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}),ae.abrupt("return",[{range:Se.getFullModelRange(),text:ye}]);case 2:case"end":return ae.stop()}},Oe)}))()}}),ue});var P=u.quickKey.map(function(ue){return{label:ue.label,kind:B.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),z=h.quickKey.map(function(ue){return{label:ue.label,kind:B.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),J=o.quickKey.map(function(ue){return{label:ue.label,kind:B.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet}});B.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(d.a)(u.keywords),Object(d.a)(u.quickKey.map(function(ue){return ue.label}))),provideCompletionItems:function(de,Se){var Ae=de.getValueInRange({startLineNumber:Se.lineNumber,startColumn:1,endLineNumber:Se.lineNumber,endColumn:Se.column}),pe=Ae.match(/cu/gim);console.log("match:",pe,Se,Ae,de);var Oe=[],ye=Se.lineNumber,ce=Se.column,ae=de.getValueInRange({startLineNumber:ye,startColumn:0,endLineNumber:ye,endColumn:ce}),re=ae.trim().split(/\s+/),fe=re[re.length-1];if(fe.endsWith(".")){var te=fe.slice(0,fe.length-1);Object.keys(t.tables).includes(te)&&(Oe=Object(d.a)(f(te,B)))}else fe==="."?Oe=[]:Oe=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,u.keywords)),Object(d.a)(P));return{suggestions:Oe}}}),B.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(d.a)(a.keywords)),provideCompletionItems:function(de,Se){var Ae=de.getValueInRange({startLineNumber:Se.lineNumber,startColumn:1,endLineNumber:Se.lineNumber,endColumn:Se.column}),pe=Ae.match(/cu/gim);console.log("match:",pe,Se,Ae,de);var Oe=[],ye=Se.lineNumber,ce=Se.column,ae=de.getValueInRange({startLineNumber:ye,startColumn:0,endLineNumber:ye,endColumn:ce}),re=ae.trim().split(/\s+/),fe=re[re.length-1];if(fe.endsWith(".")){var te=fe.slice(0,fe.length-1);Object.keys(t.tables).includes(te)&&(Oe=Object(d.a)(f(te,B)))}else fe==="."?Oe=[]:Oe=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,a.keywords)));return{suggestions:Oe}}}),B.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(d.a)(o.keywords)),provideCompletionItems:function(de,Se){var Ae=[],pe=Se.lineNumber,Oe=Se.column,ye=de.getValueInRange({startLineNumber:pe,startColumn:0,endLineNumber:pe,endColumn:Oe}),ce=ye.trim().split(/\s+/),ae=ce[ce.length-1];if(ae.endsWith(".")){var re=ae.slice(0,ae.length-1);Object.keys(t.tables).includes(re)&&(Ae=Object(d.a)(f(re,B)))}else ae==="."?Ae=[]:Ae=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,o.keywords)),Object(d.a)(J));return{suggestions:Ae}}}),B.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(d.a)(h.keywords)),provideCompletionItems:function(de,Se){var Ae=[],pe=Se.lineNumber,Oe=Se.column,ye=de.getValueInRange({startLineNumber:pe,startColumn:0,endLineNumber:pe,endColumn:Oe}),ce=ye.trim().split(/\s+/),ae=ce[ce.length-1];if(ae.endsWith(".")){var re=ae.slice(0,ae.length-1);Object.keys(t.tables).includes(re)&&(Ae=Object(d.a)(f(re,B)))}else ae==="."?Ae=[]:Ae=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,h.keywords)),Object(d.a)(z));return{suggestions:Ae}}})},v="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",_=j("LvDl"),E=j("+ua5");function w(B){return/^\d+$/.test(B)?"".concat(B,"px"):B}function k(){}var I=!1,L={"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 V(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=B;if(Array.isArray(B)){for(var z=0;z<B.length;z++){var J=L[B[z]];if(J)return J}return P[0]}return L[P]||P}var W=null,H=q.b=function(B){var P=B.width,z=P===void 0?"100%":P,J=B.height,ue=J===void 0?"100%":J,de=B.value,Se=B.language,Ae=Se===void 0?"javascript":Se,pe=B.style,Oe=pe===void 0?{}:pe,ye=B.options,ce=ye===void 0?{}:ye,ae=B.overrideServices,re=ae===void 0?{}:ae,fe=B.theme,te=fe===void 0?"vs-dark":fe,ne=B.onEditBlur,Te=B.onSave,ie=B.autoHeight,Z=ie===void 0?!1:ie,X=B.forbidCopy,Q=X===void 0?!1:X,_e=B.onChange,ve=_e===void 0?k:_e,Re=B.editorDidMount,Je=Re===void 0?k:Re,qe=B.onFocus,rt=qe===void 0?k:qe,ut=B.filename,dt=ut===void 0?"educoder.txt":ut,ft=B.errorLine,Be=B.errorContent,Ie=Be===void 0?"":Be,at=Object(y.a)(B,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),ct=Object(T.useRef)(),$e=Object(T.useRef)({}),st=Object(T.useRef)(),Ue=Object(T.useRef)(!1),Le=Object(T.useRef)(),Me=Object(T.useState)(!1),Ee=Object(m.a)(Me,2),Ce=Ee[0],ke=Ee[1];function Ne(){var Tt;return ct.current&&(Tt=new p.default(function(gr){var Br=Object(M.a)(gr),zr;try{for(Br.s();!(zr=Br.n()).done;){var an=zr.value;(an.target.offsetHeight>0||an.target.offsetWidth>0)&&$e.current.instance.layout()}}catch(gi){Br.e(gi)}finally{Br.f()}}),Tt.observe(ct.current)),Tt}function He(){O.b.warn(decodeURIComponent(v))}var tt=function(){var gr=$e.current.instance;if(de!=null&&gr&&Ce){var Br=gr.getModel();Br&&de!==Br.getValue()&&(I=!0,Br.setValue(de),gr.layout(),I=!1)}};Object(T.useEffect)(function(){st.current&&clearTimeout(st.current),st.current=setTimeout(function(){tt()},500)},[de,Ce,$e.current]),Object(T.useEffect)(function(){if(ft&&$e.current&&$e.current.instance){var Tt=$e.current.instance;Tt.changeViewZones(function(Br){var zr=document.createElement("div");zr.style.padding="10px 20px",zr.style.width="calc(100% - 20px)",zr.className="my-error-line-wrp",zr.innerHTML=Ie,Br.addZone({afterLineNumber:ft||11,heightInLines:3,domNode:zr})});var gr={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}};Tt.addOverlayWidget(gr),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[ft,$e.current,Ce]);function vt(){var Tt=$e.current.instance;if(Tt){var gr=Tt.getSelection(),Br=$e.current.pastePos||{},zr=new W.Range(Br.startLineNumber||gr.endLineNumber,Br.startColumn||gr.endColumn,Br.endLineNumber||gr.endLineNumber,Br.endColumn||gr.endColumn);setTimeout(function(){Tt.executeEdits("",[{range:zr,text:""}])},300)}}function yt(Tt){(window.navigator.platform.match("Mac")?Tt.metaKey:Tt.ctrlKey)&&Tt.keyCode==83&&(Tt.preventDefault(),Te())}var Wt=function(){if(Z&&$e.current.instance){var gr=$e.current.instance.getContentHeight();dn(gr<ue?ue:gr)}else dn(ue)};function Ht(Tt){var gr=document.createEvent("MouseEvents");gr.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Tt.dispatchEvent(gr)}function cr(Tt,gr){var Br=window.URL||window.webkitURL||window,zr=new Blob([gr]),an=document.createElementNS("http://www.w3.org/1999/xhtml","a");an.href=Br.createObjectURL(zr),an.download=Tt,Ht(an)}Object(T.useEffect)(function(){Wt()},[Wt]),Object(T.useEffect)(function(){ct.current&&!Ce&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(Tt){try{W=Tt,$e.current.instance=W.editor.create(ct.current,{value:de,language:V(Ae),theme:te,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},re);var gr=$e.current.instance;if(Je(gr,W),setTimeout(function(){Wt(),$e.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){cr(dt||"educoder.txt",gr.getValue())}})},500),$e.current.subscription=gr.onDidChangeModelContent(function(zr){Ue.current?clearTimeout(Le.current):(Wt(),ve(gr.getValue(),zr)),Le.current=setTimeout(function(){Ue.current=!1},500)}),window.Monaco||C(W),Q&&(gr.addCommand(W.KeyMod.CtrlCmd|W.KeyMod.Shift|W.KeyCode.KEY_V,function(){return He(),null}),gr.addCommand(W.KeyMod.CtrlCmd|W.KeyCode.KEY_C,function(){return He(),null})),window.Monaco=W,ne&&gr.onDidBlurEditorWidget(function(){ne(gr.getValue())}),rt&&gr.onDidFocusEditorText(function(){rt(gr.getValue())}),Q){gr.addCommand(W.KeyMod.CtrlCmd|W.KeyCode.KEY_V,function(){return He(),null}),gr.onDidPaste(function(zr){$e.current.pastePos=zr});try{window.addEventListener("paste",vt)}catch(zr){}}var Br=Ne();return ke(!0),function(){var zr=$e.current.instance;zr.dispose();var an=zr.getModel();an&&an.dispose(),$e.current.subscription&&$e.current.subscription.dispose(),Q&&window.removeEventListener("paste",vt),Br.unobserve(ct.current)}}catch(zr){}})},[]),Object(T.useEffect)(function(){var Tt=$e.current.instance;if(Tt&&Ce)return document.addEventListener("keydown",yt,!1),function(){document.removeEventListener("keydown",yt)}},[Te,Ce]),Object(T.useEffect)(function(){var Tt=$e.current.instance;if(Tt&&Ce){var gr=V(Ae);W.editor.setModelLanguage(Tt.getModel(),gr),console.log("language:",Ae,Tt.getModel(),gr)}},[Ae,Ce]),Object(T.useEffect)(function(){var Tt=$e.current.instance;Tt&&Ce&&W.editor.setTheme(te)},[te,Ce]),Object(T.useEffect)(function(){var Tt=$e.current.instance;Tt&&Ce&&(Tt.updateOptions(Object(N.a)({},ce)),setTimeout(function(){Tt.getModel().updateOptions(Object(N.a)({},ce))},200))},[JSON.stringify(ce),Ce]),Object(T.useEffect)(function(){var Tt=$e.current.instance;Tt&&Ce&&Tt.layout()},[z,ue,Ce]);var dr=Object(T.useState)(w(z)),St=Object(m.a)(dr,2),Kr=St[0],Vr=St[1],Yr=Object(T.useState)(w(ue)),vn=Object(m.a)(Yr,2),Or=vn[0],dn=vn[1],hn=Object(N.a)(Object(N.a)({},Oe),{},{width:Kr,height:Or});return b.a.createElement("div",{className:"my-monaco-editor",ref:ct,style:hn})};function G(B){var P=B.width,z=P===void 0?"100%":P,J=B.height,ue=J===void 0?"100%":J,de=B.original,Se=B.modified,Ae=B.language,pe=B.options,Oe=pe===void 0?{}:pe,ye=Object(T.useRef)(),ce=Object(T.useState)(null),ae=Object(m.a)(ce,2),re=ae[0],fe=ae[1];function te(Z){var X;return ye.current&&(X=new p.default(function(Q){var _e=Object(M.a)(Q),ve;try{for(_e.s();!(ve=_e.n()).done;){var Re=ve.value;(Re.target.offsetHeight>0||Re.target.offsetWidth>0)&&Z.layout()}}catch(Je){_e.e(Je)}finally{_e.f()}}),X.observe(ye.current)),X}Object(T.useEffect)(function(){ye.current&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(Z){W=Z;var X=W.editor.createDiffEditor(ye.current,Object(N.a)(Object(N.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Oe),{},{wordWrap:!0}));fe(X);var Q=te(X);return function(){X.dispose();var _e=X.getModel();_e&&_e.dispose(),Q.unobserve(ye.current)}})},[]),Object(T.useEffect)(function(){re&&re.setModel({original:W.editor.createModel(de,Ae),modified:W.editor.createModel(Se,Ae)})},[de,Se,Ae,re]);var ne=w(z),Te=w(ue),ie={width:ne,height:Te};return b.a.createElement("div",{className:"my-diff-editor",ref:ye,style:ie})}},ZpRC:function(F,q,j){"use strict";function N(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function g(n,c){return(!c||n!=="hidden")&&n!=="visible"&&n!=="clip"}function O(n,c){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var r=getComputedStyle(n,null);return g(r.overflowY,c)||g(r.overflowX,c)||function(a){var o=function(u){if(!u.ownerDocument||!u.ownerDocument.defaultView)return null;try{return u.ownerDocument.defaultView.frameElement}catch(h){return null}}(a);return!!o&&(o.clientHeight<a.scrollHeight||o.clientWidth<a.scrollWidth)}(n)}return!1}function M(n,c,r,a,o,u,h,s){return u<n&&h>c||u>n&&h<c?0:u<=n&&s<=r||h>=c&&s>=r?u-n-a:h>c&&s<r||u<n&&s>r?h-c+o:0}var m=function(n,c){var r=window,a=c.scrollMode,o=c.block,u=c.inline,h=c.boundary,s=c.skipOverflowHiddenElements,l=typeof h=="function"?h:function(X){return X!==h};if(!N(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],x=n;N(x)&&l(x);){if((x=x.parentElement)===t){S.push(x);break}x!=null&&x===document.body&&O(x)&&!O(document.documentElement)||x!=null&&O(x,s)&&S.push(x)}for(var f=r.visualViewport?r.visualViewport.width:innerWidth,R=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,_=n.getBoundingClientRect(),E=_.height,w=_.width,k=_.top,I=_.right,L=_.bottom,V=_.left,W=o==="start"||o==="nearest"?k:o==="end"?L:k+E/2,H=u==="center"?V+w/2:u==="end"?I:V,G=[],B=0;B<S.length;B++){var P=S[B],z=P.getBoundingClientRect(),J=z.height,ue=z.width,de=z.top,Se=z.right,Ae=z.bottom,pe=z.left;if(a==="if-needed"&&k>=0&&V>=0&&L<=R&&I<=f&&k>=de&&L<=Ae&&V>=pe&&I<=Se)return G;var Oe=getComputedStyle(P),ye=parseInt(Oe.borderLeftWidth,10),ce=parseInt(Oe.borderTopWidth,10),ae=parseInt(Oe.borderRightWidth,10),re=parseInt(Oe.borderBottomWidth,10),fe=0,te=0,ne="offsetWidth"in P?P.offsetWidth-P.clientWidth-ye-ae:0,Te="offsetHeight"in P?P.offsetHeight-P.clientHeight-ce-re:0;if(t===P)fe=o==="start"?W:o==="end"?W-R:o==="nearest"?M(v,v+R,R,ce,re,v+W,v+W+E,E):W-R/2,te=u==="start"?H:u==="center"?H-f/2:u==="end"?H-f:M(C,C+f,f,ye,ae,C+H,C+H+w,w),fe=Math.max(0,fe+v),te=Math.max(0,te+C);else{fe=o==="start"?W-de-ce:o==="end"?W-Ae+re+Te:o==="nearest"?M(de,Ae,J,ce,re+Te,W,W+E,E):W-(de+J/2)+Te/2,te=u==="start"?H-pe-ye:u==="center"?H-(pe+ue/2)+ne/2:u==="end"?H-Se+ae+ne:M(pe,Se,ue,ye,ae+ne,H,H+w,w);var ie=P.scrollLeft,Z=P.scrollTop;W+=Z-(fe=Math.max(0,Math.min(Z+fe,P.scrollHeight-J+Te))),H+=ie-(te=Math.max(0,Math.min(ie+te,P.scrollWidth-ue+ne)))}G.push({el:P,top:fe,left:te})}return G};function y(n){return n===Object(n)&&Object.keys(n).length!==0}function T(n,c){c===void 0&&(c="auto");var r="scrollBehavior"in document.body.style;n.forEach(function(a){var o=a.el,u=a.top,h=a.left;o.scroll&&r?o.scroll({top:u,left:h,behavior:c}):(o.scrollTop=u,o.scrollLeft=h)})}function b(n){return n===!1?{block:"end",inline:"nearest"}:y(n)?n:{block:"start",inline:"nearest"}}function p(n,c){var r=!n.ownerDocument.documentElement.contains(n);if(y(c)&&typeof c.behavior=="function")return c.behavior(r?[]:m(n,c));if(r)return;var a=b(c);return T(m(n,a),a.behavior)}var d=q.a=p},Zss7:function(F,q,j){var N;(function(g){var O=/^\s+/,M=/\s+$/,m=0,y=g.round,T=g.min,b=g.max,p=g.random;function d(re,fe){if(re=re||"",fe=fe||{},re instanceof d)return re;if(!(this instanceof d))return new d(re,fe);var te=n(re);this._originalInput=re,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=y(100*this._a)/100,this._format=fe.format||te.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=y(this._r)),this._g<1&&(this._g=y(this._g)),this._b<1&&(this._b=y(this._b)),this._ok=te.ok,this._tc_id=m++}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),fe,te,ne,Te,ie,Z;return fe=re.r/255,te=re.g/255,ne=re.b/255,fe<=.03928?Te=fe/12.92:Te=g.pow((fe+.055)/1.055,2.4),te<=.03928?ie=te/12.92:ie=g.pow((te+.055)/1.055,2.4),ne<=.03928?Z=ne/12.92:Z=g.pow((ne+.055)/1.055,2.4),.2126*Te+.7152*ie+.0722*Z},setAlpha:function(re){return this._a=G(re),this._roundA=y(100*this._a)/100,this},toHsv:function(){var re=o(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=o(this._r,this._g,this._b),fe=y(re.h*360),te=y(re.s*100),ne=y(re.v*100);return this._a==1?"hsv("+fe+", "+te+"%, "+ne+"%)":"hsva("+fe+", "+te+"%, "+ne+"%, "+this._roundA+")"},toHsl:function(){var re=r(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=r(this._r,this._g,this._b),fe=y(re.h*360),te=y(re.s*100),ne=y(re.l*100);return this._a==1?"hsl("+fe+", "+te+"%, "+ne+"%)":"hsla("+fe+", "+te+"%, "+ne+"%, "+this._roundA+")"},toHex:function(re){return h(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return s(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:y(this._r),g:y(this._g),b:y(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+y(this._r)+", "+y(this._g)+", "+y(this._b)+")":"rgba("+y(this._r)+", "+y(this._g)+", "+y(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:y(B(this._r,255)*100)+"%",g:y(B(this._g,255)*100)+"%",b:y(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+y(B(this._r,255)*100)+"%, "+y(B(this._g,255)*100)+"%, "+y(B(this._b,255)*100)+"%)":"rgba("+y(B(this._r,255)*100)+"%, "+y(B(this._g,255)*100)+"%, "+y(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:W[h(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var fe="#"+l(this._r,this._g,this._b,this._a),te=fe,ne=this._gradientType?"GradientType = 1, ":"";if(re){var Te=d(re);te="#"+l(Te._r,Te._g,Te._b,Te._a)}return"progid:DXImageTransform.Microsoft.gradient("+ne+"startColorstr="+fe+",endColorstr="+te+")"},toString:function(re){var fe=!!re;re=re||this._format;var te=!1,ne=this._a<1&&this._a>=0,Te=!fe&&ne&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Te?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(te=this.toRgbString()),re==="prgb"&&(te=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(te=this.toHexString()),re==="hex3"&&(te=this.toHexString(!0)),re==="hex4"&&(te=this.toHex8String(!0)),re==="hex8"&&(te=this.toHex8String()),re==="name"&&(te=this.toName()),re==="hsl"&&(te=this.toHslString()),re==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(re,fe){var te=re.apply(null,[this].concat([].slice.call(fe)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(f,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(re,fe){return re.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},d.fromRatio=function(re,fe){if(typeof re=="object"){var te={};for(var ne in re)re.hasOwnProperty(ne)&&(ne==="a"?te[ne]=re[ne]:te[ne]=Se(re[ne]));re=te}return d(re,fe)};function n(re){var fe={r:0,g:0,b:0},te=1,ne=null,Te=null,ie=null,Z=!1,X=!1;return typeof re=="string"&&(re=ce(re)),typeof re=="object"&&(ye(re.r)&&ye(re.g)&&ye(re.b)?(fe=c(re.r,re.g,re.b),Z=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):ye(re.h)&&ye(re.s)&&ye(re.v)?(ne=Se(re.s),Te=Se(re.v),fe=u(re.h,ne,Te),Z=!0,X="hsv"):ye(re.h)&&ye(re.s)&&ye(re.l)&&(ne=Se(re.s),ie=Se(re.l),fe=a(re.h,ne,ie),Z=!0,X="hsl"),re.hasOwnProperty("a")&&(te=re.a)),te=G(te),{ok:Z,format:re.format||X,r:T(255,b(fe.r,0)),g:T(255,b(fe.g,0)),b:T(255,b(fe.b,0)),a:te}}function c(re,fe,te){return{r:B(re,255)*255,g:B(fe,255)*255,b:B(te,255)*255}}function r(re,fe,te){re=B(re,255),fe=B(fe,255),te=B(te,255);var ne=b(re,fe,te),Te=T(re,fe,te),ie,Z,X=(ne+Te)/2;if(ne==Te)ie=Z=0;else{var Q=ne-Te;Z=X>.5?Q/(2-ne-Te):Q/(ne+Te);switch(ne){case re:ie=(fe-te)/Q+(fe<te?6:0);break;case fe:ie=(te-re)/Q+2;break;case te:ie=(re-fe)/Q+4;break}ie/=6}return{h:ie,s:Z,l:X}}function a(re,fe,te){var ne,Te,ie;re=B(re,360),fe=B(fe,100),te=B(te,100);function Z(_e,ve,Re){return Re<0&&(Re+=1),Re>1&&(Re-=1),Re<1/6?_e+(ve-_e)*6*Re:Re<1/2?ve:Re<2/3?_e+(ve-_e)*(2/3-Re)*6:_e}if(fe===0)ne=Te=ie=te;else{var X=te<.5?te*(1+fe):te+fe-te*fe,Q=2*te-X;ne=Z(Q,X,re+1/3),Te=Z(Q,X,re),ie=Z(Q,X,re-1/3)}return{r:ne*255,g:Te*255,b:ie*255}}function o(re,fe,te){re=B(re,255),fe=B(fe,255),te=B(te,255);var ne=b(re,fe,te),Te=T(re,fe,te),ie,Z,X=ne,Q=ne-Te;if(Z=ne===0?0:Q/ne,ne==Te)ie=0;else{switch(ne){case re:ie=(fe-te)/Q+(fe<te?6:0);break;case fe:ie=(te-re)/Q+2;break;case te:ie=(re-fe)/Q+4;break}ie/=6}return{h:ie,s:Z,v:X}}function u(re,fe,te){re=B(re,360)*6,fe=B(fe,100),te=B(te,100);var ne=g.floor(re),Te=re-ne,ie=te*(1-fe),Z=te*(1-Te*fe),X=te*(1-(1-Te)*fe),Q=ne%6,_e=[te,Z,ie,ie,X,te][Q],ve=[X,te,te,Z,ie,ie][Q],Re=[ie,ie,X,te,te,Z][Q];return{r:_e*255,g:ve*255,b:Re*255}}function h(re,fe,te,ne){var Te=[de(y(re).toString(16)),de(y(fe).toString(16)),de(y(te).toString(16))];return ne&&Te[0].charAt(0)==Te[0].charAt(1)&&Te[1].charAt(0)==Te[1].charAt(1)&&Te[2].charAt(0)==Te[2].charAt(1)?Te[0].charAt(0)+Te[1].charAt(0)+Te[2].charAt(0):Te.join("")}function s(re,fe,te,ne,Te){var ie=[de(y(re).toString(16)),de(y(fe).toString(16)),de(y(te).toString(16)),de(Ae(ne))];return Te&&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 l(re,fe,te,ne){var Te=[de(Ae(ne)),de(y(re).toString(16)),de(y(fe).toString(16)),de(y(te).toString(16))];return Te.join("")}d.equals=function(re,fe){return!re||!fe?!1:d(re).toRgbString()==d(fe).toRgbString()},d.random=function(){return d.fromRatio({r:p(),g:p(),b:p()})};function t(re,fe){fe=fe===0?0:fe||10;var te=d(re).toHsl();return te.s-=fe/100,te.s=P(te.s),d(te)}function S(re,fe){fe=fe===0?0:fe||10;var te=d(re).toHsl();return te.s+=fe/100,te.s=P(te.s),d(te)}function x(re){return d(re).desaturate(100)}function f(re,fe){fe=fe===0?0:fe||10;var te=d(re).toHsl();return te.l+=fe/100,te.l=P(te.l),d(te)}function R(re,fe){fe=fe===0?0:fe||10;var te=d(re).toRgb();return te.r=b(0,T(255,te.r-y(255*-(fe/100)))),te.g=b(0,T(255,te.g-y(255*-(fe/100)))),te.b=b(0,T(255,te.b-y(255*-(fe/100)))),d(te)}function C(re,fe){fe=fe===0?0:fe||10;var te=d(re).toHsl();return te.l-=fe/100,te.l=P(te.l),d(te)}function v(re,fe){var te=d(re).toHsl(),ne=(te.h+fe)%360;return te.h=ne<0?360+ne:ne,d(te)}function _(re){var fe=d(re).toHsl();return fe.h=(fe.h+180)%360,d(fe)}function E(re){var fe=d(re).toHsl(),te=fe.h;return[d(re),d({h:(te+120)%360,s:fe.s,l:fe.l}),d({h:(te+240)%360,s:fe.s,l:fe.l})]}function w(re){var fe=d(re).toHsl(),te=fe.h;return[d(re),d({h:(te+90)%360,s:fe.s,l:fe.l}),d({h:(te+180)%360,s:fe.s,l:fe.l}),d({h:(te+270)%360,s:fe.s,l:fe.l})]}function k(re){var fe=d(re).toHsl(),te=fe.h;return[d(re),d({h:(te+72)%360,s:fe.s,l:fe.l}),d({h:(te+216)%360,s:fe.s,l:fe.l})]}function I(re,fe,te){fe=fe||6,te=te||30;var ne=d(re).toHsl(),Te=360/te,ie=[d(re)];for(ne.h=(ne.h-(Te*fe>>1)+720)%360;--fe;)ne.h=(ne.h+Te)%360,ie.push(d(ne));return ie}function L(re,fe){fe=fe||6;for(var te=d(re).toHsv(),ne=te.h,Te=te.s,ie=te.v,Z=[],X=1/fe;fe--;)Z.push(d({h:ne,s:Te,v:ie})),ie=(ie+X)%1;return Z}d.mix=function(re,fe,te){te=te===0?0:te||50;var ne=d(re).toRgb(),Te=d(fe).toRgb(),ie=te/100,Z={r:(Te.r-ne.r)*ie+ne.r,g:(Te.g-ne.g)*ie+ne.g,b:(Te.b-ne.b)*ie+ne.b,a:(Te.a-ne.a)*ie+ne.a};return d(Z)},d.readability=function(re,fe){var te=d(re),ne=d(fe);return(g.max(te.getLuminance(),ne.getLuminance())+.05)/(g.min(te.getLuminance(),ne.getLuminance())+.05)},d.isReadable=function(re,fe,te){var ne=d.readability(re,fe),Te,ie;ie=!1,Te=ae(te);switch(Te.level+Te.size){case"AAsmall":case"AAAlarge":ie=ne>=4.5;break;case"AAlarge":ie=ne>=3;break;case"AAAsmall":ie=ne>=7;break}return ie},d.mostReadable=function(re,fe,te){var ne=null,Te=0,ie,Z,X,Q;te=te||{},Z=te.includeFallbackColors,X=te.level,Q=te.size;for(var _e=0;_e<fe.length;_e++)ie=d.readability(re,fe[_e]),ie>Te&&(Te=ie,ne=d(fe[_e]));return d.isReadable(re,ne,{level:X,size:Q})||!Z?ne:(te.includeFallbackColors=!1,d.mostReadable(re,["#fff","#000"],te))};var V=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=d.hexNames=H(V);function H(re){var fe={};for(var te in re)re.hasOwnProperty(te)&&(fe[re[te]]=te);return fe}function G(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function B(re,fe){J(re)&&(re="100%");var te=ue(re);return re=T(fe,b(0,parseFloat(re))),te&&(re=parseInt(re*fe,10)/100),g.abs(re-fe)<1e-6?1:re%fe/parseFloat(fe)}function P(re){return T(1,b(0,re))}function z(re){return parseInt(re,16)}function J(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ue(re){return typeof re=="string"&&re.indexOf("%")!=-1}function de(re){return re.length==1?"0"+re:""+re}function Se(re){return re<=1&&(re=re*100+"%"),re}function Ae(re){return g.round(parseFloat(re)*255).toString(16)}function pe(re){return z(re)/255}var Oe=function(){var re="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",te="(?:"+fe+")|(?:"+re+")",ne="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",Te="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),rgb:new RegExp("rgb"+ne),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+ne),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+ne),hsva:new RegExp("hsva"+Te),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 ye(re){return!!Oe.CSS_UNIT.exec(re)}function ce(re){re=re.replace(O,"").replace(M,"").toLowerCase();var fe=!1;if(V[re])re=V[re],fe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var te;return(te=Oe.rgb.exec(re))?{r:te[1],g:te[2],b:te[3]}:(te=Oe.rgba.exec(re))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Oe.hsl.exec(re))?{h:te[1],s:te[2],l:te[3]}:(te=Oe.hsla.exec(re))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Oe.hsv.exec(re))?{h:te[1],s:te[2],v:te[3]}:(te=Oe.hsva.exec(re))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Oe.hex8.exec(re))?{r:z(te[1]),g:z(te[2]),b:z(te[3]),a:pe(te[4]),format:fe?"name":"hex8"}:(te=Oe.hex6.exec(re))?{r:z(te[1]),g:z(te[2]),b:z(te[3]),format:fe?"name":"hex"}:(te=Oe.hex4.exec(re))?{r:z(te[1]+""+te[1]),g:z(te[2]+""+te[2]),b:z(te[3]+""+te[3]),a:pe(te[4]+""+te[4]),format:fe?"name":"hex8"}:(te=Oe.hex3.exec(re))?{r:z(te[1]+""+te[1]),g:z(te[2]+""+te[2]),b:z(te[3]+""+te[3]),format:fe?"name":"hex"}:!1}function ae(re){var fe,te;return re=re||{level:"AA",size:"small"},fe=(re.level||"AA").toUpperCase(),te=(re.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:fe,size:te}}F.exports?F.exports=d:!(N=function(){return d}.call(q,j,q,F),N!==void 0&&(F.exports=N))})(Math)},bQjk:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.CipherParams,y=O.enc,T=y.Hex,b=O.format,p=b.Hex={stringify:function(d){return d.ciphertext.toString(T)},parse:function(d){var n=T.parse(d);return m.create({ciphertext:n})}}}(),N.format.Hex})},bT9E:function(F,q,j){"use strict";j.d(q,"a",function(){return g});var N=j("VTBJ");function g(O,M){var m=Object(N.a)({},O);return Array.isArray(M)&&M.forEach(function(y){delete m[y]}),m}},biw7:function(F,q,j){"use strict";var N=j("q1tI"),g=j.n(N),O=N.createContext(null);q.a=O},c5Ni:function(F,q,j){},cv67:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.WordArray,y=M.Hasher,T=O.algo,b=[];(function(){for(var a=0;a<64;a++)b[a]=g.abs(g.sin(a+1))*4294967296|0})();var p=T.MD5=y.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,o){for(var u=0;u<16;u++){var h=o+u,s=a[h];a[h]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}var l=this._hash.words,t=a[o+0],S=a[o+1],x=a[o+2],f=a[o+3],R=a[o+4],C=a[o+5],v=a[o+6],_=a[o+7],E=a[o+8],w=a[o+9],k=a[o+10],I=a[o+11],L=a[o+12],V=a[o+13],W=a[o+14],H=a[o+15],G=l[0],B=l[1],P=l[2],z=l[3];G=d(G,B,P,z,t,7,b[0]),z=d(z,G,B,P,S,12,b[1]),P=d(P,z,G,B,x,17,b[2]),B=d(B,P,z,G,f,22,b[3]),G=d(G,B,P,z,R,7,b[4]),z=d(z,G,B,P,C,12,b[5]),P=d(P,z,G,B,v,17,b[6]),B=d(B,P,z,G,_,22,b[7]),G=d(G,B,P,z,E,7,b[8]),z=d(z,G,B,P,w,12,b[9]),P=d(P,z,G,B,k,17,b[10]),B=d(B,P,z,G,I,22,b[11]),G=d(G,B,P,z,L,7,b[12]),z=d(z,G,B,P,V,12,b[13]),P=d(P,z,G,B,W,17,b[14]),B=d(B,P,z,G,H,22,b[15]),G=n(G,B,P,z,S,5,b[16]),z=n(z,G,B,P,v,9,b[17]),P=n(P,z,G,B,I,14,b[18]),B=n(B,P,z,G,t,20,b[19]),G=n(G,B,P,z,C,5,b[20]),z=n(z,G,B,P,k,9,b[21]),P=n(P,z,G,B,H,14,b[22]),B=n(B,P,z,G,R,20,b[23]),G=n(G,B,P,z,w,5,b[24]),z=n(z,G,B,P,W,9,b[25]),P=n(P,z,G,B,f,14,b[26]),B=n(B,P,z,G,E,20,b[27]),G=n(G,B,P,z,V,5,b[28]),z=n(z,G,B,P,x,9,b[29]),P=n(P,z,G,B,_,14,b[30]),B=n(B,P,z,G,L,20,b[31]),G=c(G,B,P,z,C,4,b[32]),z=c(z,G,B,P,E,11,b[33]),P=c(P,z,G,B,I,16,b[34]),B=c(B,P,z,G,W,23,b[35]),G=c(G,B,P,z,S,4,b[36]),z=c(z,G,B,P,R,11,b[37]),P=c(P,z,G,B,_,16,b[38]),B=c(B,P,z,G,k,23,b[39]),G=c(G,B,P,z,V,4,b[40]),z=c(z,G,B,P,t,11,b[41]),P=c(P,z,G,B,f,16,b[42]),B=c(B,P,z,G,v,23,b[43]),G=c(G,B,P,z,w,4,b[44]),z=c(z,G,B,P,L,11,b[45]),P=c(P,z,G,B,H,16,b[46]),B=c(B,P,z,G,x,23,b[47]),G=r(G,B,P,z,t,6,b[48]),z=r(z,G,B,P,_,10,b[49]),P=r(P,z,G,B,W,15,b[50]),B=r(B,P,z,G,C,21,b[51]),G=r(G,B,P,z,L,6,b[52]),z=r(z,G,B,P,f,10,b[53]),P=r(P,z,G,B,k,15,b[54]),B=r(B,P,z,G,S,21,b[55]),G=r(G,B,P,z,E,6,b[56]),z=r(z,G,B,P,H,10,b[57]),P=r(P,z,G,B,v,15,b[58]),B=r(B,P,z,G,V,21,b[59]),G=r(G,B,P,z,R,6,b[60]),z=r(z,G,B,P,I,10,b[61]),P=r(P,z,G,B,x,15,b[62]),B=r(B,P,z,G,w,21,b[63]),l[0]=l[0]+G|0,l[1]=l[1]+B|0,l[2]=l[2]+P|0,l[3]=l[3]+z|0},_doFinalize:function(){var a=this._data,o=a.words,u=this._nDataBytes*8,h=a.sigBytes*8;o[h>>>5]|=128<<24-h%32;var s=g.floor(u/4294967296),l=u;o[(h+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,o[(h+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,a.sigBytes=(o.length+1)*4,this._process();for(var t=this._hash,S=t.words,x=0;x<4;x++){var f=S[x];S[x]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}return t},clone:function(){var a=y.clone.call(this);return a._hash=this._hash.clone(),a}});function d(a,o,u,h,s,l,t){var S=a+(o&u|~o&h)+s+t;return(S<<l|S>>>32-l)+o}function n(a,o,u,h,s,l,t){var S=a+(o&h|u&~h)+s+t;return(S<<l|S>>>32-l)+o}function c(a,o,u,h,s,l,t){var S=a+(o^u^h)+s+t;return(S<<l|S>>>32-l)+o}function r(a,o,u,h,s,l,t){var S=a+(u^(o|~h))+s+t;return(S<<l|S>>>32-l)+o}O.MD5=y._createHelper(p),O.HmacMD5=y._createHmacHelper(p)}(Math),N.MD5})},dejd:function(F,q,j){},dmUQ:function(F,q,j){"use strict";var N=j("Ff2n"),g=j("rePB"),O=j("1OyB"),M=j("vuIU"),m=j("Ji7U"),y=j("md7G"),T=j("foSv"),b=j("q1tI"),p=j.n(b),d=j("TSYQ"),n=j.n(d),c=j("4IlW");function r(E,w){var k=Object.keys(E);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(E);w&&(I=I.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),k.push.apply(k,I)}return k}function a(E){for(var w=1;w<arguments.length;w++){var k=arguments[w]!=null?arguments[w]:{};w%2?r(Object(k),!0).forEach(function(I){Object(g.a)(E,I,k[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(k)):r(Object(k)).forEach(function(I){Object.defineProperty(E,I,Object.getOwnPropertyDescriptor(k,I))})}return E}function o(E){var w=u();return function(){var I=Object(T.a)(E),L;if(w){var V=Object(T.a)(this).constructor;L=Reflect.construct(I,arguments,V)}else L=I.apply(this,arguments);return Object(y.a)(this,L)}}function u(){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(E){return!1}}function h(){}function s(E){E.preventDefault()}var l=function(w){return w.replace(/[^\w.-]+/g,"")},t=200,S=600,x=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,f=function(w){return w!=null},R=function(w,k){return k===w||typeof k=="number"&&typeof w=="number"&&isNaN(k)&&isNaN(w)},C=function(E){Object(m.a)(k,E);var w=o(k);function k(I){var L;Object(O.a)(this,k),L=w.call(this,I),L.onKeyDown=function(H){var G=L.props,B=G.onKeyDown,P=G.onPressEnter;if(H.keyCode===c.a.UP){var z=L.getRatio(H);L.up(H,z,null),L.stop()}else if(H.keyCode===c.a.DOWN){var J=L.getRatio(H);L.down(H,J,null),L.stop()}else H.keyCode===c.a.ENTER&&P&&P(H);if(L.recordCursorPosition(),L.lastKeyCode=H.keyCode,B){for(var ue=arguments.length,de=new Array(ue>1?ue-1:0),Se=1;Se<ue;Se++)de[Se-1]=arguments[Se];B.apply(void 0,[H].concat(de))}},L.onKeyUp=function(H){var G=L.props.onKeyUp;if(L.stop(),L.recordCursorPosition(),G){for(var B=arguments.length,P=new Array(B>1?B-1:0),z=1;z<B;z++)P[z-1]=arguments[z];G.apply(void 0,[H].concat(P))}},L.onChange=function(H){var G=L.props.onChange;L.state.focused&&(L.inputting=!0),L.rawInput=L.props.parser(L.getValueFromEvent(H)),L.setState({inputValue:L.rawInput}),G(L.toNumber(L.rawInput))},L.onMouseUp=function(){var H=L.props.onMouseUp;L.recordCursorPosition(),H&&H.apply(void 0,arguments)},L.onFocus=function(){var H;L.setState({focused:!0}),(H=L.props).onFocus.apply(H,arguments)},L.onBlur=function(){var H=L.props.onBlur;L.inputting=!1,L.setState({focused:!1});var G=L.getCurrentValidValue(L.state.inputValue),B=L.setValue(G,h);if(H){var P=L.input.value,z=L.getInputDisplayValue({focus:!1,value:B});L.input.value=z&&Number(z),H.apply(void 0,arguments),L.input.value=P}},L.getRatio=function(H){var G=1;return H.metaKey||H.ctrlKey?G=.1:H.shiftKey&&(G=10),G},L.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},L.getPrecision=function(H){if(f(L.props.precision))return L.props.precision;var G=String(H);if(G.indexOf("e-")>=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var B=0;return G.indexOf(".")>=0&&(B=G.length-G.indexOf(".")-1),B},L.getInputDisplayValue=function(H){var G=H||L.state,B=G.focused,P=G.inputValue,z=G.value,J;B?J=P:J=L.toPrecisionAsStep(z),J==null&&(J="");var ue=L.formatWrapper(J);return f(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(H){}},L.restoreByAfter=function(H){if(H===void 0)return!1;var G=L.input.value,B=G.lastIndexOf(H);if(B===-1)return!1;var P=L.cursorBefore.length;return L.lastKeyCode===c.a.DELETE&&L.cursorBefore.charAt(P-1)===H[0]?(L.fixCaret(P,P),!0):B+H.length===G.length?(L.fixCaret(B,B),!0):!1},L.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(G,B){var P=H.substring(B);return L.restoreByAfter(P)})},L.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(H,G,B){L.pressingUpOrDown=!0,L.step("down",H,G,B)},L.up=function(H,G,B){L.pressingUpOrDown=!0,L.step("up",H,G,B)},L.saveInput=function(H){L.input=H};var V=I.value;V===void 0&&(V=I.defaultValue),L.state={focused:I.autoFocus};var W=L.getValidValue(L.toNumber(V));return L.state=a(a({},L.state),{},{inputValue:L.toPrecisionAsStep(W),value:W}),L}return Object(M.a)(k,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var V=this.props,W=V.value,H=V.onChange,G=V.max,B=V.min,P=this.state.focused;if(L){if(!R(L.value,W)||!R(L.max,G)||!R(L.min,B)){var z=P?W:this.getValidValue(W),J;this.pressingUpOrDown?J=z:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(z),this.setState({value:z,inputValue:J})}var ue="value"in this.props?W:this.state.value;"max"in this.props&&L.max!==G&&typeof ue=="number"&&ue>G&&H&&H(G),"min"in this.props&&L.min!==B&&typeof ue=="number"&&ue<B&&H&&H(B)}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(Se){}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 V=L;return V===""?V="":this.isNotCompleteNumber(parseFloat(V))?V=this.state.value:V=this.getValidValue(V),this.toNumber(V)}},{key:"getValueFromEvent",value:function(L){var V=L.target.value.trim().replace(/。/g,".");return f(this.props.decimalSeparator)&&(V=V.replace(this.props.decimalSeparator,".")),V}},{key:"getValidValue",value:function(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(L);return isNaN(H)?L:(H<V&&(H=V),H>W&&(H=W),H)}},{key:"setValue",value:function(L,V){var W=this.props.precision,H=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),G=this.state.value,B=G===void 0?null:G,P=this.state.inputValue,z=P===void 0?null:P,J=typeof H=="number"?H.toFixed(W):"".concat(H),ue=H!==B||J!=="".concat(z);return"value"in this.props?(z=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:z},V)):this.setState({value:H,inputValue:this.toPrecisionAsStep(L)},V),ue&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.props,H=W.precision,G=W.step;if(f(H))return H;var B=this.getPrecision(V),P=this.getPrecision(G),z=this.getPrecision(L);return L?Math.max(z,B+P):B+P}},{key:"getPrecisionFactor",value:function(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.getMaxPrecision(L,V);return Math.pow(10,W)}},{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 V=Math.abs(this.getMaxPrecision(L));return isNaN(V)?L.toString():Number(L).toFixed(V)}},{key:"toNumber",value:function(L){var V=this.props.precision,W=this.state.focused,H=L&&L.length>16&&W;return this.isNotCompleteNumber(L)||H?L:f(V)?Math.round(L*Math.pow(10,V))/Math.pow(10,V):Number(L)}},{key:"upStep",value:function(L,V){var W=this.props.step,H=this.getPrecisionFactor(L,V),G=Math.abs(this.getMaxPrecision(L,V)),B=((H*L+H*W*V)/H).toFixed(G);return this.toNumber(B)}},{key:"downStep",value:function(L,V){var W=this.props.step,H=this.getPrecisionFactor(L,V),G=Math.abs(this.getMaxPrecision(L,V)),B=((H*L-H*W*V)/H).toFixed(G);return this.toNumber(B)}},{key:"step",value:function(L,V){var W=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),V&&(V.persist(),V.preventDefault());var B=this.props;if(B.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var z=this["".concat(L,"Step")](P,H),J=z>B.max||z<B.min;if(z>B.max?z=B.max:z<B.min&&(z=B.min),this.setValue(z,null),this.setState({focused:!0},function(){W.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){W[L](V,H,!0)},G?t:S)}},{key:"fixCaret",value:function(L,V){if(L===void 0||V===void 0||!this.input||!this.input.value)return;try{var W=this.input.selectionStart,H=this.input.selectionEnd;(L!==W||V!==H)&&this.input.setSelectionRange(L,V)}catch(G){}}},{key:"render",value:function(){var L,V=this.props,W=V.prefixCls,H=V.disabled,G=V.readOnly,B=V.useTouch,P=V.autoComplete,z=V.upHandler,J=V.downHandler,ue=V.className,de=V.max,Se=V.min,Ae=V.style,pe=V.title,Oe=V.onMouseEnter,ye=V.onMouseLeave,ce=V.onMouseOver,ae=V.onMouseOut,re=V.required,fe=V.onClick,te=V.tabIndex,ne=V.type,Te=V.placeholder,ie=V.id,Z=V.inputMode,X=V.pattern,Q=V.step,_e=V.maxLength,ve=V.autoFocus,Re=V.name,Je=V.onPaste,qe=V.onInput,rt=Object(N.a)(V,["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"]),ut=this.state,dt=ut.value,ft=ut.focused,Be=n()(W,(L={},Object(g.a)(L,ue,!!ue),Object(g.a)(L,"".concat(W,"-disabled"),H),Object(g.a)(L,"".concat(W,"-focused"),ft),L)),Ie={};Object.keys(rt).forEach(function(Ne){(Ne.substr(0,5)==="data-"||Ne.substr(0,5)==="aria-"||Ne==="role")&&(Ie[Ne]=rt[Ne])});var at=!G&&!H,ct=this.getInputDisplayValue(null),$e=(dt||dt===0)&&(isNaN(dt)||Number(dt)>=de),st=(dt||dt===0)&&(isNaN(dt)||Number(dt)<=Se),Ue=$e||H||G,Le=st||H||G,Me=n()("".concat(W,"-handler"),"".concat(W,"-handler-up"),Object(g.a)({},"".concat(W,"-handler-up-disabled"),Ue)),Ee=n()("".concat(W,"-handler"),"".concat(W,"-handler-down"),Object(g.a)({},"".concat(W,"-handler-down-disabled"),Le)),Ce=B?{onTouchStart:Ue?h:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?h:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=B?{onTouchStart:Le?h:this.down,onTouchEnd:this.stop}:{onMouseDown:Le?h:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return p.a.createElement("div",{className:Be,style:Ae,title:pe,onMouseEnter:Oe,onMouseLeave:ye,onMouseOver:ce,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},p.a.createElement("div",{className:"".concat(W,"-handler-wrap")},p.a.createElement("span",Object.assign({unselectable:"on"},Ce,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Me}),z||p.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-up-inner"),onClick:s})),p.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Le,className:Ee}),J||p.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-down-inner"),onClick:s}))),p.a.createElement("div",{className:"".concat(W,"-input-wrap")},p.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Se,"aria-valuemax":de,"aria-valuenow":dt,required:re,type:ne,placeholder:Te,onPaste:Je,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(W,"-input"),tabIndex:te,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:h,onKeyUp:at?this.onKeyUp:h,autoFocus:ve,maxLength:_e,readOnly:G,disabled:H,max:de,min:Se,step:Q,name:Re,title:pe,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ct),pattern:X,inputMode:Z,onInput:qe},Ie))))}}]),k}(p.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:h,onKeyDown:h,onPressEnter:h,onFocus:h,onBlur:h,parser:l,required:!1,autoComplete:"off"};var v=C,_=q.a=v},e7zE:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.Base,m=O.WordArray,y=g.algo,T=y.SHA1,b=y.HMAC,p=y.PBKDF2=M.extend({cfg:M.extend({keySize:128/32,hasher:T,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,n){for(var c=this.cfg,r=b.create(c.hasher,d),a=m.create(),o=m.create([1]),u=a.words,h=o.words,s=c.keySize,l=c.iterations;u.length<s;){var t=r.update(n).finalize(o);r.reset();for(var S=t.words,x=S.length,f=t,R=1;R<l;R++){f=r.finalize(f),r.reset();for(var C=f.words,v=0;v<x;v++)S[v]^=C[v]}a.concat(t),h[0]++}return a.sigBytes=s*4,a}});g.PBKDF2=function(d,n,c){return p.create(c).compute(d,n)}}(),N.PBKDF2})},fyJ8:function(F,q,j){"use strict";var N=j("rePB"),g=j("VTBJ"),O=j("Ff2n"),M=j("U8pU"),m=j("q1tI"),y=j.n(m),T=j("TSYQ"),b=j.n(T),p=j("c+Xe"),d=j("sR1s");function n(u){return u&&Object(M.a)(u)==="object"&&!Array.isArray(u)&&!m.isValidElement(u)}function c(u){return typeof u=="string"?!0:Object(p.c)(u)}function r(u,h){var s,l=u.prefixCls,t=u.className,S=u.record,x=u.index,f=u.dataIndex,R=u.render,C=u.children,v=u.component,_=v===void 0?"td":v,E=u.colSpan,w=u.rowSpan,k=u.fixLeft,I=u.fixRight,L=u.firstFixLeft,V=u.lastFixLeft,W=u.firstFixRight,H=u.lastFixRight,G=u.appendNode,B=u.additionalProps,P=B===void 0?{}:B,z=u.ellipsis,J=u.align,ue=u.rowType,de=u.isSticky,Se="".concat(l,"-cell"),Ae,pe;if(C)pe=C;else{var Oe=Object(d.b)(S,f);if(pe=Oe,R){var ye=R(Oe,S,x);n(ye)?(pe=ye.children,Ae=ye.props):pe=ye}}Object(M.a)(pe)==="object"&&!Array.isArray(pe)&&!m.isValidElement(pe)&&(pe=null),z&&(V||W)&&(pe=m.createElement("span",{className:"".concat(Se,"-content")},pe));var ce=Ae||{},ae=ce.colSpan,re=ce.rowSpan,fe=ce.style,te=ce.className,ne=Object(O.a)(ce,["colSpan","rowSpan","style","className"]),Te=ae!==void 0?ae:E,ie=re!==void 0?re:w;if(Te===0||ie===0)return null;var Z={},X=typeof k=="number",Q=typeof I=="number";X&&(Z.position="sticky",Z.left=k),Q&&(Z.position="sticky",Z.right=I);var _e={};J&&(_e.textAlign=J);var ve,Re=z===!0?{showTitle:!0}:z;Re&&(Re.showTitle||ue==="header")&&(typeof pe=="string"||typeof pe=="number"?ve=pe.toString():m.isValidElement(pe)&&typeof pe.props.children=="string"&&(ve=pe.props.children));var Je=Object(g.a)(Object(g.a)(Object(g.a)({title:ve},ne),P),{},{colSpan:Te&&Te!==1?Te:null,rowSpan:ie&&ie!==1?ie:null,className:b()(Se,t,(s={},Object(N.a)(s,"".concat(Se,"-fix-left"),X),Object(N.a)(s,"".concat(Se,"-fix-left-first"),L),Object(N.a)(s,"".concat(Se,"-fix-left-last"),V),Object(N.a)(s,"".concat(Se,"-fix-right"),Q),Object(N.a)(s,"".concat(Se,"-fix-right-first"),W),Object(N.a)(s,"".concat(Se,"-fix-right-last"),H),Object(N.a)(s,"".concat(Se,"-ellipsis"),z),Object(N.a)(s,"".concat(Se,"-with-append"),G),Object(N.a)(s,"".concat(Se,"-fix-sticky"),(X||Q)&&de),s),P.className,te),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},P.style),_e),Z),fe),ref:c(_)?h:null});return m.createElement(_,Object.assign({},Je),G,pe)}var a=m.forwardRef(r);a.displayName="Cell";var o=m.memo(a,function(u,h){return h.shouldCellUpdate?!h.shouldCellUpdate(h.record,u.record):!1});q.a=o},gJ3r:function(F,q,j){"use strict";j.d(q,"a",function(){return N});var N=[{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(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.ECB=function(){var g=N.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(O,M){this._cipher.encryptBlock(O,M)}}),g.Decryptor=g.extend({processBlock:function(O,M){this._cipher.decryptBlock(O,M)}}),g}(),N.mode.ECB})},h78n:function(F,q,j){"use strict";j.d(q,"a",function(){return L});var N=j("q1tI"),g=j.n(N),O=j("TSYQ"),M=j.n(O),m={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},y=function(H){var G=H.map(function(){return Object(N.useRef)()}),B=Object(N.useRef)();return Object(N.useEffect)(function(){var P=Date.now(),z=!1;Object.keys(G).forEach(function(J){var ue=G[J].current;if(!ue)return;z=!0;var de=ue.style;de.transitionDuration=".3s, .3s, .3s, .06s",B.current&&P-B.current<100&&(de.transitionDuration="0s, 0s")}),z&&(B.current=Date.now())}),[G]};function T(){return T=Object.assign||function(W){for(var H=1;H<arguments.length;H++){var G=arguments[H];for(var B in G)Object.prototype.hasOwnProperty.call(G,B)&&(W[B]=G[B])}return W},T.apply(this,arguments)}function b(W,H){return r(W)||c(W,H)||d(W,H)||p()}function p(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(W,H){if(!W)return;if(typeof W=="string")return n(W,H);var G=Object.prototype.toString.call(W).slice(8,-1);if(G==="Object"&&W.constructor&&(G=W.constructor.name),G==="Map"||G==="Set")return Array.from(W);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return n(W,H)}function n(W,H){(H==null||H>W.length)&&(H=W.length);for(var G=0,B=new Array(H);G<H;G++)B[G]=W[G];return B}function c(W,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(W)))return;var G=[],B=!0,P=!1,z=void 0;try{for(var J=W[Symbol.iterator](),ue;!(B=(ue=J.next()).done)&&!(G.push(ue.value),H&&G.length===H);B=!0);}catch(de){P=!0,z=de}finally{try{!B&&J.return!=null&&J.return()}finally{if(P)throw z}}return G}function r(W){if(Array.isArray(W))return W}function a(W,H){if(W==null)return{};var G=o(W,H),B,P;if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(W);for(P=0;P<z.length;P++){if(B=z[P],H.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,B))continue;G[B]=W[B]}}return G}function o(W,H){if(W==null)return{};var G={},B=Object.keys(W),P,z;for(z=0;z<B.length;z++){if(P=B[z],H.indexOf(P)>=0)continue;G[P]=W[P]}return G}var u=function(H){var G=H.className,B=H.percent,P=H.prefixCls,z=H.strokeColor,J=H.strokeLinecap,ue=H.strokeWidth,de=H.style,Se=H.trailColor,Ae=H.trailWidth,pe=H.transition,Oe=a(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var ye=Array.isArray(B)?B:[B],ce=Array.isArray(z)?z:[z],ae=y(ye),re=b(ae,1),fe=re[0],te=ue/2,ne=100-ue/2,Te="M ".concat(J==="round"?te:0,",").concat(te,`
L `).concat(J==="round"?ne:100,",").concat(te),ie="0 0 100 ".concat(ue),Z=0;return g.a.createElement("svg",T({className:M()("".concat(P,"-line"),G),viewBox:ie,preserveAspectRatio:"none",style:de},Oe),g.a.createElement("path",{className:"".concat(P,"-line-trail"),d:Te,strokeLinecap:J,stroke:Se,strokeWidth:Ae||ue,fillOpacity:"0"}),ye.map(function(X,Q){var _e={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(Z,"px"),transition:pe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ve=ce[Q]||ce[ce.length-1];return Z+=X,g.a.createElement("path",{key:Q,className:"".concat(P,"-line-path"),d:Te,strokeLinecap:J,stroke:ve,strokeWidth:ue,fillOpacity:"0",ref:fe[Q],style:_e})}))};u.defaultProps=m;var h=u;function s(){return s=Object.assign||function(W){for(var H=1;H<arguments.length;H++){var G=arguments[H];for(var B in G)Object.prototype.hasOwnProperty.call(G,B)&&(W[B]=G[B])}return W},s.apply(this,arguments)}function l(W,H){return R(W)||f(W,H)||S(W,H)||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 S(W,H){if(!W)return;if(typeof W=="string")return x(W,H);var G=Object.prototype.toString.call(W).slice(8,-1);if(G==="Object"&&W.constructor&&(G=W.constructor.name),G==="Map"||G==="Set")return Array.from(W);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return x(W,H)}function x(W,H){(H==null||H>W.length)&&(H=W.length);for(var G=0,B=new Array(H);G<H;G++)B[G]=W[G];return B}function f(W,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(W)))return;var G=[],B=!0,P=!1,z=void 0;try{for(var J=W[Symbol.iterator](),ue;!(B=(ue=J.next()).done)&&!(G.push(ue.value),H&&G.length===H);B=!0);}catch(de){P=!0,z=de}finally{try{!B&&J.return!=null&&J.return()}finally{if(P)throw z}}return G}function R(W){if(Array.isArray(W))return W}function C(W,H){if(W==null)return{};var G=v(W,H),B,P;if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(W);for(P=0;P<z.length;P++){if(B=z[P],H.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,B))continue;G[B]=W[B]}}return G}function v(W,H){if(W==null)return{};var G={},B=Object.keys(W),P,z;for(z=0;z<B.length;z++){if(P=B[z],H.indexOf(P)>=0)continue;G[P]=W[P]}return G}var _=0;function E(W){return+W.replace("%","")}function w(W){return Array.isArray(W)?W:[W]}function k(W,H,G,B){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0,J=50-B/2,ue=0,de=-J,Se=0,Ae=-2*J;switch(z){case"left":ue=-J,de=0,Se=2*J,Ae=0;break;case"right":ue=J,de=0,Se=-2*J,Ae=0;break;case"bottom":de=J,Ae=2*J;break;default:}var pe="M 50,50 m ".concat(ue,",").concat(de,`
a `).concat(J,",").concat(J," 0 1 1 ").concat(Se,",").concat(-Ae,`
a `).concat(J,",").concat(J," 0 1 1 ").concat(-Se,",").concat(Ae),Oe=Math.PI*2*J,ye={stroke:G,strokeDasharray:"".concat(H/100*(Oe-P),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(P/2+W/100*(Oe-P),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:pe,pathStyle:ye}}var I=function(H){var G=H.prefixCls,B=H.strokeWidth,P=H.trailWidth,z=H.gapDegree,J=H.gapPosition,ue=H.trailColor,de=H.strokeLinecap,Se=H.style,Ae=H.className,pe=H.strokeColor,Oe=H.percent,ye=C(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ce=Object(N.useMemo)(function(){return _+=1,_},[]),ae=k(0,100,ue,B,z,J),re=ae.pathString,fe=ae.pathStyle,te=w(Oe),ne=w(pe),Te=ne.find(function(_e){return Object.prototype.toString.call(_e)==="[object Object]"}),ie=y(te),Z=l(ie,1),X=Z[0],Q=function(){var ve=0;return te.map(function(Re,Je){var qe=ne[Je]||ne[ne.length-1],rt=Object.prototype.toString.call(qe)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(ce,")"):"",ut=k(ve,Re,qe,B,z,J);return ve+=Re,g.a.createElement("path",{key:Je,className:"".concat(G,"-circle-path"),d:ut.pathString,stroke:rt,strokeLinecap:de,strokeWidth:B,opacity:Re===0?0:1,fillOpacity:"0",style:ut.pathStyle,ref:X[Je]})})};return g.a.createElement("svg",s({className:M()("".concat(G,"-circle"),Ae),viewBox:"0 0 100 100",style:Se},ye),Te&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(ce),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Te).sort(function(_e,ve){return E(_e)-E(ve)}).map(function(_e,ve){return g.a.createElement("stop",{key:ve,offset:_e,stopColor:Te[_e]})}))),g.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:re,stroke:ue,strokeLinecap:de,strokeWidth:P||B,fillOpacity:"0",style:fe}),Q().reverse())};I.defaultProps=m;var L=I,V={Line:h,Circle:L}},hW8S:function(F,q,j){"use strict";j.d(q,"a",function(){return M}),j.d(q,"c",function(){return m}),j.d(q,"b",function(){return y});var N=j("VTBJ"),g=j("Ff2n"),O=j("Kwbf"),M="RC_TABLE_INTERNAL_COL_DEFINE";function m(T){var b=T.expandable,p=Object(g.a)(T,["expandable"]);return"expandable"in T?Object(N.a)(Object(N.a)({},p),b):p}function y(T){return Object.keys(T).reduce(function(b,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-")&&(b[p]=T[p]),b},{})}},jO9C:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(g,O){g.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(g,O)},unpad:function(g){N.pad.ZeroPadding.unpad(g),g.sigBytes--}},N.pad.Iso97971})},jwmR:function(F,q,j){F.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(F,q,j){"use strict";j.d(q,"a",function(){return Cr});var N=j("rePB"),g=j("ODXe"),O=j("Ff2n"),M=j("VTBJ"),m=j("q1tI"),y=j("TSYQ"),T=j.n(y),b=j("Zm9Q"),p=j("6cGi"),d=j("KQm4"),n=j("xEkU"),c=j.n(n),r=j("t23M");function a(Pe){var Ve=Object(m.useRef)(),Qe=Object(m.useRef)(!1);function Fe(){for(var be=arguments.length,De=new Array(be),we=0;we<be;we++)De[we]=arguments[we];Qe.current||(c.a.cancel(Ve.current),Ve.current=c()(function(){Pe.apply(void 0,De)}))}return Object(m.useEffect)(function(){return function(){Qe.current=!0,c.a.cancel(Ve.current)}},[]),Fe}function o(Pe){var Ve=Object(m.useRef)([]),Qe=Object(m.useState)({}),Fe=Object(g.a)(Qe,2),be=Fe[1],De=Object(m.useRef)(typeof Pe=="function"?Pe():Pe),we=a(function(){var Ge=De.current;Ve.current.forEach(function(Xe){Ge=Xe(Ge)}),Ve.current=[],De.current=Ge,be({})});function je(Ge){Ve.current.push(Ge),we()}return[De.current,je]}var u=j("4IlW");function h(Pe,Ve){var Qe,Fe=Pe.prefixCls,be=Pe.id,De=Pe.active,we=Pe.rtl,je=Pe.tab,Ge=je.key,Xe=je.tab,ze=je.disabled,Ze=je.closeIcon,pt=Pe.tabBarGutter,kt=Pe.tabPosition,jt=Pe.closable,Yt=Pe.renderWrapper,kr=Pe.removeAriaLabel,Jr=Pe.editable,$r=Pe.onClick,Zr=Pe.onRemove,Hr=Pe.onFocus,rn="".concat(Fe,"-tab");m.useEffect(function(){return Zr},[]);var nn={};kt==="top"||kt==="bottom"?nn[we?"marginLeft":"marginRight"]=pt:nn.marginBottom=pt;var yn=Jr&&jt!==!1&&!ze;function cn(Mr){if(ze)return;$r(Mr)}function In(Mr){Mr.preventDefault(),Mr.stopPropagation(),Jr.onEdit("remove",{key:Ge,event:Mr})}var fn=m.createElement("div",{key:Ge,ref:Ve,className:T()(rn,(Qe={},Object(N.a)(Qe,"".concat(rn,"-with-remove"),yn),Object(N.a)(Qe,"".concat(rn,"-active"),De),Object(N.a)(Qe,"".concat(rn,"-disabled"),ze),Qe)),style:nn,onClick:cn},m.createElement("div",{role:"tab","aria-selected":De,id:be&&"".concat(be,"-tab-").concat(Ge),className:"".concat(rn,"-btn"),"aria-controls":be&&"".concat(be,"-panel-").concat(Ge),"aria-disabled":ze,tabIndex:ze?null:0,onClick:function(Fr){Fr.stopPropagation(),cn(Fr)},onKeyDown:function(Fr){[u.a.SPACE,u.a.ENTER].includes(Fr.which)&&(Fr.preventDefault(),cn(Fr))},onFocus:Hr},Xe),yn&&m.createElement("button",{type:"button","aria-label":kr||"remove",tabIndex:0,className:"".concat(rn,"-remove"),onClick:function(Fr){Fr.stopPropagation(),In(Fr)}},Ze||Jr.removeIcon||"\xD7"));return Yt&&(fn=Yt(fn)),fn}var s=m.forwardRef(h),l={width:0,height:0,left:0,top:0};function t(Pe,Ve,Qe){return Object(m.useMemo)(function(){for(var Fe,be=new Map,De=Ve.get((Fe=Pe[0])===null||Fe===void 0?void 0:Fe.key)||l,we=De.left+De.width,je=0;je<Pe.length;je+=1){var Ge=Pe[je].key,Xe=Ve.get(Ge);if(!Xe){var ze;Xe=Ve.get((ze=Pe[je-1])===null||ze===void 0?void 0:ze.key)||l}var Ze=be.get(Ge)||Object(M.a)({},Xe);Ze.right=we-Ze.left-Ze.width,be.set(Ge,Ze)}return be},[Pe.map(function(Fe){return Fe.key}).join("_"),Ve,Qe])}var S={width:0,height:0,left:0,top:0,right:0};function x(Pe,Ve,Qe,Fe,be){var De=be.tabs,we=be.tabPosition,je=be.rtl,Ge,Xe,ze;["top","bottom"].includes(we)?(Ge="width",Xe=je?"right":"left",ze=Math.abs(Ve.left)):(Ge="height",Xe="top",ze=-Ve.top);var Ze=Ve[Ge],pt=Qe[Ge],kt=Fe[Ge],jt=Ze;return pt+kt>Ze&&(jt=Ze-kt),Object(m.useMemo)(function(){if(!De.length)return[0,0];for(var Yt=De.length,kr=Yt,Jr=0;Jr<Yt;Jr+=1){var $r=Pe.get(De[Jr].key)||S;if($r[Xe]+$r[Ge]>ze+jt){kr=Jr-1;break}}for(var Zr=0,Hr=Yt-1;Hr>=0;Hr-=1){var rn=Pe.get(De[Hr].key)||S;if(rn[Xe]<ze){Zr=Hr+1;break}}return[Zr,kr]},[Pe,ze,jt,we,De.map(function(Yt){return Yt.key}).join("_"),je])}var f=j("wx14"),R=j("1OyB"),C=j("vuIU"),v=j("JX7q"),_=j("Ji7U"),E=j("LK+K"),w=j("I8Z2"),k=j("bT9E"),I=j("2GS6"),L=j("Gytx"),V=j.n(L),W=j("U8pU"),H=/iPhone/i,G=/iPod/i,B=/iPad/i,P=/\bAndroid(?:.+)Mobile\b/i,z=/Android/i,J=/\bAndroid(?:.+)SD4930UR\b/i,ue=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,de=/Windows Phone/i,Se=/\bWindows(?:.+)ARM\b/i,Ae=/BlackBerry/i,pe=/BB10/i,Oe=/Opera Mini/i,ye=/\b(CriOS|Chrome)(?:.+)Mobile/i,ce=/Mobile(?:.+)Firefox\b/i;function ae(Pe,Ve){return Pe.test(Ve)}function re(Pe){var Ve=Pe||(typeof navigator!="undefined"?navigator.userAgent:""),Qe=(Ve||"").split("[FBAN");if(typeof Qe[1]!="undefined"){var Fe=Qe,be=Object(g.a)(Fe,1);Ve=be[0]}if(Qe=Ve.split("Twitter"),typeof Qe[1]!="undefined"){var De=Qe,we=Object(g.a)(De,1);Ve=we[0]}var je={apple:{phone:ae(H,Ve)&&!ae(de,Ve),ipod:ae(G,Ve),tablet:!ae(H,Ve)&&ae(B,Ve)&&!ae(de,Ve),device:(ae(H,Ve)||ae(G,Ve)||ae(B,Ve))&&!ae(de,Ve)},amazon:{phone:ae(J,Ve),tablet:!ae(J,Ve)&&ae(ue,Ve),device:ae(J,Ve)||ae(ue,Ve)},android:{phone:!ae(de,Ve)&&ae(J,Ve)||!ae(de,Ve)&&ae(P,Ve),tablet:!ae(de,Ve)&&!ae(J,Ve)&&!ae(P,Ve)&&(ae(ue,Ve)||ae(z,Ve)),device:!ae(de,Ve)&&(ae(J,Ve)||ae(ue,Ve)||ae(P,Ve)||ae(z,Ve))||ae(/\bokhttp\b/i,Ve)},windows:{phone:ae(de,Ve),tablet:ae(Se,Ve),device:ae(de,Ve)||ae(Se,Ve)},other:{blackberry:ae(Ae,Ve),blackberry10:ae(pe,Ve),opera:ae(Oe,Ve),firefox:ae(ce,Ve),chrome:ae(ye,Ve),device:ae(Ae,Ve)||ae(pe,Ve)||ae(Oe,Ve)||ae(ce,Ve)||ae(ye,Ve)},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 fe=Object(M.a)(Object(M.a)({},re()),{},{isMobile:re}),te=fe;function ne(){}function Te(Pe,Ve,Qe){var Fe=Ve||"";return Pe.key||"".concat(Fe,"item_").concat(Qe)}function ie(Pe){return"".concat(Pe,"-menu-")}function Z(Pe,Ve){var Qe=-1;m.Children.forEach(Pe,function(Fe){Qe+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?m.Children.forEach(Fe.props.children,function(be){Qe+=1,Ve(be,Qe)}):Ve(Fe,Qe)})}function X(Pe,Ve,Qe){if(!Pe||Qe.find)return;m.Children.forEach(Pe,function(Fe){if(Fe){var be=Fe.type;if(!be||!(be.isSubMenu||be.isMenuItem||be.isMenuItemGroup))return;Ve.indexOf(Fe.key)!==-1?Qe.find=!0:Fe.props.children&&X(Fe.props.children,Ve,Qe)}})}var Q=["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"],_e=function(Ve){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ve&&typeof Ve.getBoundingClientRect=="function"&&Ve.getBoundingClientRect().width;if(Fe){if(Qe){var be=getComputedStyle(Ve),De=be.marginLeft,we=be.marginRight;Fe+=+De.replace("px","")+ +we.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ve=function(Ve,Qe,Fe){Ve&&Object(W.a)(Ve.style)==="object"&&(Ve.style[Qe]=Fe)},Re=function(){return te.any},Je=j("bdgK"),qe=j("i8i4"),rt=j.n(qe),ut=j("wgJM"),dt=j("l4aY"),ft=j("m+aA"),Be=j("c+Xe"),Ie=j("zT1h"),at=j("QC+M");function ct(Pe,Ve,Qe){return Qe?Pe[0]===Ve[0]:Pe[0]===Ve[0]&&Pe[1]===Ve[1]}function $e(Pe,Ve,Qe){var Fe=Pe[Ve]||{};return Object(M.a)(Object(M.a)({},Fe),Qe)}function st(Pe,Ve,Qe,Fe){for(var be=Qe.points,De=Object.keys(Pe),we=0;we<De.length;we+=1){var je=De[we];if(ct(Pe[je].points,be,Fe))return"".concat(Ve,"-placement-").concat(je)}return""}var Ue=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)))},Le=j("MNnm");function Me(Pe,Ve){var Qe={};return Qe[Pe.toLowerCase()]=Ve.toLowerCase(),Qe["Webkit".concat(Pe)]="webkit".concat(Ve),Qe["Moz".concat(Pe)]="moz".concat(Ve),Qe["ms".concat(Pe)]="MS".concat(Ve),Qe["O".concat(Pe)]="o".concat(Ve.toLowerCase()),Qe}function Ee(Pe,Ve){var Qe={animationend:Me("Animation","AnimationEnd"),transitionend:Me("Transition","TransitionEnd")};return Pe&&("AnimationEvent"in Ve||delete Qe.animationend.animation,"TransitionEvent"in Ve||delete Qe.transitionend.transition),Qe}var Ce=Ee(Object(Le.a)(),typeof window!="undefined"?window:{}),ke={};if(Object(Le.a)()){var Ne=document.createElement("div");ke=Ne.style}var He={};function tt(Pe){if(He[Pe])return He[Pe];var Ve=Ce[Pe];if(Ve)for(var Qe=Object.keys(Ve),Fe=Qe.length,be=0;be<Fe;be+=1){var De=Qe[be];if(Object.prototype.hasOwnProperty.call(Ve,De)&&De in ke)return He[Pe]=Ve[De],He[Pe]}return""}var vt=tt("animationend"),yt=tt("transitionend"),Wt=!!(vt&&yt),Ht=vt||"animationend",cr=yt||"transitionend";function dr(Pe,Ve){if(!Pe)return null;if(Object(W.a)(Pe)==="object"){var Qe=Ve.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return Pe[Qe]}return"".concat(Pe,"-").concat(Ve)}var St="none",Kr="appear",Vr="enter",Yr="leave",vn="none",Or="prepare",dn="start",hn="active",Tt="end";function gr(Pe){var Ve=Object(m.useRef)(!1),Qe=Object(m.useState)(Pe),Fe=Object(g.a)(Qe,2),be=Fe[0],De=Fe[1];function we(je){Ve.current||De(je)}return Object(m.useEffect)(function(){return function(){Ve.current=!0}},[]),[be,we]}var Br=Object(Le.a)()?m.useLayoutEffect:m.useEffect,zr=Br,an=function(){var Pe=m.useRef(null);function Ve(){ut.a.cancel(Pe.current)}function Qe(Fe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ve();var De=Object(ut.a)(function(){be<=1?Fe({isCanceled:function(){return De!==Pe.current}}):Qe(Fe,be-1)});Pe.current=De}return m.useEffect(function(){return function(){Ve()}},[]),[Qe,Ve]},gi=[Or,dn,hn,Tt],Ei=!1,bn=!0;function lr(Pe){return Pe===hn||Pe===Tt}var Yn=function(Pe,Ve){var Qe=m.useState(vn),Fe=Object(g.a)(Qe,2),be=Fe[0],De=Fe[1],we=an(),je=Object(g.a)(we,2),Ge=je[0],Xe=je[1];function ze(){De(Or)}return zr(function(){if(be!==vn&&be!==Tt){var Ze=gi.indexOf(be),pt=gi[Ze+1],kt=Ve(be);kt===Ei?De(pt):Ge(function(jt){function Yt(){if(jt.isCanceled())return;De(pt)}kt===!0?Yt():Promise.resolve(kt).then(Yt)})}},[Pe,be]),m.useEffect(function(){return function(){Xe()}},[]),[ze,be]},ci=function(Pe){var Ve=Object(m.useRef)(),Qe=Object(m.useRef)(Pe);Qe.current=Pe;var Fe=m.useCallback(function(we){Qe.current(we)},[]);function be(we){we&&(we.removeEventListener(cr,Fe),we.removeEventListener(Ht,Fe))}function De(we){Ve.current&&Ve.current!==we&&be(Ve.current),we&&we!==Ve.current&&(we.addEventListener(cr,Fe),we.addEventListener(Ht,Fe),Ve.current=we)}return m.useEffect(function(){return function(){be(Ve.current)}},[]),[De,be]};function Hn(Pe,Ve,Qe,Fe){var be=Fe.motionEnter,De=be===void 0?!0:be,we=Fe.motionAppear,je=we===void 0?!0:we,Ge=Fe.motionLeave,Xe=Ge===void 0?!0:Ge,ze=Fe.motionDeadline,Ze=Fe.motionLeaveImmediately,pt=Fe.onAppearPrepare,kt=Fe.onEnterPrepare,jt=Fe.onLeavePrepare,Yt=Fe.onAppearStart,kr=Fe.onEnterStart,Jr=Fe.onLeaveStart,$r=Fe.onAppearActive,Zr=Fe.onEnterActive,Hr=Fe.onLeaveActive,rn=Fe.onAppearEnd,nn=Fe.onEnterEnd,yn=Fe.onLeaveEnd,cn=Fe.onVisibleChanged,In=gr(),fn=Object(g.a)(In,2),Mr=fn[0],Fr=fn[1],sn=gr(St),gn=Object(g.a)(sn,2),wr=gn[0],xn=gn[1],zn=gr(null),Sn=Object(g.a)(zn,2),Ln=Sn[0],Cn=Sn[1],Jn=Object(m.useRef)(!1),ii=Object(m.useRef)(null),Gn=Object(m.useRef)(!1),fi=Object(m.useRef)(null);function Xi(){var Dn=Qe();return Dn||fi.current}var Si=Object(m.useRef)(!1);function ai(Dn){var On=Xi();if(Dn&&!Dn.deadline&&Dn.target!==On)return;var ti;wr===Kr&&Si.current?ti=rn==null?void 0:rn(On,Dn):wr===Vr&&Si.current?ti=nn==null?void 0:nn(On,Dn):wr===Yr&&Si.current&&(ti=yn==null?void 0:yn(On,Dn)),ti!==!1&&!Gn.current&&(xn(St),Cn(null))}var Pn=ci(ai),Mn=Object(g.a)(Pn,1),Kn=Mn[0],Bn=m.useMemo(function(){var Dn,On,ti;switch(wr){case"appear":return Dn={},Object(N.a)(Dn,Or,pt),Object(N.a)(Dn,dn,Yt),Object(N.a)(Dn,hn,$r),Dn;case"enter":return On={},Object(N.a)(On,Or,kt),Object(N.a)(On,dn,kr),Object(N.a)(On,hn,Zr),On;case"leave":return ti={},Object(N.a)(ti,Or,jt),Object(N.a)(ti,dn,Jr),Object(N.a)(ti,hn,Hr),ti;default:return{}}},[wr]),ei=Yn(wr,function(Dn){if(Dn===Or){var On=Bn[Or];return On?On(Xi()):Ei}if(An in Bn){var ti;Cn(((ti=Bn[An])===null||ti===void 0?void 0:ti.call(Bn,Xi(),null))||null)}return An===hn&&(Kn(Xi()),ze>0&&(clearTimeout(ii.current),ii.current=setTimeout(function(){ai({deadline:!0})},ze))),bn}),Ai=Object(g.a)(ei,2),ra=Ai[0],An=Ai[1],Fi=lr(An);Si.current=Fi,zr(function(){Fr(Ve);var Dn=Jn.current;if(Jn.current=!0,!Pe)return;var On;!Dn&&Ve&&je&&(On=Kr),Dn&&Ve&&De&&(On=Vr),(Dn&&!Ve&&Xe||!Dn&&Ze&&!Ve&&Xe)&&(On=Yr),On&&(xn(On),ra())},[Ve]),Object(m.useEffect)(function(){(wr===Kr&&!je||wr===Vr&&!De||wr===Yr&&!Xe)&&xn(St)},[je,De,Xe]),Object(m.useEffect)(function(){return function(){clearTimeout(ii.current),Gn.current=!0}},[]),Object(m.useEffect)(function(){Mr!==void 0&&wr===St&&(cn==null||cn(Mr))},[Mr,wr]);var Ui=Ln;return Bn[Or]&&An===dn&&(Ui=Object(M.a)({transition:"none"},Ui)),[wr,An,Ui,Mr!=null?Mr:Ve]}var qr=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){return Object(R.a)(this,Qe),Ve.apply(this,arguments)}return Object(C.a)(Qe,[{key:"render",value:function(){return this.props.children}}]),Qe}(m.Component),Un=qr;function di(Pe){var Ve=Pe;Object(W.a)(Pe)==="object"&&(Ve=Pe.transitionSupport);function Qe(be){return!!(be.motionName&&Ve)}var Fe=m.forwardRef(function(be,De){var we=be.visible,je=we===void 0?!0:we,Ge=be.removeOnLeave,Xe=Ge===void 0?!0:Ge,ze=be.forceRender,Ze=be.children,pt=be.motionName,kt=be.leavedClassName,jt=be.eventProps,Yt=Qe(be),kr=Object(m.useRef)(),Jr=Object(m.useRef)();function $r(){try{return Object(ft.a)(kr.current||Jr.current)}catch(xn){return null}}var Zr=Hn(Yt,je,$r,be),Hr=Object(g.a)(Zr,4),rn=Hr[0],nn=Hr[1],yn=Hr[2],cn=Hr[3],In=m.useRef(cn);cn&&(In.current=!0);var fn=Object(m.useRef)(De);fn.current=De;var Mr=m.useCallback(function(xn){kr.current=xn,Object(Be.b)(fn.current,xn)},[]),Fr,sn=Object(M.a)(Object(M.a)({},jt),{},{visible:je});if(!Ze)Fr=null;else if(rn===St||!Qe(be))cn?Fr=Ze(Object(M.a)({},sn),Mr):!Xe&&In.current?Fr=Ze(Object(M.a)(Object(M.a)({},sn),{},{className:kt}),Mr):ze?Fr=Ze(Object(M.a)(Object(M.a)({},sn),{},{style:{display:"none"}}),Mr):Fr=null;else{var gn,wr;nn===Or?wr="prepare":lr(nn)?wr="active":nn===dn&&(wr="start"),Fr=Ze(Object(M.a)(Object(M.a)({},sn),{},{className:T()(dr(pt,rn),(gn={},Object(N.a)(gn,dr(pt,"".concat(rn,"-").concat(wr)),wr),Object(N.a)(gn,pt,typeof pt=="string"),gn)),style:yn}),Mr)}return m.createElement(Un,{ref:Jr},Fr)});return Fe.displayName="CSSMotion",Fe}var vi=di(Wt),Ut="add",_r="keep",hi="remove",xi="removed";function Di(Pe){var Ve;return Pe&&Object(W.a)(Pe)==="object"&&"key"in Pe?Ve=Pe:Ve={key:Pe},Object(M.a)(Object(M.a)({},Ve),{},{key:String(Ve.key)})}function wi(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Pe.map(Di)}function le(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Qe=[],Fe=0,be=Ve.length,De=wi(Pe),we=wi(Ve);De.forEach(function(Xe){for(var ze=!1,Ze=Fe;Ze<be;Ze+=1){var pt=we[Ze];if(pt.key===Xe.key){Fe<Ze&&(Qe=Qe.concat(we.slice(Fe,Ze).map(function(kt){return Object(M.a)(Object(M.a)({},kt),{},{status:Ut})})),Fe=Ze),Qe.push(Object(M.a)(Object(M.a)({},pt),{},{status:_r})),Fe+=1,ze=!0;break}}ze||Qe.push(Object(M.a)(Object(M.a)({},Xe),{},{status:hi}))}),Fe<be&&(Qe=Qe.concat(we.slice(Fe).map(function(Xe){return Object(M.a)(Object(M.a)({},Xe),{},{status:Ut})})));var je={};Qe.forEach(function(Xe){var ze=Xe.key;je[ze]=(je[ze]||0)+1});var Ge=Object.keys(je).filter(function(Xe){return je[Xe]>1});return Ge.forEach(function(Xe){Qe=Qe.filter(function(ze){var Ze=ze.key,pt=ze.status;return Ze!==Xe||pt!==hi}),Qe.forEach(function(ze){ze.key===Xe&&(ze.status=_r)})}),Qe}var K=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Y(Pe){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vi,Qe=function(Fe){Object(_.a)(De,Fe);var be=Object(E.a)(De);function De(){var we;return Object(R.a)(this,De),we=be.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(je){we.setState(function(Ge){var Xe=Ge.keyEntities;return{keyEntities:Xe.map(function(ze){return ze.key!==je?ze:Object(M.a)(Object(M.a)({},ze),{},{status:xi})})}})},we}return Object(C.a)(De,[{key:"render",value:function(){var je=this,Ge=this.state.keyEntities,Xe=this.props,ze=Xe.component,Ze=Xe.children,pt=Xe.onVisibleChanged,kt=Object(O.a)(Xe,["component","children","onVisibleChanged"]),jt=ze||m.Fragment,Yt={};return K.forEach(function(kr){Yt[kr]=kt[kr],delete kt[kr]}),delete kt.keys,m.createElement(jt,kt,Ge.map(function(kr){var Jr=kr.status,$r=Object(O.a)(kr,["status"]),Zr=Jr===Ut||Jr===_r;return m.createElement(Ve,Object(f.a)({},Yt,{key:$r.key,visible:Zr,eventProps:$r,onVisibleChanged:function(rn){pt==null||pt(rn,{key:$r.key}),rn||je.removeKey($r.key)}}),Ze)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Ge){var Xe=je.keys,ze=Ge.keyEntities,Ze=wi(Xe),pt=le(ze,Ze);return{keyEntities:pt.filter(function(kt){var jt=ze.find(function(Yt){var kr=Yt.key;return kt.key===kr});return!(jt&&jt.status===xi&&kt.status===hi)})}}}]),De}(m.Component);return Qe.defaultProps={component:"div"},Qe}var ee=Y(Wt),ge=vi;function se(Pe){var Ve=Pe.prefixCls,Qe=Pe.motion,Fe=Pe.animation,be=Pe.transitionName;return Qe||(Fe?{motionName:"".concat(Ve,"-").concat(Fe)}:be?{motionName:be}:null)}function Ke(Pe){var Ve=Pe.prefixCls,Qe=Pe.visible,Fe=Pe.zIndex,be=Pe.mask,De=Pe.maskMotion,we=Pe.maskAnimation,je=Pe.maskTransitionName;if(!be)return null;var Ge={};return(De||je||we)&&(Ge=Object(M.a)({motionAppear:!0},se({motion:De,prefixCls:Ve,transitionName:je,animation:we}))),m.createElement(ge,Object(f.a)({},Ge,{visible:Qe,removeOnLeave:!0}),function(Xe){var ze=Xe.className;return m.createElement("div",{style:{zIndex:Fe},className:T()("".concat(Ve,"-mask"),ze)})})}var Ct=j("9mu1"),Xt=j("o0o1"),Er=j.n(Xt),Pt=j("HaE+"),Lr=["measure","align",null,"motion"],Gr=function(Pe,Ve){var Qe=Object(m.useState)(null),Fe=Object(g.a)(Qe,2),be=Fe[0],De=Fe[1],we=Object(m.useRef)(),je=Object(m.useRef)(!1);function Ge(Ze){je.current||De(Ze)}function Xe(){ut.a.cancel(we.current)}function ze(Ze){Xe(),we.current=Object(ut.a)(function(){Ge(function(pt){switch(be){case"align":return"motion";case"motion":return"stable";default:}return pt}),Ze==null||Ze()})}return Object(m.useEffect)(function(){Ge("measure")},[Pe]),Object(m.useEffect)(function(){switch(be){case"measure":Ve();break;default:}be&&(we.current=Object(ut.a)(Object(Pt.a)(Er.a.mark(function Ze(){var pt,kt;return Er.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:pt=Lr.indexOf(be),kt=Lr[pt+1],kt&&pt!==-1&&Ge(kt);case 3:case"end":return Yt.stop()}},Ze)}))))},[be]),Object(m.useEffect)(function(){return function(){je.current=!0,Xe()}},[]),[be,ze]},_n=function(Pe){var Ve=m.useState({width:0,height:0}),Qe=Object(g.a)(Ve,2),Fe=Qe[0],be=Qe[1];function De(je){be({width:je.offsetWidth,height:je.offsetHeight})}var we=m.useMemo(function(){var je={};if(Pe){var Ge=Fe.width,Xe=Fe.height;Pe.indexOf("height")!==-1&&Xe?je.height=Xe:Pe.indexOf("minHeight")!==-1&&Xe&&(je.minHeight=Xe),Pe.indexOf("width")!==-1&&Ge?je.width=Ge:Pe.indexOf("minWidth")!==-1&&Ge&&(je.minWidth=Ge)}return je},[Pe,Fe]);return[we,De]},Zn=m.forwardRef(function(Pe,Ve){var Qe=Pe.visible,Fe=Pe.prefixCls,be=Pe.className,De=Pe.style,we=Pe.children,je=Pe.zIndex,Ge=Pe.stretch,Xe=Pe.destroyPopupOnHide,ze=Pe.forceRender,Ze=Pe.align,pt=Pe.point,kt=Pe.getRootDomNode,jt=Pe.getClassNameFromAlign,Yt=Pe.onAlign,kr=Pe.onMouseEnter,Jr=Pe.onMouseLeave,$r=Pe.onMouseDown,Zr=Pe.onTouchStart,Hr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useState)(),yn=Object(g.a)(nn,2),cn=yn[0],In=yn[1],fn=_n(Ge),Mr=Object(g.a)(fn,2),Fr=Mr[0],sn=Mr[1];function gn(){Ge&&sn(kt())}var wr=Gr(Qe,gn),xn=Object(g.a)(wr,2),zn=xn[0],Sn=xn[1],Ln=Object(m.useRef)();function Cn(){return pt||kt}function Jn(){var Pn;(Pn=Hr.current)===null||Pn===void 0||Pn.forceAlign()}function ii(Pn,Mn){var Kn=jt(Mn);cn!==Kn&&In(Kn),zn==="align"&&(cn!==Kn?Promise.resolve().then(function(){Jn()}):Sn(function(){var Bn;(Bn=Ln.current)===null||Bn===void 0||Bn.call(Ln)}),Yt==null||Yt(Pn,Mn))}var Gn=Object(M.a)({},se(Pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Pn){var Mn=Gn[Pn];Gn[Pn]=function(Kn,Bn){return Sn(),Mn==null?void 0:Mn(Kn,Bn)}});function fi(){return new Promise(function(Pn){Ln.current=Pn})}m.useEffect(function(){!Gn.motionName&&zn==="motion"&&Sn()},[Gn.motionName,zn]),m.useImperativeHandle(Ve,function(){return{forceAlign:Jn,getElement:function(){return rn.current}}});var Xi=Object(M.a)(Object(M.a)({},Fr),{},{zIndex:je,opacity:zn==="motion"||zn==="stable"||!Qe?void 0:0,pointerEvents:zn==="stable"?void 0:"none"},De),Si=!0;(Ze==null?void 0:Ze.points)&&(zn==="align"||zn==="stable")&&(Si=!1);var ai=we;return m.Children.count(we)>1&&(ai=m.createElement("div",{className:"".concat(Fe,"-content")},we)),m.createElement(ge,Object(f.a)({visible:Qe,ref:rn,leavedClassName:"".concat(Fe,"-hidden")},Gn,{onAppearPrepare:fi,onEnterPrepare:fi,removeOnLeave:Xe,forceRender:ze}),function(Pn,Mn){var Kn=Pn.className,Bn=Pn.style,ei=T()(Fe,be,cn,Kn);return m.createElement(Ct.a,{target:Cn(),key:"popup",ref:Hr,monitorWindowResize:!0,disabled:Si,align:Ze,onAlign:ii},m.createElement("div",{ref:Mn,className:ei,onMouseEnter:kr,onMouseLeave:Jr,onMouseDownCapture:$r,onTouchStartCapture:Zr,style:Object(M.a)(Object(M.a)({},Bn),Xi)},ai))})});Zn.displayName="PopupInner";var qn=Zn,Nn=m.forwardRef(function(Pe,Ve){var Qe=Pe.prefixCls,Fe=Pe.visible,be=Pe.zIndex,De=Pe.children,we=Pe.mobile;we=we===void 0?{}:we;var je=we.popupClassName,Ge=we.popupStyle,Xe=we.popupMotion,ze=Xe===void 0?{}:Xe,Ze=we.popupRender,pt=m.useRef();m.useImperativeHandle(Ve,function(){return{forceAlign:function(){},getElement:function(){return pt.current}}});var kt=Object(M.a)({zIndex:be},Ge),jt=De;return m.Children.count(De)>1&&(jt=m.createElement("div",{className:"".concat(Qe,"-content")},De)),Ze&&(jt=Ze(jt)),m.createElement(ge,Object(f.a)({visible:Fe,ref:pt,removeOnLeave:!0},ze),function(Yt,kr){var Jr=Yt.className,$r=Yt.style,Zr=T()(Qe,je,Jr);return m.createElement("div",{ref:kr,className:Zr,style:Object(M.a)(Object(M.a)({},$r),kt)},jt)})});Nn.displayName="MobilePopupInner";var Ni=Nn,Gi=["visible","mobile"],Wn=m.forwardRef(function(Pe,Ve){var Qe=Pe.visible,Fe=Pe.mobile,be=Object(O.a)(Pe,Gi),De=Object(m.useState)(Qe),we=Object(g.a)(De,2),je=we[0],Ge=we[1],Xe=Object(m.useState)(!1),ze=Object(g.a)(Xe,2),Ze=ze[0],pt=ze[1],kt=Object(M.a)(Object(M.a)({},be),{},{visible:je});Object(m.useEffect)(function(){Ge(Qe),Qe&&Fe&&pt(Ue())},[Qe,Fe]);var jt=Ze?m.createElement(Ni,Object(f.a)({},kt,{mobile:Fe,ref:Ve})):m.createElement(qn,Object(f.a)({},kt,{ref:Ve}));return m.createElement("div",null,m.createElement(Ke,kt),jt)});Wn.displayName="Popup";var Ti=Wn,Ki=m.createContext(null),ki=Ki;function ni(){}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 Ve=function(Qe){Object(_.a)(be,Qe);var Fe=Object(E.a)(be);function be(De){var we;Object(R.a)(this,be),we=Fe.call(this,De),we.popupRef=m.createRef(),we.triggerRef=m.createRef(),we.attachId=void 0,we.clickOutsideHandler=void 0,we.touchOutsideHandler=void 0,we.contextMenuOutsideHandler1=void 0,we.contextMenuOutsideHandler2=void 0,we.mouseDownTimeout=void 0,we.focusTime=void 0,we.preClickTime=void 0,we.preTouchTime=void 0,we.delayTimer=void 0,we.hasPopupMouseDown=void 0,we.onMouseEnter=function(Ge){var Xe=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",Ge),we.delaySetPopupVisible(!0,Xe,Xe?null:Ge)},we.onMouseMove=function(Ge){we.fireEvents("onMouseMove",Ge),we.setPoint(Ge)},we.onMouseLeave=function(Ge){we.fireEvents("onMouseLeave",Ge),we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onPopupMouseEnter=function(){we.clearDelayTimer()},we.onPopupMouseLeave=function(Ge){var Xe;if(Ge.relatedTarget&&!Ge.relatedTarget.setTimeout&&Object(dt.a)((Xe=we.popupRef.current)===null||Xe===void 0?void 0:Xe.getElement(),Ge.relatedTarget))return;we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onFocus=function(Ge){we.fireEvents("onFocus",Ge),we.clearDelayTimer(),we.isFocusToShow()&&(we.focusTime=Date.now(),we.delaySetPopupVisible(!0,we.props.focusDelay))},we.onMouseDown=function(Ge){we.fireEvents("onMouseDown",Ge),we.preClickTime=Date.now()},we.onTouchStart=function(Ge){we.fireEvents("onTouchStart",Ge),we.preTouchTime=Date.now()},we.onBlur=function(Ge){we.fireEvents("onBlur",Ge),we.clearDelayTimer(),we.isBlurToHide()&&we.delaySetPopupVisible(!1,we.props.blurDelay)},we.onContextMenu=function(Ge){Ge.preventDefault(),we.fireEvents("onContextMenu",Ge),we.setPopupVisible(!0,Ge)},we.onContextMenuClose=function(){we.isContextMenuToShow()&&we.close()},we.onClick=function(Ge){if(we.fireEvents("onClick",Ge),we.focusTime){var Xe;if(we.preClickTime&&we.preTouchTime?Xe=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?Xe=we.preClickTime:we.preTouchTime&&(Xe=we.preTouchTime),Math.abs(Xe-we.focusTime)<20)return;we.focusTime=0}we.preClickTime=0,we.preTouchTime=0,we.isClickToShow()&&(we.isClickToHide()||we.isBlurToHide())&&Ge&&Ge.preventDefault&&Ge.preventDefault();var ze=!we.state.popupVisible;(we.isClickToHide()&&!ze||ze&&we.isClickToShow())&&we.setPopupVisible(!we.state.popupVisible,Ge)},we.onPopupMouseDown=function(){if(we.hasPopupMouseDown=!0,clearTimeout(we.mouseDownTimeout),we.mouseDownTimeout=window.setTimeout(function(){we.hasPopupMouseDown=!1},0),we.context){var Ge;(Ge=we.context).onPopupMouseDown.apply(Ge,arguments)}},we.onDocumentClick=function(Ge){if(we.props.mask&&!we.props.maskClosable)return;var Xe=Ge.target,ze=we.getRootDomNode(),Ze=we.getPopupDomNode();(!Object(dt.a)(ze,Xe)||we.isContextMenuOnly())&&!Object(dt.a)(Ze,Xe)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var Ge=we.props.getTriggerDOMNode;if(Ge)return Ge(we.triggerRef.current);try{var Xe=Object(ft.a)(we.triggerRef.current);if(Xe)return Xe}catch(ze){}return rt.a.findDOMNode(Object(v.a)(we))},we.getPopupClassNameFromAlign=function(Ge){var Xe=[],ze=we.props,Ze=ze.popupPlacement,pt=ze.builtinPlacements,kt=ze.prefixCls,jt=ze.alignPoint,Yt=ze.getPopupClassNameFromAlign;return Ze&&pt&&Xe.push(st(pt,kt,Ge,jt)),Yt&&Xe.push(Yt(Ge)),Xe.join(" ")},we.getComponent=function(){var Ge=we.props,Xe=Ge.prefixCls,ze=Ge.destroyPopupOnHide,Ze=Ge.popupClassName,pt=Ge.onPopupAlign,kt=Ge.popupMotion,jt=Ge.popupAnimation,Yt=Ge.popupTransitionName,kr=Ge.popupStyle,Jr=Ge.mask,$r=Ge.maskAnimation,Zr=Ge.maskTransitionName,Hr=Ge.maskMotion,rn=Ge.zIndex,nn=Ge.popup,yn=Ge.stretch,cn=Ge.alignPoint,In=Ge.mobile,fn=Ge.forceRender,Mr=we.state,Fr=Mr.popupVisible,sn=Mr.point,gn=we.getPopupAlign(),wr={};return we.isMouseEnterToShow()&&(wr.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(wr.onMouseLeave=we.onPopupMouseLeave),wr.onMouseDown=we.onPopupMouseDown,wr.onTouchStart=we.onPopupMouseDown,m.createElement(Ti,Object(f.a)({prefixCls:Xe,destroyPopupOnHide:ze,visible:Fr,point:cn&&sn,className:Ze,align:gn,onAlign:pt,animation:jt,getClassNameFromAlign:we.getPopupClassNameFromAlign},wr,{stretch:yn,getRootDomNode:we.getRootDomNode,style:kr,mask:Jr,zIndex:rn,transitionName:Yt,maskAnimation:$r,maskTransitionName:Zr,maskMotion:Hr,ref:we.popupRef,motion:kt,mobile:In,forceRender:fn}),typeof nn=="function"?nn():nn)},we.attachParent=function(Ge){ut.a.cancel(we.attachId);var Xe=we.props,ze=Xe.getPopupContainer,Ze=Xe.getDocument,pt=we.getRootDomNode(),kt;ze?(pt||ze.length===0)&&(kt=ze(pt)):kt=Ze(we.getRootDomNode()).body,kt?kt.appendChild(Ge):we.attachId=Object(ut.a)(function(){we.attachParent(Ge)})},we.getContainer=function(){var Ge=we.props.getDocument,Xe=Ge(we.getRootDomNode()).createElement("div");return Xe.style.position="absolute",Xe.style.top="0",Xe.style.left="0",Xe.style.width="100%",we.attachParent(Xe),Xe},we.setPoint=function(Ge){var Xe=we.props.alignPoint;if(!Xe||!Ge)return;we.setState({point:{pageX:Ge.pageX,pageY:Ge.pageY}})},we.handlePortalUpdate=function(){we.state.prevPopupVisible!==we.state.popupVisible&&we.props.afterPopupVisibleChange(we.state.popupVisible)},we.triggerContextValue={onPopupMouseDown:we.onPopupMouseDown};var je;return"popupVisible"in De?je=!!De.popupVisible:je=!!De.defaultPopupVisible,we.state={prevPopupVisible:je,popupVisible:je},ta.forEach(function(Ge){we["fire".concat(Ge)]=function(Xe){we.fireEvents(Ge,Xe)}}),we}return Object(C.a)(be,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,je=this.state;if(je.popupVisible){var Ge;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ge=we.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Ge,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ge=Ge||we.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Ge,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ge=Ge||we.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),ut.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var we;return((we=this.popupRef.current)===null||we===void 0?void 0:we.getElement())||null}},{key:"getPopupAlign",value:function(){var we=this.props,je=we.popupPlacement,Ge=we.popupAlign,Xe=we.builtinPlacements;return je&&Xe?$e(Xe,je,Ge):Ge}},{key:"setPopupVisible",value:function(we,je){var Ge=this.props.alignPoint,Xe=this.state.popupVisible;this.clearDelayTimer(),Xe!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:Xe}),this.props.onPopupVisibleChange(we)),Ge&&je&&we&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(we,je,Ge){var Xe=this,ze=je*1e3;if(this.clearDelayTimer(),ze){var Ze=Ge?{pageX:Ge.pageX,pageY:Ge.pageY}:null;this.delayTimer=window.setTimeout(function(){Xe.setPopupVisible(we,Ze),Xe.clearDelayTimer()},ze)}else this.setPopupVisible(we,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(we){var je=this.props.children.props,Ge=this.props;return je[we]&&Ge[we]?this["fire".concat(we)]:je[we]||Ge[we]}},{key:"isClickToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var we=this.props.action;return we==="contextMenu"||we.length===1&&we[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.indexOf("contextMenu")!==-1||Ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,je=we.action,Ge=we.hideAction;return je.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,je=we.action,Ge=we.hideAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.indexOf("focus")!==-1||Ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,je=we.action,Ge=we.hideAction;return je.indexOf("focus")!==-1||Ge.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var we;(we=this.popupRef.current)===null||we===void 0||we.forceAlign()}}},{key:"fireEvents",value:function(we,je){var Ge=this.props.children.props[we];Ge&&Ge(je);var Xe=this.props[we];Xe&&Xe(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,je=this.props,Ge=je.children,Xe=je.forceRender,ze=je.alignPoint,Ze=je.className,pt=je.autoDestroy,kt=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()(kt&&kt.props&&kt.props.className,Ze);Yt&&(jt.className=Yt);var kr=Object(M.a)({},jt);Object(Be.c)(kt)&&(kr.ref=Object(Be.a)(this.triggerRef,kt.ref));var Jr=m.cloneElement(kt,kr),$r;return(we||this.popupRef.current||Xe)&&($r=m.createElement(Pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&pt&&($r=null),m.createElement(ki.Provider,{value:this.triggerContextValue},Jr,$r)}}],[{key:"getDerivedStateFromProps",value:function(we,je){var Ge=we.popupVisible,Xe={};return Ge!==void 0&&je.popupVisible!==Ge&&(Xe.popupVisible=Ge,Xe.prevPopupVisible=je.popupVisible),Xe}}]),be}(m.Component);return Ve.contextType=ki,Ve.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ea,getDocument:Vi,onPopupVisibleChange:ni,afterPopupVisibleChange:ni,onPopupAlign:ni,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ve}var Li=oa(at.a),$n={adjustX:1,adjustY:1},ji={topLeft:{points:["bl","tl"],overflow:$n,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:$n,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:$n,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:$n,offset:[4,0]}},ha={topLeft:{points:["bl","tl"],overflow:$n,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:$n,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:$n,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:$n,offset:[4,0]}},xt=ji,et=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},wt=function(Ve,Qe,Fe){var be=ie(Qe),De=Ve.getState();Ve.setState({defaultActiveFirst:Object(M.a)(Object(M.a)({},De.defaultActiveFirst),{},Object(N.a)({},be,Fe))})},Lt=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(Fe){var be;Object(R.a)(this,Qe),be=Ve.call(this,Fe),be.onDestroy=function(ze){be.props.onDestroy(ze)},be.onKeyDown=function(ze){var Ze=ze.keyCode,pt=be.menuInstance,kt=be.props.store,jt=be.getVisible();if(Ze===u.a.ENTER)return be.onTitleClick(ze),wt(kt,be.props.eventKey,!0),!0;if(Ze===u.a.RIGHT)return jt?pt.onKeyDown(ze):(be.triggerOpenChange(!0),wt(kt,be.props.eventKey,!0)),!0;if(Ze===u.a.LEFT){var Yt;if(jt)Yt=pt.onKeyDown(ze);else return;return Yt||(be.triggerOpenChange(!1),Yt=!0),Yt}return jt&&(Ze===u.a.UP||Ze===u.a.DOWN)?pt.onKeyDown(ze):void 0},be.onOpenChange=function(ze){be.props.onOpenChange(ze)},be.onPopupVisibleChange=function(ze){be.triggerOpenChange(ze,ze?"mouseenter":"mouseleave")},be.onMouseEnter=function(ze){var Ze=be.props,pt=Ze.eventKey,kt=Ze.onMouseEnter,jt=Ze.store;wt(jt,be.props.eventKey,!1),kt({key:pt,domEvent:ze})},be.onMouseLeave=function(ze){var Ze=be.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onMouseLeave;pt.subMenuInstance=Object(v.a)(be),jt({key:kt,domEvent:ze})},be.onTitleMouseEnter=function(ze){var Ze=be.props,pt=Ze.eventKey,kt=Ze.onItemHover,jt=Ze.onTitleMouseEnter;kt({key:pt,hover:!0}),jt({key:pt,domEvent:ze})},be.onTitleMouseLeave=function(ze){var Ze=be.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onItemHover,Yt=Ze.onTitleMouseLeave;pt.subMenuInstance=Object(v.a)(be),jt({key:kt,hover:!1}),Yt({key:kt,domEvent:ze})},be.onTitleClick=function(ze){var Ze=Object(v.a)(be),pt=Ze.props;if(pt.onTitleClick({key:pt.eventKey,domEvent:ze}),pt.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!be.getVisible(),"click"),wt(pt.store,be.props.eventKey,!1)},be.onSubMenuClick=function(ze){typeof be.props.onClick=="function"&&be.props.onClick(be.addKeyPath(ze))},be.onSelect=function(ze){be.props.onSelect(ze)},be.onDeselect=function(ze){be.props.onDeselect(ze)},be.getPrefixCls=function(){return"".concat(be.props.rootPrefixCls,"-submenu")},be.getActiveClassName=function(){return"".concat(be.getPrefixCls(),"-active")},be.getDisabledClassName=function(){return"".concat(be.getPrefixCls(),"-disabled")},be.getSelectedClassName=function(){return"".concat(be.getPrefixCls(),"-selected")},be.getOpenClassName=function(){return"".concat(be.props.rootPrefixCls,"-submenu-open")},be.getVisible=function(){return be.state.isOpen},be.getMode=function(){return be.state.mode},be.saveMenuInstance=function(ze){be.menuInstance=ze},be.addKeyPath=function(ze){return Object(M.a)(Object(M.a)({},ze),{},{keyPath:(ze.keyPath||[]).concat(be.props.eventKey)})},be.triggerOpenChange=function(ze,Ze){var pt=be.props.eventKey,kt=function(){be.onOpenChange({key:pt,item:Object(v.a)(be),trigger:Ze,open:ze})};Ze==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){kt()},0):kt()},be.isChildrenSelected=function(){var ze={find:!1};return X(be.props.children,be.props.selectedKeys,ze),ze.find},be.isInlineMode=function(){return be.getMode()==="inline"},be.adjustWidth=function(){if(!be.subMenuTitle||!be.menuInstance)return;var ze=qe.findDOMNode(be.menuInstance);if(ze.offsetWidth>=be.subMenuTitle.offsetWidth)return;ze.style.minWidth="".concat(be.subMenuTitle.offsetWidth,"px")},be.saveSubMenuTitle=function(ze){be.subMenuTitle=ze},be.getBaseProps=function(){var ze=Object(v.a)(be),Ze=ze.props,pt=be.getMode();return{mode:pt==="horizontal"?"vertical":pt,visible:be.getVisible(),level:Ze.level+1,inlineIndent:Ze.inlineIndent,focusable:!1,onClick:be.onSubMenuClick,onSelect:be.onSelect,onDeselect:be.onDeselect,onDestroy:be.onDestroy,selectedKeys:Ze.selectedKeys,eventKey:"".concat(Ze.eventKey,"-menu-"),openKeys:Ze.openKeys,motion:Ze.motion,onOpenChange:be.onOpenChange,subMenuOpenDelay:Ze.subMenuOpenDelay,parentMenu:Object(v.a)(be),subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,triggerSubMenuAction:Ze.triggerSubMenuAction,builtinPlacements:Ze.builtinPlacements,defaultActiveFirst:Ze.store.getState().defaultActiveFirst[ie(Ze.eventKey)],multiple:Ze.multiple,prefixCls:Ze.rootPrefixCls,id:be.internalMenuId,manualRef:be.saveMenuInstance,itemIcon:Ze.itemIcon,expandIcon:Ze.expandIcon,direction:Ze.direction}},be.getMotion=function(ze,Ze){var pt=Object(v.a)(be),kt=pt.haveRendered,jt=be.props,Yt=jt.motion,kr=jt.rootPrefixCls,Jr=Object(M.a)(Object(M.a)({},Yt),{},{leavedClassName:"".concat(kr,"-hidden"),removeOnLeave:!1,motionAppear:kt||!Ze||ze!=="inline"});return Jr};var De=Fe.store,we=Fe.eventKey,je=De.getState(),Ge=je.defaultActiveFirst;be.isRootMenu=!1;var Xe=!1;return Ge&&(Xe=Ge[we]),wt(De,we,Xe),be.state={mode:Fe.mode,isOpen:Fe.isOpen},be}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,De=this.props,we=De.mode,je=De.parentMenu,Ge=De.manualRef,Xe=De.isOpen,ze=function(){be.setState({mode:we,isOpen:Xe})},Ze=Xe!==this.state.isOpen,pt=we!==this.state.mode;if((pt||Ze)&&(ut.a.cancel(this.updateStateRaf),pt?this.updateStateRaf=Object(ut.a)(ze):ze()),Ge&&Ge(this),we!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Xe)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,De=be.onDestroy,we=be.eventKey;De&&De(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ut.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(be,De){var we=this.getBaseProps();return m.createElement(Ar,Object(f.a)({},we,{id:this.internalMenuId,className:be,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var be=this,De=this.getBaseProps(),we=De.mode,je=De.visible,Ge=De.forceSubMenuRender,Xe=De.direction,ze=this.getMotion(we,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Ge,!this.haveOpened)return m.createElement("div",null);var Ze=T()("".concat(De.prefixCls,"-sub"),Object(N.a)({},"".concat(De.prefixCls,"-rtl"),Xe==="rtl"));return this.isInlineMode()?m.createElement(ge,Object(f.a)({visible:De.visible,forceRender:Ge},ze),function(pt){var kt=pt.className,jt=pt.style,Yt=T()(Ze,kt);return be.renderPopupMenu(Yt,jt)}):this.renderPopupMenu(Ze)}},{key:"render",value:function(){var be,De,we,je=Object(M.a)({},this.props),Ge=this.getVisible(),Xe=this.getPrefixCls(),ze=this.isInlineMode(),Ze=this.getMode(),pt=T()(Xe,"".concat(Xe,"-").concat(Ze),(be={},Object(N.a)(be,je.className,!!je.className),Object(N.a)(be,this.getOpenClassName(),Ge),Object(N.a)(be,this.getActiveClassName(),je.active||Ge&&!ze),Object(N.a)(be,this.getDisabledClassName(),je.disabled),Object(N.a)(be,this.getSelectedClassName(),this.isChildrenSelected()),be));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(et+=1,this.internalMenuId="$__$".concat(et,"$Menu")));var kt={},jt={},Yt={};je.disabled||(kt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},jt={onClick:this.onTitleClick},Yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var kr={},Jr=je.direction,$r=Jr==="rtl";ze&&($r?kr.paddingRight=je.inlineIndent*je.level:kr.paddingLeft=je.inlineIndent*je.level);var Zr={};this.getVisible()&&(Zr={"aria-owns":this.internalMenuId});var Hr=null;Ze!=="horizontal"&&(Hr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Hr=m.createElement(this.props.expandIcon,Object(M.a)({},this.props))));var rn=m.createElement("div",Object(f.a)({ref:this.saveSubMenuTitle,style:kr,className:"".concat(Xe,"-title"),role:"button"},Yt,jt,{"aria-expanded":Ge},Zr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Hr||m.createElement("i",{className:"".concat(Xe,"-arrow")})),nn=this.renderChildren(),yn=((De=je.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Cn){return Cn.parentNode},cn=mt[Ze],In=je.popupOffset?{offset:je.popupOffset}:{},fn=T()((we={},Object(N.a)(we,je.popupClassName,je.popupClassName&&!ze),Object(N.a)(we,"".concat(Xe,"-rtl"),$r),we)),Mr=je.disabled,Fr=je.triggerSubMenuAction,sn=je.subMenuOpenDelay,gn=je.forceSubMenuRender,wr=je.subMenuCloseDelay,xn=je.builtinPlacements;Q.forEach(function(Cn){return delete je[Cn]}),delete je.onClick;var zn=$r?Object(M.a)(Object(M.a)({},ha),xn):Object(M.a)(Object(M.a)({},ji),xn);delete je.direction;var Sn=this.getBaseProps(),Ln=ze?null:this.getMotion(Sn.mode,Sn.visible);return m.createElement("li",Object(f.a)({},je,kt,{className:pt,role:"menuitem"}),m.createElement(Li,{prefixCls:Xe,popupClassName:T()("".concat(Xe,"-popup"),fn),getPopupContainer:yn,builtinPlacements:zn,popupPlacement:cn,popupVisible:ze?!1:Ge,popupAlign:In,popup:ze?null:nn,action:Mr||ze?[]:[Fr],mouseEnterDelay:sn,mouseLeaveDelay:wr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:gn,popupMotion:Ln},rn),ze?nn:null)}}]),Qe}(m.Component);Lt.defaultProps={onMouseEnter:ne,onMouseLeave:ne,onTitleMouseEnter:ne,onTitleMouseLeave:ne,onTitleClick:ne,manualRef:ne,mode:"vertical",title:""};var Dt=Object(w.b)(function(Pe,Ve){var Qe=Pe.openKeys,Fe=Pe.activeKey,be=Pe.selectedKeys,De=Ve.eventKey,we=Ve.subMenuKey;return{isOpen:Qe.indexOf(De)>-1,active:Fe[we]===De,selectedKeys:be}})(Lt);Dt.isSubMenu=!0;var Kt=Dt,zt="menuitem-overflowed",ht=.5,Ot=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){var Fe;return Object(R.a)(this,Qe),Fe=Ve.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.childRef=m.createRef(),Fe.getMenuItemNodes=function(){var be=Fe.props.prefixCls,De=Fe.childRef.current;return De?[].slice.call(De.children).filter(function(we){return we.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(be,De,we){var je=Fe.props,Ge=je.overflowedIndicator,Xe=je.level,ze=je.mode,Ze=je.prefixCls,pt=je.theme;if(Xe!==1||ze!=="horizontal")return null;var kt=Fe.props.children[0],jt=kt.props,Yt=jt.children,kr=jt.title,Jr=jt.style,$r=Object(O.a)(jt,["children","title","style"]),Zr=Object(M.a)({},Jr),Hr="".concat(be,"-overflowed-indicator"),rn="".concat(be,"-overflowed-indicator");De.length===0&&we!==!0?Zr=Object(M.a)(Object(M.a)({},Zr),{},{display:"none"}):we&&(Zr=Object(M.a)(Object(M.a)({},Zr),{},{visibility:"hidden",position:"absolute"}),Hr="".concat(Hr,"-placeholder"),rn="".concat(rn,"-placeholder"));var nn=pt?"".concat(Ze,"-").concat(pt):"",yn={};return Q.forEach(function(cn){$r[cn]!==void 0&&(yn[cn]=$r[cn])}),m.createElement(Kt,Object(f.a)({title:Ge,className:"".concat(Ze,"-overflowed-submenu"),popupClassName:nn},yn,{key:Hr,eventKey:rn,disabled:!1,style:Zr}),De)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var be=Fe.childRef.current;if(!be)return;var De=be.children;if(!De||De.length===0)return;var we=be.children[De.length-1];ve(we,"display","inline-block");var je=Fe.getMenuItemNodes(),Ge=je.filter(function(Xe){return Xe.className.split(" ").indexOf(zt)>=0});Ge.forEach(function(Xe){ve(Xe,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Xe){return _e(Xe,!0)}),Ge.forEach(function(Xe){ve(Xe,"display","none")}),Fe.overflowedIndicatorWidth=_e(be.children[be.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Xe,ze){return Xe+ze},0),Fe.handleResize(),ve(we,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var be=Fe.childRef.current;if(!be)return;var De=_e(be);Fe.overflowedItems=[];var we=0,je;Fe.originalTotalWidth>De+ht&&(je=-1,Fe.menuItemSizes.forEach(function(Ge){we+=Ge,we+Fe.overflowedIndicatorWidth<=De&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){var be=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new Je.default(function(we){we.forEach(function(){var je=be.cancelFrameId;cancelAnimationFrame(je),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(we){be.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(we){be.resizeObserver.observe(we)}),be.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(be){var De=this,we=this.state.lastVisibleIndex;return(be||[]).reduce(function(je,Ge,Xe){var ze=Ge;if(De.props.mode==="horizontal"){var Ze=De.getOverflowedSubMenuItem(Ge.props.eventKey,[]);we!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&(Xe>we&&(ze=m.cloneElement(Ge,{style:{display:"none"},eventKey:"".concat(Ge.props.eventKey,"-hidden"),className:"".concat(zt)})),Xe===we+1&&(De.overflowedItems=be.slice(we+1).map(function(kt){return m.cloneElement(kt,{key:kt.props.eventKey,mode:"vertical-left"})}),Ze=De.getOverflowedSubMenuItem(Ge.props.eventKey,De.overflowedItems)));var pt=[].concat(Object(d.a)(je),[Ze,ze]);return Xe===be.length-1&&pt.push(De.getOverflowedSubMenuItem(Ge.props.eventKey,[],!0)),pt}return[].concat(Object(d.a)(je),[ze])},[])}},{key:"render",value:function(){var be=this.props,De=be.visible,we=be.prefixCls,je=be.overflowedIndicator,Ge=be.mode,Xe=be.level,ze=be.tag,Ze=be.children,pt=be.theme,kt=Object(O.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),jt=ze;return m.createElement(jt,Object(f.a)({ref:this.childRef},kt),this.renderChildren(Ze))}}]),Qe}(m.Component);Ot.defaultProps={tag:"div",className:""};var Rt=Ot;function ur(Pe){return Pe.length?Pe.every(function(Ve){return!!Ve.props.disabled}):!0}function ar(Pe,Ve,Qe){var Fe=Pe.getState();Pe.setState({activeKey:Object(M.a)(Object(M.a)({},Fe.activeKey),{},Object(N.a)({},Ve,Qe))})}function Zt(Pe){return Pe.eventKey||"0-menu-"}function $t(Pe,Ve){var Qe=Ve,Fe=Pe.children,be=Pe.eventKey;if(Qe){var De;if(Z(Fe,function(we,je){we&&we.props&&!we.props.disabled&&Qe===Te(we,be,je)&&(De=!0)}),De)return Qe}return Qe=null,Pe.defaultActiveFirst&&Z(Fe,function(we,je){!Qe&&we&&!we.props.disabled&&(Qe=Te(we,be,je))}),Qe}function rr(Pe){if(!Pe)return;var Ve=this.instanceArray.indexOf(Pe);Ve!==-1?this.instanceArray[Ve]=Pe:this.instanceArray.push(Pe)}var sr=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(Fe){var be;return Object(R.a)(this,Qe),be=Ve.call(this,Fe),be.onKeyDown=function(De,we){var je=De.keyCode,Ge;if(be.getFlatInstanceArray().forEach(function(ze){ze&&ze.props.active&&ze.onKeyDown&&(Ge=ze.onKeyDown(De))}),Ge)return 1;var Xe=null;return(je===u.a.UP||je===u.a.DOWN)&&(Xe=be.step(je===u.a.UP?-1:1)),Xe?(De.preventDefault(),ar(be.props.store,Zt(be.props),Xe.props.eventKey),typeof we=="function"&&we(Xe),1):void 0},be.onItemHover=function(De){var we=De.key,je=De.hover;ar(be.props.store,Zt(be.props),je?we:null)},be.onDeselect=function(De){be.props.onDeselect(De)},be.onSelect=function(De){be.props.onSelect(De)},be.onClick=function(De){be.props.onClick(De)},be.onOpenChange=function(De){be.props.onOpenChange(De)},be.onDestroy=function(De){be.props.onDestroy(De)},be.getFlatInstanceArray=function(){return be.instanceArray},be.step=function(De){var we=be.getFlatInstanceArray(),je=be.props.store.getState().activeKey[Zt(be.props)],Ge=we.length;if(!Ge)return null;De<0&&(we=we.concat().reverse());var Xe=-1;if(we.every(function(kt,jt){return kt&&kt.props.eventKey===je?(Xe=jt,!1):!0}),!be.props.defaultActiveFirst&&Xe!==-1&&ur(we.slice(Xe,Ge-1)))return;var ze=(Xe+1)%Ge,Ze=ze;do{var pt=we[Ze];if(!pt||pt.props.disabled)Ze=(Ze+1)%Ge;else return pt}while(Ze!==ze);return null},be.renderCommonMenuItem=function(De,we,je){var Ge=be.props.store.getState(),Xe=Object(v.a)(be),ze=Xe.props,Ze=Te(De,ze.eventKey,we),pt=De.props;if(!pt||typeof De.type=="string")return De;var kt=Ze===Ge.activeKey,jt=Object(M.a)(Object(M.a)({mode:pt.mode||ze.mode,level:ze.level,inlineIndent:ze.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:ze.prefixCls,index:we,parentMenu:ze.parentMenu,manualRef:pt.disabled?void 0:Object(I.a)(De.ref,rr.bind(Object(v.a)(be))),eventKey:Ze,active:!pt.disabled&&kt,multiple:ze.multiple,onClick:function(kr){(pt.onClick||ne)(kr),be.onClick(kr)},onItemHover:be.onItemHover,motion:ze.motion,subMenuOpenDelay:ze.subMenuOpenDelay,subMenuCloseDelay:ze.subMenuCloseDelay,forceSubMenuRender:ze.forceSubMenuRender,onOpenChange:be.onOpenChange,onDeselect:be.onDeselect,onSelect:be.onSelect,builtinPlacements:ze.builtinPlacements,itemIcon:pt.itemIcon||be.props.itemIcon,expandIcon:pt.expandIcon||be.props.expandIcon},je),{},{direction:ze.direction});return(ze.mode==="inline"||Re())&&(jt.triggerSubMenuAction="click"),m.cloneElement(De,Object(M.a)(Object(M.a)({},jt),{},{key:Ze||we}))},be.renderMenuItem=function(De,we,je){if(!De)return null;var Ge=be.props.store.getState(),Xe={openKeys:Ge.openKeys,selectedKeys:Ge.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:je};return be.renderCommonMenuItem(De,we,Xe)},Fe.store.setState({activeKey:Object(M.a)(Object(M.a)({},Fe.store.getState().activeKey),{},Object(N.a)({},Fe.eventKey,$t(Fe,Fe.activeKey)))}),be.instanceArray=[],be}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(be){return this.props.visible||be.visible||this.props.className!==be.className||!V()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var De=this.props,we="activeKey"in De?De.activeKey:De.store.getState().activeKey[Zt(De)],je=$t(De,we);if(je!==we)ar(De.store,Zt(De),je);else if("activeKey"in be){var Ge=$t(be,be.activeKey);je!==Ge&&ar(De.store,Zt(De),je)}}},{key:"render",value:function(){var be=this,De=Object(f.a)({},this.props);this.instanceArray=[];var we=T()(De.prefixCls,De.className,"".concat(De.prefixCls,"-").concat(De.mode)),je={className:we,role:De.role||"menu"};De.id&&(je.id=De.id),De.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Ge=De.prefixCls,Xe=De.eventKey,ze=De.visible,Ze=De.level,pt=De.mode,kt=De.overflowedIndicator,jt=De.theme;return Q.forEach(function(Yt){return delete De[Yt]}),delete De.onClick,m.createElement(Rt,Object(f.a)({},De,{prefixCls:Ge,mode:pt,tag:"ul",level:Ze,theme:jt,visible:ze,overflowedIndicator:kt},je),Object(b.a)(De.children).map(function(Yt,kr){return be.renderMenuItem(Yt,kr,Xe||"0-menu-")}))}}]),Qe}(m.Component);sr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ne};var ot=Object(w.b)()(sr),Ar=ot,Nr=j("Kwbf");function fr(Pe,Ve,Qe){var Fe=Pe.prefixCls,be=Pe.motion,De=Pe.defaultMotions,we=De===void 0?{}:De,je=Pe.openAnimation,Ge=Pe.openTransitionName,Xe=Ve.switchingModeFromInline;if(be)return be;if(Object(W.a)(je)==="object"&&je)Object(Nr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Fe,"-open-").concat(je)};if(Ge)return{motionName:Ge};var ze=we[Qe];return ze||(Xe?null:we.other)}var _t=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(Fe){var be;Object(R.a)(this,Qe),be=Ve.call(this,Fe),be.onSelect=function(je){var Ge=Object(v.a)(be),Xe=Ge.props;if(Xe.selectable){var ze=be.store.getState(),Ze=ze.selectedKeys,pt=je.key;Xe.multiple?Ze=Ze.concat([pt]):Ze=[pt],"selectedKeys"in Xe||be.store.setState({selectedKeys:Ze}),Xe.onSelect(Object(M.a)(Object(M.a)({},je),{},{selectedKeys:Ze}))}},be.onClick=function(je){var Ge=be.getRealMenuMode(),Xe=Object(v.a)(be),ze=Xe.store,Ze=Xe.props.onOpenChange;Ge!=="inline"&&!("openKeys"in be.props)&&(ze.setState({openKeys:[]}),Ze([])),be.props.onClick(je)},be.onKeyDown=function(je,Ge){be.innerMenu.getWrappedInstance().onKeyDown(je,Ge)},be.onOpenChange=function(je){var Ge=Object(v.a)(be),Xe=Ge.props,ze=be.store.getState().openKeys.concat(),Ze=!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)}Ze=Ze||Yt};Array.isArray(je)?je.forEach(pt):pt(je),Ze&&("openKeys"in be.props||be.store.setState({openKeys:ze}),Xe.onOpenChange(ze))},be.onDeselect=function(je){var Ge=Object(v.a)(be),Xe=Ge.props;if(Xe.selectable){var ze=be.store.getState().selectedKeys.concat(),Ze=je.key,pt=ze.indexOf(Ze);pt!==-1&&ze.splice(pt,1),"selectedKeys"in Xe||be.store.setState({selectedKeys:ze}),Xe.onDeselect(Object(M.a)(Object(M.a)({},je),{},{selectedKeys:ze}))}},be.onMouseEnter=function(je){be.restoreModeVerticalFromInline();var Ge=be.props.onMouseEnter;Ge&&Ge(je)},be.onTransitionEnd=function(je){var Ge=je.propertyName==="width"&&je.target===je.currentTarget,Xe=je.target.className,ze=Object.prototype.toString.call(Xe)==="[object SVGAnimatedString]"?Xe.animVal:Xe,Ze=je.propertyName==="font-size"&&ze.indexOf("anticon")>=0;(Ge||Ze)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(je){be.innerMenu=je},be.isRootMenu=!0;var De=Fe.defaultSelectedKeys,we=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(De=Fe.selectedKeys||[]),"openKeys"in Fe&&(we=Fe.openKeys||[]),be.store=Object(w.c)({selectedKeys:De,openKeys:we,activeKey:{"0-menu-":$t(Fe,Fe.activeKey)}}),be.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:be.store},be}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){var De=this.props,we=De.siderCollapsed,je=De.inlineCollapsed,Ge=De.onOpenChange;(!be.inlineCollapsed&&je||!be.siderCollapsed&&we)&&Ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,De=this.store,we=this.prevOpenKeys,je=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");je?(this.prevOpenKeys=De.getState().openKeys.concat(),this.store.setState({openKeys:[]})):we&&(this.store.setState({openKeys:we}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var be=this.props.mode,De=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return De&&we?"inline":we?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,De=be.inlineCollapsed,we=be.siderCollapsed;return we!==void 0?we:De}},{key:"restoreModeVerticalFromInline",value:function(){var be=this.state.switchingModeFromInline;be&&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 be=Object(M.a)({},Object(k.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return be.className+=" ".concat(be.prefixCls,"-root"),be.direction==="rtl"&&(be.className+=" ".concat(be.prefixCls,"-rtl")),be=Object(M.a)(Object(M.a)({},be),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:fr(this.props,this.state,De)}),delete be.openAnimation,delete be.openTransitionName,m.createElement(w.a,{store:this.store},m.createElement(Ar,Object(f.a)({},be,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(be,De){var we=De.prevProps,je=De.store,Ge=je.getState(),Xe={},ze={prevProps:be};return we.mode==="inline"&&be.mode!=="inline"&&(ze.switchingModeFromInline=!0),"openKeys"in be?Xe.openKeys=be.openKeys||[]:((be.inlineCollapsed&&!we.inlineCollapsed||be.siderCollapsed&&!we.siderCollapsed)&&(ze.switchingModeFromInline=!0,ze.inlineOpenKeys=Ge.openKeys,Xe.openKeys=[]),(!be.inlineCollapsed&&we.inlineCollapsed||!be.siderCollapsed&&we.siderCollapsed)&&(Xe.openKeys=De.inlineOpenKeys,ze.inlineOpenKeys=[])),Object.keys(Xe).length&&je.setState(Xe),ze}}]),Qe}(m.Component);_t.defaultProps={selectable:!0,onClick:ne,onSelect:ne,onOpenChange:ne,onDeselect:ne,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 It=_t,Et=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){var Fe;return Object(R.a)(this,Qe),Fe=Ve.apply(this,arguments),Fe.onKeyDown=function(be){var De=be.keyCode;return De===u.a.ENTER?(Fe.onClick(be),!0):void 0},Fe.onMouseLeave=function(be){var De=Fe.props,we=De.eventKey,je=De.onItemHover,Ge=De.onMouseLeave;je({key:we,hover:!1}),Ge({key:we,domEvent:be})},Fe.onMouseEnter=function(be){var De=Fe.props,we=De.eventKey,je=De.onItemHover,Ge=De.onMouseEnter;je({key:we,hover:!0}),Ge({key:we,domEvent:be})},Fe.onClick=function(be){var De=Fe.props,we=De.eventKey,je=De.multiple,Ge=De.onClick,Xe=De.onSelect,ze=De.onDeselect,Ze=De.isSelected,pt={key:we,keyPath:[we],item:Object(v.a)(Fe),domEvent:be};Ge(pt),je?Ze?ze(pt):Xe(pt):Ze||Xe(pt)},Fe.saveNode=function(be){Fe.node=be},Fe}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var be=this.props;be.onDestroy&&be.onDestroy(be.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 be,De=Object(M.a)({},this.props),we=T()(this.getPrefixCls(),De.className,(be={},Object(N.a)(be,this.getActiveClassName(),!De.disabled&&De.active),Object(N.a)(be,this.getSelectedClassName(),De.isSelected),Object(N.a)(be,this.getDisabledClassName(),De.disabled),be)),je=Object(M.a)(Object(M.a)({},De.attribute),{},{title:typeof De.title=="string"?De.title:void 0,className:we,role:De.role||"menuitem","aria-disabled":De.disabled});De.role==="option"?je=Object(M.a)(Object(M.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},Xe=Object(M.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?Xe.paddingRight=De.inlineIndent*De.level:Xe.paddingLeft=De.inlineIndent*De.level),Q.forEach(function(Ze){return delete De[Ze]}),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(f.a)({},Object(k.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Ge,{style:Xe,ref:this.saveNode}),De.children,ze)}}]),Qe}(m.Component);Et.isMenuItem=!0,Et.defaultProps={onSelect:ne,onMouseEnter:ne,onMouseLeave:ne,manualRef:ne};var Nt=Object(w.b)(function(Pe,Ve){var Qe=Pe.activeKey,Fe=Pe.selectedKeys,be=Ve.eventKey,De=Ve.subMenuKey;return{active:Qe[De]===be,isSelected:Array.isArray(Fe)?Fe.indexOf(be)!==-1:Fe===be}})(Et),qt=Nt,pr=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){var Fe;return Object(R.a)(this,Qe),Fe=Ve.apply(this,arguments),Fe.renderInnerMenuItem=function(be){var De=Fe.props,we=De.renderMenuItem,je=De.index;return we(be,je,Fe.props.subMenuKey)},Fe}return Object(C.a)(Qe,[{key:"render",value:function(){var be=Object(f.a)({},this.props),De=be.className,we=De===void 0?"":De,je=be.rootPrefixCls,Ge="".concat(je,"-item-group-title"),Xe="".concat(je,"-item-group-list"),ze=be.title,Ze=be.children;return Q.forEach(function(pt){return delete be[pt]}),delete be.direction,m.createElement("li",Object(f.a)({},be,{onClick:function(kt){return kt.stopPropagation()},className:"".concat(we," ").concat(je,"-item-group")}),m.createElement("div",{className:Ge,title:typeof ze=="string"?ze:void 0},ze),m.createElement("ul",{className:Xe},m.Children.map(Ze,this.renderInnerMenuItem)))}}]),Qe}(m.Component);pr.isMenuItemGroup=!0,pr.defaultProps={disabled:!0};var er=pr,Rr=function(Ve){var Qe=Ve.className,Fe=Ve.rootPrefixCls,be=Ve.style;return m.createElement("li",{className:"".concat(Qe," ").concat(Fe,"-item-divider"),style:be})};Rr.defaultProps={disabled:!0,className:"",style:{}};var Ur=Rr,br=It,it=j("eDIo");function Gt(Pe,Ve){var Qe=Pe.prefixCls,Fe=Pe.editable,be=Pe.locale,De=Pe.style;return!Fe||Fe.showAdd===!1?null:m.createElement("button",{ref:Ve,type:"button",className:"".concat(Qe,"-nav-add"),style:De,"aria-label":(be==null?void 0:be.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var ln=m.forwardRef(Gt);function en(Pe,Ve){var Qe=Pe.prefixCls,Fe=Pe.id,be=Pe.tabs,De=Pe.locale,we=Pe.mobile,je=Pe.moreIcon,Ge=je===void 0?"More":je,Xe=Pe.moreTransitionName,ze=Pe.style,Ze=Pe.className,pt=Pe.editable,kt=Pe.tabBarGutter,jt=Pe.rtl,Yt=Pe.onTabClick,kr=Object(m.useState)(!1),Jr=Object(g.a)(kr,2),$r=Jr[0],Zr=Jr[1],Hr=Object(m.useState)(null),rn=Object(g.a)(Hr,2),nn=rn[0],yn=rn[1],cn="".concat(Fe,"-more-popup"),In="".concat(Qe,"-dropdown"),fn=nn!==null?"".concat(cn,"-").concat(nn):null,Mr=De==null?void 0:De.dropdownAriaLabel,Fr=m.createElement(br,{onClick:function(Ln){var Cn=Ln.key,Jn=Ln.domEvent;Yt(Cn,Jn),Zr(!1)},id:cn,tabIndex:-1,role:"listbox","aria-activedescendant":fn,selectedKeys:[nn],"aria-label":Mr!==void 0?Mr:"expanded dropdown"},be.map(function(Sn){return m.createElement(qt,{key:Sn.key,id:"".concat(cn,"-").concat(Sn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(Sn.key),disabled:Sn.disabled},Sn.tab)}));function sn(Sn){for(var Ln=be.filter(function(fi){return!fi.disabled}),Cn=Ln.findIndex(function(fi){return fi.key===nn})||0,Jn=Ln.length,ii=0;ii<Jn;ii+=1){Cn=(Cn+Sn+Jn)%Jn;var Gn=Ln[Cn];if(!Gn.disabled){yn(Gn.key);return}}}function gn(Sn){var Ln=Sn.which;if(!$r){[u.a.DOWN,u.a.SPACE,u.a.ENTER].includes(Ln)&&(Zr(!0),Sn.preventDefault());return}switch(Ln){case u.a.UP:sn(-1),Sn.preventDefault();break;case u.a.DOWN:sn(1),Sn.preventDefault();break;case u.a.ESC:Zr(!1);break;case u.a.SPACE:case u.a.ENTER:nn!==null&&Yt(nn,Sn);break}}Object(m.useEffect)(function(){var Sn=document.getElementById(fn);Sn&&Sn.scrollIntoView&&Sn.scrollIntoView(!1)},[nn]),Object(m.useEffect)(function(){$r||yn(null)},[$r]);var wr=Object(N.a)({},jt?"marginLeft":"marginRight",kt);be.length||(wr.visibility="hidden",wr.order=1);var xn=T()(Object(N.a)({},"".concat(In,"-rtl"),jt)),zn=we?null:m.createElement(it.a,{prefixCls:In,overlay:Fr,trigger:["hover"],visible:$r,transitionName:Xe,onVisibleChange:Zr,overlayClassName:xn,mouseEnterDelay:.1,mouseLeaveDelay:.1},m.createElement("button",{type:"button",className:"".concat(Qe,"-nav-more"),style:wr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":cn,id:"".concat(Fe,"-more"),"aria-expanded":$r,onKeyDown:gn},Ge));return m.createElement("div",{className:T()("".concat(Qe,"-nav-operations"),Ze),style:ze,ref:Ve},zn,m.createElement(ln,{prefixCls:Qe,locale:De,editable:pt}))}var mr=m.forwardRef(en),Ir=Object(m.createContext)(null),Pr=.1,Ft=.01,Qt=20,vr=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,Ve){var Qe=Object(m.useState)(),Fe=Object(g.a)(Qe,2),be=Fe[0],De=Fe[1],we=Object(m.useState)(0),je=Object(g.a)(we,2),Ge=je[0],Xe=je[1],ze=Object(m.useState)(0),Ze=Object(g.a)(ze,2),pt=Ze[0],kt=Ze[1],jt=Object(m.useState)(),Yt=Object(g.a)(jt,2),kr=Yt[0],Jr=Yt[1],$r=Object(m.useRef)();function Zr(Mr){var Fr=Mr.touches[0],sn=Fr.screenX,gn=Fr.screenY;De({x:sn,y:gn}),window.clearInterval($r.current)}function Hr(Mr){if(!be)return;Mr.preventDefault();var Fr=Mr.touches[0],sn=Fr.screenX,gn=Fr.screenY;De({x:sn,y:gn});var wr=sn-be.x,xn=gn-be.y;Ve(wr,xn);var zn=Date.now();Xe(zn),kt(zn-Ge),Jr({x:wr,y:xn})}function rn(){if(!be)return;if(De(null),Jr(null),kr){var Mr=kr.x/pt,Fr=kr.y/pt,sn=Math.abs(Mr),gn=Math.abs(Fr);if(Math.max(sn,gn)<Pr)return;var wr=Mr,xn=Fr;$r.current=window.setInterval(function(){if(Math.abs(wr)<Ft&&Math.abs(xn)<Ft){window.clearInterval($r.current);return}wr*=vr,xn*=vr,Ve(wr*Qt,xn*Qt)},Qt)}}var nn=Object(m.useRef)(0),yn=Object(m.useRef)(!1),cn=Object(m.useRef)();function In(Mr){var Fr=Mr.deltaX,sn=Mr.deltaY,gn=0,wr=Math.abs(Fr),xn=Math.abs(sn);wr===xn?gn=cn.current==="x"?Fr:sn:wr>xn?(gn=Fr,cn.current="x"):(gn=sn,cn.current="y");var zn=Date.now();zn-nn.current>100&&(yn.current=!1),(Ve(-gn,-gn)||yn.current)&&(Mr.preventDefault(),yn.current=!0),nn.current=zn}var fn=Object(m.useRef)(null);fn.current={onTouchStart:Zr,onTouchMove:Hr,onTouchEnd:rn,onWheel:In},m.useEffect(function(){function Mr(wr){fn.current.onTouchStart(wr)}function Fr(wr){fn.current.onTouchMove(wr)}function sn(wr){fn.current.onTouchEnd(wr)}function gn(wr){fn.current.onWheel(wr)}return document.addEventListener("touchmove",Fr,{passive:!1}),document.addEventListener("touchend",sn,{passive:!1}),Pe.current.addEventListener("touchstart",Mr,{passive:!1}),Pe.current.addEventListener("wheel",gn),function(){document.removeEventListener("touchmove",Fr),document.removeEventListener("touchend",sn)}},[])}function bt(){var Pe=Object(m.useRef)(new Map);function Ve(Fe){return Pe.current.has(Fe)||Pe.current.set(Fe,m.createRef()),Pe.current.get(Fe)}function Qe(Fe){Pe.current.delete(Fe)}return[Ve,Qe]}function Vt(Pe,Ve){var Qe=m.useRef(Pe),Fe=m.useState({}),be=Object(g.a)(Fe,2),De=be[1];function we(je){var Ge=typeof je=="function"?je(Qe.current):je;Ge!==Qe.current&&Ve(Ge,Qe.current),Qe.current=Ge,De({})}return[Qe.current,we]}var Mt=function(Ve){var Qe=Ve.position,Fe=Ve.prefixCls,be=Ve.extra;if(!be)return null;var De,we=be;return Qe==="right"&&(De=we.right||!we.left&&we||null),Qe==="left"&&(De=we.left||null),De?m.createElement("div",{className:"".concat(Fe,"-extra-content")},De):null};function Dr(Pe,Ve){var Qe,Fe=m.useContext(Ir),be=Fe.prefixCls,De=Fe.tabs,we=Pe.className,je=Pe.style,Ge=Pe.id,Xe=Pe.animated,ze=Pe.activeKey,Ze=Pe.rtl,pt=Pe.extra,kt=Pe.editable,jt=Pe.locale,Yt=Pe.tabPosition,kr=Pe.tabBarGutter,Jr=Pe.children,$r=Pe.onTabClick,Zr=Pe.onTabScroll,Hr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useRef)(),yn=Object(m.useRef)(),cn=bt(),In=Object(g.a)(cn,2),fn=In[0],Mr=In[1],Fr=Yt==="top"||Yt==="bottom",sn=Vt(0,function(kn,Tn){Fr&&Zr&&Zr({direction:kn>Tn?"left":"right"})}),gn=Object(g.a)(sn,2),wr=gn[0],xn=gn[1],zn=Vt(0,function(kn,Tn){!Fr&&Zr&&Zr({direction:kn>Tn?"top":"bottom"})}),Sn=Object(g.a)(zn,2),Ln=Sn[0],Cn=Sn[1],Jn=Object(m.useState)(0),ii=Object(g.a)(Jn,2),Gn=ii[0],fi=ii[1],Xi=Object(m.useState)(0),Si=Object(g.a)(Xi,2),ai=Si[0],Pn=Si[1],Mn=Object(m.useState)(0),Kn=Object(g.a)(Mn,2),Bn=Kn[0],ei=Kn[1],Ai=Object(m.useState)(0),ra=Object(g.a)(Ai,2),An=ra[0],Fi=ra[1],Ui=Object(m.useState)(null),Dn=Object(g.a)(Ui,2),On=Dn[0],ti=Dn[1],Ba=Object(m.useState)(null),wa=Object(g.a)(Ba,2),sa=wa[0],la=wa[1],ka=Object(m.useState)(0),Ta=Object(g.a)(ka,2),La=Ta[0],Ha=Ta[1],Xa=Object(m.useState)(0),Pa=Object(g.a)(Xa,2),ua=Pa[0],Sa=Pa[1],ba=o(new Map),ca=Object(g.a)(ba,2),co=ca[0],_a=ca[1],Ca=t(De,co,Gn),da="".concat(be,"-nav-operations-hidden"),fa=0,Yi=0;Fr?Ze?(fa=0,Yi=Math.max(0,Gn-On)):(fa=Math.min(0,On-Gn),Yi=0):(fa=Math.min(0,sa-ai),Yi=0);function na(kn){return kn<fa?[fa,!1]:kn>Yi?[Yi,!1]:[kn,!0]}var xr=Object(m.useRef)(),Tr=Object(m.useState)(),or=Object(g.a)(Tr,2),wn=or[0],hr=or[1];function pa(){hr(Date.now())}function Ya(){window.clearTimeout(xr.current)}gt(Hr,function(kn,Tn){var yi=!1;function Hi(Ma,ma){Ma(function(Ga){var Ea=na(Ga+ma),bi=Object(g.a)(Ea,2),Qa=bi[0],fo=bi[1];return yi=fo,Qa})}if(Fr){if(On>=Gn)return yi;Hi(xn,kn)}else{if(sa>=ai)return yi;Hi(Cn,Tn)}return Ya(),pa(),yi}),Object(m.useEffect)(function(){return Ya(),wn&&(xr.current=window.setTimeout(function(){hr(0)},100)),Ya},[wn]);function jn(){var kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ze,Tn=Ca.get(kn);if(!Tn)return;if(Fr){var yi=wr;Ze?Tn.right<wr?yi=Tn.right:Tn.right+Tn.width>wr+On&&(yi=Tn.right+Tn.width-On):Tn.left<-wr?yi=-Tn.left:Tn.left+Tn.width>-wr+On&&(yi=-(Tn.left+Tn.width-On)),Cn(0),xn(na(yi)[0])}else{var Hi=Ln;Tn.top<-Ln?Hi=-Tn.top:Tn.top+Tn.height>-Ln+sa&&(Hi=-(Tn.top+Tn.height-sa)),xn(0),Cn(na(Hi)[0])}}var Oa=x(Ca,{width:On,height:sa,left:wr,top:Ln},{width:Bn,height:An},{width:La,height:ua},Object(M.a)(Object(M.a)({},Pe),{},{tabs:De})),Io=Object(g.a)(Oa,2),Jo=Io[0],Qo=Io[1],Zo=De.map(function(kn){var Tn=kn.key;return m.createElement(s,{id:Ge,prefixCls:be,key:Tn,rtl:Ze,tab:kn,closable:kn.closable,editable:kt,active:Tn===ze,tabPosition:Yt,tabBarGutter:kr,renderWrapper:Jr,removeAriaLabel:jt==null?void 0:jt.removeAriaLabel,ref:fn(Tn),onClick:function(Hi){$r(Tn,Hi)},onRemove:function(){Mr(Tn)},onFocus:function(){jn(Tn),pa(),Ze||(Hr.current.scrollLeft=0),Hr.current.scrollTop=0}})}),ho=a(function(){var kn,Tn,yi,Hi,Ma,ma,Ga,Ea,bi,Qa=((kn=Hr.current)===null||kn===void 0?void 0:kn.offsetWidth)||0,fo=((Tn=Hr.current)===null||Tn===void 0?void 0:Tn.offsetHeight)||0,po=((yi=yn.current)===null||yi===void 0?void 0:yi.offsetWidth)||0,Wi=((Hi=yn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Rn=((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;ti(Qa),la(fo),Ha(po),Sa(Wi);var ga=(((Ga=rn.current)===null||Ga===void 0?void 0:Ga.offsetWidth)||0)-po,va=(((Ea=rn.current)===null||Ea===void 0?void 0:Ea.offsetHeight)||0)-Wi;fi(ga),Pn(va);var mo=(bi=nn.current)===null||bi===void 0?void 0:bi.className.includes(da);ei(ga-(mo?0:Rn)),Fi(va-(mo?0:aa)),_a(function(){var Za=new Map;return De.forEach(function(Mo){var No=Mo.key,Ra=fn(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),si=[].concat(Object(d.a)(qo),Object(d.a)(Bi)),Ri=Object(m.useState)(),li=Object(g.a)(Ri,2),Wa=li[0],es=li[1],ia=Ca.get(ze),Do=Object(m.useRef)();function ko(){c.a.cancel(Do.current)}Object(m.useEffect)(function(){var kn={};return ia&&(Fr?(Ze?kn.right=ia.right:kn.left=ia.left,kn.width=ia.width):(kn.top=ia.top,kn.height=ia.height)),ko(),Do.current=c()(function(){es(kn)}),ko},[ia,Fr,Ze]),Object(m.useEffect)(function(){jn()},[ze,ia,Ca,Fr]),Object(m.useEffect)(function(){ho()},[Ze,kr,ze,De.map(function(kn){return kn.key}).join("_")]);var Lo=!!si.length,Aa="".concat(be,"-nav-wrap"),$a,za,Po,Ja;return Fr?Ze?(za=wr>0,$a=wr+On<Gn):($a=wr<0,za=-wr+On<Gn):(Po=Ln<0,Ja=-Ln+sa<ai),m.createElement("div",{ref:Ve,role:"tablist",className:T()("".concat(be,"-nav"),we),style:je,onKeyDown:function(){pa()}},m.createElement(Mt,{position:"left",extra:pt,prefixCls:be}),m.createElement(r.a,{onResize:ho},m.createElement("div",{className:T()(Aa,(Qe={},Object(N.a)(Qe,"".concat(Aa,"-ping-left"),$a),Object(N.a)(Qe,"".concat(Aa,"-ping-right"),za),Object(N.a)(Qe,"".concat(Aa,"-ping-top"),Po),Object(N.a)(Qe,"".concat(Aa,"-ping-bottom"),Ja),Qe)),ref:Hr},m.createElement(r.a,{onResize:ho},m.createElement("div",{ref:rn,className:"".concat(be,"-nav-list"),style:{transform:"translate(".concat(wr,"px, ").concat(Ln,"px)"),transition:wn?"none":void 0}},Zo,m.createElement(ln,{ref:yn,prefixCls:be,locale:jt,editable:kt,style:{visibility:Lo?"hidden":null}}),m.createElement("div",{className:T()("".concat(be,"-ink-bar"),Object(N.a)({},"".concat(be,"-ink-bar-animated"),Xe.inkBar)),style:Wa}))))),m.createElement(mr,Object.assign({},Pe,{ref:nn,prefixCls:be,tabs:si,className:!Lo&&da})),m.createElement(Mt,{position:"right",extra:pt,prefixCls:be}))}var on=m.forwardRef(Dr);function un(Pe){var Ve=Pe.id,Qe=Pe.activeKey,Fe=Pe.animated,be=Pe.tabPosition,De=Pe.rtl,we=Pe.destroyInactiveTabPane,je=m.useContext(Ir),Ge=je.prefixCls,Xe=je.tabs,ze=Fe.tabPane,Ze=Xe.findIndex(function(pt){return pt.key===Qe});return m.createElement("div",{className:T()("".concat(Ge,"-content-holder"))},m.createElement("div",{className:T()("".concat(Ge,"-content"),"".concat(Ge,"-content-").concat(be),Object(N.a)({},"".concat(Ge,"-content-animated"),ze)),style:Ze&&ze?Object(N.a)({},De?"marginRight":"marginLeft","-".concat(Ze,"00%")):null},Xe.map(function(pt){return m.cloneElement(pt.node,{key:pt.key,prefixCls:Ge,tabKey:pt.key,id:Ve,animated:ze,active:pt.key===Qe,destroyInactiveTabPane:we})})))}function Cr(Pe){var Ve=Pe.prefixCls,Qe=Pe.forceRender,Fe=Pe.className,be=Pe.style,De=Pe.id,we=Pe.active,je=Pe.animated,Ge=Pe.destroyInactiveTabPane,Xe=Pe.tabKey,ze=Pe.children,Ze=m.useState(Qe),pt=Object(g.a)(Ze,2),kt=pt[0],jt=pt[1];m.useEffect(function(){we?jt(!0):Ge&&jt(!1)},[we,Ge]);var Yt={};return we||(je?(Yt.visibility="hidden",Yt.height=0,Yt.overflowY="hidden"):Yt.display="none"),m.createElement("div",{id:De&&"".concat(De,"-panel-").concat(Xe),role:"tabpanel",tabIndex:we?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat(Xe),"aria-hidden":!we,style:Object(M.a)(Object(M.a)({},Yt),be),className:T()("".concat(Ve,"-tabpane"),we&&"".concat(Ve,"-tabpane-active"),Fe)},(we||kt||Qe)&&ze)}var tn=0;function jr(Pe){return Object(b.a)(Pe).map(function(Ve){if(m.isValidElement(Ve)){var Qe=Ve.key!==void 0?String(Ve.key):void 0;return Object(M.a)(Object(M.a)({key:Qe},Ve.props),{},{node:Ve})}return null}).filter(function(Ve){return Ve})}function pn(Pe,Ve){var Qe,Fe=Pe.id,be=Pe.prefixCls,De=be===void 0?"rc-tabs":be,we=Pe.className,je=Pe.children,Ge=Pe.direction,Xe=Pe.activeKey,ze=Pe.defaultActiveKey,Ze=Pe.editable,pt=Pe.animated,kt=Pe.tabPosition,jt=kt===void 0?"top":kt,Yt=Pe.tabBarGutter,kr=Pe.tabBarStyle,Jr=Pe.tabBarExtraContent,$r=Pe.locale,Zr=Pe.moreIcon,Hr=Pe.moreTransitionName,rn=Pe.destroyInactiveTabPane,nn=Pe.renderTabBar,yn=Pe.onChange,cn=Pe.onTabClick,In=Pe.onTabScroll,fn=Object(O.a)(Pe,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Mr=jr(je),Fr=Ge==="rtl",sn;pt===!1?sn={inkBar:!1,tabPane:!1}:sn=Object(M.a)({inkBar:!0,tabPane:!1},pt!==!0?pt:null);var gn=Object(m.useState)(!1),wr=Object(g.a)(gn,2),xn=wr[0],zn=wr[1];Object(m.useEffect)(function(){zn(tr())},[]);var Sn=Object(p.a)(function(){var An;return(An=Mr[0])===null||An===void 0?void 0:An.key},{value:Xe,defaultValue:ze}),Ln=Object(g.a)(Sn,2),Cn=Ln[0],Jn=Ln[1],ii=Object(m.useState)(function(){return Mr.findIndex(function(An){return An.key===Cn})}),Gn=Object(g.a)(ii,2),fi=Gn[0],Xi=Gn[1];Object(m.useEffect)(function(){var An=Mr.findIndex(function(Ui){return Ui.key===Cn});if(An===-1){var Fi;An=Math.max(0,Math.min(fi,Mr.length-1)),Jn((Fi=Mr[An])===null||Fi===void 0?void 0:Fi.key)}Xi(An)},[Mr.map(function(An){return An.key}).join("_"),Cn,fi]);var Si=Object(p.a)(null,{value:Fe}),ai=Object(g.a)(Si,2),Pn=ai[0],Mn=ai[1],Kn=jt;xn&&!["left","right"].includes(jt)&&(Kn="top"),Object(m.useEffect)(function(){Fe||(Mn("rc-tabs-".concat(tn)),tn+=1)},[]);function Bn(An,Fi){cn==null||cn(An,Fi),Jn(An),yn==null||yn(An)}var ei={id:Pn,activeKey:Cn,animated:sn,tabPosition:Kn,rtl:Fr,mobile:xn},Ai,ra=Object(M.a)(Object(M.a)({},ei),{},{editable:Ze,locale:$r,moreIcon:Zr,moreTransitionName:Hr,tabBarGutter:Yt,onTabClick:Bn,onTabScroll:In,extra:Jr,style:kr,panes:je});return nn?Ai=nn(ra,on):Ai=m.createElement(on,Object.assign({},ra)),m.createElement(Ir.Provider,{value:{tabs:Mr,prefixCls:De}},m.createElement("div",Object.assign({ref:Ve,id:Fe,className:T()(De,"".concat(De,"-").concat(Kn),(Qe={},Object(N.a)(Qe,"".concat(De,"-mobile"),xn),Object(N.a)(Qe,"".concat(De,"-editable"),Ze),Object(N.a)(Qe,"".concat(De,"-rtl"),Fr),Qe),we)},fn),Ai,m.createElement(un,Object.assign({destroyInactiveTabPane:rn},ei,{animated:sn}))))}var Xr=m.forwardRef(pn);Xr.TabPane=Cr;var mn=Xr,Xn=q.b=mn},kSUc:function(F,q,j){},lPiR:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.WordArray,y=M.Hasher,T=O.algo,b=[],p=[];(function(){function c(u){for(var h=g.sqrt(u),s=2;s<=h;s++)if(!(u%s))return!1;return!0}function r(u){return(u-(u|0))*4294967296|0}for(var a=2,o=0;o<64;)c(a)&&(o<8&&(b[o]=r(g.pow(a,1/2))),p[o]=r(g.pow(a,1/3)),o++),a++})();var d=[],n=T.SHA256=y.extend({_doReset:function(){this._hash=new m.init(b.slice(0))},_doProcessBlock:function(c,r){for(var a=this._hash.words,o=a[0],u=a[1],h=a[2],s=a[3],l=a[4],t=a[5],S=a[6],x=a[7],f=0;f<64;f++){if(f<16)d[f]=c[r+f]|0;else{var R=d[f-15],C=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,v=d[f-2],_=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;d[f]=C+d[f-7]+_+d[f-16]}var E=l&t^~l&S,w=o&u^o&h^u&h,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),I=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),L=x+I+E+p[f]+d[f],V=k+w;x=S,S=t,t=l,l=s+L|0,s=h,h=u,u=o,o=L+V|0}a[0]=a[0]+o|0,a[1]=a[1]+u|0,a[2]=a[2]+h|0,a[3]=a[3]+s|0,a[4]=a[4]+l|0,a[5]=a[5]+t|0,a[6]=a[6]+S|0,a[7]=a[7]+x|0},_doFinalize:function(){var c=this._data,r=c.words,a=this._nDataBytes*8,o=c.sigBytes*8;return r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=g.floor(a/4294967296),r[(o+64>>>9<<4)+15]=a,c.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var c=y.clone.call(this);return c._hash=this._hash.clone(),c}});O.SHA256=y._createHelper(n),O.HmacSHA256=y._createHmacHelper(n)}(Math),N.SHA256})},lZu9:function(F,q,j){(function(N){N(j("VrN/"),j("1eCo"),j("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(g,O){var M=N.getMode(g,"text/html"),m=M.name=="null";function y(B){if(N.findModeByName){var P=N.findModeByName(B);P&&(B=P.mime||P.mimes[0])}var z=N.getMode(g,B);return z.name=="null"?null:z}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.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 b in T)T.hasOwnProperty(b)&&O.tokenTypeOverrides[b]&&(T[b]=O.tokenTypeOverrides[b]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,c=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,a=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,u=/^\s*\[[^\]]+?\]:.*$/,h=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,s=" ";function l(B,P,z){return P.f=P.inline=z,z(B,P)}function t(B,P,z){return P.f=P.block=z,z(B,P)}function S(B){return!B||!/\S/.test(B.string)}function x(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==R){var P=m;if(!P){var z=N.innerMode(M,B.htmlState);P=z.mode.name=="xml"&&z.state.tagStart===null&&!z.state.context&&z.state.tokenize.isInText}P&&(B.f=E,B.block=f,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function f(B,P){var z=B.column()===P.indentation,J=S(P.prevLine.stream),ue=P.indentedCode,de=P.prevLine.hr,Se=P.list!==!1,Ae=(P.listStack[P.listStack.length-1]||0)+3;P.indentedCode=!1;var pe=P.indentation;if(P.indentationDiff===null&&(P.indentationDiff=P.indentation,Se)){for(P.list=null;pe<P.listStack[P.listStack.length-1];)P.listStack.pop(),P.listStack.length?P.indentation=P.listStack[P.listStack.length-1]:P.list=!1;P.list!==!1&&(P.indentationDiff=pe-P.listStack[P.listStack.length-1])}var Oe=!J&&!de&&!P.prevLine.header&&(!Se||!ue)&&!P.prevLine.fencedCodeEnd,ye=(P.list===!1||de||J)&&P.indentation<=Ae&&B.match(p),ce=null;if(P.indentationDiff>=4&&(ue||P.prevLine.fencedCodeEnd||P.prevLine.header||J))return B.skipToEnd(),P.indentedCode=!0,T.code;if(B.eatSpace())return null;if(z&&P.indentation<=Ae&&(ce=B.match(c))&&ce[1].length<=6)return P.quote=0,P.header=ce[1].length,P.thisLine.header=!0,O.highlightFormatting&&(P.formatting="header"),P.f=P.inline,v(P);if(P.indentation<=Ae&&B.eat(">"))return P.quote=z?1:P.quote+1,O.highlightFormatting&&(P.formatting="quote"),B.eatSpace(),v(P);if(!ye&&!P.setext&&z&&P.indentation<=Ae&&(ce=B.match(d))){var ae=ce[1]?"ol":"ul";return P.indentation=pe+B.current().length,P.list=!0,P.quote=0,P.listStack.push(P.indentation),P.em=!1,P.strong=!1,P.code=!1,P.strikethrough=!1,O.taskLists&&B.match(n,!1)&&(P.taskList=!0),P.f=P.inline,O.highlightFormatting&&(P.formatting=["list","list-"+ae]),v(P)}else{if(z&&P.indentation<=Ae&&(ce=B.match(o,!0)))return P.quote=0,P.fencedEndRE=new RegExp(ce[1]+"+ *$"),P.localMode=O.fencedCodeBlockHighlighting&&y(ce[2]||O.fencedCodeBlockDefaultMode),P.localMode&&(P.localState=N.startState(P.localMode)),P.f=P.block=C,O.highlightFormatting&&(P.formatting="code-block"),P.code=-1,v(P);if(P.setext||(!Oe||!Se)&&!P.quote&&P.list===!1&&!P.code&&!ye&&!u.test(B.string)&&(ce=B.lookAhead(1))&&(ce=ce.match(r)))return P.setext?(P.header=P.setext,P.setext=0,B.skipToEnd(),O.highlightFormatting&&(P.formatting="header")):(P.header=ce[0].charAt(0)=="="?1:2,P.setext=P.header),P.thisLine.header=!0,P.f=P.inline,v(P);if(ye)return B.skipToEnd(),P.hr=!0,P.thisLine.hr=!0,T.hr;if(B.peek()==="[")return l(B,P,V)}return l(B,P,P.inline)}function R(B,P){var z=M.token(B,P.htmlState);if(!m){var J=N.innerMode(M,P.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||P.md_inside&&B.current().indexOf(">")>-1)&&(P.f=E,P.block=f,P.htmlState=null)}return z}function C(B,P){var z=P.listStack[P.listStack.length-1]||0,J=P.indentation<z,ue=z+3;if(P.fencedEndRE&&P.indentation<=ue&&(J||B.match(P.fencedEndRE))){O.highlightFormatting&&(P.formatting="code-block");var de;return J||(de=v(P)),P.localMode=P.localState=null,P.block=f,P.f=E,P.fencedEndRE=null,P.code=0,P.thisLine.fencedCodeEnd=!0,J?t(B,P,P.block):de}else return P.localMode?P.localMode.token(B,P.localState):(B.skipToEnd(),T.code)}function v(B){var P=[];if(B.formatting){P.push(T.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var z=0;z<B.formatting.length;z++)P.push(T.formatting+"-"+B.formatting[z]),B.formatting[z]==="header"&&P.push(T.formatting+"-"+B.formatting[z]+"-"+B.header),B.formatting[z]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=B.quote?P.push(T.formatting+"-"+B.formatting[z]+"-"+B.quote):P.push("error"))}if(B.taskOpen)return P.push("meta"),P.length?P.join(" "):null;if(B.taskClosed)return P.push("property"),P.length?P.join(" "):null;if(B.linkHref?P.push(T.linkHref,"url"):(B.strong&&P.push(T.strong),B.em&&P.push(T.em),B.strikethrough&&P.push(T.strikethrough),B.emoji&&P.push(T.emoji),B.linkText&&P.push(T.linkText),B.code&&P.push(T.code),B.image&&P.push(T.image),B.imageAltText&&P.push(T.imageAltText,"link"),B.imageMarker&&P.push(T.imageMarker)),B.header&&P.push(T.header,T.header+"-"+B.header),B.quote&&(P.push(T.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=B.quote?P.push(T.quote+"-"+B.quote):P.push(T.quote+"-"+O.maxBlockquoteDepth)),B.list!==!1){var J=(B.listStack.length-1)%3;J?J===1?P.push(T.list2):P.push(T.list3):P.push(T.list1)}return B.trailingSpaceNewLine?P.push("trailing-space-new-line"):B.trailingSpace&&P.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),P.length?P.join(" "):null}function _(B,P){return B.match(a,!0)?v(P):void 0}function E(B,P){var z=P.text(B,P);if(typeof z!="undefined")return z;if(P.list)return P.list=null,v(P);if(P.taskList){var J=B.match(n,!0)[1]===" ";return J?P.taskOpen=!0:P.taskClosed=!0,O.highlightFormatting&&(P.formatting="task"),P.taskList=!1,v(P)}if(P.taskOpen=!1,P.taskClosed=!1,P.header&&B.match(/^#+$/,!0))return O.highlightFormatting&&(P.formatting="header"),v(P);var ue=B.next();if(P.linkTitle){P.linkTitle=!1;var de=ue;ue==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Se="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(B.match(new RegExp(Se),!0))return T.linkHref}if(ue==="`"){var Ae=P.formatting;O.highlightFormatting&&(P.formatting="code"),B.eatWhile("`");var pe=B.current().length;if(P.code==0&&(!P.quote||pe==1))return P.code=pe,v(P);if(pe==P.code){var Oe=v(P);return P.code=0,Oe}else return P.formatting=Ae,v(P)}else if(P.code)return v(P);if(ue==="\\"&&(B.next(),O.highlightFormatting)){var ye=v(P),ce=T.formatting+"-escape";return ye?ye+" "+ce:ce}if(ue==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return P.imageMarker=!0,P.image=!0,O.highlightFormatting&&(P.formatting="image"),v(P);if(ue==="["&&P.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return P.imageMarker=!1,P.imageAltText=!0,O.highlightFormatting&&(P.formatting="image"),v(P);if(ue==="]"&&P.imageAltText){O.highlightFormatting&&(P.formatting="image");var ye=v(P);return P.imageAltText=!1,P.image=!1,P.inline=P.f=k,ye}if(ue==="["&&!P.image)return P.linkText&&B.match(/^.*?\]/)||(P.linkText=!0,O.highlightFormatting&&(P.formatting="link")),v(P);if(ue==="]"&&P.linkText){O.highlightFormatting&&(P.formatting="link");var ye=v(P);return P.linkText=!1,P.inline=P.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?k:E,ye}if(ue==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=w,O.highlightFormatting&&(P.formatting="link");var ye=v(P);return ye?ye+=" ":ye="",ye+T.linkInline}if(ue==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=w,O.highlightFormatting&&(P.formatting="link");var ye=v(P);return ye?ye+=" ":ye="",ye+T.linkEmail}if(O.xml&&ue==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=B.string.indexOf(">",B.pos);if(ae!=-1){var re=B.string.substring(B.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(P.md_inside=!0)}return B.backUp(1),P.htmlState=N.startState(M),t(B,P,R)}if(O.xml&&ue==="<"&&B.match(/^\/\w*?>/))return P.md_inside=!1,"tag";if(ue==="*"||ue==="_"){for(var fe=1,te=B.pos==1?" ":B.string.charAt(B.pos-2);fe<3&&B.eat(ue);)fe++;var ne=B.peek()||" ",Te=!/\s/.test(ne)&&(!h.test(ne)||/\s/.test(te)||h.test(te)),ie=!/\s/.test(te)&&(!h.test(te)||/\s/.test(ne)||h.test(ne)),Z=null,X=null;if(fe%2&&(!P.em&&Te&&(ue==="*"||!ie||h.test(te))?Z=!0:P.em==ue&&ie&&(ue==="*"||!Te||h.test(ne))&&(Z=!1)),fe>1&&(!P.strong&&Te&&(ue==="*"||!ie||h.test(te))?X=!0:P.strong==ue&&ie&&(ue==="*"||!Te||h.test(ne))&&(X=!1)),X!=null||Z!=null){O.highlightFormatting&&(P.formatting=Z==null?"strong":X==null?"em":"strong em"),Z===!0&&(P.em=ue),X===!0&&(P.strong=ue);var Oe=v(P);return Z===!1&&(P.em=!1),X===!1&&(P.strong=!1),Oe}}else if(ue===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return v(P);B.backUp(1)}if(O.strikethrough){if(ue==="~"&&B.eatWhile(ue)){if(P.strikethrough){O.highlightFormatting&&(P.formatting="strikethrough");var Oe=v(P);return P.strikethrough=!1,Oe}else if(B.match(/^[^\s]/,!1))return P.strikethrough=!0,O.highlightFormatting&&(P.formatting="strikethrough"),v(P)}else if(ue===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return v(P);B.backUp(2)}}if(O.emoji&&ue===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){P.emoji=!0,O.highlightFormatting&&(P.formatting="emoji");var Q=v(P);return P.emoji=!1,Q}return ue===" "&&(B.match(/^ +$/,!1)?P.trailingSpace++:P.trailingSpace&&(P.trailingSpaceNewLine=!0)),v(P)}function w(B,P){var z=B.next();if(z===">"){P.f=P.inline=E,O.highlightFormatting&&(P.formatting="link");var J=v(P);return J?J+=" ":J="",J+T.linkInline}return B.match(/^[^>]+/,!0),T.linkInline}function k(B,P){if(B.eatSpace())return null;var z=B.next();return z==="("||z==="["?(P.f=P.inline=L(z==="("?")":"]"),O.highlightFormatting&&(P.formatting="link-string"),P.linkHref=!0,v(P)):"error"}var I={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(B){return function(P,z){var J=P.next();if(J===B){z.f=z.inline=E,O.highlightFormatting&&(z.formatting="link-string");var ue=v(z);return z.linkHref=!1,ue}return P.match(I[B]),z.linkHref=!0,v(z)}}function V(B,P){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(P.f=W,B.next(),O.highlightFormatting&&(P.formatting="link"),P.linkText=!0,v(P)):l(B,P,E)}function W(B,P){if(B.match(/^\]:/,!0)){P.f=P.inline=H,O.highlightFormatting&&(P.formatting="link");var z=v(P);return P.linkText=!1,z}return B.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function H(B,P){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?P.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),P.f=P.inline=E,T.linkHref+" url")}var G={startState:function(){return{f,prevLine:{stream:null},thisLine:{stream:null},block:f,htmlState:null,indentation:0,inline:E,text:_,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(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&N.copyState(M,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?N.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,P){if(P.formatting=!1,B!=P.thisLine.stream){if(P.header=0,P.hr=!1,B.match(/^\s*$/,!0))return x(P),null;if(P.prevLine=P.thisLine,P.thisLine={stream:B},P.taskList=!1,P.trailingSpace=0,P.trailingSpaceNewLine=!1,!P.localState&&(P.f=P.block,P.f!=R)){var z=B.match(/^\s*/,!0)[0].replace(/\t/g,s).length;if(P.indentation=z,P.indentationDiff=null,z>0)return null}}return P.f(B,P)},innerMode:function(B){return B.block==R?{state:B.htmlState,mode:M}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:G}},indent:function(B,P,z){return B.block==R&&M.indent?M.indent(B.htmlState,P,z):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,P,z):N.Pass},blankLine:x,getType:v,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(F){if(!0)module.exports=F();else var q})(function(){var define,module,exports;return function(){function F(q,j,N){function g(m,y){if(!j[m]){if(!q[m]){var T=typeof require=="function"&&require;if(!y&&T)return require(m,!0);if(O)return O(m,!0);var b=new Error("Cannot find module '"+m+"'");throw b.code="MODULE_NOT_FOUND",b}var p=j[m]={exports:{}};q[m][0].call(p.exports,function(d){var n=q[m][1][d];return g(n||d)},p,p.exports,F,q,j,N)}return j[m].exports}for(var O=typeof require=="function"&&require,M=0;M<N.length;M++)g(N[M]);return g}return F}()({1:[function(F,q,j){"use strict";var N=F("./browser/client");N.Buffer=F("buffer").Buffer,N.urllib=F("../shims/xhr"),N.version=F("./browser/version").version,q.exports=N},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(F,q,j){(function(N,g){"use strict";var O=F("babel-runtime/core-js/promise"),M=p(O),m=F("babel-runtime/regenerator"),y=p(m),T=F("babel-runtime/core-js/object/assign"),b=p(T);function p(V){return V&&V.__esModule?V:{default:V}}var d=F("debug")("ali-oss"),n=F("copy-to"),c=F("xml2js"),r=F("agentkeepalive"),a=F("merge-descriptors"),o=F("url"),u=F("is-type-of"),h=F("platform"),s=F("utility"),l=F("urllib"),t=F("./version"),S=F("bowser"),x=F("../common/signUtils"),f=F("../common/utils/isIP"),R=f.isIP,C=F("../common/client/initOptions"),v=F("../common/utils/createRequest"),_=v.createRequest,E=new r;function w(){var V=h.name,W=h.version;V&&V.toLowerCase&&V.toLowerCase()==="ie"&&W.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function k(){return location&&location.protocol==="https:"}function I(V,W){if(w(),!(this instanceof I))return new I(V,W);V&&V.inited?this.options=V:this.options=I.initOptions(V),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=l,this.agent=this.options.agent||E),this.ctx=W,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}q.exports=I,I.initOptions=function(W){W.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var H=(0,b.default)({secure:k(),useFetch:!1},W);return C(H)};var L=I.prototype;L.debug=d,a(L,F("./object")),a(L,F("../common/bucket/getBucketWebsite")),a(L,F("../common/bucket/putBucketWebsite")),a(L,F("../common/bucket/deleteBucketWebsite")),a(L,F("../common/bucket/getBucketLifecycle")),a(L,F("../common/bucket/putBucketLifecycle")),a(L,F("../common/bucket/deleteBucketLifecycle")),a(L,F("../common/bucket/putBucketVersioning")),a(L,F("../common/bucket/getBucketVersioning")),a(L,F("./managed-upload")),a(L,F("../common/multipart")),a(L,F("../common/parallel")),L.signature=function(W){return this.debug("authorization stringToSign: %s",W,"info"),x.computeSignature(this.options.accessKeySecret,W)},L.authorization=function(W,H,G,B){var P=x.buildCanonicalString(W.toUpperCase(),H,{headers:B,parameters:G});return x.authorization(this.options.accessKeyId,this.options.accessKeySecret,P)},L.request=function(W){var H,G,B,P,z,J;return y.default.async(function(de){for(;;)switch(de.prev=de.next){case 0:return H=_.call(this,W),this.options.useFetch||(H.params.mode="disable-fetch"),G=void 0,B=void 0,P=!!W.stream,de.prev=5,de.next=8,y.default.awrap(this.urllib.request(H.url,H.params));case 8:G=de.sent,this.debug("response %s %s, got %s, headers: %j",W.method,H.url,G.status,G.headers,"info"),de.next=15;break;case 12:de.prev=12,de.t0=de.catch(5),B=de.t0;case 15:if(z=void 0,!(G&&W.successStatuses&&W.successStatuses.indexOf(G.status)===-1)){de.next=28;break}return de.next=19,y.default.awrap(this.requestError(G));case 19:if(z=de.sent,!(z.code==="RequestTimeTooSkewed"&&!P)){de.next=25;break}return this.options.amendTimeSkewed=+new Date(z.serverTime)-new Date,de.next=24,y.default.awrap(this.request(W));case 24:return de.abrupt("return",de.sent);case 25:z.params=W,de.next=32;break;case 28:if(!B){de.next=32;break}return de.next=31,y.default.awrap(this.requestError(B));case 31:z=de.sent;case 32:if(!z){de.next=34;break}throw z;case 34:if(!W.xmlResponse){de.next=39;break}return de.next=37,y.default.awrap(this.parseXML(G.data));case 37:J=de.sent,G.data=J;case 39:return de.abrupt("return",G);case 40:case"end":return de.stop()}},null,this,[[5,12]])},L._getResource=function(W){var H="/";return W.bucket&&(H+=W.bucket+"/"),W.object&&(H+=W.object),H},L._isIP=R,L._escape=function(W){return s.encodeURIComponent(W).replace(/%2F/g,"/")},L._getReqUrl=function(W){var H={};n(this.options.endpoint).to(H);var G=this._isIP(H.hostname),B=this.options.cname;W.bucket&&!B&&!G&&(H.host=W.bucket+"."+H.host);var P="/";W.bucket&&G&&(P+=W.bucket+"/"),W.object&&(P+=this._escape(W.object).replace(/\+/g,"%2B")),H.pathname=P;var z={};if(W.query&&a(z,W.query),W.subres){var J={};u.string(W.subres)?J[W.subres]="":u.array(W.subres)?W.subres.forEach(function(ue){J[ue]=""}):J=W.subres,a(z,J)}return H.query=z,o.format(H)},L._getUserAgent=function(){var W=g&&g.browser?"js":"nodejs",H="aliyun-sdk-"+W+"/"+t.version,G=h.description;return!G&&g&&(G="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(H+" "+G)},L._checkUserAgent=function(W){var H=W.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return H},L.checkBrowserAndVersion=function(W,H){return S.name===W&&S.version.split(".")[0]===H},L.parseXML=function(W){return new M.default(function(H,G){N.isBuffer(W)&&(W=W.toString()),c.parseString(W,{explicitRoot:!1,explicitArray:!1},function(B,P){B?G(B):H(P)})})},L.requestError=function(W){var H,G,B,P;return y.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(H=null,!(!W.data||!W.data.length)){J.next=5;break}W.status===-1||W.status===-2?(H=new Error(W.message),H.name=W.name,H.status=W.status,H.code=W.name):(W.status===404?(H=new Error("Object not exists"),H.name="NoSuchKeyError",H.status=404,H.code="NoSuchKey"):W.status===412?(H=new Error("Pre condition failed"),H.name="PreconditionFailedError",H.status=412,H.code="PreconditionFailed"):(H=new Error("Unknow error, status: "+W.status),H.name="UnknowError",H.status=W.status),H.requestId=W.headers["x-oss-request-id"],H.host=""),J.next=33;break;case 5:return G=String(W.data),this.debug("request response error data: %s",G,"error"),B=void 0,J.prev=8,J.next=11,y.default.awrap(this.parseXML(G));case 11:if(J.t0=J.sent,J.t0){J.next=14;break}J.t0={};case 14:B=J.t0,J.next=24;break;case 17:return J.prev=17,J.t1=J.catch(8),this.debug(G,"error"),J.t1.message+=`
raw xml: `+G,J.t1.status=W.status,J.t1.requestId=W.headers["x-oss-request-id"],J.abrupt("return",J.t1);case 24:P=B.Message||"unknow request error, status: "+W.status,B.Condition&&(P+=" (condition: "+B.Condition+")"),H=new Error(P),H.name=B.Code?B.Code+"Error":"UnknowError",H.status=W.status,H.code=B.Code,H.requestId=B.RequestId,H.hostId=B.HostId,H.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",H,"error"),J.abrupt("return",H);case 35:case"end":return J.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:F("../../node_modules/is-buffer/index.js")},F("_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(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/array/from"),O=b(g),M=F("babel-runtime/core-js/promise"),m=b(M),y=F("babel-runtime/regenerator"),T=b(y);function b(x){return x&&x.__esModule?x:{default:x}}var p=F("is-type-of"),d=F("util"),n=F("path"),c=F("mime"),r=F("copy-to"),a=F("../common/utils/isBlob"),o=a.isBlob,u=F("../common/utils/isFile"),h=u.isFile,s=j;s.multipartUpload=function(f,R,C){var v,_,E,w,k,I,L,V,W;return T.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(this.resetCancelFlag(),C=C||{},!(C.checkpoint&&C.checkpoint.uploadId)){G.next=6;break}return G.next=5,T.default.awrap(this._resumeMultipart(C.checkpoint,C));case 5:return G.abrupt("return",G.sent);case 6:return v=100*1024,C.mime||(h(R)?C.mime=c.getType(n.extname(R.name)):o(R)?C.mime=R.type:C.mime=c.getType(n.extname(R))),C.headers=C.headers||{},this._convertMetaToHeaders(C.meta,C.headers),G.next=12,T.default.awrap(this._getFileSize(R));case 12:if(_=G.sent,!(_<v)){G.next=25;break}return E=this._createStream(R,0,_),C.contentLength=_,G.next=18,T.default.awrap(this.putStream(f,E,C));case 18:if(w=G.sent,!(C&&C.progress)){G.next=22;break}return G.next=22,T.default.awrap(C.progress(1));case 22:return k={res:w.res,bucket:this.options.bucket,name:f,etag:w.res.headers.etag},(C.headers&&C.headers["x-oss-callback"]||C.callback)&&(k.data=w.data),G.abrupt("return",k);case 25:if(!(C.partSize&&!(parseInt(C.partSize,10)===C.partSize))){G.next=27;break}throw new Error("partSize must be int number");case 27:if(!(C.partSize&&C.partSize<v)){G.next=29;break}throw new Error("partSize must not be smaller than "+v);case 29:return G.next=31,T.default.awrap(this.initMultipartUpload(f,C));case 31:if(I=G.sent,L=I.uploadId,V=this._getPartSize(_,C.partSize),W={file:R,name:f,fileSize:_,partSize:V,uploadId:L,doneParts:[]},!(C&&C.progress)){G.next=38;break}return G.next=38,T.default.awrap(C.progress(0,W,I.res));case 38:return G.next=40,T.default.awrap(this._resumeMultipart(W,C));case 40:return G.abrupt("return",G.sent);case 41:case"end":return G.stop()}},null,this)},s._resumeMultipart=function(f,R){var C,v,_,E,w,k,I,L,V,W,H,G,B,P,z,J,ue,de;return T.default.async(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(C=this,!this.isCancel()){Ae.next=3;break}throw this._makeCancelEvent();case 3:return v=f.file,_=f.fileSize,E=f.partSize,w=f.uploadId,k=f.doneParts,I=f.name,L=[],k.length>0&&r(k).to(L),V=this._divideParts(_,E),W=V.length,H=!1,G=function(Oe,ye){var ce=this;return new m.default(function(re,fe){var te,ne,Te,ie;return T.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Oe.isCancel()){X.next=18;break}return te=V[ye-1],ne={stream:Oe._createStream(v,te.start,te.end),size:te.end-te.start},X.next=6,T.default.awrap(Oe._uploadPart(I,w,ye,ne));case 6:if(Te=X.sent,!(!Oe.isCancel()&&!H)){X.next=15;break}if(f.doneParts.push({number:ye,etag:Te.res.headers.etag}),!R.progress){X.next=12;break}return X.next=12,T.default.awrap(R.progress(k.length/W,f,Te.res));case 12:re({number:ye,etag:Te.res.headers.etag}),X.next=16;break;case 15:re();case 16:X.next=19;break;case 18:re();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ie=new Error,ie.name=X.t0.name,ie.message=X.t0.message,ie.stack=X.t0.stack,ie.partNum=ye,r(X.t0).to(ie),fe(ie);case 30:case"end":return X.stop()}},null,ce,[[0,21]])})},B=(0,O.default)(new Array(W),function(pe,Oe){return Oe+1}),P=L.map(function(pe){return pe.number}),z=B.filter(function(pe){return P.indexOf(pe)<0}),J=5,ue=R.parallel||J,Ae.next=17,T.default.awrap(this._parallel(z,ue,function(pe){return new m.default(function(Oe,ye){G(C,pe).then(function(ce){ce&&L.push(ce),Oe()}).catch(function(ce){ye(ce)})})}));case 17:if(de=Ae.sent,H=!0,!this.isCancel()){Ae.next=22;break}throw G=null,this._makeCancelEvent();case 22:if(!(de&&de.length>0)){Ae.next=25;break}throw de[0].message="Failed to upload some parts with error: "+de[0].toString()+" part_num: "+de[0].partNum,de[0];case 25:return Ae.next=27,T.default.awrap(this.completeMultipartUpload(I,w,L,R));case 27:return Ae.abrupt("return",Ae.sent);case 28:case"end":return Ae.stop()}},null,this)},s._getFileSize=function(f){return T.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!p.buffer(f)){C.next=4;break}return C.abrupt("return",f.length);case 4:if(!(o(f)||h(f))){C.next=6;break}return C.abrupt("return",f.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var l=F("stream"),t=l.Readable;function S(x,f){if(!(this instanceof S))return new S(x,f);t.call(this,f),this.file=x,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(S,t),S.prototype.readFileAndPush=function(f){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var C=this.start,v=C+f;v=v>this.fileBuffer.length?this.fileBuffer.length:v,this.start=v,R=this.push(this.fileBuffer.slice(C,v))}},S.prototype._read=function(f){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var R=16*1024;f=f||R;var C=this;this.reader.onload=function(_){C.fileBuffer=N.from(new Uint8Array(_.target.result)),C.file=null,C.readFileAndPush(f)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(f)},s._createStream=function(f,R,C){if(o(f)||h(f))return new S(f.slice(R,C));throw new Error("_createStream requires File/Blob.")},s._getPartSize=function(f,R){var C=10*1e3,v=1024*1024;return R?Math.max(Math.ceil(f/C),R):v},s._divideParts=function(f,R){for(var C=Math.ceil(f/R),v=[],_=0;_<C;_++){var E=R*_,w=Math.min(E+R,f);v.push({start:E,end:w})}return v}}).call(this,F("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(F,q,j){"use strict";var N=F("babel-runtime/core-js/promise"),g=p(N),O=F("babel-runtime/core-js/object/keys"),M=p(O),m=F("babel-runtime/core-js/object/assign"),y=p(m),T=F("babel-runtime/regenerator"),b=p(T);function p(C){return C&&C.__esModule?C:{default:C}}var d=F("utility"),n=F("fs"),c=F("is-type-of"),r=F("url"),a=F("copy-to"),o=F("path"),u=F("mime"),h=F("../common/callback"),s=F("../common/signUtils"),l=F("merge-descriptors"),t=F("../common/utils/isBlob"),S=t.isBlob,x=F("../common/utils/isFile"),f=x.isFile,R=j;R.append=function(v,_,E){var w;return b.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return E=E||{},E.position===void 0&&(E.position="0"),E.subres={append:"",position:E.position},E.method="POST",I.next=6,b.default.awrap(this.put(v,_,E));case 6:return w=I.sent,w.nextAppendPosition=w.res.headers["x-oss-next-append-position"],I.abrupt("return",w);case 9:case"end":return I.stop()}},null,this)},R.put=function(v,_,E){var w,k,I,L,V,W,H;return b.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(w=void 0,E=E||{},v=this._objectName(v),!c.buffer(_)){B.next=7;break}w=_,B.next=33;break;case 7:if(!(S(_)||f(_))){B.next=32;break}return E.mime||(f(_)?E.mime=u.getType(o.extname(_.name)):E.mime=_.type),k=this._createStream(_,0,_.size),B.next=12,b.default.awrap(this._getFileSize(_));case 12:return E.contentLength=B.sent,B.prev=13,B.next=16,b.default.awrap(this.putStream(v,k,E));case 16:return I=B.sent,B.abrupt("return",I);case 20:if(B.prev=20,B.t0=B.catch(13),!(B.t0.code==="RequestTimeTooSkewed")){B.next=29;break}return this.options.amendTimeSkewed=+new Date(B.t0.serverTime)-new Date,B.next=26,b.default.awrap(this.put(v,_,E));case 26:return B.abrupt("return",B.sent);case 29:throw B.t0;case 30:B.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return E.headers=E.headers||{},this._convertMetaToHeaders(E.meta,E.headers),L=E.method||"PUT",V=this._objectRequestParams(L,v,E),h.encodeCallback(V,E),V.mime=E.mime,V.content=w,V.successStatuses=[200],B.next=43,b.default.awrap(this.request(V));case 43:return W=B.sent,H={name:v,url:this._objectUrl(v),res:W.res},V.headers&&V.headers["x-oss-callback"]&&(H.data=JSON.parse(W.data.toString())),B.abrupt("return",H);case 47:case"end":return B.stop()}},null,this,[[13,20]])},R.putStream=function(v,_,E){var w,k,I,L;return b.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:return E=E||{},E.headers=E.headers||{},v=this._objectName(v),E.contentLength?E.headers["Content-Length"]=E.contentLength:E.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(E.meta,E.headers),w=E.method||"PUT",k=this._objectRequestParams(w,v,E),h.encodeCallback(k,E),k.mime=E.mime,k.stream=_,k.successStatuses=[200],W.next=13,b.default.awrap(this.request(k));case 13:return I=W.sent,L={name:v,url:this._objectUrl(v),res:I.res},k.headers&&k.headers["x-oss-callback"]&&(L.data=JSON.parse(I.data.toString())),W.abrupt("return",L);case 17:case"end":return W.stop()}},null,this)},l(R,F("../common/object/copyObject")),l(R,F("../common/object/getObjectTagging")),l(R,F("../common/object/putObjectTagging")),l(R,F("../common/object/deleteObjectTagging")),l(R,F("../common/image")),l(R,F("../common/object/getBucketVersions")),l(R,F("../common/object/getACL")),l(R,F("../common/object/putACL")),l(R,F("../common/object/head")),l(R,F("../common/object/delete")),l(R,F("../common/object/get")),l(R,F("../common/object/putSymlink")),l(R,F("../common/object/getSymlink")),l(R,F("../common/object/deleteMulti")),l(R,F("../common/object/getObjectMeta")),R.putMeta=function(v,_,E){var w;return b.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,b.default.awrap(this.copy(v,v,{meta:_||{},timeout:E&&E.timeout,ctx:E&&E.ctx}));case 2:return w=I.sent,I.abrupt("return",w);case 4:case"end":return I.stop()}},null,this)},R.list=function(v,_){var E,w,k,I,L;return b.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:return E=this._objectRequestParams("GET","",_),E.query=v,E.xmlResponse=!0,E.successStatuses=[200],W.next=6,b.default.awrap(this.request(E));case 6:return w=W.sent,k=w.data.Contents,I=this,k&&(Array.isArray(k)||(k=[k]),k=k.map(function(H){return{name:H.Key,url:I._objectUrl(H.Key),lastModified:H.LastModified,etag:H.ETag,type:H.Type,size:Number(H.Size),storageClass:H.StorageClass,owner:{id:H.Owner.ID,displayName:H.Owner.DisplayName}}})),L=w.data.CommonPrefixes||null,L&&(Array.isArray(L)||(L=[L]),L=L.map(function(H){return H.Prefix})),W.abrupt("return",{res:w.res,objects:k,prefixes:L,nextMarker:w.data.NextMarker||null,isTruncated:w.data.IsTruncated==="true"});case 13:case"end":return W.stop()}},null,this)},R.restore=function(v,_){var E,w;return b.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return _=_||{},_.subres=(0,y.default)({restore:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),E=this._objectRequestParams("POST",v,_),E.successStatuses=[202],I.next=7,b.default.awrap(this.request(E));case 7:return w=I.sent,I.abrupt("return",{res:w.res});case 9:case"end":return I.stop()}},null,this)},R.signatureUrl=function(v,_){_=_||{},v=this._objectName(v),_.method=_.method||"GET";var E=d.timestamp()+(_.expires||1800),w={bucket:this.options.bucket,object:v},k=this._getResource(w);this.options.stsToken&&(_["security-token"]=this.options.stsToken);var I=s._signatureForURL(this.options.accessKeySecret,_,k,E),L=r.parse(this._getReqUrl(w));return L.query={OSSAccessKeyId:this.options.accessKeyId,Expires:E,Signature:I.Signature},a(I.subResource).to(L.query),L.format()},R.getObjectUrl=function(v,_){return _?_[_.length-1]!=="/"&&(_+="/"):_=this.options.endpoint.format(),_+this._escape(this._objectName(v))},R._objectUrl=function(v){return this._getReqUrl({bucket:this.options.bucket,object:v})},R.generateObjectUrl=function(C,v){if(v)v[v.length-1]!=="/"&&(v+="/");else{v=this.options.endpoint.format();var _=r.parse(v),E=this.options.bucket;_.hostname=E+"."+_.hostname,_.host=E+"."+_.host,v=_.format()}return v+this._escape(this._objectName(C))},R._objectRequestParams=function(v,_,E){if(!this.options.bucket)throw new Error("Please create a bucket first");E=E||{},_=this._objectName(_);var w={object:_,bucket:this.options.bucket,method:v,subres:E&&E.subres,timeout:E&&E.timeout,ctx:E&&E.ctx};return E.headers&&(w.headers={},a(E.headers).to(w.headers)),w},R._objectName=function(v){return v.replace(/^\/+/,"")},R._convertMetaToHeaders=function(v,_){if(!v)return;(0,M.default)(v).forEach(function(E){_["x-oss-meta-"+E]=v[E]})},R._deleteFileSafe=function(v){var _=this;return new g.default(function(E){n.exists(v,function(w){w?n.unlink(v,function(k){k&&_.debug("unlink %j error: %s",v,k,"error"),E()}):E()})})}},{"../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(F,q,j){"use strict";j.version="6.10.0"},{}],6:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(T){return T&&T.__esModule?T:{default:T}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=j;y.deleteBucketLifecycle=function(b,p){var d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return m(b),d=this._bucketRequestParams("DELETE",b,"lifecycle",p),d.successStatuses=[204],r.next=5,g.default.awrap(this.request(d));case 5:return n=r.sent,r.abrupt("return",{res:n.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(T){return T&&T.__esModule?T:{default:T}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=j;y.deleteBucketWebsite=function(b,p){var d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return m(b),d=this._bucketRequestParams("DELETE",b,"website",p),d.successStatuses=[204],r.next=5,g.default.awrap(this.request(d));case 5:return n=r.sent,r.abrupt("return",{res:n.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/isArray"),T=y.isArray,b=F("../utils/formatObjKey"),p=b.formatObjKey,d=j;d.getBucketLifecycle=function(c,r){var a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return m(c),a=this._bucketRequestParams("GET",c,"lifecycle",r),a.successStatuses=[200],a.xmlResponse=!0,s.next=6,g.default.awrap(this.request(a));case 6:return o=s.sent,u=o.data.Rule||null,u&&(T(u)||(u=[u]),u=u.map(function(l){return l.ID&&(l.id=l.ID,delete l.ID),l.Tag&&!T(l.Tag)&&(l.Tag=[l.Tag]),p(l,"firstLowerCase")})),s.abrupt("return",{rules:u,res:o.res});case 10:case"end":return s.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(T){return T&&T.__esModule?T:{default:T}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=j;y.getBucketVersioning=function(b,p){var d,n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return m(b),d=this._bucketRequestParams("GET",b,"versioning",p),d.xmlResponse=!0,d.successStatuses=[200],a.next=6,g.default.awrap(this.request(d));case 6:return n=a.sent,c=n.data.Status,a.abrupt("return",{status:n.status,versionStatus:c,res:n.res});case 9:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/isObject"),T=y.isObject,b=j;b.getBucketWebsite=function(d,n){var c,r,a;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return m(d),c=this._bucketRequestParams("GET",d,"website",n),c.successStatuses=[200],c.xmlResponse=!0,u.next=6,g.default.awrap(this.request(c));case 6:return r=u.sent,a=[],r.data.RoutingRules&&r.data.RoutingRules.RoutingRule&&(T(r.data.RoutingRules.RoutingRule)?a=[r.data.RoutingRules.RoutingRule]:a=r.data.RoutingRules.RoutingRule),u.abrupt("return",{index:r.data.IndexDocument&&r.data.IndexDocument.Suffix||"",supportSubDir:r.data.IndexDocument&&r.data.IndexDocument.SupportSubDir||"false",type:r.data.IndexDocument&&r.data.IndexDocument.Type,routingRules:a,error:r.data.ErrorDocument&&r.data.ErrorDocument.Key||null,res:r.res});case 10:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(f){return f&&f.__esModule?f:{default:f}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/isArray"),T=y.isArray,b=F("../utils/deepCopy"),p=b.deepCopy,d=F("../utils/isObject"),n=d.isObject,c=F("../utils/obj2xml"),r=c.obj2xml,a=F("../utils/checkObjectTag"),o=a.checkObjectTag,u=F("../utils/getStrBytesCount"),h=u.getStrBytesCount,s=j;s.putBucketLifecycle=function(R,C,v){var _,E,w,k,I;return g.default.async(function(V){for(;;)switch(V.prev=V.next){case 0:if(m(R),T(C)){V.next=3;break}throw new Error("rules must be Array");case 3:return _=this._bucketRequestParams("PUT",R,"lifecycle",v),E=[],w={LifecycleConfiguration:{Rule:E}},C.forEach(function(W){l(W),x(W),W.id&&(W.ID=W.id,delete W.id),E.push(W)}),k=r(w,{headers:!0,firstUpperCase:!0}),_.content=k,_.mime="xml",_.successStatuses=[200],V.next=13,g.default.awrap(this.request(_));case 13:return I=V.sent,V.abrupt("return",{res:I.res});case 15:case"end":return V.stop()}},null,this)};function l(f){f.days&&(f.expiration={days:f.days}),f.date&&(f.expiration={createdBeforeDate:f.date})}function t(f,R){var C=f.days,v=f.createdBeforeDate;if(!C&&!v)throw new Error(R+" must includes days or createdBeforeDate");if(C&&!/^[1-9][0-9]*$/.test(C))throw new Error("days must be a positive integer");if(v&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(v))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function S(f){if(!T(f)&&!n(f))throw new Error("tag must be Object or Array");f=n(f)?[f]:f;var R={},C=p(f);C.forEach(function(v){R[v.key]=v.value}),o(R)}function x(f){if(f.id&&h(f.id)>255)throw new Error("ID is composed of 255 bytes at most");if(f.prefix===""||f.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(f.status))throw new Error("Status must be Enabled or Disabled");if(f.transition){if(!["IA","Archive"].includes(f.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(f.transition,"Transition")}if(f.expiration){if(!f.expiration.expiredObjectDeleteMarker)t(f.expiration,"Expiration");else if(f.expiration.days||f.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(f.abortMultipartUpload&&t(f.abortMultipartUpload,"AbortMultipartUpload"),!f.expiration&&!f.abortMultipartUpload&&!f.transition&&!f.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(f.tag){if(f.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(f.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/obj2xml"),T=y.obj2xml,b=j;b.putBucketVersioning=function(d,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,o;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:if(m(d),["Enabled","Suspended"].includes(n)){h.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",d,"versioning",c),a={VersioningConfiguration:{Status:n}},r.mime="xml",r.content=T(a,{headers:!0}),h.next=9,g.default.awrap(this.request(r));case 9:return o=h.sent,h.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/obj2xml"),T=y.obj2xml,b=F("../utils/isArray"),p=b.isArray,d=j;d.putBucketWebsite=function(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments[2],o,u,h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(m(c),o=this._bucketRequestParams("PUT",c,"website",a),u={Suffix:r.index||"index.html"},h={IndexDocument:u},s={WebsiteConfiguration:h},r.supportSubDir&&(u.SupportSubDir=r.supportSubDir),r.type&&(u.Type=r.type),r.error&&(h.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){S.next=12;break}if(p(r.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:h.RoutingRules={RoutingRule:r.routingRules};case 12:return s=T(s),o.content=s,o.mime="xml",o.successStatuses=[200],S.next=18,g.default.awrap(this.request(o));case 18:return l=S.sent,S.abrupt("return",{res:l.res});case 20:case"end":return S.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/object/keys"),O=y(g),M=F("babel-runtime/core-js/json/stringify"),m=y(M);function y(T){return T&&T.__esModule?T:{default:T}}j.encodeCallback=function(b,p){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&p.callback){var d={callbackUrl:encodeURI(p.callback.url),callbackBody:p.callback.body};p.callback.host&&(d.callbackHost=p.callback.host),p.callback.contentType&&(d.callbackBodyType=p.callback.contentType);var n=N.from((0,m.default)(d)).toString("base64");if(b.headers["x-oss-callback"]=n,p.callback.customValue){var c={};(0,O.default)(p.callback.customValue).forEach(function(r){c["x:"+r]=p.callback.customValue[r]}),b.headers["x-oss-callback-var"]=N.from((0,m.default)(c)).toString("base64")}}}}).call(this,F("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/assign"),g=O(N);function O(d){return d&&d.__esModule?d:{default:d}}var M=F("humanize-ms"),m=F("url"),y=F("../utils/checkBucketName"),T=y.checkBucketName;function b(d,n){var c=m.parse(d);if(c.protocol||(c=m.parse("http"+(n?"s":"")+"://"+d)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function p(d,n,c){var r=c?"https://":"http://",a=n?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return d.substr(0,o.length)===o&&(a=".aliyuncs.com"),m.parse(r+d+a)}q.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&T(d.bucket);var n=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=M(n.timeout)),n.endpoint)n.endpoint=b(n.endpoint,n.secure);else if(n.region)n.endpoint=p(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(F,q,j){"use strict";var N=F("merge-descriptors"),g=j;N(g,F("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("querystring"),T=F("js-base64"),b=T.Base64.encode,p=j;p.processObjectSave=function(c,r,a,o){var u,h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return d(c,"sourceObject"),d(r,"targetObject"),d(a,"process"),r=this._objectName(r),o&&m(o),u=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),h=o?",b_"+b(o):"",r=b(r),s={"x-oss-process":a+"|sys/saveas,o_"+r+h},u.content=y.stringify(s),S.next=12,g.default.awrap(this.request(u));case 12:return l=S.sent,S.abrupt("return",{res:l.res,status:l.res.status});case 14:case"end":return S.stop()}},null,this)};function d(n,c){if(!n)throw new Error(c+" is required");if(typeof n!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("copy-to"),m=F("./callback"),y=F("./utils/deepCopy"),T=y.deepCopy,b=j;b.listUploads=function(d,n){var c,r,a,o;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return n=n||{},c={},M(n).to(c),c.subres="uploads",r=this._objectRequestParams("GET","",c),r.query=d,r.xmlResponse=!0,r.successStatuses=[200],h.next=10,g.default.awrap(this.request(r));case 10:return a=h.sent,o=a.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(s){return{name:s.Key,uploadId:s.UploadId,initiated:s.Initiated}}),h.abrupt("return",{res:a.res,uploads:o,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:a.data.IsTruncated==="true"});case 15:case"end":return h.stop()}},null,this)},b.listParts=function(d,n,c,r){var a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return r=r||{},a={},M(r).to(a),a.subres={uploadId:n},o=this._objectRequestParams("GET",d,a),o.query=c,o.xmlResponse=!0,o.successStatuses=[200],s.next=10,g.default.awrap(this.request(o));case 10:return u=s.sent,s.abrupt("return",{res:u.res,uploadId:u.data.UploadId,bucket:u.data.Bucket,name:u.data.Key,partNumberMarker:u.data.PartNumberMarker,nextPartNumberMarker:u.data.NextPartNumberMarker,maxParts:u.data.MaxParts,isTruncated:u.data.IsTruncated,parts:u.data.Part||[]});case 12:case"end":return s.stop()}},null,this)},b.abortMultipartUpload=function(d,n,c){var r,a,o;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return this._stop(),c=c||{},r={},M(c).to(r),r.subres={uploadId:n},a=this._objectRequestParams("DELETE",d,r),a.successStatuses=[204],h.next=9,g.default.awrap(this.request(a));case 9:return o=h.sent,h.abrupt("return",{res:o.res});case 11:case"end":return h.stop()}},null,this)},b.initMultipartUpload=function(d,n){var c,r,a;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return n=n||{},c={},M(n).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(n.meta,c.headers),c.subres="uploads",r=this._objectRequestParams("POST",d,c),r.mime=n.mime,r.xmlResponse=!0,r.successStatuses=[200],u.next=12,g.default.awrap(this.request(r));case 12:return a=u.sent,u.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return u.stop()}},null,this)},b.uploadPart=function(d,n,c,r,a,o,u){var h;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return h={stream:this._createStream(r,a,o),size:o-a},l.next=3,g.default.awrap(this._uploadPart(d,n,c,h,u));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},b.completeMultipartUpload=function(d,n,c,r){var a,o,u,h,s,l,t,S;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:for(a=c.concat().sort(function(R,C){return R.number-C.number}).filter(function(R,C,v){return!C||R.number!==v[C-1].number}),o=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,u=0;u<a.length;u++)h=a[u],o+=`<Part>
`,o+="<PartNumber>"+h.number+`</PartNumber>
`,o+="<ETag>"+h.etag+`</ETag>
`,o+=`</Part>
`;return o+="</CompleteMultipartUpload>",r=r||{},s={},s=T(r),s.headers&&delete s.headers["x-oss-server-side-encryption"],s.subres={uploadId:n},l=this._objectRequestParams("POST",d,s),m.encodeCallback(l,s),l.mime="xml",l.content=o,l.headers&&l.headers["x-oss-callback"]||(l.xmlResponse=!0),l.successStatuses=[200],f.next=17,g.default.awrap(this.request(l));case 17:return t=f.sent,S={res:t.res,bucket:l.bucket,name:d,etag:t.res.headers.etag},l.headers&&l.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),f.abrupt("return",S);case 21:case"end":return f.stop()}},null,this)},b._uploadPart=function(d,n,c,r,a){var o,u,h;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a=a||{},o={},M(a).to(o),o.headers={"Content-Length":r.size},o.subres={partNumber:c,uploadId:n},u=this._objectRequestParams("PUT",d,o),u.mime=o.mime,u.stream=r.stream,u.successStatuses=[200],l.next=11,g.default.awrap(this.request(u));case 11:if(h=l.sent,h.res.headers.etag){l.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 r.stream=null,u.stream=null,l.abrupt("return",{name:d,etag:h.res.headers.etag,res:h.res});case 17:case"end":return l.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=T(N),O=F("babel-runtime/core-js/object/keys"),M=T(O),m=F("babel-runtime/helpers/typeof"),y=T(m);function T(n){return n&&n.__esModule?n:{default:n}}var b=F("../utils/checkBucketName"),p=b.checkBucketName,d=j;d.copy=function(c,r,a,o){var u,h,s;return g.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof a=="undefined"?"undefined":(0,y.default)(a))==="object"&&(o=a),o=o||{},o.headers=o.headers||{},(0,M.default)(o.headers).forEach(function(S){o.headers["x-oss-copy-source-"+S.toLowerCase()]=o.headers[S]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),r=this._getSourceName(r,a),o.versionId&&(r=r+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=r,u=this._objectRequestParams("PUT",c,o),u.xmlResponse=!0,u.successStatuses=[200,304],t.next=14,g.default.awrap(this.request(u));case 14:return h=t.sent,s=h.data,s&&(s={etag:s.ETag,lastModified:s.LastModified}),t.abrupt("return",{data:s,res:h.res});case 18:case"end":return t.stop()}},null,this)},d._getSourceName=function(c,r){return typeof r=="string"?c=this._objectName(c):c[0]!=="/"?r=this.options.bucket:(r=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),p(r),c=encodeURI(c),c="/"+r+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.delete=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=6,g.default.awrap(this.request(d));case 6:return n=r.sent,r.abrupt("return",{res:n.res});case 8:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(d){return d&&d.__esModule?d:{default:d}}var y=F("utility"),T=F("../utils/obj2xml"),b=T.obj2xml,p=j;p.deleteMulti=function(n){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,a,o,u,h,s,l,t,S,x,f,R;return g.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:if(r=[],!(!n||!n.length)){v.next=3;break}throw new Error("names is required");case 3:for(a=0;a<n.length;a++)o={},typeof n[a]=="string"?o.Key=y.escape(this._objectName(n[a])):(u=n[a],h=u.key,s=u.versionId,o.Key=y.escape(this._objectName(h)),o.VersionId=s),r.push(o);return l={Delete:{Quiet:!!c.quiet,Object:r}},t=b(l,{headers:!0}),c.subres=(0,M.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),S=this._objectRequestParams("POST","",c),S.mime="xml",S.content=t,S.xmlResponse=!0,S.successStatuses=[200],v.next=15,g.default.awrap(this.request(S));case 15:return x=v.sent,f=x.data,R=f&&f.Deleted||null,R&&(Array.isArray(R)||(R=[R])),v.abrupt("return",{res:x.res,deleted:R||[]});case 20:case"end":return v.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.deleteObjectTagging=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({tagging:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=7,g.default.awrap(this.request(d));case 7:return n=r.sent,r.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(p){return p&&p.__esModule?p:{default:p}}var y=F("fs"),T=F("is-type-of"),b=j;b.get=function(d,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return r=null,a=!1,T.writableStream(n)?r=n:T.string(n)?(r=y.createWriteStream(n),a=!0):c=n,c=c||{},c.subres=(0,M.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),o=void 0,s.prev=8,u=this._objectRequestParams("GET",d,c),u.writeStream=r,u.successStatuses=[200,206,304],s.next=14,g.default.awrap(this.request(u));case 14:o=s.sent,a&&r.destroy(),s.next=25;break;case 18:if(s.prev=18,s.t0=s.catch(8),!a){s.next=24;break}return r.destroy(),s.next=24,g.default.awrap(this._deleteFileSafe(n));case 24:throw s.t0;case 25:return s.abrupt("return",{res:o.res,content:o.data});case 26:case"end":return s.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.getACL=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({acl:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],d.xmlResponse=!0,r.next=8,g.default.awrap(this.request(d));case 8:return n=r.sent,r.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),g=T(N),O=F("babel-runtime/regenerator"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(u){return u&&u.__esModule?u:{default:u}}var b=j,p=F("../utils/isObject"),d=p.isObject,n=F("../utils/isArray"),c=n.isArray;b.getBucketVersions=r,b.listObjectVersions=r;function r(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,t,S,x,f;return M.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!(u.versionIdMarker&&u.keyMarker===void 0)){C.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return h.subres=(0,y.default)({versions:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),s=this._objectRequestParams("GET","",h),s.xmlResponse=!0,s.successStatuses=[200],s.query=o(u),C.next=10,M.default.awrap(this.request(s));case 10:return l=C.sent,t=l.data.Version||[],S=l.data.DeleteMarker||[],x=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(v){return{name:v.Key,url:x._objectUrl(v.Key),lastModified:v.LastModified,isLatest:v.IsLatest==="true",versionId:v.VersionId,etag:v.ETag,type:v.Type,size:Number(v.Size),storageClass:v.StorageClass,owner:{id:v.Owner.ID,displayName:v.Owner.DisplayName}}})),S&&(c(S)||(S=[S]),S=S.map(function(v){return{name:v.Key,lastModified:v.LastModified,versionId:v.VersionId,owner:{id:v.Owner.ID,displayName:v.Owner.DisplayName}}})),f=l.data.CommonPrefixes||null,f&&(c(f)||(f=[f]),f=f.map(function(v){return v.Prefix})),C.abrupt("return",{res:l.res,objects:t,deleteMarker:S,prefixes:f,nextMarker:l.data.NextMarker||null,NextVersionIdMarker:l.data.NextVersionIdMarker||null,isTruncated:l.data.IsTruncated==="true"});case 19:case"end":return C.stop()}},null,this)}function a(u){return u.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h={};return d(u)&&(0,g.default)(u).forEach(function(s){h[a(s)]=u[s]}),h}},{"../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(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.getObjectMeta=function(b,p){var d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p=p||{},b=this._objectName(b),p.subres=(0,M.default)({objectMeta:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("HEAD",b,p),d.successStatuses=[200],r.next=8,g.default.awrap(this.request(d));case 8:return n=r.sent,r.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(p){return p&&p.__esModule?p:{default:p}}var y=j,T=F("../utils/isObject"),b=T.isObject;y.getObjectTagging=function(d){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,r,a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n.subres=(0,M.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),d=this._objectName(d),c=this._objectRequestParams("GET",d,n),c.successStatuses=[200],s.next=7,g.default.awrap(this.request(c));case 7:return r=s.sent,s.next=10,g.default.awrap(this.parseXML(r.data));case 10:return a=s.sent,o=a.TagSet.Tag,o=o&&b(o)?[o]:o||[],u={},o.forEach(function(l){u[l.Key]=l.Value}),s.abrupt("return",{status:r.status,res:r.res,tag:u});case 16:case"end":return s.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.getSymlink=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return p.subres=(0,M.default)({symlink:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],a.next=7,g.default.awrap(this.request(d));case 7:return n=a.sent,c=n.res.headers["x-oss-symlink-target"],a.abrupt("return",{targetName:decodeURIComponent(c),res:n.res});case 10:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=T(N),O=F("babel-runtime/core-js/object/keys"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(p){return p&&p.__esModule?p:{default:p}}var b=j;b.head=function(d){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,r,a;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return n.subres=(0,y.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),c=this._objectRequestParams("HEAD",d,n),c.successStatuses=[200,304],u.next=6,g.default.awrap(this.request(c));case 6:return r=u.sent,a={meta:null,res:r.res,status:r.status},r.status===200&&(0,M.default)(r.headers).forEach(function(h){h.indexOf("x-oss-meta-")===0&&(a.meta||(a.meta={}),a.meta[h.substring(11)]=r.headers[h])}),u.abrupt("return",a);case 10:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.putACL=function(b,p,d){var n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return d=d||{},d.subres=(0,M.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.headers=d.headers||{},d.headers["x-oss-object-acl"]=p,b=this._objectName(b),n=this._objectRequestParams("PUT",b,d),n.successStatuses=[200],a.next=10,g.default.awrap(this.request(n));case 10:return c=a.sent,a.abrupt("return",{res:c.res});case 12:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=T(N),O=F("babel-runtime/core-js/object/keys"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(r){return r&&r.__esModule?r:{default:r}}var b=F("../utils/obj2xml"),p=b.obj2xml,d=F("../utils/checkObjectTag"),n=d.checkObjectTag,c=j;c.putObjectTagging=function(a,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return n(o),u.subres=(0,y.default)({tagging:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),a=this._objectName(a),h=this._objectRequestParams("PUT",a,u),h.successStatuses=[200],o=(0,M.default)(o).map(function(x){return{Key:x,Value:o[x]}}),s={Tagging:{TagSet:{Tag:o}}},h.mime="xml",h.content=p(s),S.next=12,g.default.awrap(this.request(h));case 12:return l=S.sent,S.abrupt("return",{res:l.res,status:l.status});case 14:case"end":return S.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(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.putSymlink=function(b,p,d){var n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return d=d||{},d.headers=d.headers||{},p=this._escape(this._objectName(p)),this._convertMetaToHeaders(d.meta,d.headers),d.headers["x-oss-symlink-target"]=p,d.subres=(0,M.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.storageClass&&(d.headers["x-oss-storage-class"]=d.storageClass),b=this._objectName(b),n=this._objectRequestParams("PUT",b,d),n.successStatuses=[200],a.next=13,g.default.awrap(this.request(n));case 13:return c=a.sent,a.abrupt("return",{res:c.res});case 15:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=m(N),O=F("babel-runtime/core-js/promise"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y._parallelNode=function(b,p,d,n){var c,r,a,o,u,h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:c=this,r=[],a=[],o=b.length/p,u=b.length%p,h=u===0?o:(b.length-u)/p+1,s=1,l=0;case 8:if(!(l<b.length)){S.next=26;break}if(!c.isCancel()){S.next=11;break}return S.abrupt("break",26);case 11:if(n?a.push(d(c,b[l],n)):a.push(d(c,b[l])),!(a.length===p||s===h&&l===b.length-1)){S.next=23;break}return S.prev=13,s+=1,S.next=17,g.default.awrap(M.default.all(a));case 17:S.next=22;break;case 19:S.prev=19,S.t0=S.catch(13),r.push(S.t0);case 22:a=[];case 23:l++,S.next=8;break;case 26:return S.abrupt("return",r);case 27:case"end":return S.stop()}},null,this,[[13,19]])},y._parallel=function(b,p,d){var n=this;return new M.default(function(c){var r=[];if(p<=0||!b){c(r);return}function a(f){return function(){if(f===null)throw new Error("Callback was already called.");var R=f;f=null;for(var C=arguments.length,v=Array(C),_=0;_<C;_++)v[_]=arguments[_];R.apply(this,v)}}function o(f){var R=-1,C=f.length;return function(){return++R<C&&!n.isCancel()?{value:f[R],key:R}:null}}var u=o(b),h=!1,s=0,l=!1;function t(f,R){s-=1,f?(h=!0,r.push(f),c(r)):R==={}||h&&s<=0?(h=!0,c(r)):l||(n.isCancel()?c(r):x())}function S(f,R){d(f).then(function(C){R(null,C)}).catch(function(C){R(C)})}function x(){for(l=!0;s<p&&!h&&!n.isCancel();){var f=u();if(f===null||r.length>0){h=!0,s<=0&&c(r);return}s+=1,S(f.value,a(t))}l=!1}x()})},y.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},y.isCancel=function(){return this.options.cancelFlag},y.resetCancelFlag=function(){this.options.cancelFlag=!1},y._stop=function(){this.options.cancelFlag=!0},y._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/json/stringify"),O=y(g),M=F("babel-runtime/core-js/object/keys"),m=y(M);function y(p){return p&&p.__esModule?p:{default:p}}var T=F("./../../shims/crypto/crypto.js"),b=F("is-type-of");j.buildCanonicalizedResource=function(d,n){var c=""+d,r="?";if(b.string(n)&&n.trim()!=="")c+=r+n;else if(b.array(n))n.sort(),c+=r+n.join("&");else if(n){var a=function(h,s){return h[0]>s[0]?1:h[0]<s[0]?-1:0},o=function(h){c+=r+h,n[h]&&(c+="="+n[h]),r="&"};(0,m.default)(n).sort(a).forEach(o)}return c},j.buildCanonicalString=function(d,n,c,r){c=c||{};var a=c.headers||{},o="x-oss-",u=[],h={},s=[d.toUpperCase(),a["Content-Md5"]||"",a["Content-Type"]||a["Content-Type".toLowerCase()],r||a["x-oss-date"]];return(0,m.default)(a).forEach(function(l){var t=l.toLowerCase();t.indexOf(o)===0&&(h[t]=String(a[l]).trim())}),(0,m.default)(h).sort().forEach(function(l){u.push(l+":"+h[l])}),s=s.concat(u),s.push(this.buildCanonicalizedResource(n,c.parameters)),s.join(`
`)},j.computeSignature=function(d,n){var c=T.createHmac("sha1",d);return c.update(N.from(n,"utf8")).digest("base64")},j.authorization=function(d,n,c){return"OSS "+d+":"+this.computeSignature(n,c)},j._signatureForURL=function(d){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],r=arguments[3],a={},o=n.subResource,u=o===void 0?{}:o;if(n.process){var h="x-oss-process";u[h]=n.process}if(n.trafficLimit){var s="x-oss-traffic-limit";u[s]=n.trafficLimit}if(n.response&&(0,m.default)(n.response).forEach(function(x){var f="response-"+x.toLowerCase();u[f]=n.response[x]}),(0,m.default)(n).forEach(function(x){var f=x.toLowerCase(),R=n[x];f.indexOf("x-oss-")===0?a[f]=R:(f.indexOf("content-md5")===0||f.indexOf("content-type")===0)&&(a[x]=R)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(u["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var l={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(l.callbackHost=n.callback.host),n.callback.contentType&&(l.callbackBodyType=n.callback.contentType),u.callback=N.from((0,O.default)(l)).toString("base64"),n.callback.customValue){var t={};(0,m.default)(n.callback.customValue).forEach(function(x){t["x:"+x]=n.callback.customValue[x]}),u["callback-var"]=N.from((0,O.default)(t)).toString("base64")}}var S=this.buildCanonicalString(n.method,c,{headers:a,parameters:u},r.toString());return{Signature:this.computeSignature(d,S),subResource:u}}}).call(this,F("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(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkBucketName=void 0,j.checkBucketName=function(N,g){var O=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!O.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/entries"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var M=F("./checkValid"),m=M.checkValid,y=F("./isObject"),T=y.isObject,b=[{validator:function(c){if(typeof c!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],p={key:[].concat(b,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(b,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function d(n){if(!T(n))throw new Error("tag must be Object");var c=(0,g.default)(n);if(c.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];c.forEach(function(a){a.forEach(function(o,u){m(o,p[r[u]])})})}j.checkObjectTag=d},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkValid=void 0;function N(g,O){O.forEach(function(M){if(M.validator)M.validator(g);else if(M.pattern&&!M.pattern.test(g))throw new Error(M.msg)})}j.checkValid=N},{}],38:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/object/assign"),O=M(g);function M(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var m=F("./../../../shims/crypto/crypto.js"),y=F("debug")("ali-oss"),T=F("mime"),b=F("dateformat"),p=F("copy-to"),d=F("path");function n(a,o){return a[o]||a[o.toLowerCase()]}function c(a,o){delete a[o],delete a[o.toLowerCase()]}function r(a){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var u={"x-oss-date":b(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(u["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,O.default)(u,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(u["x-oss-security-token"]=this.options.stsToken),p(a.headers).to(u),n(u,"Content-Type")||(a.mime&&a.mime.indexOf("/")>0?u["Content-Type"]=a.mime:u["Content-Type"]=T.getType(a.mime||d.extname(a.object||""))),n(u,"Content-Type")||c(u,"Content-Type"),a.content&&(u["Content-Md5"]=m.createHash("md5").update(N.from(a.content,"utf8")).digest("base64"),u["Content-Length"]||(u["Content-Length"]=a.content.length));var h=this._getResource(a);u.authorization=this.authorization(a.method,h,a.subres,u);var s=this._getReqUrl(a);y("request %s %s, with headers %j, !!stream: %s",a.method,s,u,!!a.stream);var l=a.timeout||this.options.timeout,t={method:a.method,content:a.content,stream:a.stream,headers:u,timeout:l,writeStream:a.writeStream,customResponse:a.customResponse,ctx:a.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:s,params:t}}j.createRequest=r}).call(this,F("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(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),g=m(N),O=F("babel-runtime/helpers/typeof"),M=m(O);function m(y){return y&&y.__esModule?y:{default:y}}Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopy=void 0,j.deepCopy=function(y){if(y===null||(typeof y=="undefined"?"undefined":(0,M.default)(y))!=="object")return y;var T=Array.isArray(y)?[]:{};return(0,g.default)(y).forEach(function(b){T[b]=j.deepCopy(y[b])}),T}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),g=m(N),O=F("babel-runtime/helpers/typeof"),M=m(O);function m(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function y(b,p){if(b===null||(typeof b=="undefined"?"undefined":(0,M.default)(b))!=="object")return b;var d=void 0;if(Array.isArray(b)){d=[];for(var n=0;n<b.length;n++)d.push(y(b[n],p))}else d={},(0,g.default)(b).forEach(function(c){d[T(c,p)]=y(b[c],p)});return d}j.formatObjKey=y;function T(b,p){return p==="firstUpperCase"?b=b.replace(/^./,function(d){return d.toUpperCase()}):p==="firstLowerCase"&&(b=b.replace(/^./,function(d){return d.toLowerCase()})),b}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.getStrBytesCount=void 0;function N(g){for(var O=0,M=0;M<g.length;M++){var m=g.charAt(M);/^[\u00-\uff]$/.test(m)?O+=1:O+=2}return O}j.getStrBytesCount=N},{}],42:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isArray=void 0,j.isArray=function(N){return Object.prototype.toString.call(N)==="[object Array]"}},{}],43:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isBlob=void 0;function N(g){return typeof Blob!="undefined"&&g instanceof Blob}j.isBlob=N},{}],44:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isFile=void 0,j.isFile=function(N){return typeof File!="undefined"&&N instanceof File}},{}],45:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isIP=void 0,j.isIP=function(N){var g=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,O=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return g.test(N)||O.test(N)}},{}],46:[function(F,q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isObject=void 0,j.isObject=function(N){return Object.prototype.toString.call(N)==="[object Object]"}},{}],47:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),g=O(N);function O(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(j,"__esModule",{value:!0}),j.obj2xml=void 0;var M=F("./formatObjKey");function m(T){return Object.prototype.toString.call(T).replace(/(.*? |])/g,"").toLowerCase()}function y(T,b){var p="";return b&&b.headers&&(p=`<?xml version="1.0" encoding="UTF-8"?>
`),b&&b.firstUpperCase&&(T=M.formatObjKey(T,"firstUpperCase")),m(T)==="object"?(0,g.default)(T).forEach(function(d){m(T[d])==="string"||m(T[d])==="number"?p+="<"+d+">"+T[d]+"</"+d+">":m(T[d])==="object"?p+="<"+d+">"+y(T[d])+"</"+d+">":m(T[d])==="array"?p+=T[d].map(function(n){return"<"+d+">"+y(n)+"</"+d+">"}).join(""):p+="<"+d+">"+T[d].toString()+"</"+d+">"}):p+=T.toString(),p}j.obj2xml=y},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(F,q,j){q.exports=N,q.exports.HttpsAgent=N;function N(){}},{}],49:[function(F,q,j){q.exports=F("./register")().Promise},{"./register":51}],50:[function(F,q,j){"use strict";var N="@@any-promise/REGISTRATION",g=null;q.exports=function(O,M){return function(y,T){y=y||null,T=T||{};var b=T.global!==!1;if(g===null&&b&&(g=O[N]||null),g!==null&&y!==null&&g.implementation!==y)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&&(y!==null&&typeof T.Promise!="undefined"?g={Promise:T.Promise,implementation:y}:g=M(y),b&&(O[N]=g)),g}}},{}],51:[function(F,q,j){"use strict";q.exports=F("./loader")(window,N);function N(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(F,q,j){q.exports={default:F("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(F,q,j){q.exports={default:F("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(F,q,j){q.exports={default:F("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(F,q,j){q.exports={default:F("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(F,q,j){q.exports={default:F("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(F,q,j){q.exports={default:F("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(F,q,j){q.exports={default:F("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(F,q,j){q.exports={default:F("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(F,q,j){q.exports={default:F("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(F,q,j){"use strict";j.__esModule=!0;var N=F("../core-js/symbol/iterator"),g=y(N),O=F("../core-js/symbol"),M=y(O),m=typeof M.default=="function"&&typeof g.default=="symbol"?function(T){return typeof T}:function(T){return T&&typeof M.default=="function"&&T.constructor===M.default&&T!==M.default.prototype?"symbol":typeof T};function y(T){return T&&T.__esModule?T:{default:T}}j.default=typeof M.default=="function"&&m(g.default)==="symbol"?function(T){return typeof T=="undefined"?"undefined":m(T)}:function(T){return T&&typeof M.default=="function"&&T.constructor===M.default&&T!==M.default.prototype?"symbol":typeof T=="undefined"?"undefined":m(T)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(F,q,j){q.exports=F("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(F,q,j){"use strict";j.byteLength=b,j.toByteArray=d,j.fromByteArray=r;for(var N=[],g=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,y=M.length;m<y;++m)N[m]=M[m],g[M.charCodeAt(m)]=m;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function T(a){var o=a.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var u=a.indexOf("=");u===-1&&(u=o);var h=u===o?0:4-u%4;return[u,h]}function b(a){var o=T(a),u=o[0],h=o[1];return(u+h)*3/4-h}function p(a,o,u){return(o+u)*3/4-u}function d(a){var o,u=T(a),h=u[0],s=u[1],l=new O(p(a,h,s)),t=0,S=s>0?h-4:h,x;for(x=0;x<S;x+=4)o=g[a.charCodeAt(x)]<<18|g[a.charCodeAt(x+1)]<<12|g[a.charCodeAt(x+2)]<<6|g[a.charCodeAt(x+3)],l[t++]=o>>16&255,l[t++]=o>>8&255,l[t++]=o&255;return s===2&&(o=g[a.charCodeAt(x)]<<2|g[a.charCodeAt(x+1)]>>4,l[t++]=o&255),s===1&&(o=g[a.charCodeAt(x)]<<10|g[a.charCodeAt(x+1)]<<4|g[a.charCodeAt(x+2)]>>2,l[t++]=o>>8&255,l[t++]=o&255),l}function n(a){return N[a>>18&63]+N[a>>12&63]+N[a>>6&63]+N[a&63]}function c(a,o,u){for(var h,s=[],l=o;l<u;l+=3)h=(a[l]<<16&16711680)+(a[l+1]<<8&65280)+(a[l+2]&255),s.push(n(h));return s.join("")}function r(a){for(var o,u=a.length,h=u%3,s=[],l=16383,t=0,S=u-h;t<S;t+=l)s.push(c(a,t,t+l>S?S:t+l));return h===1?(o=a[u-1],s.push(N[o>>2]+N[o<<4&63]+"==")):h===2&&(o=(a[u-2]<<8)+a[u-1],s.push(N[o>>10]+N[o>>4&63]+N[o<<2&63]+"=")),s.join("")}},{}],70:[function(F,q,j){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(N,g,O){typeof q!="undefined"&&q.exports?q.exports=O():typeof define=="function"&&define.amd?define(g,O):N[g]=O()}(this,"bowser",function(){var N=!0;function g(p){function d(G){var B=p.match(G);return B&&B.length>1&&B[1]||""}function n(G){var B=p.match(G);return B&&B.length>1&&B[2]||""}var c=d(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(p),a=!r&&/android/i.test(p),o=/nexus\s*[0-6]\s*/i.test(p),u=!o&&/nexus\s*[0-9]+/i.test(p),h=/CrOS/.test(p),s=/silk/i.test(p),l=/sailfish/i.test(p),t=/tizen/i.test(p),S=/(web|hpw)(o|0)s/i.test(p),x=/windows phone/i.test(p),f=/SamsungBrowser/i.test(p),R=!x&&/windows/i.test(p),C=!c&&!s&&/macintosh/i.test(p),v=!a&&!l&&!t&&!S&&/linux/i.test(p),_=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=d(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(p)&&!/tablet pc/i.test(p),k=!w&&/[^-]mobi/i.test(p),I=/xbox/i.test(p),L;/opera/i.test(p)?L={name:"Opera",opera:N,version:E||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(p)?L={name:"Opera",opera:N,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(p)?L={name:"Samsung Internet for Android",samsungBrowser:N,version:E||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(p)?L={name:"NAVER Whale browser",whale:N,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(p)?L={name:"MZ Browser",mzbrowser:N,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(p)?L={name:"Opera Coast",coast:N,version:E||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(p)?L={name:"Focus",focus:N,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(p)?L={name:"Yandex Browser",yandexbrowser:N,version:E||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(p)?L={name:"UC Browser",ucbrowser:N,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(p)?L={name:"Maxthon",maxthon:N,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(p)?L={name:"Epiphany",epiphany:N,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(p)?L={name:"Puffin",puffin:N,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(p)?L={name:"Sleipnir",sleipnir:N,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(p)?L={name:"K-Meleon",kMeleon:N,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(L={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},_?(L.msedge=N,L.version=_):(L.msie=N,L.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(p)?L={name:"Internet Explorer",msie:N,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:h?L={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(p)?L={name:"Microsoft Edge",msedge:N,version:_}:/vivaldi/i.test(p)?L={name:"Vivaldi",vivaldi:N,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||E}:l?L={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(p)?L={name:"SeaMonkey",seamonkey:N,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(p)?(L={name:"Firefox",firefox:N,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(p)&&(L.firefoxos=N,L.osname="Firefox OS")):s?L={name:"Amazon Silk",silk:N,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(p)?L={name:"PhantomJS",phantom:N,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(p)?L={name:"SlimerJS",slimer:N,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(p)||/rim\stablet/i.test(p)?L={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:E||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(L={name:"WebOS",osname:"WebOS",webos:N,version:E||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(p)&&(L.touchpad=N)):/bada/i.test(p)?L={name:"Bada",osname:"Bada",bada:N,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:t?L={name:"Tizen",osname:"Tizen",tizen:N,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(p)?L={name:"QupZilla",qupzilla:N,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(p)?L={name:"Chromium",chromium:N,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(p)?L={name:"Chrome",chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:a?L={name:"Android",version:E}:/safari|applewebkit/i.test(p)?(L={name:"Safari",safari:N},E&&(L.version=E)):c?(L={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},E&&(L.version=E)):/googlebot/i.test(p)?L={name:"Googlebot",googlebot:N,version:d(/googlebot\/(\d+(\.\d+))/i)||E}:L={name:d(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!L.msedge&&/(apple)?webkit/i.test(p)?(/(apple)?webkit\/537\.36/i.test(p)?(L.name=L.name||"Blink",L.blink=N):(L.name=L.name||"Webkit",L.webkit=N),!L.version&&E&&(L.version=E)):!L.opera&&/gecko\//i.test(p)&&(L.name=L.name||"Gecko",L.gecko=N,L.version=L.version||d(/gecko\/(\d+(\.\d+)?)/i)),!L.windowsphone&&(a||L.silk)?(L.android=N,L.osname="Android"):!L.windowsphone&&c?(L[c]=N,L.ios=N,L.osname="iOS"):C?(L.mac=N,L.osname="macOS"):I?(L.xbox=N,L.osname="Xbox"):R?(L.windows=N,L.osname="Windows"):v&&(L.linux=N,L.osname="Linux");function V(G){switch(G){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 W="";L.windows?W=V(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):L.windowsphone?W=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):L.mac?(W=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),W=W.replace(/[_\s]/g,".")):c?(W=d(/os (\d+([_\s]\d+)*) like mac os x/i),W=W.replace(/[_\s]/g,".")):a?W=d(/android[ \/-](\d+(\.\d+)*)/i):L.webos?W=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):L.blackberry?W=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):L.bada?W=d(/bada\/(\d+(\.\d+)*)/i):L.tizen&&(W=d(/tizen[\/\s](\d+(\.\d+)*)/i)),W&&(L.osversion=W);var H=!L.windows&&W.split(".")[0];return w||u||c=="ipad"||a&&(H==3||H>=4&&!k)||L.silk?L.tablet=N:(k||c=="iphone"||c=="ipod"||a||o||L.blackberry||L.webos||L.bada)&&(L.mobile=N),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&&y([L.version,"1.0"])===1||L.mzbrowser&&y([L.version,"6.0"])===1||L.focus&&y([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=N: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=N:L.x=N,L}var O=g(typeof navigator!="undefined"&&navigator.userAgent||"");O.test=function(p){for(var d=0;d<p.length;++d){var n=p[d];if(typeof n=="string"&&n in O)return!0}return!1};function M(p){return p.split(".").length}function m(p,d){var n=[],c;if(Array.prototype.map)return Array.prototype.map.call(p,d);for(c=0;c<p.length;c++)n.push(d(p[c]));return n}function y(p){for(var d=Math.max(M(p[0]),M(p[1])),n=m(p,function(c){var r=d-M(c);return c=c+new Array(r+1).join(".0"),m(c.split("."),function(a){return new Array(20-a.length).join("0")+a}).reverse()});--d>=0;){if(n[0][d]>n[1][d])return 1;if(n[0][d]===n[1][d]){if(d===0)return 0}else return-1}}function T(p,d,n){var c=O;typeof d=="string"&&(n=d,d=void 0),d===void 0&&(d=!1),n&&(c=g(n));var r=""+c.version;for(var a in p)if(p.hasOwnProperty(a)&&c[a]){if(typeof p[a]!="string")throw new Error("Browser version in the minVersion map should be a string: "+a+": "+String(p));return y([r,p[a]])<0}return d}function b(p,d,n){return!T(p,d,n)}return O.isUnsupportedBrowser=T,O.compareVersions=y,O.check=b,O._detect=g,O.detect=g,O})},{}],71:[function(F,q,j){},{}],72:[function(F,q,j){var N=F("buffer").Buffer,g=N.isEncoding||function(b){switch(b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O(b){if(b&&!g(b))throw new Error("Unknown encoding: "+b)}var M=j.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),O(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=y;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=T;break;default:this.write=m;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};M.prototype.write=function(b){for(var p="";this.charLength;){var d=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived<this.charLength)return"";b=b.slice(d,b.length),p=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=p.charCodeAt(p.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,p="";continue}if(this.charReceived=this.charLength=0,b.length===0)return p;break}this.detectIncompleteChar(b);var n=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,n),n-=this.charReceived),p+=b.toString(this.encoding,0,n);var n=p.length-1,c=p.charCodeAt(n);if(c>=55296&&c<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),b.copy(this.charBuffer,0,0,r),p.substring(0,n)}return p},M.prototype.detectIncompleteChar=function(b){for(var p=b.length>=3?3:b.length;p>0;p--){var d=b[b.length-p];if(p==1&&d>>5==6){this.charLength=2;break}if(p<=2&&d>>4==14){this.charLength=3;break}if(p<=3&&d>>3==30){this.charLength=4;break}}this.charReceived=p},M.prototype.end=function(b){var p="";if(b&&b.length&&(p=this.write(b)),this.charReceived){var d=this.charReceived,n=this.charBuffer,c=this.encoding;p+=n.slice(0,d).toString(c)}return p};function m(b){return b.toString(this.encoding)}function y(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function T(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(F,q,j){(function(N,g){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var O=F("base64-js"),M=F("ieee754"),m=F("isarray");j.Buffer=g,j.SlowBuffer=s,j.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:y(),j.kMaxLength=T();function y(){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(Z){return!1}}function T(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(ie,Z){if(T()<Z)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(Z),ie.__proto__=g.prototype):(ie===null&&(ie=new g(Z)),ie.length=Z),ie}function g(ie,Z,X){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(ie,Z,X);if(typeof ie=="number"){if(typeof Z=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ie)}return p(this,ie,Z,X)}g.poolSize=8192,g._augment=function(ie){return ie.__proto__=g.prototype,ie};function p(ie,Z,X,Q){if(typeof Z=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Z instanceof ArrayBuffer?o(ie,Z,X,Q):typeof Z=="string"?r(ie,Z,X):u(ie,Z)}g.from=function(ie,Z,X){return p(null,ie,Z,X)},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 d(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function n(ie,Z,X,Q){return d(Z),Z<=0?b(ie,Z):X!==void 0?typeof Q=="string"?b(ie,Z).fill(X,Q):b(ie,Z).fill(X):b(ie,Z)}g.alloc=function(ie,Z,X){return n(null,ie,Z,X)};function c(ie,Z){if(d(Z),ie=b(ie,Z<0?0:h(Z)|0),!g.TYPED_ARRAY_SUPPORT)for(var X=0;X<Z;++X)ie[X]=0;return ie}g.allocUnsafe=function(ie){return c(null,ie)},g.allocUnsafeSlow=function(ie){return c(null,ie)};function r(ie,Z,X){if((typeof X!="string"||X==="")&&(X="utf8"),!g.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Q=l(Z,X)|0;ie=b(ie,Q);var _e=ie.write(Z,X);return _e!==Q&&(ie=ie.slice(0,_e)),ie}function a(ie,Z){var X=Z.length<0?0:h(Z.length)|0;ie=b(ie,X);for(var Q=0;Q<X;Q+=1)ie[Q]=Z[Q]&255;return ie}function o(ie,Z,X,Q){if(Z.byteLength,X<0||Z.byteLength<X)throw new RangeError("'offset' is out of bounds");if(Z.byteLength<X+(Q||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Q===void 0?Z=new Uint8Array(Z):Q===void 0?Z=new Uint8Array(Z,X):Z=new Uint8Array(Z,X,Q),g.TYPED_ARRAY_SUPPORT?(ie=Z,ie.__proto__=g.prototype):ie=a(ie,Z),ie}function u(ie,Z){if(g.isBuffer(Z)){var X=h(Z.length)|0;return ie=b(ie,X),ie.length===0||Z.copy(ie,0,0,X),ie}if(Z){if(typeof ArrayBuffer!="undefined"&&Z.buffer instanceof ArrayBuffer||"length"in Z)return typeof Z.length!="number"||Te(Z.length)?b(ie,0):a(ie,Z);if(Z.type==="Buffer"&&m(Z.data))return a(ie,Z.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(ie){if(ie>=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return ie|0}function s(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(Z){return!!(Z!=null&&Z._isBuffer)},g.compare=function(Z,X){if(!g.isBuffer(Z)||!g.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(Z===X)return 0;for(var Q=Z.length,_e=X.length,ve=0,Re=Math.min(Q,_e);ve<Re;++ve)if(Z[ve]!==X[ve]){Q=Z[ve],_e=X[ve];break}return Q<_e?-1:_e<Q?1:0},g.isEncoding=function(Z){switch(String(Z).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(Z,X){if(!m(Z))throw new TypeError('"list" argument must be an Array of Buffers');if(Z.length===0)return g.alloc(0);var Q;if(X===void 0)for(X=0,Q=0;Q<Z.length;++Q)X+=Z[Q].length;var _e=g.allocUnsafe(X),ve=0;for(Q=0;Q<Z.length;++Q){var Re=Z[Q];if(!g.isBuffer(Re))throw new TypeError('"list" argument must be an Array of Buffers');Re.copy(_e,ve),ve+=Re.length}return _e};function l(ie,Z){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 X=ie.length;if(X===0)return 0;for(var Q=!1;;)switch(Z){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return ae(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return te(ie).length;default:if(Q)return ae(ie).length;Z=(""+Z).toLowerCase(),Q=!0}}g.byteLength=l;function t(ie,Z,X){var Q=!1;if((Z===void 0||Z<0)&&(Z=0),Z>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,Z>>>=0,X<=Z)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return G(this,Z,X);case"utf8":case"utf-8":return I(this,Z,X);case"ascii":return W(this,Z,X);case"latin1":case"binary":return H(this,Z,X);case"base64":return k(this,Z,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Z,X);default:if(Q)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),Q=!0}}g.prototype._isBuffer=!0;function S(ie,Z,X){var Q=ie[Z];ie[Z]=ie[X],ie[X]=Q}g.prototype.swap16=function(){var Z=this.length;if(Z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<Z;X+=2)S(this,X,X+1);return this},g.prototype.swap32=function(){var Z=this.length;if(Z%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<Z;X+=4)S(this,X,X+3),S(this,X+1,X+2);return this},g.prototype.swap64=function(){var Z=this.length;if(Z%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<Z;X+=8)S(this,X,X+7),S(this,X+1,X+6),S(this,X+2,X+5),S(this,X+3,X+4);return this},g.prototype.toString=function(){var Z=this.length|0;return Z===0?"":arguments.length===0?I(this,0,Z):t.apply(this,arguments)},g.prototype.equals=function(Z){if(!g.isBuffer(Z))throw new TypeError("Argument must be a Buffer");return this===Z?!0:g.compare(this,Z)===0},g.prototype.inspect=function(){var Z="",X=j.INSPECT_MAX_BYTES;return this.length>0&&(Z=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Z+=" ... ")),"<Buffer "+Z+">"},g.prototype.compare=function(Z,X,Q,_e,ve){if(!g.isBuffer(Z))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=Z?Z.length:0),_e===void 0&&(_e=0),ve===void 0&&(ve=this.length),X<0||Q>Z.length||_e<0||ve>this.length)throw new RangeError("out of range index");if(_e>=ve&&X>=Q)return 0;if(_e>=ve)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,_e>>>=0,ve>>>=0,this===Z)return 0;for(var Re=ve-_e,Je=Q-X,qe=Math.min(Re,Je),rt=this.slice(_e,ve),ut=Z.slice(X,Q),dt=0;dt<qe;++dt)if(rt[dt]!==ut[dt]){Re=rt[dt],Je=ut[dt];break}return Re<Je?-1:Je<Re?1:0};function x(ie,Z,X,Q,_e){if(ie.length===0)return-1;if(typeof X=="string"?(Q=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=_e?0:ie.length-1),X<0&&(X=ie.length+X),X>=ie.length){if(_e)return-1;X=ie.length-1}else if(X<0)if(_e)X=0;else return-1;if(typeof Z=="string"&&(Z=g.from(Z,Q)),g.isBuffer(Z))return Z.length===0?-1:f(ie,Z,X,Q,_e);if(typeof Z=="number")return Z=Z&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(ie,Z,X):Uint8Array.prototype.lastIndexOf.call(ie,Z,X):f(ie,[Z],X,Q,_e);throw new TypeError("val must be string, number or Buffer")}function f(ie,Z,X,Q,_e){var ve=1,Re=ie.length,Je=Z.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ie.length<2||Z.length<2)return-1;ve=2,Re/=2,Je/=2,X/=2}function qe(Be,Ie){return ve===1?Be[Ie]:Be.readUInt16BE(Ie*ve)}var rt;if(_e){var ut=-1;for(rt=X;rt<Re;rt++)if(qe(ie,rt)===qe(Z,ut===-1?0:rt-ut)){if(ut===-1&&(ut=rt),rt-ut+1===Je)return ut*ve}else ut!==-1&&(rt-=rt-ut),ut=-1}else for(X+Je>Re&&(X=Re-Je),rt=X;rt>=0;rt--){for(var dt=!0,ft=0;ft<Je;ft++)if(qe(ie,rt+ft)!==qe(Z,ft)){dt=!1;break}if(dt)return rt}return-1}g.prototype.includes=function(Z,X,Q){return this.indexOf(Z,X,Q)!==-1},g.prototype.indexOf=function(Z,X,Q){return x(this,Z,X,Q,!0)},g.prototype.lastIndexOf=function(Z,X,Q){return x(this,Z,X,Q,!1)};function R(ie,Z,X,Q){X=Number(X)||0;var _e=ie.length-X;Q?(Q=Number(Q),Q>_e&&(Q=_e)):Q=_e;var ve=Z.length;if(ve%2!==0)throw new TypeError("Invalid hex string");Q>ve/2&&(Q=ve/2);for(var Re=0;Re<Q;++Re){var Je=parseInt(Z.substr(Re*2,2),16);if(isNaN(Je))return Re;ie[X+Re]=Je}return Re}function C(ie,Z,X,Q){return ne(ae(Z,ie.length-X),ie,X,Q)}function v(ie,Z,X,Q){return ne(re(Z),ie,X,Q)}function _(ie,Z,X,Q){return v(ie,Z,X,Q)}function E(ie,Z,X,Q){return ne(te(Z),ie,X,Q)}function w(ie,Z,X,Q){return ne(fe(Z,ie.length-X),ie,X,Q)}g.prototype.write=function(Z,X,Q,_e){if(X===void 0)_e="utf8",Q=this.length,X=0;else if(Q===void 0&&typeof X=="string")_e=X,Q=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Q)?(Q=Q|0,_e===void 0&&(_e="utf8")):(_e=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ve=this.length-X;if((Q===void 0||Q>ve)&&(Q=ve),Z.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");for(var Re=!1;;)switch(_e){case"hex":return R(this,Z,X,Q);case"utf8":case"utf-8":return C(this,Z,X,Q);case"ascii":return v(this,Z,X,Q);case"latin1":case"binary":return _(this,Z,X,Q);case"base64":return E(this,Z,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,Z,X,Q);default:if(Re)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),Re=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(ie,Z,X){return Z===0&&X===ie.length?O.fromByteArray(ie):O.fromByteArray(ie.slice(Z,X))}function I(ie,Z,X){X=Math.min(ie.length,X);for(var Q=[],_e=Z;_e<X;){var ve=ie[_e],Re=null,Je=ve>239?4:ve>223?3:ve>191?2:1;if(_e+Je<=X){var qe,rt,ut,dt;switch(Je){case 1:ve<128&&(Re=ve);break;case 2:qe=ie[_e+1],(qe&192)===128&&(dt=(ve&31)<<6|qe&63,dt>127&&(Re=dt));break;case 3:qe=ie[_e+1],rt=ie[_e+2],(qe&192)===128&&(rt&192)===128&&(dt=(ve&15)<<12|(qe&63)<<6|rt&63,dt>2047&&(dt<55296||dt>57343)&&(Re=dt));break;case 4:qe=ie[_e+1],rt=ie[_e+2],ut=ie[_e+3],(qe&192)===128&&(rt&192)===128&&(ut&192)===128&&(dt=(ve&15)<<18|(qe&63)<<12|(rt&63)<<6|ut&63,dt>65535&&dt<1114112&&(Re=dt))}}Re===null?(Re=65533,Je=1):Re>65535&&(Re-=65536,Q.push(Re>>>10&1023|55296),Re=56320|Re&1023),Q.push(Re),_e+=Je}return V(Q)}var L=4096;function V(ie){var Z=ie.length;if(Z<=L)return String.fromCharCode.apply(String,ie);for(var X="",Q=0;Q<Z;)X+=String.fromCharCode.apply(String,ie.slice(Q,Q+=L));return X}function W(ie,Z,X){var Q="";X=Math.min(ie.length,X);for(var _e=Z;_e<X;++_e)Q+=String.fromCharCode(ie[_e]&127);return Q}function H(ie,Z,X){var Q="";X=Math.min(ie.length,X);for(var _e=Z;_e<X;++_e)Q+=String.fromCharCode(ie[_e]);return Q}function G(ie,Z,X){var Q=ie.length;(!Z||Z<0)&&(Z=0),(!X||X<0||X>Q)&&(X=Q);for(var _e="",ve=Z;ve<X;++ve)_e+=ce(ie[ve]);return _e}function B(ie,Z,X){for(var Q=ie.slice(Z,X),_e="",ve=0;ve<Q.length;ve+=2)_e+=String.fromCharCode(Q[ve]+Q[ve+1]*256);return _e}g.prototype.slice=function(Z,X){var Q=this.length;Z=~~Z,X=X===void 0?Q:~~X,Z<0?(Z+=Q,Z<0&&(Z=0)):Z>Q&&(Z=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),X<Z&&(X=Z);var _e;if(g.TYPED_ARRAY_SUPPORT)_e=this.subarray(Z,X),_e.__proto__=g.prototype;else{var ve=X-Z;_e=new g(ve,void 0);for(var Re=0;Re<ve;++Re)_e[Re]=this[Re+Z]}return _e};function P(ie,Z,X){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+Z>X)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=this[Z],ve=1,Re=0;++Re<X&&(ve*=256);)_e+=this[Z+Re]*ve;return _e},g.prototype.readUIntBE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=this[Z+--X],ve=1;X>0&&(ve*=256);)_e+=this[Z+--X]*ve;return _e},g.prototype.readUInt8=function(Z,X){return X||P(Z,1,this.length),this[Z]},g.prototype.readUInt16LE=function(Z,X){return X||P(Z,2,this.length),this[Z]|this[Z+1]<<8},g.prototype.readUInt16BE=function(Z,X){return X||P(Z,2,this.length),this[Z]<<8|this[Z+1]},g.prototype.readUInt32LE=function(Z,X){return X||P(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+this[Z+3]*16777216},g.prototype.readUInt32BE=function(Z,X){return X||P(Z,4,this.length),this[Z]*16777216+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},g.prototype.readIntLE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=this[Z],ve=1,Re=0;++Re<X&&(ve*=256);)_e+=this[Z+Re]*ve;return ve*=128,_e>=ve&&(_e-=Math.pow(2,8*X)),_e},g.prototype.readIntBE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=X,ve=1,Re=this[Z+--_e];_e>0&&(ve*=256);)Re+=this[Z+--_e]*ve;return ve*=128,Re>=ve&&(Re-=Math.pow(2,8*X)),Re},g.prototype.readInt8=function(Z,X){return X||P(Z,1,this.length),this[Z]&128?(255-this[Z]+1)*-1:this[Z]},g.prototype.readInt16LE=function(Z,X){X||P(Z,2,this.length);var Q=this[Z]|this[Z+1]<<8;return Q&32768?Q|4294901760:Q},g.prototype.readInt16BE=function(Z,X){X||P(Z,2,this.length);var Q=this[Z+1]|this[Z]<<8;return Q&32768?Q|4294901760:Q},g.prototype.readInt32LE=function(Z,X){return X||P(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},g.prototype.readInt32BE=function(Z,X){return X||P(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},g.prototype.readFloatLE=function(Z,X){return X||P(Z,4,this.length),M.read(this,Z,!0,23,4)},g.prototype.readFloatBE=function(Z,X){return X||P(Z,4,this.length),M.read(this,Z,!1,23,4)},g.prototype.readDoubleLE=function(Z,X){return X||P(Z,8,this.length),M.read(this,Z,!0,52,8)},g.prototype.readDoubleBE=function(Z,X){return X||P(Z,8,this.length),M.read(this,Z,!1,52,8)};function z(ie,Z,X,Q,_e,ve){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(Z>_e||Z<ve)throw new RangeError('"value" argument is out of bounds');if(X+Q>ie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,Q=Q|0,!_e){var ve=Math.pow(2,8*Q)-1;z(this,Z,X,Q,ve,0)}var Re=1,Je=0;for(this[X]=Z&255;++Je<Q&&(Re*=256);)this[X+Je]=Z/Re&255;return X+Q},g.prototype.writeUIntBE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,Q=Q|0,!_e){var ve=Math.pow(2,8*Q)-1;z(this,Z,X,Q,ve,0)}var Re=Q-1,Je=1;for(this[X+Re]=Z&255;--Re>=0&&(Je*=256);)this[X+Re]=Z/Je&255;return X+Q},g.prototype.writeUInt8=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,1,255,0),g.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),this[X]=Z&255,X+1};function J(ie,Z,X,Q){Z<0&&(Z=65535+Z+1);for(var _e=0,ve=Math.min(ie.length-X,2);_e<ve;++_e)ie[X+_e]=(Z&255<<8*(Q?_e:1-_e))>>>(Q?_e:1-_e)*8}g.prototype.writeUInt16LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[X]=Z&255,this[X+1]=Z>>>8):J(this,Z,X,!0),X+2},g.prototype.writeUInt16BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>8,this[X+1]=Z&255):J(this,Z,X,!1),X+2};function ue(ie,Z,X,Q){Z<0&&(Z=4294967295+Z+1);for(var _e=0,ve=Math.min(ie.length-X,4);_e<ve;++_e)ie[X+_e]=Z>>>(Q?_e:3-_e)*8&255}g.prototype.writeUInt32LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[X+3]=Z>>>24,this[X+2]=Z>>>16,this[X+1]=Z>>>8,this[X]=Z&255):ue(this,Z,X,!0),X+4},g.prototype.writeUInt32BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>24,this[X+1]=Z>>>16,this[X+2]=Z>>>8,this[X+3]=Z&255):ue(this,Z,X,!1),X+4},g.prototype.writeIntLE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,!_e){var ve=Math.pow(2,8*Q-1);z(this,Z,X,Q,ve-1,-ve)}var Re=0,Je=1,qe=0;for(this[X]=Z&255;++Re<Q&&(Je*=256);)Z<0&&qe===0&&this[X+Re-1]!==0&&(qe=1),this[X+Re]=(Z/Je>>0)-qe&255;return X+Q},g.prototype.writeIntBE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,!_e){var ve=Math.pow(2,8*Q-1);z(this,Z,X,Q,ve-1,-ve)}var Re=Q-1,Je=1,qe=0;for(this[X+Re]=Z&255;--Re>=0&&(Je*=256);)Z<0&&qe===0&&this[X+Re+1]!==0&&(qe=1),this[X+Re]=(Z/Je>>0)-qe&255;return X+Q},g.prototype.writeInt8=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,1,127,-128),g.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),Z<0&&(Z=255+Z+1),this[X]=Z&255,X+1},g.prototype.writeInt16LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[X]=Z&255,this[X+1]=Z>>>8):J(this,Z,X,!0),X+2},g.prototype.writeInt16BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>8,this[X+1]=Z&255):J(this,Z,X,!1),X+2},g.prototype.writeInt32LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[X]=Z&255,this[X+1]=Z>>>8,this[X+2]=Z>>>16,this[X+3]=Z>>>24):ue(this,Z,X,!0),X+4},g.prototype.writeInt32BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>24,this[X+1]=Z>>>16,this[X+2]=Z>>>8,this[X+3]=Z&255):ue(this,Z,X,!1),X+4};function de(ie,Z,X,Q,_e,ve){if(X+Q>ie.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function Se(ie,Z,X,Q,_e){return _e||de(ie,Z,X,4,34028234663852886e22,-34028234663852886e22),M.write(ie,Z,X,Q,23,4),X+4}g.prototype.writeFloatLE=function(Z,X,Q){return Se(this,Z,X,!0,Q)},g.prototype.writeFloatBE=function(Z,X,Q){return Se(this,Z,X,!1,Q)};function Ae(ie,Z,X,Q,_e){return _e||de(ie,Z,X,8,17976931348623157e292,-17976931348623157e292),M.write(ie,Z,X,Q,52,8),X+8}g.prototype.writeDoubleLE=function(Z,X,Q){return Ae(this,Z,X,!0,Q)},g.prototype.writeDoubleBE=function(Z,X,Q){return Ae(this,Z,X,!1,Q)},g.prototype.copy=function(Z,X,Q,_e){if(Q||(Q=0),!_e&&_e!==0&&(_e=this.length),X>=Z.length&&(X=Z.length),X||(X=0),_e>0&&_e<Q&&(_e=Q),_e===Q)return 0;if(Z.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("sourceStart out of bounds");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),Z.length-X<_e-Q&&(_e=Z.length-X+Q);var ve=_e-Q,Re;if(this===Z&&Q<X&&X<_e)for(Re=ve-1;Re>=0;--Re)Z[Re+X]=this[Re+Q];else if(ve<1e3||!g.TYPED_ARRAY_SUPPORT)for(Re=0;Re<ve;++Re)Z[Re+X]=this[Re+Q];else Uint8Array.prototype.set.call(Z,this.subarray(Q,Q+ve),X);return ve},g.prototype.fill=function(Z,X,Q,_e){if(typeof Z=="string"){if(typeof X=="string"?(_e=X,X=0,Q=this.length):typeof Q=="string"&&(_e=Q,Q=this.length),Z.length===1){var ve=Z.charCodeAt(0);ve<256&&(Z=ve)}if(_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!g.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e)}else typeof Z=="number"&&(Z=Z&255);if(X<0||this.length<X||this.length<Q)throw new RangeError("Out of range index");if(Q<=X)return this;X=X>>>0,Q=Q===void 0?this.length:Q>>>0,Z||(Z=0);var Re;if(typeof Z=="number")for(Re=X;Re<Q;++Re)this[Re]=Z;else{var Je=g.isBuffer(Z)?Z:ae(new g(Z,_e).toString()),qe=Je.length;for(Re=0;Re<Q-X;++Re)this[Re+X]=Je[Re%qe]}return this};var pe=/[^+\/0-9A-Za-z-_]/g;function Oe(ie){if(ie=ye(ie).replace(pe,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function ye(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 ae(ie,Z){Z=Z||Infinity;for(var X,Q=ie.length,_e=null,ve=[],Re=0;Re<Q;++Re){if(X=ie.charCodeAt(Re),X>55295&&X<57344){if(!_e){if(X>56319){(Z-=3)>-1&&ve.push(239,191,189);continue}else if(Re+1===Q){(Z-=3)>-1&&ve.push(239,191,189);continue}_e=X;continue}if(X<56320){(Z-=3)>-1&&ve.push(239,191,189),_e=X;continue}X=(_e-55296<<10|X-56320)+65536}else _e&&((Z-=3)>-1&&ve.push(239,191,189));if(_e=null,X<128){if((Z-=1)<0)break;ve.push(X)}else if(X<2048){if((Z-=2)<0)break;ve.push(X>>6|192,X&63|128)}else if(X<65536){if((Z-=3)<0)break;ve.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Z-=4)<0)break;ve.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ve}function re(ie){for(var Z=[],X=0;X<ie.length;++X)Z.push(ie.charCodeAt(X)&255);return Z}function fe(ie,Z){for(var X,Q,_e,ve=[],Re=0;Re<ie.length&&!((Z-=2)<0);++Re)X=ie.charCodeAt(Re),Q=X>>8,_e=X%256,ve.push(_e),ve.push(Q);return ve}function te(ie){return O.toByteArray(Oe(ie))}function ne(ie,Z,X,Q){for(var _e=0;_e<Q&&!(_e+X>=Z.length||_e>=ie.length);++_e)Z[_e+X]=ie[_e];return _e}function Te(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(F,q,j){q.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(F,q,j){q.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(F,q,j){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var N=Array.prototype.slice;q.exports=g;function g(M,m){if(!(this instanceof g))return new g(M,m);this.src=M,this._withAccess=m}g.prototype.withAccess=function(M){return this._withAccess=M!==!1,this},g.prototype.pick=function(M){return Array.isArray(M)||(M=N.call(arguments)),M.length&&(this.keys=M),this},g.prototype.to=function(M){if(M=M||{},!this.src)return M;var m=this.keys||Object.keys(this.src);if(!this._withAccess){for(var y=0;y<m.length;y++){if(T=m[y],M[T]!==void 0)continue;M[T]=this.src[T]}return M}for(var y=0;y<m.length;y++){var T=m[y];if(!O(M,T))continue;var b=this.src.__lookupGetter__(T),p=this.src.__lookupSetter__(T);b&&M.__defineGetter__(T,b),p&&M.__defineSetter__(T,p),!b&&!p&&(M[T]=this.src[T])}return M},g.prototype.toCover=function(M){for(var m=this.keys||Object.keys(this.src),y=0;y<m.length;y++){var T=m[y];delete M[T];var b=this.src.__lookupGetter__(T),p=this.src.__lookupSetter__(T);b&&M.__defineGetter__(T,b),p&&M.__defineSetter__(T,p),!b&&!p&&(M[T]=this.src[T])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(M){var m={};return this.to(m),this.src=M,this.to(m),this.src=m,this};function O(M,m){return M[m]===void 0&&M.__lookupGetter__(m)===void 0&&M.__lookupSetter__(m)===void 0}},{}],77:[function(F,q,j){F("../../modules/es6.string.iterator"),F("../../modules/es6.array.from"),q.exports=F("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(F,q,j){var N=F("../../modules/_core"),g=N.JSON||(N.JSON={stringify:JSON.stringify});q.exports=function(M){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(F,q,j){F("../../modules/es6.object.assign"),q.exports=F("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(F,q,j){F("../../modules/es6.object.create");var N=F("../../modules/_core").Object;q.exports=function(O,M){return N.create(O,M)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(F,q,j){F("../../modules/es6.object.define-property");var N=F("../../modules/_core").Object;q.exports=function(O,M,m){return N.defineProperty(O,M,m)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(F,q,j){F("../../modules/es7.object.entries"),q.exports=F("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(F,q,j){F("../../modules/es6.object.get-own-property-names");var N=F("../../modules/_core").Object;q.exports=function(O){return N.getOwnPropertyNames(O)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(F,q,j){F("../../modules/es6.object.get-prototype-of"),q.exports=F("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(F,q,j){F("../../modules/es6.object.keys"),q.exports=F("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(F,q,j){F("../modules/es6.object.to-string"),F("../modules/es6.string.iterator"),F("../modules/web.dom.iterable"),F("../modules/es6.promise"),F("../modules/es7.promise.finally"),F("../modules/es7.promise.try"),q.exports=F("../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(F,q,j){F("../modules/web.immediate"),q.exports=F("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(F,q,j){F("../../modules/es6.string.from-code-point"),q.exports=F("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(F,q,j){F("../../modules/es6.function.has-instance"),q.exports=F("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(F,q,j){F("../../modules/es6.symbol"),F("../../modules/es6.object.to-string"),F("../../modules/es7.symbol.async-iterator"),F("../../modules/es7.symbol.observable"),q.exports=F("../../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(F,q,j){F("../../modules/es6.string.iterator"),F("../../modules/web.dom.iterable"),q.exports=F("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(F,q,j){q.exports=function(N){if(typeof N!="function")throw TypeError(N+" is not a function!");return N}},{}],93:[function(F,q,j){q.exports=function(){}},{}],94:[function(F,q,j){q.exports=function(N,g,O,M){if(!(N instanceof g)||M!==void 0&&M in N)throw TypeError(O+": incorrect invocation!");return N}},{}],95:[function(F,q,j){var N=F("./_is-object");q.exports=function(g){if(!N(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(F,q,j){var N=F("./_to-iobject"),g=F("./_to-length"),O=F("./_to-absolute-index");q.exports=function(M){return function(m,y,T){var b=N(m),p=g(b.length),d=O(T,p),n;if(M&&y!=y){for(;p>d;)if(n=b[d++],n!=n)return!0}else for(;p>d;d++)if((M||d in b)&&b[d]===y)return M||d||0;return!M&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(F,q,j){var N=F("./_cof"),g=F("./_wks")("toStringTag"),O=N(function(){return arguments}())=="Arguments",M=function(m,y){try{return m[y]}catch(T){}};q.exports=function(m){var y,T,b;return m===void 0?"Undefined":m===null?"Null":typeof(T=M(y=Object(m),g))=="string"?T:O?N(y):(b=N(y))=="Object"&&typeof y.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(F,q,j){var N={}.toString;q.exports=function(g){return N.call(g).slice(8,-1)}},{}],99:[function(F,q,j){var N=q.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(F,q,j){"use strict";var N=F("./_object-dp"),g=F("./_property-desc");q.exports=function(O,M,m){M in O?N.f(O,M,g(0,m)):O[M]=m}},{"./_object-dp":132,"./_property-desc":146}],101:[function(F,q,j){var N=F("./_a-function");q.exports=function(g,O,M){if(N(g),O===void 0)return g;switch(M){case 1:return function(m){return g.call(O,m)};case 2:return function(m,y){return g.call(O,m,y)};case 3:return function(m,y,T){return g.call(O,m,y,T)}}return function(){return g.apply(O,arguments)}}},{"./_a-function":92}],102:[function(F,q,j){q.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(F,q,j){q.exports=!F("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(F,q,j){var N=F("./_is-object"),g=F("./_global").document,O=N(g)&&N(g.createElement);q.exports=function(M){return O?g.createElement(M):{}}},{"./_global":110,"./_is-object":119}],105:[function(F,q,j){q.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(F,q,j){var N=F("./_object-keys"),g=F("./_object-gops"),O=F("./_object-pie");q.exports=function(M){var m=N(M),y=g.f;if(y)for(var T=y(M),b=O.f,p=0,d;T.length>p;)b.call(M,d=T[p++])&&m.push(d);return m}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(F,q,j){var N=F("./_global"),g=F("./_core"),O=F("./_ctx"),M=F("./_hide"),m=F("./_has"),y="prototype",T=function(b,p,d){var n=b&T.F,c=b&T.G,r=b&T.S,a=b&T.P,o=b&T.B,u=b&T.W,h=c?g:g[p]||(g[p]={}),s=h[y],l=c?N:r?N[p]:(N[p]||{})[y],t,S,x;c&&(d=p);for(t in d){if(S=!n&&l&&l[t]!==void 0,S&&m(h,t))continue;x=S?l[t]:d[t],h[t]=c&&typeof l[t]!="function"?d[t]:o&&S?O(x,N):u&&l[t]==x?function(f){var R=function(C,v,_){if(this instanceof f){switch(arguments.length){case 0:return new f;case 1:return new f(C);case 2:return new f(C,v)}return new f(C,v,_)}return f.apply(this,arguments)};return R[y]=f[y],R}(x):a&&typeof x=="function"?O(Function.call,x):x,a&&((h.virtual||(h.virtual={}))[t]=x,b&T.R&&s&&!s[t]&&M(s,t,x))}};T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128,q.exports=T},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(F,q,j){q.exports=function(N){try{return!!N()}catch(g){return!0}}},{}],109:[function(F,q,j){var N=F("./_ctx"),g=F("./_iter-call"),O=F("./_is-array-iter"),M=F("./_an-object"),m=F("./_to-length"),y=F("./core.get-iterator-method"),T={},b={},j=q.exports=function(p,d,n,c,r){var a=r?function(){return p}:y(p),o=N(n,c,d?2:1),u=0,h,s,l,t;if(typeof a!="function")throw TypeError(p+" is not iterable!");if(O(a)){for(h=m(p.length);h>u;u++)if(t=d?o(M(s=p[u])[0],s[1]):o(p[u]),t===T||t===b)return t}else for(l=a.call(p);!(s=l.next()).done;)if(t=g(l,o,s.value,d),t===T||t===b)return t};j.BREAK=T,j.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(F,q,j){var N=q.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(F,q,j){var N={}.hasOwnProperty;q.exports=function(g,O){return N.call(g,O)}},{}],112:[function(F,q,j){var N=F("./_object-dp"),g=F("./_property-desc");q.exports=F("./_descriptors")?function(O,M,m){return N.f(O,M,g(1,m))}:function(O,M,m){return O[M]=m,O}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(F,q,j){var N=F("./_global").document;q.exports=N&&N.documentElement},{"./_global":110}],114:[function(F,q,j){q.exports=!F("./_descriptors")&&!F("./_fails")(function(){return Object.defineProperty(F("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(F,q,j){q.exports=function(N,g,O){var M=O===void 0;switch(g.length){case 0:return M?N():N.call(O);case 1:return M?N(g[0]):N.call(O,g[0]);case 2:return M?N(g[0],g[1]):N.call(O,g[0],g[1]);case 3:return M?N(g[0],g[1],g[2]):N.call(O,g[0],g[1],g[2]);case 4:return M?N(g[0],g[1],g[2],g[3]):N.call(O,g[0],g[1],g[2],g[3])}return N.apply(O,g)}},{}],116:[function(F,q,j){var N=F("./_cof");q.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return N(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(F,q,j){var N=F("./_iterators"),g=F("./_wks")("iterator"),O=Array.prototype;q.exports=function(M){return M!==void 0&&(N.Array===M||O[g]===M)}},{"./_iterators":125,"./_wks":166}],118:[function(F,q,j){var N=F("./_cof");q.exports=Array.isArray||function(O){return N(O)=="Array"}},{"./_cof":98}],119:[function(F,q,j){q.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(F,q,j){var N=F("./_an-object");q.exports=function(g,O,M,m){try{return m?O(N(M)[0],M[1]):O(M)}catch(T){var y=g.return;throw y!==void 0&&N(y.call(g)),T}}},{"./_an-object":95}],121:[function(F,q,j){"use strict";var N=F("./_object-create"),g=F("./_property-desc"),O=F("./_set-to-string-tag"),M={};F("./_hide")(M,F("./_wks")("iterator"),function(){return this}),q.exports=function(m,y,T){m.prototype=N(M,{next:g(1,T)}),O(m,y+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(F,q,j){"use strict";var N=F("./_library"),g=F("./_export"),O=F("./_redefine"),M=F("./_hide"),m=F("./_iterators"),y=F("./_iter-create"),T=F("./_set-to-string-tag"),b=F("./_object-gpo"),p=F("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),n="@@iterator",c="keys",r="values",a=function(){return this};q.exports=function(o,u,h,s,l,t,S){y(h,u,s);var x=function(W){if(!d&&W in v)return v[W];switch(W){case c:return function(){return new h(this,W)};case r:return function(){return new h(this,W)}}return function(){return new h(this,W)}},f=u+" Iterator",R=l==r,C=!1,v=o.prototype,_=v[p]||v[n]||l&&v[l],E=_||x(l),w=l?R?x("entries"):E:void 0,k=u=="Array"&&v.entries||_,I,L,V;if(k&&(V=b(k.call(new o)),V!==Object.prototype&&V.next&&(T(V,f,!0),!N&&typeof V[p]!="function"&&M(V,p,a))),R&&_&&_.name!==r&&(C=!0,E=function(){return _.call(this)}),(!N||S)&&(d||C||!v[p])&&M(v,p,E),m[u]=E,m[f]=a,l)if(I={values:R?E:x(r),keys:t?E:x(c),entries:w},S)for(L in I)L in v||O(v,L,I[L]);else g(g.P+g.F*(d||C),u,I);return I}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(F,q,j){var N=F("./_wks")("iterator"),g=!1;try{var O=[7][N]();O.return=function(){g=!0},Array.from(O,function(){throw 2})}catch(M){}q.exports=function(M,m){if(!m&&!g)return!1;var y=!1;try{var T=[7],b=T[N]();b.next=function(){return{done:y=!0}},T[N]=function(){return b},M(T)}catch(p){}return y}},{"./_wks":166}],124:[function(F,q,j){q.exports=function(N,g){return{value:g,done:!!N}}},{}],125:[function(F,q,j){q.exports={}},{}],126:[function(F,q,j){q.exports=!0},{}],127:[function(F,q,j){var N=F("./_uid")("meta"),g=F("./_is-object"),O=F("./_has"),M=F("./_object-dp").f,m=0,y=Object.isExtensible||function(){return!0},T=!F("./_fails")(function(){return y(Object.preventExtensions({}))}),b=function(r){M(r,N,{value:{i:"O"+ ++m,w:{}}})},p=function(r,a){if(!g(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!O(r,N)){if(!y(r))return"F";if(!a)return"E";b(r)}return r[N].i},d=function(r,a){if(!O(r,N)){if(!y(r))return!0;if(!a)return!1;b(r)}return r[N].w},n=function(r){return T&&c.NEED&&y(r)&&!O(r,N)&&b(r),r},c=q.exports={KEY:N,NEED:!1,fastKey:p,getWeak:d,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(F,q,j){var N=F("./_global"),g=F("./_task").set,O=N.MutationObserver||N.WebKitMutationObserver,M=N.process,m=N.Promise,y=F("./_cof")(M)=="process";q.exports=function(){var T,b,p,d=function(){var a,o;for(y&&(a=M.domain)&&a.exit();T;){o=T.fn,T=T.next;try{o()}catch(u){throw T?p():b=void 0,u}}b=void 0,a&&a.enter()};if(y)p=function(){M.nextTick(d)};else if(O&&!(N.navigator&&N.navigator.standalone)){var n=!0,c=document.createTextNode("");new O(d).observe(c,{characterData:!0}),p=function(){c.data=n=!n}}else if(m&&m.resolve){var r=m.resolve(void 0);p=function(){r.then(d)}}else p=function(){g.call(N,d)};return function(a){var o={fn:a,next:void 0};b&&(b.next=o),T||(T=o,p()),b=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(F,q,j){"use strict";var N=F("./_a-function");function g(O){var M,m;this.promise=new O(function(y,T){if(M!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");M=y,m=T}),this.resolve=N(M),this.reject=N(m)}q.exports.f=function(O){return new g(O)}},{"./_a-function":92}],130:[function(F,q,j){"use strict";var N=F("./_descriptors"),g=F("./_object-keys"),O=F("./_object-gops"),M=F("./_object-pie"),m=F("./_to-object"),y=F("./_iobject"),T=Object.assign;q.exports=!T||F("./_fails")(function(){var b={},p={},d=Symbol(),n="abcdefghijklmnopqrst";return b[d]=7,n.split("").forEach(function(c){p[c]=c}),T({},b)[d]!=7||Object.keys(T({},p)).join("")!=n})?function(p,d){for(var n=m(p),c=arguments.length,r=1,a=O.f,o=M.f;c>r;)for(var u=y(arguments[r++]),h=a?g(u).concat(a(u)):g(u),s=h.length,l=0,t;s>l;)t=h[l++],(!N||o.call(u,t))&&(n[t]=u[t]);return n}:T},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(F,q,j){var N=F("./_an-object"),g=F("./_object-dps"),O=F("./_enum-bug-keys"),M=F("./_shared-key")("IE_PROTO"),m=function(){},y="prototype",T=function(){var b=F("./_dom-create")("iframe"),p=O.length,d="<",n=">",c;for(b.style.display="none",F("./_html").appendChild(b),b.src="javascript:",c=b.contentWindow.document,c.open(),c.write(d+"script"+n+"document.F=Object"+d+"/script"+n),c.close(),T=c.F;p--;)delete T[y][O[p]];return T()};q.exports=Object.create||function(p,d){var n;return p!==null?(m[y]=N(p),n=new m,m[y]=null,n[M]=p):n=T(),d===void 0?n:g(n,d)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(F,q,j){var N=F("./_an-object"),g=F("./_ie8-dom-define"),O=F("./_to-primitive"),M=Object.defineProperty;j.f=F("./_descriptors")?Object.defineProperty:function(y,T,b){if(N(y),T=O(T,!0),N(b),g)try{return M(y,T,b)}catch(p){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(y[T]=b.value),y}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(F,q,j){var N=F("./_object-dp"),g=F("./_an-object"),O=F("./_object-keys");q.exports=F("./_descriptors")?Object.defineProperties:function(m,y){g(m);for(var T=O(y),b=T.length,p=0,d;b>p;)N.f(m,d=T[p++],y[d]);return m}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(F,q,j){var N=F("./_object-pie"),g=F("./_property-desc"),O=F("./_to-iobject"),M=F("./_to-primitive"),m=F("./_has"),y=F("./_ie8-dom-define"),T=Object.getOwnPropertyDescriptor;j.f=F("./_descriptors")?T:function(p,d){if(p=O(p),d=M(d,!0),y)try{return T(p,d)}catch(n){}if(m(p,d))return g(!N.f.call(p,d),p[d])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(F,q,j){var N=F("./_to-iobject"),g=F("./_object-gopn").f,O={}.toString,M=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],m=function(y){try{return g(y)}catch(T){return M.slice()}};q.exports.f=function(T){return M&&O.call(T)=="[object Window]"?m(T):g(N(T))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(F,q,j){var N=F("./_object-keys-internal"),g=F("./_enum-bug-keys").concat("length","prototype");j.f=Object.getOwnPropertyNames||function(M){return N(M,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(F,q,j){j.f=Object.getOwnPropertySymbols},{}],138:[function(F,q,j){var N=F("./_has"),g=F("./_to-object"),O=F("./_shared-key")("IE_PROTO"),M=Object.prototype;q.exports=Object.getPrototypeOf||function(m){return m=g(m),N(m,O)?m[O]:typeof m.constructor=="function"&&m instanceof m.constructor?m.constructor.prototype:m instanceof Object?M:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(F,q,j){var N=F("./_has"),g=F("./_to-iobject"),O=F("./_array-includes")(!1),M=F("./_shared-key")("IE_PROTO");q.exports=function(m,y){var T=g(m),b=0,p=[],d;for(d in T)d!=M&&(N(T,d)&&p.push(d));for(;y.length>b;)N(T,d=y[b++])&&(~O(p,d)||p.push(d));return p}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(F,q,j){var N=F("./_object-keys-internal"),g=F("./_enum-bug-keys");q.exports=Object.keys||function(M){return N(M,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(F,q,j){j.f={}.propertyIsEnumerable},{}],142:[function(F,q,j){var N=F("./_export"),g=F("./_core"),O=F("./_fails");q.exports=function(M,m){var y=(g.Object||{})[M]||Object[M],T={};T[M]=m(y),N(N.S+N.F*O(function(){y(1)}),"Object",T)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(F,q,j){var N=F("./_descriptors"),g=F("./_object-keys"),O=F("./_to-iobject"),M=F("./_object-pie").f;q.exports=function(m){return function(y){for(var T=O(y),b=g(T),p=b.length,d=0,n=[],c;p>d;)c=b[d++],(!N||M.call(T,c))&&n.push(m?[c,T[c]]:T[c]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(F,q,j){q.exports=function(N){try{return{e:!1,v:N()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(F,q,j){var N=F("./_an-object"),g=F("./_is-object"),O=F("./_new-promise-capability");q.exports=function(M,m){if(N(M),g(m)&&m.constructor===M)return m;var y=O.f(M),T=y.resolve;return T(m),y.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(F,q,j){q.exports=function(N,g){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:g}}},{}],147:[function(F,q,j){var N=F("./_hide");q.exports=function(g,O,M){for(var m in O)M&&g[m]?g[m]=O[m]:N(g,m,O[m]);return g}},{"./_hide":112}],148:[function(F,q,j){q.exports=F("./_hide")},{"./_hide":112}],149:[function(F,q,j){"use strict";var N=F("./_global"),g=F("./_core"),O=F("./_object-dp"),M=F("./_descriptors"),m=F("./_wks")("species");q.exports=function(y){var T=typeof g[y]=="function"?g[y]:N[y];M&&T&&!T[m]&&O.f(T,m,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(F,q,j){var N=F("./_object-dp").f,g=F("./_has"),O=F("./_wks")("toStringTag");q.exports=function(M,m,y){M&&!g(M=y?M:M.prototype,O)&&N(M,O,{configurable:!0,value:m})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(F,q,j){var N=F("./_shared")("keys"),g=F("./_uid");q.exports=function(O){return N[O]||(N[O]=g(O))}},{"./_shared":152,"./_uid":162}],152:[function(F,q,j){var N=F("./_core"),g=F("./_global"),O="__core-js_shared__",M=g[O]||(g[O]={});(q.exports=function(m,y){return M[m]||(M[m]=y!==void 0?y:{})})("versions",[]).push({version:N.version,mode:F("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(F,q,j){var N=F("./_an-object"),g=F("./_a-function"),O=F("./_wks")("species");q.exports=function(M,m){var y=N(M).constructor,T;return y===void 0||(T=N(y)[O])==null?m:g(T)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(F,q,j){var N=F("./_to-integer"),g=F("./_defined");q.exports=function(O){return function(M,m){var y=String(g(M)),T=N(m),b=y.length,p,d;return T<0||T>=b?O?"":void 0:(p=y.charCodeAt(T),p<55296||p>56319||T+1===b||(d=y.charCodeAt(T+1))<56320||d>57343?O?y.charAt(T):p:O?y.slice(T,T+2):(p-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(F,q,j){var N=F("./_ctx"),g=F("./_invoke"),O=F("./_html"),M=F("./_dom-create"),m=F("./_global"),y=m.process,T=m.setImmediate,b=m.clearImmediate,p=m.MessageChannel,d=m.Dispatch,n=0,c={},r="onreadystatechange",a,o,u,h=function(){var l=+this;if(c.hasOwnProperty(l)){var t=c[l];delete c[l],t()}},s=function(l){h.call(l.data)};(!T||!b)&&(T=function(t){for(var S=[],x=1;arguments.length>x;)S.push(arguments[x++]);return c[++n]=function(){g(typeof t=="function"?t:Function(t),S)},a(n),n},b=function(t){delete c[t]},F("./_cof")(y)=="process"?a=function(l){y.nextTick(N(h,l,1))}:d&&d.now?a=function(l){d.now(N(h,l,1))}:p?(o=new p,u=o.port2,o.port1.onmessage=s,a=N(u.postMessage,u,1)):m.addEventListener&&typeof postMessage=="function"&&!m.importScripts?(a=function(l){m.postMessage(l+"","*")},m.addEventListener("message",s,!1)):r in M("script")?a=function(l){O.appendChild(M("script"))[r]=function(){O.removeChild(this),h.call(l)}}:a=function(l){setTimeout(N(h,l,1),0)}),q.exports={set:T,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(F,q,j){var N=F("./_to-integer"),g=Math.max,O=Math.min;q.exports=function(M,m){return M=N(M),M<0?g(M+m,0):O(M,m)}},{"./_to-integer":157}],157:[function(F,q,j){var N=Math.ceil,g=Math.floor;q.exports=function(O){return isNaN(O=+O)?0:(O>0?g:N)(O)}},{}],158:[function(F,q,j){var N=F("./_iobject"),g=F("./_defined");q.exports=function(O){return N(g(O))}},{"./_defined":102,"./_iobject":116}],159:[function(F,q,j){var N=F("./_to-integer"),g=Math.min;q.exports=function(O){return O>0?g(N(O),9007199254740991):0}},{"./_to-integer":157}],160:[function(F,q,j){var N=F("./_defined");q.exports=function(g){return Object(N(g))}},{"./_defined":102}],161:[function(F,q,j){var N=F("./_is-object");q.exports=function(g,O){if(!N(g))return g;var M,m;if(O&&typeof(M=g.toString)=="function"&&!N(m=M.call(g)))return m;if(typeof(M=g.valueOf)=="function"&&!N(m=M.call(g)))return m;if(!O&&typeof(M=g.toString)=="function"&&!N(m=M.call(g)))return m;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(F,q,j){var N=0,g=Math.random();q.exports=function(O){return"Symbol(".concat(O===void 0?"":O,")_",(++N+g).toString(36))}},{}],163:[function(F,q,j){var N=F("./_global"),g=N.navigator;q.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(F,q,j){var N=F("./_global"),g=F("./_core"),O=F("./_library"),M=F("./_wks-ext"),m=F("./_object-dp").f;q.exports=function(y){var T=g.Symbol||(g.Symbol=O?{}:N.Symbol||{});y.charAt(0)!="_"&&!(y in T)&&m(T,y,{value:M.f(y)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(F,q,j){j.f=F("./_wks")},{"./_wks":166}],166:[function(F,q,j){var N=F("./_shared")("wks"),g=F("./_uid"),O=F("./_global").Symbol,M=typeof O=="function",m=q.exports=function(y){return N[y]||(N[y]=M&&O[y]||(M?O:g)("Symbol."+y))};m.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(F,q,j){var N=F("./_classof"),g=F("./_wks")("iterator"),O=F("./_iterators");q.exports=F("./_core").getIteratorMethod=function(M){if(M!=null)return M[g]||M["@@iterator"]||O[N(M)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(F,q,j){"use strict";var N=F("./_ctx"),g=F("./_export"),O=F("./_to-object"),M=F("./_iter-call"),m=F("./_is-array-iter"),y=F("./_to-length"),T=F("./_create-property"),b=F("./core.get-iterator-method");g(g.S+g.F*!F("./_iter-detect")(function(p){Array.from(p)}),"Array",{from:function(d){var n=O(d),c=typeof this=="function"?this:Array,r=arguments.length,a=r>1?arguments[1]:void 0,o=a!==void 0,u=0,h=b(n),s,l,t,S;if(o&&(a=N(a,r>2?arguments[2]:void 0,2)),h!=null&&!(c==Array&&m(h)))for(S=h.call(n),l=new c;!(t=S.next()).done;u++)T(l,u,o?M(S,a,[t.value,u],!0):t.value);else for(s=y(n.length),l=new c(s);s>u;u++)T(l,u,o?a(n[u],u):n[u]);return l.length=u,l}})},{"./_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(F,q,j){"use strict";var N=F("./_add-to-unscopables"),g=F("./_iter-step"),O=F("./_iterators"),M=F("./_to-iobject");q.exports=F("./_iter-define")(Array,"Array",function(m,y){this._t=M(m),this._i=0,this._k=y},function(){var m=this._t,y=this._k,T=this._i++;return!m||T>=m.length?(this._t=void 0,g(1)):y=="keys"?g(0,T):y=="values"?g(0,m[T]):g(0,[T,m[T]])},"values"),O.Arguments=O.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(F,q,j){"use strict";var N=F("./_is-object"),g=F("./_object-gpo"),O=F("./_wks")("hasInstance"),M=Function.prototype;O in M||F("./_object-dp").f(M,O,{value:function(m){if(typeof this!="function"||!N(m))return!1;if(!N(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(F,q,j){var N=F("./_export");N(N.S+N.F,"Object",{assign:F("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(F,q,j){var N=F("./_export");N(N.S,"Object",{create:F("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(F,q,j){var N=F("./_export");N(N.S+N.F*!F("./_descriptors"),"Object",{defineProperty:F("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(F,q,j){F("./_object-sap")("getOwnPropertyNames",function(){return F("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(F,q,j){var N=F("./_to-object"),g=F("./_object-gpo");F("./_object-sap")("getPrototypeOf",function(){return function(M){return g(N(M))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(F,q,j){var N=F("./_to-object"),g=F("./_object-keys");F("./_object-sap")("keys",function(){return function(M){return g(N(M))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(F,q,j){arguments[4][71][0].apply(j,arguments)},{dup:71}],178:[function(F,q,j){"use strict";var N=F("./_library"),g=F("./_global"),O=F("./_ctx"),M=F("./_classof"),m=F("./_export"),y=F("./_is-object"),T=F("./_a-function"),b=F("./_an-instance"),p=F("./_for-of"),d=F("./_species-constructor"),n=F("./_task").set,c=F("./_microtask")(),r=F("./_new-promise-capability"),a=F("./_perform"),o=F("./_user-agent"),u=F("./_promise-resolve"),h="Promise",s=g.TypeError,l=g.process,t=l&&l.versions,S=t&&t.v8||"",x=g[h],f=M(l)=="process",R=function(){},C,v,_,E,w=v=r.f,k=!!function(){try{var P=x.resolve(1),z=(P.constructor={})[F("./_wks")("species")]=function(J){J(R,R)};return(f||typeof PromiseRejectionEvent=="function")&&P.then(R)instanceof z&&S.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch(J){}}(),I=function(P){var z;return y(P)&&typeof(z=P.then)=="function"?z:!1},L=function(P,z){if(P._n)return;P._n=!0;var J=P._c;c(function(){for(var ue=P._v,de=P._s==1,Se=0,Ae=function(pe){var Oe=de?pe.ok:pe.fail,ye=pe.resolve,ce=pe.reject,ae=pe.domain,re,fe,te;try{Oe?(de||(P._h==2&&H(P),P._h=1),Oe===!0?re=ue:(ae&&ae.enter(),re=Oe(ue),ae&&(ae.exit(),te=!0)),re===pe.promise?ce(s("Promise-chain cycle")):(fe=I(re))?fe.call(re,ye,ce):ye(re)):ce(ue)}catch(ne){ae&&!te&&ae.exit(),ce(ne)}};J.length>Se;)Ae(J[Se++]);P._c=[],P._n=!1,z&&!P._h&&V(P)})},V=function(P){n.call(g,function(){var z=P._v,J=W(P),ue,de,Se;if(J&&(ue=a(function(){f?l.emit("unhandledRejection",z,P):(de=g.onunhandledrejection)?de({promise:P,reason:z}):(Se=g.console)&&Se.error&&Se.error("Unhandled promise rejection",z)}),P._h=f||W(P)?2:1),P._a=void 0,J&&ue.e)throw ue.v})},W=function(P){return P._h!==1&&(P._a||P._c).length===0},H=function(P){n.call(g,function(){var z;f?l.emit("rejectionHandled",P):(z=g.onrejectionhandled)&&z({promise:P,reason:P._v})})},G=function(P){var z=this;if(z._d)return;z._d=!0,z=z._w||z,z._v=P,z._s=2,z._a||(z._a=z._c.slice()),L(z,!0)},B=function(P){var z=this,J;if(z._d)return;z._d=!0,z=z._w||z;try{if(z===P)throw s("Promise can't be resolved itself");(J=I(P))?c(function(){var ue={_w:z,_d:!1};try{J.call(P,O(B,ue,1),O(G,ue,1))}catch(de){G.call(ue,de)}}):(z._v=P,z._s=1,L(z,!1))}catch(ue){G.call({_w:z,_d:!1},ue)}};k||(x=function(z){b(this,x,h,"_h"),T(z),C.call(this);try{z(O(B,this,1),O(G,this,1))}catch(J){G.call(this,J)}},C=function(z){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=F("./_redefine-all")(x.prototype,{then:function(z,J){var ue=w(d(this,x));return ue.ok=typeof z=="function"?z:!0,ue.fail=typeof J=="function"&&J,ue.domain=f?l.domain:void 0,this._c.push(ue),this._a&&this._a.push(ue),this._s&&L(this,!1),ue.promise},catch:function(P){return this.then(void 0,P)}}),_=function(){var P=new C;this.promise=P,this.resolve=O(B,P,1),this.reject=O(G,P,1)},r.f=w=function(P){return P===x||P===E?new _(P):v(P)}),m(m.G+m.W+m.F*!k,{Promise:x}),F("./_set-to-string-tag")(x,h),F("./_set-species")(h),E=F("./_core")[h],m(m.S+m.F*!k,h,{reject:function(z){var J=w(this),ue=J.reject;return ue(z),J.promise}}),m(m.S+m.F*(N||!k),h,{resolve:function(z){return u(N&&this===E?x:this,z)}}),m(m.S+m.F*!(k&&F("./_iter-detect")(function(P){x.all(P).catch(R)})),h,{all:function(z){var J=this,ue=w(J),de=ue.resolve,Se=ue.reject,Ae=a(function(){var pe=[],Oe=0,ye=1;p(z,!1,function(ce){var ae=Oe++,re=!1;pe.push(void 0),ye++,J.resolve(ce).then(function(fe){if(re)return;re=!0,pe[ae]=fe,--ye||de(pe)},Se)}),--ye||de(pe)});return Ae.e&&Se(Ae.v),ue.promise},race:function(z){var J=this,ue=w(J),de=ue.reject,Se=a(function(){p(z,!1,function(Ae){J.resolve(Ae).then(ue.resolve,de)})});return Se.e&&de(Se.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(F,q,j){var N=F("./_export"),g=F("./_to-absolute-index"),O=String.fromCharCode,M=String.fromCodePoint;N(N.S+N.F*(!!M&&M.length!=1),"String",{fromCodePoint:function(y){for(var T=[],b=arguments.length,p=0,d;b>p;){if(d=+arguments[p++],g(d,1114111)!==d)throw RangeError(d+" is not a valid code point");T.push(d<65536?O(d):O(((d-=65536)>>10)+55296,d%1024+56320))}return T.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(F,q,j){"use strict";var N=F("./_string-at")(!0);F("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,O=this._i,M;return O>=g.length?{value:void 0,done:!0}:(M=N(g,O),this._i+=M.length,{value:M,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(F,q,j){"use strict";var N=F("./_global"),g=F("./_has"),O=F("./_descriptors"),M=F("./_export"),m=F("./_redefine"),y=F("./_meta").KEY,T=F("./_fails"),b=F("./_shared"),p=F("./_set-to-string-tag"),d=F("./_uid"),n=F("./_wks"),c=F("./_wks-ext"),r=F("./_wks-define"),a=F("./_enum-keys"),o=F("./_is-array"),u=F("./_an-object"),h=F("./_is-object"),s=F("./_to-object"),l=F("./_to-iobject"),t=F("./_to-primitive"),S=F("./_property-desc"),x=F("./_object-create"),f=F("./_object-gopn-ext"),R=F("./_object-gopd"),C=F("./_object-gops"),v=F("./_object-dp"),_=F("./_object-keys"),E=R.f,w=v.f,k=f.f,I=N.Symbol,L=N.JSON,V=L&&L.stringify,W="prototype",H=n("_hidden"),G=n("toPrimitive"),B={}.propertyIsEnumerable,P=b("symbol-registry"),z=b("symbols"),J=b("op-symbols"),ue=Object[W],de=typeof I=="function"&&!!C.f,Se=N.QObject,Ae=!Se||!Se[W]||!Se[W].findChild,pe=O&&T(function(){return x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a!=7})?function(ve,Re,Je){var qe=E(ue,Re);qe&&delete ue[Re],w(ve,Re,Je),qe&&ve!==ue&&w(ue,Re,qe)}:w,Oe=function(ve){var Re=z[ve]=x(I[W]);return Re._k=ve,Re},ye=de&&typeof I.iterator=="symbol"?function(ve){return typeof ve=="symbol"}:function(ve){return ve instanceof I},ce=function(Re,Je,qe){return Re===ue&&ce(J,Je,qe),u(Re),Je=t(Je,!0),u(qe),g(z,Je)?(qe.enumerable?(g(Re,H)&&Re[H][Je]&&(Re[H][Je]=!1),qe=x(qe,{enumerable:S(0,!1)})):(g(Re,H)||w(Re,H,S(1,{})),Re[H][Je]=!0),pe(Re,Je,qe)):w(Re,Je,qe)},ae=function(Re,Je){u(Re);for(var qe=a(Je=l(Je)),rt=0,ut=qe.length,dt;ut>rt;)ce(Re,dt=qe[rt++],Je[dt]);return Re},re=function(Re,Je){return Je===void 0?x(Re):ae(x(Re),Je)},fe=function(Re){var Je=B.call(this,Re=t(Re,!0));return this===ue&&g(z,Re)&&!g(J,Re)?!1:Je||!g(this,Re)||!g(z,Re)||g(this,H)&&this[H][Re]?Je:!0},te=function(Re,Je){if(Re=l(Re),Je=t(Je,!0),Re===ue&&g(z,Je)&&!g(J,Je))return;var qe=E(Re,Je);return qe&&g(z,Je)&&!(g(Re,H)&&Re[H][Je])&&(qe.enumerable=!0),qe},ne=function(Re){for(var Je=k(l(Re)),qe=[],rt=0,ut;Je.length>rt;)!g(z,ut=Je[rt++])&&ut!=H&&ut!=y&&qe.push(ut);return qe},Te=function(Re){for(var Je=Re===ue,qe=k(Je?J:l(Re)),rt=[],ut=0,dt;qe.length>ut;)g(z,dt=qe[ut++])&&(Je?g(ue,dt):!0)&&rt.push(z[dt]);return rt};de||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var Re=d(arguments.length>0?arguments[0]:void 0),Je=function(qe){this===ue&&Je.call(J,qe),g(this,H)&&g(this[H],Re)&&(this[H][Re]=!1),pe(this,Re,S(1,qe))};return O&&Ae&&pe(ue,Re,{configurable:!0,set:Je}),Oe(Re)},m(I[W],"toString",function(){return this._k}),R.f=te,v.f=ce,F("./_object-gopn").f=f.f=ne,F("./_object-pie").f=fe,C.f=Te,O&&!F("./_library")&&m(ue,"propertyIsEnumerable",fe,!0),c.f=function(ve){return Oe(n(ve))}),M(M.G+M.W+M.F*!de,{Symbol:I});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Z=0;ie.length>Z;)n(ie[Z++]);for(var X=_(n.store),Q=0;X.length>Q;)r(X[Q++]);M(M.S+M.F*!de,"Symbol",{for:function(ve){return g(P,ve+="")?P[ve]:P[ve]=I(ve)},keyFor:function(Re){if(!ye(Re))throw TypeError(Re+" is not a symbol!");for(var Je in P)if(P[Je]===Re)return Je},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),M(M.S+M.F*!de,"Object",{create:re,defineProperty:ce,defineProperties:ae,getOwnPropertyDescriptor:te,getOwnPropertyNames:ne,getOwnPropertySymbols:Te});var _e=T(function(){C.f(1)});M(M.S+M.F*_e,"Object",{getOwnPropertySymbols:function(Re){return C.f(s(Re))}}),L&&M(M.S+M.F*(!de||T(function(){var ve=I();return V([ve])!="[null]"||V({a:ve})!="{}"||V(Object(ve))!="{}"})),"JSON",{stringify:function(Re){for(var Je=[Re],qe=1,rt,ut;arguments.length>qe;)Je.push(arguments[qe++]);return ut=rt=Je[1],!h(rt)&&Re===void 0||ye(Re)?void 0:(o(rt)||(rt=function(dt,ft){if(typeof ut=="function"&&(ft=ut.call(this,dt,ft)),!ye(ft))return ft}),Je[1]=rt,V.apply(L,Je))}}),I[W][G]||F("./_hide")(I[W],G,I[W].valueOf),p(I,"Symbol"),p(Math,"Math",!0),p(N.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(F,q,j){var N=F("./_export"),g=F("./_object-to-array")(!0);N(N.S,"Object",{entries:function(M){return g(M)}})},{"./_export":107,"./_object-to-array":143}],183:[function(F,q,j){"use strict";var N=F("./_export"),g=F("./_core"),O=F("./_global"),M=F("./_species-constructor"),m=F("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(y){var T=M(this,g.Promise||O.Promise),b=typeof y=="function";return this.then(b?function(p){return m(T,y()).then(function(){return p})}:y,b?function(p){return m(T,y()).then(function(){throw p})}:y)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(F,q,j){"use strict";var N=F("./_export"),g=F("./_new-promise-capability"),O=F("./_perform");N(N.S,"Promise",{try:function(M){var m=g.f(this),y=O(M);return(y.e?m.reject:m.resolve)(y.v),m.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(F,q,j){F("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(F,q,j){F("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(F,q,j){F("./es6.array.iterator");for(var N=F("./_global"),g=F("./_hide"),O=F("./_iterators"),M=F("./_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(","),y=0;y<m.length;y++){var T=m[y],b=N[T],p=b&&b.prototype;p&&!p[M]&&g(p,M,T),O[T]=O.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(F,q,j){var N=F("./_export"),g=F("./_task");N(N.G+N.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/helpers/typeof"),O=M(g);function M(t){return t&&t.__esModule?t:{default:t}}function m(t){return Array.isArray?Array.isArray(t):l(t)==="[object Array]"}j.isArray=m;function y(t){return typeof t=="boolean"}j.isBoolean=y;function T(t){return t===null}j.isNull=T;function b(t){return t==null}j.isNullOrUndefined=b;function p(t){return typeof t=="number"}j.isNumber=p;function d(t){return typeof t=="string"}j.isString=d;function n(t){return(typeof t=="undefined"?"undefined":(0,O.default)(t))==="symbol"}j.isSymbol=n;function c(t){return t===void 0}j.isUndefined=c;function r(t){return l(t)==="[object RegExp]"}j.isRegExp=r;function a(t){return(typeof t=="undefined"?"undefined":(0,O.default)(t))==="object"&&t!==null}j.isObject=a;function o(t){return l(t)==="[object Date]"}j.isDate=o;function u(t){return l(t)==="[object Error]"||t instanceof Error}j.isError=u;function h(t){return typeof t=="function"}j.isFunction=h;function s(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,O.default)(t))==="symbol"||typeof t=="undefined"}j.isPrimitive=s,j.isBuffer=N.isBuffer;function l(t){return Object.prototype.toString.call(t)}}).call(this,{isBuffer:F("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(F,q,j){"use strict";var N=F("babel-runtime/helpers/typeof"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(M){"use strict";var m=function(){var d=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,n=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g;return function(r,a,o,u){if(arguments.length===1&&p(r)==="string"&&!/\d/.test(r)&&(a=r,r=void 0),r=r||new Date,r instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");a=String(m.masks[a]||a||m.masks.default);var h=a.slice(0,4);(h==="UTC:"||h==="GMT:")&&(a=a.slice(4),o=!0,h==="GMT:"&&(u=!0));var s=o?"getUTC":"get",l=r[s+"Date"](),t=r[s+"Day"](),S=r[s+"Month"](),x=r[s+"FullYear"](),f=r[s+"Hours"](),R=r[s+"Minutes"](),C=r[s+"Seconds"](),v=r[s+"Milliseconds"](),_=o?0:r.getTimezoneOffset(),E=T(r),w=b(r),k={d:l,dd:y(l),ddd:m.i18n.dayNames[t],dddd:m.i18n.dayNames[t+7],m:S+1,mm:y(S+1),mmm:m.i18n.monthNames[S],mmmm:m.i18n.monthNames[S+12],yy:String(x).slice(2),yyyy:x,h:f%12||12,hh:y(f%12||12),H:f,HH:y(f),M:R,MM:y(R),s:C,ss:y(C),l:y(v,3),L:y(Math.round(v/10)),t:f<12?"a":"p",tt:f<12?"am":"pm",T:f<12?"A":"P",TT:f<12?"AM":"PM",Z:u?"GMT":o?"UTC":(String(r).match(n)||[""]).pop().replace(c,""),o:(_>0?"-":"+")+y(Math.floor(Math.abs(_)/60)*100+Math.abs(_)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:E,N:w};return a.replace(d,function(I){return I in k?k[I]:I.slice(1,I.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 y(d,n){for(d=String(d),n=n||2;d.length<n;)d="0"+d;return d}function T(d){var n=new Date(d.getFullYear(),d.getMonth(),d.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var c=new Date(n.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var r=n.getTimezoneOffset()-c.getTimezoneOffset();n.setHours(n.getHours()-r);var a=(n-c)/(864e5*7);return 1+Math.floor(a)}function b(d){var n=d.getDay();return n===0&&(n=7),n}function p(d){return d===null?"null":d===void 0?"undefined":(typeof d=="undefined"?"undefined":(0,g.default)(d))!=="object"?typeof d=="undefined"?"undefined":(0,g.default)(d):Array.isArray(d)?"array":{}.toString.call(d).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return m}):(typeof j=="undefined"?"undefined":(0,g.default)(j))==="object"?q.exports=m:M.dateFormat=m})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(F,q,j){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var N=/["'&<>]/;q.exports=g;function g(O){var M=""+O,m=N.exec(M);if(!m)return M;var y,T="",b=0,p=0;for(b=m.index;b<M.length;b++){switch(M.charCodeAt(b)){case 34:y="&quot;";break;case 38:y="&amp;";break;case 39:y="&#39;";break;case 60:y="&lt;";break;case 62:y="&gt;";break;default:continue}p!==b&&(T+=M.substring(p,b)),p=b+1,T+=y}return p!==b?T+M.substring(p,b):T}},{}],192:[function(F,q,j){function N(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}q.exports=N,N.EventEmitter=N,N.prototype._events=void 0,N.prototype._maxListeners=void 0,N.defaultMaxListeners=10,N.prototype.setMaxListeners=function(y){if(!O(y)||y<0||isNaN(y))throw TypeError("n must be a positive number");return this._maxListeners=y,this},N.prototype.emit=function(y){var T,b,p,d,n,c;if(this._events||(this._events={}),y==="error"&&(!this._events.error||M(this._events.error)&&!this._events.error.length)){if(T=arguments[1],T instanceof Error)throw T;var r=new Error('Uncaught, unspecified "error" event. ('+T+")");throw r.context=T,r}if(b=this._events[y],m(b))return!1;if(g(b))switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),b.apply(this,d)}else if(M(b))for(d=Array.prototype.slice.call(arguments,1),c=b.slice(),p=c.length,n=0;n<p;n++)c[n].apply(this,d);return!0},N.prototype.addListener=function(y,T){var b;if(!g(T))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",y,g(T.listener)?T.listener:T),this._events[y]?M(this._events[y])?this._events[y].push(T):this._events[y]=[this._events[y],T]:this._events[y]=T,M(this._events[y])&&!this._events[y].warned&&(m(this._maxListeners)?b=N.defaultMaxListeners:b=this._maxListeners,b&&b>0&&this._events[y].length>b&&(this._events[y].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[y].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(y,T){if(!g(T))throw TypeError("listener must be a function");var b=!1;function p(){this.removeListener(y,p),b||(b=!0,T.apply(this,arguments))}return p.listener=T,this.on(y,p),this},N.prototype.removeListener=function(y,T){var b,p,d,n;if(!g(T))throw TypeError("listener must be a function");if(!this._events||!this._events[y])return this;if(b=this._events[y],d=b.length,p=-1,b===T||g(b.listener)&&b.listener===T)delete this._events[y],this._events.removeListener&&this.emit("removeListener",y,T);else if(M(b)){for(n=d;n-- >0;)if(b[n]===T||b[n].listener&&b[n].listener===T){p=n;break}if(p<0)return this;b.length===1?(b.length=0,delete this._events[y]):b.splice(p,1),this._events.removeListener&&this.emit("removeListener",y,T)}return this},N.prototype.removeAllListeners=function(y){var T,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[y]&&delete this._events[y],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(b=this._events[y],g(b))this.removeListener(y,b);else if(b)for(;b.length;)this.removeListener(y,b[b.length-1]);return delete this._events[y],this},N.prototype.listeners=function(y){var T;return!this._events||!this._events[y]?T=[]:g(this._events[y])?T=[this._events[y]]:T=this._events[y].slice(),T},N.prototype.listenerCount=function(y){if(this._events){var T=this._events[y];if(g(T))return 1;if(T)return T.length}return 0},N.listenerCount=function(y,T){return y.listenerCount(T)};function g(y){return typeof y=="function"}function O(y){return typeof y=="number"}function M(y){return typeof y=="object"&&y!==null}function m(y){return y===void 0}},{}],193:[function(F,q,j){var N=F("http"),g=q.exports;for(var O in N)N.hasOwnProperty(O)&&(g[O]=N[O]);g.request=function(M,m){return M||(M={}),M.scheme="https",M.protocol="https:",N.request.call(this,M,m)}},{http:231}],194:[function(F,q,j){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var N=F("util"),g=F("ms");q.exports=function(O){if(typeof O=="number")return O;var M=g(O);if(M===void 0){var m=new Error(N.format("humanize-ms(%j) result undefined",O));console.warn(m.stack)}return M}},{ms:204,util:243}],195:[function(F,q,j){j.read=function(N,g,O,M,m){var y,T,b=m*8-M-1,p=(1<<b)-1,d=p>>1,n=-7,c=O?m-1:0,r=O?-1:1,a=N[g+c];for(c+=r,y=a&(1<<-n)-1,a>>=-n,n+=b;n>0;y=y*256+N[g+c],c+=r,n-=8);for(T=y&(1<<-n)-1,y>>=-n,n+=M;n>0;T=T*256+N[g+c],c+=r,n-=8);if(y===0)y=1-d;else{if(y===p)return T?NaN:(a?-1:1)*Infinity;T=T+Math.pow(2,M),y=y-d}return(a?-1:1)*T*Math.pow(2,y-M)},j.write=function(N,g,O,M,m,y){var T,b,p,d=y*8-m-1,n=(1<<d)-1,c=n>>1,r=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=M?0:y-1,o=M?1:-1,u=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(b=isNaN(g)?1:0,T=n):(T=Math.floor(Math.log(g)/Math.LN2),g*(p=Math.pow(2,-T))<1&&(T--,p*=2),T+c>=1?g+=r/p:g+=r*Math.pow(2,1-c),g*p>=2&&(T++,p/=2),T+c>=n?(b=0,T=n):T+c>=1?(b=(g*p-1)*Math.pow(2,m),T=T+c):(b=g*Math.pow(2,c-1)*Math.pow(2,m),T=0));m>=8;N[O+a]=b&255,a+=o,b/=256,m-=8);for(T=T<<m|b,d+=m;d>0;N[O+a]=T&255,a+=o,T/=256,d-=8);N[O+a-o]|=u*128}},{}],196:[function(F,q,j){typeof Object.create=="function"?q.exports=function(g,O){O&&(g.super_=O,g.prototype=Object.create(O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(g,O){if(O){g.super_=O;var M=function(){};M.prototype=O.prototype,g.prototype=new M,g.prototype.constructor=g}}},{}],197:[function(F,q,j){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/q.exports=function(O){return O!=null&&(N(O)||g(O)||!!O._isBuffer)};function N(O){return!!O.constructor&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}function g(O){return typeof O.readFloatLE=="function"&&typeof O.slice=="function"&&N(O.slice(0,0))}},{}],198:[function(F,q,j){var N={}.toString;q.exports=Array.isArray||function(g){return N.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(F,q){typeof exports=="object"&&typeof module!="undefined"?module.exports=q(F):typeof define=="function"&&define.amd?define(q):q(F)})(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(F){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(F){for(var q={},j=0,N=F.length;j<N;j++)q[F.charAt(j)]=j;return q}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(F){if(F.length<2){var q=F.charCodeAt(0);return q<128?F:q<2048?fromCharCode(192|q>>>6)+fromCharCode(128|q&63):fromCharCode(224|q>>>12&15)+fromCharCode(128|q>>>6&63)+fromCharCode(128|q&63)}else{var q=65536+(F.charCodeAt(0)-55296)*1024+(F.charCodeAt(1)-56320);return fromCharCode(240|q>>>18&7)+fromCharCode(128|q>>>12&63)+fromCharCode(128|q>>>6&63)+fromCharCode(128|q&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(F){return F.replace(re_utob,cb_utob)},cb_encode=function(F){var q=[0,2,1][F.length%3],j=F.charCodeAt(0)<<16|(F.length>1?F.charCodeAt(1):0)<<8|(F.length>2?F.charCodeAt(2):0),N=[b64chars.charAt(j>>>18),b64chars.charAt(j>>>12&63),q>=2?"=":b64chars.charAt(j>>>6&63),q>=1?"=":b64chars.charAt(j&63)];return N.join("")},btoa=global.btoa?function(F){return global.btoa(F)}:function(F){return F.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(F){var q=Object.prototype.toString.call(F)==="[object Uint8Array]";return q?F.toString("base64"):btoa(utob(String(F)))},encode=function(F,q){return q?_encode(String(F)).replace(/[+\/]/g,function(j){return j=="+"?"-":"_"}).replace(/=/g,""):_encode(F)},encodeURI=function(F){return encode(F,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(F){switch(F.length){case 4:var q=(7&F.charCodeAt(0))<<18|(63&F.charCodeAt(1))<<12|(63&F.charCodeAt(2))<<6|63&F.charCodeAt(3),j=q-65536;return fromCharCode((j>>>10)+55296)+fromCharCode((j&1023)+56320);case 3:return fromCharCode((15&F.charCodeAt(0))<<12|(63&F.charCodeAt(1))<<6|63&F.charCodeAt(2));default:return fromCharCode((31&F.charCodeAt(0))<<6|63&F.charCodeAt(1))}},btou=function(F){return F.replace(re_btou,cb_btou)},cb_decode=function(F){var q=F.length,j=q%4,N=(q>0?b64tab[F.charAt(0)]<<18:0)|(q>1?b64tab[F.charAt(1)]<<12:0)|(q>2?b64tab[F.charAt(2)]<<6:0)|(q>3?b64tab[F.charAt(3)]:0),g=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return g.length-=[0,0,2,1][j],g.join("")},_atob=global.atob?function(F){return global.atob(F)}:function(F){return F.replace(/\S{1,4}/g,cb_decode)},atob=function(F){return _atob(String(F).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(F){return(F.constructor===buffer.constructor?F:buffer.from(F,"base64")).toString()}:function(F){return(F.constructor===buffer.constructor?F:new buffer(F,"base64")).toString()}:function(F){return btou(_atob(F))},decode=function(F){return _decode(String(F).replace(/[-_]/g,function(q){return q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var F=global.Base64;return global.Base64=_Base64,F};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(F){return{value:F,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(F){return encode(this,F)})),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(F,q,j){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";q.exports=g;var N=Object.prototype.hasOwnProperty;function g(O,M,m){if(!O)throw new TypeError("argument dest is required");if(!M)throw new TypeError("argument src is required");return m===void 0&&(m=!0),Object.getOwnPropertyNames(M).forEach(function(T){if(!m&&N.call(O,T))return;var b=Object.getOwnPropertyDescriptor(M,T);Object.defineProperty(O,T,b)}),O}},{}],201:[function(F,q,j){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}N.prototype.define=function(g,O){for(var M in g){var m=g[M].map(function(b){return b.toLowerCase()});M=M.toLowerCase();for(var y=0;y<m.length;y++){var T=m[y];if(T[0]=="*")continue;if(!O&&T in this._types)throw new Error('Attempt to change mapping for "'+T+'" extension from "'+this._types[T]+'" to "'+M+'". Pass `force=true` to allow this, otherwise remove "'+T+'" from the list of extensions for "'+M+'".');this._types[T]=M}if(O||!this._extensions[M]){var T=m[0];this._extensions[M]=T[0]!="*"?T:T.substr(1)}}},N.prototype.getType=function(g){g=String(g);var O=g.replace(/^.*[/\\]/,"").toLowerCase(),M=O.replace(/^.*\./,"").toLowerCase(),m=O.length<g.length,y=M.length<O.length-1;return(y||!m)&&this._types[M]||null},N.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},q.exports=N},{}],202:[function(F,q,j){"use strict";var N=F("./Mime");q.exports=new N(F("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(F,q,j){q.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(F,q,j){var N=1e3,g=N*60,O=g*60,M=O*24,m=M*7,y=M*365.25;q.exports=function(n,c){c=c||{};var r=typeof n;if(r==="string"&&n.length>0)return T(n);if(r==="number"&&isFinite(n))return c.long?p(n):b(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function T(n){if(n=String(n),n.length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!c)return;var r=parseFloat(c[1]),a=(c[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return r*y;case"weeks":case"week":case"w":return r*m;case"days":case"day":case"d":return r*M;case"hours":case"hour":case"hrs":case"hr":case"h":return r*O;case"minutes":case"minute":case"mins":case"min":case"m":return r*g;case"seconds":case"second":case"secs":case"sec":case"s":return r*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function b(n){var c=Math.abs(n);return c>=M?Math.round(n/M)+"d":c>=O?Math.round(n/O)+"h":c>=g?Math.round(n/g)+"m":c>=N?Math.round(n/N)+"s":n+"ms"}function p(n){var c=Math.abs(n);return c>=M?d(n,c,M,"day"):c>=O?d(n,c,O,"hour"):c>=g?d(n,c,g,"minute"):c>=N?d(n,c,N,"second"):n+" ms"}function d(n,c,r,a){var o=c>=r*1.5;return Math.round(n/r)+" "+a+(o?"s":"")}},{}],205:[function(F,q,j){(function(N){function g(y,T){for(var b=0,p=y.length-1;p>=0;p--){var d=y[p];d==="."?y.splice(p,1):d===".."?(y.splice(p,1),b++):b&&(y.splice(p,1),b--)}if(T)for(;b--;b)y.unshift("..");return y}j.resolve=function(){for(var y="",T=!1,b=arguments.length-1;b>=-1&&!T;b--){var p=b>=0?arguments[b]:N.cwd();if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;y=p+"/"+y,T=p.charAt(0)==="/"}return y=g(M(y.split("/"),function(d){return!!d}),!T).join("/"),(T?"/":"")+y||"."},j.normalize=function(y){var T=j.isAbsolute(y),b=m(y,-1)==="/";return y=g(M(y.split("/"),function(p){return!!p}),!T).join("/"),!y&&!T&&(y="."),y&&b&&(y+="/"),(T?"/":"")+y},j.isAbsolute=function(y){return y.charAt(0)==="/"},j.join=function(){var y=Array.prototype.slice.call(arguments,0);return j.normalize(M(y,function(T,b){if(typeof T!="string")throw new TypeError("Arguments to path.join must be strings");return T}).join("/"))},j.relative=function(y,T){y=j.resolve(y).substr(1),T=j.resolve(T).substr(1);function b(o){for(var u=0;u<o.length&&!(o[u]!=="");u++);for(var h=o.length-1;h>=0&&!(o[h]!=="");h--);return u>h?[]:o.slice(u,h-u+1)}for(var p=b(y.split("/")),d=b(T.split("/")),n=Math.min(p.length,d.length),c=n,r=0;r<n;r++)if(p[r]!==d[r]){c=r;break}for(var a=[],r=c;r<p.length;r++)a.push("..");return a=a.concat(d.slice(c)),a.join("/")},j.sep="/",j.delimiter=":",j.dirname=function(y){if(typeof y!="string"&&(y=y+""),y.length===0)return".";for(var T=y.charCodeAt(0),b=T===47,p=-1,d=!0,n=y.length-1;n>=1;--n)if(T=y.charCodeAt(n),T===47){if(!d){p=n;break}}else d=!1;return p===-1?b?"/":".":b&&p===1?"/":y.slice(0,p)};function O(y){typeof y!="string"&&(y=y+"");var T=0,b=-1,p=!0,d;for(d=y.length-1;d>=0;--d)if(y.charCodeAt(d)===47){if(!p){T=d+1;break}}else b===-1&&(p=!1,b=d+1);return b===-1?"":y.slice(T,b)}j.basename=function(y,T){var b=O(y);return T&&b.substr(-1*T.length)===T&&(b=b.substr(0,b.length-T.length)),b},j.extname=function(y){typeof y!="string"&&(y=y+"");for(var T=-1,b=0,p=-1,d=!0,n=0,c=y.length-1;c>=0;--c){var r=y.charCodeAt(c);if(r===47){if(!d){b=c+1;break}continue}p===-1&&(d=!1,p=c+1),r===46?T===-1?T=c:n!==1&&(n=1):T!==-1&&(n=-1)}return T===-1||p===-1||n===0||n===1&&T===p-1&&T===b+1?"":y.slice(T,p)};function M(y,T){if(y.filter)return y.filter(T);for(var b=[],p=0;p<y.length;p++)T(y[p],p,y)&&b.push(y[p]);return b}var m="ab".substr(-1)==="b"?function(y,T,b){return y.substr(T,b)}:function(y,T,b){return T<0&&(T=y.length+T),y.substr(T,b)}}).call(this,F("_process"))},{_process:208}],206:[function(F,q,j){(function(N){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var g={function:!0,object:!0},O=g[typeof window]&&window||this,M=O,m=g[typeof j]&&j,y=g[typeof q]&&q&&!q.nodeType&&q,T=m&&y&&typeof N=="object"&&N;T&&(T.global===T||T.window===T||T.self===T)&&(O=T);var b=Math.pow(2,53)-1,p=/\bOpera/,d=this,n=Object.prototype,c=n.hasOwnProperty,r=n.toString;function a(v){return v=String(v),v.charAt(0).toUpperCase()+v.slice(1)}function o(v,_,E){var w={"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&&/^Win/i.test(v)&&!/^Windows Phone /i.test(v)&&(w=w[/[\d.]+$/.exec(v)])&&(v="Windows "+w),v=String(v),_&&E&&(v=v.replace(RegExp(_,"i"),E)),v=h(v.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]),v}function u(v,_){var E=-1,w=v?v.length:0;if(typeof w=="number"&&w>-1&&w<=b)for(;++E<w;)_(v[E],E,v);else s(v,_)}function h(v){return v=f(v),/^(?:webOS|i(?:OS|P))/.test(v)?v:a(v)}function s(v,_){for(var E in v)c.call(v,E)&&_(v[E],E,v)}function l(v){return v==null?a(v):r.call(v).slice(8,-1)}function t(v,_){var E=v!=null?typeof v[_]:"number";return!/^(?:boolean|number|string|undefined)$/.test(E)&&(E=="object"?!!v[_]:!0)}function S(v){return String(v).replace(/([ -])(?!$)/g,"$1?")}function x(v,_){var E=null;return u(v,function(w,k){E=_(E,w,k,v)}),E}function f(v){return String(v).replace(/^ +| +$/g,"")}function R(v){var _=O,E=v&&typeof v=="object"&&l(v)!="String";E&&(_=v,v=null);var w=_.navigator||{},k=w.userAgent||"";v||(v=k);var I=E||d==M,L=E?!!w.likeChrome:/\bChrome\b/.test(v)&&!/internal|\n/i.test(r.toString()),V="Object",W=E?V:"ScriptBridgingProxyObject",H=E?V:"Environment",G=E&&_.java?"JavaPackage":l(_.java),B=E?V:"RuntimeObject",P=/\bJava/.test(G)&&_.java,z=P&&l(_.environment)==H,J=P?"a":"\u03B1",ue=P?"b":"\u03B2",de=_.document||{},Se=_.operamini||_.opera,Ae=p.test(Ae=E&&Se?Se["[[Class]]"]:l(Se))?Ae:Se=null,pe,Oe=v,ye=[],ce=null,ae=v==k,re=ae&&Se&&typeof Se.version=="function"&&Se.version(),fe,te=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ne=_e(["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"]),Te=Re([{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=Q({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}}),Z=ve(["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 X(ut){return x(ut,function(dt,ft){return dt||RegExp("\\b"+(ft.pattern||S(ft))+"\\b","i").exec(v)&&(ft.label||ft)})}function Q(ut){return x(ut,function(dt,ft,Be){return dt||(ft[Te]||ft[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Te)]||RegExp("\\b"+S(Be)+"(?:\\b|\\w*\\d)","i").exec(v))&&Be})}function _e(ut){return x(ut,function(dt,ft){return dt||RegExp("\\b"+(ft.pattern||S(ft))+"\\b","i").exec(v)&&(ft.label||ft)})}function ve(ut){return x(ut,function(dt,ft){var Be=ft.pattern||S(ft);return!dt&&(dt=RegExp("\\b"+Be+"(?:/[\\d.]+|[ \\w.]*)","i").exec(v))&&(dt=o(dt,Be,ft.label||ft)),dt})}function Re(ut){return x(ut,function(dt,ft){var Be=ft.pattern||S(ft);return!dt&&(dt=RegExp("\\b"+Be+" *\\d+[.\\w_]*","i").exec(v)||RegExp("\\b"+Be+" *\\w+-[\\w]*","i").exec(v)||RegExp("\\b"+Be+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(v))&&((dt=String(ft.label&&!RegExp(Be,"i").test(ft.label)?ft.label:dt).split("/"))[1]&&!/[\d.]+/.test(dt[0])&&(dt[0]+=" "+dt[1]),ft=ft.label||ft,dt=h(dt[0].replace(RegExp(Be,"i"),ft).replace(RegExp("; *(?:"+ft+"[_-])?","i")," ").replace(RegExp("("+ft+")[-_.]?(\\w)","i"),"$1 $2"))),dt})}function Je(ut){return x(ut,function(dt,ft){return dt||(RegExp(ft+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(v)||0)[1]||null})}function qe(){return this.description||""}if(te&&(te=[te]),ie&&!Te&&(Te=Re([ie])),(pe=/\bGoogle TV\b/.exec(Te))&&(Te=pe[0]),/\bSimulator\b/i.test(v)&&(Te=(Te?Te+" ":"")+"Simulator"),ne=="Opera Mini"&&/\bOPiOS\b/.test(v)&&ye.push("running in Turbo/Uncompressed mode"),ne=="IE"&&/\blike iPhone OS\b/.test(v)?(pe=R(v.replace(/like iPhone OS/,"")),ie=pe.manufacturer,Te=pe.product):/^iP/.test(Te)?(ne||(ne="Safari"),Z="iOS"+((pe=/ OS ([\d_]+)/i.exec(v))?" "+pe[1].replace(/_/g,"."):"")):ne=="Konqueror"&&!/buntu/i.test(Z)?Z="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(ne)&&!/\bMobile Safari\b/i.test(v)||/\bVita\b/.test(Te))||/\bAndroid\b/.test(Z)&&/^Chrome/.test(ne)&&/\bVersion\//i.test(v)?(ne="Android Browser",Z=/\bAndroid\b/.test(Z)?Z:"Android"):ne=="Silk"?(/\bMobi/i.test(v)||(Z="Android",ye.unshift("desktop mode")),/Accelerated *= *true/i.test(v)&&ye.unshift("accelerated")):ne=="PaleMoon"&&(pe=/\bFirefox\/([\d.]+)\b/.exec(v))?ye.push("identifying as Firefox "+pe[1]):ne=="Firefox"&&(pe=/\b(Mobile|Tablet|TV)\b/i.exec(v))?(Z||(Z="Firefox OS"),Te||(Te=pe[1])):!ne||(pe=!/\bMinefield\b/i.test(v)&&/\b(?:Firefox|Safari)\b/.exec(ne))?(ne&&!Te&&/[\/,]|^[^(]+?\)/.test(v.slice(v.indexOf(pe+"/")+8))&&(ne=null),(pe=Te||ie||Z)&&(Te||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Z))&&(ne=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Z)?Z:pe)+" Browser")):ne=="Electron"&&(pe=(/\bChrome\/([\d.]+)\b/.exec(v)||0)[1])&&ye.push("Chromium "+pe),re||(re=Je(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",S(ne),"(?:Firefox|Minefield|NetFront)"])),(pe=te=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(ne)&&(/\bOPR\b/.test(v)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(v)&&!/^(?:Trident|EdgeHTML)$/.test(te)&&"WebKit"||!te&&/\bMSIE\b/i.test(v)&&(Z=="Mac OS"?"Tasman":"Trident")||te=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ne)&&"NetFront")&&(te=[pe]),ne=="IE"&&(pe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(v)||0)[1])?(ne+=" Mobile",Z="Windows Phone "+(/\+$/.test(pe)?pe:pe+".x"),ye.unshift("desktop mode")):/\bWPDesktop\b/i.test(v)?(ne="IE Mobile",Z="Windows Phone 8.x",ye.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(v)||0)[1])):ne!="IE"&&te=="Trident"&&(pe=/\brv:([\d.]+)/.exec(v))&&(ne&&ye.push("identifying as "+ne+(re?" "+re:"")),ne="IE",re=pe[1]),ae){if(t(_,"global"))if(P&&(pe=P.lang.System,Oe=pe.getProperty("os.arch"),Z=Z||pe.getProperty("os.name")+" "+pe.getProperty("os.version")),z){try{re=_.require("ringo/engine").version.join("."),ne="RingoJS"}catch(ut){(pe=_.system)&&pe.global.system==_.system&&(ne="Narwhal",Z||(Z=pe[0].os||null))}ne||(ne="Rhino")}else typeof _.process=="object"&&!_.process.browser&&(pe=_.process)&&(typeof pe.versions=="object"&&(typeof pe.versions.electron=="string"?(ye.push("Node "+pe.versions.node),ne="Electron",re=pe.versions.electron):typeof pe.versions.nw=="string"&&(ye.push("Chromium "+re,"Node "+pe.versions.node),ne="NW.js",re=pe.versions.nw)),ne||(ne="Node.js",Oe=pe.arch,Z=pe.platform,re=/[\d.]+/.exec(pe.version),re=re?re[0]:null));else l(pe=_.runtime)==W?(ne="Adobe AIR",Z=pe.flash.system.Capabilities.os):l(pe=_.phantom)==B?(ne="PhantomJS",re=(pe=pe.version||null)&&pe.major+"."+pe.minor+"."+pe.patch):typeof de.documentMode=="number"&&(pe=/\bTrident\/(\d+)/i.exec(v))?(re=[re,de.documentMode],(pe=+pe[1]+4)!=re[1]&&(ye.push("IE "+re[1]+" mode"),te&&(te[1]=""),re[1]=pe),re=ne=="IE"?String(re[1].toFixed(1)):re[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ne)&&(ye.push("masking as "+ne+" "+re),ne="IE",re="11.0",te=["Trident"],Z="Windows");Z=Z&&h(Z)}if(re&&(pe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(v+";"+(ae&&w.appMinorVersion))||/\bMinefield\b/i.test(v)&&"a")&&(ce=/b/i.test(pe)?"beta":"alpha",re=re.replace(RegExp(pe+"\\+?$"),"")+(ce=="beta"?ue:J)+(/\d+\+?/.exec(pe)||"")),ne=="Fennec"||ne=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Z))ne="Firefox Mobile";else if(ne=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Te))Te=="Xbox 360"&&(Z=null),Te=="Xbox 360"&&/\bIEMobile\b/.test(v)&&ye.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ne)||ne&&!Te&&!/Browser|Mobi/.test(ne))&&(Z=="Windows CE"||/Mobi/i.test(v)))ne+=" Mobile";else if(ne=="IE"&&ae)try{_.external===null&&ye.unshift("platform preview")}catch(ut){ye.unshift("embedded")}else(/\bBlackBerry\b/.test(Te)||/\bBB10\b/.test(v))&&(pe=(RegExp(Te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(v)||0)[1]||re)?(pe=[pe,/BB10/.test(v)],Z=(pe[1]?(Te=null,ie="BlackBerry"):"Device Software")+" "+pe[0],re=null):this!=s&&Te!="Wii"&&(ae&&Se||/Opera/.test(ne)&&/\b(?:MSIE|Firefox)\b/i.test(v)||ne=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Z)||ne=="IE"&&(Z&&!/^Win/.test(Z)&&re>5.5||/\bWindows XP\b/.test(Z)&&re>8||re==8&&!/\bTrident\b/.test(v)))&&!p.test(pe=R.call(s,v.replace(p,"")+";"))&&pe.name&&(pe="ing as "+pe.name+((pe=pe.version)?" "+pe:""),p.test(ne)?(/\bIE\b/.test(pe)&&Z=="Mac OS"&&(Z=null),pe="identify"+pe):(pe="mask"+pe,Ae?ne=h(Ae.replace(/([a-z])([A-Z])/g,"$1 $2")):ne="Opera",/\bIE\b/.test(pe)&&(Z=null),ae||(re=null)),te=["Presto"],ye.push(pe));(pe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(v)||0)[1])&&(pe=[parseFloat(pe.replace(/\.(\d)$/,".0$1")),pe],ne=="Safari"&&pe[1].slice(-1)=="+"?(ne="WebKit Nightly",ce="alpha",re=pe[1].slice(0,-1)):(re==pe[1]||re==(pe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(v)||0)[1]))&&(re=null),pe[1]=(/\bChrome\/([\d.]+)/i.exec(v)||0)[1],pe[0]==537.36&&pe[2]==537.36&&parseFloat(pe[1])>=28&&te=="WebKit"&&(te=["Blink"]),!ae||!L&&!pe[1]?(te&&(te[1]="like Safari"),pe=(pe=pe[0],pe<400?1:pe<500?2:pe<526?3:pe<533?4:pe<534?"4+":pe<535?5:pe<537?6:pe<538?7:pe<601?8:"8")):(te&&(te[1]="like Chrome"),pe=pe[1]||(pe=pe[0],pe<530?1:pe<532?2:pe<532.05?3:pe<533?4:pe<534.03?5:pe<534.07?6:pe<534.1?7:pe<534.13?8:pe<534.16?9:pe<534.24?10:pe<534.3?11:pe<535.01?12:pe<535.02?"13+":pe<535.07?15:pe<535.11?16:pe<535.19?17:pe<536.05?18:pe<536.1?19:pe<537.01?20:pe<537.11?"21+":pe<537.13?23:pe<537.18?24:pe<537.24?25:pe<537.36?26:te!="Blink"?"27":"28")),te&&(te[1]+=" "+(pe+=typeof pe=="number"?".x":/[.+]/.test(pe)?"":"+")),ne=="Safari"&&(!re||parseInt(re)>45)&&(re=pe)),ne=="Opera"&&(pe=/\bzbov|zvav$/.exec(Z))?(ne+=" ",ye.unshift("desktop mode"),pe=="zvav"?(ne+="Mini",re=null):ne+="Mobile",Z=Z.replace(RegExp(" *"+pe+"$"),"")):ne=="Safari"&&/\bChrome\b/.exec(te&&te[1])&&(ye.unshift("desktop mode"),ne="Chrome Mobile",re=null,/\bOS X\b/.test(Z)?(ie="Apple",Z="iOS 4.3+"):Z=null),re&&re.indexOf(pe=/[\d.]+$/.exec(Z))==0&&v.indexOf("/"+pe+"-")>-1&&(Z=f(Z.replace(pe,""))),te&&!/\b(?:Avant|Nook)\b/.test(ne)&&(/Browser|Lunascape|Maxthon/.test(ne)||ne!="Safari"&&/^iOS/.test(Z)&&/\bSafari\b/.test(te[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ne)&&te[1])&&((pe=te[te.length-1])&&ye.push(pe)),ye.length&&(ye=["("+ye.join("; ")+")"]),ie&&Te&&Te.indexOf(ie)<0&&ye.push("on "+ie),Te&&ye.push((/^on /.test(ye[ye.length-1])?"":"on ")+Te),Z&&(pe=/ ([\d.+]+)$/.exec(Z),fe=pe&&Z.charAt(Z.length-pe[0].length-1)=="/",Z={architecture:32,family:pe&&!fe?Z.replace(pe[0],""):Z,version:pe?pe[1]:null,toString:function(){var ut=this.version;return this.family+(ut&&!fe?" "+ut:"")+(this.architecture==64?" 64-bit":"")}}),(pe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(Z&&(Z.architecture=64,Z.family=Z.family.replace(RegExp(" *"+pe),"")),ne&&(/\bWOW64\b/i.test(v)||ae&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(v))&&ye.unshift("32-bit")):Z&&/^OS X/.test(Z.family)&&ne=="Chrome"&&parseFloat(re)>=39&&(Z.architecture=64),v||(v=null);var rt={};return rt.description=v,rt.layout=te&&te[0],rt.manufacturer=ie,rt.name=ne,rt.prerelease=ce,rt.product=Te,rt.ua=v,rt.version=ne&&re,rt.os=Z||{architecture:null,family:null,version:null,toString:function(){return"null"}},rt.parse=R,rt.toString=qe,rt.version&&ye.unshift(re),rt.name&&ye.unshift(ne),Z&&ne&&!(Z==String(Z).split(" ")[0]&&(Z==ne.split(" ")[0]||Te))&&ye.push(Te?"("+Z+")":"on "+Z),ye.length&&(rt.description=ye.join(" ")),rt}var C=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(O.platform=C,define(function(){return C})):m&&y?s(C,function(v,_){m[_]=v}):O.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(F,q,j){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?q.exports={nextTick:g}:q.exports=N;function g(O,M,m,y){if(typeof O!="function")throw new TypeError('"callback" argument must be a function');var T=arguments.length,b,p;switch(T){case 0:case 1:return N.nextTick(O);case 2:return N.nextTick(function(){O.call(null,M)});case 3:return N.nextTick(function(){O.call(null,M,m)});case 4:return N.nextTick(function(){O.call(null,M,m,y)});default:for(b=new Array(T-1),p=0;p<b.length;)b[p++]=arguments[p];return N.nextTick(function(){O.apply(null,b)})}}}).call(this,F("_process"))},{_process:208}],208:[function(F,q,j){var N=q.exports={},g,O;function M(){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=M}catch(u){g=M}try{typeof clearTimeout=="function"?O=clearTimeout:O=m}catch(u){O=m}})();function y(u){if(g===setTimeout)return setTimeout(u,0);if((g===M||!g)&&setTimeout)return g=setTimeout,setTimeout(u,0);try{return g(u,0)}catch(h){try{return g.call(null,u,0)}catch(s){return g.call(this,u,0)}}}function T(u){if(O===clearTimeout)return clearTimeout(u);if((O===m||!O)&&clearTimeout)return O=clearTimeout,clearTimeout(u);try{return O(u)}catch(h){try{return O.call(null,u)}catch(s){return O.call(this,u)}}}var b=[],p=!1,d,n=-1;function c(){if(!p||!d)return;p=!1,d.length?b=d.concat(b):n=-1,b.length&&r()}function r(){if(p)return;var u=y(c);p=!0;for(var h=b.length;h;){for(d=b,b=[];++n<h;)d&&d[n].run();n=-1,h=b.length}d=null,p=!1,T(u)}N.nextTick=function(u){var h=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)h[s-1]=arguments[s];b.push(new a(u,h)),b.length===1&&!p&&y(r)};function a(u,h){this.fun=u,this.array=h}a.prototype.run=function(){this.fun.apply(null,this.array)},N.title="browser",N.browser=!0,N.env={},N.argv=[],N.version="",N.versions={};function o(){}N.on=o,N.addListener=o,N.once=o,N.off=o,N.removeListener=o,N.removeAllListeners=o,N.emit=o,N.prependListener=o,N.prependOnceListener=o,N.listeners=function(u){return[]},N.binding=function(u){throw new Error("process.binding is not supported")},N.cwd=function(){return"/"},N.chdir=function(u){throw new Error("process.chdir is not supported")},N.umask=function(){return 0}},{}],209:[function(F,q,j){(function(N){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var O=typeof j=="object"&&j&&!j.nodeType&&j,M=typeof q=="object"&&q&&!q.nodeType&&q,m=typeof N=="object"&&N;(m.global===m||m.window===m||m.self===m)&&(g=m);var y,T=2147483647,b=36,p=1,d=26,n=38,c=700,r=72,a=128,o="-",u=/^xn--/,h=/[^\x20-\x7E]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=b-p,S=Math.floor,x=String.fromCharCode,f;function R(G){throw new RangeError(l[G])}function C(G,B){for(var P=G.length,z=[];P--;)z[P]=B(G[P]);return z}function v(G,B){var P=G.split("@"),z="";P.length>1&&(z=P[0]+"@",G=P[1]),G=G.replace(s,".");var J=G.split("."),ue=C(J,B).join(".");return z+ue}function _(G){for(var B=[],P=0,z=G.length,J,ue;P<z;)J=G.charCodeAt(P++),J>=55296&&J<=56319&&P<z?(ue=G.charCodeAt(P++),(ue&64512)==56320?B.push(((J&1023)<<10)+(ue&1023)+65536):(B.push(J),P--)):B.push(J);return B}function E(G){return C(G,function(B){var P="";return B>65535&&(B-=65536,P+=x(B>>>10&1023|55296),B=56320|B&1023),P+=x(B),P}).join("")}function w(G){return G-48<10?G-22:G-65<26?G-65:G-97<26?G-97:b}function k(G,B){return G+22+75*(G<26)-((B!=0)<<5)}function I(G,B,P){var z=0;for(G=P?S(G/c):G>>1,G+=S(G/B);G>t*d>>1;z+=b)G=S(G/t);return S(z+(t+1)*G/(G+n))}function L(G){var B=[],P=G.length,z,J=0,ue=a,de=r,Se,Ae,pe,Oe,ye,ce,ae,re,fe;for(Se=G.lastIndexOf(o),Se<0&&(Se=0),Ae=0;Ae<Se;++Ae)G.charCodeAt(Ae)>=128&&R("not-basic"),B.push(G.charCodeAt(Ae));for(pe=Se>0?Se+1:0;pe<P;){for(Oe=J,ye=1,ce=b;!(pe>=P&&R("invalid-input"),ae=w(G.charCodeAt(pe++)),(ae>=b||ae>S((T-J)/ye))&&R("overflow"),J+=ae*ye,re=ce<=de?p:ce>=de+d?d:ce-de,ae<re);ce+=b)fe=b-re,ye>S(T/fe)&&R("overflow"),ye*=fe;z=B.length+1,de=I(J-Oe,z,Oe==0),S(J/z)>T-ue&&R("overflow"),ue+=S(J/z),J%=z,B.splice(J++,0,ue)}return E(B)}function V(G){var B,P,z,J,ue,de,Se,Ae,pe,Oe,ye,ce=[],ae,re,fe,te;for(G=_(G),ae=G.length,B=a,P=0,ue=r,de=0;de<ae;++de)ye=G[de],ye<128&&ce.push(x(ye));for(z=J=ce.length,J&&ce.push(o);z<ae;){for(Se=T,de=0;de<ae;++de)ye=G[de],ye>=B&&ye<Se&&(Se=ye);for(re=z+1,Se-B>S((T-P)/re)&&R("overflow"),P+=(Se-B)*re,B=Se,de=0;de<ae;++de)if(ye=G[de],ye<B&&++P>T&&R("overflow"),ye==B){for(Ae=P,pe=b;!(Oe=pe<=ue?p:pe>=ue+d?d:pe-ue,Ae<Oe);pe+=b)te=Ae-Oe,fe=b-Oe,ce.push(x(k(Oe+te%fe,0))),Ae=S(te/fe);ce.push(x(k(Ae,0))),ue=I(P,re,z==J),P=0,++z}++P,++B}return ce.join("")}function W(G){return v(G,function(B){return u.test(B)?L(B.slice(4).toLowerCase()):B})}function H(G){return v(G,function(B){return h.test(B)?"xn--"+V(B):B})}if(y={version:"1.4.1",ucs2:{decode:_,encode:E},decode:L,encode:V,toASCII:H,toUnicode:W},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return y});else if(O&&M)if(q.exports==O)M.exports=y;else for(f in y)y.hasOwnProperty(f)&&(O[f]=y[f]);else g.punycode=y})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(F,q,j){"use strict";function N(O,M){return Object.prototype.hasOwnProperty.call(O,M)}q.exports=function(O,M,m,y){M=M||"&",m=m||"=";var T={};if(typeof O!="string"||O.length===0)return T;var b=/\+/g;O=O.split(M);var p=1e3;y&&typeof y.maxKeys=="number"&&(p=y.maxKeys);var d=O.length;p>0&&d>p&&(d=p);for(var n=0;n<d;++n){var c=O[n].replace(b,"%20"),r=c.indexOf(m),a,o,u,h;r>=0?(a=c.substr(0,r),o=c.substr(r+1)):(a=c,o=""),u=decodeURIComponent(a),h=decodeURIComponent(o),N(T,u)?g(T[u])?T[u].push(h):T[u]=[T[u],h]:T[u]=h}return T};var g=Array.isArray||function(O){return Object.prototype.toString.call(O)==="[object Array]"}},{}],211:[function(F,q,j){"use strict";var N=function(m){switch(typeof m){case"string":return m;case"boolean":return m?"true":"false";case"number":return isFinite(m)?m:"";default:return""}};q.exports=function(m,y,T,b){return y=y||"&",T=T||"=",m===null&&(m=void 0),typeof m=="object"?O(M(m),function(p){var d=encodeURIComponent(N(p))+T;return g(m[p])?O(m[p],function(n){return d+encodeURIComponent(N(n))}).join(y):d+encodeURIComponent(N(m[p]))}).join(y):b?encodeURIComponent(N(b))+T+encodeURIComponent(N(m)):""};var g=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"};function O(m,y){if(m.map)return m.map(y);for(var T=[],b=0;b<m.length;b++)T.push(y(m[b],b));return T}var M=Object.keys||function(m){var y=[];for(var T in m)Object.prototype.hasOwnProperty.call(m,T)&&y.push(T);return y}},{}],212:[function(F,q,j){"use strict";j.decode=j.parse=F("./decode"),j.encode=j.stringify=F("./encode")},{"./decode":210,"./encode":211}],213:[function(F,q,j){q.exports=F("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=m(N),O=F("babel-runtime/core-js/object/keys"),M=m(O);function m(h){return h&&h.__esModule?h:{default:h}}var y=F("process-nextick-args"),T=M.default||function(h){var s=[];for(var l in h)s.push(l);return s};q.exports=a;var b=(0,g.default)(F("core-util-is"));b.inherits=F("inherits");var p=F("./_stream_readable"),d=F("./_stream_writable");b.inherits(a,p);for(var n=T(d.prototype),c=0;c<n.length;c++){var r=n[c];a.prototype[r]||(a.prototype[r]=d.prototype[r])}function a(h){if(!(this instanceof a))return new a(h);p.call(this,h),d.call(this,h),h&&h.readable===!1&&(this.readable=!1),h&&h.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,h&&h.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",o)}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o(){if(this.allowHalfOpen||this._writableState.ended)return;y.nextTick(u,this)}function u(h){h.end()}Object.defineProperty(a.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(s){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=s,this._writableState.destroyed=s}}),a.prototype._destroy=function(h,s){this.push(null),this.end(),y.nextTick(s,h)}},{"./_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(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(T){return T&&T.__esModule?T:{default:T}}q.exports=y;var M=F("./_stream_transform"),m=(0,g.default)(F("core-util-is"));m.inherits=F("inherits"),m.inherits(y,M);function y(T){if(!(this instanceof y))return new y(T);M.call(this,T)}y.prototype._transform=function(T,b,p){p(null,T)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(F,q,j){(function(N,g){"use strict";var O=F("babel-runtime/core-js/object/get-prototype-of"),M=T(O),m=F("babel-runtime/core-js/object/create"),y=T(m);function T(te){return te&&te.__esModule?te:{default:te}}var b=F("process-nextick-args");q.exports=_;var p=F("isarray"),d;_.ReadableState=v;var n=F("events").EventEmitter,c=function(ne,Te){return ne.listeners(Te).length},r=F("./internal/streams/stream"),a=F("safe-buffer").Buffer,o=g.Uint8Array||function(){};function u(te){return a.from(te)}function h(te){return a.isBuffer(te)||te instanceof o}var s=(0,y.default)(F("core-util-is"));s.inherits=F("inherits");var l=F("util"),t=void 0;l&&l.debuglog?t=l.debuglog("stream"):t=function(){};var S=F("./internal/streams/BufferList"),x=F("./internal/streams/destroy"),f;s.inherits(_,r);var R=["error","close","destroy","pause","resume"];function C(te,ne,Te){if(typeof te.prependListener=="function")return te.prependListener(ne,Te);!te._events||!te._events[ne]?te.on(ne,Te):p(te._events[ne])?te._events[ne].unshift(Te):te._events[ne]=[Te,te._events[ne]]}function v(te,ne){d=d||F("./_stream_duplex"),te=te||{};var Te=ne instanceof d;this.objectMode=!!te.objectMode,Te&&(this.objectMode=this.objectMode||!!te.readableObjectMode);var ie=te.highWaterMark,Z=te.readableHighWaterMark,X=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:Te&&(Z||Z===0)?this.highWaterMark=Z:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new S,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&&(f||(f=F("string_decoder/").StringDecoder),this.decoder=new f(te.encoding),this.encoding=te.encoding)}function _(te){if(d=d||F("./_stream_duplex"),!(this instanceof _))return new _(te);this._readableState=new v(te,this),this.readable=!0,te&&(typeof te.read=="function"&&(this._read=te.read),typeof te.destroy=="function"&&(this._destroy=te.destroy)),r.call(this)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ne){if(!this._readableState)return;this._readableState.destroyed=ne}}),_.prototype.destroy=x.destroy,_.prototype._undestroy=x.undestroy,_.prototype._destroy=function(te,ne){this.push(null),ne(te)},_.prototype.push=function(te,ne){var Te=this._readableState,ie;return Te.objectMode?ie=!0:typeof te=="string"&&(ne=ne||Te.defaultEncoding,ne!==Te.encoding&&(te=a.from(te,ne),ne=""),ie=!0),E(this,te,ne,!1,ie)},_.prototype.unshift=function(te){return E(this,te,null,!0,!1)};function E(te,ne,Te,ie,Z){var X=te._readableState;if(ne===null)X.reading=!1,H(te,X);else{var Q;Z||(Q=k(X,ne)),Q?te.emit("error",Q):X.objectMode||ne&&ne.length>0?(typeof ne!="string"&&!X.objectMode&&(0,M.default)(ne)!==a.prototype&&(ne=u(ne)),ie?X.endEmitted?te.emit("error",new Error("stream.unshift() after end event")):w(te,X,ne,!0):X.ended?te.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Te?(ne=X.decoder.write(ne),X.objectMode||ne.length!==0?w(te,X,ne,!1):P(te,X)):w(te,X,ne,!1))):ie||(X.reading=!1)}return I(X)}function w(te,ne,Te,ie){ne.flowing&&ne.length===0&&!ne.sync?(te.emit("data",Te),te.read(0)):(ne.length+=ne.objectMode?1:Te.length,ie?ne.buffer.unshift(Te):ne.buffer.push(Te),ne.needReadable&&G(te)),P(te,ne)}function k(te,ne){var Te;return!h(ne)&&typeof ne!="string"&&ne!==void 0&&!te.objectMode&&(Te=new TypeError("Invalid non-string/buffer chunk")),Te}function I(te){return!te.ended&&(te.needReadable||te.length<te.highWaterMark||te.length===0)}_.prototype.isPaused=function(){return this._readableState.flowing===!1},_.prototype.setEncoding=function(te){return f||(f=F("string_decoder/").StringDecoder),this._readableState.decoder=new f(te),this._readableState.encoding=te,this};var L=8388608;function V(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 W(te,ne){return te<=0||ne.length===0&&ne.ended?0:ne.objectMode?1:te!==te?ne.flowing&&ne.length?ne.buffer.head.data.length:ne.length:(te>ne.highWaterMark&&(ne.highWaterMark=V(te)),te<=ne.length?te:ne.ended?ne.length:(ne.needReadable=!0,0))}_.prototype.read=function(te){t("read",te),te=parseInt(te,10);var ne=this._readableState,Te=te;if(te!==0&&(ne.emittedReadable=!1),te===0&&ne.needReadable&&(ne.length>=ne.highWaterMark||ne.ended))return t("read: emitReadable",ne.length,ne.ended),ne.length===0&&ne.ended?ae(this):G(this),null;if(te=W(te,ne),te===0&&ne.ended)return ne.length===0&&ae(this),null;var ie=ne.needReadable;t("need readable",ie),(ne.length===0||ne.length-te<ne.highWaterMark)&&(ie=!0,t("length less than watermark",ie)),ne.ended||ne.reading?(ie=!1,t("reading or ended",ie)):ie&&(t("do read"),ne.reading=!0,ne.sync=!0,ne.length===0&&(ne.needReadable=!0),this._read(ne.highWaterMark),ne.sync=!1,ne.reading||(te=W(Te,ne)));var Z;return te>0?Z=pe(te,ne):Z=null,Z===null?(ne.needReadable=!0,te=0):ne.length-=te,ne.length===0&&(ne.ended||(ne.needReadable=!0),Te!==te&&ne.ended&&ae(this)),Z!==null&&this.emit("data",Z),Z};function H(te,ne){if(ne.ended)return;if(ne.decoder){var Te=ne.decoder.end();Te&&Te.length&&(ne.buffer.push(Te),ne.length+=ne.objectMode?1:Te.length)}ne.ended=!0,G(te)}function G(te){var ne=te._readableState;ne.needReadable=!1,ne.emittedReadable||(t("emitReadable",ne.flowing),ne.emittedReadable=!0,ne.sync?b.nextTick(B,te):B(te))}function B(te){t("emit readable"),te.emit("readable"),Ae(te)}function P(te,ne){ne.readingMore||(ne.readingMore=!0,b.nextTick(z,te,ne))}function z(te,ne){for(var Te=ne.length;!ne.reading&&!ne.flowing&&!ne.ended&&ne.length<ne.highWaterMark&&!(t("maybeReadMore read 0"),te.read(0),Te===ne.length);)Te=ne.length;ne.readingMore=!1}_.prototype._read=function(te){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(te,ne){var Te=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,t("pipe count=%d opts=%j",ie.pipesCount,ne);var Z=(!ne||ne.end!==!1)&&te!==N.stdout&&te!==N.stderr,X=Z?_e:Be;ie.endEmitted?b.nextTick(X):Te.once("end",X),te.on("unpipe",Q);function Q(Ie,at){t("onunpipe"),Ie===Te&&(at&&at.hasUnpiped===!1&&(at.hasUnpiped=!0,Je()))}function _e(){t("onend"),te.end()}var ve=J(Te);te.on("drain",ve);var Re=!1;function Je(){t("cleanup"),te.removeListener("close",dt),te.removeListener("finish",ft),te.removeListener("drain",ve),te.removeListener("error",ut),te.removeListener("unpipe",Q),Te.removeListener("end",_e),Te.removeListener("end",Be),Te.removeListener("data",rt),Re=!0,ie.awaitDrain&&(!te._writableState||te._writableState.needDrain)&&ve()}var qe=!1;Te.on("data",rt);function rt(Ie){t("ondata"),qe=!1;var at=te.write(Ie);at===!1&&!qe&&((ie.pipesCount===1&&ie.pipes===te||ie.pipesCount>1&&fe(ie.pipes,te)!==-1)&&!Re&&(t("false write response, pause",Te._readableState.awaitDrain),Te._readableState.awaitDrain++,qe=!0),Te.pause())}function ut(Ie){t("onerror",Ie),Be(),te.removeListener("error",ut),c(te,"error")===0&&te.emit("error",Ie)}C(te,"error",ut);function dt(){te.removeListener("finish",ft),Be()}te.once("close",dt);function ft(){t("onfinish"),te.removeListener("close",dt),Be()}te.once("finish",ft);function Be(){t("unpipe"),Te.unpipe(te)}return te.emit("pipe",Te),ie.flowing||(t("pipe resume"),Te.resume()),te};function J(te){return function(){var ne=te._readableState;t("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&c(te,"data")&&(ne.flowing=!0,Ae(te))}}_.prototype.unpipe=function(te){var ne=this._readableState,Te={hasUnpiped:!1};if(ne.pipesCount===0)return this;if(ne.pipesCount===1)return te&&te!==ne.pipes?this:(te||(te=ne.pipes),ne.pipes=null,ne.pipesCount=0,ne.flowing=!1,te&&te.emit("unpipe",this,Te),this);if(!te){var ie=ne.pipes,Z=ne.pipesCount;ne.pipes=null,ne.pipesCount=0,ne.flowing=!1;for(var X=0;X<Z;X++)ie[X].emit("unpipe",this,Te);return this}var Q=fe(ne.pipes,te);return Q===-1?this:(ne.pipes.splice(Q,1),ne.pipesCount-=1,ne.pipesCount===1&&(ne.pipes=ne.pipes[0]),te.emit("unpipe",this,Te),this)},_.prototype.on=function(te,ne){var Te=r.prototype.on.call(this,te,ne);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&&G(this):b.nextTick(ue,this))}return Te},_.prototype.addListener=_.prototype.on;function ue(te){t("readable nexttick read 0"),te.read(0)}_.prototype.resume=function(){var te=this._readableState;return te.flowing||(t("resume"),te.flowing=!0,de(this,te)),this};function de(te,ne){ne.resumeScheduled||(ne.resumeScheduled=!0,b.nextTick(Se,te,ne))}function Se(te,ne){ne.reading||(t("resume read 0"),te.read(0)),ne.resumeScheduled=!1,ne.awaitDrain=0,te.emit("resume"),Ae(te),ne.flowing&&!ne.reading&&te.read(0)}_.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ae(te){var ne=te._readableState;for(t("flow",ne.flowing);ne.flowing&&te.read()!==null;);}_.prototype.wrap=function(te){var ne=this,Te=this._readableState,ie=!1;te.on("end",function(){if(t("wrapped end"),Te.decoder&&!Te.ended){var Q=Te.decoder.end();Q&&Q.length&&ne.push(Q)}ne.push(null)}),te.on("data",function(Q){if(t("wrapped data"),Te.decoder&&(Q=Te.decoder.write(Q)),Te.objectMode&&Q==null)return;if(!Te.objectMode&&(!Q||!Q.length))return;var _e=ne.push(Q);_e||(ie=!0,te.pause())});for(var Z in te)this[Z]===void 0&&typeof te[Z]=="function"&&(this[Z]=function(Q){return function(){return te[Q].apply(te,arguments)}}(Z));for(var X=0;X<R.length;X++)te.on(R[X],this.emit.bind(this,R[X]));return this._read=function(Q){t("wrapped _read",Q),ie&&(ie=!1,te.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=pe;function pe(te,ne){if(ne.length===0)return null;var Te;return ne.objectMode?Te=ne.buffer.shift():!te||te>=ne.length?(ne.decoder?Te=ne.buffer.join(""):ne.buffer.length===1?Te=ne.buffer.head.data:Te=ne.buffer.concat(ne.length),ne.buffer.clear()):Te=Oe(te,ne.buffer,ne.decoder),Te}function Oe(te,ne,Te){var ie;return te<ne.head.data.length?(ie=ne.head.data.slice(0,te),ne.head.data=ne.head.data.slice(te)):te===ne.head.data.length?ie=ne.shift():ie=Te?ye(te,ne):ce(te,ne),ie}function ye(te,ne){var Te=ne.head,ie=1,Z=Te.data;for(te-=Z.length;Te=Te.next;){var X=Te.data,Q=te>X.length?X.length:te;if(Q===X.length?Z+=X:Z+=X.slice(0,te),te-=Q,te===0){Q===X.length?(++ie,Te.next?ne.head=Te.next:ne.head=ne.tail=null):(ne.head=Te,Te.data=X.slice(Q));break}++ie}return ne.length-=ie,Z}function ce(te,ne){var Te=a.allocUnsafe(te),ie=ne.head,Z=1;for(ie.data.copy(Te),te-=ie.data.length;ie=ie.next;){var X=ie.data,Q=te>X.length?X.length:te;if(X.copy(Te,Te.length-te,0,Q),te-=Q,te===0){Q===X.length?(++Z,ie.next?ne.head=ie.next:ne.head=ne.tail=null):(ne.head=ie,ie.data=X.slice(Q));break}++Z}return ne.length-=Z,Te}function ae(te){var ne=te._readableState;if(ne.length>0)throw new Error('"endReadable()" called on non-empty stream');ne.endEmitted||(ne.ended=!0,b.nextTick(re,ne,te))}function re(te,ne){!te.endEmitted&&te.length===0&&(te.endEmitted=!0,ne.readable=!1,ne.emit("end"))}function fe(te,ne){for(var Te=0,ie=te.length;Te<ie;Te++)if(te[Te]===ne)return Te;return-1}}).call(this,F("_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(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(d){return d&&d.__esModule?d:{default:d}}q.exports=T;var M=F("./_stream_duplex"),m=(0,g.default)(F("core-util-is"));m.inherits=F("inherits"),m.inherits(T,M);function y(d,n){var c=this._transformState;c.transforming=!1;var r=c.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,n!=null&&this.push(n),r(d);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function T(d){if(!(this instanceof T))return new T(d);M.call(this,d),this._transformState={afterTransform:y.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",b)}function b(){var d=this;typeof this._flush=="function"?this._flush(function(n,c){p(d,n,c)}):p(this,null,null)}T.prototype.push=function(d,n){return this._transformState.needTransform=!1,M.prototype.push.call(this,d,n)},T.prototype._transform=function(d,n,c){throw new Error("_transform() is not implemented")},T.prototype._write=function(d,n,c){var r=this._transformState;if(r.writecb=c,r.writechunk=d,r.writeencoding=n,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},T.prototype._read=function(d){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},T.prototype._destroy=function(d,n){var c=this;M.prototype._destroy.call(this,d,function(r){n(r),c.emit("close")})};function p(d,n,c){if(n)return d.emit("error",n);if(c!=null&&d.push(c),d._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(d._transformState.transforming)throw new Error("Calling transform done when still transforming");return d.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(F,q,j){(function(N,g){"use strict";var O=F("babel-runtime/core-js/object/define-property"),M=r(O),m=F("babel-runtime/core-js/symbol/has-instance"),y=r(m),T=F("babel-runtime/core-js/symbol"),b=r(T),p=F("babel-runtime/core-js/object/create"),d=r(p),n=F("babel-runtime/core-js/set-immediate"),c=r(n);function r(ce){return ce&&ce.__esModule?ce:{default:ce}}var a=F("process-nextick-args");q.exports=k;function o(ce,ae,re){this.chunk=ce,this.encoding=ae,this.callback=re,this.next=null}function u(ce){var ae=this;this.next=null,this.entry=null,this.finish=function(){ye(ae,ce)}}var h=!N.browser&&["v0.10","v0.9."].indexOf(N.version.slice(0,5))>-1?c.default:a.nextTick,s;k.WritableState=E;var l=(0,d.default)(F("core-util-is"));l.inherits=F("inherits");var t={deprecate:F("util-deprecate")},S=F("./internal/streams/stream"),x=F("safe-buffer").Buffer,f=g.Uint8Array||function(){};function R(ce){return x.from(ce)}function C(ce){return x.isBuffer(ce)||ce instanceof f}var v=F("./internal/streams/destroy");l.inherits(k,S);function _(){}function E(ce,ae){s=s||F("./_stream_duplex"),ce=ce||{};var re=ae instanceof s;this.objectMode=!!ce.objectMode,re&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var fe=ce.highWaterMark,te=ce.writableHighWaterMark,ne=this.objectMode?16:16*1024;fe||fe===0?this.highWaterMark=fe:re&&(te||te===0)?this.highWaterMark=te:this.highWaterMark=ne,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 Te=ce.decodeStrings===!1;this.decodeStrings=!Te,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){P(ae,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 u(this)}E.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,re=[];ae;)re.push(ae),ae=ae.next;return re},function(){try{Object.defineProperty(E.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var w;typeof b.default=="function"&&y.default&&typeof Function.prototype[y.default]=="function"?(w=Function.prototype[y.default],(0,M.default)(k,y.default,{value:function(ae){return w.call(this,ae)?!0:this!==k?!1:ae&&ae._writableState instanceof E}})):w=function(ae){return ae instanceof this};function k(ce){if(s=s||F("./_stream_duplex"),!w.call(k,this)&&!(this instanceof s))return new k(ce);this._writableState=new E(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)),S.call(this)}k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function I(ce,ae){var re=new Error("write after end");ce.emit("error",re),a.nextTick(ae,re)}function L(ce,ae,re,fe){var te=!0,ne=!1;return re===null?ne=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!ae.objectMode&&(ne=new TypeError("Invalid non-string/buffer chunk")),ne&&(ce.emit("error",ne),a.nextTick(fe,ne),te=!1),te}k.prototype.write=function(ce,ae,re){var fe=this._writableState,te=!1,ne=!fe.objectMode&&C(ce);return ne&&!x.isBuffer(ce)&&(ce=R(ce)),typeof ae=="function"&&(re=ae,ae=null),ne?ae="buffer":ae||(ae=fe.defaultEncoding),typeof re!="function"&&(re=_),fe.ended?I(this,re):(ne||L(this,fe,ce,re))&&(fe.pendingcb++,te=W(this,fe,ne,ce,ae,re)),te},k.prototype.cork=function(){var ce=this._writableState;ce.corked++},k.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.finished&&!ce.bufferProcessing&&ce.bufferedRequest&&ue(this,ce))},k.prototype.setDefaultEncoding=function(ae){if(typeof ae=="string"&&(ae=ae.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ae+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ae);return this._writableState.defaultEncoding=ae,this};function V(ce,ae,re){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof ae=="string"&&(ae=x.from(ae,re)),ae}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(ce,ae,re,fe,te,ne){if(!re){var Te=V(ae,fe,te);fe!==Te&&(re=!0,te="buffer",fe=Te)}var ie=ae.objectMode?1:fe.length;ae.length+=ie;var Z=ae.length<ae.highWaterMark;if(Z||(ae.needDrain=!0),ae.writing||ae.corked){var X=ae.lastBufferedRequest;ae.lastBufferedRequest={chunk:fe,encoding:te,isBuf:re,callback:ne,next:null},X?X.next=ae.lastBufferedRequest:ae.bufferedRequest=ae.lastBufferedRequest,ae.bufferedRequestCount+=1}else H(ce,ae,!1,ie,fe,te,ne);return Z}function H(ce,ae,re,fe,te,ne,Te){ae.writelen=fe,ae.writecb=Te,ae.writing=!0,ae.sync=!0,re?ce._writev(te,ae.onwrite):ce._write(te,ne,ae.onwrite),ae.sync=!1}function G(ce,ae,re,fe,te){--ae.pendingcb,re?(a.nextTick(te,fe),a.nextTick(pe,ce,ae),ce._writableState.errorEmitted=!0,ce.emit("error",fe)):(te(fe),ce._writableState.errorEmitted=!0,ce.emit("error",fe),pe(ce,ae))}function B(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function P(ce,ae){var re=ce._writableState,fe=re.sync,te=re.writecb;if(B(re),ae)G(ce,re,fe,ae,te);else{var ne=de(re);!ne&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&ue(ce,re),fe?h(z,ce,re,ne,te):z(ce,re,ne,te)}}function z(ce,ae,re,fe){re||J(ce,ae),ae.pendingcb--,fe(),pe(ce,ae)}function J(ce,ae){ae.length===0&&ae.needDrain&&(ae.needDrain=!1,ce.emit("drain"))}function ue(ce,ae){ae.bufferProcessing=!0;var re=ae.bufferedRequest;if(ce._writev&&re&&re.next){var fe=ae.bufferedRequestCount,te=new Array(fe),ne=ae.corkedRequestsFree;ne.entry=re;for(var Te=0,ie=!0;re;)te[Te]=re,re.isBuf||(ie=!1),re=re.next,Te+=1;te.allBuffers=ie,H(ce,ae,!0,ae.length,te,"",ne.finish),ae.pendingcb++,ae.lastBufferedRequest=null,ne.next?(ae.corkedRequestsFree=ne.next,ne.next=null):ae.corkedRequestsFree=new u(ae),ae.bufferedRequestCount=0}else{for(;re;){var Z=re.chunk,X=re.encoding,Q=re.callback,_e=ae.objectMode?1:Z.length;if(H(ce,ae,!1,_e,Z,X,Q),re=re.next,ae.bufferedRequestCount--,ae.writing)break}re===null&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=re,ae.bufferProcessing=!1}k.prototype._write=function(ce,ae,re){re(new Error("_write() is not implemented"))},k.prototype._writev=null,k.prototype.end=function(ce,ae,re){var fe=this._writableState;typeof ce=="function"?(re=ce,ce=null,ae=null):typeof ae=="function"&&(re=ae,ae=null),ce!=null&&this.write(ce,ae),fe.corked&&(fe.corked=1,this.uncork()),!fe.ending&&!fe.finished&&Oe(this,fe,re)};function de(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function Se(ce,ae){ce._final(function(re){ae.pendingcb--,re&&ce.emit("error",re),ae.prefinished=!0,ce.emit("prefinish"),pe(ce,ae)})}function Ae(ce,ae){!ae.prefinished&&!ae.finalCalled&&(typeof ce._final=="function"?(ae.pendingcb++,ae.finalCalled=!0,a.nextTick(Se,ce,ae)):(ae.prefinished=!0,ce.emit("prefinish")))}function pe(ce,ae){var re=de(ae);return re&&(Ae(ce,ae),ae.pendingcb===0&&(ae.finished=!0,ce.emit("finish"))),re}function Oe(ce,ae,re){ae.ending=!0,pe(ce,ae),re&&(ae.finished?a.nextTick(re):ce.once("finish",re)),ae.ended=!0,ce.writable=!1}function ye(ce,ae,re){var fe=ce.entry;for(ce.entry=null;fe;){var te=fe.callback;ae.pendingcb--,te(re),fe=fe.next}ae.corkedRequestsFree?ae.corkedRequestsFree.next=ce:ae.corkedRequestsFree=ce}Object.defineProperty(k.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ae){if(!this._writableState)return;this._writableState.destroyed=ae}}),k.prototype.destroy=v.destroy,k.prototype._undestroy=v.undestroy,k.prototype._destroy=function(ce,ae){this.end(),ae(ce)}}).call(this,F("_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(F,q,j){"use strict";function N(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}var g=F("safe-buffer").Buffer,O=F("util");function M(m,y,T){m.copy(y,T)}q.exports=function(){function m(){N(this,m),this.head=null,this.tail=null,this.length=0}return m.prototype.push=function(T){var b={data:T,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},m.prototype.unshift=function(T){var b={data:T,next:this.head};this.length===0&&(this.tail=b),this.head=b,++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 b=this.head,p=""+b.data;b=b.next;)p+=T+b.data;return p},m.prototype.concat=function(T){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var b=g.allocUnsafe(T>>>0),p=this.head,d=0;p;)M(p.data,b,d),d+=p.data.length,p=p.next;return b},m}(),O&&O.inspect&&O.inspect.custom&&(q.exports.prototype[O.inspect.custom]=function(){var m=O.inspect({length:this.length});return this.constructor.name+" "+m})},{"safe-buffer":228,util:71}],220:[function(F,q,j){"use strict";var N=F("process-nextick-args");function g(m,y){var T=this,b=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return b||p?(y?y(m):m&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(M,this,m),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(d){!y&&d?(N.nextTick(M,T,d),T._writableState&&(T._writableState.errorEmitted=!0)):y&&y(d)}),this)}function O(){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 M(m,y){m.emit("error",y)}q.exports={destroy:g,undestroy:O}},{"process-nextick-args":207}],221:[function(F,q,j){"use strict";q.exports=F("events").EventEmitter},{events:192}],222:[function(F,q,j){q.exports=F("./readable").PassThrough},{"./readable":223}],223:[function(F,q,j){j=q.exports=F("./lib/_stream_readable.js"),j.Stream=j,j.Readable=j,j.Writable=F("./lib/_stream_writable.js"),j.Duplex=F("./lib/_stream_duplex.js"),j.Transform=F("./lib/_stream_transform.js"),j.PassThrough=F("./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(F,q,j){q.exports=F("./readable").Transform},{"./readable":223}],225:[function(F,q,j){q.exports=F("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(F,q,j){var N=function(){return this}()||Function("return this")(),g=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,O=g&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,q.exports=F("./runtime"),g)N.regeneratorRuntime=O;else try{delete N.regeneratorRuntime}catch(M){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(F,q,j){!function(N){"use strict";var g=Object.prototype,O=g.hasOwnProperty,M,m=typeof Symbol=="function"?Symbol:{},y=m.iterator||"@@iterator",T=m.asyncIterator||"@@asyncIterator",b=m.toStringTag||"@@toStringTag",p=typeof q=="object",d=N.regeneratorRuntime;if(d){p&&(q.exports=d);return}d=N.regeneratorRuntime=p?q.exports:{};function n(W,H,G,B){var P=H&&H.prototype instanceof s?H:s,z=Object.create(P.prototype),J=new I(B||[]);return z._invoke=_(W,G,J),z}d.wrap=n;function c(W,H,G){try{return{type:"normal",arg:W.call(H,G)}}catch(B){return{type:"throw",arg:B}}}var r="suspendedStart",a="suspendedYield",o="executing",u="completed",h={};function s(){}function l(){}function t(){}var S={};S[y]=function(){return this};var x=Object.getPrototypeOf,f=x&&x(x(L([])));f&&f!==g&&O.call(f,y)&&(S=f);var R=t.prototype=s.prototype=Object.create(S);l.prototype=R.constructor=t,t.constructor=l,t[b]=l.displayName="GeneratorFunction";function C(W){["next","throw","return"].forEach(function(H){W[H]=function(G){return this._invoke(H,G)}})}d.isGeneratorFunction=function(W){var H=typeof W=="function"&&W.constructor;return H?H===l||(H.displayName||H.name)==="GeneratorFunction":!1},d.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,t):(W.__proto__=t,b in W||(W[b]="GeneratorFunction")),W.prototype=Object.create(R),W},d.awrap=function(W){return{__await:W}};function v(W){function H(P,z,J,ue){var de=c(W[P],W,z);if(de.type==="throw")ue(de.arg);else{var Se=de.arg,Ae=Se.value;return Ae&&typeof Ae=="object"&&O.call(Ae,"__await")?Promise.resolve(Ae.__await).then(function(pe){H("next",pe,J,ue)},function(pe){H("throw",pe,J,ue)}):Promise.resolve(Ae).then(function(pe){Se.value=pe,J(Se)},ue)}}var G;function B(P,z){function J(){return new Promise(function(ue,de){H(P,z,ue,de)})}return G=G?G.then(J,J):J()}this._invoke=B}C(v.prototype),v.prototype[T]=function(){return this},d.AsyncIterator=v,d.async=function(W,H,G,B){var P=new v(n(W,H,G,B));return d.isGeneratorFunction(H)?P:P.next().then(function(z){return z.done?z.value:P.next()})};function _(W,H,G){var B=r;return function(z,J){if(B===o)throw new Error("Generator is already running");if(B===u){if(z==="throw")throw J;return V()}for(G.method=z,G.arg=J;;){var ue=G.delegate;if(ue){var de=E(ue,G);if(de){if(de===h)continue;return de}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(B===r)throw B=u,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);B=o;var Se=c(W,H,G);if(Se.type==="normal"){if(B=G.done?u:a,Se.arg===h)continue;return{value:Se.arg,done:G.done}}else Se.type==="throw"&&(B=u,G.method="throw",G.arg=Se.arg)}}}function E(W,H){var G=W.iterator[H.method];if(G===M){if(H.delegate=null,H.method==="throw"){if(W.iterator.return&&(H.method="return",H.arg=M,E(W,H),H.method==="throw"))return h;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var B=c(G,W.iterator,H.arg);if(B.type==="throw")return H.method="throw",H.arg=B.arg,H.delegate=null,h;var P=B.arg;if(!P)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,h;if(P.done)H[W.resultName]=P.value,H.next=W.nextLoc,H.method!=="return"&&(H.method="next",H.arg=M);else return P;return H.delegate=null,h}C(R),R[b]="Generator",R[y]=function(){return this},R.toString=function(){return"[object Generator]"};function w(W){var H={tryLoc:W[0]};1 in W&&(H.catchLoc=W[1]),2 in W&&(H.finallyLoc=W[2],H.afterLoc=W[3]),this.tryEntries.push(H)}function k(W){var H=W.completion||{};H.type="normal",delete H.arg,W.completion=H}function I(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(w,this),this.reset(!0)}d.keys=function(W){var H=[];for(var G in W)H.push(G);return H.reverse(),function B(){for(;H.length;){var P=H.pop();if(P in W)return B.value=P,B.done=!1,B}return B.done=!0,B}};function L(W){if(W){var H=W[y];if(H)return H.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var G=-1,B=function P(){for(;++G<W.length;)if(O.call(W,G))return P.value=W[G],P.done=!1,P;return P.value=M,P.done=!0,P};return B.next=B}}return{next:V}}d.values=L;function V(){return{value:M,done:!0}}I.prototype={constructor:I,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=M,this.done=!1,this.delegate=null,this.method="next",this.arg=M,this.tryEntries.forEach(k),!W)for(var H in this)H.charAt(0)==="t"&&O.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=M)},stop:function(){this.done=!0;var W=this.tryEntries[0],H=W.completion;if(H.type==="throw")throw H.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var H=this;function G(de,Se){return z.type="throw",z.arg=W,H.next=de,Se&&(H.method="next",H.arg=M),!!Se}for(var B=this.tryEntries.length-1;B>=0;--B){var P=this.tryEntries[B],z=P.completion;if(P.tryLoc==="root")return G("end");if(P.tryLoc<=this.prev){var J=O.call(P,"catchLoc"),ue=O.call(P,"finallyLoc");if(J&&ue){if(this.prev<P.catchLoc)return G(P.catchLoc,!0);if(this.prev<P.finallyLoc)return G(P.finallyLoc)}else if(J){if(this.prev<P.catchLoc)return G(P.catchLoc,!0)}else if(ue){if(this.prev<P.finallyLoc)return G(P.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(W,H){for(var G=this.tryEntries.length-1;G>=0;--G){var B=this.tryEntries[G];if(B.tryLoc<=this.prev&&O.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var P=B;break}}P&&(W==="break"||W==="continue")&&P.tryLoc<=H&&H<=P.finallyLoc&&(P=null);var z=P?P.completion:{};return z.type=W,z.arg=H,P?(this.method="next",this.next=P.finallyLoc,h):this.complete(z)},complete:function(W,H){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&H&&(this.next=H),h},finish:function(W){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.finallyLoc===W)return this.complete(G.completion,G.afterLoc),k(G),h}},catch:function(W){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.tryLoc===W){var B=G.completion;if(B.type==="throw"){var P=B.arg;k(G)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(W,H,G){return this.delegate={iterator:L(W),resultName:H,nextLoc:G},this.method==="next"&&(this.arg=M),h}}}(function(){return this}()||Function("return this")())},{}],228:[function(F,q,j){var N=F("buffer"),g=N.Buffer;function O(m,y){for(var T in m)y[T]=m[T]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?q.exports=N:(O(N,j),j.Buffer=M);function M(m,y,T){return g(m,y,T)}O(g,M),M.from=function(m,y,T){if(typeof m=="number")throw new TypeError("Argument must not be a number");return g(m,y,T)},M.alloc=function(m,y,T){if(typeof m!="number")throw new TypeError("Argument must be a number");var b=g(m);return y!==void 0?typeof T=="string"?b.fill(y,T):b.fill(y):b.fill(0),b},M.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return g(m)},M.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(m)}},{buffer:73}],229:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/string/from-code-point"),O=a(g),M=F("babel-runtime/core-js/json/stringify"),m=a(M),y=F("babel-runtime/helpers/typeof"),T=a(y),b=F("babel-runtime/core-js/object/define-property"),p=a(b),d=F("babel-runtime/core-js/object/keys"),n=a(d),c=F("babel-runtime/core-js/object/create"),r=a(c);function a(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function(X,Q){return new h(X,Q)},o.SAXParser=h,o.SAXStream=R,o.createStream=f,o.MAX_BUFFER_LENGTH=64*1024;var u=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function h(X,Q){if(!(this instanceof h))return new h(X,Q);var _e=this;l(_e),_e.q=_e.c="",_e.bufferCheckPosition=o.MAX_BUFFER_LENGTH,_e.opt=Q||{},_e.opt.lowercase=_e.opt.lowercase||_e.opt.lowercasetags,_e.looseCase=_e.opt.lowercase?"toLowerCase":"toUpperCase",_e.tags=[],_e.closed=_e.closedRoot=_e.sawRoot=!1,_e.tag=_e.error=null,_e.strict=!!X,_e.noscript=!!(X||_e.opt.noscript),_e.state=z.BEGIN,_e.strictEntities=_e.opt.strictEntities,_e.ENTITIES=_e.strictEntities?(0,r.default)(o.XML_ENTITIES):(0,r.default)(o.ENTITIES),_e.attribList=[],_e.opt.xmlns&&(_e.ns=(0,r.default)(w)),_e.trackPosition=_e.opt.position!==!1,_e.trackPosition&&(_e.position=_e.line=_e.column=0),ue(_e,"onready")}r.default||(Object.create=function(X){function Q(){}Q.prototype=X;var _e=new Q;return _e}),n.default||(Object.keys=function(X){var Q=[];for(var _e in X)X.hasOwnProperty(_e)&&Q.push(_e);return Q});function s(X){for(var Q=Math.max(o.MAX_BUFFER_LENGTH,10),_e=0,ve=0,Re=u.length;ve<Re;ve++){var Je=X[u[ve]].length;if(Je>Q)switch(u[ve]){case"textNode":Se(X);break;case"cdata":de(X,"oncdata",X.cdata),X.cdata="";break;case"script":de(X,"onscript",X.script),X.script="";break;default:pe(X,"Max buffer length exceeded: "+u[ve])}_e=Math.max(_e,Je)}var qe=o.MAX_BUFFER_LENGTH-_e;X.bufferCheckPosition=qe+X.position}function l(X){for(var Q=0,_e=u.length;Q<_e;Q++)X[u[Q]]=""}function t(X){Se(X),X.cdata!==""&&(de(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(de(X,"onscript",X.script),X.script="")}h.prototype={end:function(){Oe(this)},write:Z,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var S;try{S=F("stream").Stream}catch(X){S=function(){}}var x=o.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function f(X,Q){return new R(X,Q)}function R(X,Q){if(!(this instanceof R))return new R(X,Q);S.apply(this),this._parser=new h(X,Q),this.writable=!0,this.readable=!0;var _e=this;this._parser.onend=function(){_e.emit("end")},this._parser.onerror=function(ve){_e.emit("error",ve),_e._parser.error=null},this._decoder=null,x.forEach(function(ve){(0,p.default)(_e,"on"+ve,{get:function(){return _e._parser["on"+ve]},set:function(Je){if(!Je)return _e.removeAllListeners(ve),_e._parser["on"+ve]=Je,Je;_e.on(ve,Je)},enumerable:!0,configurable:!1})})}R.prototype=(0,r.default)(S.prototype,{constructor:{value:R}}),R.prototype.write=function(X){if(typeof N=="function"&&typeof N.isBuffer=="function"&&N.isBuffer(X)){if(!this._decoder){var Q=F("string_decoder").StringDecoder;this._decoder=new Q("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},R.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},R.prototype.on=function(X,Q){var _e=this;return!_e._parser["on"+X]&&x.indexOf(X)!==-1&&(_e._parser["on"+X]=function(){var ve=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ve.splice(0,0,X),_e.emit.apply(_e,ve)}),S.prototype.on.call(_e,X,Q)};var C="[CDATA[",v="DOCTYPE",_="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",w={xml:_,xmlns:E},k=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,I=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,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]/,V=/[#:_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 W(X){return X===" "||X===`
`||X==="\r"||X===" "}function H(X){return X==='"'||X==="'"}function G(X){return X===">"||W(X)}function B(X,Q){return X.test(Q)}function P(X,Q){return!B(X,Q)}var z=0;o.STATE={BEGIN:z++,BEGIN_WHITESPACE:z++,TEXT:z++,TEXT_ENTITY:z++,OPEN_WAKA:z++,SGML_DECL:z++,SGML_DECL_QUOTED:z++,DOCTYPE:z++,DOCTYPE_QUOTED:z++,DOCTYPE_DTD:z++,DOCTYPE_DTD_QUOTED:z++,COMMENT_STARTING:z++,COMMENT:z++,COMMENT_ENDING:z++,COMMENT_ENDED:z++,CDATA:z++,CDATA_ENDING:z++,CDATA_ENDING_2:z++,PROC_INST:z++,PROC_INST_BODY:z++,PROC_INST_ENDING:z++,OPEN_TAG:z++,OPEN_TAG_SLASH:z++,ATTRIB:z++,ATTRIB_NAME:z++,ATTRIB_NAME_SAW_WHITE:z++,ATTRIB_VALUE:z++,ATTRIB_VALUE_QUOTED:z++,ATTRIB_VALUE_CLOSED:z++,ATTRIB_VALUE_UNQUOTED:z++,ATTRIB_VALUE_ENTITY_Q:z++,ATTRIB_VALUE_ENTITY_U:z++,CLOSE_TAG:z++,CLOSE_TAG_SAW_WHITE:z++,SCRIPT:z++,SCRIPT_ENDING:z++},o.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},o.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(o.ENTITIES).forEach(function(X){var Q=o.ENTITIES[X],_e=typeof Q=="number"?String.fromCharCode(Q):Q;o.ENTITIES[X]=_e});for(var J in o.STATE)o.STATE[o.STATE[J]]=J;z=o.STATE;function ue(X,Q,_e){X[Q]&&X[Q](_e)}function de(X,Q,_e){X.textNode&&Se(X),ue(X,Q,_e)}function Se(X){X.textNode=Ae(X.opt,X.textNode),X.textNode&&ue(X,"ontext",X.textNode),X.textNode=""}function Ae(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function pe(X,Q){return Se(X),X.trackPosition&&(Q+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),Q=new Error(Q),X.error=Q,ue(X,"onerror",Q),X}function Oe(X){return X.sawRoot&&!X.closedRoot&&ye(X,"Unclosed root tag"),X.state!==z.BEGIN&&X.state!==z.BEGIN_WHITESPACE&&X.state!==z.TEXT&&pe(X,"Unexpected end"),Se(X),X.c="",X.closed=!0,ue(X,"onend"),h.call(X,X.strict,X.opt),X}function ye(X,Q){if((typeof X=="undefined"?"undefined":(0,T.default)(X))!=="object"||!(X instanceof h))throw new Error("bad call to strictFail");X.strict&&pe(X,Q)}function ce(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,_e=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(_e.ns=Q.ns),X.attribList.length=0,de(X,"onopentagstart",_e)}function ae(X,Q){var _e=X.indexOf(":"),ve=_e<0?["",X]:X.split(":"),Re=ve[0],Je=ve[1];return Q&&X==="xmlns"&&(Re="xmlns",Je=""),{prefix:Re,local:Je}}function re(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var Q=ae(X.attribName,!0),_e=Q.prefix,ve=Q.local;if(_e==="xmlns")if(ve==="xml"&&X.attribValue!==_)ye(X,"xml: prefix must be bound to "+_+`
Actual: `+X.attribValue);else if(ve==="xmlns"&&X.attribValue!==E)ye(X,"xmlns: prefix must be bound to "+E+`
Actual: `+X.attribValue);else{var Re=X.tag,Je=X.tags[X.tags.length-1]||X;Re.ns===Je.ns&&(Re.ns=(0,r.default)(Je.ns)),Re.ns[ve]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,de(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function fe(X,Q){if(X.opt.xmlns){var _e=X.tag,ve=ae(X.tagName);_e.prefix=ve.prefix,_e.local=ve.local,_e.uri=_e.ns[ve.prefix]||"",_e.prefix&&!_e.uri&&(ye(X,"Unbound namespace prefix: "+(0,m.default)(X.tagName)),_e.uri=ve.prefix);var Re=X.tags[X.tags.length-1]||X;_e.ns&&Re.ns!==_e.ns&&(0,n.default)(_e.ns).forEach(function($e){de(X,"onopennamespace",{prefix:$e,uri:_e.ns[$e]})});for(var Je=0,qe=X.attribList.length;Je<qe;Je++){var rt=X.attribList[Je],ut=rt[0],dt=rt[1],ft=ae(ut,!0),Be=ft.prefix,Ie=ft.local,at=Be===""?"":_e.ns[Be]||"",ct={name:ut,value:dt,prefix:Be,local:Ie,uri:at};Be&&Be!=="xmlns"&&!at&&(ye(X,"Unbound namespace prefix: "+(0,m.default)(Be)),ct.uri=Be),X.tag.attributes[ut]=ct,de(X,"onattribute",ct)}X.attribList.length=0}X.tag.isSelfClosing=!!Q,X.sawRoot=!0,X.tags.push(X.tag),de(X,"onopentag",X.tag),Q||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=z.SCRIPT:X.state=z.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function te(X){if(!X.tagName){ye(X,"Weird empty close tag."),X.textNode+="</>",X.state=z.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=z.SCRIPT;return}de(X,"onscript",X.script),X.script=""}var Q=X.tags.length,_e=X.tagName;X.strict||(_e=_e[X.looseCase]());for(var ve=_e;Q--;){var Re=X.tags[Q];if(Re.name!==ve)ye(X,"Unexpected close tag");else break}if(Q<0){ye(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=z.TEXT;return}X.tagName=_e;for(var Je=X.tags.length;Je-- >Q;){var qe=X.tag=X.tags.pop();X.tagName=X.tag.name,de(X,"onclosetag",X.tagName);var rt={};for(var ut in qe.ns)rt[ut]=qe.ns[ut];var dt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&qe.ns!==dt.ns&&(0,n.default)(qe.ns).forEach(function(ft){var Be=qe.ns[ft];de(X,"onclosenamespace",{prefix:ft,uri:Be})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=z.TEXT}function ne(X){var Q=X.entity,_e=Q.toLowerCase(),ve,Re="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[_e]?X.ENTITIES[_e]:(Q=_e,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ve=parseInt(Q,16),Re=ve.toString(16)):(Q=Q.slice(1),ve=parseInt(Q,10),Re=ve.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ve)||Re.toLowerCase()!==Q?(ye(X,"Invalid character entity"),"&"+X.entity+";"):(0,O.default)(ve))}function Te(X,Q){Q==="<"?(X.state=z.OPEN_WAKA,X.startTagPosition=X.position):W(Q)||(ye(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=z.TEXT)}function ie(X,Q){var _e="";return Q<X.length&&(_e=X.charAt(Q)),_e}function Z(X){var Q=this;if(this.error)throw this.error;if(Q.closed)return pe(Q,"Cannot write after close. Assign an onready handler.");if(X===null)return Oe(Q);(typeof X=="undefined"?"undefined":(0,T.default)(X))==="object"&&(X=X.toString());for(var _e=0,ve="";!(ve=ie(X,_e++),Q.c=ve,!ve);){Q.trackPosition&&(Q.position++,ve===`
`?(Q.line++,Q.column=0):Q.column++);switch(Q.state){case z.BEGIN:if(Q.state=z.BEGIN_WHITESPACE,ve==="\uFEFF")continue;Te(Q,ve);continue;case z.BEGIN_WHITESPACE:Te(Q,ve);continue;case z.TEXT:if(Q.sawRoot&&!Q.closedRoot){for(var Re=_e-1;ve&&ve!=="<"&&ve!=="&";)ve=ie(X,_e++),ve&&Q.trackPosition&&(Q.position++,ve===`
`?(Q.line++,Q.column=0):Q.column++);Q.textNode+=X.substring(Re,_e-1)}ve==="<"&&!(Q.sawRoot&&Q.closedRoot&&!Q.strict)?(Q.state=z.OPEN_WAKA,Q.startTagPosition=Q.position):(!W(ve)&&(!Q.sawRoot||Q.closedRoot)&&ye(Q,"Text data outside of root node."),ve==="&"?Q.state=z.TEXT_ENTITY:Q.textNode+=ve);continue;case z.SCRIPT:ve==="<"?Q.state=z.SCRIPT_ENDING:Q.script+=ve;continue;case z.SCRIPT_ENDING:ve==="/"?Q.state=z.CLOSE_TAG:(Q.script+="<"+ve,Q.state=z.SCRIPT);continue;case z.OPEN_WAKA:if(ve==="!")Q.state=z.SGML_DECL,Q.sgmlDecl="";else if(!W(ve))if(B(k,ve))Q.state=z.OPEN_TAG,Q.tagName=ve;else if(ve==="/")Q.state=z.CLOSE_TAG,Q.tagName="";else if(ve==="?")Q.state=z.PROC_INST,Q.procInstName=Q.procInstBody="";else{if(ye(Q,"Unencoded <"),Q.startTagPosition+1<Q.position){var Je=Q.position-Q.startTagPosition;ve=new Array(Je).join(" ")+ve}Q.textNode+="<"+ve,Q.state=z.TEXT}continue;case z.SGML_DECL:(Q.sgmlDecl+ve).toUpperCase()===C?(de(Q,"onopencdata"),Q.state=z.CDATA,Q.sgmlDecl="",Q.cdata=""):Q.sgmlDecl+ve==="--"?(Q.state=z.COMMENT,Q.comment="",Q.sgmlDecl=""):(Q.sgmlDecl+ve).toUpperCase()===v?(Q.state=z.DOCTYPE,(Q.doctype||Q.sawRoot)&&ye(Q,"Inappropriately located doctype declaration"),Q.doctype="",Q.sgmlDecl=""):ve===">"?(de(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=z.TEXT):(H(ve)&&(Q.state=z.SGML_DECL_QUOTED),Q.sgmlDecl+=ve);continue;case z.SGML_DECL_QUOTED:ve===Q.q&&(Q.state=z.SGML_DECL,Q.q=""),Q.sgmlDecl+=ve;continue;case z.DOCTYPE:ve===">"?(Q.state=z.TEXT,de(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=ve,ve==="["?Q.state=z.DOCTYPE_DTD:H(ve)&&(Q.state=z.DOCTYPE_QUOTED,Q.q=ve));continue;case z.DOCTYPE_QUOTED:Q.doctype+=ve,ve===Q.q&&(Q.q="",Q.state=z.DOCTYPE);continue;case z.DOCTYPE_DTD:Q.doctype+=ve,ve==="]"?Q.state=z.DOCTYPE:H(ve)&&(Q.state=z.DOCTYPE_DTD_QUOTED,Q.q=ve);continue;case z.DOCTYPE_DTD_QUOTED:Q.doctype+=ve,ve===Q.q&&(Q.state=z.DOCTYPE_DTD,Q.q="");continue;case z.COMMENT:ve==="-"?Q.state=z.COMMENT_ENDING:Q.comment+=ve;continue;case z.COMMENT_ENDING:ve==="-"?(Q.state=z.COMMENT_ENDED,Q.comment=Ae(Q.opt,Q.comment),Q.comment&&de(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+ve,Q.state=z.COMMENT);continue;case z.COMMENT_ENDED:ve!==">"?(ye(Q,"Malformed comment"),Q.comment+="--"+ve,Q.state=z.COMMENT):Q.state=z.TEXT;continue;case z.CDATA:ve==="]"?Q.state=z.CDATA_ENDING:Q.cdata+=ve;continue;case z.CDATA_ENDING:ve==="]"?Q.state=z.CDATA_ENDING_2:(Q.cdata+="]"+ve,Q.state=z.CDATA);continue;case z.CDATA_ENDING_2:ve===">"?(Q.cdata&&de(Q,"oncdata",Q.cdata),de(Q,"onclosecdata"),Q.cdata="",Q.state=z.TEXT):ve==="]"?Q.cdata+="]":(Q.cdata+="]]"+ve,Q.state=z.CDATA);continue;case z.PROC_INST:ve==="?"?Q.state=z.PROC_INST_ENDING:W(ve)?Q.state=z.PROC_INST_BODY:Q.procInstName+=ve;continue;case z.PROC_INST_BODY:if(!Q.procInstBody&&W(ve))continue;ve==="?"?Q.state=z.PROC_INST_ENDING:Q.procInstBody+=ve;continue;case z.PROC_INST_ENDING:ve===">"?(de(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=z.TEXT):(Q.procInstBody+="?"+ve,Q.state=z.PROC_INST_BODY);continue;case z.OPEN_TAG:B(I,ve)?Q.tagName+=ve:(ce(Q),ve===">"?fe(Q):ve==="/"?Q.state=z.OPEN_TAG_SLASH:(W(ve)||ye(Q,"Invalid character in tag name"),Q.state=z.ATTRIB));continue;case z.OPEN_TAG_SLASH:ve===">"?(fe(Q,!0),te(Q)):(ye(Q,"Forward-slash in opening tag not followed by >"),Q.state=z.ATTRIB);continue;case z.ATTRIB:if(W(ve))continue;ve===">"?fe(Q):ve==="/"?Q.state=z.OPEN_TAG_SLASH:B(k,ve)?(Q.attribName=ve,Q.attribValue="",Q.state=z.ATTRIB_NAME):ye(Q,"Invalid attribute name");continue;case z.ATTRIB_NAME:ve==="="?Q.state=z.ATTRIB_VALUE:ve===">"?(ye(Q,"Attribute without value"),Q.attribValue=Q.attribName,re(Q),fe(Q)):W(ve)?Q.state=z.ATTRIB_NAME_SAW_WHITE:B(I,ve)?Q.attribName+=ve:ye(Q,"Invalid attribute name");continue;case z.ATTRIB_NAME_SAW_WHITE:if(ve==="=")Q.state=z.ATTRIB_VALUE;else{if(W(ve))continue;ye(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",de(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",ve===">"?fe(Q):B(k,ve)?(Q.attribName=ve,Q.state=z.ATTRIB_NAME):(ye(Q,"Invalid attribute name"),Q.state=z.ATTRIB)}continue;case z.ATTRIB_VALUE:if(W(ve))continue;H(ve)?(Q.q=ve,Q.state=z.ATTRIB_VALUE_QUOTED):(ye(Q,"Unquoted attribute value"),Q.state=z.ATTRIB_VALUE_UNQUOTED,Q.attribValue=ve);continue;case z.ATTRIB_VALUE_QUOTED:if(ve!==Q.q){ve==="&"?Q.state=z.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=ve;continue}re(Q),Q.q="",Q.state=z.ATTRIB_VALUE_CLOSED;continue;case z.ATTRIB_VALUE_CLOSED:W(ve)?Q.state=z.ATTRIB:ve===">"?fe(Q):ve==="/"?Q.state=z.OPEN_TAG_SLASH:B(k,ve)?(ye(Q,"No whitespace between attributes"),Q.attribName=ve,Q.attribValue="",Q.state=z.ATTRIB_NAME):ye(Q,"Invalid attribute name");continue;case z.ATTRIB_VALUE_UNQUOTED:if(!G(ve)){ve==="&"?Q.state=z.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=ve;continue}re(Q),ve===">"?fe(Q):Q.state=z.ATTRIB;continue;case z.CLOSE_TAG:if(Q.tagName)ve===">"?te(Q):B(I,ve)?Q.tagName+=ve:Q.script?(Q.script+="</"+Q.tagName,Q.tagName="",Q.state=z.SCRIPT):(W(ve)||ye(Q,"Invalid tagname in closing tag"),Q.state=z.CLOSE_TAG_SAW_WHITE);else{if(W(ve))continue;P(k,ve)?Q.script?(Q.script+="</"+ve,Q.state=z.SCRIPT):ye(Q,"Invalid tagname in closing tag."):Q.tagName=ve}continue;case z.CLOSE_TAG_SAW_WHITE:if(W(ve))continue;ve===">"?te(Q):ye(Q,"Invalid characters in closing tag");continue;case z.TEXT_ENTITY:case z.ATTRIB_VALUE_ENTITY_Q:case z.ATTRIB_VALUE_ENTITY_U:var qe,rt;switch(Q.state){case z.TEXT_ENTITY:qe=z.TEXT,rt="textNode";break;case z.ATTRIB_VALUE_ENTITY_Q:qe=z.ATTRIB_VALUE_QUOTED,rt="attribValue";break;case z.ATTRIB_VALUE_ENTITY_U:qe=z.ATTRIB_VALUE_UNQUOTED,rt="attribValue";break}ve===";"?(Q[rt]+=ne(Q),Q.entity="",Q.state=qe):B(Q.entity.length?V:L,ve)?Q.entity+=ve:(ye(Q,"Invalid character in entity name"),Q[rt]+="&"+Q.entity+ve,Q.entity="",Q.state=qe);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&s(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */O.default||function(){var X=String.fromCharCode,Q=Math.floor,_e=function(){var Re=16384,Je=[],qe,rt,ut=-1,dt=arguments.length;if(!dt)return"";for(var ft="";++ut<dt;){var Be=Number(arguments[ut]);if(!isFinite(Be)||Be<0||Be>1114111||Q(Be)!==Be)throw RangeError("Invalid code point: "+Be);Be<=65535?Je.push(Be):(Be-=65536,qe=(Be>>10)+55296,rt=Be%1024+56320,Je.push(qe,rt)),(ut+1===dt||Je.length>Re)&&(ft+=X.apply(null,Je),Je.length=0)}return ft};p.default?Object.defineProperty(String,"fromCodePoint",{value:_e,configurable:!0,writable:!0}):String.fromCodePoint=_e}()})(typeof j=="undefined"?(void 0).sax={}:j)}).call(this,F("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(F,q,j){q.exports=O;var N=F("events").EventEmitter,g=F("inherits");g(O,N),O.Readable=F("readable-stream/readable.js"),O.Writable=F("readable-stream/writable.js"),O.Duplex=F("readable-stream/duplex.js"),O.Transform=F("readable-stream/transform.js"),O.PassThrough=F("readable-stream/passthrough.js"),O.Stream=O;function O(){N.call(this)}O.prototype.pipe=function(M,m){var y=this;function T(a){M.writable&&(M.write(a)===!1&&y.pause&&y.pause())}y.on("data",T);function b(){y.readable&&y.resume&&y.resume()}M.on("drain",b),!M._isStdio&&(!m||m.end!==!1)&&(y.on("end",d),y.on("close",n));var p=!1;function d(){if(p)return;p=!0,M.end()}function n(){if(p)return;p=!0,typeof M.destroy=="function"&&M.destroy()}function c(a){if(r(),N.listenerCount(this,"error")===0)throw a}y.on("error",c),M.on("error",c);function r(){y.removeListener("data",T),M.removeListener("drain",b),y.removeListener("end",d),y.removeListener("close",n),y.removeListener("error",c),M.removeListener("error",c),y.removeListener("end",r),y.removeListener("close",r),M.removeListener("close",r)}return y.on("end",r),y.on("close",r),M.on("close",r),M.emit("pipe",y),M}},{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(F,q,j){(function(N){var g=F("./lib/request"),O=F("./lib/response"),M=F("xtend"),m=F("builtin-status-codes"),y=F("url"),T=j;T.request=function(b,p){typeof b=="string"?b=y.parse(b):b=M(b);var d=N.location.protocol.search(/^https?:$/)===-1?"http:":"",n=b.protocol||d,c=b.hostname||b.host,r=b.port,a=b.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),b.url=(c?n+"//"+c:"")+(r?":"+r:"")+a,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var o=new g(b);return p&&o.on("response",p),o},T.get=function(p,d){var n=T.request(p,d);return n.end(),n},T.ClientRequest=g,T.IncomingMessage=O.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(F,q,j){(function(N){"use strict";j.fetch=T(N.fetch)&&T(N.ReadableStream),j.writableStream=T(N.WritableStream),j.abortController=T(N.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(b){}var g;function O(){if(g!==void 0)return g;if(N.XMLHttpRequest){g=new N.XMLHttpRequest;try{g.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(b){g=null}}else g=null;return g}function M(b){var p=O();if(!p)return!1;try{return p.responseType=b,p.responseType===b}catch(d){}return!1}var m=typeof N.ArrayBuffer!="undefined",y=m&&T(N.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||m&&M("arraybuffer"),j.msstream=!j.fetch&&y&&M("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&m&&M("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(O()?T(O().overrideMimeType):!1),j.vbArray=T(N.VBArray);function T(b){return typeof b=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(F,q,j){(function(N,g,O){"use strict";var M=F("babel-runtime/core-js/object/keys"),m=y(M);function y(s){return s&&s.__esModule?s:{default:s}}var T=F("./capability"),b=F("inherits"),p=F("./response"),d=F("readable-stream"),n=F("to-arraybuffer"),c=p.IncomingMessage,r=p.readyStates;function a(s,l){return T.fetch&&l?"fetch":T.mozchunkedarraybuffer?"moz-chunked-arraybuffer":T.msstream?"ms-stream":T.arraybuffer&&s?"arraybuffer":T.vbArray&&s?"text:vbarray":"text"}var o=q.exports=function(s){var l=this;d.Writable.call(l),l._opts=s,l._body=[],l._headers={},s.auth&&l.setHeader("Authorization","Basic "+new O(s.auth).toString("base64")),(0,m.default)(s.headers).forEach(function(x){l.setHeader(x,s.headers[x])});var t,S=!0;if(s.mode==="disable-fetch"||"requestTimeout"in s&&!T.abortController)S=!1,t=!0;else if(s.mode==="prefer-streaming")t=!1;else if(s.mode==="allow-wrong-content-type")t=!T.overrideMimeType;else if(!s.mode||s.mode==="default"||s.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");l._mode=a(t,S),l._fetchTimer=null,l.on("finish",function(){l._onFinish()})};b(o,d.Writable),o.prototype.setHeader=function(s,l){var t=this,S=s.toLowerCase();if(h.indexOf(S)!==-1)return;t._headers[S]={name:s,value:l}},o.prototype.getHeader=function(s){var l=this._headers[s.toLowerCase()];return l?l.value:null},o.prototype.removeHeader=function(s){var l=this;delete l._headers[s.toLowerCase()]},o.prototype._onFinish=function(){var s=this;if(s._destroyed)return;var l=s._opts,t=s._headers,S=null;l.method!=="GET"&&l.method!=="HEAD"&&(T.arraybuffer?S=n(O.concat(s._body)):T.blobConstructor?S=new g.Blob(s._body.map(function(_){return n(_)}),{type:(t["content-type"]||{}).value||""}):S=O.concat(s._body).toString());var x=[];if((0,m.default)(t).forEach(function(_){var E=t[_].name,w=t[_].value;Array.isArray(w)?w.forEach(function(k){x.push([E,k])}):x.push([E,w])}),s._mode==="fetch"){var f=null,R=null;if(T.abortController){var C=new AbortController;f=C.signal,s._fetchAbortController=C,"requestTimeout"in l&&l.requestTimeout!==0&&(s._fetchTimer=g.setTimeout(function(){s.emit("requestTimeout"),s._fetchAbortController&&s._fetchAbortController.abort()},l.requestTimeout))}g.fetch(s._opts.url,{method:s._opts.method,headers:x,body:S||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:f}).then(function(_){s._fetchResponse=_,s._connect()},function(_){g.clearTimeout(s._fetchTimer),s._destroyed||s.emit("error",_)})}else{var v=s._xhr=new g.XMLHttpRequest;try{v.open(s._opts.method,s._opts.url,!0)}catch(_){N.nextTick(function(){s.emit("error",_)});return}"responseType"in v&&(v.responseType=s._mode.split(":")[0]),"withCredentials"in v&&(v.withCredentials=!!l.withCredentials),s._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(v.timeout=l.requestTimeout,v.ontimeout=function(){s.emit("requestTimeout")}),x.forEach(function(_){v.setRequestHeader(_[0],_[1])}),s._response=null,v.onreadystatechange=function(){switch(v.readyState){case r.LOADING:case r.DONE:s._onXHRProgress();break}},s._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){s._onXHRProgress()}),v.onerror=function(){if(s._destroyed)return;s.emit("error",new Error("XHR error"))};try{v.send(S)}catch(_){N.nextTick(function(){s.emit("error",_)});return}}};function u(s){try{var l=s.status;return l!==null&&l!==0}catch(t){return!1}}o.prototype._onXHRProgress=function(){var s=this;if(!u(s._xhr)||s._destroyed)return;s._response||s._connect(),s._response._onXHRProgress()},o.prototype._connect=function(){var s=this;if(s._destroyed)return;s._response=new c(s._xhr,s._fetchResponse,s._mode,s._fetchTimer),s._response.on("error",function(l){s.emit("error",l)}),s.emit("response",s._response)},o.prototype._write=function(s,l,t){var S=this;S._body.push(s),t()},o.prototype.abort=o.prototype.destroy=function(){var s=this;s._destroyed=!0,g.clearTimeout(s._fetchTimer),s._response&&(s._response._destroyed=!0),s._xhr?s._xhr.abort():s._fetchAbortController&&s._fetchAbortController.abort()},o.prototype.end=function(s,l,t){var S=this;typeof s=="function"&&(t=s,s=void 0),d.Writable.prototype.end.call(S,s,l,t)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var h=["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,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("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(F,q,j){(function(N,g,O){"use strict";var M=F("babel-runtime/core-js/promise"),m=y(M);function y(c){return c&&c.__esModule?c:{default:c}}var T=F("./capability"),b=F("inherits"),p=F("readable-stream"),d=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=j.IncomingMessage=function(c,r,a,o){var u=this;if(p.Readable.call(u),u._mode=a,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){N.nextTick(function(){u.emit("close")})}),a==="fetch"){var h=function f(){l.read().then(function(R){if(u._destroyed)return;if(R.done){g.clearTimeout(o),u.push(null);return}u.push(new O(R.value)),f()}).catch(function(R){g.clearTimeout(o),u._destroyed||u.emit("error",R)})};if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach(function(f,R){u.headers[R.toLowerCase()]=f,u.rawHeaders.push(R,f)}),T.writableStream){var s=new WritableStream({write:function(R){return new m.default(function(C,v){u._destroyed?v():u.push(new O(R))?C():u._resumeFetch=C})},close:function(){g.clearTimeout(o),u._destroyed||u.push(null)},abort:function(R){u._destroyed||u.emit("error",R)}});try{r.body.pipeTo(s).catch(function(f){g.clearTimeout(o),u._destroyed||u.emit("error",f)});return}catch(f){}}var l=r.body.getReader();h()}else{u._xhr=c,u._pos=0,u.url=c.responseURL,u.statusCode=c.status,u.statusMessage=c.statusText;var t=c.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(f){var R=f.match(/^([^:]+):\s*(.*)/);if(R){var C=R[1].toLowerCase();C==="set-cookie"?(u.headers[C]===void 0&&(u.headers[C]=[]),u.headers[C].push(R[2])):u.headers[C]!==void 0?u.headers[C]+=", "+R[2]:u.headers[C]=R[2],u.rawHeaders.push(R[1],R[2])}}),u._charset="x-user-defined",!T.overrideMimeType){var S=u.rawHeaders["mime-type"];if(S){var x=S.match(/;\s*charset=([^;])(;|$)/);x&&(u._charset=x[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};b(n,p.Readable),n.prototype._read=function(){var c=this,r=c._resumeFetch;r&&(c._resumeFetch=null,r())},n.prototype._onXHRProgress=function(){var c=this,r=c._xhr,a=null;switch(c._mode){case"text:vbarray":if(r.readyState!==d.DONE)break;try{a=new g.VBArray(r.responseBody).toArray()}catch(l){}if(a!==null){c.push(new O(a));break}case"text":try{a=r.responseText}catch(l){c._mode="text:vbarray";break}if(a.length>c._pos){var o=a.substr(c._pos);if(c._charset==="x-user-defined"){for(var u=new O(o.length),h=0;h<o.length;h++)u[h]=o.charCodeAt(h)&255;c.push(u)}else c.push(o,c._charset);c._pos=a.length}break;case"arraybuffer":if(r.readyState!==d.DONE||!r.response)break;a=r.response,c.push(new O(new Uint8Array(a)));break;case"moz-chunked-arraybuffer":if(a=r.response,r.readyState!==d.LOADING||!a)break;c.push(new O(new Uint8Array(a)));break;case"ms-stream":if(a=r.response,r.readyState!==d.LOADING)break;var s=new g.MSStreamReader;s.onprogress=function(){s.result.byteLength>c._pos&&(c.push(new O(new Uint8Array(s.result.slice(c._pos)))),c._pos=s.result.byteLength)},s.onload=function(){c.push(null)},s.readAsArrayBuffer(a);break}c._xhr.readyState===d.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(F,q,j){"use strict";var N=F("safe-buffer").Buffer,g=N.isEncoding||function(s){s=""+s;switch(s&&s.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 O(s){if(!s)return"utf8";for(var l;;)switch(s){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 s;default:if(l)return;s=(""+s).toLowerCase(),l=!0}}function M(s){var l=O(s);if(typeof l!="string"&&(N.isEncoding===g||!g(s)))throw new Error("Unknown encoding: "+s);return l||s}j.StringDecoder=m;function m(s){this.encoding=M(s);var l;switch(this.encoding){case"utf16le":this.text=c,this.end=r,l=4;break;case"utf8":this.fillLast=p,l=4;break;case"base64":this.text=a,this.end=o,l=3;break;default:this.write=u,this.end=h;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(l)}m.prototype.write=function(s){if(s.length===0)return"";var l,t;if(this.lastNeed){if(l=this.fillLast(s),l===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<s.length?l?l+this.text(s,t):this.text(s,t):l||""},m.prototype.end=n,m.prototype.text=d,m.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length};function y(s){return s<=127?0:s>>5===6?2:s>>4===14?3:s>>3===30?4:s>>6===2?-1:-2}function T(s,l,t){var S=l.length-1;if(S<t)return 0;var x=y(l[S]);return x>=0?(x>0&&(s.lastNeed=x-1),x):--S<t||x===-2?0:(x=y(l[S]),x>=0?(x>0&&(s.lastNeed=x-2),x):--S<t||x===-2?0:(x=y(l[S]),x>=0?(x>0&&(x===2?x=0:s.lastNeed=x-3),x):0))}function b(s,l,t){if((l[0]&192)!==128)return s.lastNeed=0,"\uFFFD";if(s.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return s.lastNeed=1,"\uFFFD";if(s.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return s.lastNeed=2,"\uFFFD"}}function p(s){var l=this.lastTotal-this.lastNeed,t=b(this,s,l);if(t!==void 0)return t;if(this.lastNeed<=s.length)return s.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,l,0,s.length),this.lastNeed-=s.length}function d(s,l){var t=T(this,s,l);if(!this.lastNeed)return s.toString("utf8",l);this.lastTotal=t;var S=s.length-(t-this.lastNeed);return s.copy(this.lastChar,0,S),s.toString("utf8",l,S)}function n(s){var l=s&&s.length?this.write(s):"";return this.lastNeed?l+"\uFFFD":l}function c(s,l){if((s.length-l)%2===0){var t=s.toString("utf16le",l);if(t){var S=t.charCodeAt(t.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString("utf16le",l,s.length-1)}function r(s){var l=s&&s.length?this.write(s):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,t)}return l}function a(s,l){var t=(s.length-l)%3;return t===0?s.toString("base64",l):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString("base64",l,s.length-t))}function o(s){var l=s&&s.length?this.write(s):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function u(s){return s.toString(this.encoding)}function h(s){return s&&s.length?this.write(s):""}},{"safe-buffer":228}],236:[function(F,q,j){(function(N,g){var O=F("process/browser.js").nextTick,M=Function.prototype.apply,m=Array.prototype.slice,y={},T=0;j.setTimeout=function(){return new b(M.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new b(M.call(setInterval,window,arguments),clearInterval)},j.clearTimeout=j.clearInterval=function(p){p.close()};function b(p,d){this._id=p,this._clearFn=d}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},j.enroll=function(p,d){clearTimeout(p._idleTimeoutId),p._idleTimeout=d},j.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},j._unrefActive=j.active=function(p){clearTimeout(p._idleTimeoutId);var d=p._idleTimeout;d>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},d))},j.setImmediate=typeof N=="function"?N:function(p){var d=T++,n=arguments.length<2?!1:m.call(arguments,1);return y[d]=!0,O(function(){y[d]&&(n?p.apply(null,n):p.call(null),j.clearImmediate(d))}),d},j.clearImmediate=typeof g=="function"?g:function(p){delete y[p]}}).call(this,F("timers").setImmediate,F("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(F,q,j){var N=F("buffer").Buffer;q.exports=function(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(N.isBuffer(g)){for(var O=new Uint8Array(g.length),M=g.length,m=0;m<M;m++)O[m]=g[m];return O.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(F,q,j){"use strict";var N=F("punycode"),g=F("./util");j.parse=l,j.resolve=S,j.resolveObject=x,j.format=t,j.Url=O;function O(){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 M=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,y=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,T=["<",">",'"',"`"," ","\r",`
`," "],b=["{","}","|","\\","^","`"].concat(T),p=["'"].concat(b),d=["%","/","?",";","#"].concat(p),n=["/","?","#"],c=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,a=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},s=F("querystring");function l(f,R,C){if(f&&g.isObject(f)&&f instanceof O)return f;var v=new O;return v.parse(f,R,C),v}O.prototype.parse=function(f,R,C){if(!g.isString(f))throw new TypeError("Parameter 'url' must be a string, not "+typeof f);var v=f.indexOf("?"),_=v!==-1&&v<f.indexOf("#")?"?":"#",E=f.split(_),w=/\\/g;E[0]=E[0].replace(w,"/"),f=E.join(_);var k=f;if(k=k.trim(),!C&&f.split("#").length===1){var I=y.exec(k);if(I)return this.path=k,this.href=k,this.pathname=I[1],I[2]?(this.search=I[2],R?this.query=s.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var L=M.exec(k);if(L){L=L[0];var V=L.toLowerCase();this.protocol=V,k=k.substr(L.length)}if(C||L||k.match(/^\/\/[^@\/]+@[^@\/]+/)){var W=k.substr(0,2)==="//";W&&!(L&&u[L])&&(k=k.substr(2),this.slashes=!0)}if(!u[L]&&(W||L&&!h[L])){for(var H=-1,G=0;G<n.length;G++){var B=k.indexOf(n[G]);B!==-1&&(H===-1||B<H)&&(H=B)}var P,z;H===-1?z=k.lastIndexOf("@"):z=k.lastIndexOf("@",H),z!==-1&&(P=k.slice(0,z),k=k.slice(z+1),this.auth=decodeURIComponent(P)),H=-1;for(var G=0;G<d.length;G++){var B=k.indexOf(d[G]);B!==-1&&(H===-1||B<H)&&(H=B)}H===-1&&(H=k.length),this.host=k.slice(0,H),k=k.slice(H),this.parseHost(),this.hostname=this.hostname||"";var J=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!J)for(var ue=this.hostname.split(/\./),G=0,de=ue.length;G<de;G++){var Se=ue[G];if(!Se)continue;if(!Se.match(r)){for(var Ae="",pe=0,Oe=Se.length;pe<Oe;pe++)Se.charCodeAt(pe)>127?Ae+="x":Ae+=Se[pe];if(!Ae.match(r)){var ye=ue.slice(0,G),ce=ue.slice(G+1),ae=Se.match(a);ae&&(ye.push(ae[1]),ce.unshift(ae[2])),ce.length&&(k="/"+ce.join(".")+k),this.hostname=ye.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),J||(this.hostname=N.toASCII(this.hostname));var re=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+re,this.href+=this.host,J&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!o[V])for(var G=0,de=p.length;G<de;G++){var te=p[G];if(k.indexOf(te)===-1)continue;var ne=encodeURIComponent(te);ne===te&&(ne=escape(te)),k=k.split(te).join(ne)}var Te=k.indexOf("#");Te!==-1&&(this.hash=k.substr(Te),k=k.slice(0,Te));var ie=k.indexOf("?");if(ie!==-1?(this.search=k.substr(ie),this.query=k.substr(ie+1),R&&(this.query=s.parse(this.query)),k=k.slice(0,ie)):R&&(this.search="",this.query={}),k&&(this.pathname=k),h[V]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",Z=this.search||"";this.path=re+Z}return this.href=this.format(),this};function t(f){return g.isString(f)&&(f=l(f)),f instanceof O?f.format():O.prototype.format.call(f)}O.prototype.format=function(){var f=this.auth||"";f&&(f=encodeURIComponent(f),f=f.replace(/%3A/i,":"),f+="@");var R=this.protocol||"",C=this.pathname||"",v=this.hash||"",_=!1,E="";this.host?_=f+this.host:this.hostname&&(_=f+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(_+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(E=s.stringify(this.query));var w=this.search||E&&"?"+E||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||h[R])&&_!==!1?(_="//"+(_||""),C&&C.charAt(0)!=="/"&&(C="/"+C)):_||(_=""),v&&v.charAt(0)!=="#"&&(v="#"+v),w&&w.charAt(0)!=="?"&&(w="?"+w),C=C.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),w=w.replace("#","%23"),R+_+C+w+v};function S(f,R){return l(f,!1,!0).resolve(R)}O.prototype.resolve=function(f){return this.resolveObject(l(f,!1,!0)).format()};function x(f,R){return f?l(f,!1,!0).resolveObject(R):R}O.prototype.resolveObject=function(f){if(g.isString(f)){var R=new O;R.parse(f,!1,!0),f=R}for(var C=new O,v=Object.keys(this),_=0;_<v.length;_++){var E=v[_];C[E]=this[E]}if(C.hash=f.hash,f.href==="")return C.href=C.format(),C;if(f.slashes&&!f.protocol){for(var w=Object.keys(f),k=0;k<w.length;k++){var I=w[k];I!=="protocol"&&(C[I]=f[I])}return h[C.protocol]&&C.hostname&&!C.pathname&&(C.path=C.pathname="/"),C.href=C.format(),C}if(f.protocol&&f.protocol!==C.protocol){if(!h[f.protocol]){for(var L=Object.keys(f),V=0;V<L.length;V++){var W=L[V];C[W]=f[W]}return C.href=C.format(),C}if(C.protocol=f.protocol,!f.host&&!u[f.protocol]){for(var de=(f.pathname||"").split("/");de.length&&!(f.host=de.shift()););f.host||(f.host=""),f.hostname||(f.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),C.pathname=de.join("/")}else C.pathname=f.pathname;if(C.search=f.search,C.query=f.query,C.host=f.host||"",C.auth=f.auth,C.hostname=f.hostname||f.host,C.port=f.port,C.pathname||C.search){var H=C.pathname||"",G=C.search||"";C.path=H+G}return C.slashes=C.slashes||f.slashes,C.href=C.format(),C}var B=C.pathname&&C.pathname.charAt(0)==="/",P=f.host||f.pathname&&f.pathname.charAt(0)==="/",z=P||B||C.host&&f.pathname,J=z,ue=C.pathname&&C.pathname.split("/")||[],de=f.pathname&&f.pathname.split("/")||[],Se=C.protocol&&!h[C.protocol];if(Se&&(C.hostname="",C.port=null,C.host&&(ue[0]===""?ue[0]=C.host:ue.unshift(C.host)),C.host="",f.protocol&&(f.hostname=null,f.port=null,f.host&&(de[0]===""?de[0]=f.host:de.unshift(f.host)),f.host=null),z=z&&(de[0]===""||ue[0]==="")),P)C.host=f.host||f.host===""?f.host:C.host,C.hostname=f.hostname||f.hostname===""?f.hostname:C.hostname,C.search=f.search,C.query=f.query,ue=de;else if(de.length)ue||(ue=[]),ue.pop(),ue=ue.concat(de),C.search=f.search,C.query=f.query;else if(!g.isNullOrUndefined(f.search)){if(Se){C.hostname=C.host=ue.shift();var Ae=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;Ae&&(C.auth=Ae.shift(),C.host=C.hostname=Ae.shift())}return C.search=f.search,C.query=f.query,(!g.isNull(C.pathname)||!g.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!ue.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var pe=ue.slice(-1)[0],Oe=(C.host||f.host||ue.length>1)&&(pe==="."||pe==="..")||pe==="",ye=0,ce=ue.length;ce>=0;ce--)pe=ue[ce],pe==="."?ue.splice(ce,1):pe===".."?(ue.splice(ce,1),ye++):ye&&(ue.splice(ce,1),ye--);if(!z&&!J)for(;ye--;ye)ue.unshift("..");z&&ue[0]!==""&&(!ue[0]||ue[0].charAt(0)!=="/")&&ue.unshift(""),Oe&&ue.join("/").substr(-1)!=="/"&&ue.push("");var ae=ue[0]===""||ue[0]&&ue[0].charAt(0)==="/";if(Se){C.hostname=C.host=ae?"":ue.length?ue.shift():"";var Ae=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;Ae&&(C.auth=Ae.shift(),C.host=C.hostname=Ae.shift())}return z=z||C.host&&ue.length,z&&!ae&&ue.unshift(""),ue.length?C.pathname=ue.join("/"):(C.pathname=null,C.path=null),(!g.isNull(C.pathname)||!g.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=f.auth||C.auth,C.slashes=C.slashes||f.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var f=this.host,R=m.exec(f);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),f=f.substr(0,f.length-R.length)),f&&(this.hostname=f)}},{"./util":239,punycode:209,querystring:212}],239:[function(F,q,j){"use strict";q.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(F,q,j){(function(N){q.exports=g;function g(M,m){if(O("noDeprecation"))return M;var y=!1;function T(){if(!y){if(O("throwDeprecation"))throw new Error(m);O("traceDeprecation")?console.trace(m):console.warn(m),y=!0}return M.apply(this,arguments)}return T}function O(M){try{if(!N.localStorage)return!1}catch(y){return!1}var m=N.localStorage[M];return m==null?!1:String(m).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(F,q,j){typeof Object.create=="function"?q.exports=function(g,O){g.super_=O,g.prototype=Object.create(O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:q.exports=function(g,O){g.super_=O;var M=function(){};M.prototype=O.prototype,g.prototype=new M,g.prototype.constructor=g}},{}],242:[function(F,q,j){q.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(F,q,j){(function(N,g){var O=/%[sdj%]/g;j.format=function(H){if(!S(H)){for(var G=[],B=0;B<arguments.length;B++)G.push(y(arguments[B]));return G.join(" ")}for(var B=1,P=arguments,z=P.length,J=String(H).replace(O,function(de){if(de==="%%")return"%";if(B>=z)return de;switch(de){case"%s":return String(P[B++]);case"%d":return Number(P[B++]);case"%j":try{return JSON.stringify(P[B++])}catch(Se){return"[Circular]"}default:return de}}),ue=P[B];B<z;ue=P[++B])s(ue)||!C(ue)?J+=" "+ue:J+=" "+y(ue);return J},j.deprecate=function(H,G){if(f(g.process))return function(){return j.deprecate(H,G).apply(this,arguments)};if(N.noDeprecation===!0)return H;var B=!1;function P(){if(!B){if(N.throwDeprecation)throw new Error(G);N.traceDeprecation?console.trace(G):console.error(G),B=!0}return H.apply(this,arguments)}return P};var M={},m;j.debuglog=function(H){if(f(m)&&(m=N.env.NODE_DEBUG||""),H=H.toUpperCase(),!M[H])if(new RegExp("\\b"+H+"\\b","i").test(m)){var G=N.pid;M[H]=function(){var B=j.format.apply(j,arguments);console.error("%s %d: %s",H,G,B)}}else M[H]=function(){};return M[H]};function y(H,G){var B={seen:[],stylize:b};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),h(G)?B.showHidden=G:G&&j._extend(B,G),f(B.showHidden)&&(B.showHidden=!1),f(B.depth)&&(B.depth=2),f(B.colors)&&(B.colors=!1),f(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=T),d(B,H,B.depth)}j.inspect=y,y.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]},y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function T(H,G){var B=y.styles[G];return B?"["+y.colors[B][0]+"m"+H+"["+y.colors[B][1]+"m":H}function b(H,G){return H}function p(H){var G={};return H.forEach(function(B,P){G[B]=!0}),G}function d(H,G,B){if(H.customInspect&&G&&E(G.inspect)&&G.inspect!==j.inspect&&!(G.constructor&&G.constructor.prototype===G)){var P=G.inspect(B,H);return S(P)||(P=d(H,P,B)),P}var z=n(H,G);if(z)return z;var J=Object.keys(G),ue=p(J);if(H.showHidden&&(J=Object.getOwnPropertyNames(G)),_(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return c(G);if(J.length===0){if(E(G)){var de=G.name?": "+G.name:"";return H.stylize("[Function"+de+"]","special")}if(R(G))return H.stylize(RegExp.prototype.toString.call(G),"regexp");if(v(G))return H.stylize(Date.prototype.toString.call(G),"date");if(_(G))return c(G)}var Se="",Ae=!1,pe=["{","}"];if(u(G)&&(Ae=!0,pe=["[","]"]),E(G)){var Oe=G.name?": "+G.name:"";Se=" [Function"+Oe+"]"}if(R(G)&&(Se=" "+RegExp.prototype.toString.call(G)),v(G)&&(Se=" "+Date.prototype.toUTCString.call(G)),_(G)&&(Se=" "+c(G)),J.length===0&&(!Ae||G.length==0))return pe[0]+Se+pe[1];if(B<0)return R(G)?H.stylize(RegExp.prototype.toString.call(G),"regexp"):H.stylize("[Object]","special");H.seen.push(G);var ye;return Ae?ye=r(H,G,B,ue,J):ye=J.map(function(ce){return a(H,G,B,ue,ce,Ae)}),H.seen.pop(),o(ye,Se,pe)}function n(H,G){if(f(G))return H.stylize("undefined","undefined");if(S(G)){var B="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(B,"string")}if(t(G))return H.stylize(""+G,"number");if(h(G))return H.stylize(""+G,"boolean");if(s(G))return H.stylize("null","null")}function c(H){return"["+Error.prototype.toString.call(H)+"]"}function r(H,G,B,P,z){for(var J=[],ue=0,de=G.length;ue<de;++ue)W(G,String(ue))?J.push(a(H,G,B,P,String(ue),!0)):J.push("");return z.forEach(function(Se){Se.match(/^\d+$/)||J.push(a(H,G,B,P,Se,!0))}),J}function a(H,G,B,P,z,J){var ue,de,Se;if(Se=Object.getOwnPropertyDescriptor(G,z)||{value:G[z]},Se.get?Se.set?de=H.stylize("[Getter/Setter]","special"):de=H.stylize("[Getter]","special"):Se.set&&(de=H.stylize("[Setter]","special")),W(P,z)||(ue="["+z+"]"),de||(H.seen.indexOf(Se.value)<0?(s(B)?de=d(H,Se.value,null):de=d(H,Se.value,B-1),de.indexOf(`
`)>-1&&(J?de=de.split(`
`).map(function(Ae){return" "+Ae}).join(`
`).substr(2):de=`
`+de.split(`
`).map(function(Ae){return" "+Ae}).join(`
`))):de=H.stylize("[Circular]","special")),f(ue)){if(J&&z.match(/^\d+$/))return de;ue=JSON.stringify(""+z),ue.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ue=ue.substr(1,ue.length-2),ue=H.stylize(ue,"name")):(ue=ue.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ue=H.stylize(ue,"string"))}return ue+": "+de}function o(H,G,B){var P=0,z=H.reduce(function(J,ue){return P++,ue.indexOf(`
`)>=0&&P++,J+ue.replace(/\u001b\[\d\d?m/g,"").length+1},0);return z>60?B[0]+(G===""?"":G+`
`)+" "+H.join(`,
`)+" "+B[1]:B[0]+G+" "+H.join(", ")+" "+B[1]}function u(H){return Array.isArray(H)}j.isArray=u;function h(H){return typeof H=="boolean"}j.isBoolean=h;function s(H){return H===null}j.isNull=s;function l(H){return H==null}j.isNullOrUndefined=l;function t(H){return typeof H=="number"}j.isNumber=t;function S(H){return typeof H=="string"}j.isString=S;function x(H){return typeof H=="symbol"}j.isSymbol=x;function f(H){return H===void 0}j.isUndefined=f;function R(H){return C(H)&&k(H)==="[object RegExp]"}j.isRegExp=R;function C(H){return typeof H=="object"&&H!==null}j.isObject=C;function v(H){return C(H)&&k(H)==="[object Date]"}j.isDate=v;function _(H){return C(H)&&(k(H)==="[object Error]"||H instanceof Error)}j.isError=_;function E(H){return typeof H=="function"}j.isFunction=E;function w(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}j.isPrimitive=w,j.isBuffer=F("./support/isBuffer");function k(H){return Object.prototype.toString.call(H)}function I(H){return H<10?"0"+H.toString(10):H.toString(10)}var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var H=new Date,G=[I(H.getHours()),I(H.getMinutes()),I(H.getSeconds())].join(":");return[H.getDate(),L[H.getMonth()],G].join(" ")}j.log=function(){console.log("%s - %s",V(),j.format.apply(j,arguments))},j.inherits=F("inherits"),j._extend=function(H,G){if(!G||!C(G))return H;for(var B=Object.keys(G),P=B.length;P--;)H[B[P]]=G[B[P]];return H};function W(H,G){return Object.prototype.hasOwnProperty.call(H,G)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(F,q,j){"use strict";(function(){"use strict";j.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(F,q,j){"use strict";var N=F("babel-runtime/helpers/typeof"),g=m(N),O=F("babel-runtime/core-js/object/keys"),M=m(O);function m(y){return y&&y.__esModule?y:{default:y}}(function(){"use strict";var y,T,b,p,d,n={}.hasOwnProperty;y=F("xmlbuilder"),T=F("./defaults").defaults,p=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},d=function(r){return"<![CDATA["+b(r)+"]]>"},b=function(r){return r.replace("]]>","]]]]><![CDATA[>")},j.Builder=function(){function c(r){var a,o,u;this.options={},o=T["0.2"];for(a in o){if(!n.call(o,a))continue;u=o[a],this.options[a]=u}for(a in r){if(!n.call(r,a))continue;u=r[a],this.options[a]=u}}return c.prototype.buildObject=function(r){var a,o,u,h,s;return a=this.options.attrkey,o=this.options.charkey,(0,M.default)(r).length===1&&this.options.rootName===T["0.2"].rootName?(s=(0,M.default)(r)[0],r=r[s]):s=this.options.rootName,u=function(l){return function(t,S){var x,f,R,C,v,_;if((typeof S=="undefined"?"undefined":(0,g.default)(S))!=="object")l.options.cdata&&p(S)?t.raw(d(S)):t.txt(S);else if(Array.isArray(S))for(C in S){if(!n.call(S,C))continue;f=S[C];for(v in f)R=f[v],t=u(t.ele(v),R).up()}else for(v in S){if(!n.call(S,v))continue;if(f=S[v],v===a){if((typeof f=="undefined"?"undefined":(0,g.default)(f))==="object")for(x in f)_=f[x],t=t.att(x,_)}else if(v===o)l.options.cdata&&p(f)?t=t.raw(d(f)):t=t.txt(f);else if(Array.isArray(f))for(C in f){if(!n.call(f,C))continue;R=f[C],typeof R=="string"?l.options.cdata&&p(R)?t=t.ele(v).raw(d(R)).up():t=t.ele(v,R).up():t=u(t.ele(v),R).up()}else(typeof f=="undefined"?"undefined":(0,g.default)(f))==="object"?t=u(t.ele(v),f).up():typeof f=="string"&&l.options.cdata&&p(f)?t=t.ele(v).raw(d(f)).up():(f==null&&(f=""),t=t.ele(v,f.toString()).up())}return t}}(this),h=y.create(s,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(h,r).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(F,q,j){"use strict";(function(){j.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(F,q,j){"use strict";var N=F("babel-runtime/core-js/promise"),g=p(N),O=F("babel-runtime/core-js/object/get-own-property-names"),M=p(O),m=F("babel-runtime/core-js/object/keys"),y=p(m),T=F("babel-runtime/helpers/typeof"),b=p(T);function p(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,n,c,r,a,o,u,h,s=function(x,f){return function(){return x.apply(f,arguments)}},l=function(x,f){for(var R in f)t.call(f,R)&&(x[R]=f[R]);function C(){this.constructor=x}return C.prototype=f.prototype,x.prototype=new C,x.__super__=f.prototype,x},t={}.hasOwnProperty;u=F("sax"),c=F("events"),d=F("./bom"),o=F("./processors"),h=F("timers").setImmediate,n=F("./defaults").defaults,r=function(x){return(typeof x=="undefined"?"undefined":(0,b.default)(x))==="object"&&x!=null&&(0,y.default)(x).length===0},a=function(x,f,R){var C,v,_;for(C=0,v=x.length;C<v;C++)_=x[C],f=_(f,R);return f},j.Parser=function(S){l(x,S);function x(f){this.parseStringPromise=s(this.parseStringPromise,this),this.parseString=s(this.parseString,this),this.reset=s(this.reset,this),this.assignOrPush=s(this.assignOrPush,this),this.processAsync=s(this.processAsync,this);var R,C,v;if(!(this instanceof j.Parser))return new j.Parser(f);this.options={},C=n["0.2"];for(R in C){if(!t.call(C,R))continue;v=C[R],this.options[R]=v}for(R in f){if(!t.call(f,R))continue;v=f[R],this.options[R]=v}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return x.prototype.processAsync=function(){var f,R;try{return this.remaining.length<=this.options.chunkSize?(f=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(f),this.saxParser.close()):(f=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(f),h(this.processAsync))}catch(C){if(R=C,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},x.prototype.assignOrPush=function(f,R,C){return R in f?(f[R]instanceof Array||(f[R]=[f[R]]),f[R].push(C)):this.options.explicitArray?f[R]=[C]:f[R]=C},x.prototype.reset=function(){var f,R,C,v;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(_){return function(E){if(_.saxParser.resume(),!_.saxParser.errThrown)return _.saxParser.errThrown=!0,_.emit("error",E)}}(this),this.saxParser.onend=function(_){return function(){if(!_.saxParser.ended)return _.saxParser.ended=!0,_.emit("end",_.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,v=[],f=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(_){return function(E){var w,k,I,L,V;if(I={},I[R]="",!_.options.ignoreAttrs){V=E.attributes;for(w in V){if(!t.call(V,w))continue;!(f in I)&&!_.options.mergeAttrs&&(I[f]={}),k=_.options.attrValueProcessors?a(_.options.attrValueProcessors,E.attributes[w],w):E.attributes[w],L=_.options.attrNameProcessors?a(_.options.attrNameProcessors,w):w,_.options.mergeAttrs?_.assignOrPush(I,L,k):I[f][L]=k}}return I["#name"]=_.options.tagNameProcessors?a(_.options.tagNameProcessors,E.name):E.name,_.options.xmlns&&(I[_.options.xmlnskey]={uri:E.uri,local:E.local}),v.push(I)}}(this),this.saxParser.onclosetag=function(_){return function(){var E,w,k,I,L,V,W,H,G,B;if(V=v.pop(),L=V["#name"],(!_.options.explicitChildren||!_.options.preserveChildrenOrder)&&delete V["#name"],V.cdata===!0&&(E=V.cdata,delete V.cdata),G=v[v.length-1],V[R].match(/^\s*$/)&&!E?(w=V[R],delete V[R]):(_.options.trim&&(V[R]=V[R].trim()),_.options.normalize&&(V[R]=V[R].replace(/\s{2,}/g," ").trim()),V[R]=_.options.valueProcessors?a(_.options.valueProcessors,V[R],L):V[R],(0,y.default)(V).length===1&&R in V&&!_.EXPLICIT_CHARKEY&&(V=V[R])),r(V)&&(V=_.options.emptyTag!==""?_.options.emptyTag:w),_.options.validator!=null&&(B="/"+function(){var P,z,J;for(J=[],P=0,z=v.length;P<z;P++)I=v[P],J.push(I["#name"]);return J}().concat(L).join("/"),function(){var P;try{return V=_.options.validator(B,G&&G[L],V)}catch(z){return P=z,_.emit("error",P)}}()),_.options.explicitChildren&&!_.options.mergeAttrs&&(typeof V=="undefined"?"undefined":(0,b.default)(V))==="object"){if(!_.options.preserveChildrenOrder)I={},_.options.attrkey in V&&(I[_.options.attrkey]=V[_.options.attrkey],delete V[_.options.attrkey]),!_.options.charsAsChildren&&_.options.charkey in V&&(I[_.options.charkey]=V[_.options.charkey],delete V[_.options.charkey]),(0,M.default)(V).length>0&&(I[_.options.childkey]=V),V=I;else if(G){G[_.options.childkey]=G[_.options.childkey]||[],W={};for(k in V){if(!t.call(V,k))continue;W[k]=V[k]}G[_.options.childkey].push(W),delete V["#name"],(0,y.default)(V).length===1&&R in V&&!_.EXPLICIT_CHARKEY&&(V=V[R])}}return v.length>0?_.assignOrPush(G,L,V):(_.options.explicitRoot&&(H=V,V={},V[L]=H),_.resultObject=V,_.saxParser.ended=!0,_.emit("end",_.resultObject))}}(this),C=function(_){return function(E){var w,k;if(k=v[v.length-1],k)return k[R]+=E,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(k[_.options.childkey]=k[_.options.childkey]||[],w={"#name":"__text__"},w[R]=E,_.options.normalize&&(w[R]=w[R].replace(/\s{2,}/g," ").trim()),k[_.options.childkey].push(w)),k}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(_){return function(E){var w;if(w=C(E),w)return w.cdata=!0}}(this)},x.prototype.parseString=function(f,R){var C;R!=null&&typeof R=="function"&&(this.on("end",function(v){return this.reset(),R(null,v)}),this.on("error",function(v){return this.reset(),R(v)}));try{return f=f.toString(),f.trim()===""?(this.emit("end",null),!0):(f=d.stripBOM(f),this.options.async?(this.remaining=f,h(this.processAsync),this.saxParser):this.saxParser.write(f).close())}catch(v){if(C=v,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(f){return new g.default(function(R){return function(C,v){return R.parseString(f,function(_,E){return _?v(_):C(E)})}}(this))},x}(c),j.parseString=function(S,x,f){var R,C,v;return f!=null?(typeof f=="function"&&(R=f),(typeof x=="undefined"?"undefined":(0,b.default)(x))==="object"&&(C=x)):(typeof x=="function"&&(R=x),C={}),v=new j.Parser(C),v.parseString(S,R)},j.parseStringPromise=function(S,x){var f,R;return(typeof x=="undefined"?"undefined":(0,b.default)(x))==="object"&&(f=x),R=new j.Parser(f),R.parseStringPromise(S)}}).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(F,q,j){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),j.normalize=function(g){return g.toLowerCase()},j.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},j.stripPrefix=function(g){return g.replace(N,"")},j.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},j.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(F,q,j){"use strict";(function(){"use strict";var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;g=F("./defaults"),N=F("./builder"),O=F("./parser"),M=F("./processors"),j.defaults=g.defaults,j.processors=M,j.ValidationError=function(T){m(b,T);function b(p){this.message=p}return b}(Error),j.Builder=N.Builder,j.Parser=O.Parser,j.parseString=O.parseString,j.parseStringPromise=O.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(F,q,j){"use strict";(function(){q.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(F,q,j){"use strict";(function(){q.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/get-prototype-of"),g=T(N),O=F("babel-runtime/helpers/typeof"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(b){return b&&b.__esModule?b:{default:b}}(function(){var b,p,d,n,c,r,a,o=[].slice,u={}.hasOwnProperty;b=function(){var s,l,t,S,x,f;if(f=arguments[0],x=2<=arguments.length?o.call(arguments,1):[],c(y.default))y.default.apply(null,arguments);else for(s=0,t=x.length;s<t;s++)if(S=x[s],S!=null)for(l in S){if(!u.call(S,l))continue;f[l]=S[l]}return f},c=function(s){return!!s&&Object.prototype.toString.call(s)==="[object Function]"},r=function(s){var l;return!!s&&((l=typeof s=="undefined"?"undefined":(0,M.default)(s))==="function"||l==="object")},d=function(s){return c(Array.isArray)?Array.isArray(s):Object.prototype.toString.call(s)==="[object Array]"},n=function(s){var l;if(d(s))return!s.length;for(l in s){if(!u.call(s,l))continue;return!1}return!0},a=function(s){var l,t;return r(s)&&(t=(0,g.default)(s))&&(l=t.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},p=function(s){return c(s.valueOf)?s.valueOf():s},q.exports.assign=b,q.exports.isFunction=c,q.exports.isObject=r,q.exports.isArray=d,q.exports.isEmpty=n,q.exports.isPlainObject=a,q.exports.getValue=p}).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(F,q,j){"use strict";(function(){q.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y;M=F("./NodeType"),y=F("./XMLNode"),q.exports=m=function(){function T(b,p,d){if(this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),p==null)throw new Error("Missing attribute name. "+this.debugInfo(p));this.name=this.stringify.name(p),this.value=this.stringify.attValue(d),this.type=M.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(p){return this.value=p||""}}),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(b){return this.options.writer.attribute(this,this.options.writer.filterOptions(b))},T.prototype.debugInfo=function(b){return b=b||this.name,b==null?"parent: <"+this.parent.name+">":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},T.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},T}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLCharacterData"),q.exports=m=function(p){T(d,p);function d(n,c){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=M.CData,this.value=this.stringify.cdata(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y=function(p,d){for(var n in d)T.call(d,n)&&(p[n]=d[n]);function c(){this.constructor=p}return c.prototype=d.prototype,p.prototype=new c,p.__super__=d.prototype,p},T={}.hasOwnProperty;m=F("./XMLNode"),q.exports=M=function(b){y(p,b);function p(d){p.__super__.constructor.call(this,d),this.value=""}return Object.defineProperty(p.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(p.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),p.prototype.clone=function(){return(0,g.default)(this)},p.prototype.substringData=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.appendData=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.insertData=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.deleteData=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.replaceData=function(d,n,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(d){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)?!(d.data!==this.data):!1},p}(m)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLCharacterData"),q.exports=y=function(p){T(d,p);function d(n,c){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=M.Comment,this.value=this.stringify.comment(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),g=m(N),O=F("babel-runtime/core-js/object/create"),M=m(O);function m(y){return y&&y.__esModule?y:{default:y}}(function(){var y,T,b;T=F("./XMLDOMErrorHandler"),b=F("./XMLDOMStringList"),q.exports=y=function(){function p(){var d;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=d=(0,M.default)(this.defaultParams)}return Object.defineProperty(p.prototype,"parameterNames",{get:function(){return new b((0,g.default)(this.defaultParams))}}),p.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},p.prototype.canSetParameter=function(d,n){return!0},p.prototype.setParameter=function(d,n){return n!=null?this.params[d]=n:delete this.params[d]},p}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(F,q,j){"use strict";(function(){var N;q.exports=N=function(){function g(){}return g.prototype.handleError=function(O){throw new Error(O)},g}()}).call(void 0)},{}],260:[function(F,q,j){"use strict";(function(){var N;q.exports=N=function(){function g(){}return g.prototype.hasFeature=function(O,M){return!0},g.prototype.createDocumentType=function(O,M,m){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(O,M,m){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(O){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(O,M){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(F,q,j){"use strict";(function(){var N;q.exports=N=function(){function g(O){this.arr=O||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(O){return this.arr[O]||null},g.prototype.contains=function(O){return this.arr.indexOf(O)!==-1},g}()}).call(void 0)},{}],262:[function(F,q,j){"use strict";(function(){var N,g,O,M=function(T,b){for(var p in b)m.call(b,p)&&(T[p]=b[p]);function d(){this.constructor=T}return d.prototype=b.prototype,T.prototype=new d,T.__super__=b.prototype,T},m={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(y){M(T,y);function T(b,p,d,n,c,r){if(T.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));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(p));if(r&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=N.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(n),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=c}return T.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},T}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(F,q,j){"use strict";(function(){var N,g,O,M=function(T,b){for(var p in b)m.call(b,p)&&(T[p]=b[p]);function d(){this.constructor=T}return d.prototype=b.prototype,T.prototype=new d,T.__super__=b.prototype,T},m={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(y){M(T,y);function T(b,p,d){if(T.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(p),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return T.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},T}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(F,q,j){"use strict";(function(){var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(T){m(b,T);function b(p,d,n,c){if(b.__super__.constructor.call(this,p),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!d,this.name=this.stringify.name(n),this.type=N.EntityDeclaration,!M(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(b.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(b.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(b.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(b.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlVersion",{get:function(){return null}}),b.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(F,q,j){"use strict";(function(){var N,g,O,M=function(T,b){for(var p in b)m.call(b,p)&&(T[p]=b[p]);function d(){this.constructor=T}return d.prototype=b.prototype,T.prototype=new d,T.__super__=b.prototype,T},m={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(y){M(T,y);function T(b,p,d){if(T.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=N.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.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(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},T}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(F,q,j){"use strict";(function(){var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(T){m(b,T);function b(p,d,n,c){var r;b.__super__.constructor.call(this,p),M(d)&&(r=d,d=r.version,n=r.encoding,c=r.standalone),d||(d="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(d),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return b.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d=function(r,a){for(var o in a)n.call(a,o)&&(r[o]=a[o]);function u(){this.constructor=r}return u.prototype=a.prototype,r.prototype=new u,r.__super__=a.prototype,r},n={}.hasOwnProperty;p=F("./Utility").isObject,b=F("./XMLNode"),N=F("./NodeType"),g=F("./XMLDTDAttList"),M=F("./XMLDTDEntity"),O=F("./XMLDTDElement"),m=F("./XMLDTDNotation"),T=F("./XMLNamedNodeMap"),q.exports=y=function(c){d(r,c);function r(a,o,u){var h,s,l,t,S,x;if(r.__super__.constructor.call(this,a),this.type=N.DocType,a.children){for(t=a.children,s=0,l=t.length;s<l;s++)if(h=t[s],h.type===N.Element){this.name=h.name;break}}this.documentObject=a,p(o)&&(S=o,o=S.pubID,u=S.sysID),u==null&&(x=[o,u],u=x[0],o=x[1]),o!=null&&(this.pubID=this.stringify.dtdPubID(o)),u!=null&&(this.sysID=this.stringify.dtdSysID(u))}return Object.defineProperty(r.prototype,"entities",{get:function(){var o,u,h,s,l;for(s={},l=this.children,u=0,h=l.length;u<h;u++)o=l[u],o.type===N.EntityDeclaration&&!o.pe&&(s[o.name]=o);return new T(s)}}),Object.defineProperty(r.prototype,"notations",{get:function(){var o,u,h,s,l;for(s={},l=this.children,u=0,h=l.length;u<h;u++)o=l[u],o.type===N.NotationDeclaration&&(s[o.name]=o);return new T(s)}}),Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(r.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),r.prototype.element=function(a,o){var u;return u=new O(this,a,o),this.children.push(u),this},r.prototype.attList=function(a,o,u,h,s){var l;return l=new g(this,a,o,u,h,s),this.children.push(l),this},r.prototype.entity=function(a,o){var u;return u=new M(this,!1,a,o),this.children.push(u),this},r.prototype.pEntity=function(a,o){var u;return u=new M(this,!0,a,o),this.children.push(u),this},r.prototype.notation=function(a,o){var u;return u=new m(this,a,o),this.children.push(u),this},r.prototype.toString=function(a){return this.options.writer.docType(this,this.options.writer.filterOptions(a))},r.prototype.ele=function(a,o){return this.element(a,o)},r.prototype.att=function(a,o,u,h,s){return this.attList(a,o,u,h,s)},r.prototype.ent=function(a,o){return this.entity(a,o)},r.prototype.pent=function(a,o){return this.pEntity(a,o)},r.prototype.not=function(a,o){return this.notation(a,o)},r.prototype.up=function(){return this.root()||this.documentObject},r.prototype.isEqualNode=function(a){return r.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?a.name!==this.name||a.publicId!==this.publicId?!1:!(a.systemId!==this.systemId):!1},r}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p=function(c,r){for(var a in r)d.call(r,a)&&(c[a]=r[a]);function o(){this.constructor=c}return o.prototype=r.prototype,c.prototype=new o,c.__super__=r.prototype,c},d={}.hasOwnProperty;b=F("./Utility").isPlainObject,O=F("./XMLDOMImplementation"),g=F("./XMLDOMConfiguration"),m=F("./XMLNode"),N=F("./NodeType"),T=F("./XMLStringifier"),y=F("./XMLStringWriter"),q.exports=M=function(n){p(c,n);function c(r){c.__super__.constructor.call(this,null),this.name="#document",this.type=N.Document,this.documentURI=null,this.domConfig=new g,r||(r={}),r.writer||(r.writer=new y),this.options=r,this.stringify=new T(r)}return Object.defineProperty(c.prototype,"implementation",{value:new O}),Object.defineProperty(c.prototype,"doctype",{get:function(){var a,o,u,h;for(h=this.children,o=0,u=h.length;o<u;o++)if(a=h[o],a.type===N.DocType)return a;return null}}),Object.defineProperty(c.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(c.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(c.prototype,"origin",{get:function(){return null}}),Object.defineProperty(c.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(c.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(c.prototype,"contentType",{get:function(){return null}}),c.prototype.end=function(r){var a;return a={},r?b(r)&&(a=r,r=this.options.writer):r=this.options.writer,r.document(this,r.filterOptions(a))},c.prototype.toString=function(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))},c.prototype.createElement=function(r){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(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(r){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(r,a,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(r){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(r,a,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(r,a,o){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(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d,n,c,r,a,o,u,h,s,l,t,S,x,f,R,C={}.hasOwnProperty;R=F("./Utility"),x=R.isObject,S=R.isFunction,f=R.isPlainObject,t=R.getValue,N=F("./NodeType"),c=F("./XMLDocument"),a=F("./XMLElement"),M=F("./XMLCData"),m=F("./XMLComment"),u=F("./XMLRaw"),l=F("./XMLText"),o=F("./XMLProcessingInstruction"),d=F("./XMLDeclaration"),n=F("./XMLDocType"),y=F("./XMLDTDAttList"),b=F("./XMLDTDEntity"),T=F("./XMLDTDElement"),p=F("./XMLDTDNotation"),O=F("./XMLAttribute"),s=F("./XMLStringifier"),h=F("./XMLStringWriter"),g=F("./WriterState"),q.exports=r=function(){function v(_,E,w){var k;this.name="?xml",this.type=N.Document,_||(_={}),k={},_.writer?f(_.writer)&&(k=_.writer,_.writer=new h):_.writer=new h,this.options=_,this.writer=_.writer,this.writerOptions=this.writer.filterOptions(k),this.stringify=new s(_),this.onDataCallback=E||function(){},this.onEndCallback=w||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return v.prototype.createChildNode=function(_){var E,w,k,I,L,V,W,H;switch(_.type){case N.CData:this.cdata(_.value);break;case N.Comment:this.comment(_.value);break;case N.Element:k={},W=_.attribs;for(w in W){if(!C.call(W,w))continue;E=W[w],k[w]=E.value}this.node(_.name,k);break;case N.Dummy:this.dummy();break;case N.Raw:this.raw(_.value);break;case N.Text:this.text(_.value);break;case N.ProcessingInstruction:this.instruction(_.target,_.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+_.constructor.name)}for(H=_.children,L=0,V=H.length;L<V;L++)I=H[L],this.createChildNode(I),I.type===N.Element&&this.up();return this},v.prototype.dummy=function(){return this},v.prototype.node=function(_,E,w){var k;if(_==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(_));return this.openCurrent(),_=t(_),E==null&&(E={}),E=t(E),x(E)||(k=[E,w],w=k[0],E=k[1]),this.currentNode=new a(this,_,E),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,w!=null&&this.text(w),this},v.prototype.element=function(_,E,w){var k,I,L,V,W,H;if(this.currentNode&&this.currentNode.type===N.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(_)||x(_)||S(_))for(V=this.options.noValidation,this.options.noValidation=!0,H=new c(this.options).element("TEMP_ROOT"),H.element(_),this.options.noValidation=V,W=H.children,I=0,L=W.length;I<L;I++)k=W[I],this.createChildNode(k),k.type===N.Element&&this.up();else this.node(_,E,w);return this},v.prototype.attribute=function(_,E){var w,k;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(_));if(_!=null&&(_=t(_)),x(_))for(w in _){if(!C.call(_,w))continue;k=_[w],this.attribute(w,k)}else S(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.currentNode.attribs[_]=new O(this,_,""):E!=null&&(this.currentNode.attribs[_]=new O(this,_,E));return this},v.prototype.text=function(_){var E;return this.openCurrent(),E=new l(this,_),this.onData(this.writer.text(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.cdata=function(_){var E;return this.openCurrent(),E=new M(this,_),this.onData(this.writer.cdata(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.comment=function(_){var E;return this.openCurrent(),E=new m(this,_),this.onData(this.writer.comment(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.raw=function(_){var E;return this.openCurrent(),E=new u(this,_),this.onData(this.writer.raw(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.instruction=function(_,E){var w,k,I,L,V;if(this.openCurrent(),_!=null&&(_=t(_)),E!=null&&(E=t(E)),Array.isArray(_))for(w=0,L=_.length;w<L;w++)k=_[w],this.instruction(k);else if(x(_))for(k in _){if(!C.call(_,k))continue;I=_[k],this.instruction(k,I)}else S(E)&&(E=E.apply()),V=new o(this,_,E),this.onData(this.writer.processingInstruction(V,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},v.prototype.declaration=function(_,E,w){var k;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return k=new d(this,_,E,w),this.onData(this.writer.declaration(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.doctype=function(_,E,w){if(this.openCurrent(),_==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new n(this,E,w),this.currentNode.rootNodeName=_,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},v.prototype.dtdElement=function(_,E){var w;return this.openCurrent(),w=new T(this,_,E),this.onData(this.writer.dtdElement(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.attList=function(_,E,w,k,I){var L;return this.openCurrent(),L=new y(this,_,E,w,k,I),this.onData(this.writer.dtdAttList(L,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.entity=function(_,E){var w;return this.openCurrent(),w=new b(this,!1,_,E),this.onData(this.writer.dtdEntity(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.pEntity=function(_,E){var w;return this.openCurrent(),w=new b(this,!0,_,E),this.onData(this.writer.dtdEntity(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.notation=function(_,E){var w;return this.openCurrent(),w=new p(this,_,E),this.onData(this.writer.dtdNotation(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.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},v.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},v.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},v.prototype.openNode=function(_){var E,w,k,I;if(!_.isOpen){if(!this.root&&this.currentLevel===0&&_.type===N.Element&&(this.root=_),w="",_.type===N.Element){this.writerOptions.state=g.OpenTag,w=this.writer.indent(_,this.writerOptions,this.currentLevel)+"<"+_.name,I=_.attribs;for(k in I){if(!C.call(I,k))continue;E=I[k],w+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}w+=(_.children?">":"/>")+this.writer.endline(_,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,w=this.writer.indent(_,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+_.rootNodeName,_.pubID&&_.sysID?w+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(w+=' SYSTEM "'+_.sysID+'"'),_.children?(w+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,w+=">"),w+=this.writer.endline(_,this.writerOptions,this.currentLevel);return this.onData(w,this.currentLevel),_.isOpen=!0}},v.prototype.closeNode=function(_){var E;if(!_.isClosed)return E="",this.writerOptions.state=g.CloseTag,_.type===N.Element?E=this.writer.indent(_,this.writerOptions,this.currentLevel)+"</"+_.name+">"+this.writer.endline(_,this.writerOptions,this.currentLevel):E=this.writer.indent(_,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(_,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(E,this.currentLevel),_.isClosed=!0},v.prototype.onData=function(_,E){return this.documentStarted=!0,this.onDataCallback(_,E+1)},v.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},v.prototype.debugInfo=function(_){return _==null?"":"node: <"+_+">"},v.prototype.ele=function(){return this.element.apply(this,arguments)},v.prototype.nod=function(_,E,w){return this.node(_,E,w)},v.prototype.txt=function(_){return this.text(_)},v.prototype.dat=function(_){return this.cdata(_)},v.prototype.com=function(_){return this.comment(_)},v.prototype.ins=function(_,E){return this.instruction(_,E)},v.prototype.dec=function(_,E,w){return this.declaration(_,E,w)},v.prototype.dtd=function(_,E,w){return this.doctype(_,E,w)},v.prototype.e=function(_,E,w){return this.element(_,E,w)},v.prototype.n=function(_,E,w){return this.node(_,E,w)},v.prototype.t=function(_){return this.text(_)},v.prototype.d=function(_){return this.cdata(_)},v.prototype.c=function(_){return this.comment(_)},v.prototype.r=function(_){return this.raw(_)},v.prototype.i=function(_,E){return this.instruction(_,E)},v.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.ent=function(_,E){return this.entity(_,E)},v.prototype.pent=function(_,E){return this.pEntity(_,E)},v.prototype.not=function(_,E){return this.notation(_,E)},v}()}).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(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;y=F("./XMLNode"),M=F("./NodeType"),q.exports=m=function(p){T(d,p);function d(n){d.__super__.constructor.call(this,n),this.type=M.Dummy}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return""},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T,b,p,d,n,c,r=function(u,h){for(var s in h)a.call(h,s)&&(u[s]=h[s]);function l(){this.constructor=u}return l.prototype=h.prototype,u.prototype=new l,u.__super__=h.prototype,u},a={}.hasOwnProperty;c=F("./Utility"),n=c.isObject,d=c.isFunction,p=c.getValue,b=F("./XMLNode"),M=F("./NodeType"),m=F("./XMLAttribute"),T=F("./XMLNamedNodeMap"),q.exports=y=function(o){r(u,o);function u(h,s,l){var t,S,x,f;if(u.__super__.constructor.call(this,h),s==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(s),this.type=M.Element,this.attribs={},this.schemaTypeInfo=null,l!=null&&this.attribute(l),h.type===M.Document&&(this.isRoot=!0,this.documentObject=h,h.rootObject=this,h.children)){for(f=h.children,S=0,x=f.length;S<x;S++)if(t=f[S],t.type===M.DocType){t.name=this.name;break}}}return Object.defineProperty(u.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(u.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(u.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new T(this.attribs)),this.attributeMap}}),u.prototype.clone=function(){var h,s,l,t;l=(0,g.default)(this),l.isRoot&&(l.documentObject=null),l.attribs={},t=this.attribs;for(s in t){if(!a.call(t,s))continue;h=t[s],l.attribs[s]=h.clone()}return l.children=[],this.children.forEach(function(S){var x;return x=S.clone(),x.parent=l,l.children.push(x)}),l},u.prototype.attribute=function(h,s){var l,t;if(h!=null&&(h=p(h)),n(h))for(l in h){if(!a.call(h,l))continue;t=h[l],this.attribute(l,t)}else d(s)&&(s=s.apply()),this.options.keepNullAttributes&&s==null?this.attribs[h]=new m(this,h,""):s!=null&&(this.attribs[h]=new m(this,h,s));return this},u.prototype.removeAttribute=function(h){var s,l,t;if(h==null)throw new Error("Missing attribute name. "+this.debugInfo());if(h=p(h),Array.isArray(h))for(l=0,t=h.length;l<t;l++)s=h[l],delete this.attribs[s];else delete this.attribs[h];return this},u.prototype.toString=function(h){return this.options.writer.element(this,this.options.writer.filterOptions(h))},u.prototype.att=function(h,s){return this.attribute(h,s)},u.prototype.a=function(h,s){return this.attribute(h,s)},u.prototype.getAttribute=function(h){return this.attribs.hasOwnProperty(h)?this.attribs[h].value:null},u.prototype.setAttribute=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getAttributeNode=function(h){return this.attribs.hasOwnProperty(h)?this.attribs[h]:null},u.prototype.setAttributeNode=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.removeAttributeNode=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagName=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getAttributeNS=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.setAttributeNS=function(h,s,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.removeAttributeNS=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getAttributeNodeNS=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.setAttributeNodeNS=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagNameNS=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.hasAttribute=function(h){return this.attribs.hasOwnProperty(h)},u.prototype.hasAttributeNS=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.setIdAttribute=function(h,s){return this.attribs.hasOwnProperty(h)?this.attribs[h].isId:s},u.prototype.setIdAttributeNS=function(h,s,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.setIdAttributeNode=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagName=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagNameNS=function(h,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByClassName=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isEqualNode=function(h){var s,l,t;if(!u.__super__.isEqualNode.apply(this,arguments).isEqualNode(h))return!1;if(h.namespaceURI!==this.namespaceURI)return!1;if(h.prefix!==this.prefix)return!1;if(h.localName!==this.localName)return!1;if(h.attribs.length!==this.attribs.length)return!1;for(s=l=0,t=this.attribs.length-1;0<=t?l<=t:l>=t;s=0<=t?++l:--l)if(!this.attribs[s].isEqualNode(h.attribs[s]))return!1;return!0},u}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M;q.exports=M=function(){function m(y){this.nodes=y}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(y){return this.nodes[y]},m.prototype.setNamedItem=function(y){var T;return T=this.nodes[y.nodeName],this.nodes[y.nodeName]=y,T||null},m.prototype.removeNamedItem=function(y){var T;return T=this.nodes[y],delete this.nodes[y],T||null},m.prototype.item=function(y){return this.nodes[(0,g.default)(this.nodes)[y]]||null},m.prototype.getNamedItemNS=function(y,T){throw new Error("This DOM method is not implemented.")},m.prototype.setNamedItemNS=function(y){throw new Error("This DOM method is not implemented.")},m.prototype.removeNamedItemNS=function(y,T){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d,n,c,r,a,o,u,h,s,l,t={}.hasOwnProperty;l=F("./Utility"),s=l.isObject,h=l.isFunction,u=l.isEmpty,o=l.getValue,b=null,O=null,M=null,m=null,y=null,r=null,a=null,c=null,T=null,g=null,n=null,p=null,N=null,q.exports=d=function(){function S(x){this.parent=x,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=F("./XMLElement"),O=F("./XMLCData"),M=F("./XMLComment"),m=F("./XMLDeclaration"),y=F("./XMLDocType"),r=F("./XMLRaw"),a=F("./XMLText"),c=F("./XMLProcessingInstruction"),T=F("./XMLDummy"),g=F("./NodeType"),n=F("./XMLNodeList"),p=F("./XMLNamedNodeMap"),N=F("./DocumentPosition"))}return Object.defineProperty(S.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(S.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(S.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var f,R,C,v,_;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(_="",v=this.children,R=0,C=v.length;R<C;R++)f=v[R],f.textContent&&(_+=f.textContent);return _}else return null},set:function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.setParent=function(x){var f,R,C,v,_;for(this.parent=x,x&&(this.options=x.options,this.stringify=x.stringify),v=this.children,_=[],R=0,C=v.length;R<C;R++)f=v[R],_.push(f.setParent(this));return _},S.prototype.element=function(x,f,R){var C,v,_,E,w,k,I,L,V,W,H;if(k=null,f===null&&R==null&&(V=[{},null],f=V[0],R=V[1]),f==null&&(f={}),f=o(f),s(f)||(W=[f,R],R=W[0],f=W[1]),x!=null&&(x=o(x)),Array.isArray(x))for(_=0,I=x.length;_<I;_++)v=x[_],k=this.element(v);else if(h(x))k=this.element(x.apply());else if(s(x))for(w in x){if(!t.call(x,w))continue;if(H=x[w],h(H)&&(H=H.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&w.indexOf(this.stringify.convertAttKey)===0)k=this.attribute(w.substr(this.stringify.convertAttKey.length),H);else if(!this.options.separateArrayItems&&Array.isArray(H)&&u(H))k=this.dummy();else if(s(H)&&u(H))k=this.element(w);else if(!this.options.keepNullNodes&&H==null)k=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(H))for(E=0,L=H.length;E<L;E++)v=H[E],C={},C[w]=v,k=this.element(C);else s(H)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&w.indexOf(this.stringify.convertTextKey)===0?k=this.element(H):(k=this.element(w),k.element(H)):k=this.element(w,H)}else!this.options.keepNullNodes&&R===null?k=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&x.indexOf(this.stringify.convertTextKey)===0?k=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&x.indexOf(this.stringify.convertCDataKey)===0?k=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&x.indexOf(this.stringify.convertCommentKey)===0?k=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&x.indexOf(this.stringify.convertRawKey)===0?k=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&x.indexOf(this.stringify.convertPIKey)===0?k=this.instruction(x.substr(this.stringify.convertPIKey.length),R):k=this.node(x,f,R);if(k==null)throw new Error("Could not create any elements with: "+x+". "+this.debugInfo());return k},S.prototype.insertBefore=function(x,f,R){var C,v,_,E,w;if(x!=null?x.type:void 0)return _=x,E=f,_.setParent(this),E?(v=children.indexOf(E),w=children.splice(v),children.push(_),Array.prototype.push.apply(children,w)):children.push(_),_;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(x));return v=this.parent.children.indexOf(this),w=this.parent.children.splice(v),C=this.parent.element(x,f,R),Array.prototype.push.apply(this.parent.children,w),C},S.prototype.insertAfter=function(x,f,R){var C,v,_;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(x));return v=this.parent.children.indexOf(this),_=this.parent.children.splice(v+1),C=this.parent.element(x,f,R),Array.prototype.push.apply(this.parent.children,_),C},S.prototype.remove=function(){var x,f;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return x=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[x,x-x+1].concat(f=[])),this.parent},S.prototype.node=function(x,f,R){var C,v;return x!=null&&(x=o(x)),f||(f={}),f=o(f),s(f)||(v=[f,R],R=v[0],f=v[1]),C=new b(this,x,f),R!=null&&C.text(R),this.children.push(C),C},S.prototype.text=function(x){var f;return s(x)&&this.element(x),f=new a(this,x),this.children.push(f),this},S.prototype.cdata=function(x){var f;return f=new O(this,x),this.children.push(f),this},S.prototype.comment=function(x){var f;return f=new M(this,x),this.children.push(f),this},S.prototype.commentBefore=function(x){var f,R,C;return R=this.parent.children.indexOf(this),C=this.parent.children.splice(R),f=this.parent.comment(x),Array.prototype.push.apply(this.parent.children,C),this},S.prototype.commentAfter=function(x){var f,R,C;return R=this.parent.children.indexOf(this),C=this.parent.children.splice(R+1),f=this.parent.comment(x),Array.prototype.push.apply(this.parent.children,C),this},S.prototype.raw=function(x){var f;return f=new r(this,x),this.children.push(f),this},S.prototype.dummy=function(){var x;return x=new T(this),x},S.prototype.instruction=function(x,f){var R,C,v,_,E;if(x!=null&&(x=o(x)),f!=null&&(f=o(f)),Array.isArray(x))for(_=0,E=x.length;_<E;_++)R=x[_],this.instruction(R);else if(s(x))for(R in x){if(!t.call(x,R))continue;C=x[R],this.instruction(R,C)}else h(f)&&(f=f.apply()),v=new c(this,x,f),this.children.push(v);return this},S.prototype.instructionBefore=function(x,f){var R,C,v;return C=this.parent.children.indexOf(this),v=this.parent.children.splice(C),R=this.parent.instruction(x,f),Array.prototype.push.apply(this.parent.children,v),this},S.prototype.instructionAfter=function(x,f){var R,C,v;return C=this.parent.children.indexOf(this),v=this.parent.children.splice(C+1),R=this.parent.instruction(x,f),Array.prototype.push.apply(this.parent.children,v),this},S.prototype.declaration=function(x,f,R){var C,v;return C=this.document(),v=new m(C,x,f,R),C.children.length===0?C.children.unshift(v):C.children[0].type===g.Declaration?C.children[0]=v:C.children.unshift(v),C.root()||C},S.prototype.dtd=function(x,f){var R,C,v,_,E,w,k,I,L,V;for(C=this.document(),v=new y(C,x,f),L=C.children,_=E=0,k=L.length;E<k;_=++E)if(R=L[_],R.type===g.DocType)return C.children[_]=v,v;for(V=C.children,_=w=0,I=V.length;w<I;_=++w)if(R=V[_],R.isRoot)return C.children.splice(_,0,v),v;return C.children.push(v),v},S.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},S.prototype.root=function(){var x;for(x=this;x;){if(x.type===g.Document)return x.rootObject;if(x.isRoot)return x;x=x.parent}},S.prototype.document=function(){var x;for(x=this;x;){if(x.type===g.Document)return x;x=x.parent}},S.prototype.end=function(x){return this.document().end(x)},S.prototype.prev=function(){var x;if(x=this.parent.children.indexOf(this),x<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[x-1]},S.prototype.next=function(){var x;if(x=this.parent.children.indexOf(this),x===-1||x===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[x+1]},S.prototype.importDocument=function(x){var f;return f=x.root().clone(),f.parent=this,f.isRoot=!1,this.children.push(f),this},S.prototype.debugInfo=function(x){var f,R;return x=x||this.name,x==null&&!((f=this.parent)!=null?f.name:void 0)?"":x==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+x+">, parent: <"+this.parent.name+">":"node: <"+x+">"},S.prototype.ele=function(x,f,R){return this.element(x,f,R)},S.prototype.nod=function(x,f,R){return this.node(x,f,R)},S.prototype.txt=function(x){return this.text(x)},S.prototype.dat=function(x){return this.cdata(x)},S.prototype.com=function(x){return this.comment(x)},S.prototype.ins=function(x,f){return this.instruction(x,f)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(x,f,R){return this.declaration(x,f,R)},S.prototype.e=function(x,f,R){return this.element(x,f,R)},S.prototype.n=function(x,f,R){return this.node(x,f,R)},S.prototype.t=function(x){return this.text(x)},S.prototype.d=function(x){return this.cdata(x)},S.prototype.c=function(x){return this.comment(x)},S.prototype.r=function(x){return this.raw(x)},S.prototype.i=function(x,f){return this.instruction(x,f)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(x){return this.importDocument(x)},S.prototype.replaceChild=function(x,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isSupported=function(x,f){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(x){var f,R;return f=this,f===x?0:this.document()!==x.document()?(R=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?R|=N.Preceding:R|=N.Following,R):f.isAncestor(x)?N.Contains|N.Preceding:f.isDescendant(x)?N.Contains|N.Following:f.isPreceding(x)?N.Preceding:N.Following},S.prototype.isSameNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(x){var f,R,C;if(x.nodeType!==this.nodeType)return!1;if(x.children.length!==this.children.length)return!1;for(f=R=0,C=this.children.length-1;0<=C?R<=C:R>=C;f=0<=C?++R:--R)if(!this.children[f].isEqualNode(x.children[f]))return!1;return!0},S.prototype.getFeature=function(x,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(x,f,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(x){return x?x===this||this.isDescendant(x):!1},S.prototype.isDescendant=function(x){var f,R,C,v,_;for(_=this.children,C=0,v=_.length;C<v;C++){if(f=_[C],x===f)return!0;if(R=f.isDescendant(x),R)return!0}return!1},S.prototype.isAncestor=function(x){return x.isDescendant(this)},S.prototype.isPreceding=function(x){var f,R;return f=this.treePosition(x),R=this.treePosition(this),f===-1||R===-1?!1:f<R},S.prototype.isFollowing=function(x){var f,R;return f=this.treePosition(x),R=this.treePosition(this),f===-1||R===-1?!1:f>R},S.prototype.treePosition=function(x){var f,R;return R=0,f=!1,this.foreachTreeNode(this.document(),function(C){if(R++,!f&&C===x)return f=!0}),f?R:-1},S.prototype.foreachTreeNode=function(x,f){var R,C,v,_,E;for(x||(x=this.document()),_=x.children,C=0,v=_.length;C<v;C++){if(R=_[C],E=f(R))return E;if(E=this.foreachTreeNode(R,f),E)return E}},S}()}).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(F,q,j){"use strict";(function(){var N;q.exports=N=function(){function g(O){this.nodes=O}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(O){return this.nodes[O]||null},g}()}).call(void 0)},{}],275:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLCharacterData"),q.exports=y=function(p){T(d,p);function d(n,c,r){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=M.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},d.prototype.isEqualNode=function(n){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLNode"),q.exports=y=function(p){T(d,p);function d(n,c){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=M.Raw,this.value=this.stringify.raw(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(F,q,j){"use strict";(function(){var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;N=F("./NodeType"),M=F("./XMLWriterBase"),g=F("./WriterState"),q.exports=O=function(T){m(b,T);function b(p,d){this.stream=p,b.__super__.constructor.call(this,d)}return b.prototype.endline=function(p,d,n){return p.isLastRootNode&&d.state===g.CloseTag?"":b.__super__.endline.call(this,p,d,n)},b.prototype.document=function(p,d){var n,c,r,a,o,u,h,s,l;for(h=p.children,c=r=0,o=h.length;r<o;c=++r)n=h[c],n.isLastRootNode=c===p.children.length-1;for(d=this.filterOptions(d),s=p.children,l=[],a=0,u=s.length;a<u;a++)n=s[a],l.push(this.writeChildNode(n,d,0));return l},b.prototype.attribute=function(p,d,n){return this.stream.write(b.__super__.attribute.call(this,p,d,n))},b.prototype.cdata=function(p,d,n){return this.stream.write(b.__super__.cdata.call(this,p,d,n))},b.prototype.comment=function(p,d,n){return this.stream.write(b.__super__.comment.call(this,p,d,n))},b.prototype.declaration=function(p,d,n){return this.stream.write(b.__super__.declaration.call(this,p,d,n))},b.prototype.docType=function(p,d,n){var c,r,a,o;if(n||(n=0),this.openNode(p,d,n),d.state=g.OpenTag,this.stream.write(this.indent(p,d,n)),this.stream.write("<!DOCTYPE "+p.root().name),p.pubID&&p.sysID?this.stream.write(' PUBLIC "'+p.pubID+'" "'+p.sysID+'"'):p.sysID&&this.stream.write(' SYSTEM "'+p.sysID+'"'),p.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(p,d,n)),d.state=g.InsideTag,o=p.children,r=0,a=o.length;r<a;r++)c=o[r],this.writeChildNode(c,d,n+1);d.state=g.CloseTag,this.stream.write("]")}return d.state=g.CloseTag,this.stream.write(d.spaceBeforeSlash+">"),this.stream.write(this.endline(p,d,n)),d.state=g.None,this.closeNode(p,d,n)},b.prototype.element=function(p,d,n){var c,r,a,o,u,h,s,l,t,S;n||(n=0),this.openNode(p,d,n),d.state=g.OpenTag,this.stream.write(this.indent(p,d,n)+"<"+p.name),t=p.attribs;for(s in t){if(!y.call(t,s))continue;c=t[s],this.attribute(c,d,n)}if(a=p.children.length,o=a===0?null:p.children[0],a===0||p.children.every(function(x){return(x.type===N.Text||x.type===N.Raw)&&x.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=g.CloseTag,this.stream.write("</"+p.name+">")):(d.state=g.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&a===1&&(o.type===N.Text||o.type===N.Raw)&&o.value!=null)this.stream.write(">"),d.state=g.InsideTag,d.suppressPrettyCount++,l=!0,this.writeChildNode(o,d,n+1),d.suppressPrettyCount--,l=!1,d.state=g.CloseTag,this.stream.write("</"+p.name+">");else{for(this.stream.write(">"+this.endline(p,d,n)),d.state=g.InsideTag,S=p.children,u=0,h=S.length;u<h;u++)r=S[u],this.writeChildNode(r,d,n+1);d.state=g.CloseTag,this.stream.write(this.indent(p,d,n)+"</"+p.name+">")}return this.stream.write(this.endline(p,d,n)),d.state=g.None,this.closeNode(p,d,n)},b.prototype.processingInstruction=function(p,d,n){return this.stream.write(b.__super__.processingInstruction.call(this,p,d,n))},b.prototype.raw=function(p,d,n){return this.stream.write(b.__super__.raw.call(this,p,d,n))},b.prototype.text=function(p,d,n){return this.stream.write(b.__super__.text.call(this,p,d,n))},b.prototype.dtdAttList=function(p,d,n){return this.stream.write(b.__super__.dtdAttList.call(this,p,d,n))},b.prototype.dtdElement=function(p,d,n){return this.stream.write(b.__super__.dtdElement.call(this,p,d,n))},b.prototype.dtdEntity=function(p,d,n){return this.stream.write(b.__super__.dtdEntity.call(this,p,d,n))},b.prototype.dtdNotation=function(p,d,n){return this.stream.write(b.__super__.dtdNotation.call(this,p,d,n))},b}(M)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(F,q,j){"use strict";(function(){var N,g,O=function(y,T){for(var b in T)M.call(T,b)&&(y[b]=T[b]);function p(){this.constructor=y}return p.prototype=T.prototype,y.prototype=new p,y.__super__=T.prototype,y},M={}.hasOwnProperty;g=F("./XMLWriterBase"),q.exports=N=function(m){O(y,m);function y(T){y.__super__.constructor.call(this,T)}return y.prototype.document=function(T,b){var p,d,n,c,r;for(b=this.filterOptions(b),c="",r=T.children,d=0,n=r.length;d<n;d++)p=r[d],c+=this.writeChildNode(p,b,0);return b.pretty&&c.slice(-b.newline.length)===b.newline&&(c=c.slice(0,-b.newline.length)),c},y}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(F,q,j){"use strict";(function(){var N,g=function(m,y){return function(){return m.apply(y,arguments)}},O={}.hasOwnProperty;q.exports=N=function(){function M(m){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var y,T,b;m||(m={}),this.options=m,this.options.version||(this.options.version="1.0"),T=m.stringify||{};for(y in T){if(!O.call(T,y))continue;b=T[y],this[y]=b}}return M.prototype.name=function(m){return this.options.noValidation?m:this.assertLegalName(""+m||"")},M.prototype.text=function(m){return this.options.noValidation?m:this.assertLegalChar(this.textEscape(""+m||""))},M.prototype.cdata=function(m){return this.options.noValidation?m:(m=""+m||"",m=m.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(m))},M.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)},M.prototype.raw=function(m){return this.options.noValidation?m:""+m||""},M.prototype.attValue=function(m){return this.options.noValidation?m:this.assertLegalChar(this.attEscape(m=""+m||""))},M.prototype.insTarget=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.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)},M.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},M.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)},M.prototype.xmlStandalone=function(m){return this.options.noValidation?m:m?"yes":"no"},M.prototype.dtdPubID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdSysID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdElementValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdAttType=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdAttDefault=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdEntityValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdNData=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.convertAttKey="@",M.prototype.convertPIKey="?",M.prototype.convertTextKey="#text",M.prototype.convertCDataKey="#cdata",M.prototype.convertCommentKey="#comment",M.prototype.convertRawKey="#raw",M.prototype.assertLegalChar=function(m){var y,T;if(this.options.noValidation)return m;if(y="",this.options.version==="1.0"){if(y=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=m.match(y))throw new Error("Invalid character in string: "+m+" at index "+T.index)}else if(this.options.version==="1.1"&&(y=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=m.match(y)))throw new Error("Invalid character in string: "+m+" at index "+T.index);return m},M.prototype.assertLegalName=function(m){var y;if(this.options.noValidation)return m;if(this.assertLegalChar(m),y=/^([: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(y))throw new Error("Invalid character in name");return m},M.prototype.textEscape=function(m){var y;return this.options.noValidation?m:(y=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(y,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},M.prototype.attEscape=function(m){var y;return this.options.noValidation?m:(y=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(y,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},M}()}).call(void 0)},{}],280:[function(F,q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLCharacterData"),q.exports=y=function(p){T(d,p);function d(n,c){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=M.Text,this.value=this.stringify.text(c)}return Object.defineProperty(d.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"wholeText",{get:function(){var c,r,a;for(a="",r=this.previousSibling;r;)a=r.data+a,r=r.previousSibling;for(a+=this.data,c=this.nextSibling;c;)a=a+c.data,c=c.nextSibling;return a}}),d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},d.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d,n,c,r,a,o,u,h,s={}.hasOwnProperty;h=F("./Utility").assign,N=F("./NodeType"),p=F("./XMLDeclaration"),d=F("./XMLDocType"),O=F("./XMLCData"),M=F("./XMLComment"),c=F("./XMLElement"),a=F("./XMLRaw"),o=F("./XMLText"),r=F("./XMLProcessingInstruction"),n=F("./XMLDummy"),m=F("./XMLDTDAttList"),y=F("./XMLDTDElement"),T=F("./XMLDTDEntity"),b=F("./XMLDTDNotation"),g=F("./WriterState"),q.exports=u=function(){function l(t){var S,x,f;t||(t={}),this.options=t,x=t.writer||{};for(S in x){if(!s.call(x,S))continue;f=x[S],this["_"+S]=this[S],this[S]=f}}return l.prototype.filterOptions=function(t){var S,x,f,R,C,v,_,E;return t||(t={}),t=h({},this.options,t),S={writer:this},S.pretty=t.pretty||!1,S.allowEmpty=t.allowEmpty||!1,S.indent=(x=t.indent)!=null?x:" ",S.newline=(f=t.newline)!=null?f:`
`,S.offset=(R=t.offset)!=null?R:0,S.dontPrettyTextNodes=(C=(v=t.dontPrettyTextNodes)!=null?v:t.dontprettytextnodes)!=null?C:0,S.spaceBeforeSlash=(_=(E=t.spaceBeforeSlash)!=null?E:t.spacebeforeslash)!=null?_:"",S.spaceBeforeSlash===!0&&(S.spaceBeforeSlash=" "),S.suppressPrettyCount=0,S.user={},S.state=g.None,S},l.prototype.indent=function(t,S,x){var f;return!S.pretty||S.suppressPrettyCount?"":S.pretty&&(f=(x||0)+S.offset+1,f>0)?new Array(f).join(S.indent):""},l.prototype.endline=function(t,S,x){return!S.pretty||S.suppressPrettyCount?"":S.newline},l.prototype.attribute=function(t,S,x){var f;return this.openAttribute(t,S,x),f=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,x),f},l.prototype.cdata=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<![CDATA[",S.state=g.InsideTag,f+=t.value,S.state=g.CloseTag,f+="]]>"+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.comment=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<!-- ",S.state=g.InsideTag,f+=t.value,S.state=g.CloseTag,f+=" -->"+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.declaration=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<?xml",S.state=g.InsideTag,f+=' version="'+t.version+'"',t.encoding!=null&&(f+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(f+=' standalone="'+t.standalone+'"'),S.state=g.CloseTag,f+=S.spaceBeforeSlash+"?>",f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.docType=function(t,S,x){var f,R,C,v,_;if(x||(x=0),this.openNode(t,S,x),S.state=g.OpenTag,v=this.indent(t,S,x),v+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?v+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(v+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(v+=" [",v+=this.endline(t,S,x),S.state=g.InsideTag,_=t.children,R=0,C=_.length;R<C;R++)f=_[R],v+=this.writeChildNode(f,S,x+1);S.state=g.CloseTag,v+="]"}return S.state=g.CloseTag,v+=S.spaceBeforeSlash+">",v+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),v},l.prototype.element=function(t,S,x){var f,R,C,v,_,E,w,k,I,L,V,W,H,G;x||(x=0),L=!1,V="",this.openNode(t,S,x),S.state=g.OpenTag,V+=this.indent(t,S,x)+"<"+t.name,W=t.attribs;for(I in W){if(!s.call(W,I))continue;f=W[I],V+=this.attribute(f,S,x)}if(C=t.children.length,v=C===0?null:t.children[0],C===0||t.children.every(function(B){return(B.type===N.Text||B.type===N.Raw)&&B.value===""}))S.allowEmpty?(V+=">",S.state=g.CloseTag,V+="</"+t.name+">"+this.endline(t,S,x)):(S.state=g.CloseTag,V+=S.spaceBeforeSlash+"/>"+this.endline(t,S,x));else if(S.pretty&&C===1&&(v.type===N.Text||v.type===N.Raw)&&v.value!=null)V+=">",S.state=g.InsideTag,S.suppressPrettyCount++,L=!0,V+=this.writeChildNode(v,S,x+1),S.suppressPrettyCount--,L=!1,S.state=g.CloseTag,V+="</"+t.name+">"+this.endline(t,S,x);else{if(S.dontPrettyTextNodes){for(H=t.children,_=0,w=H.length;_<w;_++)if(R=H[_],(R.type===N.Text||R.type===N.Raw)&&R.value!=null){S.suppressPrettyCount++,L=!0;break}}for(V+=">"+this.endline(t,S,x),S.state=g.InsideTag,G=t.children,E=0,k=G.length;E<k;E++)R=G[E],V+=this.writeChildNode(R,S,x+1);S.state=g.CloseTag,V+=this.indent(t,S,x)+"</"+t.name+">",L&&S.suppressPrettyCount--,V+=this.endline(t,S,x),S.state=g.None}return this.closeNode(t,S,x),V},l.prototype.writeChildNode=function(t,S,x){switch(t.type){case N.CData:return this.cdata(t,S,x);case N.Comment:return this.comment(t,S,x);case N.Element:return this.element(t,S,x);case N.Raw:return this.raw(t,S,x);case N.Text:return this.text(t,S,x);case N.ProcessingInstruction:return this.processingInstruction(t,S,x);case N.Dummy:return"";case N.Declaration:return this.declaration(t,S,x);case N.DocType:return this.docType(t,S,x);case N.AttributeDeclaration:return this.dtdAttList(t,S,x);case N.ElementDeclaration:return this.dtdElement(t,S,x);case N.EntityDeclaration:return this.dtdEntity(t,S,x);case N.NotationDeclaration:return this.dtdNotation(t,S,x);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},l.prototype.processingInstruction=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<?",S.state=g.InsideTag,f+=t.target,t.value&&(f+=" "+t.value),S.state=g.CloseTag,f+=S.spaceBeforeSlash+"?>",f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.raw=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x),S.state=g.InsideTag,f+=t.value,S.state=g.CloseTag,f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.text=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x),S.state=g.InsideTag,f+=t.value,S.state=g.CloseTag,f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdAttList=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<!ATTLIST",S.state=g.InsideTag,f+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(f+=" "+t.defaultValueType),t.defaultValue&&(f+=' "'+t.defaultValue+'"'),S.state=g.CloseTag,f+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdElement=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<!ELEMENT",S.state=g.InsideTag,f+=" "+t.name+" "+t.value,S.state=g.CloseTag,f+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdEntity=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<!ENTITY",S.state=g.InsideTag,t.pe&&(f+=" %"),f+=" "+t.name,t.value?f+=' "'+t.value+'"':(t.pubID&&t.sysID?f+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(f+=' SYSTEM "'+t.sysID+'"'),t.nData&&(f+=" NDATA "+t.nData)),S.state=g.CloseTag,f+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdNotation=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"<!NOTATION",S.state=g.InsideTag,f+=" "+t.name,t.pubID&&t.sysID?f+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?f+=' PUBLIC "'+t.pubID+'"':t.sysID&&(f+=' SYSTEM "'+t.sysID+'"'),S.state=g.CloseTag,f+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.openNode=function(t,S,x){},l.prototype.closeNode=function(t,S,x){},l.prototype.openAttribute=function(t,S,x){},l.prototype.closeAttribute=function(t,S,x){},l}()}).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(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d;d=F("./Utility"),b=d.assign,p=d.isFunction,O=F("./XMLDOMImplementation"),M=F("./XMLDocument"),m=F("./XMLDocumentCB"),T=F("./XMLStringWriter"),y=F("./XMLStreamWriter"),N=F("./NodeType"),g=F("./WriterState"),q.exports.create=function(n,c,r,a){var o,u;if(n==null)throw new Error("Root element needs a name.");return a=b({},c,r,a),o=new M(a),u=o.element(n),a.headless||(o.declaration(a),(a.pubID!=null||a.sysID!=null)&&o.dtd(a)),u},q.exports.begin=function(n,c,r){var a;return p(n)&&(a=[n,c],c=a[0],r=a[1],n={}),c?new m(n,c,r):new M(n)},q.exports.stringWriter=function(n){return new T(n)},q.exports.streamWriter=function(n,c){return new y(n,c)},q.exports.implementation=new O,q.exports.nodeType=N,q.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(F,q,j){q.exports=g;var N=Object.prototype.hasOwnProperty;function g(){for(var O={},M=0;M<arguments.length;M++){var m=arguments[M];for(var y in m)N.call(m,y)&&(O[y]=m[y])}return O}},{}],284:[function(F,q,j){"use strict";var N=F("buffer").Buffer,g=F("./sha"),O=F("./md5"),M={sha1:g,md5:O},m=64,y=N.alloc(m);y.fill(0);function T(d,n,c){N.isBuffer(n)||(n=N.from(n)),N.isBuffer(c)||(c=N.from(c)),n.length>m?n=d(n):n.length<m&&(n=N.concat([n,y],m));for(var r=N.alloc(m),a=N.alloc(m),o=0;o<m;o++)r[o]=n[o]^54,a[o]=n[o]^92;var u=d(N.concat([r,c]));return d(N.concat([a,u]))}function b(d,n){d=d||"sha1";var c=M[d],r=[],a=0;return c||p("algorithm:",d,"is not yet supported"),{update:function(u){return N.isBuffer(u)||(u=N.from(u)),r.push(u),a+=u.length,this},digest:function(u){var h=N.concat(r),s=n?T(c,n,h):c(h);return r=null,u?s.toString(u):s}}}function p(){var d=[].slice.call(arguments).join(" ");throw new Error([d,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}j.createHash=function(d){return b(d)},j.createHmac=function(d,n){return b(d,n)},j.createCredentials=function(){p("sorry,createCredentials is not implemented yet")},j.createCipher=function(){p("sorry,createCipher is not implemented yet")},j.createCipheriv=function(){p("sorry,createCipheriv is not implemented yet")},j.createDecipher=function(){p("sorry,createDecipher is not implemented yet")},j.createDecipheriv=function(){p("sorry,createDecipheriv is not implemented yet")},j.createSign=function(){p("sorry,createSign is not implemented yet")},j.createVerify=function(){p("sorry,createVerify is not implemented yet")},j.createDiffieHellman=function(){p("sorry,createDiffieHellman is not implemented yet")},j.pbkdf2=function(){p("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(F,q,j){"use strict";var N=F("buffer").Buffer,g=4,O=N.alloc(g);O.fill(0);var M=8;function m(b,p){if(b.length%g!==0){var d=b.length+(g-b.length%g);b=N.concat([b,O],d)}for(var n=[],c=p?b.readInt32BE:b.readInt32LE,r=0;r<b.length;r+=g)n.push(c.call(b,r));return n}function y(b,p,d){for(var n=N.alloc(p),c=d?n.writeInt32BE:n.writeInt32LE,r=0;r<b.length;r++)c.call(n,b[r],r*4,!0);return n}function T(b,p,d,n){N.isBuffer(b)||(b=N.from(b));var c=p(m(b,n),b.length*M);return y(c,d,n)}q.exports={hash:T}},{buffer:73}],286:[function(F,q,j){"use strict";var N=F("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function O(n,c){n[c>>5]|=128<<c%32,n[(c+64>>>9<<4)+14]=c;for(var r=1732584193,a=-271733879,o=-1732584194,u=271733878,h=0;h<n.length;h+=16){var s=r,l=a,t=o,S=u;r=m(r,a,o,u,n[h+0],7,-680876936),u=m(u,r,a,o,n[h+1],12,-389564586),o=m(o,u,r,a,n[h+2],17,606105819),a=m(a,o,u,r,n[h+3],22,-1044525330),r=m(r,a,o,u,n[h+4],7,-176418897),u=m(u,r,a,o,n[h+5],12,1200080426),o=m(o,u,r,a,n[h+6],17,-1473231341),a=m(a,o,u,r,n[h+7],22,-45705983),r=m(r,a,o,u,n[h+8],7,1770035416),u=m(u,r,a,o,n[h+9],12,-1958414417),o=m(o,u,r,a,n[h+10],17,-42063),a=m(a,o,u,r,n[h+11],22,-1990404162),r=m(r,a,o,u,n[h+12],7,1804603682),u=m(u,r,a,o,n[h+13],12,-40341101),o=m(o,u,r,a,n[h+14],17,-1502002290),a=m(a,o,u,r,n[h+15],22,1236535329),r=y(r,a,o,u,n[h+1],5,-165796510),u=y(u,r,a,o,n[h+6],9,-1069501632),o=y(o,u,r,a,n[h+11],14,643717713),a=y(a,o,u,r,n[h+0],20,-373897302),r=y(r,a,o,u,n[h+5],5,-701558691),u=y(u,r,a,o,n[h+10],9,38016083),o=y(o,u,r,a,n[h+15],14,-660478335),a=y(a,o,u,r,n[h+4],20,-405537848),r=y(r,a,o,u,n[h+9],5,568446438),u=y(u,r,a,o,n[h+14],9,-1019803690),o=y(o,u,r,a,n[h+3],14,-187363961),a=y(a,o,u,r,n[h+8],20,1163531501),r=y(r,a,o,u,n[h+13],5,-1444681467),u=y(u,r,a,o,n[h+2],9,-51403784),o=y(o,u,r,a,n[h+7],14,1735328473),a=y(a,o,u,r,n[h+12],20,-1926607734),r=T(r,a,o,u,n[h+5],4,-378558),u=T(u,r,a,o,n[h+8],11,-2022574463),o=T(o,u,r,a,n[h+11],16,1839030562),a=T(a,o,u,r,n[h+14],23,-35309556),r=T(r,a,o,u,n[h+1],4,-1530992060),u=T(u,r,a,o,n[h+4],11,1272893353),o=T(o,u,r,a,n[h+7],16,-155497632),a=T(a,o,u,r,n[h+10],23,-1094730640),r=T(r,a,o,u,n[h+13],4,681279174),u=T(u,r,a,o,n[h+0],11,-358537222),o=T(o,u,r,a,n[h+3],16,-722521979),a=T(a,o,u,r,n[h+6],23,76029189),r=T(r,a,o,u,n[h+9],4,-640364487),u=T(u,r,a,o,n[h+12],11,-421815835),o=T(o,u,r,a,n[h+15],16,530742520),a=T(a,o,u,r,n[h+2],23,-995338651),r=b(r,a,o,u,n[h+0],6,-198630844),u=b(u,r,a,o,n[h+7],10,1126891415),o=b(o,u,r,a,n[h+14],15,-1416354905),a=b(a,o,u,r,n[h+5],21,-57434055),r=b(r,a,o,u,n[h+12],6,1700485571),u=b(u,r,a,o,n[h+3],10,-1894986606),o=b(o,u,r,a,n[h+10],15,-1051523),a=b(a,o,u,r,n[h+1],21,-2054922799),r=b(r,a,o,u,n[h+8],6,1873313359),u=b(u,r,a,o,n[h+15],10,-30611744),o=b(o,u,r,a,n[h+6],15,-1560198380),a=b(a,o,u,r,n[h+13],21,1309151649),r=b(r,a,o,u,n[h+4],6,-145523070),u=b(u,r,a,o,n[h+11],10,-1120210379),o=b(o,u,r,a,n[h+2],15,718787259),a=b(a,o,u,r,n[h+9],21,-343485551),r=p(r,s),a=p(a,l),o=p(o,t),u=p(u,S)}return Array(r,a,o,u)}function M(n,c,r,a,o,u){return p(d(p(p(c,n),p(a,u)),o),r)}function m(n,c,r,a,o,u,h){return M(c&r|~c&a,n,c,o,u,h)}function y(n,c,r,a,o,u,h){return M(c&a|r&~a,n,c,o,u,h)}function T(n,c,r,a,o,u,h){return M(c^r^a,n,c,o,u,h)}function b(n,c,r,a,o,u,h){return M(r^(c|~a),n,c,o,u,h)}function p(n,c){var r=(n&65535)+(c&65535),a=(n>>16)+(c>>16)+(r>>16);return a<<16|r&65535}function d(n,c){return n<<c|n>>>32-c}q.exports=function(c){return N.hash(c,O,16)}},{"./helpers":285}],287:[function(F,q,j){"use strict";var N=F("./helpers");function g(T,b){T[b>>5]|=128<<24-b%32,T[(b+64>>9<<4)+15]=b;for(var p=Array(80),d=1732584193,n=-271733879,c=-1732584194,r=271733878,a=-1009589776,o=0;o<T.length;o+=16){for(var u=d,h=n,s=c,l=r,t=a,S=0;S<80;S++){S<16?p[S]=T[o+S]:p[S]=y(p[S-3]^p[S-8]^p[S-14]^p[S-16],1);var x=m(m(y(d,5),O(S,n,c,r)),m(m(a,p[S]),M(S)));a=r,r=c,c=y(n,30),n=d,d=x}d=m(d,u),n=m(n,h),c=m(c,s),r=m(r,l),a=m(a,t)}return Array(d,n,c,r,a)}function O(T,b,p,d){return T<20?b&p|~b&d:T<40?b^p^d:T<60?b&p|b&d|p&d:b^p^d}function M(T){return T<20?1518500249:T<40?1859775393:T<60?-1894007588:-899497514}function m(T,b){var p=(T&65535)+(b&65535),d=(T>>16)+(b>>16)+(p>>16);return d<<16|p&65535}function y(T,b){return T<<b|T>>>32-b}q.exports=function(b){return N.hash(b,g,20,!0)}},{"./helpers":285}],288:[function(F,q,j){"use strict";q.exports=function(){return function(){}}},{}],289:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/helpers/typeof"),O=M(g);function M(d){return d&&d.__esModule?d:{default:d}}var m=F("stream"),y=m.Stream,T=F("../lib/common/utils/isArray"),b=T.isArray;q.exports.string=function(n){return typeof n=="string"},q.exports.array=b,q.exports.buffer=N.isBuffer;function p(d){return d instanceof y}q.exports.writableStream=function(n){return p(n)&&typeof n._write=="function"&&(0,O.default)(n._writableState)==="object"}}).call(this,{isBuffer:F("../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(F,q,j){"use strict";j.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(g){return N}},j.escape=F("escape-html"),j.timestamp=function(g){if(g){var O=g;return typeof O=="string"&&(O=Number(O)),String(g).length===10&&(O*=1e3),new Date(O)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(F,q,j){(function(N,g){"use strict";var O=F("babel-runtime/core-js/json/stringify"),M=T(O),m=F("babel-runtime/helpers/typeof"),y=T(m);function T(S){return S&&S.__esModule?S:{default:S}}var b=F("util"),p=F("url"),d=F("http"),n=F("https"),c=F("debug")("urllib"),r=F("humanize-ms"),a,o=0,u=Math.pow(2,31)-10,h=/^https?:\/\//i;function s(S,x){return S===void 0?x:S}function l(S,x){return function(f,R,C){if(f)return x(f);S({data:R,status:C.statusCode,headers:C.headers,res:C})}}j.TIMEOUTS=[r("300s"),r("300s")];var t=["json","text"];j.request=function(x,f,R){return arguments.length===2&&typeof f=="function"&&(R=f,f=null),typeof R=="function"?j.requestWithCallback(x,f,R):(a||(a=F("any-promise")),new a(function(C,v){j.requestWithCallback(x,f,l(C,v))}))},j.requestWithCallback=function(x,f,R){if(!x||typeof x!="string"&&(typeof x=="undefined"?"undefined":(0,y.default)(x))!=="object"){var C=b.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(C)}arguments.length===2&&typeof f=="function"&&(R=f,f=null),f=f||{},o>=u&&(o=0);var v=++o;f.requestUrls=f.requestUrls||[];var _={requestId:v,url:x,args:f,ctx:f.ctx};f.emitter&&f.emitter.emit("request",_),f.timeout=f.timeout||j.TIMEOUTS,f.maxRedirects=f.maxRedirects||10,f.streaming=f.streaming||f.customResponse;var E=Date.now(),w;typeof x=="string"?(h.test(x)||(x="http://"+x),w=p.parse(x)):w=x;var k=(f.type||f.method||w.method||"GET").toUpperCase(),I=w.port||80,L=d,V=s(f.agent,j.agent),W=f.fixJSONCtlChars;w.protocol==="https:"&&(L=n,V=s(f.httpsAgent,j.httpsAgent),w.port||(I=443));var H={host:w.hostname||w.host||"localhost",path:w.path||"/",method:k,port:I,agent:V,headers:f.headers||{},lookup:f.lookup};Array.isArray(f.timeout)?H.requestTimeout=f.timeout[f.timeout.length-1]:typeof f.timeout!="undefined"&&(H.requestTimeout=f.timeout);for(var G=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<G.length;B++){var P=G[B];f.hasOwnProperty(P)&&(H[P]=f[P])}H.rejectUnauthorized===!1&&!H.hasOwnProperty("secureOptions")&&(H.secureOptions=F("constants").SSL_OP_NO_TLSv1_2);var z=f.auth||w.auth;z&&(H.auth=z);var J=f.content||f.data,ue=k==="GET"||k==="HEAD"||f.dataAsQueryString;if(!f.content&&(J&&!(typeof J=="string"||g.isBuffer(J))))if(ue)J=f.nestedQuerystring?qs.stringify(J):querystring.stringify(J);else{var de=H.headers["Content-Type"]||H.headers["content-type"];de||(f.contentType==="json"?de="application/json":de="application/x-www-form-urlencoded",H.headers["Content-Type"]=de),parseContentType(de).type==="application/json"?J=(0,M.default)(J):J=f.nestedQuerystring?qs.stringify(J):querystring.stringify(J)}ue&&J&&(H.path+=(w.query?"&":"?")+J,J=null);var Se=0;if(J){var Ae=J.length;g.isBuffer(J)||(Ae=g.byteLength(J)),Se=H.headers["Content-Length"]=Ae}f.dataType==="json"&&(H.headers.Accept="application/json"),typeof f.beforeRequest=="function"&&f.beforeRequest(H);var pe=null,Oe=null,ye=null,ce=!1,ae=!1,re=0,fe=-1,te=!1,ne="",Te="",ie=null;f.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Z(){pe&&(clearTimeout(pe),pe=null)}function X(){Oe&&(clearTimeout(Oe),Oe=null)}function Q(Ie,at,ct){if(X(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),v,N.pid,H.method,x),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),v,N.pid,Ie.name,Ie.message,Ie.stack);return}var $e=R;R=null;var st={};if(ct&&(fe=ct.statusCode,st=ct.headers),fe===401&&st["www-authenticate"]&&(!f.headers||!f.headers.Authorization)&&f.digestAuth){var Ue=st["www-authenticate"];if(Ue.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",v,x,Ue),f.headers=f.headers||{},f.headers.Authorization=digestAuthHeader(H.method,H.path,Ue,f.digestAuth),c("Request#%d %s: auth with digest header: %s",v,x,f.headers.Authorization),ct.headers["set-cookie"]&&(f.headers.Cookie=ct.headers["set-cookie"].join(";")),j.requestWithCallback(x,f,$e)}var Le=Date.now()-E;ie&&(ie.contentDownload=Le),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Le,re,fe,H.method,H.host,H.path,ae,ie);var Me={status:fe,statusCode:fe,headers:st,size:re,aborted:te,rt:Le,keepAliveSocket:ae,data:at,requestUrls:f.requestUrls,timing:ie,remoteAddress:ne,remotePort:Te};if(Ie){var Ee="";V&&typeof V.getCurrentStatus=="function"&&(Ee=", agent status: "+(0,M.default)(V.getCurrentStatus())),Ie.message+=", "+H.method+" "+x+" "+fe+" (connected: "+ce+", keepalive socket: "+ae+Ee+`)
headers: `+(0,M.default)(st),Ie.data=at,Ie.path=H.path,Ie.status=fe,Ie.headers=st,Ie.res=Me}$e(Ie,at,f.streaming?ct:Me),f.emitter&&(_.url=x,_.socket=ft&&ft.connection,_.options=H,_.size=Se,f.emitter.emit("response",{requestId:v,error:Ie,ctx:f.ctx,req:_,res:Me}))}function _e(Ie){var at=null;if(f.followRedirect&&statuses.redirect[Ie.statusCode]){f._followRedirectCount=(f._followRedirectCount||0)+1;var ct=Ie.headers.location;if(!ct)at=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),at.name="FollowRedirectError";else if(f._followRedirectCount>f.maxRedirects)at=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),at.name="MaxRedirectError";else{var $e=f.formatRedirectUrl?f.formatRedirectUrl(x,ct):p.resolve(x,ct);c("Request#%d %s: `redirected` from %s to %s",v,H.path,x,$e),X(),f.headers&&f.headers.Host&&h.test(ct)&&(f.headers.Host=null);var st=R;return R=null,j.requestWithCallback($e,f,st),{redirect:!0,error:null}}}return{redirect:!1,error:at}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),f.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function ve(Ie,at,ct){var $e=Ie.headers["content-encoding"];return ct(null,at,$e)}var Re=f.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",v,k,x,H.headers,H.path),f.requestUrls.push(x);function Je(Ie){if(ie&&(ie.waiting=Date.now()-E),c("Request#%d %s `req response` event emit: status %d, headers: %j",v,x,Ie.statusCode,Ie.headers),f.streaming){var at=_e(Ie);if(at.redirect){Ie.resume();return}return at.error?(Ie.resume(),Q(at.error,null,Ie)):Q(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",v,x,re)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",v,x,re)}),Ie.on("aborted",function(){te=!0,c("Request#%d %s: `res aborted` event emit, total size %d",v,x,re)}),Re){var at=_e(Ie);if(at.redirect){Ie.resume();return}return at.error?(Ie.resume(),Re.end(),Q(at.error,null,Ie)):(f.consumeWriteStream===!1?Ie.on("end",Q.bind(null,null,null,Ie)):isNode010||isNode012?first([[Re,"close"],[Ie,"aborted"]],function(st,Ue,Le){c("Request#%d %s: writeStream or res %s event emitted",v,x,Le),Q(ye||null,null,Ie)}):Re.on("close",function(){c("Request#%d %s: writeStream close event emitted",v,x),Q(ye||null,null,Ie)}),Ie.pipe(Re))}var ct=[];Ie.on("data",function($e){c("Request#%d %s: `res data` event emit, size %d",v,x,$e.length),re+=$e.length,ct.push($e)}),Ie.on("end",function(){var $e=g.concat(ct,re);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",v,x,re,Ie._dumped),ye)return Q(ye,$e,Ie);var st=_e(Ie);if(st.error)return Q(st.error,$e,Ie);if(st.redirect)return;ve(Ie,$e,function(Ue,Le,Me){if(Ue)return Q(Ue,$e,Ie);if(!Me&&t.indexOf(f.dataType)>=0){try{Le=decodeBodyByCharset(Le,Ie)}catch(Ce){return c("decodeBodyByCharset error: %s",Ce),Q(null,Le,Ie)}if(f.dataType==="json")if(re===0)Le=null;else{var Ee=parseJSON(Le,W);Ee.error?Ue=Ee.error:Le=Ee.data}}te&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",v,x),Q(Ue,Le,Ie)})})}var qe,rt;Array.isArray(f.timeout)?(qe=r(f.timeout[0]),rt=r(f.timeout[1])):qe=rt=r(f.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",qe,rt);function ut(){c("Connect timer ticking, timeout: %d",qe),pe=setTimeout(function(){pe=null,fe===-1&&(fe=-2);var Ie="Connect timeout for "+qe+"ms",at="ConnectionTimeoutError";ft.socket||(at="SocketAssignTimeoutError",Ie+=", working sockets is full"),ye=new Error(Ie),ye.name=at,ye.requestId=v,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",v,x,ye.name,Ie,ce),Be()},qe)}function dt(){c("Response timer ticking, timeout: %d",rt),Oe=setTimeout(function(){Oe=null;var Ie="Response timeout for "+rt+"ms",at="ResponseTimeoutError";ye=new Error(Ie),ye.name=at,ye.requestId=v,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",v,x,ye.name,Ie,ce),Be()},rt)}var ft;H.mode=f.mode?f.mode:"";try{ft=L.request(H,Je)}catch(Ie){return Q(Ie)}typeof window=="undefined"?ut():ft.on("requestTimeout",function(){fe===-1&&(fe=-2);var Ie="Connect timeout for "+qe+"ms",at="ConnectionTimeoutError";ye=new Error(Ie),ye.name=at,ye.requestId=v,Be()});function Be(){c("Request#%d %s abort, connected: %s",v,x,ce),ft.socket||(ye.noSocket=!0,Q(ye)),ft.abort()}return ie&&ft.on("finish",function(){ie.requestSent=Date.now()-E}),ft.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-E),isNode010&&Ie.socket&&(Ie=Ie.socket);var at=Ie.readyState;if(at==="opening"){Ie.once("lookup",function(ct,$e,st){c("Request#%d %s lookup: %s, %s, %s",v,x,ct,$e,st),ie&&(ie.dnslookup=Date.now()-E),$e&&(ne=$e)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-E),Z(),dt(),c("Request#%d %s new socket connected",v,x),ce=!0,ne||(ne=Ie.remoteAddress),Te=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",v,x,at),ce=!0,ae=!0,ne||(ne=Ie.remoteAddress),Te=Ie.remotePort,Z(),dt()}),ft.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",v,x,Ie.name,Ie.message),Q(ye||Ie)}),Re&&Re.once("error",function(Ie){Ie.message+=' (writeStream "error")',ye=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",v,x,Ie.name,Ie.message),Be()}),f.stream?(f.stream.pipe(ft),f.stream.once("error",function(Ie){Ie.message+=' (stream "error")',ye=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",v,x,Ie.name,Ie.message),Be()})):ft.end(J),ft.requestId=v,ft}}).call(this,F("_process"),F("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(F,q,j){"use strict";j.d(q,"a",function(){return b});var N=j("q1tI"),g=j("biw7"),O=j("fyJ8");function M(p){var d=p.className,n=p.index,c=p.children,r=p.colSpan,a=p.rowSpan,o=N.useContext(g.a),u=o.prefixCls,h=o.fixedInfoList,s=h[n];return N.createElement(O.a,Object.assign({className:d,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:r,rowSpan:a}}}},s))}function m(p){return N.createElement("tr",Object.assign({},p))}function y(p){var d=p.children,n=N.useContext(g.a),c=n.prefixCls;return N.createElement("tfoot",{className:"".concat(c,"-summary")},d)}var T=q.b=y,b={Cell:M,Row:m}},oRuE:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(g,O){var M=O*4,m=M-g.sigBytes%M;g.concat(N.lib.WordArray.random(m-1)).concat(N.lib.WordArray.create([m<<24],1))},unpad:function(g){var O=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=O}},N.pad.Iso10126})},osHv:function(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var g=N.Pos;function O(h,s){return h.line-s.line||h.ch-s.ch}var M="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=M+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",y=new RegExp("<(/?)(["+M+"]["+m+"]*)","g");function T(h,s,l,t){this.line=s,this.ch=l,this.cm=h,this.text=h.getLine(s),this.min=t?Math.max(t.from,h.firstLine()):h.firstLine(),this.max=t?Math.min(t.to-1,h.lastLine()):h.lastLine()}function b(h,s){var l=h.cm.getTokenTypeAt(g(h.line,s));return l&&/\btag\b/.test(l)}function p(h){return h.line>=h.max?void 0:(h.ch=0,h.text=h.cm.getLine(++h.line),!0)}function d(h){return h.line<=h.min?void 0:(h.text=h.cm.getLine(--h.line),h.ch=h.text.length,!0)}function n(h){for(;;){var s=h.text.indexOf(">",h.ch);if(s==-1){if(p(h))continue;return}if(!b(h,s+1)){h.ch=s+1;continue}var l=h.text.lastIndexOf("/",s),t=l>-1&&!/\S/.test(h.text.slice(l+1,s));return h.ch=s+1,t?"selfClose":"regular"}}function c(h){for(;;){var s=h.ch?h.text.lastIndexOf("<",h.ch-1):-1;if(s==-1){if(d(h))continue;return}if(!b(h,s+1)){h.ch=s;continue}y.lastIndex=s,h.ch=s;var l=y.exec(h.text);if(l&&l.index==s)return l}}function r(h){for(;;){y.lastIndex=h.ch;var s=y.exec(h.text);if(!s){if(p(h))continue;return}if(!b(h,s.index+1)){h.ch=s.index+1;continue}return h.ch=s.index+s[0].length,s}}function a(h){for(;;){var s=h.ch?h.text.lastIndexOf(">",h.ch-1):-1;if(s==-1){if(d(h))continue;return}if(!b(h,s+1)){h.ch=s;continue}var l=h.text.lastIndexOf("/",s),t=l>-1&&!/\S/.test(h.text.slice(l+1,s));return h.ch=s+1,t?"selfClose":"regular"}}function o(h,s){for(var l=[];;){var t=r(h),S,x=h.line,f=h.ch-(t?t[0].length:0);if(!t||!(S=n(h)))return;if(S=="selfClose")continue;if(t[1]){for(var R=l.length-1;R>=0;--R)if(l[R]==t[2]){l.length=R;break}if(R<0&&(!s||s==t[2]))return{tag:t[2],from:g(x,f),to:g(h.line,h.ch)}}else l.push(t[2])}}function u(h,s){for(var l=[];;){var t=a(h);if(!t)return;if(t=="selfClose"){c(h);continue}var S=h.line,x=h.ch,f=c(h);if(!f)return;if(f[1])l.push(f[2]);else{for(var R=l.length-1;R>=0;--R)if(l[R]==f[2]){l.length=R;break}if(R<0&&(!s||s==f[2]))return{tag:f[2],from:g(h.line,h.ch),to:g(S,x)}}}}N.registerHelper("fold","xml",function(h,s){for(var l=new T(h,s.line,0);;){var t=r(l);if(!t||l.line!=s.line)return;var S=n(l);if(!S)return;if(!t[1]&&S!="selfClose"){var x=g(l.line,l.ch),f=o(l,t[2]);return f&&O(f.from,x)>0?{from:x,to:f.from}:null}}}),N.findMatchingTag=function(h,s,l){var t=new T(h,s.line,s.ch,l);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=n(t),x=S&&g(t.line,t.ch),f=S&&c(t);if(!S||!f||O(t,s)>0)return;var R={from:g(t.line,t.ch),to:x,tag:f[2]};return S=="selfClose"?{open:R,close:null,at:"open"}:f[1]?{open:u(t,f[2]),close:R,at:"close"}:(t=new T(h,x.line,x.ch,l),{open:R,close:o(t,f[2]),at:"open"})},N.findEnclosingTag=function(h,s,l,t){for(var S=new T(h,s.line,s.ch,l);;){var x=u(S,t);if(!x)break;var f=new T(h,s.line,s.ch,l),R=o(f,x.tag);if(R)return{open:x,close:R}}},N.scanForClosingTag=function(h,s,l,t){var S=new T(h,s.line,s.ch,t?{from:0,to:t}:null);return o(S,l)}})},p5ED:function(F,q,j){"use strict";var N=j("+L6B"),g=j("2/Rp"),O=j("5Dmo"),M=j("3S7+"),m=j("k1fw"),y=j("tJVT"),T=j("q1tI"),b=j.n(T),p=j("vHTk"),d=j.n(p),n=j("yEEn"),c=j("ZW9T"),r=j("1vsH");q.a=function(a){var o=a.name,u=a.data,h=a.theme,s=a.type,l=a.filename,t=a.monacoEditor,S=a.className,x=a.style,f=a.close,R=a.onClose,C=a.hasMask,v=Object(T.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),_=Object(y.a)(v,2),E=_[0],w=_[1],k=Object(T.useState)(""),I=Object(y.a)(k,2),L=I[0],V=I[1],W,H=1024*1024,G=10*H,B=Object(T.useRef)();s==="office"&&(W=Object(r.T)(u).filesize,W>G&&(s="other")),l&&(t.filename=l),Object(T.useEffect)(function(){var J,ue,de=(J=document.cookie)===null||J===void 0||((ue=J.replace(/\s/g,""))===null||ue===void 0)?void 0:ue.split(";");de==null||de.map(function(Se){var Ae=Se.split("=");Ae[0]==="_educoder_session"&&V(Ae[1])})},[]);var P=function(){if(u.startsWith("http")||u.startsWith("/")){z();return}Object(r.z)(l||"educoder",u,l)},z=function(){Object(r.x)(l||o,u)};return console.log("data:",u,"fileanme:",l," name:",o),b.a.createElement("div",{style:Object(m.a)({},x||{}),className:"".concat(C&&d.a.bgBlack," ").concat(s?d.a.wrp:"hide")},f&&b.a.createElement("div",{className:d.a.close,ref:B},b.a.createElement(M.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return B.current}},b.a.createElement("span",{onClick:z},b.a.createElement("i",{className:"icon-quxiaozhiding"}))),b.a.createElement(M.a,{title:"\u5173\u95ED",getPopupContainer:function(){return B.current}},b.a.createElement("span",{className:"",onClick:R},b.a.createElement("i",{className:"icon-guanbi1"})))),b.a.createElement("div",{className:"".concat(d.a[S]," ").concat(S," ").concat(d.a.monaco," ").concat(s==="txt"?"show":"hide")},s==="txt"&&b.a.createElement(c.b,t)),s==="audio"&&b.a.createElement("audio",{src:"".concat(u!=null&&u.startsWith("/")||(u==null?void 0:u.indexOf("https://"))>-1?u:"data:audio/mp3;base64,").concat(u),autoPlay:!0}),s==="video"&&b.a.createElement(b.a.Fragment,null,u!=null&&u.startsWith("/")?b.a.createElement("video",{controls:!0,src:"".concat(u),autoPlay:!0}):b.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(u),autoPlay:!0})),s==="html"&&b.a.createElement("iframe",{src:u+"&disposition=inline"}),s==="pdf"&&b.a.createElement("embed",{className:d.a.embed,src:u}),s==="image"&&b.a.createElement(b.a.Fragment,null,b.a.createElement("img",{src:"".concat(u!=null&&u.startsWith("/")||(u==null?void 0:u.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(u)})),s==="other"&&b.a.createElement("div",null,b.a.createElement(g.a,{type:"primary",size:"large",onClick:P},b.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(s==="download"||s==="office")&&b.a.createElement(g.a,{type:"primary",size:"large",onClick:P},b.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(F,q,j){},pA7S:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=O.BlockCipher,y=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],b=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],p=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=y.DES=m.extend({_doReset:function(){for(var u=this._key,h=u.words,s=[],l=0;l<56;l++){var t=T[l]-1;s[l]=h[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],x=0;x<16;x++){for(var f=S[x]=[],R=p[x],l=0;l<24;l++)f[l/6|0]|=s[(b[l]-1+R)%28]<<31-l%6,f[4+(l/6|0)]|=s[28+(b[l+24]-1+R)%28]<<31-l%6;f[0]=f[0]<<1|f[0]>>>31;for(var l=1;l<7;l++)f[l]=f[l]>>>(l-1)*4+3;f[7]=f[7]<<5|f[7]>>>27}for(var C=this._invSubKeys=[],l=0;l<16;l++)C[l]=S[15-l]},encryptBlock:function(u,h){this._doCryptBlock(u,h,this._subKeys)},decryptBlock:function(u,h){this._doCryptBlock(u,h,this._invSubKeys)},_doCryptBlock:function(u,h,s){this._lBlock=u[h],this._rBlock=u[h+1],r.call(this,4,252645135),r.call(this,16,65535),a.call(this,2,858993459),a.call(this,8,16711935),r.call(this,1,1431655765);for(var l=0;l<16;l++){for(var t=s[l],S=this._lBlock,x=this._rBlock,f=0,R=0;R<8;R++)f|=d[R][((x^t[R])&n[R])>>>0];this._lBlock=x,this._rBlock=S^f}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),a.call(this,8,16711935),a.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),u[h]=this._lBlock,u[h+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(u,h){var s=(this._lBlock>>>u^this._rBlock)&h;this._rBlock^=s,this._lBlock^=s<<u}function a(u,h){var s=(this._rBlock>>>u^this._lBlock)&h;this._lBlock^=s,this._rBlock^=s<<u}g.DES=m._createHelper(c);var o=y.TripleDES=m.extend({_doReset:function(){var u=this._key,h=u.words;if(h.length!==2&&h.length!==4&&h.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var s=h.slice(0,2),l=h.length<4?h.slice(0,2):h.slice(2,4),t=h.length<6?h.slice(0,2):h.slice(4,6);this._des1=c.createEncryptor(M.create(s)),this._des2=c.createEncryptor(M.create(l)),this._des3=c.createEncryptor(M.create(t))},encryptBlock:function(u,h){this._des1.encryptBlock(u,h),this._des2.decryptBlock(u,h),this._des3.encryptBlock(u,h)},decryptBlock:function(u,h){this._des3.decryptBlock(u,h),this._des2.encryptBlock(u,h),this._des1.decryptBlock(u,h)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=m._createHelper(o)}(),N.TripleDES})},pIsd:function(F,q,j){var N=j("BJfS"),g=function(m){var y=/[height|width]$/;return y.test(m)},O=function(m){var y="",T=Object.keys(m);return T.forEach(function(b,p){var d=m[b];b=N(b),g(b)&&typeof d=="number"&&(d=d+"px"),d===!0?y+=b:d===!1?y+="not "+b:y+="("+b+": "+d+")",p<T.length-1&&(y+=" and ")}),y},M=function(m){var y="";return typeof m=="string"?m:m instanceof Array?(m.forEach(function(T,b){y+=O(T),b<m.length-1&&(y+=", ")}),y):O(m)};F.exports=M},psGv:function(F,q,j){var N,g;(function(){var O;(function(){"use strict";var T=[,,function(n){function c(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var o=new c(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},c.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},c.prototype.has_match=function(o){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(o))return!0;return!1},c.prototype.set_indent=function(o,u){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=u||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 o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},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(o){this.__items.push(o);var u=o.lastIndexOf(`
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},c.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},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 o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function r(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}r.prototype.get_indent_size=function(o,u){var h=this.__base_string_length;return u=u||0,o<0&&(h=0),h+=o*this.__indent_size,h+=u,h},r.prototype.get_indent_string=function(o,u){var h=this.__base_string;return u=u||0,o<0&&(o=0,h=""),u+=o*this.__indent_size,this.__ensure_cache(u),h+=this.__cache[u],h},r.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var o=this.__cache.length,u=0,h="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,h=new Array(u+1).join(this.__indent_string)),o&&(h+=new Array(o+1).join(" ")),this.__cache.push(h)};function a(o,u){this.__indent_cache=new r(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},a.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
`);return o!==`
`&&(h=h.replace(/[\n]/g,o)),h},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.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(" "))},a.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(o,u){for(var h=this.__lines.length-2;h>=0;){var s=this.__lines[h];if(s.is_empty())break;if(s.item(0).indexOf(o)!==0&&s.item(-1)!==u){this.__lines.splice(h+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},n.exports.Output=a},function(n){function c(r,a,o,u){this.type=r,this.text=a,this.comments_before=null,this.newlines=o||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=c},,,function(n){function c(o,u){this.raw_options=r(o,u),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(o,u){var h=this.raw_options[o],s=u||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(s=h.concat()):typeof h=="string"&&(s=h.split(/[^a-zA-Z0-9_\/\-]+/)),s},c.prototype._get_boolean=function(o,u){var h=this.raw_options[o],s=h===void 0?!!u:!!h;return s},c.prototype._get_characters=function(o,u){var h=this.raw_options[o],s=u||"";return typeof h=="string"&&(s=h.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),s},c.prototype._get_number=function(o,u){var h=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var s=parseInt(h,10);return isNaN(s)&&(s=u),s},c.prototype._get_selection=function(o,u,h){var s=this._get_selection_list(o,u,h);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+u+`
You passed in: '`+this.raw_options[o]+"'");return s[0]},c.prototype._get_selection_list=function(o,u,h){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[u[0]],!this._is_valid_selection(h,u))throw new Error("Invalid Default Value!");var s=this._get_array(o,h);if(!this._is_valid_selection(s,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+u+`
You passed in: '`+this.raw_options[o]+"'");return s},c.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(h){return u.indexOf(h)===-1})};function r(o,u){var h={};o=a(o);var s;for(s in o)s!==u&&(h[s]=o[s]);if(u&&o[u])for(s in o[u])h[s]=o[u][s];return h}function a(o){var u={},h;for(h in o){var s=h.replace(/-/g,"_");u[s]=o[h]}return u}n.exports.Options=c,n.exports.normalizeOpts=a,n.exports.mergeOpts=r},,function(n){var c=RegExp.prototype.hasOwnProperty("sticky");function r(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},r.prototype.peek=function(a){var o=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(o=this.__input.charAt(a)),o},r.prototype.__match=function(a,o){a.lastIndex=o;var u=a.exec(this.__input);return u&&!(c&&a.sticky)&&(u.index!==o&&(u=null)),u},r.prototype.test=function(a,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(a,o):!1},r.prototype.testChar=function(a,o){var u=this.peek(o);return a.lastIndex=0,u!==null&&a.test(u)},r.prototype.match=function(a){var o=this.__match(a,this.__position);return o?this.__position+=o[0].length:o=null,o},r.prototype.read=function(a,o,u){var h="",s;return a&&(s=this.match(a),s&&(h+=s[0])),o&&(s||!a)&&(h+=this.readUntil(o,u)),h},r.prototype.readUntil=function(a,o){var u="",h=this.__position;a.lastIndex=this.__position;var s=a.exec(this.__input);return s?(h=s.index,o&&(h+=s[0].length)):h=this.__input_length,u=this.__input.substring(this.__position,h),this.__position=h,u},r.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},r.prototype.get_regexp=function(a,o){var u=null,h="g";return o&&c&&(h="y"),typeof a=="string"&&a!==""?u=new RegExp(a,h):a&&(u=new RegExp(a.source,h)),u},r.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(a){var o=this.__position,u=this.readUntilAfter(a);return this.__position=o,u},r.prototype.lookBack=function(a){var o=this.__position-1;return o>=a.length&&this.__input.substring(o-a.length,o).toLowerCase()===a},n.exports.InputScanner=r},function(n,c,r){var a=r(8).InputScanner,o=r(3).Token,u=r(10).TokenStream,h=r(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(t,S){this._input=new a(t),this._options=S||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new h(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var t,S=new o(s.START,""),x=null,f=[],R=new u;S.type!==s.EOF;){for(t=this._get_next_token(S,x);this._is_comment(t);)R.add(t),t=this._get_next_token(S,x);R.isEmpty()||(t.comments_before=R,R=new u),t.parent=x,this._is_opening(t)?(f.push(x),x=t):x&&this._is_closing(t,x)&&(t.opened=x,x.closed=t,x=f.pop(),t.parent=x),t.previous=S,S.next=t,this.__tokens.add(t),S=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,S){this._readWhitespace();var x=this._input.read(/.+/g);return x?this._create_token(s.RAW,x):this._create_token(s.EOF,"")},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,S){return!1},l.prototype._create_token=function(t,S){var x=new o(t,S,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return x},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=l,n.exports.TOKEN=s},function(n){function c(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}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 r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},c.prototype.peek=function(r){var a=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(a=this.__tokens[r]),a},c.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},n.exports.TokenStream=c},function(n,c,r){var a=r(12).Pattern;function o(u,h){a.call(this,u,h),h?this._line_regexp=this._input.get_regexp(h._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new a,o.prototype.__set_whitespace_patterns=function(u,h){u+="\\t ",h+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+h+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+h+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var u=this._input.read(this._match_pattern);if(u===" ")this.whitespace_before_token=" ";else if(u){var h=this.__split(this._newline_regexp,u);this.newline_count=h.length-1,this.whitespace_before_token=h[this.newline_count]}return u},o.prototype.matching=function(u,h){var s=this._create();return s.__set_whitespace_patterns(u,h),s._update(),s},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(u,h){u.lastIndex=0;for(var s=0,l=[],t=u.exec(h);t;)l.push(h.substring(s,t.index)),s=t.index+t[0].length,t=u.exec(h);return s<h.length?l.push(h.substring(s,h.length)):l.push(""),l},n.exports.WhitespacePattern=o},function(n){function c(r,a){this._input=r,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}c.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(r){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(r),a._update(),a},c.prototype.until=function(r){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(r),a._update(),a},c.prototype.starting_with=function(r){var a=this._create();return a._starting_pattern=this._input.get_regexp(r,!0),a._update(),a},c.prototype.matching=function(r){var a=this._create();return a._match_pattern=this._input.get_regexp(r,!0),a._update(),a},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},n.exports.Pattern=c},function(n){function c(r,a){r=typeof r=="string"?r:r.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+a,"g")}c.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(r);o;)a[o[1]]=o[2],o=this.__directive_pattern.exec(r);return a},c.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=c},function(n,c,r){var a=r(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function u(h,s){a.call(this,h,s),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var l=new a(h);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new a,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(h){var s=this._create();return s._disabled[h]=!0,s._update(),s},u.prototype.read_options=function(h){var s=this._create();for(var l in o)s._disabled[l]=h.templating.indexOf(l)===-1;return s._update(),s},u.prototype.exclude=function(h){var s=this._create();return s._excluded[h]=!0,s._update(),s},u.prototype.read=function(){var h="";this._match_pattern?h=this._input.read(this._starting_pattern):h=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),h+=s,s=this._read_template();return this._until_after&&(h+=this._input.readUntilAfter(this._until_pattern)),h},u.prototype.__set_templated_pattern=function(){var h=[];this._disabled.php||h.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||h.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||h.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(h.push(this.__patterns.django._starting_pattern.source),h.push(this.__patterns.django_value._starting_pattern.source),h.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||h.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&h.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+h.join("|")+")")},u.prototype._read_template=function(){var h="",s=this._input.peek();if(s==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(h=h||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(h=h||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(h=h||this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars_unescaped.read(),h=h||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(h=h||this.__patterns.django_value.read()),this._excluded.django||(h=h||this.__patterns.django_comment.read(),h=h||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(h=h||this.__patterns.smarty_comment.read(),h=h||this.__patterns.smarty_literal.read(),h=h||this.__patterns.smarty.read()));return h},n.exports.TemplatablePattern=u},,,,function(n,c,r){var a=r(19).Beautifier,o=r(20).Options;function u(h,s,l,t){var S=new a(h,s,l,t);return S.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new o}},function(n,c,r){var a=r(20).Options,o=r(2).Output,u=r(21).Tokenizer,h=r(21).TOKEN,s=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,t=function(k,I){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=k.max_preserve_newlines,this.preserve_newlines=k.preserve_newlines,this._output=new o(k,I)};t.prototype.current_line_has_match=function(k){return this._output.current_line.has_match(k)},t.prototype.set_space_before_token=function(k,I){this._output.space_before_token=k,this._output.non_breaking_space=I},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(k){this._output.add_raw_token(k)},t.prototype.print_preserved_newlines=function(k){var I=0;k.type!==h.TEXT&&k.previous.type!==h.TEXT&&(I=k.newlines?1:0),this.preserve_newlines&&(I=k.newlines<this.max_preserve_newlines+1?k.newlines:this.max_preserve_newlines+1);for(var L=0;L<I;L++)this.print_newline(L>0);return I!==0},t.prototype.traverse_whitespace=function(k){return k.whitespace_before||k.newlines?(this.print_preserved_newlines(k)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(k){this._output.add_new_line(k)},t.prototype.print_token=function(k){k.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(k.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(k){return k=this.indent_level+(k||0),k<1?"":this._output.get_indent_string(k)};var S=function(k){for(var I=null,L=k.next;L.type!==h.EOF&&k.closed!==L;){if(L.type===h.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===h.EQUALS&&L.next.next&&L.next.next.type===h.VALUE&&(I=L.next.next.text);break}L=L.next}return I},x=function(k,I){var L=null,V=null;return I.closed?(k==="script"?L="text/javascript":k==="style"&&(L="text/css"),L=S(I)||L,L.search("text/css")>-1?V="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?V="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?V="html":L.search(/test\/null/)>-1&&(V="null"),V):null};function f(k,I){return I.indexOf(k)!==-1}function R(k,I,L){this.parent=k||null,this.tag=I?I.tag_name:"",this.indent_level=L||0,this.parser_token=I||null}function C(k){this._printer=k,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(k){var I=new R(this._current_frame,k,this._printer.indent_level);this._current_frame=I},C.prototype._try_pop_frame=function(k){var I=null;return k&&(I=k.parser_token,this._printer.indent_level=k.indent_level,this._current_frame=k.parent),I},C.prototype._get_frame=function(k,I){for(var L=this._current_frame;L&&!(k.indexOf(L.tag)!==-1);){if(I&&I.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},C.prototype.try_pop=function(k,I){var L=this._get_frame([k],I);return this._try_pop_frame(L)},C.prototype.indent_to_tag=function(k){var I=this._get_frame(k);I&&(this._printer.indent_level=I.indent_level)};function v(k,I,L,V){this._source_text=k||"",I=I||{},this._js_beautify=L,this._css_beautify=V,this._tag_stack=null;var W=new a(I,"html");this._options=W,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"}v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,I=this._options.eol;this._options.eol==="auto"&&(I=`
`,k&&s.test(k)&&(I=k.match(s)[0])),k=k.replace(l,`
`);var L=k.match(/^[\t ]*/)[0],V={text:"",type:""},W=new _,H=new t(this._options,L),G=new u(k,this._options).tokenize();this._tag_stack=new C(H);for(var B=null,P=G.next();P.type!==h.EOF;)P.type===h.TAG_OPEN||P.type===h.COMMENT?(B=this._handle_tag_open(H,P,W,V),W=B):P.type===h.ATTRIBUTE||P.type===h.EQUALS||P.type===h.VALUE||P.type===h.TEXT&&!W.tag_complete?B=this._handle_inside_tag(H,P,W,G):P.type===h.TAG_CLOSE?B=this._handle_tag_close(H,P,W):P.type===h.TEXT?B=this._handle_text(H,P,W):H.add_raw_token(P),V=B,P=G.next();var z=H._output.get_code(I);return z},v.prototype._handle_tag_close=function(k,I,L){var V={text:I.text,type:I.type};return k.alignment_size=0,L.tag_complete=!0,k.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),L.is_unformatted?k.add_raw_token(I):(L.tag_start_char==="<"&&(k.set_space_before_token(I.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&k.print_newline(!1)),k.print_token(I)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(k.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&k.set_wrap_point(),V},v.prototype._handle_inside_tag=function(k,I,L,V){var W=L.has_wrapped_attrs,H={text:I.text,type:I.type};if(k.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),L.is_unformatted)k.add_raw_token(I);else if(L.tag_start_char==="{"&&I.type===h.TEXT)k.print_preserved_newlines(I)?(I.newlines=0,k.add_raw_token(I)):k.print_token(I);else{if(I.type===h.ATTRIBUTE?(k.set_space_before_token(!0),L.attr_count+=1):(I.type===h.EQUALS||I.type===h.VALUE&&I.previous.type===h.EQUALS)&&k.set_space_before_token(!1),I.type===h.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(k.traverse_whitespace(I),W=W||I.newlines!==0),this._is_wrap_attributes_force)){var G=L.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&L.attr_count===1){var B=!0,P=0,z;do{if(z=V.peek(P),z.type===h.ATTRIBUTE){B=!1;break}P+=1}while(P<4&&z.type!==h.EOF&&z.type!==h.TAG_CLOSE);G=!B}G&&(k.print_newline(!1),W=!0)}k.print_token(I),W=W||k.previous_token_wrapped(),L.has_wrapped_attrs=W}return H},v.prototype._handle_text=function(k,I,L){var V={text:I.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(k,I,L):L.is_unformatted||L.is_content_unformatted?k.add_raw_token(I):(k.traverse_whitespace(I),k.print_token(I)),V},v.prototype._print_custom_beatifier_text=function(k,I,L){var V=this;if(I.text!==""){var W=I.text,H,G=1,B="",P="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?H=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?H=this._css_beautify:L.custom_beautifier_name==="html"&&(H=function(Ae,pe){var Oe=new v(Ae,pe,V._js_beautify,V._css_beautify);return Oe.beautify()}),this._options.indent_scripts==="keep"?G=0:this._options.indent_scripts==="separate"&&(G=-k.indent_level);var z=k.get_full_indent(G);if(W=W.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&W[0]==="<"&&W.match(/^(<!--|<!\[CDATA\[)/)){var J=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(W);if(!J){k.add_raw_token(I);return}B=z+J[1]+`
`,W=J[4],J[5]&&(P=z+J[5]),W=W.replace(/\n[ \t]*$/,""),(J[2]||J[3].indexOf(`
`)!==-1)&&(J=J[3].match(/[ \t]+$/),J&&(I.whitespace_before=J[0]))}if(W)if(H){var ue=function(){this.eol=`
`};ue.prototype=this._options.raw_options;var de=new ue;W=H(z+W,de)}else{var Se=I.whitespace_before;Se&&(W=W.replace(new RegExp(`
(`+Se+")?","g"),`
`)),W=z+W.replace(/\n/g,`
`+z)}B&&(W?W=B+W+`
`+P:W=B+P),k.print_newline(!1),W&&(I.text=W,I.whitespace_before="",I.newlines=0,k.add_raw_token(I),k.print_newline(!0))}},v.prototype._handle_tag_open=function(k,I,L,V){var W=this._get_tag_open_token(I);return(L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&I.type===h.TAG_OPEN&&I.text.indexOf("</")===0?(k.add_raw_token(I),W.start_tag_token=this._tag_stack.try_pop(W.tag_name)):(k.traverse_whitespace(I),this._set_tag_position(k,I,W,L,V),W.is_inline_element||k.set_wrap_point(),k.print_token(I)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(W.alignment_size=I.text.length+1),!W.tag_complete&&!W.is_unformatted&&(k.alignment_size=W.alignment_size),W};var _=function(k,I){if(this.parent=k||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="",!I)this.tag_complete=!0;else{var L;this.tag_start_char=I.text[0],this.text=I.text,this.tag_start_char==="<"?(L=I.text.match(/^<([^\s>]*)/),this.tag_check=L?L[1]:""):(L=I.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",(I.text.startsWith("{{#>")||I.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&I.next!==null?this.tag_check=I.next.text.split(" ")[0]:this.tag_check=I.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),I.type===h.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||I.closed&&I.closed.text==="/>";var V=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(V=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(V)))}};v.prototype._get_tag_open_token=function(k){var I=new _(this._tag_stack.get_parser_token(),k);return I.alignment_size=this._options.wrap_attributes_indent_size,I.is_end_tag=I.is_end_tag||f(I.tag_check,this._options.void_elements),I.is_empty_element=I.tag_complete||I.is_start_tag&&I.is_end_tag,I.is_unformatted=!I.tag_complete&&f(I.tag_check,this._options.unformatted),I.is_content_unformatted=!I.is_empty_element&&f(I.tag_check,this._options.content_unformatted),I.is_inline_element=f(I.tag_name,this._options.inline)||I.tag_name.includes("-")||I.tag_start_char==="{",I},v.prototype._set_tag_position=function(k,I,L,V,W){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||k.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=x(L.tag_check,I)))),f(L.tag_check,this._options.extra_liners)&&(k.print_newline(!1),k._output.just_added_blankline()||k.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 H=k.current_line_has_match(/{{#if/);H||k.print_newline(!1)}L.tag_name==="!--"&&W.type===h.TAG_CLOSE&&V.is_end_tag&&L.text.indexOf(`
`)===-1||(L.is_inline_element||L.is_unformatted||k.print_newline(!1),this._calcluate_parent_multiline(k,L))}else if(L.is_end_tag){var G=!1;G=L.start_tag_token&&L.start_tag_token.multiline_content,G=G||!L.is_inline_element&&!(V.is_inline_element||V.is_unformatted)&&!(W.type===h.TAG_CLOSE&&L.start_tag_token===V)&&W.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(G=!1),G&&k.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)&&(W.type!=="TK_CONTENT"||L.is_content_unformatted)&&k.print_newline(!1),this._calcluate_parent_multiline(k,L)},v.prototype._calcluate_parent_multiline=function(k,I){I.parent&&k._output.just_added_newline()&&!((I.is_inline_element||I.is_unformatted)&&I.parent.is_inline_element)&&(I.parent.multiline_content=!0)};var E=["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"],w=["a","audio","del","ins","map","noscript","video"];v.prototype._do_optional_end_element=function(k){var I=null;if(k.is_empty_element||!k.is_start_tag||!k.parent)return;if(k.tag_name==="body")I=I||this._tag_stack.try_pop("head");else if(k.tag_name==="li")I=I||this._tag_stack.try_pop("li",["ol","ul"]);else if(k.tag_name==="dd"||k.tag_name==="dt")I=I||this._tag_stack.try_pop("dt",["dl"]),I=I||this._tag_stack.try_pop("dd",["dl"]);else if(k.parent.tag_name==="p"&&E.indexOf(k.tag_name)!==-1){var L=k.parent.parent;(!L||w.indexOf(L.tag_name)===-1)&&(I=I||this._tag_stack.try_pop("p"))}else k.tag_name==="rp"||k.tag_name==="rt"?(I=I||this._tag_stack.try_pop("rt",["ruby","rtc"]),I=I||this._tag_stack.try_pop("rp",["ruby","rtc"])):k.tag_name==="optgroup"?I=I||this._tag_stack.try_pop("optgroup",["select"]):k.tag_name==="option"?I=I||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):k.tag_name==="colgroup"?I=I||this._tag_stack.try_pop("caption",["table"]):k.tag_name==="thead"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"])):k.tag_name==="tbody"||k.tag_name==="tfoot"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("thead",["table"]),I=I||this._tag_stack.try_pop("tbody",["table"])):k.tag_name==="tr"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(k.tag_name==="th"||k.tag_name==="td")&&(I=I||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),I=I||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return k.parent=this._tag_stack.get_parser_token(),I},n.exports.Beautifier=v},function(n,c,r){var a=r(6).Options;function o(u){a.call(this,u,"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"])}o.prototype=new a,n.exports.Options=o},function(n,c,r){var a=r(9).Tokenizer,o=r(9).TOKEN,u=r(13).Directives,h=r(14).TemplatablePattern,s=r(12).Pattern,l={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:o.START,RAW:o.RAW,EOF:o.EOF},t=new u(/<\!--/,/-->/),S=function(x,f){a.call(this,x,f),this._current_tag_name="";var R=new h(this._input).read_options(this._options),C=new s(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(/<!--/).until_after(/-->/),cdata:C.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:C.starting_with(/<!\[/).until_after(/]>/),processing:C.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 v=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(v).until_after(v)}};S.prototype=new a,S.prototype._is_comment=function(x){return!1},S.prototype._is_opening=function(x){return x.type===l.TAG_OPEN},S.prototype._is_closing=function(x,f){return x.type===l.TAG_CLOSE&&f&&((x.text===">"||x.text==="/>")&&f.text[0]==="<"||x.text==="}}"&&f.text[0]==="{"&&f.text[1]==="{")},S.prototype._reset=function(){this._current_tag_name=""},S.prototype._get_next_token=function(x,f){var R=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(l.EOF,""):(R=R||this._read_open_handlebars(C,f),R=R||this._read_attribute(C,x,f),R=R||this._read_close(C,f),R=R||this._read_raw_content(C,x,f),R=R||this._read_content_word(C),R=R||this._read_comment_or_cdata(C),R=R||this._read_processing(C),R=R||this._read_open(C,f),R=R||this._create_token(l.UNKNOWN,this._input.next()),R)},S.prototype._read_comment_or_cdata=function(x){var f=null,R=null,C=null;if(x==="<"){var v=this._input.peek(1);v==="!"&&(R=this.__patterns.comment.read(),R?(C=t.get_directives(R),C&&C.ignore==="start"&&(R+=t.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(f=this._create_token(l.COMMENT,R),f.directives=C)}return f},S.prototype._read_processing=function(x){var f=null,R=null,C=null;if(x==="<"){var v=this._input.peek(1);(v==="!"||v==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(f=this._create_token(l.COMMENT,R),f.directives=C)}return f},S.prototype._read_open=function(x,f){var R=null,C=null;return f||x==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),C=this._create_token(l.TAG_OPEN,R)),C},S.prototype._read_open_handlebars=function(x,f){var R=null,C=null;return f||this._options.indent_handlebars&&x==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),C=this._create_token(l.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),C=this._create_token(l.TAG_OPEN,R))),C},S.prototype._read_close=function(x,f){var R=null,C=null;return f&&(f.text[0]==="<"&&(x===">"||x==="/"&&this._input.peek(1)===">")?(R=this._input.next(),x==="/"&&(R+=this._input.next()),C=this._create_token(l.TAG_CLOSE,R)):f.text[0]==="{"&&x==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(l.TAG_CLOSE,"}}"))),C},S.prototype._read_attribute=function(x,f,R){var C=null,v="";if(R&&R.text[0]==="<")if(x==="=")C=this._create_token(l.EQUALS,this._input.next());else if(x==='"'||x==="'"){var _=this._input.next();x==='"'?_+=this.__patterns.double_quote.read():_+=this.__patterns.single_quote.read(),C=this._create_token(l.VALUE,_)}else v=this.__patterns.attribute.read(),v&&(f.type===l.EQUALS?C=this._create_token(l.VALUE,v):C=this._create_token(l.ATTRIBUTE,v));return C},S.prototype._is_content_unformatted=function(x){return this._options.void_elements.indexOf(x)===-1&&(this._options.content_unformatted.indexOf(x)!==-1||this._options.unformatted.indexOf(x)!==-1)},S.prototype._read_raw_content=function(x,f,R){var C="";if(R&&R.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(f.type===l.TAG_CLOSE&&f.opened.text[0]==="<"&&f.text[0]!=="/"){var v=f.opened.text.substr(1).toLowerCase();if(v==="script"||v==="style"){var _=this._read_comment_or_cdata(x);if(_)return _.type=l.TEXT,_;C=this._input.readUntil(new RegExp("</"+v+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(v)&&(C=this._input.readUntil(new RegExp("</"+v+"[\\n\\r\\t ]*?>","ig")))}return C?this._create_token(l.TEXT,C):null},S.prototype._read_content_word=function(x){var f="";if(this._options.unformatted_content_delimiter&&(x===this._options.unformatted_content_delimiter[0]&&(f=this.__patterns.unformatted_content_delimiter.read())),f||(f=this.__patterns.word.read()),f)return this._create_token(l.TEXT,f)},n.exports.Tokenizer=S,n.exports.TOKEN=l}],b={};function p(n){var c=b[n];if(c!==void 0)return c.exports;var r=b[n]={exports:{}};return T[n](r,r.exports,p),r.exports}var d=p(18);O=d})();var M=O;if(!0)!(N=[j,j("6UM0"),j("TXwP")],g=function(T){var b=j("6UM0"),p=j("TXwP");return{html_beautify:function(d,n){return M(d,n,b.js_beautify,p.css_beautify)}}}.apply(q,N),g!==void 0&&(F.exports=g));else var m,y})()},qBft:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(g,O){var M=g.sigBytes,m=O*4,y=m-M%m,T=M+y-1;g.clamp(),g.words[T>>>2]|=y<<24-T%4*8,g.sigBytes+=y},unpad:function(g){var O=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=O}},N.pad.Ansix923})},qHvr:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("5NDa"),M=j("5rEg"),m=j("miYZ"),y=j("tsqr"),T=j("tJVT"),b=j("q1tI"),p=j.n(b),d=j("4i/N");function n(c){var r=c.isAddmodle,a=c.setIsAdd,o=c.createTeam,u=Object(b.useState)(""),h=Object(T.a)(u,2),s=h[0],l=h[1];return p.a.createElement(g.a,{centered:!0,title:p.a.createElement("div",{style:{alignItems:"center",display:"flex"}},p.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),p.a.createElement(d.a,{onClick:function(){return a(!1)},style:{cursor:"porint"}})),visible:r,closable:!1,destroyOnClose:!0,onOk:function(){if(!s){y.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}o(s)},onCancel:function(){return a(!1)}},p.a.createElement("div",null,p.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",p.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},p.a.createElement(M.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:s,maxLength:60,addonAfter:String(s&&s.length||0)+"/60",onChange:function(S){return l(S.target.value)}}))))}q.a=n},qM6L:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.enc,y=m.Utf16=m.Utf16BE={stringify:function(b){for(var p=b.words,d=b.sigBytes,n=[],c=0;c<d;c+=2){var r=p[c>>>2]>>>16-c%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(b){for(var p=b.length,d=[],n=0;n<p;n++)d[n>>>1]|=b.charCodeAt(n)<<16-n%2*16;return M.create(d,p*2)}};m.Utf16LE={stringify:function(b){for(var p=b.words,d=b.sigBytes,n=[],c=0;c<d;c+=2){var r=T(p[c>>>2]>>>16-c%4*8&65535);n.push(String.fromCharCode(r))}return n.join("")},parse:function(b){for(var p=b.length,d=[],n=0;n<p;n++)d[n>>>1]|=T(b.charCodeAt(n)<<16-n%2*16);return M.create(d,p*2)}};function T(b){return b<<8&4278255360|b>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return N.mode.CTRGladman=function(){var g=N.lib.BlockCipherMode.extend();function O(y){if((y>>24&255)===255){var T=y>>16&255,b=y>>8&255,p=y&255;T===255?(T=0,b===255?(b=0,p===255?p=0:++p):++b):++T,y=0,y+=T<<16,y+=b<<8,y+=p}else y+=1<<24;return y}function M(y){return(y[0]=O(y[0]))===0&&(y[1]=O(y[1])),y}var m=g.Encryptor=g.extend({processBlock:function(y,T){var b=this._cipher,p=b.blockSize,d=this._iv,n=this._counter;d&&(n=this._counter=d.slice(0),this._iv=void 0),M(n);var c=n.slice(0);b.encryptBlock(c,0);for(var r=0;r<p;r++)y[T+r]^=c[r]}});return g.Decryptor=m,g}(),N.mode.CTRGladman})},"rAM+":function(F,q,j){"use strict";j.d(q,"a",function(){return g});var N=j("Qw5x");function g(O,M){var m;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(m=Object(N.a)(O))||M&&O&&typeof O.length=="number"){m&&(O=m);var y=0,T=function(){};return{s:T,n:function(){return y>=O.length?{done:!0}:{done:!1,value:O[y++]}},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 b=!0,p=!1,d;return{s:function(){m=O[Symbol.iterator]()},n:function(){var c=m.next();return b=c.done,c},e:function(c){p=!0,d=c},f:function(){try{!b&&m.return!=null&&m.return()}finally{if(p)throw d}}}}},rUJ1:function(F,q){const j=/[&<>"']/,N=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m=C=>M[C];function y(C,v){if(v){if(j.test(C))return C.replace(N,m)}else if(g.test(C))return C.replace(O,m);return C}const T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(C){return C.replace(T,(v,_)=>(_=_.toLowerCase(),_==="colon"?":":_.charAt(0)==="#"?_.charAt(1)==="x"?String.fromCharCode(parseInt(_.substring(2),16)):String.fromCharCode(+_.substring(1)):""))}const p=/(^|[^\[])\^/g;function d(C,v){C=C.source||C,v=v||"";const _={replace:(E,w)=>(w=w.source||w,w=w.replace(p,"$1"),C=C.replace(E,w),_),getRegex:()=>new RegExp(C,v)};return _}const n=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(C,v,_){if(C){let E;try{E=decodeURIComponent(b(_)).replace(n,"").toLowerCase()}catch(w){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}v&&!c.test(_)&&(_=s(v,_));try{_=encodeURI(_).replace(/%25/g,"%")}catch(E){return null}return _}const a={},o=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,h=/^([^:]+:\/*[^/]*)[\s\S]*$/;function s(C,v){a[" "+C]||(o.test(C)?a[" "+C]=C+"/":a[" "+C]=x(C,"/",!0)),C=a[" "+C];const _=C.indexOf(":")===-1;return v.substring(0,2)==="//"?_?v:C.replace(u,"$1")+v:v.charAt(0)==="/"?_?v:C.replace(h,"$1")+v:C+v}const l={exec:function(){}};function t(C){let v=1,_,E;for(;v<arguments.length;v++){_=arguments[v];for(E in _)Object.prototype.hasOwnProperty.call(_,E)&&(C[E]=_[E])}return C}function S(C,v){const _=C.replace(/\|/g,(k,I,L)=>{let V=!1,W=I;for(;--W>=0&&L[W]==="\\";)V=!V;return V?"|":" |"}),E=_.split(/ \|/);let w=0;if(E.length>v)E.splice(v);else for(;E.length<v;)E.push("");for(;w<E.length;w++)E[w]=E[w].trim().replace(/\\\|/g,"|");return E}function x(C,v,_){const E=C.length;if(E===0)return"";let w=0;for(;w<E;){const k=C.charAt(E-w-1);if(k===v&&!_)w++;else if(k!==v&&_)w++;else break}return C.substr(0,E-w)}function f(C,v){if(C.indexOf(v[1])===-1)return-1;const _=C.length;let E=0,w=0;for(;w<_;w++)if(C[w]==="\\")w++;else if(C[w]===v[0])E++;else if(C[w]===v[1]&&(E--,E<0))return w;return-1}function R(C){C&&C.sanitize&&!C.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")}F.exports={escape:y,unescape:b,edit:d,cleanUrl:r,resolveUrl:s,noopTest:l,merge:t,splitCells:S,rtrim:x,findClosingBracket:f,checkSanitizeDeprecation:R}},sR1s:function(F,q,j){"use strict";j.d(q,"b",function(){return M}),j.d(q,"a",function(){return m}),j.d(q,"c",function(){return y}),j.d(q,"d",function(){return T});var N=j("U8pU"),g="RC_TABLE_KEY";function O(b){return b==null?[]:Array.isArray(b)?b:[b]}function M(b,p){if(!p&&typeof p!="number")return b;for(var d=O(p),n=b,c=0;c<d.length;c+=1){if(!n)return null;var r=d[c];n=n[r]}return n}function m(b){var p=[],d={};return b.forEach(function(n){for(var c=n||{},r=c.key,a=c.dataIndex,o=r||O(a).join("-")||g;d[o];)o="".concat(o,"_next");d[o]=!0,p.push(o)}),p}function y(){var b={};function p(r,a){a&&Object.keys(a).forEach(function(o){var u=a[o];u&&Object(N.a)(u)==="object"?(r[o]=r[o]||{},p(r[o],u)):r[o]=u})}for(var d=arguments.length,n=new Array(d),c=0;c<d;c++)n[c]=arguments[c];return n.forEach(function(r){p(b,r)}),b}function T(b){return b!=null}},sboe:function(F,q,j){"use strict";j.d(q,"a",function(){return O});var N=j("q1tI"),g=j.n(N),O=N.createContext(null)},t23M:function(F,q,j){"use strict";var N=j("VTBJ"),g=j("1OyB"),O=j("vuIU"),M=j("Ji7U"),m=j("LK+K"),y=j("q1tI"),T=j.n(y),b=j("m+aA"),p=j("Zm9Q"),d=j("Kwbf"),n=j("c+Xe"),c=j("bdgK"),r="rc-observer-key",a=function(o){Object(M.a)(h,o);var u=Object(m.a)(h);function h(){var s;return Object(g.a)(this,h),s=u.apply(this,arguments),s.resizeObserver=null,s.childNode=null,s.currentElement=null,s.state={width:0,height:0,offsetHeight:0,offsetWidth:0},s.onResize=function(l){var t=s.props.onResize,S=l[0].target,x=S.getBoundingClientRect(),f=x.width,R=x.height,C=S.offsetWidth,v=S.offsetHeight,_=Math.floor(f),E=Math.floor(R);if(s.state.width!==_||s.state.height!==E||s.state.offsetWidth!==C||s.state.offsetHeight!==v){var w={width:_,height:E,offsetWidth:C,offsetHeight:v};s.setState(w),t&&Promise.resolve().then(function(){t(Object(N.a)(Object(N.a)({},w),{},{offsetWidth:C,offsetHeight:v}))})}},s.setChildNode=function(l){s.childNode=l},s}return Object(O.a)(h,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var t=Object(b.a)(this.childNode||this),S=t!==this.currentElement;S&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,t=Object(p.a)(l);if(t.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=t[0];if(y.isValidElement(S)&&Object(n.c)(S)){var x=S.ref;t[0]=y.cloneElement(S,{ref:Object(n.a)(x,this.setChildNode)})}return t.length===1?t[0]:t.map(function(f,R){return!y.isValidElement(f)||"key"in f&&f.key!==null?f:y.cloneElement(f,{key:"".concat(r,"-").concat(R)})})}}]),h}(y.Component);a.displayName="ResizeObserver",q.a=a},uGsb:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("MlIO"),j("1uat"))})(this,function(N){return function(){var g=N,O=g.x64,M=O.Word,m=O.WordArray,y=g.algo,T=y.SHA512,b=y.SHA384=T.extend({_doReset:function(){this._hash=new m.init([new M.init(3418070365,3238371032),new M.init(1654270250,914150663),new M.init(2438529370,812702999),new M.init(355462360,4144912697),new M.init(1731405415,4290775857),new M.init(2394180231,1750603025),new M.init(3675008525,1694076839),new M.init(1203062813,3204075428)])},_doFinalize:function(){var p=T._doFinalize.call(this);return p.sigBytes-=16,p}});g.SHA384=T._createHelper(b),g.HmacSHA384=T._createHmacHelper(b)}(),N.SHA384})},uGxW:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uK0f:function(F,q,j){(function(N,g){F.exports=g()})(this,function(){"use strict";function N(g,O,M){M=M||{},M.childrenKeyName=M.childrenKeyName||"children";var m=g||[],y=[],T=0;do{var b=m.filter(function(p){return O(p,T)})[0];if(!b)break;y.push(b),m=b[M.childrenKeyName]||[],T+=1}while(m.length>0);return y}return N})},ulZh:function(F,q,j){typeof window!="undefined"&&function(g,O){F.exports=O()}(this,function(){return function(N){var g={};function O(M){if(g[M])return g[M].exports;var m=g[M]={i:M,l:!1,exports:{}};return N[M].call(m.exports,m,m.exports,O),m.l=!0,m.exports}return O.m=N,O.c=g,O.d=function(M,m,y){O.o(M,m)||Object.defineProperty(M,m,{enumerable:!0,get:y})},O.r=function(M){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},O.t=function(M,m){if(m&1&&(M=O(M)),m&8)return M;if(m&4&&typeof M=="object"&&M&&M.__esModule)return M;var y=Object.create(null);if(O.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:M}),m&2&&typeof M!="string")for(var T in M)O.d(y,T,function(b){return M[b]}.bind(null,T));return y},O.n=function(M){var m=M&&M.__esModule?function(){return M.default}:function(){return M};return O.d(m,"a",m),m},O.o=function(M,m){return Object.prototype.hasOwnProperty.call(M,m)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,g,O){"use strict";var M=Object.prototype.hasOwnProperty,m="~";function y(){}Object.create&&(y.prototype=Object.create(null),new y().__proto__||(m=!1));function T(n,c,r){this.fn=n,this.context=c,this.once=r||!1}function b(n,c,r,a,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var u=new T(r,a||n,o),h=m?m+c:c;return n._events[h]?n._events[h].fn?n._events[h]=[n._events[h],u]:n._events[h].push(u):(n._events[h]=u,n._eventsCount++),n}function p(n,c){--n._eventsCount===0?n._events=new y:delete n._events[c]}function d(){this._events=new y,this._eventsCount=0}d.prototype.eventNames=function(){var c=[],r,a;if(this._eventsCount===0)return c;for(a in r=this._events)M.call(r,a)&&c.push(m?a.slice(1):a);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(r)):c},d.prototype.listeners=function(c){var r=m?m+c:c,a=this._events[r];if(!a)return[];if(a.fn)return[a.fn];for(var o=0,u=a.length,h=new Array(u);o<u;o++)h[o]=a[o].fn;return h},d.prototype.listenerCount=function(c){var r=m?m+c:c,a=this._events[r];return a?a.fn?1:a.length:0},d.prototype.emit=function(c,r,a,o,u,h){var s=m?m+c:c;if(!this._events[s])return!1;var l=this._events[s],t=arguments.length,S,x;if(l.fn){l.once&&this.removeListener(c,l.fn,void 0,!0);switch(t){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,r),!0;case 3:return l.fn.call(l.context,r,a),!0;case 4:return l.fn.call(l.context,r,a,o),!0;case 5:return l.fn.call(l.context,r,a,o,u),!0;case 6:return l.fn.call(l.context,r,a,o,u,h),!0}for(x=1,S=new Array(t-1);x<t;x++)S[x-1]=arguments[x];l.fn.apply(l.context,S)}else{var f=l.length,R;for(x=0;x<f;x++){l[x].once&&this.removeListener(c,l[x].fn,void 0,!0);switch(t){case 1:l[x].fn.call(l[x].context);break;case 2:l[x].fn.call(l[x].context,r);break;case 3:l[x].fn.call(l[x].context,r,a);break;case 4:l[x].fn.call(l[x].context,r,a,o);break;default:if(!S)for(R=1,S=new Array(t-1);R<t;R++)S[R-1]=arguments[R];l[x].fn.apply(l[x].context,S)}}}return!0},d.prototype.on=function(c,r,a){return b(this,c,r,a,!1)},d.prototype.once=function(c,r,a){return b(this,c,r,a,!0)},d.prototype.removeListener=function(c,r,a,o){var u=m?m+c:c;if(!this._events[u])return this;if(!r)return p(this,u),this;var h=this._events[u];if(h.fn)h.fn===r&&(!o||h.once)&&(!a||h.context===a)&&p(this,u);else{for(var s=0,l=[],t=h.length;s<t;s++)(h[s].fn!==r||o&&!h[s].once||a&&h[s].context!==a)&&l.push(h[s]);l.length?this._events[u]=l.length===1?l[0]:l:p(this,u)}return this},d.prototype.removeAllListeners=function(c){var r;return c?(r=m?m+c:c,this._events[r]&&p(this,r)):(this._events=new y,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=m,d.EventEmitter=d,N.exports=d},"./node_modules/url-toolkit/src/url-toolkit.js":function(N,g,O){(function(M){var m=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,y=/^([^\/?#]*)([^]*)$/,T=/(?:\/|^)\.(?=\/)/g,b=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,p={buildAbsoluteURL:function(d,n,c){if(c=c||{},d=d.trim(),n=n.trim(),!n){if(!c.alwaysNormalize)return d;var r=p.parseURL(d);if(!r)throw new Error("Error trying to parse base URL.");return r.path=p.normalizePath(r.path),p.buildURLFromParts(r)}var a=p.parseURL(n);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return c.alwaysNormalize?(a.path=p.normalizePath(a.path),p.buildURLFromParts(a)):n;var o=p.parseURL(d);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var u=y.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var h={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(h.netLoc=o.netLoc,a.path[0]!=="/"))if(!a.path)h.path=o.path,a.params||(h.params=o.params,a.query||(h.query=o.query));else{var s=o.path,l=s.substring(0,s.lastIndexOf("/")+1)+a.path;h.path=p.normalizePath(l)}return h.path===null&&(h.path=c.alwaysNormalize?p.normalizePath(a.path):a.path),p.buildURLFromParts(h)},parseURL:function(d){var n=m.exec(d);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(T,"");d.length!==(d=d.replace(b,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};N.exports=p})(this)},"./node_modules/webworkify-webpack/index.js":function(N,g,O){function M(c){var r={};function a(u){if(r[u])return r[u].exports;var h=r[u]={i:u,l:!1,exports:{}};return c[u].call(h.exports,h,h.exports,a),h.l=!0,h.exports}a.m=c,a.c=r,a.i=function(u){return u},a.d=function(u,h,s){a.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:s})},a.r=function(u){Object.defineProperty(u,"__esModule",{value:!0})},a.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return a.d(h,"a",h),h},a.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},a.p="/",a.oe=function(u){throw console.error(u),u};var o=a(a.s=ENTRY_MODULE);return o.default||o}var m="[\\.|\\-|\\+|\\w|/|@]+",y="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+m+").*?\\)";function T(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function b(c){return!isNaN(1*c)}function p(c,r,a){var o={};o[a]=[];var u=r.toString(),h=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!h)return o;for(var s=h[1],l=new RegExp("(\\\\n|\\W)"+T(s)+y,"g"),t;t=l.exec(u);){if(t[3]==="dll-reference")continue;o[a].push(t[3])}for(l=new RegExp("\\("+T(s)+'\\("(dll-reference\\s('+m+'))"\\)\\)'+y,"g");t=l.exec(u);)c[t[2]]||(o[a].push(t[1]),c[t[2]]=O(t[1]).m),o[t[2]]=o[t[2]]||[],o[t[2]].push(t[4]);for(var S=Object.keys(o),x=0;x<S.length;x++)for(var f=0;f<o[S[x]].length;f++)b(o[S[x]][f])&&(o[S[x]][f]=1*o[S[x]][f]);return o}function d(c){var r=Object.keys(c);return r.reduce(function(a,o){return a||c[o].length>0},!1)}function n(c,r){for(var a={main:[r]},o={main:[]},u={main:{}};d(a);)for(var h=Object.keys(a),s=0;s<h.length;s++){var l=h[s],t=a[l],S=t.pop();if(u[l]=u[l]||{},u[l][S]||!c[l][S])continue;u[l][S]=!0,o[l]=o[l]||[],o[l].push(S);for(var x=p(c,c[l][S],l),f=Object.keys(x),R=0;R<f.length;R++)a[f[R]]=a[f[R]]||[],a[f[R]]=a[f[R]].concat(x[f[R]])}return o}N.exports=function(c,r){r=r||{};var a={main:O.m},o=r.all?{main:Object.keys(a.main)}:n(a,c),u="";Object.keys(o).filter(function(S){return S!=="main"}).forEach(function(S){for(var x=0;o[S][x];)x++;o[S].push(x),a[S][x]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",u=u+"var "+S+" = ("+M.toString().replace("ENTRY_MODULE",JSON.stringify(x))+")({"+o[S].map(function(f){return""+JSON.stringify(f)+": "+a[S][f].toString()}).join(",")+`});
`}),u=u+"new (("+M.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+o.main.map(function(S){return""+JSON.stringify(S)+": "+a.main[S].toString()}).join(",")+"}))(self);";var h=new window.Blob([u],{type:"text/javascript"});if(r.bare)return h;var s=window.URL||window.webkitURL||window.mozURL||window.msURL,l=s.createObjectURL(h),t=new window.Worker(l);return t.objectURL=l,t}},"./src/config.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"hlsDefaultConfig",function(){return R}),O.d(g,"mergeConfig",function(){return v}),O.d(g,"enableStreamingMode",function(){return _});var M=O("./src/controller/abr-controller.ts"),m=O("./src/controller/audio-stream-controller.ts"),y=O("./src/controller/audio-track-controller.ts"),T=O("./src/controller/subtitle-stream-controller.ts"),b=O("./src/controller/subtitle-track-controller.ts"),p=O("./src/controller/buffer-controller.ts"),d=O("./src/controller/timeline-controller.ts"),n=O("./src/controller/cap-level-controller.ts"),c=O("./src/controller/fps-controller.ts"),r=O("./src/controller/eme-controller.ts"),a=O("./src/controller/cmcd-controller.ts"),o=O("./src/utils/xhr-loader.ts"),u=O("./src/utils/fetch-loader.ts"),h=O("./src/utils/cues.ts"),s=O("./src/utils/mediakeys-helper.ts"),l=O("./src/utils/logger.ts");function t(){return t=Object.assign||function(E){for(var w=1;w<arguments.length;w++){var k=arguments[w];for(var I in k)Object.prototype.hasOwnProperty.call(k,I)&&(E[I]=k[I])}return E},t.apply(this,arguments)}function S(E,w){var k=Object.keys(E);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(E);w&&(I=I.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),k.push.apply(k,I)}return k}function x(E){for(var w=1;w<arguments.length;w++){var k=arguments[w]!=null?arguments[w]:{};w%2?S(Object(k),!0).forEach(function(I){f(E,I,k[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(k)):S(Object(k)).forEach(function(I){Object.defineProperty(E,I,Object.getOwnPropertyDescriptor(k,I))})}return E}function f(E,w,k){return w in E?Object.defineProperty(E,w,{value:k,enumerable:!0,configurable:!0,writable:!0}):E[w]=k,E}var R=x(x({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:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:M.default,bufferController:p.default,capLevelController:n.default,fpsController:c.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:s.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:T.SubtitleStreamController,subtitleTrackController:b.default,timelineController:d.TimelineController,audioStreamController:m.default,audioTrackController:y.default,emeController:r.default,cmcdController:a.default});function C(){return{cueHandler:h.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 v(E,w){if((w.liveSyncDurationCount||w.liveMaxLatencyDurationCount)&&(w.liveSyncDuration||w.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(w.liveMaxLatencyDurationCount!==void 0&&(w.liveSyncDurationCount===void 0||w.liveMaxLatencyDurationCount<=w.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(w.liveMaxLatencyDuration!==void 0&&(w.liveSyncDuration===void 0||w.liveMaxLatencyDuration<=w.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},E,w)}function _(E){var w=E.loader;if(w!==u.default&&w!==o.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),E.progressive=!1;else{var k=Object(u.fetchSupported)();k&&(E.loader=u.default,E.progressive=!0,E.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/polyfills/number.ts"),m=O("./src/utils/ewma-bandwidth-estimator.ts"),y=O("./src/events.ts"),T=O("./src/utils/buffer-helper.ts"),b=O("./src/errors.ts"),p=O("./src/types/loader.ts"),d=O("./src/utils/logger.ts");function n(a,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}function c(a,o,u){return o&&n(a.prototype,o),u&&n(a,u),a}var r=function(){function a(u){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=u;var h=u.config;this.bwEstimator=new m.default(h.abrEwmaSlowVoD,h.abrEwmaFastVoD,h.abrEwmaDefaultEstimate),this.registerListeners()}var o=a.prototype;return o.registerListeners=function(){var h=this.hls;h.on(y.Events.FRAG_LOADING,this.onFragLoading,this),h.on(y.Events.FRAG_LOADED,this.onFragLoaded,this),h.on(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),h.on(y.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var h=this.hls;h.off(y.Events.FRAG_LOADING,this.onFragLoading,this),h.off(y.Events.FRAG_LOADED,this.onFragLoaded,this),h.off(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),h.off(y.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(h,s){var l=s.frag;if(l.type===p.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=l,this.partCurrent=(t=s.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(h,s){var l=this.hls.config;s.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var h=this.fragCurrent,s=this.partCurrent,l=this.hls,t=l.autoLevelEnabled,S=l.config,x=l.media;if(!h||!x)return;var f=s?s.stats:h.stats,R=s?s.duration:h.duration;if(f.aborted){d.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||x.paused||!x.playbackRate||!x.readyState)return;var C=performance.now()-f.loading.start,v=Math.abs(x.playbackRate);if(C<=500*R/v)return;var _=l.levels,E=l.minAutoLevel,w=_[h.level],k=f.total||Math.max(f.loaded,Math.round(R*w.maxBitrate/8)),I=Math.max(1,f.bwEstimate?f.bwEstimate/8:f.loaded*1e3/C),L=(k-f.loaded)/I,V=x.currentTime,W=(T.BufferHelper.bufferInfo(x,V,S.maxBufferHole).end-V)/v;if(W>=2*R/v||L<=W)return;var H=Number.POSITIVE_INFINITY,G;for(G=h.level-1;G>E;G--){var B=_[G].maxBitrate;if(H=R*B/(8*.8*I),H<W)break}if(H>=L)return;var P=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+h.sn+(s?" part "+s.index:"")+" of level "+h.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+`
Current BW estimate: `+(Object(M.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+L.toFixed(3)+` s
Estimated load time for the next fragment: `+H.toFixed(3)+` s
Time to underbuffer: `+W.toFixed(3)+" s"),l.nextLoadLevel=G,this.bwEstimator.sample(C,f.loaded),this.clearTimer(),h.loader&&(this.fragCurrent=this.partCurrent=null,h.loader.abort()),l.trigger(y.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:h,part:s,stats:f})},o.onFragLoaded=function(h,s){var l=s.frag,t=s.part;if(l.type===p.PlaylistLevelType.MAIN&&Object(M.isFiniteNumber)(l.sn)){var S=t?t.stats:l.stats,x=t?t.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var f=this.hls.levels[l.level],R=(f.loaded?f.loaded.bytes:0)+S.loaded,C=(f.loaded?f.loaded.duration:0)+x;f.loaded={bytes:R,duration:C},f.realBitrate=Math.round(8*R/C)}if(l.bitrateTest){var v={stats:S,frag:l,part:t,id:l.type};this.onFragBuffered(y.Events.FRAG_BUFFERED,v),l.bitrateTest=!1}}},o.onFragBuffered=function(h,s){var l=s.frag,t=s.part,S=t?t.stats:l.stats;if(S.aborted)return;if(l.type!==p.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var x=S.parsing.end-S.loading.start;this.bwEstimator.sample(x,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=x/1e3:this.bitrateTestDelay=0},o.onError=function(h,s){switch(s.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var h=this.fragCurrent,s=this.partCurrent,l=this.hls,t=l.maxAutoLevel,S=l.config,x=l.minAutoLevel,f=l.media,R=s?s.duration:h?h.duration:0,C=f?f.currentTime:0,v=f&&f.playbackRate!==0?Math.abs(f.playbackRate):1,_=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,E=(T.BufferHelper.bufferInfo(f,C,S.maxBufferHole).end-C)/v,w=this.findBestLevel(_,x,t,E,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(w>=0)return w;d.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var k=R?Math.min(R,S.maxStarvationDelay):S.maxStarvationDelay,I=S.abrBandWidthFactor,L=S.abrBandWidthUpFactor;if(!E){var V=this.bitrateTestDelay;if(V){var W=R?Math.min(R,S.maxLoadingDelay):S.maxLoadingDelay;k=W-V,d.logger.trace("bitrate test took "+Math.round(1e3*V)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*k)+" ms"),I=L=1}}return w=this.findBestLevel(_,x,t,E+k,I,L),Math.max(w,0)},o.findBestLevel=function(h,s,l,t,S,x){for(var f,R=this.fragCurrent,C=this.partCurrent,v=this.lastLoadedFragLevel,_=this.hls.levels,E=_[v],w=!!(E!=null&&(f=E.details)!==null&&f!==void 0&&f.live),k=E==null?void 0:E.codecSet,I=C?C.duration:R?R.duration:0,L=l;L>=s;L--){var V=_[L];if(!V||k&&V.codecSet!==k)continue;var W=V.details,H=(C?W==null?void 0:W.partTarget:W==null?void 0:W.averagetargetduration)||I,G=void 0;L<=v?G=S*h:G=x*h;var B=_[L].maxBitrate,P=B*H/G;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+L+"/"+Math.round(G)+"/"+B+"/"+H+"/"+t+"/"+P),G>B&&(!P||w&&!this.bitrateTestDelay||P<t))return L}return-1},c(a,[{key:"nextAutoLevel",get:function(){var h=this._nextAutoLevel,s=this.bwEstimator;if(h!==-1&&(!s||!s.canEstimate()))return h;var l=this.getNextABRAutoLevel();return h!==-1&&(l=Math.min(h,l)),l},set:function(h){this._nextAutoLevel=h}}]),a}();g.default=r},"./src/controller/audio-stream-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/polyfills/number.ts"),m=O("./src/controller/base-stream-controller.ts"),y=O("./src/events.ts"),T=O("./src/utils/buffer-helper.ts"),b=O("./src/controller/fragment-tracker.ts"),p=O("./src/types/level.ts"),d=O("./src/types/loader.ts"),n=O("./src/loader/fragment.ts"),c=O("./src/demux/chunk-cache.ts"),r=O("./src/demux/transmuxer-interface.ts"),a=O("./src/types/transmuxer.ts"),o=O("./src/controller/fragment-finders.ts"),u=O("./src/utils/discontinuities.ts"),h=O("./src/errors.ts"),s=O("./src/utils/logger.ts");function l(){return l=Object.assign||function(R){for(var C=1;C<arguments.length;C++){var v=arguments[C];for(var _ in v)Object.prototype.hasOwnProperty.call(v,_)&&(R[_]=v[_])}return R},l.apply(this,arguments)}function t(R,C){R.prototype=Object.create(C.prototype),R.prototype.constructor=R,S(R,C)}function S(R,C){return S=Object.setPrototypeOf||function(_,E){return _.__proto__=E,_},S(R,C)}var x=100,f=function(R){t(C,R);function C(_,E){var w;return w=R.call(this,_,E,"[audio-stream-controller]")||this,w.videoBuffer=null,w.videoTrackCC=-1,w.waitingVideoCC=-1,w.audioSwitch=!1,w.trackId=-1,w.waitingData=null,w.mainDetails=null,w.bufferFlushed=!1,w._registerListeners(),w}var v=C.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var E=this.hls;E.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(y.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.on(y.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(y.Events.ERROR,this.onError,this),E.on(y.Events.BUFFER_RESET,this.onBufferReset,this),E.on(y.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(y.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.on(y.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v._unregisterListeners=function(){var E=this.hls;E.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(y.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.off(y.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(y.Events.ERROR,this.onError,this),E.off(y.Events.BUFFER_RESET,this.onBufferReset,this),E.off(y.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(y.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.off(y.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v.onInitPtsFound=function(E,w){var k=w.frag,I=w.id,L=w.initPTS;if(I==="main"){var V=k.cc;this.initPTS[k.cc]=L,this.log("InitPTS for cc: "+V+" found from main: "+L),this.videoTrackCC=V,this.state===m.State.WAITING_INIT_PTS&&this.tick()}},v.startLoad=function(E){if(!this.levels){this.startPosition=E,this.state=m.State.STOPPED;return}var w=this.lastCurrentTime;this.stopLoad(),this.setInterval(x),this.fragLoadError=0,w>0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),this.state=m.State.IDLE):(this.loadedmetadata=!1,this.state=m.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},v.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_TRACK:{var E,w=this.levels,k=this.trackId,I=w==null||((E=w[k])===null||E===void 0)?void 0:E.details;if(I){if(this.waitForCdnTuneIn(I))break;this.state=m.State.WAITING_INIT_PTS}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var L,V=performance.now(),W=this.retryDate;(!W||V>=W||(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 H=this.waitingData;if(H){var G=H.frag,B=H.part,P=H.cache,z=H.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.FRAG_LOADING;var J=P.flush(),ue={frag:G,part:B,payload:J,networkDetails:null};this._handleFragmentLoadProgress(ue),z&&R.prototype._handleFragmentLoadComplete.call(this,ue)}else if(this.videoTrackCC!==this.waitingVideoCC)s.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Se=T.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Ae=Object(o.fragmentWithinToleranceTest)(Se.end,this.config.maxFragLookUpTolerance,G);Ae<0&&(s.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+Se.end+" is needed"),this.clearWaitingFragment())}}else this.state=m.State.IDLE}}this.onTickEnd()},v.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.IDLE)},v.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var w=this.mediaBuffer?this.mediaBuffer:E,k=w.buffered;!this.loadedmetadata&&k.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},v.doTickIdle=function(){var E,w,k=this.hls,I=this.levels,L=this.media,V=this.trackId,W=k.config;if(!I||!I[V])return;if(!L&&(this.startFragRequested||!W.startFragPrefetch))return;var H=I[V],G=H.details;if(!G||G.live&&this.levelLastLoaded!==V||this.waitForCdnTuneIn(G)){this.state=m.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(B===null)return;var P=B.len,z=this.getMaxBufferLength(),J=this.audioSwitch;if(P>=z&&!J)return;if(!J&&this._streamEnded(B,G)){k.trigger(y.Events.BUFFER_EOS,{type:"audio"}),this.state=m.State.ENDED;return}var ue=G.fragments,de=ue[0].start,Se=B.end;if(J){var Ae=this.getLoadPosition();Se=Ae,G.PTSKnown&&Ae<de&&((B.end>de||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),L.currentTime=de+.05))}var pe=this.getNextFragment(Se,G);if(!pe){this.bufferFlushed=!0;return}((E=pe.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((w=pe.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(pe,G):this.loadFragment(pe,G,Se)},v.getMaxBufferLength=function(){var E=R.prototype.getMaxBufferLength.call(this),w=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return w===null?E:Math.max(E,w.len)},v.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},v.onAudioTracksUpdated=function(E,w){var k=w.audioTracks;this.resetTransmuxer(),this.levels=k.map(function(I){return new p.Level(I)})},v.onAudioTrackSwitching=function(E,w){var k=!!w.url;this.trackId=w.id;var I=this.fragCurrent;I!=null&&I.loader&&I.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),k?this.setInterval(x):this.resetTransmuxer(),k?(this.audioSwitch=!0,this.state=m.State.IDLE):this.state=m.State.STOPPED,this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},v.onLevelLoaded=function(E,w){this.mainDetails=w.details},v.onAudioTrackLoaded=function(E,w){var k,I=this.levels,L=w.details,V=w.id;if(!I){this.warn("Audio tracks were reset while loading level "+V);return}this.log("Track "+V+" loaded ["+L.startSN+","+L.endSN+"],duration:"+L.totalduration);var W=I[V],H=0;if(L.live||(k=W.details)!==null&&k!==void 0&&k.live){var G=this.mainDetails;if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed||!G)return;!W.details&&L.hasProgramDateTime&&G.hasProgramDateTime?(Object(u.alignMediaPlaylistByPDT)(L,G),H=L.fragments[0].start):H=this.alignPlaylists(L,W.details)}W.details=L,this.levelLastLoaded=V,!this.startFragRequested&&(this.mainDetails||!L.live)&&this.setStartPosition(W.details,H),this.state===m.State.WAITING_TRACK&&!this.waitForCdnTuneIn(L)&&(this.state=m.State.IDLE),this.tick()},v._handleFragmentLoadProgress=function(E){var w,k=E.frag,I=E.part,L=E.payload,V=this.config,W=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+k.sn+" of level "+k.level+" will not be buffered");return}var G=H[W];console.assert(G,"Audio track is defined on fragment load progress");var B=G.details;console.assert(B,"Audio track details are defined on fragment load progress");var P=V.defaultAudioCodec||G.audioCodec||"mp4a.40.2",z=this.transmuxer;z||(z=this.transmuxer=new r.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[k.cc],ue=(w=k.initSegment)===null||w===void 0?void 0:w.data;if(J!==void 0){var de=!1,Se=I?I.index:-1,Ae=Se!==-1,pe=new a.ChunkMetadata(k.level,k.sn,k.stats.chunkCount,L.byteLength,Se,Ae);z.push(L,ue,P,"",k,I,B.totalduration,de,pe,J)}else{s.logger.log("Unknown video PTS for cc "+k.cc+", waiting for video PTS before demuxing audio frag "+k.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+W);var Oe=this.waitingData=this.waitingData||{frag:k,part:I,cache:new c.default,complete:!1},ye=Oe.cache;ye.push(new Uint8Array(L)),this.waitingVideoCC=this.videoTrackCC,this.state=m.State.WAITING_INIT_PTS}},v._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,E)},v.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},v.onBufferCreated=function(E,w){var k=w.tracks.audio;k&&(this.mediaBuffer=k.buffer),w.tracks.video&&(this.videoBuffer=w.tracks.video.buffer)},v.onFragBuffered=function(E,w){var k=w.frag,I=w.part;if(k.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(k)){this.warn("Fragment "+k.sn+(I?" p: "+I.index:"")+" of level "+k.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}k.sn!=="initSegment"&&(this.fragPrevious=k,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(y.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(k,I)},v.onError=function(E,w){switch(w.details){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,w);break;case h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case h.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==m.State.ERROR&&this.state!==m.State.STOPPED&&(this.state=w.fatal?m.State.ERROR:m.State.IDLE,this.warn(w.details+" while loading frag, switching to "+this.state+" state"));break;case h.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="audio"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var k=!0,I=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);I&&I.len>.5&&(k=!this.reduceMaxBufferLength(I.len)),k&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},v.onBufferFlushed=function(E,w){var k=w.type;k===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},v._handleTransmuxComplete=function(E){var w,k="audio",I=this.hls,L=E.remuxResult,V=E.chunkMeta,W=this.getCurrentContext(V);if(!W){this.warn("The loading context changed while buffering fragment "+V.sn+" of level "+V.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(V.level);return}var H=W.frag,G=W.part,B=L.audio,P=L.text,z=L.id3,J=L.initSegment;if(this.fragContextChanged(H))return;if(this.state=m.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,H,V),I.trigger(y.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:k,tracks:J.tracks})),B){var ue=B.startPTS,de=B.endPTS,Se=B.startDTS,Ae=B.endDTS;G&&(G.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:de,startDTS:Se,endDTS:Ae}),H.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ue,de,Se,Ae),this.bufferFragmentData(B,H,G,V)}if(z!=null&&(w=z.samples)!==null&&w!==void 0&&w.length){var pe=l({frag:H,id:k},z);I.trigger(y.Events.FRAG_PARSING_METADATA,pe)}if(P){var Oe=l({frag:H,id:k},P);I.trigger(y.Events.FRAG_PARSING_USERDATA,Oe)}},v._bufferInitSegment=function(E,w,k){if(this.state!==m.State.PARSING)return;E.video&&delete E.video;var I=E.audio;if(!I)return;I.levelCodec=I.codec,I.id="audio",this.log("Init audio buffer, container:"+I.container+", codecs[parsed]=["+I.codec+"]"),this.hls.trigger(y.Events.BUFFER_CODECS,E);var L=I.initSegment;if(L!=null&&L.byteLength){var V={type:"audio",frag:w,part:null,chunkMeta:k,parent:w.type,data:L};this.hls.trigger(y.Events.BUFFER_APPENDING,V)}this.tick()},v.loadFragment=function(E,w,k){var I=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||I===b.FragmentState.NOT_LOADED||I===b.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):w.live&&!Object(M.isFiniteNumber)(this.initPTS[E.cc])?(this.log("Waiting for video PTS in continuity counter "+E.cc+" of live stream before loading audio fragment "+E.sn+" of level "+this.trackId),this.state=m.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,E,w,k)))},v.completeAudioSwitch=function(){var E=this.hls,w=this.media,k=this.trackId;w&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(y.Events.AUDIO_TRACK_SWITCHED,{id:k})},C}(m.default);g.default=f},"./src/controller/audio-track-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/controller/base-playlist-controller.ts"),T=O("./src/types/loader.ts");function b(r,a){for(var o=0;o<a.length;o++){var u=a[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}function p(r,a,o){return a&&b(r.prototype,a),o&&b(r,o),r}function d(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,n(r,a)}function n(r,a){return n=Object.setPrototypeOf||function(u,h){return u.__proto__=h,u},n(r,a)}var c=function(r){d(a,r);function a(u){var h;return h=r.call(this,u,"[audio-track-controller]")||this,h.tracks=[],h.groupId=null,h.tracksInGroup=[],h.trackId=-1,h.trackName="",h.selectDefaultTrack=!0,h.registerListeners(),h}var o=a.prototype;return o.registerListeners=function(){var h=this.hls;h.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),h.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),h.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),h.on(M.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var h=this.hls;h.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),h.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),h.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),h.off(M.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,r.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(h,s){this.tracks=s.audioTracks||[]},o.onAudioTrackLoaded=function(h,s){var l=s.id,t=s.details,S=this.tracksInGroup[l];if(!S){this.warn("Invalid audio track id "+l);return}var x=S.details;S.details=s.details,this.log("audioTrack "+l+" loaded ["+t.startSN+"-"+t.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,s,x))},o.onLevelLoading=function(h,s){this.switchLevel(s.level)},o.onLevelSwitching=function(h,s){this.switchLevel(s.level)},o.switchLevel=function(h){var s=this.hls.levels[h];if(!(s!=null&&s.audioGroupIds))return;var l=s.audioGroupIds[s.urlId];if(this.groupId!==l){this.groupId=l;var t=this.tracks.filter(function(x){return!l||x.groupId===l});this.selectDefaultTrack&&!t.some(function(x){return x.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var S={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(M.Events.AUDIO_TRACKS_UPDATED,S),this.selectInitialTrack()}},o.onError=function(h,s){if(r.prototype.onError.call(this,h,s),s.fatal||!s.context)return;s.context.type===T.PlaylistContextType.AUDIO_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},o.setAudioTrack=function(h){var s=this.tracksInGroup;if(h<0||h>=s.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=s[this.trackId];this.log("Now switching to audio-track index "+h);var t=s[h],S=t.id,x=t.groupId,f=x===void 0?"":x,R=t.name,C=t.type,v=t.url;if(this.trackId=h,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:f,name:R,type:C,url:v}),t.details&&!t.details.live)return;var _=this.switchParams(t.url,l==null?void 0:l.details);this.loadPlaylist(_)},o.selectInitialTrack=function(){var h=this.tracksInGroup;console.assert(h.length,"Initial audio track should be selected when tracks are known");var s=this.trackName,l=this.findTrackId(s)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(h){for(var s=this.tracksInGroup,l=0;l<s.length;l++){var t=s[l];if((!this.selectDefaultTrack||t.default)&&(!h||h===t.name))return t.id}return-1},o.loadPlaylist=function(h){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var l=s.id,t=s.groupId,S=s.url;if(h)try{S=h.addDirectives(S)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(M.Events.AUDIO_TRACK_LOADING,{url:S,id:l,groupId:t,deliveryDirectives:h||null})}},p(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(h){this.selectDefaultTrack=!1,this.setAudioTrack(h)}}]),a}(y.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return p});var M=O("./src/polyfills/number.ts"),m=O("./src/types/level.ts"),y=O("./src/controller/level-helper.ts"),T=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),p=function(){function d(c,r){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,r+":"),this.warn=T.logger.warn.bind(T.logger,r+":"),this.hls=c}var n=d.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(r,a){a.fatal&&a.type===b.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(r,a){var o=a==null?void 0:a.renditionReports;if(o)for(var u=0;u<o.length;u++){var h=o[u],s=""+h.URI;if(s===r.substr(-s.length)){var l=parseInt(h["LAST-MSN"]),t=parseInt(h["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var S=Math.min(a.age-a.partTarget,a.targetduration);t!==void 0&&S>a.partTarget&&(t+=1)}if(Object(M.isFiniteNumber)(l))return new m.HlsUrlParameters(l,Object(M.isFiniteNumber)(t)?t:void 0,m.HlsSkip.No)}}},n.loadPlaylist=function(r){},n.shouldLoadTrack=function(r){return this.canLoad&&r&&!!r.url&&(!r.details||r.details.live)},n.playlistLoaded=function(r,a,o){var u=this,h=a.details,s=a.stats,l=s.loading.end?Math.max(0,self.performance.now()-s.loading.end):0;if(h.advancedDateTime=Date.now()-l,h.live||o!=null&&o.live){if(h.reloaded(o),o&&this.log("live playlist "+r+" "+(h.advanced?"REFRESHED "+h.lastPartSn+"-"+h.lastPartIndex:"MISSED")),o&&h.fragments.length>0&&Object(y.mergeDetails)(o,h),!this.canLoad||!h.live)return;var t,S=void 0,x=void 0;if(h.canBlockReload&&h.endSN&&h.advanced){var f=this.hls.config.lowLatencyMode,R=h.lastPartSn,C=h.endSN,v=h.lastPartIndex,_=v!==-1,E=R===C,w=f?0:v;_?(S=E?C+1:R,x=E?w:v+1):S=C+1;var k=h.age,I=k+h.ageHeader,L=Math.min(I-h.partTarget,h.targetduration*1.5);if(L>0){if(o&&L>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+L+" with playlist age: "+h.age),L=0;else{var V=Math.floor(L/h.targetduration);if(S+=V,x!==void 0){var W=Math.round(L%h.targetduration/h.partTarget);x+=W}this.log("CDN Tune-in age: "+h.ageHeader+"s last advanced "+k.toFixed(2)+"s goal: "+L+" skip sn "+V+" to part "+x)}h.tuneInGoal=L}if(t=this.getDeliveryDirectives(h,a.deliveryDirectives,S,x),f||!E){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(h,a.deliveryDirectives,S,x);var H=Object(y.computeReloadInterval)(h,s);S!==void 0&&h.canBlockReload&&(H-=h.partTarget||1),this.log("reload live playlist "+r+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return u.loadPlaylist(t)},H)}else this.clearTimer()},n.getDeliveryDirectives=function(r,a,o,u){var h=Object(m.getSkipValue)(r,o);return a!=null&&a.skip&&r.deltaUpdateFailed&&(o=a.msn,u=a.part,h=m.HlsSkip.No),new m.HlsUrlParameters(o,u,h)},n.retryLoadingOrFail=function(r){var a=this,o=this.hls.config,u=this.retryCount<o.levelLoadingMaxRetry;if(u){var h;if(this.retryCount++,r.details.indexOf("LoadTimeOut")>-1&&(h=r.context)!==null&&h!==void 0&&h.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+r.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+r.details+'"')}}else this.warn('cannot recover from error "'+r.details+'"'),this.clearTimer(),r.fatal=!0;return u},d}()},"./src/controller/base-stream-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"State",function(){return C}),O.d(g,"default",function(){return v});var M=O("./src/polyfills/number.ts"),m=O("./src/task-loop.ts"),y=O("./src/controller/fragment-tracker.ts"),T=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/logger.ts"),p=O("./src/events.ts"),d=O("./src/errors.ts"),n=O("./src/types/transmuxer.ts"),c=O("./src/utils/mp4-tools.ts"),r=O("./src/utils/discontinuities.ts"),a=O("./src/controller/fragment-finders.ts"),o=O("./src/controller/level-helper.ts"),u=O("./src/loader/fragment-loader.ts"),h=O("./src/crypt/decrypter.ts"),s=O("./src/utils/time-ranges.ts"),l=O("./src/types/loader.ts");function t(_,E){for(var w=0;w<E.length;w++){var k=E[w];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(_,k.key,k)}}function S(_,E,w){return E&&t(_.prototype,E),w&&t(_,w),_}function x(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function f(_,E){_.prototype=Object.create(E.prototype),_.prototype.constructor=_,R(_,E)}function R(_,E){return R=Object.setPrototypeOf||function(k,I){return k.__proto__=I,k},R(_,E)}var C={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"},v=function(_){f(E,_);function E(k,I,L){var V;return V=_.call(this)||this,V.hls=void 0,V.fragPrevious=null,V.fragCurrent=null,V.fragmentTracker=void 0,V.transmuxer=null,V._state=C.STOPPED,V.media=void 0,V.mediaBuffer=void 0,V.config=void 0,V.bitrateTest=!1,V.lastCurrentTime=0,V.nextLoadPosition=0,V.startPosition=0,V.loadedmetadata=!1,V.fragLoadError=0,V.retryDate=0,V.levels=null,V.fragmentLoader=void 0,V.levelLastLoaded=null,V.startFragRequested=!1,V.decrypter=void 0,V.initPTS=[],V.onvseeking=null,V.onvended=null,V.logPrefix="",V.log=void 0,V.warn=void 0,V.logPrefix=L,V.log=b.logger.log.bind(b.logger,L+":"),V.warn=b.logger.warn.bind(b.logger,L+":"),V.hls=k,V.fragmentLoader=new u.default(k.config),V.fragmentTracker=I,V.config=k.config,V.decrypter=new h.default(k,k.config),k.on(p.Events.KEY_LOADED,V.onKeyLoaded,x(V)),V}var w=E.prototype;return w.doTick=function(){this.onTickEnd()},w.onTickEnd=function(){},w.startLoad=function(I){},w.stopLoad=function(){this.fragmentLoader.abort();var I=this.fragCurrent;I&&this.fragmentTracker.removeFragment(I),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},w._streamEnded=function(I,L){var V=this.fragCurrent,W=this.fragmentTracker;if(!L.live&&V&&V.sn===L.endSN&&!I.nextStart){var H=W.getState(V);return H===y.FragmentState.PARTIAL||H===y.FragmentState.OK}return!1},w.onMediaAttached=function(I,L){var V=this.media=this.mediaBuffer=L.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),V.addEventListener("seeking",this.onvseeking),V.addEventListener("ended",this.onvended);var W=this.config;this.levels&&W.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(W.startPosition)},w.onMediaDetaching=function(){var I=this.media;I!=null&&I.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),I&&(I.removeEventListener("seeking",this.onvseeking),I.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},w.onMediaSeeking=function(){var I=this.config,L=this.fragCurrent,V=this.media,W=this.mediaBuffer,H=this.state,G=V?V.currentTime:0,B=T.BufferHelper.bufferInfo(W||V,G,I.maxBufferHole);if(this.log("media seeking to "+(Object(M.isFiniteNumber)(G)?G.toFixed(3):G)+", state: "+H),H===C.ENDED)this.resetLoadingState();else if(L&&!B.len){var P=I.maxFragLookUpTolerance,z=L.start-P,J=L.start+L.duration+P,ue=G>J;(G<z||ue)&&(ue&&L.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),L.loader.abort()),this.resetLoadingState())}V&&(this.lastCurrentTime=G),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=G),this.tickImmediate()},w.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},w.onKeyLoaded=function(I,L){if(this.state!==C.KEY_LOADING||L.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var V=this.levels[L.frag.level].details;V&&this.loadFragment(L.frag,V,L.frag.start)},w.onHandlerDestroying=function(){this.stopLoad(),_.prototype.onHandlerDestroying.call(this)},w.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(p.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,_.prototype.onHandlerDestroyed.call(this)},w.loadKey=function(I,L){this.log("Loading key for "+I.sn+" of ["+L.startSN+"-"+L.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+I.level),this.state=C.KEY_LOADING,this.fragCurrent=I,this.hls.trigger(p.Events.KEY_LOADING,{frag:I})},w.loadFragment=function(I,L,V){this._loadFragForPlayback(I,L,V)},w._loadFragForPlayback=function(I,L,V){var W=this,H=function(B){if(W.fragContextChanged(I)){W.warn("Fragment "+I.sn+(B.part?" p: "+B.part.index:"")+" of level "+I.level+" was dropped during download."),W.fragmentTracker.removeFragment(I);return}I.stats.chunkCount++,W._handleFragmentLoadProgress(B)};this._doFragLoad(I,L,V,H).then(function(G){if(!G)return;W.fragLoadError=0;var B=W.state;if(W.fragContextChanged(I)){(B===C.FRAG_LOADING||B===C.BACKTRACKING||!W.fragCurrent&&B===C.PARSING)&&(W.fragmentTracker.removeFragment(I),W.state=C.IDLE);return}if("payload"in G&&(W.log("Loaded fragment "+I.sn+" of level "+I.level),W.hls.trigger(p.Events.FRAG_LOADED,G),W.state===C.BACKTRACKING)){W.fragmentTracker.backtrack(I,G),W.resetFragmentLoading(I);return}W._handleFragmentLoadComplete(G)}).catch(function(G){W.warn(G),W.resetFragmentLoading(I)})},w.flushMainBuffer=function(I,L,V){if(V===void 0&&(V=null),!(I-L))return;var W={startOffset:I,endOffset:L,type:V};this.fragLoadError=0,this.hls.trigger(p.Events.BUFFER_FLUSHING,W)},w._loadInitSegment=function(I){var L=this;this._doFragLoad(I).then(function(V){if(!V||L.fragContextChanged(I)||!L.levels)throw new Error("init load aborted");return V}).then(function(V){var W=L.hls,H=V.payload,G=I.decryptdata;if(H&&H.byteLength>0&&G&&G.key&&G.iv&&G.method==="AES-128"){var B=self.performance.now();return L.decrypter.webCryptoDecrypt(new Uint8Array(H),G.key.buffer,G.iv.buffer).then(function(P){var z=self.performance.now();return W.trigger(p.Events.FRAG_DECRYPTED,{frag:I,payload:P,stats:{tstart:B,tdecrypt:z}}),V.payload=P,V})}return V}).then(function(V){var W=L.fragCurrent,H=L.hls,G=L.levels;if(!G)throw new Error("init load aborted, missing levels");var B=G[I.level].details;console.assert(B,"Level details are defined when init segment is loaded");var P=I.stats;L.state=C.IDLE,L.fragLoadError=0,I.data=new Uint8Array(V.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),V.frag===W&&H.trigger(p.Events.FRAG_BUFFERED,{stats:P,frag:W,part:null,id:I.type}),L.tick()}).catch(function(V){L.warn(V),L.resetFragmentLoading(I)})},w.fragContextChanged=function(I){var L=this.fragCurrent;return!I||!L||I.level!==L.level||I.sn!==L.sn||I.urlId!==L.urlId},w.fragBufferedComplete=function(I,L){var V=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+I.type+" sn: "+I.sn+(L?" part: "+L.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+I.level+" "+s.default.toString(T.BufferHelper.getBuffered(V))),this.state=C.IDLE,this.tick()},w._handleFragmentLoadComplete=function(I){var L=this.transmuxer;if(!L)return;var V=I.frag,W=I.part,H=I.partsLoaded,G=!H||H.length===0||H.some(function(P){return!P}),B=new n.ChunkMetadata(V.level,V.sn,V.stats.chunkCount+1,0,W?W.index:-1,!G);L.flush(B)},w._handleFragmentLoadProgress=function(I){},w._doFragLoad=function(I,L,V,W){var H=this;if(V===void 0&&(V=null),!this.levels)throw new Error("frag load aborted, missing levels");if(V=Math.max(I.start,V||0),this.config.lowLatencyMode&&L){var G=L.partList;if(G&&W){V>I.end&&L.fragmentHint&&(I=L.fragmentHint);var B=this.getNextPart(G,I,V);if(B>-1){var P=G[B];return this.log("Loading part sn: "+I.sn+" p: "+P.index+" cc: "+I.cc+" of playlist ["+L.startSN+"-"+L.endSN+"] parts [0-"+B+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(V.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:I,part:G[B],targetBufferTime:V}),this.doFragPartsLoad(I,G,B,W).catch(function(z){return H.handleFragLoadError(z)})}else if(!I.url||this.loadedEndOfParts(G,V))return Promise.resolve(null)}}return this.log("Loading fragment "+I.sn+" cc: "+I.cc+" "+(L?"of ["+L.startSN+"-"+L.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(V.toFixed(3))),Object(M.isFiniteNumber)(I.sn)&&!this.bitrateTest&&(this.nextLoadPosition=I.start+I.duration),this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:I,targetBufferTime:V}),this.fragmentLoader.load(I,W).catch(function(z){return H.handleFragLoadError(z)})},w.doFragPartsLoad=function(I,L,V,W){var H=this;return new Promise(function(G,B){var P=[],z=function J(ue){var de=L[ue];H.fragmentLoader.loadPart(I,de,W).then(function(Se){P[de.index]=Se;var Ae=Se.part;H.hls.trigger(p.Events.FRAG_LOADED,Se);var pe=L[ue+1];if(pe&&pe.fragment===I)J(ue+1);else return G({frag:I,part:Ae,partsLoaded:P})}).catch(B)};z(V)})},w.handleFragLoadError=function(I){var L=I.data;return L&&L.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(L.frag,L.part):this.hls.trigger(p.Events.ERROR,L),null},w._handleTransmuxerFlush=function(I){var L=this.getCurrentContext(I);if(!L||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var V=L.frag,W=L.part,H=L.level,G=self.performance.now();V.stats.parsing.end=G,W&&(W.stats.parsing.end=G),this.updateLevelTiming(V,W,H,I.partial)},w.getCurrentContext=function(I){var L=this.levels,V=I.level,W=I.sn,H=I.part;if(!L||!L[V])return this.warn("Levels object was unset while buffering fragment "+W+" of level "+V+". The current chunk will not be buffered."),null;var G=L[V],B=H>-1?Object(o.getPartWith)(G,W,H):null,P=B?B.fragment:Object(o.getFragmentWithSN)(G,W,this.fragCurrent);return P?{frag:P,part:B,level:G}:null},w.bufferFragmentData=function(I,L,V,W){if(!I||this.state!==C.PARSING)return;var H=I.data1,G=I.data2,B=H;if(H&&G&&(B=Object(c.appendUint8Array)(H,G)),!B||!B.length)return;var P={type:I.type,frag:L,part:V,chunkMeta:W,parent:L.type,data:B};this.hls.trigger(p.Events.BUFFER_APPENDING,P),I.dropped&&I.independent&&!V&&this.flushBufferGap(L)},w.flushBufferGap=function(I){var L=this.media;if(!L)return;if(!T.BufferHelper.isBuffered(L,L.currentTime)){this.flushMainBuffer(0,I.start);return}var V=L.currentTime,W=T.BufferHelper.bufferInfo(L,V,0),H=I.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),B=Math.max(Math.min(I.start-G,W.end-G),V+G);I.start-B>G&&this.flushMainBuffer(B,I.start)},w.getFwdBufferInfo=function(I,L){var V=this.config,W=this.getLoadPosition();if(!Object(M.isFiniteNumber)(W))return null;var H=T.BufferHelper.bufferInfo(I,W,V.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(W,L);if(G&&H.nextStart<G.end)return T.BufferHelper.bufferInfo(I,W,Math.max(H.nextStart,V.maxBufferHole))}return H},w.getMaxBufferLength=function(I){var L=this.config,V;return I?V=Math.max(8*L.maxBufferSize/I,L.maxBufferLength):V=L.maxBufferLength,Math.min(V,L.maxMaxBufferLength)},w.reduceMaxBufferLength=function(I){var L=this.config,V=I||L.maxBufferLength;return L.maxMaxBufferLength>=V?(L.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+L.maxMaxBufferLength+"s"),!0):!1},w.getNextFragment=function(I,L){var V,W,H=L.fragments,G=H.length;if(!G)return null;var B=this.config,P=H[0].start,z;if(L.live){var J=B.initialLiveManifestSize;if(G<J)return this.warn("Not enough fragments to start playback (have: "+G+", need: "+J+")"),null;!L.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(z=this.getInitialLiveFragment(L,H),this.startPosition=z?this.hls.liveSyncPosition||z.start:I)}else I<=P&&(z=H[0]);if(!z){var ue=B.lowLatencyMode?L.partEnd:L.fragmentEnd;z=this.getFragmentAtPosition(I,ue,L)}return(V=z)!==null&&V!==void 0&&V.initSegment&&!((W=z)!==null&&W!==void 0&&W.initSegment.data)&&!this.bitrateTest&&(z=z.initSegment),z},w.getNextPart=function(I,L,V){for(var W=-1,H=!1,G=!0,B=0,P=I.length;B<P;B++){var z=I[B];if(G=G&&!z.independent,W>-1&&V<z.start)break;var J=z.loaded;!J&&(H||z.independent||G)&&z.fragment===L&&(W=B),H=J}return W},w.loadedEndOfParts=function(I,L){var V=I[I.length-1];return V&&L>V.start&&V.loaded},w.getInitialLiveFragment=function(I,L){var V=this.fragPrevious,W=null;if(V){if(I.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+V.programDateTime),W=Object(a.findFragmentByPDT)(L,V.endProgramDateTime,this.config.maxFragLookUpTolerance)),!W){var H=V.sn+1;if(H>=I.startSN&&H<=I.endSN){var G=L[H-I.startSN];V.cc===G.cc&&(W=G,this.log("Live playlist, switching playlist, load frag with next SN: "+W.sn))}W||(W=Object(a.findFragWithCC)(L,V.cc),W&&this.log("Live playlist, switching playlist, load frag with same CC: "+W.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(W=this.getFragmentAtPosition(B,this.bitrateTest?I.fragmentEnd:I.edge,I))}return W},w.getFragmentAtPosition=function(I,L,V){var W=this.config,H=this.fragPrevious,G=V.fragments,B=V.endSN,P=V.fragmentHint,z=W.maxFragLookUpTolerance,J=!!(W.lowLatencyMode&&V.partList&&P);J&&P&&!this.bitrateTest&&(G=G.concat(P),B=P.sn);var ue;if(I<L){var de=I>L-z?0:z;ue=Object(a.findFragmentByPTS)(H,G,I,de)}else ue=G[G.length-1];if(ue){var Se=ue.sn-V.startSN,Ae=H&&ue.level===H.level,pe=G[Se+1],Oe=this.fragmentTracker.getState(ue);if(Oe===y.FragmentState.BACKTRACKED){ue=null;for(var ye=Se;G[ye]&&this.fragmentTracker.getState(G[ye])===y.FragmentState.BACKTRACKED;)H?ue=G[ye--]:ue=G[--ye];ue||(ue=pe)}else H&&ue.sn===H.sn&&!J&&(Ae&&(ue.sn<B&&this.fragmentTracker.getState(pe)!==y.FragmentState.OK?(this.log("SN "+ue.sn+" just loaded, load next one: "+pe.sn),ue=pe):ue=null))}return ue},w.synchronizeToLiveEdge=function(I){var L=this.config,V=this.media;if(!V)return;var W=this.hls.liveSyncPosition,H=V.currentTime,G=I.fragments[0].start,B=I.edge,P=H>=G-L.maxFragLookUpTolerance&&H<=B;if(W!==null&&V.duration>W&&(H<W||!P)){var z=L.liveMaxLatencyDuration!==void 0?L.liveMaxLatencyDuration:L.liveMaxLatencyDurationCount*I.targetduration;(!P&&V.readyState<4||H<B-z)&&(this.loadedmetadata||(this.nextLoadPosition=W),V.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+W.toFixed(3)),V.currentTime=W))}},w.alignPlaylists=function(I,L){var V=this.levels,W=this.levelLastLoaded,H=this.fragPrevious,G=W!==null?V[W]:null,B=I.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var P=I.fragments[0].start,z=!L,J=I.alignedSliding&&Object(M.isFiniteNumber)(P);if(z||!J&&!P){Object(r.alignStream)(H,G,I);var ue=I.fragments[0].start;return this.log("Live playlist sliding: "+ue.toFixed(2)+" start-sn: "+(L?L.startSN:"na")+"->"+I.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+B),ue}return P},w.waitForCdnTuneIn=function(I){var L=3;return I.live&&I.canBlockReload&&I.tuneInGoal>Math.max(I.partHoldBack,I.partTarget*L)},w.setStartPosition=function(I,L){var V=this.startPosition;if(V<L&&(V=-1),V===-1||this.lastCurrentTime===-1){var W=I.startTimeOffset;Object(M.isFiniteNumber)(W)?(V=L+W,W<0&&(V+=I.totalduration),V=Math.min(Math.max(L,V),L+I.totalduration),this.log("Start time offset "+W+" found in playlist, adjust startPosition to "+V),this.startPosition=V):I.live?V=this.hls.liveSyncPosition||L:this.startPosition=V=0,this.lastCurrentTime=V}this.nextLoadPosition=V},w.getLoadPosition=function(){var I=this.media,L=0;return this.loadedmetadata&&I?L=I.currentTime:this.nextLoadPosition&&(L=this.nextLoadPosition),L},w.handleFragLoadAborted=function(I,L){this.transmuxer&&I.sn!=="initSegment"&&I.stats.aborted&&(this.warn("Fragment "+I.sn+(L?" part"+L.index:"")+" of level "+I.level+" was aborted"),this.resetFragmentLoading(I))},w.resetFragmentLoading=function(I){(!this.fragCurrent||!this.fragContextChanged(I))&&(this.state=C.IDLE)},w.onFragmentOrKeyLoadError=function(I,L){if(L.fatal)return;var V=L.frag;if(!V||V.type!==I)return;var W=this.fragCurrent;console.assert(W&&V.sn===W.sn&&V.level===W.level&&V.urlId===W.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(V.level))return;var G=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+V.sn+" of "+I+" "+V.level+" failed to load, retrying in "+G+"ms"),this.retryDate=self.performance.now()+G,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else L.levelRetry?(I===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(b.logger.error(L.details+" reaches max retry, redispatch as fatal ..."),L.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},w.afterBufferFlushed=function(I,L,V){if(!I)return;var W=T.BufferHelper.getBuffered(I);this.fragmentTracker.detectEvictedFragments(L,W,V),this.state===C.ENDED&&this.resetLoadingState()},w.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},w.resetLiveStartWhenNotLoaded=function(I){if(!this.loadedmetadata){this.startFragRequested=!1;var L=this.levels?this.levels[I].details:null;if(L!=null&&L.live)return this.startPosition=-1,this.setStartPosition(L,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},w.updateLevelTiming=function(I,L,V,W){var H=this,G=V.details;console.assert(!!G,"level.details must be defined");var B=Object.keys(I.elementaryStreams).reduce(function(P,z){var J=I.elementaryStreams[z];if(J){var ue=J.endPTS-J.startPTS;if(ue<=0)return H.warn("Could not parse fragment "+I.sn+" "+z+" duration reliably ("+ue+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),P||!1;var de=W?0:Object(o.updateFragPTSDTS)(G,I,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return H.hls.trigger(p.Events.LEVEL_PTS_UPDATED,{details:G,level:V,drift:de,type:z,frag:I,start:J.startPTS,end:J.endPTS}),!0}return P},!1);B?(this.state=C.PARSED,this.hls.trigger(p.Events.FRAG_PARSED,{frag:I,part:L})):this.resetLoadingState()},w.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},S(E,[{key:"state",get:function(){return this._state},set:function(I){var L=this._state;L!==I&&(this._state=I,this.log(L+"->"+I))}}]),E}(m.default)},"./src/controller/buffer-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a});var M=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),y=O("./src/utils/logger.ts"),T=O("./src/errors.ts"),b=O("./src/utils/buffer-helper.ts"),p=O("./src/utils/mediasource-helper.ts"),d=O("./src/loader/fragment.ts"),n=O("./src/controller/buffer-operation-queue.ts"),c=Object(p.getMediaSource)(),r=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function o(h){var s=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 l=s.hls,t=s.media,S=s.mediaSource;y.logger.log("[buffer-controller]: Media source opened"),t&&(s.updateMediaElementDuration(),l.trigger(m.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",s._onMediaSourceOpen),s.checkPendingTracks()},this._onMediaSourceClose=function(){y.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){y.logger.log("[buffer-controller]: Media source ended")},this.hls=h,this._initSourceBuffer(),this.registerListeners()}var u=o.prototype;return u.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},u.destroy=function(){this.unregisterListeners(),this.details=null},u.registerListeners=function(){var s=this.hls;s.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(m.Events.BUFFER_RESET,this.onBufferReset,this),s.on(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.on(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.on(m.Events.BUFFER_EOS,this.onBufferEos,this),s.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.on(m.Events.FRAG_PARSED,this.onFragParsed,this),s.on(m.Events.FRAG_CHANGED,this.onFragChanged,this)},u.unregisterListeners=function(){var s=this.hls;s.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(m.Events.BUFFER_RESET,this.onBufferReset,this),s.off(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.off(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.off(m.Events.BUFFER_EOS,this.onBufferEos,this),s.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.off(m.Events.FRAG_PARSED,this.onFragParsed,this),s.off(m.Events.FRAG_CHANGED,this.onFragChanged,this)},u._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},u.onManifestParsed=function(s,l){var t=2;(l.audio&&!l.video||!l.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,y.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},u.onMediaAttaching=function(s,l){var t=this.media=l.media;if(t&&c){var S=this.mediaSource=new c;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(S),this._objectUrl=t.src}},u.onMediaDetaching=function(){var s=this.media,l=this.mediaSource,t=this._objectUrl;if(l){if(y.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(S){y.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),s&&(t&&self.URL.revokeObjectURL(t),s.src===t?(s.removeAttribute("src"),s.load()):y.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)},u.onBufferReset=function(){var s=this;this.getSourceBufferTypes().forEach(function(l){var t=s.sourceBuffer[l];try{t&&(s.removeBufferListeners(l),s.mediaSource&&s.mediaSource.removeSourceBuffer(t),s.sourceBuffer[l]=void 0)}catch(S){y.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",S)}}),this._initSourceBuffer()},u.onBufferCodecs=function(s,l){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(x){if(S){var f=t.tracks[x];if(f&&typeof f.buffer.changeType=="function"){var R=l[x],C=R.codec,v=R.levelCodec,_=R.container,E=(f.levelCodec||f.codec).replace(r,"$1"),w=(v||C).replace(r,"$1");if(E!==w){var k=_+";codecs="+(v||C);t.appendChangeType(x,k)}}}else t.pendingTracks[x]=l[x]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},u.appendChangeType=function(s,l){var t=this,S=this.operationQueue,x={execute:function(){var R=t.sourceBuffer[s];R&&(y.logger.log("[buffer-controller]: changing "+s+" sourceBuffer type to "+l),R.changeType(l)),S.shiftAndExecuteNext(s)},onStart:function(){},onComplete:function(){},onError:function(R){y.logger.warn("[buffer-controller]: Failed to change "+s+" SourceBuffer type",R)}};S.append(x,s)},u.onBufferAppending=function(s,l){var t=this,S=this.hls,x=this.operationQueue,f=this.tracks,R=l.data,C=l.type,v=l.frag,_=l.part,E=l.chunkMeta,w=E.buffering[C],k=self.performance.now();w.start=k;var I=v.stats.buffering,L=_?_.stats.buffering:null;I.start===0&&(I.start=k),L&&L.start===0&&(L.start=k);var V=f.audio,W=C==="audio"&&E.id===1&&(V==null?void 0:V.container)==="audio/mpeg",H={execute:function(){if(w.executeStart=self.performance.now(),W){var B=t.sourceBuffer[C];if(B){var P=v.start-B.timestampOffset;Math.abs(P)>=.1&&(y.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+v.start+" (delta: "+P+") sn: "+v.sn+")"),B.timestampOffset=v.start)}}t.appendExecutor(R,C)},onStart:function(){},onComplete:function(){var B=self.performance.now();w.executeEnd=w.end=B,I.first===0&&(I.first=B),L&&L.first===0&&(L.first=B);var P=t.sourceBuffer,z={};for(var J in P)z[J]=b.BufferHelper.getBuffered(P[J]);t.appendError=0,t.hls.trigger(m.Events.BUFFER_APPENDED,{type:C,frag:v,part:_,chunkMeta:E,parent:v.type,timeRanges:z})},onError:function(B){y.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",B);var P={type:T.ErrorTypes.MEDIA_ERROR,parent:v.type,details:T.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=T.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,P.details=T.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(y.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),S.trigger(m.Events.ERROR,P)}};x.append(H,C)},u.onBufferFlushing=function(s,l){var t=this,S=this.operationQueue,x=function(R){return{execute:t.removeExecutor.bind(t,R,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(m.Events.BUFFER_FLUSHED,{type:R})},onError:function(v){y.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",v)}}};l.type?S.append(x(l.type),l.type):this.getSourceBufferTypes().forEach(function(f){S.append(x(f),f)})},u.onFragParsed=function(s,l){var t=this,S=l.frag,x=l.part,f=[],R=x?x.elementaryStreams:S.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?f.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&f.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&f.push("video"));var C=function(){var _=self.performance.now();S.stats.buffering.end=_,x&&(x.stats.buffering.end=_);var E=x?x.stats:S.stats;t.hls.trigger(m.Events.FRAG_BUFFERED,{frag:S,part:x,stats:E,id:S.type})};f.length===0&&y.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(C,f)},u.onFragChanged=function(s,l){this.flushBackBuffer()},u.onBufferEos=function(s,l){var t=this,S=this.getSourceBufferTypes().reduce(function(x,f){var R=t.sourceBuffer[f];return(!l.type||l.type===f)&&(R&&!R.ended&&(R.ended=!0,y.logger.log("[buffer-controller]: "+f+" sourceBuffer now EOS"))),x&&!!(!R||R.ended)},!0);S&&this.blockBuffers(function(){var x=t.mediaSource;if(!x||x.readyState!=="open")return;x.endOfStream()})},u.onLevelUpdated=function(s,l){var t=l.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},u.flushBackBuffer=function(){var s=this.hls,l=this.details,t=this.media,S=this.sourceBuffer;if(!t||l===null)return;var x=this.getSourceBufferTypes();if(!x.length)return;var f=l.live&&s.config.liveBackBufferLength!==null?s.config.liveBackBufferLength:s.config.backBufferLength;if(!Object(M.isFiniteNumber)(f)||f<0)return;var R=t.currentTime,C=l.levelTargetDuration,v=Math.max(f,C),_=Math.floor(R/C)*C-v;x.forEach(function(E){var w=S[E];if(w){var k=b.BufferHelper.getBuffered(w);k.length>0&&_>k.start(0)&&(s.trigger(m.Events.BACK_BUFFER_REACHED,{bufferEnd:_}),l.live&&s.trigger(m.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:_}),s.trigger(m.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:_,type:E}))}})},u.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var s=this.details,l=this.hls,t=this.media,S=this.mediaSource,x=s.fragments[0].start+s.totalduration,f=t.duration,R=Object(M.isFiniteNumber)(S.duration)?S.duration:0;s.live&&l.config.liveDurationInfinity?(y.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(s)):(x>R&&x>f||!Object(M.isFiniteNumber)(f))&&(y.logger.log("[buffer-controller]: Updating Media Source duration to "+x.toFixed(3)),S.duration=x)},u.updateSeekableRange=function(s){var l=this.mediaSource,t=s.fragments,S=t.length;if(S&&s.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var x=Math.max(0,t[0].start),f=Math.max(x,x+s.totalduration);l.setLiveSeekableRange(x,f)}},u.checkPendingTracks=function(){var s=this.bufferCodecEventsExpected,l=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!s||S===2){this.createSourceBuffers(t),this.pendingTracks={};var x=this.getSourceBufferTypes();if(x.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}x.forEach(function(f){l.executeNext(f)})}},u.createSourceBuffers=function(s){var l=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var x in s)if(!l[x]){var f=s[x];if(!f)throw Error("source buffer exists for track "+x+", however track does not");var R=f.levelCodec||f.codec,C=f.container+";codecs="+R;y.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var v=l[x]=t.addSourceBuffer(C),_=x;this.addBufferListener(_,"updatestart",this._onSBUpdateStart),this.addBufferListener(_,"updateend",this._onSBUpdateEnd),this.addBufferListener(_,"error",this._onSBUpdateError),this.tracks[x]={buffer:v,codec:R,container:f.container,levelCodec:f.levelCodec,id:f.id},S++}catch(E){y.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:C})}}S&&this.hls.trigger(m.Events.BUFFER_CREATED,{tracks:this.tracks})},u._onSBUpdateStart=function(s){var l=this.operationQueue,t=l.current(s);t.onStart()},u._onSBUpdateEnd=function(s){var l=this.operationQueue,t=l.current(s);t.onComplete(),l.shiftAndExecuteNext(s)},u._onSBUpdateError=function(s,l){y.logger.error("[buffer-controller]: "+s+" SourceBuffer error",l),this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(s);t&&t.onError(l)},u.removeExecutor=function(s,l,t){var S=this.media,x=this.mediaSource,f=this.operationQueue,R=this.sourceBuffer,C=R[s];if(!S||!x||!C){y.logger.warn("[buffer-controller]: Attempting to remove from the "+s+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(s);return}var v=Object(M.isFiniteNumber)(S.duration)?S.duration:Infinity,_=Object(M.isFiniteNumber)(x.duration)?x.duration:Infinity,E=Math.max(0,l),w=Math.min(t,v,_);w>E?(y.logger.log("[buffer-controller]: Removing ["+E+","+w+"] from the "+s+" SourceBuffer"),console.assert(!C.updating,s+" sourceBuffer must not be updating"),C.remove(E,w)):f.shiftAndExecuteNext(s)},u.appendExecutor=function(s,l){var t=this.operationQueue,S=this.sourceBuffer,x=S[l];if(!x){y.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(l);return}x.ended=!1,console.assert(!x.updating,l+" sourceBuffer must not be updating"),x.appendBuffer(s)},u.blockBuffers=function(s,l){var t=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){y.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(s);return}var S=this.operationQueue,x=l.map(function(f){return S.appendBlocker(f)});Promise.all(x).then(function(){s(),l.forEach(function(f){var R=t.sourceBuffer[f];(!R||!R.updating)&&S.shiftAndExecuteNext(f)})})},u.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},u.addBufferListener=function(s,l,t){var S=this.sourceBuffer[s];if(!S)return;var x=t.bind(this,s);this.listeners[s].push({event:l,listener:x}),S.addEventListener(l,x)},u.removeBufferListeners=function(s){var l=this.sourceBuffer[s];if(!l)return;this.listeners[s].forEach(function(t){l.removeEventListener(t.event,t.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return m});var M=O("./src/utils/logger.ts"),m=function(){function y(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var T=y.prototype;return T.append=function(p,d){var n=this.queues[d];n.push(p),n.length===1&&this.buffers[d]&&this.executeNext(d)},T.insertAbort=function(p,d){var n=this.queues[d];n.unshift(p),this.executeNext(d)},T.appendBlocker=function(p){var d,n=new Promise(function(r){d=r}),c={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,p),n},T.executeNext=function(p){var d=this.buffers,n=this.queues,c=d[p],r=n[p];if(r.length){var a=r[0];try{a.execute()}catch(o){M.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(o),(!c||!c.updating)&&(r.shift(),this.executeNext(p))}}},T.shiftAndExecuteNext=function(p){this.queues[p].shift(),this.executeNext(p)},T.current=function(p){return this.queues[p][0]},y}()},"./src/controller/cap-level-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts");function m(b,p){for(var d=0;d<p.length;d++){var n=p[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(b,n.key,n)}}function y(b,p,d){return p&&m(b.prototype,p),d&&m(b,d),b}var T=function(){function b(d){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=d,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var p=b.prototype;return p.setStreamController=function(n){this.streamController=n},p.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},p.registerListeners=function(){var n=this.hls;n.on(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},p.unregisterListener=function(){var n=this.hls;n.off(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},p.onFpsDropLevelCapping=function(n,c){b.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},p.onMediaAttaching=function(n,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},p.onManifestParsed=function(n,c){var r=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,r.config.capLevelToPlayerSize&&c.video&&this.startCapping()},p.onBufferCodecs=function(n,c){var r=this.hls;r.config.capLevelToPlayerSize&&c.video&&this.startCapping()},p.onMediaDetaching=function(){this.stopCapping()},p.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(n.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},p.getMaxLevel=function(n){var c=this,r=this.hls.levels;if(!r.length)return-1;var a=r.filter(function(o,u){return b.isLevelAllowed(u,c.restrictedLevels)&&u<=n});return this.clientRect=null,b.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},p.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()},p.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},p.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,c={width:0,height:0};if(n){var r=n.getBoundingClientRect();c.width=r.width,c.height=r.height,!c.width&&!c.height&&(c.width=r.right-r.left||n.width||0,c.height=r.bottom-r.top||n.height||0)}return this.clientRect=c,c},b.isLevelAllowed=function(n,c){return c===void 0&&(c=[]),c.indexOf(n)===-1},b.getMaxLevelByMediaSize=function(n,c,r){if(!n||!n.length)return-1;for(var a=function(l,t){return t?l.width!==t.width||l.height!==t.height:!0},o=n.length-1,u=0;u<n.length;u+=1){var h=n[u];if((h.width>=c||h.height>=r)&&a(h,n[u+1])){o=u;break}}return o},y(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(c){}return n}}]),b}();g.default=T},"./src/controller/cmcd-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a});var M=O("./src/events.ts"),m=O("./src/types/cmcd.ts"),y=O("./src/utils/buffer-helper.ts"),T=O("./src/utils/logger.ts");function b(o,u){for(var h=0;h<u.length;h++){var s=u[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function p(o,u,h){return u&&b(o.prototype,u),h&&b(o,h),o}function d(o,u){var h=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(h)return(h=h.call(o)).next.bind(h);if(Array.isArray(o)||(h=n(o))||u&&o&&typeof o.length=="number"){h&&(o=h);var s=0;return function(){return s>=o.length?{done:!0}:{done:!1,value:o[s++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(o,u){if(!o)return;if(typeof o=="string")return c(o,u);var h=Object.prototype.toString.call(o).slice(8,-1);if(h==="Object"&&o.constructor&&(h=o.constructor.name),h==="Map"||h==="Set")return Array.from(o);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return c(o,u)}function c(o,u){(u==null||u>o.length)&&(u=o.length);for(var h=0,s=new Array(u);h<u;h++)s[h]=o[h];return s}function r(){return r=Object.assign||function(o){for(var u=1;u<arguments.length;u++){var h=arguments[u];for(var s in h)Object.prototype.hasOwnProperty.call(h,s)&&(o[s]=h[s])}return o},r.apply(this,arguments)}var a=function(){function o(h){var s=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(){s.initialized&&(s.starved=!0),s.buffering=!0},this.onPlaying=function(){s.initialized||(s.initialized=!0),s.buffering=!1},this.applyPlaylistData=function(S){try{s.apply(S,{ot:m.CMCDObjectType.MANIFEST,su:!s.initialized})}catch(x){T.logger.warn("Could not generate manifest CMCD data.",x)}},this.applyFragmentData=function(S){try{var x=S.frag,f=s.hls.levels[x.level],R=s.getObjectType(x),C={d:x.duration*1e3,ot:R};(R===m.CMCDObjectType.VIDEO||R===m.CMCDObjectType.AUDIO||R==m.CMCDObjectType.MUXED)&&(C.br=f.bitrate/1e3,C.tb=s.getTopBandwidth(R),C.bl=s.getBufferLength(R)),s.apply(S,C)}catch(v){T.logger.warn("Could not generate segment CMCD data.",v)}},this.hls=h;var l=this.config=h.config,t=l.cmcd;t!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||o.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var u=o.prototype;return u.registerListeners=function(){var s=this.hls;s.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),s.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this)},u.unregisterListeners=function(){var s=this.hls;s.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),s.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},u.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},u.onMediaAttached=function(s,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},u.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},u.onBufferCreated=function(s,l){var t,S;this.audioBuffer=(t=l.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(S=l.tracks.video)===null||S===void 0?void 0:S.buffer},u.createData=function(){var s;return{v:m.CMCDVersion,sf:m.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(s=this.media)===null||s===void 0?void 0:s.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},u.apply=function(s,l){l===void 0&&(l={}),r(l,this.createData());var t=l.ot===m.CMCDObjectType.INIT||l.ot===m.CMCDObjectType.VIDEO||l.ot===m.CMCDObjectType.MUXED;if(this.starved&&t&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var S=o.toHeaders(l);if(!Object.keys(S).length)return;s.headers||(s.headers={}),r(s.headers,S)}else{var x=o.toQuery(l);if(!x)return;s.url=o.appendQueryToUri(s.url,x)}},u.getObjectType=function(s){var l=s.type;return l==="subtitle"?m.CMCDObjectType.TIMED_TEXT:s.sn==="initSegment"?m.CMCDObjectType.INIT:l==="audio"?m.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?m.CMCDObjectType.VIDEO:m.CMCDObjectType.MUXED:void 0},u.getTopBandwidth=function(s){for(var l=0,t=s===m.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,S=d(t),x;!(x=S()).done;){var f=x.value;f.bitrate>l&&(l=f.bitrate)}return l>0?l:NaN},u.getBufferLength=function(s){var l=this.hls.media,t=s===m.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!l)return NaN;var S=y.BufferHelper.bufferInfo(t,l.currentTime,this.config.maxBufferHole);return S.len*1e3},u.createPlaylistLoader=function(){var s=this.config.pLoader,l=this.applyPlaylistData,t=s||this.config.loader;return function(){function S(f){this.loader=void 0,this.loader=new t(f)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(R,C,v){l(R),this.loader.load(R,C,v)},p(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},u.createFragmentLoader=function(){var s=this.config.fLoader,l=this.applyFragmentData,t=s||this.config.loader;return function(){function S(f){this.loader=void 0,this.loader=new t(f)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(R,C,v){l(R),this.loader.load(R,C,v)},p(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},o.uuid=function(){var s=URL.createObjectURL(new Blob),l=s.toString();return URL.revokeObjectURL(s),l.substr(l.lastIndexOf("/")+1)},o.serialize=function(s){for(var l=[],t=function(W){return!Number.isNaN(W)&&W!=null&&W!==""&&W!==!1},S=function(W){return Math.round(W)},x=function(W){return S(W/100)*100},f=function(W){return encodeURIComponent(W)},R={br:S,d:S,bl:x,dl:x,mtp:x,nor:f,rtp:x,tb:S},C=Object.keys(s||{}).sort(),v=d(C),_;!(_=v()).done;){var E=_.value,w=s[E];if(!t(w))continue;if(E==="v"&&w===1)continue;if(E=="pr"&&w===1)continue;var k=R[E];k&&(w=k(w));var I=typeof w,L=void 0;E==="ot"||E==="sf"||E==="st"?L=E+"="+w:I==="boolean"?L=E:I==="number"?L=E+"="+w:L=E+"="+JSON.stringify(w),l.push(L)}return l.join(",")},o.toHeaders=function(s){for(var l=Object.keys(s),t={},S=["Object","Request","Session","Status"],x=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,C=l;R<C.length;R++){var v=C[R],_=f[v]!=null?f[v]:1;x[_][v]=s[v]}for(var E=0;E<x.length;E++){var w=o.serialize(x[E]);w&&(t["CMCD-"+S[E]]=w)}return t},o.toQuery=function(s){return"CMCD="+encodeURIComponent(o.serialize(s))},o.appendQueryToUri=function(s,l){if(!l)return s;var t=s.includes("?")?"&":"?";return""+s+t+l},o}()},"./src/controller/eme-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/utils/logger.ts"),T=O("./src/utils/mediakeys-helper.ts");function b(a,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}function p(a,o,u){return o&&b(a.prototype,o),u&&b(a,u),a}var d=3,n=function(o,u,h){var s={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(l){s.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:h.audioRobustness||""})}),u.forEach(function(l){s.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:h.videoRobustness||""})}),[s]},c=function(o,u,h,s){switch(o){case T.KeySystems.WIDEVINE:return n(u,h,s);default:throw new Error("Unknown key-system: "+o)}},r=function(){function a(u){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=u,this._config=u.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 o=a.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o._unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o.getLicenseServerUrl=function(h){switch(h){case T.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+h+'"')},o._attemptKeySystemAccess=function(h,s,l){var t=this,S=c(h,s,l,this._drmSystemOptions);y.logger.log("Requesting encrypted media key-system access");var x=this.requestMediaKeySystemAccess(h,S);this.mediaKeysPromise=x.then(function(f){return t._onMediaKeySystemAccessObtained(h,f)}),x.catch(function(f){y.logger.error('Failed to obtain key-system "'+h+'" access:',f)})},o._onMediaKeySystemAccessObtained=function(h,s){var l=this;y.logger.log('Access for key-system "'+h+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:s,mediaKeySystemDomain:h};this._mediaKeysList.push(t);var S=Promise.resolve().then(function(){return s.createMediaKeys()}).then(function(x){return t.mediaKeys=x,y.logger.log('Media-keys created for key-system "'+h+'"'),l._onMediaKeysCreated(),x});return S.catch(function(x){y.logger.error("Failed to create media-keys:",x)}),S},o._onMediaKeysCreated=function(){var h=this;this._mediaKeysList.forEach(function(s){s.mediaKeysSession||(s.mediaKeysSession=s.mediaKeys.createSession(),h._onNewMediaKeySession(s.mediaKeysSession))})},o._onNewMediaKeySession=function(h){var s=this;y.logger.log("New key-system session "+h.sessionId),h.addEventListener("message",function(l){s._onKeySessionMessage(h,l.message)},!1)},o._onKeySessionMessage=function(h,s){y.logger.log("Got EME message event, creating license request"),this._requestLicense(s,function(l){y.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),h.update(l)})},o.onMediaEncrypted=function(h){var s=this;if(y.logger.log('Media is encrypted using "'+h.initDataType+'" init data type'),!this.mediaKeysPromise){y.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(S){if(!s._media)return;s._attemptSetMediaKeys(S),s._generateRequestWithPreferredKeySession(h.initDataType,h.initData)};this.mediaKeysPromise.then(l).catch(l)},o._attemptSetMediaKeys=function(h){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var s=this._mediaKeysList[0];if(!s||!s.mediaKeys){y.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}y.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(s.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(h,s){var l=this,t=this._mediaKeysList[0];if(!t){y.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){y.logger.warn("Key-Session already initialized but requested again");return}var S=t.mediaKeysSession;if(!S){y.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!s){y.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}y.logger.log('Generating key-session request for "'+h+'" init data type'),t.mediaKeysSessionInitialized=!0,S.generateRequest(h,s).then(function(){y.logger.debug("Key-session generation succeeded")}).catch(function(x){y.logger.error("Error generating key-session request:",x),l.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(h,s,l){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,h,s,l);var S=this._licenseXhrSetup;if(S)try{S.call(this.hls,t,h),S=void 0}catch(x){y.logger.error(x)}try{t.readyState||t.open("POST",h,!0),S&&S.call(this.hls,t,h)}catch(x){throw new Error("issue setting up KeySystem license XHR "+x)}return t},o._onLicenseRequestReadyStageChange=function(h,s,l,t){switch(h.readyState){case 4:if(h.status===200){this._requestLicenseFailureCount=0,y.logger.log("License request succeeded");var S=h.response,x=this._licenseResponseCallback;if(x)try{S=x.call(this.hls,h,s)}catch(R){y.logger.error(R)}t(S)}else{if(y.logger.error("License Request XHR failed ("+s+"). Status: "+h.status+" ("+h.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>d){this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var f=d-this._requestLicenseFailureCount+1;y.logger.warn("Retrying license request, "+f+" attempts left"),this._requestLicense(l,t)}break}},o._generateLicenseRequestChallenge=function(h,s){switch(h.mediaKeySystemDomain){case T.KeySystems.WIDEVINE:return s}throw new Error("unsupported key-system: "+h.mediaKeySystemDomain)},o._requestLicense=function(h,s){y.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){y.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(l.mediaKeySystemDomain),S=this._createLicenseXhr(t,h,s);y.logger.log("Sending license request to URL: "+t);var x=this._generateLicenseRequestChallenge(l,h);S.send(x)}catch(f){y.logger.error("Failure requesting DRM license: "+f),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(h,s){if(!this._emeEnabled)return;var l=s.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var h=this._media,s=this._mediaKeysList;if(!h)return;h.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(s.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return h.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(h,s){if(!this._emeEnabled)return;var l=s.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),t=s.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(T.KeySystems.WIDEVINE,l,t)},p(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();g.default=r},"./src/controller/fps-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/utils/logger.ts"),y=function(){function T(p){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=p,this.registerListeners()}var b=T.prototype;return b.setStreamController=function(d){this.streamController=d},b.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(d,n){var c=this.hls.config;if(c.capLevelOnFPSDrop){var r=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(d,n,c){var r=performance.now();if(n){if(this.lastTime){var a=r-this.lastTime,o=c-this.lastDroppedFrames,u=n-this.lastDecodedFrames,h=1e3*o/a,s=this.hls;if(s.trigger(M.Events.FPS_DROP,{currentDropped:o,currentDecoded:u,totalDroppedFrames:c}),h>0&&o>s.config.fpsDroppedMonitoringThreshold*u){var l=s.currentLevel;m.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(s.autoLevelCapping===-1||s.autoLevelCapping>=l)&&(l=l-1,s.trigger(M.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:s.currentLevel}),s.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=c,this.lastDecodedFrames=n}},b.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var n=d.getVideoPlaybackQuality();this.checkFPS(d,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},T}();g.default=y},"./src/controller/fragment-finders.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"findFragmentByPDT",function(){return y}),O.d(g,"findFragmentByPTS",function(){return T}),O.d(g,"fragmentWithinToleranceTest",function(){return b}),O.d(g,"pdtWithinToleranceTest",function(){return p}),O.d(g,"findFragWithCC",function(){return d});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/binary-search.ts");function y(n,c,r){if(c===null||!Array.isArray(n)||!n.length||!Object(M.isFiniteNumber)(c))return null;var a=n[0].programDateTime;if(c<(a||0))return null;var o=n[n.length-1].endProgramDateTime;if(c>=(o||0))return null;r=r||0;for(var u=0;u<n.length;++u){var h=n[u];if(p(c,r,h))return h}return null}function T(n,c,r,a){r===void 0&&(r=0),a===void 0&&(a=0);var o=null;if(n?o=c[n.sn-c[0].sn+1]||null:r===0&&c[0].start===0&&(o=c[0]),o&&b(r,a,o)===0)return o;var u=m.default.search(c,b.bind(null,r,a));return u||o}function b(n,c,r){n===void 0&&(n=0),c===void 0&&(c=0);var a=Math.min(c,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-a<=n?1:r.start-a>n&&r.start?-1:0}function p(n,c,r){var a=Math.min(c,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3,o=r.endProgramDateTime||0;return o-a>n}function d(n,c){return m.default.search(n,function(r){return r.cc<c?1:r.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"FragmentState",function(){return y}),O.d(g,"FragmentTracker",function(){return T});var M=O("./src/events.ts"),m=O("./src/types/loader.ts"),y;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(y||(y={}));var T=function(){function d(c){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=c,this._registerListeners()}var n=d.prototype;return n._registerListeners=function(){var r=this.hls;r.on(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(M.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var r=this.hls;r.off(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(M.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(r,a){if(a===m.PlaylistLevelType.MAIN){var o=this.activeFragment,u=this.activeParts;if(!o)return null;if(u)for(var h=u.length;h--;){var s=u[h],l=s?s.end:o.appendedPTS;if(s.start<=r&&l!==void 0&&r<=l)return h>9&&(this.activeParts=u.slice(h-9)),s}else if(o.start<=r&&o.appendedPTS!==void 0&&r<=o.appendedPTS)return o}return this.getBufferedFrag(r,a)},n.getBufferedFrag=function(r,a){for(var o=this.fragments,u=Object.keys(o),h=u.length;h--;){var s=o[u[h]];if((s==null?void 0:s.body.type)===a&&s.buffered){var l=s.body;if(l.start<=r&&r<=l.end)return l}}return null},n.detectEvictedFragments=function(r,a,o){var u=this;Object.keys(this.fragments).forEach(function(h){var s=u.fragments[h];if(!s)return;if(!s.buffered){s.body.type===o&&u.removeFragment(s.body);return}var l=s.range[r];if(!l)return;l.time.some(function(t){var S=!u.isTimeBuffered(t.startPTS,t.endPTS,a);return S&&u.removeFragment(s.body),S})})},n.detectPartialFragments=function(r){var a=this,o=this.timeRanges,u=r.frag,h=r.part;if(!o||u.sn==="initSegment")return;var s=p(u),l=this.fragments[s];if(!l)return;Object.keys(o).forEach(function(t){var S=u.elementaryStreams[t];if(!S)return;var x=o[t],f=h!==null||S.partial===!0;l.range[t]=a.getBufferedTimes(u,h,f,x)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},n.fragBuffered=function(r){var a=p(r),o=this.fragments[a];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},n.getBufferedTimes=function(r,a,o,u){for(var h={time:[],partial:o},s=a?a.start:r.start,l=a?a.end:r.end,t=r.minEndPTS||l,S=r.maxStartPTS||s,x=0;x<u.length;x++){var f=u.start(x)-this.bufferPadding,R=u.end(x)+this.bufferPadding;if(S>=f&&t<=R){h.time.push({startPTS:Math.max(s,u.start(x)),endPTS:Math.min(l,u.end(x))});break}else if(s<R&&l>f)h.partial=!0,h.time.push({startPTS:Math.max(s,u.start(x)),endPTS:Math.min(l,u.end(x))});else if(l<=f)break}return h},n.getPartialFragment=function(r){var a=null,o,u,h,s=0,l=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var x=t[S];if(!x)return;b(x)&&(u=x.body.start-l,h=x.body.end+l,r>=u&&r<=h&&(o=Math.min(r-u,h-r),s<=o&&(a=x.body,s=o)))}),a},n.getState=function(r){var a=p(r),o=this.fragments[a];return o?o.buffered?b(o)?y.PARTIAL:y.OK:o.backtrack?y.BACKTRACKED:y.APPENDING:y.NOT_LOADED},n.backtrack=function(r,a){var o=p(r),u=this.fragments[o];if(!u||u.backtrack)return null;var h=u.backtrack=a||u.loaded;return u.loaded=null,h},n.getBacktrackData=function(r){var a=p(r),o=this.fragments[a];if(o){var u,h=o.backtrack;if(h!=null&&(u=h.payload)!==null&&u!==void 0&&u.byteLength)return h;this.removeFragment(r)}return null},n.isTimeBuffered=function(r,a,o){for(var u,h,s=0;s<o.length;s++){if(u=o.start(s)-this.bufferPadding,h=o.end(s)+this.bufferPadding,r>=u&&a<=h)return!0;if(a<=u)return!1}return!1},n.onFragLoaded=function(r,a){var o=a.frag,u=a.part;if(o.sn==="initSegment"||o.bitrateTest||u)return;var h=p(o);this.fragments[h]={body:o,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(r,a){var o=this,u=a.frag,h=a.part,s=a.timeRanges;if(u.type===m.PlaylistLevelType.MAIN)if(this.activeFragment=u,h){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(h)}else this.activeParts=null;this.timeRanges=s,Object.keys(s).forEach(function(t){var S=s[t];if(o.detectEvictedFragments(t,S),!h)for(var x=0;x<S.length;x++)u.appendedPTS=Math.max(S.end(x),u.appendedPTS||0)})},n.onFragBuffered=function(r,a){this.detectPartialFragments(a)},n.hasFragment=function(r){var a=p(r);return!!this.fragments[a]},n.removeFragmentsInRange=function(r,a,o){var u=this;Object.keys(this.fragments).forEach(function(h){var s=u.fragments[h];if(!s)return;if(s.buffered){var l=s.body;l.type===o&&l.start<a&&l.end>r&&u.removeFragment(l)}})},n.removeFragment=function(r){var a=p(r);r.stats.loaded=0,r.clearElementaryStreamInfo(),delete this.fragments[a]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function b(d){var n,c;return d.buffered&&(((n=d.range.video)===null||n===void 0?void 0:n.partial)||((c=d.range.audio)===null||c===void 0?void 0:c.partial))}function p(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"STALL_MINIMUM_DURATION_MS",function(){return b}),O.d(g,"MAX_START_GAP_JUMP",function(){return p}),O.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),O.d(g,"SKIP_BUFFER_RANGE_START",function(){return n}),O.d(g,"default",function(){return c});var M=O("./src/utils/buffer-helper.ts"),m=O("./src/errors.ts"),y=O("./src/events.ts"),T=O("./src/utils/logger.ts"),b=250,p=2,d=.1,n=.05,c=function(){function r(o,u,h,s){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=o,this.media=u,this.fragmentTracker=h,this.hls=s}var a=r.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(u){var h=this.config,s=this.media,l=this.stalled,t=s.currentTime,S=s.seeking,x=this.seeking&&!S,f=!this.seeking&&S;if(this.seeking=S,t!==u){if(this.moved=!0,l!==null){if(this.stallReported){var R=self.performance.now()-l;T.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((f||x)&&(this.stalled=null),s.paused||s.ended||s.playbackRate===0||!M.BufferHelper.getBuffered(s).length)return;var C=M.BufferHelper.bufferInfo(s,t,0),v=C.len>0,_=C.nextStart||0;if(!v&&!_)return;if(S){var E=C.len>p,w=!_||_-t>p&&!this.fragmentTracker.getPartialFragment(t);if(E||w)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k,I=Math.max(_,C.start||0)-t,L=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,V=L==null||((k=L.details)===null||k===void 0)?void 0:k.live,W=V?L.details.targetduration*2:p;if(I>0&&I<=W){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(l===null){this.stalled=H;return}var G=H-l;!S&&G>=b&&this._reportStall(C.len);var B=M.BufferHelper.bufferInfo(s,t,h.maxBufferHole);this._tryFixBufferStall(B,G)},a._tryFixBufferStall=function(u,h){var s=this.config,l=this.fragmentTracker,t=this.media,S=t.currentTime,x=l.getPartialFragment(S);if(x){var f=this._trySkipBufferHole(x);if(f)return}u.len>s.maxBufferHole&&h>s.highBufferWatchdogPeriod*1e3&&(T.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(u){var h=this.hls,s=this.media,l=this.stallReported;l||(this.stallReported=!0,T.logger.warn("Playback stalling at @"+s.currentTime+" due to low buffer (buffer="+u+")"),h.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:u}))},a._trySkipBufferHole=function(u){for(var h=this.config,s=this.hls,l=this.media,t=l.currentTime,S=0,x=M.BufferHelper.getBuffered(l),f=0;f<x.length;f++){var R=x.start(f);if(t+h.maxBufferHole>=S&&t<R){var C=Math.max(R+n,l.currentTime+d);return T.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+C),this.moved=!0,this.stalled=null,l.currentTime=C,u&&s.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+C,frag:u}),C}S=x.end(f)}return 0},a._tryNudgeBuffer=function(){var u=this.config,h=this.hls,s=this.media,l=s.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<u.nudgeMaxRetry){var S=l+t*u.nudgeOffset;T.logger.warn("Nudging 'currentTime' from "+l+" to "+S),s.currentTime=S,h.trigger(y.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 @"+l+" after "+u.nudgeMaxRetry+" nudges"),h.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},r}()},"./src/controller/id3-track-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/utils/texttrack-utils.ts"),y=O("./src/demux/id3.ts"),T=.25,b=function(){function p(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var d=p.prototype;return d.destroy=function(){this._unregisterListeners()},d._registerListeners=function(){var c=this.hls;c.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(M.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d._unregisterListeners=function(){var c=this.hls;c.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(M.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d.onMediaAttached=function(c,r){this.media=r.media},d.onMediaDetaching=function(){if(!this.id3Track)return;Object(m.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},d.getID3Track=function(c){if(!this.media)return;for(var r=0;r<c.length;r++){var a=c[r];if(a.kind==="metadata"&&a.label==="id3")return Object(m.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},d.onFragParsingMetadata=function(c,r){if(!this.media)return;var a=r.frag,o=r.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var u=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,h=0;h<o.length;h++){var s=y.getID3Frames(o[h].data);if(s){var l=o[h].pts,t=h<o.length-1?o[h+1].pts:a.end,S=t-l;S<=0&&(t=l+T);for(var x=0;x<s.length;x++){var f=s[x];if(!y.isTimeStampFrame(f)){var R=new u(l,t,"");R.value=f,this.id3Track.addCue(R)}}}}},d.onBufferFlushing=function(c,r){var a=r.startOffset,o=r.endOffset,u=r.type;if(!u||u==="audio"){var h=this.id3Track;h&&Object(m.removeCuesInRange)(h,a,o)}},p}();g.default=b},"./src/controller/latency-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return p});var M=O("./src/errors.ts"),m=O("./src/events.ts"),y=O("./src/utils/logger.ts");function T(d,n){for(var c=0;c<n.length;c++){var r=n[c];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,r.key,r)}}function b(d,n,c){return n&&T(d.prototype,n),c&&T(d,c),d}var p=function(){function d(c){var r=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 r.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var n=d.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.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)},n.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)},n.onMediaAttached=function(r,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},n.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},n.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},n.onLevelUpdated=function(r,a){var o=a.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(r,a){if(a.details!==M.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,y.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var r=this.media,a=this.levelDetails;if(!r||!a)return;this.currentTime=r.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var u=this.config,h=u.lowLatencyMode,s=u.maxLiveSyncPlaybackRate;if(!h||s===1)return;var l=this.targetLatency;if(l===null)return;var t=o-l,S=Math.min(this.maxLatency,l+a.targetduration),x=t<S;if(a.live&&x&&t>.05&&this.forwardBufferLength>1){var f=Math.min(2,Math.max(1,s)),R=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;r.playbackRate=Math.min(f,Math.max(1,R))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)},n.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},n.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},b(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,a=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:a?r.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var a=r.holdBack,o=r.partHoldBack,u=r.targetduration,h=this.config,s=h.liveSyncDuration,l=h.liveSyncDurationCount,t=h.lowLatencyMode,S=this.hls.userConfig,x=t&&o||a;(S.liveSyncDuration||S.liveSyncDurationCount||x===0)&&(x=s!==void 0?s:l*u);var f=u,R=1;return x+Math.min(this.stallCount*R,f)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),a=this.targetLatency,o=this.levelDetails;if(r===null||a===null||o===null)return null;var u=o.edge,h=r-a-this.edgeStalled,s=u-o.totalduration,l=u-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(s,h),l)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var a=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-a,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,a=this.levelDetails;if(!r||!a)return 0;var o=r.buffered.length;return o?r.buffered.end(o-1):a.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return h});var M=O("./src/types/level.ts"),m=O("./src/events.ts"),y=O("./src/errors.ts"),T=O("./src/utils/codecs.ts"),b=O("./src/controller/level-helper.ts"),p=O("./src/controller/base-playlist-controller.ts"),d=O("./src/types/loader.ts");function n(){return n=Object.assign||function(s){for(var l=1;l<arguments.length;l++){var t=arguments[l];for(var S in t)Object.prototype.hasOwnProperty.call(t,S)&&(s[S]=t[S])}return s},n.apply(this,arguments)}function c(s,l){for(var t=0;t<l.length;t++){var S=l[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(s,S.key,S)}}function r(s,l,t){return l&&c(s.prototype,l),t&&c(s,t),s}function a(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,o(s,l)}function o(s,l){return o=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S},o(s,l)}var u=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),h=function(s){a(l,s);function l(S){var x;return x=s.call(this,S,"[level-controller]")||this,x._levels=[],x._firstLevel=-1,x._startLevel=void 0,x.currentLevelIndex=-1,x.manualLevelIndex=-1,x.onParsedComplete=void 0,x._registerListeners(),x}var t=l.prototype;return t._registerListeners=function(){var x=this.hls;x.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),x.on(m.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var x=this.hls;x.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),x.off(m.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,s.prototype.destroy.call(this)},t.startLoad=function(){var x=this._levels;x.forEach(function(f){f.loadError=0}),s.prototype.startLoad.call(this)},t.onManifestLoaded=function(x,f){var R=[],C=[],v=[],_,E={},w,k=!1,I=!1,L=!1;if(f.levels.forEach(function(G){var B=G.attrs;k=k||!!(G.width&&G.height),I=I||!!G.videoCodec,L=L||!!G.audioCodec,u&&G.audioCodec&&G.audioCodec.indexOf("mp4a.40.34")!==-1&&(G.audioCodec=void 0);var P=G.bitrate+"-"+G.attrs.RESOLUTION+"-"+G.attrs.CODECS;w=E[P],w?w.url.push(G.url):(w=new M.Level(G),E[P]=w,R.push(w)),B&&(B.AUDIO&&Object(b.addGroupId)(w,"audio",B.AUDIO),B.SUBTITLES&&Object(b.addGroupId)(w,"text",B.SUBTITLES))}),(k||I)&&L&&(R=R.filter(function(G){var B=G.videoCodec,P=G.width,z=G.height;return!!B||!!(P&&z)})),R=R.filter(function(G){var B=G.audioCodec,P=G.videoCodec;return(!B||Object(T.isCodecSupportedInMp4)(B,"audio"))&&(!P||Object(T.isCodecSupportedInMp4)(P,"video"))}),f.audioTracks&&(C=f.audioTracks.filter(function(G){return!G.audioCodec||Object(T.isCodecSupportedInMp4)(G.audioCodec,"audio")}),Object(b.assignTrackIdsByGroup)(C)),f.subtitles&&(v=f.subtitles,Object(b.assignTrackIdsByGroup)(v)),R.length>0){_=R[0].bitrate,R.sort(function(G,B){return G.bitrate-B.bitrate}),this._levels=R;for(var V=0;V<R.length;V++)if(R[V].bitrate===_){this._firstLevel=V,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+_);break}var W=L&&!I,H={levels:R,audioTracks:C,subtitleTracks:v,firstLevel:this._firstLevel,stats:f.stats,audio:L,video:I,altAudio:!W&&C.some(function(G){return!!G.url})};this.hls.trigger(m.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:f.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(x,f){if(s.prototype.onError.call(this,x,f),f.fatal)return;var R=f.context,C=this._levels[this.currentLevelIndex];if(R&&(R.type===d.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&R.groupId===C.audioGroupIds[C.urlId]||R.type===d.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&R.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var v=!1,_=!0,E;switch(f.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:case y.ErrorDetails.KEY_LOAD_ERROR:case y.ErrorDetails.KEY_LOAD_TIMEOUT:if(f.frag){var w=this._levels[f.frag.level];w?(w.fragmentError++,w.fragmentError>this.hls.config.fragLoadingMaxRetry&&(E=f.frag.level)):E=f.frag.level}break;case y.ErrorDetails.LEVEL_LOAD_ERROR:case y.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(_=!1),E=R.level),v=!0;break;case y.ErrorDetails.REMUX_ALLOC_ERROR:E=f.level,v=!0;break}E!==void 0&&this.recoverLevel(f,E,v,_)},t.recoverLevel=function(x,f,R,C){var v=x.details,_=this._levels[f];if(_.loadError++,R){var E=this.retryLoadingOrFail(x);if(E)x.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var w=_.url.length;if(w>1&&_.loadError<w)x.levelRetry=!0,this.redundantFailover(f);else if(this.manualLevelIndex===-1){var k=f===0?this._levels.length-1:f-1;this.currentLevelIndex!==k&&this._levels[k].loadError===0&&(this.warn(v+": switch to "+k),x.levelRetry=!0,this.hls.nextAutoLevel=k)}}},t.redundantFailover=function(x){var f=this._levels[x],R=f.url.length;if(R>1){var C=(f.urlId+1)%R;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(v){v.urlId=C}),this.level=x}},t.onFragLoaded=function(x,f){var R=f.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var C=this._levels[R.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},t.onLevelLoaded=function(x,f){var R,C=f.level,v=f.details,_=this._levels[C];if(!_){var E;this.warn("Invalid level index "+C),(E=f.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(v.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(_.fragmentError===0&&(_.loadError=0,this.retryCount=0),this.playlistLoaded(C,f,_.details)):(R=f.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(v.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(x,f){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var C=-1,v=this.hls.audioTracks[f.id].groupId,_=0;_<R.audioGroupIds.length;_++)if(R.audioGroupIds[_]===v){C=_;break}C!==R.urlId&&(R.urlId=C,this.startLoad())}},t.loadPlaylist=function(x){var f=this.currentLevelIndex,R=this._levels[f];if(this.canLoad&&R&&R.url.length>0){var C=R.urlId,v=R.url[C];if(x)try{v=x.addDirectives(v)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Attempt loading level index "+f+(x?" at sn "+x.msn+" part "+x.part:"")+" with URL-id "+C+" "+v),this.clearTimer(),this.hls.trigger(m.Events.LEVEL_LOADING,{url:v,level:f,id:C,deliveryDirectives:x||null})}},t.removeLevel=function(x,f){var R=function(_,E){return E!==f},C=this._levels.filter(function(v,_){return _!==x?!0:v.url.length>1&&f!==void 0?(v.url=v.url.filter(R),v.audioGroupIds&&(v.audioGroupIds=v.audioGroupIds.filter(R)),v.textGroupIds&&(v.textGroupIds=v.textGroupIds.filter(R)),v.urlId=0,!0):!1}).map(function(v,_){var E=v.details;return E!=null&&E.fragments&&E.fragments.forEach(function(w){w.level=_}),v});this._levels=C,this.hls.trigger(m.Events.LEVELS_UPDATED,{levels:C})},r(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(x){var f,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===x&&(f=R[x])!==null&&f!==void 0&&f.details)return;if(x<0||x>=R.length){var C=x<0;if(this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.OTHER_ERROR,details:y.ErrorDetails.LEVEL_SWITCH_ERROR,level:x,fatal:C,reason:"invalid level idx"}),C)return;x=Math.min(x,R.length-1)}this.clearTimer();var v=this.currentLevelIndex,_=R[v],E=R[x];this.log("switching to level "+x+" from "+v),this.currentLevelIndex=x;var w=n({},E,{level:x,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete w._urlId,this.hls.trigger(m.Events.LEVEL_SWITCHING,w);var k=E.details;if(!k||k.live){var I=this.switchParams(E.uri,_==null?void 0:_.details);this.loadPlaylist(I)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(x){this.manualLevelIndex=x,this._startLevel===void 0&&(this._startLevel=x),x!==-1&&(this.level=x)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(x){this._firstLevel=x}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var x=this.hls.config.startLevel;return x!==void 0?x:this._firstLevel}else return this._startLevel},set:function(x){this._startLevel=x}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(x){this.level=x,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=x)}}]),l}(p.default)},"./src/controller/level-helper.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"addGroupId",function(){return y}),O.d(g,"assignTrackIdsByGroup",function(){return T}),O.d(g,"updatePTS",function(){return b}),O.d(g,"updateFragPTSDTS",function(){return d}),O.d(g,"mergeDetails",function(){return n}),O.d(g,"mapPartIntersection",function(){return c}),O.d(g,"mapFragmentIntersection",function(){return r}),O.d(g,"adjustSliding",function(){return a}),O.d(g,"addSliding",function(){return o}),O.d(g,"computeReloadInterval",function(){return u}),O.d(g,"getFragmentWithSN",function(){return h}),O.d(g,"getPartWith",function(){return s});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/logger.ts");function y(l,t,S){switch(t){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(S);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(S);break}}function T(l){var t={};l.forEach(function(S){var x=S.groupId||"";S.id=t[x]=t[x]||0,t[x]++})}function b(l,t,S){var x=l[t],f=l[S];p(x,f)}function p(l,t){var S=t.startPTS;if(Object(M.isFiniteNumber)(S)){var x=0,f;t.sn>l.sn?(x=S-l.start,f=l):(x=l.start-S,f=t),f.duration!==x&&(f.duration=x)}else if(t.sn>l.sn){var R=l.cc===t.cc;R&&l.minEndPTS?t.start=l.start+(l.minEndPTS-l.start):t.start=l.start+l.duration}else t.start=Math.max(l.start-t.duration,0)}function d(l,t,S,x,f,R){var C=x-S;C<=0&&(m.logger.warn("Fragment should have a positive duration",t),x=S+t.duration,R=f+t.duration);var v=S,_=x,E=t.startPTS,w=t.endPTS;if(Object(M.isFiniteNumber)(E)){var k=Math.abs(E-S);Object(M.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(k,t.deltaPTS):t.deltaPTS=k,v=Math.max(S,E),S=Math.min(S,E),f=Math.min(f,t.startDTS),_=Math.min(x,w),x=Math.max(x,w),R=Math.max(R,t.endDTS)}t.duration=x-S;var I=S-t.start;t.appendedPTS=x,t.start=t.startPTS=S,t.maxStartPTS=v,t.startDTS=f,t.endPTS=x,t.minEndPTS=_,t.endDTS=R;var L=t.sn;if(!l||L<l.startSN||L>l.endSN)return 0;var V,W=L-l.startSN,H=l.fragments;for(H[W]=t,V=W;V>0;V--)p(H[V],H[V-1]);for(V=W;V<H.length-1;V++)p(H[V],H[V+1]);return l.fragmentHint&&p(H[H.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,I}function n(l,t){for(var S=null,x=l.fragments,f=x.length-1;f>=0;f--){var R=x[f].initSegment;if(R){S=R;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var C=0,v;if(r(l,t,function(V,W){V.relurl&&(C=V.cc-W.cc),Object(M.isFiniteNumber)(V.startPTS)&&Object(M.isFiniteNumber)(V.endPTS)&&(W.start=W.startPTS=V.startPTS,W.startDTS=V.startDTS,W.appendedPTS=V.appendedPTS,W.maxStartPTS=V.maxStartPTS,W.endPTS=V.endPTS,W.endDTS=V.endDTS,W.minEndPTS=V.minEndPTS,W.duration=V.endPTS-V.startPTS,W.duration&&(v=W),t.PTSKnown=t.alignedSliding=!0),W.elementaryStreams=V.elementaryStreams,W.loader=V.loader,W.stats=V.stats,W.urlId=V.urlId,V.initSegment&&(W.initSegment=V.initSegment,S=V.initSegment)}),S){var _=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;_.forEach(function(V){var W;(!V.initSegment||V.initSegment.relurl===((W=S)===null||W===void 0?void 0:W.relurl))&&(V.initSegment=S)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(V){return!V}),t.deltaUpdateFailed)){m.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=t.skippedSegments;E--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var w=t.fragments;if(C){m.logger.warn("discontinuity sliding from playlist, take drift into account");for(var k=0;k<w.length;k++)w[k].cc+=C}t.skippedSegments&&(t.startCC=t.fragments[0].cc),c(l.partList,t.partList,function(V,W){W.elementaryStreams=V.elementaryStreams,W.stats=V.stats}),v?d(t,v,v.startPTS,v.endPTS,v.startDTS,v.endDTS):a(l,t),w.length&&(t.totalduration=t.edge-w[0].start),t.driftStartTime=l.driftStartTime,t.driftStart=l.driftStart;var I=t.advancedDateTime;if(t.advanced&&I){var L=t.edge;t.driftStart||(t.driftStartTime=I,t.driftStart=L),t.driftEndTime=I,t.driftEnd=L}else t.driftEndTime=l.driftEndTime,t.driftEnd=l.driftEnd,t.advancedDateTime=l.advancedDateTime}function c(l,t,S){if(l&&t)for(var x=0,f=0,R=l.length;f<=R;f++){var C=l[f],v=t[f+x];C&&v&&C.index===v.index&&C.fragment.sn===v.fragment.sn?S(C,v):x--}}function r(l,t,S){for(var x=t.skippedSegments,f=Math.max(l.startSN,t.startSN)-t.startSN,R=(l.fragmentHint?1:0)+(x?t.endSN:Math.min(l.endSN,t.endSN))-t.startSN,C=t.startSN-l.startSN,v=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,_=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,E=f;E<=R;E++){var w=_[C+E],k=v[E];x&&!k&&E<x&&(k=t.fragments[E]=w),w&&k&&S(w,k)}}function a(l,t){var S=t.startSN+t.skippedSegments-l.startSN,x=l.fragments;if(S<0||S>=x.length)return;o(t,x[S].start)}function o(l,t){if(t){for(var S=l.fragments,x=l.skippedSegments;x<S.length;x++)S[x].start+=t;l.fragmentHint&&(l.fragmentHint.start+=t)}}function u(l,t){var S=1e3*l.levelTargetDuration,x=S/2,f=l.age,R=f>0&&f<S*3,C=t.loading.end-t.loading.start,v,_=l.availabilityDelay;if(l.updated===!1)if(R){var E=333*l.misses;v=Math.max(Math.min(x,C*2),E),l.availabilityDelay=(l.availabilityDelay||0)+v}else v=x;else R?(_=Math.min(_||S/2,f),l.availabilityDelay=_,v=_+S-f):v=S-C;return Math.round(v)}function h(l,t,S){if(!l||!l.details)return null;var x=l.details,f=x.fragments[t-x.startSN];return f||(f=x.fragmentHint,f&&f.sn===t?f:t<x.startSN&&S&&S.sn===t?S:null)}function s(l,t,S){if(!l||!l.details)return null;var x=l.details.partList;if(x)for(var f=x.length;f--;){var R=x[f];if(R.index===S&&R.fragment.sn===t)return R}return null}},"./src/controller/stream-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return x});var M=O("./src/polyfills/number.ts"),m=O("./src/controller/base-stream-controller.ts"),y=O("./src/is-supported.ts"),T=O("./src/events.ts"),b=O("./src/utils/buffer-helper.ts"),p=O("./src/controller/fragment-tracker.ts"),d=O("./src/types/loader.ts"),n=O("./src/loader/fragment.ts"),c=O("./src/demux/transmuxer-interface.ts"),r=O("./src/types/transmuxer.ts"),a=O("./src/controller/gap-controller.ts"),o=O("./src/errors.ts"),u=O("./src/utils/logger.ts");function h(f,R){for(var C=0;C<R.length;C++){var v=R[C];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(f,v.key,v)}}function s(f,R,C){return R&&h(f.prototype,R),C&&h(f,C),f}function l(f,R){f.prototype=Object.create(R.prototype),f.prototype.constructor=f,t(f,R)}function t(f,R){return t=Object.setPrototypeOf||function(v,_){return v.__proto__=_,v},t(f,R)}var S=100,x=function(f){l(R,f);function R(v,_){var E;return E=f.call(this,v,_,"[stream-controller]")||this,E.audioCodecSwap=!1,E.gapController=null,E.level=-1,E._forceStartLoad=!1,E.altAudio=!1,E.audioOnly=!1,E.fragPlaying=null,E.onvplaying=null,E.onvseeked=null,E.fragLastKbps=0,E.stalled=!1,E.couldBacktrack=!1,E.audioCodecSwitch=!1,E.videoBuffer=null,E._registerListeners(),E}var C=R.prototype;return C._registerListeners=function(){var _=this.hls;_.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),_.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),_.on(T.Events.LEVEL_LOADING,this.onLevelLoading,this),_.on(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(T.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),_.on(T.Events.ERROR,this.onError,this),_.on(T.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),_.on(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(T.Events.BUFFER_CREATED,this.onBufferCreated,this),_.on(T.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),_.on(T.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),_.on(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var _=this.hls;_.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),_.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),_.off(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(T.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),_.off(T.Events.ERROR,this.onError,this),_.off(T.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),_.off(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(T.Events.BUFFER_CREATED,this.onBufferCreated,this),_.off(T.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),_.off(T.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),_.off(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(_){if(this.levels){var E=this.lastCurrentTime,w=this.hls;if(this.stopLoad(),this.setInterval(S),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var k=w.startLevel;k===-1&&(w.config.testBandwidth?(k=0,this.bitrateTest=!0):k=w.nextAutoLevel),this.level=w.nextLoadLevel=k,this.loadedmetadata=!1}E>0&&_===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),_=E),this.state=m.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=_,this.tick()}else this._forceStartLoad=!0,this.state=m.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,f.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_LEVEL:{var _,E=this.levels,w=this.level,k=E==null||((_=E[w])===null||_===void 0)?void 0:_.details;if(k&&(!k.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(k))break;this.state=m.State.IDLE;break}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var I,L=self.performance.now(),V=this.retryDate;(!V||L>=V||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=m.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){f.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var _,E,w=this.hls,k=this.levelLastLoaded,I=this.levels,L=this.media,V=w.config,W=w.nextLoadLevel;if(k===null||!L&&(this.startFragRequested||!V.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!I||!I[W])return;var H=I[W];this.level=w.nextLoadLevel=W;var G=H.details;if(!G||this.state===m.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==W){this.state=m.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:L,d.PlaylistLevelType.MAIN);if(B===null)return;var P=B.len,z=this.getMaxBufferLength(H.maxBitrate);if(P>=z)return;if(this._streamEnded(B,G)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(T.Events.BUFFER_EOS,J),this.state=m.State.ENDED;return}var ue=B.end,de=this.getNextFragment(ue,G);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Se=de.sn-G.startSN;Se>1&&(de=G.fragments[Se-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===p.FragmentState.OK&&this.nextLoadPosition>ue){var Ae=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(L,Ae,d.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,G)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((_=de.decryptdata)===null||_===void 0?void 0:_.keyFormat)==="identity"&&!((E=de.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(de,G):this.loadFragment(de,G,ue)},C.loadFragment=function(_,E,w){var k,I=this.fragmentTracker.getState(_);if(this.fragCurrent=_,I===p.FragmentState.BACKTRACKED){var L=this.fragmentTracker.getBacktrackData(_);if(L){this._handleFragmentLoadProgress(L),this._handleFragmentLoadComplete(L);return}else I=p.FragmentState.NOT_LOADED}I===p.FragmentState.NOT_LOADED||I===p.FragmentState.PARTIAL?_.sn==="initSegment"?this._loadInitSegment(_):this.bitrateTest?(_.bitrateTest=!0,this.log("Fragment "+_.sn+" of level "+_.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(_)):(this.startFragRequested=!0,f.prototype.loadFragment.call(this,_,E,w)):I===p.FragmentState.APPENDING?this.reduceMaxBufferLength(_.duration)&&this.fragmentTracker.removeFragment(_):((k=this.media)===null||k===void 0?void 0:k.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(_){var E=this.fragmentTracker.getAppendedFrag(_,d.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},C.getBufferedFrag=function(_){return this.fragmentTracker.getBufferedFrag(_,d.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(_){return _?this.getBufferedFrag(_.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var _=this.levels,E=this.media;if(E!=null&&E.readyState){var w,k=this.getAppendedFrag(E.currentTime);if(k&&k.start>1&&this.flushMainBuffer(0,k.start-1),!E.paused&&_){var I=this.hls.nextLoadLevel,L=_[I],V=this.fragLastKbps;V&&this.fragCurrent?w=this.fragCurrent.duration*L.maxBitrate/(1e3*V)+1:w=0}else w=0;var W=this.getBufferedFrag(E.currentTime+w);if(W){var H=this.followingBufferedFrag(W);if(H){this.abortCurrentFrag();var G=H.maxStartPTS?H.maxStartPTS:H.start,B=H.duration,P=Math.max(W.end,G+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var _=this.fragCurrent;this.fragCurrent=null,_!=null&&_.loader&&_.loader.abort(),this.state===m.State.KEY_LOADING&&(this.state=m.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(_,E){f.prototype.flushMainBuffer.call(this,_,E,this.altAudio?"video":null)},C.onMediaAttached=function(_,E){f.prototype.onMediaAttached.call(this,_,E);var w=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),w.addEventListener("playing",this.onvplaying),w.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,w,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var _=this.media;_&&(_.removeEventListener("playing",this.onvplaying),_.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),f.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var _=this.media,E=_?_.currentTime:null;Object(M.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},C.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},C.onManifestParsed=function(_,E){var w=!1,k=!1,I;E.levels.forEach(function(L){I=L.audioCodec,I&&(I.indexOf("mp4a.40.2")!==-1&&(w=!0),I.indexOf("mp4a.40.5")!==-1&&(k=!0))}),this.audioCodecSwitch=w&&k&&!Object(y.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=E.levels,this.startFragRequested=!1},C.onLevelLoading=function(_,E){var w=this.levels;if(!w||this.state!==m.State.IDLE)return;var k=w[E.level];(!k.details||k.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(k.details))&&(this.state=m.State.WAITING_LEVEL)},C.onLevelLoaded=function(_,E){var w,k=this.levels,I=E.level,L=E.details,V=L.totalduration;if(!k){this.warn("Levels were reset while loading level "+I);return}this.log("Level "+I+" loaded ["+L.startSN+","+L.endSN+"], cc ["+L.startCC+", "+L.endCC+"] duration:"+V);var W=this.fragCurrent;W&&(this.state===m.State.FRAG_LOADING||this.state===m.State.FRAG_LOADING_WAITING_RETRY)&&(W.level!==E.level&&W.loader&&(this.state=m.State.IDLE,W.loader.abort()));var H=k[I],G=0;if(L.live||(w=H.details)!==null&&w!==void 0&&w.live){if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed)return;G=this.alignPlaylists(L,H.details)}if(H.details=L,this.levelLastLoaded=I,this.hls.trigger(T.Events.LEVEL_UPDATED,{details:L,level:I}),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,G),this.tick()},C._handleFragmentLoadProgress=function(_){var E,w=_.frag,k=_.part,I=_.payload,L=this.levels;if(!L){this.warn("Levels were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var V=L[w.level],W=V.details;if(!W){this.warn("Dropping fragment "+w.sn+" of level "+w.level+" after level details were reset");return}var H=V.videoCodec,G=W.PTSKnown||!W.live,B=(E=w.initSegment)===null||E===void 0?void 0:E.data,P=this._getAudioCodec(V),z=this.transmuxer=this.transmuxer||new c.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=k?k.index:-1,ue=J!==-1,de=new r.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,I.byteLength,J,ue),Se=this.initPTS[w.cc];z.push(I,B,P,H,w,k,W.totalduration,G,de,Se)},C.onAudioTrackSwitching=function(_,E){var w=this.altAudio,k=!!E.url,I=E.id;if(!k){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 V=this.hls;w&&V.trigger(T.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),V.trigger(T.Events.AUDIO_TRACK_SWITCHED,{id:I})}},C.onAudioTrackSwitched=function(_,E){var w=E.id,k=!!this.hls.audioTracks[w].url;if(k){var I=this.videoBuffer;I&&this.mediaBuffer!==I&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=I)}this.altAudio=k,this.tick()},C.onBufferCreated=function(_,E){var w=E.tracks,k,I,L=!1;for(var V in w){var W=w[V];if(W.id==="main"){if(I=V,k=W,V==="video"){var H=w[V];H&&(this.videoBuffer=H.buffer)}}else L=!0}L&&k?(this.log("Alternate track found, use "+I+".buffered to schedule main fragment loading"),this.mediaBuffer=k.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(_,E){var w=E.frag,k=E.part;if(w&&w.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(k?" p: "+k.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state),this.state===m.State.PARSED&&(this.state=m.State.IDLE);return}var I=k?k.stats:w.stats;this.fragLastKbps=Math.round(8*I.total/(I.buffering.end-I.loading.first)),w.sn!=="initSegment"&&(this.fragPrevious=w),this.fragBufferedComplete(w,k)},C.onError=function(_,E){switch(E.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.MAIN,E);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==m.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=m.State.ERROR):!E.levelRetry&&this.state===m.State.WAITING_LEVEL&&(this.state=m.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var w=!0,k=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);k&&k.len>.5&&(w=!this.reduceMaxBufferLength(k.len)),w&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var _=this.media,E=this.gapController;if(!_||!E||!_.readyState)return;var w=b.BufferHelper.getBuffered(_);!this.loadedmetadata&&w.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=_.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=m.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(_,E){var w=E.type;if(w!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var k=(w===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(k,w,d.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(_,E){this.levels=E.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var _=this.media,E=_.currentTime,w=this.startPosition;if(w>=0&&E<w){if(_.seeking){u.logger.log("could not seek to "+w+", already seeking at "+E);return}var k=b.BufferHelper.getBuffered(_),I=k.length?k.start(0):0,L=I-w;L>0&&(L<this.config.maxBufferHole||L<this.config.maxFragLookUpTolerance)&&(u.logger.log("adjusting start position by "+L+" to match buffer start"),w+=L,this.startPosition=w),this.log("seek to target start position "+w+" from current time "+E),_.currentTime=w}},C._getAudioCodec=function(_){var E=this.config.defaultAudioCodec||_.audioCodec;return this.audioCodecSwap&&E&&(this.log("Swapping audio codec"),E.indexOf("mp4a.40.5")!==-1?E="mp4a.40.2":E="mp4a.40.5"),E},C._loadBitrateTestFrag=function(_){var E=this;this._doFragLoad(_).then(function(w){var k=E.hls;if(!w||k.nextLoadLevel||E.fragContextChanged(_))return;E.fragLoadError=0,E.state=m.State.IDLE,E.startFragRequested=!1,E.bitrateTest=!1;var I=_.stats;I.parsing.start=I.parsing.end=I.buffering.start=I.buffering.end=self.performance.now(),k.trigger(T.Events.FRAG_LOADED,w)})},C._handleTransmuxComplete=function(_){var E,w="main",k=this.hls,I=_.remuxResult,L=_.chunkMeta,V=this.getCurrentContext(L);if(!V){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 W=V.frag,H=V.part,G=V.level,B=I.video,P=I.text,z=I.id3,J=I.initSegment,ue=this.altAudio?void 0:I.audio;if(this.fragContextChanged(W))return;if(this.state=m.State.PARSING,J){J.tracks&&(this._bufferInitSegment(G,J.tracks,W,L),k.trigger(T.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:w,tracks:J.tracks}));var de=J.initPTS,Se=J.timescale;Object(M.isFiniteNumber)(de)&&(this.initPTS[W.cc]=de,k.trigger(T.Events.INIT_PTS_FOUND,{frag:W,id:w,initPTS:de,timescale:Se}))}if(B&&I.independent!==!1){if(G.details){var Ae=B.startPTS,pe=B.endPTS,Oe=B.startDTS,ye=B.endDTS;if(H)H.elementaryStreams[B.type]={startPTS:Ae,endPTS:pe,startDTS:Oe,endDTS:ye};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var ce=this.getLoadPosition()+this.config.maxBufferHole;if(ce<Ae){this.backtrack(W);return}W.setElementaryStreamInfo(B.type,W.start,pe,W.start,ye,!0)}W.setElementaryStreamInfo(B.type,Ae,pe,Oe,ye),this.bufferFragmentData(B,W,H,L)}}else if(I.independent===!1){this.backtrack(W);return}if(ue){var ae=ue.startPTS,re=ue.endPTS,fe=ue.startDTS,te=ue.endDTS;H&&(H.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ae,endPTS:re,startDTS:fe,endDTS:te}),W.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ae,re,fe,te),this.bufferFragmentData(ue,W,H,L)}if(z!=null&&(E=z.samples)!==null&&E!==void 0&&E.length){var ne={frag:W,id:w,samples:z.samples};k.trigger(T.Events.FRAG_PARSING_METADATA,ne)}if(P){var Te={frag:W,id:w,samples:P.samples};k.trigger(T.Events.FRAG_PARSING_USERDATA,Te)}},C._bufferInitSegment=function(_,E,w,k){var I=this;if(this.state!==m.State.PARSING)return;this.audioOnly=!!E.audio&&!E.video,this.altAudio&&!this.audioOnly&&delete E.audio;var L=E.audio,V=E.video,W=E.audiovideo;if(L){var H=_.audioCodec,G=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),L.metadata.channelCount!==1&&G.indexOf("firefox")===-1&&(H="mp4a.40.5")),G.indexOf("android")!==-1&&L.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),_.audioCodec&&_.audioCodec!==H&&this.log('Swapping manifest audio codec "'+_.audioCodec+'" for "'+H+'"'),L.levelCodec=H,L.id="main",this.log("Init audio buffer, container:"+L.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(_.audioCodec||"")+"/"+L.codec+"]")}V&&(V.levelCodec=_.videoCodec,V.id="main",this.log("Init video buffer, container:"+V.container+", codecs[level/parsed]=["+(_.videoCodec||"")+"/"+V.codec+"]")),W&&this.log("Init audiovideo buffer, container:"+W.container+", codecs[level/parsed]=["+(_.attrs.CODECS||"")+"/"+W.codec+"]"),this.hls.trigger(T.Events.BUFFER_CODECS,E),Object.keys(E).forEach(function(B){var P=E[B],z=P.initSegment;z!=null&&z.byteLength&&I.hls.trigger(T.Events.BUFFER_APPENDING,{type:B,data:z,frag:w,part:null,chunkMeta:k,parent:w.type})}),this.tick()},C.backtrack=function(_){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(_);var E=this.fragmentTracker.backtrack(_);this.fragPrevious=null,this.nextLoadPosition=_.start,E?this.resetFragmentLoading(_):this.state=m.State.BACKTRACKING},C.checkFragmentChanged=function(){var _=this.media,E=null;if(_&&_.readyState>1&&_.seeking===!1){var w=_.currentTime;if(b.BufferHelper.isBuffered(_,w)?E=this.getAppendedFrag(w):b.BufferHelper.isBuffered(_,w+.1)&&(E=this.getAppendedFrag(w+.1)),E){var k=this.fragPlaying,I=E.level;(!k||E.sn!==k.sn||k.level!==I||E.urlId!==k.urlId)&&(this.hls.trigger(T.Events.FRAG_CHANGED,{frag:E}),(!k||k.level!==I)&&this.hls.trigger(T.Events.LEVEL_SWITCHED,{level:I}),this.fragPlaying=E)}}},s(R,[{key:"nextLevel",get:function(){var _=this.nextBufferedFrag;return _?_.level:-1}},{key:"currentLevel",get:function(){var _=this.media;if(_){var E=this.getAppendedFrag(_.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var _=this.media;if(_){var E=this.getAppendedFrag(_.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(m.default)},"./src/controller/subtitle-stream-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"SubtitleStreamController",function(){return l});var M=O("./src/events.ts"),m=O("./src/utils/logger.ts"),y=O("./src/utils/buffer-helper.ts"),T=O("./src/controller/fragment-finders.ts"),b=O("./src/utils/discontinuities.ts"),p=O("./src/controller/level-helper.ts"),d=O("./src/controller/fragment-tracker.ts"),n=O("./src/controller/base-stream-controller.ts"),c=O("./src/types/loader.ts"),r=O("./src/types/level.ts");function a(t,S){for(var x=0;x<S.length;x++){var f=S[x];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}function o(t,S,x){return S&&a(t.prototype,S),x&&a(t,x),t}function u(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,h(t,S)}function h(t,S){return h=Object.setPrototypeOf||function(f,R){return f.__proto__=R,f},h(t,S)}var s=500,l=function(t){u(S,t);function S(f,R){var C;return C=t.call(this,f,R,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var x=S.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var R=this.hls;R.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(M.Events.ERROR,this.onError,this),R.on(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x._unregisterListeners=function(){var R=this.hls;R.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(M.Events.ERROR,this.onError,this),R.off(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(s),this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},x.onLevelLoaded=function(R,C){this.mainDetails=C.details},x.onSubtitleFragProcessed=function(R,C){var v=C.frag,_=C.success;if(this.fragPrevious=v,this.state=n.State.IDLE,!_)return;var E=this.tracksBuffered[this.currentTrackId];if(!E)return;for(var w,k=v.start,I=0;I<E.length;I++)if(k>=E[I].start&&k<=E[I].end){w=E[I];break}var L=v.start+v.duration;w?w.end=L:(w={start:k,end:L},E.push(w)),this.fragmentTracker.fragBuffered(v)},x.onBufferFlushing=function(R,C){var v=C.startOffset,_=C.endOffset;if(v===0&&_!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,w=this.levels;if(!w.length||!w[E]||!w[E].details)return;var k=w[E].details,I=k.targetduration,L=_-I;if(L<=0)return;C.endOffsetSubtitles=Math.max(0,L),this.tracksBuffered.forEach(function(V){for(var W=0;W<V.length;){if(V[W].end<=L){V.shift();continue}else if(V[W].start<L)V[W].start=L;else break;W++}}),this.fragmentTracker.removeFragmentsInRange(v,L,c.PlaylistLevelType.SUBTITLE)}},x.onError=function(R,C){var v,_=C.frag;if(!_||_.type!==c.PlaylistLevelType.SUBTITLE)return;(v=this.fragCurrent)!==null&&v!==void 0&&v.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},x.onSubtitleTracksUpdated=function(R,C){var v=this,_=C.subtitleTracks;this.tracksBuffered=[],this.levels=_.map(function(E){return new r.Level(E)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(E){v.tracksBuffered[E.id]=[]}),this.mediaBuffer=null},x.onSubtitleTrackSwitch=function(R,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var v=this.levels[this.currentTrackId];v!=null&&v.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,v&&this.setInterval(s)},x.onSubtitleTrackLoaded=function(R,C){var v,_=C.details,E=C.id,w=this.currentTrackId,k=this.levels;if(!k.length)return;var I=k[w];if(E>=k.length||E!==w||!I)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,_.live||(v=I.details)!==null&&v!==void 0&&v.live){var L=this.mainDetails;if(_.deltaUpdateFailed||!L)return;var V=L.fragments[0];if(!I.details)_.hasProgramDateTime&&L.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(_,L):V&&Object(p.addSliding)(_,V.start);else{var W=this.alignPlaylists(_,I.details);W===0&&V&&Object(p.addSliding)(_,V.start)}}if(I.details=_,this.levelLastLoaded=E,this.tick(),_.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var H=Object(T.findFragmentByPTS)(null,_.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),I.details=void 0)}},x._handleFragmentLoadComplete=function(R){var C=R.frag,v=R.payload,_=C.decryptdata,E=this.hls;if(this.fragContextChanged(C))return;if(v&&v.byteLength>0&&_&&_.key&&_.iv&&_.method==="AES-128"){var w=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(v),_.key.buffer,_.iv.buffer).then(function(k){var I=performance.now();E.trigger(M.Events.FRAG_DECRYPTED,{frag:C,payload:k,stats:{tstart:w,tdecrypt:I}})})}},x.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var R,C=this.currentTrackId,v=this.levels;if(!v.length||!v[C]||!v[C].details)return;var _=v[C].details,E=_.targetduration,w=this.config,k=this.media,I=y.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,k.currentTime-E,w.maxBufferHole),L=I.end,V=I.len,W=this.getMaxBufferLength()+E;if(V>W)return;console.assert(_,"Subtitle track details are defined on idle subtitle stream controller tick");var H=_.fragments,G=H.length,B=_.edge,P,z=this.fragPrevious;if(L<B){var J=w.maxFragLookUpTolerance;z&&_.hasProgramDateTime&&(P=Object(T.findFragmentByPDT)(H,z.endProgramDateTime,J)),P||(P=Object(T.findFragmentByPTS)(z,H,L,J),!P&&z&&z.start<H[0].start&&(P=H[0]))}else P=H[G-1];(R=P)!==null&&R!==void 0&&R.encrypted?(m.logger.log("Loading key for "+P.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(M.Events.KEY_LOADING,{frag:P})):P&&this.fragmentTracker.getState(P)===d.FragmentState.NOT_LOADED&&this.loadFragment(P,_,L)}},x.loadFragment=function(R,C,v){this.fragCurrent=R,t.prototype.loadFragment.call(this,R,C,v)},o(S,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),S}(n.default)},"./src/controller/subtitle-track-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/utils/texttrack-utils.ts"),y=O("./src/controller/base-playlist-controller.ts"),T=O("./src/types/loader.ts");function b(a,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}function p(a,o,u){return o&&b(a.prototype,o),u&&b(a,u),a}function d(a,o){a.prototype=Object.create(o.prototype),a.prototype.constructor=a,n(a,o)}function n(a,o){return n=Object.setPrototypeOf||function(h,s){return h.__proto__=s,h},n(a,o)}var c=function(a){d(o,a);function o(h){var s;return s=a.call(this,h,"[subtitle-track-controller]")||this,s.media=null,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.selectDefaultTrack=!0,s.queuedDefaultTrack=-1,s.trackChangeListener=function(){return s.onTextTracksChanged()},s.asyncPollTrackChange=function(){return s.pollTrackChange(0)},s.useTextTrackPolling=!1,s.subtitlePollingInterval=-1,s.subtitleDisplay=!0,s.registerListeners(),s}var u=o.prototype;return u.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},u.registerListeners=function(){var s=this.hls;s.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),s.on(M.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){var s=this.hls;s.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),s.off(M.Events.ERROR,this.onError,this)},u.onMediaAttached=function(s,l){if(this.media=l.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)},u.pollTrackChange=function(s){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,s)},u.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 s=r(this.media.textTracks);s.forEach(function(l){Object(m.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},u.onManifestParsed=function(s,l){this.tracks=l.subtitleTracks},u.onSubtitleTrackLoaded=function(s,l){var t=l.id,S=l.details,x=this.trackId,f=this.tracksInGroup[x];if(!f){this.warn("Invalid subtitle track id "+t);return}var R=f.details;f.details=l.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,l,R))},u.onLevelLoading=function(s,l){this.switchLevel(l.level)},u.onLevelSwitching=function(s,l){this.switchLevel(l.level)},u.switchLevel=function(s){var l=this.hls.levels[s];if(!(l!=null&&l.textGroupIds))return;var t=l.textGroupIds[l.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,x=this.tracks.filter(function(C){return!t||C.groupId===t});this.tracksInGroup=x;var f=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var R={subtitleTracks:x};this.log("Updating subtitle tracks, "+x.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(M.Events.SUBTITLE_TRACKS_UPDATED,R),f!==-1&&this.setSubtitleTrack(f,S)}},u.findTrackId=function(s){for(var l=this.tracksInGroup,t=0;t<l.length;t++){var S=l[t];if((!this.selectDefaultTrack||S.default)&&(!s||s===S.name))return S.id}return-1},u.onError=function(s,l){if(a.prototype.onError.call(this,s,l),l.fatal||!l.context)return;l.context.type===T.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},u.loadPlaylist=function(s){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var t=l.id,S=l.groupId,x=l.url;if(s)try{x=s.addDirectives(x)}catch(f){this.warn("Could not construct new URL with HLS Delivery Directives: "+f)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(M.Events.SUBTITLE_TRACK_LOADING,{url:x,id:t,groupId:S,deliveryDirectives:s||null})}},u.toggleTrackModes=function(s){var l=this,t=this.media,S=this.subtitleDisplay,x=this.trackId;if(!t)return;var f=r(t.textTracks),R=f.filter(function(_){return _.groupId===l.groupId});if(s===-1)[].slice.call(f).forEach(function(_){_.mode="disabled"});else{var C=R[x];C&&(C.mode="disabled")}var v=R[s];v&&(v.mode=S?"showing":"hidden")},u.setSubtitleTrack=function(s,l){var t,S=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=s;return}if(this.trackId!==s&&this.toggleTrackModes(s),this.trackId===s&&(s===-1||(t=S[s])!==null&&t!==void 0&&t.details)||s<-1||s>=S.length)return;this.clearTimer();var x=S[s];if(this.log("Switching to subtitle track "+s),this.trackId=s,x){var f=x.id,R=x.groupId,C=R===void 0?"":R,v=x.name,_=x.type,E=x.url;this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:f,groupId:C,name:v,type:_,url:E});var w=this.switchParams(x.url,l==null?void 0:l.details);this.loadPlaylist(w)}else this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:s})},u.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var s=-1,l=r(this.media.textTracks),t=0;t<l.length;t++)if(l[t].mode==="hidden")s=t;else if(l[t].mode==="showing"){s=t;break}this.subtitleTrack!==s&&(this.subtitleTrack=s)},p(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(s,l)}}]),o}(y.default);function r(a){for(var o=[],u=0;u<a.length;u++){var h=a[u];h.kind==="subtitles"&&h.label&&o.push(a[u])}return o}g.default=c},"./src/controller/timeline-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"TimelineController",function(){return r});var M=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),y=O("./src/utils/cea-608-parser.ts"),T=O("./src/utils/output-filter.ts"),b=O("./src/utils/webvtt-parser.ts"),p=O("./src/utils/texttrack-utils.ts"),d=O("./src/utils/imsc1-ttml-parser.ts"),n=O("./src/types/loader.ts"),c=O("./src/utils/logger.ts"),r=function(){function h(l){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=u(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new T.default(this,"textTrack1"),S=new T.default(this,"textTrack2"),x=new T.default(this,"textTrack3"),f=new T.default(this,"textTrack4");this.cea608Parser1=new y.default(1,t,S),this.cea608Parser2=new y.default(3,x,f)}l.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(m.Events.FRAG_LOADING,this.onFragLoading,this),l.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var s=h.prototype;return s.destroy=function(){var t=this.hls;t.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(m.Events.FRAG_LOADING,this.onFragLoading,this),t.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},s.addCues=function(t,S,x,f,R){for(var C=!1,v=R.length;v--;){var _=R[v],E=o(_[0],_[1],S,x);if(E>=0&&(_[0]=Math.min(_[0],S),_[1]=Math.max(_[1],x),C=!0,E/(x-S)>.5))return}if(C||R.push([S,x]),this.config.renderTextTracksNatively){var w=this.captionsTracks[t];this.Cues.newCue(w,S,x,f)}else{var k=this.Cues.newCue(null,S,x,f);this.hls.trigger(m.Events.CUES_PARSED,{type:"captions",cues:k,track:t})}},s.onInitPtsFound=function(t,S){var x=this,f=S.frag,R=S.id,C=S.initPTS,v=S.timescale,_=this.unparsedVttFrags;R==="main"&&(this.initPTS[f.cc]=C,this.timescale[f.cc]=v),_.length&&(this.unparsedVttFrags=[],_.forEach(function(E){x.onFragLoaded(m.Events.FRAG_LOADED,E)}))},s.getExistingTrack=function(t){var S=this.media;if(S)for(var x=0;x<S.textTracks.length;x++){var f=S.textTracks[x];if(f[t])return f}return null},s.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},s.createNativeTrack=function(t){if(this.captionsTracks[t])return;var S=this.captionsProperties,x=this.captionsTracks,f=this.media,R=S[t],C=R.label,v=R.languageCode,_=this.getExistingTrack(t);if(_)x[t]=_,Object(p.clearCurrentCues)(x[t]),Object(p.sendAddTrackEvent)(x[t],f);else{var E=this.createTextTrack("captions",C,v);E&&(E[t]=!0,x[t]=E)}},s.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var S=this.captionsProperties[t];if(!S)return;var x=S.label,f={_id:t,label:x,kind:"captions",default:S.media?!!S.media.default:!1,closedCaptions:S.media};this.nonNativeCaptionsTracks[t]=f,this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[f]})},s.createTextTrack=function(t,S,x){var f=this.media;return f?f.addTextTrack(t,S,x):void 0},s.onMediaAttaching=function(t,S){this.media=S.media,this._cleanTracks()},s.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(S){Object(p.clearCurrentCues)(t[S]),delete t[S]}),this.nonNativeCaptionsTracks={}},s.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=u(),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())},s._cleanTracks=function(){var t=this.media;if(!t)return;var S=t.textTracks;if(S)for(var x=0;x<S.length;x++)Object(p.clearCurrentCues)(S[x])},s.onSubtitleTracksUpdated=function(t,S){var x=this;this.textTracks=[];var f=S.subtitleTracks||[],R=f.some(function(E){return E.textCodec===d.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var C=this.tracks&&f&&this.tracks.length===f.length;if(this.tracks=f||[],this.config.renderTextTracksNatively){var v=this.media?this.media.textTracks:[];this.tracks.forEach(function(E,w){var k;if(w<v.length){for(var I=null,L=0;L<v.length;L++)if(a(v[L],E)){I=v[L];break}I&&(k=I)}k?Object(p.clearCurrentCues)(k):(k=x.createTextTrack("subtitles",E.name,E.lang),k&&(k.mode="disabled")),k&&(k.groupId=E.groupId,x.textTracks.push(k))})}else if(!C&&this.tracks&&this.tracks.length){var _=this.tracks.map(function(E){return{label:E.name,kind:E.type.toLowerCase(),default:E.default,subtitleTrack:E}});this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:_})}}},s.onManifestLoaded=function(t,S){var x=this;this.config.enableCEA708Captions&&S.captions&&S.captions.forEach(function(f){var R=/(?:CC|SERVICE)([1-4])/.exec(f.instreamId);if(!R)return;var C="textTrack"+R[1],v=x.captionsProperties[C];if(!v)return;v.label=f.name,f.lang&&(v.languageCode=f.lang),v.media=f})},s.onFragLoading=function(t,S){var x=this.cea608Parser1,f=this.cea608Parser2,R=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(x&&f))return;if(S.frag.type===n.PlaylistLevelType.MAIN){var v,_,E=S.frag.sn,w=(v=S==null||((_=S.part)===null||_===void 0)?void 0:_.index)!=null?v:-1;E===R+1||E===R&&w===C+1||(x.reset(),f.reset()),this.lastSn=E,this.lastPartIndex=w}},s.onFragLoaded=function(t,S){var x=S.frag,f=S.payload,R=this.initPTS,C=this.unparsedVttFrags;if(x.type===n.PlaylistLevelType.SUBTITLE)if(f.byteLength){if(!Object(M.isFiniteNumber)(R[x.cc])){C.push(S),R.length&&this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:x,error:new Error("Missing initial subtitle PTS")});return}var v=x.decryptdata;if(v==null||v.key==null||v.method!=="AES-128"){var _=this.tracks[x.level],E=this.vttCCs;E[x.cc]||(E[x.cc]={start:x.start,prevCC:this.prevCC,new:!0},this.prevCC=x.cc),_&&_.textCodec===d.IMSC1_CODEC?this._parseIMSC1(x,f):this._parseVTTs(x,f,E)}}else this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:x,error:new Error("Empty subtitle payload")})},s._parseIMSC1=function(t,S){var x=this,f=this.hls;Object(d.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(R){x._appendCues(R,t.level),f.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(R){c.logger.log("Failed to parse IMSC1: "+R),f.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:R})})},s._parseVTTs=function(t,S,x){var f=this,R=this.hls;Object(b.parseWebVTT)(S,this.initPTS[t.cc],this.timescale[t.cc],x,t.cc,t.start,function(C){f._appendCues(C,t.level),R.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(C){f._fallbackToIMSC1(t,S),c.logger.log("Failed to parse VTT cue: "+C),R.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:C})})},s._fallbackToIMSC1=function(t,S){var x=this,f=this.tracks[t.level];f.textCodec||Object(d.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(){f.textCodec=d.IMSC1_CODEC,x._parseIMSC1(t,S)},function(){f.textCodec="wvtt"})},s._appendCues=function(t,S){var x=this.hls;if(this.config.renderTextTracksNatively){var f=this.textTracks[S];if(f.mode==="disabled")return;t.forEach(function(v){return Object(p.addCueToTrack)(f,v)})}else{var R=this.tracks[S],C=R.default?"default":"subtitles"+S;x.trigger(m.Events.CUES_PARSED,{type:"subtitles",cues:t,track:C})}},s.onFragDecrypted=function(t,S){var x=S.frag;if(x.type===n.PlaylistLevelType.SUBTITLE){if(!Object(M.isFiniteNumber)(this.initPTS[x.cc])){this.unparsedVttFrags.push(S);return}this.onFragLoaded(m.Events.FRAG_LOADED,S)}},s.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},s.onFragParsingUserdata=function(t,S){var x=this.cea608Parser1,f=this.cea608Parser2;if(!this.enabled||!(x&&f))return;for(var R=0;R<S.samples.length;R++){var C=S.samples[R].bytes;if(C){var v=this.extractCea608Data(C);x.addData(S.samples[R].pts,v[0]),f.addData(S.samples[R].pts,v[1])}}},s.onBufferFlushing=function(t,S){var x=S.startOffset,f=S.endOffset,R=S.endOffsetSubtitles,C=S.type,v=this.media;if(!v||v.currentTime<f)return;if(!C||C==="video"){var _=this.captionsTracks;Object.keys(_).forEach(function(w){return Object(p.removeCuesInRange)(_[w],x,f)})}if(this.config.renderTextTracksNatively&&(x===0&&R!==void 0)){var E=this.textTracks;Object.keys(E).forEach(function(w){return Object(p.removeCuesInRange)(E[w],x,R)})}},s.extractCea608Data=function(t){for(var S=t[0]&31,x=2,f=[[],[]],R=0;R<S;R++){var C=t[x++],v=127&t[x++],_=127&t[x++],E=(4&C)!==0,w=3&C;if(v===0&&_===0)continue;E&&((w===0||w===1)&&(f[w].push(v),f[w].push(_)))}return f},h}();function a(h,s){return h&&h.label===s.name&&!(h.textTrack1||h.textTrack2)}function o(h,s,l,t){return Math.min(s,t)-Math.max(h,l)}function u(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return M});var M=function(){function m(T,b){this.subtle=void 0,this.aesIV=void 0,this.subtle=T,this.aesIV=b}var y=m.prototype;return y.decrypt=function(b,p){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},p,b)},m}()},"./src/crypt/aes-decryptor.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"removePadding",function(){return m}),O.d(g,"default",function(){return y});var M=O("./src/utils/typed-array.ts");function m(T){var b=T.byteLength,p=b&&new DataView(T.buffer).getUint8(b-1);return p?Object(M.sliceUint8)(T,0,b-p):T}var y=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 b=T.prototype;return b.uint8ArrayToUint32Array_=function(d){for(var n=new DataView(d),c=new Uint32Array(4),r=0;r<4;r++)c[r]=n.getUint32(r*4);return c},b.initTable=function(){var d=this.sBox,n=this.invSBox,c=this.subMix,r=c[0],a=c[1],o=c[2],u=c[3],h=this.invSubMix,s=h[0],l=h[1],t=h[2],S=h[3],x=new Uint32Array(256),f=0,R=0,C=0;for(C=0;C<256;C++)C<128?x[C]=C<<1:x[C]=C<<1^283;for(C=0;C<256;C++){var v=R^R<<1^R<<2^R<<3^R<<4;v=v>>>8^v&255^99,d[f]=v,n[v]=f;var _=x[f],E=x[_],w=x[E],k=x[v]*257^v*16843008;r[f]=k<<24|k>>>8,a[f]=k<<16|k>>>16,o[f]=k<<8|k>>>24,u[f]=k,k=w*16843009^E*65537^_*257^f*16843008,s[v]=k<<24|k>>>8,l[v]=k<<16|k>>>16,t[v]=k<<8|k>>>24,S[v]=k,f?(f=_^x[x[x[w^_]]],R^=x[x[R]]):f=R=1}},b.expandKey=function(d){for(var n=this.uint8ArrayToUint32Array_(d),c=!0,r=0;r<n.length&&c;)c=n[r]===this.key[r],r++;if(c)return;this.key=n;var a=this.keySize=n.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var o=this.ksRows=(a+6+1)*4,u,h,s=this.keySchedule=new Uint32Array(o),l=this.invKeySchedule=new Uint32Array(o),t=this.sBox,S=this.rcon,x=this.invSubMix,f=x[0],R=x[1],C=x[2],v=x[3],_,E;for(u=0;u<o;u++){if(u<a){_=s[u]=n[u];continue}E=_,u%a===0?(E=E<<8|E>>>24,E=t[E>>>24]<<24|t[E>>>16&255]<<16|t[E>>>8&255]<<8|t[E&255],E^=S[u/a|0]<<24):a>6&&u%a===4&&(E=t[E>>>24]<<24|t[E>>>16&255]<<16|t[E>>>8&255]<<8|t[E&255]),s[u]=_=(s[u-a]^E)>>>0}for(h=0;h<o;h++)u=o-h,h&3?E=s[u]:E=s[u-4],h<4||u<=4?l[h]=E:l[h]=f[t[E>>>24]]^R[t[E>>>16&255]]^C[t[E>>>8&255]]^v[t[E&255]],l[h]=l[h]>>>0},b.networkToHostOrderSwap=function(d){return d<<24|(d&65280)<<8|(d&16711680)>>8|d>>>24},b.decrypt=function(d,n,c){for(var r=this.keySize+6,a=this.invKeySchedule,o=this.invSBox,u=this.invSubMix,h=u[0],s=u[1],l=u[2],t=u[3],S=this.uint8ArrayToUint32Array_(c),x=S[0],f=S[1],R=S[2],C=S[3],v=new Int32Array(d),_=new Int32Array(v.length),E,w,k,I,L,V,W,H,G,B,P,z,J,ue,de=this.networkToHostOrderSwap;n<v.length;){for(G=de(v[n]),B=de(v[n+1]),P=de(v[n+2]),z=de(v[n+3]),L=G^a[0],V=z^a[1],W=P^a[2],H=B^a[3],J=4,ue=1;ue<r;ue++)E=h[L>>>24]^s[V>>16&255]^l[W>>8&255]^t[H&255]^a[J],w=h[V>>>24]^s[W>>16&255]^l[H>>8&255]^t[L&255]^a[J+1],k=h[W>>>24]^s[H>>16&255]^l[L>>8&255]^t[V&255]^a[J+2],I=h[H>>>24]^s[L>>16&255]^l[V>>8&255]^t[W&255]^a[J+3],L=E,V=w,W=k,H=I,J=J+4;E=o[L>>>24]<<24^o[V>>16&255]<<16^o[W>>8&255]<<8^o[H&255]^a[J],w=o[V>>>24]<<24^o[W>>16&255]<<16^o[H>>8&255]<<8^o[L&255]^a[J+1],k=o[W>>>24]<<24^o[H>>16&255]<<16^o[L>>8&255]<<8^o[V&255]^a[J+2],I=o[H>>>24]<<24^o[L>>16&255]<<16^o[V>>8&255]<<8^o[W&255]^a[J+3],_[n]=de(E^x),_[n+1]=de(I^f),_[n+2]=de(k^R),_[n+3]=de(w^C),x=G,f=B,R=P,C=z,n=n+4}return _.buffer},T}()},"./src/crypt/decrypter.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return n});var M=O("./src/crypt/aes-crypto.ts"),m=O("./src/crypt/fast-aes-key.ts"),y=O("./src/crypt/aes-decryptor.ts"),T=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),p=O("./src/utils/typed-array.ts"),d=16,n=function(){function c(a,o,u){var h=u===void 0?{}:u,s=h.removePKCS7Padding,l=s===void 0?!0:s;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=a,this.config=o,this.removePKCS7Padding=l,l)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(S){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var r=c.prototype;return r.destroy=function(){this.observer=null},r.isSync=function(){return this.config.enableSoftwareAES},r.flush=function(){var o=this.currentResult;if(!o){this.reset();return}var u=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(y.removePadding)(u):u},r.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},r.decrypt=function(o,u,h,s){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),u,h);var l=this.flush();l&&s(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),u,h).then(s)},r.softwareDecrypt=function(o,u,h){var s=this.currentIV,l=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(o=Object(b.appendUint8Array)(t,o),this.remainderData=null);var S=this.getValidChunk(o);if(!S.length)return null;s&&(h=s);var x=this.softwareDecrypter;x||(x=this.softwareDecrypter=new y.default),x.expandKey(u);var f=l;return this.currentResult=x.decrypt(S.buffer,0,h),this.currentIV=Object(p.sliceUint8)(S,-16).buffer,f||null},r.webCryptoDecrypt=function(o,u,h){var s=this,l=this.subtle;return(this.key!==u||!this.fastAesKey)&&(this.key=u,this.fastAesKey=new m.default(l,u)),this.fastAesKey.expandKey().then(function(t){if(!l)return Promise.reject(new Error("web crypto not initialized"));var S=new M.default(l,h);return S.decrypt(o.buffer,t)}).catch(function(t){return s.onWebCryptoError(t,o,u,h)})},r.onWebCryptoError=function(o,u,h,s){return T.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(u,h,s)},r.getValidChunk=function(o){var u=o,h=o.length-o.length%d;return h!==o.length&&(u=Object(p.sliceUint8)(o,0,h),this.remainderData=Object(p.sliceUint8)(o,h)),u},r.logOnce=function(o){if(!this.logEnabled)return;T.logger.log("[decrypter.ts]: "+o),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return M});var M=function(){function m(T,b){this.subtle=void 0,this.key=void 0,this.subtle=T,this.key=b}var y=m.prototype;return y.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},m}()},"./src/demux/aacdemuxer.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/demux/base-audio-demuxer.ts"),m=O("./src/demux/adts.ts"),y=O("./src/utils/logger.ts"),T=O("./src/demux/id3.ts");function b(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,p(n,c)}function p(n,c){return p=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},p(n,c)}var d=function(n){b(c,n);function c(a,o){var u;return u=n.call(this)||this,u.observer=void 0,u.config=void 0,u.observer=a,u.config=o,u}var r=c.prototype;return r.resetInitSegment=function(o,u,h){n.prototype.resetInitSegment.call(this,o,u,h),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(o){if(!o)return!1;for(var u=T.getID3Data(o,0)||[],h=u.length,s=o.length;h<s;h++)if(m.probe(o,h))return y.logger.log("ADTS sync word found !"),!0;return!1},r.canParse=function(o,u){return m.canParse(o,u)},r.appendFrame=function(o,u,h){m.initTrackConfig(o,this.observer,u,h,o.manifestCodec);var s=m.appendFrame(o,u,h,this.initPTS,this.frameIndex);if(s&&s.missing===0)return s},c}(M.default);d.minProbeByteLength=9,g.default=d},"./src/demux/adts.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"getAudioConfig",function(){return T}),O.d(g,"isHeaderPattern",function(){return b}),O.d(g,"getHeaderLength",function(){return p}),O.d(g,"getFullFrameLength",function(){return d}),O.d(g,"canGetFrameLength",function(){return n}),O.d(g,"isHeader",function(){return c}),O.d(g,"canParse",function(){return r}),O.d(g,"probe",function(){return a}),O.d(g,"initTrackConfig",function(){return o}),O.d(g,"getFrameDuration",function(){return u}),O.d(g,"parseFrameHeader",function(){return h}),O.d(g,"appendFrame",function(){return s});var M=O("./src/utils/logger.ts"),m=O("./src/errors.ts"),y=O("./src/events.ts");function T(l,t,S,x){var f,R,C,v,_=navigator.userAgent.toLowerCase(),E=x,w=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];f=((t[S+2]&192)>>>6)+1;var k=(t[S+2]&60)>>>2;if(k>w.length-1){l.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+k});return}return C=(t[S+2]&1)<<2,C|=(t[S+3]&192)>>>6,M.logger.log("manifest codec:"+x+", ADTS type:"+f+", samplingIndex:"+k),/firefox/i.test(_)?k>=6?(f=5,v=new Array(4),R=k-3):(f=2,v=new Array(2),R=k):_.indexOf("android")!==-1?(f=2,v=new Array(2),R=k):(f=5,v=new Array(4),x&&(x.indexOf("mp4a.40.29")!==-1||x.indexOf("mp4a.40.5")!==-1)||!x&&k>=6?R=k-3:((x&&x.indexOf("mp4a.40.2")!==-1&&(k>=6&&C===1||/vivaldi/i.test(_))||!x&&C===1)&&(f=2,v=new Array(2)),R=k)),v[0]=f<<3,v[0]|=(k&14)>>1,v[1]|=(k&1)<<7,v[1]|=C<<3,f===5&&(v[1]|=(R&14)>>1,v[2]=(R&1)<<7,v[2]|=2<<2,v[3]=0),{config:v,samplerate:w[k],channelCount:C,codec:"mp4a.40."+f,manifestCodec:E}}function b(l,t){return l[t]===255&&(l[t+1]&246)===240}function p(l,t){return l[t+1]&1?7:9}function d(l,t){return(l[t+3]&3)<<11|l[t+4]<<3|(l[t+5]&224)>>>5}function n(l,t){return t+5<l.length}function c(l,t){return t+1<l.length&&b(l,t)}function r(l,t){return n(l,t)&&b(l,t)&&d(l,t)<=l.length-t}function a(l,t){if(c(l,t)){var S=p(l,t);if(t+S>=l.length)return!1;var x=d(l,t);if(x<=S)return!1;var f=t+x;return f===l.length||c(l,f)}return!1}function o(l,t,S,x,f){if(!l.samplerate){var R=T(t,S,x,f);if(!R)return;l.config=R.config,l.samplerate=R.samplerate,l.channelCount=R.channelCount,l.codec=R.codec,l.manifestCodec=R.manifestCodec,M.logger.log("parsed codec:"+l.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function u(l){return 1024*9e4/l}function h(l,t,S,x,f){var R=p(l,t),C=d(l,t);if(C-=R,C>0){var v=S+x*f;return{headerLength:R,frameLength:C,stamp:v}}}function s(l,t,S,x,f){var R=u(l.samplerate),C=h(t,S,x,f,R);if(C){var v=C.frameLength,_=C.headerLength,E=C.stamp,w=_+v,k=Math.max(0,S+w-t.length),I;k?(I=new Uint8Array(w-_),I.set(t.subarray(S+_,t.length),0)):I=t.subarray(S+_,S+w);var L={unit:I,pts:E};return k||l.samples.push(L),{sample:L,length:w,missing:k}}}},"./src/demux/base-audio-demuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"initPTSFn",function(){return d});var M=O("./src/polyfills/number.ts"),m=O("./src/demux/id3.ts"),y=O("./src/demux/dummy-demuxed-track.ts"),T=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),p=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=n.prototype;return c.resetInitSegment=function(a,o,u){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(a,o){return!1},c.appendFrame=function(a,o,u){},c.demux=function(a,o){this.cachedData&&(a=Object(T.appendUint8Array)(this.cachedData,a),this.cachedData=null);var u=m.getID3Data(a,0),h=u?u.length:0,s,l,t=this._audioTrack,S=this._id3Track,x=u?m.getTimeStamp(u):void 0,f=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(x,o)),u&&u.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:u}),l=this.initPTS;h<f;){if(this.canParse(a,h)){var R=this.appendFrame(t,a,h);R?(this.frameIndex++,l=R.sample.pts,h+=R.length,s=h):h=f}else m.canParse(a,h)?(u=m.getID3Data(a,h),S.samples.push({pts:l,dts:l,data:u}),h+=u.length,s=h):h++;if(h===f&&s!==f){var C=Object(b.sliceUint8)(a,s);this.cachedData?this.cachedData=Object(T.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:t,avcTrack:Object(y.dummyTrack)(),id3Track:S,textTrack:Object(y.dummyTrack)()}},c.demuxSampleAes=function(a,o,u){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(a){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(y.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(y.dummyTrack)()}},c.destroy=function(){},n}(),d=function(c,r){return Object(M.isFiniteNumber)(c)?c*90:r*9e4};g.default=p},"./src/demux/chunk-cache.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return M});var M=function(){function y(){this.chunks=[],this.dataLength=0}var T=y.prototype;return T.push=function(p){this.chunks.push(p),this.dataLength+=p.length},T.flush=function(){var p=this.chunks,d=this.dataLength,n;if(p.length)p.length===1?n=p[0]:n=m(p,d);else return new Uint8Array(0);return this.reset(),n},T.reset=function(){this.chunks.length=0,this.dataLength=0},y}();function m(y,T){for(var b=new Uint8Array(T),p=0,d=0;d<y.length;d++){var n=y[d];b.set(n,p),p+=n.length}return b}},"./src/demux/dummy-demuxed-track.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"dummyTrack",function(){return M});function M(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/utils/logger.ts"),m=function(){function y(b){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=b,this.bytesAvailable=b.byteLength,this.word=0,this.bitsAvailable=0}var T=y.prototype;return T.loadWord=function(){var p=this.data,d=this.bytesAvailable,n=p.byteLength-d,c=new Uint8Array(4),r=Math.min(4,d);if(r===0)throw new Error("no bytes available");c.set(p.subarray(n,n+r)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=r*8,this.bytesAvailable-=r},T.skipBits=function(p){var d;this.bitsAvailable>p?(this.word<<=p,this.bitsAvailable-=p):(p-=this.bitsAvailable,d=p>>3,p-=d>>3,this.bytesAvailable-=d,this.loadWord(),this.word<<=p,this.bitsAvailable-=p)},T.readBits=function(p){var d=Math.min(this.bitsAvailable,p),n=this.word>>>32-d;return p>32&&M.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=d,this.bitsAvailable>0?this.word<<=d:this.bytesAvailable>0&&this.loadWord(),d=p-d,d>0&&this.bitsAvailable?n<<d|this.readBits(d):n},T.skipLZ=function(){var p;for(p=0;p<this.bitsAvailable;++p)if((this.word&2147483648>>>p)!==0)return this.word<<=p,this.bitsAvailable-=p,p;return this.loadWord(),p+this.skipLZ()},T.skipUEG=function(){this.skipBits(1+this.skipLZ())},T.skipEG=function(){this.skipBits(1+this.skipLZ())},T.readUEG=function(){var p=this.skipLZ();return this.readBits(p+1)-1},T.readEG=function(){var p=this.readUEG();return 1&p?1+p>>>1:-1*(p>>>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(p){for(var d=8,n=8,c,r=0;r<p;r++)n!==0&&(c=this.readEG(),n=(d+c+256)%256),d=n===0?d:n},T.readSPS=function(){var p=0,d=0,n=0,c=0,r,a,o,u=this.readUByte.bind(this),h=this.readBits.bind(this),s=this.readUEG.bind(this),l=this.readBoolean.bind(this),t=this.skipBits.bind(this),S=this.skipEG.bind(this),x=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);u();var R=u();if(h(5),t(3),u(),x(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var C=s();if(C===3&&t(1),x(),x(),t(1),l())for(a=C!==3?8:12,o=0;o<a;o++)l()&&(o<6?f(16):f(64))}x();var v=s();if(v===0)s();else if(v===1)for(t(1),S(),S(),r=s(),o=0;o<r;o++)S();x(),t(1);var _=s(),E=s(),w=h(1);w===0&&t(1),t(1),l()&&(p=s(),d=s(),n=s(),c=s());var k=[1,1];if(l()&&l()){var I=u();switch(I){case 1:k=[1,1];break;case 2:k=[12,11];break;case 3:k=[10,11];break;case 4:k=[16,11];break;case 5:k=[40,33];break;case 6:k=[24,11];break;case 7:k=[20,11];break;case 8:k=[32,11];break;case 9:k=[80,33];break;case 10:k=[18,11];break;case 11:k=[15,11];break;case 12:k=[64,33];break;case 13:k=[160,99];break;case 14:k=[4,3];break;case 15:k=[3,2];break;case 16:k=[2,1];break;case 255:{k=[u()<<8|u(),u()<<8|u()];break}}}return{width:Math.ceil((_+1)*16-p*2-d*2),height:(2-w)*(E+1)*16-(w?2:4)*(n+c),pixelRatio:k}},T.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},y}();g.default=m},"./src/demux/id3.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"isHeader",function(){return M}),O.d(g,"isFooter",function(){return m}),O.d(g,"getID3Data",function(){return y}),O.d(g,"canParse",function(){return b}),O.d(g,"getTimeStamp",function(){return p}),O.d(g,"isTimeStampFrame",function(){return d}),O.d(g,"getID3Frames",function(){return c}),O.d(g,"decodeFrame",function(){return r}),O.d(g,"utf8ArrayToStr",function(){return s}),O.d(g,"testables",function(){return l});var M=function(f,R){return R+10<=f.length&&(f[R]===73&&f[R+1]===68&&f[R+2]===51&&(f[R+3]<255&&f[R+4]<255&&(f[R+6]<128&&f[R+7]<128&&f[R+8]<128&&f[R+9]<128)))},m=function(f,R){return R+10<=f.length&&(f[R]===51&&f[R+1]===68&&f[R+2]===73&&(f[R+3]<255&&f[R+4]<255&&(f[R+6]<128&&f[R+7]<128&&f[R+8]<128&&f[R+9]<128)))},y=function(f,R){for(var C=R,v=0;M(f,R);){v+=10;var _=T(f,R+6);v+=_,m(f,R+10)&&(v+=10),R+=v}return v>0?f.subarray(C,C+v):void 0},T=function(f,R){var C=0;return C=(f[R]&127)<<21,C|=(f[R+1]&127)<<14,C|=(f[R+2]&127)<<7,C|=f[R+3]&127,C},b=function(f,R){return M(f,R)&&T(f,R+6)+10<=f.length-R},p=function(f){for(var R=c(f),C=0;C<R.length;C++){var v=R[C];if(d(v))return h(v)}return},d=function(f){return f&&f.key==="PRIV"&&f.info==="com.apple.streaming.transportStreamTimestamp"},n=function(f){var R=String.fromCharCode(f[0],f[1],f[2],f[3]),C=T(f,4),v=10;return{type:R,size:C,data:f.subarray(v,v+C)}},c=function(f){for(var R=0,C=[];M(f,R);){var v=T(f,R+6);R+=10;for(var _=R+v;R+8<_;){var E=n(f.subarray(R)),w=r(E);w&&C.push(w),R+=E.size+10}m(f,R)&&(R+=10)}return C},r=function(f){return f.type==="PRIV"?a(f):f.type[0]==="W"?u(f):o(f)},a=function(f){if(f.size<2)return;var R=s(f.data,!0),C=new Uint8Array(f.data.subarray(R.length+1));return{key:f.type,info:R,data:C.buffer}},o=function(f){if(f.size<2)return;if(f.type==="TXXX"){var R=1,C=s(f.data.subarray(R),!0);R+=C.length+1;var v=s(f.data.subarray(R));return{key:f.type,info:C,data:v}}var _=s(f.data.subarray(1));return{key:f.type,data:_}},u=function(f){if(f.type==="WXXX"){if(f.size<2)return;var R=1,C=s(f.data.subarray(R),!0);R+=C.length+1;var v=s(f.data.subarray(R));return{key:f.type,info:C,data:v}}var _=s(f.data);return{key:f.type,data:_}},h=function(f){if(f.data.byteLength===8){var R=new Uint8Array(f.data),C=R[3]&1,v=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return v/=45,C&&(v+=4772185884e-2),Math.round(v)}return},s=function(f,R){R===void 0&&(R=!1);var C=S();if(C){var v=C.decode(f);if(R){var _=v.indexOf("\0");return _!==-1?v.substring(0,_):v}return v.replace(/\0/g,"")}for(var E=f.length,w,k,I,L="",V=0;V<E;){if(w=f[V++],w===0&&R)return L;if(w===0||w===3)continue;switch(w>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:L+=String.fromCharCode(w);break;case 12:case 13:k=f[V++],L+=String.fromCharCode((w&31)<<6|k&63);break;case 14:k=f[V++],I=f[V++],L+=String.fromCharCode((w&15)<<12|(k&63)<<6|(I&63)<<0);break;default:}}return L},l={decodeTextFrame:o},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/demux/base-audio-demuxer.ts"),m=O("./src/demux/id3.ts"),y=O("./src/utils/logger.ts"),T=O("./src/demux/mpegaudio.ts");function b(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,p(n,c)}function p(n,c){return p=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},p(n,c)}var d=function(n){b(c,n);function c(){return n.apply(this,arguments)||this}var r=c.prototype;return r.resetInitSegment=function(o,u,h){n.prototype.resetInitSegment.call(this,o,u,h),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(o){if(!o)return!1;for(var u=m.getID3Data(o,0)||[],h=u.length,s=o.length;h<s;h++)if(T.probe(o,h))return y.logger.log("MPEG Audio sync word found !"),!0;return!1},r.canParse=function(o,u){return T.canParse(o,u)},r.appendFrame=function(o,u,h){return this.initPTS===null?void 0:T.appendFrame(o,u,h,this.initPTS,this.frameIndex)},c}(M.default);d.minProbeByteLength=4,g.default=d},"./src/demux/mp4demuxer.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/utils/mp4-tools.ts"),m=O("./src/demux/dummy-demuxed-track.ts"),y=function(){function T(p,d){this.remainderData=null,this.config=void 0,this.config=d}var b=T.prototype;return b.resetTimeStamp=function(){},b.resetInitSegment=function(){},b.resetContiguity=function(){},T.probe=function(d){return Object(M.findBox)({data:d,start:0,end:Math.min(d.length,16384)},["moof"]).length>0},b.demux=function(d){var n=d,c=Object(m.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(M.appendUint8Array)(this.remainderData,d));var r=Object(M.segmentValidRange)(n);this.remainderData=r.remainder,c.samples=r.valid||new Uint8Array}else c.samples=n;return{audioTrack:Object(m.dummyTrack)(),avcTrack:c,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},b.flush=function(){var d=Object(m.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(m.dummyTrack)(),avcTrack:d,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},b.demuxSampleAes=function(d,n,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},T}();y.minProbeByteLength=1024,g.default=y},"./src/demux/mpegaudio.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"appendFrame",function(){return p}),O.d(g,"parseHeader",function(){return d}),O.d(g,"isHeaderPattern",function(){return n}),O.d(g,"isHeader",function(){return c}),O.d(g,"canParse",function(){return r}),O.d(g,"probe",function(){return a});var M=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],y=[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]],b=[0,1,1,4];function p(o,u,h,s,l){if(h+24>u.length)return;var t=d(u,h);if(t&&h+t.frameLength<=u.length){var S=t.samplesPerFrame*9e4/t.sampleRate,x=s+l*S,f={unit:u.subarray(h,h+t.frameLength),pts:x,dts:x};return o.config=[],o.channelCount=t.channelCount,o.samplerate=t.sampleRate,o.samples.push(f),{sample:f,length:t.frameLength,missing:0}}}function d(o,u){var h=o[u+1]>>3&3,s=o[u+1]>>1&3,l=o[u+2]>>4&15,t=o[u+2]>>2&3;if(h!==1&&l!==0&&l!==15&&t!==3){var S=o[u+2]>>1&1,x=o[u+3]>>6,f=h===3?3-s:s===3?3:4,R=m[f*14+l-1]*1e3,C=h===3?0:h===2?1:2,v=y[C*3+t],_=x===3?1:2,E=T[h][s],w=b[s],k=E*8*w,I=Math.floor(E*R/v+S)*w;if(M===null){var L=navigator.userAgent||"",V=L.match(/Chrome\/(\d+)/i);M=V?parseInt(V[1]):0}var W=!!M&&M<=87;return W&&s===2&&R>=224e3&&x===0&&(o[u+3]=o[u+3]|128),{sampleRate:v,channelCount:_,frameLength:I,samplesPerFrame:k}}}function n(o,u){return o[u]===255&&(o[u+1]&224)===224&&(o[u+1]&6)!==0}function c(o,u){return u+1<o.length&&n(o,u)}function r(o,u){var h=4;return n(o,u)&&h<=o.length-u}function a(o,u){if(u+1<o.length&&n(o,u)){var h=4,s=d(o,u),l=h;s!=null&&s.frameLength&&(l=s.frameLength);var t=u+l;return t===o.length||c(o,t)}return!1}},"./src/demux/sample-aes.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/crypt/decrypter.ts"),m=O("./src/demux/tsdemuxer.ts"),y=function(){function T(p,d,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new M.default(p,d,{removePKCS7Padding:!1})}var b=T.prototype;return b.decryptBuffer=function(d,n){this.decrypter.decrypt(d,this.keyData.key.buffer,this.keyData.iv.buffer,n)},b.decryptAacSample=function(d,n,c,r){var a=d[n].unit,o=a.subarray(16,a.length-a.length%16),u=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),h=this;this.decryptBuffer(u,function(s){var l=new Uint8Array(s);a.set(l,16),r||h.decryptAacSamples(d,n+1,c)})},b.decryptAacSamples=function(d,n,c){for(;;n++){if(n>=d.length){c();return}if(d[n].unit.length<32)continue;var r=this.decrypter.isSync();if(this.decryptAacSample(d,n,c,r),!r)return}},b.getAvcEncryptedData=function(d){for(var n=Math.floor((d.length-48)/160)*16+16,c=new Int8Array(n),r=0,a=32;a<=d.length-16;a+=160,r+=16)c.set(d.subarray(a,a+16),r);return c},b.getAvcDecryptedUnit=function(d,n){for(var c=new Uint8Array(n),r=0,a=32;a<=d.length-16;a+=160,r+=16)d.set(c.subarray(r,r+16),a);return d},b.decryptAvcSample=function(d,n,c,r,a,o){var u=Object(m.discardEPB)(a.data),h=this.getAvcEncryptedData(u),s=this;this.decryptBuffer(h.buffer,function(l){a.data=s.getAvcDecryptedUnit(u,l),o||s.decryptAvcSamples(d,n,c+1,r)})},b.decryptAvcSamples=function(d,n,c,r){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,c=0){if(n>=d.length){r();return}for(var a=d[n].units;!(c>=a.length);c++){var o=a[c];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var u=this.decrypter.isSync();if(this.decryptAvcSample(d,n,c,r,o,u),!u)return}}},T}();g.default=y},"./src/demux/transmuxer-interface.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a});var M=O("./node_modules/webworkify-webpack/index.js"),m=O.n(M),y=O("./src/events.ts"),T=O("./src/demux/transmuxer.ts"),b=O("./src/utils/logger.ts"),p=O("./src/errors.ts"),d=O("./src/utils/mediasource-helper.ts"),n=O("./node_modules/eventemitter3/index.js"),c=O.n(n),r=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function o(h,s,l,t){var S=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=h,this.id=s,this.onTransmuxComplete=l,this.onFlush=t;var x=h.config,f=function(E,w){w=w||{},w.frag=S.frag,w.id=S.id,h.trigger(E,w)};this.observer=new n.EventEmitter,this.observer.on(y.Events.FRAG_DECRYPTED,f),this.observer.on(y.Events.ERROR,f);var R={mp4:r.isTypeSupported("video/mp4"),mpeg:r.isTypeSupported("audio/mpeg"),mp3:r.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(x.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var v;try{v=this.worker=M("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),v.addEventListener("message",this.onwmsg),v.onerror=function(_){h.trigger(y.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(_.message+" ("+_.filename+":"+_.lineno+")")})},v.postMessage({cmd:"init",typeSupported:R,vendor:C,id:s,config:JSON.stringify(x)})}catch(_){b.logger.warn("Error in worker:",_),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),v&&self.URL.revokeObjectURL(v.objectURL),this.transmuxer=new T.default(this.observer,R,x,C,s),this.worker=null}}else this.transmuxer=new T.default(this.observer,R,x,C,s)}var u=o.prototype;return u.destroy=function(){var s=this.worker;if(s)s.removeEventListener("message",this.onwmsg),s.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},u.push=function(s,l,t,S,x,f,R,C,v,_){var E=this;v.transmuxing.start=self.performance.now();var w=this.transmuxer,k=this.worker,I=f?f.start:x.start,L=x.decryptdata,V=this.frag,W=!(V&&x.cc===V.cc),H=!(V&&v.level===V.level),G=V?v.sn-V.sn:-1,B=this.part?v.part-this.part.index:1,P=!H&&(G===1||G===0&&B===1),z=self.performance.now();(H||G||x.stats.parsing.start===0)&&(x.stats.parsing.start=z),f&&(B||!P)&&(f.stats.parsing.start=z);var J=new T.TransmuxState(W,P,C,H,I);if(!P||W){b.logger.log("[transmuxer-interface, "+x.type+"]: Starting new transmux session for sn: "+v.sn+" p: "+v.part+" level: "+v.level+" id: "+v.id+`
discontinuity: `+W+`
trackSwitch: `+H+`
contiguous: `+P+`
accurateTimeOffset: `+C+`
timeOffset: `+I);var ue=new T.TransmuxConfig(t,S,l,R,_);this.configureTransmuxer(ue)}if(this.frag=x,this.part=f,k)k.postMessage({cmd:"demux",data:s,decryptdata:L,chunkMeta:v,state:J},s instanceof ArrayBuffer?[s]:[]);else if(w){var de=w.push(s,L,v,J);Object(T.isPromise)(de)?de.then(function(Se){E.handleTransmuxComplete(Se)}):this.handleTransmuxComplete(de)}},u.flush=function(s){var l=this;s.transmuxing.start=self.performance.now();var t=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:s});else if(t){var x=t.flush(s);Object(T.isPromise)(x)?x.then(function(f){l.handleFlushResult(f,s)}):this.handleFlushResult(x,s)}},u.handleFlushResult=function(s,l){var t=this;s.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(l)},u.onWorkerMessage=function(s){var l=s.data,t=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,t.trigger(l.event,l.data);break}}},u.configureTransmuxer=function(s){var l=this.worker,t=this.transmuxer;l?l.postMessage({cmd:"configure",config:s}):t&&t.configure(s)},u.handleTransmuxComplete=function(s){s.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(s)},o}()},"./src/demux/transmuxer-worker.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return p});var M=O("./src/demux/transmuxer.ts"),m=O("./src/events.ts"),y=O("./src/utils/logger.ts"),T=O("./node_modules/eventemitter3/index.js"),b=O.n(T);function p(a){var o=new T.EventEmitter,u=function(s,l){a.postMessage({event:s,data:l})};o.on(m.Events.FRAG_DECRYPTED,u),o.on(m.Events.ERROR,u),a.addEventListener("message",function(h){var s=h.data;switch(s.cmd){case"init":{var l=JSON.parse(s.config);a.transmuxer=new M.default(o,s.typeSupported,l,s.vendor,s.id),Object(y.enableLogs)(l.debug),u("init",null);break}case"configure":{a.transmuxer.configure(s.config);break}case"demux":{var t=a.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(M.isPromise)(t)?t.then(function(f){d(a,f)}):d(a,t);break}case"flush":{var S=s.chunkMeta,x=a.transmuxer.flush(S);Object(M.isPromise)(x)?x.then(function(f){c(a,f,S)}):c(a,x,S);break}default:break}})}function d(a,o){if(r(o.remuxResult))return;var u=[],h=o.remuxResult,s=h.audio,l=h.video;s&&n(u,s),l&&n(u,l),a.postMessage({event:"transmuxComplete",data:o},u)}function n(a,o){o.data1&&a.push(o.data1.buffer),o.data2&&a.push(o.data2.buffer)}function c(a,o,u){o.forEach(function(h){d(a,h)}),a.postMessage({event:"flush",data:u})}function r(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return l}),O.d(g,"isPromise",function(){return x}),O.d(g,"TransmuxConfig",function(){return f}),O.d(g,"TransmuxState",function(){return R});var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/crypt/decrypter.ts"),T=O("./src/demux/aacdemuxer.ts"),b=O("./src/demux/mp4demuxer.ts"),p=O("./src/demux/tsdemuxer.ts"),d=O("./src/demux/mp3demuxer.ts"),n=O("./src/remux/mp4-remuxer.ts"),c=O("./src/remux/passthrough-remuxer.ts"),r=O("./src/demux/chunk-cache.ts"),a=O("./src/utils/mp4-tools.ts"),o=O("./src/utils/logger.ts"),u;try{u=self.performance.now.bind(self.performance)}catch(C){o.logger.debug("Unable to use Performance API on this environment"),u=self.Date.now}var h=[{demux:p.default,remux:n.default},{demux:b.default,remux:c.default},{demux:T.default,remux:n.default},{demux:d.default,remux:n.default}],s=1024;h.forEach(function(C){var v=C.demux;s=Math.max(s,v.minProbeByteLength)});var l=function(){function C(_,E,w,k,I){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new r.default,this.observer=_,this.typeSupported=E,this.config=w,this.vendor=k,this.id=I}var v=C.prototype;return v.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},v.push=function(E,w,k,I){var L=this,V=k.transmuxing;V.executeStart=u();var W=new Uint8Array(E),H=this.cache,G=this.config,B=this.currentTransmuxState,P=this.transmuxConfig;I&&(this.currentTransmuxState=I);var z=t(W,w);if(z&&z.method==="AES-128"){var J=this.getDecrypter();if(G.enableSoftwareAES){var ue=J.softwareDecrypt(W,z.key.buffer,z.iv.buffer);if(!ue)return V.executeEnd=u(),S(k);W=new Uint8Array(ue)}else return this.decryptionPromise=J.webCryptoDecrypt(W,z.key.buffer,z.iv.buffer).then(function(Z){var X=L.push(Z,null,k);return L.decryptionPromise=null,X}),this.decryptionPromise}var de=I||B,Se=de.contiguous,Ae=de.discontinuity,pe=de.trackSwitch,Oe=de.accurateTimeOffset,ye=de.timeOffset,ce=P.audioCodec,ae=P.videoCodec,re=P.defaultInitPts,fe=P.duration,te=P.initSegmentData;if((Ae||pe)&&this.resetInitSegment(te,ce,ae,fe),Ae&&this.resetInitialTimestamp(re),Se||this.resetContiguity(),this.needsProbing(W,Ae,pe)){if(H.dataLength){var ne=H.flush();W=Object(a.appendUint8Array)(ne,W)}this.configureTransmuxer(W,P)}var Te=this.transmux(W,z,ye,Oe,k),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,V.executeEnd=u(),Te},v.flush=function(E){var w=this,k=E.transmuxing;k.executeStart=u();var I=this.decrypter,L=this.cache,V=this.currentTransmuxState,W=this.decryptionPromise;if(W)return W.then(function(){return w.flush(E)});var H=[],G=V.timeOffset;if(I){var B=I.flush();B&&H.push(this.push(B,null,E))}var P=L.dataLength;L.reset();var z=this.demuxer,J=this.remuxer;if(!z||!J)return P>=s&&this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),k.executeEnd=u(),[S(E)];var ue=z.flush(G);return x(ue)?ue.then(function(de){return w.flushRemux(H,de,E),H}):(this.flushRemux(H,ue,E),H)},v.flushRemux=function(E,w,k){var I=w.audioTrack,L=w.avcTrack,V=w.id3Track,W=w.textTrack,H=this.currentTransmuxState,G=H.accurateTimeOffset,B=H.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+k.sn+(k.part>-1?" p: "+k.part:"")+" of level "+k.level);var P=this.remuxer.remux(I,L,V,W,B,G,!0,this.id);E.push({remuxResult:P,chunkMeta:k}),k.transmuxing.executeEnd=u()},v.resetInitialTimestamp=function(E){var w=this.demuxer,k=this.remuxer;if(!w||!k)return;w.resetTimeStamp(E),k.resetTimeStamp(E)},v.resetContiguity=function(){var E=this.demuxer,w=this.remuxer;if(!E||!w)return;E.resetContiguity(),w.resetNextTimestamp()},v.resetInitSegment=function(E,w,k,I){var L=this.demuxer,V=this.remuxer;if(!L||!V)return;L.resetInitSegment(w,k,I),V.resetInitSegment(E,w,k)},v.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},v.transmux=function(E,w,k,I,L){var V;return w&&w.method==="SAMPLE-AES"?V=this.transmuxSampleAes(E,w,k,I,L):V=this.transmuxUnencrypted(E,k,I,L),V},v.transmuxUnencrypted=function(E,w,k,I){var L=this.demuxer.demux(E,w,!1,!this.config.progressive),V=L.audioTrack,W=L.avcTrack,H=L.id3Track,G=L.textTrack,B=this.remuxer.remux(V,W,H,G,w,k,!1,this.id);return{remuxResult:B,chunkMeta:I}},v.transmuxSampleAes=function(E,w,k,I,L){var V=this;return this.demuxer.demuxSampleAes(E,w,k).then(function(W){var H=V.remuxer.remux(W.audioTrack,W.avcTrack,W.id3Track,W.textTrack,k,I,!1,V.id);return{remuxResult:H,chunkMeta:L}})},v.configureTransmuxer=function(E,w){for(var k=this.config,I=this.observer,L=this.typeSupported,V=this.vendor,W=w.audioCodec,H=w.defaultInitPts,G=w.duration,B=w.initSegmentData,P=w.videoCodec,z,J=0,ue=h.length;J<ue;J++)if(h[J].demux.probe(E)){z=h[J];break}z||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),z={demux:b.default,remux:c.default});var de=this.demuxer,Se=this.remuxer,Ae=z.remux,pe=z.demux;(!Se||!(Se instanceof Ae))&&(this.remuxer=new Ae(I,k,L,V)),(!de||!(de instanceof pe))&&(this.demuxer=new pe(I,k,L),this.probe=pe.probe),this.resetInitSegment(B,W,P,G),this.resetInitialTimestamp(H)},v.needsProbing=function(E,w,k){return!this.demuxer||!this.remuxer||w||k},v.getDecrypter=function(){var E=this.decrypter;return E||(E=this.decrypter=new y.default(this.observer,this.config)),E},C}();function t(C,v){var _=null;return C.byteLength>0&&v!=null&&v.key!=null&&v.iv!==null&&v.method!=null&&(_=v),_}var S=function(v){return{remuxResult:{},chunkMeta:v}};function x(C){return"then"in C&&C.then instanceof Function}var f=function(v,_,E,w,k){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=v,this.videoCodec=_,this.initSegmentData=E,this.duration=w,this.defaultInitPts=k},R=function(v,_,E,w,k){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=v,this.contiguous=_,this.accurateTimeOffset=E,this.trackSwitch=w,this.timeOffset=k}},"./src/demux/tsdemuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"discardEPB",function(){return S});var M=O("./src/demux/adts.ts"),m=O("./src/demux/mpegaudio.ts"),y=O("./src/demux/exp-golomb.ts"),T=O("./src/demux/id3.ts"),b=O("./src/demux/sample-aes.ts"),p=O("./src/events.ts"),d=O("./src/utils/mp4-tools.ts"),n=O("./src/utils/logger.ts"),c=O("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},a=function(){function x(R,C,v){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=C,this.typeSupported=v}x.probe=function(C){var v=x.syncOffset(C);return v<0?!1:(v&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+v+", junk ahead ?"),!0)},x.syncOffset=function(C){for(var v=Math.min(1e3,C.length-3*188),_=0;_<v;){if(C[_]===71&&C[_+188]===71&&C[_+2*188]===71)return _;_++}return-1},x.createTrack=function(C,v){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:r[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?v:void 0}};var f=x.prototype;return f.resetInitSegment=function(C,v,_){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=x.createTrack("video",_),this._audioTrack=x.createTrack("audio",_),this._id3Track=x.createTrack("id3",_),this._txtTrack=x.createTrack("text",_),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=v,this._duration=_},f.resetTimeStamp=function(){},f.resetContiguity=function(){var C=this._audioTrack,v=this._avcTrack,_=this._id3Track;C&&(C.pesData=null),v&&(v.pesData=null),_&&(_.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},f.demux=function(C,v,_,E){_===void 0&&(_=!1),E===void 0&&(E=!1),_||(this.sampleAes=null);var w,k=this._avcTrack,I=this._audioTrack,L=this._id3Track,V=k.pid,W=k.pesData,H=I.pid,G=L.pid,B=I.pesData,P=L.pesData,z=!1,J=this.pmtParsed,ue=this._pmtId,de=C.length;if(this.remainderData&&(C=Object(d.appendUint8Array)(this.remainderData,C),de=C.length,this.remainderData=null),de<188&&!E)return this.remainderData=C,{audioTrack:I,avcTrack:k,id3Track:L,textTrack:this._txtTrack};var Se=Math.max(0,x.syncOffset(C));de-=(de+Se)%188,de<C.byteLength&&!E&&(this.remainderData=new Uint8Array(C.buffer,de,C.buffer.byteLength-de));for(var Ae=Se;Ae<de;Ae+=188)if(C[Ae]===71){var pe=!!(C[Ae+1]&64),Oe=((C[Ae+1]&31)<<8)+C[Ae+2],ye=(C[Ae+3]&48)>>4,ce=void 0;if(ye>1){if(ce=Ae+5+C[Ae+4],ce===Ae+188)continue}else ce=Ae+4;switch(Oe){case V:pe&&(W&&(w=s(W))&&this.parseAVCPES(w,!1),W={data:[],size:0}),W&&(W.data.push(C.subarray(ce,Ae+188)),W.size+=Ae+188-ce);break;case H:pe&&(B&&(w=s(B))&&(I.isAAC?this.parseAACPES(w):this.parseMPEGPES(w)),B={data:[],size:0}),B&&(B.data.push(C.subarray(ce,Ae+188)),B.size+=Ae+188-ce);break;case G:pe&&(P&&(w=s(P))&&this.parseID3PES(w),P={data:[],size:0}),P&&(P.data.push(C.subarray(ce,Ae+188)),P.size+=Ae+188-ce);break;case 0:pe&&(ce+=C[ce]+1),ue=this._pmtId=u(C,ce);break;case ue:{pe&&(ce+=C[ce]+1);var ae=h(C,ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,_);V=ae.avc,V>0&&(k.pid=V),H=ae.audio,H>0&&(I.pid=H,I.isAAC=ae.isAAC),G=ae.id3,G>0&&(L.pid=G),z&&!J&&(n.logger.log("reparse from beginning"),z=!1,Ae=Se-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=!0;break}}else this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k.pesData=W,I.pesData=B,L.pesData=P;var re={audioTrack:I,avcTrack:k,id3Track:L,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(re),re},f.flush=function(){var C=this.remainderData;this.remainderData=null;var v;return C?v=this.demux(C,-1,!1,!0):v={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(v),this.sampleAes?this.decrypt(v,this.sampleAes):v},f.extractRemainingSamples=function(C){var v=C.audioTrack,_=C.avcTrack,E=C.id3Track,w=_.pesData,k=v.pesData,I=E.pesData,L;w&&(L=s(w))?(this.parseAVCPES(L,!0),_.pesData=null):_.pesData=w,k&&(L=s(k))?(v.isAAC?this.parseAACPES(L):this.parseMPEGPES(L),v.pesData=null):(k!=null&&k.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=k),I&&(L=s(I))?(this.parseID3PES(L),E.pesData=null):E.pesData=I},f.demuxSampleAes=function(C,v,_){var E=this.demux(C,_,!0,!this.config.progressive),w=this.sampleAes=new b.default(this.observer,this.config,v);return this.decrypt(E,w)},f.decrypt=function(C,v){return new Promise(function(_){var E=C.audioTrack,w=C.avcTrack;E.samples&&E.isAAC?v.decryptAacSamples(E.samples,0,function(){w.samples?v.decryptAvcSamples(w.samples,0,0,function(){_(C)}):_(C)}):w.samples&&v.decryptAvcSamples(w.samples,0,0,function(){_(C)})})},f.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},f.parseAVCPES=function(C,v){var _=this,E=this._avcTrack,w=this.parseAVCNALu(C.data),k=!1,I=this.avcSample,L,V=!1;C.data=null,I&&w.length&&!E.audFound&&(l(I,E),I=this.avcSample=o(!1,C.pts,C.dts,"")),w.forEach(function(W){switch(W.type){case 1:{L=!0,I||(I=_.avcSample=o(!0,C.pts,C.dts,"")),k&&(I.debug+="NDR "),I.frame=!0;var H=W.data;if(V&&H.length>4){var G=new y.default(H).readSliceType();(G===2||G===4||G===7||G===9)&&(I.key=!0)}break}case 5:L=!0,I||(I=_.avcSample=o(!0,C.pts,C.dts,"")),k&&(I.debug+="IDR "),I.key=!0,I.frame=!0;break;case 6:{L=!0,k&&I&&(I.debug+="SEI ");var B=new y.default(S(W.data));B.readUByte();for(var P=0,z=0,J=!1,ue=0;!J&&B.bytesAvailable>1;){P=0;do ue=B.readUByte(),P+=ue;while(ue===255);z=0;do ue=B.readUByte(),z+=ue;while(ue===255);if(P===4&&B.bytesAvailable!==0){J=!0;var de=B.readUByte();if(de===181){var Se=B.readUShort();if(Se===49){var Ae=B.readUInt();if(Ae===1195456820){var pe=B.readUByte();if(pe===3){for(var Oe=B.readUByte(),ye=B.readUByte(),ce=31&Oe,ae=[Oe,ye],re=0;re<ce;re++)ae.push(B.readUByte()),ae.push(B.readUByte()),ae.push(B.readUByte());t(_._txtTrack.samples,{type:3,pts:C.pts,bytes:ae})}}}}}else if(P===5&&B.bytesAvailable!==0){if(J=!0,z>16){for(var fe=[],te=0;te<16;te++)fe.push(B.readUByte().toString(16)),(te===3||te===5||te===7||te===9)&&fe.push("-");for(var ne=z-16,Te=new Uint8Array(ne),ie=0;ie<ne;ie++)Te[ie]=B.readUByte();t(_._txtTrack.samples,{pts:C.pts,payloadType:P,uuid:fe.join(""),userData:Object(T.utf8ArrayToStr)(Te),userDataBytes:Te})}}else if(z<B.bytesAvailable)for(var Z=0;Z<z;Z++)B.readUByte()}break}case 7:if(L=!0,V=!0,k&&I&&(I.debug+="SPS "),!E.sps){var X=new y.default(W.data),Q=X.readSPS();E.width=Q.width,E.height=Q.height,E.pixelRatio=Q.pixelRatio,E.sps=[W.data],E.duration=_._duration;for(var _e=W.data.subarray(1,4),ve="avc1.",Re=0;Re<3;Re++){var Je=_e[Re].toString(16);Je.length<2&&(Je="0"+Je),ve+=Je}E.codec=ve}break;case 8:L=!0,k&&I&&(I.debug+="PPS "),E.pps||(E.pps=[W.data]);break;case 9:L=!1,E.audFound=!0,I&&l(I,E),I=_.avcSample=o(!1,C.pts,C.dts,k?"AUD ":"");break;case 12:L=!1;break;default:L=!1,I&&(I.debug+="unknown NAL "+W.type+" ");break}if(I&&L){var qe=I.units;qe.push(W)}}),v&&I&&(l(I,E),this.avcSample=null)},f.getLastNalUnit=function(){var C,v=this.avcSample,_;if(!v||v.units.length===0){var E=this._avcTrack.samples;v=E[E.length-1]}if((C=v)!==null&&C!==void 0&&C.units){var w=v.units;_=w[w.length-1]}return _},f.parseAVCNALu=function(C){var v=C.byteLength,_=this._avcTrack,E=_.naluState||0,w=E,k=[],I=0,L,V,W,H=-1,G=0;for(E===-1&&(H=0,G=C[0]&31,E=0,I=1);I<v;){if(L=C[I++],!E){E=L?0:1;continue}if(E===1){E=L?0:2;continue}if(!L)E=3;else if(L===1){if(H>=0){var B={data:C.subarray(H,I-E-1),type:G};k.push(B)}else{var P=this.getLastNalUnit();if(P&&(w&&I<=4-w&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-w))),V=I-E-1,V>0)){var z=new Uint8Array(P.data.byteLength+V);z.set(P.data,0),z.set(C.subarray(0,V),P.data.byteLength),P.data=z,P.state=0}}I<v?(W=C[I]&31,H=I,G=W,E=0):E=-1}else E=0}if(H>=0&&E>=0){var J={data:C.subarray(H,v),type:G,state:E};k.push(J)}if(k.length===0){var ue=this.getLastNalUnit();if(ue){var de=new Uint8Array(ue.data.byteLength+C.byteLength);de.set(ue.data,0),de.set(C,ue.data.byteLength),ue.data=de}}return _.naluState=E,k},f.parseAACPES=function(C){var v=0,_=this._audioTrack,E=this.aacOverFlow,w=C.data;if(E){this.aacOverFlow=null;var k=E.sample.unit.byteLength,I=Math.min(E.missing,k),L=k-I;E.sample.unit.set(w.subarray(0,I),L),_.samples.push(E.sample),v=E.missing}var V,W;for(V=v,W=w.length;V<W-1&&!M.isHeader(w,V);V++);if(V!==v){var H,G;if(V<W-1?(H="AAC PES did not start with ADTS header,offset:"+V,G=!1):(H="no ADTS header found in AAC PES",G=!0),n.logger.warn("parsing error:"+H),this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:G,reason:H}),G)return}M.initTrackConfig(_,this.observer,w,V,this.audioCodec);var B;if(C.pts!==void 0)B=C.pts;else if(E){var P=M.getFrameDuration(_.samplerate);B=E.sample.pts+P}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var z=0;V<W;)if(M.isHeader(w,V)){if(V+5<W){var J=M.appendFrame(_,w,V,B,z);if(J)if(J.missing)this.aacOverFlow=J;else{V+=J.length,z++;continue}}break}else V++},f.parseMPEGPES=function(C){var v=C.data,_=v.length,E=0,w=0,k=C.pts;if(k===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;w<_;)if(m.isHeader(v,w)){var I=m.appendFrame(this._audioTrack,v,w,k,E);if(I)w+=I.length,E++;else break}else w++},f.parseID3PES=function(C){if(C.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},x}();a.minProbeByteLength=188;function o(x,f,R,C){return{key:x,frame:!1,pts:f,dts:R,units:[],debug:C,length:0}}function u(x,f){return(x[f+10]&31)<<8|x[f+11]}function h(x,f,R,C){var v={audio:-1,avc:-1,id3:-1,isAAC:!0},_=(x[f+1]&15)<<8|x[f+2],E=f+3+_-4,w=(x[f+10]&15)<<8|x[f+11];for(f+=12+w;f<E;){var k=(x[f+1]&31)<<8|x[f+2];switch(x[f]){case 207:if(!C){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:v.audio===-1&&(v.audio=k);break;case 21:v.id3===-1&&(v.id3=k);break;case 219:if(!C){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:v.avc===-1&&(v.avc=k);break;case 3:case 4:R?v.audio===-1&&(v.audio=k,v.isAAC=!1):n.logger.log("MPEG audio found, not supported in this browser");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}f+=((x[f+3]&15)<<8|x[f+4])+5}return v}function s(x){var f=0,R,C,v,_,E,w=x.data;if(!x||x.size===0)return null;for(;w[0].length<19&&w.length>1;){var k=new Uint8Array(w[0].length+w[1].length);k.set(w[0]),k.set(w[1],w[0].length),w[0]=k,w.splice(1,1)}R=w[0];var I=(R[0]<<16)+(R[1]<<8)+R[2];if(I===1){if(C=(R[4]<<8)+R[5],C&&C>x.size-6)return null;var L=R[7];L&192&&(_=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,L&64?(E=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,_-E>60*9e4&&(n.logger.warn(Math.round((_-E)/9e4)+"s delta between PTS and DTS, align them"),_=E)):E=_),v=R[8];var V=v+9;if(x.size<=V)return null;x.size-=V;for(var W=new Uint8Array(x.size),H=0,G=w.length;H<G;H++){R=w[H];var B=R.byteLength;if(V)if(V>B){V-=B;continue}else R=R.subarray(V),B-=V,V=0;W.set(R,f),f+=B}return C&&(C-=v+3),{data:W,pts:_,dts:E,len:C}}return null}function l(x,f){if(x.units.length&&x.frame){if(x.pts===void 0){var R=f.samples,C=R.length;if(C){var v=R[C-1];x.pts=v.pts,x.dts=v.dts}else{f.dropped++;return}}f.samples.push(x)}x.debug.length&&n.logger.log(x.pts+"/"+x.dts+":"+x.debug)}function t(x,f){var R=x.length;if(R>0){if(f.pts>=x[R-1].pts)x.push(f);else for(var C=R-1;C>=0;C--)if(f.pts<x[C].pts){x.splice(C,0,f);break}}else x.push(f)}function S(x){for(var f=x.byteLength,R=[],C=1;C<f-2;)x[C]===0&&x[C+1]===0&&x[C+2]===3?(R.push(C+2),C+=2):C++;if(R.length===0)return x;var v=f-R.length,_=new Uint8Array(v),E=0;for(C=0;C<v;E++,C++)E===R[0]&&(E++,R.shift()),_[C]=x[E];return _}g.default=a},"./src/errors.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"ErrorTypes",function(){return M}),O.d(g,"ErrorDetails",function(){return m});var M;(function(y){y.NETWORK_ERROR="networkError",y.MEDIA_ERROR="mediaError",y.KEY_SYSTEM_ERROR="keySystemError",y.MUX_ERROR="muxError",y.OTHER_ERROR="otherError"})(M||(M={}));var m;(function(y){y.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",y.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",y.KEY_SYSTEM_NO_SESSION="keySystemNoSession",y.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",y.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",y.MANIFEST_LOAD_ERROR="manifestLoadError",y.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",y.MANIFEST_PARSING_ERROR="manifestParsingError",y.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",y.LEVEL_EMPTY_ERROR="levelEmptyError",y.LEVEL_LOAD_ERROR="levelLoadError",y.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",y.LEVEL_SWITCH_ERROR="levelSwitchError",y.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",y.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",y.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",y.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",y.FRAG_LOAD_ERROR="fragLoadError",y.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",y.FRAG_DECRYPT_ERROR="fragDecryptError",y.FRAG_PARSING_ERROR="fragParsingError",y.REMUX_ALLOC_ERROR="remuxAllocError",y.KEY_LOAD_ERROR="keyLoadError",y.KEY_LOAD_TIMEOUT="keyLoadTimeOut",y.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",y.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",y.BUFFER_APPEND_ERROR="bufferAppendError",y.BUFFER_APPENDING_ERROR="bufferAppendingError",y.BUFFER_STALLED_ERROR="bufferStalledError",y.BUFFER_FULL_ERROR="bufferFullError",y.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",y.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",y.INTERNAL_EXCEPTION="internalException",y.INTERNAL_ABORTED="aborted",y.UNKNOWN="unknown"})(m||(m={}))},"./src/events.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"Events",function(){return M});var M;(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"})(M||(M={}))},"./src/hls.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return x});var M=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(M),y=O("./src/loader/playlist-loader.ts"),T=O("./src/loader/key-loader.ts"),b=O("./src/controller/id3-track-controller.ts"),p=O("./src/controller/latency-controller.ts"),d=O("./src/controller/level-controller.ts"),n=O("./src/controller/fragment-tracker.ts"),c=O("./src/controller/stream-controller.ts"),r=O("./src/is-supported.ts"),a=O("./src/utils/logger.ts"),o=O("./src/config.ts"),u=O("./node_modules/eventemitter3/index.js"),h=O.n(u),s=O("./src/events.ts"),l=O("./src/errors.ts");function t(f,R){for(var C=0;C<R.length;C++){var v=R[C];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(f,v.key,v)}}function S(f,R,C){return R&&t(f.prototype,R),C&&t(f,C),f}var x=function(){f.isSupported=function(){return Object(r.isSupported)()};function f(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new u.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 v=this.config=Object(o.mergeConfig)(f.DefaultConfig,C);this.userConfig=C,Object(a.enableLogs)(v.debug),this._autoLevelCapping=-1,v.progressive&&Object(o.enableStreamingMode)(v);var _=v.abrController,E=v.bufferController,w=v.capLevelController,k=v.fpsController,I=this.abrController=new _(this),L=this.bufferController=new E(this),V=this.capLevelController=new w(this),W=new k(this),H=new y.default(this),G=new T.default(this),B=new b.default(this),P=this.levelController=new d.default(this),z=new n.FragmentTracker(this),J=this.streamController=new c.default(this,z);V.setStreamController(J),W.setStreamController(J);var ue=[P,J];this.networkControllers=ue;var de=[H,G,I,L,V,W,B,z];this.audioTrackController=this.createController(v.audioTrackController,null,ue),this.createController(v.audioStreamController,z,ue),this.subtitleTrackController=this.createController(v.subtitleTrackController,null,ue),this.createController(v.subtitleStreamController,z,ue),this.createController(v.timelineController,null,de),this.emeController=this.createController(v.emeController,null,de),this.cmcdController=this.createController(v.cmcdController,null,de),this.latencyController=this.createController(p.default,null,de),this.coreComponents=de}var R=f.prototype;return R.createController=function(v,_,E){if(v){var w=_?new v(this,_):new v(this);return E&&E.push(w),w}return null},R.on=function(v,_,E){E===void 0&&(E=this),this._emitter.on(v,_,E)},R.once=function(v,_,E){E===void 0&&(E=this),this._emitter.once(v,_,E)},R.removeAllListeners=function(v){this._emitter.removeAllListeners(v)},R.off=function(v,_,E,w){E===void 0&&(E=this),this._emitter.off(v,_,E,w)},R.listeners=function(v){return this._emitter.listeners(v)},R.emit=function(v,_,E){return this._emitter.emit(v,_,E)},R.trigger=function(v,_){if(this.config.debug)return this.emit(v,v,_);try{return this.emit(v,v,_)}catch(E){a.logger.error("An internal error happened while handling event "+v+'. Error message: "'+E.message+'". Here is a stacktrace:',E),this.trigger(s.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:v,error:E})}return!1},R.listenerCount=function(v){return this._emitter.listenerCount(v)},R.destroy=function(){a.logger.log("destroy"),this.trigger(s.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(v){return v.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(v){return v.destroy()}),this.coreComponents.length=0},R.attachMedia=function(v){a.logger.log("attachMedia"),this._media=v,this.trigger(s.Events.MEDIA_ATTACHING,{media:v})},R.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(s.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(v){this.stopLoad();var _=this.media,E=this.url,w=this.url=M.buildAbsoluteURL(self.location.href,v,{alwaysNormalize:!0});a.logger.log("loadSource:"+w),_&&E&&E!==w&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(_)),this.trigger(s.Events.MANIFEST_LOADING,{url:v})},R.startLoad=function(v){v===void 0&&(v=-1),a.logger.log("startLoad("+v+")"),this.networkControllers.forEach(function(_){_.startLoad(v)})},R.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(v){v.stopLoad()})},R.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){a.logger.log("recoverMediaError");var v=this._media;this.detachMedia(),v&&this.attachMedia(v)},R.removeLevel=function(v,_){_===void 0&&(_=0),this.levelController.removeLevel(v,_)},S(f,[{key:"levels",get:function(){var v=this.levelController.levels;return v||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(v){a.logger.log("set currentLevel:"+v),this.loadLevel=v,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(v){a.logger.log("set nextLevel:"+v),this.levelController.manualLevel=v,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(v){a.logger.log("set loadLevel:"+v),this.levelController.manualLevel=v}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(v){this.levelController.nextLoadLevel=v}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(v){a.logger.log("set firstLevel:"+v),this.levelController.firstLevel=v}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(v){a.logger.log("set startLevel:"+v),v!==-1&&(v=Math.max(v,this.minAutoLevel)),this.levelController.startLevel=v}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(v){var _=!!v;_!==this.config.capLevelToPlayerSize&&(_?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=_)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(v){this._autoLevelCapping!==v&&(a.logger.log("set autoLevelCapping:"+v),this._autoLevelCapping=v)}},{key:"bandwidthEstimate",get:function(){var v=this.abrController.bwEstimator;return v?v.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var v=this.levels,_=this.config.minAutoBitrate;if(!v)return 0;for(var E=v.length,w=0;w<E;w++)if(v[w].maxBitrate>_)return w;return 0}},{key:"maxAutoLevel",get:function(){var v=this.levels,_=this.autoLevelCapping,E;return _===-1&&v&&v.length?E=v.length-1:E=_,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(v){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,v)}},{key:"audioTracks",get:function(){var v=this.audioTrackController;return v?v.audioTracks:[]}},{key:"audioTrack",get:function(){var v=this.audioTrackController;return v?v.audioTrack:-1},set:function(v){var _=this.audioTrackController;_&&(_.audioTrack=v)}},{key:"subtitleTracks",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTrack:-1},set:function(v){var _=this.subtitleTrackController;_&&(_.subtitleTrack=v)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var v=this.subtitleTrackController;return v?v.subtitleDisplay:!1},set:function(v){var _=this.subtitleTrackController;_&&(_.subtitleDisplay=v)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(v){this.config.lowLatencyMode=v}},{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 s.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return f.defaultConfig?f.defaultConfig:o.hlsDefaultConfig},set:function(v){f.defaultConfig=v}}]),f}();x.defaultConfig=void 0},"./src/is-supported.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"isSupported",function(){return y}),O.d(g,"changeTypeSupported",function(){return T});var M=O("./src/utils/mediasource-helper.ts");function m(){return self.SourceBuffer||self.WebKitSourceBuffer}function y(){var b=Object(M.getMediaSource)();if(!b)return!1;var p=m(),d=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!p||p.prototype&&typeof p.prototype.appendBuffer=="function"&&typeof p.prototype.remove=="function";return!!d&&!!n}function T(){var b,p=m();return typeof(p==null||((b=p.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a}),O.d(g,"LoadError",function(){return u});var M=O("./src/polyfills/number.ts"),m=O("./src/errors.ts");function y(h,s){h.prototype=Object.create(s.prototype),h.prototype.constructor=h,n(h,s)}function T(h){var s=typeof Map=="function"?new Map:void 0;return T=function(t){if(t===null||!d(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s!="undefined"){if(s.has(t))return s.get(t);s.set(t,S)}function S(){return b(t,arguments,c(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),n(S,t)},T(h)}function b(h,s,l){return p()?b=Reflect.construct:b=function(S,x,f){var R=[null];R.push.apply(R,x);var C=Function.bind.apply(S,R),v=new C;return f&&n(v,f.prototype),v},b.apply(null,arguments)}function p(){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(h){return!1}}function d(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function n(h,s){return n=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},n(h,s)}function c(h){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},c(h)}var r=Math.pow(2,17),a=function(){function h(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var s=h.prototype;return s.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},s.abort=function(){this.loader&&this.loader.abort()},s.load=function(t,S){var x=this,f=t.url;if(!f)return Promise.reject(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(f?"part list":"url")));this.abort();var R=this.config,C=R.fLoader,v=R.loader;return new Promise(function(_,E){x.loader&&x.loader.destroy();var w=x.loader=t.loader=C?new C(R):new v(R),k=o(t),I={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};t.stats=w.stats,w.load(k,I,{onSuccess:function(V,W,H,G){x.resetLoader(t,w),_({frag:t,part:null,payload:V.data,networkDetails:G})},onError:function(V,W,H){x.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:V,networkDetails:H}))},onAbort:function(V,W,H){x.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:H}))},onTimeout:function(V,W,H){x.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:H}))},onProgress:function(V,W,H,G){S&&S({frag:t,part:null,payload:H,networkDetails:G})}})})},s.loadPart=function(t,S,x){var f=this;this.abort();var R=this.config,C=R.fLoader,v=R.loader;return new Promise(function(_,E){f.loader&&f.loader.destroy();var w=f.loader=t.loader=C?new C(R):new v(R),k=o(t,S),I={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};S.stats=w.stats,w.load(k,I,{onSuccess:function(V,W,H,G){f.resetLoader(t,w),f.updateStatsFromPart(t,S);var B={frag:t,part:S,payload:V.data,networkDetails:G};x(B),_(B)},onError:function(V,W,H){f.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:V,networkDetails:H}))},onAbort:function(V,W,H){t.stats.aborted=S.stats.aborted,f.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:H}))},onTimeout:function(V,W,H){f.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:H}))}})})},s.updateStatsFromPart=function(t,S){var x=t.stats,f=S.stats,R=f.total;if(x.loaded+=f.loaded,R){var C=Math.round(t.duration/S.duration),v=Math.min(Math.round(x.loaded/R),C),_=C-v,E=_*Math.round(x.loaded/v);x.total=x.loaded+E}else x.total=Math.max(x.loaded,x.total);var w=x.loading,k=f.loading;w.start?w.first+=k.first-k.start:(w.start=k.start,w.first=k.first),w.end=k.end},s.resetLoader=function(t,S){t.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},h}();function o(h,s){s===void 0&&(s=null);var l=s||h,t={frag:h,part:s,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},S=l.byteRangeStartOffset,x=l.byteRangeEndOffset;return Object(M.isFiniteNumber)(S)&&Object(M.isFiniteNumber)(x)&&(t.rangeStart=S,t.rangeEnd=x),t}var u=function(h){y(s,h);function s(l){for(var t,S=arguments.length,x=new Array(S>1?S-1:0),f=1;f<S;f++)x[f-1]=arguments[f];return t=h.call.apply(h,[this].concat(x))||this,t.data=void 0,t.data=l,t}return s}(T(Error))},"./src/loader/fragment.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"ElementaryStreamTypes",function(){return a}),O.d(g,"BaseSegment",function(){return o}),O.d(g,"Fragment",function(){return u}),O.d(g,"Part",function(){return h});var M=O("./src/polyfills/number.ts"),m=O("./node_modules/url-toolkit/src/url-toolkit.js"),y=O.n(m),T=O("./src/utils/logger.ts"),b=O("./src/loader/level-key.ts"),p=O("./src/loader/load-stats.ts");function d(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,n(s,l)}function n(s,l){return n=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S},n(s,l)}function c(s,l){for(var t=0;t<l.length;t++){var S=l[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(s,S.key,S)}}function r(s,l,t){return l&&c(s.prototype,l),t&&c(s,t),s}var a;(function(s){s.AUDIO="audio",s.VIDEO="video",s.AUDIOVIDEO="audiovideo"})(a||(a={}));var o=function(){function s(t){var S;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(S={},S[a.AUDIO]=null,S[a.VIDEO]=null,S[a.AUDIOVIDEO]=null,S),this.baseurl=t}var l=s.prototype;return l.setByteRange=function(S,x){var f=S.split("@",2),R=[];f.length===1?R[0]=x?x.byteRangeEndOffset:0:R[0]=parseInt(f[1]),R[1]=parseInt(f[0])+R[0],this._byteRange=R},r(s,[{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(S){this._url=S}}]),s}(),u=function(s){d(l,s);function l(S,x){var f;return f=s.call(this,x)||this,f._decryptdata=null,f.rawProgramDateTime=null,f.programDateTime=null,f.tagList=[],f.duration=0,f.sn=0,f.levelkey=void 0,f.type=void 0,f.loader=null,f.level=-1,f.cc=0,f.startPTS=void 0,f.endPTS=void 0,f.appendedPTS=void 0,f.startDTS=void 0,f.endDTS=void 0,f.start=0,f.deltaPTS=void 0,f.maxStartPTS=void 0,f.minEndPTS=void 0,f.stats=new p.LoadStats,f.urlId=0,f.data=void 0,f.bitrateTest=!1,f.title=null,f.initSegment=null,f.type=S,f}var t=l.prototype;return t.createInitializationVector=function(x){for(var f=new Uint8Array(16),R=12;R<16;R++)f[R]=x>>8*(15-R)&255;return f},t.setDecryptDataFromLevelKey=function(x,f){var R=x;return(x==null?void 0:x.method)==="AES-128"&&x.uri&&!x.iv&&(R=b.LevelKey.fromURI(x.uri),R.method=x.method,R.iv=this.createInitializationVector(f),R.keyFormat="identity"),R},t.setElementaryStreamInfo=function(x,f,R,C,v,_){_===void 0&&(_=!1);var E=this.elementaryStreams,w=E[x];if(!w){E[x]={startPTS:f,endPTS:R,startDTS:C,endDTS:v,partial:_};return}w.startPTS=Math.min(w.startPTS,f),w.endPTS=Math.max(w.endPTS,R),w.startDTS=Math.min(w.startDTS,C),w.endDTS=Math.max(w.endDTS,v)},t.clearElementaryStreamInfo=function(){var x=this.elementaryStreams;x[a.AUDIO]=null,x[a.VIDEO]=null,x[a.AUDIOVIDEO]=null},r(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var x=this.sn;typeof x!="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'),x=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,x)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(M.isFiniteNumber)(this.programDateTime))return null;var x=Object(M.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+x*1e3}},{key:"encrypted",get:function(){var x;return!!((x=this.decryptdata)!==null&&x!==void 0&&x.keyFormat&&this.decryptdata.uri)}}]),l}(o),h=function(s){d(l,s);function l(t,S,x,f,R){var C;C=s.call(this,x)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new p.LoadStats,C.duration=t.decimalFloatingPoint("DURATION"),C.gap=t.bool("GAP"),C.independent=t.bool("INDEPENDENT"),C.relurl=t.enumeratedString("URI"),C.fragment=S,C.index=f;var v=t.enumeratedString("BYTERANGE");return v&&C.setByteRange(v,R),R&&(C.fragOffset=R.fragOffset+R.duration),C}return r(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),l}(o)},"./src/loader/key-loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return T});var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/utils/logger.ts"),T=function(){function b(d){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=d,this._registerListeners()}var p=b.prototype;return p._registerListeners=function(){this.hls.on(M.Events.KEY_LOADING,this.onKeyLoading,this)},p._unregisterListeners=function(){this.hls.off(M.Events.KEY_LOADING,this.onKeyLoading)},p.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var c=this.loaders[n];c&&c.destroy()}this.loaders={}},p.onKeyLoading=function(n,c){var r=c.frag,a=r.type,o=this.loaders[a];if(!r.decryptdata){y.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var u=r.decryptdata.uri;if(u!==this.decrypturl||this.decryptkey===null){var h=this.hls.config;if(o&&(y.logger.warn("abort previous key loader for type:"+a),o.abort()),!u){y.logger.warn("key uri is falsy");return}var s=h.loader,l=r.loader=this.loaders[a]=new s(h);this.decrypturl=u,this.decryptkey=null;var t={url:u,frag:r,responseType:"arraybuffer"},S={timeout:h.fragLoadingTimeOut,maxRetry:0,retryDelay:h.fragLoadingRetryDelay,maxRetryDelay:h.fragLoadingMaxRetryTimeout,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(t,S,x)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(M.Events.KEY_LOADED,{frag:r}))},p.loadsuccess=function(n,c,r){var a=r.frag;if(!a.decryptdata){y.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(n.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(M.Events.KEY_LOADED,{frag:a})},p.loaderror=function(n,c){var r=c.frag,a=r.loader;a&&a.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:n})},p.loadtimeout=function(n,c){var r=c.frag,a=r.loader;a&&a.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},b}()},"./src/loader/level-details.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"LevelDetails",function(){return b});var M=O("./src/polyfills/number.ts");function m(p,d){for(var n=0;n<d.length;n++){var c=d[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(p,c.key,c)}}function y(p,d,n){return d&&m(p.prototype,d),n&&m(p,n),p}var T=10,b=function(){function p(n){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=n}var d=p.prototype;return d.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var r=this.lastPartSn-c.lastPartSn,a=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!a||!!r,this.advanced=this.endSN>c.endSN||r>0||r===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},y(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(M.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 r=this.driftEnd-this.driftStart;return r*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}}]),p}()},"./src/loader/level-key.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"LevelKey",function(){return b});var M=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(M);function y(p,d){for(var n=0;n<d.length;n++){var c=d[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(p,c.key,c)}}function T(p,d,n){return d&&y(p.prototype,d),n&&y(p,n),p}var b=function(){p.fromURL=function(n,c){return new p(n,c)},p.fromURI=function(n){return new p(n)};function p(d,n){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,n?this._uri=Object(M.buildAbsoluteURL)(d,n,{alwaysNormalize:!0}):this._uri=d}return T(p,[{key:"uri",get:function(){return this._uri}}]),p}()},"./src/loader/load-stats.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"LoadStats",function(){return M});var M=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return l});var M=O("./src/polyfills/number.ts"),m=O("./node_modules/url-toolkit/src/url-toolkit.js"),y=O.n(m),T=O("./src/loader/fragment.ts"),b=O("./src/loader/level-details.ts"),p=O("./src/loader/level-key.ts"),d=O("./src/utils/attr-list.ts"),n=O("./src/utils/logger.ts"),c=O("./src/utils/codecs.ts"),r=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,a=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),u=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("|")),h=/\.(mp4|m4s|m4v|m4a)$/i;function s(R){var C,v;return h.test((C=(v=m.parseURL(R))===null||v===void 0?void 0:v.path)!=null?C:"")}var l=function(){function R(){}return R.findGroup=function(v,_){for(var E=0;E<v.length;E++){var w=v[E];if(w.id===_)return w}},R.convertAVC1ToAVCOTI=function(v){var _=v.split(".");if(_.length>2){var E=_.shift()+".";return E+=parseInt(_.shift()).toString(16),E+=("000"+parseInt(_.shift()).toString(16)).substr(-4),E}return v},R.resolve=function(v,_){return m.buildAbsoluteURL(_,v,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(v,_){var E=[],w={},k=!1;r.lastIndex=0;for(var I;(I=r.exec(v))!=null;)if(I[1]){var L=new d.AttrList(I[1]),V={attrs:L,bitrate:L.decimalInteger("AVERAGE-BANDWIDTH")||L.decimalInteger("BANDWIDTH"),name:L.NAME,url:R.resolve(I[2],_)},W=L.decimalResolution("RESOLUTION");W&&(V.width=W.width,V.height=W.height),t((L.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),V),V.videoCodec&&V.videoCodec.indexOf("avc1")!==-1&&(V.videoCodec=R.convertAVC1ToAVCOTI(V.videoCodec)),E.push(V)}else if(I[3]){var H=new d.AttrList(I[3]);H["DATA-ID"]&&(k=!0,w[H["DATA-ID"]]=H)}return{levels:E,sessionData:k?w:null}},R.parseMasterPlaylistMedia=function(v,_,E,w){w===void 0&&(w=[]);var k,I=[],L=0;for(a.lastIndex=0;(k=a.exec(v))!==null;){var V=new d.AttrList(k[1]);if(V.TYPE===E){var W={attrs:V,bitrate:0,id:L++,groupId:V["GROUP-ID"],instreamId:V["INSTREAM-ID"],name:V.NAME||V.LANGUAGE||"",type:E,default:V.bool("DEFAULT"),autoselect:V.bool("AUTOSELECT"),forced:V.bool("FORCED"),lang:V.LANGUAGE,url:V.URI?R.resolve(V.URI,_):""};if(w.length){var H=R.findGroup(w,W.groupId)||w[0];S(W,H,"audioCodec"),S(W,H,"textCodec")}I.push(W)}}return I},R.parseLevelPlaylist=function(v,_,E,w,k){var I=new b.LevelDetails(_),L=I.fragments,V=null,W=0,H=0,G=0,B=0,P=null,z=new T.Fragment(w,_),J,ue,de,Se=-1,Ae=!1;for(o.lastIndex=0,I.m3u8=v;(J=o.exec(v))!==null;){Ae&&(Ae=!1,z=new T.Fragment(w,_),z.start=G,z.sn=W,z.cc=B,z.level=E,V&&(z.initSegment=V,z.rawProgramDateTime=V.rawProgramDateTime));var pe=J[1];if(pe){z.duration=parseFloat(pe);var Oe=(" "+J[2]).slice(1);z.title=Oe||null,z.tagList.push(Oe?["INF",pe,Oe]:["INF",pe])}else if(J[3])Object(M.isFiniteNumber)(z.duration)&&(z.start=G,de&&(z.levelkey=de),z.sn=W,z.level=E,z.cc=B,z.urlId=k,L.push(z),z.relurl=(" "+J[3]).slice(1),f(z,P),P=z,G+=z.duration,W++,H=0,Ae=!0);else if(J[4]){var ye=(" "+J[4]).slice(1);P?z.setByteRange(ye,P):z.setByteRange(ye)}else if(J[5])z.rawProgramDateTime=(" "+J[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),Se===-1&&(Se=L.length);else{if(J=J[0].match(u),!J){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(ue=1;ue<J.length&&!(typeof J[ue]!="undefined");ue++);var ce=(" "+J[ue]).slice(1),ae=(" "+J[ue+1]).slice(1),re=J[ue+2]?(" "+J[ue+2]).slice(1):"";switch(ce){case"PLAYLIST-TYPE":I.type=ae.toUpperCase();break;case"MEDIA-SEQUENCE":W=I.startSN=parseInt(ae);break;case"SKIP":{var fe=new d.AttrList(ae),te=fe.decimalInteger("SKIPPED-SEGMENTS");if(Object(M.isFiniteNumber)(te)){I.skippedSegments=te;for(var ne=te;ne--;)L.unshift(null);W+=te}var Te=fe.enumeratedString("RECENTLY-REMOVED-DATERANGES");Te&&(I.recentlyRemovedDateranges=Te.split(" "));break}case"TARGETDURATION":I.targetduration=parseFloat(ae);break;case"VERSION":I.version=parseInt(ae);break;case"EXTM3U":break;case"ENDLIST":I.live=!1;break;case"#":(ae||re)&&z.tagList.push(re?[ae,re]:[ae]);break;case"DIS":B++;case"GAP":z.tagList.push([ce]);break;case"BITRATE":z.tagList.push([ce,ae]);break;case"DISCONTINUITY-SEQ":B=parseInt(ae);break;case"KEY":{var ie,Z=new d.AttrList(ae),X=Z.enumeratedString("METHOD"),Q=Z.URI,_e=Z.hexadecimalInteger("IV"),ve=Z.enumeratedString("KEYFORMATVERSIONS"),Re=Z.enumeratedString("KEYID"),Je=(ie=Z.enumeratedString("KEYFORMAT"))!=null?ie:"identity",qe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(qe.indexOf(Je)>-1){n.logger.warn("Keyformat "+Je+" is not supported from the manifest");continue}else if(Je!=="identity")continue;X&&(de=p.LevelKey.fromURL(_,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(de.method=X,de.keyFormat=Je,Re&&(de.keyID=Re),ve&&(de.keyFormatVersions=ve),de.iv=_e));break}case"START":{var rt=new d.AttrList(ae),ut=rt.decimalFloatingPoint("TIME-OFFSET");Object(M.isFiniteNumber)(ut)&&(I.startTimeOffset=ut);break}case"MAP":{var dt=new d.AttrList(ae);z.relurl=dt.URI,dt.BYTERANGE&&z.setByteRange(dt.BYTERANGE),z.level=E,z.sn="initSegment",de&&(z.levelkey=de),z.initSegment=null,V=z,Ae=!0;break}case"SERVER-CONTROL":{var ft=new d.AttrList(ae);I.canBlockReload=ft.bool("CAN-BLOCK-RELOAD"),I.canSkipUntil=ft.optionalFloat("CAN-SKIP-UNTIL",0),I.canSkipDateRanges=I.canSkipUntil>0&&ft.bool("CAN-SKIP-DATERANGES"),I.partHoldBack=ft.optionalFloat("PART-HOLD-BACK",0),I.holdBack=ft.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Be=new d.AttrList(ae);I.partTarget=Be.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=I.partList;Ie||(Ie=I.partList=[]);var at=H>0?Ie[Ie.length-1]:void 0,ct=H++,$e=new T.Part(new d.AttrList(ae),z,_,ct,at);Ie.push($e),z.duration+=$e.duration;break}case"PRELOAD-HINT":{var st=new d.AttrList(ae);I.preloadHint=st;break}case"RENDITION-REPORT":{var Ue=new d.AttrList(ae);I.renditionReports=I.renditionReports||[],I.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+J);break}}}P&&!P.relurl?(L.pop(),G-=P.duration,I.partList&&(I.fragmentHint=P)):I.partList&&(f(z,P),z.cc=B,I.fragmentHint=z);var Le=L.length,Me=L[0],Ee=L[Le-1];if(G+=I.skippedSegments*I.targetduration,G>0&&Le&&Ee){I.averagetargetduration=G/Le;var Ce=Ee.sn;I.endSN=Ce!=="initSegment"?Ce:0,Me&&(I.startCC=Me.cc,Me.initSegment||I.fragments.every(function(ke){return ke.relurl&&s(ke.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),z=new T.Fragment(w,_),z.relurl=Ee.relurl,z.level=E,z.sn="initSegment",Me.initSegment=z,I.needSidxRanges=!0))}else I.endSN=0,I.startCC=0;return I.fragmentHint&&(G+=I.fragmentHint.duration),I.totalduration=G,I.endCC=B,Se>0&&x(L,Se),I},R}();function t(R,C){["video","audio","text"].forEach(function(v){var _=R.filter(function(w){return Object(c.isCodecType)(w,v)});if(_.length){var E=_.filter(function(w){return w.lastIndexOf("avc1",0)===0||w.lastIndexOf("mp4a",0)===0});C[v+"Codec"]=E.length>0?E[0]:_[0],R=R.filter(function(w){return _.indexOf(w)===-1})}}),C.unknownCodecs=R}function S(R,C,v){var _=C[v];_&&(R[v]=_)}function x(R,C){for(var v=R[C],_=C;_--;){var E=R[_];if(!E)return;E.programDateTime=v.programDateTime-E.duration*1e3,v=E}}function f(R,C){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):C!=null&&C.programDateTime&&(R.programDateTime=C.endProgramDateTime),Object(M.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),y=O("./src/errors.ts"),T=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),p=O("./src/loader/m3u8-parser.ts"),d=O("./src/types/loader.ts"),n=O("./src/utils/attr-list.ts");function c(o){var u=o.type;switch(u){case d.PlaylistContextType.AUDIO_TRACK:return d.PlaylistLevelType.AUDIO;case d.PlaylistContextType.SUBTITLE_TRACK:return d.PlaylistLevelType.SUBTITLE;default:return d.PlaylistLevelType.MAIN}}function r(o,u){var h=o.url;return(h===void 0||h.indexOf("data:")===0)&&(h=u.url),h}var a=function(){function o(h){this.hls=void 0,this.loaders=Object.create(null),this.hls=h,this.registerListeners()}var u=o.prototype;return u.registerListeners=function(){var s=this.hls;s.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(m.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.on(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.unregisterListeners=function(){var s=this.hls;s.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(m.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.off(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.createInternalLoader=function(s){var l=this.hls.config,t=l.pLoader,S=l.loader,x=t||S,f=new x(l);return s.loader=f,this.loaders[s.type]=f,f},u.getInternalLoader=function(s){return this.loaders[s.type]},u.resetInternalLoader=function(s){this.loaders[s]&&delete this.loaders[s]},u.destroyInternalLoaders=function(){for(var s in this.loaders){var l=this.loaders[s];l&&l.destroy(),this.resetInternalLoader(s)}},u.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},u.onManifestLoading=function(s,l){var t=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},u.onLevelLoading=function(s,l){var t=l.id,S=l.level,x=l.url,f=l.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:d.PlaylistContextType.LEVEL,url:x,deliveryDirectives:f})},u.onAudioTrackLoading=function(s,l){var t=l.id,S=l.groupId,x=l.url,f=l.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:x,deliveryDirectives:f})},u.onSubtitleTrackLoading=function(s,l){var t=l.id,S=l.groupId,x=l.url,f=l.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:x,deliveryDirectives:f})},u.load=function(s){var l,t=this.hls.config,S=this.getInternalLoader(s);if(S){var x=S.context;if(x&&x.url===s.url){T.logger.trace("[playlist-loader]: playlist request ongoing");return}T.logger.log("[playlist-loader]: aborting previous loader for type: "+s.type),S.abort()}var f,R,C,v;switch(s.type){case d.PlaylistContextType.MANIFEST:f=t.manifestLoadingMaxRetry,R=t.manifestLoadingTimeOut,C=t.manifestLoadingRetryDelay,v=t.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:f=0,R=t.levelLoadingTimeOut;break;default:f=t.levelLoadingMaxRetry,R=t.levelLoadingTimeOut,C=t.levelLoadingRetryDelay,v=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(s),(l=s.deliveryDirectives)!==null&&l!==void 0&&l.part){var _;if(s.type===d.PlaylistContextType.LEVEL&&s.level!==null?_=this.hls.levels[s.level].details:s.type===d.PlaylistContextType.AUDIO_TRACK&&s.id!==null?_=this.hls.audioTracks[s.id].details:s.type===d.PlaylistContextType.SUBTITLE_TRACK&&s.id!==null&&(_=this.hls.subtitleTracks[s.id].details),_){var E=_.partTarget,w=_.targetduration;E&&w&&(R=Math.min(Math.max(E*3,w*.8)*1e3,R))}}var k={timeout:R,maxRetry:f,retryDelay:C,maxRetryDelay:v,highWaterMark:0},I={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(s,k,I)},u.loadsuccess=function(s,l,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(s,t),this.handlePlaylistLoaded(s,l,t,S);return}this.resetInternalLoader(t.type);var x=s.data;if(x.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(s,t,"no EXTM3U delimiter",S);return}l.parsing.start=performance.now(),x.indexOf("#EXTINF:")>0||x.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(s,l,t,S):this.handleMasterPlaylist(s,l,t,S)},u.loaderror=function(s,l,t){t===void 0&&(t=null),this.handleNetworkError(l,t,!1,s)},u.loadtimeout=function(s,l,t){t===void 0&&(t=null),this.handleNetworkError(l,t,!0)},u.handleMasterPlaylist=function(s,l,t,S){var x=this.hls,f=s.data,R=r(s,t),C=p.default.parseMasterPlaylist(f,R),v=C.levels,_=C.sessionData;if(!v.length){this.handleManifestParsingError(s,t,"no level found in manifest",S);return}var E=v.map(function(W){return{id:W.attrs.AUDIO,audioCodec:W.audioCodec}}),w=v.map(function(W){return{id:W.attrs.SUBTITLES,textCodec:W.textCodec}}),k=p.default.parseMasterPlaylistMedia(f,R,"AUDIO",E),I=p.default.parseMasterPlaylistMedia(f,R,"SUBTITLES",w),L=p.default.parseMasterPlaylistMedia(f,R,"CLOSED-CAPTIONS");if(k.length){var V=k.some(function(W){return!W.url});!V&&v[0].audioCodec&&!v[0].attrs.AUDIO&&(T.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),k.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}x.trigger(m.Events.MANIFEST_LOADED,{levels:v,audioTracks:k,subtitles:I,captions:L,url:R,stats:l,networkDetails:S,sessionData:_})},u.handleTrackOrLevelPlaylist=function(s,l,t,S){var x=this.hls,f=t.id,R=t.level,C=t.type,v=r(s,t),_=Object(M.isFiniteNumber)(f)?f:0,E=Object(M.isFiniteNumber)(R)?R:_,w=c(t),k=p.default.parseLevelPlaylist(s.data,v,E,w,_);if(!k.fragments.length){x.trigger(m.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:v,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(C===d.PlaylistContextType.MANIFEST){var I={attrs:new n.AttrList({}),bitrate:0,details:k,name:"",url:v};x.trigger(m.Events.MANIFEST_LOADED,{levels:[I],audioTracks:[],url:v,stats:l,networkDetails:S,sessionData:null})}if(l.parsing.end=performance.now(),k.needSidxRanges){var L,V=(L=k.fragments[0].initSegment)===null||L===void 0?void 0:L.url;this.load({url:V,isSidxRequest:!0,type:C,level:R,levelDetails:k,id:f,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=k,this.handlePlaylistLoaded(s,l,t,S)},u.handleSidxRequest=function(s,l){var t=Object(b.parseSegmentIndex)(new Uint8Array(s.data));if(!t)return;var S=t.references,x=l.levelDetails;S.forEach(function(f,R){var C=f.info,v=x.fragments[R];v.byteRange.length===0&&v.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),v.initSegment&&v.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},u.handleManifestParsingError=function(s,l,t,S){this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===d.PlaylistContextType.MANIFEST,url:s.url,reason:t,response:s,context:l,networkDetails:S})},u.handleNetworkError=function(s,l,t,S){t===void 0&&(t=!1),T.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+s.type+" level: "+s.level+" id: "+s.id+' group-id: "'+s.groupId+'"');var x=y.ErrorDetails.UNKNOWN,f=!1,R=this.getInternalLoader(s);switch(s.type){case d.PlaylistContextType.MANIFEST:x=t?y.ErrorDetails.MANIFEST_LOAD_TIMEOUT:y.ErrorDetails.MANIFEST_LOAD_ERROR,f=!0;break;case d.PlaylistContextType.LEVEL:x=t?y.ErrorDetails.LEVEL_LOAD_TIMEOUT:y.ErrorDetails.LEVEL_LOAD_ERROR,f=!1;break;case d.PlaylistContextType.AUDIO_TRACK:x=t?y.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,f=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:x=t?y.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:y.ErrorDetails.SUBTITLE_LOAD_ERROR,f=!1;break}R&&this.resetInternalLoader(s.type);var C={type:y.ErrorTypes.NETWORK_ERROR,details:x,fatal:f,url:s.url,loader:R,context:s,networkDetails:l};S&&(C.response=S),this.hls.trigger(m.Events.ERROR,C)},u.handlePlaylistLoaded=function(s,l,t,S){var x=t.type,f=t.level,R=t.id,C=t.groupId,v=t.loader,_=t.levelDetails,E=t.deliveryDirectives;if(!(_!=null&&_.targetduration)){this.handleManifestParsingError(s,t,"invalid target duration",S);return}if(!v)return;_.live&&(v.getCacheAge&&(_.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(_.ageHeader))&&(_.ageHeader=0));switch(x){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(m.Events.LEVEL_LOADED,{details:_,level:f||0,id:R||0,stats:l,networkDetails:S,deliveryDirectives:E});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(m.Events.AUDIO_TRACK_LOADED,{details:_,id:R||0,groupId:C||"",stats:l,networkDetails:S,deliveryDirectives:E});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(m.Events.SUBTITLE_TRACK_LOADED,{details:_,id:R||0,groupId:C||"",stats:l,networkDetails:S,deliveryDirectives:E});break}},o}();g.default=a},"./src/polyfills/number.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"isFiniteNumber",function(){return M}),O.d(g,"MAX_SAFE_INTEGER",function(){return m});var M=Number.isFinite||function(y){return typeof y=="number"&&isFinite(y)},m=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,g,O){"use strict";O.r(g);var M=function(){function m(){}return m.getSilentFrame=function(T,b){switch(T){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},m}();g.default=M},"./src/remux/mp4-generator.ts":function(N,g,O){"use strict";O.r(g);var M=Math.pow(2,32)-1,m=function(){function y(){}return y.init=function(){y.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var b;for(b in y.types)y.types.hasOwnProperty(b)&&(y.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var p=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),d=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);y.HDLR_TYPES={video:p,audio:d};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);y.STTS=y.STSC=y.STCO=c,y.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),y.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),y.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),y.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);y.FTYP=y.box(y.types.ftyp,r,o,r,a),y.DINF=y.box(y.types.dinf,y.box(y.types.dref,n))},y.box=function(b){for(var p=8,d=arguments.length,n=new Array(d>1?d-1:0),c=1;c<d;c++)n[c-1]=arguments[c];for(var r=n.length,a=r;r--;)p+=n[r].byteLength;var o=new Uint8Array(p);for(o[0]=p>>24&255,o[1]=p>>16&255,o[2]=p>>8&255,o[3]=p&255,o.set(b,4),r=0,p=8;r<a;r++)o.set(n[r],p),p+=n[r].byteLength;return o},y.hdlr=function(b){return y.box(y.types.hdlr,y.HDLR_TYPES[b])},y.mdat=function(b){return y.box(y.types.mdat,b)},y.mdhd=function(b,p){p*=b;var d=Math.floor(p/(M+1)),n=Math.floor(p%(M+1));return y.box(y.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},y.mdia=function(b){return y.box(y.types.mdia,y.mdhd(b.timescale,b.duration),y.hdlr(b.type),y.minf(b))},y.mfhd=function(b){return y.box(y.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},y.minf=function(b){return b.type==="audio"?y.box(y.types.minf,y.box(y.types.smhd,y.SMHD),y.DINF,y.stbl(b)):y.box(y.types.minf,y.box(y.types.vmhd,y.VMHD),y.DINF,y.stbl(b))},y.moof=function(b,p,d){return y.box(y.types.moof,y.mfhd(b),y.traf(d,p))},y.moov=function(b){for(var p=b.length,d=[];p--;)d[p]=y.trak(b[p]);return y.box.apply(null,[y.types.moov,y.mvhd(b[0].timescale,b[0].duration)].concat(d).concat(y.mvex(b)))},y.mvex=function(b){for(var p=b.length,d=[];p--;)d[p]=y.trex(b[p]);return y.box.apply(null,[y.types.mvex].concat(d))},y.mvhd=function(b,p){p*=b;var d=Math.floor(p/(M+1)),n=Math.floor(p%(M+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return y.box(y.types.mvhd,c)},y.sdtp=function(b){var p=b.samples||[],d=new Uint8Array(4+p.length),n,c;for(n=0;n<p.length;n++)c=p[n].flags,d[n+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return y.box(y.types.sdtp,d)},y.stbl=function(b){return y.box(y.types.stbl,y.stsd(b),y.box(y.types.stts,y.STTS),y.box(y.types.stsc,y.STSC),y.box(y.types.stsz,y.STSZ),y.box(y.types.stco,y.STCO))},y.avc1=function(b){var p=[],d=[],n,c,r;for(n=0;n<b.sps.length;n++)c=b.sps[n],r=c.byteLength,p.push(r>>>8&255),p.push(r&255),p=p.concat(Array.prototype.slice.call(c));for(n=0;n<b.pps.length;n++)c=b.pps[n],r=c.byteLength,d.push(r>>>8&255),d.push(r&255),d=d.concat(Array.prototype.slice.call(c));var a=y.box(y.types.avcC,new Uint8Array([1,p[3],p[4],p[5],252|3,224|b.sps.length].concat(p).concat([b.pps.length]).concat(d))),o=b.width,u=b.height,h=b.pixelRatio[0],s=b.pixelRatio[1];return y.box(y.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,o>>8&255,o&255,u>>8&255,u&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]),a,y.box(y.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),y.box(y.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,h&255,s>>24,s>>16&255,s>>8&255,s&255])))},y.esds=function(b){var p=b.config.length;return new Uint8Array([0,0,0,0,3,23+p,0,1,0,4,15+p,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([p]).concat(b.config).concat([6,1,2]))},y.mp4a=function(b){var p=b.samplerate;return y.box(y.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]),y.box(y.types.esds,y.esds(b)))},y.mp3=function(b){var p=b.samplerate;return y.box(y.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]))},y.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?y.box(y.types.stsd,y.STSD,y.mp3(b)):y.box(y.types.stsd,y.STSD,y.mp4a(b)):y.box(y.types.stsd,y.STSD,y.avc1(b))},y.tkhd=function(b){var p=b.id,d=b.duration*b.timescale,n=b.width,c=b.height,r=Math.floor(d/(M+1)),a=Math.floor(d%(M+1));return y.box(y.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,a>>24,a>>16&255,a>>8&255,a&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,c>>8&255,c&255,0,0]))},y.traf=function(b,p){var d=y.sdtp(b),n=b.id,c=Math.floor(p/(M+1)),r=Math.floor(p%(M+1));return y.box(y.types.traf,y.box(y.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),y.box(y.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,r>>24,r>>16&255,r>>8&255,r&255])),y.trun(b,d.length+16+20+8+16+8+8),d)},y.trak=function(b){return b.duration=b.duration||4294967295,y.box(y.types.trak,y.tkhd(b),y.mdia(b))},y.trex=function(b){var p=b.id;return y.box(y.types.trex,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},y.trun=function(b,p){var d=b.samples||[],n=d.length,c=12+16*n,r=new Uint8Array(c),a,o,u,h,s,l;for(p+=8+c,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255],0),a=0;a<n;a++)o=d[a],u=o.duration,h=o.size,s=o.flags,l=o.cts,r.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,s.degradPrio&240<<8,s.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*a);return y.box(y.types.trun,r)},y.initSegment=function(b){y.types||y.init();var p=y.moov(b),d=new Uint8Array(y.FTYP.byteLength+p.byteLength);return d.set(y.FTYP),d.set(p,y.FTYP.byteLength),d},y}();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(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return l}),O.d(g,"normalizePts",function(){return t});var M=O("./src/polyfills/number.ts"),m=O("./src/remux/aac-helper.ts"),y=O("./src/remux/mp4-generator.ts"),T=O("./src/events.ts"),b=O("./src/errors.ts"),p=O("./src/utils/logger.ts"),d=O("./src/types/loader.ts"),n=O("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(R){for(var C=1;C<arguments.length;C++){var v=arguments[C];for(var _ in v)Object.prototype.hasOwnProperty.call(v,_)&&(R[_]=v[_])}return R},c.apply(this,arguments)}var r=10*1e3,a=1024,o=1152,u=null,h=null,s=!1,l=function(){function R(v,_,E,w){if(w===void 0&&(w=""),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=v,this.config=_,this.typeSupported=E,this.ISGenerated=!1,u===null){var k=navigator.userAgent||"",I=k.match(/Chrome\/(\d+)/i);u=I?parseInt(I[1]):0}if(h===null){var L=navigator.userAgent.match(/Safari\/(\d+)/i);h=L?parseInt(L[1]):0}s=!!u&&u<75||!!h&&h<600}var C=R.prototype;return C.destroy=function(){},C.resetTimeStamp=function(_){p.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=_},C.resetNextTimestamp=function(){p.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){p.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(_){var E=!1,w=_.reduce(function(k,I){var L=I.pts-k;return L<-4294967296?(E=!0,t(k,I.pts)):L>0?k:I.pts},_[0].pts);return E&&p.logger.debug("PTS rollover detected"),w},C.remux=function(_,E,w,k,I,L,V,W){var H,G,B,P,z,J,ue=I,de=I,Se=_.pid>-1,Ae=E.pid>-1,pe=E.samples.length,Oe=_.samples.length>0,ye=pe>1,ce=(!Se||Oe)&&(!Ae||ye)||this.ISGenerated||V;if(ce){this.ISGenerated||(B=this.generateIS(_,E,I));var ae=this.isVideoContiguous,re=-1;if(ye&&(re=S(E.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,re>0){p.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+pe+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(re),E.dropped+=re,de+=(E.samples[0].pts-fe)/(E.timescale||9e4)}else re===-1&&(p.logger.warn("[mp4-remuxer]: No keyframe found out of "+pe+" video samples"),J=!1);if(this.ISGenerated){if(Oe&&ye){var te=this.getVideoStartPts(E.samples),ne=t(_.samples[0].pts,te)-te,Te=ne/E.inputTimeScale;ue+=Math.max(0,Te),de+=Math.max(0,-Te)}if(Oe){if(_.samplerate||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(_,E,I)),G=this.remuxAudio(_,ue,this.isAudioContiguous,L,Ae||ye||W===d.PlaylistLevelType.AUDIO?de:void 0),ye){var ie=G?G.endPTS-G.startPTS:0;E.inputTimeScale||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(_,E,I)),H=this.remuxVideo(E,de,ae,ie)}}else ye&&(H=this.remuxVideo(E,de,ae,0));H&&(H.firstKeyFrame=re,H.independent=re!==-1)}}return this.ISGenerated&&(w.samples.length&&(z=this.remuxID3(w,I)),k.samples.length&&(P=this.remuxText(k,I))),{audio:G,video:H,initSegment:B,independent:J,text:P,id3:z}},C.generateIS=function(_,E,w){var k=_.samples,I=E.samples,L=this.typeSupported,V={},W=!Object(M.isFiniteNumber)(this._initPTS),H="audio/mp4",G,B,P;if(W&&(G=B=Infinity),_.config&&k.length&&(_.timescale=_.samplerate,_.isAAC||(L.mpeg?(H="audio/mpeg",_.codec=""):L.mp3&&(_.codec="mp3")),V.audio={id:"audio",container:H,codec:_.codec,initSegment:!_.isAAC&&L.mpeg?new Uint8Array(0):y.default.initSegment([_]),metadata:{channelCount:_.channelCount}},W&&(P=_.inputTimeScale,G=B=k[0].pts-Math.round(P*w))),E.sps&&E.pps&&I.length&&(E.timescale=E.inputTimeScale,V.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:y.default.initSegment([E]),metadata:{width:E.width,height:E.height}},W)){P=E.inputTimeScale;var z=this.getVideoStartPts(I),J=Math.round(P*w);B=Math.min(B,t(I[0].dts,z)-J),G=Math.min(G,z-J)}if(Object.keys(V).length)return this.ISGenerated=!0,W&&(this._initPTS=G,this._initDTS=B),{tracks:V,initPTS:G,timescale:P}},C.remuxVideo=function(_,E,w,k){var I=_.inputTimeScale,L=_.samples,V=[],W=L.length,H=this._initPTS,G=this.nextAvcDts,B=8,P,z,J,ue=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Se=0,Ae=!1;if(!w||G===null){var pe=E*I,Oe=L[0].pts-t(L[0].dts,L[0].pts);G=pe-Oe}for(var ye=0;ye<W;ye++){var ce=L[ye];if(ce.pts=t(ce.pts-H,G),ce.dts=t(ce.dts-H,G),ce.dts>ce.pts){var ae=9e4*.2;Se=Math.max(Math.min(Se,ce.pts-ce.dts),-1*ae)}ce.dts<L[ye>0?ye-1:ye].dts&&(Ae=!0)}Ae&&L.sort(function(cr,dr){var St=cr.dts-dr.dts,Kr=cr.pts-dr.pts;return St||Kr}),z=L[0].dts,J=L[L.length-1].dts;var re=Math.round((J-z)/(W-1));if(Se<0){if(Se<re*-2){p.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-re,!0)+" ms");for(var fe=Se,te=0;te<W;te++)L[te].dts=fe=Math.max(fe,L[te].pts-re),L[te].pts=Math.max(fe,L[te].pts)}else{p.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(Se,!0)+" ms to overcome this issue");for(var ne=0;ne<W;ne++)L[ne].dts=L[ne].dts+Se}z=L[0].dts}if(w){var Te=z-G,ie=Te>re,Z=Te<-1;if(ie||Z){ie?p.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Te,!0)+" ms ("+Te+"dts) hole between fragments detected, filling it"):p.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Te,!0)+" ms ("+Te+"dts) overlapping between fragments detected"),z=G;var X=L[0].pts-Te;L[0].dts=z,L[0].pts=X,p.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(X,!0)+"/"+Object(n.toMsFromMpegTsClock)(z,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Te,!0)+" ms")}}s&&(z=Math.max(0,z));for(var Q=0,_e=0,ve=0;ve<W;ve++){for(var Re=L[ve],Je=Re.units,qe=Je.length,rt=0,ut=0;ut<qe;ut++)rt+=Je[ut].data.length;_e+=rt,Q+=qe,Re.length=rt,Re.dts=Math.max(Re.dts,z),Re.pts=Math.max(Re.pts,Re.dts,0),ue=Math.min(Re.pts,ue),de=Math.max(Re.pts,de)}J=L[W-1].dts;var dt=_e+4*Q+8,ft;try{ft=new Uint8Array(dt)}catch(cr){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:dt,reason:"fail allocating video mdat "+dt});return}var Be=new DataView(ft.buffer);Be.setUint32(0,dt),ft.set(y.default.types.mdat,4);for(var Ie=0;Ie<W;Ie++){for(var at=L[Ie],ct=at.units,$e=0,st=0,Ue=ct.length;st<Ue;st++){var Le=ct[st],Me=Le.data,Ee=Le.data.byteLength;Be.setUint32(B,Ee),B+=4,ft.set(Me,B),B+=Ee,$e+=4+Ee}if(Ie<W-1)P=L[Ie+1].dts-at.dts;else{var Ce=this.config,ke=at.dts-L[Ie>0?Ie-1:Ie].dts;if(Ce.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ne=Math.floor(Ce.maxBufferHole*I),He=(k?ue+k*I:this.nextAudioPts)-at.pts;He>Ne?(P=He-ke,P<0&&(P=ke),p.logger.log("[mp4-remuxer]: It is approximately "+He/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=ke}else P=ke}var tt=Math.round(at.pts-at.dts);V.push(new x(at.key,P,$e,tt))}if(V.length&&u&&u<70){var vt=V[0].flags;vt.dependsOn=2,vt.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=J+P,this.isVideoContiguous=!0;var yt=y.default.moof(_.sequenceNumber++,z,c({},_,{samples:V})),Wt="video",Ht={data1:yt,data2:ft,startPTS:ue/I,endPTS:(de+P)/I,startDTS:z/I,endDTS:G/I,type:Wt,hasAudio:!1,hasVideo:!0,nb:V.length,dropped:_.dropped};return _.samples=[],_.dropped=0,console.assert(ft.length,"MDAT length must not be zero"),Ht},C.remuxAudio=function(_,E,w,k,I){var L=_.inputTimeScale,V=_.samplerate?_.samplerate:L,W=L/V,H=_.isAAC?a:o,G=H*W,B=this._initPTS,P=!_.isAAC&&this.typeSupported.mpeg,z=[],J=_.samples,ue=P?0:8,de=this.nextAudioPts||-1,Se=E*L;if(this.isAudioContiguous=w=w||J.length&&de>0&&(k&&Math.abs(Se-de)<9e3||Math.abs(t(J[0].pts-B,Se)-de)<20*G),J.forEach(function(Me){Me.pts=t(Me.pts-B,Se)}),!w||de<0){if(J=J.filter(function(Me){return Me.pts>=0}),!J.length)return;I===0?de=0:k?de=Math.max(0,Se):de=J[0].pts}if(_.isAAC)for(var Ae=I!==void 0,pe=this.config.maxAudioFramesDrift,Oe=0,ye=de;Oe<J.length;Oe++){var ce=J[Oe],ae=ce.pts,re=ae-ye,fe=Math.abs(1e3*re/L);if(re<=-pe*G&&Ae)Oe===0&&(p.logger.warn("Audio frame @ "+(ae/L).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/L)+" ms."),this.nextAudioPts=de=ye=ae);else if(re>=pe*G&&fe<r&&Ae){var te=Math.round(re/G);ye=ae-te*G,ye<0&&(te--,ye+=G),Oe===0&&(this.nextAudioPts=de=ye),p.logger.warn("[mp4-remuxer]: Injecting "+te+" audio frame @ "+(ye/L).toFixed(3)+"s due to "+Math.round(1e3*re/L)+" ms gap.");for(var ne=0;ne<te;ne++){var Te=Math.max(ye,0),ie=m.default.getSilentFrame(_.manifestCodec||_.codec,_.channelCount);ie||(p.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=ce.unit.subarray()),J.splice(Oe,0,{unit:ie,pts:Te}),ye+=G,Oe++}}ce.pts=ye,ye+=G}for(var Z=null,X=null,Q,_e=0,ve=J.length;ve--;)_e+=J[ve].unit.byteLength;for(var Re=0,Je=J.length;Re<Je;Re++){var qe=J[Re],rt=qe.unit,ut=qe.pts;if(X!==null){var dt=z[Re-1];dt.duration=Math.round((ut-X)/W)}else if(w&&_.isAAC&&(ut=de),Z=ut,_e>0){_e+=ue;try{Q=new Uint8Array(_e)}catch(Me){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:_e,reason:"fail allocating audio mdat "+_e});return}if(!P){var ft=new DataView(Q.buffer);ft.setUint32(0,_e),Q.set(y.default.types.mdat,4)}}else return;Q.set(rt,ue);var Be=rt.byteLength;ue+=Be,z.push(new x(!0,H,Be,0)),X=ut}var Ie=z.length;if(!Ie)return;var at=z[z.length-1];this.nextAudioPts=de=X+W*at.duration;var ct=P?new Uint8Array(0):y.default.moof(_.sequenceNumber++,Z/W,c({},_,{samples:z}));_.samples=[];var $e=Z/L,st=de/L,Ue="audio",Le={data1:ct,data2:Q,startPTS:$e,endPTS:st,startDTS:$e,endDTS:st,type:Ue,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),Le},C.remuxEmptyAudio=function(_,E,w,k){var I=_.inputTimeScale,L=_.samplerate?_.samplerate:I,V=I/L,W=this.nextAudioPts,H=(W!==null?W:k.startDTS*I)+this._initDTS,G=k.endDTS*I+this._initDTS,B=V*a,P=Math.ceil((G-H)/B),z=m.default.getSilentFrame(_.manifestCodec||_.codec,_.channelCount);if(p.logger.warn("[mp4-remuxer]: remux empty Audio"),!z){p.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],ue=0;ue<P;ue++){var de=H+ue*B;J.push({unit:z,pts:de,dts:de})}return _.samples=J,this.remuxAudio(_,E,w,!1)},C.remuxID3=function(_,E){var w=_.samples.length;if(!w)return;for(var k=_.inputTimeScale,I=this._initPTS,L=this._initDTS,V=0;V<w;V++){var W=_.samples[V];W.pts=t(W.pts-I,E*k)/k,W.dts=t(W.dts-L,E*k)/k}var H=_.samples;return _.samples=[],{samples:H}},C.remuxText=function(_,E){var w=_.samples.length;if(!w)return;for(var k=_.inputTimeScale,I=this._initPTS,L=0;L<w;L++){var V=_.samples[L];V.pts=t(V.pts-I,E*k)/k}_.samples.sort(function(H,G){return H.pts-G.pts});var W=_.samples;return _.samples=[],{samples:W}},R}();function t(R,C){var v;if(C===null)return R;for(C<R?v=-8589934592:v=8589934592;Math.abs(R-C)>4294967296;)R+=v;return R}function S(R){for(var C=0;C<R.length;C++)if(R[C].key)return C;return-1}var x=function(C,v,_,E){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=v,this.size=_,this.cts=E,this.flags=new f(C)},f=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/polyfills/number.ts"),m=O("./src/utils/mp4-tools.ts"),y=O("./src/loader/fragment.ts"),T=O("./src/utils/logger.ts"),b=function(){function n(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var c=n.prototype;return c.destroy=function(){},c.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(a,o,u){this.audioCodec=o,this.videoCodec=u,this.generateInitSegment(a),this.emitInitSegment=!0},c.generateInitSegment=function(a){var o=this.audioCodec,u=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var h=this.initData=Object(m.parseInitSegment)(a);o||(o=d(h.audio,y.ElementaryStreamTypes.AUDIO)),u||(u=d(h.video,y.ElementaryStreamTypes.VIDEO));var s={};h.audio&&h.video?s.audiovideo={container:"video/mp4",codec:o+","+u,initSegment:a,id:"main"}:h.audio?s.audio={container:"audio/mp4",codec:o,initSegment:a,id:"audio"}:h.video?s.video={container:"video/mp4",codec:u,initSegment:a,id:"main"}:T.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},c.remux=function(a,o,u,h,s){var l=this.initPTS,t=this.lastEndDTS,S={audio:void 0,video:void 0,text:h,id3:u,initSegment:void 0};Object(M.isFiniteNumber)(t)||(t=this.lastEndDTS=s||0);var x=o.samples;if(!x||!x.length)return S;var f={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(x),R=this.initData),!R||!R.length)return T.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),S;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(M.isFiniteNumber)(l)||(this.initPTS=f.initPTS=l=p(R,x,t));var C=Object(m.getDuration)(x,R),v=t,_=C+v;Object(m.offsetStartDTS)(R,x,l),C>0?this.lastEndDTS=_:(T.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!R.audio,w=!!R.video,k="";E&&(k+="audio"),w&&(k+="video");var I={data1:x,startPTS:v,startDTS:v,endPTS:_,endDTS:_,type:k,hasAudio:E,hasVideo:w,nb:1,dropped:0};return S.audio=I.type==="audio"?I:void 0,S.video=I.type!=="audio"?I:void 0,S.text=h,S.id3=u,S.initSegment=f,S},n}(),p=function(c,r,a){return Object(m.getStartDTS)(c,r)-a};function d(n,c){var r=n==null?void 0:n.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||c===y.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=b},"./src/task-loop.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return M});var M=function(){function m(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var y=m.prototype;return y.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},y.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},y.onHandlerDestroyed=function(){},y.hasInterval=function(){return!!this._tickInterval},y.hasNextTick=function(){return!!this._tickTimer},y.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},y.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},y.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},y.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},y.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},y.doTick=function(){},m}()},"./src/types/cmcd.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"CMCDVersion",function(){return M}),O.d(g,"CMCDObjectType",function(){return m}),O.d(g,"CMCDStreamingFormat",function(){return y}),O.d(g,"CMCDStreamType",function(){return T});var M=1,m;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(m||(m={}));var y;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(y||(y={}));var T;(function(b){b.VOD="v",b.LIVE="l"})(T||(T={}))},"./src/types/level.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"HlsSkip",function(){return y}),O.d(g,"getSkipValue",function(){return T}),O.d(g,"HlsUrlParameters",function(){return b}),O.d(g,"Level",function(){return p});function M(d,n){for(var c=0;c<n.length;c++){var r=n[c];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,r.key,r)}}function m(d,n,c){return n&&M(d.prototype,n),c&&M(d,c),d}var y;(function(d){d.No="",d.Yes="YES",d.v2="v2"})(y||(y={}));function T(d,n){var c=d.canSkipUntil,r=d.canSkipDateRanges,a=d.endSN,o=n!==void 0?n-a:0;return c&&o<c?r?y.v2:y.Yes:y.No}var b=function(){function d(c,r,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=r,this.skip=a}var n=d.prototype;return n.addDirectives=function(r){var a=new self.URL(r);return this.msn!==void 0&&a.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&a.searchParams.set("_HLS_part",this.part.toString()),this.skip&&a.searchParams.set("_HLS_skip",this.skip),a.toString()},d}(),p=function(){function d(n){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[n.url],this.attrs=n.attrs,this.bitrate=n.bitrate,n.details&&(this.details=n.details),this.id=n.id||0,this.name=n.name,this.width=n.width||0,this.height=n.height||0,this.audioCodec=n.audioCodec,this.videoCodec=n.videoCodec,this.unknownCodecs=n.unknownCodecs,this.codecSet=[n.videoCodec,n.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return m(d,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(c){var r=c%this.url.length;this._urlId!==r&&(this.details=void 0,this._urlId=r)}}]),d}()},"./src/types/loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"PlaylistContextType",function(){return M}),O.d(g,"PlaylistLevelType",function(){return m});var M;(function(y){y.MANIFEST="manifest",y.LEVEL="level",y.AUDIO_TRACK="audioTrack",y.SUBTITLE_TRACK="subtitleTrack"})(M||(M={}));var m;(function(y){y.MAIN="main",y.AUDIO="audio",y.SUBTITLE="subtitle"})(m||(m={}))},"./src/types/transmuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"ChunkMetadata",function(){return M});var M=function(T,b,p,d,n,c){d===void 0&&(d=0),n===void 0&&(n=-1),c===void 0&&(c=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=m(),this.buffering={audio:m(),video:m(),audiovideo:m()},this.level=T,this.sn=b,this.id=p,this.size=d,this.part=n,this.partial=c};function m(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"AttrList",function(){return y});var M=/^(\d+)x(\d+)$/,m=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,y=function(){function T(p){typeof p=="string"&&(p=T.parseAttrList(p));for(var d in p)p.hasOwnProperty(d)&&(this[d]=p[d])}var b=T.prototype;return b.decimalInteger=function(d){var n=parseInt(this[d],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},b.hexadecimalInteger=function(d){if(this[d]){var n=(this[d]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var c=new Uint8Array(n.length/2),r=0;r<n.length/2;r++)c[r]=parseInt(n.slice(r*2,r*2+2),16);return c}else return null},b.hexadecimalIntegerAsNumber=function(d){var n=parseInt(this[d],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},b.decimalFloatingPoint=function(d){return parseFloat(this[d])},b.optionalFloat=function(d,n){var c=this[d];return c?parseFloat(c):n},b.enumeratedString=function(d){return this[d]},b.bool=function(d){return this[d]==="YES"},b.decimalResolution=function(d){var n=M.exec(this[d]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},T.parseAttrList=function(d){var n,c={},r='"';for(m.lastIndex=0;(n=m.exec(d))!==null;){var a=n[2];a.indexOf(r)===0&&a.lastIndexOf(r)===a.length-1&&(a=a.slice(1,-1)),c[n[1]]=a}return c},T}()},"./src/utils/binary-search.ts":function(N,g,O){"use strict";O.r(g);var M={search:function(y,T){for(var b=0,p=y.length-1,d=null,n=null;b<=p;){d=(b+p)/2|0,n=y[d];var c=T(n);if(c>0)b=d+1;else if(c<0)p=d-1;else return n}return null}};g.default=M},"./src/utils/buffer-helper.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"BufferHelper",function(){return y});var M=O("./src/utils/logger.ts"),m={length:0,start:function(){return 0},end:function(){return 0}},y=function(){function T(){}return T.isBuffered=function(p,d){try{if(p){for(var n=T.getBuffered(p),c=0;c<n.length;c++)if(d>=n.start(c)&&d<=n.end(c))return!0}}catch(r){}return!1},T.bufferInfo=function(p,d,n){try{if(p){var c=T.getBuffered(p),r=[],a;for(a=0;a<c.length;a++)r.push({start:c.start(a),end:c.end(a)});return this.bufferedInfo(r,d,n)}}catch(o){}return{len:0,start:d,end:d,nextStart:void 0}},T.bufferedInfo=function(p,d,n){d=Math.max(0,d),p.sort(function(f,R){var C=f.start-R.start;return C||R.end-f.end});var c=[];if(n)for(var r=0;r<p.length;r++){var a=c.length;if(a){var o=c[a-1].end;p[r].start-o<n?p[r].end>o&&(c[a-1].end=p[r].end):c.push(p[r])}else c.push(p[r])}else c=p;for(var u=0,h,s=d,l=d,t=0;t<c.length;t++){var S=c[t].start,x=c[t].end;if(d+n>=S&&d<x)s=S,l=x,u=l-d;else if(d+n<S){h=S;break}}return{len:u,start:s||0,end:l||0,nextStart:h}},T.getBuffered=function(p){try{return p.buffered}catch(d){return M.logger.log("failed to get media.buffered",d),m}},T}()},"./src/utils/cea-608-parser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"Row",function(){return l}),O.d(g,"CaptionScreen",function(){return t});var M=O("./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},y=function(_){var E=_;return m.hasOwnProperty(_)&&(E=m[_]),String.fromCharCode(E)},T=15,b=100,p={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},d={17:2,18:4,21:6,22:8,23:10,19:13,20:15},n={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},r=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(function(v){v[v.ERROR=0]="ERROR",v[v.TEXT=1]="TEXT",v[v.WARNING=2]="WARNING",v[v.INFO=2]="INFO",v[v.DEBUG=3]="DEBUG",v[v.DATA=3]="DATA"})(a||(a={}));var o=function(){function v(){this.time=null,this.verboseLevel=a.ERROR}var _=v.prototype;return _.log=function(w,k){this.verboseLevel>=w&&M.logger.log(this.time+" ["+w+"] "+k)},v}(),u=function(_){for(var E=[],w=0;w<_.length;w++)E.push(_[w].toString(16));return E},h=function(){function v(E,w,k,I,L){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=E||"white",this.underline=w||!1,this.italics=k||!1,this.background=I||"black",this.flash=L||!1}var _=v.prototype;return _.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},_.setStyles=function(w){for(var k=["foreground","underline","italics","background","flash"],I=0;I<k.length;I++){var L=k[I];w.hasOwnProperty(L)&&(this[L]=w[L])}},_.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},_.equals=function(w){return this.foreground===w.foreground&&this.underline===w.underline&&this.italics===w.italics&&this.background===w.background&&this.flash===w.flash},_.copy=function(w){this.foreground=w.foreground,this.underline=w.underline,this.italics=w.italics,this.background=w.background,this.flash=w.flash},_.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},v}(),s=function(){function v(E,w,k,I,L,V){this.uchar=void 0,this.penState=void 0,this.uchar=E||" ",this.penState=new h(w,k,I,L,V)}var _=v.prototype;return _.reset=function(){this.uchar=" ",this.penState.reset()},_.setChar=function(w,k){this.uchar=w,this.penState.copy(k)},_.setPenState=function(w){this.penState.copy(w)},_.equals=function(w){return this.uchar===w.uchar&&this.penState.equals(w.penState)},_.copy=function(w){this.uchar=w.uchar,this.penState.copy(w.penState)},_.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},v}(),l=function(){function v(E){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var w=0;w<b;w++)this.chars.push(new s);this.logger=E,this.pos=0,this.currPenState=new h}var _=v.prototype;return _.equals=function(w){for(var k=!0,I=0;I<b;I++)if(!this.chars[I].equals(w.chars[I])){k=!1;break}return k},_.copy=function(w){for(var k=0;k<b;k++)this.chars[k].copy(w.chars[k])},_.isEmpty=function(){for(var w=!0,k=0;k<b;k++)if(!this.chars[k].isEmpty()){w=!1;break}return w},_.setCursor=function(w){this.pos!==w&&(this.pos=w),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>b&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},_.moveCursor=function(w){var k=this.pos+w;if(w>1)for(var I=this.pos+1;I<k+1;I++)this.chars[I].setPenState(this.currPenState);this.setCursor(k)},_.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},_.insertChar=function(w){w>=144&&this.backSpace();var k=y(w);if(this.pos>=b){this.logger.log(a.ERROR,"Cannot insert "+w.toString(16)+" ("+k+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(k,this.currPenState),this.moveCursor(1)},_.clearFromPos=function(w){var k;for(k=w;k<b;k++)this.chars[k].reset()},_.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},_.clearToEndOfRow=function(){this.clearFromPos(this.pos)},_.getTextString=function(){for(var w=[],k=!0,I=0;I<b;I++){var L=this.chars[I].uchar;L!==" "&&(k=!1),w.push(L)}return k?"":w.join("")},_.setPenStyles=function(w){this.currPenState.setStyles(w);var k=this.chars[this.pos];k.setPenState(this.currPenState)},v}(),t=function(){function v(E){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var w=0;w<T;w++)this.rows.push(new l(E));this.logger=E,this.currRow=T-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var _=v.prototype;return _.reset=function(){for(var w=0;w<T;w++)this.rows[w].clear();this.currRow=T-1},_.equals=function(w){for(var k=!0,I=0;I<T;I++)if(!this.rows[I].equals(w.rows[I])){k=!1;break}return k},_.copy=function(w){for(var k=0;k<T;k++)this.rows[k].copy(w.rows[k])},_.isEmpty=function(){for(var w=!0,k=0;k<T;k++)if(!this.rows[k].isEmpty()){w=!1;break}return w},_.backSpace=function(){var w=this.rows[this.currRow];w.backSpace()},_.clearToEndOfRow=function(){var w=this.rows[this.currRow];w.clearToEndOfRow()},_.insertChar=function(w){var k=this.rows[this.currRow];k.insertChar(w)},_.setPen=function(w){var k=this.rows[this.currRow];k.setPenStyles(w)},_.moveCursor=function(w){var k=this.rows[this.currRow];k.moveCursor(w)},_.setCursor=function(w){this.logger.log(a.INFO,"setCursor: "+w);var k=this.rows[this.currRow];k.setCursor(w)},_.setPAC=function(w){this.logger.log(a.INFO,"pacData = "+JSON.stringify(w));var k=w.row-1;if(this.nrRollUpRows&&k<this.nrRollUpRows-1&&(k=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==k){for(var I=0;I<T;I++)this.rows[I].clear();var L=this.currRow+1-this.nrRollUpRows,V=this.lastOutputScreen;if(V){var W=V.rows[L].cueStartTime,H=this.logger.time;if(W&&H!==null&&W<H)for(var G=0;G<this.nrRollUpRows;G++)this.rows[k-this.nrRollUpRows+G+1].copy(V.rows[L+G])}}this.currRow=k;var B=this.rows[this.currRow];if(w.indent!==null){var P=w.indent,z=Math.max(P-1,0);B.setCursor(w.indent),w.color=B.chars[z].penState.foreground}var J={foreground:w.color,underline:w.underline,italics:w.italics,background:"black",flash:!1};this.setPen(J)},_.setBkgData=function(w){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(w)),this.backSpace(),this.setPen(w),this.insertChar(32)},_.setRollUpRows=function(w){this.nrRollUpRows=w},_.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var w=this.currRow+1-this.nrRollUpRows,k=this.rows.splice(w,1)[0];k.clear(),this.rows.splice(this.currRow,0,k),this.logger.log(a.INFO,"Rolling up")},_.getDisplayText=function(w){w=w||!1;for(var k=[],I="",L=-1,V=0;V<T;V++){var W=this.rows[V].getTextString();W&&(L=V+1,w?k.push("Row "+L+": '"+W+"'"):k.push(W.trim()))}return k.length>0&&(w?I="["+k.join(" | ")+"]":I=k.join(`
`)),I},_.getTextAndFormat=function(){return this.rows},v}(),S=function(){function v(E,w,k){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=E,this.outputFilter=w,this.mode=null,this.verbose=0,this.displayedMemory=new t(k),this.nonDisplayedMemory=new t(k),this.lastOutputScreen=new t(k),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=k}var _=v.prototype;return _.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},_.getHandler=function(){return this.outputFilter},_.setHandler=function(w){this.outputFilter=w},_.setPAC=function(w){this.writeScreen.setPAC(w)},_.setBkgData=function(w){this.writeScreen.setBkgData(w)},_.setMode=function(w){if(w===this.mode)return;this.mode=w,this.logger.log(a.INFO,"MODE="+w),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=w},_.insertChars=function(w){for(var k=0;k<w.length;k++)this.writeScreen.insertChar(w[k]);var I=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,I+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(a.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},_.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},_.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},_.ccAOF=function(){},_.ccAON=function(){},_.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},_.ccRU=function(w){this.logger.log(a.INFO,"RU("+w+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(w)},_.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},_.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},_.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},_.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},_.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},_.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},_.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},_.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var w=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=w,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},_.ccTO=function(w){this.logger.log(a.INFO,"TO("+w+") - Tab Offset"),this.writeScreen.moveCursor(w)},_.ccMIDROW=function(w){var k={flash:!1};if(k.underline=w%2===1,k.italics=w>=46,k.italics)k.foreground="white";else{var I=Math.floor(w/2)-16,L=["white","green","blue","cyan","red","yellow","magenta"];k.foreground=L[I]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(k)),this.writeScreen.setPen(k)},_.outputDataUpdate=function(w){w===void 0&&(w=!1);var k=this.logger.time;if(k===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=k:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,k,this.lastOutputScreen),w&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:k),this.lastOutputScreen.copy(this.displayedMemory))},_.cueSplitAtTime=function(w){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,w,this.displayedMemory),this.cueStartTime=w))},v}(),x=function(){function v(E,w,k){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var I=new o;this.channels=[null,new S(E,w,I),new S(E+1,k,I)],this.cmdHistory=C(),this.logger=I}var _=v.prototype;return _.getHandler=function(w){return this.channels[w].getHandler()},_.setHandler=function(w,k){this.channels[w].setHandler(k)},_.addData=function(w,k){var I,L,V,W=!1;this.logger.time=w;for(var H=0;H<k.length;H+=2){if(L=k[H]&127,V=k[H+1]&127,L===0&&V===0)continue;if(this.logger.log(a.DATA,"["+u([k[H],k[H+1]])+"] -> ("+u([L,V])+")"),I=this.parseCmd(L,V),I||(I=this.parseMidrow(L,V)),I||(I=this.parsePAC(L,V)),I||(I=this.parseBackgroundAttributes(L,V)),!I&&(W=this.parseChars(L,V),W)){var G=this.currentChannel;if(G&&G>0){var B=this.channels[G];B.insertChars(W)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!I&&!W&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+u([L,V])+" orig: "+u([k[H],k[H+1]]))}},_.parseCmd=function(w,k){var I=this.cmdHistory,L=(w===20||w===28||w===21||w===29)&&k>=32&&k<=47,V=(w===23||w===31)&&k>=33&&k<=35;if(!(L||V))return!1;if(R(w,k,I))return f(null,null,I),this.logger.log(a.DEBUG,"Repeated command ("+u([w,k])+") is dropped"),!0;var W=w===20||w===21||w===23?1:2,H=this.channels[W];return w===20||w===21||w===28||w===29?k===32?H.ccRCL():k===33?H.ccBS():k===34?H.ccAOF():k===35?H.ccAON():k===36?H.ccDER():k===37?H.ccRU(2):k===38?H.ccRU(3):k===39?H.ccRU(4):k===40?H.ccFON():k===41?H.ccRDC():k===42?H.ccTR():k===43?H.ccRTD():k===44?H.ccEDM():k===45?H.ccCR():k===46?H.ccENM():k===47&&H.ccEOC():H.ccTO(k-32),f(w,k,I),this.currentChannel=W,!0},_.parseMidrow=function(w,k){var I=0;if((w===17||w===25)&&k>=32&&k<=47){if(w===17?I=1:I=2,I!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var L=this.channels[I];return L?(L.ccMIDROW(k),this.logger.log(a.DEBUG,"MIDROW ("+u([w,k])+")"),!0):!1}return!1},_.parsePAC=function(w,k){var I,L=this.cmdHistory,V=(w>=17&&w<=23||w>=25&&w<=31)&&k>=64&&k<=127,W=(w===16||w===24)&&k>=64&&k<=95;if(!(V||W))return!1;if(R(w,k,L))return f(null,null,L),!0;var H=w<=23?1:2;k>=64&&k<=95?I=H===1?p[w]:n[w]:I=H===1?d[w]:c[w];var G=this.channels[H];return G?(G.setPAC(this.interpretPAC(I,k)),f(w,k,L),this.currentChannel=H,!0):!1},_.interpretPAC=function(w,k){var I,L={color:null,italics:!1,indent:null,underline:!1,row:w};return k>95?I=k-96:I=k-64,L.underline=(I&1)===1,I<=13?L.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(I/2)]:I<=15?(L.italics=!0,L.color="white"):L.indent=Math.floor((I-16)/2)*4,L},_.parseChars=function(w,k){var I,L=null,V=null;if(w>=25?(I=2,V=w-8):(I=1,V=w),V>=17&&V<=19){var W;V===17?W=k+80:V===18?W=k+112:W=k+144,this.logger.log(a.INFO,"Special char '"+y(W)+"' in channel "+I),L=[W]}else w>=32&&w<=127&&(L=k===0?[w]:[w,k]);if(L){var H=u(L);this.logger.log(a.DEBUG,"Char codes = "+H.join(",")),f(w,k,this.cmdHistory)}return L},_.parseBackgroundAttributes=function(w,k){var I=(w===16||w===24)&&k>=32&&k<=47,L=(w===23||w===31)&&k>=45&&k<=47;if(!(I||L))return!1;var V,W={};w===16||w===24?(V=Math.floor((k-32)/2),W.background=r[V],k%2===1&&(W.background=W.background+"_semi")):k===45?W.background="transparent":(W.foreground="black",k===47&&(W.underline=!0));var H=w<=23?1:2,G=this.channels[H];return G.setBkgData(W),f(w,k,this.cmdHistory),!0},_.reset=function(){for(var w=0;w<Object.keys(this.channels).length;w++){var k=this.channels[w];k&&k.reset()}this.cmdHistory=C()},_.cueSplitAtTime=function(w){for(var k=0;k<this.channels.length;k++){var I=this.channels[k];I&&I.cueSplitAtTime(w)}},v}();function f(v,_,E){E.a=v,E.b=_}function R(v,_,E){return E.a===v&&E.b===_}function C(){return{a:null,b:null}}g.default=x},"./src/utils/codecs.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"isCodecType",function(){return m}),O.d(g,"isCodecSupportedInMp4",function(){return y});var M={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,b){var p=M[b];return!!p&&p[T.slice(0,4)]===!0}function y(T,b){return MediaSource.isTypeSupported((b||"video")+'/mp4;codecs="'+T+'"')}},"./src/utils/cues.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/utils/vttparser.ts"),m=O("./src/utils/webvtt-parser.ts"),y=O("./src/utils/texttrack-utils.ts"),T=/\s/,b={newCue:function(d,n,c,r){for(var a=[],o,u,h,s,l,t=self.VTTCue||self.TextTrackCue,S=0;S<r.rows.length;S++)if(o=r.rows[S],h=!0,s=0,l="",!o.isEmpty()){for(var x=0;x<o.chars.length;x++)T.test(o.chars[x].uchar)&&h?s++:(l+=o.chars[x].uchar,h=!1);o.cueStartTime=n,n===c&&(c+=1e-4),s>=16?s--:s++;var f=Object(M.fixLineBreaks)(l.trim()),R=Object(m.generateCueId)(n,c,f);(!d||!d.cues||!d.cues.getCueById(R))&&(u=new t(n,c,f),u.id=R,u.line=S+1,u.align="left",u.position=10+Math.min(80,Math.floor(s*8/32)*10),a.push(u))}return d&&a.length&&(a.sort(function(C,v){return C.line==="auto"||v.line==="auto"?0:C.line>8&&v.line>8?v.line-C.line:C.line-v.line}),a.forEach(function(C){return Object(y.addCueToTrack)(d,C)})),a}};g.default=b},"./src/utils/discontinuities.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"findFirstFragWithCC",function(){return T}),O.d(g,"shouldAlignOnDiscontinuities",function(){return b}),O.d(g,"findDiscontinuousReferenceFrag",function(){return p}),O.d(g,"adjustSlidingStart",function(){return n}),O.d(g,"alignStream",function(){return c}),O.d(g,"alignPDT",function(){return a}),O.d(g,"alignFragmentByPDTDelta",function(){return o}),O.d(g,"alignMediaPlaylistByPDT",function(){return u});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/logger.ts"),y=O("./src/controller/level-helper.ts");function T(h,s){for(var l=null,t=0,S=h.length;t<S;t++){var x=h[t];if(x&&x.cc===s){l=x;break}}return l}function b(h,s,l){return!!(s.details&&(l.endCC>l.startCC||h&&h.cc<l.startCC))}function p(h,s){var l=h.fragments,t=s.fragments;if(!t.length||!l.length){m.logger.log("No fragments to align");return}var S=T(l,t[0].cc);if(!S||S&&!S.startPTS){m.logger.log("No frag in previous level to align on");return}return S}function d(h,s){if(h){var l=h.start+s;h.start=h.startPTS=l,h.endPTS=l+h.duration}}function n(h,s){for(var l=s.fragments,t=0,S=l.length;t<S;t++)d(l[t],h);s.fragmentHint&&d(s.fragmentHint,h),s.alignedSliding=!0}function c(h,s,l){if(!s)return;r(h,l,s),!l.alignedSliding&&s.details&&a(l,s.details),!l.alignedSliding&&s.details&&!l.skippedSegments&&Object(y.adjustSliding)(s.details,l)}function r(h,s,l){if(b(h,l,s)){var t=p(l.details,s);t&&Object(M.isFiniteNumber)(t.start)&&(m.logger.log("Adjusting PTS using last level due to CC increase within current level "+s.url),n(t.start,s))}}function a(h,s){if(!s.fragments.length||!h.hasProgramDateTime||!s.hasProgramDateTime)return;var l=s.fragments[0].programDateTime,t=h.fragments[0].programDateTime,S=(t-l)/1e3+s.fragments[0].start;S&&Object(M.isFiniteNumber)(S)&&(m.logger.log("Adjusting PTS using programDateTime delta "+(t-l)+"ms, sliding:"+S.toFixed(3)+" "+h.url+" "),n(S,h))}function o(h,s){var l=h.programDateTime;if(!l)return;var t=(l-s)/1e3;h.start=h.startPTS=t,h.endPTS=t+h.duration}function u(h,s){if(!s.fragments.length||!h.hasProgramDateTime||!s.hasProgramDateTime)return;var l=s.fragments[0].programDateTime,t=s.fragments[0].start,S=l-t*1e3;h.fragments.forEach(function(x){o(x,S)}),h.fragmentHint&&o(h.fragmentHint,S),h.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/utils/ewma.ts"),m=function(){function y(b,p,d){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=d,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new M.default(b),this.fast_=new M.default(p)}var T=y.prototype;return T.update=function(p,d){var n=this.slow_,c=this.fast_;this.slow_.halfLife!==p&&(this.slow_=new M.default(p,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==d&&(this.fast_=new M.default(d,c.getEstimate(),c.getTotalWeight()))},T.sample=function(p,d){p=Math.max(p,this.minDelayMs_);var n=8*d,c=p/1e3,r=n/c;this.fast_.sample(c,r),this.slow_.sample(c,r)},T.canEstimate=function(){var p=this.fast_;return p&&p.getTotalWeight()>=this.minWeight_},T.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},T.destroy=function(){},y}();g.default=m},"./src/utils/ewma.ts":function(N,g,O){"use strict";O.r(g);var M=function(){function m(T,b,p){b===void 0&&(b=0),p===void 0&&(p=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_=b,this.totalWeight_=p}var y=m.prototype;return y.sample=function(b,p){var d=Math.pow(this.alpha_,b);this.estimate_=p*(1-d)+d*this.estimate_,this.totalWeight_+=b},y.getTotalWeight=function(){return this.totalWeight_},y.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},m}();g.default=M},"./src/utils/fetch-loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"fetchSupported",function(){return o});var M=O("./src/polyfills/number.ts"),m=O("./src/loader/load-stats.ts"),y=O("./src/demux/chunk-cache.ts");function T(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,c(t,S)}function b(t){var S=typeof Map=="function"?new Map:void 0;return b=function(f){if(f===null||!n(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(f))return S.get(f);S.set(f,R)}function R(){return p(f,arguments,r(this).constructor)}return R.prototype=Object.create(f.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),c(R,f)},b(t)}function p(t,S,x){return d()?p=Reflect.construct:p=function(R,C,v){var _=[null];_.push.apply(_,C);var E=Function.bind.apply(R,_),w=new E;return v&&c(w,v.prototype),w},p.apply(null,arguments)}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function n(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function c(t,S){return c=Object.setPrototypeOf||function(f,R){return f.__proto__=R,f},c(t,S)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},r(t)}function a(){return a=Object.assign||function(t){for(var S=1;S<arguments.length;S++){var x=arguments[S];for(var f in x)Object.prototype.hasOwnProperty.call(x,f)&&(t[f]=x[f])}return t},a.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var u=function(){function t(x){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=x.fetchSetup||s,this.controller=new self.AbortController,this.stats=new m.LoadStats}var S=t.prototype;return S.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},S.abortInternal=function(){var f=this.response;(!f||!f.ok)&&(this.stats.aborted=!0,this.controller.abort())},S.abort=function(){var f;this.abortInternal(),(f=this.callbacks)!==null&&f!==void 0&&f.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},S.load=function(f,R,C){var v=this,_=this.stats;if(_.loading.start)throw new Error("Loader can only be used once.");_.loading.start=self.performance.now();var E=h(f,this.controller.signal),w=C.onProgress,k=f.responseType==="arraybuffer",I=k?"byteLength":"length";this.context=f,this.config=R,this.callbacks=C,this.request=this.fetchSetup(f,E),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){v.abortInternal(),C.onTimeout(_,f,v.response)},R.timeout),self.fetch(this.request).then(function(L){if(v.response=v.loader=L,!L.ok){var V=L.status,W=L.statusText;throw new l(W||"fetch, bad network response",V,L)}return _.loading.first=Math.max(self.performance.now(),_.loading.start),_.total=parseInt(L.headers.get("Content-Length")||"0"),w&&Object(M.isFiniteNumber)(R.highWaterMark)?v.loadProgressively(L,_,f,R.highWaterMark,w):k?L.arrayBuffer():L.text()}).then(function(L){var V=v.response;self.clearTimeout(v.requestTimeout),_.loading.end=Math.max(self.performance.now(),_.loading.first),_.loaded=_.total=L[I];var W={url:V.url,data:L};w&&!Object(M.isFiniteNumber)(R.highWaterMark)&&w(_,f,L,V),C.onSuccess(W,_,f,V)}).catch(function(L){if(self.clearTimeout(v.requestTimeout),_.aborted)return;var V=L.code||0;C.onError({code:V,text:L.message},f,L.details)})},S.getCacheAge=function(){var f=null;if(this.response){var R=this.response.headers.get("age");f=R?parseFloat(R):null}return f},S.loadProgressively=function(f,R,C,v,_){v===void 0&&(v=0);var E=new y.default,w=f.body.getReader(),k=function I(){return w.read().then(function(L){if(L.done)return E.dataLength&&_(R,C,E.flush(),f),Promise.resolve(new ArrayBuffer(0));var V=L.value,W=V.length;return R.loaded+=W,W<v||E.dataLength?(E.push(V),E.dataLength>=v&&_(R,C,E.flush(),f)):_(R,C,V,f),I()}).catch(function(){return Promise.reject()})};return k()},t}();function h(t,S){var x={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(a({},t.headers))};return t.rangeEnd&&x.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),x}function s(t,S){return new self.Request(t.url,S)}var l=function(t){T(S,t);function S(x,f,R){var C;return C=t.call(this,x)||this,C.code=void 0,C.details=void 0,C.code=f,C.details=R,C}return S}(b(Error));g.default=u},"./src/utils/imsc1-ttml-parser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"IMSC1_CODEC",function(){return n}),O.d(g,"parseIMSC1",function(){return o});var M=O("./src/utils/mp4-tools.ts"),m=O("./src/utils/vttparser.ts"),y=O("./src/utils/vttcue.ts"),T=O("./src/demux/id3.ts"),b=O("./src/utils/timescale-conversion.ts"),p=O("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(v){for(var _=1;_<arguments.length;_++){var E=arguments[_];for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(v[w]=E[w])}return v},d.apply(this,arguments)}var n="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,r=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function o(v,_,E,w,k){var I=Object(M.findBox)(new Uint8Array(v),["mdat"]);if(I.length===0){k(new Error("Could not parse IMSC1 mdat"));return}var L=I[0],V=Object(T.utf8ArrayToStr)(new Uint8Array(v,L.start,L.end-L.start)),W=Object(b.toTimescaleFromScale)(_,1,E);try{w(u(V,W))}catch(H){k(H)}}function u(v,_){var E=new DOMParser,w=E.parseFromString(v,"text/xml"),k=w.getElementsByTagName("tt")[0];if(!k)throw new Error("Invalid ttml");var I={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},L=Object.keys(I).reduce(function(B,P){return B[P]=k.getAttribute("ttp:"+P)||I[P],B},{}),V=k.getAttribute("xml:space")!=="preserve",W=s(h(k,"styling","style")),H=s(h(k,"layout","region")),G=h(k,"body","[begin]");return[].map.call(G,function(B){var P=l(B,V);if(!P||!B.hasAttribute("begin"))return null;var z=f(B.getAttribute("begin"),L),J=f(B.getAttribute("dur"),L),ue=f(B.getAttribute("end"),L);if(z===null)throw x(B);if(ue===null){if(J===null)throw x(B);ue=z+J}var de=new y.default(z-_,ue-_,P);de.id=Object(p.generateCueId)(de.startTime,de.endTime,de.text);var Se=H[B.getAttribute("region")],Ae=W[B.getAttribute("style")];de.position=10,de.size=80;var pe=t(Se,Ae),Oe=pe.textAlign;if(Oe){var ye=a[Oe];ye&&(de.lineAlign=ye),de.align=Oe}return d(de,pe),de}).filter(function(B){return B!==null})}function h(v,_,E){var w=v.getElementsByTagName(_)[0];return w?[].slice.call(w.querySelectorAll(E)):[]}function s(v){return v.reduce(function(_,E){var w=E.getAttribute("xml:id");return w&&(_[w]=E),_},{})}function l(v,_){return[].slice.call(v.childNodes).reduce(function(E,w,k){var I;return w.nodeName==="br"&&k?E+`
`:(I=w.childNodes)!==null&&I!==void 0&&I.length?l(w,_):_?E+w.textContent.trim().replace(/\s+/g," "):E+w.textContent},"")}function t(v,_){var E="http://www.w3.org/ns/ttml#styling",w=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return w.reduce(function(k,I){var L=S(_,E,I)||S(v,E,I);return L&&(k[I]=L),k},{})}function S(v,_,E){return v.hasAttributeNS(_,E)?v.getAttributeNS(_,E):null}function x(v){return new Error("Could not parse ttml timestamp "+v)}function f(v,_){if(!v)return null;var E=Object(m.parseTimeStamp)(v);return E===null&&(c.test(v)?E=R(v,_):r.test(v)&&(E=C(v,_))),E}function R(v,_){var E=c.exec(v),w=(E[4]|0)+(E[5]|0)/_.subFrameRate;return(E[1]|0)*3600+(E[2]|0)*60+(E[3]|0)+w/_.frameRate}function C(v,_){var E=r.exec(v),w=Number(E[1]),k=E[2];switch(k){case"h":return w*3600;case"m":return w*60;case"ms":return w*1e3;case"f":return w/_.frameRate;case"t":return w/_.tickRate}return w}},"./src/utils/logger.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"enableLogs",function(){return p}),O.d(g,"logger",function(){return d});var M=function(){},m={trace:M,debug:M,log:M,warn:M,info:M,error:M},y=m;function T(n){var c=self.console[n];return c?c.bind(self.console,"["+n+"] >"):M}function b(n){for(var c=arguments.length,r=new Array(c>1?c-1:0),a=1;a<c;a++)r[a-1]=arguments[a];r.forEach(function(o){y[o]=n[o]?n[o].bind(n):T(o)})}function p(n){if(self.console&&n===!0||typeof n=="object"){b(n,"debug","log","info","warn","error");try{y.log()}catch(c){y=m}}else y=m}var d=y},"./src/utils/mediakeys-helper.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"KeySystems",function(){return M}),O.d(g,"requestMediaKeySystemAccess",function(){return m});var M;(function(y){y.WIDEVINE="com.widevine.alpha",y.PLAYREADY="com.microsoft.playready"})(M||(M={}));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(N,g,O){"use strict";O.r(g),O.d(g,"getMediaSource",function(){return M});function M(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"bin2str",function(){return b}),O.d(g,"readUint16",function(){return p}),O.d(g,"readUint32",function(){return d}),O.d(g,"writeUint32",function(){return n}),O.d(g,"findBox",function(){return c}),O.d(g,"parseSegmentIndex",function(){return r}),O.d(g,"parseInitSegment",function(){return a}),O.d(g,"getStartDTS",function(){return o}),O.d(g,"getDuration",function(){return u}),O.d(g,"computeRawDurationFromSamples",function(){return h}),O.d(g,"offsetStartDTS",function(){return s}),O.d(g,"segmentValidRange",function(){return l}),O.d(g,"appendUint8Array",function(){return t});var M=O("./src/utils/typed-array.ts"),m=O("./src/loader/fragment.ts"),y=Math.pow(2,32)-1,T=[].push;function b(S){return String.fromCharCode.apply(null,S)}function p(S,x){"data"in S&&(x+=S.start,S=S.data);var f=S[x]<<8|S[x+1];return f<0?65536+f:f}function d(S,x){"data"in S&&(x+=S.start,S=S.data);var f=S[x]<<24|S[x+1]<<16|S[x+2]<<8|S[x+3];return f<0?4294967296+f:f}function n(S,x,f){"data"in S&&(x+=S.start,S=S.data),S[x]=f>>24,S[x+1]=f>>16&255,S[x+2]=f>>8&255,S[x+3]=f&255}function c(S,x){var f=[];if(!x.length)return f;var R,C,v;"data"in S?(R=S.data,C=S.start,v=S.end):(R=S,C=0,v=R.byteLength);for(var _=C;_<v;){var E=d(R,_),w=b(R.subarray(_+4,_+8)),k=E>1?_+E:v;if(w===x[0])if(x.length===1)f.push({data:R,start:_+8,end:k});else{var I=c({data:R,start:_+8,end:k},x.slice(1));I.length&&T.apply(f,I)}_=k}return f}function r(S){var x=c(S,["moov"]),f=x[0],R=f?f.end:null,C=c(S,["sidx"]);if(!C||!C[0])return null;var v=[],_=C[0],E=_.data[0],w=E===0?8:16,k=d(_,w);w+=4;var I=0,L=0;E===0?w+=8:w+=16,w+=2;var V=_.end+L,W=p(_,w);w+=2;for(var H=0;H<W;H++){var G=w,B=d(_,G);G+=4;var P=B&2147483647,z=(B&2147483648)>>>31;if(z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=d(_,G);G+=4,v.push({referenceSize:P,subsegmentDuration:J,info:{duration:J/k,start:V,end:V+P-1}}),V+=P,G+=4,w=G}return{earliestPresentationTime:I,timescale:k,version:E,referencesCount:W,references:v,moovEndOffset:R}}function a(S){for(var x=[],f=c(S,["moov","trak"]),R=0;R<f.length;R++){var C=f[R],v=c(C,["tkhd"])[0];if(v){var _=v.data[v.start],E=_===0?12:20,w=d(v,E),k=c(C,["mdia","mdhd"])[0];if(k){_=k.data[k.start],E=_===0?12:20;var I=d(k,E),L=c(C,["mdia","hdlr"])[0];if(L){var V=b(L.data.subarray(L.start+8,L.start+12)),W={soun:m.ElementaryStreamTypes.AUDIO,vide:m.ElementaryStreamTypes.VIDEO}[V];if(W){var H=c(C,["mdia","minf","stbl","stsd"])[0],G=void 0;H&&(G=b(H.data.subarray(H.start+12,H.start+16))),x[w]={timescale:I,type:W},x[W]={timescale:I,id:w,codec:G}}}}}}var B=c(S,["moov","mvex","trex"]);return B.forEach(function(P){var z=d(P,4),J=x[z];J&&(J.default={duration:d(P,12),flags:d(P,20)})}),x}function o(S,x){return c(x,["moof","traf"]).reduce(function(f,R){var C=c(R,["tfdt"])[0],v=C.data[C.start],_=c(R,["tfhd"]).reduce(function(E,w){var k=d(w,4),I=S[k];if(I){var L=d(C,4);v===1&&(L*=Math.pow(2,32),L+=d(C,8));var V=I.timescale||9e4,W=L/V;if(isFinite(W)&&(E===null||W<E))return W}return E},null);return _!==null&&isFinite(_)&&(f===null||_<f)?_:f},null)||0}function u(S,x){for(var f=0,R=0,C=0,v=c(S,["moof","traf"]),_=0;_<v.length;_++){var E=v[_],w=c(E,["tfhd"])[0],k=d(w,4),I=x[k];if(!I)continue;var L=I.default,V=d(w,0)|(L==null?void 0:L.flags),W=L==null?void 0:L.duration;V&8&&(V&2?W=d(w,12):W=d(w,8));for(var H=I.timescale||9e4,G=c(E,["trun"]),B=0;B<G.length;B++){if(W){var P=d(G[B],4);f=W*P}else f=h(G[B]);I.type===m.ElementaryStreamTypes.VIDEO?R+=f/H:I.type===m.ElementaryStreamTypes.AUDIO&&(C+=f/H)}}if(R===0&&C===0){var z=r(S);if(z!=null&&z.references)return z.references.reduce(function(J,ue){return J+ue.info.duration||0},0)}return R||C}function h(S){var x=d(S,0),f=8;x&1&&(f+=4),x&4&&(f+=4);for(var R=0,C=d(S,4),v=0;v<C;v++){if(x&256){var _=d(S,f);R+=_,f+=4}x&512&&(f+=4),x&1024&&(f+=4),x&2048&&(f+=4)}return R}function s(S,x,f){c(x,["moof","traf"]).forEach(function(R){c(R,["tfhd"]).forEach(function(C){var v=d(C,4),_=S[v];if(!_)return;var E=_.timescale||9e4;c(R,["tfdt"]).forEach(function(w){var k=w.data[w.start],I=d(w,4);if(k===0)n(w,4,I-f*E);else{I*=Math.pow(2,32),I+=d(w,8),I-=f*E,I=Math.max(I,0);var L=Math.floor(I/(y+1)),V=Math.floor(I%(y+1));n(w,4,L),n(w,8,V)}})})})}function l(S){var x={valid:null,remainder:null},f=c(S,["moof"]);if(f){if(f.length<2)return x.remainder=S,x}else return x;var R=f[f.length-1];return x.valid=Object(M.sliceUint8)(S,0,R.start-8),x.remainder=Object(M.sliceUint8)(S,R.start-8),x}function t(S,x){var f=new Uint8Array(S.length+x.length);return f.set(S),f.set(x,S.length),f}},"./src/utils/output-filter.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return M});var M=function(){function m(T,b){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=T,this.trackName=b}var y=m.prototype;return y.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},y.newCue=function(b,p,d){(this.startTime===null||this.startTime>b)&&(this.startTime=b),this.endTime=p,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},y.reset=function(){this.cueRanges=[]},m}()},"./src/utils/texttrack-utils.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"sendAddTrackEvent",function(){return m}),O.d(g,"addCueToTrack",function(){return y}),O.d(g,"clearCurrentCues",function(){return T}),O.d(g,"removeCuesInRange",function(){return b}),O.d(g,"getCuesInRange",function(){return d});var M=O("./src/utils/logger.ts");function m(n,c){var r;try{r=new Event("addtrack")}catch(a){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=n,c.dispatchEvent(r)}function y(n,c){var r=n.mode;if(r==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(c.id))try{if(n.addCue(c),!n.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(o){M.logger.debug("[texttrack-utils]: "+o);var a=new self.TextTrackCue(c.startTime,c.endTime,c.text);a.id=c.id,n.addCue(a)}r==="disabled"&&(n.mode=r)}function T(n){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues)for(var r=n.cues.length;r--;)n.removeCue(n.cues[r]);c==="disabled"&&(n.mode=c)}function b(n,c,r){var a=n.mode;if(a==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var o=d(n.cues,c,r),u=0;u<o.length;u++)n.removeCue(o[u]);a==="disabled"&&(n.mode=a)}function p(n,c){if(c<n[0].startTime)return 0;var r=n.length-1;if(c>n[r].endTime)return-1;for(var a=0,o=r;a<=o;){var u=Math.floor((o+a)/2);if(c<n[u].startTime)o=u-1;else if(c>n[u].startTime&&a<r)a=u+1;else return u}return n[a].startTime-c<c-n[o].startTime?a:o}function d(n,c,r){var a=[],o=p(n,c);if(o>-1)for(var u=o,h=n.length;u<h;u++){var s=n[u];if(s.startTime>=c&&s.endTime<=r)a.push(s);else if(s.startTime>r)return a}return a}},"./src/utils/time-ranges.ts":function(N,g,O){"use strict";O.r(g);var M={toString:function(y){for(var T="",b=y.length,p=0;p<b;p++)T+="["+y.start(p).toFixed(3)+","+y.end(p).toFixed(3)+"]";return T}};g.default=M},"./src/utils/timescale-conversion.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"toTimescaleFromBase",function(){return m}),O.d(g,"toTimescaleFromScale",function(){return y}),O.d(g,"toMsFromMpegTsClock",function(){return T}),O.d(g,"toMpegTsClockFromTimescale",function(){return b});var M=9e4;function m(p,d,n,c){n===void 0&&(n=1),c===void 0&&(c=!1);var r=p*d*n;return c?Math.round(r):r}function y(p,d,n,c){return n===void 0&&(n=1),c===void 0&&(c=!1),m(p,d,1/n,c)}function T(p,d){return d===void 0&&(d=!1),m(p,1e3,1/M,d)}function b(p,d){return d===void 0&&(d=1),m(p,M,1/d)}},"./src/utils/typed-array.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"sliceUint8",function(){return M});function M(m,y,T){return Uint8Array.prototype.slice?m.slice(y,T):new Uint8Array(Array.prototype.slice.call(m,y,T))}},"./src/utils/vttcue.ts":function(N,g,O){"use strict";O.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var M=["","lr","rl"],m=["start","middle","end","left","right"];function y(n,c){if(typeof c!="string")return!1;if(!Array.isArray(n))return!1;var r=c.toLowerCase();return~n.indexOf(r)?r:!1}function T(n){return y(M,n)}function b(n){return y(m,n)}function p(n){for(var c=arguments.length,r=new Array(c>1?c-1:0),a=1;a<c;a++)r[a-1]=arguments[a];for(var o=1;o<arguments.length;o++){var u=arguments[o];for(var h in u)n[h]=u[h]}return n}function d(n,c,r){var a=this,o={enumerable:!0};a.hasBeenReset=!1;var u="",h=!1,s=n,l=c,t=r,S=null,x="",f=!0,R="auto",C="start",v=50,_="middle",E=50,w="middle";Object.defineProperty(a,"id",p({},o,{get:function(){return u},set:function(I){u=""+I}})),Object.defineProperty(a,"pauseOnExit",p({},o,{get:function(){return h},set:function(I){h=!!I}})),Object.defineProperty(a,"startTime",p({},o,{get:function(){return s},set:function(I){if(typeof I!="number")throw new TypeError("Start time must be set to a number.");s=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",p({},o,{get:function(){return l},set:function(I){if(typeof I!="number")throw new TypeError("End time must be set to a number.");l=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",p({},o,{get:function(){return t},set:function(I){t=""+I,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",p({},o,{get:function(){return S},set:function(I){S=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",p({},o,{get:function(){return x},set:function(I){var L=T(I);if(L===!1)throw new SyntaxError("An invalid or illegal string was specified.");x=L,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",p({},o,{get:function(){return f},set:function(I){f=!!I,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",p({},o,{get:function(){return R},set:function(I){if(typeof I!="number"&&I!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",p({},o,{get:function(){return C},set:function(I){var L=b(I);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");C=L,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",p({},o,{get:function(){return v},set:function(I){if(I<0||I>100)throw new Error("Position must be between 0 and 100.");v=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",p({},o,{get:function(){return _},set:function(I){var L=b(I);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");_=L,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",p({},o,{get:function(){return E},set:function(I){if(I<0||I>100)throw new Error("Size must be between 0 and 100.");E=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",p({},o,{get:function(){return w},set:function(I){var L=b(I);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");w=L,this.hasBeenReset=!0}})),a.displayState=void 0}return d.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"parseTimeStamp",function(){return y}),O.d(g,"fixLineBreaks",function(){return c}),O.d(g,"VTTParser",function(){return r});var M=O("./src/utils/vttcue.ts"),m=function(){function a(){}var o=a.prototype;return o.decode=function(h,s){if(!h)return"";if(typeof h!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(h))},a}();function y(a){function o(h,s,l,t){return(h|0)*3600+(s|0)*60+(l|0)+parseFloat(t||0)}var u=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return u?parseFloat(u[2])>59?o(u[2],u[3],0,u[4]):o(u[1],u[2],u[3],u[4]):null}var T=function(){function a(){this.values=Object.create(null)}var o=a.prototype;return o.set=function(h,s){!this.get(h)&&s!==""&&(this.values[h]=s)},o.get=function(h,s,l){return l?this.has(h)?this.values[h]:s[l]:this.has(h)?this.values[h]:s},o.has=function(h){return h in this.values},o.alt=function(h,s,l){for(var t=0;t<l.length;++t)if(s===l[t]){this.set(h,s);break}},o.integer=function(h,s){/^-?\d+$/.test(s)&&this.set(h,parseInt(s,10))},o.percent=function(h,s){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(s)){var l=parseFloat(s);if(l>=0&&l<=100)return this.set(h,l),!0}return!1},a}();function b(a,o,u,h){var s=h?a.split(h):[a];for(var l in s){if(typeof s[l]!="string")continue;var t=s[l].split(u);if(t.length!==2)continue;var S=t[0],x=t[1];o(S,x)}}var p=new M.default(0,0,""),d=p.align==="middle"?"middle":"center";function n(a,o,u){var h=a;function s(){var S=y(a);if(S===null)throw new Error("Malformed timestamp: "+h);return a=a.replace(/^[^\sa-zA-Z-]+/,""),S}function l(S,x){var f=new T;b(S,function(v,_){var E;switch(v){case"region":for(var w=u.length-1;w>=0;w--)if(u[w].id===_){f.set(v,u[w].region);break}break;case"vertical":f.alt(v,_,["rl","lr"]);break;case"line":E=_.split(","),f.integer(v,E[0]),f.percent(v,E[0])&&f.set("snapToLines",!1),f.alt(v,E[0],["auto"]),E.length===2&&f.alt("lineAlign",E[1],["start",d,"end"]);break;case"position":E=_.split(","),f.percent(v,E[0]),E.length===2&&f.alt("positionAlign",E[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":f.percent(v,_);break;case"align":f.alt(v,_,["start",d,"end","left","right"]);break}},/:/,/\s/),x.region=f.get("region",null),x.vertical=f.get("vertical","");var R=f.get("line","auto");R==="auto"&&p.line===-1&&(R=-1),x.line=R,x.lineAlign=f.get("lineAlign","start"),x.snapToLines=f.get("snapToLines",!0),x.size=f.get("size",100),x.align=f.get("align",d);var C=f.get("position","auto");C==="auto"&&p.position===50&&(C=x.align==="start"||x.align==="left"?0:x.align==="end"||x.align==="right"?100:50),x.position=C}function t(){a=a.replace(/^\s+/,"")}if(t(),o.startTime=s(),t(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+h);a=a.substr(3),t(),o.endTime=s(),t(),l(a,o)}function c(a){return a.replace(/<br(?: \/)?>/gi,`
`)}var r=function(){function a(){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 o=a.prototype;return o.parse=function(h){var s=this;h&&(s.buffer+=s.decoder.decode(h,{stream:!0}));function l(){var C=s.buffer,v=0;for(C=c(C);v<C.length&&C[v]!=="\r"&&C[v]!==`
`;)++v;var _=C.substr(0,v);return C[v]==="\r"&&++v,C[v]===`
`&&++v,s.buffer=C.substr(v),_}function t(C){b(C,function(v,_){},/:/)}try{var S="";if(s.state==="INITIAL"){if(!/\r\n|\n/.test(s.buffer))return this;S=l();var x=S.match(/^()?WEBVTT([ \t].*)?$/);if(!x||!x[0])throw new Error("Malformed WebVTT signature.");s.state="HEADER"}for(var f=!1;s.buffer;){if(!/\r\n|\n/.test(s.buffer))return this;f?f=!1:S=l();switch(s.state){case"HEADER":/:/.test(S)?t(S):S||(s.state="ID");continue;case"NOTE":S||(s.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(S)){s.state="NOTE";break}if(!S)continue;if(s.cue=new M.default(0,0,""),s.state="CUE",S.indexOf("-->")===-1){s.cue.id=S;continue}case"CUE":if(!s.cue){s.state="BADCUE";continue}try{n(S,s.cue,s.regionList)}catch(C){s.cue=null,s.state="BADCUE";continue}s.state="CUETEXT";continue;case"CUETEXT":{var R=S.indexOf("-->")!==-1;if(!S||R&&(f=!0)){s.oncue&&s.cue&&s.oncue(s.cue),s.cue=null,s.state="ID";continue}if(s.cue===null)continue;s.cue.text&&(s.cue.text+=`
`),s.cue.text+=S}continue;case"BADCUE":S||(s.state="ID")}}}catch(C){s.state==="CUETEXT"&&s.cue&&s.oncue&&s.oncue(s.cue),s.cue=null,s.state=s.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var h=this;try{if((h.cue||h.state==="HEADER")&&(h.buffer+=`
`,h.parse()),h.state==="INITIAL"||h.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(s){h.onparsingerror&&h.onparsingerror(s)}return h.onflush&&h.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"generateCueId",function(){return r}),O.d(g,"parseWebVTT",function(){return o});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/vttparser.ts"),y=O("./src/demux/id3.ts"),T=O("./src/utils/timescale-conversion.ts"),b=O("./src/remux/mp4-remuxer.ts"),p=/\r\n|\n\r|\n|\r/g,d=function(h,s,l){return l===void 0&&(l=0),h.substr(l,s.length)===s},n=function(h){var s=parseInt(h.substr(-3)),l=parseInt(h.substr(-6,2)),t=parseInt(h.substr(-9,2)),S=h.length>9?parseInt(h.substr(0,h.indexOf(":"))):0;if(!Object(M.isFiniteNumber)(s)||!Object(M.isFiniteNumber)(l)||!Object(M.isFiniteNumber)(t)||!Object(M.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+h);return s+=1e3*l,s+=60*1e3*t,s+=60*60*1e3*S,s},c=function(h){for(var s=5381,l=h.length;l;)s=s*33^h.charCodeAt(--l);return(s>>>0).toString()};function r(u,h,s){return c(u.toString())+c(h.toString())+c(s)}var a=function(h,s,l){var t=h[s],S=h[t.prevCC];if(!S||!S.new&&t.new){h.ccOffset=h.presentationOffset=t.start,t.new=!1;return}for(;(x=S)!==null&&x!==void 0&&x.new;){var x;h.ccOffset+=t.start-S.start,t.new=!1,t=S,S=h[t.prevCC]}h.presentationOffset=l};function o(u,h,s,l,t,S,x,f){var R=new m.VTTParser,C=Object(y.utf8ArrayToStr)(new Uint8Array(u)).trim().replace(p,`
`).split(`
`),v=[],_=Object(T.toMpegTsClockFromTimescale)(h,s),E="00:00.000",w=0,k=0,I,L=!0,V=!1;R.oncue=function(W){var H=l[t],G=l.ccOffset,B=(w-_)/9e4;if(H!=null&&H.new&&(k!==void 0?G=l.ccOffset=H.start:a(l,t,B)),B&&(G=B-l.presentationOffset),V){var P=W.endTime-W.startTime,z=Object(b.normalizePts)((W.startTime+G-k)*9e4,S*9e4)/9e4;W.startTime=z,W.endTime=z+P}var J=W.text.trim();W.text=decodeURIComponent(encodeURIComponent(J)),W.id||(W.id=r(W.startTime,W.endTime,J)),W.endTime>0&&v.push(W)},R.onparsingerror=function(W){I=W},R.onflush=function(){if(I){f(I);return}x(v)},C.forEach(function(W){if(L)if(d(W,"X-TIMESTAMP-MAP=")){L=!1,V=!0,W.substr(16).split(",").forEach(function(H){d(H,"LOCAL:")?E=H.substr(6):d(H,"MPEGTS:")&&(w=parseInt(H.substr(7)))});try{k=n(E)/1e3}catch(H){V=!1,I=H}return}else W===""&&(L=!1);R.parse(W+`
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/utils/logger.ts"),m=O("./src/loader/load-stats.ts"),y=/^age:\s*[\d.]+\s*$/m,T=function(){function b(d){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=d?d.xhrSetup:null,this.stats=new m.LoadStats,this.retryDelay=0}var p=b.prototype;return p.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},p.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},p.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},p.load=function(n,c,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=c,this.callbacks=r,this.retryDelay=c.retryDelay,this.loadInternal()},p.loadInternal=function(){var n=this.config,c=this.context;if(!n)return;var r=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var o=this.xhrSetup;try{if(o)try{o(r,c.url)}catch(s){r.open("GET",c.url,!0),o(r,c.url)}r.readyState||r.open("GET",c.url,!0);var u=this.context.headers;if(u)for(var h in u)r.setRequestHeader(h,u[h])}catch(s){this.callbacks.onError({code:r.status,text:s.message},c,r);return}c.rangeEnd&&r.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),r.send()},p.readystatechange=function(){var n=this.context,c=this.loader,r=this.stats;if(!n||!c)return;var a=c.readyState,o=this.config;if(r.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),a===4){c.onreadystatechange=null,c.onprogress=null;var u=c.status;if(u>=200&&u<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var h,s;if(n.responseType==="arraybuffer"?(h=c.response,s=h.byteLength):(h=c.responseText,s=h.length),r.loaded=r.total=s,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(r,n,h,c),!this.callbacks)return;var t={url:c.responseURL,data:h};this.callbacks.onSuccess(t,r,n,c)}else r.retry>=o.maxRetry||u>=400&&u<499?(M.logger.error(u+" while loading "+n.url),this.callbacks.onError({code:u,text:c.statusText},n,c)):(M.logger.warn(u+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},p.loadtimeout=function(){M.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},p.loadprogress=function(n){var c=this.stats;c.loaded=n.loaded,n.lengthComputable&&(c.total=n.total)},p.getCacheAge=function(){var n=null;if(this.loader&&y.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");n=c?parseFloat(c):null}return n},b}();g.default=T}}).default})},vHTk:function(F,q,j){F.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.StreamCipher,m=g.algo,y=m.RC4=M.extend({_doReset:function(){for(var p=this._key,d=p.words,n=p.sigBytes,c=this._S=[],r=0;r<256;r++)c[r]=r;for(var r=0,a=0;r<256;r++){var o=r%n,u=d[o>>>2]>>>24-o%4*8&255;a=(a+c[r]+u)%256;var h=c[r];c[r]=c[a],c[a]=h}this._i=this._j=0},_doProcessBlock:function(p,d){p[d]^=T.call(this)},keySize:256/32,ivSize:0});function T(){for(var p=this._S,d=this._i,n=this._j,c=0,r=0;r<4;r++){d=(d+1)%256,n=(n+p[d])%256;var a=p[d];p[d]=p[n],p[n]=a,c|=p[(p[d]+p[n])%256]<<24-r*8}return this._i=d,this._j=n,c}g.RC4=M._createHelper(y);var b=m.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var p=this.cfg.drop;p>0;p--)T.call(this)}});g.RC4Drop=M._createHelper(b)}(),N.RC4})},wCXF:function(F,q,j){"use strict";j.d(q,"a",function(){return rt});var N=j("rePB"),g=j("VTBJ"),O=j("KQm4"),M=j("U8pU"),m=j("ODXe"),y=j("q1tI"),T=j("TSYQ"),b=j.n(T),p=j("Gytx"),d=j.n(p),n=j("Kwbf"),c=j("t23M"),r=j("qx4F"),a=j("6eGT"),o=j("IBYe"),u=j("Ff2n"),h=j("c+Xe"),s=j("fyJ8"),l=j("biw7");function t(Be,Ie,at,ct,$e){var st=at[Be]||{},Ue=at[Ie]||{},Le,Me;st.fixed==="left"?Le=ct.left[Be]:Ue.fixed==="right"&&(Me=ct.right[Ie]);var Ee=!1,Ce=!1,ke=!1,Ne=!1,He=at[Ie+1],tt=at[Be-1];if($e==="rtl"){if(Le!==void 0){var vt=tt&&tt.fixed==="left";Ne=!vt}else if(Me!==void 0){var yt=He&&He.fixed==="right";ke=!yt}}else if(Le!==void 0){var Wt=He&&He.fixed==="left";Ee=!Wt}else if(Me!==void 0){var Ht=tt&&tt.fixed==="right";Ce=!Ht}return{fixLeft:Le,fixRight:Me,lastFixLeft:Ee,firstFixRight:Ce,lastFixRight:ke,firstFixLeft:Ne,isSticky:ct.isSticky}}var S=j("sR1s");function x(Be){var Ie=Be.cells,at=Be.stickyOffsets,ct=Be.flattenColumns,$e=Be.rowComponent,st=Be.cellComponent,Ue=Be.onHeaderRow,Le=Be.index,Me=y.useContext(l.a),Ee=Me.prefixCls,Ce=Me.direction,ke;Ue&&(ke=Ue(Ie.map(function(He){return He.column}),Le));var Ne=Object(S.a)(Ie.map(function(He){return He.column}));return y.createElement($e,Object.assign({},ke),Ie.map(function(He,tt){var vt=He.column,yt=t(He.colStart,He.colEnd,ct,at,Ce),Wt;return vt&&vt.onHeaderCell&&(Wt=He.column.onHeaderCell(vt)),y.createElement(s.a,Object.assign({},He,{ellipsis:vt.ellipsis,align:vt.align,component:st,prefixCls:Ee,key:Ne[tt]},yt,{additionalProps:Wt,rowType:"header"}))}))}x.displayName="HeaderRow";var f=x;function R(Be){var Ie=[];function at(Ue,Le){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Me]=Ie[Me]||[];var Ee=Le,Ce=Ue.filter(Boolean).map(function(ke){var Ne={key:ke.key,className:ke.className||"",children:ke.title,column:ke,colStart:Ee},He=1,tt=ke.children;return tt&&tt.length>0&&(He=at(tt,Ee,Me+1).reduce(function(vt,yt){return vt+yt},0),Ne.hasSubColumns=!0),"colSpan"in ke&&(He=ke.colSpan),"rowSpan"in ke&&(Ne.rowSpan=ke.rowSpan),Ne.colSpan=He,Ne.colEnd=Ne.colStart+He-1,Ie[Me].push(Ne),Ee+=He,He});return Ce}at(Be,0);for(var ct=Ie.length,$e=function(Le){Ie[Le].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=ct-Le)})},st=0;st<ct;st+=1)$e(st);return Ie}function C(Be){var Ie=Be.stickyOffsets,at=Be.columns,ct=Be.flattenColumns,$e=Be.onHeaderRow,st=y.useContext(l.a),Ue=st.prefixCls,Le=st.getComponent,Me=y.useMemo(function(){return R(at)},[at]),Ee=Le(["header","wrapper"],"thead"),Ce=Le(["header","row"],"tr"),ke=Le(["header","cell"],"th");return y.createElement(Ee,{className:"".concat(Ue,"-thead")},Me.map(function(Ne,He){var tt=y.createElement(f,{key:He,flattenColumns:ct,cells:Ne,stickyOffsets:Ie,rowComponent:Ce,cellComponent:ke,onHeaderRow:$e,index:He});return tt}))}var v=C,_=j("hW8S");function E(Be){for(var Ie=Be.colWidths,at=Be.columns,ct=Be.columCount,$e=[],st=ct||at.length,Ue=!1,Le=st-1;Le>=0;Le-=1){var Me=Ie[Le],Ee=at&&at[Le],Ce=Ee&&Ee[_.a];(Me||Ce||Ue)&&($e.unshift(y.createElement("col",Object.assign({key:Le,style:{width:Me,minWidth:Me}},Ce))),Ue=!0)}return y.createElement("colgroup",null,$e)}var w=E;function k(Be,Ie){return Object(y.useMemo)(function(){for(var at=[],ct=0;ct<Ie;ct+=1){var $e=Be[ct];if($e!==void 0)at[ct]=$e;else return null}return at},[Be.join("_"),Ie])}var I=y.forwardRef(function(Be,Ie){var at=Be.noData,ct=Be.columns,$e=Be.flattenColumns,st=Be.colWidths,Ue=Be.columCount,Le=Be.stickyOffsets,Me=Be.direction,Ee=Be.fixHeader,Ce=Be.offsetHeader,ke=Be.stickyClassName,Ne=Be.onScroll,He=Object(u.a)(Be,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),tt=y.useContext(l.a),vt=tt.prefixCls,yt=tt.scrollbarSize,Wt=tt.isSticky,Ht=Wt&&!Ee?0:yt,cr=y.useRef(null),dr=y.useCallback(function(dn){Object(h.b)(Ie,dn),Object(h.b)(cr,dn)},[]);y.useEffect(function(){var dn;function hn(Tt){var gr=Tt.currentTarget,Br=Tt.deltaX;Br&&(Ne({currentTarget:gr,scrollLeft:gr.scrollLeft+Br}),Tt.preventDefault())}return(dn=cr.current)===null||dn===void 0||dn.addEventListener("wheel",hn),function(){var Tt;(Tt=cr.current)===null||Tt===void 0||Tt.removeEventListener("wheel",hn)}},[]);var St=$e[$e.length-1],Kr={fixed:St?St.fixed:null,onHeaderCell:function(){return{className:"".concat(vt,"-cell-scrollbar")}}},Vr=Object(y.useMemo)(function(){return Ht?[].concat(Object(O.a)(ct),[Kr]):ct},[Ht,ct]),Yr=Object(y.useMemo)(function(){return Ht?[].concat(Object(O.a)($e),[Kr]):$e},[Ht,$e]),vn=Object(y.useMemo)(function(){var dn=Le.right,hn=Le.left;return Object(g.a)(Object(g.a)({},Le),{},{left:Me==="rtl"?[].concat(Object(O.a)(hn.map(function(Tt){return Tt+Ht})),[0]):hn,right:Me==="rtl"?dn:[].concat(Object(O.a)(dn.map(function(Tt){return Tt+Ht})),[0]),isSticky:Wt})},[Ht,Le,Wt]),Or=k(st,Ue);return y.createElement("div",{style:Object(g.a)({overflow:"hidden"},Wt?{top:Ce}:{}),ref:dr,className:b()("".concat(vt,"-header"),Object(N.a)({},ke,!!ke))},y.createElement("table",{style:{tableLayout:"fixed",visibility:at||Or?null:"hidden"}},y.createElement(w,{colWidths:Or?[].concat(Object(O.a)(Or),[Ht]):[],columCount:Ue+1,columns:Yr}),y.createElement(v,Object.assign({},He,{stickyOffsets:vn,columns:Vr,flattenColumns:Yr}))))});I.displayName="FixedHeader";var L=I,V=y.createContext(null),W=V;function H(Be){var Ie=Be.prefixCls,at=Be.children,ct=Be.component,$e=Be.cellComponent,st=Be.fixHeader,Ue=Be.fixColumn,Le=Be.horizonScroll,Me=Be.className,Ee=Be.expanded,Ce=Be.componentWidth,ke=Be.colSpan,Ne=y.useContext(l.a),He=Ne.scrollbarSize;return y.useMemo(function(){var tt=at;return Ue&&(tt=y.createElement("div",{style:{width:Ce-(st?He:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},tt)),y.createElement(ct,{className:Me,style:{display:Ee?null:"none"}},y.createElement(s.a,{component:$e,prefixCls:Ie,colSpan:ke},tt))},[at,ct,st,Le,Me,Ee,Ce,ke,He])}var G=H;function B(Be){var Ie=Be.className,at=Be.style,ct=Be.record,$e=Be.index,st=Be.rowKey,Ue=Be.getRowKey,Le=Be.rowExpandable,Me=Be.expandedKeys,Ee=Be.onRow,Ce=Be.indent,ke=Ce===void 0?0:Ce,Ne=Be.rowComponent,He=Be.cellComponent,tt=Be.childrenColumnName,vt=y.useContext(l.a),yt=vt.prefixCls,Wt=vt.fixedInfoList,Ht=y.useContext(W),cr=Ht.fixHeader,dr=Ht.fixColumn,St=Ht.horizonScroll,Kr=Ht.componentWidth,Vr=Ht.flattenColumns,Yr=Ht.expandableType,vn=Ht.expandRowByClick,Or=Ht.onTriggerExpand,dn=Ht.rowClassName,hn=Ht.expandedRowClassName,Tt=Ht.indentSize,gr=Ht.expandIcon,Br=Ht.expandedRowRender,zr=Ht.expandIconColumnIndex,an=y.useState(!1),gi=Object(m.a)(an,2),Ei=gi[0],bn=gi[1],lr=Me&&Me.has(Be.recordKey);y.useEffect(function(){lr&&bn(!0)},[lr]);var Yn=Yr==="row"&&(!Le||Le(ct)),ci=Yr==="nest",Hn=tt&&ct&&ct[tt],qr=Yn||ci,Un;Ee&&(Un=Ee(ct,$e));var di=function(K){if(vn&&qr&&Or(ct,K),Un&&Un.onClick){for(var Y,ee=arguments.length,ge=new Array(ee>1?ee-1:0),se=1;se<ee;se++)ge[se-1]=arguments[se];(Y=Un).onClick.apply(Y,[K].concat(ge))}},vi;typeof dn=="string"?vi=dn:typeof dn=="function"&&(vi=dn(ct,$e,ke));var Ut=Object(S.a)(Vr),_r=y.createElement(Ne,Object.assign({},Un,{"data-row-key":st,className:b()(Ie,"".concat(yt,"-row"),"".concat(yt,"-row-level-").concat(ke),vi,Un&&Un.className),style:Object(g.a)(Object(g.a)({},at),Un?Un.style:null),onClick:di}),Vr.map(function(le,K){var Y=le.render,ee=le.dataIndex,ge=le.className,se=Ut[K],Ke=Wt[K],Ct;K===(zr||0)&&ci&&(Ct=y.createElement(y.Fragment,null,y.createElement("span",{style:{paddingLeft:"".concat(Tt*ke,"px")},className:"".concat(yt,"-row-indent indent-level-").concat(ke)}),gr({prefixCls:yt,expanded:lr,expandable:Hn,record:ct,onExpand:Or})));var Xt;return le.onCell&&(Xt=le.onCell(ct,$e)),y.createElement(s.a,Object.assign({className:ge,ellipsis:le.ellipsis,align:le.align,component:He,prefixCls:yt,key:se,record:ct,index:$e,dataIndex:ee,render:Y,shouldCellUpdate:le.shouldCellUpdate},Ke,{appendNode:Ct,additionalProps:Xt}))})),hi;if(Yn&&(Ei||lr)){var xi=Br(ct,$e,ke+1,lr),Di=hn&&hn(ct,$e,ke);hi=y.createElement(G,{expanded:lr,className:b()("".concat(yt,"-expanded-row"),"".concat(yt,"-expanded-row-level-").concat(ke+1),Di),prefixCls:yt,fixHeader:cr,fixColumn:dr,horizonScroll:St,component:Ne,componentWidth:Kr,cellComponent:He,colSpan:Vr.length},xi)}var wi;return Hn&&lr&&(wi=(ct[tt]||[]).map(function(le,K){var Y=Ue(le,K);return y.createElement(B,Object.assign({},Be,{key:Y,rowKey:Y,record:le,recordKey:Y,index:K,indent:ke+1}))})),y.createElement(y.Fragment,null,_r,hi,wi)}B.displayName="BodyRow";var P=B,z=y.createContext(null),J=z;function ue(Be){var Ie=Be.columnKey,at=Be.onColumnResize,ct=y.useRef();return y.useEffect(function(){ct.current&&at(Ie,ct.current.offsetWidth)},[]),y.createElement(c.a,{onResize:function(st){var Ue=st.offsetWidth;at(Ie,Ue)}},y.createElement("td",{ref:ct,style:{padding:0,border:0,height:0}},y.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(Be){var Ie=Be.data,at=Be.getRowKey,ct=Be.measureColumnWidth,$e=Be.expandedKeys,st=Be.onRow,Ue=Be.rowExpandable,Le=Be.emptyNode,Me=Be.childrenColumnName,Ee=y.useContext(J),Ce=Ee.onColumnResize,ke=y.useContext(l.a),Ne=ke.prefixCls,He=ke.getComponent,tt=y.useContext(W),vt=tt.fixHeader,yt=tt.horizonScroll,Wt=tt.flattenColumns,Ht=tt.componentWidth;return y.useMemo(function(){var cr=He(["body","wrapper"],"tbody"),dr=He(["body","row"],"tr"),St=He(["body","cell"],"td"),Kr;Ie.length?Kr=Ie.map(function(Yr,vn){var Or=at(Yr,vn);return y.createElement(P,{key:Or,rowKey:Or,record:Yr,recordKey:Or,index:vn,rowComponent:dr,cellComponent:St,expandedKeys:$e,onRow:st,getRowKey:at,rowExpandable:Ue,childrenColumnName:Me})}):Kr=y.createElement(G,{expanded:!0,className:"".concat(Ne,"-placeholder"),prefixCls:Ne,fixHeader:vt,fixColumn:yt,horizonScroll:yt,component:dr,componentWidth:Ht,cellComponent:St,colSpan:Wt.length},Le);var Vr=Object(S.a)(Wt);return y.createElement(cr,{className:"".concat(Ne,"-tbody")},ct&&y.createElement("tr",{"aria-hidden":"true",className:"".concat(Ne,"-measure-row"),style:{height:0}},Vr.map(function(Yr){return y.createElement(ue,{key:Yr,columnKey:Yr,onColumnResize:Ce})})),Kr)},[Ie,Ne,st,ct,$e,at,He,Ht,Le,Wt])}var Se=y.memo(de);Se.displayName="Body";var Ae=Se,pe=j("wRmb"),Oe=j("xEkU"),ye=j.n(Oe);function ce(Be){var Ie=Object(y.useRef)(Be),at=Object(y.useState)({}),ct=Object(m.a)(at,2),$e=ct[1],st=Object(y.useRef)(null),Ue=Object(y.useRef)([]);function Le(Me){st.current===null&&(Ue.current=[],st.current=ye()(function(){Ue.current.forEach(function(Ee){Ie.current=Ee(Ie.current)}),st.current=null,$e({})})),Ue.current.push(Me)}return Object(y.useEffect)(function(){return function(){ye.a.cancel(st.current)}},[]),[Ie.current,Le]}function ae(Be){var Ie=Object(y.useRef)(Be),at=Object(y.useRef)(null);function ct(){window.clearTimeout(at.current)}function $e(Ue){Ie.current=Ue,ct(),at.current=window.setTimeout(function(){Ie.current=null,at.current=null},100)}function st(){return Ie.current}return Object(y.useEffect)(function(){return ct},[]),[$e,st]}function re(Be,Ie,at){var ct=Object(y.useMemo)(function(){for(var $e=[],st=[],Ue=0,Le=0,Me=0;Me<Ie;Me+=1)if(at==="rtl"){st[Me]=Le,Le+=Be[Me]||0;var Ee=Ie-Me-1;$e[Ee]=Ue,Ue+=Be[Ee]||0}else{$e[Me]=Ue,Ue+=Be[Me]||0;var Ce=Ie-Me-1;st[Ce]=Le,Le+=Be[Ce]||0}return{left:$e,right:st}},[Be,Ie,at]);return ct}var fe=re;function te(Be){var Ie=Be.className,at=Be.children;return y.createElement("div",{className:Ie},at)}var ne=te,Te=j("n6Qo");function ie(Be){var Ie,at=Be.prefixCls,ct=Be.record,$e=Be.onExpand,st=Be.expanded,Ue=Be.expandable,Le="".concat(at,"-row-expand-icon");if(!Ue)return y.createElement("span",{className:b()(Le,"".concat(at,"-row-spaced"))});var Me=function(Ce){$e(ct,Ce),Ce.stopPropagation()};return y.createElement("span",{className:b()(Le,(Ie={},Object(N.a)(Ie,"".concat(at,"-row-expanded"),st),Object(N.a)(Ie,"".concat(at,"-row-collapsed"),!st),Ie)),onClick:Me})}function Z(Be,Ie,at){var ct=[];function $e(st){(st||[]).forEach(function(Ue,Le){ct.push(Ie(Ue,Le)),$e(Ue[at])})}return $e(Be),ct}var X=j("zT1h"),Q=j("y0+3"),_e=function(Ie,at){var ct,$e,st=Ie.scrollBodyRef,Ue=Ie.onScroll,Le=Ie.offsetScroll,Me=y.useContext(l.a),Ee=Me.prefixCls,Ce=((ct=st.current)===null||ct===void 0?void 0:ct.scrollWidth)||0,ke=(($e=st.current)===null||$e===void 0?void 0:$e.clientWidth)||0,Ne=Ce&&ke*(ke/Ce),He=y.useRef(),tt=ce({scrollLeft:0,isHiddenScrollBar:!1}),vt=Object(m.a)(tt,2),yt=vt[0],Wt=vt[1],Ht=y.useRef({delta:0,x:0}),cr=y.useState(!1),dr=Object(m.a)(cr,2),St=dr[0],Kr=dr[1],Vr=function(){Kr(!1)},Yr=function(Tt){Tt.persist(),Ht.current.delta=Tt.pageX-yt.scrollLeft,Ht.current.x=0,Kr(!0),Tt.preventDefault()},vn=function(Tt){var gr,Br=Tt||((gr=window)===null||gr===void 0?void 0:gr.event),zr=Br.buttons;if(!St||zr===0){St&&Kr(!1);return}var an=Ht.current.x+Tt.pageX-Ht.current.x-Ht.current.delta;an<=0&&(an=0),an+Ne>=ke&&(an=ke-Ne),Ue({scrollLeft:an/ke*(Ce+2)}),Ht.current.x=Tt.pageX},Or=function(){var Tt=Object(Q.b)(st.current).top,gr=Tt+st.current.offsetHeight,Br=document.documentElement.scrollTop+window.innerHeight;gr-Object(r.a)()<=Br||Tt>=Br-Le?Wt(function(zr){return Object(g.a)(Object(g.a)({},zr),{},{isHiddenScrollBar:!0})}):Wt(function(zr){return Object(g.a)(Object(g.a)({},zr),{},{isHiddenScrollBar:!1})})},dn=function(Tt){Wt(function(gr){return Object(g.a)(Object(g.a)({},gr),{},{scrollLeft:Tt/Ce*ke||0})})};return y.useImperativeHandle(at,function(){return{setScrollLeft:dn}}),y.useEffect(function(){var hn=Object(X.a)(document.body,"mouseup",Vr,!1),Tt=Object(X.a)(document.body,"mousemove",vn,!1);return Or(),function(){hn.remove(),Tt.remove()}},[Ne,St]),y.useEffect(function(){var hn=Object(X.a)(window,"scroll",Or,!1),Tt=Object(X.a)(window,"resize",Or,!1);return function(){hn.remove(),Tt.remove()}},[]),y.useEffect(function(){yt.isHiddenScrollBar||Wt(function(hn){var Tt,gr;return Object(g.a)(Object(g.a)({},hn),{},{scrollLeft:st.current.scrollLeft/((Tt=st.current)===null||Tt===void 0?void 0:Tt.scrollWidth)*((gr=st.current)===null||gr===void 0?void 0:gr.clientWidth)})})},[yt.isHiddenScrollBar]),Ce<=ke||!Ne||yt.isHiddenScrollBar?null:y.createElement("div",{style:{height:Object(r.a)(),width:ke,bottom:Le},className:"".concat(Ee,"-sticky-scroll")},y.createElement("div",{onMouseDown:Yr,ref:He,className:b()("".concat(Ee,"-sticky-scroll-bar"),Object(N.a)({},"".concat(Ee,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(Ne,"px"),transform:"translate3d(".concat(yt.scrollLeft,"px, 0, 0)")}}))},ve=y.forwardRef(_e);function Re(Be,Ie){return y.useMemo(function(){var at=!!Be;return{isSticky:at,stickyClassName:at?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(M.a)(Be)==="object"&&Be.offsetHeader||0,offsetScroll:Object(M.a)(Be)==="object"&&Be.offsetScroll||0}},[Be,Ie])}var Je=[],qe={},rt="rc-table-internal-hook",ut=y.memo(function(Be){var Ie=Be.children;return Ie},function(Be,Ie){return d()(Be.props,Ie.props)?Be.pingLeft!==Ie.pingLeft||Be.pingRight!==Ie.pingRight:!1});function dt(Be){var Ie,at=Be.prefixCls,ct=Be.className,$e=Be.rowClassName,st=Be.style,Ue=Be.data,Le=Be.rowKey,Me=Be.scroll,Ee=Be.tableLayout,Ce=Be.direction,ke=Be.title,Ne=Be.footer,He=Be.summary,tt=Be.id,vt=Be.showHeader,yt=Be.components,Wt=Be.emptyText,Ht=Be.onRow,cr=Be.onHeaderRow,dr=Be.internalHooks,St=Be.transformColumns,Kr=Be.internalRefs,Vr=Be.sticky,Yr=Ue||Je,vn=!!Yr.length,Or=y.useState(0),dn=Object(m.a)(Or,2),hn=dn[0],Tt=dn[1];y.useEffect(function(){Tt(Object(r.a)())});var gr=y.useMemo(function(){return Object(S.c)(yt,{})},[yt]),Br=y.useCallback(function(Pr,Ft){return Object(S.b)(gr,Pr)||Ft},[gr]),zr=y.useMemo(function(){return typeof Le=="function"?Le:function(Pr){var Ft=Pr&&Pr[Le];return Ft}},[Le]),an=Object(_.c)(Be),gi=an.expandIcon,Ei=an.expandedRowKeys,bn=an.defaultExpandedRowKeys,lr=an.defaultExpandAllRows,Yn=an.expandedRowRender,ci=an.onExpand,Hn=an.onExpandedRowsChange,qr=an.expandRowByClick,Un=an.rowExpandable,di=an.expandIconColumnIndex,vi=an.expandedRowClassName,Ut=an.childrenColumnName,_r=an.indentSize,hi=gi||ie,xi=Ut||"children",Di=y.useMemo(function(){return Yn?"row":Be.expandable&&dr===rt&&Be.expandable.__PARENT_RENDER_ICON__||Yr.some(function(Pr){return Pr&&Object(M.a)(Pr)==="object"&&Pr[xi]})?"nest":!1},[!!Yn,Yr]),wi=y.useState(function(){return bn||(lr?Z(Yr,zr,xi):[])}),le=Object(m.a)(wi,2),K=le[0],Y=le[1],ee=y.useMemo(function(){return new Set(Ei||K||[])},[Ei,K]),ge=y.useCallback(function(Pr){var Ft=zr(Pr,Yr.indexOf(Pr)),Qt,vr=ee.has(Ft);vr?(ee.delete(Ft),Qt=Object(O.a)(ee)):Qt=[].concat(Object(O.a)(ee),[Ft]),Y(Qt),ci&&ci(!vr,Pr),Hn&&Hn(Qt)},[zr,ee,Yr,ci,Hn]),se=y.useState(0),Ke=Object(m.a)(se,2),Ct=Ke[0],Xt=Ke[1],Er=Object(pe.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Be),an),{},{expandable:!!Yn,expandedKeys:ee,getRowKey:zr,onTriggerExpand:ge,expandIcon:hi,expandIconColumnIndex:di,direction:Ce}),dr===rt?St:null),Pt=Object(m.a)(Er,2),Lr=Pt[0],Gr=Pt[1],_n=y.useMemo(function(){return{columns:Lr,flattenColumns:Gr}},[Lr,Gr]),Zn=y.useRef(),qn=y.useRef(),Nn=y.useRef(),Ni=y.useState(!1),Gi=Object(m.a)(Ni,2),Wn=Gi[0],Ti=Gi[1],Ki=y.useState(!1),ki=Object(m.a)(Ki,2),ni=ki[0],ea=ki[1],Vi=ce(new Map),ta=Object(m.a)(Vi,2),oa=ta[0],Li=ta[1],$n=Object(S.a)(Gr),ji=$n.map(function(Pr){return oa.get(Pr)}),ha=y.useMemo(function(){return ji},[ji.join("_")]),xt=fe(ha,Gr.length,Ce),et=Me&&Object(S.d)(Me.y),mt=Me&&Object(S.d)(Me.x),wt=mt&&Gr.some(function(Pr){var Ft=Pr.fixed;return Ft}),Lt=y.useRef(),Dt=Re(Vr,at),Kt=Dt.isSticky,zt=Dt.offsetHeader,ht=Dt.offsetScroll,Ot=Dt.stickyClassName,Rt,ur,ar;et&&(ur={overflowY:"scroll",maxHeight:Me.y}),mt&&(Rt={overflowX:"auto"},et||(ur={overflowY:"hidden"}),ar={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var Zt=y.useCallback(function(Pr,Ft){Li(function(Qt){var vr=new Map(Qt);return vr.set(Pr,Ft),vr})},[]),$t=ae(null),rr=Object(m.a)($t,2),sr=rr[0],ot=rr[1];function Ar(Pr,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Pr):Ft.scrollLeft!==Pr&&(Ft.scrollLeft=Pr)}var Nr=function(Ft){var Qt=Ft.currentTarget,vr=Ft.scrollLeft,tr=typeof vr=="number"?vr:Qt.scrollLeft,gt=Qt||qe;if(!ot()||ot()===gt){var bt;sr(gt),Ar(tr,qn.current),Ar(tr,Nn.current),Ar(tr,(bt=Lt.current)===null||bt===void 0?void 0:bt.setScrollLeft)}if(Qt){var Vt=Qt.scrollWidth,Mt=Qt.clientWidth;Ti(tr>0),ea(tr<Vt-Mt)}},fr=function(){Nn.current&&Nr({currentTarget:Nn.current})},_t=function(Ft){var Qt=Ft.width;fr(),Xt(Zn.current?Zn.current.offsetWidth:Qt)};y.useEffect(function(){return fr},[]),y.useEffect(function(){mt&&fr()},[mt]),y.useEffect(function(){dr===rt&&Kr&&(Kr.body.current=Nn.current)});var It=Br(["table"],"table"),Et=y.useMemo(function(){return Ee||(wt?Me.x==="max-content"?"auto":"fixed":et||Gr.some(function(Pr){var Ft=Pr.ellipsis;return Ft})?"fixed":"auto")},[et,wt,Gr,Ee]),Nt,qt={colWidths:ha,columCount:Gr.length,stickyOffsets:xt,onHeaderRow:cr,fixHeader:et},pr=y.useMemo(function(){return vn?null:typeof Wt=="function"?Wt():Wt},[vn,Wt]),er=y.createElement(Ae,{data:Yr,measureColumnWidth:et||mt||Kt,expandedKeys:ee,rowExpandable:Un,getRowKey:zr,onRow:Ht,emptyNode:pr,childrenColumnName:xi}),Rr=y.createElement(w,{colWidths:Gr.map(function(Pr){var Ft=Pr.width;return Ft}),columns:Gr}),Ur=He&&y.createElement(Te.b,null,He(Yr)),br=Br(["body"]);if(et||Kt){var it;typeof br=="function"?(it=br(Yr,{scrollbarSize:hn,ref:Nn,onScroll:Nr}),qt.colWidths=Gr.map(function(Pr,Ft){var Qt=Pr.width,vr=Ft===Lr.length-1?Qt-hn:Qt;return typeof vr=="number"&&!Number.isNaN(vr)?vr:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):it=y.createElement("div",{style:Object(g.a)(Object(g.a)({},Rt),ur),onScroll:Nr,ref:Nn,className:b()("".concat(at,"-body"))},y.createElement(It,{style:Object(g.a)(Object(g.a)({},ar),{},{tableLayout:Et})},Rr,er,Ur),Kt&&y.createElement(ve,{ref:Lt,offsetScroll:ht,scrollBodyRef:Nn,onScroll:Nr})),Nt=y.createElement(y.Fragment,null,vt!==!1&&y.createElement(L,Object.assign({noData:!Yr.length},qt,_n,{direction:Ce,offsetHeader:zt,stickyClassName:Ot,ref:qn,onScroll:Nr})),it)}else Nt=y.createElement("div",{style:Object(g.a)(Object(g.a)({},Rt),ur),className:b()("".concat(at,"-content")),onScroll:Nr,ref:Nn},y.createElement(It,{style:Object(g.a)(Object(g.a)({},ar),{},{tableLayout:Et})},Rr,vt!==!1&&y.createElement(v,Object.assign({},qt,_n)),er,Ur));var Gt=Object(_.b)(Be),ln=y.createElement("div",Object.assign({className:b()(at,ct,(Ie={},Object(N.a)(Ie,"".concat(at,"-rtl"),Ce==="rtl"),Object(N.a)(Ie,"".concat(at,"-ping-left"),Wn),Object(N.a)(Ie,"".concat(at,"-ping-right"),ni),Object(N.a)(Ie,"".concat(at,"-layout-fixed"),Ee==="fixed"),Object(N.a)(Ie,"".concat(at,"-fixed-header"),et),Object(N.a)(Ie,"".concat(at,"-fixed-column"),wt),Object(N.a)(Ie,"".concat(at,"-scroll-horizontal"),mt),Object(N.a)(Ie,"".concat(at,"-has-fix-left"),Gr[0]&&Gr[0].fixed),Object(N.a)(Ie,"".concat(at,"-has-fix-right"),Gr[Gr.length-1]&&Gr[Gr.length-1].fixed==="right"),Ie)),style:st,id:tt,ref:Zn},Gt),y.createElement(ut,{pingLeft:Wn,pingRight:ni,props:Object(g.a)(Object(g.a)({},Be),{},{stickyOffsets:xt,mergedExpandedKeys:ee})},ke&&y.createElement(ne,{className:"".concat(at,"-title")},ke(Yr)),y.createElement("div",{className:"".concat(at,"-container")},Nt),Ne&&y.createElement(ne,{className:"".concat(at,"-footer")},Ne(Yr))));mt&&(ln=y.createElement(c.a,{onResize:_t},ln));var en=y.useMemo(function(){return{prefixCls:at,getComponent:Br,scrollbarSize:hn,direction:Ce,fixedInfoList:Gr.map(function(Pr,Ft){return t(Ft,Ft,Gr,xt,Ce)}),isSticky:Kt}},[at,Br,hn,Ce,Gr,xt,Ce,Kt]),mr=y.useMemo(function(){return Object(g.a)(Object(g.a)({},_n),{},{tableLayout:Et,rowClassName:$e,expandedRowClassName:vi,componentWidth:Ct,fixHeader:et,fixColumn:wt,horizonScroll:mt,expandIcon:hi,expandableType:Di,expandRowByClick:qr,expandedRowRender:Yn,onTriggerExpand:ge,expandIconColumnIndex:di,indentSize:_r})},[_n,Et,$e,vi,Ct,et,wt,mt,hi,Di,qr,Yn,ge,di,_r]),Ir=y.useMemo(function(){return{onColumnResize:Zt}},[Zt]);return y.createElement(l.a.Provider,{value:en},y.createElement(W.Provider,{value:mr},y.createElement(J.Provider,{value:Ir},ln)))}dt.Column=o.a,dt.ColumnGroup=a.a,dt.Summary=Te.a,dt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var ft=q.b=dt},wRmb:function(F,q,j){"use strict";j.d(q,"a",function(){return d});var N=j("rePB"),g=j("KQm4"),O=j("VTBJ"),M=j("Ff2n"),m=j("q1tI"),y=j.n(m),T=j("Kwbf"),b=j("Zm9Q"),p=j("hW8S");function d(o){return Object(b.a)(o).filter(function(u){return m.isValidElement(u)}).map(function(u){var h=u.key,s=u.props,l=s.children,t=Object(M.a)(s,["children"]),S=Object(O.a)({key:h},t);return l&&(S.children=d(l)),S})}function n(o){return o.reduce(function(u,h){var s=h.fixed,l=s===!0?"left":s,t=h.children;return t&&t.length>0?[].concat(Object(g.a)(u),Object(g.a)(n(t).map(function(S){return Object(O.a)({fixed:l},S)}))):[].concat(Object(g.a)(u),[Object(O.a)(Object(O.a)({},h),{},{fixed:l})])},[])}function c(o){for(var u=!0,h=0;h<o.length;h+=1){var s=o[h];if(u&&s.fixed!=="left")u=!1;else if(!u&&s.fixed==="left"){Object(T.a)(!1,"Index ".concat(h-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,t=o.length-1;t>=0;t-=1){var S=o[t];if(l&&S.fixed!=="right")l=!1;else if(!l&&S.fixed==="right"){Object(T.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function r(o){return o.map(function(u){var h=u.fixed,s=Object(M.a)(u,["fixed"]),l=h;return h==="left"?l="right":h==="right"&&(l="left"),Object(O.a)({fixed:l},s)})}function a(o,u){var h=o.prefixCls,s=o.columns,l=o.children,t=o.expandable,S=o.expandedKeys,x=o.getRowKey,f=o.onTriggerExpand,R=o.expandIcon,C=o.rowExpandable,v=o.expandIconColumnIndex,_=o.direction,E=o.expandRowByClick,w=m.useMemo(function(){return s||d(l)},[s,l]),k=m.useMemo(function(){if(t){var V,W=v||0,H=w[W],G=(V={},Object(N.a)(V,p.a,{className:"".concat(h,"-expand-icon-col")}),Object(N.a)(V,"title",""),Object(N.a)(V,"fixed",H?H.fixed:null),Object(N.a)(V,"className","".concat(h,"-row-expand-icon-cell")),Object(N.a)(V,"render",function(z,J,ue){var de=x(J,ue),Se=S.has(de),Ae=C?C(J):!0,pe=R({prefixCls:h,expanded:Se,expandable:Ae,record:J,onExpand:f});return E?m.createElement("span",{onClick:function(ye){return ye.stopPropagation()}},pe):pe}),V),B=w.slice();return W>=0&&B.splice(W,0,G),B}return w},[t,w,x,S,R,_]),I=m.useMemo(function(){var V=k;return u&&(V=u(V)),V.length||(V=[{render:function(){return null}}]),V},[u,k,_]),L=m.useMemo(function(){return _==="rtl"?r(n(I)):n(I)},[I,_]);return[I,L]}q.b=a},wZgz:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.BlockCipher,m=g.algo,y=[],T=[],b=[],p=[],d=[],n=[],c=[],r=[],a=[],o=[];(function(){for(var s=[],l=0;l<256;l++)l<128?s[l]=l<<1:s[l]=l<<1^283;for(var t=0,S=0,l=0;l<256;l++){var x=S^S<<1^S<<2^S<<3^S<<4;x=x>>>8^x&255^99,y[t]=x,T[x]=t;var f=s[t],R=s[f],C=s[R],v=s[x]*257^x*16843008;b[t]=v<<24|v>>>8,p[t]=v<<16|v>>>16,d[t]=v<<8|v>>>24,n[t]=v;var v=C*16843009^R*65537^f*257^t*16843008;c[x]=v<<24|v>>>8,r[x]=v<<16|v>>>16,a[x]=v<<8|v>>>24,o[x]=v,t?(t=f^s[s[s[C^f]]],S^=s[s[S]]):t=S=1}})();var u=[0,1,2,4,8,16,32,64,128,27,54],h=m.AES=M.extend({_doReset:function(){var s;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var l=this._keyPriorReset=this._key,t=l.words,S=l.sigBytes/4,x=this._nRounds=S+6,f=(x+1)*4,R=this._keySchedule=[],C=0;C<f;C++)C<S?R[C]=t[C]:(s=R[C-1],C%S?S>6&&C%S==4&&(s=y[s>>>24]<<24|y[s>>>16&255]<<16|y[s>>>8&255]<<8|y[s&255]):(s=s<<8|s>>>24,s=y[s>>>24]<<24|y[s>>>16&255]<<16|y[s>>>8&255]<<8|y[s&255],s^=u[C/S|0]<<24),R[C]=R[C-S]^s);for(var v=this._invKeySchedule=[],_=0;_<f;_++){var C=f-_;if(_%4)var s=R[C];else var s=R[C-4];_<4||C<=4?v[_]=s:v[_]=c[y[s>>>24]]^r[y[s>>>16&255]]^a[y[s>>>8&255]]^o[y[s&255]]}},encryptBlock:function(s,l){this._doCryptBlock(s,l,this._keySchedule,b,p,d,n,y)},decryptBlock:function(s,l){var t=s[l+1];s[l+1]=s[l+3],s[l+3]=t,this._doCryptBlock(s,l,this._invKeySchedule,c,r,a,o,T);var t=s[l+1];s[l+1]=s[l+3],s[l+3]=t},_doCryptBlock:function(s,l,t,S,x,f,R,C){for(var v=this._nRounds,_=s[l]^t[0],E=s[l+1]^t[1],w=s[l+2]^t[2],k=s[l+3]^t[3],I=4,L=1;L<v;L++){var V=S[_>>>24]^x[E>>>16&255]^f[w>>>8&255]^R[k&255]^t[I++],W=S[E>>>24]^x[w>>>16&255]^f[k>>>8&255]^R[_&255]^t[I++],H=S[w>>>24]^x[k>>>16&255]^f[_>>>8&255]^R[E&255]^t[I++],G=S[k>>>24]^x[_>>>16&255]^f[E>>>8&255]^R[w&255]^t[I++];_=V,E=W,w=H,k=G}var V=(C[_>>>24]<<24|C[E>>>16&255]<<16|C[w>>>8&255]<<8|C[k&255])^t[I++],W=(C[E>>>24]<<24|C[w>>>16&255]<<16|C[k>>>8&255]<<8|C[_&255])^t[I++],H=(C[w>>>24]<<24|C[k>>>16&255]<<16|C[_>>>8&255]<<8|C[E&255])^t[I++],G=(C[k>>>24]<<24|C[_>>>16&255]<<16|C[E>>>8&255]<<8|C[w&255])^t[I++];s[l]=V,s[l+1]=W,s[l+2]=H,s[l+3]=G},keySize:256/32});g.AES=M._createHelper(h)}(),N.AES})},wbyO:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.enc,y=m.Base64url={stringify:function(b,p=!0){var d=b.words,n=b.sigBytes,c=p?this._safe_map:this._map;b.clamp();for(var r=[],a=0;a<n;a+=3)for(var o=d[a>>>2]>>>24-a%4*8&255,u=d[a+1>>>2]>>>24-(a+1)%4*8&255,h=d[a+2>>>2]>>>24-(a+2)%4*8&255,s=o<<16|u<<8|h,l=0;l<4&&a+l*.75<n;l++)r.push(c.charAt(s>>>6*(3-l)&63));var t=c.charAt(64);if(t)for(;r.length%4;)r.push(t);return r.join("")},parse:function(b,p=!0){var d=b.length,n=p?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var r=0;r<n.length;r++)c[n.charCodeAt(r)]=r}var a=n.charAt(64);if(a){var o=b.indexOf(a);o!==-1&&(d=o)}return T(b,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function T(b,p,d){for(var n=[],c=0,r=0;r<p;r++)if(r%4){var a=d[b.charCodeAt(r-1)]<<r%4*2,o=d[b.charCodeAt(r)]>>>6-r%4*2,u=a|o;n[c>>>2]|=u<<24-c%4*8,c++}return M.create(n,c)}}(),N.enc.Base64url})},"y0+3":function(F,q,j){"use strict";j.d(q,"a",function(){return n}),j.d(q,"b",function(){return r});var N=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function M(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function m(a,o,u){if(o=o.toLowerCase(),u==="auto"){if(o==="height")return a.offsetHeight;if(o==="width")return a.offsetWidth}return o in g||(g[o]=N.test(o)),g[o]?parseFloat(u)||0:u}function y(a,o){var u=arguments.length,h=M(a);return o=O[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,u===1?h:m(a,o,h[o]||a.style[o])}function T(a,o,u){var h=arguments.length;if(o=O[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,h===3)return typeof u=="number"&&N.test(o)&&(u="".concat(u,"px")),a.style[o]=u,u;for(var s in o)o.hasOwnProperty(s)&&T(a,s,o[s]);return M(a)}function b(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function p(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function d(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:o}}function n(){var a=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:o}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(a){var o=a.getBoundingClientRect(),u=document.documentElement;return{left:o.left+(window.pageXOffset||u.scrollLeft)-(u.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||u.scrollTop)-(u.clientTop||document.body.clientTop||0)}}},"yTi+":function(F,q,j){F.exports=j.p+"static/AssistantCode3.fdd8db3c.jpeg"},zrhs:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("PpiC"),M=j("q1tI"),m=j.n(M),y=j("9kvl"),T=function(p){var d=p.shixunsDetail,n=p.globalSetting,c=p.loading,r=p.dispatch,a=Object(O.a)(p,["shixunsDetail","globalSetting","loading","dispatch"]);return m.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:d.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){r({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){r({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"))};q.a=Object(y.a)(function(b){var p=b.shixunsDetail,d=b.loading,n=b.globalSetting;return{shixunsDetail:p,globalSetting:n,loading:d.models.index}})(T)}}]);