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.5fb...

457 lines
1.7 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([[121,5,6,7,8,10,16,17],{"+NIl":function(N,J,M){(function(D){D(M("VrN/"))})(function(D){"use strict";D.defineMode("stex",function(m,S){"use strict";function P(f,v){f.cmdState.push(v)}function c(f){return f.cmdState.length>0?f.cmdState[f.cmdState.length-1]:null}function h(f){var v=f.cmdState.pop();v&&v.closeBracket()}function w(f){for(var v=f.cmdState,g=v.length-1;g>=0;g--){var b=v[g];if(b.name=="DEFAULT")continue;return b}return{styleIdentifier:function(){return null}}}function d(f,v,g){return function(){this.name=f,this.bracketNo=0,this.style=v,this.styles=g,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};o.importmodule=d("importmodule","tag",["string","builtin"]),o.documentclass=d("documentclass","tag",["","atom"]),o.usepackage=d("usepackage","tag",["atom"]),o.begin=d("begin","tag",["atom"]),o.end=d("end","tag",["atom"]),o.label=d("label","tag",["atom"]),o.ref=d("ref","tag",["atom"]),o.eqref=d("eqref","tag",["atom"]),o.cite=d("cite","tag",["atom"]),o.bibitem=d("bibitem","tag",["atom"]),o.Bibitem=d("Bibitem","tag",["atom"]),o.RBibitem=d("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function a(f,v){f.f=v}function n(f,v){var g;if(f.match(/^\\[a-zA-Z@]+/)){var b=f.current().slice(1);return g=o.hasOwnProperty(b)?o[b]:o.DEFAULT,g=new g,P(v,g),a(v,p),g.style}if(f.match(/^\\[$&%#{}_]/))return"tag";if(f.match(/^\\[,;!\/\\]/))return"tag";if(f.match("\\["))return a(v,function(s,t){return u(s,t,"\\]")}),"keyword";if(f.match("\\("))return a(v,function(s,t){return u(s,t,"\\)")}),"keyword";if(f.match("$$"))return a(v,function(s,t){return u(s,t,"$$")}),"keyword";if(f.match("$"))return a(v,function(s,t){return u(s,t,"$")}),"keyword";var i=f.next();if(i=="%")return f.skipToEnd(),"comment";if(i=="}"||i=="]"){if(g=c(v),g)g.closeBracket(i),a(v,p);else return"error";return"bracket"}else return i=="{"||i=="["?(g=o.DEFAULT,g=new g,P(v,g),"bracket"):/\d/.test(i)?(f.eatWhile(/[\w.%]/),"atom"):(f.eatWhile(/[\w\-_]/),g=w(v),g.name=="begin"&&(g.argument=f.current()),g.styleIdentifier())}function u(f,v,g){if(f.eatSpace())return null;if(g&&f.match(g))return a(v,n),"keyword";if(f.match(/^\\[a-zA-Z@]+/))return"tag";if(f.match(/^[a-zA-Z]+/))return"variable-2";if(f.match(/^\\[$&%#{}_]/))return"tag";if(f.match(/^\\[,;!\/]/))return"tag";if(f.match(/^[\^_&]/))return"tag";if(f.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(f.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var b=f.next();return b=="{"||b=="}"||b=="["||b=="]"||b=="("||b==")"?"bracket":b=="%"?(f.skipToEnd(),"comment"):"error"}function p(f,v){var g=f.peek(),b;return g=="{"||g=="["?(b=c(v),b.openBracket(g),f.eat(g),a(v,n),"bracket"):/[ \t\r]/.test(g)?(f.eat(g),null):(a(v,n),h(v),n(f,v))}return{startState:function(){var f=S.inMathMode?function(v,g){return u(v,g)}:n;return{cmdState:[],f}},copyState:function(f){return{cmdState:f.cmdState.slice(),f:f.f}},token:function(f,v){return v.f(f,v)},blankLine:function(f){f.f=n,f.cmdState.length=0},lineComment:"%"}}),D.defineMIME("text/x-stex","stex"),D.defineMIME("text/x-latex","stex")})},"19Vz":function(N,J,M){(function(D){D(M("VrN/"))})(function(D){D.defineOption("placeholder","",function(d,o,a){var n=a&&a!=D.Init;if(o&&!n)d.on("blur",c),d.on("change",h),d.on("swapDoc",h),D.on(d.getInputField(),"compositionupdate",d.state.placeholderCompose=function(){P(d)}),h(d);else if(!o&&n){d.off("blur",c),d.off("change",h),d.off("swapDoc",h),D.off(d.getInputField(),"compositionupdate",d.state.placeholderCompose),m(d);var u=d.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}o&&!d.hasFocus()&&c(d)});function m(d){d.state.placeholder&&(d.state.placeholder.parentNode.removeChild(d.state.placeholder),d.state.placeholder=null)}function S(d){m(d);var o=d.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=d.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var a=d.getOption("placeholder");typeof a=="string"&&(a=document.createTextNode(a)),o.appendChild(a),d.display.lineSpace.insertBefore(o,d.display.lineSpace.firstChild)}function P(d){setTimeout(function(){var o=!1,a=d.getInputField();a.nodeName=="TEXTAREA"?o=!a.value:d.lineCount()==1&&(o=!/[^\u200b]/.test(a.querySelector(".CodeMirror-line").textContent)),o?S(d):m(d)},20)}function c(d){w(d)&&S(d)}function h(d){var o=d.getWrapperElement(),a=w(d);o.className=o.className.replace(" CodeMirror-empty","")+(a?" CodeMirror-empty":""),a?S(d):m(d)}function w(d){return d.lineCount()===1&&d.getLine(0)===""}})},"1ZF9":function(N,J,M){N.exports=M.p+"static/Authorize.cc9c212f.png"},"1eCo":function(N,J,M){(function(D){D(M("VrN/"))})(function(D){"use strict";var m={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},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};D.defineMode("xml",function(P,c){var h=P.indentUnit,w={},d=c.htmlMode?m:S;for(var o in d)w[o]=d[o];for(var o in c)w[o]=c[o];var a,n;function u(C,I){function j(W){return I.tokenize=W,W(C,I)}var L=C.next();if(L=="<")return C.eat("!")?C.eat("[")?C.match("CDATA[")?j(v("atom","]]>")):null:C.match("--")?j(v("comment","-->")):C.match("DOCTYPE",!0,!0)?(C.eatWhile(/[\w\._\-]/),j(g(1))):null:C.eat("?")?(C.eatWhile(/[\w\._\-]/),I.tokenize=v("meta","?>"),"meta"):(a=C.eat("/")?"closeTag":"openTag",I.tokenize=p,"tag bracket");if(L=="&"){var H;return C.eat("#")?C.eat("x")?H=C.eatWhile(/[a-fA-F\d]/)&&C.eat(";"):H=C.eatWhile(/[\d]/)&&C.eat(";"):H=C.eatWhile(/[\w\.\-:]/)&&C.eat(";"),H?"atom":"error"}else return C.eatWhile(/[^&<]/),null}u.isInText=!0;function p(C,I){var j=C.next();if(j==">"||j=="/"&&C.eat(">"))return I.tokenize=u,a=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return a="equals",null;if(j=="<"){I.tokenize=u,I.state=t,I.tagName=I.tagStart=null;var L=I.tokenize(C,I);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(j)?(I.tokenize=f(j),I.stringStartCol=C.column(),I.tokenize(C,I)):(C.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(C){var I=function(j,L){for(;!j.eol();)if(j.next()==C){L.tokenize=p;break}return"string"};return I.isInAttribute=!0,I}function v(C,I){return function(j,L){for(;!j.eol();){if(j.match(I)){L.tokenize=u;break}j.next()}return C}}function g(C){return function(I,j){for(var L;(L=I.next())!=null;){if(L=="<")return j.tokenize=g(C+1),j.tokenize(I,j);if(L==">")if(C==1){j.tokenize=u;break}else return j.tokenize=g(C-1),j.tokenize(I,j)}return"meta"}}function b(C,I,j){this.prev=C.context,this.tagName=I,this.indent=C.indented,this.startOfLine=j,(w.doNotIndent.hasOwnProperty(I)||C.context&&C.context.noIndent)&&(this.noIndent=!0)}function i(C){C.context&&(C.context=C.context.prev)}function s(C,I){for(var j;;){if(!C.context)return;if(j=C.context.tagName,!w.contextGrabbers.hasOwnProperty(j)||!w.contextGrabbers[j].hasOwnProperty(I))return;i(C)}}function t(C,I,j){return C=="openTag"?(j.tagStart=I.column(),T):C=="closeTag"?_:t}function T(C,I,j){return C=="word"?(j.tagName=I.current(),n="tag",O):w.allowMissingTagName&&C=="endTag"?(n="tag bracket",O(C,I,j)):(n="error",T)}function _(C,I,j){if(C=="word"){var L=I.current();return j.context&&j.context.tagName!=L&&w.implicitlyClosed.hasOwnProperty(j.context.tagName)&&i(j),j.context&&j.context.tagName==L||w.matchClosing===!1?(n="tag",l):(n="tag error",k)}else return w.allowMissingTagName&&C=="endTag"?(n="tag bracket",l(C,I,j)):(n="error",k)}function l(C,I,j){return C!="endTag"?(n="error",l):(i(j),t)}function k(C,I,j){return n="error",l(C,I,j)}function O(C,I,j){if(C=="word")return n="attribute",x;if(C=="endTag"||C=="selfcloseTag"){var L=j.tagName,H=j.tagStart;return j.tagName=j.tagStart=null,C=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(L)?s(j,L):(s(j,L),j.context=new b(j,L,H==j.indented)),t}return n="error",O}function x(C,I,j){return C=="equals"?y:(w.allowMissing||(n="error"),O(C,I,j))}function y(C,I,j){return C=="string"?E:C=="word"&&w.allowUnquoted?(n="string",O):(n="error",O(C,I,j))}function E(C,I,j){return C=="string"?E:O(C,I,j)}return{startState:function(C){var I={tokenize:u,state:t,indented:C||0,tagName:null,tagStart:null,context:null};return C!=null&&(I.baseIndent=C),I},token:function(C,I){if(!I.tagName&&C.sol()&&(I.indented=C.indentation()),C.eatSpace())return null;a=null;var j=I.tokenize(C,I);return(j||a)&&j!="comment"&&(n=null,I.state=I.state(a||j,C,I),n&&(j=n=="error"?j+" error":n)),j},indent:function(C,I,j){var L=C.context;if(C.tokenize.isInAttribute)return C.tagStart==C.indented?C.stringStartCol+1:C.indented+h;if(L&&L.noIndent)return D.Pass;if(C.tokenize!=p&&C.tokenize!=u)return j?j.match(/^(\s*)/)[0].length:0;if(C.tagName)return w.multilineTagIndentPastTag!==!1?C.tagStart+C.tagName.length+2:C.tagStart+h*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(I))return 0;var H=I&&/^<(\/)?([\w_:\.-]*)/.exec(I);if(H&&H[1])for(;L;)if(L.tagName==H[2]){L=L.prev;break}else if(w.implicitlyClosed.hasOwnProperty(L.tagName))L=L.prev;else break;else if(H)for(;L;){var W=w.contextGrabbers[L.tagName];if(W&&W.hasOwnProperty(H[2]))L=L.prev;else break}for(;L&&L.prev&&!L.startOfLine;)L=L.prev;return L?L.indent+h:C.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(C){C.state==y&&(C.state=O)},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(C){for(var I=[],j=C.context;j;j=j.prev)j.tagName&&I.push(j.tagName);return I.reverse()}}}),D.defineMIME("text/xml","xml"),D.defineMIME("application/xml","xml"),D.mimeModes.hasOwnProperty("text/html")||D.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("MlIO"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.Hasher,c=m.x64,h=c.Word,w=c.WordArray,d=m.algo;function o(){return h.create.apply(h,arguments)}var a=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],n=[];(function(){for(var p=0;p<80;p++)n[p]=o()})();var u=d.SHA512=P.extend({_doReset:function(){this._hash=new w.init([new h.init(1779033703,4089235720),new h.init(3144134277,2227873595),new h.init(1013904242,4271175723),new h.init(2773480762,1595750129),new h.init(1359893119,2917565137),new h.init(2600822924,725511199),new h.init(528734635,4215389547),new h.init(1541459225,327033209)])},_doProcessBlock:function(p,f){for(var v=this._hash.words,g=v[0],b=v[1],i=v[2],s=v[3],t=v[4],T=v[5],_=v[6],l=v[7],k=g.high,O=g.low,x=b.high,y=b.low,E=i.high,C=i.low,I=s.high,j=s.low,L=t.high,H=t.low,W=T.high,U=T.low,G=_.high,B=_.low,z=l.high,V=l.low,ie=k,ce=O,he=x,Ae=y,De=E,pe=C,Te=I,ye=j,ue=L,le=H,te=W,fe=U,q=G,ee=B,Ce=z,re=V,Q=0;Q<80;Q++){var X,Z,xe=n[Q];if(Q<16)Z=xe.high=p[f+Q*2]|0,X=xe.low=p[f+Q*2+1]|0;else{var ve=n[Q-15],Oe=ve.high,Qe=ve.low,rt=(Oe>>>1|Qe<<31)^(Oe>>>8|Qe<<24)^Oe>>>7,nt=(Qe>>>1|Oe<<31)^(Qe>>>8|Oe<<24)^(Qe>>>7|Oe<<25),ct=n[Q-2],dt=ct.high,pt=ct.low,He=(dt>>>19|pt<<13)^(dt<<3|pt>>>29)^dt>>>6,Pe=(pt>>>19|dt<<13)^(pt<<3|dt>>>29)^(pt>>>6|dt<<26),at=n[Q-7],ft=at.high,Je=at.low,st=n[Q-16],Ue=st.high,Me=st.low;X=nt+Je,Z=rt+ft+(X>>>0<nt>>>0?1:0),X=X+Pe,Z=Z+He+(X>>>0<Pe>>>0?1:0),X=X+Me,Z=Z+Ue+(X>>>0<Me>>>0?1:0),xe.high=Z,xe.low=X}var Ne=ue&te^~ue&q,Ee=le&fe^~le&ee,Se=ie&he^ie&De^he&De,Re=ce&Ae^ce&pe^Ae&pe,Le=(ie>>>28|ce<<4)^(ie<<30|ce>>>2)^(ie<<25|ce>>>7),Ye=(ce>>>28|ie<<4)^(ce<<30|ie>>>2)^(ce<<25|ie>>>7),tt=(ue>>>14|le<<18)^(ue>>>18|le<<14)^(ue<<23|le>>>9),Ct=(le>>>14|ue<<18)^(le>>>18|ue<<14)^(le<<23|ue>>>9),At=a[Q],rr=At.high,gt=At.low,or=re+Ct,Zt=Ce+tt+(or>>>0<re>>>0?1:0),or=or+Ee,Zt=Zt+Ne+(or>>>0<Ee>>>0?1:0),or=or+gt,Zt=Zt+rr+(or>>>0<gt>>>0?1:0),or=or+X,Zt=Zt+Z+(or>>>0<X>>>0?1:0),Et=Ye+Re,jr=Le+Se+(Et>>>0<Ye>>>0?1:0);Ce=q,re=ee,q=te,ee=fe,te=ue,fe=le,le=ye+or|0,ue=Te+Zt+(le>>>0<ye>>>0?1:0)|0,Te=De,ye=pe,De=he,pe=Ae,he=ie,Ae=ce,ce=or+Et|0,ie=Zt+jr+(ce>>>0<or>>>0?1:0)|0}O=g.low=O+ce,g.high=k+ie+(O>>>0<ce>>>0?1:0),y=b.low=y+Ae,b.high=x+he+(y>>>0<Ae>>>0?1:0),C=i.low=C+pe,i.high=E+De+(C>>>0<pe>>>0?1:0),j=s.low=j+ye,s.high=I+Te+(j>>>0<ye>>>0?1:0),H=t.low=H+le,t.high=L+ue+(H>>>0<le>>>0?1:0),U=T.low=U+fe,T.high=W+te+(U>>>0<fe>>>0?1:0),B=_.low=B+ee,_.high=G+q+(B>>>0<ee>>>0?1:0),V=l.low=V+re,l.high=z+Ce+(V>>>0<re>>>0?1:0)},_doFinalize:function(){var p=this._data,f=p.words,v=this._nDataBytes*8,g=p.sigBytes*8;f[g>>>5]|=128<<24-g%32,f[(g+128>>>10<<5)+30]=Math.floor(v/4294967296),f[(g+128>>>10<<5)+31]=v,p.sigBytes=f.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var p=P.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});m.SHA512=P._createHelper(u),m.HmacSHA512=P._createHmacHelper(u)}(),D.SHA512})},"3y9D":function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,c=S.Hasher,h=m.algo,w=[],d=h.SHA1=c.extend({_doReset:function(){this._hash=new P.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,a){for(var n=this._hash.words,u=n[0],p=n[1],f=n[2],v=n[3],g=n[4],b=0;b<80;b++){if(b<16)w[b]=o[a+b]|0;else{var i=w[b-3]^w[b-8]^w[b-14]^w[b-16];w[b]=i<<1|i>>>31}var s=(u<<5|u>>>27)+g+w[b];b<20?s+=(p&f|~p&v)+1518500249:b<40?s+=(p^f^v)+1859775393:b<60?s+=(p&f|p&v|f&v)-1894007588:s+=(p^f^v)-899497514,g=v,v=f,f=p<<30|p>>>2,p=u,u=s}n[0]=n[0]+u|0,n[1]=n[1]+p|0,n[2]=n[2]+f|0,n[3]=n[3]+v|0,n[4]=n[4]+g|0},_doFinalize:function(){var o=this._data,a=o.words,n=this._nDataBytes*8,u=o.sigBytes*8;return a[u>>>5]|=128<<24-u%32,a[(u+64>>>9<<4)+14]=Math.floor(n/4294967296),a[(u+64>>>9<<4)+15]=n,o.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var o=c.clone.call(this);return o._hash=this._hash.clone(),o}});m.SHA1=c._createHelper(d),m.HmacSHA1=c._createHmacHelper(d)}(),D.SHA1})},4:function(N,J){},"55Ip":function(N,J,M){"use strict";M.d(J,"a",function(){return s}),M.d(J,"b",function(){return O});var D=M("Ty5D"),m=M("dI71"),S=M("q1tI"),P=M.n(S),c=M("YS25"),h=M("17x9"),w=M.n(h),d=M("wx14"),o=M("zLVn"),a=M("9R94"),n=function(y){Object(m.a)(E,y);function E(){for(var I,j=arguments.length,L=new Array(j),H=0;H<j;H++)L[H]=arguments[H];return I=y.call.apply(y,[this].concat(L))||this,I.history=Object(c.a)(I.props),I}var C=E.prototype;return C.render=function(){return P.a.createElement(D.c,{history:this.history,children:this.props.children})},E}(P.a.Component),u=function(y){Object(m.a)(E,y);function E(){for(var I,j=arguments.length,L=new Array(j),H=0;H<j;H++)L[H]=arguments[H];return I=y.call.apply(y,[this].concat(L))||this,I.history=Object(c.b)(I.props),I}var C=E.prototype;return C.render=function(){return P.a.createElement(D.c,{history:this.history,children:this.props.children})},E}(P.a.Component),p=function(E,C){return typeof E=="function"?E(C):E},f=function(E,C){return typeof E=="string"?Object(c.c)(E,null,null,C):E},v=function(E){return E},g=P.a.forwardRef;typeof g=="undefined"&&(g=v);function b(y){return!!(y.metaKey||y.altKey||y.ctrlKey||y.shiftKey)}var i=g(function(y,E){var C=y.innerRef,I=y.navigate,j=y.onClick,L=Object(o.a)(y,["innerRef","navigate","onClick"]),H=L.target,W=Object(d.a)({},L,{onClick:function(G){try{j&&j(G)}catch(B){throw G.preventDefault(),B}!G.defaultPrevented&&G.button===0&&(!H||H==="_self")&&!b(G)&&(G.preventDefault(),I())}});return v!==g?W.ref=E||C:W.ref=C,P.a.createElement("a",W)}),s=g(function(y,E){var C=y.component,I=C===void 0?i:C,j=y.replace,L=y.to,H=y.innerRef,W=Object(o.a)(y,["component","replace","to","innerRef"]);return P.a.createElement(D.e.Consumer,null,function(U){U||Object(a.a)(!1);var G=U.history,B=f(p(L,U.location),U.location),z=B?G.createHref(B):"",V=Object(d.a)({},W,{href:z,navigate:function(){var ce=p(L,U.location),he=j?G.replace:G.push;he(ce)}});return v!==g?V.ref=E||H:V.innerRef=H,P.a.createElement(I,V)})});if(!1)var t,T;var _=function(E){return E},l=P.a.forwardRef;typeof l=="undefined"&&(l=_);function k(){for(var y=arguments.length,E=new Array(y),C=0;C<y;C++)E[C]=arguments[C];return E.filter(function(I){return I}).join(" ")}var O=l(function(y,E){var C=y["aria-current"],I=C===void 0?"page":C,j=y.activeClassName,L=j===void 0?"active":j,H=y.activeStyle,W=y.className,U=y.exact,G=y.isActive,B=y.location,z=y.sensitive,V=y.strict,ie=y.style,ce=y.to,he=y.innerRef,Ae=Object(o.a)(y,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return P.a.createElement(D.e.Consumer,null,function(De){De||Object(a.a)(!1);var pe=B||De.location,Te=f(p(ce,pe),pe),ye=Te.pathname,ue=ye&&ye.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),le=ue?Object(D.f)(pe.pathname,{path:ue,exact:U,sensitive:z,strict:V}):null,te=!!(G?G(le,pe):le),fe=te?k(W,L):W,q=te?Object(d.a)({},ie,{},H):ie,ee=Object(d.a)({"aria-current":te&&I||null,className:fe,style:q,to:Te},Ae);return _!==l?ee.ref=E||he:ee.innerRef=he,P.a.createElement(s,ee)})});if(!1)var x},"5hvy":function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("MlIO"))})(this,function(D){return function(m){var S=D,P=S.lib,c=P.WordArray,h=P.Hasher,w=S.x64,d=w.Word,o=S.algo,a=[],n=[],u=[];(function(){for(var v=1,g=0,b=0;b<24;b++){a[v+5*g]=(b+1)*(b+2)/2%64;var i=g%5,s=(2*v+3*g)%5;v=i,g=s}for(var v=0;v<5;v++)for(var g=0;g<5;g++)n[v+5*g]=g+(2*v+3*g)%5*5;for(var t=1,T=0;T<24;T++){for(var _=0,l=0,k=0;k<7;k++){if(t&1){var O=(1<<k)-1;O<32?l^=1<<O:_^=1<<O-32}t&128?t=t<<1^113:t<<=1}u[T]=d.create(_,l)}})();var p=[];(function(){for(var v=0;v<25;v++)p[v]=d.create()})();var f=o.SHA3=h.extend({cfg:h.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],g=0;g<25;g++)v[g]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,g){for(var b=this._state,i=this.blockSize/2,s=0;s<i;s++){var t=v[g+2*s],T=v[g+2*s+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var _=b[s];_.high^=T,_.low^=t}for(var l=0;l<24;l++){for(var k=0;k<5;k++){for(var O=0,x=0,y=0;y<5;y++){var _=b[k+5*y];O^=_.high,x^=_.low}var E=p[k];E.high=O,E.low=x}for(var k=0;k<5;k++)for(var C=p[(k+4)%5],I=p[(k+1)%5],j=I.high,L=I.low,O=C.high^(j<<1|L>>>31),x=C.low^(L<<1|j>>>31),y=0;y<5;y++){var _=b[k+5*y];_.high^=O,_.low^=x}for(var H=1;H<25;H++){var O,x,_=b[H],W=_.high,U=_.low,G=a[H];G<32?(O=W<<G|U>>>32-G,x=U<<G|W>>>32-G):(O=U<<G-32|W>>>64-G,x=W<<G-32|U>>>64-G);var B=p[n[H]];B.high=O,B.low=x}var z=p[0],V=b[0];z.high=V.high,z.low=V.low;for(var k=0;k<5;k++)for(var y=0;y<5;y++){var H=k+5*y,_=b[H],ie=p[H],ce=p[(k+1)%5+5*y],he=p[(k+2)%5+5*y];_.high=ie.high^~ce.high&he.high,_.low=ie.low^~ce.low&he.low}var _=b[0],Ae=u[l];_.high^=Ae.high,_.low^=Ae.low}},_doFinalize:function(){var v=this._data,g=v.words,b=this._nDataBytes*8,i=v.sigBytes*8,s=this.blockSize*32;g[i>>>5]|=1<<24-i%32,g[(m.ceil((i+1)/s)*s>>>5)-1]|=128,v.sigBytes=g.length*4,this._process();for(var t=this._state,T=this.cfg.outputLength/8,_=T/8,l=[],k=0;k<_;k++){var O=t[k],x=O.high,y=O.low;x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,l.push(y),l.push(x)}return new c.init(l,T)},clone:function(){for(var v=h.clone.call(this),g=v._state=this._state.slice(0),b=0;b<25;b++)g[b]=g[b].clone();return v}});S.SHA3=h._createHelper(f),S.HmacSHA3=h._createHmacHelper(f)}(Math),D.SHA3})},"6+eU":function(N,J,M){"use strict";M.d(J,"a",function(){return l});var D=M("wx14"),m=M("rePB"),S=M("VTBJ"),P=M("1OyB"),c=M("vuIU"),h=M("Ji7U"),w=M("LK+K"),d=M("q1tI"),o=M.n(d),a=M("TSYQ"),n=M.n(a),u=function(O){var x,y="".concat(O.rootPrefixCls,"-item"),E=n()(y,"".concat(y,"-").concat(O.page),(x={},Object(m.a)(x,"".concat(y,"-active"),O.active),Object(m.a)(x,O.className,!!O.className),Object(m.a)(x,"".concat(y,"-disabled"),!O.page),x)),C=function(){O.onClick(O.page)},I=function(L){O.onKeyPress(L,O.onClick,O.page)};return o.a.createElement("li",{title:O.showTitle?O.page:null,className:E,onClick:C,onKeyPress:I,tabIndex:"0"},O.itemRender(O.page,"page",o.a.createElement("a",{rel:"nofollow"},O.page)))},p=u,f={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},v=function(k){Object(h.a)(x,k);var O=Object(w.a)(x);function x(){var y;Object(P.a)(this,x);for(var E=arguments.length,C=new Array(E),I=0;I<E;I++)C[I]=arguments[I];return y=O.call.apply(O,[this].concat(C)),y.state={goInputText:""},y.buildOptionText=function(j){return"".concat(j," ").concat(y.props.locale.items_per_page)},y.changeSize=function(j){y.props.changeSize(Number(j))},y.handleChange=function(j){y.setState({goInputText:j.target.value})},y.handleBlur=function(j){var L=y.props,H=L.goButton,W=L.quickGo,U=L.rootPrefixCls,G=y.state.goInputText;if(H||G==="")return;if(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(U,"-prev"))>=0||j.relatedTarget.className.indexOf("".concat(U,"-next"))>=0))return;y.setState({goInputText:""}),W(y.getValidValue())},y.go=function(j){var L=y.state.goInputText;if(L==="")return;(j.keyCode===f.ENTER||j.type==="click")&&(y.setState({goInputText:""}),y.props.quickGo(y.getValidValue()))},y}return Object(c.a)(x,[{key:"getValidValue",value:function(){var E=this.state,C=E.goInputText,I=E.current;return!C||isNaN(C)?I:Number(C)}},{key:"getPageSizeOptions",value:function(){var E=this.props,C=E.pageSize,I=E.pageSizeOptions;return I.some(function(j){return j.toString()===C.toString()})?I:I.concat([C.toString()]).sort(function(j,L){var H=isNaN(Number(j))?0:Number(j),W=isNaN(Number(L))?0:Number(L);return H-W})}},{key:"render",value:function(){var E=this,C=this.props,I=C.pageSize,j=C.locale,L=C.rootPrefixCls,H=C.changeSize,W=C.quickGo,U=C.goButton,G=C.selectComponentClass,B=C.buildOptionText,z=C.selectPrefixCls,V=C.disabled,ie=this.state.goInputText,ce="".concat(L,"-options"),he=G,Ae=null,De=null,pe=null;if(!H&&!W)return null;var Te=this.getPageSizeOptions();if(H&&he){var ye=Te.map(function(ue,le){return o.a.createElement(he.Option,{key:le,value:ue.toString()},(B||E.buildOptionText)(ue))});Ae=o.a.createElement(he,{disabled:V,prefixCls:z,showSearch:!1,className:"".concat(ce,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(I||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},ye)}return W&&(U&&(pe=typeof U=="boolean"?o.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(ce,"-quick-jumper-button")},j.jump_to_confirm):o.a.createElement("span",{onClick:this.go,onKeyUp:this.go},U)),De=o.a.createElement("div",{className:"".concat(ce,"-quick-jumper")},j.jump_to,o.a.createElement("input",{disabled:V,type:"text",value:ie,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,pe)),o.a.createElement("li",{className:"".concat(ce)},Ae,De)}}]),x}(o.a.Component);v.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=v,b=M("N2Kk");function i(){}function s(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function t(k,O,x){return x}function T(k,O,x){var y=typeof k=="undefined"?O.pageSize:k;return Math.floor((x.total-1)/y)+1}var _=function(k){Object(h.a)(x,k);var O=Object(w.a)(x);function x(y){var E;Object(P.a)(this,x),E=O.call(this,y),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(T(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(H,W){var U=E.props.prefixCls,G=H||o.a.createElement("button",{type:"button","aria-label":W,className:"".concat(U,"-item-link")});return typeof H=="function"&&(G=o.a.createElement(H,Object(S.a)({},E.props))),G},E.savePaginationNode=function(H){E.paginationNode=H},E.isValid=function(H){return s(H)&&H!==E.state.current},E.shouldDisplayQuickJumper=function(){var H=E.props,W=H.showQuickJumper,U=H.pageSize,G=H.total;return G<=U?!1:W},E.handleKeyDown=function(H){(H.keyCode===f.ARROW_UP||H.keyCode===f.ARROW_DOWN)&&H.preventDefault()},E.handleKeyUp=function(H){var W=E.getValidValue(H),U=E.state.currentInputValue;W!==U&&E.setState({currentInputValue:W}),H.keyCode===f.ENTER?E.handleChange(W):H.keyCode===f.ARROW_UP?E.handleChange(W-1):H.keyCode===f.ARROW_DOWN&&E.handleChange(W+1)},E.changePageSize=function(H){var W=E.state.current,U=T(H,E.state,E.props);W=W>U?U:W,U===0&&(W=E.state.current),typeof H=="number"&&("pageSize"in E.props||E.setState({pageSize:H}),"current"in E.props||E.setState({current:W,currentInputValue:W})),E.props.onShowSizeChange(W,H),"onChange"in E.props&&E.props.onChange&&E.props.onChange(W,H)},E.handleChange=function(H){var W=E.props.disabled,U=H;if(E.isValid(U)&&!W){var G=T(void 0,E.state,E.props);U>G?U=G:U<1&&(U=1),"current"in E.props||E.setState({current:U,currentInputValue:U});var B=E.state.pageSize;return E.props.onChange(U,B),U}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<T(void 0,E.state,E.props)},E.runIfEnter=function(H,W){if(H.key==="Enter"||H.charCode===13){for(var U=arguments.length,G=new Array(U>2?U-2:0),B=2;B<U;B++)G[B-2]=arguments[B];W.apply(void 0,G)}},E.runIfEnterPrev=function(H){E.runIfEnter(H,E.prev)},E.runIfEnterNext=function(H){E.runIfEnter(H,E.next)},E.runIfEnterJumpPrev=function(H){E.runIfEnter(H,E.jumpPrev)},E.runIfEnterJumpNext=function(H){E.runIfEnter(H,E.jumpNext)},E.handleGoTO=function(H){(H.keyCode===f.ENTER||H.type==="click")&&E.handleChange(E.state.currentInputValue)};var C=y.onChange!==i,I="current"in y;I&&!C&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var j=y.defaultCurrent;"current"in y&&(j=y.current);var L=y.defaultPageSize;return"pageSize"in y&&(L=y.pageSize),j=Math.min(j,T(L,void 0,y)),E.state={current:j,currentInputValue:j,pageSize:L},E}return Object(c.a)(x,[{key:"componentDidUpdate",value:function(E,C){var I=this.props.prefixCls;if(C.current!==this.state.current&&this.paginationNode){var j=this.paginationNode.querySelector(".".concat(I,"-item-").concat(C.current));j&&document.activeElement===j&&j.blur()}}},{key:"getValidValue",value:function(E){var C=E.target.value,I=T(void 0,this.state,this.props),j=this.state.currentInputValue,L;return C===""?L=C:isNaN(Number(C))?L=j:C>=I?L=I:L=Number(C),L}},{key:"getShowSizeChanger",value:function(){var E=this.props,C=E.showSizeChanger,I=E.total,j=E.totalBoundaryShowSizeChanger;return typeof C!="undefined"?C:I>j}},{key:"renderPrev",value:function(E){var C=this.props,I=C.prevIcon,j=C.itemRender,L=j(E,"prev",this.getItemIcon(I,"prev page")),H=!this.hasPrev();return Object(d.isValidElement)(L)?Object(d.cloneElement)(L,{disabled:H}):L}},{key:"renderNext",value:function(E){var C=this.props,I=C.nextIcon,j=C.itemRender,L=j(E,"next",this.getItemIcon(I,"next page")),H=!this.hasNext();return Object(d.isValidElement)(L)?Object(d.cloneElement)(L,{disabled:H}):L}},{key:"render",value:function(){var E=this,C=this.props,I=C.prefixCls,j=C.className,L=C.style,H=C.disabled,W=C.hideOnSinglePage,U=C.total,G=C.locale,B=C.showQuickJumper,z=C.showLessItems,V=C.showTitle,ie=C.showTotal,ce=C.simple,he=C.itemRender,Ae=C.showPrevNextJumpers,De=C.jumpPrevIcon,pe=C.jumpNextIcon,Te=C.selectComponentClass,ye=C.selectPrefixCls,ue=C.pageSizeOptions,le=this.state,te=le.current,fe=le.pageSize,q=le.currentInputValue;if(W===!0&&U<=fe)return null;var ee=T(void 0,this.state,this.props),Ce=[],re=null,Q=null,X=null,Z=null,xe=null,ve=B&&B.goButton,Oe=z?1:2,Qe=te-1>0?te-1:0,rt=te+1<ee?te+1:ee,nt=Object.keys(this.props).reduce(function(Ee,Se){return(Se.substr(0,5)==="data-"||Se.substr(0,5)==="aria-"||Se==="role")&&(Ee[Se]=E.props[Se]),Ee},{});if(ce)return ve&&(typeof ve=="boolean"?xe=o.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},G.jump_to_confirm):xe=o.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ve),xe=o.a.createElement("li",{title:V?"".concat(G.jump_to).concat(te,"/").concat(ee):null,className:"".concat(I,"-simple-pager")},xe)),o.a.createElement("ul",Object(D.a)({className:n()(I,"".concat(I,"-simple"),Object(m.a)({},"".concat(I,"-disabled"),H),j),style:L,ref:this.savePaginationNode},nt),o.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(I,"-prev"),Object(m.a)({},"".concat(I,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Qe)),o.a.createElement("li",{title:V?"".concat(te,"/").concat(ee):null,className:"".concat(I,"-simple-pager")},o.a.createElement("input",{type:"text",value:q,disabled:H,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),o.a.createElement("span",{className:"".concat(I,"-slash")},"/"),ee),o.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(I,"-next"),Object(m.a)({},"".concat(I,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(rt)),xe);if(ee<=3+Oe*2){var ct={locale:G,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:V,itemRender:he};ee||Ce.push(o.a.createElement(p,Object(D.a)({},ct,{key:"noPager",page:ee,className:"".concat(I,"-disabled")})));for(var dt=1;dt<=ee;dt+=1){var pt=te===dt;Ce.push(o.a.createElement(p,Object(D.a)({},ct,{key:dt,page:dt,active:pt})))}}else{var He=z?G.prev_3:G.prev_5,Pe=z?G.next_3:G.next_5;Ae&&(re=o.a.createElement("li",{title:V?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(I,"-jump-prev"),Object(m.a)({},"".concat(I,"-jump-prev-custom-icon"),!!De))},he(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(De,"prev page"))),Q=o.a.createElement("li",{title:V?Pe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(I,"-jump-next"),Object(m.a)({},"".concat(I,"-jump-next-custom-icon"),!!pe))},he(this.getJumpNextPage(),"jump-next",this.getItemIcon(pe,"next page")))),Z=o.a.createElement(p,{locale:G,last:!0,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ee,page:ee,active:!1,showTitle:V,itemRender:he}),X=o.a.createElement(p,{locale:G,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:V,itemRender:he});var at=Math.max(1,te-Oe),ft=Math.min(te+Oe,ee);te-1<=Oe&&(ft=1+Oe*2),ee-te<=Oe&&(at=ee-Oe*2);for(var Je=at;Je<=ft;Je+=1){var st=te===Je;Ce.push(o.a.createElement(p,{locale:G,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Je,page:Je,active:st,showTitle:V,itemRender:he}))}te-1>=Oe*2&&te!==1+2&&(Ce[0]=Object(d.cloneElement)(Ce[0],{className:"".concat(I,"-item-after-jump-prev")}),Ce.unshift(re)),ee-te>=Oe*2&&te!==ee-2&&(Ce[Ce.length-1]=Object(d.cloneElement)(Ce[Ce.length-1],{className:"".concat(I,"-item-before-jump-next")}),Ce.push(Q)),at!==1&&Ce.unshift(X),ft!==ee&&Ce.push(Z)}var Ue=null;ie&&(Ue=o.a.createElement("li",{className:"".concat(I,"-total-text")},ie(U,[U===0?0:(te-1)*fe+1,te*fe>U?U:te*fe])));var Me=!this.hasPrev()||!ee,Ne=!this.hasNext()||!ee;return o.a.createElement("ul",Object(D.a)({className:n()(I,j,Object(m.a)({},"".concat(I,"-disabled"),H)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,o.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(I,"-prev"),Object(m.a)({},"".concat(I,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(Qe)),Ce,o.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(I,"-next"),Object(m.a)({},"".concat(I,"-disabled"),Ne)),"aria-disabled":Ne},this.renderNext(rt)),o.a.createElement(g,{disabled:H,locale:G,rootPrefixCls:I,selectComponentClass:Te,selectPrefixCls:ye,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:fe,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ve}))}}],[{key:"getDerivedStateFromProps",value:function(E,C){var I={};if("current"in E&&(I.current=E.current,E.current!==C.current&&(I.currentInputValue=I.current)),"pageSize"in E&&E.pageSize!==C.pageSize){var j=C.current,L=T(E.pageSize,C,E);j=j>L?L:j,"current"in E||(I.current=j,I.currentInputValue=j),I.pageSize=E.pageSize}return I}}]),x}(o.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:b.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var l=_},"6RRn":function(N,J,M){"use strict";var D=M("wCXF"),m=M("n6Qo");M.d(J,"b",function(){return m.a});var S=M("IBYe"),P=M("6eGT"),c=M("hW8S");M.d(J,"a",function(){return c.a}),J.c=D.b},"6eGT":function(N,J,M){"use strict";function D(m){return null}J.a=D},"7Cbv":function(N,J,M){"use strict";var D=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),m=new Uint8Array(16);function S(){if(!D)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return D(m)}var P=/^(?:[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 c(p){return typeof p=="string"&&P.test(p)}for(var h=c,w=[],d=0;d<256;++d)w.push((d+256).toString(16).substr(1));function o(p){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,v=(w[p[f+0]]+w[p[f+1]]+w[p[f+2]]+w[p[f+3]]+"-"+w[p[f+4]]+w[p[f+5]]+"-"+w[p[f+6]]+w[p[f+7]]+"-"+w[p[f+8]]+w[p[f+9]]+"-"+w[p[f+10]]+w[p[f+11]]+w[p[f+12]]+w[p[f+13]]+w[p[f+14]]+w[p[f+15]]).toLowerCase();if(!h(v))throw TypeError("Stringified UUID is invalid");return v}var a=o;function n(p,f,v){p=p||{};var g=p.random||(p.rng||S)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,f){v=v||0;for(var b=0;b<16;++b)f[v+b]=g[b];return f}return a(g)}var u=J.a=n},"7ahc":function(N,J,M){"use strict";M.d(J,"a",function(){return T});var D=M("k1fw"),m=M("0Owb"),S=M("+L6B"),P=M("2/Rp"),c=M("y8nQ"),h=M("Vl3Y"),w=M("tJVT"),d=M("OaEy"),o=M("2fM7"),a=M("q1tI"),n=M.n(a),u=M("VrN/"),p=M.n(u),f=M("p77/"),v=M.n(f),g=M("c5Ni"),b=M.n(g),i=o.a.Option,s={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"]};J.b=function(_){var l=_.callback,k=_.onCancel,O=Object(a.useState)("python"),x=Object(w.a)(O,2),y=x[0],E=x[1];function C(j){E(t[j][1])}function I(j){l(j)}return n.a.createElement(h.a,Object(m.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:I}),n.a.createElement(h.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(o.a,{onChange:C},Object.keys(t).map(function(j){return n.a.createElement(i,{key:j,value:j},t[j][0])}))),n.a.createElement(h.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(T,{mode:y})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(P.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function T(_){var l=_.value,k=_.onChange,O=_.mode,x=_.options,y=x===void 0?{}:x,E=Object(a.useRef)(),C=Object(a.useState)(),I=Object(w.a)(C,2),j=I[0],L=I[1];return Object(a.useEffect)(function(){if(j){function H(W){var U=W.getValue();k&&k(U)}return j.on("change",H),function(){j.off("change",H)}}},[j,k]),Object(a.useEffect)(function(){j&&j.setOption("mode",O)},[j,O]),Object(a.useEffect)(function(){j&&((l!==j.getValue()||l==="")&&setTimeout(function(){j.setValue(l||" ")},300))},[j,l]),Object(a.useEffect)(function(){if(E.current&&!j){var H=p.a.fromTextArea(E.current,Object(D.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},y));L(H)}},[E.current,j]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:E}))}},"815F":function(N,J,M){"use strict";M.d(J,"e",function(){return w}),M.d(J,"c",function(){return o}),M.d(J,"d",function(){return a}),M.d(J,"a",function(){return u}),M.d(J,"f",function(){return p}),M.d(J,"b",function(){return f});var D=M("KQm4"),m=M("VTBJ"),S=M("Ff2n"),P=M("Zm9Q"),c=M("Kwbf"),h=M("OZM5");function w(v,g){return v!=null?v:g}function d(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=new Map;function b(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var T=t.key,_=t.children;Object(c.a)(T!=null,"Tree node must have a certain key: [".concat(s).concat(T,"]"));var l=String(T);Object(c.a)(!g.has(l)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(l)),g.set(l,!0),b(_,"".concat(s).concat(l," > "))})}b(v)}function o(v){function g(b){var i=Object(P.a)(b);return i.map(function(s){if(!Object(h.i)(s))return Object(c.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var t=s.key,T=s.props,_=T.children,l=Object(S.a)(T,["children"]),k=Object(m.a)({key:t},l),O=g(_);return O.length&&(k.children=O),k}).filter(function(s){return s})}return g(v)}function a(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=new Set(g===!0?[]:g),i=[];function s(t){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(_,l){var k=Object(h.h)(T?T.pos:"0",l),O=w(_.key,k),x=Object(m.a)(Object(m.a)({},_),{},{parent:T,pos:k,children:null,data:_,isStart:[].concat(Object(D.a)(T?T.isStart:[]),[l===0]),isEnd:[].concat(Object(D.a)(T?T.isEnd:[]),[l===t.length-1])});return i.push(x),g===!0||b.has(O)?x.children=s(_.children||[],x):x.children=[],x})}return s(v),i}function n(v,g,b){var i;b?typeof b=="string"?i=function(T){return T[b]}:typeof b=="function"&&(i=function(T){return b(T)}):i=function(T,_){return w(T.key,_)};function s(t,T,_){var l=t?t.children:v,k=t?Object(h.h)(_.pos,T):"0";if(t){var O=i(t,k),x={node:t,index:T,pos:k,key:O,parentPos:_.node?_.pos:null,level:_.level+1};g(x)}l&&l.forEach(function(y,E){s(y,E,{node:t,pos:k,level:_?_.level+1:-1})})}s(null)}function u(v){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=g.initWrapper,i=g.processEntity,s=g.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,T={},_={},l={posEntities:T,keyEntities:_};return b&&(l=b(l)||l),n(v,function(k){var O=k.node,x=k.index,y=k.pos,E=k.key,C=k.parentPos,I=k.level,j={node:O,index:x,key:E,pos:y,level:I},L=w(E,y);T[y]=j,_[L]=j,j.parent=T[C],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),i&&i(j,l)},t),s&&s(l),l}function p(v,g){var b=g.expandedKeys,i=g.selectedKeys,s=g.loadedKeys,t=g.loadingKeys,T=g.checkedKeys,_=g.halfCheckedKeys,l=g.dragOverNodeKey,k=g.dropPosition,O=g.keyEntities,x=O[v],y={eventKey:v,expanded:b.indexOf(v)!==-1,selected:i.indexOf(v)!==-1,loaded:s.indexOf(v)!==-1,loading:t.indexOf(v)!==-1,checked:T.indexOf(v)!==-1,halfChecked:_.indexOf(v)!==-1,pos:String(x?x.pos:""),dragOver:l===v&&k===0,dragOverGapTop:l===v&&k===-1,dragOverGapBottom:l===v&&k===1};return y}function f(v){var g=v.data,b=v.expanded,i=v.selected,s=v.checked,t=v.loaded,T=v.loading,_=v.halfChecked,l=v.dragOver,k=v.dragOverGapTop,O=v.dragOverGapBottom,x=v.pos,y=v.active,E=Object(m.a)(Object(m.a)({},g),{},{expanded:b,selected:i,checked:s,loaded:t,loading:T,halfChecked:_,dragOver:l,dragOverGapTop:k,dragOverGapBottom:O,pos:x,active:y});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(c.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),v}}),E}},"8EBN":function(N,J,M){(function(D){D(M("VrN/"))})(function(D){"use strict";D.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 m=0;m<D.modeInfo.length;m++){var S=D.modeInfo[m];S.mimes&&(S.mime=S.mimes[0])}D.findModeByMIME=function(P){P=P.toLowerCase();for(var c=0;c<D.modeInfo.length;c++){var h=D.modeInfo[c];if(h.mime==P)return h;if(h.mimes){for(var w=0;w<h.mimes.length;w++)if(h.mimes[w]==P)return h}}if(/\+xml$/.test(P))return D.findModeByMIME("application/xml");if(/\+json$/.test(P))return D.findModeByMIME("application/json")},D.findModeByExtension=function(P){P=P.toLowerCase();for(var c=0;c<D.modeInfo.length;c++){var h=D.modeInfo[c];if(h.ext){for(var w=0;w<h.ext.length;w++)if(h.ext[w]==P)return h}}},D.findModeByFileName=function(P){for(var c=0;c<D.modeInfo.length;c++){var h=D.modeInfo[c];if(h.file&&h.file.test(P))return h}var w=P.lastIndexOf("."),d=w>-1&&P.substring(w+1,P.length);if(d)return D.findModeByExtension(d)},D.findModeByName=function(P){P=P.toLowerCase();for(var c=0;c<D.modeInfo.length;c++){var h=D.modeInfo[c];if(h.name.toLowerCase()==P)return h;if(h.alias){for(var w=0;w<h.alias.length;w++)if(h.alias[w].toLowerCase()==P)return h}}}})},"8hTe":function(N,J,M){N.exports={button:"button___1wy9m"}},"9Bee":function(N,J,M){"use strict";var D=M("DYRE"),m=M("zeV3"),S=M("+L6B"),P=M("2/Rp"),c=M("k1fw"),h=M("9og8"),w=M("tJVT"),d=M("WmNS"),o=M.n(d),a=M("q1tI"),n=M.n(a),u=M("vg9a"),p=M("DlQD"),f=M.n(p),v=M("rUJ1");function g(se,K){var $=se.match(/^(\s+)(?:```)/);if($===null)return K;var ne=$[1];return K.split(`
`).map(function(ge){var oe=ge.match(/^\s+/);if(oe===null)return ge;var Ke=Object(w.a)(oe,1),Ot=Ke[0];return Ot.length>=ne.length?ge.slice(ne.length):ge}).join(`
`)}var b=[],i=["<ul>"],s=new f.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function T(){b.length=0,i=["<ul>"]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function l(se,K,$,ne){if(K>=se.length||se[K].level<=$)return K;var ge=se[K];ne.push("<li><a href='#"+ge.anchor+"'>"+ge.text+"</a>"),K++;var oe=[];return K=l(se,K,ge.level,oe),oe.length>0&&(ne.push("<ul>"),oe.forEach(function(Ke){ne.push(Ke)}),ne.push("</ul>")),ne.push("</li>"),K=l(se,K,$,ne),K}function k(){return l(b,0,0,i),i.push("</ul>"),i.join("")}var O={heading:function(K){var $=t.exec(K);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(K){var $=this.rules.block.fences.exec(K);if($){var ne=$[0],ge=g(ne,$[3]||""),oe=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ke=E(),Ot=ge;ge=Ke,C[Ke]={type:"block",expression:Ot}}return{type:"code",raw:ne,lang:oe,text:ge}}}},x=/(?:\${2})([^\n`]+?)(?:\${2})/gi,y=0,E=function(){return"__special_katext_id_".concat(y++,"__")},C={};function I(){return C}function j(){y=0,C={}}function L(se){return se=se.replace(x,function(K,$){var ne=E();return C[ne]={type:"inline",expression:$},ne}),se}var H=s.listitem;s.listitem=function(se){return H(L(se))};var W=s.paragraph;s.paragraph=function(se){return W(L(se))};var U=s.tablecell;s.tablecell=function(se,K){return U(L(se),K)},s.code=function(se,K,$){var ne=(K||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"<p class='editormd-tex'>".concat(se,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(K,'">').concat($?se:Object(v.escape)(se,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+($?se:Object(v.escape)(se,!0))+"</code></pre>"},s.heading=function(se,K,$){var ne=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return b.push({anchor:ne,level:K,text:se}),"<h"+K+' id="'+ne+'">'+se+"</h"+K+">"},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:O,renderer:s});var G=f.a,B=M("SJMd"),z=M("ulZh"),V=M.n(z),ie=M("m3rI"),ce=M("Oy/b"),he=M("p5ED"),Ae=M("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 De=function(se,K){return(De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ge in ne)Object.prototype.hasOwnProperty.call(ne,ge)&&($[ge]=ne[ge])})(se,K)};function pe(se,K){function $(){this.constructor=se}De(se,K),se.prototype=K===null?Object.create(K):($.prototype=K.prototype,new $)}function Te(se,K,$,ne){return new($||($=Promise))(function(ge,oe){function Ke(_r){try{lt(ne.next(_r))}catch(Pt){oe(Pt)}}function Ot(_r){try{lt(ne.throw(_r))}catch(Pt){oe(Pt)}}function lt(_r){var Pt;_r.done?ge(_r.value):(Pt=_r.value,Pt instanceof $?Pt:new $(function(Ur){Ur(Pt)})).then(Ke,Ot)}lt((ne=ne.apply(se,K||[])).next())})}function ye(se,K){var $,ne,ge,oe,Ke={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return oe={next:Ot(0),throw:Ot(1),return:Ot(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Ot(lt){return function(_r){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ge=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ge=ne.return)&&ge.call(ne),0):ne.next)&&!(ge=ge.call(ne,Pt[1])).done)return ge;switch(ne=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++,ne=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(se,Ke)}catch(Ur){Pt=[6,Ur],ne=0}finally{$=ge=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([lt,_r])}}}function ue(){for(var se=0,K=0,$=arguments.length;K<$;K++)se+=arguments[K].length;var ne=Array(se),ge=0;for(K=0;K<$;K++)for(var oe=arguments[K],Ke=0,Ot=oe.length;Ke<Ot;Ke++,ge++)ne[ge]=oe[Ke];return ne}var le=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(K,$){for(var ne=0,ge=$;ne<ge.length;ne++){var oe=ge[ne],Ke=oe[0],Ot=oe[1];K.setAttribute(Ke,Ot)}},se.createRect=function(K,$,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","rect");return ge.setAttribute("width",K.toString()),ge.setAttribute("height",$.toString()),ne&&se.setAttributes(ge,ne),ge},se.createLine=function(K,$,ne,ge,oe){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",K.toString()),Ke.setAttribute("y1",$.toString()),Ke.setAttribute("x2",ne.toString()),Ke.setAttribute("y2",ge.toString()),oe&&se.setAttributes(Ke,oe),Ke},se.createPolygon=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ne.setAttribute("points",K),$&&se.setAttributes(ne,$),ne},se.createCircle=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return ne.setAttribute("cx",(K/2).toString()),ne.setAttribute("cy",(K/2).toString()),ne.setAttribute("r",K.toString()),$&&se.setAttributes(ne,$),ne},se.createEllipse=function(K,$,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ge.setAttribute("cx",(K/2).toString()),ge.setAttribute("cy",($/2).toString()),ge.setAttribute("rx",(K/2).toString()),ge.setAttribute("ry",($/2).toString()),ne&&se.setAttributes(ge,ne),ge},se.createGroup=function(K){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&se.setAttributes($,K),$},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(K,$,ne,ge,oe,Ke,Ot){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(lt,[["id",K],["orient",$],["markerWidth",ne.toString()],["markerHeight",ge.toString()],["refX",oe.toString()],["refY",Ke.toString()]]),lt.appendChild(Ot),lt},se.createText=function(K){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),K&&se.setAttributes($,K),$},se.createTSpan=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ne.textContent=K,$&&se.setAttributes(ne,$),ne},se.createImage=function(K){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&se.setAttributes($,K),$},se.createPoint=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ne.x=K,ne.y=$,ne},se.createPath=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","path");return ne.setAttribute("d",K),$&&se.setAttributes(ne,$),ne},se}(),te=function(){function se(){}return se.addKey=function(K){se.key=K},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),fe=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(K,$,ne){var ge=this;return new Promise(function(oe){var Ke=ne!==void 0?ne:document.createElement("canvas");K===null&&(ge.markersOnly=!0,ge.naturalSize=!1);var Ot=document.createElementNS("http://www.w3.org/2000/svg","svg");Ot.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ot.setAttribute("width",$.width.baseVal.valueAsString),Ot.setAttribute("height",$.height.baseVal.valueAsString),Ot.setAttribute("viewBox","0 0 "+$.viewBox.baseVal.width.toString()+" "+$.viewBox.baseVal.height.toString()),Ot.innerHTML=$.innerHTML,ge.naturalSize===!0?(Ot.width.baseVal.value=K.naturalWidth,Ot.height.baseVal.value=K.naturalHeight):ge.width!==void 0&&ge.height!==void 0&&(Ot.width.baseVal.value=ge.width,Ot.height.baseVal.value=ge.height),Ke.width=Ot.width.baseVal.value,Ke.height=Ot.height.baseVal.value;var lt=Ot.outerHTML,_r=Ke.getContext("2d");ge.markersOnly!==!0&&_r.drawImage(K,0,0,Ke.width,Ke.height);var Pt=window.URL,Ur=new Image(Ke.width,Ke.height);Ur.setAttribute("crossOrigin","anonymous");var Wr=new Blob([lt],{type:"image/svg+xml"}),cn=Pt.createObjectURL(Wr);Ur.onload=function(){_r.drawImage(Ur,0,0),Pt.revokeObjectURL(cn);var ri=Ke.toDataURL(ge.imageType,ge.imageQuality);oe(ri)},Ur.src=cn})},se}(),q=function(){},ee=function(){function se(K){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(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},se.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)},se.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 Ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new re("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new re("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Ce=function(se,K){this.selector=se,this.style=K},re=function(se,K){this.localName=se,this.style=K},Q=function(){function se(K,$,ne,ge,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=K,this.displayMode=$,this.markerItems=ne,this.uiStyleSettings=ge,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(K){var $=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 ne=document.createElement("div");ne.className=this.toolbarBlockStyleClass.name,ne.style.whiteSpace="nowrap",this.uiContainer.appendChild(ne),this.addActionButton(ne,'<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(ne,'<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(ne,'<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(ne,'<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(ne,'<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(ne,'<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(ne,'<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(ne,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Ke=document.createElement("div");Ke.className=""+$.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",oe.typeName),Ke.innerHTML=oe.icon,Ke.addEventListener("click",function(){$.markerToolbarButtonClicked(Ke,oe)}),$.buttons.push(Ke),$.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()},se.prototype.addButtonClickListener=function(K){this.buttonClickListeners.push(K)},se.prototype.removeButtonClickListener=function(K){this.buttonClickListeners.indexOf(K)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(K),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.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 $=0;$<this.markerButtons.length;$++)$<K||$===K&&this.markerButtons.length-1===K?this.markerButtonBlock.appendChild(this.markerButtons[$]):($===K&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[$]))}},se.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},se.prototype.resetButtonStyles=function(){var K=this;this.buttons.forEach(function($){$.className=$.className.replace(K.uiStyleSettings.toolbarButtonStyleColorsClassName?K.uiStyleSettings.toolbarButtonStyleColorsClassName:K.toolbarButtonStyleColorsClass.name,"").trim(),$.className=$.className.replace(K.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?K.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:K.toolbarActiveButtonStyleColorsClass.name,"").trim(),$.className+=" "+(K.uiStyleSettings.toolbarButtonStyleColorsClassName?K.uiStyleSettings.toolbarButtonStyleColorsClassName:K.toolbarButtonStyleColorsClass.name)})},se.prototype.addActionButton=function(K,$,ne){var ge=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=$,oe.setAttribute("data-action",ne),oe.addEventListener("click",function(){ge.actionToolbarButtonClicked(oe,ne)}),ne){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}K.appendChild(oe),this.buttons.push(oe)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new re("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 re("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new re("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new re("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 re("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var K=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new re("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 re("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},se.prototype.markerToolbarButtonClicked=function(K,$){this.setActiveButton(K),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(K,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.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)},se.prototype.setActiveMarkerButton=function(K){var $=this.markerButtons.find(function(ne){return ne.getAttribute("data-type-name")===K});$&&this.setActiveButton($)},se.prototype.setCurrentMarker=function(K){var $=this;this.currentMarker=K,this.buttons.filter(function(ne){return/delete|notes/.test(ne.getAttribute("data-action"))}).forEach(function(ne){$.currentMarker===void 0?(ne.style.fillOpacity="0.4",ne.style.pointerEvents="none"):(ne.style.fillOpacity="1",ne.style.pointerEvents="all")})},se}(),X=function(){function se(K,$,ne,ge){this.panels=[],this.panelButtons=[],this.markerjsContainer=K,this.displayMode=$,this.uiStyleSettings=ne,this.styles=ge,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var K;this.toolboxStyleClass=this.styles.addClass(new re("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 re("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new re("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new re("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new re("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 re("toolbox-panel-row_colors",`
background-color: `+((K=this.uiStyleSettings.toolboxBackgroundColor)!==null&&K!==void 0?K:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new re("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
padding: `+$+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new re("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(K){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(K){var $,ne,ge=this;this.panels=K,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ne!==void 0?ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ke;oe.uiStyleSettings=ge.uiStyleSettings;var Ot=document.createElement("div");Ot.className=ge.toolboxButtonStyleClass.name+" "+((Ke=ge.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ge.toolboxButtonStyleColorsClass.name),Ot.innerHTML=oe.icon,Ot.title=oe.title,Ot.addEventListener("click",function(){ge.panelButtonClick(oe)}),ge.panelButtons.push(Ot),ge.buttonRow.appendChild(Ot)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(K){var $=this,ne=-1;if(K!==this.activePanel){ne=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(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ke){var Ot,lt;oe.className=$.toolboxButtonStyleClass.name+" "+(Ke===ne?""+((Ot=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ot!==void 0?Ot:$.toolboxActiveButtonStyleColorsClass.name):""+((lt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&lt!==void 0?lt:$.toolboxButtonStyleColorsClass.name))})},se}(),Z=function(se,K){this.title=se,this.icon=K},xe=function(se){function K($,ne,ge,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ne,Ke.currentColor=ge,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return pe(K,se),K.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.whiteSpace="nowrap",this.colors.forEach(function(ge){var oe=$.getColorBox(ge);ne.appendChild(oe),$.colorBoxes.push(oe)}),ne},K.prototype.getColorBox=function($){var ne=this,ge=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-ge,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=oe-2+"px",Ke.style.height=oe-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=(oe+2)/2+"px",Ke.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ne.setCurrentColor($,Ke)});var Ot=document.createElement("div");return Ot.style.display="inline-block",Ot.style.width=oe-2+"px",Ot.style.height=oe-2+"px",Ot.style.backgroundColor=$,Ot.style.borderRadius=oe/2+"px",$==="transparent"&&(Ot.style.fill=this.uiStyleSettings.toolboxAccentColor,Ot.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(Ot),Ke},K.prototype.setCurrentColor=function($,ne){var ge=this;this.currentColor=$,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},K}(Z),ve=function(){function se(K,$,ne){this._state="new",this._isSelected=!1,this._container=K,this._overlayContainer=$,this.globalSettings=ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(K){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(K,$){},se.prototype.dblClick=function(K,$){},se.prototype.manipulate=function(K){},se.prototype.pointerUp=function(K){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(K){this.container.childNodes.length>0?this.container.insertBefore(K,this.container.childNodes[0]):this.container.appendChild(K)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(K){this._state=K.state,this.notes=K.notes},se.prototype.scale=function(K,$){},se.prototype.colorChanged=function(K){this.onColorChanged&&this.onColorChanged(K),this.stateChanged()},se.prototype.fillColorChanged=function(K){this.onFillColorChanged&&this.onFillColorChanged(K),this.stateChanged()},se.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)}},se.typeName="MarkerBase",se}(),Oe=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.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},se}(),Qe=function(){function se(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},se}(),rt=function(){function se(){}return se.toITransformMatrix=function(K){return{a:K.a,b:K.b,c:K.c,d:K.d,e:K.e,f:K.f}},se.toSVGMatrix=function(K,$){return K.a=$.a,K.b=$.b,K.c=$.c,K.d=$.d,K.e=$.e,K.f=$.f,K},se}(),nt=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(le.createTransform()),oe.setupControlBox(),oe}return pe(K,se),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($){this._visual=$;var ne=le.createTransform();this._visual.transform.baseVal.appendItem(ne)},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ge=this.unrotatePoint($);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(ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ne)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var 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($){var ne=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},K.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},K.prototype.manipulate=function($){var ne=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ne):this.state==="rotate"&&this.rotate($)},K.prototype.resize=function($){var ne=this.manipulationStartLeft,ge=this.manipulationStartWidth,oe=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ne=this.manipulationStartLeft+$.x-this.manipulationStartX,ge=this.manipulationStartWidth+this.manipulationStartLeft-ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ge=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+$.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+$.y-this.manipulationStartY}ge>=0?(this.left=ne,this.width=ge):(this.left=ne+ge,this.width=-ge),Ke>=0?(this.top=oe,this.height=Ke):(this.top=oe+Ke,this.height=-Ke),this.setSize()},K.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},K.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ne=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ne,this.applyRotation()}},K.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},K.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM(),ge=le.createPoint($.x,$.y);return{x:(ge=ge.matrixTransform(ne)).x,y:ge.y}},K.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM();ne=ne.inverse();var ge=le.createPoint($.x,$.y);return{x:(ge=ge.matrixTransform(ne)).x,y:ge.y}},K.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=le.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Oe,this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},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 $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},K.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ne=-$/2,ge=ne,oe=(this.width+this.CB_DISTANCE)/2-$/2,Ke=(this.height+this.CB_DISTANCE)/2-$/2,Ot=this.height+this.CB_DISTANCE-$/2,lt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ne,ge),this.positionGrip(this.controlGrips.topCenter.visual,oe,ge),this.positionGrip(this.controlGrips.topRight.visual,lt,ge),this.positionGrip(this.controlGrips.centerLeft.visual,ne,Ke),this.positionGrip(this.controlGrips.centerRight.visual,lt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ne,Ot),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Ot),this.positionGrip(this.controlGrips.bottomRight.visual,lt,Ot),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,ge-3*this.CB_DISTANCE)},K.prototype.positionGrip=function($,ne,ge){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ge),$.transform.baseVal.replaceItem(oe,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:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},K.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.left=ne.left,this.top=ne.top,this.width=ne.width,this.height=ne.height,this.rotationAngle=ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ne.containerTransformMatrix))},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne);var ge=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:ge.x*$,y:ge.y*ne});this.left=oe.x,this.top=oe.y,this.width=this.width*$,this.height=this.height*ne,this.adjustControlBox()},K}(ve),ct=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return pe(K,se),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},K.prototype.createVisual=function(){this.visual=le.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},K.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},K.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},K.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},K.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},K.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},K.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.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},se.prototype.getState.call(this))},K.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize()},K.title="Rectangle marker",K}(nt),dt=function(se){function K($,ne,ge,oe){var Ke=se.call(this,$,oe||'<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=ne,Ke.currentWidth=ge,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return pe(K,se),K.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.widths.forEach(function(ge){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ge===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentWidth(ge,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=ge.toString(),Ke.style.marginRight="5px",oe.appendChild(Ke);var Ot=document.createElement("div");Ot.style.minHeight="20px",Ot.style.flexGrow="2",Ot.style.display="flex",Ot.style.alignItems="center";var lt=document.createElement("hr");lt.style.minWidth="20px",lt.style.border="0px",lt.style.borderTop=ge+"px solid "+$.uiStyleSettings.toolboxColor,lt.style.flexGrow="2",Ot.appendChild(lt),oe.appendChild(Ot),$.widthBoxes.push(oe)}),ne},K.prototype.setCurrentWidth=function($,ne){var ge=this;this.currentWidth=$,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},K}(Z),pt=function(se){function K($,ne,ge,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ne,Ke.currentStyle=ge,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return pe(K,se),K.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.styles.forEach(function(ge){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.styles.length-5+"%",oe.style.borderColor=ge===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentStyle(ge,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Ot=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+$.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ge!==""?'stroke-dasharray="'+ge+'"':"")+` />
</svg>`;Ke.innerHTML=Ot,oe.appendChild(Ke),$.styleBoxes.push(oe)}),ne},K.prototype.setCurrentStyle=function($,ne){var ge=this;this.currentStyle=$,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},K}(Z),He=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.strokeColor=ge.defaultColor,oe.strokeWidth=ge.defaultStrokeWidth,oe.strokeDasharray=ge.defaultStrokeDasharray,oe.strokePanel=new xe("Line color",ge.defaultColorSet,ge.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new pt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return pe(K,se),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=K.typeName,$},K.typeName="FrameMarker",K.title="Frame marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',K}(ct),Pe=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(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return pe(K,se),K.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},K.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},K.prototype.adjustVisual=function(){},K.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},K.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},K.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=le.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 $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},K.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},K.prototype.positionGrip=function($,ne,ge){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ge),$.transform.baseVal.replaceItem(oe,0)},K.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},K.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.x1=ne.x1,this.y1=ne.y1,this.x2=ne.x2,this.y2=ne.y2},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.x1=this.x1*$,this.y1=this.y1*ne,this.x2=this.x2*$,this.y2=this.y2*ne,this.adjustVisual(),this.adjustControlBox()},K}(ve),ft=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=ge.defaultColor,oe.strokeWidth=ge.defaultStrokeWidth,oe.strokeDasharray=ge.defaultStrokeDasharray,oe.strokePanel=new xe("Line color",ge.defaultColorSet,ge.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new pt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return pe(K,se),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},K.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),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()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},K.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},K.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,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 $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.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),Je=function(se){function K($,ne,ge,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ne,Ke.currentFont=ge,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return pe(K,se),K.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.flexGrow="2",this.fonts.forEach(function(ge){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.fonts.length-5+"%",oe.style.borderColor=ge===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentFont(ge,oe)}),ne.appendChild(oe);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 Ot=document.createElement("div");Ot.style.whiteSpace="nowrap",Ot.style.overflow="hidden",Ot.style.textOverflow="ellipsis",Ot.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Ot),oe.appendChild(Ke),$.fontBoxes.push(oe)}),ne},K.prototype.setCurrentFont=function($,ne){var ge=this;this.currentFont=$,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},K}(Z),st=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=ge.defaultColor,oe.fontFamily=ge.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new xe("Color",ge.defaultColorSet,ge.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Je("Font",ge.defaultFontFamilies,ge.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return pe(K,se),K.prototype.ownsTarget=function($){if(se.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ne=!1;return this.textElement.childNodes.forEach(function(ge){ge===$&&(ne=!0)}),ne},K.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},K.prototype.renderText=function(){var $=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ne){$.textElement.appendChild(le.createTSpan(ne.trim()===""?" ":ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},K.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ne=1;if($.width>0&&$.height>0){var ge=(1*this.width-this.width*this.padding*2/100)/$.width,oe=(1*this.height-this.height*this.padding*2/100)/$.height;ne=Math.min(ge,oe)}return ne},K.prototype.getTextPosition=function($){var ne=this.textElement.getBBox(),ge=0,oe=0;return ne.width>0&&ne.height>0&&(ge=(this.width-ne.width*$)/2,oe=this.height/2-ne.height*$/2),{x:ge,y:oe}},K.prototype.sizeText=function(){var $=this.textElement.getBBox(),ne=this.getTextScale(),ge=this.getTextPosition(ne);ge.y-=$.y*ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ge.x+"px, "+ge.y+"px) scale("+ne+", "+ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ge.x,ge.y),this.textElement.transform.baseVal.getItem(1).setScale(ne,ne))},K.prototype.manipulate=function($){se.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},K.prototype.resize=function($){se.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},K.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},K.prototype.pointerUp=function($){var ne=this.state;ne==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,$),this.setSize(),(ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},K.prototype.showTextEditor=function(){var $=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ne){ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ne=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ne>.9;)ne-=.1,$.textEditor.style.fontSize=Math.max(ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ne){ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ne){if(ne.clipboardData){var ge=ne.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(ge)),ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},K.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ge=this.textElement.getBBox(),oe={x:ge.width*$,y:ge.height*$};ne.x-=oe.x/2,ne.y-=oe.y/2,this.textEditor.style.top=ne.y+"px",this.textEditor.style.left=ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ne.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},K.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},K.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},K.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},K.prototype.dblClick=function($,ne){se.prototype.dblClick.call(this,$,ne),this.showTextEditor()},K.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},K.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},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 $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){var ne=$;this.color=ne.color,this.fontFamily=ne.fontFamily,this.padding=ne.padding,this.text=ne.text,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),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}(nt),Ue=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=ge.defaultColor,oe.lineWidth=ge.defaultStrokeWidth,oe.pixelRatio=ge.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new xe("Color",ge.defaultColorSet,ge.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return pe(K,se),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},K.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function($,ne){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo($.x,$.y),this.drawing=!0):se.prototype.pointerDown.call(this,$,ne)},K.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,$)},K.prototype.resize=function($){se.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,$)},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(),se.prototype.select.call(this)},K.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},K.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ge=ne[0],oe=ne[1],Ke=ne[2],Ot=ne[3],lt=!1,_r=0;_r<this.canvasElement.height;_r++)for(var Pt=0;Pt<this.canvasElement.width;Pt++)$.data[_r*this.canvasElement.width*4+4*Pt+3]>0&&(lt=!0,_r<oe&&(oe=_r),Pt<ge&&(ge=Pt),_r>Ot&&(Ot=_r),Pt>Ke&&(Ke=Pt));if(lt){this.left=ge/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ke-ge)/this.pixelRatio,this.height=(Ot-oe)/this.pixelRatio;var Ur=document.createElement("canvas");Ur.width=Ke-ge,Ur.height=Ot-oe,Ur.getContext("2d").putImageData(this.canvasContext.getImageData(ge,oe,Ke-ge,Ot-oe),0,0),this.drawingImgUrl=Ur.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},K.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},K.prototype.setColor=function($){this.color=$,this.colorChanged($)},K.prototype.setLineWidth=function($){this.lineWidth=$},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 $=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){this.createVisual(),se.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),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}(nt),Me=function(se){function K($,ne,ge){var oe=se.call(this,$,ge||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=ne,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return pe(K,se),K.prototype.getUi=function(){var $=this,ne=document.createElement("div");ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2";for(var ge=function(Ot){var lt="both";switch(Ot){case 0:lt="both";break;case 1:lt="start";break;case 2:lt="end";break;case 3:lt="none"}var _r=document.createElement("div");if(_r.style.display="flex",_r.style.flexGrow="2",_r.style.alignItems="center",_r.style.justifyContent="space-between",_r.style.padding="5px",_r.style.borderWidth="2px",_r.style.borderStyle="solid",_r.style.borderColor=lt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",_r.addEventListener("click",function(){$.setCurrentType(lt,_r)}),ne.appendChild(_r),lt==="both"||lt==="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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Pt.style.marginLeft="5px",_r.appendChild(Pt)}var Ur=document.createElement("div");Ur.style.display="flex",Ur.style.alignItems="center",Ur.style.minHeight="20px",Ur.style.flexGrow="2";var Wr=document.createElement("hr");if(Wr.style.minWidth="20px",Wr.style.border="0px",Wr.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Wr.style.flexGrow="2",Ur.appendChild(Wr),_r.appendChild(Ur),lt==="both"||lt==="end"){var cn=document.createElement("div");cn.style.display="flex",cn.style.alignItems="center",cn.style.minHeight="20px",cn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,cn.style.marginRight="5px",_r.appendChild(cn)}oe.typeBoxes.push(_r)},oe=this,Ke=0;Ke<4;Ke++)ge(Ke);return ne},K.prototype.setCurrentType=function($,ne){var ge=this;this.currentType=$,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ge.uiStyleSettings!==void 0?ge.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},K}(Z),Ne=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Me("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return pe(K,se),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},K.prototype.getArrowPoints=function($,ne){var ge=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return $-ge/2+","+(ne+oe/2)+" "+$+","+(ne-oe/2)+" "+($+ge/2)+","+(ne+oe/2)},K.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.arrow1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ne,0);var ge=this.arrow2.transform.baseVal.getItem(0);ge.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ge,0)}},K.prototype.setArrowType=function($){this.arrowType=$,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 $=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.arrowType=ne.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}(ft),Ee=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.fillColor=ge.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new xe("Color",ge.defaultColorSet,ge.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return pe(K,se),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=K.typeName,$},K.typeName="CoverMarker",K.title="Cover marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',K}(ct),Se=function(se){function K($,ne,ge,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ne,Ke.currentOpacity=ge,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return pe(K,se),K.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",ne.style.justifyContent="space-between",this.opacities.forEach(function(ge){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ge===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentOpacity(ge,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=100*ge+"%",oe.appendChild(Ke),$.opacityBoxes.push(oe)}),ne},K.prototype.setCurrentOpacity=function($,ne){var ge=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},K}(Z),Re=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=ge.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=ge.defaultHighlightOpacity,oe.fillPanel=new xe("Color",ge.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Se("Opacity",ge.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return pe(K,se),K.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.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 $=se.prototype.getState.call(this);return $.typeName=K.typeName,$},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),Le='<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>',Ye=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=ge.defaultStrokeColor,oe.bgColor=ge.defaultFillColor,oe.fontFamily=ge.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new xe("Text color",ge.defaultColorSet,oe.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new xe("Fill color",ge.defaultColorSet,oe.bgColor,Le),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Je("Font",ge.defaultFontFamilies,ge.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Qe,oe.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return pe(K,se),K.prototype.ownsTarget=function($){return se.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},K.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},K.prototype.pointerDown=function($,ne){this.state==="new"&&se.prototype.pointerDown.call(this,$,ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,$,ne)},K.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,$);else{var ne=this.state==="creating";se.prototype.pointerUp.call(this,$),this.setTipPoints(ne),this.positionTip()}},K.prototype.manipulate=function($){if(this.tipMoving){var ne=this.unrotatePoint($);this.tipPosition={x:ne.x-this.manipulationStartLeft,y:ne.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,$)},K.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},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($){$===void 0&&($=!1);var ne=Math.min(this.height/2,15),ge=this.height/5;$&&(this.tipPosition={x:ne+ge/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ge=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:ne,y:0},this.tipBase2Position={x:ne+ge,y:0}):(this.tipBase1Position={x:0,y:ne},this.tipBase2Position={x:0,y:ne+ge}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ge=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ne-ge,y:0},this.tipBase2Position={x:this.width-ne,y:0}):(this.tipBase1Position={x:this.width,y:ne},this.tipBase2Position={x:this.width,y:ne+ge}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ge=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ne-ge,y:this.height},this.tipBase2Position={x:this.width-ne,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ne-ge},this.tipBase2Position={x:this.width,y:this.height-ne}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ge=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:ne,y:this.height},this.tipBase2Position={x:ne+ge,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ne},this.tipBase2Position={x:0,y:this.height-ne-ge})},K.prototype.resize=function($){se.prototype.resize.call(this,$),this.positionTip()},K.prototype.positionTip=function(){le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var $=this.tipGrip.visual.transform.baseVal.getItem(0);$.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem($,0)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.select=function(){this.positionTip(),se.prototype.select.call(this)},K.prototype.getState=function(){var $=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){var ne=$;this.bgColor=ne.bgColor,this.tipPosition=ne.tipPosition,se.prototype.restoreState.call(this,$),this.createTip(),this.setTipPoints()},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.tipPosition={x:this.tipPosition.x*$,y:this.tipPosition.y*ne},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(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=ge.defaultColor,oe.strokeWidth=ge.defaultStrokeWidth,oe.strokeDasharray=ge.defaultStrokeDasharray,oe.fillColor=ge.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new xe("Line color",ue(ge.defaultColorSet,["transparent"]),ge.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new xe("Fill color",ue(ge.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new pt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Se("Opacity",ge.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return pe(K,se),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},K.prototype.createVisual=function(){this.visual=le.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},K.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},K.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},K.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},K.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},K.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},K.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},K.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.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 $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},K.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),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}(nt),Ct=function(se){function K($,ne,ge){return se.call(this,$,ne,ge)||this}return pe(K,se),Object.defineProperty(K.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},K.prototype.createTips=function(){this.tip1=le.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip2)},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.tip1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ne,0);var ge=this.tip2.transform.baseVal.getItem(0);ge.setRotate($+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 $=se.prototype.getState.call(this);return $.typeName=K.typeName,$},K.prototype.restoreState=function($){se.prototype.restoreState.call(this,$),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}(ft),At=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.strokePanel.colors=ge.defaultColorSet,oe.fillColor="transparent",oe}return pe(K,se),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=K.typeName,$},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),rr=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(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))},se.prototype.replaceLastUndoStep=function(K){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=K)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var K=this.undoStack.pop();return K!==void 0&&this.redoStack.push(K),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),gt=function(se){function K($,ne,ge){var oe=se.call(this,$,ne,ge)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=ge.defaultColor,oe.strokeWidth=ge.defaultStrokeWidth,oe.strokeDasharray=ge.defaultStrokeDasharray,oe.strokePanel=new xe("Line color",ge.defaultColorSet,ge.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new pt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return pe(K,se),K.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},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=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ne)&&(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()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},K.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},K.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},K.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),se.prototype.manipulate.call(this,$)},K.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),se.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},K.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},K.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},K.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},K.prototype.scale=function($,ne){this.curveX=this.curveX*$,this.curveY=this.curveY*ne,se.prototype.scale.call(this,$,ne)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return $.typeName=K.typeName,$},K.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.curveX=ne.curveX,this.curveY=ne.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),or=function(){function se(K,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=K,this.cancelable=$}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),Zt=function(se){function K($,ne,ge){var oe=se.call(this,$,!1)||this;return oe.dataUrl=ne,oe.state=ge,oe}return pe(K,se),K}(or),Et=function(se){function K($,ne,ge){ge===void 0&&(ge=!1);var oe=se.call(this,$,ge)||this;return oe.marker=ne,oe}return pe(K,se),K}(or),jr=function(){function se(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return se.prototype.addEventListener=function(K,$){this[K].push($)},se.prototype.removeEventListener=function(K,$){var ne=this[K].indexOf($);ne>-1&&this[K].splice(ne,1)},se}(),Kr=function(){function se(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 Pe,this._isOpen=!1,this.undoRedoManager=new rr,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 jr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new ee(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(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,At,tt,Re,Ye,Ct,Ee,ft,gt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,tt,Re,Ye]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Re]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(K){var $=this;this._availableMarkerTypes.splice(0),K.forEach(function(ne){if(typeof ne=="string"){var ge=$.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===ne});ge!==void 0&&$._availableMarkerTypes.push(ge)}else $._availableMarkerTypes.push(ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),te.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var K=this;this.styles.styleSheetRoot===void 0&&q.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new or(K))})},se.prototype.render=function(){return Te(this,void 0,void 0,function(){var K;return ye(this,function($){switch($.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 $.sent(),[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},se.prototype.close=function(K){var $=this;if(K===void 0&&(K=!1),this.isOpen){var ne=!1;K||this.eventListeners.beforeclose.forEach(function(ge){var oe=new or($,!0);ge(oe),oe.defaultPrevented&&(ne=!0)}),ne||(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 or($))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var K,$=[],ne=0;ne<arguments.length;ne++)$[ne]=arguments[ne];(K=this._availableMarkerTypes).push.apply(K,$)},se.prototype.addRenderEventListener=function(K){this.addEventListener("render",function($){K($.dataUrl,$.state)})},se.prototype.removeRenderEventListener=function(K){},se.prototype.addCloseEventListener=function(K){this.addEventListener("close",function(){K()})},se.prototype.removeCloseEventListener=function(K){},se.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))},se.prototype.onPopupTargetResize=function(){var K=1*this.target.clientWidth/this.target.clientHeight,$=this.editorCanvas.clientWidth/K>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*K:this.editorCanvas.clientWidth,ne=$<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/K;this.resize($,ne)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(K,$){this._isResizing=!0;var ne=K/this.imageWidth,ge=$/this.imageHeight;this.imageWidth=Math.round(K),this.imageHeight=Math.round($),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ne,ge),this._isResizing=!1},se.prototype.scaleMarkers=function(K,$){var ne,ge=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(K,$):(ne=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==ge._currentMarker&&oe.scale(K,$)}),ne!==void 0&&this.setCurrentMarker(ne)},se.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},se.prototype.setTopLeft=function(){var K=this.editingTarget.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=K.left-$.left,this.top=K.top-$.top},se.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},se.prototype.addDefs=function(){for(var K,$=[],ne=0;ne<arguments.length;ne++)$[ne]=arguments[ne];this.defs=le.createDefs(),this.addDefsToImage(),(K=this.defs).append.apply(K,$)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},se.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var 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()},se.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var 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 Q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new X(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(K){this.markerImage.removeChild(K.container),this.markers.indexOf(K)>-1&&this.markers.splice(this.markers.indexOf(K),1),K.dispose()},se.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},se.prototype.toolbarButtonClicked=function(K,$){if(K==="marker"&&$!==void 0)this.createNewMarker($);else if(K==="action")switch($){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var K=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ge){var oe=new Et(K,K._currentMarker,!0);ge(oe),oe.defaultPrevented&&($=!0)}),!$){var ne=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 Et(K,ne))})}}},se.prototype.clear=function(){var K=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ot=new Et(K,void 0,!0);Ke(Ot),Ot.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ne=function(Ke){var Ot=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(lt){return lt(new Et(K,Ot))})},ge=this,oe=this.markers.length-1;oe>=0;oe--)ne(oe);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.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))},se.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var K=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ne=this.undoRedoManager.getLastUndoStep();if(!ne||ne.width===$.width&&ne.height===$.height){var ge=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),ge<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new or(K))})}else this.undoRedoManager.replaceLastUndoStep($),this.eventListeners.statechange.forEach(function(oe){return oe(new or(K))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.prototype.undoStep=function(){var K=this,$=this.undoRedoManager.undo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ne){return ne(new or(K))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.prototype.redoStep=function(){var K=this,$=this.undoRedoManager.redo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ne){return ne(new or(K))}))},se.prototype.stepZoom=function(){var K=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=K<this.zoomSteps.length-1?this.zoomSteps[K+1]:this.zoomSteps[0]},se.prototype.panTo=function(K){this.contentDiv.scrollBy({left:this.prevPanPoint.x-K.x,top:this.prevPanPoint.y-K.y}),this.prevPanPoint=K},se.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var K,$,ne=this;return ye(this,function(ge){switch(ge.label){case 0:return[4,this.render()];case 1:return K=ge.sent(),$=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new Zt(ne,K,$))}),this.close(!0),[2]}})})},se.prototype.getState=function(K){K===!0&&this.setCurrentMarker();var $={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ne){return $.markers.push(ne.getState())}),$},se.prototype.restoreState=function(K){var $=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);K.markers.forEach(function(ne){var ge=$._availableMarkerTypes.find(function(Ke){return Ke.typeName===ne.typeName});if(ge!==void 0){var oe=$.addNewMarker(ge);oe.restoreState(ne),$.markers.push(oe)}}),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(ne){return ne(new or($))})},se.prototype.addNewMarker=function(K){var $=le.createGroup();return this.markerImage.appendChild($),new K($,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(K){var $,ne=this;($=typeof K=="string"?this._availableMarkerTypes.find(function(ge){return ge.typeName===K}):K)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker($),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton($.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ge){return ge(new Et(ne,ne._currentMarker))}))},se.prototype.markerCreated=function(K){var $=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(ne){return ne(new Et($,$._currentMarker))})},se.prototype.colorChanged=function(K){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=K,this.settings.defaultStrokeColor=K)},se.prototype.fillColorChanged=function(K){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=K)},se.prototype.markerStateChanged=function(K){var $=this;this.eventListeners.markerchange.forEach(function(ne){return ne(new Et($,K))})},se.prototype.setCurrentMarker=function(K){var $=this;this._currentMarker!==K&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ne){return ne(new Et($,$._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(ne){return ne(new Et($,$._currentMarker))}))},se.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 $=this.markers.find(function(ne){return ne.ownsTarget(K.target)});$!==void 0?(this.setCurrentMarker($),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))},se.prototype.onDblClick=function(K){if(this._isFocused||this.focus(),this.mode==="select"){var $=this.markers.find(function(ne){return ne.ownsTarget(K.target)});$!==void 0&&$!==this._currentMarker&&this.setCurrentMarker($),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(K.clientX,K.clientY),K.target):this.setCurrentMarker()}},se.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}))},se.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()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(K){this._currentMarker===void 0||this.notesArea!==void 0||K.key!=="Delete"&&K.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(K,$){var ne=this.markerImage.getBoundingClientRect();return{x:(K-ne.left)/this.zoomLevel,y:($-ne.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.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()},se.prototype.addLicenseKey=function(K){te.addKey(K)},se.prototype.addEventListener=function(K,$){this.eventListeners.addEventListener(K,$)},se.prototype.removeEventListener=function(K,$){this.eventListeners.removeEventListener(K,$)},se.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(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.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($){return $(new or(K))}))},se.prototype.blur=function(){var K=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new or(K))}))},se.instanceCounter=0,se}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Fr=function(se,K){return(Fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ge in ne)Object.prototype.hasOwnProperty.call(ne,ge)&&($[ge]=ne[ge])})(se,K)};function rn(se,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function $(){this.constructor=se}Fr(se,K),se.prototype=K===null?Object.create(K):($.prototype=K.prototype,new $)}function Er(se,K,$,ne){return new($||($=Promise))(function(ge,oe){function Ke(_r){try{lt(ne.next(_r))}catch(Pt){oe(Pt)}}function Ot(_r){try{lt(ne.throw(_r))}catch(Pt){oe(Pt)}}function lt(_r){var Pt;_r.done?ge(_r.value):(Pt=_r.value,Pt instanceof $?Pt:new $(function(Ur){Ur(Pt)})).then(Ke,Ot)}lt((ne=ne.apply(se,K||[])).next())})}function un(se,K){var $,ne,ge,oe,Ke={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return oe={next:Ot(0),throw:Ot(1),return:Ot(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Ot(lt){return function(_r){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ge=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ge=ne.return)&&ge.call(ne),0):ne.next)&&!(ge=ge.call(ne,Pt[1])).done)return ge;switch(ne=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++,ne=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(se,Ke)}catch(Ur){Pt=[6,Ur],ne=0}finally{$=ge=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([lt,_r])}}}var Jr=function(){function se(){}return se.addKey=function(K){se.key=K},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),Wt=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(K,$){for(var ne=0,ge=$;ne<ge.length;ne++){var oe=ge[ne],Ke=oe[0],Ot=oe[1];K.setAttribute(Ke,Ot)}},se.createRect=function(K,$,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","rect");return ge.setAttribute("width",K.toString()),ge.setAttribute("height",$.toString()),ne&&se.setAttributes(ge,ne),ge},se.createLine=function(K,$,ne,ge,oe){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",K.toString()),Ke.setAttribute("y1",$.toString()),Ke.setAttribute("x2",ne.toString()),Ke.setAttribute("y2",ge.toString()),oe&&se.setAttributes(Ke,oe),Ke},se.createPolygon=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ne.setAttribute("points",K),$&&se.setAttributes(ne,$),ne},se.createCircle=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return ne.setAttribute("cx",(K/2).toString()),ne.setAttribute("cy",(K/2).toString()),ne.setAttribute("r",K.toString()),$&&se.setAttributes(ne,$),ne},se.createEllipse=function(K,$,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ge.setAttribute("cx",(K/2).toString()),ge.setAttribute("cy",($/2).toString()),ge.setAttribute("rx",(K/2).toString()),ge.setAttribute("ry",($/2).toString()),ne&&se.setAttributes(ge,ne),ge},se.createGroup=function(K){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&se.setAttributes($,K),$},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(K,$,ne,ge,oe,Ke,Ot){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(lt,[["id",K],["orient",$],["markerWidth",ne.toString()],["markerHeight",ge.toString()],["refX",oe.toString()],["refY",Ke.toString()]]),lt.appendChild(Ot),lt},se.createText=function(K){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),K&&se.setAttributes($,K),$},se.createTSpan=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ne.textContent=K,$&&se.setAttributes(ne,$),ne},se.createImage=function(K){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&se.setAttributes($,K),$},se.createPoint=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ne.x=K,ne.y=$,ne},se.createPath=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","path");return ne.setAttribute("d",K),$&&se.setAttributes(ne,$),ne},se.createElement=function(K,$){var ne=document.createElementNS("http://www.w3.org/2000/svg",K);return $&&se.setAttributes(ne,$),ne},se.getHollowRectanglePath=function(K,$,ne,ge,oe,Ke,Ot,lt){return"M"+K+","+$+"V"+($+ge)+"H"+(K+ne)+"V"+$+"H"+oe+"V"+Ke+"H"+(oe+Ot)+"V"+(Ke+lt)+"H"+oe+"V"+$+"Z"},se}(),_n=function(){function se(K){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(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},se.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)},se.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 Cn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Cn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Cn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Sn("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Sn("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Cn=function(se,K){this.selector=se,this.style=K},Sn=function(se,K){this.localName=se,this.style=K},gn=function(){function se(){this.blocks=[],this.display=""}return se.prototype.addButtonBlock=function(K){K.className=this.blockClassName,K.buttonClassName=this.buttonClassName,K.buttonColorsClassName=this.buttonColorsClassName,K.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(K)},se.prototype.addElementBlock=function(K){K.className===void 0&&(K.className=this.blockClassName),this.blocks.push(K)},se.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($){return K.appendChild($.getUI())}),K},se}(),Ci=function(){function se(){}return se.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},se}(),ui=function(se){function K(){var $=se!==null&&se.apply(this,arguments)||this;return $.buttons=[],$}return rn(K,se),K.prototype.addButton=function($){$.className=this.buttonClassName,$.colorsClassName=this.buttonColorsClassName,$.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push($)},K.prototype.getUI=function(){var $=se.prototype.getUI.call(this);return this.buttons.forEach(function(ne){return $.appendChild(ne.getUI())}),$},K}(Ci),mn=function(){function se(K,$){this._isActive=!1,this._isHidden=!1,this._icon=K,this.title=$,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(se.prototype,"icon",{get:function(){return this._icon},set:function(K){this._icon=K,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isActive",{get:function(){return this._isActive},set:function(K){this._isActive=K,this.adjustClassName()},enumerable:!1,configurable:!0}),se.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},se.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},se.prototype.hide=function(){this._isHidden=!0},se}(),mr=function(se){function K(){var $=se!==null&&se.apply(this,arguments)||this;return $.elements=[],$}return rn(K,se),K.prototype.addElement=function($){this.elements.push($)},K.prototype.getUI=function(){var $=se.prototype.getUI.call(this);return this.elements.forEach(function(ne){return $.appendChild(ne)}),$},K}(Ci),Vn=function(){function se(K,$){this.horizontal=K,this.vertical=$}return Object.defineProperty(se.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),se.prototype.getVerticalLength=function(K){return K/this.ratio},se.prototype.getHorizontalLength=function(K){return K*this.ratio},se}(),pi=function(){function se(){}return se.getIcon=function(K,$){if(K>0&&$>0){var ne=new Vn(K,$),ge=ne.ratio>=1?20:ne.getHorizontalLength(20),oe=ne.ratio<1?20:ne.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 Ot=Wt.createDefs();Ke.appendChild(Ot);var lt=Wt.createElement("clipPath",[["id","text-bg-clip"]]);Ot.appendChild(lt);var _r=Wt.createPath(Wt.getHollowRectanglePath((24-ge)/2,(24-oe)/2,ge,oe,(24-ge)/2+2,(24-oe)/2+2,ge-4,oe-4));Ke.appendChild(_r);var Pt=Wt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Wt.createTSpan(K+":"+$)),Ke.appendChild(Pt);var Ur=Pt.getBBox();Wt.setAttributes(Pt,[["x",((24-Ur.width)/2).toString()],["y",((24-Ur.height)/2-Ur.y).toString()]]);var Wr=Wt.createPath(Wt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ur.width))/2,(24-Math.ceil(Ur.height))/2,Math.ceil(Ur.width),Math.ceil(Ur.height)));return lt.appendChild(Wr),Wt.setAttributes(_r,[["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>'},se}(),Xn=function(se){function K($,ne,ge){var oe=se.call(this,$,ne)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=ge,oe}return rn(K,se),K.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=$.className,ne.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ne.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}(mn),nn=function(){function se(K,$){this.GRIP_SIZE=10,this.color=K,this.fillColor=$,this.visual=Wt.createGroup(),this.visual.appendChild(Wt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Wt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},se.prototype.setCenter=function(K,$){this.visual.childNodes.forEach(function(ne){return Wt.setAttributes(ne,[["cx",K.toString()],["cy",$.toString()]])})},se}(),Bn=function(){function se(K,$,ne,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=$,this.margin=ne,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(se.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(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.gridContainer&&Wt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(K){this._zoomFactor=K,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var K=this;this.cropShadeElement=Wt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Wt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$<this.numberOfGridLines;$++)this.horizontalGridLines.push(Wt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Wt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ne){return K.gridContainer.appendChild(ne)}),this.verticalGridLines.forEach(function(ne){return K.gridContainer.appendChild(ne)}),this.cropRectElement=Wt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new nn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new nn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new nn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new nn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},se.prototype.setCropRectangle=function(K){this.cropRect=K;var $=Object.assign({},this.cropRect);this.zoomFactor!==1&&($.width=this.cropRect.width*this.zoomFactor,$.height=this.cropRect.height*this.zoomFactor,$.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-$.width/2,$.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Wt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ne=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Ke){var Ot=$.y+ne*(Ke+1);Wt.setAttributes(oe,[["x1",""+$.x],["y1",""+Ot],["x2",""+($.x+$.width)],["y2",""+Ot]])});var ge=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Ke){var Ot=$.x+ge*(Ke+1);Wt.setAttributes(oe,[["x1",""+Ot],["y1",""+$.y],["x2",""+Ot],["y2",""+($.y+$.height)]])}),Wt.setAttributes(this.cropShadeElement,[["d",Wt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},se.prototype.clientToLocalCoordinates=function(K,$){var ne=this.container.getBoundingClientRect();return{x:K-ne.left+this.margin,y:$-ne.top+this.margin}},se.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)},se.prototype.onPointerMove=function(K){if(this.isMoving)this.move(this.clientToLocalCoordinates(K.clientX,K.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize($)}K.preventDefault()},se.prototype.onPointerUp=function(K){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(K.pointerId)},se.prototype.move=function(K){var $=K.x-this.previousPoint.x,ne=K.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=K},se.prototype.resize=function(K){var $=Object.assign({},this.cropRect),ne=K.x-this.previousPoint.x,ge=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+ne<this.margin&&(ne=this.margin-$.x),$.x+=ne,$.width=this.cropRect.x+this.cropRect.width-$.x;break;case this.bottomRightGrip:case this.topRightGrip:$.width+ne>this.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-$.width),$.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=ge,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=ge}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=K,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var K=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),ge=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidth<ge/this.canvasHeight?this.cropRect.width=ne: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=$-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},se.prototype.getRescaledRect=function(K,$,ne,ge,oe,Ke){var Ot=ne/K,lt=ge/$;return{x:(oe.x-Ke)*Ot+Ke,y:(oe.y-Ke)*lt+Ke,width:oe.width*Ot,height:oe.height*lt}},se.prototype.scaleCanvas=function(K,$){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,$,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},se}(),Si=function(){function se(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(se.prototype,"angle",{get:function(){return this._angle},set:function(K){this._angle=K,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},se.prototype.onPointerDown=function(K){this.controlContainer.setPointerCapture(K.pointerId),this.isDragging=!0,this.previousPoint={x:K.clientX,y:K.clientY}},se.prototype.onPointerMove=function(K){this.isDragging&&(this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.previousPoint.x=K.clientX)},se.prototype.onPointerUp=function(K){this.isDragging&&this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(K.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var K=this.angleLabelText.getBBox();Wt.setAttributes(this.angleLabelElement,[["x",((this.width-K.width)/2).toString()],["y",(this.height/2).toString()]])}},se.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)}},se.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 $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var ge=ne%5==0?this.height/3:this.height/6;$+="h4v"+-ge+"h1v"+ge}$+="v1H0Z",this.scaleShape=Wt.createPath($);var oe=Wt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),K.appendChild(this.scaleShape),this.angleLabelElement=Wt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Wt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Wt.createTSpan("");return Ke.innerHTML="&deg;",this.angleLabelElement.appendChild(Ke),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},se}(),mi=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(K,$,ne,ge,oe,Ke,Ot){var lt=this;return new Promise(function(_r){var Pt=document.createElement("canvas");Pt.width=K.width.baseVal.value-2*ge,Pt.height=K.height.baseVal.value-2*ge;var Ur=1,Wr=1;lt.naturalSize===!0?(Ur=$.naturalWidth/(K.width.baseVal.value-2*ge)/Ke,Wr=$.naturalHeight/(K.height.baseVal.value-2*ge)/Ot,Pt.width=$.naturalWidth/Ke,Pt.height=$.naturalHeight/Ot):lt.width!==void 0&&lt.height!==void 0&&(Ur=lt.width/ne.width,Wr=lt.height/ne.height,Pt.width*=Ur,Pt.height*=Wr);var cn=Pt.getContext("2d");cn.translate(Pt.width/2,Pt.height/2),cn.rotate(oe*Math.PI/180),cn.scale(Ke,Ot),cn.translate(-Pt.width/2,-Pt.height/2),cn.drawImage($,0,0,Pt.width,Pt.height);var ri=document.createElement("canvas");ri.width=ne.width*Ur,ri.height=ne.height*Wr,ri.getContext("2d").putImageData(cn.getImageData((ne.x-ge)*Ur,(ne.y-ge)*Wr,ne.width*Ur,ne.height*Wr),0,0),_r(ri.toDataURL(lt.imageType,lt.imageQuality))})},se}(),It=function(){function se(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=se.instanceCounter++,this.styles=new _n(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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(K){this._zoomToCropEnabled=K,K?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.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(se.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(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var K;return(K=this._aspectRatio)!==null&&K!==void 0?K:this.aspectRatios[0]},set:function(K){this._aspectRatio=K},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(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($){return $()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(K){this.renderEventListeners.push(K)},se.prototype.removeRenderEventListener=function(K){this.renderEventListeners.indexOf(K)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(K),1)},se.prototype.addCloseEventListener=function(K){this.closeEventListeners.push(K)},se.prototype.removeCloseEventListener=function(K){this.closeEventListeners.indexOf(K)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(K),1)},se.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))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var K=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=$+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/K;this.resize($,ne)}},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Wt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},se.prototype.resize=function(K,$){this.imageWidth=Math.round(K),this.imageHeight=Math.round($),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},se.prototype.setEditingTarget=function(){var 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 $=K.toDataURL();Wt.setAttributes(this.editingTarget,[["href",$]]),this.setEditingTargetSize()},se.prototype.setTopLeft=function(){var K=this.target.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=K.left-$.left-this.CANVAS_MARGIN,this.top=K.top-$.top-this.CANVAS_MARGIN},se.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Wt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Wt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Wt.createGroup(),this.editingTargetRotationScaleContainer=Wt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var K=Wt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(K);var $=Wt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem($),this.editingTargetContainer=Wt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},se.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},se.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Wt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Bn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},se.prototype.zoomToCrop=function(){if(this.cropRect){var K=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,$=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=K+"px "+$+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-K+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-$+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},se.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},se.prototype.cropRectChanged=function(K){this.cropRect=K,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},se.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var K=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,$=this.target.offsetTop>K+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var K=this;this.topToolbar=new gn,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new ui;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ne=[];this.aspectRatios.forEach(function(Wr){var cn=new mn(pi.getIcon(Wr.horizontal,Wr.vertical),Wr.horizontal===0&&Wr.vertical===0?"FREE":Wr.horizontal+":"+Wr.vertical);cn.onClick=function(){return K.ratioButtonClicked(Wr)},ne.push(cn)}),this.aspectRatioButton=new Xn(pi.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ge=new mn('<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},$.addButton(ge);var oe=new mn('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,oe.isActive=K.zoomToCropEnabled},$.addButton(oe),!Jr.isLicensed){var Ke=new mr;this.topToolbar.addElementBlock(Ke);var Ot=document.createElement("div");Ot.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var lt=document.createElement("a");lt.style.color="currentColor",lt.href="https://markerjs.com/products/cropro",lt.target="_blank",lt.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>',Ot.appendChild(lt),Ke.addElement(Ot)}var _r=new ui;_r.minWidth=3*this.toolbarHeight+"px",_r.contentAlign="end",this.topToolbar.addButtonBlock(_r);var Pt=new mn('<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,_r.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ur=new mn('<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");Ur.onClick=this.close,_r.addButton(Ur),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ur.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new gn,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new ui;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ne=new mn('<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");ne.onClick=this.rotateLeftButtonClicked,$.addButton(ne);var ge=new mn('<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,$.addButton(ge);var oe=new mr;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new Si("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(_r){K.rotateBy(_r),K.straightener.angle=K.rotationAngle},oe.addElement(this.straightener.getUI());var Ke=new ui;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Ot=new mn('<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");Ot.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Ot);var lt=new mn('<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");lt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(lt)},se.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=pi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Vn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(K){if(K){var $=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(K,$){var ne=this.cropImage.getBoundingClientRect();return{x:K-ne.left,y:$-ne.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.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()},se.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)},se.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)},se.prototype.rotateTo=function(K){K=(K=K>180?K-360:K)<=-180?K+360:K,this.rotationAngle=K,this.applyRotation()},se.prototype.rotateBy=function(K){this.rotateTo((this.rotationAngle+K)%360)},se.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 $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=K},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Er(this,void 0,void 0,function(){var K,$;return un(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return K=ne.sent(),$=this.getState(),this.renderEventListeners.forEach(function(ge){return ge(K,$)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Er(this,void 0,void 0,function(){var K;return un(this,function($){switch($.label){case 0:return(K=new mi).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),Wt.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 $.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,$.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Sn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Cn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Cn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Sn("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 Sn("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 Sn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},se.instanceCounter=0,se}(),xr=M("8hTe"),ti=M.n(xr),vi=/<pre[^>]*>/g;function Ri(se){var K=document.createElement("div");return K.innerHTML=se,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var Di=J.a=function(se){var K=se.value,$=K===void 0?"":K,ne=se.edit,ge=ne===void 0?!1:ne,oe=se.className,Ke=se.showTextOnly,Ot=se.showLines,lt=se.replaces,_r=se.zoomImg,Pt=se.hasMask,Ur=se.style,Wr=Ur===void 0?{}:Ur,cn=se.stylesPrev,ri=cn===void 0?{}:cn,gi=String($),Dn=Object(a.useRef)(),Mi=Object(a.useRef)(),qi=Object(a.useState)(""),Qn=Object(w.a)(qi,2),ci=Qn[0],ji=Qn[1],Fi=Object(a.useState)("office"),yi=Object(w.a)(Fi,2),Ui=yi[0],bi=yi[1],oa=function(){var vt=new It(Mi.current);vt.displayMode="popup",vt.addRenderEventListener(function(){var xt=Object(h.a)(o.a.mark(function Mt(Lt){var Ht;return o.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Dn.current.style.display="none",ht.next=3,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Lt}});case 3:Ht=ht.sent,Ht!=null&&Ht.id&&lt(Mi.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 5:case"end":return ht.stop()}},Mt)}));return function(Mt){return xt.apply(this,arguments)}}()),vt.show()},sa=function(){var vt=new Kr(Mi.current);vt.settings.displayMode="popup",vt.addEventListener("render",function(){var xt=Object(h.a)(o.a.mark(function Mt(Lt){var Ht;return o.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Dn.current.style.display="none",!Mi.current){ht.next=6;break}return ht.next=4,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Lt.dataUrl}});case 4:Ht=ht.sent,Ht!=null&&Ht.id&&lt(Mi.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 6:case"end":return ht.stop()}},Mt)}));return function(Mt){return xt.apply(this,arguments)}}()),vt.show(),window.markerArea=vt},Ei=Object(a.useMemo)(function(){try{var et=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,vt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;gi=gi.replace(et,"("+ie.a.API_SERVER+"/api/attachments/").replace(vt,'"'+ie.a.API_SERVER+"/api/attachments/").replace(xt,'"'+ie.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,`
`),gi=gi.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Bt){}var Mt=G(gi),Lt=I();if(gi.match(/\[TOC\]/)&&(Mt=Mt.replace("<p>[TOC]</p>",k()),T()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function(Bt,ht){var wt=Lt[ht],St=wt.type,vr=wt.expression;return Object(ce.renderToString)(Ri(vr)||"",{displayMode:St==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),j(),Ke){var Ht=document.createElement("div");return Ht.innerHTML=Mt,Ht.innerText}return setTimeout(function(){return ta()},500),Mt},[gi]),Gn=Object(a.useRef)();_.WebkitLineClamp=Ot,Ot&&(Wr=Object(c.a)(Object(c.a)({},Wr),_));function Vi(et){var vt=et.target;if(vt.tagName.toUpperCase()==="IMG"){if(_r){var xt=vt.getAttribute("src");ji(xt),bi("image")}}else if(vt.tagName.toUpperCase()==="A"){var Mt=vt.getAttribute("href");if(Mt.indexOf("office")>-1)et.preventDefault(),ji(Mt),bi("office");else if(Mt.indexOf("application/pdf")>-1)et.preventDefault(),ji(Mt),bi("pdf");else if(Mt.indexOf("type=text")>-1)et.preventDefault(),ji(Mt),bi("html");else if(Mt.startsWith("#")){et.preventDefault();var Lt=document.getElementById(Mt.replace("#",""));Lt&&Lt.scrollIntoView(!0)}}}var ta=function(){var vt,xt=(vt=Gn.current)===null||vt===void 0?void 0:vt.querySelectorAll("video");xt==null||xt.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Lt=new V.a;Lt.loadSource(Mt.src),Lt.attachMedia(Mt)}}})};Object(a.useEffect)(function(){if(Gn.current&&Ei&&(Ei.match(vi)&&window.PR.prettyPrint()),Gn.current)return Gn.current.addEventListener("click",Vi),function(){Gn.current.removeEventListener("click",Vi),j(),T()}},[Ei,Gn.current,Vi]);var _t=function(vt){if(!ge)return;vt.target.nodeName==="IMG"?(Dn.current.style.display="flex",Dn.current.style.width=vt.target.clientWidth+"px",Dn.current.style.height=vt.target.clientHeight+"px",Dn.current.style.top=vt.target.offsetTop+"px",Dn.current.style.left=vt.target.offsetLeft+"px",Mi.current.src=vt.target.getAttribute("src")):Dn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Gn,style:Object(c.a)({},Wr),className:"".concat(oe||""," markdown-body ").concat(ti.a.mdBody),onMouseOver:_t,dangerouslySetInnerHTML:{__html:Ei}}),n.a.createElement("div",{ref:Dn,className:ti.a.button},n.a.createElement(m.a,null,n.a.createElement(P.a,{onClick:function(){return oa()}},"\u88C1\u526A"),n.a.createElement(P.a,{onClick:function(){return sa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Mi,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),n.a.createElement(he.a,{close:!0,data:ci,hasMask:Pt,type:ci!=null&&ci.length?Ui:"",style:Object(c.a)({},ri),onClose:function(){return ji("")}}))}},"9OqN":function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.CTR=function(){var m=D.lib.BlockCipherMode.extend(),S=m.Encryptor=m.extend({processBlock:function(P,c){var h=this._cipher,w=h.blockSize,d=this._iv,o=this._counter;d&&(o=this._counter=d.slice(0),this._iv=void 0);var a=o.slice(0);h.encryptBlock(a,0),o[w-1]=o[w-1]+1|0;for(var n=0;n<w;n++)P[c+n]^=a[n]}});return m.Decryptor=S,m}(),D.mode.CTR})},"9VGf":function(N,J,M){"use strict";M.d(J,"a",function(){return S});var D=M("q1tI"),m=M.n(D);function S(P,c){var h=Object(D.useRef)();Object(D.useEffect)(function(){h.current=P}),Object(D.useEffect)(function(){function w(){h.current()}if(c!==null){var d=setInterval(w,c);return function(){return clearInterval(d)}}},[c])}},ALsQ:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.CFB=function(){var m=D.lib.BlockCipherMode.extend();m.Encryptor=m.extend({processBlock:function(P,c){var h=this._cipher,w=h.blockSize;S.call(this,P,c,w,h),this._prevBlock=P.slice(c,c+w)}}),m.Decryptor=m.extend({processBlock:function(P,c){var h=this._cipher,w=h.blockSize,d=P.slice(c,c+w);S.call(this,P,c,w,h),this._prevBlock=d}});function S(P,c,h,w){var d,o=this._iv;o?(d=o.slice(0),this._iv=void 0):d=this._prevBlock,w.encryptBlock(d,0);for(var a=0;a<h;a++)P[c+a]^=d[a]}return m}(),D.mode.CFB})},BJfS:function(N,J){var M=function(D){return D.replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()}).toLowerCase()};N.exports=M},BU3w:function(N,J,M){"use strict";M.d(J,"a",function(){return h});var D=M("MNnm"),m="rc-util-key";function S(w){if(w.attachTo)return w.attachTo;var d=document.querySelector("head");return d||document.body}function P(w){var d,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(D.a)())return null;var a=document.createElement("style");if((d=o.csp)===null||d===void 0?void 0:d.nonce){var n;a.nonce=(n=o.csp)===null||n===void 0?void 0:n.nonce}a.innerHTML=w;var u=S(o),p=u.firstChild;return o.prepend&&u.prepend?u.prepend(a):o.prepend&&p?u.insertBefore(a,p):u.appendChild(a),a}var c=new Map;function h(w,d){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=S(o);if(!c.has(a)){var n=P("",o),u=n.parentNode;c.set(a,u),u.removeChild(n)}var p=Array.from(c.get(a).children).find(function(i){return i.tagName==="STYLE"&&i[m]===d});if(p){var f,v;if(((f=o.csp)===null||f===void 0?void 0:f.nonce)&&p.nonce!==((v=o.csp)===null||v===void 0?void 0:v.nonce)){var g;p.nonce=(g=o.csp)===null||g===void 0?void 0:g.nonce}return p.innerHTML!==w&&(p.innerHTML=w),p}var b=P(w,o);return b[m]=d,b}},Bd2K:function(N,J,M){(function(D){D(M("VrN/"),M("osHv"))})(function(D){D.defineOption("autoCloseTags",!1,function(o,a,n){if(n!=D.Init&&n&&o.removeKeyMap("autoCloseTags"),!a)return;var u={name:"autoCloseTags"};(typeof a!="object"||a.whenClosing!==!1)&&(u["'/'"]=function(p){return h(p)}),(typeof a!="object"||a.whenOpening!==!1)&&(u["'>'"]=function(p){return P(p)}),o.addKeyMap(u)});var m=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["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 P(o){if(o.getOption("disableInput"))return D.Pass;for(var a=o.listSelections(),n=[],u=o.getOption("autoCloseTags"),p=0;p<a.length;p++){if(!a[p].empty())return D.Pass;var f=a[p].head,v=o.getTokenAt(f),g=D.innerMode(o.getMode(),v.state),b=g.state,i=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(b),s=i&&i.name;if(!s)return D.Pass;var t=g.mode.configuration=="html",T=typeof u=="object"&&u.dontCloseTags||t&&m,_=typeof u=="object"&&u.indentTags||t&&S;v.end>f.ch&&(s=s.slice(0,s.length-v.end+f.ch));var l=s.toLowerCase();if(!s||v.type=="string"&&(v.end!=f.ch||!/[\"\']/.test(v.string.charAt(v.string.length-1))||v.string.length==1)||v.type=="tag"&&i.close||v.string.indexOf("/")==f.ch-v.start-1||T&&w(T,l)>-1||d(o,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(b)||[],s,f,!0))return D.Pass;var k=typeof u=="object"&&u.emptyTags;if(k&&w(k,s)>-1){n[p]={text:"/>",newPos:D.Pos(f.line,f.ch+2)};continue}var O=_&&w(_,l)>-1;n[p]={indent:O,text:">"+(O?`
`:"")+"</"+s+">",newPos:O?D.Pos(f.line+1,0):D.Pos(f.line,f.ch+1)}}for(var x=typeof u=="object"&&u.dontIndentOnAutoClose,p=a.length-1;p>=0;p--){var y=n[p];o.replaceRange(y.text,a[p].head,a[p].anchor,"+insert");var E=o.listSelections().slice(0);E[p]={head:y.newPos,anchor:y.newPos},o.setSelections(E),!x&&y.indent&&(o.indentLine(y.newPos.line,null,!0),o.indentLine(y.newPos.line+1,null,!0))}}function c(o,a){for(var n=o.listSelections(),u=[],p=a?"/":"</",f=o.getOption("autoCloseTags"),v=typeof f=="object"&&f.dontIndentOnSlash,g=0;g<n.length;g++){if(!n[g].empty())return D.Pass;var b=n[g].head,i=o.getTokenAt(b),s=D.innerMode(o.getMode(),i.state),t=s.state;if(a&&(i.type=="string"||i.string.charAt(0)!="<"||i.start!=b.ch-1))return D.Pass;var T,_=s.mode.name!="xml"&&o.getMode().name=="htmlmixed";if(_&&s.mode.name=="javascript")T=p+"script";else if(_&&s.mode.name=="css")T=p+"style";else{var l=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(t);if(!l||l.length&&d(o,l,l[l.length-1],b))return D.Pass;T=p+l[l.length-1]}o.getLine(b.line).charAt(i.end)!=">"&&(T+=">"),u[g]=T}if(o.replaceSelections(u),n=o.listSelections(),!v)for(var g=0;g<n.length;g++)(g==n.length-1||n[g].head.line<n[g+1].head.line)&&o.indentLine(n[g].head.line)}function h(o){return o.getOption("disableInput")?D.Pass:c(o,!0)}D.commands.closeTag=function(o){return c(o)};function w(o,a){if(o.indexOf)return o.indexOf(a);for(var n=0,u=o.length;n<u;++n)if(o[n]==a)return n;return-1}function d(o,a,n,u,p){if(!D.scanForClosingTag)return!1;var f=Math.min(o.lastLine()+1,u.line+500),v=D.scanForClosingTag(o,u,null,f);if(!v||v.tag!=n)return!1;for(var g=p?1:0,b=a.length-1;b>=0&&a[b]==n;b--)++g;u=v.to;for(var b=1;b<g;b++){var i=D.scanForClosingTag(o,u,null,f);if(!i||i.tag!=n)return!1;u=i.to}return!0}})},BjJ7:function(N,J,M){"use strict";M.d(J,"d",function(){return m}),M.d(J,"c",function(){return S}),M.d(J,"e",function(){return P}),M.d(J,"b",function(){return c}),M.d(J,"a",function(){return w});var D=M("m3rI");function m(d){var o=!0;if(d.length>0){for(var a=0;a<d.length;a++)if(d[a].compile_success==0||!d[a].compile_success){o=!1;break}}else o=!1;return o}function S(d){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=[],n=0;n<d.length;n++){var u=d[n],p=o?"".concat(o,"/").concat(u.name):"".concat(u.name);a.push({title:u.name,isLeaf:!(u.type==="tree"),key:p})}return a}function P(d,o,a){for(var n=0;n<d.length;n++){var u=d[n];if(u.key===o){u.children=a;break}u.children&&P(u.children,o,a)}return d}function c(d,o,a){var n;return function(){var u=this,p=arguments,f=function(){n=null,a||d.apply(u,p)},v=a&&!n;clearTimeout(n),n=setTimeout(f,o),v&&d.apply(u,p)}}var h=!0,w=D.a.API_SERVER},"C+DQ":function(N,J,M){},D1Df:function(N,J,M){"use strict";function D(L){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(W){return typeof W}:D=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},D(L)}function m(){return m=Object.assign||function(L){for(var H=1;H<arguments.length;H++){var W=arguments[H];for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&(L[U]=W[U])}return L},m.apply(this,arguments)}function S(L,H){var W=Object.keys(L);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(L);H&&(U=U.filter(function(G){return Object.getOwnPropertyDescriptor(L,G).enumerable})),W.push.apply(W,U)}return W}function P(L){for(var H=1;H<arguments.length;H++){var W=arguments[H]!=null?arguments[H]:{};H%2?S(W,!0).forEach(function(U){v(L,U,W[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(W)):S(W).forEach(function(U){Object.defineProperty(L,U,Object.getOwnPropertyDescriptor(W,U))})}return L}function c(L,H){if(L==null)return{};var W=h(L,H),U,G;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(L);for(G=0;G<B.length;G++){if(U=B[G],H.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(L,U))continue;W[U]=L[U]}}return W}function h(L,H){if(L==null)return{};var W={},U=Object.keys(L),G,B;for(B=0;B<U.length;B++){if(G=U[B],H.indexOf(G)>=0)continue;W[G]=L[G]}return W}function w(L,H){if(!(L instanceof H))throw new TypeError("Cannot call a class as a function")}function d(L,H){for(var W=0;W<H.length;W++){var U=H[W];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(L,U.key,U)}}function o(L,H,W){return H&&d(L.prototype,H),W&&d(L,W),L}function a(L,H){return H&&(D(H)==="object"||typeof H=="function")?H:u(L)}function n(L){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},n(L)}function u(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}function p(L,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(H&&H.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),H&&f(L,H)}function f(L,H){return f=Object.setPrototypeOf||function(U,G){return U.__proto__=G,U},f(L,H)}function v(L,H,W){return H in L?Object.defineProperty(L,H,{value:W,enumerable:!0,configurable:!0,writable:!0}):L[H]=W,L}var g=M("q1tI"),b=M("17x9"),i=M("H38U"),s=M("aRTE");function t(L){for(var H="",W=0;W<L.length;W++){var U=L.charCodeAt(W);U<128?H+=String.fromCharCode(U):U<2048?(H+=String.fromCharCode(192|U>>6),H+=String.fromCharCode(128|U&63)):U<55296||U>=57344?(H+=String.fromCharCode(224|U>>12),H+=String.fromCharCode(128|U>>6&63),H+=String.fromCharCode(128|U&63)):(W++,U=65536+((U&1023)<<10|L.charCodeAt(W)&1023),H+=String.fromCharCode(240|U>>18),H+=String.fromCharCode(128|U>>12&63),H+=String.fromCharCode(128|U>>6&63),H+=String.fromCharCode(128|U&63))}return H}var T={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},_={},l=4,k=.1;function O(L){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,W=[];return L.forEach(function(U,G){var B=null;U.forEach(function(z,V){if(!z&&B!==null){W.push("M".concat(B+H," ").concat(G+H,"h").concat(V-B,"v1H").concat(B+H,"z")),B=null;return}if(V===U.length-1){if(!z)return;B===null?W.push("M".concat(V+H,",").concat(G+H," h1v1H").concat(V+H,"z")):W.push("M".concat(B+H,",").concat(G+H," h").concat(V+1-B,"v1H").concat(B+H,"z"));return}z&&B===null&&(B=V)})}),W.join("")}function x(L,H){return L.slice().map(function(W,U){return U<H.y||U>=H.y+H.h?W:W.map(function(G,B){return B<H.x||B>=H.x+H.w?G:!1})})}function y(L,H){var W=L.imageSettings,U=L.size,G=L.includeMargin;if(W==null)return null;var B=G?l:0,z=H.length+B*2,V=Math.floor(U*k),ie=z/U,ce=(W.width||V)*ie,he=(W.height||V)*ie,Ae=W.x==null?H.length/2-ce/2:W.x*ie,De=W.y==null?H.length/2-he/2:W.y*ie,pe=null;if(W.excavate){var Te=Math.floor(Ae),ye=Math.floor(De),ue=Math.ceil(ce+Ae-Te),le=Math.ceil(he+De-ye);pe={x:Te,y:ye,w:ue,h:le}}return{x:Ae,y:De,h:he,w:ce,excavation:pe}}var E=function(){try{new Path2D().addPath(new Path2D)}catch(L){return!1}return!0}(),C=function(L){p(H,L);function H(){var W,U;w(this,H);for(var G=arguments.length,B=new Array(G),z=0;z<G;z++)B[z]=arguments[z];return U=a(this,(W=n(H)).call.apply(W,[this].concat(B))),v(u(U),"_canvas",void 0),v(u(U),"_image",void 0),v(u(U),"state",{imgLoaded:!1}),v(u(U),"handleImageLoad",function(){U.setState({imgLoaded:!0})}),U}return o(H,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var U=this.props,G=U.value,B=U.size,z=U.level,V=U.bgColor,ie=U.fgColor,ce=U.includeMargin,he=U.imageSettings,Ae=new i(-1,s[z]);if(Ae.addData(t(G)),Ae.make(),this._canvas!=null){var De=this._canvas,pe=De.getContext("2d");if(!pe)return;var Te=Ae.modules;if(Te===null)return;var ye=ce?l:0,ue=Te.length+ye*2,le=y(this.props,Te);he!=null&&le!=null&&(le.excavation!=null&&(Te=x(Te,le.excavation)));var te=window.devicePixelRatio||1;De.height=De.width=B*te;var fe=B/ue*te;pe.scale(fe,fe),pe.fillStyle=V,pe.fillRect(0,0,ue,ue),pe.fillStyle=ie,E?pe.fill(new Path2D(O(Te,ye))):Te.forEach(function(q,ee){q.forEach(function(Ce,re){Ce&&pe.fillRect(re+ye,ee+ye,1,1)})}),this.state.imgLoaded&&this._image&&le!=null&&pe.drawImage(this._image,le.x+ye,le.y+ye,le.w,le.h)}}},{key:"render",value:function(){var U=this,G=this.props,B=G.value,z=G.size,V=G.level,ie=G.bgColor,ce=G.fgColor,he=G.style,Ae=G.includeMargin,De=G.imageSettings,pe=c(G,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Te=P({height:z,width:z},he),ye=null,ue=De&&De.src;return De!=null&&ue!=null&&(ye=g.createElement("img",{src:ue,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(te){return U._image=te}})),g.createElement(g.Fragment,null,g.createElement("canvas",m({style:Te,height:z,width:z,ref:function(te){return U._canvas=te}},pe)),ye)}}]),H}(g.PureComponent);v(C,"defaultProps",T);var I=function(L){p(H,L);function H(){return w(this,H),a(this,n(H).apply(this,arguments))}return o(H,[{key:"render",value:function(){var U=this.props,G=U.value,B=U.size,z=U.level,V=U.bgColor,ie=U.fgColor,ce=U.includeMargin,he=U.imageSettings,Ae=c(U,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),De=new i(-1,s[z]);De.addData(t(G)),De.make();var pe=De.modules;if(pe===null)return null;var Te=ce?l:0,ye=pe.length+Te*2,ue=y(this.props,pe),le=null;he!=null&&ue!=null&&(ue.excavation!=null&&(pe=x(pe,ue.excavation)),le=g.createElement("image",{xlinkHref:he.src,height:ue.h,width:ue.w,x:ue.x+Te,y:ue.y+Te,preserveAspectRatio:"none"}));var te=O(pe,Te);return g.createElement("svg",m({shapeRendering:"crispEdges",height:B,width:B,viewBox:"0 0 ".concat(ye," ").concat(ye)},Ae),g.createElement("path",{fill:V,d:"M0,0 h".concat(ye,"v").concat(ye,"H0z")}),g.createElement("path",{fill:ie,d:te}),le)}}]),H}(g.PureComponent);v(I,"defaultProps",T);var j=function(H){var W=H.renderAs,U=c(H,["renderAs"]),G=W==="svg"?I:C;return g.createElement(G,U)};j.defaultProps=P({renderAs:"canvas"},T),N.exports=j},Dgm7:function(N,J,M){N.exports=M.p+"static/auth.ea067b42.png"},DlQD:function(N,J,M){(function(D,m){N.exports=m()})(this,function(){"use strict";function D(Ue,Me){for(var Ne=0;Ne<Me.length;Ne++){var Ee=Me[Ne];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(Ue,Ee.key,Ee)}}function m(Ue,Me,Ne){return Me&&D(Ue.prototype,Me),Ne&&D(Ue,Ne),Ue}function S(Ue,Me){if(!Ue)return;if(typeof Ue=="string")return P(Ue,Me);var Ne=Object.prototype.toString.call(Ue).slice(8,-1);if(Ne==="Object"&&Ue.constructor&&(Ne=Ue.constructor.name),Ne==="Map"||Ne==="Set")return Array.from(Ue);if(Ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ne))return P(Ue,Me)}function P(Ue,Me){(Me==null||Me>Ue.length)&&(Me=Ue.length);for(var Ne=0,Ee=new Array(Me);Ne<Me;Ne++)Ee[Ne]=Ue[Ne];return Ee}function c(Ue,Me){var Ne;if(typeof Symbol=="undefined"||Ue[Symbol.iterator]==null){if(Array.isArray(Ue)||(Ne=S(Ue))||Me&&Ue&&typeof Ue.length=="number"){Ne&&(Ue=Ne);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 Ne=Ue[Symbol.iterator](),Ne.next.bind(Ne)}function h(Ue,Me){return Me={exports:{}},Ue(Me,Me.exports),Me.exports}var w=h(function(Ue){function Me(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Ne(Ee){Ue.exports.defaults=Ee}Ue.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ne}}),d=w.defaults,o=w.getDefaults,a=w.changeDefaults,n=/[&<>"']/,u=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,f=/[<>"']|&(?!#?\w+;)/g,v={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},g=function(Me){return v[Me]};function b(Ue,Me){if(Me){if(n.test(Ue))return Ue.replace(u,g)}else if(p.test(Ue))return Ue.replace(f,g);return Ue}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ue){return Ue.replace(i,function(Me,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var t=/(^|[^\[])\^/g;function T(Ue,Me){Ue=Ue.source||Ue,Me=Me||"";var Ne={replace:function(Se,Re){return Re=Re.source||Re,Re=Re.replace(t,"$1"),Ue=Ue.replace(Se,Re),Ne},getRegex:function(){return new RegExp(Ue,Me)}};return Ne}var _=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,Me,Ne){if(Ue){var Ee;try{Ee=decodeURIComponent(s(Ne)).replace(_,"").toLowerCase()}catch(Se){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Me&&!l.test(Ne)&&(Ne=C(Me,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Se){return null}return Ne}var O={},x=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(Ue,Me){O[" "+Ue]||(x.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=H(Ue,"/",!0)),Ue=O[" "+Ue];var Ne=Ue.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ne?Me:Ue.replace(y,"$1")+Me:Me.charAt(0)==="/"?Ne?Me:Ue.replace(E,"$1")+Me:Ue+Me}var I={exec:function(){}};function j(Ue){for(var Me=1,Ne,Ee;Me<arguments.length;Me++){Ne=arguments[Me];for(Ee in Ne)Object.prototype.hasOwnProperty.call(Ne,Ee)&&(Ue[Ee]=Ne[Ee])}return Ue}function L(Ue,Me){var Ne=Ue.replace(/\|/g,function(Re,Le,Ye){for(var tt=!1,Ct=Le;--Ct>=0&&Ye[Ct]==="\\";)tt=!tt;return tt?"|":" |"}),Ee=Ne.split(/ \|/),Se=0;if(Ee.length>Me)Ee.splice(Me);else for(;Ee.length<Me;)Ee.push("");for(;Se<Ee.length;Se++)Ee[Se]=Ee[Se].trim().replace(/\\\|/g,"|");return Ee}function H(Ue,Me,Ne){var Ee=Ue.length;if(Ee===0)return"";for(var Se=0;Se<Ee;){var Re=Ue.charAt(Ee-Se-1);if(Re===Me&&!Ne)Se++;else if(Re!==Me&&Ne)Se++;else break}return Ue.substr(0,Ee-Se)}function W(Ue,Me){if(Ue.indexOf(Me[1])===-1)return-1;for(var Ne=Ue.length,Ee=0,Se=0;Se<Ne;Se++)if(Ue[Se]==="\\")Se++;else if(Ue[Se]===Me[0])Ee++;else if(Ue[Se]===Me[1]&&(Ee--,Ee<0))return Se;return-1}function U(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:b,unescape:s,edit:T,cleanUrl:k,resolveUrl:C,noopTest:I,merge:j,splitCells:L,rtrim:H,findClosingBracket:W,checkSanitizeDeprecation:U},B=w.defaults,z=G.rtrim,V=G.splitCells,ie=G.escape,ce=G.findClosingBracket;function he(Ue,Me,Ne){var Ee=Me.href,Se=Me.title?ie(Me.title):null,Re=Ue[1].replace(/\\([\[\]])/g,"$1");return Ue[0].charAt(0)!=="!"?{type:"link",raw:Ne,href:Ee,title:Se,text:Re}:{type:"image",raw:Ne,href:Ee,title:Se,text:ie(Re)}}function Ae(Ue,Me){var Ne=Ue.match(/^(\s+)(?:```)/);if(Ne===null)return Me;var Ee=Ne[1];return Me.split(`
`).map(function(Se){var Re=Se.match(/^\s+/);if(Re===null)return Se;var Le=Re[0];return Le.length>=Ee.length?Se.slice(Ee.length):Se}).join(`
`)}var De=function(){function Ue(Ne){this.options=Ne||B}var Me=Ue.prototype;return Me.space=function(Ee){var Se=this.rules.block.newline.exec(Ee);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:`
`}},Me.code=function(Ee,Se){var Re=this.rules.block.code.exec(Ee);if(Re){var Le=Se[Se.length-1];if(Le&&Le.type==="paragraph")return{raw:Re[0],text:Re[0].trimRight()};var Ye=Re[0].replace(/^ {4}/gm,"");return{type:"code",raw:Re[0],codeBlockStyle:"indented",text:this.options.pedantic?Ye:z(Ye,`
`)}}},Me.fences=function(Ee){var Se=this.rules.block.fences.exec(Ee);if(Se){var Re=Se[0],Le=Ae(Re,Se[3]||"");return{type:"code",raw:Re,lang:Se[2]?Se[2].trim():Se[2],text:Le}}},Me.heading=function(Ee){var Se=this.rules.block.heading.exec(Ee);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Me.nptable=function(Ee){var Se=this.rules.block.nptable.exec(Ee);if(Se){var Re={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
`):[],raw:Se[0]};if(Re.header.length===Re.align.length){var Le=Re.align.length,Ye;for(Ye=0;Ye<Le;Ye++)/^ *-+: *$/.test(Re.align[Ye])?Re.align[Ye]="right":/^ *:-+: *$/.test(Re.align[Ye])?Re.align[Ye]="center":/^ *:-+ *$/.test(Re.align[Ye])?Re.align[Ye]="left":Re.align[Ye]=null;for(Le=Re.cells.length,Ye=0;Ye<Le;Ye++)Re.cells[Ye]=V(Re.cells[Ye],Re.header.length);return Re}}},Me.hr=function(Ee){var Se=this.rules.block.hr.exec(Ee);if(Se)return{type:"hr",raw:Se[0]}},Me.blockquote=function(Ee){var Se=this.rules.block.blockquote.exec(Ee);if(Se){var Re=Se[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Se[0],text:Re}}},Me.list=function(Ee){var Se=this.rules.block.list.exec(Ee);if(Se){for(var Re=Se[0],Le=Se[2],Ye=Le.length>1,tt=Le[Le.length-1]===")",Ct={type:"list",raw:Re,ordered:Ye,start:Ye?+Le.slice(0,-1):"",loose:!1,items:[]},At=Se[0].match(this.rules.block.item),rr=!1,gt,or,Zt,Et,jr,Kr,Fr,rn=At.length,Er=0;Er<rn;Er++)gt=At[Er],Re=gt,or=gt.length,gt=gt.replace(/^ *([*+-]|\d+[.)]) */,""),~gt.indexOf(`
`)&&(or-=gt.length,gt=this.options.pedantic?gt.replace(/^ {1,4}/gm,""):gt.replace(new RegExp("^ {1,"+or+"}","gm"),"")),Er!==rn-1&&(Zt=this.rules.block.bullet.exec(At[Er+1])[0],(Ye?Zt.length===1||!tt&&Zt[Zt.length-1]===")":Zt.length>1||this.options.smartLists&&Zt!==Le)&&(Et=At.slice(Er+1).join(`
`),Ct.raw=Ct.raw.substring(0,Ct.raw.length-Et.length),Er=rn-1)),jr=rr||/\n\n(?!\s*$)/.test(gt),Er!==rn-1&&(rr=gt.charAt(gt.length-1)===`
`,jr||(jr=rr)),jr&&(Ct.loose=!0),Kr=/^\[[ xX]\] /.test(gt),Fr=void 0,Kr&&(Fr=gt[1]!==" ",gt=gt.replace(/^\[[ xX]\] +/,"")),Ct.items.push({type:"list_item",raw:Re,task:Kr,checked:Fr,loose:jr,text:gt});return Ct}},Me.html=function(Ee){var Se=this.rules.block.html.exec(Ee);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):ie(Se[0]):Se[0]}},Me.def=function(Ee){var Se=this.rules.block.def.exec(Ee);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var Re=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:Re,raw:Se[0],href:Se[2],title:Se[3]}}},Me.table=function(Ee){var Se=this.rules.block.table.exec(Ee);if(Se){var Re={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
`):[]};if(Re.header.length===Re.align.length){Re.raw=Se[0];var Le=Re.align.length,Ye;for(Ye=0;Ye<Le;Ye++)/^ *-+: *$/.test(Re.align[Ye])?Re.align[Ye]="right":/^ *:-+: *$/.test(Re.align[Ye])?Re.align[Ye]="center":/^ *:-+ *$/.test(Re.align[Ye])?Re.align[Ye]="left":Re.align[Ye]=null;for(Le=Re.cells.length,Ye=0;Ye<Le;Ye++)Re.cells[Ye]=V(Re.cells[Ye].replace(/^ *\| *| *\| *$/g,""),Re.header.length);return Re}}},Me.lheading=function(Ee){var Se=this.rules.block.lheading.exec(Ee);if(Se)return{type:"heading",raw:Se[0],depth:Se[2].charAt(0)==="="?1:2,text:Se[1]}},Me.paragraph=function(Ee){var Se=this.rules.block.paragraph.exec(Ee);if(Se)return{type:"paragraph",raw:Se[0],text:Se[1].charAt(Se[1].length-1)===`
`?Se[1].slice(0,-1):Se[1]}},Me.text=function(Ee,Se){var Re=this.rules.block.text.exec(Ee);if(Re){var Le=Se[Se.length-1];return Le&&Le.type==="text"?{raw:Re[0],text:Re[0]}:{type:"text",raw:Re[0],text:Re[0]}}},Me.escape=function(Ee){var Se=this.rules.inline.escape.exec(Ee);if(Se)return{type:"escape",raw:Se[0],text:ie(Se[1])}},Me.tag=function(Ee,Se,Re){var Le=this.rules.inline.tag.exec(Ee);if(Le)return!Se&&/^<a /i.test(Le[0])?Se=!0:Se&&/^<\/a>/i.test(Le[0])&&(Se=!1),!Re&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?Re=!0:Re&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(Re=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:Se,inRawBlock:Re,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ie(Le[0]):Le[0]}},Me.link=function(Ee){var Se=this.rules.inline.link.exec(Ee);if(Se){var Re=ce(Se[2],"()");if(Re>-1){var Le=Se[0].indexOf("!")===0?5:4,Ye=Le+Se[1].length+Re;Se[2]=Se[2].substring(0,Re),Se[0]=Se[0].substring(0,Ye).trim(),Se[3]=""}var tt=Se[2],Ct="";if(this.options.pedantic){var At=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(tt);At?(tt=At[1],Ct=At[3]):Ct=""}else Ct=Se[3]?Se[3].slice(1,-1):"";tt=tt.trim().replace(/^<([\s\S]*)>$/,"$1");var rr=he(Se,{href:tt&&tt.replace(this.rules.inline._escapes,"$1"),title:Ct&&Ct.replace(this.rules.inline._escapes,"$1")},Se[0]);return rr}},Me.reflink=function(Ee,Se){var Re;if((Re=this.rules.inline.reflink.exec(Ee))||(Re=this.rules.inline.nolink.exec(Ee))){var Le=(Re[2]||Re[1]).replace(/\s+/g," ");if(Le=Se[Le.toLowerCase()],!Le||!Le.href){var Ye=Re[0].charAt(0);return{type:"text",raw:Ye,text:Ye}}var tt=he(Re,Le,Re[0]);return tt}},Me.strong=function(Ee,Se,Re){Re===void 0&&(Re="");var Le=this.rules.inline.strong.start.exec(Ee);if(Le&&(!Le[1]||Le[1]&&(Re===""||this.rules.inline.punctuation.exec(Re)))){Se=Se.slice(-1*Ee.length);var Ye=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ye.lastIndex=0;for(var tt;(Le=Ye.exec(Se))!=null;)if(tt=this.rules.inline.strong.middle.exec(Se.slice(0,Le.index+3)),tt)return{type:"strong",raw:Ee.slice(0,tt[0].length),text:Ee.slice(2,tt[0].length-2)}}},Me.em=function(Ee,Se,Re){Re===void 0&&(Re="");var Le=this.rules.inline.em.start.exec(Ee);if(Le&&(!Le[1]||Le[1]&&(Re===""||this.rules.inline.punctuation.exec(Re)))){Se=Se.slice(-1*Ee.length);var Ye=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ye.lastIndex=0;for(var tt;(Le=Ye.exec(Se))!=null;)if(tt=this.rules.inline.em.middle.exec(Se.slice(0,Le.index+2)),tt)return{type:"em",raw:Ee.slice(0,tt[0].length),text:Ee.slice(1,tt[0].length-1)}}},Me.codespan=function(Ee){var Se=this.rules.inline.code.exec(Ee);if(Se){var Re=Se[2].replace(/\n/g," "),Le=/[^ ]/.test(Re),Ye=Re.startsWith(" ")&&Re.endsWith(" ");return Le&&Ye&&(Re=Re.substring(1,Re.length-1)),Re=ie(Re,!0),{type:"codespan",raw:Se[0],text:Re}}},Me.br=function(Ee){var Se=this.rules.inline.br.exec(Ee);if(Se)return{type:"br",raw:Se[0]}},Me.del=function(Ee){var Se=this.rules.inline.del.exec(Ee);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Me.autolink=function(Ee,Se){var Re=this.rules.inline.autolink.exec(Ee);if(Re){var Le,Ye;return Re[2]==="@"?(Le=ie(this.options.mangle?Se(Re[1]):Re[1]),Ye="mailto:"+Le):(Le=ie(Re[1]),Ye=Le),{type:"link",raw:Re[0],text:Le,href:Ye,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.url=function(Ee,Se){var Re;if(Re=this.rules.inline.url.exec(Ee)){var Le,Ye;if(Re[2]==="@")Le=ie(this.options.mangle?Se(Re[0]):Re[0]),Ye="mailto:"+Le;else{var tt;do tt=Re[0],Re[0]=this.rules.inline._backpedal.exec(Re[0])[0];while(tt!==Re[0]);Le=ie(Re[0]),Re[1]==="www."?Ye="http://"+Le:Ye=Le}return{type:"link",raw:Re[0],text:Le,href:Ye,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.inlineText=function(Ee,Se,Re){var Le=this.rules.inline.text.exec(Ee);if(Le){var Ye;return Se?Ye=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ie(Le[0]):Le[0]:Ye=ie(this.options.smartypants?Re(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Ye}}},Ue}(),pe=G.noopTest,Te=G.edit,ye=G.merge,ue={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]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Te(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Te(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Te(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=/<!--(?!-?>)[\s\S]*?-->/,ue.html=Te(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Te(ue._paragraph).replace("hr",ue.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",ue._tag).getRegex(),ue.blockquote=Te(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=ye({},ue),ue.gfm=ye({},ue.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*|$)"}),ue.gfm.nptable=Te(ue.gfm.nptable).replace("hr",ue.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",ue._tag).getRegex(),ue.gfm.table=Te(ue.gfm.table).replace("hr",ue.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",ue._tag).getRegex(),ue.pedantic=ye({},ue.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:Te(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={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])/};le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",le.punctuation=Te(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Te(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Te(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Te(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Te(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Te(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Te(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Te(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Te(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Te(le._blockSkip,"g").getRegex(),le.overlapSkip=Te(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,le.autolink=Te(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Te(le.tag).replace("comment",ue._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Te(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Te(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Te(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=ye({},le),le.pedantic=ye({},le.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=ye({},le.normal,{escape:Te(le.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),le.gfm.url=Te(le.gfm.url,"i").replace("email",le.gfm._extended_email).getRegex(),le.breaks=ye({},le.gfm,{br:Te(le.br).replace("{2,}","*").getRegex(),text:Te(le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var te={block:ue,inline:le},fe=w.defaults,q=te.block,ee=te.inline;function Ce(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 re(Ue){var Me="",Ne,Ee,Se=Ue.length;for(Ne=0;Ne<Se;Ne++)Ee=Ue.charCodeAt(Ne),Math.random()>.5&&(Ee="x"+Ee.toString(16)),Me+="&#"+Ee+";";return Me}var Q=function(){function Ue(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||fe,this.options.tokenizer=this.options.tokenizer||new De,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:q.normal,inline:ee.normal};this.options.pedantic?(Ee.block=q.pedantic,Ee.inline=ee.pedantic):this.options.gfm&&(Ee.block=q.gfm,this.options.breaks?Ee.inline=ee.breaks:Ee.inline=ee.gfm),this.tokenizer.rules=Ee}Ue.lex=function(Ee,Se){var Re=new Ue(Se);return Re.lex(Ee)};var Me=Ue.prototype;return Me.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},Me.blockTokens=function(Ee,Se,Re){Se===void 0&&(Se=[]),Re===void 0&&(Re=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Le,Ye,tt,Ct;Ee;){if(Le=this.tokenizer.space(Ee)){Ee=Ee.substring(Le.raw.length),Le.type&&Se.push(Le);continue}if(Le=this.tokenizer.code(Ee,Se)){Ee=Ee.substring(Le.raw.length),Le.type?Se.push(Le):(Ct=Se[Se.length-1],Ct.raw+=`
`+Le.raw,Ct.text+=`
`+Le.text);continue}if(Le=this.tokenizer.fences(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.heading(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.hr(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],Re),Se.push(Le);continue}if(Le=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Le.raw.length),tt=Le.items.length,Ye=0;Ye<tt;Ye++)Le.items[Ye].tokens=this.blockTokens(Le.items[Ye].text,[],!1);Se.push(Le);continue}if(Le=this.tokenizer.html(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Re&&(Le=this.tokenizer.def(Ee))){Ee=Ee.substring(Le.raw.length),this.tokens.links[Le.tag]||(this.tokens.links[Le.tag]={href:Le.href,title:Le.title});continue}if(Le=this.tokenizer.table(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.lheading(Ee)){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Re&&(Le=this.tokenizer.paragraph(Ee))){Ee=Ee.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.text(Ee,Se)){Ee=Ee.substring(Le.raw.length),Le.type?Se.push(Le):(Ct=Se[Se.length-1],Ct.raw+=`
`+Le.raw,Ct.text+=`
`+Le.text);continue}if(Ee){var At="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(At);break}else throw new Error(At)}}return Se},Me.inline=function(Ee){var Se,Re,Le,Ye,tt,Ct,At=Ee.length;for(Se=0;Se<At;Se++){Ct=Ee[Se];switch(Ct.type){case"paragraph":case"text":case"heading":{Ct.tokens=[],this.inlineTokens(Ct.text,Ct.tokens);break}case"table":{for(Ct.tokens={header:[],cells:[]},Ye=Ct.header.length,Re=0;Re<Ye;Re++)Ct.tokens.header[Re]=[],this.inlineTokens(Ct.header[Re],Ct.tokens.header[Re]);for(Ye=Ct.cells.length,Re=0;Re<Ye;Re++)for(tt=Ct.cells[Re],Ct.tokens.cells[Re]=[],Le=0;Le<tt.length;Le++)Ct.tokens.cells[Re][Le]=[],this.inlineTokens(tt[Le],Ct.tokens.cells[Re][Le]);break}case"blockquote":{this.inline(Ct.tokens);break}case"list":{for(Ye=Ct.items.length,Re=0;Re<Ye;Re++)this.inline(Ct.items[Re].tokens);break}}}return Ee},Me.inlineTokens=function(Ee,Se,Re,Le,Ye){Se===void 0&&(Se=[]),Re===void 0&&(Re=!1),Le===void 0&&(Le=!1),Ye===void 0&&(Ye="");var tt,Ct=Ee,At;if(this.tokens.links){var rr=Object.keys(this.tokens.links);if(rr.length>0)for(;(At=this.tokenizer.rules.inline.reflinkSearch.exec(Ct))!=null;)rr.includes(At[0].slice(At[0].lastIndexOf("[")+1,-1))&&(Ct=Ct.slice(0,At.index)+"["+"a".repeat(At[0].length-2)+"]"+Ct.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(At=this.tokenizer.rules.inline.blockSkip.exec(Ct))!=null;)Ct=Ct.slice(0,At.index)+"["+"a".repeat(At[0].length-2)+"]"+Ct.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ee;){if(tt=this.tokenizer.escape(Ee)){Ee=Ee.substring(tt.raw.length),Se.push(tt);continue}if(tt=this.tokenizer.tag(Ee,Re,Le)){Ee=Ee.substring(tt.raw.length),Re=tt.inLink,Le=tt.inRawBlock,Se.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,Le)),Se.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,Le)),Se.push(tt);continue}if(tt=this.tokenizer.strong(Ee,Ct,Ye)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],Re,Le),Se.push(tt);continue}if(tt=this.tokenizer.em(Ee,Ct,Ye)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],Re,Le),Se.push(tt);continue}if(tt=this.tokenizer.codespan(Ee)){Ee=Ee.substring(tt.raw.length),Se.push(tt);continue}if(tt=this.tokenizer.br(Ee)){Ee=Ee.substring(tt.raw.length),Se.push(tt);continue}if(tt=this.tokenizer.del(Ee)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],Re,Le),Se.push(tt);continue}if(tt=this.tokenizer.autolink(Ee,re)){Ee=Ee.substring(tt.raw.length),Se.push(tt);continue}if(!Re&&(tt=this.tokenizer.url(Ee,re))){Ee=Ee.substring(tt.raw.length),Se.push(tt);continue}if(tt=this.tokenizer.inlineText(Ee,Le,Ce)){Ee=Ee.substring(tt.raw.length),Ye=tt.raw.slice(-1),Se.push(tt);continue}if(Ee){var gt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(gt);break}else throw new Error(gt)}}return Se},m(Ue,null,[{key:"rules",get:function(){return{block:q,inline:ee}}}]),Ue}(),X=w.defaults,Z=G.cleanUrl,xe=G.escape,ve=function(){function Ue(Ne){this.options=Ne||X}var Me=Ue.prototype;return Me.code=function(Ee,Se,Re){var Le=(Se||"").match(/\S*/)[0];if(this.options.highlight){var Ye=this.options.highlight(Ee,Le);Ye!=null&&Ye!==Ee&&(Re=!0,Ee=Ye)}return Le?'<pre><code class="'+this.options.langPrefix+xe(Le,!0)+'">'+(Re?Ee:xe(Ee,!0))+`</code></pre>
`:"<pre><code>"+(Re?Ee:xe(Ee,!0))+`</code></pre>
`},Me.blockquote=function(Ee){return`<blockquote>
`+Ee+`</blockquote>
`},Me.html=function(Ee){return Ee},Me.heading=function(Ee,Se,Re,Le){return this.options.headerIds?"<h"+Se+' id="'+this.options.headerPrefix+Le.slug(Re)+'">'+Ee+"</h"+Se+`>
`:"<h"+Se+">"+Ee+"</h"+Se+`>
`},Me.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Me.list=function(Ee,Se,Re){var Le=Se?"ol":"ul",Ye=Se&&Re!==1?' start="'+Re+'"':"";return"<"+Le+Ye+`>
`+Ee+"</"+Le+`>
`},Me.listitem=function(Ee){return"<li>"+Ee+`</li>
`},Me.checkbox=function(Ee){return"<input "+(Ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Me.paragraph=function(Ee){return"<p>"+Ee+`</p>
`},Me.table=function(Ee,Se){return Se&&(Se="<tbody>"+Se+"</tbody>"),`<table>
<thead>
`+Ee+`</thead>
`+Se+`</table>
`},Me.tablerow=function(Ee){return`<tr>
`+Ee+`</tr>
`},Me.tablecell=function(Ee,Se){var Re=Se.header?"th":"td",Le=Se.align?"<"+Re+' align="'+Se.align+'">':"<"+Re+">";return Le+Ee+"</"+Re+`>
`},Me.strong=function(Ee){return"<strong>"+Ee+"</strong>"},Me.em=function(Ee){return"<em>"+Ee+"</em>"},Me.codespan=function(Ee){return"<code>"+Ee+"</code>"},Me.br=function(){return this.options.xhtml?"<br/>":"<br>"},Me.del=function(Ee){return"<del>"+Ee+"</del>"},Me.link=function(Ee,Se,Re){if(Ee=Z(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return Re;var Le='<a href="'+xe(Ee)+'"';return Se&&(Le+=' title="'+Se+'"'),Le+=">"+Re+"</a>",Le},Me.image=function(Ee,Se,Re){if(Ee=Z(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return Re;var Le='<img src="'+Ee+'" alt="'+Re+'"';return Se&&(Le+=' title="'+Se+'"'),Le+=this.options.xhtml?"/>":">",Le},Me.text=function(Ee){return Ee},Ue}(),Oe=function(){function Ue(){}var Me=Ue.prototype;return Me.strong=function(Ee){return Ee},Me.em=function(Ee){return Ee},Me.codespan=function(Ee){return Ee},Me.del=function(Ee){return Ee},Me.html=function(Ee){return Ee},Me.text=function(Ee){return Ee},Me.link=function(Ee,Se,Re){return""+Re},Me.image=function(Ee,Se,Re){return""+Re},Me.br=function(){return""},Ue}(),Qe=function(){function Ue(){this.seen={}}var Me=Ue.prototype;return Me.slug=function(Ee){var Se=Ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var Re=Se;do this.seen[Re]++,Se=Re+"-"+this.seen[Re];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ue}(),rt=w.defaults,nt=G.unescape,ct=function(){function Ue(Ne){this.options=Ne||rt,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Qe}Ue.parse=function(Ee,Se){var Re=new Ue(Se);return Re.parse(Ee)};var Me=Ue.prototype;return Me.parse=function(Ee,Se){Se===void 0&&(Se=!0);var Re="",Le,Ye,tt,Ct,At,rr,gt,or,Zt,Et,jr,Kr,Fr,rn,Er,un,Jr,Wt,_n=Ee.length;for(Le=0;Le<_n;Le++){Et=Ee[Le];switch(Et.type){case"space":continue;case"hr":{Re+=this.renderer.hr();continue}case"heading":{Re+=this.renderer.heading(this.parseInline(Et.tokens),Et.depth,nt(this.parseInline(Et.tokens,this.textRenderer)),this.slugger);continue}case"code":{Re+=this.renderer.code(Et.text,Et.lang,Et.escaped);continue}case"table":{for(or="",gt="",Ct=Et.header.length,Ye=0;Ye<Ct;Ye++)gt+=this.renderer.tablecell(this.parseInline(Et.tokens.header[Ye]),{header:!0,align:Et.align[Ye]});for(or+=this.renderer.tablerow(gt),Zt="",Ct=Et.cells.length,Ye=0;Ye<Ct;Ye++){for(rr=Et.tokens.cells[Ye],gt="",At=rr.length,tt=0;tt<At;tt++)gt+=this.renderer.tablecell(this.parseInline(rr[tt]),{header:!1,align:Et.align[tt]});Zt+=this.renderer.tablerow(gt)}Re+=this.renderer.table(or,Zt);continue}case"blockquote":{Zt=this.parse(Et.tokens),Re+=this.renderer.blockquote(Zt);continue}case"list":{for(jr=Et.ordered,Kr=Et.start,Fr=Et.loose,Ct=Et.items.length,Zt="",Ye=0;Ye<Ct;Ye++)Er=Et.items[Ye],un=Er.checked,Jr=Er.task,rn="",Er.task&&(Wt=this.renderer.checkbox(un),Fr?Er.tokens.length>0&&Er.tokens[0].type==="text"?(Er.tokens[0].text=Wt+" "+Er.tokens[0].text,Er.tokens[0].tokens&&Er.tokens[0].tokens.length>0&&Er.tokens[0].tokens[0].type==="text"&&(Er.tokens[0].tokens[0].text=Wt+" "+Er.tokens[0].tokens[0].text)):Er.tokens.unshift({type:"text",text:Wt}):rn+=Wt),rn+=this.parse(Er.tokens,Fr),Zt+=this.renderer.listitem(rn,Jr,un);Re+=this.renderer.list(Zt,jr,Kr);continue}case"html":{Re+=this.renderer.html(Et.text);continue}case"paragraph":{Re+=this.renderer.paragraph(this.parseInline(Et.tokens));continue}case"text":{for(Zt=Et.tokens?this.parseInline(Et.tokens):Et.text;Le+1<_n&&Ee[Le+1].type==="text";)Et=Ee[++Le],Zt+=`
`+(Et.tokens?this.parseInline(Et.tokens):Et.text);Re+=Se?this.renderer.paragraph(Zt):Zt;continue}default:{var Cn='Token with "'+Et.type+'" type was not found.';if(this.options.silent){console.error(Cn);return}else throw new Error(Cn)}}}return Re},Me.parseInline=function(Ee,Se){Se=Se||this.renderer;var Re="",Le,Ye,tt=Ee.length;for(Le=0;Le<tt;Le++){Ye=Ee[Le];switch(Ye.type){case"escape":{Re+=Se.text(Ye.text);break}case"html":{Re+=Se.html(Ye.text);break}case"link":{Re+=Se.link(Ye.href,Ye.title,this.parseInline(Ye.tokens,Se));break}case"image":{Re+=Se.image(Ye.href,Ye.title,Ye.text);break}case"strong":{Re+=Se.strong(this.parseInline(Ye.tokens,Se));break}case"em":{Re+=Se.em(this.parseInline(Ye.tokens,Se));break}case"codespan":{Re+=Se.codespan(Ye.text);break}case"br":{Re+=Se.br();break}case"del":{Re+=Se.del(this.parseInline(Ye.tokens,Se));break}case"text":{Re+=Se.text(Ye.text);break}default:{var Ct='Token with "'+Ye.type+'" type was not found.';if(this.options.silent){console.error(Ct);return}else throw new Error(Ct)}}}return Re},Ue}(),dt=G.merge,pt=G.checkSanitizeDeprecation,He=G.escape,Pe=w.getDefaults,at=w.changeDefaults,ft=w.defaults;function Je(Ue,Me,Ne){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 Me=="function"&&(Ne=Me,Me=null),Me=dt({},Je.defaults,Me||{}),pt(Me),Ne){var Ee=Me.highlight,Se;try{Se=Q.lex(Ue,Me)}catch(tt){return Ne(tt)}var Re=function(Ct){var At;if(!Ct)try{At=ct.parse(Se,Me)}catch(rr){Ct=rr}return Me.highlight=Ee,Ct?Ne(Ct):Ne(null,At)};if(!Ee||Ee.length<3)return Re();if(delete Me.highlight,!Se.length)return Re();var Le=0;Je.walkTokens(Se,function(tt){tt.type==="code"&&(Le++,setTimeout(function(){Ee(tt.text,tt.lang,function(Ct,At){if(Ct)return Re(Ct);At!=null&&At!==tt.text&&(tt.text=At,tt.escaped=!0),Le--,Le===0&&Re()})},0))}),Le===0&&Re();return}try{var Ye=Q.lex(Ue,Me);return Me.walkTokens&&Je.walkTokens(Ye,Me.walkTokens),ct.parse(Ye,Me)}catch(tt){if(tt.message+=`
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+He(tt.message+"",!0)+"</pre>";throw tt}}Je.options=Je.setOptions=function(Ue){return dt(Je.defaults,Ue),at(Je.defaults),Je},Je.getDefaults=Pe,Je.defaults=ft,Je.use=function(Ue){var Me=dt({},Ue);if(Ue.renderer&&function(){var Ee=Je.defaults.renderer||new ve,Se=function(Ye){var tt=Ee[Ye];Ee[Ye]=function(){for(var Ct=arguments.length,At=new Array(Ct),rr=0;rr<Ct;rr++)At[rr]=arguments[rr];var gt=Ue.renderer[Ye].apply(Ee,At);return gt===!1&&(gt=tt.apply(Ee,At)),gt}};for(var Re in Ue.renderer)Se(Re);Me.renderer=Ee}(),Ue.tokenizer&&function(){var Ee=Je.defaults.tokenizer||new De,Se=function(Ye){var tt=Ee[Ye];Ee[Ye]=function(){for(var Ct=arguments.length,At=new Array(Ct),rr=0;rr<Ct;rr++)At[rr]=arguments[rr];var gt=Ue.tokenizer[Ye].apply(Ee,At);return gt===!1&&(gt=tt.apply(Ee,At)),gt}};for(var Re in Ue.tokenizer)Se(Re);Me.tokenizer=Ee}(),Ue.walkTokens){var Ne=Je.defaults.walkTokens;Me.walkTokens=function(Ee){Ue.walkTokens(Ee),Ne&&Ne(Ee)}}Je.setOptions(Me)},Je.walkTokens=function(Ue,Me){for(var Ne=c(Ue),Ee;!(Ee=Ne()).done;){var Se=Ee.value;Me(Se);switch(Se.type){case"table":{for(var Re=c(Se.tokens.header),Le;!(Le=Re()).done;){var Ye=Le.value;Je.walkTokens(Ye,Me)}for(var tt=c(Se.tokens.cells),Ct;!(Ct=tt()).done;)for(var At=Ct.value,rr=c(At),gt;!(gt=rr()).done;){var or=gt.value;Je.walkTokens(or,Me)}break}case"list":{Je.walkTokens(Se.items,Me);break}default:Se.tokens&&Je.walkTokens(Se.tokens,Me)}}},Je.Parser=ct,Je.parser=ct.parse,Je.Renderer=ve,Je.TextRenderer=Oe,Je.Lexer=Q,Je.lexer=Q.lex,Je.Tokenizer=De,Je.Slugger=Qe,Je.parse=Je;var st=Je;return st})},E4JC:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.StreamCipher,c=m.algo,h=[],w=[],d=[],o=c.Rabbit=P.extend({_doReset:function(){for(var n=this._key.words,u=this.cfg.iv,p=0;p<4;p++)n[p]=(n[p]<<8|n[p]>>>24)&16711935|(n[p]<<24|n[p]>>>8)&4278255360;var f=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],v=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 p=0;p<4;p++)a.call(this);for(var p=0;p<8;p++)v[p]^=f[p+4&7];if(u){var g=u.words,b=g[0],i=g[1],s=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,T=s>>>16|t&4294901760,_=t<<16|s&65535;v[0]^=s,v[1]^=T,v[2]^=t,v[3]^=_,v[4]^=s,v[5]^=T,v[6]^=t,v[7]^=_;for(var p=0;p<4;p++)a.call(this)}},_doProcessBlock:function(n,u){var p=this._X;a.call(this),h[0]=p[0]^p[5]>>>16^p[3]<<16,h[1]=p[2]^p[7]>>>16^p[5]<<16,h[2]=p[4]^p[1]>>>16^p[7]<<16,h[3]=p[6]^p[3]>>>16^p[1]<<16;for(var f=0;f<4;f++)h[f]=(h[f]<<8|h[f]>>>24)&16711935|(h[f]<<24|h[f]>>>8)&4278255360,n[u+f]^=h[f]},blockSize:128/32,ivSize:64/32});function a(){for(var n=this._X,u=this._C,p=0;p<8;p++)w[p]=u[p];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<w[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<w[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<w[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<w[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<w[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<w[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<w[6]>>>0?1:0)|0,this._b=u[7]>>>0<w[7]>>>0?1:0;for(var p=0;p<8;p++){var f=n[p]+u[p],v=f&65535,g=f>>>16,b=((v*v>>>17)+v*g>>>15)+g*g,i=((f&4294901760)*f|0)+((f&65535)*f|0);d[p]=b^i}n[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,n[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,n[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,n[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,n[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,n[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,n[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,n[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}m.Rabbit=P._createHelper(o)}(),D.Rabbit})},ELLl:function(N,J,M){(function(D){D(M("VrN/"))})(function(D){var m={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=D.Pos;D.defineOption("autoCloseBrackets",!1,function(v,g,b){b&&b!=D.Init&&(v.removeKeyMap(c),v.state.closeBrackets=null),g&&(h(P(g,"pairs")),v.state.closeBrackets=g,v.addKeyMap(c))});function P(v,g){return g=="pairs"&&typeof v=="string"?v:typeof v=="object"&&v[g]!=null?v[g]:m[g]}var c={Backspace:o,Enter:a};function h(v){for(var g=0;g<v.length;g++){var b=v.charAt(g),i="'"+b+"'";c[i]||(c[i]=w(b))}}h(m.pairs+"`");function w(v){return function(g){return u(g,v)}}function d(v){var g=v.state.closeBrackets;if(!g||g.override)return g;var b=v.getModeAt(v.getCursor());return b.closeBrackets||g}function o(v){var g=d(v);if(!g||v.getOption("disableInput"))return D.Pass;for(var b=P(g,"pairs"),i=v.listSelections(),s=0;s<i.length;s++){if(!i[s].empty())return D.Pass;var t=p(v,i[s].head);if(!t||b.indexOf(t)%2!=0)return D.Pass}for(var s=i.length-1;s>=0;s--){var T=i[s].head;v.replaceRange("",S(T.line,T.ch-1),S(T.line,T.ch+1),"+delete")}}function a(v){var g=d(v),b=g&&P(g,"explode");if(!b||v.getOption("disableInput"))return D.Pass;for(var i=v.listSelections(),s=0;s<i.length;s++){if(!i[s].empty())return D.Pass;var t=p(v,i[s].head);if(!t||b.indexOf(t)%2!=0)return D.Pass}v.operation(function(){var T=v.lineSeparator()||`
`;v.replaceSelection(T+T,null),v.execCommand("goCharLeft"),i=v.listSelections();for(var _=0;_<i.length;_++){var l=i[_].head.line;v.indentLine(l,null,!0),v.indentLine(l+1,null,!0)}})}function n(v){var g=D.cmpPos(v.anchor,v.head)>0;return{anchor:new S(v.anchor.line,v.anchor.ch+(g?-1:1)),head:new S(v.head.line,v.head.ch+(g?1:-1))}}function u(v,g){var b=d(v);if(!b||v.getOption("disableInput"))return D.Pass;var i=P(b,"pairs"),s=i.indexOf(g);if(s==-1)return D.Pass;for(var t=P(b,"closeBefore"),T=P(b,"triples"),_=i.charAt(s+1)==g,l=v.listSelections(),k=s%2==0,O,x=0;x<l.length;x++){var y=l[x],E=y.head,C,I=v.getRange(E,S(E.line,E.ch+1));if(k&&!y.empty())C="surround";else if((_||!k)&&I==g)_&&f(v,E)?C="both":T.indexOf(g)>=0&&v.getRange(E,S(E.line,E.ch+3))==g+g+g?C="skipThree":C="skip";else if(_&&E.ch>1&&T.indexOf(g)>=0&&v.getRange(S(E.line,E.ch-2),E)==g+g){if(E.ch>2&&/\bstring/.test(v.getTokenTypeAt(S(E.line,E.ch-2))))return D.Pass;C="addFour"}else if(_){var j=E.ch==0?" ":v.getRange(S(E.line,E.ch-1),E);if(!D.isWordChar(I)&&j!=g&&!D.isWordChar(j))C="both";else return D.Pass}else if(k&&(I.length===0||/\s/.test(I)||t.indexOf(I)>-1))C="both";else return D.Pass;if(!O)O=C;else if(O!=C)return D.Pass}var L=s%2?i.charAt(s-1):g,H=s%2?g:i.charAt(s+1);v.operation(function(){if(O=="skip")v.execCommand("goCharRight");else if(O=="skipThree")for(var W=0;W<3;W++)v.execCommand("goCharRight");else if(O=="surround"){for(var U=v.getSelections(),W=0;W<U.length;W++)U[W]=L+U[W]+H;v.replaceSelections(U,"around"),U=v.listSelections().slice();for(var W=0;W<U.length;W++)U[W]=n(U[W]);v.setSelections(U)}else O=="both"?(v.replaceSelection(L+H,null),v.triggerElectric(L+H),v.execCommand("goCharLeft")):O=="addFour"&&(v.replaceSelection(L+L+L+L,"before"),v.execCommand("goCharRight"))})}function p(v,g){var b=v.getRange(S(g.line,g.ch-1),S(g.line,g.ch+1));return b.length==2?b:null}function f(v,g){var b=v.getTokenAt(S(g.line,g.ch+1));return/\bstring/.test(b.type)&&b.start==g.ch&&(g.ch==0||!/\bstring/.test(v.getTokenTypeAt(g)))}})},ELcG:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){/** @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(m){var S=D,P=S.lib,c=P.WordArray,h=P.Hasher,w=S.algo,d=c.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]),o=c.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]),a=c.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=c.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]),u=c.create([0,1518500249,1859775393,2400959708,2840853838]),p=c.create([1352829926,1548603684,1836072691,2053994217,0]),f=w.RIPEMD160=h.extend({_doReset:function(){this._hash=c.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,_){for(var l=0;l<16;l++){var k=_+l,O=T[k];T[k]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var x=this._hash.words,y=u.words,E=p.words,C=d.words,I=o.words,j=a.words,L=n.words,H,W,U,G,B,z,V,ie,ce,he;z=H=x[0],V=W=x[1],ie=U=x[2],ce=G=x[3],he=B=x[4];for(var Ae,l=0;l<80;l+=1)Ae=H+T[_+C[l]]|0,l<16?Ae+=v(W,U,G)+y[0]:l<32?Ae+=g(W,U,G)+y[1]:l<48?Ae+=b(W,U,G)+y[2]:l<64?Ae+=i(W,U,G)+y[3]:Ae+=s(W,U,G)+y[4],Ae=Ae|0,Ae=t(Ae,j[l]),Ae=Ae+B|0,H=B,B=G,G=t(U,10),U=W,W=Ae,Ae=z+T[_+I[l]]|0,l<16?Ae+=s(V,ie,ce)+E[0]:l<32?Ae+=i(V,ie,ce)+E[1]:l<48?Ae+=b(V,ie,ce)+E[2]:l<64?Ae+=g(V,ie,ce)+E[3]:Ae+=v(V,ie,ce)+E[4],Ae=Ae|0,Ae=t(Ae,L[l]),Ae=Ae+he|0,z=he,he=ce,ce=t(ie,10),ie=V,V=Ae;Ae=x[1]+U+ce|0,x[1]=x[2]+G+he|0,x[2]=x[3]+B+z|0,x[3]=x[4]+H+V|0,x[4]=x[0]+W+ie|0,x[0]=Ae},_doFinalize:function(){var T=this._data,_=T.words,l=this._nDataBytes*8,k=T.sigBytes*8;_[k>>>5]|=128<<24-k%32,_[(k+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,T.sigBytes=(_.length+1)*4,this._process();for(var O=this._hash,x=O.words,y=0;y<5;y++){var E=x[y];x[y]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return O},clone:function(){var T=h.clone.call(this);return T._hash=this._hash.clone(),T}});function v(T,_,l){return T^_^l}function g(T,_,l){return T&_|~T&l}function b(T,_,l){return(T|~_)^l}function i(T,_,l){return T&l|_&~l}function s(T,_,l){return T^(_|~l)}function t(T,_){return T<<_|T>>>32-_}S.RIPEMD160=h._createHelper(f),S.HmacRIPEMD160=h._createHmacHelper(f)}(Math),D.RIPEMD160})},ETIr:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,c=m.enc,h=c.Base64={stringify:function(d){var o=d.words,a=d.sigBytes,n=this._map;d.clamp();for(var u=[],p=0;p<a;p+=3)for(var f=o[p>>>2]>>>24-p%4*8&255,v=o[p+1>>>2]>>>24-(p+1)%4*8&255,g=o[p+2>>>2]>>>24-(p+2)%4*8&255,b=f<<16|v<<8|g,i=0;i<4&&p+i*.75<a;i++)u.push(n.charAt(b>>>6*(3-i)&63));var s=n.charAt(64);if(s)for(;u.length%4;)u.push(s);return u.join("")},parse:function(d){var o=d.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var u=0;u<a.length;u++)n[a.charCodeAt(u)]=u}var p=a.charAt(64);if(p){var f=d.indexOf(p);f!==-1&&(o=f)}return w(d,o,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function w(d,o,a){for(var n=[],u=0,p=0;p<o;p++)if(p%4){var f=a[d.charCodeAt(p-1)]<<p%4*2,v=a[d.charCodeAt(p)]>>>6-p%4*2,g=f|v;n[u>>>2]|=g<<24-u%4*8,u++}return P.create(n,u)}}(),D.enc.Base64})},"F+F2":function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(){if(typeof ArrayBuffer!="function")return;var m=D,S=m.lib,P=S.WordArray,c=P.init,h=P.init=function(w){if(w instanceof ArrayBuffer&&(w=new Uint8Array(w)),(w instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&w instanceof Uint8ClampedArray||w instanceof Int16Array||w instanceof Uint16Array||w instanceof Int32Array||w instanceof Uint32Array||w instanceof Float32Array||w instanceof Float64Array)&&(w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength)),w instanceof Uint8Array){for(var d=w.byteLength,o=[],a=0;a<d;a++)o[a>>>2]|=w[a]<<24-a%4*8;c.call(this,o,d)}else c.apply(this,arguments)};h.prototype=P}(),D.lib.WordArray})},GRO8:function(N,J,M){"use strict";M.r(J);var D=M("k1fw"),m=M("2qtc"),S=M("kLXV"),P=M("lUTK"),c=M("BvKs"),h=M("+L6B"),w=M("2/Rp"),d=M("T2oS"),o=M("W9HT"),a=M("sPJy"),n=M("bE4q"),u=M("miYZ"),p=M("tsqr"),f=M("9og8"),v=M("tJVT"),g=M("PpiC"),b=M("WmNS"),i=M.n(b),s=M("q1tI"),t=M.n(s),T=M("Ty5D"),_=M("55Ip"),l=M("9kvl"),k=M("KeDT"),O=M.n(k),x=M("zrhs"),y=M("DZo9"),E=M("8z0m"),C=M("LtfV"),I=M("KhGG"),j=E.a.Dragger,L=function(et){var vt=et.user,xt=et.dispatch,Mt=et.classroomList,Lt=et.shixunsDetail,Ht=et.getResults,Bt=Object(T.i)(),ht=Object(s.useState)(),wt=Object(v.a)(ht,2),St=wt[0],vr=wt[1],nr=Object(s.useState)([]),tr=Object(v.a)(nr,2),$t=tr[0],ir=tr[1],sr=Object(s.useState)(!1),ot=Object(v.a)(sr,2),Sr=ot[0],Lr=ot[1],yr={onRemove:function(){ir([])},beforeUpload:function(pr){if(console.log(pr),(pr==null?void 0:pr.size)>1024*1024*500)return p.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var er=[];return er.push(pr),ir([].concat(er)),!1},fileList:$t};return t.a.createElement(S.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Lt.actionTabs.key==="md-tab",confirmLoading:Sr,onOk:Object(f.a)(i.a.mark(function ar(){var pr,er,lr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(($t==null?void 0:$t.length)<=0)){Ft.next=3;break}return p.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),Ft.abrupt("return");case 3:return Lr(!0),Ft.next=6,Object(I.c)($t[0],{login:(pr=vt.userInfo)===null||pr===void 0?void 0:pr.login,container_type:"Competition",container_id:Lt.actionTabs.params.id,stage_type:Lt.actionTabs.params.value,file_name:(er=$t[0])===null||er===void 0?void 0:er.name});case 6:lr=Ft.sent,(lr==null?void 0:lr.status)===0?(p.b.info("\u63D0\u4EA4\u6210\u529F"),xt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Lr(!1),ir([]),Ht(Lt.actionTabs.params.value)):(Lr(!1),p.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return Ft.stop()}},ar)})),onCancel:function(){ir([]),xt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(j,yr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(C.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},H=Object(l.a)(function(_t){var et=_t.user,vt=_t.classroomList,xt=_t.shixunsDetail;return{user:et,classroomList:vt,shixunsDetail:xt}})(L),W=M("14J3"),U=M("BMrR"),G=M("5NDa"),B=M("5rEg"),z=M("9Bee"),V=M("m3rI"),ie=M("ErOA"),ce=M("NLgs"),he=M("fV52"),Ae=M("3I+P"),De=M("OaEy"),pe=M("2fM7"),Te=M("5bA4"),ye=M("UESt"),ue=pe.a.Option;function le(_t){var et=_t.rewarddata,vt=_t.getlistdatas,xt=_t.is_signed,Mt=_t.dispatch,Lt=_t.userlist,Ht=Object(s.useRef)(null),Bt=Object(s.useState)(!1),ht=Object(v.a)(Bt,2),wt=ht[0],St=ht[1],vr=Object(s.useState)(void 0),nr=Object(v.a)(vr,2),tr=nr[0],$t=nr[1],ir=Object(s.useState)(""),sr=Object(v.a)(ir,2),ot=sr[0],Sr=sr[1],Lr=Object(s.useState)(void 0),yr=Object(v.a)(Lr,2),ar=yr[0],pr=yr[1],er=Object(s.useState)(void 0),lr=Object(v.a)(er,2),Br=lr[0],Ft=lr[1],Xt=Object(s.useState)(void 0),zt=Object(v.a)(Xt,2),ur=zt[0],Ar=zt[1];function qe(Vt){return Ut.apply(this,arguments)}function Ut(){return Ut=Object(f.a)(i.a.mark(function Vt(wr){var Qt;return i.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!wr.user_received){Kt.next=3;break}return window.open(wr.click_info),Kt.abrupt("return");case 3:if(Object(ce.f)(Mt)){Kt.next=5;break}return Kt.abrupt("return");case 5:if(!(xt===!1)){Kt.next=8;break}return p.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Kt.abrupt("return");case 8:if(!(wr.click_event==="Pop")){Kt.next=14;break}return Sr(wr.id),St(!0),Kt.abrupt("return");case 14:$t(void 0);case 15:return Kt.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:wr.id}});case 17:Qt=Kt.sent,Qt&&Qt.status===0&&(vt(),wr.click_event==="Link"?(p.b.info("\u9886\u53D6\u6210\u529F"),window.open(wr.click_info)):p.b.info(wr.click_info));case 19:case"end":return Kt.stop()}},Vt)})),Ut.apply(this,arguments)}function Gr(){return Qr.apply(this,arguments)}function Qr(){return Qr=Object(f.a)(i.a.mark(function Vt(){var wr;return i.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(!(Lt&&!Lt.real_name)){Rt.next=4;break}if(ar){Rt.next=4;break}return p.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 4:if(!(Lt&&!Lt.email)){Rt.next=8;break}if(Br){Rt.next=8;break}return p.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 8:if(!(Lt&&!Lt.phone)){Rt.next=12;break}if(ur){Rt.next=12;break}return p.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 12:if(tr){Rt.next=15;break}return p.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Rt.abrupt("return");case 15:return Rt.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:ot,className:tr,name:ar,mail:Br,phone:ur}});case 17:wr=Rt.sent,wr&&wr.status===0&&(St(!1),vt(),p.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Rt.stop()}},Vt)})),Qr.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(S.a,{visible:wt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return St(!1)},onOk:function(){Gr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(B.a,{className:Lt&&Lt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Lt&&Lt.phone?"":"#ffffff!important"},value:Lt&&Lt.real_name||ar,disabled:Lt&&Lt.real_name||!1,onChange:function(wr){return pr(wr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(B.a,{className:Lt&&Lt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Lt&&Lt.phone?"":"#ffffff!important"},value:Lt&&Lt.email||Br,disabled:Lt&&Lt.email||!1,onChange:function(wr){return Ft(wr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(B.a,{style:{width:"300px"},className:Lt&&Lt.phone?"":"bkfff",value:Lt&&Lt.phone||ur,disabled:Lt&&Lt.phone||!1,onChange:function(wr){return Ar(wr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(pe.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(wr){$t(wr)}},t.a.createElement(ue,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ue,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ue,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ue,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ue,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ue,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ue,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ue,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ue,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ue,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ue,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ue,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ue,{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:O.a.spanprev,onClick:function(){Ht.current.prev()}},t.a.createElement(Te.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Ae.a,{ref:Ht,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},et&&et.map(function(Vt,wr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(Vt.image_url)}),Vt.user_received===!1||Vt.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(Vt)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Ht.current.next()}},t.a.createElement(ye.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},et&&et.map(function(Vt,wr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(Vt.image_url)}),Vt.user_received===!1||Vt.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(Vt)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var te=le,fe=function(et,vt){var xt=et.StaffDetail,Mt=et.HeaderDetail,Lt=et.ItemData,Ht=et.setIssee,Bt=et.ModelType,ht=et.dispatch,wt=et.userinfo,St=et.Editable,vr=Object(s.useState)(!1),nr=Object(v.a)(vr,2),tr=nr[0],$t=nr[1],ir=Object(s.useState)([]),sr=Object(v.a)(ir,2),ot=sr[0],Sr=sr[1],Lr=Object(s.useState)(""),yr=Object(v.a)(Lr,2),ar=yr[0],pr=yr[1],er=Object(s.useState)(""),lr=Object(v.a)(er,2),Br=lr[0],Ft=lr[1],Xt=Object(s.useState)(!1),zt=Object(v.a)(Xt,2),ur=zt[0],Ar=zt[1],qe=Object(T.i)(),Ut=qe.identifier,Gr=Object(s.useRef)(null),Qr=Object(s.useRef)(null);Gr.current=xt==null?void 0:xt.enrolled,Object(s.useEffect)(function(){var Rt;return(Rt=Qr.current)===null||Rt===void 0||Rt.addEventListener("click",Vt),function(){var Kt;(Kt=Qr.current)===null||Kt===void 0||Kt.removeEventListener("click",Vt)}},[]);var Vt=function(Kt){var cr;if((Kt==null||((cr=Kt.target)===null||cr===void 0)?void 0:cr.id)==="modal-upload"){if(!Object(ce.e)(ht))return;if(!Gr.current){S.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(s.useEffect)(function(){if(Mt!=null&&Mt.upload_file){var Rt,Kt,cr;Sr([{name:Mt==null||((Rt=Mt.upload_file)===null||Rt===void 0)?void 0:Rt.title,status:"done",uid:"123456789"}]),Ft(Mt==null?void 0:Mt.upload_file_url),pr(Mt==null||((Kt=Mt.upload_file)===null||Kt===void 0||((cr=Kt.url)===null||cr===void 0))?void 0:cr.split("/")[3])}},[Mt==null?void 0:Mt.upload_file]);var wr={name:"file",multiple:!1,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:ot,onChange:function(Kt){var cr=Kt.file.status,qt=[Object(D.a)({},Kt.file)];if(Sr(qt),Kt.file.status==="uploading"&&Ar(!0),cr==="done"){var yt,bt;pr((yt=qt[0])===null||yt===void 0||((bt=yt.response)===null||bt===void 0)?void 0:bt.id),Ar(!1)}cr==="error"&&(Sr([]),Ar(!1))},beforeUpload:function(Kt){var cr=Kt.size/1024/1024<1e3;return cr?Promise.resolve():(p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Qt=function(){$t(!0)};return Object(s.useImperativeHandle)(vt,function(){return{handleVisible:Qt}}),t.a.createElement("div",{ref:Qr},Bt==="reward"?t.a.createElement(te,{userlist:wt,dispatch:ht,rewarddata:Lt.reward_setting,is_signed:Lt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((wt==null?void 0:wt.admin)||(wt==null?void 0:wt.business)||St)&&t.a.createElement(w.a,{onClick:function(){return Ht(!1)}},"\u7F16\u8F91")),t.a.createElement(z.a,{value:Lt.md_content}),Lt&&Lt.attachments&&Lt.attachments.map(function(Rt,Kt){return t.a.createElement("div",null,t.a.createElement("a",{href:(V.a===null||V.a===void 0?void 0:V.a.API_SERVER)+Rt.url,target:"_self",download:Rt.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Rt.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Rt.filesize)))}),t.a.createElement(S.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:tr,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:ur,onCancel:function(){return $t(!1)},onOk:Object(f.a)(i.a.mark(function Rt(){var Kt;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(!(!ar&&!Br)){qt.next=3;break}return $t(!1),qt.abrupt("return");case 3:return Ar(!0),qt.next=6,Object(ie.a)("/api/competitions/".concat(Ut,"/upload_file.json"),{method:"post",body:{attachment_id:ar,upload_file_url:Br}});case 6:Kt=qt.sent,Kt.status===0&&($t(!1),Ar(!1));case 8:case"end":return qt.stop()}},Rt)}))},t.a.createElement("div",null,t.a.createElement(U.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(B.a,{style:{width:416},value:Br,onChange:function(Kt){var cr;return Ft((cr=Kt.target)===null||cr===void 0?void 0:cr.value)}})),t.a.createElement(U.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(E.a,wr,t.a.createElement(w.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},q=Object(s.forwardRef)(fe),ee=M("Ot1p"),Ce=M("hJwl");function re(_t){var et=_t.ItemData,vt=_t.setIssee,xt=_t.MenuItem,Mt=_t.dispatch,Lt=_t.identifier,Ht=_t.ModelType,Bt=_t.userinfo,ht=_t.getrightdatas,wt=Object(s.useState)([]),St=Object(v.a)(wt,2),vr=St[0],nr=St[1],tr=Object(s.useState)(et.md_content),$t=Object(v.a)(tr,2),ir=$t[0],sr=$t[1];Object(s.useEffect)(function(){var pr,er=[];et==null||((pr=et.attachments)===null||pr===void 0)||pr.map(function(lr){var Br={uid:lr.id,name:lr.title,response:{id:lr.id}};er.push(Br)}),nr(er)},[et==null?void 0:et.attachments]);function ot(){var pr,er=[];return et==null||((pr=et.attachments)===null||pr===void 0)||pr.map(function(lr){var Br={uid:lr==null?void 0:lr.id,name:lr.title,response:{id:lr.id}};er.push(Br)}),er}var Sr={name:"file",multiple:!0,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",defaultFileList:ot(),onRemove:function(er){Object(Ce.t)({id:er.uid})},onChange:function(er){var lr=er.file.status;lr!=="uploading",lr==="removed"&&nr(er.fileList),lr==="done"?(nr(er.fileList),p.b.success("".concat(er.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):lr==="error"&&p.b.error("".concat(er.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(er){var lr=er.size/1024/1024<150;return lr||p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),lr}};console.log(Sr);function Lr(){return yr.apply(this,arguments)}function yr(){return yr=Object(f.a)(i.a.mark(function pr(){var er;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Mt({type:"competitions/updateMdContent",payload:{attachment_ids:ar(vr),competition_module_id:et.id,md_content_id:et.md_id,content:ir,identifier:Lt}});case 2:er=Br.sent,er&&(p.b.info("\u63D0\u4EA4\u6210\u529F"),vt(!0),ht(xt));case 4:case"end":return Br.stop()}},pr)})),yr.apply(this,arguments)}function ar(pr){var er=[];return pr&&pr.map(function(lr){er.push(lr.response.id)}),er}return t.a.createElement("div",null,Ht==="reward"?t.a.createElement(te,{userlist:Bt,dispatch:Mt,rewarddata:et.reward_setting,is_signed:et.is_signed}):null,t.a.createElement(ee.a,{defaultValue:ir,onChange:function(er){return sr(er)}}),t.a.createElement(E.a,Sr,t.a.createElement(w.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Lr()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return vt(!0)}},"\u53D6\u6D88")))}var Q=re,X=M("g9YV"),Z=M("wCAj"),xe=M("Znn+"),ve=M("ZTPi");function Oe(){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:V.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 Qe=Oe,rt=M("5Dmo"),nt=M("3S7+"),ct=M("jCWc"),dt=M("kPKH"),pt=M("IzEo"),He=M("bx4M");function Pe(_t){var et=_t.oneItem,vt=_t.towItem,xt=_t.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(U.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(dt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(_.a,{to:"/users/".concat(vt==null?void 0:vt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(vt==null?void 0:vt.user_image)}),(vt==null?void 0:vt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},vt==null?void 0:vt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},vt==null?void 0:vt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},vt==null?void 0:vt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},vt==null?void 0:vt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(vt==null?void 0:vt.extra_score)+parseFloat(vt==null?void 0:vt.score),"\u5206"))),t.a.createElement(dt.a,{span:6},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(_.a,{to:"/users/".concat(et==null?void 0:et.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(et==null?void 0:et.user_image)}),(et==null?void 0:et.competition_prize)&&t.a.createElement("p",{className:O.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:O.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(He.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(_.a,{to:"/users/".concat(xt==null?void 0:xt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(xt==null?void 0:xt.user_image)}),(xt==null?void 0:xt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},xt==null?void 0:xt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},xt==null?void 0:xt.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},xt==null?void 0:xt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},xt==null?void 0:xt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(xt==null?void 0:xt.extra_score)+parseFloat(xt==null?void 0:xt.score),"\u5206")))))}var at=Pe;function ft(_t){var et,vt,xt,Mt,Lt,Ht,Bt,ht,wt,St,vr,nr,tr,$t,ir,sr,ot,Sr,Lr,yr,ar,pr,er,lr,Br,Ft,Xt,zt,ur,Ar,qe=_t.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(at,{oneItem:qe==null?void 0:qe.teams[0],towItem:qe==null?void 0:qe.teams[1],threeItem:qe==null?void 0:qe.teams[2]}),(qe==null||((et=qe.user_ranks)===null||et===void 0)?void 0:et.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(qe==null||((vt=qe.user_ranks)===null||vt===void 0||((xt=vt[0])===null||xt===void 0))?void 0:xt.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:(qe==null||((Mt=qe.user_ranks)===null||Mt===void 0||((Lt=Mt[0])===null||Lt===void 0))?void 0:Lt.success)===!1?"red":"green"}},(qe==null||((Ht=qe.user_ranks)===null||Ht===void 0||((Bt=Ht[0])===null||Bt===void 0))?void 0:Bt.success)===!1?"\u5426":qe!=null&&(ht=qe.user_ranks)!==null&&ht!==void 0&&(wt=ht[0])!==null&&wt!==void 0&&wt.success?"\u662F":"")),(qe==null||((St=qe.user_ranks)===null||St===void 0||((vr=St[0])===null||vr===void 0))?void 0:vr.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(qe==null||((nr=qe.user_ranks)===null||nr===void 0||((tr=nr[0])===null||tr===void 0))?void 0:tr.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(qe==null||(($t=qe.user_ranks)===null||$t===void 0||((ir=$t[0])===null||ir===void 0))?void 0:ir.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",qe==null||((sr=qe.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(nt.a,{title:"\u6218\u961F\u540D"},qe==null||((Sr=qe.user_ranks)===null||Sr===void 0||((Lr=Sr[0])===null||Lr===void 0))?void 0:Lr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u65F6\u95F4"},qe==null||((yr=qe.user_ranks)===null||yr===void 0||((ar=yr[0])===null||ar===void 0))?void 0:ar.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},qe==null||((pr=qe.user_ranks)===null||pr===void 0||((er=pr[0])===null||er===void 0))?void 0:er.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},qe==null||((lr=qe.user_ranks)===null||lr===void 0||((Br=lr[0])===null||Br===void 0))?void 0:Br.score)),t.a.createElement("span",null,t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(qe==null||((Ft=qe.user_ranks)===null||Ft===void 0||((Xt=Ft[0])===null||Xt===void 0))?void 0:Xt.extra_score)+parseFloat(qe==null||((zt=qe.user_ranks)===null||zt===void 0||((ur=zt[0])===null||ur===void 0))?void 0:ur.score)||0))),qe==null||((Ar=qe.teams)===null||Ar===void 0)?void 0:Ar.map(function(Ut,Gr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Gr+1),t.a.createElement(_.a,{to:"/users/".concat(Ut==null?void 0:Ut.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(Ut==null?void 0:Ut.user_image)}),(Ut==null?void 0:Ut.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},Ut==null?void 0:Ut.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},Ut==null?void 0:Ut.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},Ut.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Ut.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Ut.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(Ut.extra_score)+parseFloat(Ut.score))))}))}var Je=ft,st=ve.a.TabPane;function Ue(_t){var et,vt,xt,Mt,Lt,Ht,Bt=_t.ChartRules,ht=_t.ItemData,wt=_t.getCharts,St=_t.Selectkey,vr=_t.getChartRules,nr=_t.userinfo,tr=_t.Editable,$t=_t.HeaderDetail,ir=Object(s.useState)(!1),sr=Object(v.a)(ir,2),ot=sr[0],Sr=sr[1],Lr=Object(s.useState)(""),yr=Object(v.a)(Lr,2),ar=yr[0],pr=yr[1],er=Object(s.useState)(!0),lr=Object(v.a)(er,2),Br=lr[0],Ft=lr[1],Xt=Object(s.useState)(),zt=Object(v.a)(Xt,2),ur=zt[0],Ar=zt[1],qe=Object(s.useState)(),Ut=Object(v.a)(qe,2),Gr=Ut[0],Qr=Ut[1],Vt=Object(T.i)(),wr=Vt.identifier;Object(s.useEffect)(function(){if(Br){var cr,qt=Bt==null||((cr=Bt.stages)===null||cr===void 0)?void 0:cr[0];if(Ar(qt),qt!=null&&qt.id){var yt,bt,Gt;(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog")&&wt(qt==null?void 0:qt.id),pr(((yt=Bt.rule_contents)===null||yt===void 0||((bt=yt.filter(function(sn){return parseInt(sn.competition_stage_id)===parseInt(qt==null?void 0:qt.id)}))===null||bt===void 0||((Gt=bt[0])===null||Gt===void 0))?void 0:Gt.content)||"")}else{var kt,Pr,an;($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog",pr(((kt=Bt.rule_contents)===null||kt===void 0||((Pr=kt.filter(function(sn){return parseInt(sn.competition_stage_id)===0}))===null||Pr===void 0||((an=Pr[0])===null||an===void 0))?void 0:an.content)||"")}}},[Bt]);function Qt(){return Rt.apply(this,arguments)}function Rt(){return Rt=Object(f.a)(i.a.mark(function cr(){var qt,yt,bt,Gt,kt,Pr,an,sn,Dr;return i.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:if(ar){Ir.next=3;break}return p.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Ir.abrupt("return");case 3:if(Ft(!1),qt=ur==null?void 0:ur.id,!qt){Ir.next=12;break}return Ir.next=8,Object(ie.a)("/api/competitions/".concat(wr,"/update_md_content.json"),{method:"post",body:{competition_module_id:St,content:ar,md_content_id:(yt=Bt.rule_contents)===null||yt===void 0||((bt=yt.filter(function(hn){return parseInt(hn.competition_stage_id)===parseInt(qt)}))===null||bt===void 0||((Gt=bt[0])===null||Gt===void 0))?void 0:Gt.id,stage_id:ur==null?void 0:ur.id}});case 8:kt=Ir.sent,kt.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),Sr(!1),vr()),Ir.next=16;break;case 12:return Ir.next=14,Object(ie.a)("/api/competitions/".concat(wr,"/update_md_content.json"),{method:"post",body:{competition_module_id:St,content:ar,md_content_id:(Pr=Bt.rule_contents)===null||Pr===void 0||((an=Pr.filter(function(hn){return parseInt(hn.competition_stage_id)===0}))===null||an===void 0||((sn=an[0])===null||sn===void 0))?void 0:sn.id,stage_id:ur==null?void 0:ur.id}});case 14:Dr=Ir.sent,Dr.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),Sr(!1),vr());case 16:case"end":return Ir.stop()}},cr)})),Rt.apply(this,arguments)}var Kt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(qt,yt,bt){return t.a.createElement("span",null,bt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(qt){return t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(qt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(qt){return t.a.createElement("span",{title:qt},qt&&(qt==null?void 0:qt.length)>=15?(qt==null?void 0:qt.substr(0,15))+"...":qt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(qt){return t.a.createElement("span",null,qt||"--")}},{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(qt){return t.a.createElement("span",null,qt||"--")}}];return t.a.createElement("div",null,(Bt==null||((et=Bt.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Qe,null),(Bt==null||((vt=Bt.stages)===null||vt===void 0)?void 0:vt.length)>0&&t.a.createElement(ve.a,{animated:!0,tabBarExtraContent:((nr==null?void 0:nr.admin)||(nr==null?void 0:nr.business)||tr)&&t.a.createElement(w.a,{onClick:function(){Sr(!0)}},"\u7F16\u8F91"),onChange:function(qt){var yt,bt,Gt,kt,Pr;Sr(!1);var an=Bt==null||((yt=Bt.stages)===null||yt===void 0)?void 0:yt.filter(function(Dr){return parseInt(qt)===parseInt(Dr==null?void 0:Dr.id)})[0];Ar(an);var sn=an==null||((bt=an.children)===null||bt===void 0)?void 0:bt[0];Qr(sn),pr(((Gt=Bt.rule_contents)===null||Gt===void 0||((kt=Gt.filter(function(Dr){return parseInt(Dr.competition_stage_id)===parseInt(an==null?void 0:an.id)}))===null||kt===void 0||((Pr=kt[0])===null||Pr===void 0))?void 0:Pr.content)||""),wt((sn==null?void 0:sn.id)||qt)}},Bt&&Bt.stages.map(function(cr,qt){return t.a.createElement(st,{tab:cr.name,key:cr.id===null?0:cr.id},ot===!1&&Bt&&Bt.rule_contents.map(function(yt,bt){if(cr.id===yt.competition_stage_id)return t.a.createElement(z.a,{key:bt,value:yt.content===void 0||yt.content===null?"":yt.content});if(cr.id===null&&yt.competition_stage_id===0)return t.a.createElement(z.a,{key:bt,value:yt.content===void 0||yt.content===null?"":yt.content})}))})),(ur==null||((xt=ur.children)===null||xt===void 0)?void 0:xt.length)>0&&t.a.createElement(ve.a,{activeKey:(Gr==null?void 0:Gr.id)+"",onChange:function(qt){var yt,bt=ur==null||((yt=ur.children)===null||yt===void 0)?void 0:yt.filter(function(Gt){return parseInt(qt)===parseInt(Gt==null?void 0:Gt.id)})[0];Qr(bt),wt(qt)}},ur==null||((Mt=ur.children)===null||Mt===void 0)?void 0:Mt.map(function(cr,qt){return t.a.createElement(st,{tab:cr.name,key:cr.id===null?0:cr.id})})),ot&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:ar,onChange:function(qt){pr(qt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Qt()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Sr(!1)}},"\u53D6\u6D88"))),(ht==null||((Lt=ht.teams)===null||Lt===void 0)?void 0:Lt.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(Z.a,{dataSource:ht==null?void 0:ht.teams,columns:Kt,pagination:!1}):(ht==null||((Ht=ht.teams)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(Je,{ItemData:ht}))}var Me=Ue,Ne=M("/zsF"),Ee=M("PArb");function Se(_t){var et,vt,xt,Mt,Lt,Ht,Bt,ht=_t.Prize,wt=Object(T.i)(),St=Object(s.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"}]),vr=Object(v.a)(St,2),nr=vr[0],tr=vr[1],$t=function(){var ir=Object(f.a)(i.a.mark(function sr(ot){var Sr;return i.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(Ce.u)({type:ot.type,id:wt.identifier});case 2:Sr=yr.sent,(Sr==null?void 0:Sr.status)===0&&(location.href="/competitions/exports?id=".concat(wt.identifier,"&type=").concat(ot.type));case 4:case"end":return yr.stop()}},sr)}));return function(ot){return ir.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),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:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ht==null||((vt=ht.personal_certifications[0])===null||vt===void 0)?void 0:vt.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||((xt=ht.team_certifications)===null||xt===void 0)?void 0:xt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ht==null||((Mt=ht.team_certifications[0])===null||Mt===void 0)?void 0:Mt.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||((Lt=ht.teams)===null||Lt===void 0)?void 0:Lt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ht==null?void 0:ht.teams)&&(ht==null||((Ht=ht.teams[0])===null||Ht===void 0)?void 0:Ht.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||((Bt=ht.teams[0])===null||Bt===void 0)?void 0:Bt.team_members.map(function(ir,sr){var ot,Sr,Lr,yr,ar,pr;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},ir==null?void 0:ir.role),t.a.createElement("span",{style:{width:"5%"}},ir==null?void 0:ir.name),t.a.createElement("span",{style:{width:"10%"}},(ir==null?void 0:ir.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(ir==null?void 0:ir.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(ir==null?void 0:ir.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(ir==null?void 0:ir.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},ir!=null&&ir.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},ir!=null&&ir.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(ir==null?void 0:ir.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||((Sr=ot.bank_account)===null||Sr===void 0))?void 0:Sr.bank),(ht==null?void 0:ht.teams)&&(ht==null||((Lr=ht.teams[0])===null||Lr===void 0||((yr=Lr.bank_account)===null||yr===void 0))?void 0:yr.second_bank),(ht==null?void 0:ht.teams)&&(ht==null||((ar=ht.teams[0])===null||ar===void 0||((pr=ar.bank_account)===null||pr===void 0))?void 0:pr.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(U.a,{gutter:[20,20]},nr.map(function(ir,sr){return t.a.createElement(dt.a,{key:sr},t.a.createElement(w.a,{type:"primary",onClick:function(){return $t(ir)}},ir.name))})))}var Re=Se,Le=M("0Owb"),Ye=M("7Kak"),tt=M("9yH6"),Ct=M("y8nQ"),At=M("Vl3Y"),rr=M("1vsH"),gt=M("Dgm7"),or=M.n(gt),Zt=M("NnUe"),Et=M.n(Zt),jr=E.a.Dragger,Kr=10,Fr=function(et){var vt=et.user,xt=et.account,Mt=et.globalSetting,Lt=et.loading,Ht=et.dispatch,Bt=Object(g.a)(et,["user","account","globalSetting","loading","dispatch"]),ht=At.a.useForm(),wt=Object(v.a)(ht,1),St=wt[0],vr=Object(s.useState)({}),nr=Object(v.a)(vr,2),tr=nr[0],$t=nr[1],ir=Object(s.useState)(!0),sr=Object(v.a)(ir,2),ot=sr[0],Sr=sr[1],Lr=Object(s.useState)(),yr=Object(v.a)(Lr,2),ar=yr[0],pr=yr[1],er=Object(s.useState)(),lr=Object(v.a)(er,2),Br=lr[0],Ft=lr[1],Xt=Object(s.useState)(),zt=Object(v.a)(Xt,2),ur=zt[0],Ar=zt[1],qe=Object(s.useState)(),Ut=Object(v.a)(qe,2),Gr=Ut[0],Qr=Ut[1];Object(s.useEffect)(function(){if(!xt.basicInfo)return;var qt=xt.basicInfo,yt={name:qt.show_realname?qt.name:Object(rr.F)(qt.name),gender:qt.gender};pr(qt.name),Sr(qt.show_realname),St.setFieldsValue(yt),$t(yt)},[xt.basicInfo]);var Vt=function(yt){if(yt.file.status==="uploading"){Qr(!0);return}if(yt.file.status==="done"){var bt;console.log(yt.file,yt.file.response),Ar((bt=yt.file.response)===null||bt===void 0?void 0:bt.id),Object(rr.C)(yt.file.originFileObj,function(Gt){Ft(Gt),Qr(!1)})}},wr=function(yt){$t(Object(D.a)({},St.getFieldsValue())),"name"in yt&&pr(yt.name)},Qt=function(){var yt=!ot;Sr(yt);var bt=yt?ar:Object(rr.F)(ar);St.setFieldsValue({name:bt})},Rt=function(){var qt=Object(f.a)(i.a.mark(function yt(bt){var Gt,kt,Pr,an,sn,Dr,qr,Ir;return i.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(Pr=bt||{},an=Pr.name,sn=Pr.gender,Dr=Pr.idNumber,Br){Vr.next=4;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Vr.abrupt("return");case 4:return Vr.next=6,Ht({type:"account/applyRealNameAuth",payload:{id:((Gt=xt.basicInfo)===null||Gt===void 0?void 0:Gt.id)||((kt=vt.userInfo)===null||kt===void 0?void 0:kt.login),name:an,gender:sn,id_number:Dr,show_realname:ot,attachment_ids:[ur]}});case 6:qr=Vr.sent,Kt(),qr&&(p.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Ht({type:"account/getBasicInfo",payload:{login:(Ir=vt.userInfo)===null||Ir===void 0?void 0:Ir.login}}));case 9:case"end":return Vr.stop()}},yt)}));return function(bt){return qt.apply(this,arguments)}}(),Kt=function(){Ht({type:"account/setActionTabs",payload:{}})},cr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:Et.a.uploader,onChange:Vt,beforeUpload:function(yt){var bt=yt.type==="image/jpeg"||yt.type==="image/png"||yt.type==="image/jpg"||yt.type==="image/bmp";return bt||p.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),bt}};return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:xt.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(o.a,{spinning:!!Gr},t.a.createElement(At.a,{className:Et.a.formWrap,form:St,layout:"horizontal",onValuesChange:wr,onFinish:Rt},t.a.createElement(At.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(Kr,"\u4E2A\u5B57\u7B26")},{validator:rr.I}],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(Kr,"\u4E2A\u5B57\u7B26"),maxLength:Kr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(ot?"icon-xianshi":"icon-yincang"," font18 ").concat(Et.a.color0152d9),onClick:Qt})})),t.a.createElement(At.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(At.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(At.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:Et.a.flexRow},t.a.createElement("div",{className:"".concat(Et.a.flexColumn," ").concat(Et.a.example)},t.a.createElement("span",{className:Et.a.exampleImg},t.a.createElement("img",{src:or.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(Et.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:Et.a.flexColumn},t.a.createElement(jr,Object(Le.a)({},cr,{accept:".png,.jpg,.bmp,.jpeg"}),Br?t.a.createElement("img",{src:Br,className:Et.a.uploadImg}):t.a.createElement("div",{className:Et.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Et.a.uploadTipIcon)})),t.a.createElement("p",{className:Et.a.uploadTip},t.a.createElement("a",{className:Et.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:Et.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:Et.a.footerWrap},t.a.createElement(At.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:Kt},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:Et.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")))))},rn=Object(l.a)(function(_t){var et=_t.user,vt=_t.account,xt=_t.loading,Mt=_t.globalSetting;return{user:et,account:vt,globalSetting:Mt,loading:xt.effects}})(Fr),Er=M("O3gP"),un=M("lrIw"),Jr=M("KXlV"),Wt=M.n(Jr),_n=M("Sjjz"),Cn=M.n(_n),Sn=B.a.TextArea,gn=function(et){var vt=et.account,xt=et.globalSetting,Mt=et.loading,Lt=et.dispatch,Ht=et.schoolName,Bt=et.departmentName,ht=et.visible,wt=et.onClose,St=wt===void 0?function(){}:wt,vr=et.onSuccess,nr=vr===void 0?function(){}:vr,tr=Object(g.a)(et,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),$t=At.a.useForm(),ir=Object(v.a)($t,1),sr=ir[0],ot=Object(s.useRef)();Object(s.useEffect)(function(){ot.current=tr.schoolId},[tr.schoolId]),Object(s.useEffect)(function(){sr.setFieldsValue({department:Bt})},[Bt]);var Sr=function(){var Lr=Object(f.a)(i.a.mark(function yr(ar){var pr,er,lr,Br;return i.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return pr=ar||{},er=pr.department,lr=pr.remarks,Xt.next=3,Lt({type:"account/appplyDepartment",payload:{school_id:ot.current,name:er,remarks:lr}});case 3:Br=Xt.sent,St(),Br&&(p.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),nr(er));case 6:case"end":return Xt.stop()}},yr)}));return function(ar){return Lr.apply(this,arguments)}}();return t.a.createElement(S.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(At.a,{className:Cn.a.formWrap,form:sr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Sr},t.a.createElement(At.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Ht),t.a.createElement(At.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(At.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Sn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Cn.a.footerWrap},t.a.createElement(At.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){St()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},Ci=Object(l.a)(function(_t){var et=_t.account,vt=_t.loading,xt=_t.globalSetting;return{account:et,globalSetting:xt,loading:vt.effects}})(gn),ui=M("6UJt"),mn=M("DFOY"),mr=M("jO45"),Vn=M("jN4g"),pi=M("gJ3r"),Xn=M("jwmR"),nn=M.n(Xn),Bn=function(et,vt){return vt.some(function(xt){return xt.label.toLowerCase().indexOf(et.toLowerCase())>-1})},Si=B.a.TextArea,mi=function(et){var vt=et.account,xt=et.globalSetting,Mt=et.loading,Lt=et.dispatch,Ht=et.schoolName,Bt=et.visible,ht=et.onClose,wt=ht===void 0?function(){}:ht,St=et.onSuccess,vr=St===void 0?function(){}:St,nr=Object(g.a)(et,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),tr=At.a.useForm(),$t=Object(v.a)(tr,1),ir=$t[0];Object(s.useEffect)(function(){ir.setFieldsValue({name:Ht})},[Ht]);var sr=function(){var ot=Object(f.a)(i.a.mark(function Sr(Lr){var yr,ar,pr,er,lr,Br,Ft;return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return yr=Lr||{},ar=yr.name,pr=yr.city,er=pr===void 0?[]:pr,lr=yr.address,Br=yr.remarks,zt.next=3,Lt({type:"account/appplySchool",payload:{name:ar,province:er[0],city:er[1],address:lr,remarks:Br}});case 3:Ft=zt.sent,wt(),Ft&&(p.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),vr(ar));case 6:case"end":return zt.stop()}},Sr)}));return function(Lr){return ot.apply(this,arguments)}}();return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Bt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(At.a,{className:nn.a.formWrap,form:ir,labelCol:{span:4},wrapperCol:{span:20},onFinish:sr},t.a.createElement(At.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(nn.a.flexRow," ").concat(nn.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:nn.a.flexColumn},t.a.createElement("div",null,t.a.createElement(mr.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(Vn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(At.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(mn.a,{allowClear:!0,size:"large",options:pi.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Bn}})),t.a.createElement(At.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(At.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Si,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:nn.a.footerWrap},t.a.createElement(At.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){wt()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplySchool"]},"\u4FDD\u5B58")))))},It=Object(l.a)(function(_t){var et=_t.account,vt=_t.loading,xt=_t.globalSetting;return{account:et,globalSetting:xt,loading:vt.effects}})(mi),xr=pe.a.Option,ti=E.a.Dragger,vi=function(et){var vt,xt,Mt=et.user,Lt=et.account,Ht=et.globalSetting,Bt=et.loading,ht=et.dispatch,wt=et.Scoid,St=Object(g.a)(et,["user","account","globalSetting","loading","dispatch","Scoid"]),vr=At.a.useForm(),nr=Object(v.a)(vr,1),tr=nr[0],$t=Object(s.useState)({}),ir=Object(v.a)($t,2),sr=ir[0],ot=ir[1],Sr=Object(s.useState)([]),Lr=Object(v.a)(Sr,2),yr=Lr[0],ar=Lr[1],pr=Object(s.useState)([]),er=Object(v.a)(pr,2),lr=er[0],Br=er[1],Ft=Object(s.useState)([]),Xt=Object(v.a)(Ft,2),zt=Xt[0],ur=Xt[1],Ar=Object(s.useState)([]),qe=Object(v.a)(Ar,2),Ut=qe[0],Gr=qe[1],Qr=Object(s.useState)(),Vt=Object(v.a)(Qr,2),wr=Vt[0],Qt=Vt[1],Rt=Object(s.useState)(),Kt=Object(v.a)(Rt,2),cr=Kt[0],qt=Kt[1],yt=Object(s.useState)(),bt=Object(v.a)(yt,2),Gt=bt[0],kt=bt[1],Pr=Object(s.useState)(),an=Object(v.a)(Pr,2),sn=an[0],Dr=an[1],qr=Object(s.useState)(),Ir=Object(v.a)(qr,2),hn=Ir[0],Vr=Ir[1];Object(s.useEffect)(function(){fn()},[]),Object(s.useEffect)(function(){Object(f.a)(i.a.mark(function Ve(){var We;return i.a.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:if(wt){mt.next=2;break}return mt.abrupt("return");case 2:return mt.next=4,$n(wt);case 4:We=mt.sent,ur(We==null?void 0:We.departments);case 6:case"end":return mt.stop()}},Ve)}))()},[wt]);var fn=function(){var Ve=Object(f.a)(i.a.mark(function We(){var Ze;return i.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,ht({type:"account/getSchoolOption"});case 2:Ze=Dt.sent,ar(Ze==null?void 0:Ze.schools);case 4:case"end":return Dt.stop()}},We)}));return function(){return Ve.apply(this,arguments)}}(),$n=function(We){return ht({type:"account/getDepartmentOption",payload:{id:We}})};Object(s.useEffect)(function(){if(!Lt.basicInfo)return;var Ve=Lt.basicInfo,We={identity:Ve.identity,school:Ve.school_name,department:Ve.department_name,studentNo:Ve.student_id,jobTitle:Ve.identity=="teacher"?Ve.technical_title:"\u6559\u6388",manager:Ve.identity=="professional"?Ve.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};tr.setFieldsValue(We),ot(We)},[Lt.basicInfo]);var Ie=function(){Dr(!0)},Ge=function(){if(!yr.find(function(We){return We.name===sr.school})){p.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Vr(!0)},$e=function(We){if(ot(Object(D.a)({},tr.getFieldsValue())),"school"in We){Br(yr.filter(function(mt){return mt.name.includes(We.school)}));var Ze=(yr.find(function(mt){return mt.name===We.school})||{}).id;Ze?Fe(We.school):(tr.setFieldsValue({department:""}),ot(Object(D.a)(Object(D.a)({},sr),{school:We.school,department:""})))}},Fe=function(){var Ve=Object(f.a)(i.a.mark(function We(Ze,mt){var Dt,Nt,Yt,kr,$r,Xr;return i.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return kr=(Dt=yr.find(function(en){return en.name===Ze}))===null||Dt===void 0?void 0:Dt.id,Hr.next=3,$n(kr);case 3:if(Hr.t0=Hr.sent,Hr.t0){Hr.next=6;break}Hr.t0={};case 6:$r=Hr.t0,ur($r==null?void 0:$r.departments),Xr=mt||($r==null||((Nt=$r.departments)===null||Nt===void 0||((Yt=Nt[0])===null||Yt===void 0))?void 0:Yt.name),tr.setFieldsValue({department:Xr}),ot(Object(D.a)(Object(D.a)({},sr),{school:Ze,department:Xr}));case 11:case"end":return Hr.stop()}},We)}));return function(Ze,mt){return Ve.apply(this,arguments)}}(),be=function(){var Ve=Object(f.a)(i.a.mark(function We(Ze){return i.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,fn();case 2:tr.setFieldsValue({school:Ze,department:""}),ot(Object(D.a)(Object(D.a)({},sr),{school:Ze,department:""}));case 4:case"end":return Dt.stop()}},We)}));return function(Ze){return Ve.apply(this,arguments)}}(),ke=function(We){if(We.file.status==="uploading"){kt(!0);return}if(We.file.status==="done"){var Ze;console.log(We.file,We.file.response),qt((Ze=We.file.response)===null||Ze===void 0?void 0:Ze.id),Object(rr.C)(We.file.originFileObj,function(mt){Qt(mt),kt(!1)})}},we=function(){var Ve=Object(f.a)(i.a.mark(function We(Ze){var mt,Dt,Nt,Yt,kr,$r,Xr,Zr,Hr,en,tn,vn,ln,Pn,dn,Mr;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:if(kr=Ze||{},$r=kr.school,Xr=kr.department,Zr=kr.identity,Hr=kr.studentNo,en=kr.jobTitle,tn=kr.manager,wr){on.next=4;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),on.abrupt("return");case 4:return vn=(mt=yr.find(function(pn){return pn.name===$r}))===null||mt===void 0?void 0:mt.id,ln=(Dt=zt.find(function(pn){return pn.name===Xr}))===null||Dt===void 0?void 0:Dt.id,Zr==="student"?Pn=Hr:Zr==="teacher"?Pn=en:Pn=tn,on.next=9,ht({type:"account/applyProfessionalAuth",payload:{id:((Nt=Lt.basicInfo)===null||Nt===void 0?void 0:Nt.id)||((Yt=Mt.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:vn,department_id:ln,identity:Zr,extra:Pn,attachment_ids:[cr]}});case 9:dn=on.sent,je(),dn&&(p.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ht({type:"account/getBasicInfo",payload:{login:(Mr=Mt.userInfo)===null||Mr===void 0?void 0:Mr.login}}));case 12:case"end":return on.stop()}},We)}));return function(Ze){return Ve.apply(this,arguments)}}(),je=function(){ht({type:"account/setActionTabs",payload:{}})},ze={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:Et.a.uploader,onChange:ke,beforeUpload:function(We){var Ze=We.type==="image/jpeg"||We.type==="image/png"||We.type==="image/jpg"||We.type==="image/bmp";return Ze||p.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ze}};return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:Et.a.modal,visible:Lt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(Et.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(o.a,{spinning:!!Gt},t.a.createElement(At.a,{className:Et.a.formWrap,form:tr,layout:"horizontal",onValuesChange:$e,onFinish:we},t.a.createElement(U.a,{gutter:[10,0]},t.a.createElement(dt.a,{flex:"300px"},t.a.createElement(At.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(xr,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(xr,{value:"student"},"\u5B66\u751F"),t.a.createElement(xr,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),sr.identity==="student"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(At.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(At.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(xr,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(xr,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(xr,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(xr,{value:"\u52A9\u6559"},"\u52A9\u6559")))),sr.identity==="professional"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(At.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(xr,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(xr,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(xr,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(xr,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(xr,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(At.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:sr.school&&!(yr!=null&&yr.find(function(Ve){return Ve.name===sr.school}))&&t.a.createElement("div",{className:Et.a.schoolHintWrap},t.a.createElement("span",{className:Et.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",sr.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(Et.a.color0152d9," current"),onClick:Ie},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(un.a,{showSearch:!0,options:lr==null?void 0:lr.map(function(Ve){return{value:Ve.name}})})),t.a.createElement(At.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:sr.department&&!(zt!=null&&zt.find(function(Ve){return Ve.name===sr.department}))&&t.a.createElement("div",{className:Et.a.schoolHintWrap},t.a.createElement("span",{className:Et.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(Et.a.color0152d9," current"),onClick:Ge},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(un.a,{showSearch:!0,onChange:function(We){return Gr(zt.filter(function(Ze){return Ze.name.includes(We)}))},options:Ut==null?void 0:Ut.map(function(Ve){return{value:Ve.name}})})),t.a.createElement(At.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:Et.a.flexRow},t.a.createElement("div",{className:"".concat(Et.a.flexColumn," ").concat(Et.a.example)},t.a.createElement("span",{className:Et.a.exampleImg},t.a.createElement("img",{src:Wt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(Et.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:Et.a.flexColumn},t.a.createElement(ti,Object(Le.a)({},ze,{accept:".png,.jpg,.bmp,.jpeg"}),wr?t.a.createElement("img",{src:wr,className:Et.a.uploadImg}):t.a.createElement("div",{className:Et.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Et.a.uploadTipIcon)})),t.a.createElement("p",{className:Et.a.uploadTip},t.a.createElement("a",{className:Et.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:Et.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:Et.a.footerWrap},t.a.createElement(At.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Bt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:Et.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",!(Ht!=null&&(vt=Ht.setting)!==null&&vt!==void 0&&vt.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(It,{visible:sn,onClose:function(){return Dr(!1)},schoolName:sr.school,onSuccess:be}),t.a.createElement(Ci,{visible:hn,onClose:function(){return Vr(!1)},schoolId:(xt=yr.find(function(Ve){return Ve.name===sr.school}))===null||xt===void 0?void 0:xt.id,schoolName:sr.school,departmentName:sr.department,onSuccess:function(We){return Fe(sr.school,We)}}))},Ri=Object(l.a)(function(_t){var et=_t.user,vt=_t.account,xt=_t.loading,Mt=_t.globalSetting;return{user:et,account:vt,globalSetting:Mt,loading:xt.effects}})(vi),Di=M("aCH8"),se=M.n(Di);function K(_t){var et=_t.type,vt=_t.dispatch,xt=_t.userid,Mt=_t.isshow,Lt=_t.setPhoneshow,Ht=_t.setEmailshow,Bt="79e33abd4b6588941ab7622aed1e67e8",ht=Object(s.useState)(""),wt=Object(v.a)(ht,2),St=wt[0],vr=wt[1],nr=Object(s.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),tr=Object(v.a)(nr,2),$t=tr[0],ir=tr[1],sr=Object(s.useState)(60),ot=Object(v.a)(sr,2),Sr=ot[0],Lr=ot[1],yr=Object(s.useState)(!1),ar=Object(v.a)(yr,2),pr=ar[0],er=ar[1],lr=Object(s.useState)(""),Br=Object(v.a)(lr,2),Ft=Br[0],Xt=Br[1];function zt(){return ur.apply(this,arguments)}function ur(){return ur=Object(f.a)(i.a.mark(function Vt(){var wr;return i.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(St){Rt.next=3;break}return et===3?p.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):p.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 3:return Rt.next=5,vt({type:"competitions/getVerification",payload:{type:et,login:St,smscode:se()(Bt+St)}});case 5:wr=Rt.sent,wr.status===1&&(p.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),Ar(),er(!0));case 7:case"end":return Rt.stop()}},Vt)})),ur.apply(this,arguments)}function Ar(){Lr(60);var Vt=setInterval(function(){--Sr,Sr>-1?Lr(Sr):(clearInterval(Vt),er(!1))},1e3)}function qe(){return Ut.apply(this,arguments)}function Ut(){return Ut=Object(f.a)(i.a.mark(function Vt(){var wr;return i.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,vt({type:"competitions/PhoneBind",payload:{userid:xt,code:Ft,phone:St}});case 2:wr=Rt.sent,wr.status===0&&(p.b.info("\u7ED1\u5B9A\u6210\u529F"),Lt("none"));case 4:case"end":return Rt.stop()}},Vt)})),Ut.apply(this,arguments)}function Gr(){return Qr.apply(this,arguments)}function Qr(){return Qr=Object(f.a)(i.a.mark(function Vt(){var wr;return i.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,vt({type:"competitions/EmailBind",payload:{userid:xt,code:Ft,email:St}});case 2:wr=Rt.sent,wr.status===0&&(p.b.info("\u7ED1\u5B9A\u6210\u529F"),Ht("none"));case 4:case"end":return Rt.stop()}},Vt)})),Qr.apply(this,arguments)}return t.a.createElement("div",{style:{display:Mt}},t.a.createElement("p",null,t.a.createElement(B.a,{value:St,onChange:function(wr){return vr(wr.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:Ft,onChange:function(wr){return Xt(wr.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(w.a,{disabled:pr,onClick:function(){return zt()},type:"primary",style:{marginLeft:"20px",width:"100px"}},pr?"\u91CD\u65B0\u53D1\u9001".concat(Sr,"s"):$t),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(w.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!Ft){p.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}et===3?qe():Gr()}},"\u786E\u8BA4"),t.a.createElement(w.a,{style:{marginLeft:"20px"},onClick:function(){et===3?Lt("none"):Ht("none")}},"\u53D6\u6D88")))}var $=K;function ne(_t){var et=_t.dispatch,vt=_t.userid,xt={wrapperCol:{offset:3,span:21}},Mt=At.a.useForm(),Lt=Object(v.a)(Mt,1),Ht=Lt[0],Bt=Object(T.i)(),ht=Bt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(At.a,{form:Ht,name:"basic"},t.a.createElement(At.a.Item,Object(Le.a)({},xt,{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(At.a.Item,Object(Le.a)({},xt,{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(At.a.Item,Object(Le.a)({},xt,{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(At.a.Item,null,t.a.createElement(w.a,{type:"primary",htmlType:"submit",onClick:Object(f.a)(i.a.mark(function wt(){return i.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:Ht.validateFields().then(function(){var nr=Object(f.a)(i.a.mark(function tr($t){var ir;return i.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,et({type:"competitions/setleader",payload:Object(D.a)({identifier:ht,user_id:vt},$t)});case 2:ir=ot.sent,ir.status===0&&p.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return ot.stop()}},tr)}));return function(tr){return nr.apply(this,arguments)}}());case 1:case"end":return vr.stop()}},wt)}))},"\u63D0\u4EA4"))))}var ge=ne,oe={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(_t){var et,vt,xt,Mt,Lt,Ht,Bt,ht,wt=_t.Prize,St=_t.Accounts,vr=_t.dispatch,nr=_t.userid,tr=Object(s.useState)("none"),$t=Object(v.a)(tr,2),ir=$t[0],sr=$t[1],ot=Object(s.useState)("none"),Sr=Object(v.a)(ot,2),Lr=Sr[0],yr=Sr[1];function ar(er){return pr.apply(this,arguments)}function pr(){return pr=Object(f.a)(i.a.mark(function er(lr){var Br;return i.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(!(lr==="1")){Xt.next=6;break}return Xt.next=3,vr({type:"competitions/Authentication"});case 3:Br=Xt.sent,Xt.next=9;break;case 6:return Xt.next=8,vr({type:"competitions/Professional"});case 8:Br=Xt.sent;case 9:Br.status===0&&p.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return Xt.stop()}},er)})),pr.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"),(St==null?void 0:St.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,(St==null?void 0:St.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){vr({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,St==null?void 0:St.name),(St==null?void 0:St.authentication)==="uncertified"?null:(St==null?void 0:St.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(w.a,{type:"primary",onClick:function(){return ar("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,(St==null?void 0:St.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"),(St==null?void 0:St.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,(St==null?void 0:St.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){vr({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,St&&St.identity&&oe[St.identity]),(St==null?void 0:St.authentication)==="uncertified"?null:(St==null?void 0:St.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(w.a,{type:"primary",onClick:function(){return ar("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(w.a,{type:"primary",onClick:function(){vr({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,(St==null?void 0:St.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(St==null?void 0:St.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(St==null?void 0:St.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"}},(St==null?void 0:St.phone)||"--"),ir==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){sr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:3,dispatch:vr,userid:St==null?void 0:St.id,isshow:ir,setPhoneshow:sr,setEmailshow:yr}),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"}},(St==null?void 0:St.mail)||"--"),Lr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){yr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:4,dispatch:vr,userid:St==null?void 0:St.id,isshow:Lr,setEmailshow:yr,setPhoneshow:sr})),wt!=null&&wt.leader&&wt!==null&&wt!==void 0&&wt.teams&&wt!==null&&wt!==void 0&&(et=wt.teams[0])!==null&&et!==void 0&&(vt=et.bank_account)!==null&&vt!==void 0&&vt.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:vr,userid:nr})),wt!=null&&wt.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,(wt==null?void 0:wt.teams)&&(wt==null||((xt=wt.teams[0])===null||xt===void 0||((Mt=xt.bank_account)===null||Mt===void 0))?void 0:Mt.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,(wt==null?void 0:wt.teams)&&(wt==null||((Lt=wt.teams[0])===null||Lt===void 0||((Ht=Lt.bank_account)===null||Ht===void 0))?void 0:Ht.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,(wt==null?void 0:wt.teams)&&(wt==null||((Bt=wt.teams[0])===null||Bt===void 0||((ht=Bt.bank_account)===null||ht===void 0))?void 0:ht.card_no)||"--"))):null,t.a.createElement(Ri,{Scoid:St==null?void 0:St.school_id}),t.a.createElement(rn,null))}var Ot=Ke,lt=ve.a.TabPane;function _r(_t){var et=_t.Prize,vt=_t.Accounts,xt=_t.getAccounts,Mt=_t.dispatch,Lt=_t.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ve.a,{defaultActiveKey:"1",onChange:function(Bt){Bt==="2"&&xt()}},t.a.createElement(lt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(Re,{Prize:et})),t.a.createElement(lt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Ot,{userid:Lt,dispatch:Mt,Prize:et,Accounts:vt})))))}var Pt=_r,Ur=M("xKgJ"),Wr=M("wd/R"),cn=M.n(Wr),ri=ve.a.TabPane;function gi(_t){var et,vt,xt,Mt,Lt,Ht,Bt=_t.ChartRules,ht=_t.ItemData,wt=_t.getCharts,St=_t.Selectkey,vr=_t.HeaderDetail,nr=_t.getChartRules,tr=_t.userinfo,$t=_t.Editable,ir=_t.dispatch,sr=_t.StaffDetail,ot=Object(s.useState)(!1),Sr=Object(v.a)(ot,2),Lr=Sr[0],yr=Sr[1],ar=Object(s.useState)(""),pr=Object(v.a)(ar,2),er=pr[0],lr=pr[1],Br=Object(s.useState)(!0),Ft=Object(v.a)(Br,2),Xt=Ft[0],zt=Ft[1],ur=Object(s.useState)(),Ar=Object(v.a)(ur,2),qe=Ar[0],Ut=Ar[1],Gr=Object(s.useState)(),Qr=Object(v.a)(Gr,2),Vt=Qr[0],wr=Qr[1],Qt=Object(T.i)(),Rt=Qt.identifier;Object(s.useEffect)(function(){if(Xt){var yt,bt,Gt,kt,Pr=Bt==null||((yt=Bt.stages)===null||yt===void 0)?void 0:yt[0];Ut(Pr);var an=Bt==null||((bt=Bt.stages)===null||bt===void 0||((Gt=bt[0])===null||Gt===void 0||((kt=Gt.children)===null||kt===void 0)))?void 0:kt[0];if(wr(an),Pr!=null&&Pr.id){var sn,Dr,qr;wt(Pr==null?void 0:Pr.id),lr(((sn=Bt.rule_contents)===null||sn===void 0||((Dr=sn.filter(function(fn){return parseInt(fn.competition_stage_id)===parseInt(Pr==null?void 0:Pr.id)}))===null||Dr===void 0||((qr=Dr[0])===null||qr===void 0))?void 0:qr.content)||"")}else{var Ir,hn,Vr;wt(0),lr(((Ir=Bt.rule_contents)===null||Ir===void 0||((hn=Ir.filter(function(fn){return parseInt(fn.competition_stage_id)===0}))===null||hn===void 0||((Vr=hn[0])===null||Vr===void 0))?void 0:Vr.content)||"")}}},[Bt]);function Kt(){return cr.apply(this,arguments)}function cr(){return cr=Object(f.a)(i.a.mark(function yt(){var bt,Gt,kt,Pr,an,sn,Dr,qr,Ir;return i.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(er){Vr.next=3;break}return p.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Vr.abrupt("return");case 3:if(zt(!1),bt=qe==null?void 0:qe.id,!bt){Vr.next=12;break}return Vr.next=8,Object(ie.a)("/api/competitions/".concat(Rt,"/update_md_content.json"),{method:"post",body:{competition_module_id:St,content:er,md_content_id:(Gt=Bt.rule_contents)===null||Gt===void 0||((kt=Gt.filter(function(fn){return parseInt(fn.competition_stage_id)===parseInt(bt)}))===null||kt===void 0||((Pr=kt[0])===null||Pr===void 0))?void 0:Pr.id,stage_id:qe==null?void 0:qe.id}});case 8:an=Vr.sent,an.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),nr()),Vr.next=16;break;case 12:return Vr.next=14,Object(ie.a)("/api/competitions/".concat(Rt,"/update_md_content.json"),{method:"post",body:{competition_module_id:St,content:er,md_content_id:(sn=Bt.rule_contents)===null||sn===void 0||((Dr=sn.filter(function(fn){return parseInt(fn.competition_stage_id)===0}))===null||Dr===void 0||((qr=Dr[0])===null||qr===void 0))?void 0:qr.id,stage_id:qe==null?void 0:qe.id}});case 14:Ir=Vr.sent,Ir.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),nr());case 16:case"end":return Vr.stop()}},yt)})),cr.apply(this,arguments)}var qt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(bt,Gt,kt){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(nt.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")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(Gt,kt){return t.a.createElement("span",null,Gt==null?void 0:Gt.name,"\uFF1A",Gt==null?void 0:Gt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(bt){return t.a.createElement("span",null,bt||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="score"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="fid"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="total_score"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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 Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="Coffee"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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 Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="Easyship"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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 Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="Scar"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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 Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="Scarf"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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 Gt;return t.a.createElement("span",null,(bt==null||((Gt=bt.find(function(kt){return(kt==null?void 0:kt.name)==="Total"}))===null||Gt===void 0)?void 0:Gt.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(yt){return!!yt});return t.a.createElement("div",null,(Bt==null||((et=Bt.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Qe,null),(Bt==null||((vt=Bt.stages)===null||vt===void 0)?void 0:vt.length)>0&&t.a.createElement(ve.a,{animated:!0,tabBarExtraContent:tr!=null&&tr.admin||tr!=null&&tr.business||$t?t.a.createElement(w.a,{onClick:function(){yr(!0)}},"\u7F16\u8F91"):sr.enrolled&&(qe==null?void 0:qe.start_time)&&(qe==null?void 0:qe.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",cn()(qe==null?void 0:qe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",cn()(qe==null?void 0:qe.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(w.a,{style:{marginLeft:"20px"},disabled:cn()(qe==null?void 0:qe.start_time).unix()>cn()(cn()().format("YYYY-MM-DD HH:mm:s")).unix()||cn()(cn()().format("YYYY-MM-DD HH:mm:s")).unix()>cn()(qe==null?void 0:qe.end_time).unix(),onClick:function(){ir({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(Vt==null?void 0:Vt.id)||(qe==null?void 0:qe.id),id:vr==null?void 0:vr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(bt){var Gt,kt,Pr,an,sn;yr(!1);var Dr=Bt==null||((Gt=Bt.stages)===null||Gt===void 0)?void 0:Gt.filter(function(Ir){return parseInt(bt)===parseInt(Ir==null?void 0:Ir.id)})[0],qr=Dr==null||((kt=Dr.children)===null||kt===void 0)?void 0:kt[0];wr(qr),Ut(Dr),lr(((Pr=Bt.rule_contents)===null||Pr===void 0||((an=Pr.filter(function(Ir){return parseInt(Ir.competition_stage_id)===parseInt(Dr==null?void 0:Dr.id)}))===null||an===void 0||((sn=an[0])===null||sn===void 0))?void 0:sn.content)||""),wt((qr==null?void 0:qr.id)||bt)}},Bt&&Bt.stages.map(function(yt,bt){return t.a.createElement(ri,{tab:yt.name,key:yt.id===null?0:yt.id},Lr===!1&&Bt&&Bt.rule_contents.map(function(Gt,kt){if(yt.id===Gt.competition_stage_id)return t.a.createElement(z.a,{key:kt,value:Gt.content===void 0||Gt.content===null?"":Gt.content});if(yt.id===null&&Gt.competition_stage_id===0)return t.a.createElement(z.a,{key:kt,value:Gt.content===void 0||Gt.content===null?"":Gt.content})}))})),(qe==null||((xt=qe.children)===null||xt===void 0)?void 0:xt.length)>0&&t.a.createElement(ve.a,{activeKey:(Vt==null?void 0:Vt.id)+"",onChange:function(bt){var Gt,kt=qe==null||((Gt=qe.children)===null||Gt===void 0)?void 0:Gt.filter(function(Pr){return parseInt(bt)===parseInt(Pr==null?void 0:Pr.id)})[0];wr(kt),wt(bt)}},qe==null||((Mt=qe.children)===null||Mt===void 0)?void 0:Mt.map(function(yt,bt){return t.a.createElement(ri,{tab:yt.name,key:yt.id===null?0:yt.id})})),Lr&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:er,onChange:function(bt){lr(bt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Kt()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return yr(!1)}},"\u53D6\u6D88"))),((Lt=vr.competition_modules.filter(function(yt){return yt.id===St}))===null||Lt===void 0||((Ht=Lt[0])===null||Ht===void 0)?void 0:Ht.show_leaderboard)&&t.a.createElement(Z.a,{dataSource:ht==null?void 0:ht.results,columns:qt}))}var Dn=gi,Mi=M("DjyN"),qi=M("NUBc"),Qn=ve.a.TabPane;function ci(_t){var et,vt,xt,Mt,Lt,Ht,Bt=_t.loading,ht=_t.ChartRules,wt=_t.ItemData,St=_t.getCharts,vr=_t.Selectkey,nr=_t.HeaderDetail,tr=_t.getChartRules,$t=_t.userinfo,ir=_t.Editable,sr=_t.dispatch,ot=_t.StaffDetail,Sr=Object(s.useState)(!1),Lr=Object(v.a)(Sr,2),yr=Lr[0],ar=Lr[1],pr=Object(s.useState)(""),er=Object(v.a)(pr,2),lr=er[0],Br=er[1],Ft=Object(s.useState)(!0),Xt=Object(v.a)(Ft,2),zt=Xt[0],ur=Xt[1],Ar=Object(s.useState)(),qe=Object(v.a)(Ar,2),Ut=qe[0],Gr=qe[1],Qr=Object(s.useState)(),Vt=Object(v.a)(Qr,2),wr=Vt[0],Qt=Vt[1],Rt=Object(T.i)(),Kt=Rt.identifier,cr=Object(s.useState)({page:1,limit:10,sort:"desc"}),qt=Object(v.a)(cr,2),yt=qt[0],bt=qt[1];Object(s.useEffect)(function(){var kt;zt&&ht!==null&&ht!==void 0&&(kt=ht.stages)!==null&&kt!==void 0&&kt[0]&&Gt()},[ht==null||((et=ht.stages)===null||et===void 0)?void 0:et[0]]);var Gt=function(){var kt=Object(f.a)(i.a.mark(function Pr(){var an,sn,Dr,qr,Ir,hn;return i.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return Ir=ht==null||((an=ht.stages)===null||an===void 0)?void 0:an[0],Gr(Ir),hn=ht==null||((sn=ht.stages)===null||sn===void 0||((Dr=sn[0])===null||Dr===void 0||((qr=Dr.children)===null||qr===void 0)))?void 0:qr[0],Qt(hn),yt.id=(hn==null?void 0:hn.id)||(Ir==null?void 0:Ir.id),bt(Object(D.a)({},yt)),fn.next=7,St(Object(D.a)(Object(D.a)({},yt),{},{stage_id:yt.id}));case 7:case"end":return fn.stop()}},Pr)}));return function(){return kt.apply(this,arguments)}}();return t.a.createElement("div",null,(ht==null||((vt=ht.stages)===null||vt===void 0)?void 0:vt.length)>0?null:t.a.createElement(Qe,null),(ht==null||((xt=ht.stages)===null||xt===void 0)?void 0:xt.length)>0&&t.a.createElement(ve.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var kt=Object(f.a)(i.a.mark(function Pr(an){var sn,Dr,qr,Ir,hn,Vr,fn;return i.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return ar(!1),Vr=ht==null||((sn=ht.stages)===null||sn===void 0)?void 0:sn.filter(function(Ge){return parseInt(an)===parseInt(Ge==null?void 0:Ge.id)})[0],fn=Vr==null||((Dr=Vr.children)===null||Dr===void 0)?void 0:Dr[0],Qt(fn),Gr(Vr),Br(((qr=ht.rule_contents)===null||qr===void 0||((Ir=qr.filter(function(Ge){return parseInt(Ge.competition_stage_id)===parseInt(Vr==null?void 0:Vr.id)}))===null||Ir===void 0||((hn=Ir[0])===null||hn===void 0))?void 0:hn.content)||""),yt.page=1,yt.limit=10,yt.id=(fn==null?void 0:fn.id)||an,bt(Object(D.a)({},yt)),Ie.next=9,St(Object(D.a)({},yt));case 9:case"end":return Ie.stop()}},Pr)}));return function(Pr){return kt.apply(this,arguments)}}()},ht&&ht.stages.map(function(kt,Pr){return t.a.createElement(Qn,{tab:kt.name,key:kt.id===null?0:kt.id})})),(Ut==null||((Mt=Ut.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ve.a,{activeKey:(wr==null?void 0:wr.id)+"",onChange:function(){var kt=Object(f.a)(i.a.mark(function Pr(an){var sn,Dr;return i.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Dr=Ut==null||((sn=Ut.children)===null||sn===void 0)?void 0:sn.filter(function(hn){return parseInt(an)===parseInt(hn==null?void 0:hn.id)})[0],Qt(Dr),yt.page=1,yt.limit=10,yt.id=an,bt(Object(D.a)({},yt)),Ir.next=5,St(Object(D.a)({},yt));case 5:case"end":return Ir.stop()}},Pr)}));return function(Pr){return kt.apply(this,arguments)}}()},Ut==null||((Lt=Ut.children)===null||Lt===void 0)?void 0:Lt.map(function(kt,Pr){return t.a.createElement(Qn,{tab:kt.name,key:kt.id===null?0:kt.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(){yt.page=1,yt.sort=yt.sort==="desc"?"asc":"desc",bt(Object(D.a)({},yt)),St(Object(D.a)({},yt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",yt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(yt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(B.a.Search,{onSearch:function(Pr){yt.page=1,yt.search=Pr,bt(Object(D.a)({},yt)),St(Object(D.a)({},yt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(o.a,{spinning:Bt},wt==null||((Ht=wt.results)===null||Ht===void 0)?void 0:Ht.map(function(kt,Pr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Pr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/"+(kt==null?void 0:kt.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"}},kt==null?void 0:kt.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"}},(kt==null?void 0:kt.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"}},(kt==null?void 0:kt.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",kt==null?void 0:kt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(kt==null?void 0:kt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(kt==null?void 0:kt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(kt==null?void 0:kt.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(qi.a,{total:wt==null?void 0:wt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:yt.page,onChange:function(Pr,an){yt.page=Pr,bt(Object(D.a)({},yt)),St(Object(D.a)({},yt))}})))}var ji=ci,Fi=function(et){var vt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],xt=["","\u5341","\u767E","\u5343","\u4E07"];et=parseInt(et);var Mt=function(ht){for(var wt=ht.toString().split("").reverse(),St="",vr=0;vr<wt.length;vr++)St=(vr==0&&wt[vr]==0||vr>0&&wt[vr]==0&&wt[vr-1]==0?"":vt[wt[vr]]+(wt[vr]==0?xt[0]:xt[vr]))+St;return St},Lt=Math.floor(et/1e4),Ht=et%1e4;return Ht.toString().length<4&&(Ht="0"+Ht),Lt?Mt(Lt)+"\u4E07"+Mt(Ht):Mt(et)};function yi(_t){var et,vt=_t.item,xt=_t.index,Mt=_t.StaffDetail,Lt=Object(s.useState)(!0),Ht=Object(v.a)(Lt,2),Bt=Ht[0],ht=Ht[1],wt=Object(s.useState)(!0),St=Object(v.a)(wt,2),vr=St[0],nr=St[1],tr=Object(s.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:V.a.IMG_SERVER+"/"+(vt==null?void 0:vt.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",Fi(xt+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},vt==null?void 0:vt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},vt==null?void 0:vt.challenges_count)," ")),t.a.createElement("div",{ref:tr},t.a.createElement(z.a,{style:{maxHeight:Bt&&100},value:vt==null?void 0:vt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ht(!Bt)}},Bt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Bt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:vr&&58,overflow:"hidden"}},vt==null||((et=vt.challenges)===null||et===void 0)?void 0:et.map(function($t,ir){return t.a.createElement("div",{style:{marginTop:ir===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",ir+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(){nr(!vr)}},vr?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(vr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Mt==null?void 0:Mt.enrolled)&&t.a.createElement(w.a,{onClick:function(){window.open("/shixuns/".concat(vt==null?void 0:vt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Ui=yi,bi=ve.a.TabPane;function oa(_t){var et,vt,xt,Mt,Lt,Ht,Bt=_t.loading,ht=_t.ChartRules,wt=_t.ItemData,St=_t.getCharts,vr=_t.Selectkey,nr=_t.HeaderDetail,tr=_t.getChartRules,$t=_t.userinfo,ir=_t.Editable,sr=_t.dispatch,ot=_t.StaffDetail,Sr=Object(s.useState)(!1),Lr=Object(v.a)(Sr,2),yr=Lr[0],ar=Lr[1],pr=Object(s.useState)(""),er=Object(v.a)(pr,2),lr=er[0],Br=er[1],Ft=Object(s.useState)(!0),Xt=Object(v.a)(Ft,2),zt=Xt[0],ur=Xt[1],Ar=Object(s.useState)(),qe=Object(v.a)(Ar,2),Ut=qe[0],Gr=qe[1],Qr=Object(s.useState)(),Vt=Object(v.a)(Qr,2),wr=Vt[0],Qt=Vt[1],Rt=Object(T.i)(),Kt=Rt.identifier,cr=Object(s.useState)({page:1,limit:10}),qt=Object(v.a)(cr,2),yt=qt[0],bt=qt[1],Gt=Object(s.useState)(),kt=Object(v.a)(Gt,2),Pr=kt[0],an=kt[1];Object(s.useEffect)(function(){var Dr;zt&&ht!==null&&ht!==void 0&&(Dr=ht.stages)!==null&&Dr!==void 0&&Dr[0]&&sn()},[ht==null||((et=ht.stages)===null||et===void 0)?void 0:et[0]]);var sn=function(){var Dr=Object(f.a)(i.a.mark(function qr(){var Ir,hn,Vr,fn,$n,Ie;return i.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $n=ht==null||((Ir=ht.stages)===null||Ir===void 0)?void 0:Ir[0],Gr($n),Ie=ht==null||((hn=ht.stages)===null||hn===void 0||((Vr=hn[0])===null||Vr===void 0||((fn=Vr.children)===null||fn===void 0)))?void 0:fn[0],Qt(Ie),yt.id=(Ie==null?void 0:Ie.id)||($n==null?void 0:$n.id),bt(Object(D.a)({},yt)),$e.next=7,St(Object(D.a)(Object(D.a)({},yt),{},{stage_id:yt.id}));case 7:case"end":return $e.stop()}},qr)}));return function(){return Dr.apply(this,arguments)}}();return t.a.createElement("div",null,(ht==null||((vt=ht.stages)===null||vt===void 0)?void 0:vt.length)>0?null:t.a.createElement(Qe,null),(ht==null||((xt=ht.stages)===null||xt===void 0)?void 0:xt.length)>0&&t.a.createElement(ve.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Dr=Object(f.a)(i.a.mark(function qr(Ir){var hn,Vr,fn,$n,Ie,Ge,$e;return i.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return ar(!1),Ge=ht==null||((hn=ht.stages)===null||hn===void 0)?void 0:hn.filter(function(ke){return parseInt(Ir)===parseInt(ke==null?void 0:ke.id)})[0],$e=Ge==null||((Vr=Ge.children)===null||Vr===void 0)?void 0:Vr[0],Qt($e),Gr(Ge),Br(((fn=ht.rule_contents)===null||fn===void 0||(($n=fn.filter(function(ke){return parseInt(ke.competition_stage_id)===parseInt(Ge==null?void 0:Ge.id)}))===null||$n===void 0||((Ie=$n[0])===null||Ie===void 0))?void 0:Ie.content)||""),yt.page=1,yt.limit=10,yt.id=($e==null?void 0:$e.id)||Ir,bt(Object(D.a)({},yt)),be.next=9,St(Object(D.a)({},yt));case 9:case"end":return be.stop()}},qr)}));return function(qr){return Dr.apply(this,arguments)}}()},ht&&ht.stages.map(function(Dr,qr){return t.a.createElement(bi,{tab:Dr.name,key:Dr.id===null?0:Dr.id})})),(Ut==null||((Mt=Ut.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ve.a,{activeKey:(wr==null?void 0:wr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Dr=Object(f.a)(i.a.mark(function qr(Ir){var hn,Vr;return i.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:return Vr=Ut==null||((hn=Ut.children)===null||hn===void 0)?void 0:hn.filter(function(Ie){return parseInt(Ir)===parseInt(Ie==null?void 0:Ie.id)})[0],Qt(Vr),yt.page=1,yt.limit=10,yt.id=Ir,bt(Object(D.a)({},yt)),$n.next=5,St(Object(D.a)({},yt));case 5:case"end":return $n.stop()}},qr)}));return function(qr){return Dr.apply(this,arguments)}}()},Ut==null||((Lt=Ut.children)===null||Lt===void 0)?void 0:Lt.map(function(Dr,qr){return t.a.createElement(bi,{tab:Dr.name,key:Dr.id===null?0:Dr.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}},wt==null?void 0:wt.start_time,"~",wt==null?void 0:wt.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(wt==null?void 0:wt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(o.a,{spinning:Bt},wt==null||((Ht=wt.results)===null||Ht===void 0)?void 0:Ht.map(function(Dr,qr){return t.a.createElement(Ui,{StaffDetail:ot,item:Dr,index:qr})})),t.a.createElement(qi.a,{total:wt==null?void 0:wt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:yt.page,onChange:function(qr,Ir){yt.page=qr,bt(Object(D.a)({},yt)),St(Object(D.a)({},yt))}})))}var sa=oa,Ei=M("UfjD"),Gn=M("qHvr"),Vi=function(et){var vt,xt,Mt,Lt,Ht,Bt,ht,wt,St=et.globalSetting,vr=et.loading,nr=et.dispatch,tr=et.user,$t=Object(g.a)(et,["globalSetting","loading","dispatch","user"]),ir=Object(s.useState)({avatar_url:""}),sr=Object(v.a)(ir,2),ot=sr[0],Sr=sr[1],Lr=Object(s.useState)([]),yr=Object(v.a)(Lr,2),ar=yr[0],pr=yr[1],er=Object(T.i)(),lr=er.identifier,Br=Object(s.useState)([]),Ft=Object(v.a)(Br,2),Xt=Ft[0],zt=Ft[1],ur=Object(s.useState)(!0),Ar=Object(v.a)(ur,2),qe=Ar[0],Ut=Ar[1],Gr=Object(s.useState)([]),Qr=Object(v.a)(Gr,2),Vt=Qr[0],wr=Qr[1],Qt=Object(s.useState)([]),Rt=Object(v.a)(Qt,2),Kt=Rt[0],cr=Rt[1],qt=Object(s.useState)(!1),yt=Object(v.a)(qt,2),bt=yt[0],Gt=yt[1],kt=Object(s.useState)(!1),Pr=Object(v.a)(kt,2),an=Pr[0],sn=Pr[1],Dr=Object(s.useState)(!1),qr=Object(v.a)(Dr,2),Ir=qr[0],hn=qr[1],Vr=Object(s.useState)([]),fn=Object(v.a)(Vr,2),$n=fn[0],Ie=fn[1],Ge=Object(s.useState)([]),$e=Object(v.a)(Ge,2),Fe=$e[0],be=$e[1],ke=Object(s.useState)([]),we=Object(v.a)(ke,2),je=we[0],ze=we[1],Ve=Object(s.useState)(!1),We=Object(v.a)(Ve,2),Ze=We[0],mt=We[1],Dt=Object(s.useState)([]),Nt=Object(v.a)(Dt,2),Yt=Nt[0],kr=Nt[1],$r=Object(s.useState)(),Xr=Object(v.a)($r,2),Zr=Xr[0],Hr=Xr[1],en=Object(s.useState)(!0),tn=Object(v.a)(en,2),vn=tn[0],ln=tn[1],Pn=Object(s.useState)(!1),dn=Object(v.a)(Pn,2),Mr=dn[0],Nr=dn[1],on=Object(s.useState)(!1),pn=Object(v.a)(on,2),Tr=pn[0],bn=pn[1],Wn=Object(s.useState)(!1),wn=Object(v.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(s.useState)(!1),ni=Object(v.a)(Yn,2),Hn=ni[0],di=ni[1],Xi=Object(s.useState)(!1),Ti=Object(v.a)(Xi,2),ii=Ti[0],In=Ti[1],Nn=Object(s.useState)(!0),zn=Object(v.a)(Nn,2),Un=zn[0],Zn=zn[1],Pi=Object(T.h)(),ra=Object(s.useRef)(null);Object(s.useEffect)(function(){lr&&An(),Object(rr.V)("\u7ADE\u8D5B")},[lr]);function An(){return Bi.apply(this,arguments)}function Bi(){return Bi=Object(f.a)(i.a.mark(function Cr(){var Or;return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.t0=pr,En.next=3,nr({type:"competitions/getStaff",payload:{identifier:lr}});case 3:return En.t1=En.sent,(0,En.t0)(En.t1),En.next=7,nr({type:"competitions/getHeader",payload:{identifier:lr}});case 7:Or=En.sent,Sr(Or),Object(rr.V)((Or==null?void 0:Or.name)||"\u7ADE\u8D5B");case 10:case"end":return En.stop()}},Cr)})),Bi.apply(this,arguments)}Object(s.useEffect)(function(){var Cr;Hr(parseInt(Pi==null||((Cr=Pi.query)===null||Cr===void 0)?void 0:Cr.type)===1)},[Pi]),Object(s.useEffect)(function(){var Cr;if((ot==null||((Cr=ot.competition_modules)===null||Cr===void 0)?void 0:Cr.length)>0){var Or,fr;if((Pi==null||((Or=Pi.query)===null||Or===void 0)?void 0:Or.active)==="\u8D5B\u9898\u53D1\u5E03"){var En,gr=ot==null||((En=ot.competition_modules)===null||En===void 0)?void 0:En.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(gr){Wi(gr);return}}Wi(ot==null||((fr=ot.competition_modules)===null||fr===void 0)?void 0:fr[0])}},[ot]);function Wi(Cr){return kn.apply(this,arguments)}function kn(){return kn=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(ze(Or.id),je=Or.id,wr(Or),!(Or.module_type==="entrance")){gr.next=9;break}return gr.next=6,nr({type:"competitions/getItem",payload:{url:Or.module_url,module_type:"entrance"}});case 6:fr=gr.sent,gr.next=12;break;case 9:return gr.next=11,nr({type:"competitions/getItem",payload:{url:Or.module_url}});case 11:fr=gr.sent;case 12:Gt(!1),hn(!1),mt(!1),zt(fr),Nr(!1),bn(!1),cr(Or.module_type),Or.module_type==="chart"?(Gt(!0),Ut(!1),Ba()):Or.module_type==="certificate"?(hn(!0),Gt(!1),Ut(!1),ba()):Or.module_type==="md_tab"?(mt(!0),Ut(!1),localStorage.setItem("issee","2"),Gt(!1),hn(!1),ca()):Or.module_type==="md_shixun"?(Nr(!0),Ut(!1),ca()):Or.module_type==="entrance"?(bn(!0),Ut(!1),ca()):(Ut(!0),localStorage.setItem("issee","1"));case 20:case"end":return gr.stop()}},Cr)})),kn.apply(this,arguments)}function On(Cr,Or,fr){return qn.apply(this,arguments)}function qn(){return qn=Object(f.a)(i.a.mark(function Cr(Or,fr,En){var gr,pa;return i.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(Or.stopPropagation(),Object(ce.e)(nr)){jn.next=3;break}return jn.abrupt("return");case 3:if(!(ot!=null&&ot.is_authentication&&!(tr!=null&&(gr=tr.userInfo)!==null&&gr!==void 0&&gr.authentication))){jn.next=6;break}return nr({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),jn.abrupt("return");case 6:if(!(ot!=null&&ot.enroll_url)){jn.next=9;break}return Object(rr.Q)(ot==null?void 0:ot.enroll_url),jn.abrupt("return");case 9:if(!(En==="ismodel")){jn.next=23;break}if(!(fr.member_of_course===!0)){jn.next=14;break}Object(rr.Q)("/classrooms/".concat(fr.course_id)),jn.next=21;break;case 14:if(fr.invite_code){jn.next=17;break}return p.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,nr({type:"competitions/addApplytojoincourse",payload:{invite_code:fr.invite_code,student:1}});case 19:pa=jn.sent,pa.status===0&&Object(rr.Q)("/classrooms/".concat(fr.course_id));case 21:jn.next=27;break;case 23:if(!(ar.enrolled===!0)){jn.next=26;break}return Object(rr.Q)(En),jn.abrupt("return");case 26:Tn(!0);case 27:case"end":return jn.stop()}},Cr)})),qn.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(f.a)(i.a.mark(function Cr(){return i.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.t0=sn,fr.next=3,nr({type:"competitions/ChartRules",payload:{identifier:lr}});case 3:return fr.t1=fr.sent,fr.next=6,(0,fr.t0)(fr.t1);case 6:case"end":return fr.stop()}},Cr)})),wa.apply(this,arguments)}function la(Cr){return ua.apply(this,arguments)}function ua(){return ua=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,nr({type:"competitions/Charts",payload:{identifier:lr,stage_id:Or}});case 2:fr=gr.sent,zt(fr);case 4:case"end":return gr.stop()}},Cr)})),ua.apply(this,arguments)}function ka(Cr){return Ca.apply(this,arguments)}function Ca(){return Ca=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return ln(!0),gr.next=3,nr({type:"competitions/Results",payload:Object(D.a)({identifier:lr,stage_id:Or==null?void 0:Or.id},Or)});case 3:fr=gr.sent,zt(fr),ln(!1);case 6:case"end":return gr.stop()}},Cr)})),Ca.apply(this,arguments)}function La(Cr){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return ln(!0),gr.next=3,nr({type:"competitions/Results",payload:Object(D.a)({identifier:lr,stage_id:Or==null?void 0:Or.id,module_type:"entrance"},Or)});case 3:fr=gr.sent,zt(fr),ln(!1);case 6:case"end":return gr.stop()}},Cr)})),Wa.apply(this,arguments)}function Xa(Cr){return Ma.apply(this,arguments)}function Ma(){return Ma=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,nr({type:"competitions/Results",payload:{identifier:lr,stage_id:Or}});case 2:if(fr=gr.sent,!(localStorage.getItem("issee")==="1")){gr.next=5;break}return gr.abrupt("return");case 5:zt(fr);case 6:case"end":return gr.stop()}},Cr)})),Ma.apply(this,arguments)}function ca(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(f.a)(i.a.mark(function Cr(){return i.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.t0=kr,fr.next=3,nr({type:"competitions/TabResults",payload:{identifier:lr,competition_module_id:je}});case 3:fr.t1=fr.sent,(0,fr.t0)(fr.t1);case 5:case"end":return fr.stop()}},Cr)})),Sa.apply(this,arguments)}function ba(){return da.apply(this,arguments)}function da(){return da=Object(f.a)(i.a.mark(function Cr(){var Or,fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,nr({type:"competitions/Prize",payload:{identifier:lr,user_id:tr==null||((Or=tr.userInfo)===null||Or===void 0)?void 0:Or.user_id}});case 2:fr=gr.sent,Ie(fr);case 4:case"end":return gr.stop()}},Cr)})),da.apply(this,arguments)}function co(){return Ea.apply(this,arguments)}function Ea(){return Ea=Object(f.a)(i.a.mark(function Cr(){var Or,fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,nr({type:"competitions/Accounts",payload:{id:tr==null||((Or=tr.userInfo)===null||Or===void 0)?void 0:Or.user_id}});case 2:fr=gr.sent,be(fr);case 4:case"end":return gr.stop()}},Cr)})),Ea.apply(this,arguments)}function Ta(Cr){return ha.apply(this,arguments)}function ha(){return ha=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(Un){gr.next=2;break}return gr.abrupt("return");case 2:if(Zn(!1),!fa()){gr.next=5;break}return gr.abrupt("return");case 5:return gr.next=7,nr({type:"competitions/AddTeam",payload:{identifier:lr,name:Or}});case 7:fr=gr.sent,fr&&fr.status===0?(p.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),An(),di(!1)):Zn(!0);case 9:case"end":return gr.stop()}},Cr)})),ha.apply(this,arguments)}function fa(){var Cr,Or;if(tr!=null&&(Cr=tr.userInfo)!==null&&Cr!==void 0&&Cr.is_teacher){var fr;if(ar!=null&&(fr=ar.teacher_staff)!==null&&fr!==void 0&&fr.mutiple_limited&&(ar!=null&&ar.enrolled))return p.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}else{var En;if(ar!=null&&(En=ar.member_staff)!==null&&En!==void 0&&En.mutiple_limited&&(ar!=null&&ar.enrolled))return p.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}if(ar!=null&&ar.enroll_ended)return p.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Zn(!0),!0;if(tr!=null&&(Or=tr.userInfo)!==null&&Or!==void 0&&Or.is_teacher){if(!ar.teacher_staff)return p.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Zn(!0),!0}else if(!(ar!=null&&ar.member_staff))return p.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Zn(!0),!0}function $i(Cr){return na.apply(this,arguments)}function na(){return na=Object(f.a)(i.a.mark(function Cr(Or){var fr;return i.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(Un){gr.next=2;break}return gr.abrupt("return");case 2:if(!fa()){gr.next=4;break}return gr.abrupt("return");case 4:return Zn(!1),gr.next=7,nr({type:"competitions/JoinTeam",payload:{identifier:lr,invite_code:Or}});case 7:fr=gr.sent,fr&&fr.status===0?(p.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),In(!1),Zn(!0),An()):Zn(!0);case 9:case"end":return gr.stop()}},Cr)})),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(_.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(o.a,{spinning:vr.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:V.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:V.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(O.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:O.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:O.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:O.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:O.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:O.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&&ar.enrolled&&t.a.createElement(w.a,{onClick:function(Or){if((ot==null?void 0:ot.mode)===1){var fr;Wi((fr=ot.competition_modules)===null||fr===void 0?void 0:fr.find(function(En){return En.module_type==="entrance"}))}else On(Or,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&&((vt=ot.competition_modules)===null||vt===void 0||((xt=vt.filter(function(Cr){return Cr.module_type==="entrance"}))===null||xt===void 0)?void 0:xt.length)>0?"":"none"},className:O.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(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,ot.competition_status!=="nearly_published"&&ot.enroll_end&&ot.competition_status!=="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,ot.competition_status==="progressing"&&ot.enroll_end!=!0?t.a.createElement(w.a,{type:"primary",disabled:ar.enrolled&&!ot.need_attachment,className:O.a.buttonsize,onClick:function(Or){if(ar.enrolled&&ot.need_attachment){var fr;(fr=ra.current)===null||fr===void 0||fr.handleVisible();return}On(Or,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))}},ar.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),tr.userInfo.real_name!="\u6E38\u5BA2"&&!(ot!=null&&ot.enroll_url)&&t.a.createElement("span",{onClick:function(Or){return On(Or,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))},className:O.a.myteam},Object(Ur.v)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(c.a,{selectedKeys:["".concat(je)]},ot&&ot.competition_modules&&ot.competition_modules.map(function(Cr,Or){if(Cr.module_type!="enroll")return t.a.createElement(c.a.Item,{className:O.a.menuItem,onClick:function(){if(Cr!=null&&Cr.is_authentication){if(!Object(ce.e)(nr))return;p.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Wi(Cr)},key:Cr.id},Cr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(Mr||Tr)&&0}},Ir?t.a.createElement(Pt,{dispatch:nr,userid:tr==null||((Mt=tr.userInfo)===null||Mt===void 0)?void 0:Mt.user_id,Prize:$n,Accounts:Fe,getAccounts:co}):null,bt?t.a.createElement(Me,{HeaderDetail:ot,userinfo:tr.userInfo,Editable:ot==null||((Lt=ot.permission)===null||Lt===void 0)?void 0:Lt.editable,getCharts:la,getChartRules:Ba,Selectkey:je,ChartRules:an,ItemData:Xt}):null,qe?t.a.createElement(q,{ref:ra,StaffDetail:ar,HeaderDetail:ot,userinfo:tr.userInfo,Editable:ot==null||((Ht=ot.permission)===null||Ht===void 0)?void 0:Ht.editable,ItemData:Xt,setIssee:Ut,ModelType:Kt,dispatch:nr}):null,!qe&&!Mr&&!Tr&&!bt&&!Ir&&!Ze?t.a.createElement(Q,{userinfo:tr.userInfo,ModelType:Kt,getrightdatas:Wi,dispatch:nr,MenuItem:Vt,setIssee:Ut,identifier:lr,ItemData:Xt}):null,Ze&&t.a.createElement(Dn,{dispatch:nr,StaffDetail:ar,userinfo:tr.userInfo,HeaderDetail:ot,Editable:ot==null||((Bt=ot.permission)===null||Bt===void 0)?void 0:Bt.editable,getCharts:Xa,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:Xt}),Mr&&t.a.createElement(ji,{loading:vn,dispatch:nr,StaffDetail:ar,userinfo:tr.userInfo,HeaderDetail:ot,Editable:ot==null||((ht=ot.permission)===null||ht===void 0)?void 0:ht.editable,getCharts:ka,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:Xt}),Tr&&t.a.createElement(sa,{loading:vn,dispatch:nr,StaffDetail:ar,userinfo:tr.userInfo,HeaderDetail:ot,Editable:ot==null||((wt=ot.permission)===null||wt===void 0)?void 0:wt.editable,getCharts:La,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:Xt}))),t.a.createElement(x.a,null),t.a.createElement(H,{getResults:Xa}),t.a.createElement(S.a,{visible:Zr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Hr(!1)}},t.a.createElement("div",{className:O.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(w.a,{type:"primary",onClick:function(){return Object(rr.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(S.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Mn,onCancel:function(){Tn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(w.a,{type:"primary",style:{height:40},onClick:function(){In(!0),Tn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(w.a,{style:{height:40},onClick:function(){di(!0),Tn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ii?t.a.createElement(Ei.a,{isjoin:ii,setJoin:In,JoinTeams:$i}):null,Hn?t.a.createElement(Gn.a,{isAddmodle:Hn,setIsAdd:di,createTeam:Ta}):null)},ta=J.default=Object(l.a)(function(_t){var et=_t.loading,vt=_t.globalSetting,xt=_t.user;return{globalSetting:vt,loading:et,user:xt}})(Vi)},GRuw:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("lPiR"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,c=m.algo,h=c.SHA256,w=c.SHA224=h.extend({_doReset:function(){this._hash=new P.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=h._doFinalize.call(this);return d.sigBytes-=4,d}});m.SHA224=h._createHelper(w),m.HmacSHA224=h._createHmacHelper(w)}(),D.SHA224})},GfqC:function(N,J,M){"use strict";var D=M("q1tI"),m=M.n(D),S=M("TSYQ"),P=M.n(S);function c(G,B){var z="cannot "+G.method+" "+G.action+" "+B.status+"'",V=new Error(z);return V.status=B.status,V.method=G.method,V.url=G.action,V}function h(G){var B=G.responseText||G.response;if(!B)return B;try{return JSON.parse(B)}catch(z){return B}}function w(G){var B=new XMLHttpRequest;G.onProgress&&B.upload&&(B.upload.onprogress=function(ce){ce.total>0&&(ce.percent=ce.loaded/ce.total*100),G.onProgress(ce)});var z=new FormData;G.data&&Object.keys(G.data).forEach(function(ie){var ce=G.data[ie];if(Array.isArray(ce)){ce.forEach(function(he){z.append(ie+"[]",he)});return}z.append(ie,G.data[ie])}),G.file instanceof Blob?z.append(G.filename,G.file,G.file.name):z.append(G.filename,G.file),B.onerror=function(ce){G.onError(ce)},B.onload=function(){return B.status<200||B.status>=300?G.onError(c(G,B),h(B)):G.onSuccess(h(B),B)},B.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var V=G.headers||{};return V["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(V).forEach(function(ie){V[ie]!==null&&B.setRequestHeader(ie,V[ie])}),B.send(z),{abort:function(){B.abort()}}}var d=+new Date,o=0;function a(){return"rc-upload-"+d+"-"+ ++o}function n(G,B){return G.indexOf(B,G.length-B.length)!==-1}var u=function(G,B){if(G&&B){var z=Array.isArray(B)?B:B.split(","),V=G.name||"",ie=G.type||"",ce=ie.replace(/\/.*$/,"");return z.some(function(he){var Ae=he.trim();return Ae.charAt(0)==="."?n(V.toLowerCase(),Ae.toLowerCase()):/\/\*$/.test(Ae)?ce===Ae.replace(/\/.*$/,""):ie===Ae})}return!0};function p(G,B){var z=G.createReader(),V=[];function ie(){z.readEntries(function(ce){var he=Array.prototype.slice.apply(ce);V=V.concat(he);var Ae=!he.length;Ae?B(V):ie()})}ie()}var f=function(B,z,V){var ie=function ce(he,Ae){Ae=Ae||"",he.isFile?he.file(function(De){V(De)&&(he.fullPath&&!De.webkitRelativePath&&(Object.defineProperties(De,{webkitRelativePath:{writable:!0}}),De.webkitRelativePath=he.fullPath.replace(/^\//,""),Object.defineProperties(De,{webkitRelativePath:{writable:!1}})),z([De]))}):he.isDirectory&&p(he,function(De){De.forEach(function(pe){ce(pe,""+Ae+he.name+"/")})})};B.forEach(function(ce){ie(ce.webkitGetAsEntry())})},v=f,g=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var z=arguments[B];for(var V in z)Object.prototype.hasOwnProperty.call(z,V)&&(G[V]=z[V])}return G},b=function(){function G(B,z){var V=[],ie=!0,ce=!1,he=void 0;try{for(var Ae=B[Symbol.iterator](),De;!(ie=(De=Ae.next()).done)&&!(V.push(De.value),z&&V.length===z);ie=!0);}catch(pe){ce=!0,he=pe}finally{try{!ie&&Ae.return&&Ae.return()}finally{if(ce)throw he}}return V}return function(B,z){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return G(B,z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function G(B,z){for(var V=0;V<z.length;V++){var ie=z[V];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(B,ie.key,ie)}}return function(B,z,V){return z&&G(B.prototype,z),V&&G(B,V),B}}();function s(G,B,z){return B in G?Object.defineProperty(G,B,{value:z,enumerable:!0,configurable:!0,writable:!0}):G[B]=z,G}function t(G,B){var z={};for(var V in G){if(B.indexOf(V)>=0)continue;if(!Object.prototype.hasOwnProperty.call(G,V))continue;z[V]=G[V]}return z}function T(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function _(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 l(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 k=function(B){return Object.keys(B).reduce(function(z,V){return(V.substr(0,5)==="data-"||V.substr(0,5)==="aria-"||V==="role")&&(z[V]=B[V]),z},{})},O=function(G){l(B,G);function B(){var z,V,ie,ce;T(this,B);for(var he=arguments.length,Ae=Array(he),De=0;De<he;De++)Ae[De]=arguments[De];return ce=(V=(ie=_(this,(z=B.__proto__||Object.getPrototypeOf(B)).call.apply(z,[this].concat(Ae))),ie),ie.state={uid:a()},ie.reqs={},ie.onChange=function(pe){var Te=pe.target.files;ie.uploadFiles(Te),ie.reset()},ie.onClick=function(pe){var Te=ie.fileInput;if(!Te)return;var ye=ie.props,ue=ye.children,le=ye.onClick;ue&&ue.type==="button"&&(Te.parentNode.focus(),Te.parentNode.querySelector("button").blur()),Te.click(),le&&le(pe)},ie.onKeyDown=function(pe){pe.key==="Enter"&&ie.onClick()},ie.onFileDrop=function(pe){var Te=ie.props.multiple;if(pe.preventDefault(),pe.type==="dragover")return;if(ie.props.directory)v(Array.prototype.slice.call(pe.dataTransfer.items),ie.uploadFiles,function(ue){return u(ue,ie.props.accept)});else{var ye=Array.prototype.slice.call(pe.dataTransfer.files).filter(function(ue){return u(ue,ie.props.accept)});Te===!1&&(ye=ye.slice(0,1)),ie.uploadFiles(ye)}},ie.uploadFiles=function(pe){var Te=Array.prototype.slice.call(pe);Te.map(function(ye){return ye.uid=a(),ye}).forEach(function(ye){ie.upload(ye,Te)})},ie.saveFileInput=function(pe){ie.fileInput=pe},V),_(ie,ce)}return i(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(V,ie){var ce=this,he=this.props;if(!he.beforeUpload)return setTimeout(function(){return ce.post(V)},0);var Ae=he.beforeUpload(V,ie);Ae&&Ae.then?Ae.then(function(De){var pe=Object.prototype.toString.call(De);return pe==="[object File]"||pe==="[object Blob]"?ce.post(De):ce.post(V)}).catch(function(De){console.log(De)}):Ae!==!1&&setTimeout(function(){return ce.post(V)},0);return}},{key:"post",value:function(V){var ie=this;if(!this._isMounted)return;var ce=this.props,he=ce.onStart,Ae=ce.onProgress,De=ce.transformFile,pe=De===void 0?function(Te){return Te}:De;new Promise(function(Te){var ye=ce.action;return typeof ye=="function"&&(ye=ye(V)),Te(ye)}).then(function(Te){var ye=V.uid,ue=ce.customRequest||w,le=Promise.resolve(pe(V)).then(function(te){var fe=ce.data;return typeof fe=="function"&&(fe=fe(te)),Promise.all([te,fe])}).catch(function(te){console.error(te)});le.then(function(te){var fe=b(te,2),q=fe[0],ee=fe[1],Ce={action:Te,filename:ce.name,data:ee,file:q,headers:ce.headers,withCredentials:ce.withCredentials,method:ce.method||"post",onProgress:Ae?function(re){Ae(re,V)}:null,onSuccess:function(Q,X){delete ie.reqs[ye],ce.onSuccess(Q,V,X)},onError:function(Q,X){delete ie.reqs[ye],ce.onError(Q,X,V)}};he(V),ie.reqs[ye]=ue(Ce)})})}},{key:"reset",value:function(){this.setState({uid:a()})}},{key:"abort",value:function(V){var ie=this.reqs;if(V){var ce=V;V&&V.uid&&(ce=V.uid),ie[ce]&&ie[ce].abort&&ie[ce].abort(),delete ie[ce]}else Object.keys(ie).forEach(function(he){ie[he]&&ie[he].abort&&ie[he].abort(),delete ie[he]})}},{key:"render",value:function(){var V,ie=this.props,ce=ie.component,he=ie.prefixCls,Ae=ie.className,De=ie.disabled,pe=ie.id,Te=ie.style,ye=ie.multiple,ue=ie.accept,le=ie.children,te=ie.directory,fe=ie.openFileDialogOnClick,q=ie.onMouseEnter,ee=ie.onMouseLeave,Ce=t(ie,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),re=P()((V={},s(V,he,!0),s(V,he+"-disabled",De),s(V,Ae,Ae),V)),Q=De?{}:{onClick:fe?this.onClick:function(){},onKeyDown:fe?this.onKeyDown:function(){},onMouseEnter:q,onMouseLeave:ee,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return m.a.createElement(ce,g({},Q,{className:re,role:"button",style:Te}),m.a.createElement("input",g({},k(Ce),{id:pe,type:"file",ref:this.saveFileInput,onClick:function(Z){return Z.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ue,directory:te?"directory":null,webkitdirectory:te?"webkitdirectory":null,multiple:ye,onChange:this.onChange})),le)}}]),B}(D.Component),x=O,y=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var z=arguments[B];for(var V in z)Object.prototype.hasOwnProperty.call(z,V)&&(G[V]=z[V])}return G},E=function(){function G(B,z){for(var V=0;V<z.length;V++){var ie=z[V];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(B,ie.key,ie)}}return function(B,z,V){return z&&G(B.prototype,z),V&&G(B,V),B}}();function C(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function I(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 j(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 H=function(G){j(B,G);function B(){var z,V,ie,ce;C(this,B);for(var he=arguments.length,Ae=Array(he),De=0;De<he;De++)Ae[De]=arguments[De];return ce=(V=(ie=I(this,(z=B.__proto__||Object.getPrototypeOf(B)).call.apply(z,[this].concat(Ae))),ie),ie.saveUploader=function(pe){ie.uploader=pe},V),I(ie,ce)}return E(B,[{key:"abort",value:function(V){this.uploader.abort(V)}},{key:"render",value:function(){return m.a.createElement(x,y({},this.props,{ref:this.saveUploader}))}}]),B}(D.Component);H.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=H,U=J.a=W},H38U:function(N,J,M){var D=M("f4xo"),m=M("rcnY"),S=M("wU8J"),P=M("Iq15"),c=M("dWSS");function h(d,o){this.typeNumber=d,this.errorCorrectLevel=o,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var w=h.prototype;w.addData=function(d){var o=new D(d);this.dataList.push(o),this.dataCache=null},w.isDark=function(d,o){if(d<0||this.moduleCount<=d||o<0||this.moduleCount<=o)throw new Error(d+","+o);return this.modules[d][o]},w.getModuleCount=function(){return this.moduleCount},w.make=function(){if(this.typeNumber<1){var d=1;for(d=1;d<40;d++){for(var o=m.getRSBlocks(d,this.errorCorrectLevel),a=new S,n=0,u=0;u<o.length;u++)n+=o[u].dataCount;for(var u=0;u<this.dataList.length;u++){var p=this.dataList[u];a.put(p.mode,4),a.put(p.getLength(),P.getLengthInBits(p.mode,d)),p.write(a)}if(a.getLengthInBits()<=n*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},w.makeImpl=function(d,o){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var a=0;a<this.moduleCount;a++){this.modules[a]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[a][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(d,o),this.typeNumber>=7&&this.setupTypeNumber(d),this.dataCache==null&&(this.dataCache=h.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},w.setupPositionProbePattern=function(d,o){for(var a=-1;a<=7;a++){if(d+a<=-1||this.moduleCount<=d+a)continue;for(var n=-1;n<=7;n++){if(o+n<=-1||this.moduleCount<=o+n)continue;0<=a&&a<=6&&(n==0||n==6)||0<=n&&n<=6&&(a==0||a==6)||2<=a&&a<=4&&2<=n&&n<=4?this.modules[d+a][o+n]=!0:this.modules[d+a][o+n]=!1}}},w.getBestMaskPattern=function(){for(var d=0,o=0,a=0;a<8;a++){this.makeImpl(!0,a);var n=P.getLostPoint(this);(a==0||d>n)&&(d=n,o=a)}return o},w.createMovieClip=function(d,o,a){var n=d.createEmptyMovieClip(o,a),u=1;this.make();for(var p=0;p<this.modules.length;p++)for(var f=p*u,v=0;v<this.modules[p].length;v++){var g=v*u,b=this.modules[p][v];b&&(n.beginFill(0,100),n.moveTo(g,f),n.lineTo(g+u,f),n.lineTo(g+u,f+u),n.lineTo(g,f+u),n.endFill())}return n},w.setupTimingPattern=function(){for(var d=8;d<this.moduleCount-8;d++){if(this.modules[d][6]!=null)continue;this.modules[d][6]=d%2==0}for(var o=8;o<this.moduleCount-8;o++){if(this.modules[6][o]!=null)continue;this.modules[6][o]=o%2==0}},w.setupPositionAdjustPattern=function(){for(var d=P.getPatternPosition(this.typeNumber),o=0;o<d.length;o++)for(var a=0;a<d.length;a++){var n=d[o],u=d[a];if(this.modules[n][u]!=null)continue;for(var p=-2;p<=2;p++)for(var f=-2;f<=2;f++)p==-2||p==2||f==-2||f==2||p==0&&f==0?this.modules[n+p][u+f]=!0:this.modules[n+p][u+f]=!1}},w.setupTypeNumber=function(d){for(var o=P.getBCHTypeNumber(this.typeNumber),a=0;a<18;a++){var n=!d&&(o>>a&1)==1;this.modules[Math.floor(a/3)][a%3+this.moduleCount-8-3]=n}for(var a=0;a<18;a++){var n=!d&&(o>>a&1)==1;this.modules[a%3+this.moduleCount-8-3][Math.floor(a/3)]=n}},w.setupTypeInfo=function(d,o){for(var a=this.errorCorrectLevel<<3|o,n=P.getBCHTypeInfo(a),u=0;u<15;u++){var p=!d&&(n>>u&1)==1;u<6?this.modules[u][8]=p:u<8?this.modules[u+1][8]=p:this.modules[this.moduleCount-15+u][8]=p}for(var u=0;u<15;u++){var p=!d&&(n>>u&1)==1;u<8?this.modules[8][this.moduleCount-u-1]=p:u<9?this.modules[8][15-u-1+1]=p:this.modules[8][15-u-1]=p}this.modules[this.moduleCount-8][8]=!d},w.mapData=function(d,o){for(var a=-1,n=this.moduleCount-1,u=7,p=0,f=this.moduleCount-1;f>0;f-=2)for(f==6&&f--;;){for(var v=0;v<2;v++)if(this.modules[n][f-v]==null){var g=!1;p<d.length&&(g=(d[p]>>>u&1)==1);var b=P.getMask(o,n,f-v);b&&(g=!g),this.modules[n][f-v]=g,u--,u==-1&&(p++,u=7)}if(n+=a,n<0||this.moduleCount<=n){n-=a,a=-a;break}}},h.PAD0=236,h.PAD1=17,h.createData=function(d,o,a){for(var n=m.getRSBlocks(d,o),u=new S,p=0;p<a.length;p++){var f=a[p];u.put(f.mode,4),u.put(f.getLength(),P.getLengthInBits(f.mode,d)),f.write(u)}for(var v=0,p=0;p<n.length;p++)v+=n[p].dataCount;if(u.getLengthInBits()>v*8)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+v*8+")");for(u.getLengthInBits()+4<=v*8&&u.put(0,4);u.getLengthInBits()%8!=0;)u.putBit(!1);for(;!(u.getLengthInBits()>=v*8);){if(u.put(h.PAD0,8),u.getLengthInBits()>=v*8)break;u.put(h.PAD1,8)}return h.createBytes(u,n)},h.createBytes=function(d,o){for(var a=0,n=0,u=0,p=new Array(o.length),f=new Array(o.length),v=0;v<o.length;v++){var g=o[v].dataCount,b=o[v].totalCount-g;n=Math.max(n,g),u=Math.max(u,b),p[v]=new Array(g);for(var i=0;i<p[v].length;i++)p[v][i]=255&d.buffer[i+a];a+=g;var s=P.getErrorCorrectPolynomial(b),t=new c(p[v],s.getLength()-1),T=t.mod(s);f[v]=new Array(s.getLength()-1);for(var i=0;i<f[v].length;i++){var _=i+T.getLength()-f[v].length;f[v][i]=_>=0?T.get(_):0}}for(var l=0,i=0;i<o.length;i++)l+=o[i].totalCount;for(var k=new Array(l),O=0,i=0;i<n;i++)for(var v=0;v<o.length;v++)i<p[v].length&&(k[O++]=p[v][i]);for(var i=0;i<u;i++)for(var v=0;v<o.length;v++)i<f[v].length&&(k[O++]=f[v][i]);return k},N.exports=h},HmJG:function(N,J,M){},IBYe:function(N,J,M){"use strict";function D(m){return null}J.a=D},Ib8C:function(N,J,M){(function(D){(function(m,S){N.exports=J=S()})(this,function(){var m=m||function(S,P){var c;if(typeof window!="undefined"&&window.crypto&&(c=window.crypto),typeof self!="undefined"&&self.crypto&&(c=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window!="undefined"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof D!="undefined"&&D.crypto&&(c=D.crypto),!c&&!0)try{c=M(4)}catch(s){}var h=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch(s){}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch(s){}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function s(){}return function(t){var T;return s.prototype=t,T=new s,s.prototype=null,T}}(),d={},o=d.lib={},a=o.Base=function(){return{extend:function(s){var t=w(this);return s&&t.mixIn(s),(!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 s=this.extend();return s.init.apply(s,arguments),s},init:function(){},mixIn:function(s){for(var t in s)s.hasOwnProperty(t)&&(this[t]=s[t]);s.hasOwnProperty("toString")&&(this.toString=s.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=o.WordArray=a.extend({init:function(s,t){s=this.words=s||[],t!=P?this.sigBytes=t:this.sigBytes=s.length*4},toString:function(s){return(s||p).stringify(this)},concat:function(s){var t=this.words,T=s.words,_=this.sigBytes,l=s.sigBytes;if(this.clamp(),_%4)for(var k=0;k<l;k++){var O=T[k>>>2]>>>24-k%4*8&255;t[_+k>>>2]|=O<<24-(_+k)%4*8}else for(var x=0;x<l;x+=4)t[_+x>>>2]=T[x>>>2];return this.sigBytes+=l,this},clamp:function(){var s=this.words,t=this.sigBytes;s[t>>>2]&=4294967295<<32-t%4*8,s.length=S.ceil(t/4)},clone:function(){var s=a.clone.call(this);return s.words=this.words.slice(0),s},random:function(s){for(var t=[],T=0;T<s;T+=4)t.push(h());return new n.init(t,s)}}),u=d.enc={},p=u.Hex={stringify:function(s){for(var t=s.words,T=s.sigBytes,_=[],l=0;l<T;l++){var k=t[l>>>2]>>>24-l%4*8&255;_.push((k>>>4).toString(16)),_.push((k&15).toString(16))}return _.join("")},parse:function(s){for(var t=s.length,T=[],_=0;_<t;_+=2)T[_>>>3]|=parseInt(s.substr(_,2),16)<<24-_%8*4;return new n.init(T,t/2)}},f=u.Latin1={stringify:function(s){for(var t=s.words,T=s.sigBytes,_=[],l=0;l<T;l++){var k=t[l>>>2]>>>24-l%4*8&255;_.push(String.fromCharCode(k))}return _.join("")},parse:function(s){for(var t=s.length,T=[],_=0;_<t;_++)T[_>>>2]|=(s.charCodeAt(_)&255)<<24-_%4*8;return new n.init(T,t)}},v=u.Utf8={stringify:function(s){try{return decodeURIComponent(escape(f.stringify(s)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(s){return f.parse(unescape(encodeURIComponent(s)))}},g=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(s){typeof s=="string"&&(s=v.parse(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes},_process:function(s){var t,T=this._data,_=T.words,l=T.sigBytes,k=this.blockSize,O=k*4,x=l/O;s?x=S.ceil(x):x=S.max((x|0)-this._minBufferSize,0);var y=x*k,E=S.min(y*4,l);if(y){for(var C=0;C<y;C+=k)this._doProcessBlock(_,C);t=_.splice(0,y),T.sigBytes-=E}return new n.init(t,E)},clone:function(){var s=a.clone.call(this);return s._data=this._data.clone(),s},_minBufferSize:0}),b=o.Hasher=g.extend({cfg:a.extend(),init:function(s){this.cfg=this.cfg.extend(s),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(s){return this._append(s),this._process(),this},finalize:function(s){s&&this._append(s);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(s){return function(t,T){return new s.init(T).finalize(t)}},_createHmacHelper:function(s){return function(t,T){return new i.HMAC.init(s,T).finalize(t)}}}),i=d.algo={};return d}(Math);return m})}).call(this,M("IyRk"))},Iq15:function(N,J,M){var D=M("nVVt"),m=M("dWSS"),S=M("dQei"),P={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},c={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(h){for(var w=h<<10;c.getBCHDigit(w)-c.getBCHDigit(c.G15)>=0;)w^=c.G15<<c.getBCHDigit(w)-c.getBCHDigit(c.G15);return(h<<10|w)^c.G15_MASK},getBCHTypeNumber:function(h){for(var w=h<<12;c.getBCHDigit(w)-c.getBCHDigit(c.G18)>=0;)w^=c.G18<<c.getBCHDigit(w)-c.getBCHDigit(c.G18);return h<<12|w},getBCHDigit:function(h){for(var w=0;h!=0;)w++,h>>>=1;return w},getPatternPosition:function(h){return c.PATTERN_POSITION_TABLE[h-1]},getMask:function(h,w,d){switch(h){case P.PATTERN000:return(w+d)%2==0;case P.PATTERN001:return w%2==0;case P.PATTERN010:return d%3==0;case P.PATTERN011:return(w+d)%3==0;case P.PATTERN100:return(Math.floor(w/2)+Math.floor(d/3))%2==0;case P.PATTERN101:return w*d%2+w*d%3==0;case P.PATTERN110:return(w*d%2+w*d%3)%2==0;case P.PATTERN111:return(w*d%3+(w+d)%2)%2==0;default:throw new Error("bad maskPattern:"+h)}},getErrorCorrectPolynomial:function(h){for(var w=new m([1],0),d=0;d<h;d++)w=w.multiply(new m([1,S.gexp(d)],0));return w},getLengthInBits:function(h,w){if(1<=w&&w<10)switch(h){case D.MODE_NUMBER:return 10;case D.MODE_ALPHA_NUM:return 9;case D.MODE_8BIT_BYTE:return 8;case D.MODE_KANJI:return 8;default:throw new Error("mode:"+h)}else if(w<27)switch(h){case D.MODE_NUMBER:return 12;case D.MODE_ALPHA_NUM:return 11;case D.MODE_8BIT_BYTE:return 16;case D.MODE_KANJI:return 10;default:throw new Error("mode:"+h)}else if(w<41)switch(h){case D.MODE_NUMBER:return 14;case D.MODE_ALPHA_NUM:return 13;case D.MODE_8BIT_BYTE:return 16;case D.MODE_KANJI:return 12;default:throw new Error("mode:"+h)}else throw new Error("type:"+w)},getLostPoint:function(h){for(var w=h.getModuleCount(),d=0,o=0;o<w;o++)for(var a=0;a<w;a++){for(var n=0,u=h.isDark(o,a),p=-1;p<=1;p++){if(o+p<0||w<=o+p)continue;for(var f=-1;f<=1;f++){if(a+f<0||w<=a+f)continue;if(p==0&&f==0)continue;u==h.isDark(o+p,a+f)&&n++}}n>5&&(d+=3+n-5)}for(var o=0;o<w-1;o++)for(var a=0;a<w-1;a++){var v=0;h.isDark(o,a)&&v++,h.isDark(o+1,a)&&v++,h.isDark(o,a+1)&&v++,h.isDark(o+1,a+1)&&v++,(v==0||v==4)&&(d+=3)}for(var o=0;o<w;o++)for(var a=0;a<w-6;a++)h.isDark(o,a)&&!h.isDark(o,a+1)&&h.isDark(o,a+2)&&h.isDark(o,a+3)&&h.isDark(o,a+4)&&!h.isDark(o,a+5)&&h.isDark(o,a+6)&&(d+=40);for(var a=0;a<w;a++)for(var o=0;o<w-6;o++)h.isDark(o,a)&&!h.isDark(o+1,a)&&h.isDark(o+2,a)&&h.isDark(o+3,a)&&h.isDark(o+4,a)&&!h.isDark(o+5,a)&&h.isDark(o+6,a)&&(d+=40);for(var g=0,a=0;a<w;a++)for(var o=0;o<w;o++)h.isDark(o,a)&&g++;var b=Math.abs(100*g/w/w-50)/5;return d+=b*10,d}};N.exports=c},K3mO:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("3y9D"),M("WYAk"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.Base,c=S.WordArray,h=m.algo,w=h.MD5,d=h.EvpKDF=P.extend({cfg:P.extend({keySize:128/32,hasher:w,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,a){for(var n,u=this.cfg,p=u.hasher.create(),f=c.create(),v=f.words,g=u.keySize,b=u.iterations;v.length<g;){n&&p.update(n),n=p.update(o).finalize(a),p.reset();for(var i=1;i<b;i++)n=p.finalize(n),p.reset();f.concat(n)}return f.sigBytes=g*4,f}});m.EvpKDF=function(o,a,n){return d.create(n).compute(o,a)}}(),D.EvpKDF})},KXlV:function(N,J,M){N.exports=M.p+"static/job.65c6034f.png"},KeDT:function(N,J,M){N.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(N,J,M){"use strict";M.d(J,"a",function(){return l}),M.d(J,"c",function(){return O});var D=M("0Owb"),m=M("miYZ"),S=M("tsqr"),P=M("oBTY"),c=M("tJVT"),h=M("PpiC"),w=M("k1fw"),d=M("9og8"),o=M("DZo9"),a=M("8z0m"),n=M("WmNS"),u=M.n(n),p=M("q1tI"),f=M.n(p),v=M("ErOA"),g=M("NFKh"),b=M.n(g),i=M("7Cbv"),s=M("9kvl"),t=M("mxV5"),T=M.n(t),_=a.a.Dragger,l=function(E){var C="bf3c199c2470cb477d907b1e0917c17b",I="5183666c72eec9e4",j=b.a.enc.Utf8.parse(C),L=b.a.enc.Utf8.parse(I),H=b.a.AES.decrypt(E,j,{iv:L,mode:b.a.mode.CBC});return H.toString(b.a.enc.Utf8)},k,O=function(){var y=Object(d.a)(u.a.mark(function E(C,I,j){var L,H,W,U,G,B,z,V,ie;return u.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return I.file_name=C.name,he.next=3,Object(v.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return z=he.sent,console.log("decrypt(res.data):",l(z.data)),z.data=JSON.parse(l(z.data)),V=Object(i.a)(),ie=new T.a({endpoint:z==null||((L=z.data)===null||L===void 0)?void 0:L.end_point,region:z==null||((H=z.data)===null||H===void 0)?void 0:H.region,accessKeyId:z==null||((W=z.data)===null||W===void 0)?void 0:W.access_key_id,accessKeySecret:z==null||((U=z.data)===null||U===void 0)?void 0:U.access_key_secret,bucket:z==null||((G=z.data)===null||G===void 0)?void 0:G.bucket,stsToken:z==null||((B=z.data)===null||B===void 0)?void 0:B.security_token}),he.abrupt("return",new Promise(function(Ae,De){var pe;ie.multipartUpload("".concat(V),new Blob([C],{type:C.type}),Object(w.a)(Object(w.a)({timeout:200*1e3,partSize:102400},j),{},{callback:{url:z==null||((pe=z.data)===null||pe===void 0)?void 0:pe.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(v.e)(I)}})).then(function(Te){var ye;C.response=(ye=Te.data)===null||ye===void 0?void 0:ye.data,Ae(Te==null?void 0:Te.data)}).catch(function(Te){De(Te),console.log("err:",Te)})}));case 9:case"end":return he.stop()}},E)}));return function(C,I,j){return y.apply(this,arguments)}}(),x=function(E){var C=E.user,I=E.cancelUpload,j=Object(h.a)(E,["user","cancelUpload"]),L=Object(p.useState)([]),H=Object(c.a)(L,2),W=H[0],U=H[1],G=Object(p.useState)(),B=Object(c.a)(G,2),z=B[0],V=B[1],ie={onRemove:function(Ae){U(Object(P.a)(W.filter(function(De){return De.name!==Ae.name}))),j.onChange(W.filter(function(De){return De.name!==Ae.name}))},disabled:j.disabled,multiple:!0,fileList:W==null?void 0:W.map(function(he){return he.file}),customRequest:function(){},beforeUpload:function(){var he=Object(d.a)(u.a.mark(function De(pe){var Te;return u.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(Te=j.maxSize||1024*1024*1024*1,!W.filter(function(le){return le.name===pe.name}).length){ue.next=4;break}return S.b.info("".concat(pe.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ue.abrupt("return");case 4:if(!((pe==null?void 0:pe.size)>Te)){ue.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Te/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return W.push({name:pe.name,file:pe}),U(Object(P.a)(W)),j.onChange(W),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},De)}));function Ae(De){return he.apply(this,arguments)}return Ae}()},ce=function(){var he=Object(d.a)(u.a.mark(function Ae(De,pe){var Te,ye,ue,le,te,fe,q,ee,Ce;return u.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return pe.file_name=De.name,q=De.name,Q.next=4,Object(v.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ee=Q.sent,ee.data=JSON.parse(l(ee.data)),!((ee==null?void 0:ee.status)!==0)){Q.next=12;break}return W[W.findIndex(function(X){return X.name===q})].status="error",W[W.findIndex(function(X){return X.name===q})].file.status="error",j.onChange(W),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return z=new T.a({endpoint:ee==null||((Te=ee.data)===null||Te===void 0)?void 0:Te.end_point,region:ee==null||((ye=ee.data)===null||ye===void 0)?void 0:ye.region,accessKeyId:ee==null||((ue=ee.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:ee==null||((le=ee.data)===null||le===void 0)?void 0:le.access_key_secret,bucket:ee==null||((te=ee.data)===null||te===void 0)?void 0:te.bucket,stsToken:ee==null||((fe=ee.data)===null||fe===void 0)?void 0:fe.security_token}),console.log(De,"file"),V(z),Ce=Object(i.a)(),Q.abrupt("return",new Promise(function(X,Z){try{var xe;z.multipartUpload("".concat(j.identifier,"/").concat(Ce).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([De.file],{type:De.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Oe,Qe,rt){try{console.log("\u8FDB\u5EA6",Oe,Qe,rt);var nt=W.findIndex(function(ct){return ct.name===q});W[nt].file.percent=Oe*100,W[nt].tempCheckpoint=Qe,U(Object(P.a)(W))}catch(ct){}},checkpoint:W[W.findIndex(function(ve){return ve.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:ee==null||((xe=ee.data)===null||xe===void 0)?void 0:xe.callback_url,host:ee==null?void 0:ee.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(v.e)(pe)}}).then(function(ve){var Oe,Qe=W.findIndex(function(pt){return pt.name===q}),rt="done";if(((Oe=ve.data)===null||Oe===void 0?void 0:Oe.status)===0){var nt;De.response=(nt=ve.data)===null||nt===void 0?void 0:nt.data;var ct=W.findIndex(function(pt){return pt.name===q});W[ct].status="done",W[ct].file.status="done"}else{var dt;S.b.warn((dt=ve.data)===null||dt===void 0?void 0:dt.message),rt="error"}W[Qe].status=rt,W[Qe].file.status=rt,j.onChange(W),X(ve==null?void 0:ve.data)}).catch(function(ve){W[W.findIndex(function(Oe){return Oe.name===q})].status="error",W[W.findIndex(function(Oe){return Oe.name===q})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),U(Object(P.a)(W)),j.onChange(W),Z(ve),console.log("err:",ve)})}catch(ve){}}));case 17:case"end":return Q.stop()}},Ae)}));return function(De,pe){return he.apply(this,arguments)}}();return Object(p.useEffect)(function(){W.every(function(he){return he==="done"||he==="error"})&&j.onComplete(W)},[W]),Object(p.useEffect)(function(){if(I){var he;(he=z)===null||he===void 0||he.cancel()}},[I]),Object(p.useEffect)(function(){j.uploading&&W.map(function(){var he=Object(d.a)(u.a.mark(function Ae(De){var pe,Te;return u.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!De.status||De.status==="error")&&!I)){ue.next=6;break}return De.status="uploading",De.file.status="uploading",ue.next=5,ce(De,{login:C==null||((pe=C.userInfo)===null||pe===void 0)?void 0:pe.login,container_type:j.container_type,container_id:j.container_id,description:j.description});case 5:Te=ue.sent;case 6:case"end":return ue.stop()}},Ae)}));return function(Ae){return he.apply(this,arguments)}}())},[j.uploading]),f.a.createElement(_,Object(D.a)({},ie,{height:j.height,className:j.className}),f.a.createElement("p",{className:"ant-upload-hint"},j.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(s.a)(function(y){var E=y.loading,C=y.globalSetting,I=y.user;return{globalSetting:C,loading:E.models.competitions,user:I}})(x)},KmYQ:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.ZeroPadding={pad:function(m,S){var P=S*4;m.clamp(),m.sigBytes+=P-(m.sigBytes%P||P)},unpad:function(m){for(var S=m.words,P=m.sigBytes-1,P=m.sigBytes-1;P>=0;P--)if(S[P>>>2]>>>24-P%4*8&255){m.sigBytes=P+1;break}}},D.pad.ZeroPadding})},LdHM:function(N,J,M){"use strict";M.d(J,"b",function(){return t}),M.d(J,"a",function(){return _});var D=M("1OyB"),m=M("vuIU"),S=M("Ji7U"),P=M("LK+K"),c=M("q1tI"),h=M("rePB"),w=M("Ff2n"),d=M("ODXe"),o=M("4IlW"),a=M("bX4T"),n=M("YrtM"),u=M("TSYQ"),p=M.n(u),f=M("+nKL"),v=M("8OUc"),g=function(V,ie){var ce=V.prefixCls,he=V.id,Ae=V.flattenOptions,De=V.childrenAsData,pe=V.values,Te=V.searchValue,ye=V.multiple,ue=V.defaultActiveFirstOption,le=V.height,te=V.itemHeight,fe=V.notFoundContent,q=V.open,ee=V.menuItemSelectedIcon,Ce=V.virtual,re=V.onSelect,Q=V.onToggleOpen,X=V.onActiveValue,Z=V.onScroll,xe=V.onMouseEnter,ve="".concat(ce,"-item"),Oe=Object(n.a)(function(){return Ae},[q,Ae],function(st,Ue){return Ue[0]&&st[1]!==Ue[1]}),Qe=c.useRef(null),rt=function(Ue){Ue.preventDefault()},nt=function(Ue){Qe.current&&Qe.current.scrollTo({index:Ue})},ct=function(Ue){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ne=Oe.length,Ee=0;Ee<Ne;Ee+=1){var Se=(Ue+Ee*Me+Ne)%Ne,Re=Oe[Se],Le=Re.group,Ye=Re.data;if(!Le&&!Ye.disabled)return Se}return-1},dt=c.useState(function(){return ct(0)}),pt=Object(d.a)(dt,2),He=pt[0],Pe=pt[1],at=function(Ue){Pe(Ue);var Me=Oe[Ue];if(!Me){X(null,-1);return}X(Me.data.value,Ue)};c.useEffect(function(){at(ue!==!1?ct(0):-1)},[Oe.length,Te]),c.useEffect(function(){var st=setTimeout(function(){if(!ye&&q&&pe.size===1){var Ue=Array.from(pe)[0],Me=Oe.findIndex(function(Ne){var Ee=Ne.data;return Ee.value===Ue});at(Me),nt(Me)}});return function(){return clearTimeout(st)}},[q]);var ft=function(Ue){Ue!==void 0&&re(Ue,{selected:!pe.has(Ue)}),ye||Q(!1)};if(c.useImperativeHandle(ie,function(){return{onKeyDown:function(Ue){var Me=Ue.which;switch(Me){case o.a.UP:case o.a.DOWN:{var Ne=0;if(Me===o.a.UP?Ne=-1:Me===o.a.DOWN&&(Ne=1),Ne!==0){var Ee=ct(He+Ne,Ne);nt(Ee),at(Ee)}break}case o.a.ENTER:{var Se=Oe[He];Se&&!Se.data.disabled?ft(Se.data.value):ft(void 0),q&&Ue.preventDefault();break}case o.a.ESC:Q(!1)}},onKeyUp:function(){},scrollTo:function(Ue){nt(Ue)}}}),Oe.length===0)return c.createElement("div",{role:"listbox",id:"".concat(he,"_list"),className:"".concat(ve,"-empty"),onMouseDown:rt},fe);function Je(st){var Ue=Oe[st];if(!Ue)return null;var Me=Ue.data||{},Ne=Me.value,Ee=Me.label,Se=Me.children,Re=Object(a.a)(Me,!0),Le=De?Se:Ee;return Ue?c.createElement("div",Object.assign({"aria-label":typeof Le=="string"?Le:null},Re,{key:st,role:"option",id:"".concat(he,"_list_").concat(st),"aria-selected":pe.has(Ne)}),Ne):null}return c.createElement(c.Fragment,null,c.createElement("div",{role:"listbox",id:"".concat(he,"_list"),style:{height:0,width:0,overflow:"hidden"}},Je(He-1),Je(He),Je(He+1)),c.createElement(f.a,{itemKey:"key",ref:Qe,data:Oe,height:le,itemHeight:te,fullHeight:!1,onMouseDown:rt,onScroll:Z,virtual:Ce,onMouseEnter:xe},function(st,Ue){var Me,Ne=st.group,Ee=st.groupOption,Se=st.data,Re=Se.label,Le=Se.key;if(Ne)return c.createElement("div",{className:p()(ve,"".concat(ve,"-group"))},Re!==void 0?Re:Le);var Ye=Se.disabled,tt=Se.value,Ct=Se.title,At=Se.children,rr=Se.style,gt=Se.className,or=Object(w.a)(Se,["disabled","value","title","children","style","className"]),Zt=pe.has(tt),Et="".concat(ve,"-option"),jr=p()(ve,Et,gt,(Me={},Object(h.a)(Me,"".concat(Et,"-grouped"),Ee),Object(h.a)(Me,"".concat(Et,"-active"),He===Ue&&!Ye),Object(h.a)(Me,"".concat(Et,"-disabled"),Ye),Object(h.a)(Me,"".concat(Et,"-selected"),Zt),Me)),Kr=De?At:Re,Fr=!ee||typeof ee=="function"||Zt;return c.createElement("div",Object.assign({},or,{"aria-selected":Zt,className:jr,title:Ct,onMouseMove:function(){if(He===Ue||Ye)return;at(Ue)},onClick:function(){Ye||ft(tt)},style:rr}),c.createElement("div",{className:"".concat(Et,"-content")},Kr||tt),c.isValidElement(ee)||Zt,Fr&&c.createElement(v.a,{className:"".concat(ve,"-option-state"),customizeIcon:ee,customizeIconProps:{isSelected:Zt}},Zt?"\u2713":null))}))},b=c.forwardRef(g);b.displayName="OptionList";var i=b,s=function(){return null};s.isSelectOption=!0;var t=s,T=function(){return null};T.isSelectOptGroup=!0;var _=T,l=M("VTBJ"),k=M("Zm9Q");function O(z){var V=z.key,ie=z.props,ce=ie.children,he=ie.value,Ae=Object(w.a)(ie,["children","value"]);return Object(l.a)({key:V,value:he!==void 0?he:V,children:ce},Ae)}function x(z){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(z).map(function(ie,ce){if(!c.isValidElement(ie)||!ie.type)return null;var he=ie.type.isSelectOptGroup,Ae=ie.key,De=ie.props,pe=De.children,Te=Object(w.a)(De,["children"]);return V||!he?O(ie):Object(l.a)(Object(l.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?ce:Ae,"__"),label:Ae},Te),{},{options:x(pe)})}).filter(function(ie){return ie})}var y=M("2Qr1"),E=M("qNPg"),C=M("U8pU"),I=M("Kwbf"),j=M("WKfj");function L(z){var V=z.mode,ie=z.options,ce=z.children,he=z.backfill,Ae=z.allowClear,De=z.placeholder,pe=z.getInputElement,Te=z.showSearch,ye=z.onSearch,ue=z.defaultOpen,le=z.autoFocus,te=z.labelInValue,fe=z.value,q=z.inputValue,ee=z.optionLabelProp,Ce=V==="multiple"||V==="tags",re=Te!==void 0?Te:Ce||V==="combobox",Q=ie||x(ce);if(Object(I.a)(V!=="tags"||Q.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var X=Q.some(function(ve){return ve.options?ve.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(I.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(I.a)(V!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(I.a)(V==="combobox"||!he,"`backfill` only works with `combobox` mode."),Object(I.a)(V==="combobox"||!pe,"`getInputElement` only work with `combobox` mode."),Object(I.b)(V!=="combobox"||!pe||!Ae||!De,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ye&&!re&&V!=="combobox"&&V!=="tags"&&Object(I.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(I.b)(!ue||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var Z=Object(j.d)(fe);Object(I.a)(!te||Z.every(function(ve){return Object(C.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(I.a)(!Ce||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(ce){var xe=null;Object(k.a)(ce).some(function(ve){if(!c.isValidElement(ve)||!ve.type)return!1;var Oe=ve.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Qe=Object(k.a)(ve.props.children).every(function(rt){return!c.isValidElement(rt)||!ve.type||rt.type.isSelectOption?!0:(xe=rt.type,!1)});return!Qe}return xe=Oe,!0}),xe&&Object(I.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),Object(I.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var H=L,W=Object(E.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:x,flattenOptions:y.d,getLabeledValue:y.e,filterOptions:y.b,isValueDisabled:y.g,findValueOption:y.c,warningProps:H,fillOptionsWithMissingValue:y.a}),U=function(z){Object(S.a)(ie,z);var V=Object(P.a)(ie);function ie(){var ce;return Object(D.a)(this,ie),ce=V.apply(this,arguments),ce.selectRef=c.createRef(),ce.focus=function(){ce.selectRef.current.focus()},ce.blur=function(){ce.selectRef.current.blur()},ce}return Object(m.a)(ie,[{key:"render",value:function(){return c.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),ie}(c.Component);U.Option=t,U.OptGroup=_;var G=U,B=J.c=G},M8RZ:function(N,J,M){"use strict";M.d(J,"a",function(){return o});var D=M("fWQN"),m=M("mtLc"),S=M("yKVA"),P=M("879j"),c=M("q1tI"),h=M.n(c),w=M("i8i4"),d=M.n(w),o=function(a){Object(S.a)(u,a);var n=Object(P.a)(u);function u(p){var f;Object(D.a)(this,u),f=n.call(this,p);var v=window.document;return f.node=v.createElement("div"),v.body.appendChild(f.node),f}return Object(m.a)(u,[{key:"render",value:function(){var f=this.props.children;return Object(w.createPortal)(f,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(h.a.Component)},MlIO:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(m){var S=D,P=S.lib,c=P.Base,h=P.WordArray,w=S.x64={},d=w.Word=c.extend({init:function(a,n){this.high=a,this.low=n}}),o=w.WordArray=c.extend({init:function(a,n){a=this.words=a||[],n!=m?this.sigBytes=n:this.sigBytes=a.length*8},toX32:function(){for(var a=this.words,n=a.length,u=[],p=0;p<n;p++){var f=a[p];u.push(f.high),u.push(f.low)}return h.create(u,this.sigBytes)},clone:function(){for(var a=c.clone.call(this),n=a.words=this.words.slice(0),u=n.length,p=0;p<u;p++)n[p]=n[p].clone();return a}})}(),D})},NFKh:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("MlIO"),M("F+F2"),M("qM6L"),M("ETIr"),M("wbyO"),M("cv67"),M("3y9D"),M("lPiR"),M("GRuw"),M("1uat"),M("uGsb"),M("5hvy"),M("ELcG"),M("WYAk"),M("e7zE"),M("K3mO"),M("OLod"),M("ALsQ"),M("9OqN"),M("qu8F"),M("S6kV"),M("gb/T"),M("qBft"),M("oRuE"),M("jO9C"),M("KmYQ"),M("uGxW"),M("bQjk"),M("wZgz"),M("pA7S"),M("w7YG"),M("E4JC"),M("PVpz"))})(this,function(D){return D})},NLgs:function(N,J,M){"use strict";M.d(J,"e",function(){return T}),M.d(J,"f",function(){return _}),M.d(J,"d",function(){return k}),M.d(J,"c",function(){return O}),M.d(J,"a",function(){return x}),M.d(J,"b",function(){return y});var D=M("miYZ"),m=M("tsqr"),S=M("9og8"),P=M("2qtc"),c=M("kLXV"),h=M("WmNS"),w=M.n(h),d=M("q1tI"),o=M.n(d),a=M("9kvl"),n=M("xKgJ"),u=M("1vsH"),p=M("RCxd"),f=M("mOS8"),v=M.n(f),g=M("1ZF9"),b=M.n(g),i=M("WdTA"),s=M.n(i),t=M("m3rI"),T=function(C){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(_(C)&&l(I))},_=function(C){return Object(n.q)()?!0:(C({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},l=function(){var C,I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,j=Object(a.c)()._store.getState(),L=j.user;return(C=L.userInfo)!==null&&C!==void 0&&C.profile_completed?!0:(c.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:I?"\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(){a.d.push("/account/profile/edit")}}),!1)},k=function(){var C,I=Object(a.c)()._store.getState(),j=I.user;return(C=j.userInfo)!==null&&C!==void 0&&C.professional_certification?!0:(c.a.confirm({title:"\u63D0\u793A",centered:!0,content:o.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(u.Q)("/account/certification")}}),!1)},O=function(){return Object(n.a)()?!0:(c.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc",style:{marginLeft:-38}},o.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),o.a.createElement("img",{src:Object(n.u)()?s.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},x=function(C,I){return C?!0:(c.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:o.a.createElement("div",null,o.a.createElement("p",null,I||"\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"),o.a.createElement("div",{style:{marginLeft:"110px"}},o.a.createElement("img",{src:b.a,width:200}),o.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(u.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},y=function(C){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",j=Object(a.c)()._store.getState(),L=j.shixunsDetail.detail;return(L==null?void 0:L.public)===2||(L==null?void 0:L.public)===1||(L==null?void 0:L.shixun_status)===3?(c.a.info({centered:!0,icon:o.a.createElement(p.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc",style:{marginLeft:-38}},o.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},o.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(L==null?void 0:L.public)===2?"\u5DF2\u516C\u5F00":(L==null?void 0:L.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",I,"\u3002"),o.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),o.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:v.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(L==null?void 0:L.shixun_status)===2?(c.a.confirm({centered:!0,icon:o.a.createElement(p.a,null),title:"\u63D0\u793A",content:o.a.createElement("div",null,o.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",I,"\u3002"),o.a.createElement("br",null),o.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(){c.a.confirm({width:440,centered:!0,icon:o.a.createElement(p.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 W=Object(S.a)(w.a.mark(function G(){var B;return w.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,C({type:"shixunsDetail/cancelRelease",payload:{id:L==null?void 0:L.identifier}});case 2:B=V.sent,B.status!==401&&(m.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),C({type:"shixunsDetail/getShixunsDetail",payload:{id:L==null?void 0:L.identifier}}),C({type:"practiceSetting/getCommonData",payload:{id:L==null?void 0:L.identifier}}));case 4:case"end":return V.stop()}},G)}));function U(){return W.apply(this,arguments)}return U}()})}}),!0):!1}},NnUe:function(N,J,M){N.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(N,J,M){"use strict";M.d(J,"a",function(){return h});var D=M("Kwbf");function m(w,d){var o=new Set;return w.forEach(function(a){d.has(a)||o.add(a)}),o}function S(w){var d=w||{},o=d.disabled,a=d.disableCheckbox,n=d.checkable;return!!(o||a)||n===!1}function P(w,d,o,a){for(var n=new Set(w),u=new Set,p=0;p<=o;p+=1){var f=d.get(p)||new Set;f.forEach(function(i){var s=i.key,t=i.node,T=i.children,_=T===void 0?[]:T;n.has(s)&&!a(t)&&_.filter(function(l){return!a(l.node)}).forEach(function(l){n.add(l.key)})})}for(var v=new Set,g=o;g>=0;g-=1){var b=d.get(g)||new Set;b.forEach(function(i){var s=i.parent,t=i.node;if(a(t)||!i.parent||v.has(i.parent.key))return;if(a(i.parent.node)){v.add(s.key);return}var T=!0,_=!1;(s.children||[]).filter(function(l){return!a(l.node)}).forEach(function(l){var k=l.key,O=n.has(k);T&&!O&&(T=!1),!_&&(O||u.has(k))&&(_=!0)}),T&&n.add(s.key),_&&u.add(s.key),v.add(s.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(m(u,n))}}function c(w,d,o,a,n){for(var u=new Set(w),p=new Set(d),f=0;f<=a;f+=1){var v=o.get(f)||new Set;v.forEach(function(s){var t=s.key,T=s.node,_=s.children,l=_===void 0?[]:_;!u.has(t)&&!p.has(t)&&!n(T)&&l.filter(function(k){return!n(k.node)}).forEach(function(k){u.delete(k.key)})})}p=new Set;for(var g=new Set,b=a;b>=0;b-=1){var i=o.get(b)||new Set;i.forEach(function(s){var t=s.parent,T=s.node;if(n(T)||!s.parent||g.has(s.parent.key))return;if(n(s.parent.node)){g.add(t.key);return}var _=!0,l=!1;(t.children||[]).filter(function(k){return!n(k.node)}).forEach(function(k){var O=k.key,x=u.has(O);_&&!x&&(_=!1),!l&&(x||p.has(O))&&(l=!0)}),_||u.delete(t.key),l&&p.add(t.key),g.add(t.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(m(p,u))}}function h(w,d,o,a){var n=[],u;a?u=a:u=S;var p=new Set(w.filter(function(b){var i=!!o[b];return i||n.push(b),i})),f=new Map,v=0;Object.keys(o).forEach(function(b){var i=o[b],s=i.level,t=f.get(s);t||(t=new Set,f.set(s,t)),t.add(i),v=Math.max(v,s)}),Object(D.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(b){return"'".concat(b,"'")}).join(", ")));var g;return d===!0?g=P(p,f,v,u):g=c(p,d.halfCheckedKeys,f,v,u),g}},OLod:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("K3mO"))})(this,function(D){D.lib.Cipher||function(m){var S=D,P=S.lib,c=P.Base,h=P.WordArray,w=P.BufferedBlockAlgorithm,d=S.enc,o=d.Utf8,a=d.Base64,n=S.algo,u=n.EvpKDF,p=P.Cipher=w.extend({cfg:c.extend(),createEncryptor:function(E,C){return this.create(this._ENC_XFORM_MODE,E,C)},createDecryptor:function(E,C){return this.create(this._DEC_XFORM_MODE,E,C)},init:function(E,C,I){this.cfg=this.cfg.extend(I),this._xformMode=E,this._key=C,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var C=this._doFinalize();return C},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(C){return typeof C=="string"?y:k}return function(C){return{encrypt:function(I,j,L){return E(j).encrypt(C,I,j,L)},decrypt:function(I,j,L){return E(j).decrypt(C,I,j,L)}}}}()}),f=P.StreamCipher=p.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),v=S.mode={},g=P.BlockCipherMode=c.extend({createEncryptor:function(E,C){return this.Encryptor.create(E,C)},createDecryptor:function(E,C){return this.Decryptor.create(E,C)},init:function(E,C){this._cipher=E,this._iv=C}}),b=v.CBC=function(){var E=g.extend();E.Encryptor=E.extend({processBlock:function(I,j){var L=this._cipher,H=L.blockSize;C.call(this,I,j,H),L.encryptBlock(I,j),this._prevBlock=I.slice(j,j+H)}}),E.Decryptor=E.extend({processBlock:function(I,j){var L=this._cipher,H=L.blockSize,W=I.slice(j,j+H);L.decryptBlock(I,j),C.call(this,I,j,H),this._prevBlock=W}});function C(I,j,L){var H,W=this._iv;W?(H=W,this._iv=m):H=this._prevBlock;for(var U=0;U<L;U++)I[j+U]^=H[U]}return E}(),i=S.pad={},s=i.Pkcs7={pad:function(E,C){for(var I=C*4,j=I-E.sigBytes%I,L=j<<24|j<<16|j<<8|j,H=[],W=0;W<j;W+=4)H.push(L);var U=h.create(H,j);E.concat(U)},unpad:function(E){var C=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=C}},t=P.BlockCipher=p.extend({cfg:p.cfg.extend({mode:b,padding:s}),reset:function(){var E;p.reset.call(this);var C=this.cfg,I=C.iv,j=C.mode;this._xformMode==this._ENC_XFORM_MODE?E=j.createEncryptor:(E=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,I&&I.words):(this._mode=E.call(j,this,I&&I.words),this._mode.__creator=E)},_doProcessBlock:function(E,C){this._mode.processBlock(E,C)},_doFinalize:function(){var E,C=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(C.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),C.unpad(E)),E},blockSize:128/32}),T=P.CipherParams=c.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),_=S.format={},l=_.OpenSSL={stringify:function(E){var C,I=E.ciphertext,j=E.salt;return j?C=h.create([1398893684,1701076831]).concat(j).concat(I):C=I,C.toString(a)},parse:function(E){var C,I=a.parse(E),j=I.words;return j[0]==1398893684&&j[1]==1701076831&&(C=h.create(j.slice(2,4)),j.splice(0,4),I.sigBytes-=16),T.create({ciphertext:I,salt:C})}},k=P.SerializableCipher=c.extend({cfg:c.extend({format:l}),encrypt:function(E,C,I,j){j=this.cfg.extend(j);var L=E.createEncryptor(I,j),H=L.finalize(C),W=L.cfg;return T.create({ciphertext:H,key:I,iv:W.iv,algorithm:E,mode:W.mode,padding:W.padding,blockSize:E.blockSize,formatter:j.format})},decrypt:function(E,C,I,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var L=E.createDecryptor(I,j).finalize(C.ciphertext);return L},_parse:function(E,C){return typeof E=="string"?C.parse(E,this):E}}),O=S.kdf={},x=O.OpenSSL={execute:function(E,C,I,j){j||(j=h.random(64/8));var L=u.create({keySize:C+I}).compute(E,j),H=h.create(L.words.slice(C),I*4);return L.sigBytes=C*4,T.create({key:L,iv:H,salt:j})}},y=P.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:x}),encrypt:function(E,C,I,j){j=this.cfg.extend(j);var L=j.kdf.execute(I,E.keySize,E.ivSize);j.iv=L.iv;var H=k.encrypt.call(this,E,C,L.key,j);return H.mixIn(L),H},decrypt:function(E,C,I,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var L=j.kdf.execute(I,E.keySize,E.ivSize,C.salt);j.iv=L.iv;var H=k.decrypt.call(this,E,C,L.key,j);return H}})}()})},OZM5:function(N,J,M){"use strict";M.d(J,"b",function(){return a}),M.d(J,"a",function(){return n}),M.d(J,"k",function(){return u}),M.d(J,"h",function(){return p}),M.d(J,"i",function(){return f}),M.d(J,"g",function(){return v}),M.d(J,"c",function(){return g}),M.d(J,"d",function(){return b}),M.d(J,"j",function(){return t}),M.d(J,"e",function(){return T}),M.d(J,"f",function(){return _});var D=M("KQm4"),m=M("U8pU"),S=M("Ff2n"),P=M("q1tI"),c=M.n(P),h=M("Kwbf"),w=M("WaYH"),d=.25,o=2;function a(l,k){var O=l.slice(),x=O.indexOf(k);return x>=0&&O.splice(x,1),O}function n(l,k){var O=l.slice();return O.indexOf(k)===-1&&O.push(k),O}function u(l){return l.split("-")}function p(l,k){return"".concat(l,"-").concat(k)}function f(l){return l&&l.type&&l.type.isTreeNode}function v(l,k){var O=[l],x=k[l];function y(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(C){var I=C.key,j=C.children;O.push(I),y(j)})}return y(x.children),O}function g(l,k){var O=l.clientY,x=k.selectHandle.getBoundingClientRect(),y=x.top,E=x.bottom,C=x.height,I=Math.max(C*d,o);return O<=y+I?-1:O>=E-I?1:0}function b(l,k){if(!l)return;var O=k.multiple;return O?l.slice():l.length?[l[0]]:l}var i=function(k){return k};function s(l,k){if(!l)return[];var O=k||{},x=O.processProps,y=x===void 0?i:x,E=Array.isArray(l)?l:[l];return E.map(function(C){var I=C.children,j=Object(S.a)(C,["children"]),L=s(I,k);return c.a.createElement(w.a,Object.assign({},y(j)),L)})}function t(l){if(!l)return null;var k;if(Array.isArray(l))k={checkedKeys:l,halfCheckedKeys:void 0};else if(Object(m.a)(l)==="object")k={checkedKeys:l.checked||void 0,halfCheckedKeys:l.halfChecked||void 0};else return Object(h.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function T(l,k){var O=new Set;function x(y){if(O.has(y))return;var E=k[y];if(!E)return;O.add(y);var C=E.parent,I=E.node;if(I.disabled)return;C&&x(C.key)}return(l||[]).forEach(function(y){x(y)}),Object(D.a)(O)}function _(l){var k={};return Object.keys(l).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=l[O])}),k}},Ot1p:function(N,J,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("rAM+"),P=M("miYZ"),c=M("tsqr"),h=M("9og8"),w=M("tJVT"),d=M("jrin"),o=M("WmNS"),a=M.n(o),n=M("q1tI"),u=M.n(n),p=M("VrN/"),f=M.n(p),v=M("bdgK"),g=M("p77/"),b=M("Bd2K"),i=M("ELLl"),s=M("19Vz"),t=M("lZu9"),T=M("+NIl"),_=M("kSUc"),l=M("9Bee"),k=function(gt){var or=gt.value,Zt=or===void 0?"":or,Et=gt.className,jr=gt.showTextOnly,Kr=gt.showLines,Fr=gt.style,rn=Fr===void 0?{}:Fr,Er=Object(n.useMemo)(function(){return""},[Zt]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Er}}))},O=M("Q9mQ"),x=M("diRs"),y=M("0Owb"),E=M("dejd"),C=M("C+DQ"),I=M("D1Df"),j=M.n(I),L=M("1vsH"),H=M("m3rI"),W=[{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 U(gt){var or=gt.onActionCallback,Zt=gt.title,Et=gt.icon,jr=gt.actionName,Kr=gt.className,Fr=Kr===void 0?"":Kr,rn=gt.children;function Er(){or(jr)}return u.a.createElement("a",{title:Zt,className:Fr,onClick:Er},u.a.createElement("i",{className:"md-iconfont ".concat(Et)}),rn)}var G=function(gt){var or=gt.watch,Zt=gt.showNullButton,Et=gt.onActionCallback,jr=gt.fullScreen,Kr=gt.insertTemp,Fr=gt.hidetoolBar,rn=gt.uuid,Er=gt.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(L.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(L.E)("_educoder_session"),"&key=").concat(rn,"&api=").concat(encodeURIComponent(H.a.PROXY_SERVER)));var un=[].concat(W,[{title:"".concat(or?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(or?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!Fr&&un.map(function(Jr,Wt){return u.a.createElement("li",{key:Wt},Jr.actionName?u.a.createElement(U,Object(y.a)({},Jr,{onActionCallback:Et})):u.a.createElement("span",{className:"v-line"}))}),Zt?u.a.createElement("li",null,u.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Et},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Kr&&u.a.createElement("li",null,u.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Kr),onActionCallback:Et},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",null,u.a.createElement(x.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:u.a.createElement("div",null,u.a.createElement(j.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(L.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(L.E)("_educoder_session"),"&key=").concat(rn,"&api=").concat(encodeURIComponent(H.a.PROXY_SERVER))}))},u.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return Er(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(U,{icon:"".concat(jr?"icon-shrink":"icon-enlarge"),title:jr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Et})))},B=M("M8RZ"),z=M("+L6B"),V=M("2/Rp"),ie=M("y8nQ"),ce=M("Vl3Y"),he=M("5NDa"),Ae=M("5rEg"),De={labelCol:{span:4},wrapperCol:{span:20}},pe=function(gt){var or=gt.callback,Zt=gt.onCancel;function Et(jr){or(jr)}return u.a.createElement(ce.a,Object(y.a)({},De,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Et}),u.a.createElement(ce.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(Ae.a,null)),u.a.createElement(ce.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(Ae.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(V.a,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},Te=M("7ahc"),ye=M("k1fw"),ue=M("HmJG"),le=M("BjJ7"),te=ce.a.useForm,fe={width:280,marginRight:10},q={labelCol:{span:5},wrapperCol:{span:19}},ee=function(gt){var or=gt.callback,Zt=gt.onCancel,Et=te(),jr=Object(w.a)(Et,1),Kr=jr[0],Fr=Object(n.useRef)();function rn(Jr){or(Object(ye.a)(Object(ye.a)({},Jr),{},{name:Fr.current}))}function Er(Jr,Wt){Kr.setFieldsValue({src:"/api/attachments/".concat(Jr.id,"?type=").concat(Jr.content_type),type:Wt.type})}function un(Jr){var Wt=Jr.target.files[0];Fr.current=Wt.name,re(Wt,Er)}return u.a.createElement(ce.a,Object(y.a)({form:Kr},q,{className:"upload-image-panel",onFinish:rn}),u.a.createElement(ce.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(ce.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},u.a.createElement(Ae.a,{style:fe})),u.a.createElement(Ce,{onFileChange:un}))),u.a.createElement(ce.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},u.a.createElement(Ae.a,{style:{width:264}})),u.a.createElement(ce.a.Item,{style:{textAlign:"right"}},u.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(V.a,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))};function Ce(gt){var or=gt.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:or}))}function re(gt,or){if(!gt)throw new String("\u6CA1\u6709\u6587\u4EF6");var Zt=new FormData;Zt.append("editormd-image-file",gt),Zt.append("file_param_name","editormd-image-file"),Zt.append("byxhr","true");var Et=new window.XMLHttpRequest;Et.withCredentials=!0,Et.addEventListener("load",function(jr){or(JSON.parse(jr.target.responseText),gt)},!1),Et.addEventListener("error",function(jr){console.error(jr)},!1),Et.open("POST","".concat(le.a,"/api/attachments.json")),Et.send(Zt)}var Q=M("giR+"),X=M("fyUT"),Z=M("7Kak"),xe=M("9yH6"),ve=xe.a.Group,Oe={margin:"0 8px"},Qe=function(gt){var or=gt.callback,Zt=gt.onCancel;function Et(jr){or(jr)}return u.a.createElement(ce.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Et},u.a.createElement("div",{className:"flex-container"},u.a.createElement("span",{style:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:Oe},"\u884C\u6570"),u.a.createElement(ce.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement(X.a,null)),u.a.createElement("span",{style:Oe},"\u5217\u6570"),u.a.createElement(ce.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement(X.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12}},u.a.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(ce.a.Item,{name:"align"},u.a.createElement(ve,null,u.a.createElement(xe.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(xe.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(xe.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(xe.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(V.a,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},rt=M("ErOA"),nt=M("7Cbv"),ct="link",dt="upload-image",pt="code-block",He="add-table",Pe="------------",at={default:Pe,left:":".concat(Pe),center:":".concat(Pe,":"),right:"".concat(Pe,":")},ft=M("9VGf"),Je,st;function Ue(){}var Me=0,Ne=1e4,Ee="\u2581",Se=`
**\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 Re(gt){return/^\d+$/.test(gt)?"".concat(gt,"px"):gt}var Le=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ye=Le?"Cmd":"Ctrl",tt=["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"],Ct=(Je={},Object(d.a)(Je,Ye+"-B","bold"),Object(d.a)(Je,Ye+"-I","italic"),Je),At=(st={},Object(d.a)(st,ct,"\u6DFB\u52A0\u94FE\u63A5"),Object(d.a)(st,pt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(d.a)(st,dt,"\u6DFB\u52A0\u6587\u4EF6"),Object(d.a)(st,He,"\u6DFB\u52A0\u8868\u683C"),st),rr=J.a=function(gt){var or=gt.defaultValue,Zt=or===void 0?"":or,Et=gt.onChange,jr=gt.width,Kr=jr===void 0?"100%":jr,Fr=gt.height,rn=Fr===void 0?400:Fr,Er=gt.miniToolbar,un=Er===void 0?!1:Er,Jr=gt.isFocus,Wt=Jr===void 0?!1:Jr,_n=gt.watch,Cn=gt.insertTemp,Sn=gt.mode,gn=Sn===void 0?"markdown":Sn,Ci=gt.id,ui=Ci===void 0?"markdown-editor-id":Ci,mn=gt.showResizeBar,mr=mn===void 0?!1:mn,Vn=gt.noStorage,pi=Vn===void 0?!1:Vn,Xn=gt.showNullButton,nn=Xn===void 0?!1:Xn,Bn=gt.hidetoolBar,Si=Bn===void 0?!1:Bn,mi=gt.fullScreen,It=mi===void 0?!1:mi,xr=gt.onBlur,ti=gt.onCMBeforeChange,vi=gt.onFullScreen,Ri=gt.className,Di=Ri===void 0?"":Ri,se=gt.disablePaste,K=se===void 0?!1:se,$=gt.placeholder,ne=$===void 0?"":$,ge=gt.values,oe=ge===void 0?"":ge,Ke=Object(n.useState)(null),Ot=Object(w.a)(Ke,2),lt=Ot[0],_r=Ot[1],Pt=Object(n.useState)(Zt),Ur=Object(w.a)(Pt,2),Wr=Ur[0],cn=Ur[1],ri=Object(n.useState)(_n),gi=Object(w.a)(ri,2),Dn=gi[0],Mi=gi[1],qi=Object(n.useState)(It),Qn=Object(w.a)(qi,2),ci=Qn[0],ji=Qn[1],Fi=Object(n.useState)(""),yi=Object(w.a)(Fi,2),Ui=yi[0],bi=yi[1],oa=Object(n.useState)(0),sa=Object(w.a)(oa,2),Ei=sa[0],Gn=sa[1],Vi=Object(n.useState)(rn),ta=Object(w.a)(Vi,2),_t=ta[0],et=ta[1],vt=Object(n.useState)(!1),xt=Object(w.a)(vt,2),Mt=xt[0],Lt=xt[1],Ht=Object(n.useRef)(Object(nt.a)()),Bt=Object(n.useRef)(!1),ht=Object(n.useRef)(),wt=Object(n.useRef)(),St=Object(n.useRef)(),vr=Object(n.useRef)(),nr=Object(n.useRef)(),tr=function(){var Ft=Object(h.a)(a.a.mark(function Xt(){var zt,ur;return a.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Object(rt.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ht.current}});case 2:ur=qe.sent,ur!=null&&(zt=ur.attachments)!==null&&zt!==void 0&&zt.length&&(console.log("cm:",lt,wt),ur.attachments.map(function(Ut){Ut.content_type.indexOf("image")>-1?lt.replaceSelection("![,](/api/attachments/".concat(Ut.id,"?type=").concat(Ut.content_type,")")):Ut.content_type.indexOf("video")>-1?lt.replaceSelection('<video width="100%" controls src="'.concat(H.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Ut.content_type.indexOf("pdf")>-1?lt.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Ut.id,"?type=").concat(Ut.content_type,'&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):lt.replaceSelection("[".concat(Ut.name,"](").concat(H.a.API_SERVER,"/api/attachments/").concat(Ut.id,"?type=").concat(Ut.content_type,")"))}));case 4:case"end":return qe.stop()}},Xt)}));return function(){return Ft.apply(this,arguments)}}();Object(n.useEffect)(function(){cn(oe),lt==null||lt.setValue(oe)},[oe]),Object(n.useEffect)(function(){vi==null||vi(ci)},[ci]),Object(n.useEffect)(function(){if(wt.current){var Ft=f.a.fromTextArea(wt.current,{mode:gn,lineNumbers:!un,lineWrapping:!0,value:Zt,autoCloseTags:!0,autoCloseBrackets:!0});Wt&&Ft.focus();function Xt(zt,ur){if(K){ur.preventDefault();return}var Ar=ur.clipboardData;if(Ar){var qe=Ar.types.toString(),Ut=Ar.items;if(qe==="Files"||Ar.types.indexOf("Files")>-1){if(ur.preventDefault(),gn=="stex")return;try{var Gr,Qr=Ut[1];((Gr=Ut[0])===null||Gr===void 0?void 0:Gr.kind)==="file"&&(Qr=Ut[0]);var Vt=Qr.getAsFile(),wr=Vt.name.split(".").pop();re(Vt,function(Qt){if(Qt.id){var Rt,Kt,cr;(Vt==null||((Rt=Vt.type)===null||Rt===void 0)?void 0:Rt.indexOf("image"))>-1?Ft.replaceSelection("![,](/api/attachments/".concat(Qt.id,"?type=").concat(Qt.content_type,")")):(Vt==null||((Kt=Vt.type)===null||Kt===void 0)?void 0:Kt.indexOf("video"))>-1?Ft.replaceSelection('<video width="100%" controls src="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,'"></video>')):(Vt==null||((cr=Vt.type)===null||cr===void 0)?void 0:cr.indexOf("pdf"))>-1?Ft.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,"?type=").concat(Vt.type,'&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):tt.includes(wr)?Ft.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,'?type=office&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):Ft.replaceSelection("[".concat(Vt.name,"](").concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,"?type=").concat(Qt.content_type,")"))}else(Qt==null?void 0:Qt.status)===401&&(document.location.href="/user/login")})}catch(Qt){c.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ft.on("paste",Xt),Ft.on("dragleave",function(zt,ur){St.current.classList.remove("mouse-hover-md")}),Ft.on("dragover",function(zt,ur){St.current.classList.add("mouse-hover-md")}),Ft.on("drop",function(zt,ur){St.current.classList.add("mouse-hover-md");var Ar;if(Ar=ur.dataTransfer.files,Ar.length>0){ur.preventDefault(),ur.stopPropagation();for(var qe=function(Qr){var Vt=Ar[Qr],wr=Vt.name.split(".").pop();re(Vt,function(Qt){if(Qt.id){var Rt,Kt,cr;(Vt==null||((Rt=Vt.type)===null||Rt===void 0)?void 0:Rt.indexOf("image"))>-1?Ft.replaceSelection("![,](/api/attachments/".concat(Qt.id,"?type=").concat(Qt.content_type,")")):(Vt==null||((Kt=Vt.type)===null||Kt===void 0)?void 0:Kt.indexOf("video"))>-1?Ft.replaceSelection('<video width="100%" controls src="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,'"></video>')):(Vt==null||((cr=Vt.type)===null||cr===void 0)?void 0:cr.indexOf("pdf"))>-1?Ft.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,"?type=").concat(Vt.type,'&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):tt.includes(wr)?Ft.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,'?type=office&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):Ft.replaceSelection("[".concat(Vt.name,"](").concat(H.a.API_SERVER,"/api/attachments/").concat(Qt.id,"?type=").concat(Qt.content_type,")"))}else(Qt==null?void 0:Qt.status)===401&&(document.location.href="/user/login")})},Ut=0;Ut<Ar.length;Ut++)qe(Ut)}}),_r(Ft),function(){Ft.off("paste",Xt)}}},[]);var $t=Object(n.useCallback)(function(){if(St.current)try{}catch(Ft){console.log(Ft,"---- to set md editor body height")}},[_t,St,ci]);Object(n.useEffect)(function(){function Ft(){var zt=new v.default(function(ur){var Ar=Object(S.a)(ur),qe;try{for(Ar.s();!(qe=Ar.n()).done;){var Ut=qe.value;(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&($t(),lt.setSize("100%","100%"),lt.refresh())}}catch(Gr){Ar.e(Gr)}finally{Ar.f()}});return zt.observe(wt.current.parentElement),zt}if(lt){var Xt=Ft();return function(){Xt.unobserve(wt.current.parentElement)}}},[lt,$t]),Object(n.useEffect)(function(){if(lt){for(var Ft=[],Xt=function(){var Ut=ur[zt];Ar=Object(w.a)(Ut,2);var Gr=Ar[0],Qr=Ar[1],Vt=Object(d.a)({},Gr,function(){ir(Qr)});Ft.push(Vt),lt.addKeyMap(Vt)},zt=0,ur=Object.entries(Ct);zt<ur.length;zt++){var Ar;Xt()}return ht.current=setInterval(function(){Bt.current&&tr()},4e3),function(){clearInterval(ht.current);var qe=Object(S.a)(Ft),Ut;try{for(qe.s();!(Ut=qe.n()).done;){var Gr=Ut.value;lt.removeKeyMap(Gr)}}catch(Qr){qe.e(Qr)}finally{qe.f()}}}},[lt]),Object(n.useEffect)(function(){It!==ci&&ji(It)},[It]),Object(ft.a)(function(){if(!pi&&Ei>0){var Ft=new Date().getTime(),Xt=window.sessionStorage.getItem(ui);Ft>=Ei+Ne&&(!Xt||Xt!==Wr)&&(window.sessionStorage.setItem(ui,Wr),Lt(!0))}},Ne),Object(n.useEffect)(function(){Mi(_n)},[lt,_n]),Object(n.useEffect)(function(){lt&&(Wt&&lt.focus())},[lt,Wt]),Object(n.useEffect)(function(){if(Dn&&lt){var Ft=lt.getScrollerElement();function Xt(zt){var ur=zt.target;if(nr.current){var Ar=ur.scrollTop/ur.scrollHeight;nr.current.scrollTop=nr.current.scrollHeight*Ar}}return Ft.addEventListener("scroll",Xt),function(){Ft.removeEventListener("scroll",Xt)}}},[lt,Dn]),Object(n.useEffect)(function(){if(lt&&ti){function Ft(Xt,zt){ti(Xt,zt)}return lt.on("beforeChange",Ft),function(){lt.off("beforeChange",Ft)}}},[lt,ti]),Object(n.useEffect)(function(){if(lt&&xr){function Ft(){xr(lt.getValue())}return lt.on("blur",Ft),function(){lt.off("blur",Ft)}}},[lt,xr]),Object(n.useEffect)(function(){if(lt){function Ft(Xt){var zt=Xt.getValue();cn(zt),Gn(new Date().getTime()),Xt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Et&&Et(zt)}return lt.on("change",Ft),function(){lt.off("change",Ft)}}},[lt,Et]),Object(n.useEffect)(function(){lt&&(Zt==null?(lt.setValue(""),cn("")):Zt!==lt.getValue()&&(lt.setValue(Zt),cn(Zt),lt.setCursor(lt.lineCount(),0)))},[lt,Zt]);var ir=Object(n.useCallback)(function(Ft){var Xt=lt.getCursor(),zt=lt.getSelection(),ur=zt.split(`
`);switch(Ft){case"bold":return lt.replaceSelection("**"+zt+"**"),zt===""&&lt.setCursor(Xt.line,Xt.ch+2),lt.focus();case"italic":return lt.replaceSelection("*"+zt+"*"),zt===""&&lt.setCursor(Xt.line,Xt.ch+1),lt.focus();case"code":return lt.replaceSelection("`"+zt+"`"),zt===""&&lt.setCursor(Xt.line,Xt.ch+1),lt.focus();case"inline-latex":return lt.replaceSelection("`$$"+zt+"$$`"),zt===""&&lt.setCursor(Xt.line,Xt.ch+3),lt.focus();case"latex":return lt.replaceSelection("```latex\n"+zt+"\n```"),lt.setCursor(Xt.line+1,zt.length+1),lt.focus();case"line-break":return lt.replaceSelection(`<br/>
`),lt.focus();case"list-ul":return zt===""?lt.replaceSelection("- "+zt):lt.replaceSelection(ur.map(function(Ar){return Ar===""?"":"- ".concat(Ar)}).join(`
`)),lt.focus();case"list-ol":return zt===""?lt.replaceSelection("1. "+zt):lt.replaceSelection(ur.map(function(Ar,qe){return Ar===""?"":"".concat(qe+1,". ").concat(Ar)}).join(`
`)),lt.focus();case"add-null-ch":return zt===""&&lt.setCursor(Xt.line,Xt.ch+1),lt.replaceSelection(Ee),lt.focus();case"inster-template-1":return zt===""&&lt.setCursor(Xt.line,Xt.ch),lt.replaceSelection(Se),lt.focus();case"eraser":return lt.setValue(""),lt.focus();case"trigger-watch":return Mi(!Dn),lt.focus();case"trigger-full-screen":return ji(!ci),lt.focus();case ct:bi(ct);return;case pt:bi(pt);return;case dt:bi(dt);return;case He:bi(He);return;default:throw new Error}},[lt,Dn,ci]),sr=Object(n.useCallback)(function(Ft){bi("");switch(Ui){case ct:var Xt=Ft.title,zt=Ft.link;return lt.replaceSelection("[".concat(Xt,"](").concat(zt,")")),lt.focus();case pt:var ur=Ft.language,Ar=Ft.content;return lt.replaceSelection(["```"+ur,Ar,"```"].join(`
`)),lt.focus();case dt:var qe=Ft.src,Ut=Ft.alt,Gr=Ft.name;return qe.indexOf("type=image")>-1?lt.replaceSelection("![ ".concat(Ut||""," ]( ").concat(qe,' "').concat(Ut||"",'" )')):qe.indexOf("type=application/pdf")>-1?lt.replaceSelection('<a href="'.concat(qe,'&disposition=inline" target="_blank">').concat(Gr,"</a>")):lt.replaceSelection('<a href="'.concat(qe,'" target="_blank">').concat(Gr,"</a>")),lt.focus();case He:for(var Qr=Ft.row,Vt=Ft.col,wr=Ft.align,Qt=`
`,Rt=0;Rt<Qr;Rt++){for(var Kt=[],cr=[],qt=0;qt<Vt;qt++)Rt===1&&cr.push(at[wr]),Kt.push(" ");Rt===1&&(Qt+="| ".concat(cr.join(" | "),` |
`)),Qt+="| ".concat(Kt.join(Vt===1?"":" | "),` |
`)}return lt.replaceSelection(Qt+`
`),lt.focus();default:throw new Error}},[lt,Ui]),ot=Object(n.useMemo)(function(){switch(Ui){case ct:return u.a.createElement(pe,{callback:sr,onCancel:Sr});case pt:return u.a.createElement(Te.b,{callback:sr,onCancel:Sr});case dt:return u.a.createElement(ee,{callback:sr,onCancel:Sr});case He:return u.a.createElement(Qe,{callback:sr,onCancel:Sr});default:return null}},[Ui]);function Sr(){bi("")}Object(n.useEffect)(function(){if(vr.current){var Ft=vr.current,Xt=!1,zt=0;function ur(Ut){Xt=!0,zt=Ut.pageY}function Ar(){Xt=!1}function qe(Ut){if(Xt){var Gr=Ut.pageY-zt;Gr<0&&(Gr=0),Gr>300&&(Gr=300);var Qr=rn+Gr+"px";et(Qr)}}return Ft.addEventListener("mousedown",ur),document.addEventListener("mousemove",qe),document.addEventListener("mouseup",Ar),function(){Ft.removeEventListener("mousedown",ur),document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ar)}}},[lt,vr]),Object(n.useEffect)(function(){et(rn)},[rn]);var Lr=Re(Kr),yr=Re(_t),ar={width:Lr,height:yr},pr=Object(n.useMemo)(function(){if(Ei){var Ft=new Date(Ei),Xt=Ft.getHours(),zt=Ft.getMinutes(),ur=Ft.getSeconds();return Xt=Xt<10?"0"+Xt:Xt,zt=zt<10?"0"+zt:zt,ur=ur<10?"0"+ur:ur,"".concat(Xt,":").concat(zt,":").concat(ur)}return 0},[Ei]);function er(){window.sessionStorage.removeItem(ui),Lt(!1),Gn(0)}function lr(){Lt(!1),Gn(0),lt.setValue(window.sessionStorage.getItem(ui))}function Br(Ft,Xt){var zt=lt.getValue();zt=zt.replace(Ft,Xt),cn(zt),lt==null||lt.setValue(zt)}return u.a.createElement(n.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:St},u.a.createElement("div",{className:"markdown-editor-container ".concat(Di," ").concat(Dn?"on-preview":""," ").concat(un?"mini":""," ").concat(ci?"full-screen":""),style:ar},u.a.createElement(G,{insertTemp:Cn,watch:Dn,fullScreen:ci,showNullButton:nn,onActionCallback:ir,hidetoolBar:Si,uuid:Ht.current,setOpenPhones:function(){Bt.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:wt,placeholder:ne})),Dn?u.a.createElement("div",{ref:nr,className:"preview-container"},gn==="stex"&&u.a.createElement(k,{value:Wr}),gn!=="stex"&&u.a.createElement(l.a,{edit:!0,value:Wr,replaces:Br})):null))),mr?u.a.createElement("a",{ref:vr,className:"editor-resize"}):null,u.a.createElement(B.a,null,At[Ui]?u.a.createElement(m.a,{centered:!0,title:At[Ui],visible:!0,onCancel:Sr,footer:null},ot):null))}},PVpz:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.StreamCipher,c=m.algo,h=[],w=[],d=[],o=c.RabbitLegacy=P.extend({_doReset:function(){var n=this._key.words,u=this.cfg.iv,p=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],f=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 v=0;v<4;v++)a.call(this);for(var v=0;v<8;v++)f[v]^=p[v+4&7];if(u){var g=u.words,b=g[0],i=g[1],s=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,T=s>>>16|t&4294901760,_=t<<16|s&65535;f[0]^=s,f[1]^=T,f[2]^=t,f[3]^=_,f[4]^=s,f[5]^=T,f[6]^=t,f[7]^=_;for(var v=0;v<4;v++)a.call(this)}},_doProcessBlock:function(n,u){var p=this._X;a.call(this),h[0]=p[0]^p[5]>>>16^p[3]<<16,h[1]=p[2]^p[7]>>>16^p[5]<<16,h[2]=p[4]^p[1]>>>16^p[7]<<16,h[3]=p[6]^p[3]>>>16^p[1]<<16;for(var f=0;f<4;f++)h[f]=(h[f]<<8|h[f]>>>24)&16711935|(h[f]<<24|h[f]>>>8)&4278255360,n[u+f]^=h[f]},blockSize:128/32,ivSize:64/32});function a(){for(var n=this._X,u=this._C,p=0;p<8;p++)w[p]=u[p];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<w[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<w[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<w[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<w[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<w[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<w[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<w[6]>>>0?1:0)|0,this._b=u[7]>>>0<w[7]>>>0?1:0;for(var p=0;p<8;p++){var f=n[p]+u[p],v=f&65535,g=f>>>16,b=((v*v>>>17)+v*g>>>15)+g*g,i=((f&4294901760)*f|0)+((f&65535)*f|0);d[p]=b^i}n[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,n[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,n[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,n[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,n[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,n[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,n[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,n[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}m.RabbitLegacy=P._createHelper(o)}(),D.RabbitLegacy})},RxwV:function(N,J,M){"use strict";var D=M("q1tI"),m=M("uciX"),S=M("2W6z"),P=M.n(S),c=M("4IlW"),h=M("uK0f"),w=M.n(h);function d(Te,ye){if(Te===ye)return!0;if(!Te||!ye)return!1;var ue=Te.length;if(ye.length!==ue)return!1;for(var le=0;le<ue;le++)if(Te[le]!==ye[le])return!1;return!0}function o(Te){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(ue){return typeof ue}:o=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},o(Te)}function a(Te,ye){if(!(Te instanceof ye))throw new TypeError("Cannot call a class as a function")}function n(Te,ye){for(var ue=0;ue<ye.length;ue++){var le=ye[ue];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Te,le.key,le)}}function u(Te,ye,ue){return ye&&n(Te.prototype,ye),ue&&n(Te,ue),Te}function p(Te,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function");Te.prototype=Object.create(ye&&ye.prototype,{constructor:{value:Te,writable:!0,configurable:!0}}),ye&&f(Te,ye)}function f(Te,ye){return f=Object.setPrototypeOf||function(le,te){return le.__proto__=te,le},f(Te,ye)}function v(Te){var ye=i();return function(){var ue=s(Te),le;if(ye){var te=s(this).constructor;le=Reflect.construct(ue,arguments,te)}else le=ue.apply(this,arguments);return g(this,le)}}function g(Te,ye){return ye&&(o(ye)==="object"||typeof ye=="function")?ye:b(Te)}function b(Te){if(Te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Te}function i(){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(Te){return!1}}function s(Te){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},s(Te)}var t=function(){var Te=function(ye){p(le,ye);var ue=v(le);function le(){var te;return a(this,le),te=ue.apply(this,arguments),te.menuItems={},te.saveMenuItem=function(fe){return function(q){te.menuItems[fe]=q}},te}return u(le,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(fe){!fe.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(fe){var q=this.props,ee=q.fieldNames,Ce=q.defaultFieldNames;return ee[fe]||Ce[fe]}},{key:"getOption",value:function(fe,q){var ee=this.props,Ce=ee.prefixCls,re=ee.expandTrigger,Q=ee.expandIcon,X=ee.loadingIcon,Z=this.props.onSelect.bind(this,fe,q),xe=this.props.onItemDoubleClick.bind(this,fe,q),ve={onClick:Z,onDoubleClick:xe},Oe="".concat(Ce,"-menu-item"),Qe=null,rt=fe[this.getFieldName("children")]&&fe[this.getFieldName("children")].length>0;(rt||fe.isLeaf===!1)&&(Oe+=" ".concat(Ce,"-menu-item-expand"),fe.loading||(Qe=D.createElement("span",{className:"".concat(Ce,"-menu-item-expand-icon")},Q))),re==="hover"&&(rt||fe.isLeaf===!1)&&(ve={onMouseEnter:this.delayOnSelect.bind(this,Z),onMouseLeave:this.delayOnSelect.bind(this),onClick:Z}),this.isActiveOption(fe,q)&&(Oe+=" ".concat(Ce,"-menu-item-active"),ve.ref=this.saveMenuItem(q)),fe.disabled&&(Oe+=" ".concat(Ce,"-menu-item-disabled"));var nt=null;fe.loading&&(Oe+=" ".concat(Ce,"-menu-item-loading"),nt=X||null);var ct="";return"title"in fe?ct=fe.title:typeof fe[this.getFieldName("label")]=="string"&&(ct=fe[this.getFieldName("label")]),D.createElement("li",Object.assign({key:fe[this.getFieldName("value")],className:Oe,title:ct},ve,{role:"menuitem",onMouseDown:function(pt){return pt.preventDefault()}}),fe[this.getFieldName("label")],Qe,nt)}},{key:"getActiveOptions",value:function(fe){var q=this,ee=this.props.options,Ce=fe||this.props.activeValue;return w()(ee,function(re,Q){return re[q.getFieldName("value")]===Ce[Q]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var fe=this,q=this.props.options,ee=this.getActiveOptions().map(function(Ce){return Ce[fe.getFieldName("children")]}).filter(function(Ce){return!!Ce});return ee.unshift(q),ee}},{key:"delayOnSelect",value:function(fe){for(var q=this,ee=arguments.length,Ce=new Array(ee>1?ee-1:0),re=1;re<ee;re++)Ce[re-1]=arguments[re];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof fe=="function"&&(this.delayTimer=window.setTimeout(function(){fe(Ce),q.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var fe=this.getShowOptions().length,q=0;q<fe;q++){var ee=this.menuItems[q];ee&&ee.parentElement&&(ee.parentElement.scrollTop=ee.offsetTop)}}},{key:"isActiveOption",value:function(fe,q){var ee=this.props.activeValue,Ce=ee===void 0?[]:ee;return Ce[q]===fe[this.getFieldName("value")]}},{key:"render",value:function(){var fe=this,q=this.props,ee=q.prefixCls,Ce=q.dropdownMenuColumnStyle;return D.createElement("div",null,this.getShowOptions().map(function(re,Q){return D.createElement("ul",{className:"".concat(ee,"-menu"),key:Q,style:Ce},re.map(function(X){return fe.getOption(X,Q)}))}))}}]),le}(D.Component);return Te.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Te}(),T=t,_={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}}},l=_;function k(Te){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(ue){return typeof ue}:k=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},k(Te)}function O(Te,ye){if(Te==null)return{};var ue=x(Te,ye),le,te;if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(Te);for(te=0;te<fe.length;te++){if(le=fe[te],ye.indexOf(le)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Te,le))continue;ue[le]=Te[le]}}return ue}function x(Te,ye){if(Te==null)return{};var ue={},le=Object.keys(Te),te,fe;for(fe=0;fe<le.length;fe++){if(te=le[fe],ye.indexOf(te)>=0)continue;ue[te]=Te[te]}return ue}function y(Te){return j(Te)||I(Te)||C(Te)||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 C(Te,ye){if(!Te)return;if(typeof Te=="string")return L(Te,ye);var ue=Object.prototype.toString.call(Te).slice(8,-1);if(ue==="Object"&&Te.constructor&&(ue=Te.constructor.name),ue==="Map"||ue==="Set")return Array.from(Te);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return L(Te,ye)}function I(Te){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Te))return Array.from(Te)}function j(Te){if(Array.isArray(Te))return L(Te)}function L(Te,ye){(ye==null||ye>Te.length)&&(ye=Te.length);for(var ue=0,le=new Array(ye);ue<ye;ue++)le[ue]=Te[ue];return le}function H(Te,ye){if(!(Te instanceof ye))throw new TypeError("Cannot call a class as a function")}function W(Te,ye){for(var ue=0;ue<ye.length;ue++){var le=ye[ue];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Te,le.key,le)}}function U(Te,ye,ue){return ye&&W(Te.prototype,ye),ue&&W(Te,ue),Te}function G(Te,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function");Te.prototype=Object.create(ye&&ye.prototype,{constructor:{value:Te,writable:!0,configurable:!0}}),ye&&B(Te,ye)}function B(Te,ye){return B=Object.setPrototypeOf||function(le,te){return le.__proto__=te,le},B(Te,ye)}function z(Te){var ye=ce();return function(){var ue=he(Te),le;if(ye){var te=he(this).constructor;le=Reflect.construct(ue,arguments,te)}else le=ue.apply(this,arguments);return V(this,le)}}function V(Te,ye){return ye&&(k(ye)==="object"||typeof ye=="function")?ye:ie(Te)}function ie(Te){if(Te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Te}function ce(){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(Te){return!1}}function he(Te){return he=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},he(Te)}var Ae=function(){var Te=function(ye){G(le,ye);var ue=z(le);function le(te){var fe;H(this,le),fe=ue.call(this,te),fe.setPopupVisible=function(ee){var Ce=fe.state.value;"popupVisible"in fe.props||fe.setState({popupVisible:ee}),ee&&!fe.state.popupVisible&&fe.setState({activeValue:Ce}),fe.props.onPopupVisibleChange(ee)},fe.handleChange=function(ee,Ce,re){var Q=Ce.visible;(re.type!=="keydown"||re.keyCode===c.a.ENTER)&&(fe.props.onChange(ee.map(function(X){return X[fe.getFieldName("value")]}),ee),fe.setPopupVisible(Q))},fe.handlePopupVisibleChange=function(ee){fe.setPopupVisible(ee)},fe.handleMenuSelect=function(ee,Ce,re){var Q=fe.trigger.getRootDomNode();Q&&Q.focus&&Q.focus();var X=fe.props,Z=X.changeOnSelect,xe=X.loadData,ve=X.expandTrigger;if(!ee||ee.disabled)return;var Oe=fe.state.activeValue;Oe=Oe.slice(0,Ce+1),Oe[Ce]=ee[fe.getFieldName("value")];var Qe=fe.getActiveOptions(Oe);if(ee.isLeaf===!1&&!ee[fe.getFieldName("children")]&&xe){Z&&fe.handleChange(Qe,{visible:!0},re),fe.setState({activeValue:Oe}),xe(Qe);return}var rt={};!ee[fe.getFieldName("children")]||!ee[fe.getFieldName("children")].length?(fe.handleChange(Qe,{visible:!1},re),rt.value=Oe):Z&&(re.type==="click"||re.type==="keydown")&&(ve==="hover"?fe.handleChange(Qe,{visible:!1},re):fe.handleChange(Qe,{visible:!0},re),rt.value=Oe),rt.activeValue=Oe,("value"in fe.props||re.type==="keydown"&&re.keyCode!==c.a.ENTER)&&delete rt.value,fe.setState(rt)},fe.handleItemDoubleClick=function(){var ee=fe.props.changeOnSelect;ee&&fe.setPopupVisible(!1)},fe.handleKeyDown=function(ee){var Ce=fe.props.children;if(Ce&&Ce.props.onKeyDown){Ce.props.onKeyDown(ee);return}var re=y(fe.state.activeValue),Q=re.length-1<0?0:re.length-1,X=fe.getCurrentLevelOptions(),Z=X.map(function(Qe){return Qe[fe.getFieldName("value")]}).indexOf(re[Q]);if(ee.keyCode!==c.a.DOWN&&ee.keyCode!==c.a.UP&&ee.keyCode!==c.a.LEFT&&ee.keyCode!==c.a.RIGHT&&ee.keyCode!==c.a.ENTER&&ee.keyCode!==c.a.SPACE&&ee.keyCode!==c.a.BACKSPACE&&ee.keyCode!==c.a.ESC&&ee.keyCode!==c.a.TAB)return;if(!fe.state.popupVisible&&ee.keyCode!==c.a.BACKSPACE&&ee.keyCode!==c.a.LEFT&&ee.keyCode!==c.a.RIGHT&&ee.keyCode!==c.a.ESC&&ee.keyCode!==c.a.TAB){fe.setPopupVisible(!0);return}if(ee.keyCode===c.a.DOWN||ee.keyCode===c.a.UP){ee.preventDefault();var xe=Z;xe!==-1?ee.keyCode===c.a.DOWN?(xe+=1,xe=xe>=X.length?0:xe):(xe-=1,xe=xe<0?X.length-1:xe):xe=0,re[Q]=X[xe][fe.getFieldName("value")]}else if(ee.keyCode===c.a.LEFT||ee.keyCode===c.a.BACKSPACE)ee.preventDefault(),re.splice(re.length-1,1);else if(ee.keyCode===c.a.RIGHT)ee.preventDefault(),X[Z]&&X[Z][fe.getFieldName("children")]&&re.push(X[Z][fe.getFieldName("children")][0][fe.getFieldName("value")]);else if(ee.keyCode===c.a.ESC||ee.keyCode===c.a.TAB){fe.setPopupVisible(!1);return}(!re||re.length===0)&&fe.setPopupVisible(!1);var ve=fe.getActiveOptions(re),Oe=ve[ve.length-1];fe.handleMenuSelect(Oe,ve.length-1,ee),fe.props.onKeyDown&&fe.props.onKeyDown(ee)},fe.saveTrigger=function(ee){fe.trigger=ee};var q=[];return"value"in te?q=te.value||[]:"defaultValue"in te&&(q=te.defaultValue||[]),P()(!("filedNames"in te),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),fe.state={popupVisible:te.popupVisible,activeValue:q,value:q,prevProps:te},fe.defaultFieldNames={label:"label",value:"value",children:"children"},fe}return U(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(fe){var q=this.defaultFieldNames,ee=this.props,Ce=ee.fieldNames,re=ee.filedNames;return"filedNames"in this.props?re[fe]||q[fe]:Ce[fe]||q[fe]}},{key:"getFieldNames",value:function(){var fe=this.props,q=fe.fieldNames,ee=fe.filedNames;return"filedNames"in this.props?ee:q}},{key:"getCurrentLevelOptions",value:function(){var fe=this,q=this.props.options,ee=q===void 0?[]:q,Ce=this.state.activeValue,re=Ce===void 0?[]:Ce,Q=w()(ee,function(X,Z){return X[fe.getFieldName("value")]===re[Z]},{childrenKeyName:this.getFieldName("children")});return Q[Q.length-2]?Q[Q.length-2][this.getFieldName("children")]:y(ee).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(fe){var q=this;return w()(this.props.options||[],function(ee,Ce){return ee[q.getFieldName("value")]===fe[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var fe=this.props,q=fe.prefixCls,ee=fe.transitionName,Ce=fe.popupClassName,re=fe.options,Q=re===void 0?[]:re,X=fe.disabled,Z=fe.builtinPlacements,xe=fe.popupPlacement,ve=fe.children,Oe=fe.dropdownRender,Qe=O(fe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),rt=D.createElement("div",null),nt="";Q&&Q.length>0?rt=D.createElement(T,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):nt=" ".concat(q,"-menus-empty");var ct=rt;return Oe&&(ct=Oe(rt)),D.createElement(m.a,Object.assign({ref:this.saveTrigger},Qe,{popupPlacement:xe,builtinPlacements:Z,popupTransitionName:ee,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(q,"-menus"),popupClassName:Ce+nt,popup:ct}),D.cloneElement(ve,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(fe,q){var ee=q.prevProps,Ce=ee===void 0?{}:ee,re={prevProps:fe};return"value"in fe&&!d(Ce.value,fe.value)&&(re.value=fe.value||[],"loadData"in fe||(re.activeValue=fe.value||[])),"popupVisible"in fe&&(re.popupVisible=fe.popupVisible),re}}]),le}(D.Component);return Te.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:l,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Te}(),De=Ae,pe=J.a=De},S6kV:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.OFB=function(){var m=D.lib.BlockCipherMode.extend(),S=m.Encryptor=m.extend({processBlock:function(P,c){var h=this._cipher,w=h.blockSize,d=this._iv,o=this._keystream;d&&(o=this._keystream=d.slice(0),this._iv=void 0),h.encryptBlock(o,0);for(var a=0;a<w;a++)P[c+a]^=o[a]}});return m.Decryptor=S,m}(),D.mode.OFB})},"SA+Z":function(N,J,M){var D=M("wTVA"),m=M("EbDI"),S=M("ZhPi"),P=M("wkBT");function c(h){return D(h)||m(h)||S(h)||P()}N.exports=c,N.exports.__esModule=!0,N.exports.default=N.exports},SJMd:function(N,J){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var M,D,m,S=!1,P,c;window.PR_SHOULD_USE_CONTINUATION=!0;var h,w;(function(){var d=window,o=["break,continue,do,else,for,if,return,while"],a=[o,"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=[a,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[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"],p=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],f=[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"],v="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",g=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],b="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",i=[o,"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"],s=[o,"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=[o,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[u,f,p,g,b,i,s,t],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,l="str",k="kwd",O="com",x="typ",y="lit",E="pun",C="pln",I="tag",j="dec",L="src",H="atn",W="atv",U="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(re){for(var Q=0,X=!1,Z=!1,xe=0,ve=re.length;xe<ve;++xe){var Oe=re[xe];if(Oe.ignoreCase)Z=!0;else if(/[a-z]/i.test(Oe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Z=!1;break}}var Qe={b:8,t:9,n:10,v:11,f:12,r:13};function rt(He){var Pe=He.charCodeAt(0);if(Pe!==92)return Pe;var at=He.charAt(1);return Pe=Qe[at],Pe||("0"<=at&&at<="7"?parseInt(He.substring(1),8):at==="u"||at==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function nt(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var Pe=String.fromCharCode(He);return Pe==="\\"||Pe==="-"||Pe==="]"||Pe==="^"?"\\"+Pe:Pe}function ct(He){var Pe=He.substring(1,He.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=[],ft=Pe[0]==="^",Je=["["];ft&&Je.push("^");for(var st=ft?1:0,Ue=Pe.length;st<Ue;++st){var Me=Pe[st];if(/\\[bdsw]/i.test(Me))Je.push(Me);else{var Ne=rt(Me),Ee;st+2<Ue&&Pe[st+1]==="-"?(Ee=rt(Pe[st+2]),st+=2):Ee=Ne,at.push([Ne,Ee]),Ee<65||Ne>122||(Ee<65||Ne>90||at.push([Math.max(65,Ne)|32,Math.min(Ee,90)|32]),Ee<97||Ne>122||at.push([Math.max(97,Ne)&~32,Math.min(Ee,122)&~32]))}}at.sort(function(Ye,tt){return Ye[0]-tt[0]||tt[1]-Ye[1]});for(var Se=[],Re=[],st=0;st<at.length;++st){var Le=at[st];Le[0]<=Re[1]+1?Re[1]=Math.max(Re[1],Le[1]):Se.push(Re=Le)}for(var st=0;st<Se.length;++st){var Le=Se[st];Je.push(nt(Le[0])),Le[1]>Le[0]&&(Le[1]+1>Le[0]&&Je.push("-"),Je.push(nt(Le[1])))}return Je.push("]"),Je.join("")}function dt(He){for(var Pe=He.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=Pe.length,ft=[],Je=0,st=0;Je<at;++Je){var Ue=Pe[Je];if(Ue==="(")++st;else if(Ue.charAt(0)==="\\"){var Me=+Ue.substring(1);Me&&(Me<=st?ft[Me]=-1:Pe[Je]=nt(Me))}}for(var Je=1;Je<ft.length;++Je)ft[Je]===-1&&(ft[Je]=++Q);for(var Je=0,st=0;Je<at;++Je){var Ue=Pe[Je];if(Ue==="(")++st,ft[st]||(Pe[Je]="(?:");else if(Ue.charAt(0)==="\\"){var Me=+Ue.substring(1);Me&&Me<=st&&(Pe[Je]="\\"+ft[Me])}}for(var Je=0;Je<at;++Je)Pe[Je]==="^"&&Pe[Je+1]!=="^"&&(Pe[Je]="");if(He.ignoreCase&&X)for(var Je=0;Je<at;++Je){var Ue=Pe[Je],Ne=Ue.charAt(0);Ue.length>=2&&Ne==="["?Pe[Je]=ct(Ue):Ne!=="\\"&&(Pe[Je]=Ue.replace(/[a-zA-Z]/g,function(Re){var Le=Re.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return Pe.join("")}for(var pt=[],xe=0,ve=re.length;xe<ve;++xe){var Oe=re[xe];if(Oe.global||Oe.multiline)throw new Error(""+Oe);pt.push("(?:"+dt(Oe)+")")}return new RegExp(pt.join("|"),Z?"gi":"g")}function z(re,Q){var X=/(?:^|\s)nocode(?:\s|$)/,Z=[],xe=0,ve=[],Oe=0;function Qe(rt){var nt=rt.nodeType;if(nt==1){if(X.test(rt.className))return;for(var ct=rt.firstChild;ct;ct=ct.nextSibling)Qe(ct);var dt=rt.nodeName.toLowerCase();(dt==="br"||dt==="li")&&(Z[Oe]=`
`,ve[Oe<<1]=xe++,ve[Oe++<<1|1]=rt)}else if(nt==3||nt==4){var pt=rt.nodeValue;pt.length&&(Q?pt=pt.replace(/\r\n?/g,`
`):pt=pt.replace(/[ \t\r\n]+/g," "),Z[Oe]=pt,ve[Oe<<1]=xe,xe+=pt.length,ve[Oe++<<1|1]=rt)}}return Qe(re),{sourceCode:Z.join("").replace(/\n$/,""),spans:ve}}function V(re,Q,X,Z,xe){if(!X)return;var ve={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:Q,decorations:null};Z(ve),xe.push.apply(xe,ve.decorations)}var ie=/\S/;function ce(re){for(var Q=void 0,X=re.firstChild;X;X=X.nextSibling){var Z=X.nodeType;Q=Z===1?Q?re:X:Z===3&&ie.test(X.nodeValue)?re:Q}return Q===re?void 0:Q}function he(re,Q){var X={},Z;(function(){for(var Oe=re.concat(Q),Qe=[],rt={},nt=0,ct=Oe.length;nt<ct;++nt){var dt=Oe[nt],pt=dt[3];if(pt)for(var He=pt.length;--He>=0;)X[pt.charAt(He)]=dt;var Pe=dt[1],at=""+Pe;rt.hasOwnProperty(at)||(Qe.push(Pe),rt[at]=null)}Qe.push(/[\0-\uffff]/),Z=B(Qe)})();var xe=Q.length,ve=function(Oe){for(var Qe=Oe.sourceCode,rt=Oe.basePos,nt=Oe.sourceNode,ct=[rt,C],dt=0,pt=Qe.match(Z)||[],He={},Pe=0,at=pt.length;Pe<at;++Pe){var ft=pt[Pe],Je=He[ft],st=void 0,Ue;if(typeof Je=="string")Ue=!1;else{var Me=X[ft.charAt(0)];if(Me)st=ft.match(Me[1]),Je=Me[0];else{for(var Ne=0;Ne<xe;++Ne)if(Me=Q[Ne],st=ft.match(Me[1]),st){Je=Me[0];break}st||(Je=C)}Ue=Je.length>=5&&Je.substring(0,5)==="lang-",Ue&&!(st&&typeof st[1]=="string")&&(Ue=!1,Je=L),Ue||(He[ft]=Je)}var Ee=dt;if(dt+=ft.length,!Ue)ct.push(rt+Ee,Je);else{var Se=st[1],Re=ft.indexOf(Se),Le=Re+Se.length;st[2]&&(Le=ft.length-st[2].length,Re=Le-Se.length);var Ye=Je.substring(5);V(nt,rt+Ee,ft.substring(0,Re),ve,ct),V(nt,rt+Ee+Re,Se,le(Ye,Se),ct),V(nt,rt+Ee+Le,ft.substring(Le),ve,ct)}}Oe.decorations=ct};return ve}function Ae(re){var Q=[],X=[];re.tripleQuotedStrings?Q.push([l,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?Q.push([l,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Q.push([l,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&X.push([l,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=re.hashComments;Z&&(re.cStyleComments?(Z>1?Q.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Q.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([l,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Q.push([O,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=re.regexLiterals;if(xe){var ve=xe>1?"":`
\r`,Oe=ve?".":"[\\S\\s]",Qe="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+G+"("+Qe+")")])}var rt=re.types;rt&&X.push([x,rt]);var nt=(""+re.keywords).replace(/^ | $/g,"");nt.length&&X.push([k,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),Q.push([C,/^\s+/,null,` \r
\xA0`]);var ct="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(ct+="(?!s*/)"),X.push([y,/^@[a-z_$][a-z_$@0-9]*/i,null],[x,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[C,/^[a-z_$][a-z_$@0-9]*/i,null],[y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[C,/^\\[\s\S]?/,null],[E,new RegExp(ct),null]),he(Q,X)}var De=Ae({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function pe(re,Q,X){for(var Z=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,ve=re.ownerDocument,Oe=ve.createElement("li");re.firstChild;)Oe.appendChild(re.firstChild);var Qe=[Oe];function rt(Pe){var at=Pe.nodeType;if(at==1&&!Z.test(Pe.className))if(Pe.nodeName==="br")nt(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var ft=Pe.firstChild;ft;ft=ft.nextSibling)rt(ft);else if((at==3||at==4)&&X){var Je=Pe.nodeValue,st=Je.match(xe);if(st){var Ue=Je.substring(0,st.index);Pe.nodeValue=Ue;var Me=Je.substring(st.index+st[0].length);if(Me){var Ne=Pe.parentNode;Ne.insertBefore(ve.createTextNode(Me),Pe.nextSibling)}nt(Pe),Ue||Pe.parentNode.removeChild(Pe)}}}function nt(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function at(st,Ue){var Me=Ue?st.cloneNode(!1):st,Ne=st.parentNode;if(Ne){var Ee=at(Ne,1),Se=st.nextSibling;Ee.appendChild(Me);for(var Re=Se;Re;Re=Se)Se=Re.nextSibling,Ee.appendChild(Re)}return Me}for(var ft=at(Pe.nextSibling,0),Je;(Je=ft.parentNode)&&Je.nodeType===1;)ft=Je;Qe.push(ft)}for(var ct=0;ct<Qe.length;++ct)rt(Qe[ct]);Q===(Q|0)&&Qe[0].setAttribute("value",Q);var dt=ve.createElement("ol");dt.className="linenums";for(var pt=Math.max(0,Q-1|0)||0,ct=0,He=Qe.length;ct<He;++ct)Oe=Qe[ct],Oe.className="L"+(ct+pt)%10,Oe.firstChild||Oe.appendChild(ve.createTextNode("\xA0")),dt.appendChild(Oe);re.appendChild(dt)}function Te(re){var Q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Q=Q&&+Q[1]<=8;var X=/\n/g,Z=re.sourceCode,xe=Z.length,ve=0,Oe=re.spans,Qe=Oe.length,rt=0,nt=re.decorations,ct=nt.length,dt=0;nt[ct]=xe;var pt,He;for(He=pt=0;He<ct;)nt[He]!==nt[He+2]?(nt[pt++]=nt[He++],nt[pt++]=nt[He++]):He+=2;for(ct=pt,He=pt=0;He<ct;){for(var Pe=nt[He],at=nt[He+1],ft=He+2;ft+2<=ct&&nt[ft+1]===at;)ft+=2;nt[pt++]=Pe,nt[pt++]=at,He=ft}ct=nt.length=pt;var Je=re.sourceNode,st="";Je&&(st=Je.style.display,Je.style.display="none");try{for(var Ue=null;rt<Qe;){var Me=Oe[rt],Ne=Oe[rt+2]||xe,Ee=nt[dt+2]||xe,ft=Math.min(Ne,Ee),Se=Oe[rt+1],Re;if(Se.nodeType!==1&&(Re=Z.substring(ve,ft))){Q&&(Re=Re.replace(X,"\r")),Se.nodeValue=Re;var Le=Se.ownerDocument,Ye=Le.createElement("span");Ye.className=nt[dt+1];var tt=Se.parentNode;tt.replaceChild(Ye,Se),Ye.appendChild(Se),ve<Ne&&(Oe[rt+1]=Se=Le.createTextNode(Z.substring(ft,Ne)),tt.insertBefore(Se,Ye.nextSibling))}ve=ft,ve>=Ne&&(rt+=2),ve>=Ee&&(dt+=2)}}finally{Je&&(Je.style.display=st)}}var ye={};function ue(re,Q){for(var X=Q.length;--X>=0;){var Z=Q[X];ye.hasOwnProperty(Z)?d.console&&console.warn("cannot override language handler %s",Z):ye[Z]=re}}function le(re,Q){return re&&ye.hasOwnProperty(re)||(re=/^\s*</.test(Q)?"default-markup":"default-code"),ye[re]}ue(De,["default-code"]),ue(he([],[[C,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\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"]),ue(he([[C,/^[\s]+/,null,` \r
`],[W,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[I,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[H,/^(?!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"]),ue(he([],[[W,/^[\s\S]+/]]),["uq.val"]),ue(Ae({keywords:u,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),ue(Ae({keywords:"null,true,false"}),["json"]),ue(Ae({keywords:f,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),ue(Ae({keywords:p,cStyleComments:!0}),["java"]),ue(Ae({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Ae({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Ae({keywords:b,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Ae({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Ae({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Ae({keywords:v,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(he([],[[l,/^[\s\S]+/]]),["regex"]);function te(re){var Q=re.langExtension;try{var X=z(re.sourceNode,re.pre),Z=X.sourceCode;re.sourceCode=Z,re.spans=X.spans,re.basePos=0,le(Q,Z)(re),Te(re)}catch(xe){d.console&&console.log(xe&&xe.stack||xe)}}function fe(re,Q,X){var Z=X||!1,xe=Q||null,ve=document.createElement("div");ve.innerHTML="<pre>"+re+"</pre>",ve=ve.firstChild,Z&&pe(ve,Z,!0);var Oe={langExtension:xe,numberLines:Z,sourceNode:ve,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(Oe),ve.innerHTML}function q(re,Q){var X=Q||document.body,Z=X.ownerDocument||document;function xe(Me){return X.getElementsByTagName(Me)}for(var ve=[xe("pre"),xe("code"),xe("xmp")],Oe=[],Qe=0;Qe<ve.length;++Qe)for(var rt=0,nt=ve[Qe].length;rt<nt;++rt)Oe.push(ve[Qe][rt]);ve=null;var ct=Date;ct.now||(ct={now:function(){return+new Date}});var dt=0,pt=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,Pe=/\bprettyprinted\b/,at=/pre|xmp/i,ft=/^code$/i,Je=/^(?:pre|code|xmp)$/i,st={};function Ue(){for(var Me=d.PR_SHOULD_USE_CONTINUATION?ct.now()+250:Infinity;dt<Oe.length&&ct.now()<Me;dt++){for(var Ne=Oe[dt],Ee=st,Se=Ne;Se=Se.previousSibling;){var Re=Se.nodeType,Le=(Re===7||Re===8)&&Se.nodeValue;if(Le?!/^\??prettify\b/.test(Le):Re!==3||/\S/.test(Se.nodeValue))break;if(Le){Ee={},Le.replace(/\b(\w+)=([\w:.%+-]+)/g,function(rn,Er,un){Ee[Er]=un});break}}var Ye=Ne.className;if((Ee!==st||He.test(Ye))&&!Pe.test(Ye)){for(var tt=!1,Ct=Ne.parentNode;Ct;Ct=Ct.parentNode){var At=Ct.tagName;if(Je.test(At)&&Ct.className&&He.test(Ct.className)){tt=!0;break}}if(!tt){Ne.className+=" prettyprinted";var rr=Ee.lang;if(!rr){rr=Ye.match(pt);var gt;!rr&&(gt=ce(Ne))&&ft.test(gt.tagName)&&(rr=gt.className.match(pt)),rr&&(rr=rr[1])}var or;if(at.test(Ne.tagName))or=1;else{var Zt=Ne.currentStyle,Et=Z.defaultView,jr=Zt?Zt.whiteSpace:Et&&Et.getComputedStyle?Et.getComputedStyle(Ne,null).getPropertyValue("white-space"):0;or=jr&&jr.substring(0,3)==="pre"}var Kr=Ee.linenums;(Kr=Kr==="true"||+Kr)||(Kr=Ye.match(/\blinenums\b(?::(\d+))?/),Kr=Kr?Kr[1]&&Kr[1].length?+Kr[1]:!0:!1),Kr&&pe(Ne,Kr,or);var Fr={langExtension:rr,sourceNode:Ne,numberLines:Kr,pre:or,sourceCode:null,basePos:null,spans:null,decorations:null};te(Fr)}}}dt<Oe.length?d.setTimeout(Ue,250):typeof re=="function"&&re()}Ue()}var ee=d.PR={createSimpleLexer:he,registerLangHandler:ue,sourceDecorator:Ae,PR_ATTRIB_NAME:H,PR_ATTRIB_VALUE:W,PR_COMMENT:O,PR_DECLARATION:j,PR_KEYWORD:k,PR_LITERAL:y,PR_NOCODE:U,PR_PLAIN:C,PR_PUNCTUATION:E,PR_SOURCE:L,PR_STRING:l,PR_TAG:I,PR_TYPE:x,prettyPrintOne:S?d.prettyPrintOne=fe:h=fe,prettyPrint:w=S?d.prettyPrint=q:w=q},Ce=d.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return ee})})()},Sjjz:function(N,J,M){N.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:function(N,J,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("5NDa"),P=M("5rEg"),c=M("miYZ"),h=M("tsqr"),w=M("tJVT"),d=M("q1tI"),o=M.n(d),a=M("4i/N");function n(u){var p=u.isjoin,f=u.setJoin,v=u.JoinTeams,g=Object(d.useState)(""),b=Object(w.a)(g,2),i=b[0],s=b[1];return o.a.createElement(m.a,{centered:!0,title:o.a.createElement("div",{style:{alignItems:"center",display:"flex"}},o.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),o.a.createElement(a.a,{onClick:function(){return f(!1)},style:{cursor:"porint"}})),visible:p,closable:!1,destroyOnClose:!0,onOk:function(){if(!i){h.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}v(i)},onCancel:function(){return f(!1)}},o.a.createElement("div",null,o.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},o.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",o.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(T){return s(T.target.value)}}))))}J.a=n},"VrN/":function(N,J,M){(function(D,m){N.exports=m()})(this,function(){"use strict";var D=navigator.userAgent,m=navigator.platform,S=/gecko\/\d/i.test(D),P=/MSIE \d/.test(D),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(D),h=/Edge\/(\d+)/.exec(D),w=P||c||h,d=w&&(P?document.documentMode||6:+(h||c)[1]),o=!h&&/WebKit\//.test(D),a=o&&/Qt\/\d+\.\d+/.test(D),n=!h&&/Chrome\//.test(D),u=/Opera\//.test(D),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(D),v=/PhantomJS/.test(D),g=!h&&/AppleWebKit/.test(D)&&/Mobile\/\w+/.test(D),b=/Android/.test(D),i=g||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(D),s=g||/Mac/.test(m),t=/\bCrOS\b/.test(D),T=/win/i.test(m),_=u&&D.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(u=!1,o=!0);var l=s&&(a||u&&(_==null||_<12.11)),k=S||w&&d>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var x=function(e,r){var R=e.className,A=O(r).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function y(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function E(e,r){return y(e).appendChild(r)}function C(e,r,R,A){var F=document.createElement(e);if(R&&(F.className=R),A&&(F.style.cssText=A),typeof r=="string")F.appendChild(document.createTextNode(r));else if(r)for(var Y=0;Y<r.length;++Y)F.appendChild(r[Y]);return F}function I(e,r,R,A){var F=C(e,r,R,A);return F.setAttribute("role","presentation"),F}var j;document.createRange?j=function(e,r,R,A){var F=document.createRange();return F.setEnd(A||e,R),F.setStart(e,r),F}:j=function(e,r,R){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(F){return A}return A.collapse(!0),A.moveEnd("character",R),A.moveStart("character",r),A};function L(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function H(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function W(e,r){var R=e.className;O(r).test(R)||(e.className+=(R?" ":"")+r)}function U(e,r){for(var R=e.split(" "),A=0;A<R.length;A++)R[A]&&!O(R[A]).test(r)&&(r+=" "+R[A]);return r}var G=function(e){e.select()};g?G=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(G=function(e){try{e.select()}catch(r){}});function B(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function z(e,r,R){r||(r={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!r.hasOwnProperty(A))&&(r[A]=e[A]);return r}function V(e,r,R,A,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var Y=A||0,ae=F||0;;){var de=e.indexOf(" ",Y);if(de<0||de>=r)return ae+(r-Y);ae+=de-Y,ae+=R-ae%R,Y=de+1}}var ie=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};ie.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ie.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=R)};function ce(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var he=50,Ae={toString:function(){return"CodeMirror.Pass"}},De={scroll:!1},pe={origin:"*mouse"},Te={origin:"+move"};function ye(e,r,R){for(var A=0,F=0;;){var Y=e.indexOf(" ",A);Y==-1&&(Y=e.length);var ae=Y-A;if(Y==e.length||F+ae>=r)return A+Math.min(ae,r-F);if(F+=Y-A,F+=R-F%R,A=Y+1,F>=r)return A}}var ue=[""];function le(e){for(;ue.length<=e;)ue.push(te(ue)+" ");return ue[e]}function te(e){return e[e.length-1]}function fe(e,r){for(var R=[],A=0;A<e.length;A++)R[A]=r(e[A],A);return R}function q(e,r,R){for(var A=0,F=R(r);A<e.length&&R(e[A])<=F;)A++;e.splice(A,0,r)}function ee(){}function Ce(e,r){var R;return Object.create?R=Object.create(e):(ee.prototype=e,R=new ee),r&&z(r,R),R}var re=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&Q(e)?!0:r.test(e):Q(e)}function Z(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var xe=/[\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&&xe.test(e)}function Oe(e,r,R){for(;(R<0?r>0:r<e.length)&&ve(e.charAt(r));)r+=R;return r}function Qe(e,r,R){for(var A=r>R?-1:1;;){if(r==R)return r;var F=(r+R)/2,Y=A<0?Math.ceil(F):Math.floor(F);if(Y==r)return e(Y)?r:R;e(Y)?R=Y:r=Y+A}}function rt(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,Y=0;Y<e.length;++Y){var ae=e[Y];(ae.from<R&&ae.to>r||r==R&&ae.to==r)&&(A(Math.max(ae.from,r),Math.min(ae.to,R),ae.level==1?"rtl":"ltr",Y),F=!0)}F||A(r,R,"ltr")}var nt=null;function ct(e,r,R){var A;nt=null;for(var F=0;F<e.length;++F){var Y=e[F];if(Y.from<r&&Y.to>r)return F;Y.to==r&&(Y.from!=Y.to&&R=="before"?A=F:nt=F),Y.from==r&&(Y.from!=Y.to&&R!="before"?A=F:nt=F)}return A!=null?A:nt}var dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(_e){return _e<=247?e.charAt(_e):1424<=_e&&_e<=1524?"R":1536<=_e&&_e<=1785?r.charAt(_e-1536):1774<=_e&&_e<=2220?"r":8192<=_e&&_e<=8203?"w":_e==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,Y=/[LRr]/,ae=/[Lb1n]/,de=/[1n]/;function me(_e,Be,Xe){this.level=_e,this.from=Be,this.to=Xe}return function(_e,Be){var Xe=Be=="ltr"?"L":"R";if(_e.length==0||Be=="ltr"&&!A.test(_e))return!1;for(var ut=_e.length,it=[],Tt=0;Tt<ut;++Tt)it.push(R(_e.charCodeAt(Tt)));for(var jt=0,Jt=Xe;jt<ut;++jt){var dr=it[jt];dr=="m"?it[jt]=Jt:Jt=dr}for(var br=0,hr=Xe;br<ut;++br){var Rr=it[br];Rr=="1"&&hr=="r"?it[br]="n":Y.test(Rr)&&(hr=Rr,Rr=="r"&&(it[br]="R"))}for(var Yr=1,zr=it[0];Yr<ut-1;++Yr){var yn=it[Yr];yn=="+"&&zr=="1"&&it[Yr+1]=="1"?it[Yr]="1":yn==","&&zr==it[Yr+1]&&(zr=="1"||zr=="n")&&(it[Yr]=zr),zr=yn}for(var Kn=0;Kn<ut;++Kn){var Oi=it[Kn];if(Oi==",")it[Kn]="N";else if(Oi=="%"){var ei=void 0;for(ei=Kn+1;ei<ut&&it[ei]=="%";++ei);for(var ea=Kn&&it[Kn-1]=="!"||ei<ut&&it[ei]=="1"?"1":"N",Ji=Kn;Ji<ei;++Ji)it[Ji]=ea;Kn=ei-1}}for(var hi=0,Qi=Xe;hi<ut;++hi){var Li=it[hi];Qi=="L"&&Li=="1"?it[hi]="L":Y.test(Li)&&(Qi=Li)}for(var wi=0;wi<ut;++wi)if(F.test(it[wi])){var fi=void 0;for(fi=wi+1;fi<ut&&F.test(it[fi]);++fi);for(var ai=(wi?it[wi-1]:Xe)=="L",Zi=(fi<ut?it[fi]:Xe)=="L",lo=ai==Zi?ai?"L":"R":Xe,Ua=wi;Ua<fi;++Ua)it[Ua]=lo;wi=fi-1}for(var Ni=[],_a,Ai=0;Ai<ut;)if(ae.test(it[Ai])){var ps=Ai;for(++Ai;Ai<ut&&ae.test(it[Ai]);++Ai);Ni.push(new me(0,ps,Ai))}else{var Pa=Ai,Ga=Ni.length,Va=Be=="rtl"?1:0;for(++Ai;Ai<ut&&it[Ai]!="L";++Ai);for(var Gi=Pa;Gi<Ai;)if(de.test(it[Gi])){Pa<Gi&&(Ni.splice(Ga,0,new me(1,Pa,Gi)),Ga+=Va);var uo=Gi;for(++Gi;Gi<Ai&&de.test(it[Gi]);++Gi);Ni.splice(Ga,0,new me(2,uo,Gi)),Ga+=Va,Pa=Gi}else++Gi;Pa<Ai&&Ni.splice(Ga,0,new me(1,Pa,Ai))}return Be=="ltr"&&(Ni[0].level==1&&(_a=_e.match(/^\s+/))&&(Ni[0].from=_a[0].length,Ni.unshift(new me(0,0,_a[0].length))),te(Ni).level==1&&(_a=_e.match(/\s+$/))&&(te(Ni).to-=_a[0].length,Ni.push(new me(0,ut-_a[0].length,ut)))),Be=="rtl"?Ni.reverse():Ni}}();function pt(e,r){var R=e.order;return R==null&&(R=e.order=dt(e.text,r)),R}var He=[],Pe=function(e,r,R){if(e.addEventListener)e.addEventListener(r,R,!1);else if(e.attachEvent)e.attachEvent("on"+r,R);else{var A=e._handlers||(e._handlers={});A[r]=(A[r]||He).concat(R)}};function at(e,r){return e._handlers&&e._handlers[r]||He}function ft(e,r,R){if(e.removeEventListener)e.removeEventListener(r,R,!1);else if(e.detachEvent)e.detachEvent("on"+r,R);else{var A=e._handlers,F=A&&A[r];if(F){var Y=ce(F,R);Y>-1&&(A[r]=F.slice(0,Y).concat(F.slice(Y+1)))}}}function Je(e,r){var R=at(e,r);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),F=0;F<R.length;++F)R[F].apply(null,A)}function st(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Je(e,R||r.type,e,r),Re(r)||r.codemirrorIgnore}function Ue(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<r.length;++A)ce(R,r[A])==-1&&R.push(r[A])}function Me(e,r){return at(e,r).length>0}function Ne(e){e.prototype.on=function(r,R){Pe(this,r,R)},e.prototype.off=function(r,R){ft(this,r,R)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Re(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Le(e){Ee(e),Se(e)}function Ye(e){return e.target||e.srcElement}function tt(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),s&&e.ctrlKey&&r==1&&(r=3),r}var Ct=function(){if(w&&d<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}(),At;function rr(e){if(At==null){var r=C("span","\u200B");E(e,C("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(At=r.offsetWidth<=1&&r.offsetHeight>2&&!(w&&d<8))}var R=At?C("span","\u200B"):C("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var gt;function or(e){if(gt!=null)return gt;var r=E(e,document.createTextNode("A\u062EA")),R=j(r,0,1).getBoundingClientRect(),A=j(r,1,2).getBoundingClientRect();return y(e),!R||R.left==R.right?!1:gt=A.right-R.right<3}var Zt=`
b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],A=e.length;r<=A;){var F=e.indexOf(`
`,r);F==-1&&(F=e.length);var Y=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),ae=Y.indexOf("\r");ae!=-1?(R.push(Y.slice(0,ae)),r+=ae+1):(R.push(Y),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},Et=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},jr=function(){var e=C("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Kr=null;function Fr(e){if(Kr!=null)return Kr;var r=E(e,C("span","x")),R=r.getBoundingClientRect(),A=j(r,0,1).getBoundingClientRect();return Kr=Math.abs(R.left-A.left)>1}var rn={},Er={};function un(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),rn[e]=r}function Jr(e,r){Er[e]=r}function Wt(e){if(typeof e=="string"&&Er.hasOwnProperty(e))e=Er[e];else if(e&&typeof e.name=="string"&&Er.hasOwnProperty(e.name)){var r=Er[e.name];typeof r=="string"&&(r={name:r}),e=Ce(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Wt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Wt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function _n(e,r){r=Wt(r);var R=rn[r.name];if(!R)return _n(e,"text/plain");var A=R(e,r);if(Cn.hasOwnProperty(r.name)){var F=Cn[r.name];for(var Y in F){if(!F.hasOwnProperty(Y))continue;A.hasOwnProperty(Y)&&(A["_"+Y]=A[Y]),A[Y]=F[Y]}}if(A.name=r.name,r.helperType&&(A.helperType=r.helperType),r.modeProps)for(var ae in r.modeProps)A[ae]=r.modeProps[ae];return A}var Cn={};function Sn(e,r){var R=Cn.hasOwnProperty(e)?Cn[e]:Cn[e]={};z(r,R)}function gn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var A in r){var F=r[A];F instanceof Array&&(F=F.concat([])),R[A]=F}return R}function Ci(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function ui(e,r,R){return e.startState?e.startState(r,R):!0}var mn=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};mn.prototype.eol=function(){return this.pos>=this.string.length},mn.prototype.sol=function(){return this.pos==this.lineStart},mn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},mn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},mn.prototype.eat=function(e){var r=this.string.charAt(this.pos),R;if(typeof e=="string"?R=r==e:R=r&&(e.test?e.test(r):e(r)),R)return++this.pos,r},mn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},mn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},mn.prototype.skipToEnd=function(){this.pos=this.string.length},mn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},mn.prototype.backUp=function(e){this.pos-=e},mn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},mn.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},mn.prototype.match=function(e,r,R){if(typeof e=="string"){var A=function(ae){return R?ae.toLowerCase():ae},F=this.string.substr(this.pos,e.length);if(A(F)==A(e))return r!==!1&&(this.pos+=e.length),!0}else{var Y=this.string.slice(this.pos).match(e);return Y&&Y.index>0?null:(Y&&r!==!1&&(this.pos+=Y[0].length),Y)}},mn.prototype.current=function(){return this.string.slice(this.start,this.pos)},mn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},mn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},mn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function mr(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var A=0;;++A){var F=R.children[A],Y=F.chunkSize();if(r<Y){R=F;break}r-=Y}return R.lines[r]}function Vn(e,r,R){var A=[],F=r.line;return e.iter(r.line,R.line+1,function(Y){var ae=Y.text;F==R.line&&(ae=ae.slice(0,R.ch)),F==r.line&&(ae=ae.slice(r.ch)),A.push(ae),++F}),A}function pi(e,r,R){var A=[];return e.iter(r,R,function(F){A.push(F.text)}),A}function Xn(e,r){var R=r-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function nn(e){if(e.parent==null)return null;for(var r=e.parent,R=ce(r.lines,e),A=r.parent;A;r=A,A=A.parent)for(var F=0;!(A.children[F]==r);++F)R+=A.children[F].chunkSize();return R+r.first}function Bn(e,r){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var F=e.children[A],Y=F.height;if(r<Y){e=F;continue e}r-=Y,R+=F.chunkSize()}return R}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var de=e.lines[ae],me=de.height;if(r<me)break;r-=me}return R+ae}function Si(e,r){return r>=e.first&&r<e.first+e.size}function mi(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function It(e,r,R){if(R===void 0&&(R=null),!(this instanceof It))return new It(e,r,R);this.line=e,this.ch=r,this.sticky=R}function xr(e,r){return e.line-r.line||e.ch-r.ch}function ti(e,r){return e.sticky==r.sticky&&xr(e,r)==0}function vi(e){return It(e.line,e.ch)}function Ri(e,r){return xr(e,r)<0?r:e}function Di(e,r){return xr(e,r)<0?e:r}function se(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function K(e,r){if(r.line<e.first)return It(e.first,0);var R=e.first+e.size-1;return r.line>R?It(R,mr(e,R).text.length):$(r,mr(e,r.line).text.length)}function $(e,r){var R=e.ch;return R==null||R>r?It(e.line,r):R<0?It(e.line,0):e}function ne(e,r){for(var R=[],A=0;A<r.length;A++)R[A]=K(e,r[A]);return R}var ge=function(e,r){this.state=e,this.lookAhead=r},oe=function(e,r,R,A){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};oe.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},oe.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},oe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oe.fromSaved=function(e,r,R){return r instanceof ge?new oe(e,gn(e.mode,r.state),R,r.lookAhead):new oe(e,gn(e.mode,r),R)},oe.prototype.save=function(e){var r=e!==!1?gn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ge(r,this.maxLookAhead):r};function Ke(e,r,R,A){var F=[e.state.modeGen],Y={};gi(e,r.text,e.doc.mode,R,function(_e,Be){return F.push(_e,Be)},Y,A);for(var ae=R.state,de=function(_e){R.baseTokens=F;var Be=e.state.overlays[_e],Xe=1,ut=0;R.state=!0,gi(e,r.text,Be.mode,R,function(it,Tt){for(var jt=Xe;ut<it;){var Jt=F[Xe];Jt>it&&F.splice(Xe,1,it,F[Xe+1],Jt),Xe+=2,ut=Math.min(it,Jt)}if(!Tt)return;if(Be.opaque)F.splice(jt,Xe-jt,it,"overlay "+Tt),Xe=jt+2;else for(;jt<Xe;jt+=2){var dr=F[jt+1];F[jt+1]=(dr?dr+" ":"")+"overlay "+Tt}},Y),R.state=ae,R.baseTokens=null,R.baseTokenPos=1},me=0;me<e.state.overlays.length;++me)de(me);return{styles:F,classes:Y.bgClass||Y.textClass?Y:null}}function Ot(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var A=lt(e,nn(r)),F=r.text.length>e.options.maxHighlightLength&&gn(e.doc.mode,A.state),Y=Ke(e,r,A);F&&(A.state=F),r.stateAfter=A.save(!F),r.styles=Y.styles,Y.classes?r.styleClasses=Y.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function lt(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new oe(A,!0,r);var Y=Dn(e,r,R),ae=Y>A.first&&mr(A,Y-1).stateAfter,de=ae?oe.fromSaved(A,ae,Y):new oe(A,ui(A.mode),Y);return A.iter(Y,r,function(me){_r(e,me.text,de);var _e=de.line;me.stateAfter=_e==r-1||_e%5==0||_e>=F.viewFrom&&_e<F.viewTo?de.save():null,de.nextLine()}),R&&(A.modeFrontier=de.line),de}function _r(e,r,R,A){var F=e.doc.mode,Y=new mn(r,e.options.tabSize,R);for(Y.start=Y.pos=A||0,r==""&&Pt(F,R.state);!Y.eol();)Ur(F,Y,R.state),Y.start=Y.pos}function Pt(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=Ci(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function Ur(e,r,R,A){for(var F=0;F<10;F++){A&&(A[0]=Ci(e,R).mode);var Y=e.token(r,R);if(r.pos>r.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var Wr=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function cn(e,r,R,A){var F=e.doc,Y=F.mode,ae;r=K(F,r);var de=mr(F,r.line),me=lt(e,r.line,R),_e=new mn(de.text,e.options.tabSize,me),Be;for(A&&(Be=[]);(A||_e.pos<r.ch)&&!_e.eol();)_e.start=_e.pos,ae=Ur(Y,_e,me.state),A&&Be.push(new Wr(_e,ae,gn(F.mode,me.state)));return A?Be:new Wr(_e,ae,me.state)}function ri(e,r){if(e)for(;;){var R=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!R)break;e=e.slice(0,R.index)+e.slice(R.index+R[0].length);var A=R[1]?"bgClass":"textClass";r[A]==null?r[A]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(r[A])||(r[A]+=" "+R[2])}return e}function gi(e,r,R,A,F,Y,ae){var de=R.flattenSpans;de==null&&(de=e.options.flattenSpans);var me=0,_e=null,Be=new mn(r,e.options.tabSize,A),Xe,ut=e.options.addModeClass&&[null];for(r==""&&ri(Pt(R,A.state),Y);!Be.eol();){if(Be.pos>e.options.maxHighlightLength?(de=!1,ae&&_r(e,r,A,Be.pos),Be.pos=r.length,Xe=null):Xe=ri(Ur(R,Be,A.state,ut),Y),ut){var it=ut[0].name;it&&(Xe="m-"+(Xe?it+" "+Xe:it))}if(!de||_e!=Xe){for(;me<Be.start;)me=Math.min(Be.start,me+5e3),F(me,_e);_e=Xe}Be.start=Be.pos}for(;me<Be.pos;){var Tt=Math.min(Be.pos,me+5e3);F(Tt,_e),me=Tt}}function Dn(e,r,R){for(var A,F,Y=e.doc,ae=R?-1:r-(e.doc.mode.innerMode?1e3:100),de=r;de>ae;--de){if(de<=Y.first)return Y.first;var me=mr(Y,de-1),_e=me.stateAfter;if(_e&&(!R||de+(_e instanceof ge?_e.lookAhead:0)<=Y.modeFrontier))return de;var Be=V(me.text,null,e.options.tabSize);(F==null||A>Be)&&(F=de-1,A=Be)}return F}function Mi(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var R=e.first,A=r-1;A>R;A--){var F=mr(e,A).stateAfter;if(F&&(!(F instanceof ge)||A+F.lookAhead<r)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var qi=!1,Qn=!1;function ci(){qi=!0}function ji(){Qn=!0}function Fi(e,r,R){this.marker=e,this.from=r,this.to=R}function yi(e,r){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==r)return A}}function Ui(e,r){for(var R,A=0;A<e.length;++A)e[A]!=r&&(R||(R=[])).push(e[A]);return R}function bi(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function oa(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var Y=e[F],ae=Y.marker,de=Y.from==null||(ae.inclusiveLeft?Y.from<=r:Y.from<r);if(de||Y.from==r&&ae.type=="bookmark"&&(!R||!Y.marker.insertLeft)){var me=Y.to==null||(ae.inclusiveRight?Y.to>=r:Y.to>r);(A||(A=[])).push(new Fi(ae,Y.from,me?null:Y.to))}}return A}function sa(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var Y=e[F],ae=Y.marker,de=Y.to==null||(ae.inclusiveRight?Y.to>=r:Y.to>r);if(de||Y.from==r&&ae.type=="bookmark"&&(!R||Y.marker.insertLeft)){var me=Y.from==null||(ae.inclusiveLeft?Y.from<=r:Y.from<r);(A||(A=[])).push(new Fi(ae,me?null:Y.from-r,Y.to==null?null:Y.to-r))}}return A}function Ei(e,r){if(r.full)return null;var R=Si(e,r.from.line)&&mr(e,r.from.line).markedSpans,A=Si(e,r.to.line)&&mr(e,r.to.line).markedSpans;if(!R&&!A)return null;var F=r.from.ch,Y=r.to.ch,ae=xr(r.from,r.to)==0,de=oa(R,F,ae),me=sa(A,Y,ae),_e=r.text.length==1,Be=te(r.text).length+(_e?F:0);if(de)for(var Xe=0;Xe<de.length;++Xe){var ut=de[Xe];if(ut.to==null){var it=yi(me,ut.marker);it?_e&&(ut.to=it.to==null?null:it.to+Be):ut.to=F}}if(me)for(var Tt=0;Tt<me.length;++Tt){var jt=me[Tt];if(jt.to!=null&&(jt.to+=Be),jt.from==null){var Jt=yi(de,jt.marker);Jt||(jt.from=Be,_e&&(de||(de=[])).push(jt))}else jt.from+=Be,_e&&(de||(de=[])).push(jt)}de&&(de=Gn(de)),me&&me!=de&&(me=Gn(me));var dr=[de];if(!_e){var br=r.text.length-2,hr;if(br>0&&de)for(var Rr=0;Rr<de.length;++Rr)de[Rr].to==null&&(hr||(hr=[])).push(new Fi(de[Rr].marker,null,null));for(var Yr=0;Yr<br;++Yr)dr.push(hr);dr.push(me)}return dr}function Gn(e){for(var r=0;r<e.length;++r){var R=e[r];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Vi(e,r,R){var A=null;if(e.iter(r.line,R.line+1,function(it){if(it.markedSpans)for(var Tt=0;Tt<it.markedSpans.length;++Tt){var jt=it.markedSpans[Tt].marker;jt.readOnly&&(!A||ce(A,jt)==-1)&&(A||(A=[])).push(jt)}}),!A)return null;for(var F=[{from:r,to:R}],Y=0;Y<A.length;++Y)for(var ae=A[Y],de=ae.find(0),me=0;me<F.length;++me){var _e=F[me];if(xr(_e.to,de.from)<0||xr(_e.from,de.to)>0)continue;var Be=[me,1],Xe=xr(_e.from,de.from),ut=xr(_e.to,de.to);(Xe<0||!ae.inclusiveLeft&&!Xe)&&Be.push({from:_e.from,to:de.from}),(ut>0||!ae.inclusiveRight&&!ut)&&Be.push({from:de.to,to:_e.to}),F.splice.apply(F,Be),me+=Be.length-3}return F}function ta(e){var r=e.markedSpans;if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.detachLine(e);e.markedSpans=null}function _t(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function et(e){return e.inclusiveLeft?-1:0}function vt(e){return e.inclusiveRight?1:0}function xt(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var A=e.find(),F=r.find(),Y=xr(A.from,F.from)||et(e)-et(r);if(Y)return-Y;var ae=xr(A.to,F.to)||vt(e)-vt(r);return ae||r.id-e.id}function Mt(e,r){var R=Qn&&e.markedSpans,A;if(R)for(var F=void 0,Y=0;Y<R.length;++Y)F=R[Y],F.marker.collapsed&&(r?F.from:F.to)==null&&(!A||xt(A,F.marker)<0)&&(A=F.marker);return A}function Lt(e){return Mt(e,!0)}function Ht(e){return Mt(e,!1)}function Bt(e,r){var R=Qn&&e.markedSpans,A;if(R)for(var F=0;F<R.length;++F){var Y=R[F];Y.marker.collapsed&&(Y.from==null||Y.from<r)&&(Y.to==null||Y.to>r)&&(!A||xt(A,Y.marker)<0)&&(A=Y.marker)}return A}function ht(e,r,R,A,F){var Y=mr(e,r),ae=Qn&&Y.markedSpans;if(ae)for(var de=0;de<ae.length;++de){var me=ae[de];if(!me.marker.collapsed)continue;var _e=me.marker.find(0),Be=xr(_e.from,R)||et(me.marker)-et(F),Xe=xr(_e.to,A)||vt(me.marker)-vt(F);if(Be>=0&&Xe<=0||Be<=0&&Xe>=0)continue;if(Be<=0&&(me.marker.inclusiveRight&&F.inclusiveLeft?xr(_e.to,R)>=0:xr(_e.to,R)>0)||Be>=0&&(me.marker.inclusiveRight&&F.inclusiveLeft?xr(_e.from,A)<=0:xr(_e.from,A)<0))return!0}}function wt(e){for(var r;r=Lt(e);)e=r.find(-1,!0).line;return e}function St(e){for(var r;r=Ht(e);)e=r.find(1,!0).line;return e}function vr(e){for(var r,R;r=Ht(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function nr(e,r){var R=mr(e,r),A=wt(R);return R==A?r:nn(A)}function tr(e,r){if(r>e.lastLine())return r;var R=mr(e,r),A;if(!$t(e,R))return r;for(;A=Ht(R);)R=A.find(1,!0).line;return nn(R)+1}function $t(e,r){var R=Qn&&r.markedSpans;if(R)for(var A=void 0,F=0;F<R.length;++F){if(A=R[F],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&ir(e,r,A))return!0}}function ir(e,r,R){if(R.to==null){var A=R.marker.find(1,!0);return ir(e,A.line,yi(A.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var F=void 0,Y=0;Y<r.markedSpans.length;++Y)if(F=r.markedSpans[Y],F.marker.collapsed&&!F.marker.widgetNode&&F.from==R.to&&(F.to==null||F.to!=R.from)&&(F.marker.inclusiveLeft||R.marker.inclusiveRight)&&ir(e,r,F))return!0}function sr(e){e=wt(e);for(var r=0,R=e.parent,A=0;A<R.lines.length;++A){var F=R.lines[A];if(F==e)break;r+=F.height}for(var Y=R.parent;Y;R=Y,Y=R.parent)for(var ae=0;ae<Y.children.length;++ae){var de=Y.children[ae];if(de==R)break;r+=de.height}return r}function ot(e){if(e.height==0)return 0;for(var r=e.text.length,R,A=e;R=Lt(A);){var F=R.find(0,!0);A=F.from.line,r+=F.from.ch-F.to.ch}for(A=e;R=Ht(A);){var Y=R.find(0,!0);r-=A.text.length-Y.from.ch,A=Y.to.line,r+=A.text.length-Y.to.ch}return r}function Sr(e){var r=e.display,R=e.doc;r.maxLine=mr(R,R.first),r.maxLineLength=ot(r.maxLine),r.maxLineChanged=!0,R.iter(function(A){var F=ot(A);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=A)})}var Lr=function(e,r,R){this.text=e,_t(this,r),this.height=R?R(this):1};Lr.prototype.lineNo=function(){return nn(this)},Ne(Lr);function yr(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ta(e),_t(e,R);var F=A?A(e):1;F!=e.height&&Xn(e,F)}function ar(e){e.parent=null,ta(e)}var pr={},er={};function lr(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?er:pr;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Br(e,r){var R=I("span",null,null,o?"padding-right: .1px":null),A={pre:I("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var Y=F?r.rest[F-1]:r.line,ae=void 0;A.pos=0,A.addToken=Xt,or(e.display.measure)&&(ae=pt(Y,e.doc.direction))&&(A.addToken=ur(A.addToken,ae)),A.map=[];var de=r!=e.display.externalMeasured&&nn(Y);qe(Y,A,Ot(e,Y,de)),Y.styleClasses&&(Y.styleClasses.bgClass&&(A.bgClass=U(Y.styleClasses.bgClass,A.bgClass||"")),Y.styleClasses.textClass&&(A.textClass=U(Y.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(rr(e.display.measure))),F==0?(r.measure.map=A.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(A.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(o){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 Je(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=U(A.pre.className,A.textClass||"")),A}function Ft(e){var r=C("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Xt(e,r,R,A,F,Y,ae){if(!r)return;var de=e.splitSpaces?zt(r,e.trailingSpace):r,me=e.cm.state.specialChars,_e=!1,Be;if(!me.test(r))e.col+=r.length,Be=document.createTextNode(de),e.map.push(e.pos,e.pos+r.length,Be),w&&d<9&&(_e=!0),e.pos+=r.length;else{Be=document.createDocumentFragment();for(var Xe=0;;){me.lastIndex=Xe;var ut=me.exec(r),it=ut?ut.index-Xe:r.length-Xe;if(it){var Tt=document.createTextNode(de.slice(Xe,Xe+it));w&&d<9?Be.appendChild(C("span",[Tt])):Be.appendChild(Tt),e.map.push(e.pos,e.pos+it,Tt),e.col+=it,e.pos+=it}if(!ut)break;Xe+=it+1;var jt=void 0;if(ut[0]==" "){var Jt=e.cm.options.tabSize,dr=Jt-e.col%Jt;jt=Be.appendChild(C("span",le(dr),"cm-tab")),jt.setAttribute("role","presentation"),jt.setAttribute("cm-text"," "),e.col+=dr}else ut[0]=="\r"||ut[0]==`
`?(jt=Be.appendChild(C("span",ut[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),jt.setAttribute("cm-text",ut[0]),e.col+=1):(jt=e.cm.options.specialCharPlaceholder(ut[0]),jt.setAttribute("cm-text",ut[0]),w&&d<9?Be.appendChild(C("span",[jt])):Be.appendChild(jt),e.col+=1);e.map.push(e.pos,e.pos+1,jt),e.pos++}}if(e.trailingSpace=de.charCodeAt(r.length-1)==32,R||A||F||_e||Y||ae){var br=R||"";A&&(br+=A),F&&(br+=F);var hr=C("span",[Be],br,Y);if(ae)for(var Rr in ae)ae.hasOwnProperty(Rr)&&Rr!="style"&&Rr!="class"&&hr.setAttribute(Rr,ae[Rr]);return e.content.appendChild(hr)}e.content.appendChild(Be)}function zt(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,A="",F=0;F<e.length;F++){var Y=e.charAt(F);Y==" "&&R&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(Y="\xA0"),A+=Y,R=Y==" "}return A}function ur(e,r){return function(R,A,F,Y,ae,de,me){F=F?F+" cm-force-border":"cm-force-border";for(var _e=R.pos,Be=_e+A.length;;){for(var Xe=void 0,ut=0;ut<r.length&&!(Xe=r[ut],Xe.to>_e&&Xe.from<=_e);ut++);if(Xe.to>=Be)return e(R,A,F,Y,ae,de,me);e(R,A.slice(0,Xe.to-_e),F,Y,null,de,me),Y=null,A=A.slice(Xe.to-_e),_e=Xe.to}}}function Ar(e,r,R,A){var F=!A&&R.widgetNode;F&&e.map.push(e.pos,e.pos+r,F),!A&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",R.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=r,e.trailingSpace=!1}function qe(e,r,R){var A=e.markedSpans,F=e.text,Y=0;if(!A){for(var ae=1;ae<R.length;ae+=2)r.addToken(r,F.slice(Y,Y=R[ae]),lr(R[ae+1],r.cm.options));return}for(var de=F.length,me=0,_e=1,Be="",Xe,ut,it=0,Tt,jt,Jt,dr,br;;){if(it==me){Tt=jt=Jt=ut="",br=null,dr=null,it=Infinity;for(var hr=[],Rr=void 0,Yr=0;Yr<A.length;++Yr){var zr=A[Yr],yn=zr.marker;if(yn.type=="bookmark"&&zr.from==me&&yn.widgetNode)hr.push(yn);else if(zr.from<=me&&(zr.to==null||zr.to>me||yn.collapsed&&zr.to==me&&zr.from==me)){if(zr.to!=null&&zr.to!=me&&it>zr.to&&(it=zr.to,jt=""),yn.className&&(Tt+=" "+yn.className),yn.css&&(ut=(ut?ut+";":"")+yn.css),yn.startStyle&&zr.from==me&&(Jt+=" "+yn.startStyle),yn.endStyle&&zr.to==it&&(Rr||(Rr=[])).push(yn.endStyle,zr.to),yn.title&&((br||(br={})).title=yn.title),yn.attributes)for(var Kn in yn.attributes)(br||(br={}))[Kn]=yn.attributes[Kn];yn.collapsed&&(!dr||xt(dr.marker,yn)<0)&&(dr=zr)}else zr.from>me&&it>zr.from&&(it=zr.from)}if(Rr)for(var Oi=0;Oi<Rr.length;Oi+=2)Rr[Oi+1]==it&&(jt+=" "+Rr[Oi]);if(!dr||dr.from==me)for(var ei=0;ei<hr.length;++ei)Ar(r,0,hr[ei]);if(dr&&(dr.from||0)==me){if(Ar(r,(dr.to==null?de+1:dr.to)-me,dr.marker,dr.from==null),dr.to==null)return;dr.to==me&&(dr=!1)}}if(me>=de)break;for(var ea=Math.min(de,it);;){if(Be){var Ji=me+Be.length;if(!dr){var hi=Ji>ea?Be.slice(0,ea-me):Be;r.addToken(r,hi,Xe?Xe+Tt:Tt,Jt,me+hi.length==it?jt:"",ut,br)}if(Ji>=ea){Be=Be.slice(ea-me),me=ea;break}me=Ji,Jt=""}Be=F.slice(Y,Y=R[_e++]),Xe=lr(R[_e++],r.cm.options)}}}function Ut(e,r,R){this.line=r,this.rest=vr(r),this.size=this.rest?nn(te(this.rest))-R+1:1,this.node=this.text=null,this.hidden=$t(e,r)}function Gr(e,r,R){for(var A=[],F,Y=r;Y<R;Y=F){var ae=new Ut(e.doc,mr(e.doc,Y),Y);F=Y+ae.size,A.push(ae)}return A}var Qr=null;function Vt(e){Qr?Qr.ops.push(e):e.ownsGroup=Qr={ops:[e],delayedCallbacks:[]}}function wr(e){var r=e.delayedCallbacks,R=0;do{for(;R<r.length;R++)r[R].call(null);for(var A=0;A<e.ops.length;A++){var F=e.ops[A];if(F.cursorActivityHandlers)for(;F.cursorActivityCalled<F.cursorActivityHandlers.length;)F.cursorActivityHandlers[F.cursorActivityCalled++].call(null,F.cm)}}while(R<r.length)}function Qt(e,r){var R=e.ownsGroup;if(!R)return;try{wr(R)}finally{Qr=null,r(R)}}var Rt=null;function Kt(e,r){var R=at(e,r);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;Qr?F=Qr.delayedCallbacks:Rt?F=Rt:(F=Rt=[],setTimeout(cr,0));for(var Y=function(de){F.push(function(){return R[de].apply(null,A)})},ae=0;ae<R.length;++ae)Y(ae)}function cr(){var e=Rt;Rt=null;for(var r=0;r<e.length;++r)e[r]()}function qt(e,r,R,A){for(var F=0;F<r.changes.length;F++){var Y=r.changes[F];Y=="text"?kt(e,r):Y=="gutter"?an(e,r,R,A):Y=="class"?Pr(e,r):Y=="widget"&&sn(e,r,A)}r.changes=null}function yt(e){return e.node==e.text&&(e.node=C("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&d<8&&(e.node.style.zIndex=2)),e.node}function bt(e,r){var R=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),r.background)R?r.background.className=R:(r.background.parentNode.removeChild(r.background),r.background=null);else if(R){var A=yt(r);r.background=A.insertBefore(C("div",null,R),A.firstChild),e.display.input.setUneditable(r.background)}}function Gt(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):Br(e,r)}function kt(e,r){var R=r.text.className,A=Gt(e,r);r.text==r.node&&(r.node=A.pre),r.text.parentNode.replaceChild(A.pre,r.text),r.text=A.pre,A.bgClass!=r.bgClass||A.textClass!=r.textClass?(r.bgClass=A.bgClass,r.textClass=A.textClass,Pr(e,r)):R&&(r.text.className=R)}function Pr(e,r){bt(e,r),r.line.wrapClass?yt(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var R=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=R||""}function an(e,r,R,A){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var F=yt(r);r.gutterBackground=C("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),F.insertBefore(r.gutterBackground,r.text)}var Y=r.line.gutterMarkers;if(e.options.lineNumbers||Y){var ae=yt(r),de=r.gutter=C("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),ae.insertBefore(de,r.text),r.line.gutterClass&&(de.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!Y||!Y["CodeMirror-linenumbers"])&&(r.lineNumber=de.appendChild(C("div",mi(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Y)for(var me=0;me<e.display.gutterSpecs.length;++me){var _e=e.display.gutterSpecs[me].className,Be=Y.hasOwnProperty(_e)&&Y[_e];Be&&de.appendChild(C("div",[Be],"CodeMirror-gutter-elt","left: "+A.gutterLeft[_e]+"px; width: "+A.gutterWidth[_e]+"px"))}}}function sn(e,r,R){r.alignable&&(r.alignable=null);for(var A=O("CodeMirror-linewidget"),F=r.node.firstChild,Y=void 0;F;F=Y)Y=F.nextSibling,A.test(F.className)&&r.node.removeChild(F);qr(e,r,R)}function Dr(e,r,R,A){var F=Gt(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),Pr(e,r),an(e,r,R,A),qr(e,r,A),r.node}function qr(e,r,R){if(Ir(e,r.line,r,R,!0),r.rest)for(var A=0;A<r.rest.length;A++)Ir(e,r.rest[A],r,R,!1)}function Ir(e,r,R,A,F){if(!r.widgets)return;for(var Y=yt(R),ae=0,de=r.widgets;ae<de.length;++ae){var me=de[ae],_e=C("div",[me.node],"CodeMirror-linewidget"+(me.className?" "+me.className:""));me.handleMouseEvents||_e.setAttribute("cm-ignore-events","true"),hn(me,_e,R,A),e.display.input.setUneditable(_e),F&&me.above?Y.insertBefore(_e,R.gutter||R.text):Y.appendChild(_e),Kt(me,"redraw")}}function hn(e,r,R,A){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(r);var F=A.wrapperWidth;r.style.left=A.fixedPos+"px",e.coverGutter||(F-=A.gutterTotalWidth,r.style.paddingLeft=A.gutterTotalWidth+"px"),r.style.width=F+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-A.gutterTotalWidth+"px"))}function Vr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!L(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+r.display.wrapper.clientWidth+"px;"),E(r.display.measure,C("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function fn(e,r){for(var R=Ye(r);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function $n(e){return e.lineSpace.offsetTop}function Ie(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=E(e.measure,C("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,A={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function $e(e){return he-e.display.nativeBarWidth}function Fe(e){return e.display.scroller.clientWidth-$e(e)-e.display.barWidth}function be(e){return e.display.scroller.clientHeight-$e(e)-e.display.barHeight}function ke(e,r,R){var A=e.options.lineWrapping,F=A&&Fe(e);if(!r.measure.heights||A&&r.measure.width!=F){var Y=r.measure.heights=[];if(A){r.measure.width=F;for(var ae=r.text.firstChild.getClientRects(),de=0;de<ae.length-1;de++){var me=ae[de],_e=ae[de+1];Math.abs(me.bottom-_e.bottom)>2&&Y.push((me.bottom+_e.top)/2-R.top)}}Y.push(R.bottom-R.top)}}function we(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==r)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var F=0;F<e.rest.length;F++)if(nn(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function je(e,r){r=wt(r);var R=nn(r),A=e.display.externalMeasured=new Ut(e.doc,r,R);A.lineN=R;var F=A.built=Br(e,A);return A.text=F.pre,E(e.display.lineMeasure,F.pre),A}function ze(e,r,R,A){return Ze(e,We(e,r),R,A)}function Ve(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[In(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function We(e,r){var R=nn(r),A=Ve(e,R);A&&!A.text?A=null:A&&A.changes&&(qt(e,A,R,Hn(e)),e.curOp.forceUpdate=!0),A||(A=je(e,r));var F=we(A,r,R);return{line:r,view:A,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function Ze(e,r,R,A,F){r.before&&(R=-1);var Y=R+(A||""),ae;return r.cache.hasOwnProperty(Y)?ae=r.cache[Y]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(ke(e,r.view,r.rect),r.hasHeights=!0),ae=Yt(e,r,R,A),ae.bogus||(r.cache[Y]=ae)),{left:ae.left,right:ae.right,top:F?ae.rtop:ae.top,bottom:F?ae.rbottom:ae.bottom}}var mt={left:0,right:0,top:0,bottom:0};function Dt(e,r,R){for(var A,F,Y,ae,de,me,_e=0;_e<e.length;_e+=3)if(de=e[_e],me=e[_e+1],r<de?(F=0,Y=1,ae="left"):r<me?(F=r-de,Y=F+1):(_e==e.length-3||r==me&&e[_e+3]>r)&&(Y=me-de,F=Y-1,r>=me&&(ae="right")),F!=null){if(A=e[_e+2],de==me&&R==(A.insertLeft?"left":"right")&&(ae=R),R=="left"&&F==0)for(;_e&&e[_e-2]==e[_e-3]&&e[_e-1].insertLeft;)A=e[(_e-=3)+2],ae="left";if(R=="right"&&F==me-de)for(;_e<e.length-3&&e[_e+3]==e[_e+4]&&!e[_e+5].insertLeft;)A=e[(_e+=3)+2],ae="right";break}return{node:A,start:F,end:Y,collapse:ae,coverStart:de,coverEnd:me}}function Nt(e,r){var R=mt;if(r=="left")for(var A=0;A<e.length&&!((R=e[A]).left!=R.right);A++);else for(var F=e.length-1;F>=0&&!((R=e[F]).left!=R.right);F--);return R}function Yt(e,r,R,A){var F=Dt(r.map,R,A),Y=F.node,ae=F.start,de=F.end,me=F.collapse,_e;if(Y.nodeType==3){for(var Be=0;Be<4;Be++){for(;ae&&ve(r.line.text.charAt(F.coverStart+ae));)--ae;for(;F.coverStart+de<F.coverEnd&&ve(r.line.text.charAt(F.coverStart+de));)++de;if(w&&d<9&&ae==0&&de==F.coverEnd-F.coverStart?_e=Y.parentNode.getBoundingClientRect():_e=Nt(j(Y,ae,de).getClientRects(),A),_e.left||_e.right||ae==0)break;de=ae,ae=ae-1,me="right"}w&&d<11&&(_e=kr(e.display.measure,_e))}else{ae>0&&(me=A="right");var Xe;e.options.lineWrapping&&(Xe=Y.getClientRects()).length>1?_e=Xe[A=="right"?Xe.length-1:0]:_e=Y.getBoundingClientRect()}if(w&&d<9&&!ae&&(!_e||!_e.left&&!_e.right)){var ut=Y.parentNode.getClientRects()[0];ut?_e={left:ut.left,right:ut.left+ni(e.display),top:ut.top,bottom:ut.bottom}:_e=mt}for(var it=_e.top-r.rect.top,Tt=_e.bottom-r.rect.top,jt=(it+Tt)/2,Jt=r.view.measure.heights,dr=0;dr<Jt.length-1&&!(jt<Jt[dr]);dr++);var br=dr?Jt[dr-1]:0,hr=Jt[dr],Rr={left:(me=="right"?_e.right:_e.left)-r.rect.left,right:(me=="left"?_e.left:_e.right)-r.rect.left,top:br,bottom:hr};return!_e.left&&!_e.right&&(Rr.bogus=!0),e.options.singleCursorHeightPerLine||(Rr.rtop=it,Rr.rbottom=Tt),Rr}function kr(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fr(e))return r;var R=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*R,right:r.right*R,top:r.top*A,bottom:r.bottom*A}}function $r(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function Xr(e){e.display.externalMeasure=null,y(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)$r(e.display.view[r])}function Zr(e){Xr(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&&b?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function en(){return n&&b?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function tn(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Vr(e.widgets[R]));return r}function vn(e,r,R,A,F){if(!F){var Y=tn(r);R.top+=Y,R.bottom+=Y}if(A=="line")return R;A||(A="local");var ae=sr(r);if(A=="local"?ae+=$n(e.display):ae-=e.display.viewOffset,A=="page"||A=="window"){var de=e.display.lineSpace.getBoundingClientRect();ae+=de.top+(A=="window"?0:en());var me=de.left+(A=="window"?0:Hr());R.left+=me,R.right+=me}return R.top+=ae,R.bottom+=ae,R}function ln(e,r,R){if(R=="div")return r;var A=r.left,F=r.top;if(R=="page")A-=Hr(),F-=en();else if(R=="local"||!R){var Y=e.display.sizer.getBoundingClientRect();A+=Y.left,F+=Y.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:A-ae.left,top:F-ae.top}}function Pn(e,r,R,A,F){return A||(A=mr(e.doc,r.line)),vn(e,A,ze(e,A,r.ch,F),R)}function dn(e,r,R,A,F,Y){A=A||mr(e.doc,r.line),F||(F=We(e,A));function ae(Tt,jt){var Jt=Ze(e,F,Tt,jt?"right":"left",Y);return jt?Jt.left=Jt.right:Jt.right=Jt.left,vn(e,A,Jt,R)}var de=pt(A,e.doc.direction),me=r.ch,_e=r.sticky;if(me>=A.text.length?(me=A.text.length,_e="before"):me<=0&&(me=0,_e="after"),!de)return ae(_e=="before"?me-1:me,_e=="before");function Be(Tt,jt,Jt){var dr=de[jt],br=dr.level==1;return ae(Jt?Tt-1:Tt,br!=Jt)}var Xe=ct(de,me,_e),ut=nt,it=Be(me,Xe,_e=="before");return ut!=null&&(it.other=Be(me,ut,_e!="before")),it}function Mr(e,r){var R=0;r=K(e.doc,r),e.options.lineWrapping||(R=ni(e.display)*r.ch);var A=mr(e.doc,r.line),F=sr(A)+$n(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Nr(e,r,R,A,F){var Y=It(e,r,R);return Y.xRel=F,A&&(Y.outside=A),Y}function on(e,r,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Nr(A.first,0,null,-1,-1);var F=Bn(A,R),Y=A.first+A.size-1;if(F>Y)return Nr(A.first+A.size-1,mr(A,Y).text.length,null,1,1);r<0&&(r=0);for(var ae=mr(A,F);;){var de=Wn(e,ae,F,r,R),me=Bt(ae,de.ch+(de.xRel>0||de.outside>0?1:0));if(!me)return de;var _e=me.find(1);if(_e.line==F)return _e;ae=mr(A,F=_e.line)}}function pn(e,r,R,A){A-=tn(r);var F=r.text.length,Y=Qe(function(ae){return Ze(e,R,ae-1).bottom<=A},F,0);return F=Qe(function(ae){return Ze(e,R,ae).top>A},Y,F),{begin:Y,end:F}}function Tr(e,r,R,A){R||(R=We(e,r));var F=vn(e,r,Ze(e,R,A),"line").top;return pn(e,r,R,F)}function bn(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function Wn(e,r,R,A,F){F-=sr(r);var Y=We(e,r),ae=tn(r),de=0,me=r.text.length,_e=!0,Be=pt(r,e.doc.direction);if(Be){var Xe=(e.options.lineWrapping?Mn:wn)(e,r,R,Y,Be,A,F);_e=Xe.level!=1,de=_e?Xe.from:Xe.to-1,me=_e?Xe.to:Xe.from-1}var ut=null,it=null,Tt=Qe(function(Yr){var zr=Ze(e,Y,Yr);return zr.top+=ae,zr.bottom+=ae,bn(zr,A,F,!1)?(zr.top<=F&&zr.left<=A&&(ut=Yr,it=zr),!0):!1},de,me),jt,Jt,dr=!1;if(it){var br=A-it.left<it.right-A,hr=br==_e;Tt=ut+(hr?0:1),Jt=hr?"after":"before",jt=br?it.left:it.right}else{!_e&&(Tt==me||Tt==de)&&Tt++,Jt=Tt==0?"after":Tt==r.text.length?"before":Ze(e,Y,Tt-(_e?1:0)).bottom+ae<=F==_e?"after":"before";var Rr=dn(e,It(R,Tt,Jt),"line",r,Y);jt=Rr.left,dr=F<Rr.top?-1:F>=Rr.bottom?1:0}return Tt=Oe(r.text,Tt,1),Nr(R,Tt,Jt,dr,A-jt)}function wn(e,r,R,A,F,Y,ae){var de=Qe(function(Xe){var ut=F[Xe],it=ut.level!=1;return bn(dn(e,It(R,it?ut.to:ut.from,it?"before":"after"),"line",r,A),Y,ae,!0)},0,F.length-1),me=F[de];if(de>0){var _e=me.level!=1,Be=dn(e,It(R,_e?me.from:me.to,_e?"after":"before"),"line",r,A);bn(Be,Y,ae,!0)&&Be.top>ae&&(me=F[de-1])}return me}function Mn(e,r,R,A,F,Y,ae){var de=pn(e,r,A,ae),me=de.begin,_e=de.end;/\s/.test(r.text.charAt(_e-1))&&_e--;for(var Be=null,Xe=null,ut=0;ut<F.length;ut++){var it=F[ut];if(it.from>=_e||it.to<=me)continue;var Tt=it.level!=1,jt=Ze(e,A,Tt?Math.min(_e,it.to)-1:Math.max(me,it.from)).right,Jt=jt<Y?Y-jt+1e9:jt-Y;(!Be||Xe>Jt)&&(Be=it,Xe=Jt)}return Be||(Be=F[F.length-1]),Be.from<me&&(Be={from:me,to:Be.to,level:Be.level}),Be.to>_e&&(Be={from:Be.from,to:_e,level:Be.level}),Be}var Tn;function Yn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Tn==null){Tn=C("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Tn.appendChild(document.createTextNode("x")),Tn.appendChild(C("br"));Tn.appendChild(document.createTextNode("x"))}E(e.measure,Tn);var R=Tn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),y(e.measure),R||1}function ni(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=C("span","xxxxxxxxxx"),R=C("pre",[r],"CodeMirror-line-like");E(e.measure,R);var A=r.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Hn(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,Y=r.gutters.firstChild,ae=0;Y;Y=Y.nextSibling,++ae){var de=e.display.gutterSpecs[ae].className;R[de]=Y.offsetLeft+Y.clientLeft+F,A[de]=Y.clientWidth}return{fixedPos:di(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function di(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var r=Yn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/ni(e.display)-3);return function(F){if($t(e.doc,F))return 0;var Y=0;if(F.widgets)for(var ae=0;ae<F.widgets.length;ae++)F.widgets[ae].height&&(Y+=F.widgets[ae].height);return R?Y+(Math.ceil(F.text.length/A)||1)*r:Y+r}}function Ti(e){var r=e.doc,R=Xi(e);r.iter(function(A){var F=R(A);F!=A.height&&Xn(A,F)})}function ii(e,r,R,A){var F=e.display;if(!R&&Ye(r).getAttribute("cm-not-content")=="true")return null;var Y,ae,de=F.lineSpace.getBoundingClientRect();try{Y=r.clientX-de.left,ae=r.clientY-de.top}catch(Xe){return null}var me=on(e,Y,ae),_e;if(A&&me.xRel>0&&(_e=mr(e.doc,me.line).text).length==me.ch){var Be=V(_e,_e.length,e.options.tabSize)-_e.length;me=It(me.line,Math.max(0,Math.round((Y-Ge(e.display).left)/ni(e.display))-Be))}return me}function In(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,A=0;A<R.length;A++)if(r-=R[A].size,r<0)return A}function Nn(e,r,R,A){r==null&&(r=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),A||(A=0);var F=e.display;if(A&&R<F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>r)&&(F.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=F.viewTo)Qn&&nr(e.doc,r)<F.viewTo&&Un(e);else if(R<=F.viewFrom)Qn&&tr(e.doc,R+A)>F.viewFrom?Un(e):(F.viewFrom+=A,F.viewTo+=A);else if(r<=F.viewFrom&&R>=F.viewTo)Un(e);else if(r<=F.viewFrom){var Y=Zn(e,R,R+A,1);Y?(F.view=F.view.slice(Y.index),F.viewFrom=Y.lineN,F.viewTo+=A):Un(e)}else if(R>=F.viewTo){var ae=Zn(e,r,r,-1);ae?(F.view=F.view.slice(0,ae.index),F.viewTo=ae.lineN):Un(e)}else{var de=Zn(e,r,r,-1),me=Zn(e,R,R+A,1);de&&me?(F.view=F.view.slice(0,de.index).concat(Gr(e,de.lineN,me.lineN)).concat(F.view.slice(me.index)),F.viewTo+=A):Un(e)}var _e=F.externalMeasured;_e&&(R<_e.lineN?_e.lineN+=A:r<_e.lineN+_e.size&&(F.externalMeasured=null))}function zn(e,r,R){e.curOp.viewChanged=!0;var A=e.display,F=e.display.externalMeasured;if(F&&r>=F.lineN&&r<F.lineN+F.size&&(A.externalMeasured=null),r<A.viewFrom||r>=A.viewTo)return;var Y=A.view[In(e,r)];if(Y.node==null)return;var ae=Y.changes||(Y.changes=[]);ce(ae,R)==-1&&ae.push(R)}function Un(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zn(e,r,R,A){var F=In(e,r),Y,ae=e.display.view;if(!Qn||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var de=e.display.viewFrom,me=0;me<F;me++)de+=ae[me].size;if(de!=r){if(A>0){if(F==ae.length-1)return null;Y=de+ae[F].size-r,F++}else Y=de-r;r+=Y,R+=Y}for(;nr(e.doc,R)!=R;){if(F==(A<0?0:ae.length-1))return null;R+=A*ae[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function Pi(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=Gr(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=Gr(e,r,A.viewFrom).concat(A.view):A.viewFrom<r&&(A.view=A.view.slice(In(e,r))),A.viewFrom=r,A.viewTo<R?A.view=A.view.concat(Gr(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,In(e,R)))),A.viewTo=R}function ra(e){for(var r=e.display.view,R=0,A=0;A<r.length;A++){var F=r[A];!F.hidden&&(!F.node||F.changes)&&++R}return R}function An(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Bi(e,r){r===void 0&&(r=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),Y=A.selection=document.createDocumentFragment(),ae=0;ae<R.sel.ranges.length;ae++){if(!r&&ae==R.sel.primIndex)continue;var de=R.sel.ranges[ae];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var me=de.empty();(me||e.options.showCursorWhenSelecting)&&Wi(e,de.head,F),me||On(e,de,Y)}return A}function Wi(e,r,R){var A=dn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),F=R.appendChild(C("div","\xA0","CodeMirror-cursor"));if(F.style.left=A.left+"px",F.style.top=A.top+"px",F.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var Y=R.appendChild(C("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Y.style.display="",Y.style.left=A.other.left+"px",Y.style.top=A.other.top+"px",Y.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function kn(e,r){return e.top-r.top||e.left-r.left}function On(e,r,R){var A=e.display,F=e.doc,Y=document.createDocumentFragment(),ae=Ge(e.display),de=ae.left,me=Math.max(A.sizerWidth,Fe(e)-A.sizer.offsetLeft)-ae.right,_e=F.direction=="ltr";function Be(hr,Rr,Yr,zr){Rr<0&&(Rr=0),Rr=Math.round(Rr),zr=Math.round(zr),Y.appendChild(C("div",null,"CodeMirror-selected","position: absolute; left: "+hr+`px;
top: `+Rr+"px; width: "+(Yr==null?me-hr:Yr)+`px;
height: `+(zr-Rr)+"px"))}function Xe(hr,Rr,Yr){var zr=mr(F,hr),yn=zr.text.length,Kn,Oi;function ei(hi,Qi){return Pn(e,It(hr,hi),"div",zr,Qi)}function ea(hi,Qi,Li){var wi=Tr(e,zr,null,hi),fi=Qi=="ltr"==(Li=="after")?"left":"right",ai=Li=="after"?wi.begin:wi.end-(/\s/.test(zr.text.charAt(wi.end-1))?2:1);return ei(ai,fi)[fi]}var Ji=pt(zr,F.direction);return rt(Ji,Rr||0,Yr==null?yn:Yr,function(hi,Qi,Li,wi){var fi=Li=="ltr",ai=ei(hi,fi?"left":"right"),Zi=ei(Qi-1,fi?"right":"left"),lo=Rr==null&&hi==0,Ua=Yr==null&&Qi==yn,Ni=wi==0,_a=!Ji||wi==Ji.length-1;if(Zi.top-ai.top<=3){var Ai=(_e?lo:Ua)&&Ni,ps=(_e?Ua:lo)&&_a,Pa=Ai?de:(fi?ai:Zi).left,Ga=ps?me:(fi?Zi:ai).right;Be(Pa,ai.top,Ga-Pa,ai.bottom)}else{var Va,Gi,uo,ms;fi?(Va=_e&&lo&&Ni?de:ai.left,Gi=_e?me:ea(hi,Li,"before"),uo=_e?de:ea(Qi,Li,"after"),ms=_e&&Ua&&_a?me:Zi.right):(Va=_e?ea(hi,Li,"before"):de,Gi=!_e&&lo&&Ni?me:ai.right,uo=!_e&&Ua&&_a?de:Zi.left,ms=_e?ea(Qi,Li,"after"):me),Be(Va,ai.top,Gi-Va,ai.bottom),ai.bottom<Zi.top&&Be(de,ai.bottom,null,Zi.top),Be(uo,Zi.top,ms-uo,Zi.bottom)}(!Kn||kn(ai,Kn)<0)&&(Kn=ai),kn(Zi,Kn)<0&&(Kn=Zi),(!Oi||kn(ai,Oi)<0)&&(Oi=ai),kn(Zi,Oi)<0&&(Oi=Zi)}),{start:Kn,end:Oi}}var ut=r.from(),it=r.to();if(ut.line==it.line)Xe(ut.line,ut.ch,it.ch);else{var Tt=mr(F,ut.line),jt=mr(F,it.line),Jt=wt(Tt)==wt(jt),dr=Xe(ut.line,ut.ch,Jt?Tt.text.length+1:null).end,br=Xe(it.line,Jt?0:null,it.ch).start;Jt&&(dr.top<br.top-2?(Be(dr.right,dr.top,null,dr.bottom),Be(de,br.top,br.left,br.bottom)):Be(dr.right,dr.top,br.left-dr.right,dr.bottom)),dr.bottom<br.top&&Be(de,dr.bottom,null,br.top)}R.appendChild(Y)}function qn(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var R=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||ua(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),la(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ua(e))},100)}function la(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Je(e,"focus",e,r),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),o&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),qn(e)}function ua(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Je(e,"blur",e,r),e.state.focused=!1,x(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var r=e.display,R=r.lineDiv.offsetTop,A=0;A<r.view.length;A++){var F=r.view[A],Y=e.options.lineWrapping,ae=void 0,de=0;if(F.hidden)continue;if(w&&d<8){var me=F.node.offsetTop+F.node.offsetHeight;ae=me-R,R=me}else{var _e=F.node.getBoundingClientRect();ae=_e.bottom-_e.top,!Y&&F.text.firstChild&&(de=F.text.firstChild.getBoundingClientRect().right-_e.left-1)}var Be=F.line.height-ae;if((Be>.005||Be<-.005)&&(Xn(F.line,ae),Ca(F.line),F.rest))for(var Xe=0;Xe<F.rest.length;Xe++)Ca(F.rest[Xe]);if(de>e.display.sizerWidth){var ut=Math.ceil(de/ni(e.display));ut>e.display.maxLineLength&&(e.display.maxLineLength=ut,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function Ca(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var R=e.widgets[r],A=R.node.parentNode;A&&(R.height=A.offsetHeight)}}function La(e,r,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-$n(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,Y=Bn(r,A),ae=Bn(r,F);if(R&&R.ensure){var de=R.ensure.from.line,me=R.ensure.to.line;de<Y?(Y=de,ae=Bn(r,sr(mr(r,de))+e.wrapper.clientHeight)):Math.min(me,r.lastLine())>=ae&&(Y=Bn(r,sr(mr(r,me))-e.wrapper.clientHeight),ae=me)}return{from:Y,to:Math.max(ae,Y+1)}}function Wa(e,r){if(st(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),F=null;if(r.top+A.top<0?F=!0:r.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!v){var Y=C("div","\u200B",null,`position: absolute;
top: `+(r.top-R.viewOffset-$n(e.display))+`px;
height: `+(r.bottom-r.top+$e(e)+R.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(F),e.display.lineSpace.removeChild(Y)}}function Xa(e,r,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&r==R&&(r=r.ch?It(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?It(r.line,r.ch+1,"before"):r);for(var Y=0;Y<5;Y++){var ae=!1,de=dn(e,r),me=!R||R==r?de:dn(e,R);F={left:Math.min(de.left,me.left),top:Math.min(de.top,me.top)-A,right:Math.max(de.left,me.left),bottom:Math.max(de.bottom,me.bottom)+A};var _e=ca(e,F),Be=e.doc.scrollTop,Xe=e.doc.scrollLeft;if(_e.scrollTop!=null&&(ha(e,_e.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(ae=!0)),_e.scrollLeft!=null&&($i(e,_e.scrollLeft),Math.abs(e.doc.scrollLeft-Xe)>1&&(ae=!0)),!ae)break}return F}function Ma(e,r){var R=ca(e,r);R.scrollTop!=null&&ha(e,R.scrollTop),R.scrollLeft!=null&&$i(e,R.scrollLeft)}function ca(e,r){var R=e.display,A=Yn(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,Y=be(e),ae={};r.bottom-r.top>Y&&(r.bottom=r.top+Y);var de=e.doc.height+Ie(R),me=r.top<A,_e=r.bottom>de-A;if(r.top<F)ae.scrollTop=me?0:r.top;else if(r.bottom>F+Y){var Be=Math.min(r.top,(_e?de:r.bottom)-Y);Be!=F&&(ae.scrollTop=Be)}var Xe=e.options.fixedGutter?0:R.gutters.offsetWidth,ut=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Xe,it=Fe(e)-R.gutters.offsetWidth,Tt=r.right-r.left>it;return Tt&&(r.right=r.left+it),r.left<10?ae.scrollLeft=0:r.left<ut?ae.scrollLeft=Math.max(0,r.left+Xe-(Tt?0:10)):r.right>it+ut-3&&(ae.scrollLeft=r.right+(Tt?0:10)-it),ae}function Sa(e,r){if(r==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function ba(e){Ea(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function da(e,r,R){(r!=null||R!=null)&&Ea(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function co(e,r){Ea(e),e.curOp.scrollToPos=r}function Ea(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=Mr(e,r.from),A=Mr(e,r.to);Ta(e,R,A,r.margin)}}function Ta(e,r,R,A){var F=ca(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-A,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+A});da(e,F.scrollLeft,F.scrollTop)}function ha(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;S||za(e,{top:r}),fa(e,r,!0),S&&za(e),Ha(e,100)}function fa(e,r,R){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!R)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function $i(e,r,R,A){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!A)return;e.doc.scrollLeft=r,xn(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function na(e){var r=e.display,R=r.gutters.offsetWidth,A=Math.round(e.doc.height+Ie(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:A,scrollHeight:A+$e(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var Cr=function(e,r,R){this.cm=R;var A=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),Pe(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),Pe(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Cr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?A+"px":"0";var F=e.viewHeight-(r?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"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:R?A:0,bottom:r?A:0}},Cr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Cr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Cr.prototype.zeroWidthHack=function(){var e=s&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ie,this.disableVert=new ie},Cr.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),Y=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);Y!=e?e.style.pointerEvents="none":r.set(1e3,A)}r.set(1e3,A)},Cr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Or=function(){};Or.prototype.update=function(){return{bottom:0,right:0}},Or.prototype.setScrollLeft=function(){},Or.prototype.setScrollTop=function(){},Or.prototype.clear=function(){};function fr(e,r){r||(r=na(e));var R=e.display.barWidth,A=e.display.barHeight;En(e,r);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&ka(e),En(e,na(e)),R=e.display.barWidth,A=e.display.barHeight}function En(e,r){var R=e.display,A=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=A.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=A.bottom)+"px",R.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=A.bottom+"px",R.scrollbarFiller.style.width=A.right+"px"):R.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=A.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var gr={native:Cr,null:Or};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&x(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new gr[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Pe(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,R){R=="horizontal"?$i(e,r):ha(e,r)},e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var $a=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:++$a},Vt(e.curOp)}function Oa(e){var r=e.curOp;r&&Qt(r,function(R){for(var A=0;A<R.ops.length;A++)R.ops[A].cm.curOp=null;Do(R)})}function Do(e){for(var r=e.ops,R=0;R<r.length;R++)Jo(r[R]);for(var A=0;A<r.length;A++)Qo(r[A]);for(var F=0;F<r.length;F++)Zo(r[F]);for(var Y=0;Y<r.length;Y++)ho(r[Y]);for(var ae=0;ae<r.length;ae++)qo(r[ae])}function Jo(e){var r=e.cm,R=r.display;Po(r),e.updateMaxLine&&Sr(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<R.viewFrom||e.scrollToPos.to.line>=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ia(r,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 r=e.cm,R=r.display;e.updatedDisplay&&ka(r),e.barMeasure=na(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=ze(r,R.maxLine,R.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+$e(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Fe(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function ho(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&$i(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==H();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&fr(r,e.barMeasure),e.updatedDisplay&&Ln(r,e.barMeasure),e.selectionChanged&&qn(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Ba(e.cm)}function qo(e){var r=e.cm,R=r.display,A=r.doc;if(e.updatedDisplay&&Ya(r,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&fa(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&$i(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=Xa(r,K(A,e.scrollToPos.from),K(A,e.scrollToPos.to),e.scrollToPos.margin);Wa(r,F)}var Y=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(Y)for(var de=0;de<Y.length;++de)Y[de].lines.length||Je(Y[de],"hide");if(ae)for(var me=0;me<ae.length;++me)ae[me].lines.length&&Je(ae[me],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Je(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Hi(e,r){if(e.curOp)return r();jn(e);try{return r()}finally{Oa(e)}}function oi(e,r){return function(){if(e.curOp)return r.apply(e,arguments);jn(e);try{return r.apply(e,arguments)}finally{Oa(e)}}}function ki(e){return function(){if(this.curOp)return e.apply(this,arguments);jn(this);try{return e.apply(this,arguments)}finally{Oa(this)}}}function si(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);jn(r);try{return e.apply(this,arguments)}finally{Oa(r)}}}function Ha(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,B(es,e))}function es(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=lt(e,r.highlightFrontier),F=[];r.iter(A.line,Math.min(r.first+r.size,e.display.viewTo+500),function(Y){if(A.line>=e.display.viewFrom){var ae=Y.styles,de=Y.text.length>e.options.maxHighlightLength?gn(r.mode,A.state):null,me=Ke(e,Y,A,!0);de&&(A.state=de),Y.styles=me.styles;var _e=Y.styleClasses,Be=me.classes;Be?Y.styleClasses=Be:_e&&(Y.styleClasses=null);for(var Xe=!ae||ae.length!=Y.styles.length||_e!=Be&&(!_e||!Be||_e.bgClass!=Be.bgClass||_e.textClass!=Be.textClass),ut=0;!Xe&&ut<ae.length;++ut)Xe=ae[ut]!=Y.styles[ut];Xe&&F.push(A.line),Y.stateAfter=A.save(),A.nextLine()}else Y.text.length<=e.options.maxHighlightLength&&_r(e,Y.text,A),Y.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return Ha(e,e.options.workDelay),!0}),r.highlightFrontier=A.line,r.modeFrontier=Math.max(r.modeFrontier,A.line),F.length&&Hi(e,function(){for(var Y=0;Y<F.length;Y++)zn(e,F[Y],"text")})}var ia=function(e,r,R){var A=e.display;this.viewport=r,this.visible=La(A,e.doc,r),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Fe(e),this.force=R,this.dims=Hn(e),this.events=[]};ia.prototype.signal=function(e,r){Me(e,r)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Je.apply(null,this.events[e])};function Po(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=$e(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=$e(e)+"px",r.scrollbarsClipped=!0)}function ko(e){if(e.hasFocus())return null;var r=H();if(!r||!L(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&L(e.display.lineDiv,A.anchorNode)&&(R.anchorNode=A.anchorNode,R.anchorOffset=A.anchorOffset,R.focusNode=A.focusNode,R.focusOffset=A.focusOffset)}return R}function Lo(e){if(!e||!e.activeElt||e.activeElt==H())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode)){var r=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),r.removeAllRanges(),r.addRange(R),r.extend(e.focusNode,e.focusOffset)}}function Aa(e,r){var R=e.display,A=e.doc;if(r.editorIsHidden)return Un(e),!1;if(!r.force&&r.visible.from>=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&ra(e)==0)return!1;xi(e)&&(Un(e),r.dims=Hn(e));var F=A.first+A.size,Y=Math.max(r.visible.from-e.options.viewportMargin,A.first),ae=Math.min(F,r.visible.to+e.options.viewportMargin);R.viewFrom<Y&&Y-R.viewFrom<20&&(Y=Math.max(A.first,R.viewFrom)),R.viewTo>ae&&R.viewTo-ae<20&&(ae=Math.min(F,R.viewTo)),Qn&&(Y=nr(e.doc,Y),ae=tr(e.doc,ae));var de=Y!=R.viewFrom||ae!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Pi(e,Y,ae),R.viewOffset=sr(mr(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var me=ra(e);if(!de&&me==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var _e=ko(e);return me>4&&(R.lineDiv.style.display="none"),Mo(e,R.updateLineNumbers,r.dims),me>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Lo(_e),y(R.cursorDiv),y(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,de&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Ha(e,400)),R.updateLineNumbers=null,!0}function Ya(e,r){for(var R=r.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||r.oldDisplayWidth==Fe(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Ie(e.display)-be(e),R.top)}),r.visible=La(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else A&&(r.visible=La(e.display,e.doc,R));if(!Aa(e,r))break;ka(e);var F=na(e);An(e),fr(e,F),Ln(e,F),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.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,r){var R=new ia(e,r);if(Aa(e,R)){ka(e),Ya(e,R);var A=na(e);An(e),fr(e,A),Ln(e,A),R.finish()}}function Mo(e,r,R){var A=e.display,F=e.options.lineNumbers,Y=A.lineDiv,ae=Y.firstChild;function de(Tt){var jt=Tt.nextSibling;return o&&s&&e.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),jt}for(var me=A.view,_e=A.viewFrom,Be=0;Be<me.length;Be++){var Xe=me[Be];if(!Xe.hidden)if(!Xe.node||Xe.node.parentNode!=Y){var ut=Dr(e,Xe,_e,R);Y.insertBefore(ut,ae)}else{for(;ae!=Xe.node;)ae=de(ae);var it=F&&r!=null&&r<=_e&&Xe.lineNumber;Xe.changes&&(ce(Xe.changes,"gutter")>-1&&(it=!1),qt(e,Xe,_e,R)),it&&(y(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(mi(e.options,_e)))),ae=Xe.node.nextSibling}_e+=Xe.size}for(;ae;)ae=de(ae)}function Ja(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ln(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+$e(e)+"px"}function xn(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=di(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,Y=A+"px",ae=0;ae<R.length;ae++)if(!R[ae].hidden){e.options.fixedGutter&&(R[ae].gutter&&(R[ae].gutter.style.left=Y),R[ae].gutterBackground&&(R[ae].gutterBackground.style.left=Y));var de=R[ae].alignable;if(de)for(var me=0;me<de.length;me++)de[me].style.left=Y}e.options.fixedGutter&&(r.gutters.style.left=A+F+"px")}function xi(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=mi(e.options,r.first+r.size-1),A=e.display;if(R.length!=A.lineNumChars){var F=A.measure.appendChild(C("div",[C("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Y=F.firstChild.offsetWidth,ae=F.offsetWidth-Y;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(Y,A.lineGutter.offsetWidth-ae)+1,A.lineNumWidth=A.lineNumInnerWidth+ae,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ja(e.display),!0}return!1}function zi(e,r){for(var R=[],A=!1,F=0;F<e.length;F++){var Y=e[F],ae=null;if(typeof Y!="string"&&(ae=Y.style,Y=Y.className),Y=="CodeMirror-linenumbers")if(r)A=!0;else continue;R.push({className:Y,style:ae})}return r&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function Ia(e){var r=e.gutters,R=e.gutterSpecs;y(r),e.lineGutter=null;for(var A=0;A<R.length;++A){var F=R[A],Y=F.className,ae=F.style,de=r.appendChild(C("div",null,"CodeMirror-gutter "+Y));ae&&(de.style.cssText=ae),Y=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Ja(e)}function ma(e){Ia(e.display),Nn(e),xn(e)}function Ka(e,r,R,A){var F=this;this.input=R,F.scrollbarFiller=C("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=C("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=I("div",null,"CodeMirror-code"),F.selectionDiv=C("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=C("div",null,"CodeMirror-cursors"),F.measure=C("div",null,"CodeMirror-measure"),F.lineMeasure=C("div",null,"CodeMirror-measure"),F.lineSpace=I("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var Y=I("div",[F.lineSpace],"CodeMirror-lines");F.mover=C("div",[Y],null,"position: relative"),F.sizer=C("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=C("div",null,null,"position: absolute; height: "+he+"px; width: 1px;"),F.gutters=C("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=C("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=C("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),w&&d<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!o&&!(S&&i)&&(F.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(F.wrapper):e(F.wrapper)),F.viewFrom=F.viewTo=r.first,F.reportedViewFrom=F.reportedViewTo=r.first,F.view=[],F.renderedView=null,F.externalMeasured=null,F.viewOffset=0,F.lastWrapHeight=F.lastWrapWidth=0,F.updateLineNumbers=null,F.nativeBarWidth=F.barHeight=F.barWidth=0,F.scrollbarsClipped=!1,F.lineNumWidth=F.lineNumInnerWidth=F.lineNumChars=null,F.alignWidgets=!1,F.cachedCharWidth=F.cachedTextHeight=F.cachedPaddingH=null,F.maxLine=null,F.maxLineLength=0,F.maxLineChanged=!1,F.wheelDX=F.wheelDY=F.wheelStartX=F.wheelStartY=null,F.shift=!1,F.selForContextMenu=null,F.activeTouch=null,F.gutterSpecs=zi(A.gutters,A.lineNumbers),Ia(F),R.init(F)}var xa=0,_i=null;w?_i=-.53:S?_i=15:n?_i=-.7:p&&(_i=-1/3);function Qa(e){var r=e.wheelDeltaX,R=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),R==null&&e.detail&&e.axis==e.VERTICAL_AXIS?R=e.detail:R==null&&(R=e.wheelDelta),{x:r,y:R}}function fo(e){var r=Qa(e);return r.x*=_i,r.y*=_i,r}function po(e,r){var R=Qa(r),A=R.x,F=R.y,Y=e.display,ae=Y.scroller,de=ae.scrollWidth>ae.clientWidth,me=ae.scrollHeight>ae.clientHeight;if(!(A&&de||F&&me))return;if(F&&s&&o){e:for(var _e=r.target,Be=Y.view;_e!=ae;_e=_e.parentNode)for(var Xe=0;Xe<Be.length;Xe++)if(Be[Xe].node==_e){e.display.currentWheelTarget=_e;break e}}if(A&&!S&&!u&&_i!=null){F&&me&&ha(e,Math.max(0,ae.scrollTop+F*_i)),$i(e,Math.max(0,ae.scrollLeft+A*_i)),(!F||F&&me)&&Ee(r),Y.wheelStartX=null;return}if(F&&_i!=null){var ut=F*_i,it=e.doc.scrollTop,Tt=it+Y.wrapper.clientHeight;ut<0?it=Math.max(0,it+ut-50):Tt=Math.min(e.doc.height,Tt+ut+50),za(e,{top:it,bottom:Tt})}xa<20&&(Y.wheelStartX==null?(Y.wheelStartX=ae.scrollLeft,Y.wheelStartY=ae.scrollTop,Y.wheelDX=A,Y.wheelDY=F,setTimeout(function(){if(Y.wheelStartX==null)return;var jt=ae.scrollLeft-Y.wheelStartX,Jt=ae.scrollTop-Y.wheelStartY,dr=Jt&&Y.wheelDY&&Jt/Y.wheelDY||jt&&Y.wheelDX&&jt/Y.wheelDX;if(Y.wheelStartX=Y.wheelStartY=null,!dr)return;_i=(_i*xa+dr)/(xa+1),++xa},200)):(Y.wheelDX+=A,Y.wheelDY+=F))}var Ki=function(e,r){this.ranges=e,this.primIndex=r};Ki.prototype.primary=function(){return this.ranges[this.primIndex]},Ki.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var R=this.ranges[r],A=e.ranges[r];if(!ti(R.anchor,A.anchor)||!ti(R.head,A.head))return!1}return!0},Ki.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Rn(vi(this.ranges[r].anchor),vi(this.ranges[r].head));return new Ki(e,this.primIndex)},Ki.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ki.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(xr(r,A.from())>=0&&xr(e,A.to())<=0)return R}return-1};var Rn=function(e,r){this.anchor=e,this.head=r};Rn.prototype.from=function(){return Di(this.anchor,this.head)},Rn.prototype.to=function(){return Ri(this.anchor,this.head)},Rn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(ut,it){return xr(ut.from(),it.from())}),R=ce(r,F);for(var Y=1;Y<r.length;Y++){var ae=r[Y],de=r[Y-1],me=xr(de.to(),ae.from());if(A&&!ae.empty()?me>0:me>=0){var _e=Di(de.from(),ae.from()),Be=Ri(de.to(),ae.to()),Xe=de.empty()?ae.from()==ae.head:de.from()==de.head;Y<=R&&--R,r.splice(--Y,2,new Rn(Xe?Be:_e,Xe?_e:Be))}}return new Ki(r,R)}function va(e,r){return new Ki([new Rn(e,r||e)],0)}function ga(e){return e.text?It(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,r){if(xr(e,r.from)<0)return e;if(xr(e,r.to)<=0)return ga(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,A=e.ch;return e.line==r.to.line&&(A+=ga(r).ch-r.to.ch),It(R,A)}function Za(e,r){for(var R=[],A=0;A<e.sel.ranges.length;A++){var F=e.sel.ranges[A];R.push(new Rn(mo(F.anchor,r),mo(F.head,r)))}return aa(e.cm,R,e.sel.primIndex)}function Io(e,r,R){return e.line==r.line?It(R.line,e.ch-r.ch+R.ch):It(R.line+(e.line-r.line),e.ch)}function No(e,r,R){for(var A=[],F=It(e.first,0),Y=F,ae=0;ae<r.length;ae++){var de=r[ae],me=Io(de.from,F,Y),_e=Io(ga(de),F,Y);if(F=de.to,Y=_e,R=="around"){var Be=e.sel.ranges[ae],Xe=xr(Be.head,Be.anchor)<0;A[ae]=new Rn(Xe?_e:me,Xe?me:_e)}else A[ae]=new Rn(me,me)}return new Ki(A,e.sel.primIndex)}function Ra(e){e.doc.mode=_n(e.options,e.doc.modeOption),vo(e)}function vo(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ha(e,100),e.state.modeGen++,e.curOp&&Nn(e)}function vs(e,r){return r.from.ch==0&&r.to.ch==0&&te(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,r,R,A){function F(br){return R?R[br]:null}function Y(br,hr,Rr){yr(br,hr,Rr,A),Kt(br,"change",br,r)}function ae(br,hr){for(var Rr=[],Yr=br;Yr<hr;++Yr)Rr.push(new Lr(_e[Yr],F(Yr),A));return Rr}var de=r.from,me=r.to,_e=r.text,Be=mr(e,de.line),Xe=mr(e,me.line),ut=te(_e),it=F(_e.length-1),Tt=me.line-de.line;if(r.full)e.insert(0,ae(0,_e.length)),e.remove(_e.length,e.size-_e.length);else if(vs(e,r)){var jt=ae(0,_e.length-1);Y(Xe,Xe.text,it),Tt&&e.remove(de.line,Tt),jt.length&&e.insert(de.line,jt)}else if(Be==Xe)if(_e.length==1)Y(Be,Be.text.slice(0,de.ch)+ut+Be.text.slice(me.ch),it);else{var Jt=ae(1,_e.length-1);Jt.push(new Lr(ut+Be.text.slice(me.ch),it,A)),Y(Be,Be.text.slice(0,de.ch)+_e[0],F(0)),e.insert(de.line+1,Jt)}else if(_e.length==1)Y(Be,Be.text.slice(0,de.ch)+_e[0]+Xe.text.slice(me.ch),F(0)),e.remove(de.line+1,Tt);else{Y(Be,Be.text.slice(0,de.ch)+_e[0],F(0)),Y(Xe,ut+Xe.text.slice(me.ch),it);var dr=ae(1,_e.length-1);Tt>1&&e.remove(de.line+1,Tt-1),e.insert(de.line+1,dr)}Kt(e,"change",e,r)}function Na(e,r,R){function A(F,Y,ae){if(F.linked)for(var de=0;de<F.linked.length;++de){var me=F.linked[de];if(me.doc==Y)continue;var _e=ae&&me.sharedHist;if(R&&!_e)continue;r(me.doc,_e),A(me.doc,F,_e)}}A(e,null,!0)}function gs(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Ti(e),Ra(e),ys(e),e.options.lineWrapping||Sr(e),e.options.mode=r.modeOption,Nn(e)}function ys(e){(e.doc.direction=="rtl"?W:x)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Hi(e,function(){ys(e),Nn(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,r){var R={from:vi(r.from),to:ga(r),text:Vn(e,r.from,r.to)};return xs(e,R,r.from.line,r.to.line+1),Na(e,function(A){return xs(A,R,r.from.line,r.to.line+1)},!0),R}function bs(e){for(;e.length;){var r=te(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return bs(e.done),te(e.done);if(e.done.length&&!te(e.done).ranges)return te(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var Y=+new Date,ae,de;if((F.lastOp==A||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(ae=ml(F,F.lastOp==A)))de=te(ae.changes),xr(r.from,r.to)==0&&xr(r.from,de.to)==0?de.to=ga(r):ae.changes.push(rs(e,r));else{var me=te(F.done);for((!me||!me.ranges)&&Fo(e.sel,F.done),ae={changes:[rs(e,r)],generation:F.generation},F.done.push(ae);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=Y,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=r.origin,de||Je(e,"historyAdded")}function vl(e,r,R,A){var F=r.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,A){var F=e.history,Y=A&&A.origin;R==F.lastSelOp||Y&&F.lastSelOrigin==Y&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==Y||vl(e,Y,te(F.done),r))?F.done[F.done.length-1]=r:Fo(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=Y,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,r){var R=te(r);R&&R.ranges&&R.equals(e)||r.push(e)}function xs(e,r,R,A){var F=r["spans_"+e.id],Y=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(ae){ae.markedSpans&&((F||(F=r["spans_"+e.id]={}))[Y]=ae.markedSpans),++Y})}function yl(e){if(!e)return null;for(var r,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?r||(r=e.slice(0,R)):r&&r.push(e[R]);return r?r.length?r:null:e}function bl(e,r){var R=r["spans_"+e.id];if(!R)return null;for(var A=[],F=0;F<r.text.length;++F)A.push(yl(R[F]));return A}function _s(e,r){var R=bl(e,r),A=Ei(e,r);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var Y=R[F],ae=A[F];if(Y&&ae){e:for(var de=0;de<ae.length;++de){for(var me=ae[de],_e=0;_e<Y.length;++_e)if(Y[_e].marker==me.marker)continue e;Y.push(me)}}else ae&&(R[F]=ae)}return R}function qa(e,r,R){for(var A=[],F=0;F<e.length;++F){var Y=e[F];if(Y.ranges){A.push(R?Ki.prototype.deepCopy.call(Y):Y);continue}var ae=Y.changes,de=[];A.push({changes:de});for(var me=0;me<ae.length;++me){var _e=ae[me],Be=void 0;if(de.push({from:_e.from,to:_e.to,text:_e.text}),r)for(var Xe in _e)(Be=Xe.match(/^spans_(\d+)$/))&&(ce(r,Number(Be[1]))>-1&&(te(de)[Xe]=_e[Xe],delete _e[Xe]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var Y=xr(r,F)<0;Y!=xr(R,F)<0?(F=r,r=R):Y!=xr(r,R)<0&&(r=R)}return new Rn(F,r)}else return new Rn(R||r,r)}function Uo(e,r,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Ii(e,new Ki([ns(e.sel.primary(),r,R,F)],0),A)}function ws(e,r,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y<e.sel.ranges.length;Y++)A[Y]=ns(e.sel.ranges[Y],r[Y],null,F);var ae=aa(e.cm,A,e.sel.primIndex);Ii(e,ae,R)}function is(e,r,R,A){var F=e.sel.ranges.slice(0);F[r]=R,Ii(e,aa(e.cm,F,e.sel.primIndex),A)}function Cs(e,r,R,A){Ii(e,va(r,R),A)}function El(e,r,R){var A={ranges:r.ranges,update:function(F){this.ranges=[];for(var Y=0;Y<F.length;Y++)this.ranges[Y]=new Rn(K(e,F[Y].anchor),K(e,F[Y].head))},origin:R&&R.origin};return Je(e,"beforeSelectionChange",e,A),e.cm&&Je(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=r.ranges?aa(e.cm,A.ranges,A.ranges.length-1):r}function Ss(e,r,R){var A=e.history.done,F=te(A);F&&F.ranges?(A[A.length-1]=r,Bo(e,r,R)):Ii(e,r,R)}function Ii(e,r,R){Bo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function Bo(e,r,R){(Me(e,"beforeSelectionChange")||e.cm&&Me(e.cm,"beforeSelectionChange"))&&(r=El(e,r,R));var A=R&&R.bias||(xr(r.primary().head,e.sel.primary().head)<0?-1:1);Ts(e,As(e,r,A,!0)),!(R&&R.scroll===!1)&&e.cm&&ba(e.cm)}function Ts(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ue(e.cm)),Kt(e,"cursorActivity",e)}function Os(e){Ts(e,As(e,e.sel,null,!1))}function As(e,r,R,A){for(var F,Y=0;Y<r.ranges.length;Y++){var ae=r.ranges[Y],de=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[Y],me=Wo(e,ae.anchor,de&&de.anchor,R,A),_e=Wo(e,ae.head,de&&de.head,R,A);(F||me!=ae.anchor||_e!=ae.head)&&(F||(F=r.ranges.slice(0,Y)),F[Y]=new Rn(me,_e))}return F?aa(e.cm,F,r.primIndex):r}function eo(e,r,R,A,F){var Y=mr(e,r.line);if(Y.markedSpans)for(var ae=0;ae<Y.markedSpans.length;++ae){var de=Y.markedSpans[ae],me=de.marker,_e="selectLeft"in me?!me.selectLeft:me.inclusiveLeft,Be="selectRight"in me?!me.selectRight:me.inclusiveRight;if((de.from==null||(_e?de.from<=r.ch:de.from<r.ch))&&(de.to==null||(Be?de.to>=r.ch:de.to>r.ch))){if(F&&(Je(me,"beforeCursorEnter"),me.explicitlyCleared))if(Y.markedSpans){--ae;continue}else break;if(!me.atomic)continue;if(R){var Xe=me.find(A<0?1:-1),ut=void 0;if((A<0?Be:_e)&&(Xe=Rs(e,Xe,-A,Xe&&Xe.line==r.line?Y:null)),Xe&&Xe.line==r.line&&(ut=xr(Xe,R))&&(A<0?ut<0:ut>0))return eo(e,Xe,r,A,F)}var it=me.find(A<0?-1:1);return(A<0?_e:Be)&&(it=Rs(e,it,A,it.line==r.line?Y:null)),it?eo(e,it,r,A,F):null}}return r}function Wo(e,r,R,A,F){var Y=A||1,ae=eo(e,r,R,Y,F)||!F&&eo(e,r,R,Y,!0)||eo(e,r,R,-Y,F)||!F&&eo(e,r,R,-Y,!0);return ae||(e.cantEdit=!0,It(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?K(e,It(r.line-1)):null:R>0&&r.ch==(A||mr(e,r.line)).text.length?r.line<e.first+e.size-1?It(r.line+1,0):null:new It(r.line,r.ch+R)}function Ds(e){e.setSelection(It(e.firstLine(),0),It(e.lastLine()),De)}function Ps(e,r,R){var A={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return A.canceled=!0}};return R&&(A.update=function(F,Y,ae,de){F&&(A.from=K(e,F)),Y&&(A.to=K(e,Y)),ae&&(A.text=ae),de!==void 0&&(A.origin=de)}),Je(e,"beforeChange",e,A),e.cm&&Je(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,r,R){if(e.cm){if(!e.cm.curOp)return oi(e.cm,to)(e,r,R);if(e.cm.state.suppressEdits)return}if((Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"))&&(r=Ps(e,r,!0),!r))return;var A=qi&&!R&&Vi(e,r.from,r.to);if(A)for(var F=A.length-1;F>=0;--F)ks(e,{from:A[F].from,to:A[F].to,text:F?[""]:r.text,origin:r.origin});else ks(e,r)}function ks(e,r){if(r.text.length==1&&r.text[0]==""&&xr(r.from,r.to)==0)return;var R=Za(e,r);Es(e,r,R,e.cm?e.cm.curOp.id:NaN),go(e,r,R,Ei(e,r));var A=[];Na(e,function(F,Y){!Y&&ce(A,F.history)==-1&&(Ns(F.history,r),A.push(F.history)),go(F,r,null,Ei(F,r))})}function Ho(e,r,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,Y,ae=e.sel,de=r=="undo"?F.done:F.undone,me=r=="undo"?F.undone:F.done,_e=0;_e<de.length&&!(Y=de[_e],R?Y.ranges&&!Y.equals(e.sel):!Y.ranges);_e++);if(_e==de.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(Y=de.pop(),Y.ranges){if(Fo(Y,me),R&&!Y.equals(e.sel)){Ii(e,Y,{clearRedo:!1});return}ae=Y}else if(A){de.push(Y);return}else break;var Be=[];Fo(ae,me),me.push({changes:Be,generation:F.generation}),F.generation=Y.generation||++F.maxGeneration;for(var Xe=Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"),ut=function(jt){var Jt=Y.changes[jt];if(Jt.origin=r,Xe&&!Ps(e,Jt,!1))return de.length=0,{};Be.push(rs(e,Jt));var dr=jt?Za(e,Jt):te(de);go(e,Jt,dr,_s(e,Jt)),!jt&&e.cm&&e.cm.scrollIntoView({from:Jt.from,to:ga(Jt)});var br=[];Na(e,function(hr,Rr){!Rr&&ce(br,hr.history)==-1&&(Ns(hr.history,Jt),br.push(hr.history)),go(hr,Jt,null,_s(hr,Jt))})},it=Y.changes.length-1;it>=0;--it){var Tt=ut(it);if(Tt)return Tt.v}}function Ls(e,r){if(r==0)return;if(e.first+=r,e.sel=new Ki(fe(e.sel.ranges,function(F){return new Rn(It(F.anchor.line+r,F.anchor.ch),It(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){Nn(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)zn(e.cm,A,"gutter")}}function go(e,r,R,A){if(e.cm&&!e.cm.curOp)return oi(e.cm,go)(e,r,R,A);if(r.to.line<e.first){Ls(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var F=r.text.length-1-(e.first-r.from.line);Ls(e,F),r={from:It(e.first,0),to:It(r.to.line+F,r.to.ch),text:[te(r.text)],origin:r.origin}}var Y=e.lastLine();r.to.line>Y&&(r={from:r.from,to:It(Y,mr(e,Y).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Vn(e,r.from,r.to),R||(R=Za(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,De),e.cantEdit&&Wo(e,It(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,Y=r.from,ae=r.to,de=!1,me=Y.line;e.options.lineWrapping||(me=nn(wt(mr(A,Y.line))),A.iter(me,ae.line+1,function(it){if(it==F.maxLine)return de=!0,!0})),A.sel.contains(r.from,r.to)>-1&&Ue(e),ts(A,r,R,Xi(e)),e.options.lineWrapping||(A.iter(me,Y.line+r.text.length,function(it){var Tt=ot(it);Tt>F.maxLineLength&&(F.maxLine=it,F.maxLineLength=Tt,F.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),Mi(A,Y.line),Ha(e,400);var _e=r.text.length-(ae.line-Y.line)-1;r.full?Nn(e):Y.line==ae.line&&r.text.length==1&&!vs(e.doc,r)?zn(e,Y.line,"text"):Nn(e,Y.line,ae.line+1,_e);var Be=Me(e,"changes"),Xe=Me(e,"change");if(Xe||Be){var ut={from:Y,to:ae,text:r.text,removed:r.removed,origin:r.origin};Xe&&Kt(e,"change",e,ut),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ut)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var Y;A||(A=R),xr(A,R)<0&&(Y=[A,R],R=Y[0],A=Y[1]),typeof r=="string"&&(r=e.splitLines(r)),to(e,{from:R,to:A,text:r,origin:F})}function Ms(e,r,R,A){R<e.line?e.line+=A:r<e.line&&(e.line=r,e.ch=0)}function Is(e,r,R,A){for(var F=0;F<e.length;++F){var Y=e[F],ae=!0;if(Y.ranges){Y.copied||(Y=e[F]=Y.deepCopy(),Y.copied=!0);for(var de=0;de<Y.ranges.length;de++)Ms(Y.ranges[de].anchor,r,R,A),Ms(Y.ranges[de].head,r,R,A);continue}for(var me=0;me<Y.changes.length;++me){var _e=Y.changes[me];if(R<_e.from.line)_e.from=It(_e.from.line+A,_e.from.ch),_e.to=It(_e.to.line+A,_e.to.ch);else if(r<=_e.to.line){ae=!1;break}}ae||(e.splice(0,F+1),F=0)}}function Ns(e,r){var R=r.from.line,A=r.to.line,F=r.text.length-(A-R)-1;Is(e.done,R,A,F),Is(e.undone,R,A,F)}function yo(e,r,R,A){var F=r,Y=r;return typeof r=="number"?Y=mr(e,se(e,r)):F=nn(r),F==null?null:(A(Y,F)&&e.cm&&zn(e.cm,F,R),Y)}function bo(e){this.lines=e,this.parent=null;for(var r=0,R=0;R<e.length;++R)e[R].parent=this,r+=e[R].height;this.height=r}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var R=e,A=e+r;R<A;++R){var F=this.lines[R];this.height-=F.height,ar(F),Kt(F,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,R){this.height+=R,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var A=0;A<r.length;++A)r[A].parent=this},iterN:function(e,r,R){for(var A=e+r;e<A;++e)if(R(this.lines[e]))return!0}};function Eo(e){this.children=e;for(var r=0,R=0,A=0;A<e.length;++A){var F=e[A];r+=F.chunkSize(),R+=F.height,F.parent=this}this.size=r,this.height=R,this.parent=null}Eo.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var R=0;R<this.children.length;++R){var A=this.children[R],F=A.chunkSize();if(e<F){var Y=Math.min(r,F-e),ae=A.height;if(A.removeInner(e,Y),this.height-=ae-A.height,F==Y&&(this.children.splice(R--,1),A.parent=null),(r-=Y)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var de=[];this.collapse(de),this.children=[new bo(de)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,R){this.size+=r.length,this.height+=R;for(var A=0;A<this.children.length;++A){var F=this.children[A],Y=F.chunkSize();if(e<=Y){if(F.insertInner(e,r,R),F.lines&&F.lines.length>50){for(var ae=F.lines.length%25+25,de=ae;de<F.lines.length;){var me=new bo(F.lines.slice(de,de+=25));F.height-=me.height,this.children.splice(++A,0,me),me.parent=this}F.lines=F.lines.slice(0,ae),this.maybeSpill()}break}e-=Y}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),R=new Eo(r);if(e.parent){e.size-=R.size,e.height-=R.height;var F=ce(e.parent.children,e);e.parent.children.splice(F+1,0,R)}else{var A=new Eo(e.children);A.parent=e,e.children=[A,R],e=A}R.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var A=0;A<this.children.length;++A){var F=this.children[A],Y=F.chunkSize();if(e<Y){var ae=Math.min(r,Y-e);if(F.iterN(e,ae,R))return!0;if((r-=ae)==0)break;e=0}else e-=Y}}};var xo=function(e,r,R){if(R)for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A]);this.doc=e,this.node=r};xo.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,R=this.line,A=nn(R);if(A==null||!r)return;for(var F=0;F<r.length;++F)r[F]==this&&r.splice(F--,1);r.length||(R.widgets=null);var Y=Vr(this);Xn(R,Math.max(0,R.height-Y)),e&&(Hi(e,function(){js(e,R,-Y),zn(e,A,"widget")}),Kt(e,"lineWidgetCleared",e,this,A))},xo.prototype.changed=function(){var e=this,r=this.height,R=this.doc.cm,A=this.line;this.height=null;var F=Vr(this)-r;if(!F)return;$t(this.doc,A)||Xn(A,A.height+F),R&&Hi(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),Kt(R,"lineWidgetChanged",R,e,nn(A))})},Ne(xo);function js(e,r,R){sr(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,R)}function _l(e,r,R,A){var F=new xo(e,R,A),Y=e.cm;return Y&&F.noHScroll&&(Y.display.alignWidgets=!0),yo(e,r,"widget",function(ae){var de=ae.widgets||(ae.widgets=[]);if(F.insertAt==null?de.push(F):de.splice(Math.min(de.length-1,Math.max(0,F.insertAt)),0,F),F.line=ae,Y&&!$t(e,ae)){var me=sr(ae)<e.scrollTop;Xn(ae,ae.height+Vr(F)),me&&Sa(Y,F.height),Y.curOp.forceUpdate=!0}return!0}),Y&&Kt(Y,"lineWidgetAdded",Y,F,typeof r=="number"?r:nn(r)),F}var Fs=0,ja=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&jn(e),Me(this,"clear")){var R=this.find();R&&Kt(this,"clear",R.from,R.to)}for(var A=null,F=null,Y=0;Y<this.lines.length;++Y){var ae=this.lines[Y],de=yi(ae.markedSpans,this);e&&!this.collapsed?zn(e,nn(ae),"text"):e&&(de.to!=null&&(F=nn(ae)),de.from!=null&&(A=nn(ae))),ae.markedSpans=Ui(ae.markedSpans,de),de.from==null&&this.collapsed&&!$t(this.doc,ae)&&e&&Xn(ae,Yn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var me=0;me<this.lines.length;++me){var _e=wt(this.lines[me]),Be=ot(_e);Be>e.display.maxLineLength&&(e.display.maxLine=_e,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Nn(e,A,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Kt(e,"markerCleared",e,this,A,F),r&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F<this.lines.length;++F){var Y=this.lines[F],ae=yi(Y.markedSpans,this);if(ae.from!=null&&(R=It(r?Y:nn(Y),ae.from),e==-1))return R;if(ae.to!=null&&(A=It(r?Y:nn(Y),ae.to),e==1))return A}return R&&{from:R,to:A}},ja.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,A=this.doc.cm;if(!r||!A)return;Hi(A,function(){var F=r.line,Y=nn(r.line),ae=Ve(A,Y);if(ae&&($r(ae),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!$t(R.doc,F)&&R.height!=null){var de=R.height;R.height=null;var me=Vr(R)-de;me&&Xn(F,F.height+me)}Kt(A,"markerChanged",A,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||ce(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ja.prototype.detachLine=function(e){if(this.lines.splice(ce(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Ne(ja);function no(e,r,R,A,F){if(A&&A.shared)return wl(e,r,R,A,F);if(e.cm&&!e.cm.curOp)return oi(e.cm,no)(e,r,R,A,F);var Y=new ja(e,F),ae=xr(r,R);if(A&&z(A,Y,!1),ae>0||ae==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=I("span",[Y.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(ht(e,r.line,r,R,Y)||r.line!=R.line&&ht(e,R.line,r,R,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");ji()}Y.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var de=r.line,me=e.cm,_e;if(e.iter(de,R.line+1,function(Xe){me&&Y.collapsed&&!me.options.lineWrapping&&wt(Xe)==me.display.maxLine&&(_e=!0),Y.collapsed&&de!=r.line&&Xn(Xe,0),bi(Xe,new Fi(Y,de==r.line?r.ch:null,de==R.line?R.ch:null)),++de}),Y.collapsed&&e.iter(r.line,R.line+1,function(Xe){$t(e,Xe)&&Xn(Xe,0)}),Y.clearOnEnter&&Pe(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(ci(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Fs,Y.atomic=!0),me){if(_e&&(me.curOp.updateMaxLine=!0),Y.collapsed)Nn(me,r.line,R.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var Be=r.line;Be<=R.line;Be++)zn(me,Be,"text");Y.atomic&&Os(me.doc),Kt(me,"markerAdded",me,Y)}return Y}var _o=function(e,r){this.markers=e,this.primary=r;for(var R=0;R<e.length;++R)e[R].parent=this};_o.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Kt(this,"clear")},_o.prototype.find=function(e,r){return this.primary.find(e,r)},Ne(_o);function wl(e,r,R,A,F){A=z(A),A.shared=!1;var Y=[no(e,r,R,A,F)],ae=Y[0],de=A.widgetNode;return Na(e,function(me){de&&(A.widgetNode=de.cloneNode(!0)),Y.push(no(me,K(me,r),K(me,R),A,F));for(var _e=0;_e<me.linked.length;++_e)if(me.linked[_e].isParent)return;ae=te(Y)}),new _o(Y,ae)}function Us(e){return e.findMarks(It(e.first,0),e.clipPos(It(e.lastLine())),function(r){return r.parent})}function Cl(e,r){for(var R=0;R<r.length;R++){var A=r[R],F=A.find(),Y=e.clipPos(F.from),ae=e.clipPos(F.to);if(xr(Y,ae)){var de=no(e,Y,ae,A.primary,A.primary.type);A.markers.push(de),de.parent=A}}}function Sl(e){for(var r=function(A){var F=e[A],Y=[F.primary.doc];Na(F.primary.doc,function(me){return Y.push(me)});for(var ae=0;ae<F.markers.length;ae++){var de=F.markers[ae];ce(Y,de.doc)==-1&&(de.parent=null,F.markers.splice(ae--,1))}},R=0;R<e.length;R++)r(R)}var Tl=0,Yi=function(e,r,R,A,F){if(!(this instanceof Yi))return new Yi(e,r,R,A,F);R==null&&(R=0),Eo.call(this,[new bo([new Lr("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var Y=It(R,0);this.sel=va(Y),this.history=new jo(null),this.id=++Tl,this.modeOption=r,this.lineSep=A,this.direction=F=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:Y,to:Y,text:e}),Ii(this,va(Y),De)};Yi.prototype=Ce(Eo.prototype,{constructor:Yi,iter:function(e,r,R){R?this.iterN(e-this.first,r-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var R=0,A=0;A<r.length;++A)R+=r[A].height;this.insertInner(e-this.first,r,R)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=pi(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:si(function(e){var r=It(this.first,0),R=this.first+this.size-1;to(this,{from:r,to:It(R,mr(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&da(this.cm,0,0),Ii(this,va(r),De)}),replaceRange:function(e,r,R,A){r=K(this,r),R=R?K(this,R):r,ro(this,e,r,R,A)},getRange:function(e,r,R){var A=Vn(this,K(this,e),K(this,r));return R===!1?A:A.join(R||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(Si(this,e))return mr(this,e)},getLineNumber:function(e){return nn(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=mr(this,e)),wt(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 r=this.sel.primary(),R;return e==null||e=="head"?R=r.head:e=="anchor"?R=r.anchor:e=="end"||e=="to"||e===!1?R=r.to():R=r.from(),R},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:si(function(e,r,R){Cs(this,K(this,typeof e=="number"?It(e,r||0):e),null,R)}),setSelection:si(function(e,r,R){Cs(this,K(this,e),K(this,r||e),R)}),extendSelection:si(function(e,r,R){Uo(this,K(this,e),r&&K(this,r),R)}),extendSelections:si(function(e,r){ws(this,ne(this,e),r)}),extendSelectionsBy:si(function(e,r){var R=fe(this.sel.ranges,e);ws(this,ne(this,R),r)}),setSelections:si(function(e,r,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new Rn(K(this,e[F].anchor),K(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Ii(this,aa(this.cm,A,r),R)}),addSelection:si(function(e,r,R){var A=this.sel.ranges.slice(0);A.push(new Rn(K(this,e),K(this,r||e))),Ii(this,aa(this.cm,A,A.length-1),R)}),getSelection:function(e){for(var r=this.sel.ranges,R,A=0;A<r.length;A++){var F=Vn(this,r[A].from(),r[A].to());R=R?R.concat(F):F}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],R=this.sel.ranges,A=0;A<R.length;A++){var F=Vn(this,R[A].from(),R[A].to());e!==!1&&(F=F.join(e||this.lineSeparator())),r[A]=F}return r},replaceSelection:function(e,r,R){for(var A=[],F=0;F<this.sel.ranges.length;F++)A[F]=e;this.replaceSelections(A,r,R||"+input")},replaceSelections:si(function(e,r,R){for(var A=[],F=this.sel,Y=0;Y<F.ranges.length;Y++){var ae=F.ranges[Y];A[Y]={from:ae.from(),to:ae.to(),text:this.splitLines(e[Y]),origin:R}}for(var de=r&&r!="end"&&No(this,A,r),me=A.length-1;me>=0;me--)to(this,A[me]);de?Ss(this,de):this.cm&&ba(this.cm)}),undo:si(function(){Ho(this,"undo")}),redo:si(function(){Ho(this,"redo")}),undoSelection:si(function(){Ho(this,"undo",!0)}),redoSelection:si(function(){Ho(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,R=0,A=0;A<e.done.length;A++)e.done[A].ranges||++r;for(var F=0;F<e.undone.length;F++)e.undone[F].ranges||++R;return{undo:r,redo:R}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Na(this,function(r){return r.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 r=this.history=new jo(this.history.maxGeneration);r.done=qa(e.done.slice(0),null,!0),r.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:si(function(e,r,R){return yo(this,e,"gutter",function(A){var F=A.gutterMarkers||(A.gutterMarkers={});return F[r]=R,!R&&Z(F)&&(A.gutterMarkers=null),!0})}),clearGutter:si(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&yo(r,R,"gutter",function(){return R.gutterMarkers[e]=null,Z(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!Si(this,e))return null;if(r=e,e=mr(this,e),!e)return null}else if(r=nn(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:si(function(e,r,R){return yo(this,e,r=="gutter"?"gutter":"class",function(A){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!A[F])A[F]=R;else{if(O(R).test(A[F]))return!1;A[F]+=" "+R}return!0})}),removeLineClass:si(function(e,r,R){return yo(this,e,r=="gutter"?"gutter":"class",function(A){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",Y=A[F];if(Y)if(R==null)A[F]=null;else{var ae=Y.match(O(R));if(!ae)return!1;var de=ae.index+ae[0].length;A[F]=Y.slice(0,ae.index)+(!ae.index||de==Y.length?"":" ")+Y.slice(de)||null}else return!1;return!0})}),addLineWidget:si(function(e,r,R){return _l(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return no(this,K(this,e),K(this,r),R,R&&R.type||"range")},setBookmark:function(e,r){var R={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=K(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=K(this,e);var r=[],R=mr(this,e.line).markedSpans;if(R)for(var A=0;A<R.length;++A){var F=R[A];(F.from==null||F.from<=e.ch)&&(F.to==null||F.to>=e.ch)&&r.push(F.marker.parent||F.marker)}return r},findMarks:function(e,r,R){e=K(this,e),r=K(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(Y){var ae=Y.markedSpans;if(ae)for(var de=0;de<ae.length;de++){var me=ae[de];!(me.to!=null&&F==e.line&&e.ch>=me.to||me.from==null&&F!=e.line||me.from!=null&&F==r.line&&me.from>=r.ch)&&(!R||R(me.marker))&&A.push(me.marker.parent||me.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var A=0;A<R.length;++A)R[A].from!=null&&e.push(R[A].marker)}),e},posFromIndex:function(e){var r,R=this.first,A=this.lineSeparator().length;return this.iter(function(F){var Y=F.text.length+A;if(Y>e)return r=e,!0;e-=Y,++R}),K(this,It(R,r))},indexFromPos:function(e){e=K(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var R=this.lineSeparator().length;return this.iter(this.first,e.line,function(A){r+=A.text.length+R}),r},copy:function(e){var r=new Yi(pi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,R=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<R&&(R=e.to);var A=new Yi(pi(this,r,R),e.mode||this.modeOption,r,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}],Cl(A,Us(this)),A},unlinkDoc:function(e){if(e instanceof Jn&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var R=this.linked[r];if(R.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var A=[e.id];Na(e,function(F){return A.push(F.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):Zt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:si(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&pl(this.cm)})}),Yi.prototype.eachLine=Yi.prototype.iter;var Bs=0;function Ol(e){var r=this;if(Ws(r),st(r,e)||fn(r.display,e))return;Ee(e),w&&(Bs=+new Date);var R=ii(r,e,!0),A=e.dataTransfer.files;if(!R||r.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var F=A.length,Y=Array(F),ae=0,de=function(){++ae==F&&oi(r,function(){R=K(r.doc,R);var it={from:R,to:R,text:r.doc.splitLines(Y.filter(function(Tt){return Tt!=null}).join(r.doc.lineSeparator())),origin:"paste"};to(r.doc,it),Ss(r.doc,va(K(r.doc,R),K(r.doc,ga(it))))})()},me=function(it,Tt){if(r.options.allowDropFileTypes&&ce(r.options.allowDropFileTypes,it.type)==-1){de();return}var jt=new FileReader;jt.onerror=function(){return de()},jt.onload=function(){var Jt=jt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Jt)){de();return}Y[Tt]=Jt,de()},jt.readAsText(it)},_e=0;_e<A.length;_e++)me(A[_e],_e);else{if(r.state.draggingText&&r.doc.sel.contains(R)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Be=e.dataTransfer.getData("Text");if(Be){var Xe;if(r.state.draggingText&&!r.state.draggingText.copy&&(Xe=r.listSelections()),Bo(r.doc,va(R,R)),Xe)for(var ut=0;ut<Xe.length;++ut)ro(r.doc,"",Xe[ut].anchor,Xe[ut].head,"drag");r.replaceSelection(Be,"around","paste"),r.display.input.focus()}}catch(it){}}}function Al(e,r){if(w&&(!e.state.draggingText||+new Date-Bs<100)){Le(r);return}if(st(e,r)||fn(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!p){var R=C("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),u&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=ii(e,r);if(!R)return;var A=document.createDocumentFragment();Wi(e,R,A),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,A)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),R=[],A=0;A<r.length;A++){var F=r[A].CodeMirror;F&&R.push(F)}R.length&&R[0].operation(function(){for(var Y=0;Y<R.length;Y++)e(R[Y])})}var zs=!1;function Dl(){if(zs)return;Pl(),zs=!0}function Pl(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(kl)},100))}),Pe(window,"blur",function(){return Hs(ua)})}function kl(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.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 Co=1;Co<=12;Co++)Fa[Co+111]=Fa[Co+63235]="F"+Co;var Da={};Da.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"},Da.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"},Da.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"},Da.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"]},Da.default=s?Da.macDefault:Da.pcDefault;function Ll(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,A,F,Y,ae=0;ae<r.length-1;ae++){var de=r[ae];if(/^(cmd|meta|m)$/i.test(de))Y=!0;else if(/^a(lt)?$/i.test(de))R=!0;else if(/^(c|ctrl|control)$/i.test(de))A=!0;else if(/^s(hift)?$/i.test(de))F=!0;else throw new Error("Unrecognized modifier name: "+de)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),Y&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Ml(e){var r={};for(var R in e)if(e.hasOwnProperty(R)){var A=e[R];if(/^(name|fallthrough|(de|at)tach)$/.test(R))continue;if(A=="..."){delete e[R];continue}for(var F=fe(R.split(" "),Ll),Y=0;Y<F.length;Y++){var ae=void 0,de=void 0;Y==F.length-1?(de=F.join(" "),ae=A):(de=F.slice(0,Y+1).join(" "),ae="...");var me=r[de];if(!me)r[de]=ae;else if(me!=ae)throw new Error("Inconsistent bindings for "+de)}delete e[R]}for(var _e in r)e[_e]=r[_e];return e}function io(e,r,R,A){r=Ko(r);var F=r.call?r.call(e,A):r[e];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&R(F))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return io(e,r.fallthrough,R,A);for(var Y=0;Y<r.fallthrough.length;Y++){var ae=io(e,r.fallthrough[Y],R,A);if(ae)return ae}}}function Ks(e){var r=typeof e=="string"?e:Fa[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Gs(e,r,R){var A=e;return r.altKey&&A!="Alt"&&(e="Alt-"+e),(l?r.metaKey:r.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(l?r.ctrlKey:r.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Vs(e,r){if(u&&e.keyCode==34&&e.char)return!1;var R=Fa[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Gs(R,e,r))}function Ko(e){return typeof e=="string"?Da[e]:e}function ao(e,r){for(var R=e.doc.sel.ranges,A=[],F=0;F<R.length;F++){for(var Y=r(R[F]);A.length&&xr(Y.from,te(A).to)<=0;){var ae=A.pop();if(xr(ae.from,Y.from)<0){Y.from=ae.from;break}}A.push(Y)}Hi(e,function(){for(var de=A.length-1;de>=0;de--)ro(e.doc,"",A[de].from,A[de].to,"+delete");ba(e)})}function as(e,r,R){var A=Oe(e.text,r+R,R);return A<0||A>e.text.length?null:A}function os(e,r,R){var A=as(e,r.ch,R);return A==null?null:new It(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var Y=pt(R,r.doc.direction);if(Y){var ae=F<0?te(Y):Y[0],de=F<0==(ae.level==1),me=de?"after":"before",_e;if(ae.level>0||r.doc.direction=="rtl"){var Be=We(r,R);_e=F<0?R.text.length-1:0;var Xe=Ze(r,Be,_e).top;_e=Qe(function(ut){return Ze(r,Be,ut).top==Xe},F<0==(ae.level==1)?ae.from:ae.to-1,_e),me=="before"&&(_e=as(R,_e,1))}else _e=F<0?ae.to:ae.from;return new It(A,_e,me)}}return new It(A,F<0?R.text.length:0,F<0?"before":"after")}function Il(e,r,R,A){var F=pt(r,e.doc.direction);if(!F)return os(r,R,A);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var Y=ct(F,R.ch,R.sticky),ae=F[Y];if(e.doc.direction=="ltr"&&ae.level%2==0&&(A>0?ae.to>R.ch:ae.from<R.ch))return os(r,R,A);var de=function(dr,br){return as(r,dr instanceof It?dr.ch:dr,br)},me,_e=function(dr){return e.options.lineWrapping?(me=me||We(e,r),Tr(e,r,me,dr)):{begin:0,end:r.text.length}},Be=_e(R.sticky=="before"?de(R,-1):R.ch);if(e.doc.direction=="rtl"||ae.level==1){var Xe=ae.level==1==A<0,ut=de(R,Xe?1:-1);if(ut!=null&&(Xe?ut<=ae.to&&ut<=Be.end:ut>=ae.from&&ut>=Be.begin)){var it=Xe?"before":"after";return new It(R.line,ut,it)}}var Tt=function(dr,br,hr){for(var Rr=function(Kn,Oi){return Oi?new It(R.line,de(Kn,1),"before"):new It(R.line,Kn,"after")};dr>=0&&dr<F.length;dr+=br){var Yr=F[dr],zr=br>0==(Yr.level!=1),yn=zr?hr.begin:de(hr.end,-1);if(Yr.from<=yn&&yn<Yr.to)return Rr(yn,zr);if(yn=zr?Yr.from:de(Yr.to,-1),hr.begin<=yn&&yn<hr.end)return Rr(yn,zr)}},jt=Tt(Y+A,A,Be);if(jt)return jt;var Jt=A>0?Be.end:de(Be.begin,-1);return Jt!=null&&!(A>0&&Jt==r.text.length)&&(jt=Tt(A>0?0:F.length-1,A,_e(Jt)),jt)?jt:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),De)},killLine:function(e){return ao(e,function(r){if(r.empty()){var R=mr(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:It(r.head.line+1,0)}:{from:r.head,to:It(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return ao(e,function(r){return{from:It(r.from().line,0),to:K(e.doc,It(r.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(r){return{from:It(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return ao(e,function(r){var R=e.charCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return{from:A,to:r.from()}})},delWrappedLineRight:function(e){return ao(e,function(r){var R=e.charCoords(r.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:r.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(It(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(It(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Xs(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return $s(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Nl(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div")},Te)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},Te)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return A.ch<e.getLine(A.line).search(/\S/)?$s(e,r.head):A},Te)},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 r=[],R=e.listSelections(),A=e.options.tabSize,F=0;F<R.length;F++){var Y=R[F].from(),ae=V(e.getLine(Y.line),Y.ch,A);r.push(le(A-ae%A))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Hi(e,function(){for(var r=e.listSelections(),R=[],A=0;A<r.length;A++){if(!r[A].empty())continue;var F=r[A].head,Y=mr(e.doc,F.line).text;if(Y){if(F.ch==Y.length&&(F=new It(F.line,F.ch-1)),F.ch>0)F=new It(F.line,F.ch+1),e.replaceRange(Y.charAt(F.ch-1)+Y.charAt(F.ch-2),It(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var ae=mr(e.doc,F.line-1).text;ae&&(F=new It(F.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),It(F.line-1,ae.length-1),F,"+transpose"))}}R.push(new Rn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Hi(e,function(){for(var r=e.listSelections(),R=r.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),r[R].anchor,r[R].head,"+input");r=e.listSelections();for(var A=0;A<r.length;A++)e.indentLine(r[A].from().line,null,!0);ba(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,r){var R=mr(e.doc,r),A=wt(R);return A!=R&&(r=nn(A)),ss(!0,e,A,r,1)}function Nl(e,r){var R=mr(e.doc,r),A=St(R);return A!=R&&(r=nn(A)),ss(!0,e,R,r,-1)}function $s(e,r){var R=Xs(e,r.line),A=mr(e.doc,R.line),F=pt(A,e.doc.direction);if(!F||F[0].level==0){var Y=Math.max(R.ch,A.text.search(/\S/)),ae=r.line==R.line&&r.ch<=Y&&r.ch;return It(R.line,ae?0:Y,R.sticky)}return R}function Go(e,r,R){if(typeof r=="string"&&(r=So[r],!r))return!1;e.display.input.ensurePolled();var A=e.display.shift,F=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),F=r(e)!=Ae}finally{e.display.shift=A,e.state.suppressEdits=!1}return F}function jl(e,r,R){for(var A=0;A<e.state.keyMaps.length;A++){var F=io(r,e.state.keyMaps[A],R,e);if(F)return F}return e.options.extraKeys&&io(r,e.options.extraKeys,R,e)||io(r,e.options.keyMap,R,e)}var Fl=new ie;function To(e,r,R,A){var F=e.state.keySeq;if(F){if(Ks(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==F&&(e.state.keySeq=null,e.display.input.reset())}),Ys(e,F+" "+r,R,A))return!0}return Ys(e,r,R,A)}function Ys(e,r,R,A){var F=jl(e,r,A);return F=="multi"&&(e.state.keySeq=r),F=="handled"&&Kt(e,"keyHandled",e,r,R),(F=="handled"||F=="multi")&&(Ee(R),qn(e)),!!F}function Js(e,r){var R=Vs(r,!0);return R?r.shiftKey&&!e.state.keySeq?To(e,"Shift-"+R,r,function(A){return Go(e,A,!0)})||To(e,R,r,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Go(e,A)}):To(e,R,r,function(A){return Go(e,A)}):!1}function Ul(e,r,R){return To(e,"'"+R+"'",r,function(A){return Go(e,A,!0)})}var ls=null;function Qs(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=H(),st(r,e))return;w&&d<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var A=Js(r,e);u&&(ls=A?R:null,!A&&R==88&&!jr&&(s?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),S&&!s&&!A&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Bl(r)}function Bl(e){var r=e.display.lineDiv;W(r,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(x(r,"CodeMirror-crosshair"),ft(document,"keyup",R),ft(document,"mouseover",R))}Pe(document,"keyup",R),Pe(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function el(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(fn(r.display,e)||st(r,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(u&&R==ls){ls=null,Ee(e);return}if(u&&(!e.which||e.which<10)&&Js(r,e))return;var F=String.fromCharCode(A==null?R:A);if(F=="\b")return;if(Ul(r,e,F))return;r.display.input.onKeyPress(e)}var Wl=400,us=function(e,r,R){this.time=e,this.pos=r,this.button=R};us.prototype.compare=function(e,r,R){return this.time+Wl>e&&xr(r,this.pos)==0&&R==this.button};var Oo,Ao;function Hl(e,r){var R=+new Date;return Ao&&Ao.compare(R,e,r)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(R,e,r)?(Ao=new us(R,e,r),Oo=null,"double"):(Oo=new us(R,e,r),Ao=null,"single")}function tl(e){var r=this,R=r.display;if(st(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,fn(R,e)){o||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=ii(r,e),F=tt(e),Y=A?Hl(A,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),A&&zl(r,F,A,Y,e))return;F==1?A?Gl(r,A,Y,e):Ye(e)==R.scroller&&Ee(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(k?r.display.input.onContextMenu(e):wa(r))}function zl(e,r,R,A,F){var Y="Click";return A=="double"?Y="Double"+Y:A=="triple"&&(Y="Triple"+Y),Y=(r==1?"Left":r==2?"Middle":"Right")+Y,To(e,Gs(Y,F),F,function(ae){if(typeof ae=="string"&&(ae=So[ae]),!ae)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=ae(e,R)!=Ae}finally{e.state.suppressEdits=!1}return de})}function Kl(e,r,R){var A=e.getOption("configureMouse"),F=A?A(e,r,R):{};if(F.unit==null){var Y=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=Y?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||R.shiftKey),F.addNew==null&&(F.addNew=s?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(s?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){w?setTimeout(B(Ba,e),0):e.curOp.focus=H();var F=Kl(e,R,A),Y=e.doc.sel,ae;e.options.dragDrop&&Ct&&!e.isReadOnly()&&R=="single"&&(ae=Y.contains(r))>-1&&(xr((ae=Y.ranges[ae]).from(),r)<0||r.xRel>0)&&(xr(ae.to(),r)>0||r.xRel<0)?Vl(e,A,r,F):Xl(e,A,r,F)}function Vl(e,r,R,A){var F=e.display,Y=!1,ae=oi(e,function(_e){o&&(F.scroller.draggable=!1),e.state.draggingText=!1,ft(F.wrapper.ownerDocument,"mouseup",ae),ft(F.wrapper.ownerDocument,"mousemove",de),ft(F.scroller,"dragstart",me),ft(F.scroller,"drop",ae),Y||(Ee(_e),A.addNew||Uo(e.doc,R,null,null,A.extend),o&&!p||w&&d==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),de=function(_e){Y=Y||Math.abs(r.clientX-_e.clientX)+Math.abs(r.clientY-_e.clientY)>=10},me=function(){return Y=!0};o&&(F.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Pe(F.wrapper.ownerDocument,"mouseup",ae),Pe(F.wrapper.ownerDocument,"mousemove",de),Pe(F.scroller,"dragstart",me),Pe(F.scroller,"drop",ae),wa(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,r,R){if(R=="char")return new Rn(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new Rn(It(r.line,0),K(e.doc,It(r.line+1,0)));var A=R(e,r);return new Rn(A.from,A.to)}function Xl(e,r,R,A){var F=e.display,Y=e.doc;Ee(r);var ae,de,me=Y.sel,_e=me.ranges;if(A.addNew&&!A.extend?(de=Y.sel.contains(R),de>-1?ae=_e[de]:ae=new Rn(R,R)):(ae=Y.sel.primary(),de=Y.sel.primIndex),A.unit=="rectangle")A.addNew||(ae=new Rn(R,R)),R=ii(e,r,!0,!0),de=-1;else{var Be=rl(e,R,A.unit);A.extend?ae=ns(ae,Be.anchor,Be.head,A.extend):ae=Be}A.addNew?de==-1?(de=_e.length,Ii(Y,aa(e,_e.concat([ae]),de),{scroll:!1,origin:"*mouse"})):_e.length>1&&_e[de].empty()&&A.unit=="char"&&!A.extend?(Ii(Y,aa(e,_e.slice(0,de).concat(_e.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),me=Y.sel):is(Y,de,ae,pe):(de=0,Ii(Y,new Ki([ae],0),pe),me=Y.sel);var Xe=R;function ut(hr){if(xr(Xe,hr)==0)return;if(Xe=hr,A.unit=="rectangle"){for(var Rr=[],Yr=e.options.tabSize,zr=V(mr(Y,R.line).text,R.ch,Yr),yn=V(mr(Y,hr.line).text,hr.ch,Yr),Kn=Math.min(zr,yn),Oi=Math.max(zr,yn),ei=Math.min(R.line,hr.line),ea=Math.min(e.lastLine(),Math.max(R.line,hr.line));ei<=ea;ei++){var Ji=mr(Y,ei).text,hi=ye(Ji,Kn,Yr);Kn==Oi?Rr.push(new Rn(It(ei,hi),It(ei,hi))):Ji.length>hi&&Rr.push(new Rn(It(ei,hi),It(ei,ye(Ji,Oi,Yr))))}Rr.length||Rr.push(new Rn(R,R)),Ii(Y,aa(e,me.ranges.slice(0,de).concat(Rr),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(hr)}else{var Qi=ae,Li=rl(e,hr,A.unit),wi=Qi.anchor,fi;xr(Li.anchor,wi)>0?(fi=Li.head,wi=Di(Qi.from(),Li.anchor)):(fi=Li.anchor,wi=Ri(Qi.to(),Li.head));var ai=me.ranges.slice(0);ai[de]=$l(e,new Rn(K(Y,wi),fi)),Ii(Y,aa(e,ai,de),pe)}}var it=F.wrapper.getBoundingClientRect(),Tt=0;function jt(hr){var Rr=++Tt,Yr=ii(e,hr,!0,A.unit=="rectangle");if(!Yr)return;if(xr(Yr,Xe)!=0){e.curOp.focus=H(),ut(Yr);var zr=La(F,Y);(Yr.line>=zr.to||Yr.line<zr.from)&&setTimeout(oi(e,function(){Tt==Rr&&jt(hr)}),150)}else{var yn=hr.clientY<it.top?-20:hr.clientY>it.bottom?20:0;yn&&setTimeout(oi(e,function(){if(Tt!=Rr)return;F.scroller.scrollTop+=yn,jt(hr)}),50)}}function Jt(hr){e.state.selectingText=!1,Tt=Infinity,hr&&(Ee(hr),F.input.focus()),ft(F.wrapper.ownerDocument,"mousemove",dr),ft(F.wrapper.ownerDocument,"mouseup",br),Y.history.lastSelOrigin=null}var dr=oi(e,function(hr){hr.buttons===0||!tt(hr)?Jt(hr):jt(hr)}),br=oi(e,Jt);e.state.selectingText=br,Pe(F.wrapper.ownerDocument,"mousemove",dr),Pe(F.wrapper.ownerDocument,"mouseup",br)}function $l(e,r){var R=r.anchor,A=r.head,F=mr(e.doc,R.line);if(xr(R,A)==0&&R.sticky==A.sticky)return r;var Y=pt(F);if(!Y)return r;var ae=ct(Y,R.ch,R.sticky),de=Y[ae];if(de.from!=R.ch&&de.to!=R.ch)return r;var me=ae+(de.from==R.ch==(de.level!=1)?0:1);if(me==0||me==Y.length)return r;var _e;if(A.line!=R.line)_e=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=ct(Y,A.ch,A.sticky),Xe=Be-ae||(A.ch-R.ch)*(de.level==1?-1:1);Be==me-1||Be==me?_e=Xe<0:_e=Xe>0}var ut=Y[me+(_e?-1:0)],it=_e==(ut.level==1),Tt=it?ut.from:ut.to,jt=it?"after":"before";return R.ch==Tt&&R.sticky==jt?r:new Rn(new It(R.line,Tt,jt),A)}function nl(e,r,R,A){var F,Y;if(r.touches)F=r.touches[0].clientX,Y=r.touches[0].clientY;else try{F=r.clientX,Y=r.clientY}catch(ut){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&Ee(r);var ae=e.display,de=ae.lineDiv.getBoundingClientRect();if(Y>de.bottom||!Me(e,R))return Re(r);Y-=de.top-ae.viewOffset;for(var me=0;me<e.display.gutterSpecs.length;++me){var _e=ae.gutters.childNodes[me];if(_e&&_e.getBoundingClientRect().right>=F){var Be=Bn(e.doc,Y),Xe=e.display.gutterSpecs[me];return Je(e,R,e,Be,Xe.className,r),Re(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function il(e,r){if(fn(e.display,r)||Yl(e,r))return;if(st(e,r,"contextmenu"))return;k||e.display.input.onContextMenu(r)}function Yl(e,r){return Me(e,"gutterContextMenu")?nl(e,r,"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 r=e.optionHandlers;function R(A,F,Y,ae){e.defaults[A]=F,Y&&(r[A]=ae?function(de,me,_e){_e!=oo&&Y(de,me,_e)}:Y)}e.defineOption=R,e.Init=oo,R("value","",function(A,F){return A.setValue(F)},!0),R("mode",null,function(A,F){A.doc.modeOption=F,Ra(A)},!0),R("indentUnit",2,Ra,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),Zr(A),Nn(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var Y=[],ae=A.doc.first;A.doc.iter(function(me){for(var _e=0;;){var Be=me.text.indexOf(F,_e);if(Be==-1)break;_e=Be+F.length,Y.push(It(ae,Be))}ae++});for(var de=Y.length-1;de>=0;de--)ro(A.doc,F,Y[de],It(Y[de].line,Y[de].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,Y){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),Y!=oo&&A.refresh()}),R("specialCharPlaceholder",Ft,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",i?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!T),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){al(A),ma(A)},!0),R("keyMap","default",function(A,F,Y){var ae=Ko(F),de=Y!=oo&&Ko(Y);de&&de.detach&&de.detach(A,ae),ae.attach&&ae.attach(A,de||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=zi(F,A.options.lineNumbers),ma(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?di(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return fr(A)},!0),R("scrollbarStyle","native",function(A){pa(A),fr(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,F){A.display.gutterSpecs=zi(A.options.gutters,F),ma(A)},!0),R("firstLineNumber",1,ma,!0),R("lineNumberFormatter",function(A){return A},ma,!0),R("showCursorWhenSelecting",!1,An,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ua(A),A.display.input.blur()),A.display.input.readOnlyChanged(F)}),R("screenReaderLabel",null,function(A,F){F=F===""?null:F,A.display.input.screenReaderLabelChanged(F)}),R("disableInput",!1,function(A,F){F||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,An,!0),R("singleCursorHeightPerLine",!0,An,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,vo,!0),R("addModeClass",!1,vo,!0),R("pollInterval",100),R("undoDepth",200,function(A,F){return A.doc.history.undoDepth=F}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,vo,!0),R("moveInputWithCursor",!0,function(A,F){F||A.display.input.resetPosition()}),R("tabindex",null,function(A,F){return A.display.input.getField().tabIndex=F||""}),R("autofocus",null),R("direction","ltr",function(A,F){return A.doc.setDirection(F)},!0),R("phrases",null)}function Ql(e,r,R){var A=R&&R!=oo;if(!r!=!A){var F=e.display.dragFunctions,Y=r?Pe:ft;Y(e.display.scroller,"dragstart",F.start),Y(e.display.scroller,"dragenter",F.enter),Y(e.display.scroller,"dragover",F.over),Y(e.display.scroller,"dragleave",F.leave),Y(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(x(e.display.wrapper,"CodeMirror-wrap"),Sr(e)),Ti(e),Nn(e),Zr(e),setTimeout(function(){return fr(e)},100)}function Jn(e,r){var R=this;if(!(this instanceof Jn))return new Jn(e,r);this.options=r=r?z(r):{},z(ol,r,!1);var A=r.value;typeof A=="string"?A=new Yi(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Jn.inputStyles[r.inputStyle](this),Y=this.display=new Ka(e,A,F,r);Y.wrapper.CodeMirror=this,al(this),r.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 ie,keySeq:null,specialChars:null},r.autofocus&&!i&&Y.input.focus(),w&&d<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),jn(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!i||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&la(R)},20):ua(this);for(var ae in Vo)Vo.hasOwnProperty(ae)&&Vo[ae](this,r[ae],oo);xi(this),r.finishInit&&r.finishInit(this);for(var de=0;de<ds.length;++de)ds[de](this);Oa(this),o&&r.lineWrapping&&getComputedStyle(Y.lineDiv).textRendering=="optimizelegibility"&&(Y.lineDiv.style.textRendering="auto")}Jn.defaults=ol,Jn.optionHandlers=Vo;function ql(e){var r=e.display;Pe(r.scroller,"mousedown",oi(e,tl)),w&&d<11?Pe(r.scroller,"dblclick",oi(e,function(me){if(st(e,me))return;var _e=ii(e,me);if(!_e||cs(e,me)||fn(e.display,me))return;Ee(me);var Be=e.findWordAt(_e);Uo(e.doc,Be.anchor,Be.head)})):Pe(r.scroller,"dblclick",function(me){return st(e,me)||Ee(me)}),Pe(r.scroller,"contextmenu",function(me){return il(e,me)}),Pe(r.input.getField(),"contextmenu",function(me){r.scroller.contains(me.target)||il(e,me)});var R,A={end:0};function F(){r.activeTouch&&(R=setTimeout(function(){return r.activeTouch=null},1e3),A=r.activeTouch,A.end=+new Date)}function Y(me){if(me.touches.length!=1)return!1;var _e=me.touches[0];return _e.radiusX<=1&&_e.radiusY<=1}function ae(me,_e){if(_e.left==null)return!0;var Be=_e.left-me.left,Xe=_e.top-me.top;return Be*Be+Xe*Xe>20*20}Pe(r.scroller,"touchstart",function(me){if(!st(e,me)&&!Y(me)&&!cs(e,me)){r.input.ensurePolled(),clearTimeout(R);var _e=+new Date;r.activeTouch={start:_e,moved:!1,prev:_e-A.end<=300?A:null},me.touches.length==1&&(r.activeTouch.left=me.touches[0].pageX,r.activeTouch.top=me.touches[0].pageY)}}),Pe(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Pe(r.scroller,"touchend",function(me){var _e=r.activeTouch;if(_e&&!fn(r,me)&&_e.left!=null&&!_e.moved&&new Date-_e.start<300){var Be=e.coordsChar(r.activeTouch,"page"),Xe;!_e.prev||ae(_e,_e.prev)?Xe=new Rn(Be,Be):!_e.prev.prev||ae(_e,_e.prev.prev)?Xe=e.findWordAt(Be):Xe=new Rn(It(Be.line,0),K(e.doc,It(Be.line+1,0))),e.setSelection(Xe.anchor,Xe.head),e.focus(),Ee(me)}F()}),Pe(r.scroller,"touchcancel",F),Pe(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ha(e,r.scroller.scrollTop),$i(e,r.scroller.scrollLeft,!0),Je(e,"scroll",e))}),Pe(r.scroller,"mousewheel",function(me){return po(e,me)}),Pe(r.scroller,"DOMMouseScroll",function(me){return po(e,me)}),Pe(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(me){st(e,me)||Le(me)},over:function(me){st(e,me)||(Rl(e,me),Le(me))},start:function(me){return Al(e,me)},drop:oi(e,Ol),leave:function(me){st(e,me)||Ws(e)}};var de=r.input.getField();Pe(de,"keyup",function(me){return Zs.call(e,me)}),Pe(de,"keydown",oi(e,Qs)),Pe(de,"keypress",oi(e,el)),Pe(de,"focus",function(me){return la(e,me)}),Pe(de,"blur",function(me){return ua(e,me)})}var ds=[];Jn.defineInitHook=function(e){return ds.push(e)};function Ro(e,r,R,A){var F=e.doc,Y;R==null&&(R="add"),R=="smart"&&(F.mode.indent?Y=lt(e,r).state:R="prev");var ae=e.options.tabSize,de=mr(F,r),me=V(de.text,null,ae);de.stateAfter&&(de.stateAfter=null);var _e=de.text.match(/^\s*/)[0],Be;if(!A&&!/\S/.test(de.text))Be=0,R="not";else if(R=="smart"&&(Be=F.mode.indent(Y,de.text.slice(_e.length),de.text),Be==Ae||Be>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Be=V(mr(F,r-1).text,null,ae):Be=0:R=="add"?Be=me+e.options.indentUnit:R=="subtract"?Be=me-e.options.indentUnit:typeof R=="number"&&(Be=me+R),Be=Math.max(0,Be);var Xe="",ut=0;if(e.options.indentWithTabs)for(var it=Math.floor(Be/ae);it;--it)ut+=ae,Xe+=" ";if(ut<Be&&(Xe+=le(Be-ut)),Xe!=_e)return ro(F,Xe,It(r,0),It(r,_e.length),"+input"),de.stateAfter=null,!0;for(var Tt=0;Tt<F.sel.ranges.length;Tt++){var jt=F.sel.ranges[Tt];if(jt.head.line==r&&jt.head.ch<_e.length){var Jt=It(r,_e.length);is(F,Tt,new Rn(Jt,Jt));break}}}var ya=null;function Xo(e){ya=e}function hs(e,r,R,A,F){var Y=e.doc;e.display.shift=!1,A||(A=Y.sel);var ae=+new Date-200,de=F=="paste"||e.state.pasteIncoming>ae,me=Zt(r),_e=null;if(de&&A.ranges.length>1)if(ya&&ya.text.join(`
`)==r){if(A.ranges.length%ya.text.length==0){_e=[];for(var Be=0;Be<ya.text.length;Be++)_e.push(Y.splitLines(ya.text[Be]))}}else me.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(_e=fe(me,function(dr){return[dr]}));for(var Xe=e.curOp.updateInput,ut=A.ranges.length-1;ut>=0;ut--){var it=A.ranges[ut],Tt=it.from(),jt=it.to();it.empty()&&(R&&R>0?Tt=It(Tt.line,Tt.ch-R):e.state.overwrite&&!de?jt=It(jt.line,Math.min(mr(Y,jt.line).text.length,jt.ch+te(me).length)):de&&ya&&ya.lineWise&&ya.text.join(`
`)==me.join(`
`)&&(Tt=jt=It(Tt.line,0)));var Jt={from:Tt,to:jt,text:_e?_e[ut%_e.length]:me,origin:F||(de?"paste":e.state.cutIncoming>ae?"cut":"+input")};to(e.doc,Jt),Kt(e,"inputRead",e,Jt)}r&&!de&&ll(e,r),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Xe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Hi(r,function(){return hs(r,R,0,null,"paste")}),!0}function ll(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var Y=e.getModeAt(F.head),ae=!1;if(Y.electricChars){for(var de=0;de<Y.electricChars.length;de++)if(r.indexOf(Y.electricChars.charAt(de))>-1){ae=Ro(e,F.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(mr(e.doc,F.head.line).text.slice(0,F.head.ch))&&(ae=Ro(e,F.head.line,"smart")));ae&&Kt(e,"electricInput",e,F.head.line)}}function ul(e){for(var r=[],R=[],A=0;A<e.doc.sel.ranges.length;A++){var F=e.doc.sel.ranges[A].head.line,Y={anchor:It(F,0),head:It(F+1,0)};R.push(Y),r.push(e.getRange(Y.anchor,Y.head))}return{text:r,ranges:R}}function cl(e,r,R,A){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!r)}function dl(){var e=C("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=C("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return o?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),cl(e),r}function eu(e){var r=e.optionHandlers,R=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,F){var Y=this.options,ae=Y[A];if(Y[A]==F&&A!="mode")return;Y[A]=F,r.hasOwnProperty(A)&&oi(this,r[A])(this,F,ae),Je(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,F){this.state.keyMaps[F?"push":"unshift"](Ko(A))},removeKeyMap:function(A){for(var F=this.state.keyMaps,Y=0;Y<F.length;++Y)if(F[Y]==A||F[Y].name==A)return F.splice(Y,1),!0},addOverlay:ki(function(A,F){var Y=A.token?A:e.getMode(this.options,A);if(Y.startState)throw new Error("Overlays may not be stateful.");q(this.state.overlays,{mode:Y,modeSpec:A,opaque:F&&F.opaque,priority:F&&F.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Nn(this)}),removeOverlay:ki(function(A){for(var F=this.state.overlays,Y=0;Y<F.length;++Y){var ae=F[Y].modeSpec;if(ae==A||typeof A=="string"&&ae.name==A){F.splice(Y,1),this.state.modeGen++,Nn(this);return}}}),indentLine:ki(function(A,F,Y){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),Si(this.doc,A)&&Ro(this,A,F,Y)}),indentSelection:ki(function(A){for(var F=this.doc.sel.ranges,Y=-1,ae=0;ae<F.length;ae++){var de=F[ae];if(de.empty())de.head.line>Y&&(Ro(this,de.head.line,A,!0),Y=de.head.line,ae==this.doc.sel.primIndex&&ba(this));else{var me=de.from(),_e=de.to(),Be=Math.max(Y,me.line);Y=Math.min(this.lastLine(),_e.line-(_e.ch?0:1))+1;for(var Xe=Be;Xe<Y;++Xe)Ro(this,Xe,A);var ut=this.doc.sel.ranges;me.ch==0&&F.length==ut.length&&ut[ae].from().ch>0&&is(this.doc,ae,new Rn(me,ut[ae].to()),De)}}}),getTokenAt:function(A,F){return cn(this,A,F)},getLineTokens:function(A,F){return cn(this,It(A),F,!0)},getTokenTypeAt:function(A){A=K(this.doc,A);var F=Ot(this,mr(this.doc,A.line)),Y=0,ae=(F.length-1)/2,de=A.ch,me;if(de==0)me=F[2];else for(;;){var _e=Y+ae>>1;if((_e?F[_e*2-1]:0)>=de)ae=_e;else if(F[_e*2+1]<de)Y=_e+1;else{me=F[_e*2+2];break}}var Be=me?me.indexOf("overlay "):-1;return Be<0?me:Be==0?null:me.slice(0,Be-1)},getModeAt:function(A){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(A).state).mode:F},getHelper:function(A,F){return this.getHelpers(A,F)[0]},getHelpers:function(A,F){var Y=[];if(!R.hasOwnProperty(F))return Y;var ae=R[F],de=this.getModeAt(A);if(typeof de[F]=="string")ae[de[F]]&&Y.push(ae[de[F]]);else if(de[F])for(var me=0;me<de[F].length;me++){var _e=ae[de[F][me]];_e&&Y.push(_e)}else de.helperType&&ae[de.helperType]?Y.push(ae[de.helperType]):ae[de.name]&&Y.push(ae[de.name]);for(var Be=0;Be<ae._global.length;Be++){var Xe=ae._global[Be];Xe.pred(de,this)&&ce(Y,Xe.val)==-1&&Y.push(Xe.val)}return Y},getStateAfter:function(A,F){var Y=this.doc;return A=se(Y,A==null?Y.first+Y.size-1:A),lt(this,A+1,F).state},cursorCoords:function(A,F){var Y,ae=this.doc.sel.primary();return A==null?Y=ae.head:typeof A=="object"?Y=K(this.doc,A):Y=A?ae.from():ae.to(),dn(this,Y,F||"page")},charCoords:function(A,F){return Pn(this,K(this.doc,A),F||"page")},coordsChar:function(A,F){return A=ln(this,A,F||"page"),on(this,A.left,A.top)},lineAtHeight:function(A,F){return A=ln(this,{top:A,left:0},F||"page").top,Bn(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,Y){var ae=!1,de;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,ae=!0),de=mr(this.doc,A)}else de=A;return vn(this,de,{top:0,left:0},F||"page",Y||ae).top+(ae?this.doc.height-sr(de):0)},defaultTextHeight:function(){return Yn(this.display)},defaultCharWidth:function(){return ni(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,Y,ae,de){var me=this.display;A=dn(this,K(this.doc,A));var _e=A.bottom,Be=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),me.sizer.appendChild(F),ae=="over")_e=A.top;else if(ae=="above"||ae=="near"){var Xe=Math.max(me.wrapper.clientHeight,this.doc.height),ut=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(ae=="above"||A.bottom+F.offsetHeight>Xe)&&A.top>F.offsetHeight?_e=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=Xe&&(_e=A.bottom),Be+F.offsetWidth>ut&&(Be=ut-F.offsetWidth)}F.style.top=_e+"px",F.style.left=F.style.right="",de=="right"?(Be=me.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(de=="left"?Be=0:de=="middle"&&(Be=(me.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Be+"px"),Y&&Ma(this,{left:Be,top:_e,right:Be+F.offsetWidth,bottom:_e+F.offsetHeight})},triggerOnKeyDown:ki(Qs),triggerOnKeyPress:ki(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ki(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:ki(function(A){ll(this,A)}),findPosH:function(A,F,Y,ae){var de=1;F<0&&(de=-1,F=-F);for(var me=K(this.doc,A),_e=0;_e<F&&!(me=fs(this.doc,me,de,Y,ae),me.hitSide);++_e);return me},moveH:ki(function(A,F){var Y=this;this.extendSelectionsBy(function(ae){return Y.display.shift||Y.doc.extend||ae.empty()?fs(Y.doc,ae.head,A,F,Y.options.rtlMoveVisually):A<0?ae.from():ae.to()},Te)}),deleteH:ki(function(A,F){var Y=this.doc.sel,ae=this.doc;Y.somethingSelected()?ae.replaceSelection("",null,"+delete"):ao(this,function(de){var me=fs(ae,de.head,A,F,!1);return A<0?{from:me,to:de.head}:{from:de.head,to:me}})}),findPosV:function(A,F,Y,ae){var de=1,me=ae;F<0&&(de=-1,F=-F);for(var _e=K(this.doc,A),Be=0;Be<F;++Be){var Xe=dn(this,_e,"div");if(me==null?me=Xe.left:Xe.left=me,_e=hl(this,Xe,de,Y),_e.hitSide)break}return _e},moveV:ki(function(A,F){var Y=this,ae=this.doc,de=[],me=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(Be){if(me)return A<0?Be.from():Be.to();var Xe=dn(Y,Be.head,"div");Be.goalColumn!=null&&(Xe.left=Be.goalColumn),de.push(Xe.left);var ut=hl(Y,Xe,A,F);return F=="page"&&Be==ae.sel.primary()&&Sa(Y,Pn(Y,ut,"div").top-Xe.top),ut},Te),de.length)for(var _e=0;_e<ae.sel.ranges.length;_e++)ae.sel.ranges[_e].goalColumn=de[_e]}),findWordAt:function(A){var F=this.doc,Y=mr(F,A.line).text,ae=A.ch,de=A.ch;if(Y){var me=this.getHelper(A,"wordChars");(A.sticky=="before"||de==Y.length)&&ae?--ae:++de;for(var _e=Y.charAt(ae),Be=X(_e,me)?function(Xe){return X(Xe,me)}:/\s/.test(_e)?function(Xe){return/\s/.test(Xe)}:function(Xe){return!/\s/.test(Xe)&&!X(Xe)};ae>0&&Be(Y.charAt(ae-1));)--ae;for(;de<Y.length&&Be(Y.charAt(de));)++de}return new Rn(It(A.line,ae),It(A.line,de))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):x(this.display.cursorDiv,"CodeMirror-overwrite"),Je(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==H()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ki(function(A,F){da(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-$e(this)-this.display.barHeight,width:A.scrollWidth-$e(this)-this.display.barWidth,clientHeight:be(this),clientWidth:Fe(this)}},scrollIntoView:ki(function(A,F){A==null?(A={from:this.doc.sel.primary().head,to:null},F==null&&(F=this.options.cursorScrollMargin)):typeof A=="number"?A={from:It(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=F||0,A.from.line!=null?co(this,A):Ta(this,A.from,A.to,A.margin)}),setSize:ki(function(A,F){var Y=this,ae=function(me){return typeof me=="number"||/^\d+$/.test(String(me))?me+"px":me};A!=null&&(this.display.wrapper.style.width=ae(A)),F!=null&&(this.display.wrapper.style.height=ae(F)),this.options.lineWrapping&&Xr(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(me){if(me.widgets){for(var _e=0;_e<me.widgets.length;_e++)if(me.widgets[_e].noHScroll){zn(Y,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,Je(this,"refresh",this)}),operation:function(A){return Hi(this,A)},startOperation:function(){return jn(this)},endOperation:function(){return Oa(this)},refresh:ki(function(){var A=this.display.cachedTextHeight;Nn(this),this.curOp.forceUpdate=!0,Zr(this),da(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(A==null||Math.abs(A-Yn(this.display))>.5||this.options.lineWrapping)&&Ti(this),Je(this,"refresh",this)}),swapDoc:ki(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),Zr(this),this.display.input.reset(),da(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Kt(this,"swapDoc",this,F),F}),phrase:function(A){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,A)?F[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}},Ne(e),e.registerHelper=function(A,F,Y){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=Y},e.registerGlobalHelper=function(A,F,Y,ae){e.registerHelper(A,F,ae),R[A]._global.push({pred:Y,val:ae})}}function fs(e,r,R,A,F){var Y=r,ae=R,de=mr(e,r.line),me=F&&e.direction=="rtl"?-R:R;function _e(){var br=r.line+me;return br<e.first||br>=e.first+e.size?!1:(r=new It(br,r.ch,r.sticky),de=mr(e,br))}function Be(br){var hr;if(A=="codepoint"){var Rr=de.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(Rr)?hr=null:hr=new It(r.line,Math.max(0,Math.min(de.text.length,r.ch+R*(Rr>=55296&&Rr<56320?2:1))),-R)}else F?hr=Il(e.cm,de,r,R):hr=os(de,r,R);if(hr==null)if(!br&&_e())r=ss(F,e.cm,de,r.line,me);else return!1;else r=hr;return!0}if(A=="char"||A=="codepoint")Be();else if(A=="column")Be(!0);else if(A=="word"||A=="group")for(var Xe=null,ut=A=="group",it=e.cm&&e.cm.getHelper(r,"wordChars"),Tt=!0;!(R<0&&!Be(!Tt));Tt=!1){var jt=de.text.charAt(r.ch)||`
`,Jt=X(jt,it)?"w":ut&&jt==`
`?"n":!ut||/\s/.test(jt)?null:"p";if(ut&&!Tt&&!Jt&&(Jt="s"),Xe&&Xe!=Jt){R<0&&(R=1,Be(),r.sticky="after");break}if(Jt&&(Xe=Jt),R>0&&!Be(!Tt))break}var dr=Wo(e,r,Y,ae,!0);return ti(Y,dr)&&(dr.hitSide=!0),dr}function hl(e,r,R,A){var F=e.doc,Y=r.left,ae;if(A=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(de-.5*Yn(e.display),3);ae=(R>0?r.bottom:r.top)+R*me}else A=="line"&&(ae=R>0?r.bottom+3:r.top-3);for(var _e;!(_e=on(e,Y,ae),!_e.outside);){if(R<0?ae<=0:ae>=F.height){_e.hitSide=!0;break}ae+=R*5}return _e}var Fn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ie,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fn.prototype.init=function(e){var r=this,R=this,A=R.cm,F=R.div=e.lineDiv;cl(F,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function Y(de){for(var me=de.target;me;me=me.parentNode){if(me==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}Pe(F,"paste",function(de){if(!Y(de)||st(A,de)||sl(de,A))return;d<=11&&setTimeout(oi(A,function(){return r.updateFromDOM()}),20)}),Pe(F,"compositionstart",function(de){r.composing={data:de.data,done:!1}}),Pe(F,"compositionupdate",function(de){r.composing||(r.composing={data:de.data,done:!1})}),Pe(F,"compositionend",function(de){r.composing&&(de.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Pe(F,"touchstart",function(){return R.forceCompositionEnd()}),Pe(F,"input",function(){r.composing||r.readFromDOMSoon()});function ae(de){if(!Y(de)||st(A,de))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()}),de.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var me=ul(A);Xo({lineWise:!0,text:me.text}),de.type=="cut"&&A.operation(function(){A.setSelections(me.ranges,0,De),A.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var _e=ya.text.join(`
`);if(de.clipboardData.setData("Text",_e),de.clipboardData.getData("Text")==_e){de.preventDefault();return}}var Be=dl(),Xe=Be.firstChild;A.display.lineSpace.insertBefore(Be,A.display.lineSpace.firstChild),Xe.value=ya.text.join(`
`);var ut=document.activeElement;G(Xe),setTimeout(function(){A.display.lineSpace.removeChild(Be),ut.focus(),ut==F&&R.showPrimarySelection()},50)}Pe(F,"copy",ae),Pe(F,"cut",ae)},Fn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=Bi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Fn.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Fn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fn.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),A=R.from(),F=R.to();if(r.display.viewTo==r.display.viewFrom||A.line>=r.display.viewTo||F.line<r.display.viewFrom){e.removeAllRanges();return}var Y=$o(r,e.anchorNode,e.anchorOffset),ae=$o(r,e.focusNode,e.focusOffset);if(Y&&!Y.bad&&ae&&!ae.bad&&xr(Di(Y,ae),A)==0&&xr(Ri(Y,ae),F)==0)return;var de=r.display.view,me=A.line>=r.display.viewFrom&&fl(r,A)||{node:de[0].measure.map[2],offset:0},_e=F.line<r.display.viewTo&&fl(r,F);if(!_e){var Be=de[de.length-1].measure,Xe=Be.maps?Be.maps[Be.maps.length-1]:Be.map;_e={node:Xe[Xe.length-1],offset:Xe[Xe.length-2]-Xe[Xe.length-3]}}if(!me||!_e){e.removeAllRanges();return}var ut=e.rangeCount&&e.getRangeAt(0),it;try{it=j(me.node,me.offset,_e.offset,_e.node)}catch(Tt){}it&&(!S&&r.state.focused?(e.collapse(me.node,me.offset),it.collapsed||(e.removeAllRanges(),e.addRange(it))):(e.removeAllRanges(),e.addRange(it)),ut&&e.anchorNode==null?e.addRange(ut):S&&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 r=e.getRangeAt(0).commonAncestorContainer;return L(this.div,r)},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():Hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},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(),r=this.cm;if(b&&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 R=$o(r,e.anchorNode,e.anchorOffset),A=$o(r,e.focusNode,e.focusOffset);R&&A&&Hi(r,function(){Ii(r.doc,va(R,A),De),(R.bad||A.bad)&&(r.curOp.selectionChanged=!0)})},Fn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,R=e.doc.sel.primary(),A=R.from(),F=R.to();if(A.ch==0&&A.line>e.firstLine()&&(A=It(A.line-1,mr(e.doc,A.line-1).length)),F.ch==mr(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=It(F.line+1,0)),A.line<r.viewFrom||F.line>r.viewTo-1)return!1;var Y,ae,de;A.line==r.viewFrom||(Y=In(e,A.line))==0?(ae=nn(r.view[0].line),de=r.view[0].node):(ae=nn(r.view[Y].line),de=r.view[Y-1].node.nextSibling);var me=In(e,F.line),_e,Be;if(me==r.view.length-1?(_e=r.viewTo-1,Be=r.lineDiv.lastChild):(_e=nn(r.view[me+1].line)-1,Be=r.view[me+1].node.previousSibling),!de)return!1;for(var Xe=e.doc.splitLines(ru(e,de,Be,ae,_e)),ut=Vn(e.doc,It(ae,0),It(_e,mr(e.doc,_e).text.length));Xe.length>1&&ut.length>1;)if(te(Xe)==te(ut))Xe.pop(),ut.pop(),_e--;else if(Xe[0]==ut[0])Xe.shift(),ut.shift(),ae++;else break;for(var it=0,Tt=0,jt=Xe[0],Jt=ut[0],dr=Math.min(jt.length,Jt.length);it<dr&&jt.charCodeAt(it)==Jt.charCodeAt(it);)++it;for(var br=te(Xe),hr=te(ut),Rr=Math.min(br.length-(Xe.length==1?it:0),hr.length-(ut.length==1?it:0));Tt<Rr&&br.charCodeAt(br.length-Tt-1)==hr.charCodeAt(hr.length-Tt-1);)++Tt;if(Xe.length==1&&ut.length==1&&ae==A.line)for(;it&&it>A.ch&&br.charCodeAt(br.length-Tt-1)==hr.charCodeAt(hr.length-Tt-1);)it--,Tt++;Xe[Xe.length-1]=br.slice(0,br.length-Tt).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(it).replace(/\u200b+$/,"");var Yr=It(ae,it),zr=It(_e,ut.length?te(ut).length-Tt:0);if(Xe.length>1||Xe[0]||xr(Yr,zr))return ro(e.doc,Xe,Yr,zr,"+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())&&Hi(this.cm,function(){return Nn(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()||oi(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,r){var R=Ve(e,r.line);if(!R||R.hidden)return null;var A=mr(e.doc,r.line),F=we(R,A,r.line),Y=pt(A,e.doc.direction),ae="left";if(Y){var de=ct(Y,r.ch);ae=de%2?"right":"left"}var me=Dt(F.map,r.ch,ae);return me.offset=me.collapse=="right"?me.end:me.start,me}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function so(e,r){return r&&(e.bad=!0),e}function ru(e,r,R,A,F){var Y="",ae=!1,de=e.doc.lineSeparator(),me=!1;function _e(it){return function(Tt){return Tt.id==it}}function Be(){ae&&(Y+=de,me&&(Y+=de),ae=me=!1)}function Xe(it){it&&(Be(),Y+=it)}function ut(it){if(it.nodeType==1){var Tt=it.getAttribute("cm-text");if(Tt){Xe(Tt);return}var jt=it.getAttribute("cm-marker"),Jt;if(jt){var dr=e.findMarks(It(A,0),It(F+1,0),_e(+jt));dr.length&&(Jt=dr[0].find(0))&&Xe(Vn(e.doc,Jt.from,Jt.to).join(de));return}if(it.getAttribute("contenteditable")=="false")return;var br=/^(pre|div|p|li|table|br)$/i.test(it.nodeName);if(!/^br$/i.test(it.nodeName)&&it.textContent.length==0)return;br&&Be();for(var hr=0;hr<it.childNodes.length;hr++)ut(it.childNodes[hr]);/^(pre|p)$/i.test(it.nodeName)&&(me=!0),br&&(ae=!0)}else it.nodeType==3&&Xe(it.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ut(r),r==R);)r=r.nextSibling,me=!1;return Y}function $o(e,r,R){var A;if(r==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return so(e.clipPos(It(e.display.viewTo-1)),!0);r=null,R=0}else for(A=r;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var Y=e.display.view[F];if(Y.node==A)return nu(Y,r,R)}}function nu(e,r,R){var A=e.text.firstChild,F=!1;if(!r||!L(A,r))return so(It(nn(e.line),0),!0);if(r==A&&(F=!0,r=A.childNodes[R],R=0,!r)){var Y=e.rest?te(e.rest):e.line;return so(It(nn(Y),Y.text.length),F)}var ae=r.nodeType==3?r:null,de=r;for(!ae&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(ae=r.firstChild,R&&(R=ae.nodeValue.length));de.parentNode!=A;)de=de.parentNode;var me=e.measure,_e=me.maps;function Be(Jt,dr,br){for(var hr=-1;hr<(_e?_e.length:0);hr++)for(var Rr=hr<0?me.map:_e[hr],Yr=0;Yr<Rr.length;Yr+=3){var zr=Rr[Yr+2];if(zr==Jt||zr==dr){var yn=nn(hr<0?e.line:e.rest[hr]),Kn=Rr[Yr]+br;return(br<0||zr!=Jt)&&(Kn=Rr[Yr+(br?1:0)]),It(yn,Kn)}}}var Xe=Be(ae,de,R);if(Xe)return so(Xe,F);for(var ut=de.nextSibling,it=ae?ae.nodeValue.length-R:0;ut;ut=ut.nextSibling){if(Xe=Be(ut,ut.firstChild,0),Xe)return so(It(Xe.line,Xe.ch-it),F);it+=ut.textContent.length}for(var Tt=de.previousSibling,jt=R;Tt;Tt=Tt.previousSibling){if(Xe=Be(Tt,Tt.firstChild,-1),Xe)return so(It(Xe.line,Xe.ch+jt),F);jt+=Tt.textContent.length}}var li=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ie,this.hasSelection=!1,this.composing=null};li.prototype.init=function(e){var r=this,R=this,A=this.cm;this.createField(e);var F=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(F.style.width="0px"),Pe(F,"input",function(){w&&d>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Pe(F,"paste",function(ae){if(st(A,ae)||sl(ae,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function Y(ae){if(st(A,ae))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var de=ul(A);Xo({lineWise:!0,text:de.text}),ae.type=="cut"?A.setSelections(de.ranges,null,De):(R.prevInput="",F.value=de.text.join(`
`),G(F))}else return;ae.type=="cut"&&(A.state.cutIncoming=+new Date)}Pe(F,"cut",Y),Pe(F,"copy",Y),Pe(e.scroller,"paste",function(ae){if(fn(e,ae)||st(A,ae))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var de=new Event("paste");de.clipboardData=ae.clipboardData,F.dispatchEvent(de)}),Pe(e.lineSpace,"selectstart",function(ae){fn(e,ae)||Ee(ae)}),Pe(F,"compositionstart",function(){var ae=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:ae,range:A.markText(ae,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},li.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},li.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},li.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=Bi(e);if(e.options.moveInputWithCursor){var F=dn(e,R.sel.primary().head,"div"),Y=r.wrapper.getBoundingClientRect(),ae=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+ae.top-Y.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+ae.left-Y.left))}return A},li.prototype.showSelection=function(e){var r=this.cm,R=r.display;E(R.cursorDiv,e.cursors),E(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},li.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&G(this.textarea),w&&d>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",w&&d>=9&&(this.hasSelection=null))},li.prototype.getField=function(){return this.textarea},li.prototype.supportsTouch=function(){return!1},li.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!i||H()!=this.textarea))try{this.textarea.focus()}catch(e){}},li.prototype.blur=function(){this.textarea.blur()},li.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},li.prototype.receivedFocus=function(){this.slowPoll()},li.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()})},li.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var A=r.poll();!A&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},li.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||Et(R)&&!A&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=R.value;if(F==A&&!r.somethingSelected())return!1;if(w&&d>=9&&this.hasSelection===F||s&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var Y=F.charCodeAt(0);if(Y==8203&&!A&&(A="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,de=Math.min(A.length,F.length);ae<de&&A.charCodeAt(ae)==F.charCodeAt(ae);)++ae;return Hi(r,function(){hs(r,F.slice(ae),A.length-ae,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
`)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},li.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},li.prototype.onKeyPress=function(){w&&d>=9&&(this.hasSelection=null),this.fastPoll()},li.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var Y=ii(R,e),ae=A.scroller.scrollTop;if(!Y||u)return;var de=R.options.resetSelectionOnContextMenu;de&&R.doc.sel.contains(Y)==-1&&oi(R,Ii)(R.doc,va(Y),De);var me=F.style.cssText,_e=r.wrapper.style.cssText,Be=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.left-5)+`px;
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Xe;o&&(Xe=window.scrollY),A.input.focus(),o&&window.scrollTo(null,Xe),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=it,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function ut(){if(F.selectionStart!=null){var jt=R.somethingSelected(),Jt="\u200B"+(jt?F.value:"");F.value="\u21DA",F.value=Jt,r.prevInput=jt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Jt.length,A.selForContextMenu=R.doc.sel}}function it(){if(r.contextMenuPending!=it)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=_e,F.style.cssText=me,w&&d<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=ae),F.selectionStart!=null){(!w||w&&d<9)&&ut();var jt=0,Jt=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?oi(R,Ds)(R):jt++<10?A.detectingSelectAll=setTimeout(Jt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Jt,200)}}if(w&&d>=9&&ut(),k){Le(e);var Tt=function(){ft(window,"mouseup",Tt),setTimeout(it,20)};Pe(window,"mouseup",Tt)}else setTimeout(it,50)},li.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},li.prototype.setUneditable=function(){},li.prototype.needsContentAttribute=!1;function iu(e,r){if(r=r?z(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=H();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=de.getValue()}var F;if(e.form&&(Pe(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var Y=e.form;F=Y.submit;try{var ae=Y.submit=function(){A(),Y.submit=F,Y.submit(),Y.submit=ae}}catch(me){}}r.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&&(ft(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var de=Jn(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},r);return de}function au(e){e.off=ft,e.on=Pe,e.wheelEventPixels=fo,e.Doc=Yi,e.splitLines=Zt,e.countColumn=V,e.findColumn=ye,e.isWordChar=Q,e.Pass=Ae,e.signal=Je,e.Line=Lr,e.changeEnd=ga,e.scrollbarModel=gr,e.Pos=It,e.cmpPos=xr,e.modes=rn,e.mimeModes=Er,e.resolveMode=Wt,e.getMode=_n,e.modeExtensions=Cn,e.extendMode=Sn,e.copyState=gn,e.startState=ui,e.innerMode=Ci,e.commands=So,e.keyMap=Da,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=Ml,e.StringStream=mn,e.SharedTextMarker=_o,e.TextMarker=ja,e.LineWidget=xo,e.e_preventDefault=Ee,e.e_stopPropagation=Se,e.e_stop=Le,e.addClass=W,e.contains=L,e.rmClass=x,e.keyNames=Fa}Jl(Jn),eu(Jn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Yi.prototype)Yi.prototype.hasOwnProperty(Yo)&&ce(ou,Yo)<0&&(Jn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Yi.prototype[Yo]));return Ne(Yi),Jn.inputStyles={textarea:li,contenteditable:Fn},Jn.defineMode=function(e){!Jn.defaults.mode&&e!="null"&&(Jn.defaults.mode=e),un.apply(this,arguments)},Jn.defineMIME=Jr,Jn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Jn.defineMIME("text/plain","null"),Jn.defineExtension=function(e,r){Jn.prototype[e]=r},Jn.defineDocExtension=function(e,r){Yi.prototype[e]=r},Jn.fromTextArea=iu,au(Jn),Jn.version="5.58.2",Jn})},WYAk:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){(function(){var m=D,S=m.lib,P=S.Base,c=m.enc,h=c.Utf8,w=m.algo,d=w.HMAC=P.extend({init:function(o,a){o=this._hasher=new o.init,typeof a=="string"&&(a=h.parse(a));var n=o.blockSize,u=n*4;a.sigBytes>u&&(a=o.finalize(a)),a.clamp();for(var p=this._oKey=a.clone(),f=this._iKey=a.clone(),v=p.words,g=f.words,b=0;b<n;b++)v[b]^=1549556828,g[b]^=909522486;p.sigBytes=f.sigBytes=u,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var a=this._hasher,n=a.finalize(o);a.reset();var u=a.finalize(this._oKey.clone().concat(n));return u}})})()})},WaYH:function(N,J,M){"use strict";var D=M("rePB"),m=M("Ff2n"),S=M("VTBJ"),P=M("1OyB"),c=M("vuIU"),h=M("JX7q"),w=M("Ji7U"),d=M("LK+K"),o=M("q1tI"),a=M("TSYQ"),n=M.n(a),u=M("sboe"),p=M("OZM5"),f=function(k){var O=k.prefixCls,x=k.level,y=k.isStart,E=k.isEnd;if(!x)return null;for(var C="".concat(O,"-indent-unit"),I=[],j=0;j<x;j+=1){var L;I.push(o.createElement("span",{key:j,className:n()(C,(L={},Object(D.a)(L,"".concat(C,"-start"),y[j+1]),Object(D.a)(L,"".concat(C,"-end"),E[j+1]),Object(D.a)(L,"".concat(C,"-end-first-level"),!j&&E[0]),L))}))}return o.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},I)},v=f,g=M("815F"),b="open",i="close",s="---",t=function(l){Object(w.a)(O,l);var k=Object(d.a)(O);function O(){var x;return Object(P.a)(this,O),x=k.apply(this,arguments),x.state={dragNodeHighlight:!1},x.onSelectorClick=function(y){var E=x.props.context.onNodeClick;E(y,Object(g.b)(x.props)),x.isSelectable()?x.onSelect(y):x.onCheck(y)},x.onSelectorDoubleClick=function(y){var E=x.props.context.onNodeDoubleClick;E(y,Object(g.b)(x.props))},x.onSelect=function(y){if(x.isDisabled())return;var E=x.props.context.onNodeSelect;y.preventDefault(),E(y,Object(g.b)(x.props))},x.onCheck=function(y){if(x.isDisabled())return;var E=x.props,C=E.disableCheckbox,I=E.checked,j=x.props.context.onNodeCheck;if(!x.isCheckable()||C)return;y.preventDefault();var L=!I;j(y,Object(g.b)(x.props),L)},x.onMouseEnter=function(y){var E=x.props.context.onNodeMouseEnter;E(y,Object(g.b)(x.props))},x.onMouseLeave=function(y){var E=x.props.context.onNodeMouseLeave;E(y,Object(g.b)(x.props))},x.onContextMenu=function(y){var E=x.props.context.onNodeContextMenu;E(y,Object(g.b)(x.props))},x.onDragStart=function(y){var E=x.props.context.onNodeDragStart;y.stopPropagation(),x.setState({dragNodeHighlight:!0}),E(y,Object(h.a)(x));try{y.dataTransfer.setData("text/plain","")}catch(C){}},x.onDragEnter=function(y){var E=x.props.context.onNodeDragEnter;y.preventDefault(),y.stopPropagation(),E(y,Object(h.a)(x))},x.onDragOver=function(y){var E=x.props.context.onNodeDragOver;y.preventDefault(),y.stopPropagation(),E(y,Object(h.a)(x))},x.onDragLeave=function(y){var E=x.props.context.onNodeDragLeave;y.stopPropagation(),E(y,Object(h.a)(x))},x.onDragEnd=function(y){var E=x.props.context.onNodeDragEnd;y.stopPropagation(),x.setState({dragNodeHighlight:!1}),E(y,Object(h.a)(x))},x.onDrop=function(y){var E=x.props.context.onNodeDrop;y.preventDefault(),y.stopPropagation(),x.setState({dragNodeHighlight:!1}),E(y,Object(h.a)(x))},x.onExpand=function(y){var E=x.props.context.onNodeExpand;E(y,Object(g.b)(x.props))},x.setSelectHandle=function(y){x.selectHandle=y},x.getNodeState=function(){var y=x.props.expanded;return x.isLeaf()?null:y?b:i},x.hasChildren=function(){var y=x.props.eventKey,E=x.props.context.keyEntities,C=E[y]||{},I=C.children;return!!(I||[]).length},x.isLeaf=function(){var y=x.props,E=y.isLeaf,C=y.loaded,I=x.props.context.loadData,j=x.hasChildren();return E===!1?!1:E||!I&&!j||I&&C&&!j},x.isDisabled=function(){var y=x.props.disabled,E=x.props.context.disabled;return!!(E||y)},x.isCheckable=function(){var y=x.props.checkable,E=x.props.context.checkable;return!E||y===!1?!1:E},x.syncLoadData=function(y){var E=y.expanded,C=y.loading,I=y.loaded,j=x.props.context,L=j.loadData,H=j.onNodeLoad;if(C)return;L&&E&&!x.isLeaf()&&(!x.hasChildren()&&!I&&H(Object(g.b)(x.props)))},x.renderSwitcher=function(){var y=x.props,E=y.expanded,C=y.switcherIcon,I=x.props.context,j=I.prefixCls,L=I.switcherIcon,H=C||L;if(x.isLeaf())return o.createElement("span",{className:n()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof H=="function"?H(Object(S.a)(Object(S.a)({},x.props),{},{isLeaf:!0})):H);var W=n()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(E?b:i));return o.createElement("span",{onClick:x.onExpand,className:W},typeof H=="function"?H(Object(S.a)(Object(S.a)({},x.props),{},{isLeaf:!1})):H)},x.renderCheckbox=function(){var y=x.props,E=y.checked,C=y.halfChecked,I=y.disableCheckbox,j=x.props.context.prefixCls,L=x.isDisabled(),H=x.isCheckable();if(!H)return null;var W=typeof H!="boolean"?H:null;return o.createElement("span",{className:n()("".concat(j,"-checkbox"),E&&"".concat(j,"-checkbox-checked"),!E&&C&&"".concat(j,"-checkbox-indeterminate"),(L||I)&&"".concat(j,"-checkbox-disabled")),onClick:x.onCheck},W)},x.renderIcon=function(){var y=x.props.loading,E=x.props.context.prefixCls;return o.createElement("span",{className:n()("".concat(E,"-iconEle"),"".concat(E,"-icon__").concat(x.getNodeState()||"docu"),y&&"".concat(E,"-icon_loading"))})},x.renderSelector=function(){var y=x.state.dragNodeHighlight,E=x.props,C=E.title,I=E.selected,j=E.icon,L=E.loading,H=E.data,W=x.props.context,U=W.prefixCls,G=W.showIcon,B=W.icon,z=W.draggable,V=W.loadData,ie=W.titleRender,ce=x.isDisabled(),he="".concat(U,"-node-content-wrapper"),Ae;if(G){var De=j||B;Ae=De?o.createElement("span",{className:n()("".concat(U,"-iconEle"),"".concat(U,"-icon__customize"))},typeof De=="function"?De(x.props):De):x.renderIcon()}else V&&L&&(Ae=x.renderIcon());var pe;typeof C=="function"?pe=C(H):ie?pe=ie(H):pe=C;var Te=o.createElement("span",{className:"".concat(U,"-title")},pe);return o.createElement("span",{ref:x.setSelectHandle,title:typeof C=="string"?C:"",className:n()("".concat(he),"".concat(he,"-").concat(x.getNodeState()||"normal"),!ce&&(I||y)&&"".concat(U,"-node-selected"),!ce&&z&&"draggable"),draggable:!ce&&z||void 0,"aria-grabbed":!ce&&z||void 0,onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,onContextMenu:x.onContextMenu,onClick:x.onSelectorClick,onDoubleClick:x.onSelectorDoubleClick,onDragStart:z?x.onDragStart:void 0},Ae,Te)},x}return Object(c.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var y=this.props.selectable,E=this.props.context.selectable;return typeof y=="boolean"?y:E}},{key:"render",value:function(){var y,E=this.props,C=E.eventKey,I=E.className,j=E.style,L=E.dragOver,H=E.dragOverGapTop,W=E.dragOverGapBottom,U=E.isLeaf,G=E.isStart,B=E.isEnd,z=E.expanded,V=E.selected,ie=E.checked,ce=E.halfChecked,he=E.loading,Ae=E.domRef,De=E.active,pe=E.onMouseMove,Te=Object(m.a)(E,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ye=this.props.context,ue=ye.prefixCls,le=ye.filterTreeNode,te=ye.draggable,fe=ye.keyEntities,q=this.isDisabled(),ee=Object(p.f)(Te),Ce=fe[C]||{},re=Ce.level,Q=B[B.length-1];return o.createElement("div",Object.assign({ref:Ae,className:n()(I,"".concat(ue,"-treenode"),(y={},Object(D.a)(y,"".concat(ue,"-treenode-disabled"),q),Object(D.a)(y,"".concat(ue,"-treenode-switcher-").concat(z?"open":"close"),!U),Object(D.a)(y,"".concat(ue,"-treenode-checkbox-checked"),ie),Object(D.a)(y,"".concat(ue,"-treenode-checkbox-indeterminate"),ce),Object(D.a)(y,"".concat(ue,"-treenode-selected"),V),Object(D.a)(y,"".concat(ue,"-treenode-loading"),he),Object(D.a)(y,"".concat(ue,"-treenode-active"),De),Object(D.a)(y,"".concat(ue,"-treenode-leaf-last"),Q),Object(D.a)(y,"drag-over",!q&&L),Object(D.a)(y,"drag-over-gap-top",!q&&H),Object(D.a)(y,"drag-over-gap-bottom",!q&&W),Object(D.a)(y,"filter-node",le&&le(Object(g.b)(this.props))),y)),style:j,onDragEnter:te?this.onDragEnter:void 0,onDragOver:te?this.onDragOver:void 0,onDragLeave:te?this.onDragLeave:void 0,onDrop:te?this.onDrop:void 0,onDragEnd:te?this.onDragEnd:void 0,onMouseMove:pe},ee),o.createElement(v,{prefixCls:ue,level:re,isStart:G,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(o.Component),T=function(k){return o.createElement(u.a.Consumer,null,function(O){return o.createElement(t,Object.assign({},k,{context:O}))})};T.displayName="TreeNode",T.defaultProps={title:s},T.isTreeNode=1;var _=J.a=T},WdTA:function(N,J,M){N.exports=M.p+"static/studnetqun.598eeb43.png"},Y1PL:function(N,J,M){"use strict";M.r(J),M.d(J,"ResizableTextArea",function(){return ce});var D=M("wx14"),m=M("1OyB"),S=M("vuIU"),P=M("Ji7U"),c=M("LK+K"),h=M("q1tI"),w=M("VTBJ"),d=M("rePB"),o=M("Zm9Q"),a=M("Kwbf"),n=M("c+Xe"),u=M("m+aA"),p=M("bdgK"),f=new Map;function v(De){De.forEach(function(pe){var Te,ye=pe.target;(Te=f.get(ye))===null||Te===void 0||Te.forEach(function(ue){return ue(ye)})})}var g=new p.default(v),b=null,i=null;function s(De,pe){f.has(De)||(f.set(De,new Set),g.observe(De)),f.get(De).add(pe)}function t(De,pe){f.has(De)&&(f.get(De).delete(pe),f.get(De).size||(g.unobserve(De),f.delete(De)))}var T=function(De){Object(P.a)(Te,De);var pe=Object(c.a)(Te);function Te(){return Object(m.a)(this,Te),pe.apply(this,arguments)}return Object(S.a)(Te,[{key:"render",value:function(){return this.props.children}}]),Te}(h.Component),_=h.createContext(null);function l(De){var pe=De.children,Te=De.onBatchResize,ye=h.useRef(0),ue=h.useRef([]),le=h.useContext(_),te=h.useCallback(function(fe,q,ee){ye.current+=1;var Ce=ye.current;ue.current.push({size:fe,element:q,data:ee}),Promise.resolve().then(function(){Ce===ye.current&&(Te==null||Te(ue.current),ue.current=[])}),le==null||le(fe,q,ee)},[Te,le]);return h.createElement(_.Provider,{value:te},pe)}function k(De){var pe=De.children,Te=De.disabled,ye=h.useRef(null),ue=h.useRef(null),le=h.useContext(_),te=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),fe=h.isValidElement(pe)&&Object(n.c)(pe),q=fe?pe.ref:null,ee=h.useMemo(function(){return Object(n.a)(q,ye)},[q,ye]),Ce=h.useRef(De);Ce.current=De;var re=h.useCallback(function(Q){var X=Ce.current,Z=X.onResize,xe=X.data,ve=Q.getBoundingClientRect(),Oe=ve.width,Qe=ve.height,rt=Q.offsetWidth,nt=Q.offsetHeight,ct=Math.floor(Oe),dt=Math.floor(Qe);if(te.current.width!==ct||te.current.height!==dt||te.current.offsetWidth!==rt||te.current.offsetHeight!==nt){var pt={width:ct,height:dt,offsetWidth:rt,offsetHeight:nt};te.current=pt;var He=rt===Math.round(Oe)?Oe:rt,Pe=nt===Math.round(Qe)?Qe:nt,at=Object(w.a)(Object(w.a)({},pt),{},{offsetWidth:He,offsetHeight:Pe});le==null||le(at,Q,xe),Z&&Promise.resolve().then(function(){Z(at,Q)})}},[]);return h.useEffect(function(){var Q=Object(u.a)(ye.current)||Object(u.a)(ue.current);return Q&&!Te&&s(Q,re),function(){return t(Q,re)}},[ye.current,Te]),h.createElement(T,{ref:ue},fe?h.cloneElement(pe,{ref:ee}):pe)}var O="rc-observer-key";function x(De){var pe=De.children,Te=Object(o.a)(pe);return Te.map(function(ye,ue){var le=(ye==null?void 0:ye.key)||"".concat(O,"-").concat(ue);return h.createElement(k,Object(D.a)({},De,{key:le}),ye)})}x.Collection=l;var y=x,E=M("bT9E"),C=M("TSYQ"),I=M.n(C),j=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,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"],H={},W;function U(De){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=De.getAttribute("id")||De.getAttribute("data-reactid")||De.getAttribute("name");if(pe&&H[Te])return H[Te];var ye=window.getComputedStyle(De),ue=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),le=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),te=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),fe=L.map(function(ee){return"".concat(ee,":").concat(ye.getPropertyValue(ee))}).join(";"),q={sizingStyle:fe,paddingSize:le,borderSize:te,boxSizing:ue};return pe&&Te&&(H[Te]=q),q}function G(De){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=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)),De.getAttribute("wrap")?W.setAttribute("wrap",De.getAttribute("wrap")):W.removeAttribute("wrap");var ue=U(De,pe),le=ue.paddingSize,te=ue.borderSize,fe=ue.boxSizing,q=ue.sizingStyle;W.setAttribute("style","".concat(q,";").concat(j)),W.value=De.value||De.placeholder||"";var ee=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,re=W.scrollHeight,Q;if(fe==="border-box"?re+=te:fe==="content-box"&&(re-=le),Te!==null||ye!==null){W.value=" ";var X=W.scrollHeight-le;Te!==null&&(ee=X*Te,fe==="border-box"&&(ee=ee+le+te),re=Math.max(ee,re)),ye!==null&&(Ce=X*ye,fe==="border-box"&&(Ce=Ce+le+te),Q=re>Ce?"":"hidden",re=Math.min(Ce,re))}return{height:re,minHeight:ee,maxHeight:Ce,overflowY:Q,resize:"none"}}var B=M("Gytx"),z=M.n(B),V;(function(De){De[De.NONE=0]="NONE",De[De.RESIZING=1]="RESIZING",De[De.RESIZED=2]="RESIZED"})(V||(V={}));var ie=function(De){Object(P.a)(Te,De);var pe=Object(c.a)(Te);function Te(ye){var ue;return Object(m.a)(this,Te),ue=pe.call(this,ye),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(le){ue.textArea=le},ue.handleResize=function(le){var te=ue.state.resizeStatus,fe=ue.props,q=fe.autoSize,ee=fe.onResize;if(te!==V.NONE)return;typeof ee=="function"&&ee(le),q&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var le=ue.props.autoSize;if(!le||!ue.textArea)return;var te=le.minRows,fe=le.maxRows,q=G(ue.textArea,!1,te,fe);ue.setState({textareaStyles:q,resizeStatus:V.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:V.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:V.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var le=ue.props,te=le.prefixCls,fe=te===void 0?"rc-textarea":te,q=le.autoSize,ee=le.onResize,Ce=le.className,re=le.disabled,Q=ue.state,X=Q.textareaStyles,Z=Q.resizeStatus,xe=Object(E.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ve=I()(fe,Ce,Object(d.a)({},"".concat(fe,"-disabled"),re));"value"in xe&&(xe.value=xe.value||"");var Oe=Object(w.a)(Object(w.a)(Object(w.a)({},ue.props.style),X),Z===V.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return h.createElement(y,{onResize:ue.handleResize,disabled:!(q||ee)},h.createElement("textarea",Object(D.a)({},xe,{className:ve,style:Oe,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:V.NONE},ue}return Object(S.a)(Te,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!z()(ue.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 ue=this.textArea.selectionStart,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,le)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Te}(h.Component),ce=ie,he=function(De){Object(P.a)(Te,De);var pe=Object(c.a)(Te);function Te(ye){var ue;Object(m.a)(this,Te),ue=pe.call(this,ye),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(te){ue.resizableTextArea=te},ue.handleChange=function(te){var fe=ue.props.onChange;ue.setValue(te.target.value,function(){ue.resizableTextArea.resizeTextarea()}),fe&&fe(te)},ue.handleKeyDown=function(te){var fe=ue.props,q=fe.onPressEnter,ee=fe.onKeyDown;te.keyCode===13&&q&&q(te),ee&&ee(te)};var le=typeof ye.value=="undefined"||ye.value===null?ye.defaultValue:ye.value;return ue.state={value:le},ue}return Object(S.a)(Te,[{key:"setValue",value:function(ue,le){"value"in this.props||this.setState({value:ue},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return h.createElement(ce,Object(D.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),Te}(h.Component),Ae=J.default=he},ZW9T:function(N,J,M){"use strict";M.d(J,"a",function(){return T});var D=M("k1fw"),m=M("miYZ"),S=M("tsqr"),P=M("rAM+"),c=M("tJVT"),h=M("PpiC"),w=M("q1tI"),d=M.n(w),o=M("bdgK");function a(_,l,k,O,x){var y=l.getWordUntilPosition(k),E={startLineNumber:k.lineNumber,endLineNumber:k.lineNumber,startColumn:y.startColumn,endColumn:y.endColumn},C=O.map(function(I){return{label:I,kind:_.languages.CompletionItemKind.Keyword,insertText:I,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:E}});return x.map(function(I){C.push(Object(D.a)(Object(D.a)({},I),{},{range:E}))}),C}var n=function(_){var l={label:"ifelse",kind:_.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet},k=["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","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];_.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(E,C){var I=a(_,E,C,k,[l]);return{suggestions:I}}});var O=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];_.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(E,C){var I=[{label:"print",kind:_.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=a(_,E,C,O,I);return{suggestions:j}}});var x=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];_.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(E,C){var I=[l,{label:"main",kind:_.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:_.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=a(_,E,C,x,I);return{suggestions:j}}})},u="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=M("LvDl");function f(_){return/^\d+$/.test(_)?"".concat(_,"px"):_}function v(){}var g=!1,b={"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 i(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=_;if(Array.isArray(_)){for(var k=0;k<_.length;k++){var O=b[_[k]];if(O)return O}return l[0]}return b[l]||l}var s=null,t=J.b=function(_){var l=_.width,k=l===void 0?"100%":l,O=_.height,x=O===void 0?"100%":O,y=_.value,E=_.language,C=E===void 0?"javascript":E,I=_.style,j=I===void 0?{}:I,L=_.options,H=L===void 0?{}:L,W=_.overrideServices,U=W===void 0?{}:W,G=_.theme,B=G===void 0?"vs-dark":G,z=_.onEditBlur,V=_.onSave,ie=_.autoHeight,ce=ie===void 0?!1:ie,he=_.forbidCopy,Ae=he===void 0?!1:he,De=_.onChange,pe=De===void 0?v:De,Te=_.editorDidMount,ye=Te===void 0?v:Te,ue=_.onFocus,le=ue===void 0?v:ue,te=_.filename,fe=te===void 0?"educoder.txt":te,q=Object(h.a)(_,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ee=Object(w.useRef)(),Ce=Object(w.useRef)({}),re=Object(w.useRef)(),Q=Object(w.useRef)(!1),X=Object(w.useRef)(),Z=Object(w.useState)(!1),xe=Object(c.a)(Z,2),ve=xe[0],Oe=xe[1];function Qe(){var Re;return ee.current&&(Re=new o.default(function(Le){var Ye=Object(P.a)(Le),tt;try{for(Ye.s();!(tt=Ye.n()).done;){var Ct=tt.value;(Ct.target.offsetHeight>0||Ct.target.offsetWidth>0)&&Ce.current.instance.layout()}}catch(At){Ye.e(At)}finally{Ye.f()}}),Re.observe(ee.current)),Re}function rt(){S.b.warn(decodeURIComponent(u))}var nt=function(){var Le=Ce.current.instance;if(y!=null&&Le&&ve){var Ye=Le.getModel();Ye&&y!==Ye.getValue()&&(g=!0,Ye.setValue(y),Le.layout(),g=!1)}};Object(w.useEffect)(function(){re.current&&clearTimeout(re.current),re.current=setTimeout(function(){nt()},500)},[y,ve,Ce.current]);function ct(){var Re=Ce.current.instance;if(Re){var Le=Re.getSelection(),Ye=Ce.current.pastePos||{},tt=new s.Range(Ye.startLineNumber||Le.endLineNumber,Ye.startColumn||Le.endColumn,Ye.endLineNumber||Le.endLineNumber,Ye.endColumn||Le.endColumn);setTimeout(function(){Re.executeEdits("",[{range:tt,text:""}])},300)}}function dt(Re){(window.navigator.platform.match("Mac")?Re.metaKey:Re.ctrlKey)&&Re.keyCode==83&&(Re.preventDefault(),V())}var pt=function(){if(ce&&Ce.current.instance){var Le=Ce.current.instance.getContentHeight();Ee(Le<x?x:Le)}else Ee(x)};function He(Re){var Le=document.createEvent("MouseEvents");Le.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Re.dispatchEvent(Le)}function Pe(Re,Le){var Ye=window.URL||window.webkitURL||window,tt=new Blob([Le]),Ct=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ct.href=Ye.createObjectURL(tt),Ct.download=Re,He(Ct)}Object(w.useEffect)(function(){pt()},[pt]),Object(w.useEffect)(function(){ee.current&&!ve&&M.e(27).then(M.t.bind(null,"M/lh",7)).then(function(Re){try{s=Re,Ce.current.instance=s.editor.create(ee.current,{value:y,language:i(C),theme:B,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},U);var Le=Ce.current.instance;if(ye(Le,s),setTimeout(function(){pt(),Ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Pe(fe||"educoder.txt",Le.getValue())}})},500),Ce.current.subscription=Le.onDidChangeModelContent(function(tt){Q.current?clearTimeout(X.current):(pt(),pe(Le.getValue(),tt)),X.current=setTimeout(function(){Q.current=!1},500)}),window.Monaco||n(s),Ae&&(Le.addCommand(s.KeyMod.CtrlCmd|s.KeyMod.Shift|s.KeyCode.KEY_V,function(){return rt(),null}),Le.addCommand(s.KeyMod.CtrlCmd|s.KeyCode.KEY_C,function(){return rt(),null})),window.Monaco=s,z&&Le.onDidBlurEditorWidget(function(){z(Le.getValue())}),le&&Le.onDidFocusEditorText(function(){le(Le.getValue())}),Ae){Le.addCommand(s.KeyMod.CtrlCmd|s.KeyCode.KEY_V,function(){return rt(),null}),Le.onDidPaste(function(tt){Ce.current.pastePos=tt});try{window.addEventListener("paste",ct)}catch(tt){}}var Ye=Qe();return Oe(!0),function(){var tt=Ce.current.instance;tt.dispose();var Ct=tt.getModel();Ct&&Ct.dispose(),Ce.current.subscription&&Ce.current.subscription.dispose(),Ae&&window.removeEventListener("paste",ct),Ye.unobserve(ee.current)}}catch(tt){}})},[]),Object(w.useEffect)(function(){var Re=Ce.current.instance;if(Re&&ve)return document.addEventListener("keydown",dt,!1),function(){document.removeEventListener("keydown",dt)}},[V,ve]),Object(w.useEffect)(function(){var Re=Ce.current.instance;if(Re&&ve){var Le=i(C);s.editor.setModelLanguage(Re.getModel(),Le),console.log("language:",C,Re.getModel(),Le)}},[C,ve]),Object(w.useEffect)(function(){var Re=Ce.current.instance;Re&&ve&&s.editor.setTheme(B)},[B,ve]),Object(w.useEffect)(function(){var Re=Ce.current.instance;Re&&ve&&(Re.updateOptions(Object(D.a)({},H)),setTimeout(function(){Re.getModel().updateOptions(Object(D.a)({},H))},200))},[JSON.stringify(H),ve]),Object(w.useEffect)(function(){var Re=Ce.current.instance;Re&&ve&&Re.layout()},[k,x,ve]);var at=Object(w.useState)(f(k)),ft=Object(c.a)(at,2),Je=ft[0],st=ft[1],Ue=Object(w.useState)(f(x)),Me=Object(c.a)(Ue,2),Ne=Me[0],Ee=Me[1],Se=Object(D.a)(Object(D.a)({},j),{},{width:Je,height:Ne});return d.a.createElement("div",{className:"my-monaco-editor",ref:ee,style:Se})};function T(_){var l=_.width,k=l===void 0?"100%":l,O=_.height,x=O===void 0?"100%":O,y=_.original,E=_.modified,C=_.language,I=_.options,j=I===void 0?{}:I,L=Object(w.useRef)(),H=Object(w.useState)(null),W=Object(c.a)(H,2),U=W[0],G=W[1];function B(ce){var he;return L.current&&(he=new o.default(function(Ae){var De=Object(P.a)(Ae),pe;try{for(De.s();!(pe=De.n()).done;){var Te=pe.value;(Te.target.offsetHeight>0||Te.target.offsetWidth>0)&&ce.layout()}}catch(ye){De.e(ye)}finally{De.f()}}),he.observe(L.current)),he}Object(w.useEffect)(function(){L.current&&M.e(27).then(M.t.bind(null,"M/lh",7)).then(function(ce){s=ce;var he=s.editor.createDiffEditor(L.current,Object(D.a)(Object(D.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},j),{},{wordWrap:!0}));G(he);var Ae=B(he);return function(){he.dispose();var De=he.getModel();De&&De.dispose(),Ae.unobserve(L.current)}})},[]),Object(w.useEffect)(function(){U&&U.setModel({original:s.editor.createModel(y,C),modified:s.editor.createModel(E,C)})},[y,E,C,U]);var z=f(k),V=f(x),ie={width:z,height:V};return d.a.createElement("div",{className:"my-diff-editor",ref:L,style:ie})}},ZpRC:function(N,J,M){"use strict";function D(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function m(n,u){return(!u||n!=="hidden")&&n!=="visible"&&n!=="clip"}function S(n,u){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var p=getComputedStyle(n,null);return m(p.overflowY,u)||m(p.overflowX,u)||function(f){var v=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(b){return null}}(f);return!!v&&(v.clientHeight<f.scrollHeight||v.clientWidth<f.scrollWidth)}(n)}return!1}function P(n,u,p,f,v,g,b,i){return g<n&&b>u||g>n&&b<u?0:g<=n&&i<=p||b>=u&&i>=p?g-n-f:b>u&&i<p||g<n&&i>p?b-u+v:0}var c=function(n,u){var p=window,f=u.scrollMode,v=u.block,g=u.inline,b=u.boundary,i=u.skipOverflowHiddenElements,s=typeof b=="function"?b:function(X){return X!==b};if(!D(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,T=[],_=n;D(_)&&s(_);){if((_=_.parentElement)===t){T.push(_);break}_!=null&&_===document.body&&S(_)&&!S(document.documentElement)||_!=null&&S(_,i)&&T.push(_)}for(var l=p.visualViewport?p.visualViewport.width:innerWidth,k=p.visualViewport?p.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,y=n.getBoundingClientRect(),E=y.height,C=y.width,I=y.top,j=y.right,L=y.bottom,H=y.left,W=v==="start"||v==="nearest"?I:v==="end"?L:I+E/2,U=g==="center"?H+C/2:g==="end"?j:H,G=[],B=0;B<T.length;B++){var z=T[B],V=z.getBoundingClientRect(),ie=V.height,ce=V.width,he=V.top,Ae=V.right,De=V.bottom,pe=V.left;if(f==="if-needed"&&I>=0&&H>=0&&L<=k&&j<=l&&I>=he&&L<=De&&H>=pe&&j<=Ae)return G;var Te=getComputedStyle(z),ye=parseInt(Te.borderLeftWidth,10),ue=parseInt(Te.borderTopWidth,10),le=parseInt(Te.borderRightWidth,10),te=parseInt(Te.borderBottomWidth,10),fe=0,q=0,ee="offsetWidth"in z?z.offsetWidth-z.clientWidth-ye-le:0,Ce="offsetHeight"in z?z.offsetHeight-z.clientHeight-ue-te:0;if(t===z)fe=v==="start"?W:v==="end"?W-k:v==="nearest"?P(x,x+k,k,ue,te,x+W,x+W+E,E):W-k/2,q=g==="start"?U:g==="center"?U-l/2:g==="end"?U-l:P(O,O+l,l,ye,le,O+U,O+U+C,C),fe=Math.max(0,fe+x),q=Math.max(0,q+O);else{fe=v==="start"?W-he-ue:v==="end"?W-De+te+Ce:v==="nearest"?P(he,De,ie,ue,te+Ce,W,W+E,E):W-(he+ie/2)+Ce/2,q=g==="start"?U-pe-ye:g==="center"?U-(pe+ce/2)+ee/2:g==="end"?U-Ae+le+ee:P(pe,Ae,ce,ye,le+ee,U,U+C,C);var re=z.scrollLeft,Q=z.scrollTop;W+=Q-(fe=Math.max(0,Math.min(Q+fe,z.scrollHeight-ie+Ce))),U+=re-(q=Math.max(0,Math.min(re+q,z.scrollWidth-ce+ee)))}G.push({el:z,top:fe,left:q})}return G};function h(n){return n===Object(n)&&Object.keys(n).length!==0}function w(n,u){u===void 0&&(u="auto");var p="scrollBehavior"in document.body.style;n.forEach(function(f){var v=f.el,g=f.top,b=f.left;v.scroll&&p?v.scroll({top:g,left:b,behavior:u}):(v.scrollTop=g,v.scrollLeft=b)})}function d(n){return n===!1?{block:"end",inline:"nearest"}:h(n)?n:{block:"start",inline:"nearest"}}function o(n,u){var p=!n.ownerDocument.documentElement.contains(n);if(h(u)&&typeof u.behavior=="function")return u.behavior(p?[]:c(n,u));if(p)return;var f=d(u);return w(c(n,f),f.behavior)}var a=J.a=o},Zss7:function(N,J,M){var D;(function(m){var S=/^\s+/,P=/\s+$/,c=0,h=m.round,w=m.min,d=m.max,o=m.random;function a(te,fe){if(te=te||"",fe=fe||{},te instanceof a)return te;if(!(this instanceof a))return new a(te,fe);var q=n(te);this._originalInput=te,this._r=q.r,this._g=q.g,this._b=q.b,this._a=q.a,this._roundA=h(100*this._a)/100,this._format=fe.format||q.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=h(this._r)),this._g<1&&(this._g=h(this._g)),this._b<1&&(this._b=h(this._b)),this._ok=q.ok,this._tc_id=c++}a.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 te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),fe,q,ee,Ce,re,Q;return fe=te.r/255,q=te.g/255,ee=te.b/255,fe<=.03928?Ce=fe/12.92:Ce=m.pow((fe+.055)/1.055,2.4),q<=.03928?re=q/12.92:re=m.pow((q+.055)/1.055,2.4),ee<=.03928?Q=ee/12.92:Q=m.pow((ee+.055)/1.055,2.4),.2126*Ce+.7152*re+.0722*Q},setAlpha:function(te){return this._a=G(te),this._roundA=h(100*this._a)/100,this},toHsv:function(){var te=v(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=v(this._r,this._g,this._b),fe=h(te.h*360),q=h(te.s*100),ee=h(te.v*100);return this._a==1?"hsv("+fe+", "+q+"%, "+ee+"%)":"hsva("+fe+", "+q+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var te=p(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=p(this._r,this._g,this._b),fe=h(te.h*360),q=h(te.s*100),ee=h(te.l*100);return this._a==1?"hsl("+fe+", "+q+"%, "+ee+"%)":"hsla("+fe+", "+q+"%, "+ee+"%, "+this._roundA+")"},toHex:function(te){return b(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return i(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:h(this._r),g:h(this._g),b:h(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+h(this._r)+", "+h(this._g)+", "+h(this._b)+")":"rgba("+h(this._r)+", "+h(this._g)+", "+h(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:h(B(this._r,255)*100)+"%",g:h(B(this._g,255)*100)+"%",b:h(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+h(B(this._r,255)*100)+"%, "+h(B(this._g,255)*100)+"%, "+h(B(this._b,255)*100)+"%)":"rgba("+h(B(this._r,255)*100)+"%, "+h(B(this._g,255)*100)+"%, "+h(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:W[b(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var fe="#"+s(this._r,this._g,this._b,this._a),q=fe,ee=this._gradientType?"GradientType = 1, ":"";if(te){var Ce=a(te);q="#"+s(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+fe+",endColorstr="+q+")"},toString:function(te){var fe=!!te;te=te||this._format;var q=!1,ee=this._a<1&&this._a>=0,Ce=!fe&&ee&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return Ce?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(q=this.toRgbString()),te==="prgb"&&(q=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(q=this.toHexString()),te==="hex3"&&(q=this.toHexString(!0)),te==="hex4"&&(q=this.toHex8String(!0)),te==="hex8"&&(q=this.toHex8String()),te==="name"&&(q=this.toName()),te==="hsl"&&(q=this.toHslString()),te==="hsv"&&(q=this.toHsvString()),q||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(te,fe){var q=te.apply(null,[this].concat([].slice.call(fe)));return this._r=q._r,this._g=q._g,this._b=q._b,this.setAlpha(q._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(te,fe){return te.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},a.fromRatio=function(te,fe){if(typeof te=="object"){var q={};for(var ee in te)te.hasOwnProperty(ee)&&(ee==="a"?q[ee]=te[ee]:q[ee]=Ae(te[ee]));te=q}return a(te,fe)};function n(te){var fe={r:0,g:0,b:0},q=1,ee=null,Ce=null,re=null,Q=!1,X=!1;return typeof te=="string"&&(te=ue(te)),typeof te=="object"&&(ye(te.r)&&ye(te.g)&&ye(te.b)?(fe=u(te.r,te.g,te.b),Q=!0,X=String(te.r).substr(-1)==="%"?"prgb":"rgb"):ye(te.h)&&ye(te.s)&&ye(te.v)?(ee=Ae(te.s),Ce=Ae(te.v),fe=g(te.h,ee,Ce),Q=!0,X="hsv"):ye(te.h)&&ye(te.s)&&ye(te.l)&&(ee=Ae(te.s),re=Ae(te.l),fe=f(te.h,ee,re),Q=!0,X="hsl"),te.hasOwnProperty("a")&&(q=te.a)),q=G(q),{ok:Q,format:te.format||X,r:w(255,d(fe.r,0)),g:w(255,d(fe.g,0)),b:w(255,d(fe.b,0)),a:q}}function u(te,fe,q){return{r:B(te,255)*255,g:B(fe,255)*255,b:B(q,255)*255}}function p(te,fe,q){te=B(te,255),fe=B(fe,255),q=B(q,255);var ee=d(te,fe,q),Ce=w(te,fe,q),re,Q,X=(ee+Ce)/2;if(ee==Ce)re=Q=0;else{var Z=ee-Ce;Q=X>.5?Z/(2-ee-Ce):Z/(ee+Ce);switch(ee){case te:re=(fe-q)/Z+(fe<q?6:0);break;case fe:re=(q-te)/Z+2;break;case q:re=(te-fe)/Z+4;break}re/=6}return{h:re,s:Q,l:X}}function f(te,fe,q){var ee,Ce,re;te=B(te,360),fe=B(fe,100),q=B(q,100);function Q(xe,ve,Oe){return Oe<0&&(Oe+=1),Oe>1&&(Oe-=1),Oe<1/6?xe+(ve-xe)*6*Oe:Oe<1/2?ve:Oe<2/3?xe+(ve-xe)*(2/3-Oe)*6:xe}if(fe===0)ee=Ce=re=q;else{var X=q<.5?q*(1+fe):q+fe-q*fe,Z=2*q-X;ee=Q(Z,X,te+1/3),Ce=Q(Z,X,te),re=Q(Z,X,te-1/3)}return{r:ee*255,g:Ce*255,b:re*255}}function v(te,fe,q){te=B(te,255),fe=B(fe,255),q=B(q,255);var ee=d(te,fe,q),Ce=w(te,fe,q),re,Q,X=ee,Z=ee-Ce;if(Q=ee===0?0:Z/ee,ee==Ce)re=0;else{switch(ee){case te:re=(fe-q)/Z+(fe<q?6:0);break;case fe:re=(q-te)/Z+2;break;case q:re=(te-fe)/Z+4;break}re/=6}return{h:re,s:Q,v:X}}function g(te,fe,q){te=B(te,360)*6,fe=B(fe,100),q=B(q,100);var ee=m.floor(te),Ce=te-ee,re=q*(1-fe),Q=q*(1-Ce*fe),X=q*(1-(1-Ce)*fe),Z=ee%6,xe=[q,Q,re,re,X,q][Z],ve=[X,q,q,Q,re,re][Z],Oe=[re,re,X,q,q,Q][Z];return{r:xe*255,g:ve*255,b:Oe*255}}function b(te,fe,q,ee){var Ce=[he(h(te).toString(16)),he(h(fe).toString(16)),he(h(q).toString(16))];return ee&&Ce[0].charAt(0)==Ce[0].charAt(1)&&Ce[1].charAt(0)==Ce[1].charAt(1)&&Ce[2].charAt(0)==Ce[2].charAt(1)?Ce[0].charAt(0)+Ce[1].charAt(0)+Ce[2].charAt(0):Ce.join("")}function i(te,fe,q,ee,Ce){var re=[he(h(te).toString(16)),he(h(fe).toString(16)),he(h(q).toString(16)),he(De(ee))];return Ce&&re[0].charAt(0)==re[0].charAt(1)&&re[1].charAt(0)==re[1].charAt(1)&&re[2].charAt(0)==re[2].charAt(1)&&re[3].charAt(0)==re[3].charAt(1)?re[0].charAt(0)+re[1].charAt(0)+re[2].charAt(0)+re[3].charAt(0):re.join("")}function s(te,fe,q,ee){var Ce=[he(De(ee)),he(h(te).toString(16)),he(h(fe).toString(16)),he(h(q).toString(16))];return Ce.join("")}a.equals=function(te,fe){return!te||!fe?!1:a(te).toRgbString()==a(fe).toRgbString()},a.random=function(){return a.fromRatio({r:o(),g:o(),b:o()})};function t(te,fe){fe=fe===0?0:fe||10;var q=a(te).toHsl();return q.s-=fe/100,q.s=z(q.s),a(q)}function T(te,fe){fe=fe===0?0:fe||10;var q=a(te).toHsl();return q.s+=fe/100,q.s=z(q.s),a(q)}function _(te){return a(te).desaturate(100)}function l(te,fe){fe=fe===0?0:fe||10;var q=a(te).toHsl();return q.l+=fe/100,q.l=z(q.l),a(q)}function k(te,fe){fe=fe===0?0:fe||10;var q=a(te).toRgb();return q.r=d(0,w(255,q.r-h(255*-(fe/100)))),q.g=d(0,w(255,q.g-h(255*-(fe/100)))),q.b=d(0,w(255,q.b-h(255*-(fe/100)))),a(q)}function O(te,fe){fe=fe===0?0:fe||10;var q=a(te).toHsl();return q.l-=fe/100,q.l=z(q.l),a(q)}function x(te,fe){var q=a(te).toHsl(),ee=(q.h+fe)%360;return q.h=ee<0?360+ee:ee,a(q)}function y(te){var fe=a(te).toHsl();return fe.h=(fe.h+180)%360,a(fe)}function E(te){var fe=a(te).toHsl(),q=fe.h;return[a(te),a({h:(q+120)%360,s:fe.s,l:fe.l}),a({h:(q+240)%360,s:fe.s,l:fe.l})]}function C(te){var fe=a(te).toHsl(),q=fe.h;return[a(te),a({h:(q+90)%360,s:fe.s,l:fe.l}),a({h:(q+180)%360,s:fe.s,l:fe.l}),a({h:(q+270)%360,s:fe.s,l:fe.l})]}function I(te){var fe=a(te).toHsl(),q=fe.h;return[a(te),a({h:(q+72)%360,s:fe.s,l:fe.l}),a({h:(q+216)%360,s:fe.s,l:fe.l})]}function j(te,fe,q){fe=fe||6,q=q||30;var ee=a(te).toHsl(),Ce=360/q,re=[a(te)];for(ee.h=(ee.h-(Ce*fe>>1)+720)%360;--fe;)ee.h=(ee.h+Ce)%360,re.push(a(ee));return re}function L(te,fe){fe=fe||6;for(var q=a(te).toHsv(),ee=q.h,Ce=q.s,re=q.v,Q=[],X=1/fe;fe--;)Q.push(a({h:ee,s:Ce,v:re})),re=(re+X)%1;return Q}a.mix=function(te,fe,q){q=q===0?0:q||50;var ee=a(te).toRgb(),Ce=a(fe).toRgb(),re=q/100,Q={r:(Ce.r-ee.r)*re+ee.r,g:(Ce.g-ee.g)*re+ee.g,b:(Ce.b-ee.b)*re+ee.b,a:(Ce.a-ee.a)*re+ee.a};return a(Q)},a.readability=function(te,fe){var q=a(te),ee=a(fe);return(m.max(q.getLuminance(),ee.getLuminance())+.05)/(m.min(q.getLuminance(),ee.getLuminance())+.05)},a.isReadable=function(te,fe,q){var ee=a.readability(te,fe),Ce,re;re=!1,Ce=le(q);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":re=ee>=4.5;break;case"AAlarge":re=ee>=3;break;case"AAAsmall":re=ee>=7;break}return re},a.mostReadable=function(te,fe,q){var ee=null,Ce=0,re,Q,X,Z;q=q||{},Q=q.includeFallbackColors,X=q.level,Z=q.size;for(var xe=0;xe<fe.length;xe++)re=a.readability(te,fe[xe]),re>Ce&&(Ce=re,ee=a(fe[xe]));return a.isReadable(te,ee,{level:X,size:Z})||!Q?ee:(q.includeFallbackColors=!1,a.mostReadable(te,["#fff","#000"],q))};var H=a.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=a.hexNames=U(H);function U(te){var fe={};for(var q in te)te.hasOwnProperty(q)&&(fe[te[q]]=q);return fe}function G(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function B(te,fe){ie(te)&&(te="100%");var q=ce(te);return te=w(fe,d(0,parseFloat(te))),q&&(te=parseInt(te*fe,10)/100),m.abs(te-fe)<1e-6?1:te%fe/parseFloat(fe)}function z(te){return w(1,d(0,te))}function V(te){return parseInt(te,16)}function ie(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function ce(te){return typeof te=="string"&&te.indexOf("%")!=-1}function he(te){return te.length==1?"0"+te:""+te}function Ae(te){return te<=1&&(te=te*100+"%"),te}function De(te){return m.round(parseFloat(te)*255).toString(16)}function pe(te){return V(te)/255}var Te=function(){var te="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",q="(?:"+fe+")|(?:"+te+")",ee="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",Ce="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?";return{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+Ce),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(te){return!!Te.CSS_UNIT.exec(te)}function ue(te){te=te.replace(S,"").replace(P,"").toLowerCase();var fe=!1;if(H[te])te=H[te],fe=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var q;return(q=Te.rgb.exec(te))?{r:q[1],g:q[2],b:q[3]}:(q=Te.rgba.exec(te))?{r:q[1],g:q[2],b:q[3],a:q[4]}:(q=Te.hsl.exec(te))?{h:q[1],s:q[2],l:q[3]}:(q=Te.hsla.exec(te))?{h:q[1],s:q[2],l:q[3],a:q[4]}:(q=Te.hsv.exec(te))?{h:q[1],s:q[2],v:q[3]}:(q=Te.hsva.exec(te))?{h:q[1],s:q[2],v:q[3],a:q[4]}:(q=Te.hex8.exec(te))?{r:V(q[1]),g:V(q[2]),b:V(q[3]),a:pe(q[4]),format:fe?"name":"hex8"}:(q=Te.hex6.exec(te))?{r:V(q[1]),g:V(q[2]),b:V(q[3]),format:fe?"name":"hex"}:(q=Te.hex4.exec(te))?{r:V(q[1]+""+q[1]),g:V(q[2]+""+q[2]),b:V(q[3]+""+q[3]),a:pe(q[4]+""+q[4]),format:fe?"name":"hex8"}:(q=Te.hex3.exec(te))?{r:V(q[1]+""+q[1]),g:V(q[2]+""+q[2]),b:V(q[3]+""+q[3]),format:fe?"name":"hex"}:!1}function le(te){var fe,q;return te=te||{level:"AA",size:"small"},fe=(te.level||"AA").toUpperCase(),q=(te.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),q!=="small"&&q!=="large"&&(q="small"),{level:fe,size:q}}N.exports?N.exports=a:!(D=function(){return a}.call(J,M,J,N),D!==void 0&&(N.exports=D))})(Math)},aRTE:function(N,J){N.exports={L:1,M:0,Q:3,H:2}},bQjk:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return function(m){var S=D,P=S.lib,c=P.CipherParams,h=S.enc,w=h.Hex,d=S.format,o=d.Hex={stringify:function(a){return a.ciphertext.toString(w)},parse:function(a){var n=w.parse(a);return c.create({ciphertext:n})}}}(),D.format.Hex})},bT9E:function(N,J,M){"use strict";M.d(J,"a",function(){return m});var D=M("VTBJ");function m(S,P){var c=Object(D.a)({},S);return Array.isArray(P)&&P.forEach(function(h){delete c[h]}),c}},biw7:function(N,J,M){"use strict";var D=M("q1tI"),m=M.n(D),S=D.createContext(null);J.a=S},c5Ni:function(N,J,M){},cv67:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(m){var S=D,P=S.lib,c=P.WordArray,h=P.Hasher,w=S.algo,d=[];(function(){for(var f=0;f<64;f++)d[f]=m.abs(m.sin(f+1))*4294967296|0})();var o=w.MD5=h.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(f,v){for(var g=0;g<16;g++){var b=v+g,i=f[b];f[b]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words,t=f[v+0],T=f[v+1],_=f[v+2],l=f[v+3],k=f[v+4],O=f[v+5],x=f[v+6],y=f[v+7],E=f[v+8],C=f[v+9],I=f[v+10],j=f[v+11],L=f[v+12],H=f[v+13],W=f[v+14],U=f[v+15],G=s[0],B=s[1],z=s[2],V=s[3];G=a(G,B,z,V,t,7,d[0]),V=a(V,G,B,z,T,12,d[1]),z=a(z,V,G,B,_,17,d[2]),B=a(B,z,V,G,l,22,d[3]),G=a(G,B,z,V,k,7,d[4]),V=a(V,G,B,z,O,12,d[5]),z=a(z,V,G,B,x,17,d[6]),B=a(B,z,V,G,y,22,d[7]),G=a(G,B,z,V,E,7,d[8]),V=a(V,G,B,z,C,12,d[9]),z=a(z,V,G,B,I,17,d[10]),B=a(B,z,V,G,j,22,d[11]),G=a(G,B,z,V,L,7,d[12]),V=a(V,G,B,z,H,12,d[13]),z=a(z,V,G,B,W,17,d[14]),B=a(B,z,V,G,U,22,d[15]),G=n(G,B,z,V,T,5,d[16]),V=n(V,G,B,z,x,9,d[17]),z=n(z,V,G,B,j,14,d[18]),B=n(B,z,V,G,t,20,d[19]),G=n(G,B,z,V,O,5,d[20]),V=n(V,G,B,z,I,9,d[21]),z=n(z,V,G,B,U,14,d[22]),B=n(B,z,V,G,k,20,d[23]),G=n(G,B,z,V,C,5,d[24]),V=n(V,G,B,z,W,9,d[25]),z=n(z,V,G,B,l,14,d[26]),B=n(B,z,V,G,E,20,d[27]),G=n(G,B,z,V,H,5,d[28]),V=n(V,G,B,z,_,9,d[29]),z=n(z,V,G,B,y,14,d[30]),B=n(B,z,V,G,L,20,d[31]),G=u(G,B,z,V,O,4,d[32]),V=u(V,G,B,z,E,11,d[33]),z=u(z,V,G,B,j,16,d[34]),B=u(B,z,V,G,W,23,d[35]),G=u(G,B,z,V,T,4,d[36]),V=u(V,G,B,z,k,11,d[37]),z=u(z,V,G,B,y,16,d[38]),B=u(B,z,V,G,I,23,d[39]),G=u(G,B,z,V,H,4,d[40]),V=u(V,G,B,z,t,11,d[41]),z=u(z,V,G,B,l,16,d[42]),B=u(B,z,V,G,x,23,d[43]),G=u(G,B,z,V,C,4,d[44]),V=u(V,G,B,z,L,11,d[45]),z=u(z,V,G,B,U,16,d[46]),B=u(B,z,V,G,_,23,d[47]),G=p(G,B,z,V,t,6,d[48]),V=p(V,G,B,z,y,10,d[49]),z=p(z,V,G,B,W,15,d[50]),B=p(B,z,V,G,O,21,d[51]),G=p(G,B,z,V,L,6,d[52]),V=p(V,G,B,z,l,10,d[53]),z=p(z,V,G,B,I,15,d[54]),B=p(B,z,V,G,T,21,d[55]),G=p(G,B,z,V,E,6,d[56]),V=p(V,G,B,z,U,10,d[57]),z=p(z,V,G,B,x,15,d[58]),B=p(B,z,V,G,H,21,d[59]),G=p(G,B,z,V,k,6,d[60]),V=p(V,G,B,z,j,10,d[61]),z=p(z,V,G,B,_,15,d[62]),B=p(B,z,V,G,C,21,d[63]),s[0]=s[0]+G|0,s[1]=s[1]+B|0,s[2]=s[2]+z|0,s[3]=s[3]+V|0},_doFinalize:function(){var f=this._data,v=f.words,g=this._nDataBytes*8,b=f.sigBytes*8;v[b>>>5]|=128<<24-b%32;var i=m.floor(g/4294967296),s=g;v[(b+64>>>9<<4)+15]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,v[(b+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,f.sigBytes=(v.length+1)*4,this._process();for(var t=this._hash,T=t.words,_=0;_<4;_++){var l=T[_];T[_]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}return t},clone:function(){var f=h.clone.call(this);return f._hash=this._hash.clone(),f}});function a(f,v,g,b,i,s,t){var T=f+(v&g|~v&b)+i+t;return(T<<s|T>>>32-s)+v}function n(f,v,g,b,i,s,t){var T=f+(v&b|g&~b)+i+t;return(T<<s|T>>>32-s)+v}function u(f,v,g,b,i,s,t){var T=f+(v^g^b)+i+t;return(T<<s|T>>>32-s)+v}function p(f,v,g,b,i,s,t){var T=f+(g^(v|~b))+i+t;return(T<<s|T>>>32-s)+v}S.MD5=h._createHelper(o),S.HmacMD5=h._createHmacHelper(o)}(Math),D.MD5})},dQei:function(N,J){for(var M={glog:function(m){if(m<1)throw new Error("glog("+m+")");return M.LOG_TABLE[m]},gexp:function(m){for(;m<0;)m+=255;for(;m>=256;)m-=255;return M.EXP_TABLE[m]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},D=0;D<8;D++)M.EXP_TABLE[D]=1<<D;for(var D=8;D<256;D++)M.EXP_TABLE[D]=M.EXP_TABLE[D-4]^M.EXP_TABLE[D-5]^M.EXP_TABLE[D-6]^M.EXP_TABLE[D-8];for(var D=0;D<255;D++)M.LOG_TABLE[M.EXP_TABLE[D]]=D;N.exports=M},dWSS:function(N,J,M){var D=M("dQei");function m(S,P){if(S.length==null)throw new Error(S.length+"/"+P);for(var c=0;c<S.length&&S[c]==0;)c++;this.num=new Array(S.length-c+P);for(var h=0;h<S.length-c;h++)this.num[h]=S[h+c]}m.prototype={get:function(S){return this.num[S]},getLength:function(){return this.num.length},multiply:function(S){for(var P=new Array(this.getLength()+S.getLength()-1),c=0;c<this.getLength();c++)for(var h=0;h<S.getLength();h++)P[c+h]^=D.gexp(D.glog(this.get(c))+D.glog(S.get(h)));return new m(P,0)},mod:function(S){if(this.getLength()-S.getLength()<0)return this;for(var P=D.glog(this.get(0))-D.glog(S.get(0)),c=new Array(this.getLength()),h=0;h<this.getLength();h++)c[h]=this.get(h);for(var h=0;h<S.getLength();h++)c[h]^=D.gexp(D.glog(S.get(h))+P);return new m(c,0).mod(S)}},N.exports=m},dejd:function(N,J,M){},dmUQ:function(N,J,M){"use strict";var D=M("Ff2n"),m=M("rePB"),S=M("1OyB"),P=M("vuIU"),c=M("Ji7U"),h=M("md7G"),w=M("foSv"),d=M("q1tI"),o=M.n(d),a=M("TSYQ"),n=M.n(a),u=M("4IlW");function p(E,C){var I=Object.keys(E);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(E);C&&(j=j.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),I.push.apply(I,j)}return I}function f(E){for(var C=1;C<arguments.length;C++){var I=arguments[C]!=null?arguments[C]:{};C%2?p(Object(I),!0).forEach(function(j){Object(m.a)(E,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(I)):p(Object(I)).forEach(function(j){Object.defineProperty(E,j,Object.getOwnPropertyDescriptor(I,j))})}return E}function v(E){var C=g();return function(){var j=Object(w.a)(E),L;if(C){var H=Object(w.a)(this).constructor;L=Reflect.construct(j,arguments,H)}else L=j.apply(this,arguments);return Object(h.a)(this,L)}}function g(){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 b(){}function i(E){E.preventDefault()}var s=function(C){return C.replace(/[^\w.-]+/g,"")},t=200,T=600,_=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,l=function(C){return C!=null},k=function(C,I){return I===C||typeof I=="number"&&typeof C=="number"&&isNaN(I)&&isNaN(C)},O=function(E){Object(c.a)(I,E);var C=v(I);function I(j){var L;Object(S.a)(this,I),L=C.call(this,j),L.onKeyDown=function(U){var G=L.props,B=G.onKeyDown,z=G.onPressEnter;if(U.keyCode===u.a.UP){var V=L.getRatio(U);L.up(U,V,null),L.stop()}else if(U.keyCode===u.a.DOWN){var ie=L.getRatio(U);L.down(U,ie,null),L.stop()}else U.keyCode===u.a.ENTER&&z&&z(U);if(L.recordCursorPosition(),L.lastKeyCode=U.keyCode,B){for(var ce=arguments.length,he=new Array(ce>1?ce-1:0),Ae=1;Ae<ce;Ae++)he[Ae-1]=arguments[Ae];B.apply(void 0,[U].concat(he))}},L.onKeyUp=function(U){var G=L.props.onKeyUp;if(L.stop(),L.recordCursorPosition(),G){for(var B=arguments.length,z=new Array(B>1?B-1:0),V=1;V<B;V++)z[V-1]=arguments[V];G.apply(void 0,[U].concat(z))}},L.onChange=function(U){var G=L.props.onChange;L.state.focused&&(L.inputting=!0),L.rawInput=L.props.parser(L.getValueFromEvent(U)),L.setState({inputValue:L.rawInput}),G(L.toNumber(L.rawInput))},L.onMouseUp=function(){var U=L.props.onMouseUp;L.recordCursorPosition(),U&&U.apply(void 0,arguments)},L.onFocus=function(){var U;L.setState({focused:!0}),(U=L.props).onFocus.apply(U,arguments)},L.onBlur=function(){var U=L.props.onBlur;L.inputting=!1,L.setState({focused:!1});var G=L.getCurrentValidValue(L.state.inputValue),B=L.setValue(G,b);if(U){var z=L.input.value,V=L.getInputDisplayValue({focus:!1,value:B});L.input.value=V&&Number(V),U.apply(void 0,arguments),L.input.value=z}},L.getRatio=function(U){var G=1;return U.metaKey||U.ctrlKey?G=.1:U.shiftKey&&(G=10),G},L.getFullNum=function(U){return isNaN(U)?U:/e/i.test(String(U))?Number(U).toFixed(18).replace(/\.?0+$/,""):U},L.getPrecision=function(U){if(l(L.props.precision))return L.props.precision;var G=String(U);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(U){var G=U||L.state,B=G.focused,z=G.inputValue,V=G.value,ie;B?ie=z:ie=L.toPrecisionAsStep(V),ie==null&&(ie="");var ce=L.formatWrapper(ie);return l(L.props.decimalSeparator)&&(ce=ce.toString().replace(".",L.props.decimalSeparator)),ce},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(U){}},L.restoreByAfter=function(U){if(U===void 0)return!1;var G=L.input.value,B=G.lastIndexOf(U);if(B===-1)return!1;var z=L.cursorBefore.length;return L.lastKeyCode===u.a.DELETE&&L.cursorBefore.charAt(z-1)===U[0]?(L.fixCaret(z,z),!0):B+U.length===G.length?(L.fixCaret(B,B),!0):!1},L.partRestoreByAfter=function(U){return U===void 0?!1:Array.prototype.some.call(U,function(G,B){var z=U.substring(B);return L.restoreByAfter(z)})},L.isNotCompleteNumber=function(U){return isNaN(U)||U===""||U===null||U&&U.toString().indexOf(".")===U.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(U,G,B){L.pressingUpOrDown=!0,L.step("down",U,G,B)},L.up=function(U,G,B){L.pressingUpOrDown=!0,L.step("up",U,G,B)},L.saveInput=function(U){L.input=U};var H=j.value;H===void 0&&(H=j.defaultValue),L.state={focused:j.autoFocus};var W=L.getValidValue(L.toNumber(H));return L.state=f(f({},L.state),{},{inputValue:L.toPrecisionAsStep(W),value:W}),L}return Object(P.a)(I,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var H=this.props,W=H.value,U=H.onChange,G=H.max,B=H.min,z=this.state.focused;if(L){if(!k(L.value,W)||!k(L.max,G)||!k(L.min,B)){var V=z?W:this.getValidValue(W),ie;this.pressingUpOrDown?ie=V:this.inputting?ie=this.rawInput:ie=this.toPrecisionAsStep(V),this.setState({value:V,inputValue:ie})}var ce="value"in this.props?W:this.state.value;"max"in this.props&&L.max!==G&&typeof ce=="number"&&ce>G&&U&&U(G),"min"in this.props&&L.min!==B&&typeof ce=="number"&&ce<B&&U&&U(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var he=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===u.a.BACKSPACE?he=this.cursorStart-1:this.lastKeyCode===u.a.DELETE&&(he=this.cursorStart):he=this.input.value.length,this.fixCaret(he,he)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case u.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case u.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ae){}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 H=L;return H===""?H="":this.isNotCompleteNumber(parseFloat(H))?H=this.state.value:H=this.getValidValue(H),this.toNumber(H)}},{key:"getValueFromEvent",value:function(L){var H=L.target.value.trim().replace(/。/g,".");return l(this.props.decimalSeparator)&&(H=H.replace(this.props.decimalSeparator,".")),H}},{key:"getValidValue",value:function(L){var H=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,U=parseFloat(L);return isNaN(U)?L:(U<H&&(U=H),U>W&&(U=W),U)}},{key:"setValue",value:function(L,H){var W=this.props.precision,U=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),G=this.state.value,B=G===void 0?null:G,z=this.state.inputValue,V=z===void 0?null:z,ie=typeof U=="number"?U.toFixed(W):"".concat(U),ce=U!==B||ie!=="".concat(V);return"value"in this.props?(V=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:V},H)):this.setState({value:U,inputValue:this.toPrecisionAsStep(L)},H),ce&&this.props.onChange(U),U}},{key:"getMaxPrecision",value:function(L){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.props,U=W.precision,G=W.step;if(l(U))return U;var B=this.getPrecision(H),z=this.getPrecision(G),V=this.getPrecision(L);return L?Math.max(V,B+z):B+z}},{key:"getPrecisionFactor",value:function(L){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.getMaxPrecision(L,H);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 H=Math.abs(this.getMaxPrecision(L));return isNaN(H)?L.toString():Number(L).toFixed(H)}},{key:"toNumber",value:function(L){var H=this.props.precision,W=this.state.focused,U=L&&L.length>16&&W;return this.isNotCompleteNumber(L)||U?L:l(H)?Math.round(L*Math.pow(10,H))/Math.pow(10,H):Number(L)}},{key:"upStep",value:function(L,H){var W=this.props.step,U=this.getPrecisionFactor(L,H),G=Math.abs(this.getMaxPrecision(L,H)),B=((U*L+U*W*H)/U).toFixed(G);return this.toNumber(B)}},{key:"downStep",value:function(L,H){var W=this.props.step,U=this.getPrecisionFactor(L,H),G=Math.abs(this.getMaxPrecision(L,H)),B=((U*L-U*W*H)/U).toFixed(G);return this.toNumber(B)}},{key:"step",value:function(L,H){var W=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),H&&(H.persist(),H.preventDefault());var B=this.props;if(B.disabled)return;var z=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(z))return;var V=this["".concat(L,"Step")](z,U),ie=V>B.max||V<B.min;if(V>B.max?V=B.max:V<B.min&&(V=B.min),this.setValue(V,null),this.setState({focused:!0},function(){W.pressingUpOrDown=!1}),ie)return;this.autoStepTimer=setTimeout(function(){W[L](H,U,!0)},G?t:T)}},{key:"fixCaret",value:function(L,H){if(L===void 0||H===void 0||!this.input||!this.input.value)return;try{var W=this.input.selectionStart,U=this.input.selectionEnd;(L!==W||H!==U)&&this.input.setSelectionRange(L,H)}catch(G){}}},{key:"render",value:function(){var L,H=this.props,W=H.prefixCls,U=H.disabled,G=H.readOnly,B=H.useTouch,z=H.autoComplete,V=H.upHandler,ie=H.downHandler,ce=H.className,he=H.max,Ae=H.min,De=H.style,pe=H.title,Te=H.onMouseEnter,ye=H.onMouseLeave,ue=H.onMouseOver,le=H.onMouseOut,te=H.required,fe=H.onClick,q=H.tabIndex,ee=H.type,Ce=H.placeholder,re=H.id,Q=H.inputMode,X=H.pattern,Z=H.step,xe=H.maxLength,ve=H.autoFocus,Oe=H.name,Qe=H.onPaste,rt=H.onInput,nt=Object(D.a)(H,["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"]),ct=this.state,dt=ct.value,pt=ct.focused,He=n()(W,(L={},Object(m.a)(L,ce,!!ce),Object(m.a)(L,"".concat(W,"-disabled"),U),Object(m.a)(L,"".concat(W,"-focused"),pt),L)),Pe={};Object.keys(nt).forEach(function(Le){(Le.substr(0,5)==="data-"||Le.substr(0,5)==="aria-"||Le==="role")&&(Pe[Le]=nt[Le])});var at=!G&&!U,ft=this.getInputDisplayValue(null),Je=(dt||dt===0)&&(isNaN(dt)||Number(dt)>=he),st=(dt||dt===0)&&(isNaN(dt)||Number(dt)<=Ae),Ue=Je||U||G,Me=st||U||G,Ne=n()("".concat(W,"-handler"),"".concat(W,"-handler-up"),Object(m.a)({},"".concat(W,"-handler-up-disabled"),Ue)),Ee=n()("".concat(W,"-handler"),"".concat(W,"-handler-down"),Object(m.a)({},"".concat(W,"-handler-down-disabled"),Me)),Se=B?{onTouchStart:Ue?b:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Re=B?{onTouchStart:Me?b:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return o.a.createElement("div",{className:He,style:De,title:pe,onMouseEnter:Te,onMouseLeave:ye,onMouseOver:ue,onMouseOut:le,onFocus:function(){return null},onBlur:function(){return null}},o.a.createElement("div",{className:"".concat(W,"-handler-wrap")},o.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Ne}),V||o.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-up-inner"),onClick:i})),o.a.createElement("span",Object.assign({unselectable:"on"},Re,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:Ee}),ie||o.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-down-inner"),onClick:i}))),o.a.createElement("div",{className:"".concat(W,"-input-wrap")},o.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":he,"aria-valuenow":dt,required:te,type:ee,placeholder:Ce,onPaste:Qe,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(W,"-input"),tabIndex:q,autoComplete:z,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:b,onKeyUp:at?this.onKeyUp:b,autoFocus:ve,maxLength:xe,readOnly:G,disabled:U,max:he,min:Ae,step:Z,name:Oe,title:pe,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ft),pattern:X,inputMode:Q,onInput:rt},Pe))))}}]),I}(o.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:b,onKeyDown:b,onPressEnter:b,onFocus:b,onBlur:b,parser:s,required:!1,autoComplete:"off"};var x=O,y=J.a=x},e7zE:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("3y9D"),M("WYAk"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.Base,c=S.WordArray,h=m.algo,w=h.SHA1,d=h.HMAC,o=h.PBKDF2=P.extend({cfg:P.extend({keySize:128/32,hasher:w,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,n){for(var u=this.cfg,p=d.create(u.hasher,a),f=c.create(),v=c.create([1]),g=f.words,b=v.words,i=u.keySize,s=u.iterations;g.length<i;){var t=p.update(n).finalize(v);p.reset();for(var T=t.words,_=T.length,l=t,k=1;k<s;k++){l=p.finalize(l),p.reset();for(var O=l.words,x=0;x<_;x++)T[x]^=O[x]}f.concat(t),b[0]++}return f.sigBytes=i*4,f}});m.PBKDF2=function(a,n,u){return o.create(u).compute(a,n)}}(),D.PBKDF2})},f4xo:function(N,J,M){var D=M("nVVt");function m(S){this.mode=D.MODE_8BIT_BYTE,this.data=S}m.prototype={getLength:function(S){return this.data.length},write:function(S){for(var P=0;P<this.data.length;P++)S.put(this.data.charCodeAt(P),8)}},N.exports=m},fyJ8:function(N,J,M){"use strict";var D=M("rePB"),m=M("VTBJ"),S=M("Ff2n"),P=M("U8pU"),c=M("q1tI"),h=M.n(c),w=M("TSYQ"),d=M.n(w),o=M("c+Xe"),a=M("sR1s");function n(g){return g&&Object(P.a)(g)==="object"&&!Array.isArray(g)&&!c.isValidElement(g)}function u(g){return typeof g=="string"?!0:Object(o.c)(g)}function p(g,b){var i,s=g.prefixCls,t=g.className,T=g.record,_=g.index,l=g.dataIndex,k=g.render,O=g.children,x=g.component,y=x===void 0?"td":x,E=g.colSpan,C=g.rowSpan,I=g.fixLeft,j=g.fixRight,L=g.firstFixLeft,H=g.lastFixLeft,W=g.firstFixRight,U=g.lastFixRight,G=g.appendNode,B=g.additionalProps,z=B===void 0?{}:B,V=g.ellipsis,ie=g.align,ce=g.rowType,he=g.isSticky,Ae="".concat(s,"-cell"),De,pe;if(O)pe=O;else{var Te=Object(a.b)(T,l);if(pe=Te,k){var ye=k(Te,T,_);n(ye)?(pe=ye.children,De=ye.props):pe=ye}}Object(P.a)(pe)==="object"&&!Array.isArray(pe)&&!c.isValidElement(pe)&&(pe=null),V&&(H||W)&&(pe=c.createElement("span",{className:"".concat(Ae,"-content")},pe));var ue=De||{},le=ue.colSpan,te=ue.rowSpan,fe=ue.style,q=ue.className,ee=Object(S.a)(ue,["colSpan","rowSpan","style","className"]),Ce=le!==void 0?le:E,re=te!==void 0?te:C;if(Ce===0||re===0)return null;var Q={},X=typeof I=="number",Z=typeof j=="number";X&&(Q.position="sticky",Q.left=I),Z&&(Q.position="sticky",Q.right=j);var xe={};ie&&(xe.textAlign=ie);var ve,Oe=V===!0?{showTitle:!0}:V;Oe&&(Oe.showTitle||ce==="header")&&(typeof pe=="string"||typeof pe=="number"?ve=pe.toString():c.isValidElement(pe)&&typeof pe.props.children=="string"&&(ve=pe.props.children));var Qe=Object(m.a)(Object(m.a)(Object(m.a)({title:ve},ee),z),{},{colSpan:Ce&&Ce!==1?Ce:null,rowSpan:re&&re!==1?re:null,className:d()(Ae,t,(i={},Object(D.a)(i,"".concat(Ae,"-fix-left"),X),Object(D.a)(i,"".concat(Ae,"-fix-left-first"),L),Object(D.a)(i,"".concat(Ae,"-fix-left-last"),H),Object(D.a)(i,"".concat(Ae,"-fix-right"),Z),Object(D.a)(i,"".concat(Ae,"-fix-right-first"),W),Object(D.a)(i,"".concat(Ae,"-fix-right-last"),U),Object(D.a)(i,"".concat(Ae,"-ellipsis"),V),Object(D.a)(i,"".concat(Ae,"-with-append"),G),Object(D.a)(i,"".concat(Ae,"-fix-sticky"),(X||Z)&&he),i),z.className,q),style:Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},z.style),xe),Q),fe),ref:u(y)?b:null});return c.createElement(y,Object.assign({},Qe),G,pe)}var f=c.forwardRef(p);f.displayName="Cell";var v=c.memo(f,function(g,b){return b.shouldCellUpdate?!b.shouldCellUpdate(b.record,g.record):!1});J.a=v},gJ3r:function(N,J,M){"use strict";M.d(J,"a",function(){return D});var D=[{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(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.ECB=function(){var m=D.lib.BlockCipherMode.extend();return m.Encryptor=m.extend({processBlock:function(S,P){this._cipher.encryptBlock(S,P)}}),m.Decryptor=m.extend({processBlock:function(S,P){this._cipher.decryptBlock(S,P)}}),m}(),D.mode.ECB})},h78n:function(N,J,M){"use strict";M.d(J,"a",function(){return L});var D=M("q1tI"),m=M.n(D),S=M("TSYQ"),P=M.n(S),c={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},h=function(U){var G=U.map(function(){return Object(D.useRef)()}),B=Object(D.useRef)();return Object(D.useEffect)(function(){var z=Date.now(),V=!1;Object.keys(G).forEach(function(ie){var ce=G[ie].current;if(!ce)return;V=!0;var he=ce.style;he.transitionDuration=".3s, .3s, .3s, .06s",B.current&&z-B.current<100&&(he.transitionDuration="0s, 0s")}),V&&(B.current=Date.now())}),[G]};function w(){return w=Object.assign||function(W){for(var U=1;U<arguments.length;U++){var G=arguments[U];for(var B in G)Object.prototype.hasOwnProperty.call(G,B)&&(W[B]=G[B])}return W},w.apply(this,arguments)}function d(W,U){return p(W)||u(W,U)||a(W,U)||o()}function o(){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 a(W,U){if(!W)return;if(typeof W=="string")return n(W,U);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,U)}function n(W,U){(U==null||U>W.length)&&(U=W.length);for(var G=0,B=new Array(U);G<U;G++)B[G]=W[G];return B}function u(W,U){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(W)))return;var G=[],B=!0,z=!1,V=void 0;try{for(var ie=W[Symbol.iterator](),ce;!(B=(ce=ie.next()).done)&&!(G.push(ce.value),U&&G.length===U);B=!0);}catch(he){z=!0,V=he}finally{try{!B&&ie.return!=null&&ie.return()}finally{if(z)throw V}}return G}function p(W){if(Array.isArray(W))return W}function f(W,U){if(W==null)return{};var G=v(W,U),B,z;if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(W);for(z=0;z<V.length;z++){if(B=V[z],U.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,B))continue;G[B]=W[B]}}return G}function v(W,U){if(W==null)return{};var G={},B=Object.keys(W),z,V;for(V=0;V<B.length;V++){if(z=B[V],U.indexOf(z)>=0)continue;G[z]=W[z]}return G}var g=function(U){var G=U.className,B=U.percent,z=U.prefixCls,V=U.strokeColor,ie=U.strokeLinecap,ce=U.strokeWidth,he=U.style,Ae=U.trailColor,De=U.trailWidth,pe=U.transition,Te=f(U,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Te.gapPosition;var ye=Array.isArray(B)?B:[B],ue=Array.isArray(V)?V:[V],le=h(ye),te=d(le,1),fe=te[0],q=ce/2,ee=100-ce/2,Ce="M ".concat(ie==="round"?q:0,",").concat(q,`
L `).concat(ie==="round"?ee:100,",").concat(q),re="0 0 100 ".concat(ce),Q=0;return m.a.createElement("svg",w({className:P()("".concat(z,"-line"),G),viewBox:re,preserveAspectRatio:"none",style:he},Te),m.a.createElement("path",{className:"".concat(z,"-line-trail"),d:Ce,strokeLinecap:ie,stroke:Ae,strokeWidth:De||ce,fillOpacity:"0"}),ye.map(function(X,Z){var xe={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(Q,"px"),transition:pe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ve=ue[Z]||ue[ue.length-1];return Q+=X,m.a.createElement("path",{key:Z,className:"".concat(z,"-line-path"),d:Ce,strokeLinecap:ie,stroke:ve,strokeWidth:ce,fillOpacity:"0",ref:fe[Z],style:xe})}))};g.defaultProps=c;var b=g;function i(){return i=Object.assign||function(W){for(var U=1;U<arguments.length;U++){var G=arguments[U];for(var B in G)Object.prototype.hasOwnProperty.call(G,B)&&(W[B]=G[B])}return W},i.apply(this,arguments)}function s(W,U){return k(W)||l(W,U)||T(W,U)||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 T(W,U){if(!W)return;if(typeof W=="string")return _(W,U);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 _(W,U)}function _(W,U){(U==null||U>W.length)&&(U=W.length);for(var G=0,B=new Array(U);G<U;G++)B[G]=W[G];return B}function l(W,U){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(W)))return;var G=[],B=!0,z=!1,V=void 0;try{for(var ie=W[Symbol.iterator](),ce;!(B=(ce=ie.next()).done)&&!(G.push(ce.value),U&&G.length===U);B=!0);}catch(he){z=!0,V=he}finally{try{!B&&ie.return!=null&&ie.return()}finally{if(z)throw V}}return G}function k(W){if(Array.isArray(W))return W}function O(W,U){if(W==null)return{};var G=x(W,U),B,z;if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(W);for(z=0;z<V.length;z++){if(B=V[z],U.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,B))continue;G[B]=W[B]}}return G}function x(W,U){if(W==null)return{};var G={},B=Object.keys(W),z,V;for(V=0;V<B.length;V++){if(z=B[V],U.indexOf(z)>=0)continue;G[z]=W[z]}return G}var y=0;function E(W){return+W.replace("%","")}function C(W){return Array.isArray(W)?W:[W]}function I(W,U,G,B){var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,V=arguments.length>5?arguments[5]:void 0,ie=50-B/2,ce=0,he=-ie,Ae=0,De=-2*ie;switch(V){case"left":ce=-ie,he=0,Ae=2*ie,De=0;break;case"right":ce=ie,he=0,Ae=-2*ie,De=0;break;case"bottom":he=ie,De=2*ie;break;default:}var pe="M 50,50 m ".concat(ce,",").concat(he,`
a `).concat(ie,",").concat(ie," 0 1 1 ").concat(Ae,",").concat(-De,`
a `).concat(ie,",").concat(ie," 0 1 1 ").concat(-Ae,",").concat(De),Te=Math.PI*2*ie,ye={stroke:G,strokeDasharray:"".concat(U/100*(Te-z),"px ").concat(Te,"px"),strokeDashoffset:"-".concat(z/2+W/100*(Te-z),"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 j=function(U){var G=U.prefixCls,B=U.strokeWidth,z=U.trailWidth,V=U.gapDegree,ie=U.gapPosition,ce=U.trailColor,he=U.strokeLinecap,Ae=U.style,De=U.className,pe=U.strokeColor,Te=U.percent,ye=O(U,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ue=Object(D.useMemo)(function(){return y+=1,y},[]),le=I(0,100,ce,B,V,ie),te=le.pathString,fe=le.pathStyle,q=C(Te),ee=C(pe),Ce=ee.find(function(xe){return Object.prototype.toString.call(xe)==="[object Object]"}),re=h(q),Q=s(re,1),X=Q[0],Z=function(){var ve=0;return q.map(function(Oe,Qe){var rt=ee[Qe]||ee[ee.length-1],nt=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(ue,")"):"",ct=I(ve,Oe,rt,B,V,ie);return ve+=Oe,m.a.createElement("path",{key:Qe,className:"".concat(G,"-circle-path"),d:ct.pathString,stroke:nt,strokeLinecap:he,strokeWidth:B,opacity:Oe===0?0:1,fillOpacity:"0",style:ct.pathStyle,ref:X[Qe]})})};return m.a.createElement("svg",i({className:P()("".concat(G,"-circle"),De),viewBox:"0 0 100 100",style:Ae},ye),Ce&&m.a.createElement("defs",null,m.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(ue),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(xe,ve){return E(xe)-E(ve)}).map(function(xe,ve){return m.a.createElement("stop",{key:ve,offset:xe,stopColor:Ce[xe]})}))),m.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:te,stroke:ce,strokeLinecap:he,strokeWidth:z||B,fillOpacity:"0",style:fe}),Z().reverse())};j.defaultProps=c;var L=j,H={Line:b,Circle:L}},hW8S:function(N,J,M){"use strict";M.d(J,"a",function(){return P}),M.d(J,"c",function(){return c}),M.d(J,"b",function(){return h});var D=M("VTBJ"),m=M("Ff2n"),S=M("Kwbf"),P="RC_TABLE_INTERNAL_COL_DEFINE";function c(w){var d=w.expandable,o=Object(m.a)(w,["expandable"]);return"expandable"in w?Object(D.a)(Object(D.a)({},o),d):o}function h(w){return Object.keys(w).reduce(function(d,o){return(o.substr(0,5)==="data-"||o.substr(0,5)==="aria-")&&(d[o]=w[o]),d},{})}},jO9C:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.Iso97971={pad:function(m,S){m.concat(D.lib.WordArray.create([2147483648],1)),D.pad.ZeroPadding.pad(m,S)},unpad:function(m){D.pad.ZeroPadding.unpad(m),m.sigBytes--}},D.pad.Iso97971})},jwmR:function(N,J,M){N.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(N,J,M){"use strict";M.d(J,"a",function(){return Dr});var D=M("rePB"),m=M("ODXe"),S=M("Ff2n"),P=M("VTBJ"),c=M("q1tI"),h=M("TSYQ"),w=M.n(h),d=M("Zm9Q"),o=M("6cGi"),a=M("KQm4"),n=M("xEkU"),u=M.n(n),p=M("t23M");function f(Ie){var Ge=Object(c.useRef)(),$e=Object(c.useRef)(!1);function Fe(){for(var be=arguments.length,ke=new Array(be),we=0;we<be;we++)ke[we]=arguments[we];$e.current||(u.a.cancel(Ge.current),Ge.current=u()(function(){Ie.apply(void 0,ke)}))}return Object(c.useEffect)(function(){return function(){$e.current=!0,u.a.cancel(Ge.current)}},[]),Fe}function v(Ie){var Ge=Object(c.useRef)([]),$e=Object(c.useState)({}),Fe=Object(m.a)($e,2),be=Fe[1],ke=Object(c.useRef)(typeof Ie=="function"?Ie():Ie),we=f(function(){var ze=ke.current;Ge.current.forEach(function(Ve){ze=Ve(ze)}),Ge.current=[],ke.current=ze,be({})});function je(ze){Ge.current.push(ze),we()}return[ke.current,je]}var g=M("4IlW");function b(Ie,Ge){var $e,Fe=Ie.prefixCls,be=Ie.id,ke=Ie.active,we=Ie.rtl,je=Ie.tab,ze=je.key,Ve=je.tab,We=je.disabled,Ze=je.closeIcon,mt=Ie.tabBarGutter,Dt=Ie.tabPosition,Nt=Ie.closable,Yt=Ie.renderWrapper,kr=Ie.removeAriaLabel,$r=Ie.editable,Xr=Ie.onClick,Zr=Ie.onRemove,Hr=Ie.onFocus,en="".concat(Fe,"-tab");c.useEffect(function(){return Zr},[]);var tn={};Dt==="top"||Dt==="bottom"?tn[we?"marginLeft":"marginRight"]=mt:tn.marginBottom=mt;var vn=$r&&Nt!==!1&&!We;function ln(Mr){if(We)return;Xr(Mr)}function Pn(Mr){Mr.preventDefault(),Mr.stopPropagation(),$r.onEdit("remove",{key:ze,event:Mr})}var dn=c.createElement("div",{key:ze,ref:Ge,className:w()(en,($e={},Object(D.a)($e,"".concat(en,"-with-remove"),vn),Object(D.a)($e,"".concat(en,"-active"),ke),Object(D.a)($e,"".concat(en,"-disabled"),We),$e)),style:tn,onClick:ln},c.createElement("div",{role:"tab","aria-selected":ke,id:be&&"".concat(be,"-tab-").concat(ze),className:"".concat(en,"-btn"),"aria-controls":be&&"".concat(be,"-panel-").concat(ze),"aria-disabled":We,tabIndex:We?null:0,onClick:function(Nr){Nr.stopPropagation(),ln(Nr)},onKeyDown:function(Nr){[g.a.SPACE,g.a.ENTER].includes(Nr.which)&&(Nr.preventDefault(),ln(Nr))},onFocus:Hr},Ve),vn&&c.createElement("button",{type:"button","aria-label":kr||"remove",tabIndex:0,className:"".concat(en,"-remove"),onClick:function(Nr){Nr.stopPropagation(),Pn(Nr)}},Ze||$r.removeIcon||"\xD7"));return Yt&&(dn=Yt(dn)),dn}var i=c.forwardRef(b),s={width:0,height:0,left:0,top:0};function t(Ie,Ge,$e){return Object(c.useMemo)(function(){for(var Fe,be=new Map,ke=Ge.get((Fe=Ie[0])===null||Fe===void 0?void 0:Fe.key)||s,we=ke.left+ke.width,je=0;je<Ie.length;je+=1){var ze=Ie[je].key,Ve=Ge.get(ze);if(!Ve){var We;Ve=Ge.get((We=Ie[je-1])===null||We===void 0?void 0:We.key)||s}var Ze=be.get(ze)||Object(P.a)({},Ve);Ze.right=we-Ze.left-Ze.width,be.set(ze,Ze)}return be},[Ie.map(function(Fe){return Fe.key}).join("_"),Ge,$e])}var T={width:0,height:0,left:0,top:0,right:0};function _(Ie,Ge,$e,Fe,be){var ke=be.tabs,we=be.tabPosition,je=be.rtl,ze,Ve,We;["top","bottom"].includes(we)?(ze="width",Ve=je?"right":"left",We=Math.abs(Ge.left)):(ze="height",Ve="top",We=-Ge.top);var Ze=Ge[ze],mt=$e[ze],Dt=Fe[ze],Nt=Ze;return mt+Dt>Ze&&(Nt=Ze-Dt),Object(c.useMemo)(function(){if(!ke.length)return[0,0];for(var Yt=ke.length,kr=Yt,$r=0;$r<Yt;$r+=1){var Xr=Ie.get(ke[$r].key)||T;if(Xr[Ve]+Xr[ze]>We+Nt){kr=$r-1;break}}for(var Zr=0,Hr=Yt-1;Hr>=0;Hr-=1){var en=Ie.get(ke[Hr].key)||T;if(en[Ve]<We){Zr=Hr+1;break}}return[Zr,kr]},[Ie,We,Nt,we,ke.map(function(Yt){return Yt.key}).join("_"),je])}var l=M("wx14"),k=M("1OyB"),O=M("vuIU"),x=M("JX7q"),y=M("Ji7U"),E=M("LK+K"),C=M("I8Z2"),I=M("bT9E"),j=M("2GS6"),L=M("Gytx"),H=M.n(L),W=M("U8pU"),U=/iPhone/i,G=/iPod/i,B=/iPad/i,z=/\bAndroid(?:.+)Mobile\b/i,V=/Android/i,ie=/\bAndroid(?:.+)SD4930UR\b/i,ce=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,he=/Windows Phone/i,Ae=/\bWindows(?:.+)ARM\b/i,De=/BlackBerry/i,pe=/BB10/i,Te=/Opera Mini/i,ye=/\b(CriOS|Chrome)(?:.+)Mobile/i,ue=/Mobile(?:.+)Firefox\b/i;function le(Ie,Ge){return Ie.test(Ge)}function te(Ie){var Ge=Ie||(typeof navigator!="undefined"?navigator.userAgent:""),$e=(Ge||"").split("[FBAN");if(typeof $e[1]!="undefined"){var Fe=$e,be=Object(m.a)(Fe,1);Ge=be[0]}if($e=Ge.split("Twitter"),typeof $e[1]!="undefined"){var ke=$e,we=Object(m.a)(ke,1);Ge=we[0]}var je={apple:{phone:le(U,Ge)&&!le(he,Ge),ipod:le(G,Ge),tablet:!le(U,Ge)&&le(B,Ge)&&!le(he,Ge),device:(le(U,Ge)||le(G,Ge)||le(B,Ge))&&!le(he,Ge)},amazon:{phone:le(ie,Ge),tablet:!le(ie,Ge)&&le(ce,Ge),device:le(ie,Ge)||le(ce,Ge)},android:{phone:!le(he,Ge)&&le(ie,Ge)||!le(he,Ge)&&le(z,Ge),tablet:!le(he,Ge)&&!le(ie,Ge)&&!le(z,Ge)&&(le(ce,Ge)||le(V,Ge)),device:!le(he,Ge)&&(le(ie,Ge)||le(ce,Ge)||le(z,Ge)||le(V,Ge))||le(/\bokhttp\b/i,Ge)},windows:{phone:le(he,Ge),tablet:le(Ae,Ge),device:le(he,Ge)||le(Ae,Ge)},other:{blackberry:le(De,Ge),blackberry10:le(pe,Ge),opera:le(Te,Ge),firefox:le(ue,Ge),chrome:le(ye,Ge),device:le(De,Ge)||le(pe,Ge)||le(Te,Ge)||le(ue,Ge)||le(ye,Ge)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var fe=Object(P.a)(Object(P.a)({},te()),{},{isMobile:te}),q=fe;function ee(){}function Ce(Ie,Ge,$e){var Fe=Ge||"";return Ie.key||"".concat(Fe,"item_").concat($e)}function re(Ie){return"".concat(Ie,"-menu-")}function Q(Ie,Ge){var $e=-1;c.Children.forEach(Ie,function(Fe){$e+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?c.Children.forEach(Fe.props.children,function(be){$e+=1,Ge(be,$e)}):Ge(Fe,$e)})}function X(Ie,Ge,$e){if(!Ie||$e.find)return;c.Children.forEach(Ie,function(Fe){if(Fe){var be=Fe.type;if(!be||!(be.isSubMenu||be.isMenuItem||be.isMenuItemGroup))return;Ge.indexOf(Fe.key)!==-1?$e.find=!0:Fe.props.children&&X(Fe.props.children,Ge,$e)}})}var Z=["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"],xe=function(Ge){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Fe){if($e){var be=getComputedStyle(Ge),ke=be.marginLeft,we=be.marginRight;Fe+=+ke.replace("px","")+ +we.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ve=function(Ge,$e,Fe){Ge&&Object(W.a)(Ge.style)==="object"&&(Ge.style[$e]=Fe)},Oe=function(){return q.any},Qe=M("bdgK"),rt=M("i8i4"),nt=M.n(rt),ct=M("wgJM"),dt=M("l4aY"),pt=M("m+aA"),He=M("c+Xe"),Pe=M("zT1h"),at=M("QC+M");function ft(Ie,Ge,$e){return $e?Ie[0]===Ge[0]:Ie[0]===Ge[0]&&Ie[1]===Ge[1]}function Je(Ie,Ge,$e){var Fe=Ie[Ge]||{};return Object(P.a)(Object(P.a)({},Fe),$e)}function st(Ie,Ge,$e,Fe){for(var be=$e.points,ke=Object.keys(Ie),we=0;we<ke.length;we+=1){var je=ke[we];if(ft(Ie[je].points,be,Fe))return"".concat(Ge,"-placement-").concat(je)}return""}var Ue=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ie=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(Ie)||/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(Ie==null?void 0:Ie.substr(0,4)))},Me=M("MNnm");function Ne(Ie,Ge){var $e={};return $e[Ie.toLowerCase()]=Ge.toLowerCase(),$e["Webkit".concat(Ie)]="webkit".concat(Ge),$e["Moz".concat(Ie)]="moz".concat(Ge),$e["ms".concat(Ie)]="MS".concat(Ge),$e["O".concat(Ie)]="o".concat(Ge.toLowerCase()),$e}function Ee(Ie,Ge){var $e={animationend:Ne("Animation","AnimationEnd"),transitionend:Ne("Transition","TransitionEnd")};return Ie&&("AnimationEvent"in Ge||delete $e.animationend.animation,"TransitionEvent"in Ge||delete $e.transitionend.transition),$e}var Se=Ee(Object(Me.a)(),typeof window!="undefined"?window:{}),Re={};if(Object(Me.a)()){var Le=document.createElement("div");Re=Le.style}var Ye={};function tt(Ie){if(Ye[Ie])return Ye[Ie];var Ge=Se[Ie];if(Ge)for(var $e=Object.keys(Ge),Fe=$e.length,be=0;be<Fe;be+=1){var ke=$e[be];if(Object.prototype.hasOwnProperty.call(Ge,ke)&&ke in Re)return Ye[Ie]=Ge[ke],Ye[Ie]}return""}var Ct=tt("animationend"),At=tt("transitionend"),rr=!!(Ct&&At),gt=Ct||"animationend",or=At||"transitionend";function Zt(Ie,Ge){if(!Ie)return null;if(Object(W.a)(Ie)==="object"){var $e=Ge.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return Ie[$e]}return"".concat(Ie,"-").concat(Ge)}var Et="none",jr="appear",Kr="enter",Fr="leave",rn="none",Er="prepare",un="start",Jr="active",Wt="end";function _n(Ie){var Ge=Object(c.useRef)(!1),$e=Object(c.useState)(Ie),Fe=Object(m.a)($e,2),be=Fe[0],ke=Fe[1];function we(je){Ge.current||ke(je)}return Object(c.useEffect)(function(){return function(){Ge.current=!0}},[]),[be,we]}var Cn=Object(Me.a)()?c.useLayoutEffect:c.useEffect,Sn=Cn,gn=function(){var Ie=c.useRef(null);function Ge(){ct.a.cancel(Ie.current)}function $e(Fe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ge();var ke=Object(ct.a)(function(){be<=1?Fe({isCanceled:function(){return ke!==Ie.current}}):$e(Fe,be-1)});Ie.current=ke}return c.useEffect(function(){return function(){Ge()}},[]),[$e,Ge]},Ci=[Er,un,Jr,Wt],ui=!1,mn=!0;function mr(Ie){return Ie===Jr||Ie===Wt}var Vn=function(Ie,Ge){var $e=c.useState(rn),Fe=Object(m.a)($e,2),be=Fe[0],ke=Fe[1],we=gn(),je=Object(m.a)(we,2),ze=je[0],Ve=je[1];function We(){ke(Er)}return Sn(function(){if(be!==rn&&be!==Wt){var Ze=Ci.indexOf(be),mt=Ci[Ze+1],Dt=Ge(be);Dt===ui?ke(mt):ze(function(Nt){function Yt(){if(Nt.isCanceled())return;ke(mt)}Dt===!0?Yt():Promise.resolve(Dt).then(Yt)})}},[Ie,be]),c.useEffect(function(){return function(){Ve()}},[]),[We,be]},pi=function(Ie){var Ge=Object(c.useRef)(),$e=Object(c.useRef)(Ie);$e.current=Ie;var Fe=c.useCallback(function(we){$e.current(we)},[]);function be(we){we&&(we.removeEventListener(or,Fe),we.removeEventListener(gt,Fe))}function ke(we){Ge.current&&Ge.current!==we&&be(Ge.current),we&&we!==Ge.current&&(we.addEventListener(or,Fe),we.addEventListener(gt,Fe),Ge.current=we)}return c.useEffect(function(){return function(){be(Ge.current)}},[]),[ke,be]};function Xn(Ie,Ge,$e,Fe){var be=Fe.motionEnter,ke=be===void 0?!0:be,we=Fe.motionAppear,je=we===void 0?!0:we,ze=Fe.motionLeave,Ve=ze===void 0?!0:ze,We=Fe.motionDeadline,Ze=Fe.motionLeaveImmediately,mt=Fe.onAppearPrepare,Dt=Fe.onEnterPrepare,Nt=Fe.onLeavePrepare,Yt=Fe.onAppearStart,kr=Fe.onEnterStart,$r=Fe.onLeaveStart,Xr=Fe.onAppearActive,Zr=Fe.onEnterActive,Hr=Fe.onLeaveActive,en=Fe.onAppearEnd,tn=Fe.onEnterEnd,vn=Fe.onLeaveEnd,ln=Fe.onVisibleChanged,Pn=_n(),dn=Object(m.a)(Pn,2),Mr=dn[0],Nr=dn[1],on=_n(Et),pn=Object(m.a)(on,2),Tr=pn[0],bn=pn[1],Wn=_n(null),wn=Object(m.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(c.useRef)(!1),ni=Object(c.useRef)(null),Hn=Object(c.useRef)(!1),di=Object(c.useRef)(null);function Xi(){var kn=$e();return kn||di.current}var Ti=Object(c.useRef)(!1);function ii(kn){var On=Xi();if(kn&&!kn.deadline&&kn.target!==On)return;var qn;Tr===jr&&Ti.current?qn=en==null?void 0:en(On,kn):Tr===Kr&&Ti.current?qn=tn==null?void 0:tn(On,kn):Tr===Fr&&Ti.current&&(qn=vn==null?void 0:vn(On,kn)),qn!==!1&&!Hn.current&&(bn(Et),Tn(null))}var In=pi(ii),Nn=Object(m.a)(In,1),zn=Nn[0],Un=c.useMemo(function(){var kn,On,qn;switch(Tr){case"appear":return kn={},Object(D.a)(kn,Er,mt),Object(D.a)(kn,un,Yt),Object(D.a)(kn,Jr,Xr),kn;case"enter":return On={},Object(D.a)(On,Er,Dt),Object(D.a)(On,un,kr),Object(D.a)(On,Jr,Zr),On;case"leave":return qn={},Object(D.a)(qn,Er,Nt),Object(D.a)(qn,un,$r),Object(D.a)(qn,Jr,Hr),qn;default:return{}}},[Tr]),Zn=Vn(Tr,function(kn){if(kn===Er){var On=Un[Er];return On?On(Xi()):ui}if(An in Un){var qn;Tn(((qn=Un[An])===null||qn===void 0?void 0:qn.call(Un,Xi(),null))||null)}return An===Jr&&(zn(Xi()),We>0&&(clearTimeout(ni.current),ni.current=setTimeout(function(){ii({deadline:!0})},We))),mn}),Pi=Object(m.a)(Zn,2),ra=Pi[0],An=Pi[1],Bi=mr(An);Ti.current=Bi,Sn(function(){Nr(Ge);var kn=Yn.current;if(Yn.current=!0,!Ie)return;var On;!kn&&Ge&&je&&(On=jr),kn&&Ge&&ke&&(On=Kr),(kn&&!Ge&&Ve||!kn&&Ze&&!Ge&&Ve)&&(On=Fr),On&&(bn(On),ra())},[Ge]),Object(c.useEffect)(function(){(Tr===jr&&!je||Tr===Kr&&!ke||Tr===Fr&&!Ve)&&bn(Et)},[je,ke,Ve]),Object(c.useEffect)(function(){return function(){clearTimeout(ni.current),Hn.current=!0}},[]),Object(c.useEffect)(function(){Mr!==void 0&&Tr===Et&&(ln==null||ln(Mr))},[Mr,Tr]);var Wi=Mn;return Un[Er]&&An===un&&(Wi=Object(P.a)({transition:"none"},Wi)),[Tr,An,Wi,Mr!=null?Mr:Ge]}var nn=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(){return Object(k.a)(this,$e),Ge.apply(this,arguments)}return Object(O.a)($e,[{key:"render",value:function(){return this.props.children}}]),$e}(c.Component),Bn=nn;function Si(Ie){var Ge=Ie;Object(W.a)(Ie)==="object"&&(Ge=Ie.transitionSupport);function $e(be){return!!(be.motionName&&Ge)}var Fe=c.forwardRef(function(be,ke){var we=be.visible,je=we===void 0?!0:we,ze=be.removeOnLeave,Ve=ze===void 0?!0:ze,We=be.forceRender,Ze=be.children,mt=be.motionName,Dt=be.leavedClassName,Nt=be.eventProps,Yt=$e(be),kr=Object(c.useRef)(),$r=Object(c.useRef)();function Xr(){try{return Object(pt.a)(kr.current||$r.current)}catch(bn){return null}}var Zr=Xn(Yt,je,Xr,be),Hr=Object(m.a)(Zr,4),en=Hr[0],tn=Hr[1],vn=Hr[2],ln=Hr[3],Pn=c.useRef(ln);ln&&(Pn.current=!0);var dn=Object(c.useRef)(ke);dn.current=ke;var Mr=c.useCallback(function(bn){kr.current=bn,Object(He.b)(dn.current,bn)},[]),Nr,on=Object(P.a)(Object(P.a)({},Nt),{},{visible:je});if(!Ze)Nr=null;else if(en===Et||!$e(be))ln?Nr=Ze(Object(P.a)({},on),Mr):!Ve&&Pn.current?Nr=Ze(Object(P.a)(Object(P.a)({},on),{},{className:Dt}),Mr):We?Nr=Ze(Object(P.a)(Object(P.a)({},on),{},{style:{display:"none"}}),Mr):Nr=null;else{var pn,Tr;tn===Er?Tr="prepare":mr(tn)?Tr="active":tn===un&&(Tr="start"),Nr=Ze(Object(P.a)(Object(P.a)({},on),{},{className:w()(Zt(mt,en),(pn={},Object(D.a)(pn,Zt(mt,"".concat(en,"-").concat(Tr)),Tr),Object(D.a)(pn,mt,typeof mt=="string"),pn)),style:vn}),Mr)}return c.createElement(Bn,{ref:$r},Nr)});return Fe.displayName="CSSMotion",Fe}var mi=Si(rr),It="add",xr="keep",ti="remove",vi="removed";function Ri(Ie){var Ge;return Ie&&Object(W.a)(Ie)==="object"&&"key"in Ie?Ge=Ie:Ge={key:Ie},Object(P.a)(Object(P.a)({},Ge),{},{key:String(Ge.key)})}function Di(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ie.map(Ri)}function se(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$e=[],Fe=0,be=Ge.length,ke=Di(Ie),we=Di(Ge);ke.forEach(function(Ve){for(var We=!1,Ze=Fe;Ze<be;Ze+=1){var mt=we[Ze];if(mt.key===Ve.key){Fe<Ze&&($e=$e.concat(we.slice(Fe,Ze).map(function(Dt){return Object(P.a)(Object(P.a)({},Dt),{},{status:It})})),Fe=Ze),$e.push(Object(P.a)(Object(P.a)({},mt),{},{status:xr})),Fe+=1,We=!0;break}}We||$e.push(Object(P.a)(Object(P.a)({},Ve),{},{status:ti}))}),Fe<be&&($e=$e.concat(we.slice(Fe).map(function(Ve){return Object(P.a)(Object(P.a)({},Ve),{},{status:It})})));var je={};$e.forEach(function(Ve){var We=Ve.key;je[We]=(je[We]||0)+1});var ze=Object.keys(je).filter(function(Ve){return je[Ve]>1});return ze.forEach(function(Ve){$e=$e.filter(function(We){var Ze=We.key,mt=We.status;return Ze!==Ve||mt!==ti}),$e.forEach(function(We){We.key===Ve&&(We.status=xr)})}),$e}var K=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(Ie){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mi,$e=function(Fe){Object(y.a)(ke,Fe);var be=Object(E.a)(ke);function ke(){var we;return Object(k.a)(this,ke),we=be.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(je){we.setState(function(ze){var Ve=ze.keyEntities;return{keyEntities:Ve.map(function(We){return We.key!==je?We:Object(P.a)(Object(P.a)({},We),{},{status:vi})})}})},we}return Object(O.a)(ke,[{key:"render",value:function(){var je=this,ze=this.state.keyEntities,Ve=this.props,We=Ve.component,Ze=Ve.children,mt=Ve.onVisibleChanged,Dt=Object(S.a)(Ve,["component","children","onVisibleChanged"]),Nt=We||c.Fragment,Yt={};return K.forEach(function(kr){Yt[kr]=Dt[kr],delete Dt[kr]}),delete Dt.keys,c.createElement(Nt,Dt,ze.map(function(kr){var $r=kr.status,Xr=Object(S.a)(kr,["status"]),Zr=$r===It||$r===xr;return c.createElement(Ge,Object(l.a)({},Yt,{key:Xr.key,visible:Zr,eventProps:Xr,onVisibleChanged:function(en){mt==null||mt(en,{key:Xr.key}),en||je.removeKey(Xr.key)}}),Ze)}))}}],[{key:"getDerivedStateFromProps",value:function(je,ze){var Ve=je.keys,We=ze.keyEntities,Ze=Di(Ve),mt=se(We,Ze);return{keyEntities:mt.filter(function(Dt){var Nt=We.find(function(Yt){var kr=Yt.key;return Dt.key===kr});return!(Nt&&Nt.status===vi&&Dt.status===ti)})}}}]),ke}(c.Component);return $e.defaultProps={component:"div"},$e}var ne=$(rr),ge=mi;function oe(Ie){var Ge=Ie.prefixCls,$e=Ie.motion,Fe=Ie.animation,be=Ie.transitionName;return $e||(Fe?{motionName:"".concat(Ge,"-").concat(Fe)}:be?{motionName:be}:null)}function Ke(Ie){var Ge=Ie.prefixCls,$e=Ie.visible,Fe=Ie.zIndex,be=Ie.mask,ke=Ie.maskMotion,we=Ie.maskAnimation,je=Ie.maskTransitionName;if(!be)return null;var ze={};return(ke||je||we)&&(ze=Object(P.a)({motionAppear:!0},oe({motion:ke,prefixCls:Ge,transitionName:je,animation:we}))),c.createElement(ge,Object(l.a)({},ze,{visible:$e,removeOnLeave:!0}),function(Ve){var We=Ve.className;return c.createElement("div",{style:{zIndex:Fe},className:w()("".concat(Ge,"-mask"),We)})})}var Ot=M("9mu1"),lt=M("o0o1"),_r=M.n(lt),Pt=M("HaE+"),Ur=["measure","align",null,"motion"],Wr=function(Ie,Ge){var $e=Object(c.useState)(null),Fe=Object(m.a)($e,2),be=Fe[0],ke=Fe[1],we=Object(c.useRef)(),je=Object(c.useRef)(!1);function ze(Ze){je.current||ke(Ze)}function Ve(){ct.a.cancel(we.current)}function We(Ze){Ve(),we.current=Object(ct.a)(function(){ze(function(mt){switch(be){case"align":return"motion";case"motion":return"stable";default:}return mt}),Ze==null||Ze()})}return Object(c.useEffect)(function(){ze("measure")},[Ie]),Object(c.useEffect)(function(){switch(be){case"measure":Ge();break;default:}be&&(we.current=Object(ct.a)(Object(Pt.a)(_r.a.mark(function Ze(){var mt,Dt;return _r.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:mt=Ur.indexOf(be),Dt=Ur[mt+1],Dt&&mt!==-1&&ze(Dt);case 3:case"end":return Yt.stop()}},Ze)}))))},[be]),Object(c.useEffect)(function(){return function(){je.current=!0,Ve()}},[]),[be,We]},cn=function(Ie){var Ge=c.useState({width:0,height:0}),$e=Object(m.a)(Ge,2),Fe=$e[0],be=$e[1];function ke(je){be({width:je.offsetWidth,height:je.offsetHeight})}var we=c.useMemo(function(){var je={};if(Ie){var ze=Fe.width,Ve=Fe.height;Ie.indexOf("height")!==-1&&Ve?je.height=Ve:Ie.indexOf("minHeight")!==-1&&Ve&&(je.minHeight=Ve),Ie.indexOf("width")!==-1&&ze?je.width=ze:Ie.indexOf("minWidth")!==-1&&ze&&(je.minWidth=ze)}return je},[Ie,Fe]);return[we,ke]},ri=c.forwardRef(function(Ie,Ge){var $e=Ie.visible,Fe=Ie.prefixCls,be=Ie.className,ke=Ie.style,we=Ie.children,je=Ie.zIndex,ze=Ie.stretch,Ve=Ie.destroyPopupOnHide,We=Ie.forceRender,Ze=Ie.align,mt=Ie.point,Dt=Ie.getRootDomNode,Nt=Ie.getClassNameFromAlign,Yt=Ie.onAlign,kr=Ie.onMouseEnter,$r=Ie.onMouseLeave,Xr=Ie.onMouseDown,Zr=Ie.onTouchStart,Hr=Object(c.useRef)(),en=Object(c.useRef)(),tn=Object(c.useState)(),vn=Object(m.a)(tn,2),ln=vn[0],Pn=vn[1],dn=cn(ze),Mr=Object(m.a)(dn,2),Nr=Mr[0],on=Mr[1];function pn(){ze&&on(Dt())}var Tr=Wr($e,pn),bn=Object(m.a)(Tr,2),Wn=bn[0],wn=bn[1],Mn=Object(c.useRef)();function Tn(){return mt||Dt}function Yn(){var In;(In=Hr.current)===null||In===void 0||In.forceAlign()}function ni(In,Nn){var zn=Nt(Nn);ln!==zn&&Pn(zn),Wn==="align"&&(ln!==zn?Promise.resolve().then(function(){Yn()}):wn(function(){var Un;(Un=Mn.current)===null||Un===void 0||Un.call(Mn)}),Yt==null||Yt(In,Nn))}var Hn=Object(P.a)({},oe(Ie));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Nn=Hn[In];Hn[In]=function(zn,Un){return wn(),Nn==null?void 0:Nn(zn,Un)}});function di(){return new Promise(function(In){Mn.current=In})}c.useEffect(function(){!Hn.motionName&&Wn==="motion"&&wn()},[Hn.motionName,Wn]),c.useImperativeHandle(Ge,function(){return{forceAlign:Yn,getElement:function(){return en.current}}});var Xi=Object(P.a)(Object(P.a)({},Nr),{},{zIndex:je,opacity:Wn==="motion"||Wn==="stable"||!$e?void 0:0,pointerEvents:Wn==="stable"?void 0:"none"},ke),Ti=!0;(Ze==null?void 0:Ze.points)&&(Wn==="align"||Wn==="stable")&&(Ti=!1);var ii=we;return c.Children.count(we)>1&&(ii=c.createElement("div",{className:"".concat(Fe,"-content")},we)),c.createElement(ge,Object(l.a)({visible:$e,ref:en,leavedClassName:"".concat(Fe,"-hidden")},Hn,{onAppearPrepare:di,onEnterPrepare:di,removeOnLeave:Ve,forceRender:We}),function(In,Nn){var zn=In.className,Un=In.style,Zn=w()(Fe,be,ln,zn);return c.createElement(Ot.a,{target:Tn(),key:"popup",ref:Hr,monitorWindowResize:!0,disabled:Ti,align:Ze,onAlign:ni},c.createElement("div",{ref:Nn,className:Zn,onMouseEnter:kr,onMouseLeave:$r,onMouseDownCapture:Xr,onTouchStartCapture:Zr,style:Object(P.a)(Object(P.a)({},Un),Xi)},ii))})});ri.displayName="PopupInner";var gi=ri,Dn=c.forwardRef(function(Ie,Ge){var $e=Ie.prefixCls,Fe=Ie.visible,be=Ie.zIndex,ke=Ie.children,we=Ie.mobile;we=we===void 0?{}:we;var je=we.popupClassName,ze=we.popupStyle,Ve=we.popupMotion,We=Ve===void 0?{}:Ve,Ze=we.popupRender,mt=c.useRef();c.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return mt.current}}});var Dt=Object(P.a)({zIndex:be},ze),Nt=ke;return c.Children.count(ke)>1&&(Nt=c.createElement("div",{className:"".concat($e,"-content")},ke)),Ze&&(Nt=Ze(Nt)),c.createElement(ge,Object(l.a)({visible:Fe,ref:mt,removeOnLeave:!0},We),function(Yt,kr){var $r=Yt.className,Xr=Yt.style,Zr=w()($e,je,$r);return c.createElement("div",{ref:kr,className:Zr,style:Object(P.a)(Object(P.a)({},Xr),Dt)},Nt)})});Dn.displayName="MobilePopupInner";var Mi=Dn,qi=["visible","mobile"],Qn=c.forwardRef(function(Ie,Ge){var $e=Ie.visible,Fe=Ie.mobile,be=Object(S.a)(Ie,qi),ke=Object(c.useState)($e),we=Object(m.a)(ke,2),je=we[0],ze=we[1],Ve=Object(c.useState)(!1),We=Object(m.a)(Ve,2),Ze=We[0],mt=We[1],Dt=Object(P.a)(Object(P.a)({},be),{},{visible:je});Object(c.useEffect)(function(){ze($e),$e&&Fe&&mt(Ue())},[$e,Fe]);var Nt=Ze?c.createElement(Mi,Object(l.a)({},Dt,{mobile:Fe,ref:Ge})):c.createElement(gi,Object(l.a)({},Dt,{ref:Ge}));return c.createElement("div",null,c.createElement(Ke,Dt),Nt)});Qn.displayName="Popup";var ci=Qn,ji=c.createContext(null),Fi=ji;function yi(){}function Ui(){return""}function bi(Ie){return Ie?Ie.ownerDocument:window.document}var oa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function sa(Ie){var Ge=function($e){Object(y.a)(be,$e);var Fe=Object(E.a)(be);function be(ke){var we;Object(k.a)(this,be),we=Fe.call(this,ke),we.popupRef=c.createRef(),we.triggerRef=c.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(ze){var Ve=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",ze),we.delaySetPopupVisible(!0,Ve,Ve?null:ze)},we.onMouseMove=function(ze){we.fireEvents("onMouseMove",ze),we.setPoint(ze)},we.onMouseLeave=function(ze){we.fireEvents("onMouseLeave",ze),we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onPopupMouseEnter=function(){we.clearDelayTimer()},we.onPopupMouseLeave=function(ze){var Ve;if(ze.relatedTarget&&!ze.relatedTarget.setTimeout&&Object(dt.a)((Ve=we.popupRef.current)===null||Ve===void 0?void 0:Ve.getElement(),ze.relatedTarget))return;we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onFocus=function(ze){we.fireEvents("onFocus",ze),we.clearDelayTimer(),we.isFocusToShow()&&(we.focusTime=Date.now(),we.delaySetPopupVisible(!0,we.props.focusDelay))},we.onMouseDown=function(ze){we.fireEvents("onMouseDown",ze),we.preClickTime=Date.now()},we.onTouchStart=function(ze){we.fireEvents("onTouchStart",ze),we.preTouchTime=Date.now()},we.onBlur=function(ze){we.fireEvents("onBlur",ze),we.clearDelayTimer(),we.isBlurToHide()&&we.delaySetPopupVisible(!1,we.props.blurDelay)},we.onContextMenu=function(ze){ze.preventDefault(),we.fireEvents("onContextMenu",ze),we.setPopupVisible(!0,ze)},we.onContextMenuClose=function(){we.isContextMenuToShow()&&we.close()},we.onClick=function(ze){if(we.fireEvents("onClick",ze),we.focusTime){var Ve;if(we.preClickTime&&we.preTouchTime?Ve=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?Ve=we.preClickTime:we.preTouchTime&&(Ve=we.preTouchTime),Math.abs(Ve-we.focusTime)<20)return;we.focusTime=0}we.preClickTime=0,we.preTouchTime=0,we.isClickToShow()&&(we.isClickToHide()||we.isBlurToHide())&&ze&&ze.preventDefault&&ze.preventDefault();var We=!we.state.popupVisible;(we.isClickToHide()&&!We||We&&we.isClickToShow())&&we.setPopupVisible(!we.state.popupVisible,ze)},we.onPopupMouseDown=function(){if(we.hasPopupMouseDown=!0,clearTimeout(we.mouseDownTimeout),we.mouseDownTimeout=window.setTimeout(function(){we.hasPopupMouseDown=!1},0),we.context){var ze;(ze=we.context).onPopupMouseDown.apply(ze,arguments)}},we.onDocumentClick=function(ze){if(we.props.mask&&!we.props.maskClosable)return;var Ve=ze.target,We=we.getRootDomNode(),Ze=we.getPopupDomNode();(!Object(dt.a)(We,Ve)||we.isContextMenuOnly())&&!Object(dt.a)(Ze,Ve)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var ze=we.props.getTriggerDOMNode;if(ze)return ze(we.triggerRef.current);try{var Ve=Object(pt.a)(we.triggerRef.current);if(Ve)return Ve}catch(We){}return nt.a.findDOMNode(Object(x.a)(we))},we.getPopupClassNameFromAlign=function(ze){var Ve=[],We=we.props,Ze=We.popupPlacement,mt=We.builtinPlacements,Dt=We.prefixCls,Nt=We.alignPoint,Yt=We.getPopupClassNameFromAlign;return Ze&&mt&&Ve.push(st(mt,Dt,ze,Nt)),Yt&&Ve.push(Yt(ze)),Ve.join(" ")},we.getComponent=function(){var ze=we.props,Ve=ze.prefixCls,We=ze.destroyPopupOnHide,Ze=ze.popupClassName,mt=ze.onPopupAlign,Dt=ze.popupMotion,Nt=ze.popupAnimation,Yt=ze.popupTransitionName,kr=ze.popupStyle,$r=ze.mask,Xr=ze.maskAnimation,Zr=ze.maskTransitionName,Hr=ze.maskMotion,en=ze.zIndex,tn=ze.popup,vn=ze.stretch,ln=ze.alignPoint,Pn=ze.mobile,dn=ze.forceRender,Mr=we.state,Nr=Mr.popupVisible,on=Mr.point,pn=we.getPopupAlign(),Tr={};return we.isMouseEnterToShow()&&(Tr.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(Tr.onMouseLeave=we.onPopupMouseLeave),Tr.onMouseDown=we.onPopupMouseDown,Tr.onTouchStart=we.onPopupMouseDown,c.createElement(ci,Object(l.a)({prefixCls:Ve,destroyPopupOnHide:We,visible:Nr,point:ln&&on,className:Ze,align:pn,onAlign:mt,animation:Nt,getClassNameFromAlign:we.getPopupClassNameFromAlign},Tr,{stretch:vn,getRootDomNode:we.getRootDomNode,style:kr,mask:$r,zIndex:en,transitionName:Yt,maskAnimation:Xr,maskTransitionName:Zr,maskMotion:Hr,ref:we.popupRef,motion:Dt,mobile:Pn,forceRender:dn}),typeof tn=="function"?tn():tn)},we.attachParent=function(ze){ct.a.cancel(we.attachId);var Ve=we.props,We=Ve.getPopupContainer,Ze=Ve.getDocument,mt=we.getRootDomNode(),Dt;We?(mt||We.length===0)&&(Dt=We(mt)):Dt=Ze(we.getRootDomNode()).body,Dt?Dt.appendChild(ze):we.attachId=Object(ct.a)(function(){we.attachParent(ze)})},we.getContainer=function(){var ze=we.props.getDocument,Ve=ze(we.getRootDomNode()).createElement("div");return Ve.style.position="absolute",Ve.style.top="0",Ve.style.left="0",Ve.style.width="100%",we.attachParent(Ve),Ve},we.setPoint=function(ze){var Ve=we.props.alignPoint;if(!Ve||!ze)return;we.setState({point:{pageX:ze.pageX,pageY:ze.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 ke?je=!!ke.popupVisible:je=!!ke.defaultPopupVisible,we.state={prevPopupVisible:je,popupVisible:je},oa.forEach(function(ze){we["fire".concat(ze)]=function(Ve){we.fireEvents(ze,Ve)}}),we}return Object(O.a)(be,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,je=this.state;if(je.popupVisible){var ze;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ze=we.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Pe.a)(ze,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ze=ze||we.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Pe.a)(ze,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ze=ze||we.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Pe.a)(ze,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Pe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ct.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,ze=we.popupAlign,Ve=we.builtinPlacements;return je&&Ve?Je(Ve,je,ze):ze}},{key:"setPopupVisible",value:function(we,je){var ze=this.props.alignPoint,Ve=this.state.popupVisible;this.clearDelayTimer(),Ve!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:Ve}),this.props.onPopupVisibleChange(we)),ze&&je&&we&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(we,je,ze){var Ve=this,We=je*1e3;if(this.clearDelayTimer(),We){var Ze=ze?{pageX:ze.pageX,pageY:ze.pageY}:null;this.delayTimer=window.setTimeout(function(){Ve.setPopupVisible(we,Ze),Ve.clearDelayTimer()},We)}else this.setPopupVisible(we,ze)}},{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,ze=this.props;return je[we]&&ze[we]?this["fire".concat(we)]:je[we]||ze[we]}},{key:"isClickToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("click")!==-1||ze.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,ze=we.showAction;return je.indexOf("contextMenu")!==-1||ze.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("focus")!==-1||ze.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("focus")!==-1||ze.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 ze=this.props.children.props[we];ze&&ze(je);var Ve=this.props[we];Ve&&Ve(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,je=this.props,ze=je.children,Ve=je.forceRender,We=je.alignPoint,Ze=je.className,mt=je.autoDestroy,Dt=c.Children.only(ze),Nt={key:"trigger"};this.isContextMenuToShow()?Nt.onContextMenu=this.onContextMenu:Nt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Nt.onClick=this.onClick,Nt.onMouseDown=this.onMouseDown,Nt.onTouchStart=this.onTouchStart):(Nt.onClick=this.createTwoChains("onClick"),Nt.onMouseDown=this.createTwoChains("onMouseDown"),Nt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Nt.onMouseEnter=this.onMouseEnter,We&&(Nt.onMouseMove=this.onMouseMove)):Nt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Nt.onMouseLeave=this.onMouseLeave:Nt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Nt.onFocus=this.onFocus,Nt.onBlur=this.onBlur):(Nt.onFocus=this.createTwoChains("onFocus"),Nt.onBlur=this.createTwoChains("onBlur"));var Yt=w()(Dt&&Dt.props&&Dt.props.className,Ze);Yt&&(Nt.className=Yt);var kr=Object(P.a)({},Nt);Object(He.c)(Dt)&&(kr.ref=Object(He.a)(this.triggerRef,Dt.ref));var $r=c.cloneElement(Dt,kr),Xr;return(we||this.popupRef.current||Ve)&&(Xr=c.createElement(Ie,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&mt&&(Xr=null),c.createElement(Fi.Provider,{value:this.triggerContextValue},$r,Xr)}}],[{key:"getDerivedStateFromProps",value:function(we,je){var ze=we.popupVisible,Ve={};return ze!==void 0&&je.popupVisible!==ze&&(Ve.popupVisible=ze,Ve.prevPopupVisible=je.popupVisible),Ve}}]),be}(c.Component);return Ge.contextType=Fi,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ui,getDocument:bi,onPopupVisibleChange:yi,afterPopupVisibleChange:yi,onPopupAlign:yi,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Ei=sa(at.a),Gn={adjustX:1,adjustY:1},Vi={topLeft:{points:["bl","tl"],overflow:Gn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Gn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Gn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Gn,offset:[4,0]}},ta={topLeft:{points:["bl","tl"],overflow:Gn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Gn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Gn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Gn,offset:[4,0]}},_t=Vi,et=0,vt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},xt=function(Ge,$e,Fe){var be=re($e),ke=Ge.getState();Ge.setState({defaultActiveFirst:Object(P.a)(Object(P.a)({},ke.defaultActiveFirst),{},Object(D.a)({},be,Fe))})},Mt=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(Fe){var be;Object(k.a)(this,$e),be=Ge.call(this,Fe),be.onDestroy=function(We){be.props.onDestroy(We)},be.onKeyDown=function(We){var Ze=We.keyCode,mt=be.menuInstance,Dt=be.props.store,Nt=be.getVisible();if(Ze===g.a.ENTER)return be.onTitleClick(We),xt(Dt,be.props.eventKey,!0),!0;if(Ze===g.a.RIGHT)return Nt?mt.onKeyDown(We):(be.triggerOpenChange(!0),xt(Dt,be.props.eventKey,!0)),!0;if(Ze===g.a.LEFT){var Yt;if(Nt)Yt=mt.onKeyDown(We);else return;return Yt||(be.triggerOpenChange(!1),Yt=!0),Yt}return Nt&&(Ze===g.a.UP||Ze===g.a.DOWN)?mt.onKeyDown(We):void 0},be.onOpenChange=function(We){be.props.onOpenChange(We)},be.onPopupVisibleChange=function(We){be.triggerOpenChange(We,We?"mouseenter":"mouseleave")},be.onMouseEnter=function(We){var Ze=be.props,mt=Ze.eventKey,Dt=Ze.onMouseEnter,Nt=Ze.store;xt(Nt,be.props.eventKey,!1),Dt({key:mt,domEvent:We})},be.onMouseLeave=function(We){var Ze=be.props,mt=Ze.parentMenu,Dt=Ze.eventKey,Nt=Ze.onMouseLeave;mt.subMenuInstance=Object(x.a)(be),Nt({key:Dt,domEvent:We})},be.onTitleMouseEnter=function(We){var Ze=be.props,mt=Ze.eventKey,Dt=Ze.onItemHover,Nt=Ze.onTitleMouseEnter;Dt({key:mt,hover:!0}),Nt({key:mt,domEvent:We})},be.onTitleMouseLeave=function(We){var Ze=be.props,mt=Ze.parentMenu,Dt=Ze.eventKey,Nt=Ze.onItemHover,Yt=Ze.onTitleMouseLeave;mt.subMenuInstance=Object(x.a)(be),Nt({key:Dt,hover:!1}),Yt({key:Dt,domEvent:We})},be.onTitleClick=function(We){var Ze=Object(x.a)(be),mt=Ze.props;if(mt.onTitleClick({key:mt.eventKey,domEvent:We}),mt.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!be.getVisible(),"click"),xt(mt.store,be.props.eventKey,!1)},be.onSubMenuClick=function(We){typeof be.props.onClick=="function"&&be.props.onClick(be.addKeyPath(We))},be.onSelect=function(We){be.props.onSelect(We)},be.onDeselect=function(We){be.props.onDeselect(We)},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(We){be.menuInstance=We},be.addKeyPath=function(We){return Object(P.a)(Object(P.a)({},We),{},{keyPath:(We.keyPath||[]).concat(be.props.eventKey)})},be.triggerOpenChange=function(We,Ze){var mt=be.props.eventKey,Dt=function(){be.onOpenChange({key:mt,item:Object(x.a)(be),trigger:Ze,open:We})};Ze==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){Dt()},0):Dt()},be.isChildrenSelected=function(){var We={find:!1};return X(be.props.children,be.props.selectedKeys,We),We.find},be.isInlineMode=function(){return be.getMode()==="inline"},be.adjustWidth=function(){if(!be.subMenuTitle||!be.menuInstance)return;var We=rt.findDOMNode(be.menuInstance);if(We.offsetWidth>=be.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(be.subMenuTitle.offsetWidth,"px")},be.saveSubMenuTitle=function(We){be.subMenuTitle=We},be.getBaseProps=function(){var We=Object(x.a)(be),Ze=We.props,mt=be.getMode();return{mode:mt==="horizontal"?"vertical":mt,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(x.a)(be),subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,triggerSubMenuAction:Ze.triggerSubMenuAction,builtinPlacements:Ze.builtinPlacements,defaultActiveFirst:Ze.store.getState().defaultActiveFirst[re(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(We,Ze){var mt=Object(x.a)(be),Dt=mt.haveRendered,Nt=be.props,Yt=Nt.motion,kr=Nt.rootPrefixCls,$r=Object(P.a)(Object(P.a)({},Yt),{},{leavedClassName:"".concat(kr,"-hidden"),removeOnLeave:!1,motionAppear:Dt||!Ze||We!=="inline"});return $r};var ke=Fe.store,we=Fe.eventKey,je=ke.getState(),ze=je.defaultActiveFirst;be.isRootMenu=!1;var Ve=!1;return ze&&(Ve=ze[we]),xt(ke,we,Ve),be.state={mode:Fe.mode,isOpen:Fe.isOpen},be}return Object(O.a)($e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,ke=this.props,we=ke.mode,je=ke.parentMenu,ze=ke.manualRef,Ve=ke.isOpen,We=function(){be.setState({mode:we,isOpen:Ve})},Ze=Ve!==this.state.isOpen,mt=we!==this.state.mode;if((mt||Ze)&&(ct.a.cancel(this.updateStateRaf),mt?this.updateStateRaf=Object(ct.a)(We):We()),ze&&ze(this),we!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Ve)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,ke=be.onDestroy,we=be.eventKey;ke&&ke(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ct.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(be,ke){var we=this.getBaseProps();return c.createElement(Sr,Object(l.a)({},we,{id:this.internalMenuId,className:be,style:ke}),this.props.children)}},{key:"renderChildren",value:function(){var be=this,ke=this.getBaseProps(),we=ke.mode,je=ke.visible,ze=ke.forceSubMenuRender,Ve=ke.direction,We=this.getMotion(we,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||ze,!this.haveOpened)return c.createElement("div",null);var Ze=w()("".concat(ke.prefixCls,"-sub"),Object(D.a)({},"".concat(ke.prefixCls,"-rtl"),Ve==="rtl"));return this.isInlineMode()?c.createElement(ge,Object(l.a)({visible:ke.visible,forceRender:ze},We),function(mt){var Dt=mt.className,Nt=mt.style,Yt=w()(Ze,Dt);return be.renderPopupMenu(Yt,Nt)}):this.renderPopupMenu(Ze)}},{key:"render",value:function(){var be,ke,we,je=Object(P.a)({},this.props),ze=this.getVisible(),Ve=this.getPrefixCls(),We=this.isInlineMode(),Ze=this.getMode(),mt=w()(Ve,"".concat(Ve,"-").concat(Ze),(be={},Object(D.a)(be,je.className,!!je.className),Object(D.a)(be,this.getOpenClassName(),ze),Object(D.a)(be,this.getActiveClassName(),je.active||ze&&!We),Object(D.a)(be,this.getDisabledClassName(),je.disabled),Object(D.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 Dt={},Nt={},Yt={};je.disabled||(Dt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Nt={onClick:this.onTitleClick},Yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var kr={},$r=je.direction,Xr=$r==="rtl";We&&(Xr?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=c.createElement(this.props.expandIcon,Object(P.a)({},this.props))));var en=c.createElement("div",Object(l.a)({ref:this.saveSubMenuTitle,style:kr,className:"".concat(Ve,"-title"),role:"button"},Yt,Nt,{"aria-expanded":ze},Zr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Hr||c.createElement("i",{className:"".concat(Ve,"-arrow")})),tn=this.renderChildren(),vn=((ke=je.parentMenu)===null||ke===void 0?void 0:ke.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Tn){return Tn.parentNode},ln=vt[Ze],Pn=je.popupOffset?{offset:je.popupOffset}:{},dn=w()((we={},Object(D.a)(we,je.popupClassName,je.popupClassName&&!We),Object(D.a)(we,"".concat(Ve,"-rtl"),Xr),we)),Mr=je.disabled,Nr=je.triggerSubMenuAction,on=je.subMenuOpenDelay,pn=je.forceSubMenuRender,Tr=je.subMenuCloseDelay,bn=je.builtinPlacements;Z.forEach(function(Tn){return delete je[Tn]}),delete je.onClick;var Wn=Xr?Object(P.a)(Object(P.a)({},ta),bn):Object(P.a)(Object(P.a)({},Vi),bn);delete je.direction;var wn=this.getBaseProps(),Mn=We?null:this.getMotion(wn.mode,wn.visible);return c.createElement("li",Object(l.a)({},je,Dt,{className:mt,role:"menuitem"}),c.createElement(Ei,{prefixCls:Ve,popupClassName:w()("".concat(Ve,"-popup"),dn),getPopupContainer:vn,builtinPlacements:Wn,popupPlacement:ln,popupVisible:We?!1:ze,popupAlign:Pn,popup:We?null:tn,action:Mr||We?[]:[Nr],mouseEnterDelay:on,mouseLeaveDelay:Tr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:pn,popupMotion:Mn},en),We?tn:null)}}]),$e}(c.Component);Mt.defaultProps={onMouseEnter:ee,onMouseLeave:ee,onTitleMouseEnter:ee,onTitleMouseLeave:ee,onTitleClick:ee,manualRef:ee,mode:"vertical",title:""};var Lt=Object(C.b)(function(Ie,Ge){var $e=Ie.openKeys,Fe=Ie.activeKey,be=Ie.selectedKeys,ke=Ge.eventKey,we=Ge.subMenuKey;return{isOpen:$e.indexOf(ke)>-1,active:Fe[we]===ke,selectedKeys:be}})(Mt);Lt.isSubMenu=!0;var Ht=Lt,Bt="menuitem-overflowed",ht=.5,wt=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(){var Fe;return Object(k.a)(this,$e),Fe=Ge.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=c.createRef(),Fe.getMenuItemNodes=function(){var be=Fe.props.prefixCls,ke=Fe.childRef.current;return ke?[].slice.call(ke.children).filter(function(we){return we.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(be,ke,we){var je=Fe.props,ze=je.overflowedIndicator,Ve=je.level,We=je.mode,Ze=je.prefixCls,mt=je.theme;if(Ve!==1||We!=="horizontal")return null;var Dt=Fe.props.children[0],Nt=Dt.props,Yt=Nt.children,kr=Nt.title,$r=Nt.style,Xr=Object(S.a)(Nt,["children","title","style"]),Zr=Object(P.a)({},$r),Hr="".concat(be,"-overflowed-indicator"),en="".concat(be,"-overflowed-indicator");ke.length===0&&we!==!0?Zr=Object(P.a)(Object(P.a)({},Zr),{},{display:"none"}):we&&(Zr=Object(P.a)(Object(P.a)({},Zr),{},{visibility:"hidden",position:"absolute"}),Hr="".concat(Hr,"-placeholder"),en="".concat(en,"-placeholder"));var tn=mt?"".concat(Ze,"-").concat(mt):"",vn={};return Z.forEach(function(ln){Xr[ln]!==void 0&&(vn[ln]=Xr[ln])}),c.createElement(Ht,Object(l.a)({title:ze,className:"".concat(Ze,"-overflowed-submenu"),popupClassName:tn},vn,{key:Hr,eventKey:en,disabled:!1,style:Zr}),ke)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var be=Fe.childRef.current;if(!be)return;var ke=be.children;if(!ke||ke.length===0)return;var we=be.children[ke.length-1];ve(we,"display","inline-block");var je=Fe.getMenuItemNodes(),ze=je.filter(function(Ve){return Ve.className.split(" ").indexOf(Bt)>=0});ze.forEach(function(Ve){ve(Ve,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Ve){return xe(Ve,!0)}),ze.forEach(function(Ve){ve(Ve,"display","none")}),Fe.overflowedIndicatorWidth=xe(be.children[be.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Ve,We){return Ve+We},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 ke=xe(be);Fe.overflowedItems=[];var we=0,je;Fe.originalTotalWidth>ke+ht&&(je=-1,Fe.menuItemSizes.forEach(function(ze){we+=ze,we+Fe.overflowedIndicatorWidth<=ke&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(O.a)($e,[{key:"componentDidMount",value:function(){var be=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ke=this.childRef.current;if(!ke)return;this.resizeObserver=new Qe.default(function(we){we.forEach(function(){var je=be.cancelFrameId;cancelAnimationFrame(je),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(ke.children).concat(ke).forEach(function(we){be.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(ke.children).concat(ke).forEach(function(we){be.resizeObserver.observe(we)}),be.setChildrenWidthAndResize()}),this.mutationObserver.observe(ke,{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 ke=this,we=this.state.lastVisibleIndex;return(be||[]).reduce(function(je,ze,Ve){var We=ze;if(ke.props.mode==="horizontal"){var Ze=ke.getOverflowedSubMenuItem(ze.props.eventKey,[]);we!==void 0&&ke.props.className.indexOf("".concat(ke.props.prefixCls,"-root"))!==-1&&(Ve>we&&(We=c.cloneElement(ze,{style:{display:"none"},eventKey:"".concat(ze.props.eventKey,"-hidden"),className:"".concat(Bt)})),Ve===we+1&&(ke.overflowedItems=be.slice(we+1).map(function(Dt){return c.cloneElement(Dt,{key:Dt.props.eventKey,mode:"vertical-left"})}),Ze=ke.getOverflowedSubMenuItem(ze.props.eventKey,ke.overflowedItems)));var mt=[].concat(Object(a.a)(je),[Ze,We]);return Ve===be.length-1&&mt.push(ke.getOverflowedSubMenuItem(ze.props.eventKey,[],!0)),mt}return[].concat(Object(a.a)(je),[We])},[])}},{key:"render",value:function(){var be=this.props,ke=be.visible,we=be.prefixCls,je=be.overflowedIndicator,ze=be.mode,Ve=be.level,We=be.tag,Ze=be.children,mt=be.theme,Dt=Object(S.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Nt=We;return c.createElement(Nt,Object(l.a)({ref:this.childRef},Dt),this.renderChildren(Ze))}}]),$e}(c.Component);wt.defaultProps={tag:"div",className:""};var St=wt;function vr(Ie){return Ie.length?Ie.every(function(Ge){return!!Ge.props.disabled}):!0}function nr(Ie,Ge,$e){var Fe=Ie.getState();Ie.setState({activeKey:Object(P.a)(Object(P.a)({},Fe.activeKey),{},Object(D.a)({},Ge,$e))})}function tr(Ie){return Ie.eventKey||"0-menu-"}function $t(Ie,Ge){var $e=Ge,Fe=Ie.children,be=Ie.eventKey;if($e){var ke;if(Q(Fe,function(we,je){we&&we.props&&!we.props.disabled&&$e===Ce(we,be,je)&&(ke=!0)}),ke)return $e}return $e=null,Ie.defaultActiveFirst&&Q(Fe,function(we,je){!$e&&we&&!we.props.disabled&&($e=Ce(we,be,je))}),$e}function ir(Ie){if(!Ie)return;var Ge=this.instanceArray.indexOf(Ie);Ge!==-1?this.instanceArray[Ge]=Ie:this.instanceArray.push(Ie)}var sr=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(Fe){var be;return Object(k.a)(this,$e),be=Ge.call(this,Fe),be.onKeyDown=function(ke,we){var je=ke.keyCode,ze;if(be.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(ze=We.onKeyDown(ke))}),ze)return 1;var Ve=null;return(je===g.a.UP||je===g.a.DOWN)&&(Ve=be.step(je===g.a.UP?-1:1)),Ve?(ke.preventDefault(),nr(be.props.store,tr(be.props),Ve.props.eventKey),typeof we=="function"&&we(Ve),1):void 0},be.onItemHover=function(ke){var we=ke.key,je=ke.hover;nr(be.props.store,tr(be.props),je?we:null)},be.onDeselect=function(ke){be.props.onDeselect(ke)},be.onSelect=function(ke){be.props.onSelect(ke)},be.onClick=function(ke){be.props.onClick(ke)},be.onOpenChange=function(ke){be.props.onOpenChange(ke)},be.onDestroy=function(ke){be.props.onDestroy(ke)},be.getFlatInstanceArray=function(){return be.instanceArray},be.step=function(ke){var we=be.getFlatInstanceArray(),je=be.props.store.getState().activeKey[tr(be.props)],ze=we.length;if(!ze)return null;ke<0&&(we=we.concat().reverse());var Ve=-1;if(we.every(function(Dt,Nt){return Dt&&Dt.props.eventKey===je?(Ve=Nt,!1):!0}),!be.props.defaultActiveFirst&&Ve!==-1&&vr(we.slice(Ve,ze-1)))return;var We=(Ve+1)%ze,Ze=We;do{var mt=we[Ze];if(!mt||mt.props.disabled)Ze=(Ze+1)%ze;else return mt}while(Ze!==We);return null},be.renderCommonMenuItem=function(ke,we,je){var ze=be.props.store.getState(),Ve=Object(x.a)(be),We=Ve.props,Ze=Ce(ke,We.eventKey,we),mt=ke.props;if(!mt||typeof ke.type=="string")return ke;var Dt=Ze===ze.activeKey,Nt=Object(P.a)(Object(P.a)({mode:mt.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:We.prefixCls,index:we,parentMenu:We.parentMenu,manualRef:mt.disabled?void 0:Object(j.a)(ke.ref,ir.bind(Object(x.a)(be))),eventKey:Ze,active:!mt.disabled&&Dt,multiple:We.multiple,onClick:function(kr){(mt.onClick||ee)(kr),be.onClick(kr)},onItemHover:be.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:be.onOpenChange,onDeselect:be.onDeselect,onSelect:be.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:mt.itemIcon||be.props.itemIcon,expandIcon:mt.expandIcon||be.props.expandIcon},je),{},{direction:We.direction});return(We.mode==="inline"||Oe())&&(Nt.triggerSubMenuAction="click"),c.cloneElement(ke,Object(P.a)(Object(P.a)({},Nt),{},{key:Ze||we}))},be.renderMenuItem=function(ke,we,je){if(!ke)return null;var ze=be.props.store.getState(),Ve={openKeys:ze.openKeys,selectedKeys:ze.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:je};return be.renderCommonMenuItem(ke,we,Ve)},Fe.store.setState({activeKey:Object(P.a)(Object(P.a)({},Fe.store.getState().activeKey),{},Object(D.a)({},Fe.eventKey,$t(Fe,Fe.activeKey)))}),be.instanceArray=[],be}return Object(O.a)($e,[{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||!H()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var ke=this.props,we="activeKey"in ke?ke.activeKey:ke.store.getState().activeKey[tr(ke)],je=$t(ke,we);if(je!==we)nr(ke.store,tr(ke),je);else if("activeKey"in be){var ze=$t(be,be.activeKey);je!==ze&&nr(ke.store,tr(ke),je)}}},{key:"render",value:function(){var be=this,ke=Object(l.a)({},this.props);this.instanceArray=[];var we=w()(ke.prefixCls,ke.className,"".concat(ke.prefixCls,"-").concat(ke.mode)),je={className:we,role:ke.role||"menu"};ke.id&&(je.id=ke.id),ke.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var ze=ke.prefixCls,Ve=ke.eventKey,We=ke.visible,Ze=ke.level,mt=ke.mode,Dt=ke.overflowedIndicator,Nt=ke.theme;return Z.forEach(function(Yt){return delete ke[Yt]}),delete ke.onClick,c.createElement(St,Object(l.a)({},ke,{prefixCls:ze,mode:mt,tag:"ul",level:Ze,theme:Nt,visible:We,overflowedIndicator:Dt},je),Object(d.a)(ke.children).map(function(Yt,kr){return be.renderMenuItem(Yt,kr,Ve||"0-menu-")}))}}]),$e}(c.Component);sr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ee};var ot=Object(C.b)()(sr),Sr=ot,Lr=M("Kwbf");function yr(Ie,Ge,$e){var Fe=Ie.prefixCls,be=Ie.motion,ke=Ie.defaultMotions,we=ke===void 0?{}:ke,je=Ie.openAnimation,ze=Ie.openTransitionName,Ve=Ge.switchingModeFromInline;if(be)return be;if(Object(W.a)(je)==="object"&&je)Object(Lr.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(ze)return{motionName:ze};var We=we[$e];return We||(Ve?null:we.other)}var ar=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(Fe){var be;Object(k.a)(this,$e),be=Ge.call(this,Fe),be.onSelect=function(je){var ze=Object(x.a)(be),Ve=ze.props;if(Ve.selectable){var We=be.store.getState(),Ze=We.selectedKeys,mt=je.key;Ve.multiple?Ze=Ze.concat([mt]):Ze=[mt],"selectedKeys"in Ve||be.store.setState({selectedKeys:Ze}),Ve.onSelect(Object(P.a)(Object(P.a)({},je),{},{selectedKeys:Ze}))}},be.onClick=function(je){var ze=be.getRealMenuMode(),Ve=Object(x.a)(be),We=Ve.store,Ze=Ve.props.onOpenChange;ze!=="inline"&&!("openKeys"in be.props)&&(We.setState({openKeys:[]}),Ze([])),be.props.onClick(je)},be.onKeyDown=function(je,ze){be.innerMenu.getWrappedInstance().onKeyDown(je,ze)},be.onOpenChange=function(je){var ze=Object(x.a)(be),Ve=ze.props,We=be.store.getState().openKeys.concat(),Ze=!1,mt=function(Nt){var Yt=!1;if(Nt.open)Yt=We.indexOf(Nt.key)===-1,Yt&&We.push(Nt.key);else{var kr=We.indexOf(Nt.key);Yt=kr!==-1,Yt&&We.splice(kr,1)}Ze=Ze||Yt};Array.isArray(je)?je.forEach(mt):mt(je),Ze&&("openKeys"in be.props||be.store.setState({openKeys:We}),Ve.onOpenChange(We))},be.onDeselect=function(je){var ze=Object(x.a)(be),Ve=ze.props;if(Ve.selectable){var We=be.store.getState().selectedKeys.concat(),Ze=je.key,mt=We.indexOf(Ze);mt!==-1&&We.splice(mt,1),"selectedKeys"in Ve||be.store.setState({selectedKeys:We}),Ve.onDeselect(Object(P.a)(Object(P.a)({},je),{},{selectedKeys:We}))}},be.onMouseEnter=function(je){be.restoreModeVerticalFromInline();var ze=be.props.onMouseEnter;ze&&ze(je)},be.onTransitionEnd=function(je){var ze=je.propertyName==="width"&&je.target===je.currentTarget,Ve=je.target.className,We=Object.prototype.toString.call(Ve)==="[object SVGAnimatedString]"?Ve.animVal:Ve,Ze=je.propertyName==="font-size"&&We.indexOf("anticon")>=0;(ze||Ze)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(je){be.innerMenu=je},be.isRootMenu=!0;var ke=Fe.defaultSelectedKeys,we=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(ke=Fe.selectedKeys||[]),"openKeys"in Fe&&(we=Fe.openKeys||[]),be.store=Object(C.c)({selectedKeys:ke,openKeys:we,activeKey:{"0-menu-":$t(Fe,Fe.activeKey)}}),be.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:be.store},be}return Object(O.a)($e,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){var ke=this.props,we=ke.siderCollapsed,je=ke.inlineCollapsed,ze=ke.onOpenChange;(!be.inlineCollapsed&&je||!be.siderCollapsed&&we)&&ze([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,ke=this.store,we=this.prevOpenKeys,je=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");je?(this.prevOpenKeys=ke.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,ke=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return ke&&we?"inline":we?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,ke=be.inlineCollapsed,we=be.siderCollapsed;return we!==void 0?we:ke}},{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(P.a)({},Object(I.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ke=this.getRealMenuMode();return be.className+=" ".concat(be.prefixCls,"-root"),be.direction==="rtl"&&(be.className+=" ".concat(be.prefixCls,"-rtl")),be=Object(P.a)(Object(P.a)({},be),{},{mode:ke,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:yr(this.props,this.state,ke)}),delete be.openAnimation,delete be.openTransitionName,c.createElement(C.a,{store:this.store},c.createElement(Sr,Object(l.a)({},be,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(be,ke){var we=ke.prevProps,je=ke.store,ze=je.getState(),Ve={},We={prevProps:be};return we.mode==="inline"&&be.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in be?Ve.openKeys=be.openKeys||[]:((be.inlineCollapsed&&!we.inlineCollapsed||be.siderCollapsed&&!we.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=ze.openKeys,Ve.openKeys=[]),(!be.inlineCollapsed&&we.inlineCollapsed||!be.siderCollapsed&&we.siderCollapsed)&&(Ve.openKeys=ke.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(Ve).length&&je.setState(Ve),We}}]),$e}(c.Component);ar.defaultProps={selectable:!0,onClick:ee,onSelect:ee,onOpenChange:ee,onDeselect:ee,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"\xB7\xB7\xB7")};var pr=ar,er=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(){var Fe;return Object(k.a)(this,$e),Fe=Ge.apply(this,arguments),Fe.onKeyDown=function(be){var ke=be.keyCode;return ke===g.a.ENTER?(Fe.onClick(be),!0):void 0},Fe.onMouseLeave=function(be){var ke=Fe.props,we=ke.eventKey,je=ke.onItemHover,ze=ke.onMouseLeave;je({key:we,hover:!1}),ze({key:we,domEvent:be})},Fe.onMouseEnter=function(be){var ke=Fe.props,we=ke.eventKey,je=ke.onItemHover,ze=ke.onMouseEnter;je({key:we,hover:!0}),ze({key:we,domEvent:be})},Fe.onClick=function(be){var ke=Fe.props,we=ke.eventKey,je=ke.multiple,ze=ke.onClick,Ve=ke.onSelect,We=ke.onDeselect,Ze=ke.isSelected,mt={key:we,keyPath:[we],item:Object(x.a)(Fe),domEvent:be};ze(mt),je?Ze?We(mt):Ve(mt):Ze||Ve(mt)},Fe.saveNode=function(be){Fe.node=be},Fe}return Object(O.a)($e,[{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,ke=Object(P.a)({},this.props),we=w()(this.getPrefixCls(),ke.className,(be={},Object(D.a)(be,this.getActiveClassName(),!ke.disabled&&ke.active),Object(D.a)(be,this.getSelectedClassName(),ke.isSelected),Object(D.a)(be,this.getDisabledClassName(),ke.disabled),be)),je=Object(P.a)(Object(P.a)({},ke.attribute),{},{title:typeof ke.title=="string"?ke.title:void 0,className:we,role:ke.role||"menuitem","aria-disabled":ke.disabled});ke.role==="option"?je=Object(P.a)(Object(P.a)({},je),{},{role:"option","aria-selected":ke.isSelected}):(ke.role===null||ke.role==="none")&&(je.role="none");var ze={onClick:ke.disabled?null:this.onClick,onMouseLeave:ke.disabled?null:this.onMouseLeave,onMouseEnter:ke.disabled?null:this.onMouseEnter},Ve=Object(P.a)({},ke.style);ke.mode==="inline"&&(ke.direction==="rtl"?Ve.paddingRight=ke.inlineIndent*ke.level:Ve.paddingLeft=ke.inlineIndent*ke.level),Z.forEach(function(Ze){return delete ke[Ze]}),delete ke.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object(l.a)({},Object(I.a)(ke,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,ze,{style:Ve,ref:this.saveNode}),ke.children,We)}}]),$e}(c.Component);er.isMenuItem=!0,er.defaultProps={onSelect:ee,onMouseEnter:ee,onMouseLeave:ee,manualRef:ee};var lr=Object(C.b)(function(Ie,Ge){var $e=Ie.activeKey,Fe=Ie.selectedKeys,be=Ge.eventKey,ke=Ge.subMenuKey;return{active:$e[ke]===be,isSelected:Array.isArray(Fe)?Fe.indexOf(be)!==-1:Fe===be}})(er),Br=lr,Ft=function(Ie){Object(y.a)($e,Ie);var Ge=Object(E.a)($e);function $e(){var Fe;return Object(k.a)(this,$e),Fe=Ge.apply(this,arguments),Fe.renderInnerMenuItem=function(be){var ke=Fe.props,we=ke.renderMenuItem,je=ke.index;return we(be,je,Fe.props.subMenuKey)},Fe}return Object(O.a)($e,[{key:"render",value:function(){var be=Object(l.a)({},this.props),ke=be.className,we=ke===void 0?"":ke,je=be.rootPrefixCls,ze="".concat(je,"-item-group-title"),Ve="".concat(je,"-item-group-list"),We=be.title,Ze=be.children;return Z.forEach(function(mt){return delete be[mt]}),delete be.direction,c.createElement("li",Object(l.a)({},be,{onClick:function(Dt){return Dt.stopPropagation()},className:"".concat(we," ").concat(je,"-item-group")}),c.createElement("div",{className:ze,title:typeof We=="string"?We:void 0},We),c.createElement("ul",{className:Ve},c.Children.map(Ze,this.renderInnerMenuItem)))}}]),$e}(c.Component);Ft.isMenuItemGroup=!0,Ft.defaultProps={disabled:!0};var Xt=Ft,zt=function(Ge){var $e=Ge.className,Fe=Ge.rootPrefixCls,be=Ge.style;return c.createElement("li",{className:"".concat($e," ").concat(Fe,"-item-divider"),style:be})};zt.defaultProps={disabled:!0,className:"",style:{}};var ur=zt,Ar=pr,qe=M("eDIo");function Ut(Ie,Ge){var $e=Ie.prefixCls,Fe=Ie.editable,be=Ie.locale,ke=Ie.style;return!Fe||Fe.showAdd===!1?null:c.createElement("button",{ref:Ge,type:"button",className:"".concat($e,"-nav-add"),style:ke,"aria-label":(be==null?void 0:be.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var Gr=c.forwardRef(Ut);function Qr(Ie,Ge){var $e=Ie.prefixCls,Fe=Ie.id,be=Ie.tabs,ke=Ie.locale,we=Ie.mobile,je=Ie.moreIcon,ze=je===void 0?"More":je,Ve=Ie.moreTransitionName,We=Ie.style,Ze=Ie.className,mt=Ie.editable,Dt=Ie.tabBarGutter,Nt=Ie.rtl,Yt=Ie.onTabClick,kr=Object(c.useState)(!1),$r=Object(m.a)(kr,2),Xr=$r[0],Zr=$r[1],Hr=Object(c.useState)(null),en=Object(m.a)(Hr,2),tn=en[0],vn=en[1],ln="".concat(Fe,"-more-popup"),Pn="".concat($e,"-dropdown"),dn=tn!==null?"".concat(ln,"-").concat(tn):null,Mr=ke==null?void 0:ke.dropdownAriaLabel,Nr=c.createElement(Ar,{onClick:function(Mn){var Tn=Mn.key,Yn=Mn.domEvent;Yt(Tn,Yn),Zr(!1)},id:ln,tabIndex:-1,role:"listbox","aria-activedescendant":dn,selectedKeys:[tn],"aria-label":Mr!==void 0?Mr:"expanded dropdown"},be.map(function(wn){return c.createElement(Br,{key:wn.key,id:"".concat(ln,"-").concat(wn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(wn.key),disabled:wn.disabled},wn.tab)}));function on(wn){for(var Mn=be.filter(function(di){return!di.disabled}),Tn=Mn.findIndex(function(di){return di.key===tn})||0,Yn=Mn.length,ni=0;ni<Yn;ni+=1){Tn=(Tn+wn+Yn)%Yn;var Hn=Mn[Tn];if(!Hn.disabled){vn(Hn.key);return}}}function pn(wn){var Mn=wn.which;if(!Xr){[g.a.DOWN,g.a.SPACE,g.a.ENTER].includes(Mn)&&(Zr(!0),wn.preventDefault());return}switch(Mn){case g.a.UP:on(-1),wn.preventDefault();break;case g.a.DOWN:on(1),wn.preventDefault();break;case g.a.ESC:Zr(!1);break;case g.a.SPACE:case g.a.ENTER:tn!==null&&Yt(tn,wn);break}}Object(c.useEffect)(function(){var wn=document.getElementById(dn);wn&&wn.scrollIntoView&&wn.scrollIntoView(!1)},[tn]),Object(c.useEffect)(function(){Xr||vn(null)},[Xr]);var Tr=Object(D.a)({},Nt?"marginLeft":"marginRight",Dt);be.length||(Tr.visibility="hidden",Tr.order=1);var bn=w()(Object(D.a)({},"".concat(Pn,"-rtl"),Nt)),Wn=we?null:c.createElement(qe.a,{prefixCls:Pn,overlay:Nr,trigger:["hover"],visible:Xr,transitionName:Ve,onVisibleChange:Zr,overlayClassName:bn,mouseEnterDelay:.1,mouseLeaveDelay:.1},c.createElement("button",{type:"button",className:"".concat($e,"-nav-more"),style:Tr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":ln,id:"".concat(Fe,"-more"),"aria-expanded":Xr,onKeyDown:pn},ze));return c.createElement("div",{className:w()("".concat($e,"-nav-operations"),Ze),style:We,ref:Ge},Wn,c.createElement(Gr,{prefixCls:$e,locale:ke,editable:mt}))}var Vt=c.forwardRef(Qr),wr=Object(c.createContext)(null),Qt=.1,Rt=.01,Kt=20,cr=Math.pow(.995,Kt);function qt(){var Ie=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(Ie)||/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(Ie.substr(0,4)))}function yt(Ie,Ge){var $e=Object(c.useState)(),Fe=Object(m.a)($e,2),be=Fe[0],ke=Fe[1],we=Object(c.useState)(0),je=Object(m.a)(we,2),ze=je[0],Ve=je[1],We=Object(c.useState)(0),Ze=Object(m.a)(We,2),mt=Ze[0],Dt=Ze[1],Nt=Object(c.useState)(),Yt=Object(m.a)(Nt,2),kr=Yt[0],$r=Yt[1],Xr=Object(c.useRef)();function Zr(Mr){var Nr=Mr.touches[0],on=Nr.screenX,pn=Nr.screenY;ke({x:on,y:pn}),window.clearInterval(Xr.current)}function Hr(Mr){if(!be)return;Mr.preventDefault();var Nr=Mr.touches[0],on=Nr.screenX,pn=Nr.screenY;ke({x:on,y:pn});var Tr=on-be.x,bn=pn-be.y;Ge(Tr,bn);var Wn=Date.now();Ve(Wn),Dt(Wn-ze),$r({x:Tr,y:bn})}function en(){if(!be)return;if(ke(null),$r(null),kr){var Mr=kr.x/mt,Nr=kr.y/mt,on=Math.abs(Mr),pn=Math.abs(Nr);if(Math.max(on,pn)<Qt)return;var Tr=Mr,bn=Nr;Xr.current=window.setInterval(function(){if(Math.abs(Tr)<Rt&&Math.abs(bn)<Rt){window.clearInterval(Xr.current);return}Tr*=cr,bn*=cr,Ge(Tr*Kt,bn*Kt)},Kt)}}var tn=Object(c.useRef)(0),vn=Object(c.useRef)(!1),ln=Object(c.useRef)();function Pn(Mr){var Nr=Mr.deltaX,on=Mr.deltaY,pn=0,Tr=Math.abs(Nr),bn=Math.abs(on);Tr===bn?pn=ln.current==="x"?Nr:on:Tr>bn?(pn=Nr,ln.current="x"):(pn=on,ln.current="y");var Wn=Date.now();Wn-tn.current>100&&(vn.current=!1),(Ge(-pn,-pn)||vn.current)&&(Mr.preventDefault(),vn.current=!0),tn.current=Wn}var dn=Object(c.useRef)(null);dn.current={onTouchStart:Zr,onTouchMove:Hr,onTouchEnd:en,onWheel:Pn},c.useEffect(function(){function Mr(Tr){dn.current.onTouchStart(Tr)}function Nr(Tr){dn.current.onTouchMove(Tr)}function on(Tr){dn.current.onTouchEnd(Tr)}function pn(Tr){dn.current.onWheel(Tr)}return document.addEventListener("touchmove",Nr,{passive:!1}),document.addEventListener("touchend",on,{passive:!1}),Ie.current.addEventListener("touchstart",Mr,{passive:!1}),Ie.current.addEventListener("wheel",pn),function(){document.removeEventListener("touchmove",Nr),document.removeEventListener("touchend",on)}},[])}function bt(){var Ie=Object(c.useRef)(new Map);function Ge(Fe){return Ie.current.has(Fe)||Ie.current.set(Fe,c.createRef()),Ie.current.get(Fe)}function $e(Fe){Ie.current.delete(Fe)}return[Ge,$e]}function Gt(Ie,Ge){var $e=c.useRef(Ie),Fe=c.useState({}),be=Object(m.a)(Fe,2),ke=be[1];function we(je){var ze=typeof je=="function"?je($e.current):je;ze!==$e.current&&Ge(ze,$e.current),$e.current=ze,ke({})}return[$e.current,we]}var kt=function(Ge){var $e=Ge.position,Fe=Ge.prefixCls,be=Ge.extra;if(!be)return null;var ke,we=be;return $e==="right"&&(ke=we.right||!we.left&&we||null),$e==="left"&&(ke=we.left||null),ke?c.createElement("div",{className:"".concat(Fe,"-extra-content")},ke):null};function Pr(Ie,Ge){var $e,Fe=c.useContext(wr),be=Fe.prefixCls,ke=Fe.tabs,we=Ie.className,je=Ie.style,ze=Ie.id,Ve=Ie.animated,We=Ie.activeKey,Ze=Ie.rtl,mt=Ie.extra,Dt=Ie.editable,Nt=Ie.locale,Yt=Ie.tabPosition,kr=Ie.tabBarGutter,$r=Ie.children,Xr=Ie.onTabClick,Zr=Ie.onTabScroll,Hr=Object(c.useRef)(),en=Object(c.useRef)(),tn=Object(c.useRef)(),vn=Object(c.useRef)(),ln=bt(),Pn=Object(m.a)(ln,2),dn=Pn[0],Mr=Pn[1],Nr=Yt==="top"||Yt==="bottom",on=Gt(0,function(Ln,xn){Nr&&Zr&&Zr({direction:Ln>xn?"left":"right"})}),pn=Object(m.a)(on,2),Tr=pn[0],bn=pn[1],Wn=Gt(0,function(Ln,xn){!Nr&&Zr&&Zr({direction:Ln>xn?"top":"bottom"})}),wn=Object(m.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(c.useState)(0),ni=Object(m.a)(Yn,2),Hn=ni[0],di=ni[1],Xi=Object(c.useState)(0),Ti=Object(m.a)(Xi,2),ii=Ti[0],In=Ti[1],Nn=Object(c.useState)(0),zn=Object(m.a)(Nn,2),Un=zn[0],Zn=zn[1],Pi=Object(c.useState)(0),ra=Object(m.a)(Pi,2),An=ra[0],Bi=ra[1],Wi=Object(c.useState)(null),kn=Object(m.a)(Wi,2),On=kn[0],qn=kn[1],Ba=Object(c.useState)(null),wa=Object(m.a)(Ba,2),la=wa[0],ua=wa[1],ka=Object(c.useState)(0),Ca=Object(m.a)(ka,2),La=Ca[0],Wa=Ca[1],Xa=Object(c.useState)(0),Ma=Object(m.a)(Xa,2),ca=Ma[0],Sa=Ma[1],ba=v(new Map),da=Object(m.a)(ba,2),co=da[0],Ea=da[1],Ta=t(ke,co,Hn),ha="".concat(be,"-nav-operations-hidden"),fa=0,$i=0;Nr?Ze?(fa=0,$i=Math.max(0,Hn-On)):(fa=Math.min(0,On-Hn),$i=0):(fa=Math.min(0,la-ii),$i=0);function na(Ln){return Ln<fa?[fa,!1]:Ln>$i?[$i,!1]:[Ln,!0]}var Cr=Object(c.useRef)(),Or=Object(c.useState)(),fr=Object(m.a)(Or,2),En=fr[0],gr=fr[1];function pa(){gr(Date.now())}function $a(){window.clearTimeout(Cr.current)}yt(Hr,function(Ln,xn){var xi=!1;function zi(Ia,ma){Ia(function(Ka){var xa=na(Ka+ma),_i=Object(m.a)(xa,2),Qa=_i[0],fo=_i[1];return xi=fo,Qa})}if(Nr){if(On>=Hn)return xi;zi(bn,Ln)}else{if(la>=ii)return xi;zi(Tn,xn)}return $a(),pa(),xi}),Object(c.useEffect)(function(){return $a(),En&&(Cr.current=window.setTimeout(function(){gr(0)},100)),$a},[En]);function jn(){var Ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,xn=Ta.get(Ln);if(!xn)return;if(Nr){var xi=Tr;Ze?xn.right<Tr?xi=xn.right:xn.right+xn.width>Tr+On&&(xi=xn.right+xn.width-On):xn.left<-Tr?xi=-xn.left:xn.left+xn.width>-Tr+On&&(xi=-(xn.left+xn.width-On)),Tn(0),bn(na(xi)[0])}else{var zi=Mn;xn.top<-Mn?zi=-xn.top:xn.top+xn.height>-Mn+la&&(zi=-(xn.top+xn.height-la)),bn(0),Tn(na(zi)[0])}}var Oa=_(Ta,{width:On,height:la,left:Tr,top:Mn},{width:Un,height:An},{width:La,height:ca},Object(P.a)(Object(P.a)({},Ie),{},{tabs:ke})),Do=Object(m.a)(Oa,2),Jo=Do[0],Qo=Do[1],Zo=ke.map(function(Ln){var xn=Ln.key;return c.createElement(i,{id:ze,prefixCls:be,key:xn,rtl:Ze,tab:Ln,closable:Ln.closable,editable:Dt,active:xn===We,tabPosition:Yt,tabBarGutter:kr,renderWrapper:$r,removeAriaLabel:Nt==null?void 0:Nt.removeAriaLabel,ref:dn(xn),onClick:function(zi){Xr(xn,zi)},onRemove:function(){Mr(xn)},onFocus:function(){jn(xn),pa(),Ze||(Hr.current.scrollLeft=0),Hr.current.scrollTop=0}})}),ho=f(function(){var Ln,xn,xi,zi,Ia,ma,Ka,xa,_i,Qa=((Ln=Hr.current)===null||Ln===void 0?void 0:Ln.offsetWidth)||0,fo=((xn=Hr.current)===null||xn===void 0?void 0:xn.offsetHeight)||0,po=((xi=vn.current)===null||xi===void 0?void 0:xi.offsetWidth)||0,Ki=((zi=vn.current)===null||zi===void 0?void 0:zi.offsetHeight)||0,Rn=((Ia=tn.current)===null||Ia===void 0?void 0:Ia.offsetWidth)||0,aa=((ma=tn.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;qn(Qa),ua(fo),Wa(po),Sa(Ki);var va=(((Ka=en.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,ga=(((xa=en.current)===null||xa===void 0?void 0:xa.offsetHeight)||0)-Ki;di(va),In(ga);var mo=(_i=tn.current)===null||_i===void 0?void 0:_i.className.includes(ha);Zn(va-(mo?0:Rn)),Bi(ga-(mo?0:aa)),Ea(function(){var Za=new Map;return ke.forEach(function(Io){var No=Io.key,Ra=dn(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=ke.slice(0,Jo),Hi=ke.slice(Qo+1),oi=[].concat(Object(a.a)(qo),Object(a.a)(Hi)),ki=Object(c.useState)(),si=Object(m.a)(ki,2),Ha=si[0],es=si[1],ia=Ta.get(We),Po=Object(c.useRef)();function ko(){u.a.cancel(Po.current)}Object(c.useEffect)(function(){var Ln={};return ia&&(Nr?(Ze?Ln.right=ia.right:Ln.left=ia.left,Ln.width=ia.width):(Ln.top=ia.top,Ln.height=ia.height)),ko(),Po.current=u()(function(){es(Ln)}),ko},[ia,Nr,Ze]),Object(c.useEffect)(function(){jn()},[We,ia,Ta,Nr]),Object(c.useEffect)(function(){ho()},[Ze,kr,We,ke.map(function(Ln){return Ln.key}).join("_")]);var Lo=!!oi.length,Aa="".concat(be,"-nav-wrap"),Ya,za,Mo,Ja;return Nr?Ze?(za=Tr>0,Ya=Tr+On<Hn):(Ya=Tr<0,za=-Tr+On<Hn):(Mo=Mn<0,Ja=-Mn+la<ii),c.createElement("div",{ref:Ge,role:"tablist",className:w()("".concat(be,"-nav"),we),style:je,onKeyDown:function(){pa()}},c.createElement(kt,{position:"left",extra:mt,prefixCls:be}),c.createElement(p.a,{onResize:ho},c.createElement("div",{className:w()(Aa,($e={},Object(D.a)($e,"".concat(Aa,"-ping-left"),Ya),Object(D.a)($e,"".concat(Aa,"-ping-right"),za),Object(D.a)($e,"".concat(Aa,"-ping-top"),Mo),Object(D.a)($e,"".concat(Aa,"-ping-bottom"),Ja),$e)),ref:Hr},c.createElement(p.a,{onResize:ho},c.createElement("div",{ref:en,className:"".concat(be,"-nav-list"),style:{transform:"translate(".concat(Tr,"px, ").concat(Mn,"px)"),transition:En?"none":void 0}},Zo,c.createElement(Gr,{ref:vn,prefixCls:be,locale:Nt,editable:Dt,style:{visibility:Lo?"hidden":null}}),c.createElement("div",{className:w()("".concat(be,"-ink-bar"),Object(D.a)({},"".concat(be,"-ink-bar-animated"),Ve.inkBar)),style:Ha}))))),c.createElement(Vt,Object.assign({},Ie,{ref:tn,prefixCls:be,tabs:oi,className:!Lo&&ha})),c.createElement(kt,{position:"right",extra:mt,prefixCls:be}))}var an=c.forwardRef(Pr);function sn(Ie){var Ge=Ie.id,$e=Ie.activeKey,Fe=Ie.animated,be=Ie.tabPosition,ke=Ie.rtl,we=Ie.destroyInactiveTabPane,je=c.useContext(wr),ze=je.prefixCls,Ve=je.tabs,We=Fe.tabPane,Ze=Ve.findIndex(function(mt){return mt.key===$e});return c.createElement("div",{className:w()("".concat(ze,"-content-holder"))},c.createElement("div",{className:w()("".concat(ze,"-content"),"".concat(ze,"-content-").concat(be),Object(D.a)({},"".concat(ze,"-content-animated"),We)),style:Ze&&We?Object(D.a)({},ke?"marginRight":"marginLeft","-".concat(Ze,"00%")):null},Ve.map(function(mt){return c.cloneElement(mt.node,{key:mt.key,prefixCls:ze,tabKey:mt.key,id:Ge,animated:We,active:mt.key===$e,destroyInactiveTabPane:we})})))}function Dr(Ie){var Ge=Ie.prefixCls,$e=Ie.forceRender,Fe=Ie.className,be=Ie.style,ke=Ie.id,we=Ie.active,je=Ie.animated,ze=Ie.destroyInactiveTabPane,Ve=Ie.tabKey,We=Ie.children,Ze=c.useState($e),mt=Object(m.a)(Ze,2),Dt=mt[0],Nt=mt[1];c.useEffect(function(){we?Nt(!0):ze&&Nt(!1)},[we,ze]);var Yt={};return we||(je?(Yt.visibility="hidden",Yt.height=0,Yt.overflowY="hidden"):Yt.display="none"),c.createElement("div",{id:ke&&"".concat(ke,"-panel-").concat(Ve),role:"tabpanel",tabIndex:we?0:-1,"aria-labelledby":ke&&"".concat(ke,"-tab-").concat(Ve),"aria-hidden":!we,style:Object(P.a)(Object(P.a)({},Yt),be),className:w()("".concat(Ge,"-tabpane"),we&&"".concat(Ge,"-tabpane-active"),Fe)},(we||Dt||$e)&&We)}var qr=0;function Ir(Ie){return Object(d.a)(Ie).map(function(Ge){if(c.isValidElement(Ge)){var $e=Ge.key!==void 0?String(Ge.key):void 0;return Object(P.a)(Object(P.a)({key:$e},Ge.props),{},{node:Ge})}return null}).filter(function(Ge){return Ge})}function hn(Ie,Ge){var $e,Fe=Ie.id,be=Ie.prefixCls,ke=be===void 0?"rc-tabs":be,we=Ie.className,je=Ie.children,ze=Ie.direction,Ve=Ie.activeKey,We=Ie.defaultActiveKey,Ze=Ie.editable,mt=Ie.animated,Dt=Ie.tabPosition,Nt=Dt===void 0?"top":Dt,Yt=Ie.tabBarGutter,kr=Ie.tabBarStyle,$r=Ie.tabBarExtraContent,Xr=Ie.locale,Zr=Ie.moreIcon,Hr=Ie.moreTransitionName,en=Ie.destroyInactiveTabPane,tn=Ie.renderTabBar,vn=Ie.onChange,ln=Ie.onTabClick,Pn=Ie.onTabScroll,dn=Object(S.a)(Ie,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Mr=Ir(je),Nr=ze==="rtl",on;mt===!1?on={inkBar:!1,tabPane:!1}:on=Object(P.a)({inkBar:!0,tabPane:!1},mt!==!0?mt:null);var pn=Object(c.useState)(!1),Tr=Object(m.a)(pn,2),bn=Tr[0],Wn=Tr[1];Object(c.useEffect)(function(){Wn(qt())},[]);var wn=Object(o.a)(function(){var An;return(An=Mr[0])===null||An===void 0?void 0:An.key},{value:Ve,defaultValue:We}),Mn=Object(m.a)(wn,2),Tn=Mn[0],Yn=Mn[1],ni=Object(c.useState)(function(){return Mr.findIndex(function(An){return An.key===Tn})}),Hn=Object(m.a)(ni,2),di=Hn[0],Xi=Hn[1];Object(c.useEffect)(function(){var An=Mr.findIndex(function(Wi){return Wi.key===Tn});if(An===-1){var Bi;An=Math.max(0,Math.min(di,Mr.length-1)),Yn((Bi=Mr[An])===null||Bi===void 0?void 0:Bi.key)}Xi(An)},[Mr.map(function(An){return An.key}).join("_"),Tn,di]);var Ti=Object(o.a)(null,{value:Fe}),ii=Object(m.a)(Ti,2),In=ii[0],Nn=ii[1],zn=Nt;bn&&!["left","right"].includes(Nt)&&(zn="top"),Object(c.useEffect)(function(){Fe||(Nn("rc-tabs-".concat(qr)),qr+=1)},[]);function Un(An,Bi){ln==null||ln(An,Bi),Yn(An),vn==null||vn(An)}var Zn={id:In,activeKey:Tn,animated:on,tabPosition:zn,rtl:Nr,mobile:bn},Pi,ra=Object(P.a)(Object(P.a)({},Zn),{},{editable:Ze,locale:Xr,moreIcon:Zr,moreTransitionName:Hr,tabBarGutter:Yt,onTabClick:Un,onTabScroll:Pn,extra:$r,style:kr,panes:je});return tn?Pi=tn(ra,an):Pi=c.createElement(an,Object.assign({},ra)),c.createElement(wr.Provider,{value:{tabs:Mr,prefixCls:ke}},c.createElement("div",Object.assign({ref:Ge,id:Fe,className:w()(ke,"".concat(ke,"-").concat(zn),($e={},Object(D.a)($e,"".concat(ke,"-mobile"),bn),Object(D.a)($e,"".concat(ke,"-editable"),Ze),Object(D.a)($e,"".concat(ke,"-rtl"),Nr),$e),we)},dn),Pi,c.createElement(sn,Object.assign({destroyInactiveTabPane:en},Zn,{animated:on}))))}var Vr=c.forwardRef(hn);Vr.TabPane=Dr;var fn=Vr,$n=J.b=fn},kSUc:function(N,J,M){},lPiR:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(m){var S=D,P=S.lib,c=P.WordArray,h=P.Hasher,w=S.algo,d=[],o=[];(function(){function u(g){for(var b=m.sqrt(g),i=2;i<=b;i++)if(!(g%i))return!1;return!0}function p(g){return(g-(g|0))*4294967296|0}for(var f=2,v=0;v<64;)u(f)&&(v<8&&(d[v]=p(m.pow(f,1/2))),o[v]=p(m.pow(f,1/3)),v++),f++})();var a=[],n=w.SHA256=h.extend({_doReset:function(){this._hash=new c.init(d.slice(0))},_doProcessBlock:function(u,p){for(var f=this._hash.words,v=f[0],g=f[1],b=f[2],i=f[3],s=f[4],t=f[5],T=f[6],_=f[7],l=0;l<64;l++){if(l<16)a[l]=u[p+l]|0;else{var k=a[l-15],O=(k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3,x=a[l-2],y=(x<<15|x>>>17)^(x<<13|x>>>19)^x>>>10;a[l]=O+a[l-7]+y+a[l-16]}var E=s&t^~s&T,C=v&g^v&b^g&b,I=(v<<30|v>>>2)^(v<<19|v>>>13)^(v<<10|v>>>22),j=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),L=_+j+E+o[l]+a[l],H=I+C;_=T,T=t,t=s,s=i+L|0,i=b,b=g,g=v,v=L+H|0}f[0]=f[0]+v|0,f[1]=f[1]+g|0,f[2]=f[2]+b|0,f[3]=f[3]+i|0,f[4]=f[4]+s|0,f[5]=f[5]+t|0,f[6]=f[6]+T|0,f[7]=f[7]+_|0},_doFinalize:function(){var u=this._data,p=u.words,f=this._nDataBytes*8,v=u.sigBytes*8;return p[v>>>5]|=128<<24-v%32,p[(v+64>>>9<<4)+14]=m.floor(f/4294967296),p[(v+64>>>9<<4)+15]=f,u.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var u=h.clone.call(this);return u._hash=this._hash.clone(),u}});S.SHA256=h._createHelper(n),S.HmacSHA256=h._createHmacHelper(n)}(Math),D.SHA256})},lZu9:function(N,J,M){(function(D){D(M("VrN/"),M("1eCo"),M("8EBN"))})(function(D){"use strict";D.defineMode("markdown",function(m,S){var P=D.getMode(m,"text/html"),c=P.name=="null";function h(B){if(D.findModeByName){var z=D.findModeByName(B);z&&(B=z.mime||z.mimes[0])}var V=D.getMode(m,B);return V.name=="null"?null:V}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.tokenTypeOverrides={});var w={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 d in w)w.hasOwnProperty(d)&&S.tokenTypeOverrides[d]&&(w[d]=S.tokenTypeOverrides[d]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,a=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,u=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,v=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,b=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,i=" ";function s(B,z,V){return z.f=z.inline=V,V(B,z)}function t(B,z,V){return z.f=z.block=V,V(B,z)}function T(B){return!B||!/\S/.test(B.string)}function _(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==k){var z=c;if(!z){var V=D.innerMode(P,B.htmlState);z=V.mode.name=="xml"&&V.state.tagStart===null&&!V.state.context&&V.state.tokenize.isInText}z&&(B.f=E,B.block=l,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function l(B,z){var V=B.column()===z.indentation,ie=T(z.prevLine.stream),ce=z.indentedCode,he=z.prevLine.hr,Ae=z.list!==!1,De=(z.listStack[z.listStack.length-1]||0)+3;z.indentedCode=!1;var pe=z.indentation;if(z.indentationDiff===null&&(z.indentationDiff=z.indentation,Ae)){for(z.list=null;pe<z.listStack[z.listStack.length-1];)z.listStack.pop(),z.listStack.length?z.indentation=z.listStack[z.listStack.length-1]:z.list=!1;z.list!==!1&&(z.indentationDiff=pe-z.listStack[z.listStack.length-1])}var Te=!ie&&!he&&!z.prevLine.header&&(!Ae||!ce)&&!z.prevLine.fencedCodeEnd,ye=(z.list===!1||he||ie)&&z.indentation<=De&&B.match(o),ue=null;if(z.indentationDiff>=4&&(ce||z.prevLine.fencedCodeEnd||z.prevLine.header||ie))return B.skipToEnd(),z.indentedCode=!0,w.code;if(B.eatSpace())return null;if(V&&z.indentation<=De&&(ue=B.match(u))&&ue[1].length<=6)return z.quote=0,z.header=ue[1].length,z.thisLine.header=!0,S.highlightFormatting&&(z.formatting="header"),z.f=z.inline,x(z);if(z.indentation<=De&&B.eat(">"))return z.quote=V?1:z.quote+1,S.highlightFormatting&&(z.formatting="quote"),B.eatSpace(),x(z);if(!ye&&!z.setext&&V&&z.indentation<=De&&(ue=B.match(a))){var le=ue[1]?"ol":"ul";return z.indentation=pe+B.current().length,z.list=!0,z.quote=0,z.listStack.push(z.indentation),z.em=!1,z.strong=!1,z.code=!1,z.strikethrough=!1,S.taskLists&&B.match(n,!1)&&(z.taskList=!0),z.f=z.inline,S.highlightFormatting&&(z.formatting=["list","list-"+le]),x(z)}else{if(V&&z.indentation<=De&&(ue=B.match(v,!0)))return z.quote=0,z.fencedEndRE=new RegExp(ue[1]+"+ *$"),z.localMode=S.fencedCodeBlockHighlighting&&h(ue[2]||S.fencedCodeBlockDefaultMode),z.localMode&&(z.localState=D.startState(z.localMode)),z.f=z.block=O,S.highlightFormatting&&(z.formatting="code-block"),z.code=-1,x(z);if(z.setext||(!Te||!Ae)&&!z.quote&&z.list===!1&&!z.code&&!ye&&!g.test(B.string)&&(ue=B.lookAhead(1))&&(ue=ue.match(p)))return z.setext?(z.header=z.setext,z.setext=0,B.skipToEnd(),S.highlightFormatting&&(z.formatting="header")):(z.header=ue[0].charAt(0)=="="?1:2,z.setext=z.header),z.thisLine.header=!0,z.f=z.inline,x(z);if(ye)return B.skipToEnd(),z.hr=!0,z.thisLine.hr=!0,w.hr;if(B.peek()==="[")return s(B,z,H)}return s(B,z,z.inline)}function k(B,z){var V=P.token(B,z.htmlState);if(!c){var ie=D.innerMode(P,z.htmlState);(ie.mode.name=="xml"&&ie.state.tagStart===null&&!ie.state.context&&ie.state.tokenize.isInText||z.md_inside&&B.current().indexOf(">")>-1)&&(z.f=E,z.block=l,z.htmlState=null)}return V}function O(B,z){var V=z.listStack[z.listStack.length-1]||0,ie=z.indentation<V,ce=V+3;if(z.fencedEndRE&&z.indentation<=ce&&(ie||B.match(z.fencedEndRE))){S.highlightFormatting&&(z.formatting="code-block");var he;return ie||(he=x(z)),z.localMode=z.localState=null,z.block=l,z.f=E,z.fencedEndRE=null,z.code=0,z.thisLine.fencedCodeEnd=!0,ie?t(B,z,z.block):he}else return z.localMode?z.localMode.token(B,z.localState):(B.skipToEnd(),w.code)}function x(B){var z=[];if(B.formatting){z.push(w.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var V=0;V<B.formatting.length;V++)z.push(w.formatting+"-"+B.formatting[V]),B.formatting[V]==="header"&&z.push(w.formatting+"-"+B.formatting[V]+"-"+B.header),B.formatting[V]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?z.push(w.formatting+"-"+B.formatting[V]+"-"+B.quote):z.push("error"))}if(B.taskOpen)return z.push("meta"),z.length?z.join(" "):null;if(B.taskClosed)return z.push("property"),z.length?z.join(" "):null;if(B.linkHref?z.push(w.linkHref,"url"):(B.strong&&z.push(w.strong),B.em&&z.push(w.em),B.strikethrough&&z.push(w.strikethrough),B.emoji&&z.push(w.emoji),B.linkText&&z.push(w.linkText),B.code&&z.push(w.code),B.image&&z.push(w.image),B.imageAltText&&z.push(w.imageAltText,"link"),B.imageMarker&&z.push(w.imageMarker)),B.header&&z.push(w.header,w.header+"-"+B.header),B.quote&&(z.push(w.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?z.push(w.quote+"-"+B.quote):z.push(w.quote+"-"+S.maxBlockquoteDepth)),B.list!==!1){var ie=(B.listStack.length-1)%3;ie?ie===1?z.push(w.list2):z.push(w.list3):z.push(w.list1)}return B.trailingSpaceNewLine?z.push("trailing-space-new-line"):B.trailingSpace&&z.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),z.length?z.join(" "):null}function y(B,z){return B.match(f,!0)?x(z):void 0}function E(B,z){var V=z.text(B,z);if(typeof V!="undefined")return V;if(z.list)return z.list=null,x(z);if(z.taskList){var ie=B.match(n,!0)[1]===" ";return ie?z.taskOpen=!0:z.taskClosed=!0,S.highlightFormatting&&(z.formatting="task"),z.taskList=!1,x(z)}if(z.taskOpen=!1,z.taskClosed=!1,z.header&&B.match(/^#+$/,!0))return S.highlightFormatting&&(z.formatting="header"),x(z);var ce=B.next();if(z.linkTitle){z.linkTitle=!1;var he=ce;ce==="("&&(he=")"),he=(he+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+he+"\\\\]+|\\\\\\\\|\\\\.)"+he;if(B.match(new RegExp(Ae),!0))return w.linkHref}if(ce==="`"){var De=z.formatting;S.highlightFormatting&&(z.formatting="code"),B.eatWhile("`");var pe=B.current().length;if(z.code==0&&(!z.quote||pe==1))return z.code=pe,x(z);if(pe==z.code){var Te=x(z);return z.code=0,Te}else return z.formatting=De,x(z)}else if(z.code)return x(z);if(ce==="\\"&&(B.next(),S.highlightFormatting)){var ye=x(z),ue=w.formatting+"-escape";return ye?ye+" "+ue:ue}if(ce==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return z.imageMarker=!0,z.image=!0,S.highlightFormatting&&(z.formatting="image"),x(z);if(ce==="["&&z.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return z.imageMarker=!1,z.imageAltText=!0,S.highlightFormatting&&(z.formatting="image"),x(z);if(ce==="]"&&z.imageAltText){S.highlightFormatting&&(z.formatting="image");var ye=x(z);return z.imageAltText=!1,z.image=!1,z.inline=z.f=I,ye}if(ce==="["&&!z.image)return z.linkText&&B.match(/^.*?\]/)||(z.linkText=!0,S.highlightFormatting&&(z.formatting="link")),x(z);if(ce==="]"&&z.linkText){S.highlightFormatting&&(z.formatting="link");var ye=x(z);return z.linkText=!1,z.inline=z.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?I:E,ye}if(ce==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){z.f=z.inline=C,S.highlightFormatting&&(z.formatting="link");var ye=x(z);return ye?ye+=" ":ye="",ye+w.linkInline}if(ce==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){z.f=z.inline=C,S.highlightFormatting&&(z.formatting="link");var ye=x(z);return ye?ye+=" ":ye="",ye+w.linkEmail}if(S.xml&&ce==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=B.string.indexOf(">",B.pos);if(le!=-1){var te=B.string.substring(B.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(z.md_inside=!0)}return B.backUp(1),z.htmlState=D.startState(P),t(B,z,k)}if(S.xml&&ce==="<"&&B.match(/^\/\w*?>/))return z.md_inside=!1,"tag";if(ce==="*"||ce==="_"){for(var fe=1,q=B.pos==1?" ":B.string.charAt(B.pos-2);fe<3&&B.eat(ce);)fe++;var ee=B.peek()||" ",Ce=!/\s/.test(ee)&&(!b.test(ee)||/\s/.test(q)||b.test(q)),re=!/\s/.test(q)&&(!b.test(q)||/\s/.test(ee)||b.test(ee)),Q=null,X=null;if(fe%2&&(!z.em&&Ce&&(ce==="*"||!re||b.test(q))?Q=!0:z.em==ce&&re&&(ce==="*"||!Ce||b.test(ee))&&(Q=!1)),fe>1&&(!z.strong&&Ce&&(ce==="*"||!re||b.test(q))?X=!0:z.strong==ce&&re&&(ce==="*"||!Ce||b.test(ee))&&(X=!1)),X!=null||Q!=null){S.highlightFormatting&&(z.formatting=Q==null?"strong":X==null?"em":"strong em"),Q===!0&&(z.em=ce),X===!0&&(z.strong=ce);var Te=x(z);return Q===!1&&(z.em=!1),X===!1&&(z.strong=!1),Te}}else if(ce===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return x(z);B.backUp(1)}if(S.strikethrough){if(ce==="~"&&B.eatWhile(ce)){if(z.strikethrough){S.highlightFormatting&&(z.formatting="strikethrough");var Te=x(z);return z.strikethrough=!1,Te}else if(B.match(/^[^\s]/,!1))return z.strikethrough=!0,S.highlightFormatting&&(z.formatting="strikethrough"),x(z)}else if(ce===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return x(z);B.backUp(2)}}if(S.emoji&&ce===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){z.emoji=!0,S.highlightFormatting&&(z.formatting="emoji");var Z=x(z);return z.emoji=!1,Z}return ce===" "&&(B.match(/^ +$/,!1)?z.trailingSpace++:z.trailingSpace&&(z.trailingSpaceNewLine=!0)),x(z)}function C(B,z){var V=B.next();if(V===">"){z.f=z.inline=E,S.highlightFormatting&&(z.formatting="link");var ie=x(z);return ie?ie+=" ":ie="",ie+w.linkInline}return B.match(/^[^>]+/,!0),w.linkInline}function I(B,z){if(B.eatSpace())return null;var V=B.next();return V==="("||V==="["?(z.f=z.inline=L(V==="("?")":"]"),S.highlightFormatting&&(z.formatting="link-string"),z.linkHref=!0,x(z)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(B){return function(z,V){var ie=z.next();if(ie===B){V.f=V.inline=E,S.highlightFormatting&&(V.formatting="link-string");var ce=x(V);return V.linkHref=!1,ce}return z.match(j[B]),V.linkHref=!0,x(V)}}function H(B,z){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(z.f=W,B.next(),S.highlightFormatting&&(z.formatting="link"),z.linkText=!0,x(z)):s(B,z,E)}function W(B,z){if(B.match(/^\]:/,!0)){z.f=z.inline=U,S.highlightFormatting&&(z.formatting="link");var V=x(z);return z.linkText=!1,V}return B.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function U(B,z){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?z.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),z.f=z.inline=E,w.linkHref+" url")}var G={startState:function(){return{f:l,prevLine:{stream:null},thisLine:{stream:null},block:l,htmlState:null,indentation:0,inline:E,text:y,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&&D.copyState(P,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?D.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,z){if(z.formatting=!1,B!=z.thisLine.stream){if(z.header=0,z.hr=!1,B.match(/^\s*$/,!0))return _(z),null;if(z.prevLine=z.thisLine,z.thisLine={stream:B},z.taskList=!1,z.trailingSpace=0,z.trailingSpaceNewLine=!1,!z.localState&&(z.f=z.block,z.f!=k)){var V=B.match(/^\s*/,!0)[0].replace(/\t/g,i).length;if(z.indentation=V,z.indentationDiff=null,V>0)return null}}return z.f(B,z)},innerMode:function(B){return B.block==k?{state:B.htmlState,mode:P}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:G}},indent:function(B,z,V){return B.block==k&&P.indent?P.indent(B.htmlState,z,V):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,z,V):D.Pass},blankLine:_,getType:x,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),D.defineMIME("text/markdown","markdown"),D.defineMIME("text/x-markdown","markdown")})},mOS8:function(N,J,M){N.exports=M.p+"static/403Qrcode.6c17b6f4.png"},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(N){if(!0)module.exports=N();else var J})(function(){var define,module,exports;return function(){function N(J,M,D){function m(c,h){if(!M[c]){if(!J[c]){var w=typeof require=="function"&&require;if(!h&&w)return require(c,!0);if(S)return S(c,!0);var d=new Error("Cannot find module '"+c+"'");throw d.code="MODULE_NOT_FOUND",d}var o=M[c]={exports:{}};J[c][0].call(o.exports,function(a){var n=J[c][1][a];return m(n||a)},o,o.exports,N,J,M,D)}return M[c].exports}for(var S=typeof require=="function"&&require,P=0;P<D.length;P++)m(D[P]);return m}return N}()({1:[function(N,J,M){"use strict";var D=N("./browser/client");D.Buffer=N("buffer").Buffer,D.urllib=N("../shims/xhr"),D.version=N("./browser/version").version,J.exports=D},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(N,J,M){(function(D,m){"use strict";var S=N("babel-runtime/core-js/promise"),P=o(S),c=N("babel-runtime/regenerator"),h=o(c),w=N("babel-runtime/core-js/object/assign"),d=o(w);function o(H){return H&&H.__esModule?H:{default:H}}var a=N("debug")("ali-oss"),n=N("copy-to"),u=N("xml2js"),p=N("agentkeepalive"),f=N("merge-descriptors"),v=N("url"),g=N("is-type-of"),b=N("platform"),i=N("utility"),s=N("urllib"),t=N("./version"),T=N("bowser"),_=N("../common/signUtils"),l=N("../common/utils/isIP"),k=l.isIP,O=N("../common/client/initOptions"),x=N("../common/utils/createRequest"),y=x.createRequest,E=new p;function C(){var H=b.name,W=b.version;H&&H.toLowerCase&&H.toLowerCase()==="ie"&&W.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function I(){return location&&location.protocol==="https:"}function j(H,W){if(C(),!(this instanceof j))return new j(H,W);H&&H.inited?this.options=H:this.options=j.initOptions(H),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=s,this.agent=this.options.agent||E),this.ctx=W,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}J.exports=j,j.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 U=(0,d.default)({secure:I(),useFetch:!1},W);return O(U)};var L=j.prototype;L.debug=a,f(L,N("./object")),f(L,N("../common/bucket/getBucketWebsite")),f(L,N("../common/bucket/putBucketWebsite")),f(L,N("../common/bucket/deleteBucketWebsite")),f(L,N("../common/bucket/getBucketLifecycle")),f(L,N("../common/bucket/putBucketLifecycle")),f(L,N("../common/bucket/deleteBucketLifecycle")),f(L,N("../common/bucket/putBucketVersioning")),f(L,N("../common/bucket/getBucketVersioning")),f(L,N("./managed-upload")),f(L,N("../common/multipart")),f(L,N("../common/parallel")),L.signature=function(W){return this.debug("authorization stringToSign: %s",W,"info"),_.computeSignature(this.options.accessKeySecret,W)},L.authorization=function(W,U,G,B){var z=_.buildCanonicalString(W.toUpperCase(),U,{headers:B,parameters:G});return _.authorization(this.options.accessKeyId,this.options.accessKeySecret,z)},L.request=function(W){var U,G,B,z,V,ie;return h.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:return U=y.call(this,W),this.options.useFetch||(U.params.mode="disable-fetch"),G=void 0,B=void 0,z=!!W.stream,he.prev=5,he.next=8,h.default.awrap(this.urllib.request(U.url,U.params));case 8:G=he.sent,this.debug("response %s %s, got %s, headers: %j",W.method,U.url,G.status,G.headers,"info"),he.next=15;break;case 12:he.prev=12,he.t0=he.catch(5),B=he.t0;case 15:if(V=void 0,!(G&&W.successStatuses&&W.successStatuses.indexOf(G.status)===-1)){he.next=28;break}return he.next=19,h.default.awrap(this.requestError(G));case 19:if(V=he.sent,!(V.code==="RequestTimeTooSkewed"&&!z)){he.next=25;break}return this.options.amendTimeSkewed=+new Date(V.serverTime)-new Date,he.next=24,h.default.awrap(this.request(W));case 24:return he.abrupt("return",he.sent);case 25:V.params=W,he.next=32;break;case 28:if(!B){he.next=32;break}return he.next=31,h.default.awrap(this.requestError(B));case 31:V=he.sent;case 32:if(!V){he.next=34;break}throw V;case 34:if(!W.xmlResponse){he.next=39;break}return he.next=37,h.default.awrap(this.parseXML(G.data));case 37:ie=he.sent,G.data=ie;case 39:return he.abrupt("return",G);case 40:case"end":return he.stop()}},null,this,[[5,12]])},L._getResource=function(W){var U="/";return W.bucket&&(U+=W.bucket+"/"),W.object&&(U+=W.object),U},L._isIP=k,L._escape=function(W){return i.encodeURIComponent(W).replace(/%2F/g,"/")},L._getReqUrl=function(W){var U={};n(this.options.endpoint).to(U);var G=this._isIP(U.hostname),B=this.options.cname;W.bucket&&!B&&!G&&(U.host=W.bucket+"."+U.host);var z="/";W.bucket&&G&&(z+=W.bucket+"/"),W.object&&(z+=this._escape(W.object).replace(/\+/g,"%2B")),U.pathname=z;var V={};if(W.query&&f(V,W.query),W.subres){var ie={};g.string(W.subres)?ie[W.subres]="":g.array(W.subres)?W.subres.forEach(function(ce){ie[ce]=""}):ie=W.subres,f(V,ie)}return U.query=V,v.format(U)},L._getUserAgent=function(){var W=m&&m.browser?"js":"nodejs",U="aliyun-sdk-"+W+"/"+t.version,G=b.description;return!G&&m&&(G="Node.js "+m.version.slice(1)+" on "+m.platform+" "+m.arch),this._checkUserAgent(U+" "+G)},L._checkUserAgent=function(W){var U=W.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return U},L.checkBrowserAndVersion=function(W,U){return T.name===W&&T.version.split(".")[0]===U},L.parseXML=function(W){return new P.default(function(U,G){D.isBuffer(W)&&(W=W.toString()),u.parseString(W,{explicitRoot:!1,explicitArray:!1},function(B,z){B?G(B):U(z)})})},L.requestError=function(W){var U,G,B,z;return h.default.async(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(U=null,!(!W.data||!W.data.length)){ie.next=5;break}W.status===-1||W.status===-2?(U=new Error(W.message),U.name=W.name,U.status=W.status,U.code=W.name):(W.status===404?(U=new Error("Object not exists"),U.name="NoSuchKeyError",U.status=404,U.code="NoSuchKey"):W.status===412?(U=new Error("Pre condition failed"),U.name="PreconditionFailedError",U.status=412,U.code="PreconditionFailed"):(U=new Error("Unknow error, status: "+W.status),U.name="UnknowError",U.status=W.status),U.requestId=W.headers["x-oss-request-id"],U.host=""),ie.next=33;break;case 5:return G=String(W.data),this.debug("request response error data: %s",G,"error"),B=void 0,ie.prev=8,ie.next=11,h.default.awrap(this.parseXML(G));case 11:if(ie.t0=ie.sent,ie.t0){ie.next=14;break}ie.t0={};case 14:B=ie.t0,ie.next=24;break;case 17:return ie.prev=17,ie.t1=ie.catch(8),this.debug(G,"error"),ie.t1.message+=`
raw xml: `+G,ie.t1.status=W.status,ie.t1.requestId=W.headers["x-oss-request-id"],ie.abrupt("return",ie.t1);case 24:z=B.Message||"unknow request error, status: "+W.status,B.Condition&&(z+=" (condition: "+B.Condition+")"),U=new Error(z),U.name=B.Code?B.Code+"Error":"UnknowError",U.status=W.status,U.code=B.Code,U.requestId=B.RequestId,U.hostId=B.HostId,U.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",U,"error"),ie.abrupt("return",U);case 35:case"end":return ie.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:N("../../node_modules/is-buffer/index.js")},N("_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(N,J,M){(function(D){"use strict";var m=N("babel-runtime/core-js/array/from"),S=d(m),P=N("babel-runtime/core-js/promise"),c=d(P),h=N("babel-runtime/regenerator"),w=d(h);function d(_){return _&&_.__esModule?_:{default:_}}var o=N("is-type-of"),a=N("util"),n=N("path"),u=N("mime"),p=N("copy-to"),f=N("../common/utils/isBlob"),v=f.isBlob,g=N("../common/utils/isFile"),b=g.isFile,i=M;i.multipartUpload=function(l,k,O){var x,y,E,C,I,j,L,H,W;return w.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){G.next=6;break}return G.next=5,w.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return G.abrupt("return",G.sent);case 6:return x=100*1024,O.mime||(b(k)?O.mime=u.getType(n.extname(k.name)):v(k)?O.mime=k.type:O.mime=u.getType(n.extname(k))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),G.next=12,w.default.awrap(this._getFileSize(k));case 12:if(y=G.sent,!(y<x)){G.next=25;break}return E=this._createStream(k,0,y),O.contentLength=y,G.next=18,w.default.awrap(this.putStream(l,E,O));case 18:if(C=G.sent,!(O&&O.progress)){G.next=22;break}return G.next=22,w.default.awrap(O.progress(1));case 22:return I={res:C.res,bucket:this.options.bucket,name:l,etag:C.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(I.data=C.data),G.abrupt("return",I);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){G.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<x)){G.next=29;break}throw new Error("partSize must not be smaller than "+x);case 29:return G.next=31,w.default.awrap(this.initMultipartUpload(l,O));case 31:if(j=G.sent,L=j.uploadId,H=this._getPartSize(y,O.partSize),W={file:k,name:l,fileSize:y,partSize:H,uploadId:L,doneParts:[]},!(O&&O.progress)){G.next=38;break}return G.next=38,w.default.awrap(O.progress(0,W,j.res));case 38:return G.next=40,w.default.awrap(this._resumeMultipart(W,O));case 40:return G.abrupt("return",G.sent);case 41:case"end":return G.stop()}},null,this)},i._resumeMultipart=function(l,k){var O,x,y,E,C,I,j,L,H,W,U,G,B,z,V,ie,ce,he;return w.default.async(function(De){for(;;)switch(De.prev=De.next){case 0:if(O=this,!this.isCancel()){De.next=3;break}throw this._makeCancelEvent();case 3:return x=l.file,y=l.fileSize,E=l.partSize,C=l.uploadId,I=l.doneParts,j=l.name,L=[],I.length>0&&p(I).to(L),H=this._divideParts(y,E),W=H.length,U=!1,G=function(Te,ye){var ue=this;return new c.default(function(te,fe){var q,ee,Ce,re;return w.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Te.isCancel()){X.next=18;break}return q=H[ye-1],ee={stream:Te._createStream(x,q.start,q.end),size:q.end-q.start},X.next=6,w.default.awrap(Te._uploadPart(j,C,ye,ee));case 6:if(Ce=X.sent,!(!Te.isCancel()&&!U)){X.next=15;break}if(l.doneParts.push({number:ye,etag:Ce.res.headers.etag}),!k.progress){X.next=12;break}return X.next=12,w.default.awrap(k.progress(I.length/W,l,Ce.res));case 12:te({number:ye,etag:Ce.res.headers.etag}),X.next=16;break;case 15:te();case 16:X.next=19;break;case 18:te();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),re=new Error,re.name=X.t0.name,re.message=X.t0.message,re.stack=X.t0.stack,re.partNum=ye,p(X.t0).to(re),fe(re);case 30:case"end":return X.stop()}},null,ue,[[0,21]])})},B=(0,S.default)(new Array(W),function(pe,Te){return Te+1}),z=L.map(function(pe){return pe.number}),V=B.filter(function(pe){return z.indexOf(pe)<0}),ie=5,ce=k.parallel||ie,De.next=17,w.default.awrap(this._parallel(V,ce,function(pe){return new c.default(function(Te,ye){G(O,pe).then(function(ue){ue&&L.push(ue),Te()}).catch(function(ue){ye(ue)})})}));case 17:if(he=De.sent,U=!0,!this.isCancel()){De.next=22;break}throw G=null,this._makeCancelEvent();case 22:if(!(he&&he.length>0)){De.next=25;break}throw he[0].message="Failed to upload some parts with error: "+he[0].toString()+" part_num: "+he[0].partNum,he[0];case 25:return De.next=27,w.default.awrap(this.completeMultipartUpload(j,C,L,k));case 27:return De.abrupt("return",De.sent);case 28:case"end":return De.stop()}},null,this)},i._getFileSize=function(l){return w.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!o.buffer(l)){O.next=4;break}return O.abrupt("return",l.length);case 4:if(!(v(l)||b(l))){O.next=6;break}return O.abrupt("return",l.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var s=N("stream"),t=s.Readable;function T(_,l){if(!(this instanceof T))return new T(_,l);t.call(this,l),this.file=_,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}a.inherits(T,t),T.prototype.readFileAndPush=function(l){if(this.fileBuffer)for(var k=!0;k&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,x=O+l;x=x>this.fileBuffer.length?this.fileBuffer.length:x,this.start=x,k=this.push(this.fileBuffer.slice(O,x))}},T.prototype._read=function(l){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 k=16*1024;l=l||k;var O=this;this.reader.onload=function(y){O.fileBuffer=D.from(new Uint8Array(y.target.result)),O.file=null,O.readFileAndPush(l)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(l)},i._createStream=function(l,k,O){if(v(l)||b(l))return new T(l.slice(k,O));throw new Error("_createStream requires File/Blob.")},i._getPartSize=function(l,k){var O=10*1e3,x=1024*1024;return k?Math.max(Math.ceil(l/O),k):x},i._divideParts=function(l,k){for(var O=Math.ceil(l/k),x=[],y=0;y<O;y++){var E=k*y,C=Math.min(E+k,l);x.push({start:E,end:C})}return x}}).call(this,N("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(N,J,M){"use strict";var D=N("babel-runtime/core-js/promise"),m=o(D),S=N("babel-runtime/core-js/object/keys"),P=o(S),c=N("babel-runtime/core-js/object/assign"),h=o(c),w=N("babel-runtime/regenerator"),d=o(w);function o(O){return O&&O.__esModule?O:{default:O}}var a=N("utility"),n=N("fs"),u=N("is-type-of"),p=N("url"),f=N("copy-to"),v=N("path"),g=N("mime"),b=N("../common/callback"),i=N("../common/signUtils"),s=N("merge-descriptors"),t=N("../common/utils/isBlob"),T=t.isBlob,_=N("../common/utils/isFile"),l=_.isFile,k=M;k.append=function(x,y,E){var C;return d.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return E=E||{},E.position===void 0&&(E.position="0"),E.subres={append:"",position:E.position},E.method="POST",j.next=6,d.default.awrap(this.put(x,y,E));case 6:return C=j.sent,C.nextAppendPosition=C.res.headers["x-oss-next-append-position"],j.abrupt("return",C);case 9:case"end":return j.stop()}},null,this)},k.put=function(x,y,E){var C,I,j,L,H,W,U;return d.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(C=void 0,E=E||{},x=this._objectName(x),!u.buffer(y)){B.next=7;break}C=y,B.next=33;break;case 7:if(!(T(y)||l(y))){B.next=32;break}return E.mime||(l(y)?E.mime=g.getType(v.extname(y.name)):E.mime=y.type),I=this._createStream(y,0,y.size),B.next=12,d.default.awrap(this._getFileSize(y));case 12:return E.contentLength=B.sent,B.prev=13,B.next=16,d.default.awrap(this.putStream(x,I,E));case 16:return j=B.sent,B.abrupt("return",j);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,d.default.awrap(this.put(x,y,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",H=this._objectRequestParams(L,x,E),b.encodeCallback(H,E),H.mime=E.mime,H.content=C,H.successStatuses=[200],B.next=43,d.default.awrap(this.request(H));case 43:return W=B.sent,U={name:x,url:this._objectUrl(x),res:W.res},H.headers&&H.headers["x-oss-callback"]&&(U.data=JSON.parse(W.data.toString())),B.abrupt("return",U);case 47:case"end":return B.stop()}},null,this,[[13,20]])},k.putStream=function(x,y,E){var C,I,j,L;return d.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:return E=E||{},E.headers=E.headers||{},x=this._objectName(x),E.contentLength?E.headers["Content-Length"]=E.contentLength:E.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(E.meta,E.headers),C=E.method||"PUT",I=this._objectRequestParams(C,x,E),b.encodeCallback(I,E),I.mime=E.mime,I.stream=y,I.successStatuses=[200],W.next=13,d.default.awrap(this.request(I));case 13:return j=W.sent,L={name:x,url:this._objectUrl(x),res:j.res},I.headers&&I.headers["x-oss-callback"]&&(L.data=JSON.parse(j.data.toString())),W.abrupt("return",L);case 17:case"end":return W.stop()}},null,this)},s(k,N("../common/object/copyObject")),s(k,N("../common/object/getObjectTagging")),s(k,N("../common/object/putObjectTagging")),s(k,N("../common/object/deleteObjectTagging")),s(k,N("../common/image")),s(k,N("../common/object/getBucketVersions")),s(k,N("../common/object/getACL")),s(k,N("../common/object/putACL")),s(k,N("../common/object/head")),s(k,N("../common/object/delete")),s(k,N("../common/object/get")),s(k,N("../common/object/putSymlink")),s(k,N("../common/object/getSymlink")),s(k,N("../common/object/deleteMulti")),s(k,N("../common/object/getObjectMeta")),k.putMeta=function(x,y,E){var C;return d.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,d.default.awrap(this.copy(x,x,{meta:y||{},timeout:E&&E.timeout,ctx:E&&E.ctx}));case 2:return C=j.sent,j.abrupt("return",C);case 4:case"end":return j.stop()}},null,this)},k.list=function(x,y){var E,C,I,j,L;return d.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:return E=this._objectRequestParams("GET","",y),E.query=x,E.xmlResponse=!0,E.successStatuses=[200],W.next=6,d.default.awrap(this.request(E));case 6:return C=W.sent,I=C.data.Contents,j=this,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(U){return{name:U.Key,url:j._objectUrl(U.Key),lastModified:U.LastModified,etag:U.ETag,type:U.Type,size:Number(U.Size),storageClass:U.StorageClass,owner:{id:U.Owner.ID,displayName:U.Owner.DisplayName}}})),L=C.data.CommonPrefixes||null,L&&(Array.isArray(L)||(L=[L]),L=L.map(function(U){return U.Prefix})),W.abrupt("return",{res:C.res,objects:I,prefixes:L,nextMarker:C.data.NextMarker||null,isTruncated:C.data.IsTruncated==="true"});case 13:case"end":return W.stop()}},null,this)},k.restore=function(x,y){var E,C;return d.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return y=y||{},y.subres=(0,h.default)({restore:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),E=this._objectRequestParams("POST",x,y),E.successStatuses=[202],j.next=7,d.default.awrap(this.request(E));case 7:return C=j.sent,j.abrupt("return",{res:C.res});case 9:case"end":return j.stop()}},null,this)},k.signatureUrl=function(x,y){y=y||{},x=this._objectName(x),y.method=y.method||"GET";var E=a.timestamp()+(y.expires||1800),C={bucket:this.options.bucket,object:x},I=this._getResource(C);this.options.stsToken&&(y["security-token"]=this.options.stsToken);var j=i._signatureForURL(this.options.accessKeySecret,y,I,E),L=p.parse(this._getReqUrl(C));return L.query={OSSAccessKeyId:this.options.accessKeyId,Expires:E,Signature:j.Signature},f(j.subResource).to(L.query),L.format()},k.getObjectUrl=function(x,y){return y?y[y.length-1]!=="/"&&(y+="/"):y=this.options.endpoint.format(),y+this._escape(this._objectName(x))},k._objectUrl=function(x){return this._getReqUrl({bucket:this.options.bucket,object:x})},k.generateObjectUrl=function(O,x){if(x)x[x.length-1]!=="/"&&(x+="/");else{x=this.options.endpoint.format();var y=p.parse(x),E=this.options.bucket;y.hostname=E+"."+y.hostname,y.host=E+"."+y.host,x=y.format()}return x+this._escape(this._objectName(O))},k._objectRequestParams=function(x,y,E){if(!this.options.bucket)throw new Error("Please create a bucket first");E=E||{},y=this._objectName(y);var C={object:y,bucket:this.options.bucket,method:x,subres:E&&E.subres,timeout:E&&E.timeout,ctx:E&&E.ctx};return E.headers&&(C.headers={},f(E.headers).to(C.headers)),C},k._objectName=function(x){return x.replace(/^\/+/,"")},k._convertMetaToHeaders=function(x,y){if(!x)return;(0,P.default)(x).forEach(function(E){y["x-oss-meta-"+E]=x[E]})},k._deleteFileSafe=function(x){var y=this;return new m.default(function(E){n.exists(x,function(C){C?n.unlink(x,function(I){I&&y.debug("unlink %j error: %s",x,I,"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(N,J,M){"use strict";M.version="6.10.0"},{}],6:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(w){return w&&w.__esModule?w:{default:w}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=M;h.deleteBucketLifecycle=function(d,o){var a,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return c(d),a=this._bucketRequestParams("DELETE",d,"lifecycle",o),a.successStatuses=[204],p.next=5,m.default.awrap(this.request(a));case 5:return n=p.sent,p.abrupt("return",{res:n.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(w){return w&&w.__esModule?w:{default:w}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=M;h.deleteBucketWebsite=function(d,o){var a,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return c(d),a=this._bucketRequestParams("DELETE",d,"website",o),a.successStatuses=[204],p.next=5,m.default.awrap(this.request(a));case 5:return n=p.sent,p.abrupt("return",{res:n.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=N("../utils/isArray"),w=h.isArray,d=N("../utils/formatObjKey"),o=d.formatObjKey,a=M;a.getBucketLifecycle=function(u,p){var f,v,g;return m.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return c(u),f=this._bucketRequestParams("GET",u,"lifecycle",p),f.successStatuses=[200],f.xmlResponse=!0,i.next=6,m.default.awrap(this.request(f));case 6:return v=i.sent,g=v.data.Rule||null,g&&(w(g)||(g=[g]),g=g.map(function(s){return s.ID&&(s.id=s.ID,delete s.ID),s.Tag&&!w(s.Tag)&&(s.Tag=[s.Tag]),o(s,"firstLowerCase")})),i.abrupt("return",{rules:g,res:v.res});case 10:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(w){return w&&w.__esModule?w:{default:w}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=M;h.getBucketVersioning=function(d,o){var a,n,u;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return c(d),a=this._bucketRequestParams("GET",d,"versioning",o),a.xmlResponse=!0,a.successStatuses=[200],f.next=6,m.default.awrap(this.request(a));case 6:return n=f.sent,u=n.data.Status,f.abrupt("return",{status:n.status,versionStatus:u,res:n.res});case 9:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(o){return o&&o.__esModule?o:{default:o}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=N("../utils/isObject"),w=h.isObject,d=M;d.getBucketWebsite=function(a,n){var u,p,f;return m.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return c(a),u=this._bucketRequestParams("GET",a,"website",n),u.successStatuses=[200],u.xmlResponse=!0,g.next=6,m.default.awrap(this.request(u));case 6:return p=g.sent,f=[],p.data.RoutingRules&&p.data.RoutingRules.RoutingRule&&(w(p.data.RoutingRules.RoutingRule)?f=[p.data.RoutingRules.RoutingRule]:f=p.data.RoutingRules.RoutingRule),g.abrupt("return",{index:p.data.IndexDocument&&p.data.IndexDocument.Suffix||"",supportSubDir:p.data.IndexDocument&&p.data.IndexDocument.SupportSubDir||"false",type:p.data.IndexDocument&&p.data.IndexDocument.Type,routingRules:f,error:p.data.ErrorDocument&&p.data.ErrorDocument.Key||null,res:p.res});case 10:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(l){return l&&l.__esModule?l:{default:l}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=N("../utils/isArray"),w=h.isArray,d=N("../utils/deepCopy"),o=d.deepCopy,a=N("../utils/isObject"),n=a.isObject,u=N("../utils/obj2xml"),p=u.obj2xml,f=N("../utils/checkObjectTag"),v=f.checkObjectTag,g=N("../utils/getStrBytesCount"),b=g.getStrBytesCount,i=M;i.putBucketLifecycle=function(k,O,x){var y,E,C,I,j;return m.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:if(c(k),w(O)){H.next=3;break}throw new Error("rules must be Array");case 3:return y=this._bucketRequestParams("PUT",k,"lifecycle",x),E=[],C={LifecycleConfiguration:{Rule:E}},O.forEach(function(W){s(W),_(W),W.id&&(W.ID=W.id,delete W.id),E.push(W)}),I=p(C,{headers:!0,firstUpperCase:!0}),y.content=I,y.mime="xml",y.successStatuses=[200],H.next=13,m.default.awrap(this.request(y));case 13:return j=H.sent,H.abrupt("return",{res:j.res});case 15:case"end":return H.stop()}},null,this)};function s(l){l.days&&(l.expiration={days:l.days}),l.date&&(l.expiration={createdBeforeDate:l.date})}function t(l,k){var O=l.days,x=l.createdBeforeDate;if(!O&&!x)throw new Error(k+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(x&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(x))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function T(l){if(!w(l)&&!n(l))throw new Error("tag must be Object or Array");l=n(l)?[l]:l;var k={},O=o(l);O.forEach(function(x){k[x.key]=x.value}),v(k)}function _(l){if(l.id&&b(l.id)>255)throw new Error("ID is composed of 255 bytes at most");if(l.prefix===""||l.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(l.status))throw new Error("Status must be Enabled or Disabled");if(l.transition){if(!["IA","Archive"].includes(l.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(l.transition,"Transition")}if(l.expiration){if(!l.expiration.expiredObjectDeleteMarker)t(l.expiration,"Expiration");else if(l.expiration.days||l.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(l.abortMultipartUpload&&t(l.abortMultipartUpload,"AbortMultipartUpload"),!l.expiration&&!l.abortMultipartUpload&&!l.transition&&!l.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(l.tag){if(l.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");T(l.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(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(o){return o&&o.__esModule?o:{default:o}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=N("../utils/obj2xml"),w=h.obj2xml,d=M;d.putBucketVersioning=function(a,n){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,v;return m.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(c(a),["Enabled","Suspended"].includes(n)){b.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",a,"versioning",u),f={VersioningConfiguration:{Status:n}},p.mime="xml",p.content=w(f,{headers:!0}),b.next=9,m.default.awrap(this.request(p));case 9:return v=b.sent,b.abrupt("return",{res:v.res,status:v.status});case 11:case"end":return b.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=N("../utils/obj2xml"),w=h.obj2xml,d=N("../utils/isArray"),o=d.isArray,a=M;a.putBucketWebsite=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=arguments[2],v,g,b,i,s;return m.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(c(u),v=this._bucketRequestParams("PUT",u,"website",f),g={Suffix:p.index||"index.html"},b={IndexDocument:g},i={WebsiteConfiguration:b},p.supportSubDir&&(g.SupportSubDir=p.supportSubDir),p.type&&(g.Type=p.type),p.error&&(b.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){T.next=12;break}if(o(p.routingRules)){T.next=11;break}throw new Error("RoutingRules must be Array");case 11:b.RoutingRules={RoutingRule:p.routingRules};case 12:return i=w(i),v.content=i,v.mime="xml",v.successStatuses=[200],T.next=18,m.default.awrap(this.request(v));case 18:return s=T.sent,T.abrupt("return",{res:s.res});case 20:case"end":return T.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(N,J,M){(function(D){"use strict";var m=N("babel-runtime/core-js/object/keys"),S=h(m),P=N("babel-runtime/core-js/json/stringify"),c=h(P);function h(w){return w&&w.__esModule?w:{default:w}}M.encodeCallback=function(d,o){if(d.headers=d.headers||{},!Object.prototype.hasOwnProperty.call(d.headers,"x-oss-callback")&&o.callback){var a={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(a.callbackHost=o.callback.host),o.callback.contentType&&(a.callbackBodyType=o.callback.contentType);var n=D.from((0,c.default)(a)).toString("base64");if(d.headers["x-oss-callback"]=n,o.callback.customValue){var u={};(0,S.default)(o.callback.customValue).forEach(function(p){u["x:"+p]=o.callback.customValue[p]}),d.headers["x-oss-callback-var"]=D.from((0,c.default)(u)).toString("base64")}}}}).call(this,N("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/assign"),m=S(D);function S(a){return a&&a.__esModule?a:{default:a}}var P=N("humanize-ms"),c=N("url"),h=N("../utils/checkBucketName"),w=h.checkBucketName;function d(a,n){var u=c.parse(a);if(u.protocol||(u=c.parse("http"+(n?"s":"")+"://"+a)),u.protocol!=="http:"&&u.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return u}function o(a,n,u){var p=u?"https://":"http://",f=n?"-internal.aliyuncs.com":".aliyuncs.com",v="vpc100-oss-cn-";return a.substr(0,v.length)===v&&(f=".aliyuncs.com"),c.parse(p+a+f)}J.exports=function(a){if(!a||!a.accessKeyId||!a.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");a.bucket&&w(a.bucket);var n=(0,m.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},a);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=P(n.timeout)),n.endpoint)n.endpoint=d(n.endpoint,n.secure);else if(n.region)n.endpoint=o(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(N,J,M){"use strict";var D=N("merge-descriptors"),m=M;D(m,N("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}var P=N("../utils/checkBucketName"),c=P.checkBucketName,h=N("querystring"),w=N("js-base64"),d=w.Base64.encode,o=M;o.processObjectSave=function(u,p,f,v){var g,b,i,s;return m.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return a(u,"sourceObject"),a(p,"targetObject"),a(f,"process"),p=this._objectName(p),v&&c(v),g=this._objectRequestParams("POST",u,{subres:"x-oss-process"}),b=v?",b_"+d(v):"",p=d(p),i={"x-oss-process":f+"|sys/saveas,o_"+p+b},g.content=h.stringify(i),T.next=12,m.default.awrap(this.request(g));case 12:return s=T.sent,T.abrupt("return",{res:s.res,status:s.res.status});case 14:case"end":return T.stop()}},null,this)};function a(n,u){if(!n)throw new Error(u+" is required");if(typeof n!="string")throw new Error(u+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=S(D);function S(o){return o&&o.__esModule?o:{default:o}}var P=N("copy-to"),c=N("./callback"),h=N("./utils/deepCopy"),w=h.deepCopy,d=M;d.listUploads=function(a,n){var u,p,f,v;return m.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return n=n||{},u={},P(n).to(u),u.subres="uploads",p=this._objectRequestParams("GET","",u),p.query=a,p.xmlResponse=!0,p.successStatuses=[200],b.next=10,m.default.awrap(this.request(p));case 10:return f=b.sent,v=f.data.Upload||[],Array.isArray(v)||(v=[v]),v=v.map(function(i){return{name:i.Key,uploadId:i.UploadId,initiated:i.Initiated}}),b.abrupt("return",{res:f.res,uploads:v,bucket:f.data.Bucket,nextKeyMarker:f.data.NextKeyMarker,nextUploadIdMarker:f.data.NextUploadIdMarker,isTruncated:f.data.IsTruncated==="true"});case 15:case"end":return b.stop()}},null,this)},d.listParts=function(a,n,u,p){var f,v,g;return m.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return p=p||{},f={},P(p).to(f),f.subres={uploadId:n},v=this._objectRequestParams("GET",a,f),v.query=u,v.xmlResponse=!0,v.successStatuses=[200],i.next=10,m.default.awrap(this.request(v));case 10:return g=i.sent,i.abrupt("return",{res:g.res,uploadId:g.data.UploadId,bucket:g.data.Bucket,name:g.data.Key,partNumberMarker:g.data.PartNumberMarker,nextPartNumberMarker:g.data.NextPartNumberMarker,maxParts:g.data.MaxParts,isTruncated:g.data.IsTruncated,parts:g.data.Part||[]});case 12:case"end":return i.stop()}},null,this)},d.abortMultipartUpload=function(a,n,u){var p,f,v;return m.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return this._stop(),u=u||{},p={},P(u).to(p),p.subres={uploadId:n},f=this._objectRequestParams("DELETE",a,p),f.successStatuses=[204],b.next=9,m.default.awrap(this.request(f));case 9:return v=b.sent,b.abrupt("return",{res:v.res});case 11:case"end":return b.stop()}},null,this)},d.initMultipartUpload=function(a,n){var u,p,f;return m.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return n=n||{},u={},P(n).to(u),u.headers=u.headers||{},this._convertMetaToHeaders(n.meta,u.headers),u.subres="uploads",p=this._objectRequestParams("POST",a,u),p.mime=n.mime,p.xmlResponse=!0,p.successStatuses=[200],g.next=12,m.default.awrap(this.request(p));case 12:return f=g.sent,g.abrupt("return",{res:f.res,bucket:f.data.Bucket,name:f.data.Key,uploadId:f.data.UploadId});case 14:case"end":return g.stop()}},null,this)},d.uploadPart=function(a,n,u,p,f,v,g){var b;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return b={stream:this._createStream(p,f,v),size:v-f},s.next=3,m.default.awrap(this._uploadPart(a,n,u,b,g));case 3:return s.abrupt("return",s.sent);case 4:case"end":return s.stop()}},null,this)},d.completeMultipartUpload=function(a,n,u,p){var f,v,g,b,i,s,t,T;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:for(f=u.concat().sort(function(k,O){return k.number-O.number}).filter(function(k,O,x){return!O||k.number!==x[O-1].number}),v=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,g=0;g<f.length;g++)b=f[g],v+=`<Part>
`,v+="<PartNumber>"+b.number+`</PartNumber>
`,v+="<ETag>"+b.etag+`</ETag>
`,v+=`</Part>
`;return v+="</CompleteMultipartUpload>",p=p||{},i={},i=w(p),i.headers&&delete i.headers["x-oss-server-side-encryption"],i.subres={uploadId:n},s=this._objectRequestParams("POST",a,i),c.encodeCallback(s,i),s.mime="xml",s.content=v,s.headers&&s.headers["x-oss-callback"]||(s.xmlResponse=!0),s.successStatuses=[200],l.next=17,m.default.awrap(this.request(s));case 17:return t=l.sent,T={res:t.res,bucket:s.bucket,name:a,etag:t.res.headers.etag},s.headers&&s.headers["x-oss-callback"]&&(T.data=JSON.parse(t.data.toString())),l.abrupt("return",T);case 21:case"end":return l.stop()}},null,this)},d._uploadPart=function(a,n,u,p,f){var v,g,b;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return f=f||{},v={},P(f).to(v),v.headers={"Content-Length":p.size},v.subres={partNumber:u,uploadId:n},g=this._objectRequestParams("PUT",a,v),g.mime=v.mime,g.stream=p.stream,g.successStatuses=[200],s.next=11,m.default.awrap(this.request(g));case 11:if(b=s.sent,b.res.headers.etag){s.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 p.stream=null,g.stream=null,s.abrupt("return",{name:a,etag:b.res.headers.etag,res:b.res});case 17:case"end":return s.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=w(D),S=N("babel-runtime/core-js/object/keys"),P=w(S),c=N("babel-runtime/helpers/typeof"),h=w(c);function w(n){return n&&n.__esModule?n:{default:n}}var d=N("../utils/checkBucketName"),o=d.checkBucketName,a=M;a.copy=function(u,p,f,v){var g,b,i;return m.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof f=="undefined"?"undefined":(0,h.default)(f))==="object"&&(v=f),v=v||{},v.headers=v.headers||{},(0,P.default)(v.headers).forEach(function(T){v.headers["x-oss-copy-source-"+T.toLowerCase()]=v.headers[T]}),v.meta&&(v.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(v.meta,v.headers),p=this._getSourceName(p,f),v.versionId&&(p=p+"?versionId="+v.versionId),v.headers["x-oss-copy-source"]=p,g=this._objectRequestParams("PUT",u,v),g.xmlResponse=!0,g.successStatuses=[200,304],t.next=14,m.default.awrap(this.request(g));case 14:return b=t.sent,i=b.data,i&&(i={etag:i.ETag,lastModified:i.LastModified}),t.abrupt("return",{data:i,res:b.res});case 18:case"end":return t.stop()}},null,this)},a._getSourceName=function(u,p){return typeof p=="string"?u=this._objectName(u):u[0]!=="/"?p=this.options.bucket:(p=u.replace(/\/(.+?)(\/.*)/,"$1"),u=u.replace(/(\/.+?\/)(.*)/,"$2")),o(p),u=encodeURI(u),u="/"+p+"/"+u,u}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.delete=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,P.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),a=this._objectRequestParams("DELETE",d,o),a.successStatuses=[204],p.next=6,m.default.awrap(this.request(a));case 6:return n=p.sent,p.abrupt("return",{res:n.res});case 8:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(a){return a&&a.__esModule?a:{default:a}}var h=N("utility"),w=N("../utils/obj2xml"),d=w.obj2xml,o=M;o.deleteMulti=function(n){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,f,v,g,b,i,s,t,T,_,l,k;return m.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(p=[],!(!n||!n.length)){x.next=3;break}throw new Error("names is required");case 3:for(f=0;f<n.length;f++)v={},typeof n[f]=="string"?v.Key=h.escape(this._objectName(n[f])):(g=n[f],b=g.key,i=g.versionId,v.Key=h.escape(this._objectName(b)),v.VersionId=i),p.push(v);return s={Delete:{Quiet:!!u.quiet,Object:p}},t=d(s,{headers:!0}),u.subres=(0,P.default)({delete:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),T=this._objectRequestParams("POST","",u),T.mime="xml",T.content=t,T.xmlResponse=!0,T.successStatuses=[200],x.next=15,m.default.awrap(this.request(T));case 15:return _=x.sent,l=_.data,k=l&&l.Deleted||null,k&&(Array.isArray(k)||(k=[k])),x.abrupt("return",{res:_.res,deleted:k||[]});case 20:case"end":return x.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.deleteObjectTagging=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,P.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),a=this._objectRequestParams("DELETE",d,o),a.successStatuses=[204],p.next=7,m.default.awrap(this.request(a));case 7:return n=p.sent,p.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(o){return o&&o.__esModule?o:{default:o}}var h=N("fs"),w=N("is-type-of"),d=M;d.get=function(a,n){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,v,g;return m.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return p=null,f=!1,w.writableStream(n)?p=n:w.string(n)?(p=h.createWriteStream(n),f=!0):u=n,u=u||{},u.subres=(0,P.default)({},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.process&&(u.subres["x-oss-process"]=u.process),v=void 0,i.prev=8,g=this._objectRequestParams("GET",a,u),g.writeStream=p,g.successStatuses=[200,206,304],i.next=14,m.default.awrap(this.request(g));case 14:v=i.sent,f&&p.destroy(),i.next=25;break;case 18:if(i.prev=18,i.t0=i.catch(8),!f){i.next=24;break}return p.destroy(),i.next=24,m.default.awrap(this._deleteFileSafe(n));case 24:throw i.t0;case 25:return i.abrupt("return",{res:v.res,content:v.data});case 26:case"end":return i.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.getACL=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,P.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),a=this._objectRequestParams("GET",d,o),a.successStatuses=[200],a.xmlResponse=!0,p.next=8,m.default.awrap(this.request(a));case 8:return n=p.sent,p.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 p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/keys"),m=w(D),S=N("babel-runtime/regenerator"),P=w(S),c=N("babel-runtime/core-js/object/assign"),h=w(c);function w(g){return g&&g.__esModule?g:{default:g}}var d=M,o=N("../utils/isObject"),a=o.isObject,n=N("../utils/isArray"),u=n.isArray;d.getBucketVersions=p,d.listObjectVersions=p;function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,s,t,T,_,l;return P.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(g.versionIdMarker&&g.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return b.subres=(0,h.default)({versions:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),i=this._objectRequestParams("GET","",b),i.xmlResponse=!0,i.successStatuses=[200],i.query=v(g),O.next=10,P.default.awrap(this.request(i));case 10:return s=O.sent,t=s.data.Version||[],T=s.data.DeleteMarker||[],_=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(x){return{name:x.Key,url:_._objectUrl(x.Key),lastModified:x.LastModified,isLatest:x.IsLatest==="true",versionId:x.VersionId,etag:x.ETag,type:x.Type,size:Number(x.Size),storageClass:x.StorageClass,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),T&&(u(T)||(T=[T]),T=T.map(function(x){return{name:x.Key,lastModified:x.LastModified,versionId:x.VersionId,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),l=s.data.CommonPrefixes||null,l&&(u(l)||(l=[l]),l=l.map(function(x){return x.Prefix})),O.abrupt("return",{res:s.res,objects:t,deleteMarker:T,prefixes:l,nextMarker:s.data.NextMarker||null,NextVersionIdMarker:s.data.NextVersionIdMarker||null,isTruncated:s.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function f(g){return g.replace(/([A-Z])/g,"-$1").toLowerCase()}function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b={};return a(g)&&(0,m.default)(g).forEach(function(i){b[f(i)]=g[i]}),b}},{"../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(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.getObjectMeta=function(d,o){var a,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o=o||{},d=this._objectName(d),o.subres=(0,P.default)({objectMeta:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),a=this._objectRequestParams("HEAD",d,o),a.successStatuses=[200],p.next=8,m.default.awrap(this.request(a));case 8:return n=p.sent,p.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(o){return o&&o.__esModule?o:{default:o}}var h=M,w=N("../utils/isObject"),d=w.isObject;h.getObjectTagging=function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,p,f,v,g;return m.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return n.subres=(0,P.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),a=this._objectName(a),u=this._objectRequestParams("GET",a,n),u.successStatuses=[200],i.next=7,m.default.awrap(this.request(u));case 7:return p=i.sent,i.next=10,m.default.awrap(this.parseXML(p.data));case 10:return f=i.sent,v=f.TagSet.Tag,v=v&&d(v)?[v]:v||[],g={},v.forEach(function(s){g[s.Key]=s.Value}),i.abrupt("return",{status:p.status,res:p.res,tag:g});case 16:case"end":return i.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.getSymlink=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n,u;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return o.subres=(0,P.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),a=this._objectRequestParams("GET",d,o),a.successStatuses=[200],f.next=7,m.default.awrap(this.request(a));case 7:return n=f.sent,u=n.res.headers["x-oss-symlink-target"],f.abrupt("return",{targetName:decodeURIComponent(u),res:n.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=w(D),S=N("babel-runtime/core-js/object/keys"),P=w(S),c=N("babel-runtime/core-js/object/assign"),h=w(c);function w(o){return o&&o.__esModule?o:{default:o}}var d=M;d.head=function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,p,f;return m.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return n.subres=(0,h.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),u=this._objectRequestParams("HEAD",a,n),u.successStatuses=[200,304],g.next=6,m.default.awrap(this.request(u));case 6:return p=g.sent,f={meta:null,res:p.res,status:p.status},p.status===200&&(0,P.default)(p.headers).forEach(function(b){b.indexOf("x-oss-meta-")===0&&(f.meta||(f.meta={}),f.meta[b.substring(11)]=p.headers[b])}),g.abrupt("return",f);case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.putACL=function(d,o,a){var n,u;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return a=a||{},a.subres=(0,P.default)({acl:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),a.headers=a.headers||{},a.headers["x-oss-object-acl"]=o,d=this._objectName(d),n=this._objectRequestParams("PUT",d,a),n.successStatuses=[200],f.next=10,m.default.awrap(this.request(n));case 10:return u=f.sent,f.abrupt("return",{res:u.res});case 12:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=w(D),S=N("babel-runtime/core-js/object/keys"),P=w(S),c=N("babel-runtime/core-js/object/assign"),h=w(c);function w(p){return p&&p.__esModule?p:{default:p}}var d=N("../utils/obj2xml"),o=d.obj2xml,a=N("../utils/checkObjectTag"),n=a.checkObjectTag,u=M;u.putObjectTagging=function(f,v){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b,i,s;return m.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return n(v),g.subres=(0,h.default)({tagging:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),f=this._objectName(f),b=this._objectRequestParams("PUT",f,g),b.successStatuses=[200],v=(0,P.default)(v).map(function(_){return{Key:_,Value:v[_]}}),i={Tagging:{TagSet:{Tag:v}}},b.mime="xml",b.content=o(i),T.next=12,m.default.awrap(this.request(b));case 12:return s=T.sent,T.abrupt("return",{res:s.res,status:s.status});case 14:case"end":return T.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(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/object/assign"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h.putSymlink=function(d,o,a){var n,u;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return a=a||{},a.headers=a.headers||{},o=this._escape(this._objectName(o)),this._convertMetaToHeaders(a.meta,a.headers),a.headers["x-oss-symlink-target"]=o,a.subres=(0,P.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),a.storageClass&&(a.headers["x-oss-storage-class"]=a.storageClass),d=this._objectName(d),n=this._objectRequestParams("PUT",d,a),n.successStatuses=[200],f.next=13,m.default.awrap(this.request(n));case 13:return u=f.sent,f.abrupt("return",{res:u.res});case 15:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(N,J,M){"use strict";var D=N("babel-runtime/regenerator"),m=c(D),S=N("babel-runtime/core-js/promise"),P=c(S);function c(w){return w&&w.__esModule?w:{default:w}}var h=M;h._parallelNode=function(d,o,a,n){var u,p,f,v,g,b,i,s;return m.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:u=this,p=[],f=[],v=d.length/o,g=d.length%o,b=g===0?v:(d.length-g)/o+1,i=1,s=0;case 8:if(!(s<d.length)){T.next=26;break}if(!u.isCancel()){T.next=11;break}return T.abrupt("break",26);case 11:if(n?f.push(a(u,d[s],n)):f.push(a(u,d[s])),!(f.length===o||i===b&&s===d.length-1)){T.next=23;break}return T.prev=13,i+=1,T.next=17,m.default.awrap(P.default.all(f));case 17:T.next=22;break;case 19:T.prev=19,T.t0=T.catch(13),p.push(T.t0);case 22:f=[];case 23:s++,T.next=8;break;case 26:return T.abrupt("return",p);case 27:case"end":return T.stop()}},null,this,[[13,19]])},h._parallel=function(d,o,a){var n=this;return new P.default(function(u){var p=[];if(o<=0||!d){u(p);return}function f(l){return function(){if(l===null)throw new Error("Callback was already called.");var k=l;l=null;for(var O=arguments.length,x=Array(O),y=0;y<O;y++)x[y]=arguments[y];k.apply(this,x)}}function v(l){var k=-1,O=l.length;return function(){return++k<O&&!n.isCancel()?{value:l[k],key:k}:null}}var g=v(d),b=!1,i=0,s=!1;function t(l,k){i-=1,l?(b=!0,p.push(l),u(p)):k==={}||b&&i<=0?(b=!0,u(p)):s||(n.isCancel()?u(p):_())}function T(l,k){a(l).then(function(O){k(null,O)}).catch(function(O){k(O)})}function _(){for(s=!0;i<o&&!b&&!n.isCancel();){var l=g();if(l===null||p.length>0){b=!0,i<=0&&u(p);return}i+=1,T(l.value,f(t))}s=!1}_()})},h.cancel=function(d){this.options.cancelFlag=!0,d&&this.abortMultipartUpload(d.name,d.uploadId,d.options)},h.isCancel=function(){return this.options.cancelFlag},h.resetCancelFlag=function(){this.options.cancelFlag=!1},h._stop=function(){this.options.cancelFlag=!0},h._makeCancelEvent=function(){var d={status:0,name:"cancel"};return d}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(N,J,M){(function(D){"use strict";var m=N("babel-runtime/core-js/json/stringify"),S=h(m),P=N("babel-runtime/core-js/object/keys"),c=h(P);function h(o){return o&&o.__esModule?o:{default:o}}var w=N("./../../shims/crypto/crypto.js"),d=N("is-type-of");M.buildCanonicalizedResource=function(a,n){var u=""+a,p="?";if(d.string(n)&&n.trim()!=="")u+=p+n;else if(d.array(n))n.sort(),u+=p+n.join("&");else if(n){var f=function(b,i){return b[0]>i[0]?1:b[0]<i[0]?-1:0},v=function(b){u+=p+b,n[b]&&(u+="="+n[b]),p="&"};(0,c.default)(n).sort(f).forEach(v)}return u},M.buildCanonicalString=function(a,n,u,p){u=u||{};var f=u.headers||{},v="x-oss-",g=[],b={},i=[a.toUpperCase(),f["Content-Md5"]||"",f["Content-Type"]||f["Content-Type".toLowerCase()],p||f["x-oss-date"]];return(0,c.default)(f).forEach(function(s){var t=s.toLowerCase();t.indexOf(v)===0&&(b[t]=String(f[s]).trim())}),(0,c.default)(b).sort().forEach(function(s){g.push(s+":"+b[s])}),i=i.concat(g),i.push(this.buildCanonicalizedResource(n,u.parameters)),i.join(`
`)},M.computeSignature=function(a,n){var u=w.createHmac("sha1",a);return u.update(D.from(n,"utf8")).digest("base64")},M.authorization=function(a,n,u){return"OSS "+a+":"+this.computeSignature(n,u)},M._signatureForURL=function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=arguments[2],p=arguments[3],f={},v=n.subResource,g=v===void 0?{}:v;if(n.process){var b="x-oss-process";g[b]=n.process}if(n.trafficLimit){var i="x-oss-traffic-limit";g[i]=n.trafficLimit}if(n.response&&(0,c.default)(n.response).forEach(function(_){var l="response-"+_.toLowerCase();g[l]=n.response[_]}),(0,c.default)(n).forEach(function(_){var l=_.toLowerCase(),k=n[_];l.indexOf("x-oss-")===0?f[l]=k:(l.indexOf("content-md5")===0||l.indexOf("content-type")===0)&&(f[_]=k)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(g["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var s={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(s.callbackHost=n.callback.host),n.callback.contentType&&(s.callbackBodyType=n.callback.contentType),g.callback=D.from((0,S.default)(s)).toString("base64"),n.callback.customValue){var t={};(0,c.default)(n.callback.customValue).forEach(function(_){t["x:"+_]=n.callback.customValue[_]}),g["callback-var"]=D.from((0,S.default)(t)).toString("base64")}}var T=this.buildCanonicalString(n.method,u,{headers:f,parameters:g},p.toString());return{Signature:this.computeSignature(a,T),subResource:g}}}).call(this,N("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(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.checkBucketName=void 0,M.checkBucketName=function(D,m){var S=m?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(D))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/entries"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(M,"__esModule",{value:!0}),M.checkObjectTag=void 0;var P=N("./checkValid"),c=P.checkValid,h=N("./isObject"),w=h.isObject,d=[{validator:function(u){if(typeof u!="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 (/)"}],o={key:[].concat(d,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(d,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function a(n){if(!w(n))throw new Error("tag must be Object");var u=(0,m.default)(n);if(u.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];u.forEach(function(f){f.forEach(function(v,g){c(v,o[p[g]])})})}M.checkObjectTag=a},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.checkValid=void 0;function D(m,S){S.forEach(function(P){if(P.validator)P.validator(m);else if(P.pattern&&!P.pattern.test(m))throw new Error(P.msg)})}M.checkValid=D},{}],38:[function(N,J,M){(function(D){"use strict";var m=N("babel-runtime/core-js/object/assign"),S=P(m);function P(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(M,"__esModule",{value:!0}),M.createRequest=void 0;var c=N("./../../../shims/crypto/crypto.js"),h=N("debug")("ali-oss"),w=N("mime"),d=N("dateformat"),o=N("copy-to"),a=N("path");function n(f,v){return f[v]||f[v.toLowerCase()]}function u(f,v){delete f[v],delete f[v.toLowerCase()]}function p(f){var v=new Date;this.options.amendTimeSkewed&&(v=+new Date+this.options.amendTimeSkewed);var g={"x-oss-date":d(v,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(g["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(g,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),o(f.headers).to(g),n(g,"Content-Type")||(f.mime&&f.mime.indexOf("/")>0?g["Content-Type"]=f.mime:g["Content-Type"]=w.getType(f.mime||a.extname(f.object||""))),n(g,"Content-Type")||u(g,"Content-Type"),f.content&&(g["Content-Md5"]=c.createHash("md5").update(D.from(f.content,"utf8")).digest("base64"),g["Content-Length"]||(g["Content-Length"]=f.content.length));var b=this._getResource(f);g.authorization=this.authorization(f.method,b,f.subres,g);var i=this._getReqUrl(f);h("request %s %s, with headers %j, !!stream: %s",f.method,i,g,!!f.stream);var s=f.timeout||this.options.timeout,t={method:f.method,content:f.content,stream:f.stream,headers:g,timeout:s,writeStream:f.writeStream,customResponse:f.customResponse,ctx:f.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:i,params:t}}M.createRequest=p}).call(this,N("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(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/keys"),m=c(D),S=N("babel-runtime/helpers/typeof"),P=c(S);function c(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(M,"__esModule",{value:!0}),M.deepCopy=void 0,M.deepCopy=function(h){if(h===null||(typeof h=="undefined"?"undefined":(0,P.default)(h))!=="object")return h;var w=Array.isArray(h)?[]:{};return(0,m.default)(h).forEach(function(d){w[d]=M.deepCopy(h[d])}),w}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/keys"),m=c(D),S=N("babel-runtime/helpers/typeof"),P=c(S);function c(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(M,"__esModule",{value:!0}),M.formatObjKey=void 0;function h(d,o){if(d===null||(typeof d=="undefined"?"undefined":(0,P.default)(d))!=="object")return d;var a=void 0;if(Array.isArray(d)){a=[];for(var n=0;n<d.length;n++)a.push(h(d[n],o))}else a={},(0,m.default)(d).forEach(function(u){a[w(u,o)]=h(d[u],o)});return a}M.formatObjKey=h;function w(d,o){return o==="firstUpperCase"?d=d.replace(/^./,function(a){return a.toUpperCase()}):o==="firstLowerCase"&&(d=d.replace(/^./,function(a){return a.toLowerCase()})),d}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.getStrBytesCount=void 0;function D(m){for(var S=0,P=0;P<m.length;P++){var c=m.charAt(P);/^[\u00-\uff]$/.test(c)?S+=1:S+=2}return S}M.getStrBytesCount=D},{}],42:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isArray=void 0,M.isArray=function(D){return Object.prototype.toString.call(D)==="[object Array]"}},{}],43:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isBlob=void 0;function D(m){return typeof Blob!="undefined"&&m instanceof Blob}M.isBlob=D},{}],44:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isFile=void 0,M.isFile=function(D){return typeof File!="undefined"&&D instanceof File}},{}],45:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isIP=void 0,M.isIP=function(D){var m=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,S=/^\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 m.test(D)||S.test(D)}},{}],46:[function(N,J,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isObject=void 0,M.isObject=function(D){return Object.prototype.toString.call(D)==="[object Object]"}},{}],47:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/keys"),m=S(D);function S(w){return w&&w.__esModule?w:{default:w}}Object.defineProperty(M,"__esModule",{value:!0}),M.obj2xml=void 0;var P=N("./formatObjKey");function c(w){return Object.prototype.toString.call(w).replace(/(.*? |])/g,"").toLowerCase()}function h(w,d){var o="";return d&&d.headers&&(o=`<?xml version="1.0" encoding="UTF-8"?>
`),d&&d.firstUpperCase&&(w=P.formatObjKey(w,"firstUpperCase")),c(w)==="object"?(0,m.default)(w).forEach(function(a){c(w[a])==="string"||c(w[a])==="number"?o+="<"+a+">"+w[a]+"</"+a+">":c(w[a])==="object"?o+="<"+a+">"+h(w[a])+"</"+a+">":c(w[a])==="array"?o+=w[a].map(function(n){return"<"+a+">"+h(n)+"</"+a+">"}).join(""):o+="<"+a+">"+w[a].toString()+"</"+a+">"}):o+=w.toString(),o}M.obj2xml=h},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(N,J,M){J.exports=D,J.exports.HttpsAgent=D;function D(){}},{}],49:[function(N,J,M){J.exports=N("./register")().Promise},{"./register":51}],50:[function(N,J,M){"use strict";var D="@@any-promise/REGISTRATION",m=null;J.exports=function(S,P){return function(h,w){h=h||null,w=w||{};var d=w.global!==!1;if(m===null&&d&&(m=S[D]||null),m!==null&&h!==null&&m.implementation!==h)throw new Error('any-promise already defined as "'+m.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return m===null&&(h!==null&&typeof w.Promise!="undefined"?m={Promise:w.Promise,implementation:h}:m=P(h),d&&(S[D]=m)),m}}},{}],51:[function(N,J,M){"use strict";J.exports=N("./loader")(window,D);function D(){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(N,J,M){J.exports={default:N("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(N,J,M){J.exports={default:N("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(N,J,M){J.exports={default:N("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(N,J,M){J.exports={default:N("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(N,J,M){J.exports={default:N("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(N,J,M){J.exports={default:N("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(N,J,M){J.exports={default:N("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(N,J,M){J.exports={default:N("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(N,J,M){J.exports={default:N("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(N,J,M){"use strict";M.__esModule=!0;var D=N("../core-js/symbol/iterator"),m=h(D),S=N("../core-js/symbol"),P=h(S),c=typeof P.default=="function"&&typeof m.default=="symbol"?function(w){return typeof w}:function(w){return w&&typeof P.default=="function"&&w.constructor===P.default&&w!==P.default.prototype?"symbol":typeof w};function h(w){return w&&w.__esModule?w:{default:w}}M.default=typeof P.default=="function"&&c(m.default)==="symbol"?function(w){return typeof w=="undefined"?"undefined":c(w)}:function(w){return w&&typeof P.default=="function"&&w.constructor===P.default&&w!==P.default.prototype?"symbol":typeof w=="undefined"?"undefined":c(w)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(N,J,M){J.exports=N("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(N,J,M){"use strict";M.byteLength=d,M.toByteArray=a,M.fromByteArray=p;for(var D=[],m=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,h=P.length;c<h;++c)D[c]=P[c],m[P.charCodeAt(c)]=c;m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63;function w(f){var v=f.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=f.indexOf("=");g===-1&&(g=v);var b=g===v?0:4-g%4;return[g,b]}function d(f){var v=w(f),g=v[0],b=v[1];return(g+b)*3/4-b}function o(f,v,g){return(v+g)*3/4-g}function a(f){var v,g=w(f),b=g[0],i=g[1],s=new S(o(f,b,i)),t=0,T=i>0?b-4:b,_;for(_=0;_<T;_+=4)v=m[f.charCodeAt(_)]<<18|m[f.charCodeAt(_+1)]<<12|m[f.charCodeAt(_+2)]<<6|m[f.charCodeAt(_+3)],s[t++]=v>>16&255,s[t++]=v>>8&255,s[t++]=v&255;return i===2&&(v=m[f.charCodeAt(_)]<<2|m[f.charCodeAt(_+1)]>>4,s[t++]=v&255),i===1&&(v=m[f.charCodeAt(_)]<<10|m[f.charCodeAt(_+1)]<<4|m[f.charCodeAt(_+2)]>>2,s[t++]=v>>8&255,s[t++]=v&255),s}function n(f){return D[f>>18&63]+D[f>>12&63]+D[f>>6&63]+D[f&63]}function u(f,v,g){for(var b,i=[],s=v;s<g;s+=3)b=(f[s]<<16&16711680)+(f[s+1]<<8&65280)+(f[s+2]&255),i.push(n(b));return i.join("")}function p(f){for(var v,g=f.length,b=g%3,i=[],s=16383,t=0,T=g-b;t<T;t+=s)i.push(u(f,t,t+s>T?T:t+s));return b===1?(v=f[g-1],i.push(D[v>>2]+D[v<<4&63]+"==")):b===2&&(v=(f[g-2]<<8)+f[g-1],i.push(D[v>>10]+D[v>>4&63]+D[v<<2&63]+"=")),i.join("")}},{}],70:[function(N,J,M){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(D,m,S){typeof J!="undefined"&&J.exports?J.exports=S():typeof define=="function"&&define.amd?define(m,S):D[m]=S()}(this,"bowser",function(){var D=!0;function m(o){function a(G){var B=o.match(G);return B&&B.length>1&&B[1]||""}function n(G){var B=o.match(G);return B&&B.length>1&&B[2]||""}var u=a(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(o),f=!p&&/android/i.test(o),v=/nexus\s*[0-6]\s*/i.test(o),g=!v&&/nexus\s*[0-9]+/i.test(o),b=/CrOS/.test(o),i=/silk/i.test(o),s=/sailfish/i.test(o),t=/tizen/i.test(o),T=/(web|hpw)(o|0)s/i.test(o),_=/windows phone/i.test(o),l=/SamsungBrowser/i.test(o),k=!_&&/windows/i.test(o),O=!u&&!i&&/macintosh/i.test(o),x=!f&&!s&&!t&&!T&&/linux/i.test(o),y=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=a(/version\/(\d+(\.\d+)?)/i),C=/tablet/i.test(o)&&!/tablet pc/i.test(o),I=!C&&/[^-]mobi/i.test(o),j=/xbox/i.test(o),L;/opera/i.test(o)?L={name:"Opera",opera:D,version:E||a(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(o)?L={name:"Opera",opera:D,version:a(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(o)?L={name:"Samsung Internet for Android",samsungBrowser:D,version:E||a(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(o)?L={name:"NAVER Whale browser",whale:D,version:a(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(o)?L={name:"MZ Browser",mzbrowser:D,version:a(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(o)?L={name:"Opera Coast",coast:D,version:E||a(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(o)?L={name:"Focus",focus:D,version:a(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(o)?L={name:"Yandex Browser",yandexbrowser:D,version:E||a(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(o)?L={name:"UC Browser",ucbrowser:D,version:a(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(o)?L={name:"Maxthon",maxthon:D,version:a(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(o)?L={name:"Epiphany",epiphany:D,version:a(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(o)?L={name:"Puffin",puffin:D,version:a(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(o)?L={name:"Sleipnir",sleipnir:D,version:a(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(o)?L={name:"K-Meleon",kMeleon:D,version:a(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:_?(L={name:"Windows Phone",osname:"Windows Phone",windowsphone:D},y?(L.msedge=D,L.version=y):(L.msie=D,L.version=a(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(o)?L={name:"Internet Explorer",msie:D,version:a(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:b?L={name:"Chrome",osname:"Chrome OS",chromeos:D,chromeBook:D,chrome:D,version:a(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(o)?L={name:"Microsoft Edge",msedge:D,version:y}:/vivaldi/i.test(o)?L={name:"Vivaldi",vivaldi:D,version:a(/vivaldi\/(\d+(\.\d+)?)/i)||E}:s?L={name:"Sailfish",osname:"Sailfish OS",sailfish:D,version:a(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(o)?L={name:"SeaMonkey",seamonkey:D,version:a(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(o)?(L={name:"Firefox",firefox:D,version:a(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(o)&&(L.firefoxos=D,L.osname="Firefox OS")):i?L={name:"Amazon Silk",silk:D,version:a(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(o)?L={name:"PhantomJS",phantom:D,version:a(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(o)?L={name:"SlimerJS",slimer:D,version:a(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(o)||/rim\stablet/i.test(o)?L={name:"BlackBerry",osname:"BlackBerry OS",blackberry:D,version:E||a(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:T?(L={name:"WebOS",osname:"WebOS",webos:D,version:E||a(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(o)&&(L.touchpad=D)):/bada/i.test(o)?L={name:"Bada",osname:"Bada",bada:D,version:a(/dolfin\/(\d+(\.\d+)?)/i)}:t?L={name:"Tizen",osname:"Tizen",tizen:D,version:a(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(o)?L={name:"QupZilla",qupzilla:D,version:a(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(o)?L={name:"Chromium",chromium:D,version:a(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(o)?L={name:"Chrome",chrome:D,version:a(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:f?L={name:"Android",version:E}:/safari|applewebkit/i.test(o)?(L={name:"Safari",safari:D},E&&(L.version=E)):u?(L={name:u=="iphone"?"iPhone":u=="ipad"?"iPad":"iPod"},E&&(L.version=E)):/googlebot/i.test(o)?L={name:"Googlebot",googlebot:D,version:a(/googlebot\/(\d+(\.\d+))/i)||E}:L={name:a(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!L.msedge&&/(apple)?webkit/i.test(o)?(/(apple)?webkit\/537\.36/i.test(o)?(L.name=L.name||"Blink",L.blink=D):(L.name=L.name||"Webkit",L.webkit=D),!L.version&&E&&(L.version=E)):!L.opera&&/gecko\//i.test(o)&&(L.name=L.name||"Gecko",L.gecko=D,L.version=L.version||a(/gecko\/(\d+(\.\d+)?)/i)),!L.windowsphone&&(f||L.silk)?(L.android=D,L.osname="Android"):!L.windowsphone&&u?(L[u]=D,L.ios=D,L.osname="iOS"):O?(L.mac=D,L.osname="macOS"):j?(L.xbox=D,L.osname="Xbox"):k?(L.windows=D,L.osname="Windows"):x&&(L.linux=D,L.osname="Linux");function H(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=H(a(/Windows ((NT|XP)( \d\d?.\d)?)/i)):L.windowsphone?W=a(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):L.mac?(W=a(/Mac OS X (\d+([_\.\s]\d+)*)/i),W=W.replace(/[_\s]/g,".")):u?(W=a(/os (\d+([_\s]\d+)*) like mac os x/i),W=W.replace(/[_\s]/g,".")):f?W=a(/android[ \/-](\d+(\.\d+)*)/i):L.webos?W=a(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):L.blackberry?W=a(/rim\stablet\sos\s(\d+(\.\d+)*)/i):L.bada?W=a(/bada\/(\d+(\.\d+)*)/i):L.tizen&&(W=a(/tizen[\/\s](\d+(\.\d+)*)/i)),W&&(L.osversion=W);var U=!L.windows&&W.split(".")[0];return C||g||u=="ipad"||f&&(U==3||U>=4&&!I)||L.silk?L.tablet=D:(I||u=="iphone"||u=="ipod"||f||v||L.blackberry||L.webos||L.bada)&&(L.mobile=D),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&&h([L.version,"1.0"])===1||L.mzbrowser&&h([L.version,"6.0"])===1||L.focus&&h([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=D: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=D:L.x=D,L}var S=m(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(o){for(var a=0;a<o.length;++a){var n=o[a];if(typeof n=="string"&&n in S)return!0}return!1};function P(o){return o.split(".").length}function c(o,a){var n=[],u;if(Array.prototype.map)return Array.prototype.map.call(o,a);for(u=0;u<o.length;u++)n.push(a(o[u]));return n}function h(o){for(var a=Math.max(P(o[0]),P(o[1])),n=c(o,function(u){var p=a-P(u);return u=u+new Array(p+1).join(".0"),c(u.split("."),function(f){return new Array(20-f.length).join("0")+f}).reverse()});--a>=0;){if(n[0][a]>n[1][a])return 1;if(n[0][a]===n[1][a]){if(a===0)return 0}else return-1}}function w(o,a,n){var u=S;typeof a=="string"&&(n=a,a=void 0),a===void 0&&(a=!1),n&&(u=m(n));var p=""+u.version;for(var f in o)if(o.hasOwnProperty(f)&&u[f]){if(typeof o[f]!="string")throw new Error("Browser version in the minVersion map should be a string: "+f+": "+String(o));return h([p,o[f]])<0}return a}function d(o,a,n){return!w(o,a,n)}return S.isUnsupportedBrowser=w,S.compareVersions=h,S.check=d,S._detect=m,S.detect=m,S})},{}],71:[function(N,J,M){},{}],72:[function(N,J,M){var D=N("buffer").Buffer,m=D.isEncoding||function(d){switch(d&&d.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 S(d){if(d&&!m(d))throw new Error("Unknown encoding: "+d)}var P=M.StringDecoder=function(d){this.encoding=(d||"utf8").toLowerCase().replace(/[-_]/,""),S(d);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=h;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=w;break;default:this.write=c;return}this.charBuffer=new D(6),this.charReceived=0,this.charLength=0};P.prototype.write=function(d){for(var o="";this.charLength;){var a=d.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:d.length;if(d.copy(this.charBuffer,this.charReceived,0,a),this.charReceived+=a,this.charReceived<this.charLength)return"";d=d.slice(a,d.length),o=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var u=o.charCodeAt(o.length-1);if(u>=55296&&u<=56319){this.charLength+=this.surrogateSize,o="";continue}if(this.charReceived=this.charLength=0,d.length===0)return o;break}this.detectIncompleteChar(d);var n=d.length;this.charLength&&(d.copy(this.charBuffer,0,d.length-this.charReceived,n),n-=this.charReceived),o+=d.toString(this.encoding,0,n);var n=o.length-1,u=o.charCodeAt(n);if(u>=55296&&u<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),d.copy(this.charBuffer,0,0,p),o.substring(0,n)}return o},P.prototype.detectIncompleteChar=function(d){for(var o=d.length>=3?3:d.length;o>0;o--){var a=d[d.length-o];if(o==1&&a>>5==6){this.charLength=2;break}if(o<=2&&a>>4==14){this.charLength=3;break}if(o<=3&&a>>3==30){this.charLength=4;break}}this.charReceived=o},P.prototype.end=function(d){var o="";if(d&&d.length&&(o=this.write(d)),this.charReceived){var a=this.charReceived,n=this.charBuffer,u=this.encoding;o+=n.slice(0,a).toString(u)}return o};function c(d){return d.toString(this.encoding)}function h(d){this.charReceived=d.length%2,this.charLength=this.charReceived?2:0}function w(d){this.charReceived=d.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(N,J,M){(function(D,m){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var S=N("base64-js"),P=N("ieee754"),c=N("isarray");M.Buffer=m,M.SlowBuffer=i,M.INSPECT_MAX_BYTES=50,m.TYPED_ARRAY_SUPPORT=D.TYPED_ARRAY_SUPPORT!==void 0?D.TYPED_ARRAY_SUPPORT:h(),M.kMaxLength=w();function h(){try{var re=new Uint8Array(1);return re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},re.foo()===42&&typeof re.subarray=="function"&&re.subarray(1,1).byteLength===0}catch(Q){return!1}}function w(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(re,Q){if(w()<Q)throw new RangeError("Invalid typed array length");return m.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(Q),re.__proto__=m.prototype):(re===null&&(re=new m(Q)),re.length=Q),re}function m(re,Q,X){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m))return new m(re,Q,X);if(typeof re=="number"){if(typeof Q=="string")throw new Error("If encoding is specified then the first argument must be a string");return u(this,re)}return o(this,re,Q,X)}m.poolSize=8192,m._augment=function(re){return re.__proto__=m.prototype,re};function o(re,Q,X,Z){if(typeof Q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Q instanceof ArrayBuffer?v(re,Q,X,Z):typeof Q=="string"?p(re,Q,X):g(re,Q)}m.from=function(re,Q,X){return o(null,re,Q,X)},m.TYPED_ARRAY_SUPPORT&&(m.prototype.__proto__=Uint8Array.prototype,m.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&m[Symbol.species]===m&&Object.defineProperty(m,Symbol.species,{value:null,configurable:!0}));function a(re){if(typeof re!="number")throw new TypeError('"size" argument must be a number');if(re<0)throw new RangeError('"size" argument must not be negative')}function n(re,Q,X,Z){return a(Q),Q<=0?d(re,Q):X!==void 0?typeof Z=="string"?d(re,Q).fill(X,Z):d(re,Q).fill(X):d(re,Q)}m.alloc=function(re,Q,X){return n(null,re,Q,X)};function u(re,Q){if(a(Q),re=d(re,Q<0?0:b(Q)|0),!m.TYPED_ARRAY_SUPPORT)for(var X=0;X<Q;++X)re[X]=0;return re}m.allocUnsafe=function(re){return u(null,re)},m.allocUnsafeSlow=function(re){return u(null,re)};function p(re,Q,X){if((typeof X!="string"||X==="")&&(X="utf8"),!m.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Z=s(Q,X)|0;re=d(re,Z);var xe=re.write(Q,X);return xe!==Z&&(re=re.slice(0,xe)),re}function f(re,Q){var X=Q.length<0?0:b(Q.length)|0;re=d(re,X);for(var Z=0;Z<X;Z+=1)re[Z]=Q[Z]&255;return re}function v(re,Q,X,Z){if(Q.byteLength,X<0||Q.byteLength<X)throw new RangeError("'offset' is out of bounds");if(Q.byteLength<X+(Z||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Z===void 0?Q=new Uint8Array(Q):Z===void 0?Q=new Uint8Array(Q,X):Q=new Uint8Array(Q,X,Z),m.TYPED_ARRAY_SUPPORT?(re=Q,re.__proto__=m.prototype):re=f(re,Q),re}function g(re,Q){if(m.isBuffer(Q)){var X=b(Q.length)|0;return re=d(re,X),re.length===0||Q.copy(re,0,0,X),re}if(Q){if(typeof ArrayBuffer!="undefined"&&Q.buffer instanceof ArrayBuffer||"length"in Q)return typeof Q.length!="number"||Ce(Q.length)?d(re,0):f(re,Q);if(Q.type==="Buffer"&&c(Q.data))return f(re,Q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(re){if(re>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return re|0}function i(re){return+re!=re&&(re=0),m.alloc(+re)}m.isBuffer=function(Q){return!!(Q!=null&&Q._isBuffer)},m.compare=function(Q,X){if(!m.isBuffer(Q)||!m.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(Q===X)return 0;for(var Z=Q.length,xe=X.length,ve=0,Oe=Math.min(Z,xe);ve<Oe;++ve)if(Q[ve]!==X[ve]){Z=Q[ve],xe=X[ve];break}return Z<xe?-1:xe<Z?1:0},m.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},m.concat=function(Q,X){if(!c(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return m.alloc(0);var Z;if(X===void 0)for(X=0,Z=0;Z<Q.length;++Z)X+=Q[Z].length;var xe=m.allocUnsafe(X),ve=0;for(Z=0;Z<Q.length;++Z){var Oe=Q[Z];if(!m.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(xe,ve),ve+=Oe.length}return xe};function s(re,Q){if(m.isBuffer(re))return re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(re)||re instanceof ArrayBuffer))return re.byteLength;typeof re!="string"&&(re=""+re);var X=re.length;if(X===0)return 0;for(var Z=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return le(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return q(re).length;default:if(Z)return le(re).length;Q=(""+Q).toLowerCase(),Z=!0}}m.byteLength=s;function t(re,Q,X){var Z=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,Q>>>=0,X<=Q)return"";for(re||(re="utf8");;)switch(re){case"hex":return G(this,Q,X);case"utf8":case"utf-8":return j(this,Q,X);case"ascii":return W(this,Q,X);case"latin1":case"binary":return U(this,Q,X);case"base64":return I(this,Q,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Q,X);default:if(Z)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),Z=!0}}m.prototype._isBuffer=!0;function T(re,Q,X){var Z=re[Q];re[Q]=re[X],re[X]=Z}m.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<Q;X+=2)T(this,X,X+1);return this},m.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<Q;X+=4)T(this,X,X+3),T(this,X+1,X+2);return this},m.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<Q;X+=8)T(this,X,X+7),T(this,X+1,X+6),T(this,X+2,X+5),T(this,X+3,X+4);return this},m.prototype.toString=function(){var Q=this.length|0;return Q===0?"":arguments.length===0?j(this,0,Q):t.apply(this,arguments)},m.prototype.equals=function(Q){if(!m.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:m.compare(this,Q)===0},m.prototype.inspect=function(){var Q="",X=M.INSPECT_MAX_BYTES;return this.length>0&&(Q=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Q+=" ... ")),"<Buffer "+Q+">"},m.prototype.compare=function(Q,X,Z,xe,ve){if(!m.isBuffer(Q))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Z===void 0&&(Z=Q?Q.length:0),xe===void 0&&(xe=0),ve===void 0&&(ve=this.length),X<0||Z>Q.length||xe<0||ve>this.length)throw new RangeError("out of range index");if(xe>=ve&&X>=Z)return 0;if(xe>=ve)return-1;if(X>=Z)return 1;if(X>>>=0,Z>>>=0,xe>>>=0,ve>>>=0,this===Q)return 0;for(var Oe=ve-xe,Qe=Z-X,rt=Math.min(Oe,Qe),nt=this.slice(xe,ve),ct=Q.slice(X,Z),dt=0;dt<rt;++dt)if(nt[dt]!==ct[dt]){Oe=nt[dt],Qe=ct[dt];break}return Oe<Qe?-1:Qe<Oe?1:0};function _(re,Q,X,Z,xe){if(re.length===0)return-1;if(typeof X=="string"?(Z=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=xe?0:re.length-1),X<0&&(X=re.length+X),X>=re.length){if(xe)return-1;X=re.length-1}else if(X<0)if(xe)X=0;else return-1;if(typeof Q=="string"&&(Q=m.from(Q,Z)),m.isBuffer(Q))return Q.length===0?-1:l(re,Q,X,Z,xe);if(typeof Q=="number")return Q=Q&255,m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?xe?Uint8Array.prototype.indexOf.call(re,Q,X):Uint8Array.prototype.lastIndexOf.call(re,Q,X):l(re,[Q],X,Z,xe);throw new TypeError("val must be string, number or Buffer")}function l(re,Q,X,Z,xe){var ve=1,Oe=re.length,Qe=Q.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(re.length<2||Q.length<2)return-1;ve=2,Oe/=2,Qe/=2,X/=2}function rt(He,Pe){return ve===1?He[Pe]:He.readUInt16BE(Pe*ve)}var nt;if(xe){var ct=-1;for(nt=X;nt<Oe;nt++)if(rt(re,nt)===rt(Q,ct===-1?0:nt-ct)){if(ct===-1&&(ct=nt),nt-ct+1===Qe)return ct*ve}else ct!==-1&&(nt-=nt-ct),ct=-1}else for(X+Qe>Oe&&(X=Oe-Qe),nt=X;nt>=0;nt--){for(var dt=!0,pt=0;pt<Qe;pt++)if(rt(re,nt+pt)!==rt(Q,pt)){dt=!1;break}if(dt)return nt}return-1}m.prototype.includes=function(Q,X,Z){return this.indexOf(Q,X,Z)!==-1},m.prototype.indexOf=function(Q,X,Z){return _(this,Q,X,Z,!0)},m.prototype.lastIndexOf=function(Q,X,Z){return _(this,Q,X,Z,!1)};function k(re,Q,X,Z){X=Number(X)||0;var xe=re.length-X;Z?(Z=Number(Z),Z>xe&&(Z=xe)):Z=xe;var ve=Q.length;if(ve%2!==0)throw new TypeError("Invalid hex string");Z>ve/2&&(Z=ve/2);for(var Oe=0;Oe<Z;++Oe){var Qe=parseInt(Q.substr(Oe*2,2),16);if(isNaN(Qe))return Oe;re[X+Oe]=Qe}return Oe}function O(re,Q,X,Z){return ee(le(Q,re.length-X),re,X,Z)}function x(re,Q,X,Z){return ee(te(Q),re,X,Z)}function y(re,Q,X,Z){return x(re,Q,X,Z)}function E(re,Q,X,Z){return ee(q(Q),re,X,Z)}function C(re,Q,X,Z){return ee(fe(Q,re.length-X),re,X,Z)}m.prototype.write=function(Q,X,Z,xe){if(X===void 0)xe="utf8",Z=this.length,X=0;else if(Z===void 0&&typeof X=="string")xe=X,Z=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Z)?(Z=Z|0,xe===void 0&&(xe="utf8")):(xe=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ve=this.length-X;if((Z===void 0||Z>ve)&&(Z=ve),Q.length>0&&(Z<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");xe||(xe="utf8");for(var Oe=!1;;)switch(xe){case"hex":return k(this,Q,X,Z);case"utf8":case"utf-8":return O(this,Q,X,Z);case"ascii":return x(this,Q,X,Z);case"latin1":case"binary":return y(this,Q,X,Z);case"base64":return E(this,Q,X,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,Q,X,Z);default:if(Oe)throw new TypeError("Unknown encoding: "+xe);xe=(""+xe).toLowerCase(),Oe=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(re,Q,X){return Q===0&&X===re.length?S.fromByteArray(re):S.fromByteArray(re.slice(Q,X))}function j(re,Q,X){X=Math.min(re.length,X);for(var Z=[],xe=Q;xe<X;){var ve=re[xe],Oe=null,Qe=ve>239?4:ve>223?3:ve>191?2:1;if(xe+Qe<=X){var rt,nt,ct,dt;switch(Qe){case 1:ve<128&&(Oe=ve);break;case 2:rt=re[xe+1],(rt&192)===128&&(dt=(ve&31)<<6|rt&63,dt>127&&(Oe=dt));break;case 3:rt=re[xe+1],nt=re[xe+2],(rt&192)===128&&(nt&192)===128&&(dt=(ve&15)<<12|(rt&63)<<6|nt&63,dt>2047&&(dt<55296||dt>57343)&&(Oe=dt));break;case 4:rt=re[xe+1],nt=re[xe+2],ct=re[xe+3],(rt&192)===128&&(nt&192)===128&&(ct&192)===128&&(dt=(ve&15)<<18|(rt&63)<<12|(nt&63)<<6|ct&63,dt>65535&&dt<1114112&&(Oe=dt))}}Oe===null?(Oe=65533,Qe=1):Oe>65535&&(Oe-=65536,Z.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),Z.push(Oe),xe+=Qe}return H(Z)}var L=4096;function H(re){var Q=re.length;if(Q<=L)return String.fromCharCode.apply(String,re);for(var X="",Z=0;Z<Q;)X+=String.fromCharCode.apply(String,re.slice(Z,Z+=L));return X}function W(re,Q,X){var Z="";X=Math.min(re.length,X);for(var xe=Q;xe<X;++xe)Z+=String.fromCharCode(re[xe]&127);return Z}function U(re,Q,X){var Z="";X=Math.min(re.length,X);for(var xe=Q;xe<X;++xe)Z+=String.fromCharCode(re[xe]);return Z}function G(re,Q,X){var Z=re.length;(!Q||Q<0)&&(Q=0),(!X||X<0||X>Z)&&(X=Z);for(var xe="",ve=Q;ve<X;++ve)xe+=ue(re[ve]);return xe}function B(re,Q,X){for(var Z=re.slice(Q,X),xe="",ve=0;ve<Z.length;ve+=2)xe+=String.fromCharCode(Z[ve]+Z[ve+1]*256);return xe}m.prototype.slice=function(Q,X){var Z=this.length;Q=~~Q,X=X===void 0?Z:~~X,Q<0?(Q+=Z,Q<0&&(Q=0)):Q>Z&&(Q=Z),X<0?(X+=Z,X<0&&(X=0)):X>Z&&(X=Z),X<Q&&(X=Q);var xe;if(m.TYPED_ARRAY_SUPPORT)xe=this.subarray(Q,X),xe.__proto__=m.prototype;else{var ve=X-Q;xe=new m(ve,void 0);for(var Oe=0;Oe<ve;++Oe)xe[Oe]=this[Oe+Q]}return xe};function z(re,Q,X){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+Q>X)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUIntLE=function(Q,X,Z){Q=Q|0,X=X|0,Z||z(Q,X,this.length);for(var xe=this[Q],ve=1,Oe=0;++Oe<X&&(ve*=256);)xe+=this[Q+Oe]*ve;return xe},m.prototype.readUIntBE=function(Q,X,Z){Q=Q|0,X=X|0,Z||z(Q,X,this.length);for(var xe=this[Q+--X],ve=1;X>0&&(ve*=256);)xe+=this[Q+--X]*ve;return xe},m.prototype.readUInt8=function(Q,X){return X||z(Q,1,this.length),this[Q]},m.prototype.readUInt16LE=function(Q,X){return X||z(Q,2,this.length),this[Q]|this[Q+1]<<8},m.prototype.readUInt16BE=function(Q,X){return X||z(Q,2,this.length),this[Q]<<8|this[Q+1]},m.prototype.readUInt32LE=function(Q,X){return X||z(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},m.prototype.readUInt32BE=function(Q,X){return X||z(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},m.prototype.readIntLE=function(Q,X,Z){Q=Q|0,X=X|0,Z||z(Q,X,this.length);for(var xe=this[Q],ve=1,Oe=0;++Oe<X&&(ve*=256);)xe+=this[Q+Oe]*ve;return ve*=128,xe>=ve&&(xe-=Math.pow(2,8*X)),xe},m.prototype.readIntBE=function(Q,X,Z){Q=Q|0,X=X|0,Z||z(Q,X,this.length);for(var xe=X,ve=1,Oe=this[Q+--xe];xe>0&&(ve*=256);)Oe+=this[Q+--xe]*ve;return ve*=128,Oe>=ve&&(Oe-=Math.pow(2,8*X)),Oe},m.prototype.readInt8=function(Q,X){return X||z(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},m.prototype.readInt16LE=function(Q,X){X||z(Q,2,this.length);var Z=this[Q]|this[Q+1]<<8;return Z&32768?Z|4294901760:Z},m.prototype.readInt16BE=function(Q,X){X||z(Q,2,this.length);var Z=this[Q+1]|this[Q]<<8;return Z&32768?Z|4294901760:Z},m.prototype.readInt32LE=function(Q,X){return X||z(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},m.prototype.readInt32BE=function(Q,X){return X||z(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},m.prototype.readFloatLE=function(Q,X){return X||z(Q,4,this.length),P.read(this,Q,!0,23,4)},m.prototype.readFloatBE=function(Q,X){return X||z(Q,4,this.length),P.read(this,Q,!1,23,4)},m.prototype.readDoubleLE=function(Q,X){return X||z(Q,8,this.length),P.read(this,Q,!0,52,8)},m.prototype.readDoubleBE=function(Q,X){return X||z(Q,8,this.length),P.read(this,Q,!1,52,8)};function V(re,Q,X,Z,xe,ve){if(!m.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>xe||Q<ve)throw new RangeError('"value" argument is out of bounds');if(X+Z>re.length)throw new RangeError("Index out of range")}m.prototype.writeUIntLE=function(Q,X,Z,xe){if(Q=+Q,X=X|0,Z=Z|0,!xe){var ve=Math.pow(2,8*Z)-1;V(this,Q,X,Z,ve,0)}var Oe=1,Qe=0;for(this[X]=Q&255;++Qe<Z&&(Oe*=256);)this[X+Qe]=Q/Oe&255;return X+Z},m.prototype.writeUIntBE=function(Q,X,Z,xe){if(Q=+Q,X=X|0,Z=Z|0,!xe){var ve=Math.pow(2,8*Z)-1;V(this,Q,X,Z,ve,0)}var Oe=Z-1,Qe=1;for(this[X+Oe]=Q&255;--Oe>=0&&(Qe*=256);)this[X+Oe]=Q/Qe&255;return X+Z},m.prototype.writeUInt8=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,1,255,0),m.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),this[X]=Q&255,X+1};function ie(re,Q,X,Z){Q<0&&(Q=65535+Q+1);for(var xe=0,ve=Math.min(re.length-X,2);xe<ve;++xe)re[X+xe]=(Q&255<<8*(Z?xe:1-xe))>>>(Z?xe:1-xe)*8}m.prototype.writeUInt16LE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[X]=Q&255,this[X+1]=Q>>>8):ie(this,Q,X,!0),X+2},m.prototype.writeUInt16BE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>8,this[X+1]=Q&255):ie(this,Q,X,!1),X+2};function ce(re,Q,X,Z){Q<0&&(Q=4294967295+Q+1);for(var xe=0,ve=Math.min(re.length-X,4);xe<ve;++xe)re[X+xe]=Q>>>(Z?xe:3-xe)*8&255}m.prototype.writeUInt32LE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[X+3]=Q>>>24,this[X+2]=Q>>>16,this[X+1]=Q>>>8,this[X]=Q&255):ce(this,Q,X,!0),X+4},m.prototype.writeUInt32BE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>24,this[X+1]=Q>>>16,this[X+2]=Q>>>8,this[X+3]=Q&255):ce(this,Q,X,!1),X+4},m.prototype.writeIntLE=function(Q,X,Z,xe){if(Q=+Q,X=X|0,!xe){var ve=Math.pow(2,8*Z-1);V(this,Q,X,Z,ve-1,-ve)}var Oe=0,Qe=1,rt=0;for(this[X]=Q&255;++Oe<Z&&(Qe*=256);)Q<0&&rt===0&&this[X+Oe-1]!==0&&(rt=1),this[X+Oe]=(Q/Qe>>0)-rt&255;return X+Z},m.prototype.writeIntBE=function(Q,X,Z,xe){if(Q=+Q,X=X|0,!xe){var ve=Math.pow(2,8*Z-1);V(this,Q,X,Z,ve-1,-ve)}var Oe=Z-1,Qe=1,rt=0;for(this[X+Oe]=Q&255;--Oe>=0&&(Qe*=256);)Q<0&&rt===0&&this[X+Oe+1]!==0&&(rt=1),this[X+Oe]=(Q/Qe>>0)-rt&255;return X+Z},m.prototype.writeInt8=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,1,127,-128),m.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),Q<0&&(Q=255+Q+1),this[X]=Q&255,X+1},m.prototype.writeInt16LE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[X]=Q&255,this[X+1]=Q>>>8):ie(this,Q,X,!0),X+2},m.prototype.writeInt16BE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>8,this[X+1]=Q&255):ie(this,Q,X,!1),X+2},m.prototype.writeInt32LE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,4,2147483647,-2147483648),m.TYPED_ARRAY_SUPPORT?(this[X]=Q&255,this[X+1]=Q>>>8,this[X+2]=Q>>>16,this[X+3]=Q>>>24):ce(this,Q,X,!0),X+4},m.prototype.writeInt32BE=function(Q,X,Z){return Q=+Q,X=X|0,Z||V(this,Q,X,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),m.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>24,this[X+1]=Q>>>16,this[X+2]=Q>>>8,this[X+3]=Q&255):ce(this,Q,X,!1),X+4};function he(re,Q,X,Z,xe,ve){if(X+Z>re.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function Ae(re,Q,X,Z,xe){return xe||he(re,Q,X,4,34028234663852886e22,-34028234663852886e22),P.write(re,Q,X,Z,23,4),X+4}m.prototype.writeFloatLE=function(Q,X,Z){return Ae(this,Q,X,!0,Z)},m.prototype.writeFloatBE=function(Q,X,Z){return Ae(this,Q,X,!1,Z)};function De(re,Q,X,Z,xe){return xe||he(re,Q,X,8,17976931348623157e292,-17976931348623157e292),P.write(re,Q,X,Z,52,8),X+8}m.prototype.writeDoubleLE=function(Q,X,Z){return De(this,Q,X,!0,Z)},m.prototype.writeDoubleBE=function(Q,X,Z){return De(this,Q,X,!1,Z)},m.prototype.copy=function(Q,X,Z,xe){if(Z||(Z=0),!xe&&xe!==0&&(xe=this.length),X>=Q.length&&(X=Q.length),X||(X=0),xe>0&&xe<Z&&(xe=Z),xe===Z)return 0;if(Q.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("sourceStart out of bounds");if(xe<0)throw new RangeError("sourceEnd out of bounds");xe>this.length&&(xe=this.length),Q.length-X<xe-Z&&(xe=Q.length-X+Z);var ve=xe-Z,Oe;if(this===Q&&Z<X&&X<xe)for(Oe=ve-1;Oe>=0;--Oe)Q[Oe+X]=this[Oe+Z];else if(ve<1e3||!m.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<ve;++Oe)Q[Oe+X]=this[Oe+Z];else Uint8Array.prototype.set.call(Q,this.subarray(Z,Z+ve),X);return ve},m.prototype.fill=function(Q,X,Z,xe){if(typeof Q=="string"){if(typeof X=="string"?(xe=X,X=0,Z=this.length):typeof Z=="string"&&(xe=Z,Z=this.length),Q.length===1){var ve=Q.charCodeAt(0);ve<256&&(Q=ve)}if(xe!==void 0&&typeof xe!="string")throw new TypeError("encoding must be a string");if(typeof xe=="string"&&!m.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe)}else typeof Q=="number"&&(Q=Q&255);if(X<0||this.length<X||this.length<Z)throw new RangeError("Out of range index");if(Z<=X)return this;X=X>>>0,Z=Z===void 0?this.length:Z>>>0,Q||(Q=0);var Oe;if(typeof Q=="number")for(Oe=X;Oe<Z;++Oe)this[Oe]=Q;else{var Qe=m.isBuffer(Q)?Q:le(new m(Q,xe).toString()),rt=Qe.length;for(Oe=0;Oe<Z-X;++Oe)this[Oe+X]=Qe[Oe%rt]}return this};var pe=/[^+\/0-9A-Za-z-_]/g;function Te(re){if(re=ye(re).replace(pe,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function ye(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function ue(re){return re<16?"0"+re.toString(16):re.toString(16)}function le(re,Q){Q=Q||Infinity;for(var X,Z=re.length,xe=null,ve=[],Oe=0;Oe<Z;++Oe){if(X=re.charCodeAt(Oe),X>55295&&X<57344){if(!xe){if(X>56319){(Q-=3)>-1&&ve.push(239,191,189);continue}else if(Oe+1===Z){(Q-=3)>-1&&ve.push(239,191,189);continue}xe=X;continue}if(X<56320){(Q-=3)>-1&&ve.push(239,191,189),xe=X;continue}X=(xe-55296<<10|X-56320)+65536}else xe&&((Q-=3)>-1&&ve.push(239,191,189));if(xe=null,X<128){if((Q-=1)<0)break;ve.push(X)}else if(X<2048){if((Q-=2)<0)break;ve.push(X>>6|192,X&63|128)}else if(X<65536){if((Q-=3)<0)break;ve.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Q-=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 te(re){for(var Q=[],X=0;X<re.length;++X)Q.push(re.charCodeAt(X)&255);return Q}function fe(re,Q){for(var X,Z,xe,ve=[],Oe=0;Oe<re.length&&!((Q-=2)<0);++Oe)X=re.charCodeAt(Oe),Z=X>>8,xe=X%256,ve.push(xe),ve.push(Z);return ve}function q(re){return S.toByteArray(Te(re))}function ee(re,Q,X,Z){for(var xe=0;xe<Z&&!(xe+X>=Q.length||xe>=re.length);++xe)Q[xe+X]=re[xe];return xe}function Ce(re){return re!==re}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(N,J,M){J.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(N,J,M){J.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(N,J,M){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var D=Array.prototype.slice;J.exports=m;function m(P,c){if(!(this instanceof m))return new m(P,c);this.src=P,this._withAccess=c}m.prototype.withAccess=function(P){return this._withAccess=P!==!1,this},m.prototype.pick=function(P){return Array.isArray(P)||(P=D.call(arguments)),P.length&&(this.keys=P),this},m.prototype.to=function(P){if(P=P||{},!this.src)return P;var c=this.keys||Object.keys(this.src);if(!this._withAccess){for(var h=0;h<c.length;h++){if(w=c[h],P[w]!==void 0)continue;P[w]=this.src[w]}return P}for(var h=0;h<c.length;h++){var w=c[h];if(!S(P,w))continue;var d=this.src.__lookupGetter__(w),o=this.src.__lookupSetter__(w);d&&P.__defineGetter__(w,d),o&&P.__defineSetter__(w,o),!d&&!o&&(P[w]=this.src[w])}return P},m.prototype.toCover=function(P){for(var c=this.keys||Object.keys(this.src),h=0;h<c.length;h++){var w=c[h];delete P[w];var d=this.src.__lookupGetter__(w),o=this.src.__lookupSetter__(w);d&&P.__defineGetter__(w,d),o&&P.__defineSetter__(w,o),!d&&!o&&(P[w]=this.src[w])}},m.prototype.override=m.prototype.toCover,m.prototype.and=function(P){var c={};return this.to(c),this.src=P,this.to(c),this.src=c,this};function S(P,c){return P[c]===void 0&&P.__lookupGetter__(c)===void 0&&P.__lookupSetter__(c)===void 0}},{}],77:[function(N,J,M){N("../../modules/es6.string.iterator"),N("../../modules/es6.array.from"),J.exports=N("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(N,J,M){var D=N("../../modules/_core"),m=D.JSON||(D.JSON={stringify:JSON.stringify});J.exports=function(P){return m.stringify.apply(m,arguments)}},{"../../modules/_core":99}],79:[function(N,J,M){N("../../modules/es6.object.assign"),J.exports=N("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(N,J,M){N("../../modules/es6.object.create");var D=N("../../modules/_core").Object;J.exports=function(S,P){return D.create(S,P)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(N,J,M){N("../../modules/es6.object.define-property");var D=N("../../modules/_core").Object;J.exports=function(S,P,c){return D.defineProperty(S,P,c)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(N,J,M){N("../../modules/es7.object.entries"),J.exports=N("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(N,J,M){N("../../modules/es6.object.get-own-property-names");var D=N("../../modules/_core").Object;J.exports=function(S){return D.getOwnPropertyNames(S)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(N,J,M){N("../../modules/es6.object.get-prototype-of"),J.exports=N("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(N,J,M){N("../../modules/es6.object.keys"),J.exports=N("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(N,J,M){N("../modules/es6.object.to-string"),N("../modules/es6.string.iterator"),N("../modules/web.dom.iterable"),N("../modules/es6.promise"),N("../modules/es7.promise.finally"),N("../modules/es7.promise.try"),J.exports=N("../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(N,J,M){N("../modules/web.immediate"),J.exports=N("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(N,J,M){N("../../modules/es6.string.from-code-point"),J.exports=N("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(N,J,M){N("../../modules/es6.function.has-instance"),J.exports=N("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(N,J,M){N("../../modules/es6.symbol"),N("../../modules/es6.object.to-string"),N("../../modules/es7.symbol.async-iterator"),N("../../modules/es7.symbol.observable"),J.exports=N("../../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(N,J,M){N("../../modules/es6.string.iterator"),N("../../modules/web.dom.iterable"),J.exports=N("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(N,J,M){J.exports=function(D){if(typeof D!="function")throw TypeError(D+" is not a function!");return D}},{}],93:[function(N,J,M){J.exports=function(){}},{}],94:[function(N,J,M){J.exports=function(D,m,S,P){if(!(D instanceof m)||P!==void 0&&P in D)throw TypeError(S+": incorrect invocation!");return D}},{}],95:[function(N,J,M){var D=N("./_is-object");J.exports=function(m){if(!D(m))throw TypeError(m+" is not an object!");return m}},{"./_is-object":119}],96:[function(N,J,M){var D=N("./_to-iobject"),m=N("./_to-length"),S=N("./_to-absolute-index");J.exports=function(P){return function(c,h,w){var d=D(c),o=m(d.length),a=S(w,o),n;if(P&&h!=h){for(;o>a;)if(n=d[a++],n!=n)return!0}else for(;o>a;a++)if((P||a in d)&&d[a]===h)return P||a||0;return!P&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(N,J,M){var D=N("./_cof"),m=N("./_wks")("toStringTag"),S=D(function(){return arguments}())=="Arguments",P=function(c,h){try{return c[h]}catch(w){}};J.exports=function(c){var h,w,d;return c===void 0?"Undefined":c===null?"Null":typeof(w=P(h=Object(c),m))=="string"?w:S?D(h):(d=D(h))=="Object"&&typeof h.callee=="function"?"Arguments":d}},{"./_cof":98,"./_wks":166}],98:[function(N,J,M){var D={}.toString;J.exports=function(m){return D.call(m).slice(8,-1)}},{}],99:[function(N,J,M){var D=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=D)},{}],100:[function(N,J,M){"use strict";var D=N("./_object-dp"),m=N("./_property-desc");J.exports=function(S,P,c){P in S?D.f(S,P,m(0,c)):S[P]=c}},{"./_object-dp":132,"./_property-desc":146}],101:[function(N,J,M){var D=N("./_a-function");J.exports=function(m,S,P){if(D(m),S===void 0)return m;switch(P){case 1:return function(c){return m.call(S,c)};case 2:return function(c,h){return m.call(S,c,h)};case 3:return function(c,h,w){return m.call(S,c,h,w)}}return function(){return m.apply(S,arguments)}}},{"./_a-function":92}],102:[function(N,J,M){J.exports=function(D){if(D==null)throw TypeError("Can't call method on "+D);return D}},{}],103:[function(N,J,M){J.exports=!N("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(N,J,M){var D=N("./_is-object"),m=N("./_global").document,S=D(m)&&D(m.createElement);J.exports=function(P){return S?m.createElement(P):{}}},{"./_global":110,"./_is-object":119}],105:[function(N,J,M){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(N,J,M){var D=N("./_object-keys"),m=N("./_object-gops"),S=N("./_object-pie");J.exports=function(P){var c=D(P),h=m.f;if(h)for(var w=h(P),d=S.f,o=0,a;w.length>o;)d.call(P,a=w[o++])&&c.push(a);return c}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(N,J,M){var D=N("./_global"),m=N("./_core"),S=N("./_ctx"),P=N("./_hide"),c=N("./_has"),h="prototype",w=function(d,o,a){var n=d&w.F,u=d&w.G,p=d&w.S,f=d&w.P,v=d&w.B,g=d&w.W,b=u?m:m[o]||(m[o]={}),i=b[h],s=u?D:p?D[o]:(D[o]||{})[h],t,T,_;u&&(a=o);for(t in a){if(T=!n&&s&&s[t]!==void 0,T&&c(b,t))continue;_=T?s[t]:a[t],b[t]=u&&typeof s[t]!="function"?a[t]:v&&T?S(_,D):g&&s[t]==_?function(l){var k=function(O,x,y){if(this instanceof l){switch(arguments.length){case 0:return new l;case 1:return new l(O);case 2:return new l(O,x)}return new l(O,x,y)}return l.apply(this,arguments)};return k[h]=l[h],k}(_):f&&typeof _=="function"?S(Function.call,_):_,f&&((b.virtual||(b.virtual={}))[t]=_,d&w.R&&i&&!i[t]&&P(i,t,_))}};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,J.exports=w},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(N,J,M){J.exports=function(D){try{return!!D()}catch(m){return!0}}},{}],109:[function(N,J,M){var D=N("./_ctx"),m=N("./_iter-call"),S=N("./_is-array-iter"),P=N("./_an-object"),c=N("./_to-length"),h=N("./core.get-iterator-method"),w={},d={},M=J.exports=function(o,a,n,u,p){var f=p?function(){return o}:h(o),v=D(n,u,a?2:1),g=0,b,i,s,t;if(typeof f!="function")throw TypeError(o+" is not iterable!");if(S(f)){for(b=c(o.length);b>g;g++)if(t=a?v(P(i=o[g])[0],i[1]):v(o[g]),t===w||t===d)return t}else for(s=f.call(o);!(i=s.next()).done;)if(t=m(s,v,i.value,a),t===w||t===d)return t};M.BREAK=w,M.RETURN=d},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(N,J,M){var D=J.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=D)},{}],111:[function(N,J,M){var D={}.hasOwnProperty;J.exports=function(m,S){return D.call(m,S)}},{}],112:[function(N,J,M){var D=N("./_object-dp"),m=N("./_property-desc");J.exports=N("./_descriptors")?function(S,P,c){return D.f(S,P,m(1,c))}:function(S,P,c){return S[P]=c,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(N,J,M){var D=N("./_global").document;J.exports=D&&D.documentElement},{"./_global":110}],114:[function(N,J,M){J.exports=!N("./_descriptors")&&!N("./_fails")(function(){return Object.defineProperty(N("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(N,J,M){J.exports=function(D,m,S){var P=S===void 0;switch(m.length){case 0:return P?D():D.call(S);case 1:return P?D(m[0]):D.call(S,m[0]);case 2:return P?D(m[0],m[1]):D.call(S,m[0],m[1]);case 3:return P?D(m[0],m[1],m[2]):D.call(S,m[0],m[1],m[2]);case 4:return P?D(m[0],m[1],m[2],m[3]):D.call(S,m[0],m[1],m[2],m[3])}return D.apply(S,m)}},{}],116:[function(N,J,M){var D=N("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(m){return D(m)=="String"?m.split(""):Object(m)}},{"./_cof":98}],117:[function(N,J,M){var D=N("./_iterators"),m=N("./_wks")("iterator"),S=Array.prototype;J.exports=function(P){return P!==void 0&&(D.Array===P||S[m]===P)}},{"./_iterators":125,"./_wks":166}],118:[function(N,J,M){var D=N("./_cof");J.exports=Array.isArray||function(S){return D(S)=="Array"}},{"./_cof":98}],119:[function(N,J,M){J.exports=function(D){return typeof D=="object"?D!==null:typeof D=="function"}},{}],120:[function(N,J,M){var D=N("./_an-object");J.exports=function(m,S,P,c){try{return c?S(D(P)[0],P[1]):S(P)}catch(w){var h=m.return;throw h!==void 0&&D(h.call(m)),w}}},{"./_an-object":95}],121:[function(N,J,M){"use strict";var D=N("./_object-create"),m=N("./_property-desc"),S=N("./_set-to-string-tag"),P={};N("./_hide")(P,N("./_wks")("iterator"),function(){return this}),J.exports=function(c,h,w){c.prototype=D(P,{next:m(1,w)}),S(c,h+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(N,J,M){"use strict";var D=N("./_library"),m=N("./_export"),S=N("./_redefine"),P=N("./_hide"),c=N("./_iterators"),h=N("./_iter-create"),w=N("./_set-to-string-tag"),d=N("./_object-gpo"),o=N("./_wks")("iterator"),a=!([].keys&&"next"in[].keys()),n="@@iterator",u="keys",p="values",f=function(){return this};J.exports=function(v,g,b,i,s,t,T){h(b,g,i);var _=function(W){if(!a&&W in x)return x[W];switch(W){case u:return function(){return new b(this,W)};case p:return function(){return new b(this,W)}}return function(){return new b(this,W)}},l=g+" Iterator",k=s==p,O=!1,x=v.prototype,y=x[o]||x[n]||s&&x[s],E=y||_(s),C=s?k?_("entries"):E:void 0,I=g=="Array"&&x.entries||y,j,L,H;if(I&&(H=d(I.call(new v)),H!==Object.prototype&&H.next&&(w(H,l,!0),!D&&typeof H[o]!="function"&&P(H,o,f))),k&&y&&y.name!==p&&(O=!0,E=function(){return y.call(this)}),(!D||T)&&(a||O||!x[o])&&P(x,o,E),c[g]=E,c[l]=f,s)if(j={values:k?E:_(p),keys:t?E:_(u),entries:C},T)for(L in j)L in x||S(x,L,j[L]);else m(m.P+m.F*(a||O),g,j);return j}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(N,J,M){var D=N("./_wks")("iterator"),m=!1;try{var S=[7][D]();S.return=function(){m=!0},Array.from(S,function(){throw 2})}catch(P){}J.exports=function(P,c){if(!c&&!m)return!1;var h=!1;try{var w=[7],d=w[D]();d.next=function(){return{done:h=!0}},w[D]=function(){return d},P(w)}catch(o){}return h}},{"./_wks":166}],124:[function(N,J,M){J.exports=function(D,m){return{value:m,done:!!D}}},{}],125:[function(N,J,M){J.exports={}},{}],126:[function(N,J,M){J.exports=!0},{}],127:[function(N,J,M){var D=N("./_uid")("meta"),m=N("./_is-object"),S=N("./_has"),P=N("./_object-dp").f,c=0,h=Object.isExtensible||function(){return!0},w=!N("./_fails")(function(){return h(Object.preventExtensions({}))}),d=function(p){P(p,D,{value:{i:"O"+ ++c,w:{}}})},o=function(p,f){if(!m(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!S(p,D)){if(!h(p))return"F";if(!f)return"E";d(p)}return p[D].i},a=function(p,f){if(!S(p,D)){if(!h(p))return!0;if(!f)return!1;d(p)}return p[D].w},n=function(p){return w&&u.NEED&&h(p)&&!S(p,D)&&d(p),p},u=J.exports={KEY:D,NEED:!1,fastKey:o,getWeak:a,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(N,J,M){var D=N("./_global"),m=N("./_task").set,S=D.MutationObserver||D.WebKitMutationObserver,P=D.process,c=D.Promise,h=N("./_cof")(P)=="process";J.exports=function(){var w,d,o,a=function(){var f,v;for(h&&(f=P.domain)&&f.exit();w;){v=w.fn,w=w.next;try{v()}catch(g){throw w?o():d=void 0,g}}d=void 0,f&&f.enter()};if(h)o=function(){P.nextTick(a)};else if(S&&!(D.navigator&&D.navigator.standalone)){var n=!0,u=document.createTextNode("");new S(a).observe(u,{characterData:!0}),o=function(){u.data=n=!n}}else if(c&&c.resolve){var p=c.resolve(void 0);o=function(){p.then(a)}}else o=function(){m.call(D,a)};return function(f){var v={fn:f,next:void 0};d&&(d.next=v),w||(w=v,o()),d=v}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(N,J,M){"use strict";var D=N("./_a-function");function m(S){var P,c;this.promise=new S(function(h,w){if(P!==void 0||c!==void 0)throw TypeError("Bad Promise constructor");P=h,c=w}),this.resolve=D(P),this.reject=D(c)}J.exports.f=function(S){return new m(S)}},{"./_a-function":92}],130:[function(N,J,M){"use strict";var D=N("./_descriptors"),m=N("./_object-keys"),S=N("./_object-gops"),P=N("./_object-pie"),c=N("./_to-object"),h=N("./_iobject"),w=Object.assign;J.exports=!w||N("./_fails")(function(){var d={},o={},a=Symbol(),n="abcdefghijklmnopqrst";return d[a]=7,n.split("").forEach(function(u){o[u]=u}),w({},d)[a]!=7||Object.keys(w({},o)).join("")!=n})?function(o,a){for(var n=c(o),u=arguments.length,p=1,f=S.f,v=P.f;u>p;)for(var g=h(arguments[p++]),b=f?m(g).concat(f(g)):m(g),i=b.length,s=0,t;i>s;)t=b[s++],(!D||v.call(g,t))&&(n[t]=g[t]);return n}:w},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(N,J,M){var D=N("./_an-object"),m=N("./_object-dps"),S=N("./_enum-bug-keys"),P=N("./_shared-key")("IE_PROTO"),c=function(){},h="prototype",w=function(){var d=N("./_dom-create")("iframe"),o=S.length,a="<",n=">",u;for(d.style.display="none",N("./_html").appendChild(d),d.src="javascript:",u=d.contentWindow.document,u.open(),u.write(a+"script"+n+"document.F=Object"+a+"/script"+n),u.close(),w=u.F;o--;)delete w[h][S[o]];return w()};J.exports=Object.create||function(o,a){var n;return o!==null?(c[h]=D(o),n=new c,c[h]=null,n[P]=o):n=w(),a===void 0?n:m(n,a)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(N,J,M){var D=N("./_an-object"),m=N("./_ie8-dom-define"),S=N("./_to-primitive"),P=Object.defineProperty;M.f=N("./_descriptors")?Object.defineProperty:function(h,w,d){if(D(h),w=S(w,!0),D(d),m)try{return P(h,w,d)}catch(o){}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[w]=d.value),h}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(N,J,M){var D=N("./_object-dp"),m=N("./_an-object"),S=N("./_object-keys");J.exports=N("./_descriptors")?Object.defineProperties:function(c,h){m(c);for(var w=S(h),d=w.length,o=0,a;d>o;)D.f(c,a=w[o++],h[a]);return c}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(N,J,M){var D=N("./_object-pie"),m=N("./_property-desc"),S=N("./_to-iobject"),P=N("./_to-primitive"),c=N("./_has"),h=N("./_ie8-dom-define"),w=Object.getOwnPropertyDescriptor;M.f=N("./_descriptors")?w:function(o,a){if(o=S(o),a=P(a,!0),h)try{return w(o,a)}catch(n){}if(c(o,a))return m(!D.f.call(o,a),o[a])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(N,J,M){var D=N("./_to-iobject"),m=N("./_object-gopn").f,S={}.toString,P=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(h){try{return m(h)}catch(w){return P.slice()}};J.exports.f=function(w){return P&&S.call(w)=="[object Window]"?c(w):m(D(w))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(N,J,M){var D=N("./_object-keys-internal"),m=N("./_enum-bug-keys").concat("length","prototype");M.f=Object.getOwnPropertyNames||function(P){return D(P,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(N,J,M){M.f=Object.getOwnPropertySymbols},{}],138:[function(N,J,M){var D=N("./_has"),m=N("./_to-object"),S=N("./_shared-key")("IE_PROTO"),P=Object.prototype;J.exports=Object.getPrototypeOf||function(c){return c=m(c),D(c,S)?c[S]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?P:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(N,J,M){var D=N("./_has"),m=N("./_to-iobject"),S=N("./_array-includes")(!1),P=N("./_shared-key")("IE_PROTO");J.exports=function(c,h){var w=m(c),d=0,o=[],a;for(a in w)a!=P&&(D(w,a)&&o.push(a));for(;h.length>d;)D(w,a=h[d++])&&(~S(o,a)||o.push(a));return o}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(N,J,M){var D=N("./_object-keys-internal"),m=N("./_enum-bug-keys");J.exports=Object.keys||function(P){return D(P,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(N,J,M){M.f={}.propertyIsEnumerable},{}],142:[function(N,J,M){var D=N("./_export"),m=N("./_core"),S=N("./_fails");J.exports=function(P,c){var h=(m.Object||{})[P]||Object[P],w={};w[P]=c(h),D(D.S+D.F*S(function(){h(1)}),"Object",w)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(N,J,M){var D=N("./_descriptors"),m=N("./_object-keys"),S=N("./_to-iobject"),P=N("./_object-pie").f;J.exports=function(c){return function(h){for(var w=S(h),d=m(w),o=d.length,a=0,n=[],u;o>a;)u=d[a++],(!D||P.call(w,u))&&n.push(c?[u,w[u]]:w[u]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(N,J,M){J.exports=function(D){try{return{e:!1,v:D()}}catch(m){return{e:!0,v:m}}}},{}],145:[function(N,J,M){var D=N("./_an-object"),m=N("./_is-object"),S=N("./_new-promise-capability");J.exports=function(P,c){if(D(P),m(c)&&c.constructor===P)return c;var h=S.f(P),w=h.resolve;return w(c),h.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(N,J,M){J.exports=function(D,m){return{enumerable:!(D&1),configurable:!(D&2),writable:!(D&4),value:m}}},{}],147:[function(N,J,M){var D=N("./_hide");J.exports=function(m,S,P){for(var c in S)P&&m[c]?m[c]=S[c]:D(m,c,S[c]);return m}},{"./_hide":112}],148:[function(N,J,M){J.exports=N("./_hide")},{"./_hide":112}],149:[function(N,J,M){"use strict";var D=N("./_global"),m=N("./_core"),S=N("./_object-dp"),P=N("./_descriptors"),c=N("./_wks")("species");J.exports=function(h){var w=typeof m[h]=="function"?m[h]:D[h];P&&w&&!w[c]&&S.f(w,c,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(N,J,M){var D=N("./_object-dp").f,m=N("./_has"),S=N("./_wks")("toStringTag");J.exports=function(P,c,h){P&&!m(P=h?P:P.prototype,S)&&D(P,S,{configurable:!0,value:c})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(N,J,M){var D=N("./_shared")("keys"),m=N("./_uid");J.exports=function(S){return D[S]||(D[S]=m(S))}},{"./_shared":152,"./_uid":162}],152:[function(N,J,M){var D=N("./_core"),m=N("./_global"),S="__core-js_shared__",P=m[S]||(m[S]={});(J.exports=function(c,h){return P[c]||(P[c]=h!==void 0?h:{})})("versions",[]).push({version:D.version,mode:N("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(N,J,M){var D=N("./_an-object"),m=N("./_a-function"),S=N("./_wks")("species");J.exports=function(P,c){var h=D(P).constructor,w;return h===void 0||(w=D(h)[S])==null?c:m(w)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(N,J,M){var D=N("./_to-integer"),m=N("./_defined");J.exports=function(S){return function(P,c){var h=String(m(P)),w=D(c),d=h.length,o,a;return w<0||w>=d?S?"":void 0:(o=h.charCodeAt(w),o<55296||o>56319||w+1===d||(a=h.charCodeAt(w+1))<56320||a>57343?S?h.charAt(w):o:S?h.slice(w,w+2):(o-55296<<10)+(a-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(N,J,M){var D=N("./_ctx"),m=N("./_invoke"),S=N("./_html"),P=N("./_dom-create"),c=N("./_global"),h=c.process,w=c.setImmediate,d=c.clearImmediate,o=c.MessageChannel,a=c.Dispatch,n=0,u={},p="onreadystatechange",f,v,g,b=function(){var s=+this;if(u.hasOwnProperty(s)){var t=u[s];delete u[s],t()}},i=function(s){b.call(s.data)};(!w||!d)&&(w=function(t){for(var T=[],_=1;arguments.length>_;)T.push(arguments[_++]);return u[++n]=function(){m(typeof t=="function"?t:Function(t),T)},f(n),n},d=function(t){delete u[t]},N("./_cof")(h)=="process"?f=function(s){h.nextTick(D(b,s,1))}:a&&a.now?f=function(s){a.now(D(b,s,1))}:o?(v=new o,g=v.port2,v.port1.onmessage=i,f=D(g.postMessage,g,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts?(f=function(s){c.postMessage(s+"","*")},c.addEventListener("message",i,!1)):p in P("script")?f=function(s){S.appendChild(P("script"))[p]=function(){S.removeChild(this),b.call(s)}}:f=function(s){setTimeout(D(b,s,1),0)}),J.exports={set:w,clear:d}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(N,J,M){var D=N("./_to-integer"),m=Math.max,S=Math.min;J.exports=function(P,c){return P=D(P),P<0?m(P+c,0):S(P,c)}},{"./_to-integer":157}],157:[function(N,J,M){var D=Math.ceil,m=Math.floor;J.exports=function(S){return isNaN(S=+S)?0:(S>0?m:D)(S)}},{}],158:[function(N,J,M){var D=N("./_iobject"),m=N("./_defined");J.exports=function(S){return D(m(S))}},{"./_defined":102,"./_iobject":116}],159:[function(N,J,M){var D=N("./_to-integer"),m=Math.min;J.exports=function(S){return S>0?m(D(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(N,J,M){var D=N("./_defined");J.exports=function(m){return Object(D(m))}},{"./_defined":102}],161:[function(N,J,M){var D=N("./_is-object");J.exports=function(m,S){if(!D(m))return m;var P,c;if(S&&typeof(P=m.toString)=="function"&&!D(c=P.call(m)))return c;if(typeof(P=m.valueOf)=="function"&&!D(c=P.call(m)))return c;if(!S&&typeof(P=m.toString)=="function"&&!D(c=P.call(m)))return c;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(N,J,M){var D=0,m=Math.random();J.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++D+m).toString(36))}},{}],163:[function(N,J,M){var D=N("./_global"),m=D.navigator;J.exports=m&&m.userAgent||""},{"./_global":110}],164:[function(N,J,M){var D=N("./_global"),m=N("./_core"),S=N("./_library"),P=N("./_wks-ext"),c=N("./_object-dp").f;J.exports=function(h){var w=m.Symbol||(m.Symbol=S?{}:D.Symbol||{});h.charAt(0)!="_"&&!(h in w)&&c(w,h,{value:P.f(h)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(N,J,M){M.f=N("./_wks")},{"./_wks":166}],166:[function(N,J,M){var D=N("./_shared")("wks"),m=N("./_uid"),S=N("./_global").Symbol,P=typeof S=="function",c=J.exports=function(h){return D[h]||(D[h]=P&&S[h]||(P?S:m)("Symbol."+h))};c.store=D},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(N,J,M){var D=N("./_classof"),m=N("./_wks")("iterator"),S=N("./_iterators");J.exports=N("./_core").getIteratorMethod=function(P){if(P!=null)return P[m]||P["@@iterator"]||S[D(P)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(N,J,M){"use strict";var D=N("./_ctx"),m=N("./_export"),S=N("./_to-object"),P=N("./_iter-call"),c=N("./_is-array-iter"),h=N("./_to-length"),w=N("./_create-property"),d=N("./core.get-iterator-method");m(m.S+m.F*!N("./_iter-detect")(function(o){Array.from(o)}),"Array",{from:function(a){var n=S(a),u=typeof this=="function"?this:Array,p=arguments.length,f=p>1?arguments[1]:void 0,v=f!==void 0,g=0,b=d(n),i,s,t,T;if(v&&(f=D(f,p>2?arguments[2]:void 0,2)),b!=null&&!(u==Array&&c(b)))for(T=b.call(n),s=new u;!(t=T.next()).done;g++)w(s,g,v?P(T,f,[t.value,g],!0):t.value);else for(i=h(n.length),s=new u(i);i>g;g++)w(s,g,v?f(n[g],g):n[g]);return s.length=g,s}})},{"./_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(N,J,M){"use strict";var D=N("./_add-to-unscopables"),m=N("./_iter-step"),S=N("./_iterators"),P=N("./_to-iobject");J.exports=N("./_iter-define")(Array,"Array",function(c,h){this._t=P(c),this._i=0,this._k=h},function(){var c=this._t,h=this._k,w=this._i++;return!c||w>=c.length?(this._t=void 0,m(1)):h=="keys"?m(0,w):h=="values"?m(0,c[w]):m(0,[w,c[w]])},"values"),S.Arguments=S.Array,D("keys"),D("values"),D("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(N,J,M){"use strict";var D=N("./_is-object"),m=N("./_object-gpo"),S=N("./_wks")("hasInstance"),P=Function.prototype;S in P||N("./_object-dp").f(P,S,{value:function(c){if(typeof this!="function"||!D(c))return!1;if(!D(this.prototype))return c instanceof this;for(;c=m(c);)if(this.prototype===c)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(N,J,M){var D=N("./_export");D(D.S+D.F,"Object",{assign:N("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(N,J,M){var D=N("./_export");D(D.S,"Object",{create:N("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(N,J,M){var D=N("./_export");D(D.S+D.F*!N("./_descriptors"),"Object",{defineProperty:N("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(N,J,M){N("./_object-sap")("getOwnPropertyNames",function(){return N("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(N,J,M){var D=N("./_to-object"),m=N("./_object-gpo");N("./_object-sap")("getPrototypeOf",function(){return function(P){return m(D(P))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(N,J,M){var D=N("./_to-object"),m=N("./_object-keys");N("./_object-sap")("keys",function(){return function(P){return m(D(P))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(N,J,M){arguments[4][71][0].apply(M,arguments)},{dup:71}],178:[function(N,J,M){"use strict";var D=N("./_library"),m=N("./_global"),S=N("./_ctx"),P=N("./_classof"),c=N("./_export"),h=N("./_is-object"),w=N("./_a-function"),d=N("./_an-instance"),o=N("./_for-of"),a=N("./_species-constructor"),n=N("./_task").set,u=N("./_microtask")(),p=N("./_new-promise-capability"),f=N("./_perform"),v=N("./_user-agent"),g=N("./_promise-resolve"),b="Promise",i=m.TypeError,s=m.process,t=s&&s.versions,T=t&&t.v8||"",_=m[b],l=P(s)=="process",k=function(){},O,x,y,E,C=x=p.f,I=!!function(){try{var z=_.resolve(1),V=(z.constructor={})[N("./_wks")("species")]=function(ie){ie(k,k)};return(l||typeof PromiseRejectionEvent=="function")&&z.then(k)instanceof V&&T.indexOf("6.6")!==0&&v.indexOf("Chrome/66")===-1}catch(ie){}}(),j=function(z){var V;return h(z)&&typeof(V=z.then)=="function"?V:!1},L=function(z,V){if(z._n)return;z._n=!0;var ie=z._c;u(function(){for(var ce=z._v,he=z._s==1,Ae=0,De=function(pe){var Te=he?pe.ok:pe.fail,ye=pe.resolve,ue=pe.reject,le=pe.domain,te,fe,q;try{Te?(he||(z._h==2&&U(z),z._h=1),Te===!0?te=ce:(le&&le.enter(),te=Te(ce),le&&(le.exit(),q=!0)),te===pe.promise?ue(i("Promise-chain cycle")):(fe=j(te))?fe.call(te,ye,ue):ye(te)):ue(ce)}catch(ee){le&&!q&&le.exit(),ue(ee)}};ie.length>Ae;)De(ie[Ae++]);z._c=[],z._n=!1,V&&!z._h&&H(z)})},H=function(z){n.call(m,function(){var V=z._v,ie=W(z),ce,he,Ae;if(ie&&(ce=f(function(){l?s.emit("unhandledRejection",V,z):(he=m.onunhandledrejection)?he({promise:z,reason:V}):(Ae=m.console)&&Ae.error&&Ae.error("Unhandled promise rejection",V)}),z._h=l||W(z)?2:1),z._a=void 0,ie&&ce.e)throw ce.v})},W=function(z){return z._h!==1&&(z._a||z._c).length===0},U=function(z){n.call(m,function(){var V;l?s.emit("rejectionHandled",z):(V=m.onrejectionhandled)&&V({promise:z,reason:z._v})})},G=function(z){var V=this;if(V._d)return;V._d=!0,V=V._w||V,V._v=z,V._s=2,V._a||(V._a=V._c.slice()),L(V,!0)},B=function(z){var V=this,ie;if(V._d)return;V._d=!0,V=V._w||V;try{if(V===z)throw i("Promise can't be resolved itself");(ie=j(z))?u(function(){var ce={_w:V,_d:!1};try{ie.call(z,S(B,ce,1),S(G,ce,1))}catch(he){G.call(ce,he)}}):(V._v=z,V._s=1,L(V,!1))}catch(ce){G.call({_w:V,_d:!1},ce)}};I||(_=function(V){d(this,_,b,"_h"),w(V),O.call(this);try{V(S(B,this,1),S(G,this,1))}catch(ie){G.call(this,ie)}},O=function(V){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=N("./_redefine-all")(_.prototype,{then:function(V,ie){var ce=C(a(this,_));return ce.ok=typeof V=="function"?V:!0,ce.fail=typeof ie=="function"&&ie,ce.domain=l?s.domain:void 0,this._c.push(ce),this._a&&this._a.push(ce),this._s&&L(this,!1),ce.promise},catch:function(z){return this.then(void 0,z)}}),y=function(){var z=new O;this.promise=z,this.resolve=S(B,z,1),this.reject=S(G,z,1)},p.f=C=function(z){return z===_||z===E?new y(z):x(z)}),c(c.G+c.W+c.F*!I,{Promise:_}),N("./_set-to-string-tag")(_,b),N("./_set-species")(b),E=N("./_core")[b],c(c.S+c.F*!I,b,{reject:function(V){var ie=C(this),ce=ie.reject;return ce(V),ie.promise}}),c(c.S+c.F*(D||!I),b,{resolve:function(V){return g(D&&this===E?_:this,V)}}),c(c.S+c.F*!(I&&N("./_iter-detect")(function(z){_.all(z).catch(k)})),b,{all:function(V){var ie=this,ce=C(ie),he=ce.resolve,Ae=ce.reject,De=f(function(){var pe=[],Te=0,ye=1;o(V,!1,function(ue){var le=Te++,te=!1;pe.push(void 0),ye++,ie.resolve(ue).then(function(fe){if(te)return;te=!0,pe[le]=fe,--ye||he(pe)},Ae)}),--ye||he(pe)});return De.e&&Ae(De.v),ce.promise},race:function(V){var ie=this,ce=C(ie),he=ce.reject,Ae=f(function(){o(V,!1,function(De){ie.resolve(De).then(ce.resolve,he)})});return Ae.e&&he(Ae.v),ce.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(N,J,M){var D=N("./_export"),m=N("./_to-absolute-index"),S=String.fromCharCode,P=String.fromCodePoint;D(D.S+D.F*(!!P&&P.length!=1),"String",{fromCodePoint:function(h){for(var w=[],d=arguments.length,o=0,a;d>o;){if(a=+arguments[o++],m(a,1114111)!==a)throw RangeError(a+" is not a valid code point");w.push(a<65536?S(a):S(((a-=65536)>>10)+55296,a%1024+56320))}return w.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(N,J,M){"use strict";var D=N("./_string-at")(!0);N("./_iter-define")(String,"String",function(m){this._t=String(m),this._i=0},function(){var m=this._t,S=this._i,P;return S>=m.length?{value:void 0,done:!0}:(P=D(m,S),this._i+=P.length,{value:P,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(N,J,M){"use strict";var D=N("./_global"),m=N("./_has"),S=N("./_descriptors"),P=N("./_export"),c=N("./_redefine"),h=N("./_meta").KEY,w=N("./_fails"),d=N("./_shared"),o=N("./_set-to-string-tag"),a=N("./_uid"),n=N("./_wks"),u=N("./_wks-ext"),p=N("./_wks-define"),f=N("./_enum-keys"),v=N("./_is-array"),g=N("./_an-object"),b=N("./_is-object"),i=N("./_to-object"),s=N("./_to-iobject"),t=N("./_to-primitive"),T=N("./_property-desc"),_=N("./_object-create"),l=N("./_object-gopn-ext"),k=N("./_object-gopd"),O=N("./_object-gops"),x=N("./_object-dp"),y=N("./_object-keys"),E=k.f,C=x.f,I=l.f,j=D.Symbol,L=D.JSON,H=L&&L.stringify,W="prototype",U=n("_hidden"),G=n("toPrimitive"),B={}.propertyIsEnumerable,z=d("symbol-registry"),V=d("symbols"),ie=d("op-symbols"),ce=Object[W],he=typeof j=="function"&&!!O.f,Ae=D.QObject,De=!Ae||!Ae[W]||!Ae[W].findChild,pe=S&&w(function(){return _(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a!=7})?function(ve,Oe,Qe){var rt=E(ce,Oe);rt&&delete ce[Oe],C(ve,Oe,Qe),rt&&ve!==ce&&C(ce,Oe,rt)}:C,Te=function(ve){var Oe=V[ve]=_(j[W]);return Oe._k=ve,Oe},ye=he&&typeof j.iterator=="symbol"?function(ve){return typeof ve=="symbol"}:function(ve){return ve instanceof j},ue=function(Oe,Qe,rt){return Oe===ce&&ue(ie,Qe,rt),g(Oe),Qe=t(Qe,!0),g(rt),m(V,Qe)?(rt.enumerable?(m(Oe,U)&&Oe[U][Qe]&&(Oe[U][Qe]=!1),rt=_(rt,{enumerable:T(0,!1)})):(m(Oe,U)||C(Oe,U,T(1,{})),Oe[U][Qe]=!0),pe(Oe,Qe,rt)):C(Oe,Qe,rt)},le=function(Oe,Qe){g(Oe);for(var rt=f(Qe=s(Qe)),nt=0,ct=rt.length,dt;ct>nt;)ue(Oe,dt=rt[nt++],Qe[dt]);return Oe},te=function(Oe,Qe){return Qe===void 0?_(Oe):le(_(Oe),Qe)},fe=function(Oe){var Qe=B.call(this,Oe=t(Oe,!0));return this===ce&&m(V,Oe)&&!m(ie,Oe)?!1:Qe||!m(this,Oe)||!m(V,Oe)||m(this,U)&&this[U][Oe]?Qe:!0},q=function(Oe,Qe){if(Oe=s(Oe),Qe=t(Qe,!0),Oe===ce&&m(V,Qe)&&!m(ie,Qe))return;var rt=E(Oe,Qe);return rt&&m(V,Qe)&&!(m(Oe,U)&&Oe[U][Qe])&&(rt.enumerable=!0),rt},ee=function(Oe){for(var Qe=I(s(Oe)),rt=[],nt=0,ct;Qe.length>nt;)!m(V,ct=Qe[nt++])&&ct!=U&&ct!=h&&rt.push(ct);return rt},Ce=function(Oe){for(var Qe=Oe===ce,rt=I(Qe?ie:s(Oe)),nt=[],ct=0,dt;rt.length>ct;)m(V,dt=rt[ct++])&&(Qe?m(ce,dt):!0)&&nt.push(V[dt]);return nt};he||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var Oe=a(arguments.length>0?arguments[0]:void 0),Qe=function(rt){this===ce&&Qe.call(ie,rt),m(this,U)&&m(this[U],Oe)&&(this[U][Oe]=!1),pe(this,Oe,T(1,rt))};return S&&De&&pe(ce,Oe,{configurable:!0,set:Qe}),Te(Oe)},c(j[W],"toString",function(){return this._k}),k.f=q,x.f=ue,N("./_object-gopn").f=l.f=ee,N("./_object-pie").f=fe,O.f=Ce,S&&!N("./_library")&&c(ce,"propertyIsEnumerable",fe,!0),u.f=function(ve){return Te(n(ve))}),P(P.G+P.W+P.F*!he,{Symbol:j});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;re.length>Q;)n(re[Q++]);for(var X=y(n.store),Z=0;X.length>Z;)p(X[Z++]);P(P.S+P.F*!he,"Symbol",{for:function(ve){return m(z,ve+="")?z[ve]:z[ve]=j(ve)},keyFor:function(Oe){if(!ye(Oe))throw TypeError(Oe+" is not a symbol!");for(var Qe in z)if(z[Qe]===Oe)return Qe},useSetter:function(){De=!0},useSimple:function(){De=!1}}),P(P.S+P.F*!he,"Object",{create:te,defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:q,getOwnPropertyNames:ee,getOwnPropertySymbols:Ce});var xe=w(function(){O.f(1)});P(P.S+P.F*xe,"Object",{getOwnPropertySymbols:function(Oe){return O.f(i(Oe))}}),L&&P(P.S+P.F*(!he||w(function(){var ve=j();return H([ve])!="[null]"||H({a:ve})!="{}"||H(Object(ve))!="{}"})),"JSON",{stringify:function(Oe){for(var Qe=[Oe],rt=1,nt,ct;arguments.length>rt;)Qe.push(arguments[rt++]);return ct=nt=Qe[1],!b(nt)&&Oe===void 0||ye(Oe)?void 0:(v(nt)||(nt=function(dt,pt){if(typeof ct=="function"&&(pt=ct.call(this,dt,pt)),!ye(pt))return pt}),Qe[1]=nt,H.apply(L,Qe))}}),j[W][G]||N("./_hide")(j[W],G,j[W].valueOf),o(j,"Symbol"),o(Math,"Math",!0),o(D.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(N,J,M){var D=N("./_export"),m=N("./_object-to-array")(!0);D(D.S,"Object",{entries:function(P){return m(P)}})},{"./_export":107,"./_object-to-array":143}],183:[function(N,J,M){"use strict";var D=N("./_export"),m=N("./_core"),S=N("./_global"),P=N("./_species-constructor"),c=N("./_promise-resolve");D(D.P+D.R,"Promise",{finally:function(h){var w=P(this,m.Promise||S.Promise),d=typeof h=="function";return this.then(d?function(o){return c(w,h()).then(function(){return o})}:h,d?function(o){return c(w,h()).then(function(){throw o})}:h)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(N,J,M){"use strict";var D=N("./_export"),m=N("./_new-promise-capability"),S=N("./_perform");D(D.S,"Promise",{try:function(P){var c=m.f(this),h=S(P);return(h.e?c.reject:c.resolve)(h.v),c.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(N,J,M){N("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(N,J,M){N("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(N,J,M){N("./es6.array.iterator");for(var D=N("./_global"),m=N("./_hide"),S=N("./_iterators"),P=N("./_wks")("toStringTag"),c="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(","),h=0;h<c.length;h++){var w=c[h],d=D[w],o=d&&d.prototype;o&&!o[P]&&m(o,P,w),S[w]=S.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(N,J,M){var D=N("./_export"),m=N("./_task");D(D.G+D.B,{setImmediate:m.set,clearImmediate:m.clear})},{"./_export":107,"./_task":155}],189:[function(N,J,M){(function(D){"use strict";var m=N("babel-runtime/helpers/typeof"),S=P(m);function P(t){return t&&t.__esModule?t:{default:t}}function c(t){return Array.isArray?Array.isArray(t):s(t)==="[object Array]"}M.isArray=c;function h(t){return typeof t=="boolean"}M.isBoolean=h;function w(t){return t===null}M.isNull=w;function d(t){return t==null}M.isNullOrUndefined=d;function o(t){return typeof t=="number"}M.isNumber=o;function a(t){return typeof t=="string"}M.isString=a;function n(t){return(typeof t=="undefined"?"undefined":(0,S.default)(t))==="symbol"}M.isSymbol=n;function u(t){return t===void 0}M.isUndefined=u;function p(t){return s(t)==="[object RegExp]"}M.isRegExp=p;function f(t){return(typeof t=="undefined"?"undefined":(0,S.default)(t))==="object"&&t!==null}M.isObject=f;function v(t){return s(t)==="[object Date]"}M.isDate=v;function g(t){return s(t)==="[object Error]"||t instanceof Error}M.isError=g;function b(t){return typeof t=="function"}M.isFunction=b;function i(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,S.default)(t))==="symbol"||typeof t=="undefined"}M.isPrimitive=i,M.isBuffer=D.isBuffer;function s(t){return Object.prototype.toString.call(t)}}).call(this,{isBuffer:N("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(N,J,M){"use strict";var D=N("babel-runtime/helpers/typeof"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(P){"use strict";var c=function(){var a=/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,u=/[^-+\dA-Z]/g;return function(p,f,v,g){if(arguments.length===1&&o(p)==="string"&&!/\d/.test(p)&&(f=p,p=void 0),p=p||new Date,p instanceof Date||(p=new Date(p)),isNaN(p))throw TypeError("Invalid date");f=String(c.masks[f]||f||c.masks.default);var b=f.slice(0,4);(b==="UTC:"||b==="GMT:")&&(f=f.slice(4),v=!0,b==="GMT:"&&(g=!0));var i=v?"getUTC":"get",s=p[i+"Date"](),t=p[i+"Day"](),T=p[i+"Month"](),_=p[i+"FullYear"](),l=p[i+"Hours"](),k=p[i+"Minutes"](),O=p[i+"Seconds"](),x=p[i+"Milliseconds"](),y=v?0:p.getTimezoneOffset(),E=w(p),C=d(p),I={d:s,dd:h(s),ddd:c.i18n.dayNames[t],dddd:c.i18n.dayNames[t+7],m:T+1,mm:h(T+1),mmm:c.i18n.monthNames[T],mmmm:c.i18n.monthNames[T+12],yy:String(_).slice(2),yyyy:_,h:l%12||12,hh:h(l%12||12),H:l,HH:h(l),M:k,MM:h(k),s:O,ss:h(O),l:h(x,3),L:h(Math.round(x/10)),t:l<12?"a":"p",tt:l<12?"am":"pm",T:l<12?"A":"P",TT:l<12?"AM":"PM",Z:g?"GMT":v?"UTC":(String(p).match(n)||[""]).pop().replace(u,""),o:(y>0?"-":"+")+h(Math.floor(Math.abs(y)/60)*100+Math.abs(y)%60,4),S:["th","st","nd","rd"][s%10>3?0:(s%100-s%10!=10)*s%10],W:E,N:C};return f.replace(a,function(j){return j in I?I[j]:j.slice(1,j.length-1)})}}();c.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"},c.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 h(a,n){for(a=String(a),n=n||2;a.length<n;)a="0"+a;return a}function w(a){var n=new Date(a.getFullYear(),a.getMonth(),a.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var u=new Date(n.getFullYear(),0,4);u.setDate(u.getDate()-(u.getDay()+6)%7+3);var p=n.getTimezoneOffset()-u.getTimezoneOffset();n.setHours(n.getHours()-p);var f=(n-u)/(864e5*7);return 1+Math.floor(f)}function d(a){var n=a.getDay();return n===0&&(n=7),n}function o(a){return a===null?"null":a===void 0?"undefined":(typeof a=="undefined"?"undefined":(0,m.default)(a))!=="object"?typeof a=="undefined"?"undefined":(0,m.default)(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return c}):(typeof M=="undefined"?"undefined":(0,m.default)(M))==="object"?J.exports=c:P.dateFormat=c})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(N,J,M){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var D=/["'&<>]/;J.exports=m;function m(S){var P=""+S,c=D.exec(P);if(!c)return P;var h,w="",d=0,o=0;for(d=c.index;d<P.length;d++){switch(P.charCodeAt(d)){case 34:h="&quot;";break;case 38:h="&amp;";break;case 39:h="&#39;";break;case 60:h="&lt;";break;case 62:h="&gt;";break;default:continue}o!==d&&(w+=P.substring(o,d)),o=d+1,w+=h}return o!==d?w+P.substring(o,d):w}},{}],192:[function(N,J,M){function D(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}J.exports=D,D.EventEmitter=D,D.prototype._events=void 0,D.prototype._maxListeners=void 0,D.defaultMaxListeners=10,D.prototype.setMaxListeners=function(h){if(!S(h)||h<0||isNaN(h))throw TypeError("n must be a positive number");return this._maxListeners=h,this},D.prototype.emit=function(h){var w,d,o,a,n,u;if(this._events||(this._events={}),h==="error"&&(!this._events.error||P(this._events.error)&&!this._events.error.length)){if(w=arguments[1],w instanceof Error)throw w;var p=new Error('Uncaught, unspecified "error" event. ('+w+")");throw p.context=w,p}if(d=this._events[h],c(d))return!1;if(m(d))switch(arguments.length){case 1:d.call(this);break;case 2:d.call(this,arguments[1]);break;case 3:d.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),d.apply(this,a)}else if(P(d))for(a=Array.prototype.slice.call(arguments,1),u=d.slice(),o=u.length,n=0;n<o;n++)u[n].apply(this,a);return!0},D.prototype.addListener=function(h,w){var d;if(!m(w))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",h,m(w.listener)?w.listener:w),this._events[h]?P(this._events[h])?this._events[h].push(w):this._events[h]=[this._events[h],w]:this._events[h]=w,P(this._events[h])&&!this._events[h].warned&&(c(this._maxListeners)?d=D.defaultMaxListeners:d=this._maxListeners,d&&d>0&&this._events[h].length>d&&(this._events[h].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[h].length),typeof console.trace=="function"&&console.trace())),this},D.prototype.on=D.prototype.addListener,D.prototype.once=function(h,w){if(!m(w))throw TypeError("listener must be a function");var d=!1;function o(){this.removeListener(h,o),d||(d=!0,w.apply(this,arguments))}return o.listener=w,this.on(h,o),this},D.prototype.removeListener=function(h,w){var d,o,a,n;if(!m(w))throw TypeError("listener must be a function");if(!this._events||!this._events[h])return this;if(d=this._events[h],a=d.length,o=-1,d===w||m(d.listener)&&d.listener===w)delete this._events[h],this._events.removeListener&&this.emit("removeListener",h,w);else if(P(d)){for(n=a;n-- >0;)if(d[n]===w||d[n].listener&&d[n].listener===w){o=n;break}if(o<0)return this;d.length===1?(d.length=0,delete this._events[h]):d.splice(o,1),this._events.removeListener&&this.emit("removeListener",h,w)}return this},D.prototype.removeAllListeners=function(h){var w,d;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[h]&&delete this._events[h],this;if(arguments.length===0){for(w in this._events){if(w==="removeListener")continue;this.removeAllListeners(w)}return this.removeAllListeners("removeListener"),this._events={},this}if(d=this._events[h],m(d))this.removeListener(h,d);else if(d)for(;d.length;)this.removeListener(h,d[d.length-1]);return delete this._events[h],this},D.prototype.listeners=function(h){var w;return!this._events||!this._events[h]?w=[]:m(this._events[h])?w=[this._events[h]]:w=this._events[h].slice(),w},D.prototype.listenerCount=function(h){if(this._events){var w=this._events[h];if(m(w))return 1;if(w)return w.length}return 0},D.listenerCount=function(h,w){return h.listenerCount(w)};function m(h){return typeof h=="function"}function S(h){return typeof h=="number"}function P(h){return typeof h=="object"&&h!==null}function c(h){return h===void 0}},{}],193:[function(N,J,M){var D=N("http"),m=J.exports;for(var S in D)D.hasOwnProperty(S)&&(m[S]=D[S]);m.request=function(P,c){return P||(P={}),P.scheme="https",P.protocol="https:",D.request.call(this,P,c)}},{http:231}],194:[function(N,J,M){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var D=N("util"),m=N("ms");J.exports=function(S){if(typeof S=="number")return S;var P=m(S);if(P===void 0){var c=new Error(D.format("humanize-ms(%j) result undefined",S));console.warn(c.stack)}return P}},{ms:204,util:243}],195:[function(N,J,M){M.read=function(D,m,S,P,c){var h,w,d=c*8-P-1,o=(1<<d)-1,a=o>>1,n=-7,u=S?c-1:0,p=S?-1:1,f=D[m+u];for(u+=p,h=f&(1<<-n)-1,f>>=-n,n+=d;n>0;h=h*256+D[m+u],u+=p,n-=8);for(w=h&(1<<-n)-1,h>>=-n,n+=P;n>0;w=w*256+D[m+u],u+=p,n-=8);if(h===0)h=1-a;else{if(h===o)return w?NaN:(f?-1:1)*Infinity;w=w+Math.pow(2,P),h=h-a}return(f?-1:1)*w*Math.pow(2,h-P)},M.write=function(D,m,S,P,c,h){var w,d,o,a=h*8-c-1,n=(1<<a)-1,u=n>>1,p=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=P?0:h-1,v=P?1:-1,g=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===Infinity?(d=isNaN(m)?1:0,w=n):(w=Math.floor(Math.log(m)/Math.LN2),m*(o=Math.pow(2,-w))<1&&(w--,o*=2),w+u>=1?m+=p/o:m+=p*Math.pow(2,1-u),m*o>=2&&(w++,o/=2),w+u>=n?(d=0,w=n):w+u>=1?(d=(m*o-1)*Math.pow(2,c),w=w+u):(d=m*Math.pow(2,u-1)*Math.pow(2,c),w=0));c>=8;D[S+f]=d&255,f+=v,d/=256,c-=8);for(w=w<<c|d,a+=c;a>0;D[S+f]=w&255,f+=v,w/=256,a-=8);D[S+f-v]|=g*128}},{}],196:[function(N,J,M){typeof Object.create=="function"?J.exports=function(m,S){S&&(m.super_=S,m.prototype=Object.create(S.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}))}:J.exports=function(m,S){if(S){m.super_=S;var P=function(){};P.prototype=S.prototype,m.prototype=new P,m.prototype.constructor=m}}},{}],197:[function(N,J,M){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/J.exports=function(S){return S!=null&&(D(S)||m(S)||!!S._isBuffer)};function D(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function m(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&D(S.slice(0,0))}},{}],198:[function(N,J,M){var D={}.toString;J.exports=Array.isArray||function(m){return D.call(m)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(N,J){typeof exports=="object"&&typeof module!="undefined"?module.exports=J(N):typeof define=="function"&&define.amd?define(J):J(N)})(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(N){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(N){for(var J={},M=0,D=N.length;M<D;M++)J[N.charAt(M)]=M;return J}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(N){if(N.length<2){var J=N.charCodeAt(0);return J<128?N:J<2048?fromCharCode(192|J>>>6)+fromCharCode(128|J&63):fromCharCode(224|J>>>12&15)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}else{var J=65536+(N.charCodeAt(0)-55296)*1024+(N.charCodeAt(1)-56320);return fromCharCode(240|J>>>18&7)+fromCharCode(128|J>>>12&63)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(N){return N.replace(re_utob,cb_utob)},cb_encode=function(N){var J=[0,2,1][N.length%3],M=N.charCodeAt(0)<<16|(N.length>1?N.charCodeAt(1):0)<<8|(N.length>2?N.charCodeAt(2):0),D=[b64chars.charAt(M>>>18),b64chars.charAt(M>>>12&63),J>=2?"=":b64chars.charAt(M>>>6&63),J>=1?"=":b64chars.charAt(M&63)];return D.join("")},btoa=global.btoa?function(N){return global.btoa(N)}:function(N){return N.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(N){var J=Object.prototype.toString.call(N)==="[object Uint8Array]";return J?N.toString("base64"):btoa(utob(String(N)))},encode=function(N,J){return J?_encode(String(N)).replace(/[+\/]/g,function(M){return M=="+"?"-":"_"}).replace(/=/g,""):_encode(N)},encodeURI=function(N){return encode(N,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(N){switch(N.length){case 4:var J=(7&N.charCodeAt(0))<<18|(63&N.charCodeAt(1))<<12|(63&N.charCodeAt(2))<<6|63&N.charCodeAt(3),M=J-65536;return fromCharCode((M>>>10)+55296)+fromCharCode((M&1023)+56320);case 3:return fromCharCode((15&N.charCodeAt(0))<<12|(63&N.charCodeAt(1))<<6|63&N.charCodeAt(2));default:return fromCharCode((31&N.charCodeAt(0))<<6|63&N.charCodeAt(1))}},btou=function(N){return N.replace(re_btou,cb_btou)},cb_decode=function(N){var J=N.length,M=J%4,D=(J>0?b64tab[N.charAt(0)]<<18:0)|(J>1?b64tab[N.charAt(1)]<<12:0)|(J>2?b64tab[N.charAt(2)]<<6:0)|(J>3?b64tab[N.charAt(3)]:0),m=[fromCharCode(D>>>16),fromCharCode(D>>>8&255),fromCharCode(D&255)];return m.length-=[0,0,2,1][M],m.join("")},_atob=global.atob?function(N){return global.atob(N)}:function(N){return N.replace(/\S{1,4}/g,cb_decode)},atob=function(N){return _atob(String(N).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(N){return(N.constructor===buffer.constructor?N:buffer.from(N,"base64")).toString()}:function(N){return(N.constructor===buffer.constructor?N:new buffer(N,"base64")).toString()}:function(N){return btou(_atob(N))},decode=function(N){return _decode(String(N).replace(/[-_]/g,function(J){return J=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var N=global.Base64;return global.Base64=_Base64,N};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(N){return{value:N,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(N){return encode(this,N)})),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(N,J,M){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";J.exports=m;var D=Object.prototype.hasOwnProperty;function m(S,P,c){if(!S)throw new TypeError("argument dest is required");if(!P)throw new TypeError("argument src is required");return c===void 0&&(c=!0),Object.getOwnPropertyNames(P).forEach(function(w){if(!c&&D.call(S,w))return;var d=Object.getOwnPropertyDescriptor(P,w);Object.defineProperty(S,w,d)}),S}},{}],201:[function(N,J,M){"use strict";function D(){this._types=Object.create(null),this._extensions=Object.create(null);for(var m=0;m<arguments.length;m++)this.define(arguments[m]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}D.prototype.define=function(m,S){for(var P in m){var c=m[P].map(function(d){return d.toLowerCase()});P=P.toLowerCase();for(var h=0;h<c.length;h++){var w=c[h];if(w[0]=="*")continue;if(!S&&w in this._types)throw new Error('Attempt to change mapping for "'+w+'" extension from "'+this._types[w]+'" to "'+P+'". Pass `force=true` to allow this, otherwise remove "'+w+'" from the list of extensions for "'+P+'".');this._types[w]=P}if(S||!this._extensions[P]){var w=c[0];this._extensions[P]=w[0]!="*"?w:w.substr(1)}}},D.prototype.getType=function(m){m=String(m);var S=m.replace(/^.*[/\\]/,"").toLowerCase(),P=S.replace(/^.*\./,"").toLowerCase(),c=S.length<m.length,h=P.length<S.length-1;return(h||!c)&&this._types[P]||null},D.prototype.getExtension=function(m){return m=/^\s*([^;\s]*)/.test(m)&&RegExp.$1,m&&this._extensions[m.toLowerCase()]||null},J.exports=D},{}],202:[function(N,J,M){"use strict";var D=N("./Mime");J.exports=new D(N("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(N,J,M){J.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(N,J,M){var D=1e3,m=D*60,S=m*60,P=S*24,c=P*7,h=P*365.25;J.exports=function(n,u){u=u||{};var p=typeof n;if(p==="string"&&n.length>0)return w(n);if(p==="number"&&isFinite(n))return u.long?o(n):d(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function w(n){if(n=String(n),n.length>100)return;var u=/^(-?(?:\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(!u)return;var p=parseFloat(u[1]),f=(u[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*h;case"weeks":case"week":case"w":return p*c;case"days":case"day":case"d":return p*P;case"hours":case"hour":case"hrs":case"hr":case"h":return p*S;case"minutes":case"minute":case"mins":case"min":case"m":return p*m;case"seconds":case"second":case"secs":case"sec":case"s":return p*D;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function d(n){var u=Math.abs(n);return u>=P?Math.round(n/P)+"d":u>=S?Math.round(n/S)+"h":u>=m?Math.round(n/m)+"m":u>=D?Math.round(n/D)+"s":n+"ms"}function o(n){var u=Math.abs(n);return u>=P?a(n,u,P,"day"):u>=S?a(n,u,S,"hour"):u>=m?a(n,u,m,"minute"):u>=D?a(n,u,D,"second"):n+" ms"}function a(n,u,p,f){var v=u>=p*1.5;return Math.round(n/p)+" "+f+(v?"s":"")}},{}],205:[function(N,J,M){(function(D){function m(h,w){for(var d=0,o=h.length-1;o>=0;o--){var a=h[o];a==="."?h.splice(o,1):a===".."?(h.splice(o,1),d++):d&&(h.splice(o,1),d--)}if(w)for(;d--;d)h.unshift("..");return h}M.resolve=function(){for(var h="",w=!1,d=arguments.length-1;d>=-1&&!w;d--){var o=d>=0?arguments[d]:D.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;h=o+"/"+h,w=o.charAt(0)==="/"}return h=m(P(h.split("/"),function(a){return!!a}),!w).join("/"),(w?"/":"")+h||"."},M.normalize=function(h){var w=M.isAbsolute(h),d=c(h,-1)==="/";return h=m(P(h.split("/"),function(o){return!!o}),!w).join("/"),!h&&!w&&(h="."),h&&d&&(h+="/"),(w?"/":"")+h},M.isAbsolute=function(h){return h.charAt(0)==="/"},M.join=function(){var h=Array.prototype.slice.call(arguments,0);return M.normalize(P(h,function(w,d){if(typeof w!="string")throw new TypeError("Arguments to path.join must be strings");return w}).join("/"))},M.relative=function(h,w){h=M.resolve(h).substr(1),w=M.resolve(w).substr(1);function d(v){for(var g=0;g<v.length&&!(v[g]!=="");g++);for(var b=v.length-1;b>=0&&!(v[b]!=="");b--);return g>b?[]:v.slice(g,b-g+1)}for(var o=d(h.split("/")),a=d(w.split("/")),n=Math.min(o.length,a.length),u=n,p=0;p<n;p++)if(o[p]!==a[p]){u=p;break}for(var f=[],p=u;p<o.length;p++)f.push("..");return f=f.concat(a.slice(u)),f.join("/")},M.sep="/",M.delimiter=":",M.dirname=function(h){if(typeof h!="string"&&(h=h+""),h.length===0)return".";for(var w=h.charCodeAt(0),d=w===47,o=-1,a=!0,n=h.length-1;n>=1;--n)if(w=h.charCodeAt(n),w===47){if(!a){o=n;break}}else a=!1;return o===-1?d?"/":".":d&&o===1?"/":h.slice(0,o)};function S(h){typeof h!="string"&&(h=h+"");var w=0,d=-1,o=!0,a;for(a=h.length-1;a>=0;--a)if(h.charCodeAt(a)===47){if(!o){w=a+1;break}}else d===-1&&(o=!1,d=a+1);return d===-1?"":h.slice(w,d)}M.basename=function(h,w){var d=S(h);return w&&d.substr(-1*w.length)===w&&(d=d.substr(0,d.length-w.length)),d},M.extname=function(h){typeof h!="string"&&(h=h+"");for(var w=-1,d=0,o=-1,a=!0,n=0,u=h.length-1;u>=0;--u){var p=h.charCodeAt(u);if(p===47){if(!a){d=u+1;break}continue}o===-1&&(a=!1,o=u+1),p===46?w===-1?w=u:n!==1&&(n=1):w!==-1&&(n=-1)}return w===-1||o===-1||n===0||n===1&&w===o-1&&w===d+1?"":h.slice(w,o)};function P(h,w){if(h.filter)return h.filter(w);for(var d=[],o=0;o<h.length;o++)w(h[o],o,h)&&d.push(h[o]);return d}var c="ab".substr(-1)==="b"?function(h,w,d){return h.substr(w,d)}:function(h,w,d){return w<0&&(w=h.length+w),h.substr(w,d)}}).call(this,N("_process"))},{_process:208}],206:[function(N,J,M){(function(D){/*!
* 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 m={function:!0,object:!0},S=m[typeof window]&&window||this,P=S,c=m[typeof M]&&M,h=m[typeof J]&&J&&!J.nodeType&&J,w=c&&h&&typeof D=="object"&&D;w&&(w.global===w||w.window===w||w.self===w)&&(S=w);var d=Math.pow(2,53)-1,o=/\bOpera/,a=this,n=Object.prototype,u=n.hasOwnProperty,p=n.toString;function f(x){return x=String(x),x.charAt(0).toUpperCase()+x.slice(1)}function v(x,y,E){var C={"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 y&&E&&/^Win/i.test(x)&&!/^Windows Phone /i.test(x)&&(C=C[/[\d.]+$/.exec(x)])&&(x="Windows "+C),x=String(x),y&&E&&(x=x.replace(RegExp(y,"i"),E)),x=b(x.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]),x}function g(x,y){var E=-1,C=x?x.length:0;if(typeof C=="number"&&C>-1&&C<=d)for(;++E<C;)y(x[E],E,x);else i(x,y)}function b(x){return x=l(x),/^(?:webOS|i(?:OS|P))/.test(x)?x:f(x)}function i(x,y){for(var E in x)u.call(x,E)&&y(x[E],E,x)}function s(x){return x==null?f(x):p.call(x).slice(8,-1)}function t(x,y){var E=x!=null?typeof x[y]:"number";return!/^(?:boolean|number|string|undefined)$/.test(E)&&(E=="object"?!!x[y]:!0)}function T(x){return String(x).replace(/([ -])(?!$)/g,"$1?")}function _(x,y){var E=null;return g(x,function(C,I){E=y(E,C,I,x)}),E}function l(x){return String(x).replace(/^ +| +$/g,"")}function k(x){var y=S,E=x&&typeof x=="object"&&s(x)!="String";E&&(y=x,x=null);var C=y.navigator||{},I=C.userAgent||"";x||(x=I);var j=E||a==P,L=E?!!C.likeChrome:/\bChrome\b/.test(x)&&!/internal|\n/i.test(p.toString()),H="Object",W=E?H:"ScriptBridgingProxyObject",U=E?H:"Environment",G=E&&y.java?"JavaPackage":s(y.java),B=E?H:"RuntimeObject",z=/\bJava/.test(G)&&y.java,V=z&&s(y.environment)==U,ie=z?"a":"\u03B1",ce=z?"b":"\u03B2",he=y.document||{},Ae=y.operamini||y.opera,De=o.test(De=E&&Ae?Ae["[[Class]]"]:s(Ae))?De:Ae=null,pe,Te=x,ye=[],ue=null,le=x==I,te=le&&Ae&&typeof Ae.version=="function"&&Ae.version(),fe,q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ee=xe(["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"]),Ce=Oe([{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"]),re=Z({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Q=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(ct){return _(ct,function(dt,pt){return dt||RegExp("\\b"+(pt.pattern||T(pt))+"\\b","i").exec(x)&&(pt.label||pt)})}function Z(ct){return _(ct,function(dt,pt,He){return dt||(pt[Ce]||pt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ce)]||RegExp("\\b"+T(He)+"(?:\\b|\\w*\\d)","i").exec(x))&&He})}function xe(ct){return _(ct,function(dt,pt){return dt||RegExp("\\b"+(pt.pattern||T(pt))+"\\b","i").exec(x)&&(pt.label||pt)})}function ve(ct){return _(ct,function(dt,pt){var He=pt.pattern||T(pt);return!dt&&(dt=RegExp("\\b"+He+"(?:/[\\d.]+|[ \\w.]*)","i").exec(x))&&(dt=v(dt,He,pt.label||pt)),dt})}function Oe(ct){return _(ct,function(dt,pt){var He=pt.pattern||T(pt);return!dt&&(dt=RegExp("\\b"+He+" *\\d+[.\\w_]*","i").exec(x)||RegExp("\\b"+He+" *\\w+-[\\w]*","i").exec(x)||RegExp("\\b"+He+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(x))&&((dt=String(pt.label&&!RegExp(He,"i").test(pt.label)?pt.label:dt).split("/"))[1]&&!/[\d.]+/.test(dt[0])&&(dt[0]+=" "+dt[1]),pt=pt.label||pt,dt=b(dt[0].replace(RegExp(He,"i"),pt).replace(RegExp("; *(?:"+pt+"[_-])?","i")," ").replace(RegExp("("+pt+")[-_.]?(\\w)","i"),"$1 $2"))),dt})}function Qe(ct){return _(ct,function(dt,pt){return dt||(RegExp(pt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(x)||0)[1]||null})}function rt(){return this.description||""}if(q&&(q=[q]),re&&!Ce&&(Ce=Oe([re])),(pe=/\bGoogle TV\b/.exec(Ce))&&(Ce=pe[0]),/\bSimulator\b/i.test(x)&&(Ce=(Ce?Ce+" ":"")+"Simulator"),ee=="Opera Mini"&&/\bOPiOS\b/.test(x)&&ye.push("running in Turbo/Uncompressed mode"),ee=="IE"&&/\blike iPhone OS\b/.test(x)?(pe=k(x.replace(/like iPhone OS/,"")),re=pe.manufacturer,Ce=pe.product):/^iP/.test(Ce)?(ee||(ee="Safari"),Q="iOS"+((pe=/ OS ([\d_]+)/i.exec(x))?" "+pe[1].replace(/_/g,"."):"")):ee=="Konqueror"&&!/buntu/i.test(Q)?Q="Kubuntu":re&&re!="Google"&&(/Chrome/.test(ee)&&!/\bMobile Safari\b/i.test(x)||/\bVita\b/.test(Ce))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(ee)&&/\bVersion\//i.test(x)?(ee="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):ee=="Silk"?(/\bMobi/i.test(x)||(Q="Android",ye.unshift("desktop mode")),/Accelerated *= *true/i.test(x)&&ye.unshift("accelerated")):ee=="PaleMoon"&&(pe=/\bFirefox\/([\d.]+)\b/.exec(x))?ye.push("identifying as Firefox "+pe[1]):ee=="Firefox"&&(pe=/\b(Mobile|Tablet|TV)\b/i.exec(x))?(Q||(Q="Firefox OS"),Ce||(Ce=pe[1])):!ee||(pe=!/\bMinefield\b/i.test(x)&&/\b(?:Firefox|Safari)\b/.exec(ee))?(ee&&!Ce&&/[\/,]|^[^(]+?\)/.test(x.slice(x.indexOf(pe+"/")+8))&&(ee=null),(pe=Ce||re||Q)&&(Ce||re||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(ee=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:pe)+" Browser")):ee=="Electron"&&(pe=(/\bChrome\/([\d.]+)\b/.exec(x)||0)[1])&&ye.push("Chromium "+pe),te||(te=Qe(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",T(ee),"(?:Firefox|Minefield|NetFront)"])),(pe=q=="iCab"&&parseFloat(te)>3&&"WebKit"||/\bOpera\b/.test(ee)&&(/\bOPR\b/.test(x)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(x)&&!/^(?:Trident|EdgeHTML)$/.test(q)&&"WebKit"||!q&&/\bMSIE\b/i.test(x)&&(Q=="Mac OS"?"Tasman":"Trident")||q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ee)&&"NetFront")&&(q=[pe]),ee=="IE"&&(pe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(x)||0)[1])?(ee+=" Mobile",Q="Windows Phone "+(/\+$/.test(pe)?pe:pe+".x"),ye.unshift("desktop mode")):/\bWPDesktop\b/i.test(x)?(ee="IE Mobile",Q="Windows Phone 8.x",ye.unshift("desktop mode"),te||(te=(/\brv:([\d.]+)/.exec(x)||0)[1])):ee!="IE"&&q=="Trident"&&(pe=/\brv:([\d.]+)/.exec(x))&&(ee&&ye.push("identifying as "+ee+(te?" "+te:"")),ee="IE",te=pe[1]),le){if(t(y,"global"))if(z&&(pe=z.lang.System,Te=pe.getProperty("os.arch"),Q=Q||pe.getProperty("os.name")+" "+pe.getProperty("os.version")),V){try{te=y.require("ringo/engine").version.join("."),ee="RingoJS"}catch(ct){(pe=y.system)&&pe.global.system==y.system&&(ee="Narwhal",Q||(Q=pe[0].os||null))}ee||(ee="Rhino")}else typeof y.process=="object"&&!y.process.browser&&(pe=y.process)&&(typeof pe.versions=="object"&&(typeof pe.versions.electron=="string"?(ye.push("Node "+pe.versions.node),ee="Electron",te=pe.versions.electron):typeof pe.versions.nw=="string"&&(ye.push("Chromium "+te,"Node "+pe.versions.node),ee="NW.js",te=pe.versions.nw)),ee||(ee="Node.js",Te=pe.arch,Q=pe.platform,te=/[\d.]+/.exec(pe.version),te=te?te[0]:null));else s(pe=y.runtime)==W?(ee="Adobe AIR",Q=pe.flash.system.Capabilities.os):s(pe=y.phantom)==B?(ee="PhantomJS",te=(pe=pe.version||null)&&pe.major+"."+pe.minor+"."+pe.patch):typeof he.documentMode=="number"&&(pe=/\bTrident\/(\d+)/i.exec(x))?(te=[te,he.documentMode],(pe=+pe[1]+4)!=te[1]&&(ye.push("IE "+te[1]+" mode"),q&&(q[1]=""),te[1]=pe),te=ee=="IE"?String(te[1].toFixed(1)):te[0]):typeof he.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ee)&&(ye.push("masking as "+ee+" "+te),ee="IE",te="11.0",q=["Trident"],Q="Windows");Q=Q&&b(Q)}if(te&&(pe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(te)||/(?:alpha|beta)(?: ?\d)?/i.exec(x+";"+(le&&C.appMinorVersion))||/\bMinefield\b/i.test(x)&&"a")&&(ue=/b/i.test(pe)?"beta":"alpha",te=te.replace(RegExp(pe+"\\+?$"),"")+(ue=="beta"?ce:ie)+(/\d+\+?/.exec(pe)||"")),ee=="Fennec"||ee=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Q))ee="Firefox Mobile";else if(ee=="Maxthon"&&te)te=te.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ce))Ce=="Xbox 360"&&(Q=null),Ce=="Xbox 360"&&/\bIEMobile\b/.test(x)&&ye.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ee)||ee&&!Ce&&!/Browser|Mobi/.test(ee))&&(Q=="Windows CE"||/Mobi/i.test(x)))ee+=" Mobile";else if(ee=="IE"&&le)try{y.external===null&&ye.unshift("platform preview")}catch(ct){ye.unshift("embedded")}else(/\bBlackBerry\b/.test(Ce)||/\bBB10\b/.test(x))&&(pe=(RegExp(Ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(x)||0)[1]||te)?(pe=[pe,/BB10/.test(x)],Q=(pe[1]?(Ce=null,re="BlackBerry"):"Device Software")+" "+pe[0],te=null):this!=i&&Ce!="Wii"&&(le&&Ae||/Opera/.test(ee)&&/\b(?:MSIE|Firefox)\b/i.test(x)||ee=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Q)||ee=="IE"&&(Q&&!/^Win/.test(Q)&&te>5.5||/\bWindows XP\b/.test(Q)&&te>8||te==8&&!/\bTrident\b/.test(x)))&&!o.test(pe=k.call(i,x.replace(o,"")+";"))&&pe.name&&(pe="ing as "+pe.name+((pe=pe.version)?" "+pe:""),o.test(ee)?(/\bIE\b/.test(pe)&&Q=="Mac OS"&&(Q=null),pe="identify"+pe):(pe="mask"+pe,De?ee=b(De.replace(/([a-z])([A-Z])/g,"$1 $2")):ee="Opera",/\bIE\b/.test(pe)&&(Q=null),le||(te=null)),q=["Presto"],ye.push(pe));(pe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(x)||0)[1])&&(pe=[parseFloat(pe.replace(/\.(\d)$/,".0$1")),pe],ee=="Safari"&&pe[1].slice(-1)=="+"?(ee="WebKit Nightly",ue="alpha",te=pe[1].slice(0,-1)):(te==pe[1]||te==(pe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(x)||0)[1]))&&(te=null),pe[1]=(/\bChrome\/([\d.]+)/i.exec(x)||0)[1],pe[0]==537.36&&pe[2]==537.36&&parseFloat(pe[1])>=28&&q=="WebKit"&&(q=["Blink"]),!le||!L&&!pe[1]?(q&&(q[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")):(q&&(q[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:q!="Blink"?"27":"28")),q&&(q[1]+=" "+(pe+=typeof pe=="number"?".x":/[.+]/.test(pe)?"":"+")),ee=="Safari"&&(!te||parseInt(te)>45)&&(te=pe)),ee=="Opera"&&(pe=/\bzbov|zvav$/.exec(Q))?(ee+=" ",ye.unshift("desktop mode"),pe=="zvav"?(ee+="Mini",te=null):ee+="Mobile",Q=Q.replace(RegExp(" *"+pe+"$"),"")):ee=="Safari"&&/\bChrome\b/.exec(q&&q[1])&&(ye.unshift("desktop mode"),ee="Chrome Mobile",te=null,/\bOS X\b/.test(Q)?(re="Apple",Q="iOS 4.3+"):Q=null),te&&te.indexOf(pe=/[\d.]+$/.exec(Q))==0&&x.indexOf("/"+pe+"-")>-1&&(Q=l(Q.replace(pe,""))),q&&!/\b(?:Avant|Nook)\b/.test(ee)&&(/Browser|Lunascape|Maxthon/.test(ee)||ee!="Safari"&&/^iOS/.test(Q)&&/\bSafari\b/.test(q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ee)&&q[1])&&((pe=q[q.length-1])&&ye.push(pe)),ye.length&&(ye=["("+ye.join("; ")+")"]),re&&Ce&&Ce.indexOf(re)<0&&ye.push("on "+re),Ce&&ye.push((/^on /.test(ye[ye.length-1])?"":"on ")+Ce),Q&&(pe=/ ([\d.+]+)$/.exec(Q),fe=pe&&Q.charAt(Q.length-pe[0].length-1)=="/",Q={architecture:32,family:pe&&!fe?Q.replace(pe[0],""):Q,version:pe?pe[1]:null,toString:function(){var ct=this.version;return this.family+(ct&&!fe?" "+ct:"")+(this.architecture==64?" 64-bit":"")}}),(pe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Te))&&!/\bi686\b/i.test(Te)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+pe),"")),ee&&(/\bWOW64\b/i.test(x)||le&&/\w(?:86|32)$/.test(C.cpuClass||C.platform)&&!/\bWin64; x64\b/i.test(x))&&ye.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&ee=="Chrome"&&parseFloat(te)>=39&&(Q.architecture=64),x||(x=null);var nt={};return nt.description=x,nt.layout=q&&q[0],nt.manufacturer=re,nt.name=ee,nt.prerelease=ue,nt.product=Ce,nt.ua=x,nt.version=ee&&te,nt.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},nt.parse=k,nt.toString=rt,nt.version&&ye.unshift(te),nt.name&&ye.unshift(ee),Q&&ee&&!(Q==String(Q).split(" ")[0]&&(Q==ee.split(" ")[0]||Ce))&&ye.push(Ce?"("+Q+")":"on "+Q),ye.length&&(nt.description=ye.join(" ")),nt}var O=k();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=O,define(function(){return O})):c&&h?i(O,function(x,y){c[y]=x}):S.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(N,J,M){(function(D){"use strict";typeof D=="undefined"||!D.version||D.version.indexOf("v0.")===0||D.version.indexOf("v1.")===0&&D.version.indexOf("v1.8.")!==0?J.exports={nextTick:m}:J.exports=D;function m(S,P,c,h){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var w=arguments.length,d,o;switch(w){case 0:case 1:return D.nextTick(S);case 2:return D.nextTick(function(){S.call(null,P)});case 3:return D.nextTick(function(){S.call(null,P,c)});case 4:return D.nextTick(function(){S.call(null,P,c,h)});default:for(d=new Array(w-1),o=0;o<d.length;)d[o++]=arguments[o];return D.nextTick(function(){S.apply(null,d)})}}}).call(this,N("_process"))},{_process:208}],208:[function(N,J,M){var D=J.exports={},m,S;function P(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?m=setTimeout:m=P}catch(g){m=P}try{typeof clearTimeout=="function"?S=clearTimeout:S=c}catch(g){S=c}})();function h(g){if(m===setTimeout)return setTimeout(g,0);if((m===P||!m)&&setTimeout)return m=setTimeout,setTimeout(g,0);try{return m(g,0)}catch(b){try{return m.call(null,g,0)}catch(i){return m.call(this,g,0)}}}function w(g){if(S===clearTimeout)return clearTimeout(g);if((S===c||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(g);try{return S(g)}catch(b){try{return S.call(null,g)}catch(i){return S.call(this,g)}}}var d=[],o=!1,a,n=-1;function u(){if(!o||!a)return;o=!1,a.length?d=a.concat(d):n=-1,d.length&&p()}function p(){if(o)return;var g=h(u);o=!0;for(var b=d.length;b;){for(a=d,d=[];++n<b;)a&&a[n].run();n=-1,b=d.length}a=null,o=!1,w(g)}D.nextTick=function(g){var b=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)b[i-1]=arguments[i];d.push(new f(g,b)),d.length===1&&!o&&h(p)};function f(g,b){this.fun=g,this.array=b}f.prototype.run=function(){this.fun.apply(null,this.array)},D.title="browser",D.browser=!0,D.env={},D.argv=[],D.version="",D.versions={};function v(){}D.on=v,D.addListener=v,D.once=v,D.off=v,D.removeListener=v,D.removeAllListeners=v,D.emit=v,D.prependListener=v,D.prependOnceListener=v,D.listeners=function(g){return[]},D.binding=function(g){throw new Error("process.binding is not supported")},D.cwd=function(){return"/"},D.chdir=function(g){throw new Error("process.chdir is not supported")},D.umask=function(){return 0}},{}],209:[function(N,J,M){(function(D){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(m){var S=typeof M=="object"&&M&&!M.nodeType&&M,P=typeof J=="object"&&J&&!J.nodeType&&J,c=typeof D=="object"&&D;(c.global===c||c.window===c||c.self===c)&&(m=c);var h,w=2147483647,d=36,o=1,a=26,n=38,u=700,p=72,f=128,v="-",g=/^xn--/,b=/[^\x20-\x7E]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=d-o,T=Math.floor,_=String.fromCharCode,l;function k(G){throw new RangeError(s[G])}function O(G,B){for(var z=G.length,V=[];z--;)V[z]=B(G[z]);return V}function x(G,B){var z=G.split("@"),V="";z.length>1&&(V=z[0]+"@",G=z[1]),G=G.replace(i,".");var ie=G.split("."),ce=O(ie,B).join(".");return V+ce}function y(G){for(var B=[],z=0,V=G.length,ie,ce;z<V;)ie=G.charCodeAt(z++),ie>=55296&&ie<=56319&&z<V?(ce=G.charCodeAt(z++),(ce&64512)==56320?B.push(((ie&1023)<<10)+(ce&1023)+65536):(B.push(ie),z--)):B.push(ie);return B}function E(G){return O(G,function(B){var z="";return B>65535&&(B-=65536,z+=_(B>>>10&1023|55296),B=56320|B&1023),z+=_(B),z}).join("")}function C(G){return G-48<10?G-22:G-65<26?G-65:G-97<26?G-97:d}function I(G,B){return G+22+75*(G<26)-((B!=0)<<5)}function j(G,B,z){var V=0;for(G=z?T(G/u):G>>1,G+=T(G/B);G>t*a>>1;V+=d)G=T(G/t);return T(V+(t+1)*G/(G+n))}function L(G){var B=[],z=G.length,V,ie=0,ce=f,he=p,Ae,De,pe,Te,ye,ue,le,te,fe;for(Ae=G.lastIndexOf(v),Ae<0&&(Ae=0),De=0;De<Ae;++De)G.charCodeAt(De)>=128&&k("not-basic"),B.push(G.charCodeAt(De));for(pe=Ae>0?Ae+1:0;pe<z;){for(Te=ie,ye=1,ue=d;!(pe>=z&&k("invalid-input"),le=C(G.charCodeAt(pe++)),(le>=d||le>T((w-ie)/ye))&&k("overflow"),ie+=le*ye,te=ue<=he?o:ue>=he+a?a:ue-he,le<te);ue+=d)fe=d-te,ye>T(w/fe)&&k("overflow"),ye*=fe;V=B.length+1,he=j(ie-Te,V,Te==0),T(ie/V)>w-ce&&k("overflow"),ce+=T(ie/V),ie%=V,B.splice(ie++,0,ce)}return E(B)}function H(G){var B,z,V,ie,ce,he,Ae,De,pe,Te,ye,ue=[],le,te,fe,q;for(G=y(G),le=G.length,B=f,z=0,ce=p,he=0;he<le;++he)ye=G[he],ye<128&&ue.push(_(ye));for(V=ie=ue.length,ie&&ue.push(v);V<le;){for(Ae=w,he=0;he<le;++he)ye=G[he],ye>=B&&ye<Ae&&(Ae=ye);for(te=V+1,Ae-B>T((w-z)/te)&&k("overflow"),z+=(Ae-B)*te,B=Ae,he=0;he<le;++he)if(ye=G[he],ye<B&&++z>w&&k("overflow"),ye==B){for(De=z,pe=d;!(Te=pe<=ce?o:pe>=ce+a?a:pe-ce,De<Te);pe+=d)q=De-Te,fe=d-Te,ue.push(_(I(Te+q%fe,0))),De=T(q/fe);ue.push(_(I(De,0))),ce=j(z,te,V==ie),z=0,++V}++z,++B}return ue.join("")}function W(G){return x(G,function(B){return g.test(B)?L(B.slice(4).toLowerCase()):B})}function U(G){return x(G,function(B){return b.test(B)?"xn--"+H(B):B})}if(h={version:"1.4.1",ucs2:{decode:y,encode:E},decode:L,encode:H,toASCII:U,toUnicode:W},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return h});else if(S&&P)if(J.exports==S)P.exports=h;else for(l in h)h.hasOwnProperty(l)&&(S[l]=h[l]);else m.punycode=h})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(N,J,M){"use strict";function D(S,P){return Object.prototype.hasOwnProperty.call(S,P)}J.exports=function(S,P,c,h){P=P||"&",c=c||"=";var w={};if(typeof S!="string"||S.length===0)return w;var d=/\+/g;S=S.split(P);var o=1e3;h&&typeof h.maxKeys=="number"&&(o=h.maxKeys);var a=S.length;o>0&&a>o&&(a=o);for(var n=0;n<a;++n){var u=S[n].replace(d,"%20"),p=u.indexOf(c),f,v,g,b;p>=0?(f=u.substr(0,p),v=u.substr(p+1)):(f=u,v=""),g=decodeURIComponent(f),b=decodeURIComponent(v),D(w,g)?m(w[g])?w[g].push(b):w[g]=[w[g],b]:w[g]=b}return w};var m=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(N,J,M){"use strict";var D=function(c){switch(typeof c){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};J.exports=function(c,h,w,d){return h=h||"&",w=w||"=",c===null&&(c=void 0),typeof c=="object"?S(P(c),function(o){var a=encodeURIComponent(D(o))+w;return m(c[o])?S(c[o],function(n){return a+encodeURIComponent(D(n))}).join(h):a+encodeURIComponent(D(c[o]))}).join(h):d?encodeURIComponent(D(d))+w+encodeURIComponent(D(c)):""};var m=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function S(c,h){if(c.map)return c.map(h);for(var w=[],d=0;d<c.length;d++)w.push(h(c[d],d));return w}var P=Object.keys||function(c){var h=[];for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&h.push(w);return h}},{}],212:[function(N,J,M){"use strict";M.decode=M.parse=N("./decode"),M.encode=M.stringify=N("./encode")},{"./decode":210,"./encode":211}],213:[function(N,J,M){J.exports=N("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=c(D),S=N("babel-runtime/core-js/object/keys"),P=c(S);function c(b){return b&&b.__esModule?b:{default:b}}var h=N("process-nextick-args"),w=P.default||function(b){var i=[];for(var s in b)i.push(s);return i};J.exports=f;var d=(0,m.default)(N("core-util-is"));d.inherits=N("inherits");var o=N("./_stream_readable"),a=N("./_stream_writable");d.inherits(f,o);for(var n=w(a.prototype),u=0;u<n.length;u++){var p=n[u];f.prototype[p]||(f.prototype[p]=a.prototype[p])}function f(b){if(!(this instanceof f))return new f(b);o.call(this,b),a.call(this,b),b&&b.readable===!1&&(this.readable=!1),b&&b.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,b&&b.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",v)}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function v(){if(this.allowHalfOpen||this._writableState.ended)return;h.nextTick(g,this)}function g(b){b.end()}Object.defineProperty(f.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(i){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=i,this._writableState.destroyed=i}}),f.prototype._destroy=function(b,i){this.push(null),this.end(),h.nextTick(i,b)}},{"./_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(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(w){return w&&w.__esModule?w:{default:w}}J.exports=h;var P=N("./_stream_transform"),c=(0,m.default)(N("core-util-is"));c.inherits=N("inherits"),c.inherits(h,P);function h(w){if(!(this instanceof h))return new h(w);P.call(this,w)}h.prototype._transform=function(w,d,o){o(null,w)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(N,J,M){(function(D,m){"use strict";var S=N("babel-runtime/core-js/object/get-prototype-of"),P=w(S),c=N("babel-runtime/core-js/object/create"),h=w(c);function w(q){return q&&q.__esModule?q:{default:q}}var d=N("process-nextick-args");J.exports=y;var o=N("isarray"),a;y.ReadableState=x;var n=N("events").EventEmitter,u=function(ee,Ce){return ee.listeners(Ce).length},p=N("./internal/streams/stream"),f=N("safe-buffer").Buffer,v=m.Uint8Array||function(){};function g(q){return f.from(q)}function b(q){return f.isBuffer(q)||q instanceof v}var i=(0,h.default)(N("core-util-is"));i.inherits=N("inherits");var s=N("util"),t=void 0;s&&s.debuglog?t=s.debuglog("stream"):t=function(){};var T=N("./internal/streams/BufferList"),_=N("./internal/streams/destroy"),l;i.inherits(y,p);var k=["error","close","destroy","pause","resume"];function O(q,ee,Ce){if(typeof q.prependListener=="function")return q.prependListener(ee,Ce);!q._events||!q._events[ee]?q.on(ee,Ce):o(q._events[ee])?q._events[ee].unshift(Ce):q._events[ee]=[Ce,q._events[ee]]}function x(q,ee){a=a||N("./_stream_duplex"),q=q||{};var Ce=ee instanceof a;this.objectMode=!!q.objectMode,Ce&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var re=q.highWaterMark,Q=q.readableHighWaterMark,X=this.objectMode?16:16*1024;re||re===0?this.highWaterMark=re:Ce&&(Q||Q===0)?this.highWaterMark=Q:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,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=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(l||(l=N("string_decoder/").StringDecoder),this.decoder=new l(q.encoding),this.encoding=q.encoding)}function y(q){if(a=a||N("./_stream_duplex"),!(this instanceof y))return new y(q);this._readableState=new x(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),p.call(this)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ee){if(!this._readableState)return;this._readableState.destroyed=ee}}),y.prototype.destroy=_.destroy,y.prototype._undestroy=_.undestroy,y.prototype._destroy=function(q,ee){this.push(null),ee(q)},y.prototype.push=function(q,ee){var Ce=this._readableState,re;return Ce.objectMode?re=!0:typeof q=="string"&&(ee=ee||Ce.defaultEncoding,ee!==Ce.encoding&&(q=f.from(q,ee),ee=""),re=!0),E(this,q,ee,!1,re)},y.prototype.unshift=function(q){return E(this,q,null,!0,!1)};function E(q,ee,Ce,re,Q){var X=q._readableState;if(ee===null)X.reading=!1,U(q,X);else{var Z;Q||(Z=I(X,ee)),Z?q.emit("error",Z):X.objectMode||ee&&ee.length>0?(typeof ee!="string"&&!X.objectMode&&(0,P.default)(ee)!==f.prototype&&(ee=g(ee)),re?X.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):C(q,X,ee,!0):X.ended?q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ce?(ee=X.decoder.write(ee),X.objectMode||ee.length!==0?C(q,X,ee,!1):z(q,X)):C(q,X,ee,!1))):re||(X.reading=!1)}return j(X)}function C(q,ee,Ce,re){ee.flowing&&ee.length===0&&!ee.sync?(q.emit("data",Ce),q.read(0)):(ee.length+=ee.objectMode?1:Ce.length,re?ee.buffer.unshift(Ce):ee.buffer.push(Ce),ee.needReadable&&G(q)),z(q,ee)}function I(q,ee){var Ce;return!b(ee)&&typeof ee!="string"&&ee!==void 0&&!q.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function j(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}y.prototype.isPaused=function(){return this._readableState.flowing===!1},y.prototype.setEncoding=function(q){return l||(l=N("string_decoder/").StringDecoder),this._readableState.decoder=new l(q),this._readableState.encoding=q,this};var L=8388608;function H(q){return q>=L?q=L:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function W(q,ee){return q<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:q!==q?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(q>ee.highWaterMark&&(ee.highWaterMark=H(q)),q<=ee.length?q:ee.ended?ee.length:(ee.needReadable=!0,0))}y.prototype.read=function(q){t("read",q),q=parseInt(q,10);var ee=this._readableState,Ce=q;if(q!==0&&(ee.emittedReadable=!1),q===0&&ee.needReadable&&(ee.length>=ee.highWaterMark||ee.ended))return t("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?le(this):G(this),null;if(q=W(q,ee),q===0&&ee.ended)return ee.length===0&&le(this),null;var re=ee.needReadable;t("need readable",re),(ee.length===0||ee.length-q<ee.highWaterMark)&&(re=!0,t("length less than watermark",re)),ee.ended||ee.reading?(re=!1,t("reading or ended",re)):re&&(t("do read"),ee.reading=!0,ee.sync=!0,ee.length===0&&(ee.needReadable=!0),this._read(ee.highWaterMark),ee.sync=!1,ee.reading||(q=W(Ce,ee)));var Q;return q>0?Q=pe(q,ee):Q=null,Q===null?(ee.needReadable=!0,q=0):ee.length-=q,ee.length===0&&(ee.ended||(ee.needReadable=!0),Ce!==q&&ee.ended&&le(this)),Q!==null&&this.emit("data",Q),Q};function U(q,ee){if(ee.ended)return;if(ee.decoder){var Ce=ee.decoder.end();Ce&&Ce.length&&(ee.buffer.push(Ce),ee.length+=ee.objectMode?1:Ce.length)}ee.ended=!0,G(q)}function G(q){var ee=q._readableState;ee.needReadable=!1,ee.emittedReadable||(t("emitReadable",ee.flowing),ee.emittedReadable=!0,ee.sync?d.nextTick(B,q):B(q))}function B(q){t("emit readable"),q.emit("readable"),De(q)}function z(q,ee){ee.readingMore||(ee.readingMore=!0,d.nextTick(V,q,ee))}function V(q,ee){for(var Ce=ee.length;!ee.reading&&!ee.flowing&&!ee.ended&&ee.length<ee.highWaterMark&&!(t("maybeReadMore read 0"),q.read(0),Ce===ee.length);)Ce=ee.length;ee.readingMore=!1}y.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(q,ee){var Ce=this,re=this._readableState;switch(re.pipesCount){case 0:re.pipes=q;break;case 1:re.pipes=[re.pipes,q];break;default:re.pipes.push(q);break}re.pipesCount+=1,t("pipe count=%d opts=%j",re.pipesCount,ee);var Q=(!ee||ee.end!==!1)&&q!==D.stdout&&q!==D.stderr,X=Q?xe:He;re.endEmitted?d.nextTick(X):Ce.once("end",X),q.on("unpipe",Z);function Z(Pe,at){t("onunpipe"),Pe===Ce&&(at&&at.hasUnpiped===!1&&(at.hasUnpiped=!0,Qe()))}function xe(){t("onend"),q.end()}var ve=ie(Ce);q.on("drain",ve);var Oe=!1;function Qe(){t("cleanup"),q.removeListener("close",dt),q.removeListener("finish",pt),q.removeListener("drain",ve),q.removeListener("error",ct),q.removeListener("unpipe",Z),Ce.removeListener("end",xe),Ce.removeListener("end",He),Ce.removeListener("data",nt),Oe=!0,re.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ve()}var rt=!1;Ce.on("data",nt);function nt(Pe){t("ondata"),rt=!1;var at=q.write(Pe);at===!1&&!rt&&((re.pipesCount===1&&re.pipes===q||re.pipesCount>1&&fe(re.pipes,q)!==-1)&&!Oe&&(t("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,rt=!0),Ce.pause())}function ct(Pe){t("onerror",Pe),He(),q.removeListener("error",ct),u(q,"error")===0&&q.emit("error",Pe)}O(q,"error",ct);function dt(){q.removeListener("finish",pt),He()}q.once("close",dt);function pt(){t("onfinish"),q.removeListener("close",dt),He()}q.once("finish",pt);function He(){t("unpipe"),Ce.unpipe(q)}return q.emit("pipe",Ce),re.flowing||(t("pipe resume"),Ce.resume()),q};function ie(q){return function(){var ee=q._readableState;t("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&u(q,"data")&&(ee.flowing=!0,De(q))}}y.prototype.unpipe=function(q){var ee=this._readableState,Ce={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return q&&q!==ee.pipes?this:(q||(q=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,q&&q.emit("unpipe",this,Ce),this);if(!q){var re=ee.pipes,Q=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var X=0;X<Q;X++)re[X].emit("unpipe",this,Ce);return this}var Z=fe(ee.pipes,q);return Z===-1?this:(ee.pipes.splice(Z,1),ee.pipesCount-=1,ee.pipesCount===1&&(ee.pipes=ee.pipes[0]),q.emit("unpipe",this,Ce),this)},y.prototype.on=function(q,ee){var Ce=p.prototype.on.call(this,q,ee);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var re=this._readableState;!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.emittedReadable=!1,re.reading?re.length&&G(this):d.nextTick(ce,this))}return Ce},y.prototype.addListener=y.prototype.on;function ce(q){t("readable nexttick read 0"),q.read(0)}y.prototype.resume=function(){var q=this._readableState;return q.flowing||(t("resume"),q.flowing=!0,he(this,q)),this};function he(q,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,d.nextTick(Ae,q,ee))}function Ae(q,ee){ee.reading||(t("resume read 0"),q.read(0)),ee.resumeScheduled=!1,ee.awaitDrain=0,q.emit("resume"),De(q),ee.flowing&&!ee.reading&&q.read(0)}y.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 De(q){var ee=q._readableState;for(t("flow",ee.flowing);ee.flowing&&q.read()!==null;);}y.prototype.wrap=function(q){var ee=this,Ce=this._readableState,re=!1;q.on("end",function(){if(t("wrapped end"),Ce.decoder&&!Ce.ended){var Z=Ce.decoder.end();Z&&Z.length&&ee.push(Z)}ee.push(null)}),q.on("data",function(Z){if(t("wrapped data"),Ce.decoder&&(Z=Ce.decoder.write(Z)),Ce.objectMode&&Z==null)return;if(!Ce.objectMode&&(!Z||!Z.length))return;var xe=ee.push(Z);xe||(re=!0,q.pause())});for(var Q in q)this[Q]===void 0&&typeof q[Q]=="function"&&(this[Q]=function(Z){return function(){return q[Z].apply(q,arguments)}}(Q));for(var X=0;X<k.length;X++)q.on(k[X],this.emit.bind(this,k[X]));return this._read=function(Z){t("wrapped _read",Z),re&&(re=!1,q.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=pe;function pe(q,ee){if(ee.length===0)return null;var Ce;return ee.objectMode?Ce=ee.buffer.shift():!q||q>=ee.length?(ee.decoder?Ce=ee.buffer.join(""):ee.buffer.length===1?Ce=ee.buffer.head.data:Ce=ee.buffer.concat(ee.length),ee.buffer.clear()):Ce=Te(q,ee.buffer,ee.decoder),Ce}function Te(q,ee,Ce){var re;return q<ee.head.data.length?(re=ee.head.data.slice(0,q),ee.head.data=ee.head.data.slice(q)):q===ee.head.data.length?re=ee.shift():re=Ce?ye(q,ee):ue(q,ee),re}function ye(q,ee){var Ce=ee.head,re=1,Q=Ce.data;for(q-=Q.length;Ce=Ce.next;){var X=Ce.data,Z=q>X.length?X.length:q;if(Z===X.length?Q+=X:Q+=X.slice(0,q),q-=Z,q===0){Z===X.length?(++re,Ce.next?ee.head=Ce.next:ee.head=ee.tail=null):(ee.head=Ce,Ce.data=X.slice(Z));break}++re}return ee.length-=re,Q}function ue(q,ee){var Ce=f.allocUnsafe(q),re=ee.head,Q=1;for(re.data.copy(Ce),q-=re.data.length;re=re.next;){var X=re.data,Z=q>X.length?X.length:q;if(X.copy(Ce,Ce.length-q,0,Z),q-=Z,q===0){Z===X.length?(++Q,re.next?ee.head=re.next:ee.head=ee.tail=null):(ee.head=re,re.data=X.slice(Z));break}++Q}return ee.length-=Q,Ce}function le(q){var ee=q._readableState;if(ee.length>0)throw new Error('"endReadable()" called on non-empty stream');ee.endEmitted||(ee.ended=!0,d.nextTick(te,ee,q))}function te(q,ee){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,ee.readable=!1,ee.emit("end"))}function fe(q,ee){for(var Ce=0,re=q.length;Ce<re;Ce++)if(q[Ce]===ee)return Ce;return-1}}).call(this,N("_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(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(a){return a&&a.__esModule?a:{default:a}}J.exports=w;var P=N("./_stream_duplex"),c=(0,m.default)(N("core-util-is"));c.inherits=N("inherits"),c.inherits(w,P);function h(a,n){var u=this._transformState;u.transforming=!1;var p=u.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));u.writechunk=null,u.writecb=null,n!=null&&this.push(n),p(a);var f=this._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}function w(a){if(!(this instanceof w))return new w(a);P.call(this,a),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",d)}function d(){var a=this;typeof this._flush=="function"?this._flush(function(n,u){o(a,n,u)}):o(this,null,null)}w.prototype.push=function(a,n){return this._transformState.needTransform=!1,P.prototype.push.call(this,a,n)},w.prototype._transform=function(a,n,u){throw new Error("_transform() is not implemented")},w.prototype._write=function(a,n,u){var p=this._transformState;if(p.writecb=u,p.writechunk=a,p.writeencoding=n,!p.transforming){var f=this._readableState;(p.needTransform||f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}},w.prototype._read=function(a){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},w.prototype._destroy=function(a,n){var u=this;P.prototype._destroy.call(this,a,function(p){n(p),u.emit("close")})};function o(a,n,u){if(n)return a.emit("error",n);if(u!=null&&a.push(u),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(N,J,M){(function(D,m){"use strict";var S=N("babel-runtime/core-js/object/define-property"),P=p(S),c=N("babel-runtime/core-js/symbol/has-instance"),h=p(c),w=N("babel-runtime/core-js/symbol"),d=p(w),o=N("babel-runtime/core-js/object/create"),a=p(o),n=N("babel-runtime/core-js/set-immediate"),u=p(n);function p(ue){return ue&&ue.__esModule?ue:{default:ue}}var f=N("process-nextick-args");J.exports=I;function v(ue,le,te){this.chunk=ue,this.encoding=le,this.callback=te,this.next=null}function g(ue){var le=this;this.next=null,this.entry=null,this.finish=function(){ye(le,ue)}}var b=!D.browser&&["v0.10","v0.9."].indexOf(D.version.slice(0,5))>-1?u.default:f.nextTick,i;I.WritableState=E;var s=(0,a.default)(N("core-util-is"));s.inherits=N("inherits");var t={deprecate:N("util-deprecate")},T=N("./internal/streams/stream"),_=N("safe-buffer").Buffer,l=m.Uint8Array||function(){};function k(ue){return _.from(ue)}function O(ue){return _.isBuffer(ue)||ue instanceof l}var x=N("./internal/streams/destroy");s.inherits(I,T);function y(){}function E(ue,le){i=i||N("./_stream_duplex"),ue=ue||{};var te=le instanceof i;this.objectMode=!!ue.objectMode,te&&(this.objectMode=this.objectMode||!!ue.writableObjectMode);var fe=ue.highWaterMark,q=ue.writableHighWaterMark,ee=this.objectMode?16:16*1024;fe||fe===0?this.highWaterMark=fe:te&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=ee,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 Ce=ue.decodeStrings===!1;this.decodeStrings=!Ce,this.defaultEncoding=ue.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(re){z(le,re)},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 g(this)}E.prototype.getBuffer=function(){for(var le=this.bufferedRequest,te=[];le;)te.push(le),le=le.next;return te},function(){try{Object.defineProperty(E.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ue){}}();var C;typeof d.default=="function"&&h.default&&typeof Function.prototype[h.default]=="function"?(C=Function.prototype[h.default],(0,P.default)(I,h.default,{value:function(le){return C.call(this,le)?!0:this!==I?!1:le&&le._writableState instanceof E}})):C=function(le){return le instanceof this};function I(ue){if(i=i||N("./_stream_duplex"),!C.call(I,this)&&!(this instanceof i))return new I(ue);this._writableState=new E(ue,this),this.writable=!0,ue&&(typeof ue.write=="function"&&(this._write=ue.write),typeof ue.writev=="function"&&(this._writev=ue.writev),typeof ue.destroy=="function"&&(this._destroy=ue.destroy),typeof ue.final=="function"&&(this._final=ue.final)),T.call(this)}I.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(ue,le){var te=new Error("write after end");ue.emit("error",te),f.nextTick(le,te)}function L(ue,le,te,fe){var q=!0,ee=!1;return te===null?ee=new TypeError("May not write null values to stream"):typeof te!="string"&&te!==void 0&&!le.objectMode&&(ee=new TypeError("Invalid non-string/buffer chunk")),ee&&(ue.emit("error",ee),f.nextTick(fe,ee),q=!1),q}I.prototype.write=function(ue,le,te){var fe=this._writableState,q=!1,ee=!fe.objectMode&&O(ue);return ee&&!_.isBuffer(ue)&&(ue=k(ue)),typeof le=="function"&&(te=le,le=null),ee?le="buffer":le||(le=fe.defaultEncoding),typeof te!="function"&&(te=y),fe.ended?j(this,te):(ee||L(this,fe,ue,te))&&(fe.pendingcb++,q=W(this,fe,ee,ue,le,te)),q},I.prototype.cork=function(){var ue=this._writableState;ue.corked++},I.prototype.uncork=function(){var ue=this._writableState;ue.corked&&(ue.corked--,!ue.writing&&!ue.corked&&!ue.finished&&!ue.bufferProcessing&&ue.bufferedRequest&&ce(this,ue))},I.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function H(ue,le,te){return!ue.objectMode&&ue.decodeStrings!==!1&&typeof le=="string"&&(le=_.from(le,te)),le}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(ue,le,te,fe,q,ee){if(!te){var Ce=H(le,fe,q);fe!==Ce&&(te=!0,q="buffer",fe=Ce)}var re=le.objectMode?1:fe.length;le.length+=re;var Q=le.length<le.highWaterMark;if(Q||(le.needDrain=!0),le.writing||le.corked){var X=le.lastBufferedRequest;le.lastBufferedRequest={chunk:fe,encoding:q,isBuf:te,callback:ee,next:null},X?X.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else U(ue,le,!1,re,fe,q,ee);return Q}function U(ue,le,te,fe,q,ee,Ce){le.writelen=fe,le.writecb=Ce,le.writing=!0,le.sync=!0,te?ue._writev(q,le.onwrite):ue._write(q,ee,le.onwrite),le.sync=!1}function G(ue,le,te,fe,q){--le.pendingcb,te?(f.nextTick(q,fe),f.nextTick(pe,ue,le),ue._writableState.errorEmitted=!0,ue.emit("error",fe)):(q(fe),ue._writableState.errorEmitted=!0,ue.emit("error",fe),pe(ue,le))}function B(ue){ue.writing=!1,ue.writecb=null,ue.length-=ue.writelen,ue.writelen=0}function z(ue,le){var te=ue._writableState,fe=te.sync,q=te.writecb;if(B(te),le)G(ue,te,fe,le,q);else{var ee=he(te);!ee&&!te.corked&&!te.bufferProcessing&&te.bufferedRequest&&ce(ue,te),fe?b(V,ue,te,ee,q):V(ue,te,ee,q)}}function V(ue,le,te,fe){te||ie(ue,le),le.pendingcb--,fe(),pe(ue,le)}function ie(ue,le){le.length===0&&le.needDrain&&(le.needDrain=!1,ue.emit("drain"))}function ce(ue,le){le.bufferProcessing=!0;var te=le.bufferedRequest;if(ue._writev&&te&&te.next){var fe=le.bufferedRequestCount,q=new Array(fe),ee=le.corkedRequestsFree;ee.entry=te;for(var Ce=0,re=!0;te;)q[Ce]=te,te.isBuf||(re=!1),te=te.next,Ce+=1;q.allBuffers=re,U(ue,le,!0,le.length,q,"",ee.finish),le.pendingcb++,le.lastBufferedRequest=null,ee.next?(le.corkedRequestsFree=ee.next,ee.next=null):le.corkedRequestsFree=new g(le),le.bufferedRequestCount=0}else{for(;te;){var Q=te.chunk,X=te.encoding,Z=te.callback,xe=le.objectMode?1:Q.length;if(U(ue,le,!1,xe,Q,X,Z),te=te.next,le.bufferedRequestCount--,le.writing)break}te===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=te,le.bufferProcessing=!1}I.prototype._write=function(ue,le,te){te(new Error("_write() is not implemented"))},I.prototype._writev=null,I.prototype.end=function(ue,le,te){var fe=this._writableState;typeof ue=="function"?(te=ue,ue=null,le=null):typeof le=="function"&&(te=le,le=null),ue!=null&&this.write(ue,le),fe.corked&&(fe.corked=1,this.uncork()),!fe.ending&&!fe.finished&&Te(this,fe,te)};function he(ue){return ue.ending&&ue.length===0&&ue.bufferedRequest===null&&!ue.finished&&!ue.writing}function Ae(ue,le){ue._final(function(te){le.pendingcb--,te&&ue.emit("error",te),le.prefinished=!0,ue.emit("prefinish"),pe(ue,le)})}function De(ue,le){!le.prefinished&&!le.finalCalled&&(typeof ue._final=="function"?(le.pendingcb++,le.finalCalled=!0,f.nextTick(Ae,ue,le)):(le.prefinished=!0,ue.emit("prefinish")))}function pe(ue,le){var te=he(le);return te&&(De(ue,le),le.pendingcb===0&&(le.finished=!0,ue.emit("finish"))),te}function Te(ue,le,te){le.ending=!0,pe(ue,le),te&&(le.finished?f.nextTick(te):ue.once("finish",te)),le.ended=!0,ue.writable=!1}function ye(ue,le,te){var fe=ue.entry;for(ue.entry=null;fe;){var q=fe.callback;le.pendingcb--,q(te),fe=fe.next}le.corkedRequestsFree?le.corkedRequestsFree.next=ue:le.corkedRequestsFree=ue}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){if(!this._writableState)return;this._writableState.destroyed=le}}),I.prototype.destroy=x.destroy,I.prototype._undestroy=x.undestroy,I.prototype._destroy=function(ue,le){this.end(),le(ue)}}).call(this,N("_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(N,J,M){"use strict";function D(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}var m=N("safe-buffer").Buffer,S=N("util");function P(c,h,w){c.copy(h,w)}J.exports=function(){function c(){D(this,c),this.head=null,this.tail=null,this.length=0}return c.prototype.push=function(w){var d={data:w,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length},c.prototype.unshift=function(w){var d={data:w,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},c.prototype.shift=function(){if(this.length===0)return;var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w},c.prototype.clear=function(){this.head=this.tail=null,this.length=0},c.prototype.join=function(w){if(this.length===0)return"";for(var d=this.head,o=""+d.data;d=d.next;)o+=w+d.data;return o},c.prototype.concat=function(w){if(this.length===0)return m.alloc(0);if(this.length===1)return this.head.data;for(var d=m.allocUnsafe(w>>>0),o=this.head,a=0;o;)P(o.data,d,a),a+=o.data.length,o=o.next;return d},c}(),S&&S.inspect&&S.inspect.custom&&(J.exports.prototype[S.inspect.custom]=function(){var c=S.inspect({length:this.length});return this.constructor.name+" "+c})},{"safe-buffer":228,util:71}],220:[function(N,J,M){"use strict";var D=N("process-nextick-args");function m(c,h){var w=this,d=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return d||o?(h?h(c):c&&(!this._writableState||!this._writableState.errorEmitted)&&D.nextTick(P,this,c),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(a){!h&&a?(D.nextTick(P,w,a),w._writableState&&(w._writableState.errorEmitted=!0)):h&&h(a)}),this)}function S(){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 P(c,h){c.emit("error",h)}J.exports={destroy:m,undestroy:S}},{"process-nextick-args":207}],221:[function(N,J,M){"use strict";J.exports=N("events").EventEmitter},{events:192}],222:[function(N,J,M){J.exports=N("./readable").PassThrough},{"./readable":223}],223:[function(N,J,M){M=J.exports=N("./lib/_stream_readable.js"),M.Stream=M,M.Readable=M,M.Writable=N("./lib/_stream_writable.js"),M.Duplex=N("./lib/_stream_duplex.js"),M.Transform=N("./lib/_stream_transform.js"),M.PassThrough=N("./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(N,J,M){J.exports=N("./readable").Transform},{"./readable":223}],225:[function(N,J,M){J.exports=N("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(N,J,M){var D=function(){return this}()||Function("return this")(),m=D.regeneratorRuntime&&Object.getOwnPropertyNames(D).indexOf("regeneratorRuntime")>=0,S=m&&D.regeneratorRuntime;if(D.regeneratorRuntime=void 0,J.exports=N("./runtime"),m)D.regeneratorRuntime=S;else try{delete D.regeneratorRuntime}catch(P){D.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(N,J,M){!function(D){"use strict";var m=Object.prototype,S=m.hasOwnProperty,P,c=typeof Symbol=="function"?Symbol:{},h=c.iterator||"@@iterator",w=c.asyncIterator||"@@asyncIterator",d=c.toStringTag||"@@toStringTag",o=typeof J=="object",a=D.regeneratorRuntime;if(a){o&&(J.exports=a);return}a=D.regeneratorRuntime=o?J.exports:{};function n(W,U,G,B){var z=U&&U.prototype instanceof i?U:i,V=Object.create(z.prototype),ie=new j(B||[]);return V._invoke=y(W,G,ie),V}a.wrap=n;function u(W,U,G){try{return{type:"normal",arg:W.call(U,G)}}catch(B){return{type:"throw",arg:B}}}var p="suspendedStart",f="suspendedYield",v="executing",g="completed",b={};function i(){}function s(){}function t(){}var T={};T[h]=function(){return this};var _=Object.getPrototypeOf,l=_&&_(_(L([])));l&&l!==m&&S.call(l,h)&&(T=l);var k=t.prototype=i.prototype=Object.create(T);s.prototype=k.constructor=t,t.constructor=s,t[d]=s.displayName="GeneratorFunction";function O(W){["next","throw","return"].forEach(function(U){W[U]=function(G){return this._invoke(U,G)}})}a.isGeneratorFunction=function(W){var U=typeof W=="function"&&W.constructor;return U?U===s||(U.displayName||U.name)==="GeneratorFunction":!1},a.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,t):(W.__proto__=t,d in W||(W[d]="GeneratorFunction")),W.prototype=Object.create(k),W},a.awrap=function(W){return{__await:W}};function x(W){function U(z,V,ie,ce){var he=u(W[z],W,V);if(he.type==="throw")ce(he.arg);else{var Ae=he.arg,De=Ae.value;return De&&typeof De=="object"&&S.call(De,"__await")?Promise.resolve(De.__await).then(function(pe){U("next",pe,ie,ce)},function(pe){U("throw",pe,ie,ce)}):Promise.resolve(De).then(function(pe){Ae.value=pe,ie(Ae)},ce)}}var G;function B(z,V){function ie(){return new Promise(function(ce,he){U(z,V,ce,he)})}return G=G?G.then(ie,ie):ie()}this._invoke=B}O(x.prototype),x.prototype[w]=function(){return this},a.AsyncIterator=x,a.async=function(W,U,G,B){var z=new x(n(W,U,G,B));return a.isGeneratorFunction(U)?z:z.next().then(function(V){return V.done?V.value:z.next()})};function y(W,U,G){var B=p;return function(V,ie){if(B===v)throw new Error("Generator is already running");if(B===g){if(V==="throw")throw ie;return H()}for(G.method=V,G.arg=ie;;){var ce=G.delegate;if(ce){var he=E(ce,G);if(he){if(he===b)continue;return he}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(B===p)throw B=g,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);B=v;var Ae=u(W,U,G);if(Ae.type==="normal"){if(B=G.done?g:f,Ae.arg===b)continue;return{value:Ae.arg,done:G.done}}else Ae.type==="throw"&&(B=g,G.method="throw",G.arg=Ae.arg)}}}function E(W,U){var G=W.iterator[U.method];if(G===P){if(U.delegate=null,U.method==="throw"){if(W.iterator.return&&(U.method="return",U.arg=P,E(W,U),U.method==="throw"))return b;U.method="throw",U.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var B=u(G,W.iterator,U.arg);if(B.type==="throw")return U.method="throw",U.arg=B.arg,U.delegate=null,b;var z=B.arg;if(!z)return U.method="throw",U.arg=new TypeError("iterator result is not an object"),U.delegate=null,b;if(z.done)U[W.resultName]=z.value,U.next=W.nextLoc,U.method!=="return"&&(U.method="next",U.arg=P);else return z;return U.delegate=null,b}O(k),k[d]="Generator",k[h]=function(){return this},k.toString=function(){return"[object Generator]"};function C(W){var U={tryLoc:W[0]};1 in W&&(U.catchLoc=W[1]),2 in W&&(U.finallyLoc=W[2],U.afterLoc=W[3]),this.tryEntries.push(U)}function I(W){var U=W.completion||{};U.type="normal",delete U.arg,W.completion=U}function j(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(C,this),this.reset(!0)}a.keys=function(W){var U=[];for(var G in W)U.push(G);return U.reverse(),function B(){for(;U.length;){var z=U.pop();if(z in W)return B.value=z,B.done=!1,B}return B.done=!0,B}};function L(W){if(W){var U=W[h];if(U)return U.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var G=-1,B=function z(){for(;++G<W.length;)if(S.call(W,G))return z.value=W[G],z.done=!1,z;return z.value=P,z.done=!0,z};return B.next=B}}return{next:H}}a.values=L;function H(){return{value:P,done:!0}}j.prototype={constructor:j,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=P,this.done=!1,this.delegate=null,this.method="next",this.arg=P,this.tryEntries.forEach(I),!W)for(var U in this)U.charAt(0)==="t"&&S.call(this,U)&&!isNaN(+U.slice(1))&&(this[U]=P)},stop:function(){this.done=!0;var W=this.tryEntries[0],U=W.completion;if(U.type==="throw")throw U.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var U=this;function G(he,Ae){return V.type="throw",V.arg=W,U.next=he,Ae&&(U.method="next",U.arg=P),!!Ae}for(var B=this.tryEntries.length-1;B>=0;--B){var z=this.tryEntries[B],V=z.completion;if(z.tryLoc==="root")return G("end");if(z.tryLoc<=this.prev){var ie=S.call(z,"catchLoc"),ce=S.call(z,"finallyLoc");if(ie&&ce){if(this.prev<z.catchLoc)return G(z.catchLoc,!0);if(this.prev<z.finallyLoc)return G(z.finallyLoc)}else if(ie){if(this.prev<z.catchLoc)return G(z.catchLoc,!0)}else if(ce){if(this.prev<z.finallyLoc)return G(z.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(W,U){for(var G=this.tryEntries.length-1;G>=0;--G){var B=this.tryEntries[G];if(B.tryLoc<=this.prev&&S.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var z=B;break}}z&&(W==="break"||W==="continue")&&z.tryLoc<=U&&U<=z.finallyLoc&&(z=null);var V=z?z.completion:{};return V.type=W,V.arg=U,z?(this.method="next",this.next=z.finallyLoc,b):this.complete(V)},complete:function(W,U){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"&&U&&(this.next=U),b},finish:function(W){for(var U=this.tryEntries.length-1;U>=0;--U){var G=this.tryEntries[U];if(G.finallyLoc===W)return this.complete(G.completion,G.afterLoc),I(G),b}},catch:function(W){for(var U=this.tryEntries.length-1;U>=0;--U){var G=this.tryEntries[U];if(G.tryLoc===W){var B=G.completion;if(B.type==="throw"){var z=B.arg;I(G)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(W,U,G){return this.delegate={iterator:L(W),resultName:U,nextLoc:G},this.method==="next"&&(this.arg=P),b}}}(function(){return this}()||Function("return this")())},{}],228:[function(N,J,M){var D=N("buffer"),m=D.Buffer;function S(c,h){for(var w in c)h[w]=c[w]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?J.exports=D:(S(D,M),M.Buffer=P);function P(c,h,w){return m(c,h,w)}S(m,P),P.from=function(c,h,w){if(typeof c=="number")throw new TypeError("Argument must not be a number");return m(c,h,w)},P.alloc=function(c,h,w){if(typeof c!="number")throw new TypeError("Argument must be a number");var d=m(c);return h!==void 0?typeof w=="string"?d.fill(h,w):d.fill(h):d.fill(0),d},P.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return m(c)},P.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return D.SlowBuffer(c)}},{buffer:73}],229:[function(N,J,M){(function(D){"use strict";var m=N("babel-runtime/core-js/string/from-code-point"),S=f(m),P=N("babel-runtime/core-js/json/stringify"),c=f(P),h=N("babel-runtime/helpers/typeof"),w=f(h),d=N("babel-runtime/core-js/object/define-property"),o=f(d),a=N("babel-runtime/core-js/object/keys"),n=f(a),u=N("babel-runtime/core-js/object/create"),p=f(u);function f(v){return v&&v.__esModule?v:{default:v}}(function(v){v.parser=function(X,Z){return new b(X,Z)},v.SAXParser=b,v.SAXStream=k,v.createStream=l,v.MAX_BUFFER_LENGTH=64*1024;var g=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];v.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function b(X,Z){if(!(this instanceof b))return new b(X,Z);var xe=this;s(xe),xe.q=xe.c="",xe.bufferCheckPosition=v.MAX_BUFFER_LENGTH,xe.opt=Z||{},xe.opt.lowercase=xe.opt.lowercase||xe.opt.lowercasetags,xe.looseCase=xe.opt.lowercase?"toLowerCase":"toUpperCase",xe.tags=[],xe.closed=xe.closedRoot=xe.sawRoot=!1,xe.tag=xe.error=null,xe.strict=!!X,xe.noscript=!!(X||xe.opt.noscript),xe.state=V.BEGIN,xe.strictEntities=xe.opt.strictEntities,xe.ENTITIES=xe.strictEntities?(0,p.default)(v.XML_ENTITIES):(0,p.default)(v.ENTITIES),xe.attribList=[],xe.opt.xmlns&&(xe.ns=(0,p.default)(C)),xe.trackPosition=xe.opt.position!==!1,xe.trackPosition&&(xe.position=xe.line=xe.column=0),ce(xe,"onready")}p.default||(Object.create=function(X){function Z(){}Z.prototype=X;var xe=new Z;return xe}),n.default||(Object.keys=function(X){var Z=[];for(var xe in X)X.hasOwnProperty(xe)&&Z.push(xe);return Z});function i(X){for(var Z=Math.max(v.MAX_BUFFER_LENGTH,10),xe=0,ve=0,Oe=g.length;ve<Oe;ve++){var Qe=X[g[ve]].length;if(Qe>Z)switch(g[ve]){case"textNode":Ae(X);break;case"cdata":he(X,"oncdata",X.cdata),X.cdata="";break;case"script":he(X,"onscript",X.script),X.script="";break;default:pe(X,"Max buffer length exceeded: "+g[ve])}xe=Math.max(xe,Qe)}var rt=v.MAX_BUFFER_LENGTH-xe;X.bufferCheckPosition=rt+X.position}function s(X){for(var Z=0,xe=g.length;Z<xe;Z++)X[g[Z]]=""}function t(X){Ae(X),X.cdata!==""&&(he(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(he(X,"onscript",X.script),X.script="")}b.prototype={end:function(){Te(this)},write:Q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var T;try{T=N("stream").Stream}catch(X){T=function(){}}var _=v.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function l(X,Z){return new k(X,Z)}function k(X,Z){if(!(this instanceof k))return new k(X,Z);T.apply(this),this._parser=new b(X,Z),this.writable=!0,this.readable=!0;var xe=this;this._parser.onend=function(){xe.emit("end")},this._parser.onerror=function(ve){xe.emit("error",ve),xe._parser.error=null},this._decoder=null,_.forEach(function(ve){(0,o.default)(xe,"on"+ve,{get:function(){return xe._parser["on"+ve]},set:function(Qe){if(!Qe)return xe.removeAllListeners(ve),xe._parser["on"+ve]=Qe,Qe;xe.on(ve,Qe)},enumerable:!0,configurable:!1})})}k.prototype=(0,p.default)(T.prototype,{constructor:{value:k}}),k.prototype.write=function(X){if(typeof D=="function"&&typeof D.isBuffer=="function"&&D.isBuffer(X)){if(!this._decoder){var Z=N("string_decoder").StringDecoder;this._decoder=new Z("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},k.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},k.prototype.on=function(X,Z){var xe=this;return!xe._parser["on"+X]&&_.indexOf(X)!==-1&&(xe._parser["on"+X]=function(){var ve=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ve.splice(0,0,X),xe.emit.apply(xe,ve)}),T.prototype.on.call(xe,X,Z)};var O="[CDATA[",x="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",C={xml:y,xmlns:E},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]/,j=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,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]/,H=/[#:_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 U(X){return X==='"'||X==="'"}function G(X){return X===">"||W(X)}function B(X,Z){return X.test(Z)}function z(X,Z){return!B(X,Z)}var V=0;v.STATE={BEGIN:V++,BEGIN_WHITESPACE:V++,TEXT:V++,TEXT_ENTITY:V++,OPEN_WAKA:V++,SGML_DECL:V++,SGML_DECL_QUOTED:V++,DOCTYPE:V++,DOCTYPE_QUOTED:V++,DOCTYPE_DTD:V++,DOCTYPE_DTD_QUOTED:V++,COMMENT_STARTING:V++,COMMENT:V++,COMMENT_ENDING:V++,COMMENT_ENDED:V++,CDATA:V++,CDATA_ENDING:V++,CDATA_ENDING_2:V++,PROC_INST:V++,PROC_INST_BODY:V++,PROC_INST_ENDING:V++,OPEN_TAG:V++,OPEN_TAG_SLASH:V++,ATTRIB:V++,ATTRIB_NAME:V++,ATTRIB_NAME_SAW_WHITE:V++,ATTRIB_VALUE:V++,ATTRIB_VALUE_QUOTED:V++,ATTRIB_VALUE_CLOSED:V++,ATTRIB_VALUE_UNQUOTED:V++,ATTRIB_VALUE_ENTITY_Q:V++,ATTRIB_VALUE_ENTITY_U:V++,CLOSE_TAG:V++,CLOSE_TAG_SAW_WHITE:V++,SCRIPT:V++,SCRIPT_ENDING:V++},v.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},v.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)(v.ENTITIES).forEach(function(X){var Z=v.ENTITIES[X],xe=typeof Z=="number"?String.fromCharCode(Z):Z;v.ENTITIES[X]=xe});for(var ie in v.STATE)v.STATE[v.STATE[ie]]=ie;V=v.STATE;function ce(X,Z,xe){X[Z]&&X[Z](xe)}function he(X,Z,xe){X.textNode&&Ae(X),ce(X,Z,xe)}function Ae(X){X.textNode=De(X.opt,X.textNode),X.textNode&&ce(X,"ontext",X.textNode),X.textNode=""}function De(X,Z){return X.trim&&(Z=Z.trim()),X.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function pe(X,Z){return Ae(X),X.trackPosition&&(Z+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),Z=new Error(Z),X.error=Z,ce(X,"onerror",Z),X}function Te(X){return X.sawRoot&&!X.closedRoot&&ye(X,"Unclosed root tag"),X.state!==V.BEGIN&&X.state!==V.BEGIN_WHITESPACE&&X.state!==V.TEXT&&pe(X,"Unexpected end"),Ae(X),X.c="",X.closed=!0,ce(X,"onend"),b.call(X,X.strict,X.opt),X}function ye(X,Z){if((typeof X=="undefined"?"undefined":(0,w.default)(X))!=="object"||!(X instanceof b))throw new Error("bad call to strictFail");X.strict&&pe(X,Z)}function ue(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Z=X.tags[X.tags.length-1]||X,xe=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(xe.ns=Z.ns),X.attribList.length=0,he(X,"onopentagstart",xe)}function le(X,Z){var xe=X.indexOf(":"),ve=xe<0?["",X]:X.split(":"),Oe=ve[0],Qe=ve[1];return Z&&X==="xmlns"&&(Oe="xmlns",Qe=""),{prefix:Oe,local:Qe}}function te(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 Z=le(X.attribName,!0),xe=Z.prefix,ve=Z.local;if(xe==="xmlns")if(ve==="xml"&&X.attribValue!==y)ye(X,"xml: prefix must be bound to "+y+`
Actual: `+X.attribValue);else if(ve==="xmlns"&&X.attribValue!==E)ye(X,"xmlns: prefix must be bound to "+E+`
Actual: `+X.attribValue);else{var Oe=X.tag,Qe=X.tags[X.tags.length-1]||X;Oe.ns===Qe.ns&&(Oe.ns=(0,p.default)(Qe.ns)),Oe.ns[ve]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,he(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function fe(X,Z){if(X.opt.xmlns){var xe=X.tag,ve=le(X.tagName);xe.prefix=ve.prefix,xe.local=ve.local,xe.uri=xe.ns[ve.prefix]||"",xe.prefix&&!xe.uri&&(ye(X,"Unbound namespace prefix: "+(0,c.default)(X.tagName)),xe.uri=ve.prefix);var Oe=X.tags[X.tags.length-1]||X;xe.ns&&Oe.ns!==xe.ns&&(0,n.default)(xe.ns).forEach(function(Je){he(X,"onopennamespace",{prefix:Je,uri:xe.ns[Je]})});for(var Qe=0,rt=X.attribList.length;Qe<rt;Qe++){var nt=X.attribList[Qe],ct=nt[0],dt=nt[1],pt=le(ct,!0),He=pt.prefix,Pe=pt.local,at=He===""?"":xe.ns[He]||"",ft={name:ct,value:dt,prefix:He,local:Pe,uri:at};He&&He!=="xmlns"&&!at&&(ye(X,"Unbound namespace prefix: "+(0,c.default)(He)),ft.uri=He),X.tag.attributes[ct]=ft,he(X,"onattribute",ft)}X.attribList.length=0}X.tag.isSelfClosing=!!Z,X.sawRoot=!0,X.tags.push(X.tag),he(X,"onopentag",X.tag),Z||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=V.SCRIPT:X.state=V.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function q(X){if(!X.tagName){ye(X,"Weird empty close tag."),X.textNode+="</>",X.state=V.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=V.SCRIPT;return}he(X,"onscript",X.script),X.script=""}var Z=X.tags.length,xe=X.tagName;X.strict||(xe=xe[X.looseCase]());for(var ve=xe;Z--;){var Oe=X.tags[Z];if(Oe.name!==ve)ye(X,"Unexpected close tag");else break}if(Z<0){ye(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=V.TEXT;return}X.tagName=xe;for(var Qe=X.tags.length;Qe-- >Z;){var rt=X.tag=X.tags.pop();X.tagName=X.tag.name,he(X,"onclosetag",X.tagName);var nt={};for(var ct in rt.ns)nt[ct]=rt.ns[ct];var dt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&rt.ns!==dt.ns&&(0,n.default)(rt.ns).forEach(function(pt){var He=rt.ns[pt];he(X,"onclosenamespace",{prefix:pt,uri:He})})}Z===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=V.TEXT}function ee(X){var Z=X.entity,xe=Z.toLowerCase(),ve,Oe="";return X.ENTITIES[Z]?X.ENTITIES[Z]:X.ENTITIES[xe]?X.ENTITIES[xe]:(Z=xe,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),ve=parseInt(Z,16),Oe=ve.toString(16)):(Z=Z.slice(1),ve=parseInt(Z,10),Oe=ve.toString(10))),Z=Z.replace(/^0+/,""),isNaN(ve)||Oe.toLowerCase()!==Z?(ye(X,"Invalid character entity"),"&"+X.entity+";"):(0,S.default)(ve))}function Ce(X,Z){Z==="<"?(X.state=V.OPEN_WAKA,X.startTagPosition=X.position):W(Z)||(ye(X,"Non-whitespace before first tag."),X.textNode=Z,X.state=V.TEXT)}function re(X,Z){var xe="";return Z<X.length&&(xe=X.charAt(Z)),xe}function Q(X){var Z=this;if(this.error)throw this.error;if(Z.closed)return pe(Z,"Cannot write after close. Assign an onready handler.");if(X===null)return Te(Z);(typeof X=="undefined"?"undefined":(0,w.default)(X))==="object"&&(X=X.toString());for(var xe=0,ve="";!(ve=re(X,xe++),Z.c=ve,!ve);){Z.trackPosition&&(Z.position++,ve===`
`?(Z.line++,Z.column=0):Z.column++);switch(Z.state){case V.BEGIN:if(Z.state=V.BEGIN_WHITESPACE,ve==="\uFEFF")continue;Ce(Z,ve);continue;case V.BEGIN_WHITESPACE:Ce(Z,ve);continue;case V.TEXT:if(Z.sawRoot&&!Z.closedRoot){for(var Oe=xe-1;ve&&ve!=="<"&&ve!=="&";)ve=re(X,xe++),ve&&Z.trackPosition&&(Z.position++,ve===`
`?(Z.line++,Z.column=0):Z.column++);Z.textNode+=X.substring(Oe,xe-1)}ve==="<"&&!(Z.sawRoot&&Z.closedRoot&&!Z.strict)?(Z.state=V.OPEN_WAKA,Z.startTagPosition=Z.position):(!W(ve)&&(!Z.sawRoot||Z.closedRoot)&&ye(Z,"Text data outside of root node."),ve==="&"?Z.state=V.TEXT_ENTITY:Z.textNode+=ve);continue;case V.SCRIPT:ve==="<"?Z.state=V.SCRIPT_ENDING:Z.script+=ve;continue;case V.SCRIPT_ENDING:ve==="/"?Z.state=V.CLOSE_TAG:(Z.script+="<"+ve,Z.state=V.SCRIPT);continue;case V.OPEN_WAKA:if(ve==="!")Z.state=V.SGML_DECL,Z.sgmlDecl="";else if(!W(ve))if(B(I,ve))Z.state=V.OPEN_TAG,Z.tagName=ve;else if(ve==="/")Z.state=V.CLOSE_TAG,Z.tagName="";else if(ve==="?")Z.state=V.PROC_INST,Z.procInstName=Z.procInstBody="";else{if(ye(Z,"Unencoded <"),Z.startTagPosition+1<Z.position){var Qe=Z.position-Z.startTagPosition;ve=new Array(Qe).join(" ")+ve}Z.textNode+="<"+ve,Z.state=V.TEXT}continue;case V.SGML_DECL:(Z.sgmlDecl+ve).toUpperCase()===O?(he(Z,"onopencdata"),Z.state=V.CDATA,Z.sgmlDecl="",Z.cdata=""):Z.sgmlDecl+ve==="--"?(Z.state=V.COMMENT,Z.comment="",Z.sgmlDecl=""):(Z.sgmlDecl+ve).toUpperCase()===x?(Z.state=V.DOCTYPE,(Z.doctype||Z.sawRoot)&&ye(Z,"Inappropriately located doctype declaration"),Z.doctype="",Z.sgmlDecl=""):ve===">"?(he(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=V.TEXT):(U(ve)&&(Z.state=V.SGML_DECL_QUOTED),Z.sgmlDecl+=ve);continue;case V.SGML_DECL_QUOTED:ve===Z.q&&(Z.state=V.SGML_DECL,Z.q=""),Z.sgmlDecl+=ve;continue;case V.DOCTYPE:ve===">"?(Z.state=V.TEXT,he(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=ve,ve==="["?Z.state=V.DOCTYPE_DTD:U(ve)&&(Z.state=V.DOCTYPE_QUOTED,Z.q=ve));continue;case V.DOCTYPE_QUOTED:Z.doctype+=ve,ve===Z.q&&(Z.q="",Z.state=V.DOCTYPE);continue;case V.DOCTYPE_DTD:Z.doctype+=ve,ve==="]"?Z.state=V.DOCTYPE:U(ve)&&(Z.state=V.DOCTYPE_DTD_QUOTED,Z.q=ve);continue;case V.DOCTYPE_DTD_QUOTED:Z.doctype+=ve,ve===Z.q&&(Z.state=V.DOCTYPE_DTD,Z.q="");continue;case V.COMMENT:ve==="-"?Z.state=V.COMMENT_ENDING:Z.comment+=ve;continue;case V.COMMENT_ENDING:ve==="-"?(Z.state=V.COMMENT_ENDED,Z.comment=De(Z.opt,Z.comment),Z.comment&&he(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+ve,Z.state=V.COMMENT);continue;case V.COMMENT_ENDED:ve!==">"?(ye(Z,"Malformed comment"),Z.comment+="--"+ve,Z.state=V.COMMENT):Z.state=V.TEXT;continue;case V.CDATA:ve==="]"?Z.state=V.CDATA_ENDING:Z.cdata+=ve;continue;case V.CDATA_ENDING:ve==="]"?Z.state=V.CDATA_ENDING_2:(Z.cdata+="]"+ve,Z.state=V.CDATA);continue;case V.CDATA_ENDING_2:ve===">"?(Z.cdata&&he(Z,"oncdata",Z.cdata),he(Z,"onclosecdata"),Z.cdata="",Z.state=V.TEXT):ve==="]"?Z.cdata+="]":(Z.cdata+="]]"+ve,Z.state=V.CDATA);continue;case V.PROC_INST:ve==="?"?Z.state=V.PROC_INST_ENDING:W(ve)?Z.state=V.PROC_INST_BODY:Z.procInstName+=ve;continue;case V.PROC_INST_BODY:if(!Z.procInstBody&&W(ve))continue;ve==="?"?Z.state=V.PROC_INST_ENDING:Z.procInstBody+=ve;continue;case V.PROC_INST_ENDING:ve===">"?(he(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=V.TEXT):(Z.procInstBody+="?"+ve,Z.state=V.PROC_INST_BODY);continue;case V.OPEN_TAG:B(j,ve)?Z.tagName+=ve:(ue(Z),ve===">"?fe(Z):ve==="/"?Z.state=V.OPEN_TAG_SLASH:(W(ve)||ye(Z,"Invalid character in tag name"),Z.state=V.ATTRIB));continue;case V.OPEN_TAG_SLASH:ve===">"?(fe(Z,!0),q(Z)):(ye(Z,"Forward-slash in opening tag not followed by >"),Z.state=V.ATTRIB);continue;case V.ATTRIB:if(W(ve))continue;ve===">"?fe(Z):ve==="/"?Z.state=V.OPEN_TAG_SLASH:B(I,ve)?(Z.attribName=ve,Z.attribValue="",Z.state=V.ATTRIB_NAME):ye(Z,"Invalid attribute name");continue;case V.ATTRIB_NAME:ve==="="?Z.state=V.ATTRIB_VALUE:ve===">"?(ye(Z,"Attribute without value"),Z.attribValue=Z.attribName,te(Z),fe(Z)):W(ve)?Z.state=V.ATTRIB_NAME_SAW_WHITE:B(j,ve)?Z.attribName+=ve:ye(Z,"Invalid attribute name");continue;case V.ATTRIB_NAME_SAW_WHITE:if(ve==="=")Z.state=V.ATTRIB_VALUE;else{if(W(ve))continue;ye(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",he(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",ve===">"?fe(Z):B(I,ve)?(Z.attribName=ve,Z.state=V.ATTRIB_NAME):(ye(Z,"Invalid attribute name"),Z.state=V.ATTRIB)}continue;case V.ATTRIB_VALUE:if(W(ve))continue;U(ve)?(Z.q=ve,Z.state=V.ATTRIB_VALUE_QUOTED):(ye(Z,"Unquoted attribute value"),Z.state=V.ATTRIB_VALUE_UNQUOTED,Z.attribValue=ve);continue;case V.ATTRIB_VALUE_QUOTED:if(ve!==Z.q){ve==="&"?Z.state=V.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=ve;continue}te(Z),Z.q="",Z.state=V.ATTRIB_VALUE_CLOSED;continue;case V.ATTRIB_VALUE_CLOSED:W(ve)?Z.state=V.ATTRIB:ve===">"?fe(Z):ve==="/"?Z.state=V.OPEN_TAG_SLASH:B(I,ve)?(ye(Z,"No whitespace between attributes"),Z.attribName=ve,Z.attribValue="",Z.state=V.ATTRIB_NAME):ye(Z,"Invalid attribute name");continue;case V.ATTRIB_VALUE_UNQUOTED:if(!G(ve)){ve==="&"?Z.state=V.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=ve;continue}te(Z),ve===">"?fe(Z):Z.state=V.ATTRIB;continue;case V.CLOSE_TAG:if(Z.tagName)ve===">"?q(Z):B(j,ve)?Z.tagName+=ve:Z.script?(Z.script+="</"+Z.tagName,Z.tagName="",Z.state=V.SCRIPT):(W(ve)||ye(Z,"Invalid tagname in closing tag"),Z.state=V.CLOSE_TAG_SAW_WHITE);else{if(W(ve))continue;z(I,ve)?Z.script?(Z.script+="</"+ve,Z.state=V.SCRIPT):ye(Z,"Invalid tagname in closing tag."):Z.tagName=ve}continue;case V.CLOSE_TAG_SAW_WHITE:if(W(ve))continue;ve===">"?q(Z):ye(Z,"Invalid characters in closing tag");continue;case V.TEXT_ENTITY:case V.ATTRIB_VALUE_ENTITY_Q:case V.ATTRIB_VALUE_ENTITY_U:var rt,nt;switch(Z.state){case V.TEXT_ENTITY:rt=V.TEXT,nt="textNode";break;case V.ATTRIB_VALUE_ENTITY_Q:rt=V.ATTRIB_VALUE_QUOTED,nt="attribValue";break;case V.ATTRIB_VALUE_ENTITY_U:rt=V.ATTRIB_VALUE_UNQUOTED,nt="attribValue";break}ve===";"?(Z[nt]+=ee(Z),Z.entity="",Z.state=rt):B(Z.entity.length?H:L,ve)?Z.entity+=ve:(ye(Z,"Invalid character in entity name"),Z[nt]+="&"+Z.entity+ve,Z.entity="",Z.state=rt);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}}return Z.position>=Z.bufferCheckPosition&&i(Z),Z}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var X=String.fromCharCode,Z=Math.floor,xe=function(){var Oe=16384,Qe=[],rt,nt,ct=-1,dt=arguments.length;if(!dt)return"";for(var pt="";++ct<dt;){var He=Number(arguments[ct]);if(!isFinite(He)||He<0||He>1114111||Z(He)!==He)throw RangeError("Invalid code point: "+He);He<=65535?Qe.push(He):(He-=65536,rt=(He>>10)+55296,nt=He%1024+56320,Qe.push(rt,nt)),(ct+1===dt||Qe.length>Oe)&&(pt+=X.apply(null,Qe),Qe.length=0)}return pt};o.default?Object.defineProperty(String,"fromCodePoint",{value:xe,configurable:!0,writable:!0}):String.fromCodePoint=xe}()})(typeof M=="undefined"?(void 0).sax={}:M)}).call(this,N("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(N,J,M){J.exports=S;var D=N("events").EventEmitter,m=N("inherits");m(S,D),S.Readable=N("readable-stream/readable.js"),S.Writable=N("readable-stream/writable.js"),S.Duplex=N("readable-stream/duplex.js"),S.Transform=N("readable-stream/transform.js"),S.PassThrough=N("readable-stream/passthrough.js"),S.Stream=S;function S(){D.call(this)}S.prototype.pipe=function(P,c){var h=this;function w(f){P.writable&&(P.write(f)===!1&&h.pause&&h.pause())}h.on("data",w);function d(){h.readable&&h.resume&&h.resume()}P.on("drain",d),!P._isStdio&&(!c||c.end!==!1)&&(h.on("end",a),h.on("close",n));var o=!1;function a(){if(o)return;o=!0,P.end()}function n(){if(o)return;o=!0,typeof P.destroy=="function"&&P.destroy()}function u(f){if(p(),D.listenerCount(this,"error")===0)throw f}h.on("error",u),P.on("error",u);function p(){h.removeListener("data",w),P.removeListener("drain",d),h.removeListener("end",a),h.removeListener("close",n),h.removeListener("error",u),P.removeListener("error",u),h.removeListener("end",p),h.removeListener("close",p),P.removeListener("close",p)}return h.on("end",p),h.on("close",p),P.on("close",p),P.emit("pipe",h),P}},{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(N,J,M){(function(D){var m=N("./lib/request"),S=N("./lib/response"),P=N("xtend"),c=N("builtin-status-codes"),h=N("url"),w=M;w.request=function(d,o){typeof d=="string"?d=h.parse(d):d=P(d);var a=D.location.protocol.search(/^https?:$/)===-1?"http:":"",n=d.protocol||a,u=d.hostname||d.host,p=d.port,f=d.path||"/";u&&u.indexOf(":")!==-1&&(u="["+u+"]"),d.url=(u?n+"//"+u:"")+(p?":"+p:"")+f,d.method=(d.method||"GET").toUpperCase(),d.headers=d.headers||{};var v=new m(d);return o&&v.on("response",o),v},w.get=function(o,a){var n=w.request(o,a);return n.end(),n},w.ClientRequest=m,w.IncomingMessage=S.IncomingMessage,w.Agent=function(){},w.Agent.defaultMaxSockets=4,w.globalAgent=new w.Agent,w.STATUS_CODES=c,w.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(N,J,M){(function(D){"use strict";M.fetch=w(D.fetch)&&w(D.ReadableStream),M.writableStream=w(D.WritableStream),M.abortController=w(D.AbortController),M.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),M.blobConstructor=!0}catch(d){}var m;function S(){if(m!==void 0)return m;if(D.XMLHttpRequest){m=new D.XMLHttpRequest;try{m.open("GET",D.XDomainRequest?"/":"https://example.com")}catch(d){m=null}}else m=null;return m}function P(d){var o=S();if(!o)return!1;try{return o.responseType=d,o.responseType===d}catch(a){}return!1}var c=typeof D.ArrayBuffer!="undefined",h=c&&w(D.ArrayBuffer.prototype.slice);M.arraybuffer=M.fetch||c&&P("arraybuffer"),M.msstream=!M.fetch&&h&&P("ms-stream"),M.mozchunkedarraybuffer=!M.fetch&&c&&P("moz-chunked-arraybuffer"),M.overrideMimeType=M.fetch||(S()?w(S().overrideMimeType):!1),M.vbArray=w(D.VBArray);function w(d){return typeof d=="function"}m=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(N,J,M){(function(D,m,S){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=h(P);function h(i){return i&&i.__esModule?i:{default:i}}var w=N("./capability"),d=N("inherits"),o=N("./response"),a=N("readable-stream"),n=N("to-arraybuffer"),u=o.IncomingMessage,p=o.readyStates;function f(i,s){return w.fetch&&s?"fetch":w.mozchunkedarraybuffer?"moz-chunked-arraybuffer":w.msstream?"ms-stream":w.arraybuffer&&i?"arraybuffer":w.vbArray&&i?"text:vbarray":"text"}var v=J.exports=function(i){var s=this;a.Writable.call(s),s._opts=i,s._body=[],s._headers={},i.auth&&s.setHeader("Authorization","Basic "+new S(i.auth).toString("base64")),(0,c.default)(i.headers).forEach(function(_){s.setHeader(_,i.headers[_])});var t,T=!0;if(i.mode==="disable-fetch"||"requestTimeout"in i&&!w.abortController)T=!1,t=!0;else if(i.mode==="prefer-streaming")t=!1;else if(i.mode==="allow-wrong-content-type")t=!w.overrideMimeType;else if(!i.mode||i.mode==="default"||i.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");s._mode=f(t,T),s._fetchTimer=null,s.on("finish",function(){s._onFinish()})};d(v,a.Writable),v.prototype.setHeader=function(i,s){var t=this,T=i.toLowerCase();if(b.indexOf(T)!==-1)return;t._headers[T]={name:i,value:s}},v.prototype.getHeader=function(i){var s=this._headers[i.toLowerCase()];return s?s.value:null},v.prototype.removeHeader=function(i){var s=this;delete s._headers[i.toLowerCase()]},v.prototype._onFinish=function(){var i=this;if(i._destroyed)return;var s=i._opts,t=i._headers,T=null;s.method!=="GET"&&s.method!=="HEAD"&&(w.arraybuffer?T=n(S.concat(i._body)):w.blobConstructor?T=new m.Blob(i._body.map(function(y){return n(y)}),{type:(t["content-type"]||{}).value||""}):T=S.concat(i._body).toString());var _=[];if((0,c.default)(t).forEach(function(y){var E=t[y].name,C=t[y].value;Array.isArray(C)?C.forEach(function(I){_.push([E,I])}):_.push([E,C])}),i._mode==="fetch"){var l=null,k=null;if(w.abortController){var O=new AbortController;l=O.signal,i._fetchAbortController=O,"requestTimeout"in s&&s.requestTimeout!==0&&(i._fetchTimer=m.setTimeout(function(){i.emit("requestTimeout"),i._fetchAbortController&&i._fetchAbortController.abort()},s.requestTimeout))}m.fetch(i._opts.url,{method:i._opts.method,headers:_,body:T||void 0,mode:"cors",credentials:s.withCredentials?"include":"same-origin",signal:l}).then(function(y){i._fetchResponse=y,i._connect()},function(y){m.clearTimeout(i._fetchTimer),i._destroyed||i.emit("error",y)})}else{var x=i._xhr=new m.XMLHttpRequest;try{x.open(i._opts.method,i._opts.url,!0)}catch(y){D.nextTick(function(){i.emit("error",y)});return}"responseType"in x&&(x.responseType=i._mode.split(":")[0]),"withCredentials"in x&&(x.withCredentials=!!s.withCredentials),i._mode==="text"&&"overrideMimeType"in x&&x.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in s&&(x.timeout=s.requestTimeout,x.ontimeout=function(){i.emit("requestTimeout")}),_.forEach(function(y){x.setRequestHeader(y[0],y[1])}),i._response=null,x.onreadystatechange=function(){switch(x.readyState){case p.LOADING:case p.DONE:i._onXHRProgress();break}},i._mode==="moz-chunked-arraybuffer"&&(x.onprogress=function(){i._onXHRProgress()}),x.onerror=function(){if(i._destroyed)return;i.emit("error",new Error("XHR error"))};try{x.send(T)}catch(y){D.nextTick(function(){i.emit("error",y)});return}}};function g(i){try{var s=i.status;return s!==null&&s!==0}catch(t){return!1}}v.prototype._onXHRProgress=function(){var i=this;if(!g(i._xhr)||i._destroyed)return;i._response||i._connect(),i._response._onXHRProgress()},v.prototype._connect=function(){var i=this;if(i._destroyed)return;i._response=new u(i._xhr,i._fetchResponse,i._mode,i._fetchTimer),i._response.on("error",function(s){i.emit("error",s)}),i.emit("response",i._response)},v.prototype._write=function(i,s,t){var T=this;T._body.push(i),t()},v.prototype.abort=v.prototype.destroy=function(){var i=this;i._destroyed=!0,m.clearTimeout(i._fetchTimer),i._response&&(i._response._destroyed=!0),i._xhr?i._xhr.abort():i._fetchAbortController&&i._fetchAbortController.abort()},v.prototype.end=function(i,s,t){var T=this;typeof i=="function"&&(t=i,i=void 0),a.Writable.prototype.end.call(T,i,s,t)},v.prototype.flushHeaders=function(){},v.prototype.setTimeout=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var b=["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,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("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(N,J,M){(function(D,m,S){"use strict";var P=N("babel-runtime/core-js/promise"),c=h(P);function h(u){return u&&u.__esModule?u:{default:u}}var w=N("./capability"),d=N("inherits"),o=N("readable-stream"),a=M.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=M.IncomingMessage=function(u,p,f,v){var g=this;if(o.Readable.call(g),g._mode=f,g.headers={},g.rawHeaders=[],g.trailers={},g.rawTrailers=[],g.on("end",function(){D.nextTick(function(){g.emit("close")})}),f==="fetch"){var b=function l(){s.read().then(function(k){if(g._destroyed)return;if(k.done){m.clearTimeout(v),g.push(null);return}g.push(new S(k.value)),l()}).catch(function(k){m.clearTimeout(v),g._destroyed||g.emit("error",k)})};if(g._fetchResponse=p,g.url=p.url,g.statusCode=p.status,g.statusMessage=p.statusText,p.headers.forEach(function(l,k){g.headers[k.toLowerCase()]=l,g.rawHeaders.push(k,l)}),w.writableStream){var i=new WritableStream({write:function(k){return new c.default(function(O,x){g._destroyed?x():g.push(new S(k))?O():g._resumeFetch=O})},close:function(){m.clearTimeout(v),g._destroyed||g.push(null)},abort:function(k){g._destroyed||g.emit("error",k)}});try{p.body.pipeTo(i).catch(function(l){m.clearTimeout(v),g._destroyed||g.emit("error",l)});return}catch(l){}}var s=p.body.getReader();b()}else{g._xhr=u,g._pos=0,g.url=u.responseURL,g.statusCode=u.status,g.statusMessage=u.statusText;var t=u.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(l){var k=l.match(/^([^:]+):\s*(.*)/);if(k){var O=k[1].toLowerCase();O==="set-cookie"?(g.headers[O]===void 0&&(g.headers[O]=[]),g.headers[O].push(k[2])):g.headers[O]!==void 0?g.headers[O]+=", "+k[2]:g.headers[O]=k[2],g.rawHeaders.push(k[1],k[2])}}),g._charset="x-user-defined",!w.overrideMimeType){var T=g.rawHeaders["mime-type"];if(T){var _=T.match(/;\s*charset=([^;])(;|$)/);_&&(g._charset=_[1].toLowerCase())}g._charset||(g._charset="utf-8")}}};d(n,o.Readable),n.prototype._read=function(){var u=this,p=u._resumeFetch;p&&(u._resumeFetch=null,p())},n.prototype._onXHRProgress=function(){var u=this,p=u._xhr,f=null;switch(u._mode){case"text:vbarray":if(p.readyState!==a.DONE)break;try{f=new m.VBArray(p.responseBody).toArray()}catch(s){}if(f!==null){u.push(new S(f));break}case"text":try{f=p.responseText}catch(s){u._mode="text:vbarray";break}if(f.length>u._pos){var v=f.substr(u._pos);if(u._charset==="x-user-defined"){for(var g=new S(v.length),b=0;b<v.length;b++)g[b]=v.charCodeAt(b)&255;u.push(g)}else u.push(v,u._charset);u._pos=f.length}break;case"arraybuffer":if(p.readyState!==a.DONE||!p.response)break;f=p.response,u.push(new S(new Uint8Array(f)));break;case"moz-chunked-arraybuffer":if(f=p.response,p.readyState!==a.LOADING||!f)break;u.push(new S(new Uint8Array(f)));break;case"ms-stream":if(f=p.response,p.readyState!==a.LOADING)break;var i=new m.MSStreamReader;i.onprogress=function(){i.result.byteLength>u._pos&&(u.push(new S(new Uint8Array(i.result.slice(u._pos)))),u._pos=i.result.byteLength)},i.onload=function(){u.push(null)},i.readAsArrayBuffer(f);break}u._xhr.readyState===a.DONE&&u._mode!=="ms-stream"&&u.push(null)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(N,J,M){"use strict";var D=N("safe-buffer").Buffer,m=D.isEncoding||function(i){i=""+i;switch(i&&i.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 S(i){if(!i)return"utf8";for(var s;;)switch(i){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 i;default:if(s)return;i=(""+i).toLowerCase(),s=!0}}function P(i){var s=S(i);if(typeof s!="string"&&(D.isEncoding===m||!m(i)))throw new Error("Unknown encoding: "+i);return s||i}M.StringDecoder=c;function c(i){this.encoding=P(i);var s;switch(this.encoding){case"utf16le":this.text=u,this.end=p,s=4;break;case"utf8":this.fillLast=o,s=4;break;case"base64":this.text=f,this.end=v,s=3;break;default:this.write=g,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=D.allocUnsafe(s)}c.prototype.write=function(i){if(i.length===0)return"";var s,t;if(this.lastNeed){if(s=this.fillLast(i),s===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<i.length?s?s+this.text(i,t):this.text(i,t):s||""},c.prototype.end=n,c.prototype.text=a,c.prototype.fillLast=function(i){if(this.lastNeed<=i.length)return i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,i.length),this.lastNeed-=i.length};function h(i){return i<=127?0:i>>5===6?2:i>>4===14?3:i>>3===30?4:i>>6===2?-1:-2}function w(i,s,t){var T=s.length-1;if(T<t)return 0;var _=h(s[T]);return _>=0?(_>0&&(i.lastNeed=_-1),_):--T<t||_===-2?0:(_=h(s[T]),_>=0?(_>0&&(i.lastNeed=_-2),_):--T<t||_===-2?0:(_=h(s[T]),_>=0?(_>0&&(_===2?_=0:i.lastNeed=_-3),_):0))}function d(i,s,t){if((s[0]&192)!==128)return i.lastNeed=0,"\uFFFD";if(i.lastNeed>1&&s.length>1){if((s[1]&192)!==128)return i.lastNeed=1,"\uFFFD";if(i.lastNeed>2&&s.length>2&&(s[2]&192)!==128)return i.lastNeed=2,"\uFFFD"}}function o(i){var s=this.lastTotal-this.lastNeed,t=d(this,i,s);if(t!==void 0)return t;if(this.lastNeed<=i.length)return i.copy(this.lastChar,s,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,s,0,i.length),this.lastNeed-=i.length}function a(i,s){var t=w(this,i,s);if(!this.lastNeed)return i.toString("utf8",s);this.lastTotal=t;var T=i.length-(t-this.lastNeed);return i.copy(this.lastChar,0,T),i.toString("utf8",s,T)}function n(i){var s=i&&i.length?this.write(i):"";return this.lastNeed?s+"\uFFFD":s}function u(i,s){if((i.length-s)%2===0){var t=i.toString("utf16le",s);if(t){var T=t.charCodeAt(t.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",s,i.length-1)}function p(i){var s=i&&i.length?this.write(i):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return s+this.lastChar.toString("utf16le",0,t)}return s}function f(i,s){var t=(i.length-s)%3;return t===0?i.toString("base64",s):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",s,i.length-t))}function v(i){var s=i&&i.length?this.write(i):"";return this.lastNeed?s+this.lastChar.toString("base64",0,3-this.lastNeed):s}function g(i){return i.toString(this.encoding)}function b(i){return i&&i.length?this.write(i):""}},{"safe-buffer":228}],236:[function(N,J,M){(function(D,m){var S=N("process/browser.js").nextTick,P=Function.prototype.apply,c=Array.prototype.slice,h={},w=0;M.setTimeout=function(){return new d(P.call(setTimeout,window,arguments),clearTimeout)},M.setInterval=function(){return new d(P.call(setInterval,window,arguments),clearInterval)},M.clearTimeout=M.clearInterval=function(o){o.close()};function d(o,a){this._id=o,this._clearFn=a}d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},M.enroll=function(o,a){clearTimeout(o._idleTimeoutId),o._idleTimeout=a},M.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},M._unrefActive=M.active=function(o){clearTimeout(o._idleTimeoutId);var a=o._idleTimeout;a>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},a))},M.setImmediate=typeof D=="function"?D:function(o){var a=w++,n=arguments.length<2?!1:c.call(arguments,1);return h[a]=!0,S(function(){h[a]&&(n?o.apply(null,n):o.call(null),M.clearImmediate(a))}),a},M.clearImmediate=typeof m=="function"?m:function(o){delete h[o]}}).call(this,N("timers").setImmediate,N("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(N,J,M){var D=N("buffer").Buffer;J.exports=function(m){if(m instanceof Uint8Array){if(m.byteOffset===0&&m.byteLength===m.buffer.byteLength)return m.buffer;if(typeof m.buffer.slice=="function")return m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}if(D.isBuffer(m)){for(var S=new Uint8Array(m.length),P=m.length,c=0;c<P;c++)S[c]=m[c];return S.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(N,J,M){"use strict";var D=N("punycode"),m=N("./util");M.parse=s,M.resolve=T,M.resolveObject=_,M.format=t,M.Url=S;function S(){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 P=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["<",">",'"',"`"," ","\r",`
`," "],d=["{","}","|","\\","^","`"].concat(w),o=["'"].concat(d),a=["%","/","?",";","#"].concat(o),n=["/","?","#"],u=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},i=N("querystring");function s(l,k,O){if(l&&m.isObject(l)&&l instanceof S)return l;var x=new S;return x.parse(l,k,O),x}S.prototype.parse=function(l,k,O){if(!m.isString(l))throw new TypeError("Parameter 'url' must be a string, not "+typeof l);var x=l.indexOf("?"),y=x!==-1&&x<l.indexOf("#")?"?":"#",E=l.split(y),C=/\\/g;E[0]=E[0].replace(C,"/"),l=E.join(y);var I=l;if(I=I.trim(),!O&&l.split("#").length===1){var j=h.exec(I);if(j)return this.path=I,this.href=I,this.pathname=j[1],j[2]?(this.search=j[2],k?this.query=i.parse(this.search.substr(1)):this.query=this.search.substr(1)):k&&(this.search="",this.query={}),this}var L=P.exec(I);if(L){L=L[0];var H=L.toLowerCase();this.protocol=H,I=I.substr(L.length)}if(O||L||I.match(/^\/\/[^@\/]+@[^@\/]+/)){var W=I.substr(0,2)==="//";W&&!(L&&g[L])&&(I=I.substr(2),this.slashes=!0)}if(!g[L]&&(W||L&&!b[L])){for(var U=-1,G=0;G<n.length;G++){var B=I.indexOf(n[G]);B!==-1&&(U===-1||B<U)&&(U=B)}var z,V;U===-1?V=I.lastIndexOf("@"):V=I.lastIndexOf("@",U),V!==-1&&(z=I.slice(0,V),I=I.slice(V+1),this.auth=decodeURIComponent(z)),U=-1;for(var G=0;G<a.length;G++){var B=I.indexOf(a[G]);B!==-1&&(U===-1||B<U)&&(U=B)}U===-1&&(U=I.length),this.host=I.slice(0,U),I=I.slice(U),this.parseHost(),this.hostname=this.hostname||"";var ie=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ie)for(var ce=this.hostname.split(/\./),G=0,he=ce.length;G<he;G++){var Ae=ce[G];if(!Ae)continue;if(!Ae.match(p)){for(var De="",pe=0,Te=Ae.length;pe<Te;pe++)Ae.charCodeAt(pe)>127?De+="x":De+=Ae[pe];if(!De.match(p)){var ye=ce.slice(0,G),ue=ce.slice(G+1),le=Ae.match(f);le&&(ye.push(le[1]),ue.unshift(le[2])),ue.length&&(I="/"+ue.join(".")+I),this.hostname=ye.join(".");break}}}this.hostname.length>u?this.hostname="":this.hostname=this.hostname.toLowerCase(),ie||(this.hostname=D.toASCII(this.hostname));var te=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+te,this.href+=this.host,ie&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!v[H])for(var G=0,he=o.length;G<he;G++){var q=o[G];if(I.indexOf(q)===-1)continue;var ee=encodeURIComponent(q);ee===q&&(ee=escape(q)),I=I.split(q).join(ee)}var Ce=I.indexOf("#");Ce!==-1&&(this.hash=I.substr(Ce),I=I.slice(0,Ce));var re=I.indexOf("?");if(re!==-1?(this.search=I.substr(re),this.query=I.substr(re+1),k&&(this.query=i.parse(this.query)),I=I.slice(0,re)):k&&(this.search="",this.query={}),I&&(this.pathname=I),b[H]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var te=this.pathname||"",Q=this.search||"";this.path=te+Q}return this.href=this.format(),this};function t(l){return m.isString(l)&&(l=s(l)),l instanceof S?l.format():S.prototype.format.call(l)}S.prototype.format=function(){var l=this.auth||"";l&&(l=encodeURIComponent(l),l=l.replace(/%3A/i,":"),l+="@");var k=this.protocol||"",O=this.pathname||"",x=this.hash||"",y=!1,E="";this.host?y=l+this.host:this.hostname&&(y=l+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(y+=":"+this.port)),this.query&&m.isObject(this.query)&&Object.keys(this.query).length&&(E=i.stringify(this.query));var C=this.search||E&&"?"+E||"";return k&&k.substr(-1)!==":"&&(k+=":"),this.slashes||(!k||b[k])&&y!==!1?(y="//"+(y||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):y||(y=""),x&&x.charAt(0)!=="#"&&(x="#"+x),C&&C.charAt(0)!=="?"&&(C="?"+C),O=O.replace(/[?#]/g,function(I){return encodeURIComponent(I)}),C=C.replace("#","%23"),k+y+O+C+x};function T(l,k){return s(l,!1,!0).resolve(k)}S.prototype.resolve=function(l){return this.resolveObject(s(l,!1,!0)).format()};function _(l,k){return l?s(l,!1,!0).resolveObject(k):k}S.prototype.resolveObject=function(l){if(m.isString(l)){var k=new S;k.parse(l,!1,!0),l=k}for(var O=new S,x=Object.keys(this),y=0;y<x.length;y++){var E=x[y];O[E]=this[E]}if(O.hash=l.hash,l.href==="")return O.href=O.format(),O;if(l.slashes&&!l.protocol){for(var C=Object.keys(l),I=0;I<C.length;I++){var j=C[I];j!=="protocol"&&(O[j]=l[j])}return b[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(l.protocol&&l.protocol!==O.protocol){if(!b[l.protocol]){for(var L=Object.keys(l),H=0;H<L.length;H++){var W=L[H];O[W]=l[W]}return O.href=O.format(),O}if(O.protocol=l.protocol,!l.host&&!g[l.protocol]){for(var he=(l.pathname||"").split("/");he.length&&!(l.host=he.shift()););l.host||(l.host=""),l.hostname||(l.hostname=""),he[0]!==""&&he.unshift(""),he.length<2&&he.unshift(""),O.pathname=he.join("/")}else O.pathname=l.pathname;if(O.search=l.search,O.query=l.query,O.host=l.host||"",O.auth=l.auth,O.hostname=l.hostname||l.host,O.port=l.port,O.pathname||O.search){var U=O.pathname||"",G=O.search||"";O.path=U+G}return O.slashes=O.slashes||l.slashes,O.href=O.format(),O}var B=O.pathname&&O.pathname.charAt(0)==="/",z=l.host||l.pathname&&l.pathname.charAt(0)==="/",V=z||B||O.host&&l.pathname,ie=V,ce=O.pathname&&O.pathname.split("/")||[],he=l.pathname&&l.pathname.split("/")||[],Ae=O.protocol&&!b[O.protocol];if(Ae&&(O.hostname="",O.port=null,O.host&&(ce[0]===""?ce[0]=O.host:ce.unshift(O.host)),O.host="",l.protocol&&(l.hostname=null,l.port=null,l.host&&(he[0]===""?he[0]=l.host:he.unshift(l.host)),l.host=null),V=V&&(he[0]===""||ce[0]==="")),z)O.host=l.host||l.host===""?l.host:O.host,O.hostname=l.hostname||l.hostname===""?l.hostname:O.hostname,O.search=l.search,O.query=l.query,ce=he;else if(he.length)ce||(ce=[]),ce.pop(),ce=ce.concat(he),O.search=l.search,O.query=l.query;else if(!m.isNullOrUndefined(l.search)){if(Ae){O.hostname=O.host=ce.shift();var De=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;De&&(O.auth=De.shift(),O.host=O.hostname=De.shift())}return O.search=l.search,O.query=l.query,(!m.isNull(O.pathname)||!m.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ce.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var pe=ce.slice(-1)[0],Te=(O.host||l.host||ce.length>1)&&(pe==="."||pe==="..")||pe==="",ye=0,ue=ce.length;ue>=0;ue--)pe=ce[ue],pe==="."?ce.splice(ue,1):pe===".."?(ce.splice(ue,1),ye++):ye&&(ce.splice(ue,1),ye--);if(!V&&!ie)for(;ye--;ye)ce.unshift("..");V&&ce[0]!==""&&(!ce[0]||ce[0].charAt(0)!=="/")&&ce.unshift(""),Te&&ce.join("/").substr(-1)!=="/"&&ce.push("");var le=ce[0]===""||ce[0]&&ce[0].charAt(0)==="/";if(Ae){O.hostname=O.host=le?"":ce.length?ce.shift():"";var De=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;De&&(O.auth=De.shift(),O.host=O.hostname=De.shift())}return V=V||O.host&&ce.length,V&&!le&&ce.unshift(""),ce.length?O.pathname=ce.join("/"):(O.pathname=null,O.path=null),(!m.isNull(O.pathname)||!m.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=l.auth||O.auth,O.slashes=O.slashes||l.slashes,O.href=O.format(),O},S.prototype.parseHost=function(){var l=this.host,k=c.exec(l);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),l=l.substr(0,l.length-k.length)),l&&(this.hostname=l)}},{"./util":239,punycode:209,querystring:212}],239:[function(N,J,M){"use strict";J.exports={isString:function(D){return typeof D=="string"},isObject:function(D){return typeof D=="object"&&D!==null},isNull:function(D){return D===null},isNullOrUndefined:function(D){return D==null}}},{}],240:[function(N,J,M){(function(D){J.exports=m;function m(P,c){if(S("noDeprecation"))return P;var h=!1;function w(){if(!h){if(S("throwDeprecation"))throw new Error(c);S("traceDeprecation")?console.trace(c):console.warn(c),h=!0}return P.apply(this,arguments)}return w}function S(P){try{if(!D.localStorage)return!1}catch(h){return!1}var c=D.localStorage[P];return c==null?!1:String(c).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(N,J,M){typeof Object.create=="function"?J.exports=function(m,S){m.super_=S,m.prototype=Object.create(S.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:J.exports=function(m,S){m.super_=S;var P=function(){};P.prototype=S.prototype,m.prototype=new P,m.prototype.constructor=m}},{}],242:[function(N,J,M){J.exports=function(m){return m&&typeof m=="object"&&typeof m.copy=="function"&&typeof m.fill=="function"&&typeof m.readUInt8=="function"}},{}],243:[function(N,J,M){(function(D,m){var S=/%[sdj%]/g;M.format=function(U){if(!T(U)){for(var G=[],B=0;B<arguments.length;B++)G.push(h(arguments[B]));return G.join(" ")}for(var B=1,z=arguments,V=z.length,ie=String(U).replace(S,function(he){if(he==="%%")return"%";if(B>=V)return he;switch(he){case"%s":return String(z[B++]);case"%d":return Number(z[B++]);case"%j":try{return JSON.stringify(z[B++])}catch(Ae){return"[Circular]"}default:return he}}),ce=z[B];B<V;ce=z[++B])i(ce)||!O(ce)?ie+=" "+ce:ie+=" "+h(ce);return ie},M.deprecate=function(U,G){if(l(m.process))return function(){return M.deprecate(U,G).apply(this,arguments)};if(D.noDeprecation===!0)return U;var B=!1;function z(){if(!B){if(D.throwDeprecation)throw new Error(G);D.traceDeprecation?console.trace(G):console.error(G),B=!0}return U.apply(this,arguments)}return z};var P={},c;M.debuglog=function(U){if(l(c)&&(c=D.env.NODE_DEBUG||""),U=U.toUpperCase(),!P[U])if(new RegExp("\\b"+U+"\\b","i").test(c)){var G=D.pid;P[U]=function(){var B=M.format.apply(M,arguments);console.error("%s %d: %s",U,G,B)}}else P[U]=function(){};return P[U]};function h(U,G){var B={seen:[],stylize:d};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),b(G)?B.showHidden=G:G&&M._extend(B,G),l(B.showHidden)&&(B.showHidden=!1),l(B.depth)&&(B.depth=2),l(B.colors)&&(B.colors=!1),l(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=w),a(B,U,B.depth)}M.inspect=h,h.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]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function w(U,G){var B=h.styles[G];return B?"["+h.colors[B][0]+"m"+U+"["+h.colors[B][1]+"m":U}function d(U,G){return U}function o(U){var G={};return U.forEach(function(B,z){G[B]=!0}),G}function a(U,G,B){if(U.customInspect&&G&&E(G.inspect)&&G.inspect!==M.inspect&&!(G.constructor&&G.constructor.prototype===G)){var z=G.inspect(B,U);return T(z)||(z=a(U,z,B)),z}var V=n(U,G);if(V)return V;var ie=Object.keys(G),ce=o(ie);if(U.showHidden&&(ie=Object.getOwnPropertyNames(G)),y(G)&&(ie.indexOf("message")>=0||ie.indexOf("description")>=0))return u(G);if(ie.length===0){if(E(G)){var he=G.name?": "+G.name:"";return U.stylize("[Function"+he+"]","special")}if(k(G))return U.stylize(RegExp.prototype.toString.call(G),"regexp");if(x(G))return U.stylize(Date.prototype.toString.call(G),"date");if(y(G))return u(G)}var Ae="",De=!1,pe=["{","}"];if(g(G)&&(De=!0,pe=["[","]"]),E(G)){var Te=G.name?": "+G.name:"";Ae=" [Function"+Te+"]"}if(k(G)&&(Ae=" "+RegExp.prototype.toString.call(G)),x(G)&&(Ae=" "+Date.prototype.toUTCString.call(G)),y(G)&&(Ae=" "+u(G)),ie.length===0&&(!De||G.length==0))return pe[0]+Ae+pe[1];if(B<0)return k(G)?U.stylize(RegExp.prototype.toString.call(G),"regexp"):U.stylize("[Object]","special");U.seen.push(G);var ye;return De?ye=p(U,G,B,ce,ie):ye=ie.map(function(ue){return f(U,G,B,ce,ue,De)}),U.seen.pop(),v(ye,Ae,pe)}function n(U,G){if(l(G))return U.stylize("undefined","undefined");if(T(G)){var B="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(B,"string")}if(t(G))return U.stylize(""+G,"number");if(b(G))return U.stylize(""+G,"boolean");if(i(G))return U.stylize("null","null")}function u(U){return"["+Error.prototype.toString.call(U)+"]"}function p(U,G,B,z,V){for(var ie=[],ce=0,he=G.length;ce<he;++ce)W(G,String(ce))?ie.push(f(U,G,B,z,String(ce),!0)):ie.push("");return V.forEach(function(Ae){Ae.match(/^\d+$/)||ie.push(f(U,G,B,z,Ae,!0))}),ie}function f(U,G,B,z,V,ie){var ce,he,Ae;if(Ae=Object.getOwnPropertyDescriptor(G,V)||{value:G[V]},Ae.get?Ae.set?he=U.stylize("[Getter/Setter]","special"):he=U.stylize("[Getter]","special"):Ae.set&&(he=U.stylize("[Setter]","special")),W(z,V)||(ce="["+V+"]"),he||(U.seen.indexOf(Ae.value)<0?(i(B)?he=a(U,Ae.value,null):he=a(U,Ae.value,B-1),he.indexOf(`
`)>-1&&(ie?he=he.split(`
`).map(function(De){return" "+De}).join(`
`).substr(2):he=`
`+he.split(`
`).map(function(De){return" "+De}).join(`
`))):he=U.stylize("[Circular]","special")),l(ce)){if(ie&&V.match(/^\d+$/))return he;ce=JSON.stringify(""+V),ce.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ce=ce.substr(1,ce.length-2),ce=U.stylize(ce,"name")):(ce=ce.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ce=U.stylize(ce,"string"))}return ce+": "+he}function v(U,G,B){var z=0,V=U.reduce(function(ie,ce){return z++,ce.indexOf(`
`)>=0&&z++,ie+ce.replace(/\u001b\[\d\d?m/g,"").length+1},0);return V>60?B[0]+(G===""?"":G+`
`)+" "+U.join(`,
`)+" "+B[1]:B[0]+G+" "+U.join(", ")+" "+B[1]}function g(U){return Array.isArray(U)}M.isArray=g;function b(U){return typeof U=="boolean"}M.isBoolean=b;function i(U){return U===null}M.isNull=i;function s(U){return U==null}M.isNullOrUndefined=s;function t(U){return typeof U=="number"}M.isNumber=t;function T(U){return typeof U=="string"}M.isString=T;function _(U){return typeof U=="symbol"}M.isSymbol=_;function l(U){return U===void 0}M.isUndefined=l;function k(U){return O(U)&&I(U)==="[object RegExp]"}M.isRegExp=k;function O(U){return typeof U=="object"&&U!==null}M.isObject=O;function x(U){return O(U)&&I(U)==="[object Date]"}M.isDate=x;function y(U){return O(U)&&(I(U)==="[object Error]"||U instanceof Error)}M.isError=y;function E(U){return typeof U=="function"}M.isFunction=E;function C(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U=="undefined"}M.isPrimitive=C,M.isBuffer=N("./support/isBuffer");function I(U){return Object.prototype.toString.call(U)}function j(U){return U<10?"0"+U.toString(10):U.toString(10)}var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function H(){var U=new Date,G=[j(U.getHours()),j(U.getMinutes()),j(U.getSeconds())].join(":");return[U.getDate(),L[U.getMonth()],G].join(" ")}M.log=function(){console.log("%s - %s",H(),M.format.apply(M,arguments))},M.inherits=N("inherits"),M._extend=function(U,G){if(!G||!O(G))return U;for(var B=Object.keys(G),z=B.length;z--;)U[B[z]]=G[B[z]];return U};function W(U,G){return Object.prototype.hasOwnProperty.call(U,G)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(N,J,M){"use strict";(function(){"use strict";M.stripBOM=function(D){return D[0]==="\uFEFF"?D.substring(1):D}}).call(void 0)},{}],245:[function(N,J,M){"use strict";var D=N("babel-runtime/helpers/typeof"),m=c(D),S=N("babel-runtime/core-js/object/keys"),P=c(S);function c(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,w,d,o,a,n={}.hasOwnProperty;h=N("xmlbuilder"),w=N("./defaults").defaults,o=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},a=function(p){return"<![CDATA["+d(p)+"]]>"},d=function(p){return p.replace("]]>","]]]]><![CDATA[>")},M.Builder=function(){function u(p){var f,v,g;this.options={},v=w["0.2"];for(f in v){if(!n.call(v,f))continue;g=v[f],this.options[f]=g}for(f in p){if(!n.call(p,f))continue;g=p[f],this.options[f]=g}}return u.prototype.buildObject=function(p){var f,v,g,b,i;return f=this.options.attrkey,v=this.options.charkey,(0,P.default)(p).length===1&&this.options.rootName===w["0.2"].rootName?(i=(0,P.default)(p)[0],p=p[i]):i=this.options.rootName,g=function(s){return function(t,T){var _,l,k,O,x,y;if((typeof T=="undefined"?"undefined":(0,m.default)(T))!=="object")s.options.cdata&&o(T)?t.raw(a(T)):t.txt(T);else if(Array.isArray(T))for(O in T){if(!n.call(T,O))continue;l=T[O];for(x in l)k=l[x],t=g(t.ele(x),k).up()}else for(x in T){if(!n.call(T,x))continue;if(l=T[x],x===f){if((typeof l=="undefined"?"undefined":(0,m.default)(l))==="object")for(_ in l)y=l[_],t=t.att(_,y)}else if(x===v)s.options.cdata&&o(l)?t=t.raw(a(l)):t=t.txt(l);else if(Array.isArray(l))for(O in l){if(!n.call(l,O))continue;k=l[O],typeof k=="string"?s.options.cdata&&o(k)?t=t.ele(x).raw(a(k)).up():t=t.ele(x,k).up():t=g(t.ele(x),k).up()}else(typeof l=="undefined"?"undefined":(0,m.default)(l))==="object"?t=g(t.ele(x),l).up():typeof l=="string"&&s.options.cdata&&o(l)?t=t.ele(x).raw(a(l)).up():(l==null&&(l=""),t=t.ele(x,l.toString()).up())}return t}}(this),b=h.create(i,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(b,p).end(this.options.renderOpts)},u}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(N,J,M){"use strict";(function(){M.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(N,J,M){"use strict";var D=N("babel-runtime/core-js/promise"),m=o(D),S=N("babel-runtime/core-js/object/get-own-property-names"),P=o(S),c=N("babel-runtime/core-js/object/keys"),h=o(c),w=N("babel-runtime/helpers/typeof"),d=o(w);function o(a){return a&&a.__esModule?a:{default:a}}(function(){"use strict";var a,n,u,p,f,v,g,b,i=function(_,l){return function(){return _.apply(l,arguments)}},s=function(_,l){for(var k in l)t.call(l,k)&&(_[k]=l[k]);function O(){this.constructor=_}return O.prototype=l.prototype,_.prototype=new O,_.__super__=l.prototype,_},t={}.hasOwnProperty;g=N("sax"),u=N("events"),a=N("./bom"),v=N("./processors"),b=N("timers").setImmediate,n=N("./defaults").defaults,p=function(_){return(typeof _=="undefined"?"undefined":(0,d.default)(_))==="object"&&_!=null&&(0,h.default)(_).length===0},f=function(_,l,k){var O,x,y;for(O=0,x=_.length;O<x;O++)y=_[O],l=y(l,k);return l},M.Parser=function(T){s(_,T);function _(l){this.parseStringPromise=i(this.parseStringPromise,this),this.parseString=i(this.parseString,this),this.reset=i(this.reset,this),this.assignOrPush=i(this.assignOrPush,this),this.processAsync=i(this.processAsync,this);var k,O,x;if(!(this instanceof M.Parser))return new M.Parser(l);this.options={},O=n["0.2"];for(k in O){if(!t.call(O,k))continue;x=O[k],this.options[k]=x}for(k in l){if(!t.call(l,k))continue;x=l[k],this.options[k]=x}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(v.normalize)),this.reset()}return _.prototype.processAsync=function(){var l,k;try{return this.remaining.length<=this.options.chunkSize?(l=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(l),this.saxParser.close()):(l=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(l),b(this.processAsync))}catch(O){if(k=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(k)}},_.prototype.assignOrPush=function(l,k,O){return k in l?(l[k]instanceof Array||(l[k]=[l[k]]),l[k].push(O)):this.options.explicitArray?l[k]=[O]:l[k]=O},_.prototype.reset=function(){var l,k,O,x;return this.removeAllListeners(),this.saxParser=g.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(y){return function(E){if(y.saxParser.resume(),!y.saxParser.errThrown)return y.saxParser.errThrown=!0,y.emit("error",E)}}(this),this.saxParser.onend=function(y){return function(){if(!y.saxParser.ended)return y.saxParser.ended=!0,y.emit("end",y.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,x=[],l=this.options.attrkey,k=this.options.charkey,this.saxParser.onopentag=function(y){return function(E){var C,I,j,L,H;if(j={},j[k]="",!y.options.ignoreAttrs){H=E.attributes;for(C in H){if(!t.call(H,C))continue;!(l in j)&&!y.options.mergeAttrs&&(j[l]={}),I=y.options.attrValueProcessors?f(y.options.attrValueProcessors,E.attributes[C],C):E.attributes[C],L=y.options.attrNameProcessors?f(y.options.attrNameProcessors,C):C,y.options.mergeAttrs?y.assignOrPush(j,L,I):j[l][L]=I}}return j["#name"]=y.options.tagNameProcessors?f(y.options.tagNameProcessors,E.name):E.name,y.options.xmlns&&(j[y.options.xmlnskey]={uri:E.uri,local:E.local}),x.push(j)}}(this),this.saxParser.onclosetag=function(y){return function(){var E,C,I,j,L,H,W,U,G,B;if(H=x.pop(),L=H["#name"],(!y.options.explicitChildren||!y.options.preserveChildrenOrder)&&delete H["#name"],H.cdata===!0&&(E=H.cdata,delete H.cdata),G=x[x.length-1],H[k].match(/^\s*$/)&&!E?(C=H[k],delete H[k]):(y.options.trim&&(H[k]=H[k].trim()),y.options.normalize&&(H[k]=H[k].replace(/\s{2,}/g," ").trim()),H[k]=y.options.valueProcessors?f(y.options.valueProcessors,H[k],L):H[k],(0,h.default)(H).length===1&&k in H&&!y.EXPLICIT_CHARKEY&&(H=H[k])),p(H)&&(H=y.options.emptyTag!==""?y.options.emptyTag:C),y.options.validator!=null&&(B="/"+function(){var z,V,ie;for(ie=[],z=0,V=x.length;z<V;z++)j=x[z],ie.push(j["#name"]);return ie}().concat(L).join("/"),function(){var z;try{return H=y.options.validator(B,G&&G[L],H)}catch(V){return z=V,y.emit("error",z)}}()),y.options.explicitChildren&&!y.options.mergeAttrs&&(typeof H=="undefined"?"undefined":(0,d.default)(H))==="object"){if(!y.options.preserveChildrenOrder)j={},y.options.attrkey in H&&(j[y.options.attrkey]=H[y.options.attrkey],delete H[y.options.attrkey]),!y.options.charsAsChildren&&y.options.charkey in H&&(j[y.options.charkey]=H[y.options.charkey],delete H[y.options.charkey]),(0,P.default)(H).length>0&&(j[y.options.childkey]=H),H=j;else if(G){G[y.options.childkey]=G[y.options.childkey]||[],W={};for(I in H){if(!t.call(H,I))continue;W[I]=H[I]}G[y.options.childkey].push(W),delete H["#name"],(0,h.default)(H).length===1&&k in H&&!y.EXPLICIT_CHARKEY&&(H=H[k])}}return x.length>0?y.assignOrPush(G,L,H):(y.options.explicitRoot&&(U=H,H={},H[L]=U),y.resultObject=H,y.saxParser.ended=!0,y.emit("end",y.resultObject))}}(this),O=function(y){return function(E){var C,I;if(I=x[x.length-1],I)return I[k]+=E,y.options.explicitChildren&&y.options.preserveChildrenOrder&&y.options.charsAsChildren&&(y.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(I[y.options.childkey]=I[y.options.childkey]||[],C={"#name":"__text__"},C[k]=E,y.options.normalize&&(C[k]=C[k].replace(/\s{2,}/g," ").trim()),I[y.options.childkey].push(C)),I}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(y){return function(E){var C;if(C=O(E),C)return C.cdata=!0}}(this)},_.prototype.parseString=function(l,k){var O;k!=null&&typeof k=="function"&&(this.on("end",function(x){return this.reset(),k(null,x)}),this.on("error",function(x){return this.reset(),k(x)}));try{return l=l.toString(),l.trim()===""?(this.emit("end",null),!0):(l=a.stripBOM(l),this.options.async?(this.remaining=l,b(this.processAsync),this.saxParser):this.saxParser.write(l).close())}catch(x){if(O=x,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},_.prototype.parseStringPromise=function(l){return new m.default(function(k){return function(O,x){return k.parseString(l,function(y,E){return y?x(y):O(E)})}}(this))},_}(u),M.parseString=function(T,_,l){var k,O,x;return l!=null?(typeof l=="function"&&(k=l),(typeof _=="undefined"?"undefined":(0,d.default)(_))==="object"&&(O=_)):(typeof _=="function"&&(k=_),O={}),x=new M.Parser(O),x.parseString(T,k)},M.parseStringPromise=function(T,_){var l,k;return(typeof _=="undefined"?"undefined":(0,d.default)(_))==="object"&&(l=_),k=new M.Parser(l),k.parseStringPromise(T)}}).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(N,J,M){"use strict";(function(){"use strict";var D;D=new RegExp(/(?!xmlns)^.*:/),M.normalize=function(m){return m.toLowerCase()},M.firstCharLowerCase=function(m){return m.charAt(0).toLowerCase()+m.slice(1)},M.stripPrefix=function(m){return m.replace(D,"")},M.parseNumbers=function(m){return isNaN(m)||(m=m%1===0?parseInt(m,10):parseFloat(m)),m},M.parseBooleans=function(m){return/^(?:true|false)$/i.test(m)&&(m=m.toLowerCase()==="true"),m}}).call(void 0)},{}],249:[function(N,J,M){"use strict";(function(){"use strict";var D,m,S,P,c=function(d,o){for(var a in o)h.call(o,a)&&(d[a]=o[a]);function n(){this.constructor=d}return n.prototype=o.prototype,d.prototype=new n,d.__super__=o.prototype,d},h={}.hasOwnProperty;m=N("./defaults"),D=N("./builder"),S=N("./parser"),P=N("./processors"),M.defaults=m.defaults,M.processors=P,M.ValidationError=function(w){c(d,w);function d(o){this.message=o}return d}(Error),M.Builder=D.Builder,M.Parser=S.Parser,M.parseString=S.parseString,M.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(N,J,M){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(N,J,M){"use strict";(function(){J.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/get-prototype-of"),m=w(D),S=N("babel-runtime/helpers/typeof"),P=w(S),c=N("babel-runtime/core-js/object/assign"),h=w(c);function w(d){return d&&d.__esModule?d:{default:d}}(function(){var d,o,a,n,u,p,f,v=[].slice,g={}.hasOwnProperty;d=function(){var i,s,t,T,_,l;if(l=arguments[0],_=2<=arguments.length?v.call(arguments,1):[],u(h.default))h.default.apply(null,arguments);else for(i=0,t=_.length;i<t;i++)if(T=_[i],T!=null)for(s in T){if(!g.call(T,s))continue;l[s]=T[s]}return l},u=function(i){return!!i&&Object.prototype.toString.call(i)==="[object Function]"},p=function(i){var s;return!!i&&((s=typeof i=="undefined"?"undefined":(0,P.default)(i))==="function"||s==="object")},a=function(i){return u(Array.isArray)?Array.isArray(i):Object.prototype.toString.call(i)==="[object Array]"},n=function(i){var s;if(a(i))return!i.length;for(s in i){if(!g.call(i,s))continue;return!1}return!0},f=function(i){var s,t;return p(i)&&(t=(0,m.default)(i))&&(s=t.constructor)&&typeof s=="function"&&s instanceof s&&Function.prototype.toString.call(s)===Function.prototype.toString.call(Object)},o=function(i){return u(i.valueOf)?i.valueOf():i},J.exports.assign=d,J.exports.isFunction=u,J.exports.isObject=p,J.exports.isArray=a,J.exports.isEmpty=n,J.exports.isPlainObject=f,J.exports.getValue=o}).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(N,J,M){"use strict";(function(){J.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h;P=N("./NodeType"),h=N("./XMLNode"),J.exports=c=function(){function w(d,o,a){if(this.parent=d,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(a),this.type=P.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(w.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(w.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(w.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"specified",{get:function(){return!0}}),w.prototype.clone=function(){return(0,m.default)(this)},w.prototype.toString=function(d){return this.options.writer.attribute(this,this.options.writer.filterOptions(d))},w.prototype.debugInfo=function(d){return d=d||this.name,d==null?"parent: <"+this.parent.name+">":"attribute: {"+d+"}, parent: <"+this.parent.name+">"},w.prototype.isEqualNode=function(d){return d.namespaceURI!==this.namespaceURI||(d.prefix!==this.prefix||d.localName!==this.localName)?!1:!(d.value!==this.value)},w}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w=function(a,n){for(var u in n)d.call(n,u)&&(a[u]=n[u]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a},d={}.hasOwnProperty;P=N("./NodeType"),h=N("./XMLCharacterData"),J.exports=c=function(o){w(a,o);function a(n,u){if(a.__super__.constructor.call(this,n),u==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=P.CData,this.value=this.stringify.cdata(u)}return a.prototype.clone=function(){return(0,m.default)(this)},a.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},a}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h=function(o,a){for(var n in a)w.call(a,n)&&(o[n]=a[n]);function u(){this.constructor=o}return u.prototype=a.prototype,o.prototype=new u,o.__super__=a.prototype,o},w={}.hasOwnProperty;c=N("./XMLNode"),J.exports=P=function(d){h(o,d);function o(a){o.__super__.constructor.call(this,a),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),o.prototype.clone=function(){return(0,m.default)(this)},o.prototype.substringData=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(a,n,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(a){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?!(a.data!==this.data):!1},o}(c)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w=function(a,n){for(var u in n)d.call(n,u)&&(a[u]=n[u]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a},d={}.hasOwnProperty;P=N("./NodeType"),c=N("./XMLCharacterData"),J.exports=h=function(o){w(a,o);function a(n,u){if(a.__super__.constructor.call(this,n),u==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=P.Comment,this.value=this.stringify.comment(u)}return a.prototype.clone=function(){return(0,m.default)(this)},a.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},a}(c)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/keys"),m=c(D),S=N("babel-runtime/core-js/object/create"),P=c(S);function c(h){return h&&h.__esModule?h:{default:h}}(function(){var h,w,d;w=N("./XMLDOMErrorHandler"),d=N("./XMLDOMStringList"),J.exports=h=function(){function o(){var a;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new w,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=a=(0,P.default)(this.defaultParams)}return Object.defineProperty(o.prototype,"parameterNames",{get:function(){return new d((0,m.default)(this.defaultParams))}}),o.prototype.getParameter=function(a){return this.params.hasOwnProperty(a)?this.params[a]:null},o.prototype.canSetParameter=function(a,n){return!0},o.prototype.setParameter=function(a,n){return n!=null?this.params[a]=n:delete this.params[a]},o}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(N,J,M){"use strict";(function(){var D;J.exports=D=function(){function m(){}return m.prototype.handleError=function(S){throw new Error(S)},m}()}).call(void 0)},{}],260:[function(N,J,M){"use strict";(function(){var D;J.exports=D=function(){function m(){}return m.prototype.hasFeature=function(S,P){return!0},m.prototype.createDocumentType=function(S,P,c){throw new Error("This DOM method is not implemented.")},m.prototype.createDocument=function(S,P,c){throw new Error("This DOM method is not implemented.")},m.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},m.prototype.getFeature=function(S,P){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{}],261:[function(N,J,M){"use strict";(function(){var D;J.exports=D=function(){function m(S){this.arr=S||[]}return Object.defineProperty(m.prototype,"length",{get:function(){return this.arr.length}}),m.prototype.item=function(S){return this.arr[S]||null},m.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},m}()}).call(void 0)},{}],262:[function(N,J,M){"use strict";(function(){var D,m,S,P=function(w,d){for(var o in d)c.call(d,o)&&(w[o]=d[o]);function a(){this.constructor=w}return a.prototype=d.prototype,w.prototype=new a,w.__super__=d.prototype,w},c={}.hasOwnProperty;S=N("./XMLNode"),D=N("./NodeType"),J.exports=m=function(h){P(w,h);function w(d,o,a,n,u,p){if(w.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(a==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!u)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(u.indexOf("#")!==0&&(u="#"+u),!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(p&&!u.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=D.AttributeDeclaration,this.attributeName=this.stringify.name(a),this.attributeType=this.stringify.dtdAttType(n),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=u}return w.prototype.toString=function(d){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(d))},w}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(N,J,M){"use strict";(function(){var D,m,S,P=function(w,d){for(var o in d)c.call(d,o)&&(w[o]=d[o]);function a(){this.constructor=w}return a.prototype=d.prototype,w.prototype=new a,w.__super__=d.prototype,w},c={}.hasOwnProperty;S=N("./XMLNode"),D=N("./NodeType"),J.exports=m=function(h){P(w,h);function w(d,o,a){if(w.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());a||(a="(#PCDATA)"),Array.isArray(a)&&(a="("+a.join(",")+")"),this.name=this.stringify.name(o),this.type=D.ElementDeclaration,this.value=this.stringify.dtdElementValue(a)}return w.prototype.toString=function(d){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(d))},w}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(N,J,M){"use strict";(function(){var D,m,S,P,c=function(d,o){for(var a in o)h.call(o,a)&&(d[a]=o[a]);function n(){this.constructor=d}return n.prototype=o.prototype,d.prototype=new n,d.__super__=o.prototype,d},h={}.hasOwnProperty;P=N("./Utility").isObject,S=N("./XMLNode"),D=N("./NodeType"),J.exports=m=function(w){c(d,w);function d(o,a,n,u){if(d.__super__.constructor.call(this,o),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(u==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!a,this.name=this.stringify.name(n),this.type=D.EntityDeclaration,!P(u))this.value=this.stringify.dtdEntityValue(u),this.internal=!0;else{if(!u.pubID&&!u.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(u.pubID&&!u.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID)),u.nData!=null&&(this.nData=this.stringify.dtdNData(u.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(d.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return null}}),d.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},d}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(N,J,M){"use strict";(function(){var D,m,S,P=function(w,d){for(var o in d)c.call(d,o)&&(w[o]=d[o]);function a(){this.constructor=w}return a.prototype=d.prototype,w.prototype=new a,w.__super__=d.prototype,w},c={}.hasOwnProperty;S=N("./XMLNode"),D=N("./NodeType"),J.exports=m=function(h){P(w,h);function w(d,o,a){if(w.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!a.pubID&&!a.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=D.NotationDeclaration,a.pubID!=null&&(this.pubID=this.stringify.dtdPubID(a.pubID)),a.sysID!=null&&(this.sysID=this.stringify.dtdSysID(a.sysID))}return Object.defineProperty(w.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(w.prototype,"systemId",{get:function(){return this.sysID}}),w.prototype.toString=function(d){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(d))},w}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(N,J,M){"use strict";(function(){var D,m,S,P,c=function(d,o){for(var a in o)h.call(o,a)&&(d[a]=o[a]);function n(){this.constructor=d}return n.prototype=o.prototype,d.prototype=new n,d.__super__=o.prototype,d},h={}.hasOwnProperty;P=N("./Utility").isObject,S=N("./XMLNode"),D=N("./NodeType"),J.exports=m=function(w){c(d,w);function d(o,a,n,u){var p;d.__super__.constructor.call(this,o),P(a)&&(p=a,a=p.version,n=p.encoding,u=p.standalone),a||(a="1.0"),this.type=D.Declaration,this.version=this.stringify.xmlVersion(a),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),u!=null&&(this.standalone=this.stringify.xmlStandalone(u))}return d.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},d}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(N,J,M){"use strict";(function(){var D,m,S,P,c,h,w,d,o,a=function(p,f){for(var v in f)n.call(f,v)&&(p[v]=f[v]);function g(){this.constructor=p}return g.prototype=f.prototype,p.prototype=new g,p.__super__=f.prototype,p},n={}.hasOwnProperty;o=N("./Utility").isObject,d=N("./XMLNode"),D=N("./NodeType"),m=N("./XMLDTDAttList"),P=N("./XMLDTDEntity"),S=N("./XMLDTDElement"),c=N("./XMLDTDNotation"),w=N("./XMLNamedNodeMap"),J.exports=h=function(u){a(p,u);function p(f,v,g){var b,i,s,t,T,_;if(p.__super__.constructor.call(this,f),this.type=D.DocType,f.children){for(t=f.children,i=0,s=t.length;i<s;i++)if(b=t[i],b.type===D.Element){this.name=b.name;break}}this.documentObject=f,o(v)&&(T=v,v=T.pubID,g=T.sysID),g==null&&(_=[v,g],g=_[0],v=_[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),g!=null&&(this.sysID=this.stringify.dtdSysID(g))}return Object.defineProperty(p.prototype,"entities",{get:function(){var v,g,b,i,s;for(i={},s=this.children,g=0,b=s.length;g<b;g++)v=s[g],v.type===D.EntityDeclaration&&!v.pe&&(i[v.name]=v);return new w(i)}}),Object.defineProperty(p.prototype,"notations",{get:function(){var v,g,b,i,s;for(i={},s=this.children,g=0,b=s.length;g<b;g++)v=s[g],v.type===D.NotationDeclaration&&(i[v.name]=v);return new w(i)}}),Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.element=function(f,v){var g;return g=new S(this,f,v),this.children.push(g),this},p.prototype.attList=function(f,v,g,b,i){var s;return s=new m(this,f,v,g,b,i),this.children.push(s),this},p.prototype.entity=function(f,v){var g;return g=new P(this,!1,f,v),this.children.push(g),this},p.prototype.pEntity=function(f,v){var g;return g=new P(this,!0,f,v),this.children.push(g),this},p.prototype.notation=function(f,v){var g;return g=new c(this,f,v),this.children.push(g),this},p.prototype.toString=function(f){return this.options.writer.docType(this,this.options.writer.filterOptions(f))},p.prototype.ele=function(f,v){return this.element(f,v)},p.prototype.att=function(f,v,g,b,i){return this.attList(f,v,g,b,i)},p.prototype.ent=function(f,v){return this.entity(f,v)},p.prototype.pent=function(f,v){return this.pEntity(f,v)},p.prototype.not=function(f,v){return this.notation(f,v)},p.prototype.up=function(){return this.root()||this.documentObject},p.prototype.isEqualNode=function(f){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(f)?f.name!==this.name||f.publicId!==this.publicId?!1:!(f.systemId!==this.systemId):!1},p}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(N,J,M){"use strict";(function(){var D,m,S,P,c,h,w,d,o=function(u,p){for(var f in p)a.call(p,f)&&(u[f]=p[f]);function v(){this.constructor=u}return v.prototype=p.prototype,u.prototype=new v,u.__super__=p.prototype,u},a={}.hasOwnProperty;d=N("./Utility").isPlainObject,S=N("./XMLDOMImplementation"),m=N("./XMLDOMConfiguration"),c=N("./XMLNode"),D=N("./NodeType"),w=N("./XMLStringifier"),h=N("./XMLStringWriter"),J.exports=P=function(n){o(u,n);function u(p){u.__super__.constructor.call(this,null),this.name="#document",this.type=D.Document,this.documentURI=null,this.domConfig=new m,p||(p={}),p.writer||(p.writer=new h),this.options=p,this.stringify=new w(p)}return Object.defineProperty(u.prototype,"implementation",{value:new S}),Object.defineProperty(u.prototype,"doctype",{get:function(){var f,v,g,b;for(b=this.children,v=0,g=b.length;v<g;v++)if(f=b[v],f.type===D.DocType)return f;return null}}),Object.defineProperty(u.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(u.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(u.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(u.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===D.Declaration?this.children[0].encoding:null}}),Object.defineProperty(u.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===D.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(u.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===D.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(u.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(u.prototype,"origin",{get:function(){return null}}),Object.defineProperty(u.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(u.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(u.prototype,"contentType",{get:function(){return null}}),u.prototype.end=function(p){var f;return f={},p?d(p)&&(f=p,p=this.options.writer):p=this.options.writer,p.document(this,p.filterOptions(f))},u.prototype.toString=function(p){return this.options.writer.document(this,this.options.writer.filterOptions(p))},u.prototype.createElement=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createTextNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createComment=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createCDATASection=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createProcessingInstruction=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createAttribute=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createEntityReference=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.importNode=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createElementNS=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createAttributeNS=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagNameNS=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementById=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.adoptNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.renameNode=function(p,f,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createEvent=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createNodeIterator=function(p,f,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createTreeWalker=function(p,f,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},u}(c)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(N,J,M){"use strict";(function(){var D,m,S,P,c,h,w,d,o,a,n,u,p,f,v,g,b,i,s,t,T,_,l,k,O={}.hasOwnProperty;k=N("./Utility"),_=k.isObject,T=k.isFunction,l=k.isPlainObject,t=k.getValue,D=N("./NodeType"),u=N("./XMLDocument"),f=N("./XMLElement"),P=N("./XMLCData"),c=N("./XMLComment"),g=N("./XMLRaw"),s=N("./XMLText"),v=N("./XMLProcessingInstruction"),a=N("./XMLDeclaration"),n=N("./XMLDocType"),h=N("./XMLDTDAttList"),d=N("./XMLDTDEntity"),w=N("./XMLDTDElement"),o=N("./XMLDTDNotation"),S=N("./XMLAttribute"),i=N("./XMLStringifier"),b=N("./XMLStringWriter"),m=N("./WriterState"),J.exports=p=function(){function x(y,E,C){var I;this.name="?xml",this.type=D.Document,y||(y={}),I={},y.writer?l(y.writer)&&(I=y.writer,y.writer=new b):y.writer=new b,this.options=y,this.writer=y.writer,this.writerOptions=this.writer.filterOptions(I),this.stringify=new i(y),this.onDataCallback=E||function(){},this.onEndCallback=C||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return x.prototype.createChildNode=function(y){var E,C,I,j,L,H,W,U;switch(y.type){case D.CData:this.cdata(y.value);break;case D.Comment:this.comment(y.value);break;case D.Element:I={},W=y.attribs;for(C in W){if(!O.call(W,C))continue;E=W[C],I[C]=E.value}this.node(y.name,I);break;case D.Dummy:this.dummy();break;case D.Raw:this.raw(y.value);break;case D.Text:this.text(y.value);break;case D.ProcessingInstruction:this.instruction(y.target,y.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+y.constructor.name)}for(U=y.children,L=0,H=U.length;L<H;L++)j=U[L],this.createChildNode(j),j.type===D.Element&&this.up();return this},x.prototype.dummy=function(){return this},x.prototype.node=function(y,E,C){var I;if(y==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(y));return this.openCurrent(),y=t(y),E==null&&(E={}),E=t(E),_(E)||(I=[E,C],C=I[0],E=I[1]),this.currentNode=new f(this,y,E),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,C!=null&&this.text(C),this},x.prototype.element=function(y,E,C){var I,j,L,H,W,U;if(this.currentNode&&this.currentNode.type===D.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(y)||_(y)||T(y))for(H=this.options.noValidation,this.options.noValidation=!0,U=new u(this.options).element("TEMP_ROOT"),U.element(y),this.options.noValidation=H,W=U.children,j=0,L=W.length;j<L;j++)I=W[j],this.createChildNode(I),I.type===D.Element&&this.up();else this.node(y,E,C);return this},x.prototype.attribute=function(y,E){var C,I;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(y));if(y!=null&&(y=t(y)),_(y))for(C in y){if(!O.call(y,C))continue;I=y[C],this.attribute(C,I)}else T(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.currentNode.attribs[y]=new S(this,y,""):E!=null&&(this.currentNode.attribs[y]=new S(this,y,E));return this},x.prototype.text=function(y){var E;return this.openCurrent(),E=new s(this,y),this.onData(this.writer.text(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.cdata=function(y){var E;return this.openCurrent(),E=new P(this,y),this.onData(this.writer.cdata(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.comment=function(y){var E;return this.openCurrent(),E=new c(this,y),this.onData(this.writer.comment(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.raw=function(y){var E;return this.openCurrent(),E=new g(this,y),this.onData(this.writer.raw(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.instruction=function(y,E){var C,I,j,L,H;if(this.openCurrent(),y!=null&&(y=t(y)),E!=null&&(E=t(E)),Array.isArray(y))for(C=0,L=y.length;C<L;C++)I=y[C],this.instruction(I);else if(_(y))for(I in y){if(!O.call(y,I))continue;j=y[I],this.instruction(I,j)}else T(E)&&(E=E.apply()),H=new v(this,y,E),this.onData(this.writer.processingInstruction(H,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},x.prototype.declaration=function(y,E,C){var I;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return I=new a(this,y,E,C),this.onData(this.writer.declaration(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.doctype=function(y,E,C){if(this.openCurrent(),y==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,C),this.currentNode.rootNodeName=y,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},x.prototype.dtdElement=function(y,E){var C;return this.openCurrent(),C=new w(this,y,E),this.onData(this.writer.dtdElement(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.attList=function(y,E,C,I,j){var L;return this.openCurrent(),L=new h(this,y,E,C,I,j),this.onData(this.writer.dtdAttList(L,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.entity=function(y,E){var C;return this.openCurrent(),C=new d(this,!1,y,E),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.pEntity=function(y,E){var C;return this.openCurrent(),C=new d(this,!0,y,E),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.notation=function(y,E){var C;return this.openCurrent(),C=new o(this,y,E),this.onData(this.writer.dtdNotation(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.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},x.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},x.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},x.prototype.openNode=function(y){var E,C,I,j;if(!y.isOpen){if(!this.root&&this.currentLevel===0&&y.type===D.Element&&(this.root=y),C="",y.type===D.Element){this.writerOptions.state=m.OpenTag,C=this.writer.indent(y,this.writerOptions,this.currentLevel)+"<"+y.name,j=y.attribs;for(I in j){if(!O.call(j,I))continue;E=j[I],C+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}C+=(y.children?">":"/>")+this.writer.endline(y,this.writerOptions,this.currentLevel),this.writerOptions.state=m.InsideTag}else this.writerOptions.state=m.OpenTag,C=this.writer.indent(y,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+y.rootNodeName,y.pubID&&y.sysID?C+=' PUBLIC "'+y.pubID+'" "'+y.sysID+'"':y.sysID&&(C+=' SYSTEM "'+y.sysID+'"'),y.children?(C+=" [",this.writerOptions.state=m.InsideTag):(this.writerOptions.state=m.CloseTag,C+=">"),C+=this.writer.endline(y,this.writerOptions,this.currentLevel);return this.onData(C,this.currentLevel),y.isOpen=!0}},x.prototype.closeNode=function(y){var E;if(!y.isClosed)return E="",this.writerOptions.state=m.CloseTag,y.type===D.Element?E=this.writer.indent(y,this.writerOptions,this.currentLevel)+"</"+y.name+">"+this.writer.endline(y,this.writerOptions,this.currentLevel):E=this.writer.indent(y,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(y,this.writerOptions,this.currentLevel),this.writerOptions.state=m.None,this.onData(E,this.currentLevel),y.isClosed=!0},x.prototype.onData=function(y,E){return this.documentStarted=!0,this.onDataCallback(y,E+1)},x.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},x.prototype.debugInfo=function(y){return y==null?"":"node: <"+y+">"},x.prototype.ele=function(){return this.element.apply(this,arguments)},x.prototype.nod=function(y,E,C){return this.node(y,E,C)},x.prototype.txt=function(y){return this.text(y)},x.prototype.dat=function(y){return this.cdata(y)},x.prototype.com=function(y){return this.comment(y)},x.prototype.ins=function(y,E){return this.instruction(y,E)},x.prototype.dec=function(y,E,C){return this.declaration(y,E,C)},x.prototype.dtd=function(y,E,C){return this.doctype(y,E,C)},x.prototype.e=function(y,E,C){return this.element(y,E,C)},x.prototype.n=function(y,E,C){return this.node(y,E,C)},x.prototype.t=function(y){return this.text(y)},x.prototype.d=function(y){return this.cdata(y)},x.prototype.c=function(y){return this.comment(y)},x.prototype.r=function(y){return this.raw(y)},x.prototype.i=function(y,E){return this.instruction(y,E)},x.prototype.att=function(){return this.currentNode&&this.currentNode.type===D.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.a=function(){return this.currentNode&&this.currentNode.type===D.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.ent=function(y,E){return this.entity(y,E)},x.prototype.pent=function(y,E){return this.pEntity(y,E)},x.prototype.not=function(y,E){return this.notation(y,E)},x}()}).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(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w=function(a,n){for(var u in n)d.call(n,u)&&(a[u]=n[u]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a},d={}.hasOwnProperty;h=N("./XMLNode"),P=N("./NodeType"),J.exports=c=function(o){w(a,o);function a(n){a.__super__.constructor.call(this,n),this.type=P.Dummy}return a.prototype.clone=function(){return(0,m.default)(this)},a.prototype.toString=function(n){return""},a}(h)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w,d,o,a,n,u,p=function(g,b){for(var i in b)f.call(b,i)&&(g[i]=b[i]);function s(){this.constructor=g}return s.prototype=b.prototype,g.prototype=new s,g.__super__=b.prototype,g},f={}.hasOwnProperty;u=N("./Utility"),n=u.isObject,a=u.isFunction,o=u.getValue,d=N("./XMLNode"),P=N("./NodeType"),c=N("./XMLAttribute"),w=N("./XMLNamedNodeMap"),J.exports=h=function(v){p(g,v);function g(b,i,s){var t,T,_,l;if(g.__super__.constructor.call(this,b),i==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(i),this.type=P.Element,this.attribs={},this.schemaTypeInfo=null,s!=null&&this.attribute(s),b.type===P.Document&&(this.isRoot=!0,this.documentObject=b,b.rootObject=this,b.children)){for(l=b.children,T=0,_=l.length;T<_;T++)if(t=l[T],t.type===P.DocType){t.name=this.name;break}}}return Object.defineProperty(g.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(g.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(g.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new w(this.attribs)),this.attributeMap}}),g.prototype.clone=function(){var b,i,s,t;s=(0,m.default)(this),s.isRoot&&(s.documentObject=null),s.attribs={},t=this.attribs;for(i in t){if(!f.call(t,i))continue;b=t[i],s.attribs[i]=b.clone()}return s.children=[],this.children.forEach(function(T){var _;return _=T.clone(),_.parent=s,s.children.push(_)}),s},g.prototype.attribute=function(b,i){var s,t;if(b!=null&&(b=o(b)),n(b))for(s in b){if(!f.call(b,s))continue;t=b[s],this.attribute(s,t)}else a(i)&&(i=i.apply()),this.options.keepNullAttributes&&i==null?this.attribs[b]=new c(this,b,""):i!=null&&(this.attribs[b]=new c(this,b,i));return this},g.prototype.removeAttribute=function(b){var i,s,t;if(b==null)throw new Error("Missing attribute name. "+this.debugInfo());if(b=o(b),Array.isArray(b))for(s=0,t=b.length;s<t;s++)i=b[s],delete this.attribs[i];else delete this.attribs[b];return this},g.prototype.toString=function(b){return this.options.writer.element(this,this.options.writer.filterOptions(b))},g.prototype.att=function(b,i){return this.attribute(b,i)},g.prototype.a=function(b,i){return this.attribute(b,i)},g.prototype.getAttribute=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b].value:null},g.prototype.setAttribute=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b]:null},g.prototype.setAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(b,i,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(b){return this.attribs.hasOwnProperty(b)},g.prototype.hasAttributeNS=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(b,i){return this.attribs.hasOwnProperty(b)?this.attribs[b].isId:i},g.prototype.setIdAttributeNS=function(b,i,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(b,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(b){var i,s,t;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(b))return!1;if(b.namespaceURI!==this.namespaceURI)return!1;if(b.prefix!==this.prefix)return!1;if(b.localName!==this.localName)return!1;if(b.attribs.length!==this.attribs.length)return!1;for(i=s=0,t=this.attribs.length-1;0<=t?s<=t:s>=t;i=0<=t?++s:--s)if(!this.attribs[i].isEqualNode(b.attribs[i]))return!1;return!0},g}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/keys"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P;J.exports=P=function(){function c(h){this.nodes=h}return Object.defineProperty(c.prototype,"length",{get:function(){return(0,m.default)(this.nodes).length||0}}),c.prototype.clone=function(){return this.nodes=null},c.prototype.getNamedItem=function(h){return this.nodes[h]},c.prototype.setNamedItem=function(h){var w;return w=this.nodes[h.nodeName],this.nodes[h.nodeName]=h,w||null},c.prototype.removeNamedItem=function(h){var w;return w=this.nodes[h],delete this.nodes[h],w||null},c.prototype.item=function(h){return this.nodes[(0,m.default)(this.nodes)[h]]||null},c.prototype.getNamedItemNS=function(h,w){throw new Error("This DOM method is not implemented.")},c.prototype.setNamedItemNS=function(h){throw new Error("This DOM method is not implemented.")},c.prototype.removeNamedItemNS=function(h,w){throw new Error("This DOM method is not implemented.")},c}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(N,J,M){"use strict";(function(){var D,m,S,P,c,h,w,d,o,a,n,u,p,f,v,g,b,i,s,t={}.hasOwnProperty;s=N("./Utility"),i=s.isObject,b=s.isFunction,g=s.isEmpty,v=s.getValue,d=null,S=null,P=null,c=null,h=null,p=null,f=null,u=null,w=null,m=null,n=null,o=null,D=null,J.exports=a=function(){function T(_){this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,d||(d=N("./XMLElement"),S=N("./XMLCData"),P=N("./XMLComment"),c=N("./XMLDeclaration"),h=N("./XMLDocType"),p=N("./XMLRaw"),f=N("./XMLText"),u=N("./XMLProcessingInstruction"),w=N("./XMLDummy"),m=N("./NodeType"),n=N("./XMLNodeList"),o=N("./XMLNamedNodeMap"),D=N("./DocumentPosition"))}return Object.defineProperty(T.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(T.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(T.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(T.prototype,"previousSibling",{get:function(){var l;return l=this.parent.children.indexOf(this),this.parent.children[l-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var l;return l=this.parent.children.indexOf(this),this.parent.children[l+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var l,k,O,x,y;if(this.nodeType===m.Element||this.nodeType===m.DocumentFragment){for(y="",x=this.children,k=0,O=x.length;k<O;k++)l=x[k],l.textContent&&(y+=l.textContent);return y}else return null},set:function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.setParent=function(_){var l,k,O,x,y;for(this.parent=_,_&&(this.options=_.options,this.stringify=_.stringify),x=this.children,y=[],k=0,O=x.length;k<O;k++)l=x[k],y.push(l.setParent(this));return y},T.prototype.element=function(_,l,k){var O,x,y,E,C,I,j,L,H,W,U;if(I=null,l===null&&k==null&&(H=[{},null],l=H[0],k=H[1]),l==null&&(l={}),l=v(l),i(l)||(W=[l,k],k=W[0],l=W[1]),_!=null&&(_=v(_)),Array.isArray(_))for(y=0,j=_.length;y<j;y++)x=_[y],I=this.element(x);else if(b(_))I=this.element(_.apply());else if(i(_))for(C in _){if(!t.call(_,C))continue;if(U=_[C],b(U)&&(U=U.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&C.indexOf(this.stringify.convertAttKey)===0)I=this.attribute(C.substr(this.stringify.convertAttKey.length),U);else if(!this.options.separateArrayItems&&Array.isArray(U)&&g(U))I=this.dummy();else if(i(U)&&g(U))I=this.element(C);else if(!this.options.keepNullNodes&&U==null)I=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(U))for(E=0,L=U.length;E<L;E++)x=U[E],O={},O[C]=x,I=this.element(O);else i(U)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?I=this.element(U):(I=this.element(C),I.element(U)):I=this.element(C,U)}else!this.options.keepNullNodes&&k===null?I=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?I=this.text(k):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&_.indexOf(this.stringify.convertCDataKey)===0?I=this.cdata(k):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&_.indexOf(this.stringify.convertCommentKey)===0?I=this.comment(k):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&_.indexOf(this.stringify.convertRawKey)===0?I=this.raw(k):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&_.indexOf(this.stringify.convertPIKey)===0?I=this.instruction(_.substr(this.stringify.convertPIKey.length),k):I=this.node(_,l,k);if(I==null)throw new Error("Could not create any elements with: "+_+". "+this.debugInfo());return I},T.prototype.insertBefore=function(_,l,k){var O,x,y,E,C;if(_!=null?_.type:void 0)return y=_,E=l,y.setParent(this),E?(x=children.indexOf(E),C=children.splice(x),children.push(y),Array.prototype.push.apply(children,C)):children.push(y),y;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(_));return x=this.parent.children.indexOf(this),C=this.parent.children.splice(x),O=this.parent.element(_,l,k),Array.prototype.push.apply(this.parent.children,C),O},T.prototype.insertAfter=function(_,l,k){var O,x,y;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(_));return x=this.parent.children.indexOf(this),y=this.parent.children.splice(x+1),O=this.parent.element(_,l,k),Array.prototype.push.apply(this.parent.children,y),O},T.prototype.remove=function(){var _,l;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return _=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[_,_-_+1].concat(l=[])),this.parent},T.prototype.node=function(_,l,k){var O,x;return _!=null&&(_=v(_)),l||(l={}),l=v(l),i(l)||(x=[l,k],k=x[0],l=x[1]),O=new d(this,_,l),k!=null&&O.text(k),this.children.push(O),O},T.prototype.text=function(_){var l;return i(_)&&this.element(_),l=new f(this,_),this.children.push(l),this},T.prototype.cdata=function(_){var l;return l=new S(this,_),this.children.push(l),this},T.prototype.comment=function(_){var l;return l=new P(this,_),this.children.push(l),this},T.prototype.commentBefore=function(_){var l,k,O;return k=this.parent.children.indexOf(this),O=this.parent.children.splice(k),l=this.parent.comment(_),Array.prototype.push.apply(this.parent.children,O),this},T.prototype.commentAfter=function(_){var l,k,O;return k=this.parent.children.indexOf(this),O=this.parent.children.splice(k+1),l=this.parent.comment(_),Array.prototype.push.apply(this.parent.children,O),this},T.prototype.raw=function(_){var l;return l=new p(this,_),this.children.push(l),this},T.prototype.dummy=function(){var _;return _=new w(this),_},T.prototype.instruction=function(_,l){var k,O,x,y,E;if(_!=null&&(_=v(_)),l!=null&&(l=v(l)),Array.isArray(_))for(y=0,E=_.length;y<E;y++)k=_[y],this.instruction(k);else if(i(_))for(k in _){if(!t.call(_,k))continue;O=_[k],this.instruction(k,O)}else b(l)&&(l=l.apply()),x=new u(this,_,l),this.children.push(x);return this},T.prototype.instructionBefore=function(_,l){var k,O,x;return O=this.parent.children.indexOf(this),x=this.parent.children.splice(O),k=this.parent.instruction(_,l),Array.prototype.push.apply(this.parent.children,x),this},T.prototype.instructionAfter=function(_,l){var k,O,x;return O=this.parent.children.indexOf(this),x=this.parent.children.splice(O+1),k=this.parent.instruction(_,l),Array.prototype.push.apply(this.parent.children,x),this},T.prototype.declaration=function(_,l,k){var O,x;return O=this.document(),x=new c(O,_,l,k),O.children.length===0?O.children.unshift(x):O.children[0].type===m.Declaration?O.children[0]=x:O.children.unshift(x),O.root()||O},T.prototype.dtd=function(_,l){var k,O,x,y,E,C,I,j,L,H;for(O=this.document(),x=new h(O,_,l),L=O.children,y=E=0,I=L.length;E<I;y=++E)if(k=L[y],k.type===m.DocType)return O.children[y]=x,x;for(H=O.children,y=C=0,j=H.length;C<j;y=++C)if(k=H[y],k.isRoot)return O.children.splice(y,0,x),x;return O.children.push(x),x},T.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},T.prototype.root=function(){var _;for(_=this;_;){if(_.type===m.Document)return _.rootObject;if(_.isRoot)return _;_=_.parent}},T.prototype.document=function(){var _;for(_=this;_;){if(_.type===m.Document)return _;_=_.parent}},T.prototype.end=function(_){return this.document().end(_)},T.prototype.prev=function(){var _;if(_=this.parent.children.indexOf(this),_<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[_-1]},T.prototype.next=function(){var _;if(_=this.parent.children.indexOf(this),_===-1||_===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[_+1]},T.prototype.importDocument=function(_){var l;return l=_.root().clone(),l.parent=this,l.isRoot=!1,this.children.push(l),this},T.prototype.debugInfo=function(_){var l,k;return _=_||this.name,_==null&&!((l=this.parent)!=null?l.name:void 0)?"":_==null?"parent: <"+this.parent.name+">":((k=this.parent)!=null?k.name:void 0)?"node: <"+_+">, parent: <"+this.parent.name+">":"node: <"+_+">"},T.prototype.ele=function(_,l,k){return this.element(_,l,k)},T.prototype.nod=function(_,l,k){return this.node(_,l,k)},T.prototype.txt=function(_){return this.text(_)},T.prototype.dat=function(_){return this.cdata(_)},T.prototype.com=function(_){return this.comment(_)},T.prototype.ins=function(_,l){return this.instruction(_,l)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(_,l,k){return this.declaration(_,l,k)},T.prototype.e=function(_,l,k){return this.element(_,l,k)},T.prototype.n=function(_,l,k){return this.node(_,l,k)},T.prototype.t=function(_){return this.text(_)},T.prototype.d=function(_){return this.cdata(_)},T.prototype.c=function(_){return this.comment(_)},T.prototype.r=function(_){return this.raw(_)},T.prototype.i=function(_,l){return this.instruction(_,l)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(_){return this.importDocument(_)},T.prototype.replaceChild=function(_,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isSupported=function(_,l){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(_){var l,k;return l=this,l===_?0:this.document()!==_.document()?(k=D.Disconnected|D.ImplementationSpecific,Math.random()<.5?k|=D.Preceding:k|=D.Following,k):l.isAncestor(_)?D.Contains|D.Preceding:l.isDescendant(_)?D.Contains|D.Following:l.isPreceding(_)?D.Preceding:D.Following},T.prototype.isSameNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(_){var l,k,O;if(_.nodeType!==this.nodeType)return!1;if(_.children.length!==this.children.length)return!1;for(l=k=0,O=this.children.length-1;0<=O?k<=O:k>=O;l=0<=O?++k:--k)if(!this.children[l].isEqualNode(_.children[l]))return!1;return!0},T.prototype.getFeature=function(_,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(_,l,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(_){return _?_===this||this.isDescendant(_):!1},T.prototype.isDescendant=function(_){var l,k,O,x,y;for(y=this.children,O=0,x=y.length;O<x;O++){if(l=y[O],_===l)return!0;if(k=l.isDescendant(_),k)return!0}return!1},T.prototype.isAncestor=function(_){return _.isDescendant(this)},T.prototype.isPreceding=function(_){var l,k;return l=this.treePosition(_),k=this.treePosition(this),l===-1||k===-1?!1:l<k},T.prototype.isFollowing=function(_){var l,k;return l=this.treePosition(_),k=this.treePosition(this),l===-1||k===-1?!1:l>k},T.prototype.treePosition=function(_){var l,k;return k=0,l=!1,this.foreachTreeNode(this.document(),function(O){if(k++,!l&&O===_)return l=!0}),l?k:-1},T.prototype.foreachTreeNode=function(_,l){var k,O,x,y,E;for(_||(_=this.document()),y=_.children,O=0,x=y.length;O<x;O++){if(k=y[O],E=l(k))return E;if(E=this.foreachTreeNode(k,l),E)return E}},T}()}).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(N,J,M){"use strict";(function(){var D;J.exports=D=function(){function m(S){this.nodes=S}return Object.defineProperty(m.prototype,"length",{get:function(){return this.nodes.length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.item=function(S){return this.nodes[S]||null},m}()}).call(void 0)},{}],275:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w=function(a,n){for(var u in n)d.call(n,u)&&(a[u]=n[u]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a},d={}.hasOwnProperty;P=N("./NodeType"),c=N("./XMLCharacterData"),J.exports=h=function(o){w(a,o);function a(n,u,p){if(a.__super__.constructor.call(this,n),u==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=P.ProcessingInstruction,this.target=this.stringify.insTarget(u),this.name=this.target,p&&(this.value=this.stringify.insValue(p))}return a.prototype.clone=function(){return(0,m.default)(this)},a.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},a.prototype.isEqualNode=function(n){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},a}(c)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w=function(a,n){for(var u in n)d.call(n,u)&&(a[u]=n[u]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a},d={}.hasOwnProperty;P=N("./NodeType"),c=N("./XMLNode"),J.exports=h=function(o){w(a,o);function a(n,u){if(a.__super__.constructor.call(this,n),u==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=P.Raw,this.value=this.stringify.raw(u)}return a.prototype.clone=function(){return(0,m.default)(this)},a.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},a}(c)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(N,J,M){"use strict";(function(){var D,m,S,P,c=function(d,o){for(var a in o)h.call(o,a)&&(d[a]=o[a]);function n(){this.constructor=d}return n.prototype=o.prototype,d.prototype=new n,d.__super__=o.prototype,d},h={}.hasOwnProperty;D=N("./NodeType"),P=N("./XMLWriterBase"),m=N("./WriterState"),J.exports=S=function(w){c(d,w);function d(o,a){this.stream=o,d.__super__.constructor.call(this,a)}return d.prototype.endline=function(o,a,n){return o.isLastRootNode&&a.state===m.CloseTag?"":d.__super__.endline.call(this,o,a,n)},d.prototype.document=function(o,a){var n,u,p,f,v,g,b,i,s;for(b=o.children,u=p=0,v=b.length;p<v;u=++p)n=b[u],n.isLastRootNode=u===o.children.length-1;for(a=this.filterOptions(a),i=o.children,s=[],f=0,g=i.length;f<g;f++)n=i[f],s.push(this.writeChildNode(n,a,0));return s},d.prototype.attribute=function(o,a,n){return this.stream.write(d.__super__.attribute.call(this,o,a,n))},d.prototype.cdata=function(o,a,n){return this.stream.write(d.__super__.cdata.call(this,o,a,n))},d.prototype.comment=function(o,a,n){return this.stream.write(d.__super__.comment.call(this,o,a,n))},d.prototype.declaration=function(o,a,n){return this.stream.write(d.__super__.declaration.call(this,o,a,n))},d.prototype.docType=function(o,a,n){var u,p,f,v;if(n||(n=0),this.openNode(o,a,n),a.state=m.OpenTag,this.stream.write(this.indent(o,a,n)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,a,n)),a.state=m.InsideTag,v=o.children,p=0,f=v.length;p<f;p++)u=v[p],this.writeChildNode(u,a,n+1);a.state=m.CloseTag,this.stream.write("]")}return a.state=m.CloseTag,this.stream.write(a.spaceBeforeSlash+">"),this.stream.write(this.endline(o,a,n)),a.state=m.None,this.closeNode(o,a,n)},d.prototype.element=function(o,a,n){var u,p,f,v,g,b,i,s,t,T;n||(n=0),this.openNode(o,a,n),a.state=m.OpenTag,this.stream.write(this.indent(o,a,n)+"<"+o.name),t=o.attribs;for(i in t){if(!h.call(t,i))continue;u=t[i],this.attribute(u,a,n)}if(f=o.children.length,v=f===0?null:o.children[0],f===0||o.children.every(function(_){return(_.type===D.Text||_.type===D.Raw)&&_.value===""}))a.allowEmpty?(this.stream.write(">"),a.state=m.CloseTag,this.stream.write("</"+o.name+">")):(a.state=m.CloseTag,this.stream.write(a.spaceBeforeSlash+"/>"));else if(a.pretty&&f===1&&(v.type===D.Text||v.type===D.Raw)&&v.value!=null)this.stream.write(">"),a.state=m.InsideTag,a.suppressPrettyCount++,s=!0,this.writeChildNode(v,a,n+1),a.suppressPrettyCount--,s=!1,a.state=m.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,a,n)),a.state=m.InsideTag,T=o.children,g=0,b=T.length;g<b;g++)p=T[g],this.writeChildNode(p,a,n+1);a.state=m.CloseTag,this.stream.write(this.indent(o,a,n)+"</"+o.name+">")}return this.stream.write(this.endline(o,a,n)),a.state=m.None,this.closeNode(o,a,n)},d.prototype.processingInstruction=function(o,a,n){return this.stream.write(d.__super__.processingInstruction.call(this,o,a,n))},d.prototype.raw=function(o,a,n){return this.stream.write(d.__super__.raw.call(this,o,a,n))},d.prototype.text=function(o,a,n){return this.stream.write(d.__super__.text.call(this,o,a,n))},d.prototype.dtdAttList=function(o,a,n){return this.stream.write(d.__super__.dtdAttList.call(this,o,a,n))},d.prototype.dtdElement=function(o,a,n){return this.stream.write(d.__super__.dtdElement.call(this,o,a,n))},d.prototype.dtdEntity=function(o,a,n){return this.stream.write(d.__super__.dtdEntity.call(this,o,a,n))},d.prototype.dtdNotation=function(o,a,n){return this.stream.write(d.__super__.dtdNotation.call(this,o,a,n))},d}(P)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(N,J,M){"use strict";(function(){var D,m,S=function(h,w){for(var d in w)P.call(w,d)&&(h[d]=w[d]);function o(){this.constructor=h}return o.prototype=w.prototype,h.prototype=new o,h.__super__=w.prototype,h},P={}.hasOwnProperty;m=N("./XMLWriterBase"),J.exports=D=function(c){S(h,c);function h(w){h.__super__.constructor.call(this,w)}return h.prototype.document=function(w,d){var o,a,n,u,p;for(d=this.filterOptions(d),u="",p=w.children,a=0,n=p.length;a<n;a++)o=p[a],u+=this.writeChildNode(o,d,0);return d.pretty&&u.slice(-d.newline.length)===d.newline&&(u=u.slice(0,-d.newline.length)),u},h}(m)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(N,J,M){"use strict";(function(){var D,m=function(c,h){return function(){return c.apply(h,arguments)}},S={}.hasOwnProperty;J.exports=D=function(){function P(c){this.assertLegalName=m(this.assertLegalName,this),this.assertLegalChar=m(this.assertLegalChar,this);var h,w,d;c||(c={}),this.options=c,this.options.version||(this.options.version="1.0"),w=c.stringify||{};for(h in w){if(!S.call(w,h))continue;d=w[h],this[h]=d}}return P.prototype.name=function(c){return this.options.noValidation?c:this.assertLegalName(""+c||"")},P.prototype.text=function(c){return this.options.noValidation?c:this.assertLegalChar(this.textEscape(""+c||""))},P.prototype.cdata=function(c){return this.options.noValidation?c:(c=""+c||"",c=c.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(c))},P.prototype.comment=function(c){if(this.options.noValidation)return c;if(c=""+c||"",c.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+c);return this.assertLegalChar(c)},P.prototype.raw=function(c){return this.options.noValidation?c:""+c||""},P.prototype.attValue=function(c){return this.options.noValidation?c:this.assertLegalChar(this.attEscape(c=""+c||""))},P.prototype.insTarget=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.insValue=function(c){if(this.options.noValidation)return c;if(c=""+c||"",c.match(/\?>/))throw new Error("Invalid processing instruction value: "+c);return this.assertLegalChar(c)},P.prototype.xmlVersion=function(c){if(this.options.noValidation)return c;if(c=""+c||"",!c.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+c);return c},P.prototype.xmlEncoding=function(c){if(this.options.noValidation)return c;if(c=""+c||"",!c.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+c);return this.assertLegalChar(c)},P.prototype.xmlStandalone=function(c){return this.options.noValidation?c:c?"yes":"no"},P.prototype.dtdPubID=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.dtdSysID=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.dtdElementValue=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.dtdAttType=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.dtdAttDefault=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.dtdEntityValue=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.dtdNData=function(c){return this.options.noValidation?c:this.assertLegalChar(""+c||"")},P.prototype.convertAttKey="@",P.prototype.convertPIKey="?",P.prototype.convertTextKey="#text",P.prototype.convertCDataKey="#cdata",P.prototype.convertCommentKey="#comment",P.prototype.convertRawKey="#raw",P.prototype.assertLegalChar=function(c){var h,w;if(this.options.noValidation)return c;if(h="",this.options.version==="1.0"){if(h=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=c.match(h))throw new Error("Invalid character in string: "+c+" at index "+w.index)}else if(this.options.version==="1.1"&&(h=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=c.match(h)))throw new Error("Invalid character in string: "+c+" at index "+w.index);return c},P.prototype.assertLegalName=function(c){var h;if(this.options.noValidation)return c;if(this.assertLegalChar(c),h=/^([: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])*$/,!c.match(h))throw new Error("Invalid character in name");return c},P.prototype.textEscape=function(c){var h;return this.options.noValidation?c:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,c.replace(h,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},P.prototype.attEscape=function(c){var h;return this.options.noValidation?c:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,c.replace(h,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},P}()}).call(void 0)},{}],280:[function(N,J,M){"use strict";var D=N("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,c,h,w=function(a,n){for(var u in n)d.call(n,u)&&(a[u]=n[u]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a},d={}.hasOwnProperty;P=N("./NodeType"),c=N("./XMLCharacterData"),J.exports=h=function(o){w(a,o);function a(n,u){if(a.__super__.constructor.call(this,n),u==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=P.Text,this.value=this.stringify.text(u)}return Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"wholeText",{get:function(){var u,p,f;for(f="",p=this.previousSibling;p;)f=p.data+f,p=p.previousSibling;for(f+=this.data,u=this.nextSibling;u;)f=f+u.data,u=u.nextSibling;return f}}),a.prototype.clone=function(){return(0,m.default)(this)},a.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},a.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},a}(c)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(N,J,M){"use strict";(function(){var D,m,S,P,c,h,w,d,o,a,n,u,p,f,v,g,b,i={}.hasOwnProperty;b=N("./Utility").assign,D=N("./NodeType"),o=N("./XMLDeclaration"),a=N("./XMLDocType"),S=N("./XMLCData"),P=N("./XMLComment"),u=N("./XMLElement"),f=N("./XMLRaw"),v=N("./XMLText"),p=N("./XMLProcessingInstruction"),n=N("./XMLDummy"),c=N("./XMLDTDAttList"),h=N("./XMLDTDElement"),w=N("./XMLDTDEntity"),d=N("./XMLDTDNotation"),m=N("./WriterState"),J.exports=g=function(){function s(t){var T,_,l;t||(t={}),this.options=t,_=t.writer||{};for(T in _){if(!i.call(_,T))continue;l=_[T],this["_"+T]=this[T],this[T]=l}}return s.prototype.filterOptions=function(t){var T,_,l,k,O,x,y,E;return t||(t={}),t=b({},this.options,t),T={writer:this},T.pretty=t.pretty||!1,T.allowEmpty=t.allowEmpty||!1,T.indent=(_=t.indent)!=null?_:" ",T.newline=(l=t.newline)!=null?l:`
`,T.offset=(k=t.offset)!=null?k:0,T.dontPrettyTextNodes=(O=(x=t.dontPrettyTextNodes)!=null?x:t.dontprettytextnodes)!=null?O:0,T.spaceBeforeSlash=(y=(E=t.spaceBeforeSlash)!=null?E:t.spacebeforeslash)!=null?y:"",T.spaceBeforeSlash===!0&&(T.spaceBeforeSlash=" "),T.suppressPrettyCount=0,T.user={},T.state=m.None,T},s.prototype.indent=function(t,T,_){var l;return!T.pretty||T.suppressPrettyCount?"":T.pretty&&(l=(_||0)+T.offset+1,l>0)?new Array(l).join(T.indent):""},s.prototype.endline=function(t,T,_){return!T.pretty||T.suppressPrettyCount?"":T.newline},s.prototype.attribute=function(t,T,_){var l;return this.openAttribute(t,T,_),l=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,T,_),l},s.prototype.cdata=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<![CDATA[",T.state=m.InsideTag,l+=t.value,T.state=m.CloseTag,l+="]]>"+this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.comment=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<!-- ",T.state=m.InsideTag,l+=t.value,T.state=m.CloseTag,l+=" -->"+this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.declaration=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<?xml",T.state=m.InsideTag,l+=' version="'+t.version+'"',t.encoding!=null&&(l+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(l+=' standalone="'+t.standalone+'"'),T.state=m.CloseTag,l+=T.spaceBeforeSlash+"?>",l+=this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.docType=function(t,T,_){var l,k,O,x,y;if(_||(_=0),this.openNode(t,T,_),T.state=m.OpenTag,x=this.indent(t,T,_),x+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?x+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(x+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(x+=" [",x+=this.endline(t,T,_),T.state=m.InsideTag,y=t.children,k=0,O=y.length;k<O;k++)l=y[k],x+=this.writeChildNode(l,T,_+1);T.state=m.CloseTag,x+="]"}return T.state=m.CloseTag,x+=T.spaceBeforeSlash+">",x+=this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),x},s.prototype.element=function(t,T,_){var l,k,O,x,y,E,C,I,j,L,H,W,U,G;_||(_=0),L=!1,H="",this.openNode(t,T,_),T.state=m.OpenTag,H+=this.indent(t,T,_)+"<"+t.name,W=t.attribs;for(j in W){if(!i.call(W,j))continue;l=W[j],H+=this.attribute(l,T,_)}if(O=t.children.length,x=O===0?null:t.children[0],O===0||t.children.every(function(B){return(B.type===D.Text||B.type===D.Raw)&&B.value===""}))T.allowEmpty?(H+=">",T.state=m.CloseTag,H+="</"+t.name+">"+this.endline(t,T,_)):(T.state=m.CloseTag,H+=T.spaceBeforeSlash+"/>"+this.endline(t,T,_));else if(T.pretty&&O===1&&(x.type===D.Text||x.type===D.Raw)&&x.value!=null)H+=">",T.state=m.InsideTag,T.suppressPrettyCount++,L=!0,H+=this.writeChildNode(x,T,_+1),T.suppressPrettyCount--,L=!1,T.state=m.CloseTag,H+="</"+t.name+">"+this.endline(t,T,_);else{if(T.dontPrettyTextNodes){for(U=t.children,y=0,C=U.length;y<C;y++)if(k=U[y],(k.type===D.Text||k.type===D.Raw)&&k.value!=null){T.suppressPrettyCount++,L=!0;break}}for(H+=">"+this.endline(t,T,_),T.state=m.InsideTag,G=t.children,E=0,I=G.length;E<I;E++)k=G[E],H+=this.writeChildNode(k,T,_+1);T.state=m.CloseTag,H+=this.indent(t,T,_)+"</"+t.name+">",L&&T.suppressPrettyCount--,H+=this.endline(t,T,_),T.state=m.None}return this.closeNode(t,T,_),H},s.prototype.writeChildNode=function(t,T,_){switch(t.type){case D.CData:return this.cdata(t,T,_);case D.Comment:return this.comment(t,T,_);case D.Element:return this.element(t,T,_);case D.Raw:return this.raw(t,T,_);case D.Text:return this.text(t,T,_);case D.ProcessingInstruction:return this.processingInstruction(t,T,_);case D.Dummy:return"";case D.Declaration:return this.declaration(t,T,_);case D.DocType:return this.docType(t,T,_);case D.AttributeDeclaration:return this.dtdAttList(t,T,_);case D.ElementDeclaration:return this.dtdElement(t,T,_);case D.EntityDeclaration:return this.dtdEntity(t,T,_);case D.NotationDeclaration:return this.dtdNotation(t,T,_);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},s.prototype.processingInstruction=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<?",T.state=m.InsideTag,l+=t.target,t.value&&(l+=" "+t.value),T.state=m.CloseTag,l+=T.spaceBeforeSlash+"?>",l+=this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.raw=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_),T.state=m.InsideTag,l+=t.value,T.state=m.CloseTag,l+=this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.text=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_),T.state=m.InsideTag,l+=t.value,T.state=m.CloseTag,l+=this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.dtdAttList=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<!ATTLIST",T.state=m.InsideTag,l+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(l+=" "+t.defaultValueType),t.defaultValue&&(l+=' "'+t.defaultValue+'"'),T.state=m.CloseTag,l+=T.spaceBeforeSlash+">"+this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.dtdElement=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<!ELEMENT",T.state=m.InsideTag,l+=" "+t.name+" "+t.value,T.state=m.CloseTag,l+=T.spaceBeforeSlash+">"+this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.dtdEntity=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<!ENTITY",T.state=m.InsideTag,t.pe&&(l+=" %"),l+=" "+t.name,t.value?l+=' "'+t.value+'"':(t.pubID&&t.sysID?l+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(l+=' SYSTEM "'+t.sysID+'"'),t.nData&&(l+=" NDATA "+t.nData)),T.state=m.CloseTag,l+=T.spaceBeforeSlash+">"+this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.dtdNotation=function(t,T,_){var l;return this.openNode(t,T,_),T.state=m.OpenTag,l=this.indent(t,T,_)+"<!NOTATION",T.state=m.InsideTag,l+=" "+t.name,t.pubID&&t.sysID?l+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?l+=' PUBLIC "'+t.pubID+'"':t.sysID&&(l+=' SYSTEM "'+t.sysID+'"'),T.state=m.CloseTag,l+=T.spaceBeforeSlash+">"+this.endline(t,T,_),T.state=m.None,this.closeNode(t,T,_),l},s.prototype.openNode=function(t,T,_){},s.prototype.closeNode=function(t,T,_){},s.prototype.openAttribute=function(t,T,_){},s.prototype.closeAttribute=function(t,T,_){},s}()}).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(N,J,M){"use strict";(function(){var D,m,S,P,c,h,w,d,o,a;a=N("./Utility"),d=a.assign,o=a.isFunction,S=N("./XMLDOMImplementation"),P=N("./XMLDocument"),c=N("./XMLDocumentCB"),w=N("./XMLStringWriter"),h=N("./XMLStreamWriter"),D=N("./NodeType"),m=N("./WriterState"),J.exports.create=function(n,u,p,f){var v,g;if(n==null)throw new Error("Root element needs a name.");return f=d({},u,p,f),v=new P(f),g=v.element(n),f.headless||(v.declaration(f),(f.pubID!=null||f.sysID!=null)&&v.dtd(f)),g},J.exports.begin=function(n,u,p){var f;return o(n)&&(f=[n,u],u=f[0],p=f[1],n={}),u?new c(n,u,p):new P(n)},J.exports.stringWriter=function(n){return new w(n)},J.exports.streamWriter=function(n,u){return new h(n,u)},J.exports.implementation=new S,J.exports.nodeType=D,J.exports.writerState=m}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(N,J,M){J.exports=m;var D=Object.prototype.hasOwnProperty;function m(){for(var S={},P=0;P<arguments.length;P++){var c=arguments[P];for(var h in c)D.call(c,h)&&(S[h]=c[h])}return S}},{}],284:[function(N,J,M){"use strict";var D=N("buffer").Buffer,m=N("./sha"),S=N("./md5"),P={sha1:m,md5:S},c=64,h=D.alloc(c);h.fill(0);function w(a,n,u){D.isBuffer(n)||(n=D.from(n)),D.isBuffer(u)||(u=D.from(u)),n.length>c?n=a(n):n.length<c&&(n=D.concat([n,h],c));for(var p=D.alloc(c),f=D.alloc(c),v=0;v<c;v++)p[v]=n[v]^54,f[v]=n[v]^92;var g=a(D.concat([p,u]));return a(D.concat([f,g]))}function d(a,n){a=a||"sha1";var u=P[a],p=[],f=0;return u||o("algorithm:",a,"is not yet supported"),{update:function(g){return D.isBuffer(g)||(g=D.from(g)),p.push(g),f+=g.length,this},digest:function(g){var b=D.concat(p),i=n?w(u,n,b):u(b);return p=null,g?i.toString(g):i}}}function o(){var a=[].slice.call(arguments).join(" ");throw new Error([a,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}M.createHash=function(a){return d(a)},M.createHmac=function(a,n){return d(a,n)},M.createCredentials=function(){o("sorry,createCredentials is not implemented yet")},M.createCipher=function(){o("sorry,createCipher is not implemented yet")},M.createCipheriv=function(){o("sorry,createCipheriv is not implemented yet")},M.createDecipher=function(){o("sorry,createDecipher is not implemented yet")},M.createDecipheriv=function(){o("sorry,createDecipheriv is not implemented yet")},M.createSign=function(){o("sorry,createSign is not implemented yet")},M.createVerify=function(){o("sorry,createVerify is not implemented yet")},M.createDiffieHellman=function(){o("sorry,createDiffieHellman is not implemented yet")},M.pbkdf2=function(){o("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(N,J,M){"use strict";var D=N("buffer").Buffer,m=4,S=D.alloc(m);S.fill(0);var P=8;function c(d,o){if(d.length%m!==0){var a=d.length+(m-d.length%m);d=D.concat([d,S],a)}for(var n=[],u=o?d.readInt32BE:d.readInt32LE,p=0;p<d.length;p+=m)n.push(u.call(d,p));return n}function h(d,o,a){for(var n=D.alloc(o),u=a?n.writeInt32BE:n.writeInt32LE,p=0;p<d.length;p++)u.call(n,d[p],p*4,!0);return n}function w(d,o,a,n){D.isBuffer(d)||(d=D.from(d));var u=o(c(d,n),d.length*P);return h(u,a,n)}J.exports={hash:w}},{buffer:73}],286:[function(N,J,M){"use strict";var D=N("./helpers");function m(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function S(n,u){n[u>>5]|=128<<u%32,n[(u+64>>>9<<4)+14]=u;for(var p=1732584193,f=-271733879,v=-1732584194,g=271733878,b=0;b<n.length;b+=16){var i=p,s=f,t=v,T=g;p=c(p,f,v,g,n[b+0],7,-680876936),g=c(g,p,f,v,n[b+1],12,-389564586),v=c(v,g,p,f,n[b+2],17,606105819),f=c(f,v,g,p,n[b+3],22,-1044525330),p=c(p,f,v,g,n[b+4],7,-176418897),g=c(g,p,f,v,n[b+5],12,1200080426),v=c(v,g,p,f,n[b+6],17,-1473231341),f=c(f,v,g,p,n[b+7],22,-45705983),p=c(p,f,v,g,n[b+8],7,1770035416),g=c(g,p,f,v,n[b+9],12,-1958414417),v=c(v,g,p,f,n[b+10],17,-42063),f=c(f,v,g,p,n[b+11],22,-1990404162),p=c(p,f,v,g,n[b+12],7,1804603682),g=c(g,p,f,v,n[b+13],12,-40341101),v=c(v,g,p,f,n[b+14],17,-1502002290),f=c(f,v,g,p,n[b+15],22,1236535329),p=h(p,f,v,g,n[b+1],5,-165796510),g=h(g,p,f,v,n[b+6],9,-1069501632),v=h(v,g,p,f,n[b+11],14,643717713),f=h(f,v,g,p,n[b+0],20,-373897302),p=h(p,f,v,g,n[b+5],5,-701558691),g=h(g,p,f,v,n[b+10],9,38016083),v=h(v,g,p,f,n[b+15],14,-660478335),f=h(f,v,g,p,n[b+4],20,-405537848),p=h(p,f,v,g,n[b+9],5,568446438),g=h(g,p,f,v,n[b+14],9,-1019803690),v=h(v,g,p,f,n[b+3],14,-187363961),f=h(f,v,g,p,n[b+8],20,1163531501),p=h(p,f,v,g,n[b+13],5,-1444681467),g=h(g,p,f,v,n[b+2],9,-51403784),v=h(v,g,p,f,n[b+7],14,1735328473),f=h(f,v,g,p,n[b+12],20,-1926607734),p=w(p,f,v,g,n[b+5],4,-378558),g=w(g,p,f,v,n[b+8],11,-2022574463),v=w(v,g,p,f,n[b+11],16,1839030562),f=w(f,v,g,p,n[b+14],23,-35309556),p=w(p,f,v,g,n[b+1],4,-1530992060),g=w(g,p,f,v,n[b+4],11,1272893353),v=w(v,g,p,f,n[b+7],16,-155497632),f=w(f,v,g,p,n[b+10],23,-1094730640),p=w(p,f,v,g,n[b+13],4,681279174),g=w(g,p,f,v,n[b+0],11,-358537222),v=w(v,g,p,f,n[b+3],16,-722521979),f=w(f,v,g,p,n[b+6],23,76029189),p=w(p,f,v,g,n[b+9],4,-640364487),g=w(g,p,f,v,n[b+12],11,-421815835),v=w(v,g,p,f,n[b+15],16,530742520),f=w(f,v,g,p,n[b+2],23,-995338651),p=d(p,f,v,g,n[b+0],6,-198630844),g=d(g,p,f,v,n[b+7],10,1126891415),v=d(v,g,p,f,n[b+14],15,-1416354905),f=d(f,v,g,p,n[b+5],21,-57434055),p=d(p,f,v,g,n[b+12],6,1700485571),g=d(g,p,f,v,n[b+3],10,-1894986606),v=d(v,g,p,f,n[b+10],15,-1051523),f=d(f,v,g,p,n[b+1],21,-2054922799),p=d(p,f,v,g,n[b+8],6,1873313359),g=d(g,p,f,v,n[b+15],10,-30611744),v=d(v,g,p,f,n[b+6],15,-1560198380),f=d(f,v,g,p,n[b+13],21,1309151649),p=d(p,f,v,g,n[b+4],6,-145523070),g=d(g,p,f,v,n[b+11],10,-1120210379),v=d(v,g,p,f,n[b+2],15,718787259),f=d(f,v,g,p,n[b+9],21,-343485551),p=o(p,i),f=o(f,s),v=o(v,t),g=o(g,T)}return Array(p,f,v,g)}function P(n,u,p,f,v,g){return o(a(o(o(u,n),o(f,g)),v),p)}function c(n,u,p,f,v,g,b){return P(u&p|~u&f,n,u,v,g,b)}function h(n,u,p,f,v,g,b){return P(u&f|p&~f,n,u,v,g,b)}function w(n,u,p,f,v,g,b){return P(u^p^f,n,u,v,g,b)}function d(n,u,p,f,v,g,b){return P(p^(u|~f),n,u,v,g,b)}function o(n,u){var p=(n&65535)+(u&65535),f=(n>>16)+(u>>16)+(p>>16);return f<<16|p&65535}function a(n,u){return n<<u|n>>>32-u}J.exports=function(u){return D.hash(u,S,16)}},{"./helpers":285}],287:[function(N,J,M){"use strict";var D=N("./helpers");function m(w,d){w[d>>5]|=128<<24-d%32,w[(d+64>>9<<4)+15]=d;for(var o=Array(80),a=1732584193,n=-271733879,u=-1732584194,p=271733878,f=-1009589776,v=0;v<w.length;v+=16){for(var g=a,b=n,i=u,s=p,t=f,T=0;T<80;T++){T<16?o[T]=w[v+T]:o[T]=h(o[T-3]^o[T-8]^o[T-14]^o[T-16],1);var _=c(c(h(a,5),S(T,n,u,p)),c(c(f,o[T]),P(T)));f=p,p=u,u=h(n,30),n=a,a=_}a=c(a,g),n=c(n,b),u=c(u,i),p=c(p,s),f=c(f,t)}return Array(a,n,u,p,f)}function S(w,d,o,a){return w<20?d&o|~d&a:w<40?d^o^a:w<60?d&o|d&a|o&a:d^o^a}function P(w){return w<20?1518500249:w<40?1859775393:w<60?-1894007588:-899497514}function c(w,d){var o=(w&65535)+(d&65535),a=(w>>16)+(d>>16)+(o>>16);return a<<16|o&65535}function h(w,d){return w<<d|w>>>32-d}J.exports=function(d){return D.hash(d,m,20,!0)}},{"./helpers":285}],288:[function(N,J,M){"use strict";J.exports=function(){return function(){}}},{}],289:[function(N,J,M){(function(D){"use strict";var m=N("babel-runtime/helpers/typeof"),S=P(m);function P(a){return a&&a.__esModule?a:{default:a}}var c=N("stream"),h=c.Stream,w=N("../lib/common/utils/isArray"),d=w.isArray;J.exports.string=function(n){return typeof n=="string"},J.exports.array=d,J.exports.buffer=D.isBuffer;function o(a){return a instanceof h}J.exports.writableStream=function(n){return o(n)&&typeof n._write=="function"&&(0,S.default)(n._writableState)==="object"}}).call(this,{isBuffer:N("../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(N,J,M){"use strict";M.encodeURIComponent=function(D){try{return encodeURIComponent(D)}catch(m){return D}},M.escape=N("escape-html"),M.timestamp=function(m){if(m){var S=m;return typeof S=="string"&&(S=Number(S)),String(m).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(N,J,M){(function(D,m){"use strict";var S=N("babel-runtime/core-js/json/stringify"),P=w(S),c=N("babel-runtime/helpers/typeof"),h=w(c);function w(T){return T&&T.__esModule?T:{default:T}}var d=N("util"),o=N("url"),a=N("http"),n=N("https"),u=N("debug")("urllib"),p=N("humanize-ms"),f,v=0,g=Math.pow(2,31)-10,b=/^https?:\/\//i;function i(T,_){return T===void 0?_:T}function s(T,_){return function(l,k,O){if(l)return _(l);T({data:k,status:O.statusCode,headers:O.headers,res:O})}}M.TIMEOUTS=[p("300s"),p("300s")];var t=["json","text"];M.request=function(_,l,k){return arguments.length===2&&typeof l=="function"&&(k=l,l=null),typeof k=="function"?M.requestWithCallback(_,l,k):(f||(f=N("any-promise")),new f(function(O,x){M.requestWithCallback(_,l,s(O,x))}))},M.requestWithCallback=function(_,l,k){if(!_||typeof _!="string"&&(typeof _=="undefined"?"undefined":(0,h.default)(_))!=="object"){var O=d.format("expect request url to be a string or a http request options, but got %j",_);throw new Error(O)}arguments.length===2&&typeof l=="function"&&(k=l,l=null),l=l||{},v>=g&&(v=0);var x=++v;l.requestUrls=l.requestUrls||[];var y={requestId:x,url:_,args:l,ctx:l.ctx};l.emitter&&l.emitter.emit("request",y),l.timeout=l.timeout||M.TIMEOUTS,l.maxRedirects=l.maxRedirects||10,l.streaming=l.streaming||l.customResponse;var E=Date.now(),C;typeof _=="string"?(b.test(_)||(_="http://"+_),C=o.parse(_)):C=_;var I=(l.type||l.method||C.method||"GET").toUpperCase(),j=C.port||80,L=a,H=i(l.agent,M.agent),W=l.fixJSONCtlChars;C.protocol==="https:"&&(L=n,H=i(l.httpsAgent,M.httpsAgent),C.port||(j=443));var U={host:C.hostname||C.host||"localhost",path:C.path||"/",method:I,port:j,agent:H,headers:l.headers||{},lookup:l.lookup};Array.isArray(l.timeout)?U.requestTimeout=l.timeout[l.timeout.length-1]:typeof l.timeout!="undefined"&&(U.requestTimeout=l.timeout);for(var G=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<G.length;B++){var z=G[B];l.hasOwnProperty(z)&&(U[z]=l[z])}U.rejectUnauthorized===!1&&!U.hasOwnProperty("secureOptions")&&(U.secureOptions=N("constants").SSL_OP_NO_TLSv1_2);var V=l.auth||C.auth;V&&(U.auth=V);var ie=l.content||l.data,ce=I==="GET"||I==="HEAD"||l.dataAsQueryString;if(!l.content&&(ie&&!(typeof ie=="string"||m.isBuffer(ie))))if(ce)ie=l.nestedQuerystring?qs.stringify(ie):querystring.stringify(ie);else{var he=U.headers["Content-Type"]||U.headers["content-type"];he||(l.contentType==="json"?he="application/json":he="application/x-www-form-urlencoded",U.headers["Content-Type"]=he),parseContentType(he).type==="application/json"?ie=(0,P.default)(ie):ie=l.nestedQuerystring?qs.stringify(ie):querystring.stringify(ie)}ce&&ie&&(U.path+=(C.query?"&":"?")+ie,ie=null);var Ae=0;if(ie){var De=ie.length;m.isBuffer(ie)||(De=m.byteLength(ie)),Ae=U.headers["Content-Length"]=De}l.dataType==="json"&&(U.headers.Accept="application/json"),typeof l.beforeRequest=="function"&&l.beforeRequest(U);var pe=null,Te=null,ye=null,ue=!1,le=!1,te=0,fe=-1,q=!1,ee="",Ce="",re=null;l.timing&&(re={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Q(){pe&&(clearTimeout(pe),pe=null)}function X(){Te&&(clearTimeout(Te),Te=null)}function Z(Pe,at,ft){if(X(),!k){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),x,D.pid,U.method,_),Pe&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),x,D.pid,Pe.name,Pe.message,Pe.stack);return}var Je=k;k=null;var st={};if(ft&&(fe=ft.statusCode,st=ft.headers),fe===401&&st["www-authenticate"]&&(!l.headers||!l.headers.Authorization)&&l.digestAuth){var Ue=st["www-authenticate"];if(Ue.indexOf("Digest ")>=0)return u("Request#%d %s: got digest auth header WWW-Authenticate: %s",x,_,Ue),l.headers=l.headers||{},l.headers.Authorization=digestAuthHeader(U.method,U.path,Ue,l.digestAuth),u("Request#%d %s: auth with digest header: %s",x,_,l.headers.Authorization),ft.headers["set-cookie"]&&(l.headers.Cookie=ft.headers["set-cookie"].join(";")),M.requestWithCallback(_,l,Je)}var Me=Date.now()-E;re&&(re.contentDownload=Me),u("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Me,te,fe,U.method,U.host,U.path,le,re);var Ne={status:fe,statusCode:fe,headers:st,size:te,aborted:q,rt:Me,keepAliveSocket:le,data:at,requestUrls:l.requestUrls,timing:re,remoteAddress:ee,remotePort:Ce};if(Pe){var Ee="";H&&typeof H.getCurrentStatus=="function"&&(Ee=", agent status: "+(0,P.default)(H.getCurrentStatus())),Pe.message+=", "+U.method+" "+_+" "+fe+" (connected: "+ue+", keepalive socket: "+le+Ee+`)
headers: `+(0,P.default)(st),Pe.data=at,Pe.path=U.path,Pe.status=fe,Pe.headers=st,Pe.res=Ne}Je(Pe,at,l.streaming?ft:Ne),l.emitter&&(y.url=_,y.socket=pt&&pt.connection,y.options=U,y.size=Ae,l.emitter.emit("response",{requestId:x,error:Pe,ctx:l.ctx,req:y,res:Ne}))}function xe(Pe){var at=null;if(l.followRedirect&&statuses.redirect[Pe.statusCode]){l._followRedirectCount=(l._followRedirectCount||0)+1;var ft=Pe.headers.location;if(!ft)at=new Error("Got statusCode "+Pe.statusCode+" but cannot resolve next location from headers"),at.name="FollowRedirectError";else if(l._followRedirectCount>l.maxRedirects)at=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+_),at.name="MaxRedirectError";else{var Je=l.formatRedirectUrl?l.formatRedirectUrl(_,ft):o.resolve(_,ft);u("Request#%d %s: `redirected` from %s to %s",x,U.path,_,Je),X(),l.headers&&l.headers.Host&&b.test(ft)&&(l.headers.Host=null);var st=k;return k=null,M.requestWithCallback(Je,l,st),{redirect:!0,error:null}}}return{redirect:!1,error:at}}!U.headers["User-Agent"]&&!U.headers["user-agent"]&&(U.headers["User-Agent"]=navigator.userAgent),l.gzip&&(!U.headers["Accept-Encoding"]&&!U.headers["accept-encoding"]&&(U.headers["Accept-Encoding"]="gzip"));function ve(Pe,at,ft){var Je=Pe.headers["content-encoding"];return ft(null,at,Je)}var Oe=l.writeStream;u("Request#%d %s %s with headers %j, options.path: %s",x,I,_,U.headers,U.path),l.requestUrls.push(_);function Qe(Pe){if(re&&(re.waiting=Date.now()-E),u("Request#%d %s `req response` event emit: status %d, headers: %j",x,_,Pe.statusCode,Pe.headers),l.streaming){var at=xe(Pe);if(at.redirect){Pe.resume();return}return at.error?(Pe.resume(),Z(at.error,null,Pe)):Z(null,null,Pe)}if(Pe.on("close",function(){u("Request#%d %s: `res close` event emit, total size %d",x,_,te)}),Pe.on("error",function(){u("Request#%d %s: `res error` event emit, total size %d",x,_,te)}),Pe.on("aborted",function(){q=!0,u("Request#%d %s: `res aborted` event emit, total size %d",x,_,te)}),Oe){var at=xe(Pe);if(at.redirect){Pe.resume();return}return at.error?(Pe.resume(),Oe.end(),Z(at.error,null,Pe)):(l.consumeWriteStream===!1?Pe.on("end",Z.bind(null,null,null,Pe)):isNode010||isNode012?first([[Oe,"close"],[Pe,"aborted"]],function(st,Ue,Me){u("Request#%d %s: writeStream or res %s event emitted",x,_,Me),Z(ye||null,null,Pe)}):Oe.on("close",function(){u("Request#%d %s: writeStream close event emitted",x,_),Z(ye||null,null,Pe)}),Pe.pipe(Oe))}var ft=[];Pe.on("data",function(Je){u("Request#%d %s: `res data` event emit, size %d",x,_,Je.length),te+=Je.length,ft.push(Je)}),Pe.on("end",function(){var Je=m.concat(ft,te);if(u("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",x,_,te,Pe._dumped),ye)return Z(ye,Je,Pe);var st=xe(Pe);if(st.error)return Z(st.error,Je,Pe);if(st.redirect)return;ve(Pe,Je,function(Ue,Me,Ne){if(Ue)return Z(Ue,Je,Pe);if(!Ne&&t.indexOf(l.dataType)>=0){try{Me=decodeBodyByCharset(Me,Pe)}catch(Se){return u("decodeBodyByCharset error: %s",Se),Z(null,Me,Pe)}if(l.dataType==="json")if(te===0)Me=null;else{var Ee=parseJSON(Me,W);Ee.error?Ue=Ee.error:Me=Ee.data}}q&&u("Request#%d %s: Remote socket was terminated before `response.end()` was called",x,_),Z(Ue,Me,Pe)})})}var rt,nt;Array.isArray(l.timeout)?(rt=p(l.timeout[0]),nt=p(l.timeout[1])):rt=nt=p(l.timeout),u("ConnectTimeout: %d, ResponseTimeout: %d",rt,nt);function ct(){u("Connect timer ticking, timeout: %d",rt),pe=setTimeout(function(){pe=null,fe===-1&&(fe=-2);var Pe="Connect timeout for "+rt+"ms",at="ConnectionTimeoutError";pt.socket||(at="SocketAssignTimeoutError",Pe+=", working sockets is full"),ye=new Error(Pe),ye.name=at,ye.requestId=x,u("ConnectTimeout: Request#%d %s %s: %s, connected: %s",x,_,ye.name,Pe,ue),He()},rt)}function dt(){u("Response timer ticking, timeout: %d",nt),Te=setTimeout(function(){Te=null;var Pe="Response timeout for "+nt+"ms",at="ResponseTimeoutError";ye=new Error(Pe),ye.name=at,ye.requestId=x,u("ResponseTimeout: Request#%d %s %s: %s, connected: %s",x,_,ye.name,Pe,ue),He()},nt)}var pt;U.mode=l.mode?l.mode:"";try{pt=L.request(U,Qe)}catch(Pe){return Z(Pe)}typeof window=="undefined"?ct():pt.on("requestTimeout",function(){fe===-1&&(fe=-2);var Pe="Connect timeout for "+rt+"ms",at="ConnectionTimeoutError";ye=new Error(Pe),ye.name=at,ye.requestId=x,He()});function He(){u("Request#%d %s abort, connected: %s",x,_,ue),pt.socket||(ye.noSocket=!0,Z(ye)),pt.abort()}return re&&pt.on("finish",function(){re.requestSent=Date.now()-E}),pt.once("socket",function(Pe){re&&(re.queuing=Date.now()-E),isNode010&&Pe.socket&&(Pe=Pe.socket);var at=Pe.readyState;if(at==="opening"){Pe.once("lookup",function(ft,Je,st){u("Request#%d %s lookup: %s, %s, %s",x,_,ft,Je,st),re&&(re.dnslookup=Date.now()-E),Je&&(ee=Je)}),Pe.once("connect",function(){re&&(re.connected=Date.now()-E),Q(),dt(),u("Request#%d %s new socket connected",x,_),ue=!0,ee||(ee=Pe.remoteAddress),Ce=Pe.remotePort});return}u("Request#%d %s reuse socket connected, readyState: %s",x,_,at),ue=!0,le=!0,ee||(ee=Pe.remoteAddress),Ce=Pe.remotePort,Q(),dt()}),pt.on("error",function(Pe){(Pe.name==="Error"||Pe.name==="TypeError")&&(Pe.name=ue?"ResponseError":"RequestError"),Pe.message+=' (req "error")',u("Request#%d %s `req error` event emit, %s: %s",x,_,Pe.name,Pe.message),Z(ye||Pe)}),Oe&&Oe.once("error",function(Pe){Pe.message+=' (writeStream "error")',ye=Pe,u("Request#%d %s `writeStream error` event emit, %s: %s",x,_,Pe.name,Pe.message),He()}),l.stream?(l.stream.pipe(pt),l.stream.once("error",function(Pe){Pe.message+=' (stream "error")',ye=Pe,u("Request#%d %s `readStream error` event emit, %s: %s",x,_,Pe.name,Pe.message),He()})):pt.end(ie),pt.requestId=x,pt}}).call(this,N("_process"),N("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(N,J,M){"use strict";M.d(J,"a",function(){return d});var D=M("q1tI"),m=M("biw7"),S=M("fyJ8");function P(o){var a=o.className,n=o.index,u=o.children,p=o.colSpan,f=o.rowSpan,v=D.useContext(m.a),g=v.prefixCls,b=v.fixedInfoList,i=b[n];return D.createElement(S.a,Object.assign({className:a,index:n,component:"td",prefixCls:g,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:p,rowSpan:f}}}},i))}function c(o){return D.createElement("tr",Object.assign({},o))}function h(o){var a=o.children,n=D.useContext(m.a),u=n.prefixCls;return D.createElement("tfoot",{className:"".concat(u,"-summary")},a)}var w=J.b=h,d={Cell:P,Row:c}},nVVt:function(N,J){N.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},oRuE:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.Iso10126={pad:function(m,S){var P=S*4,c=P-m.sigBytes%P;m.concat(D.lib.WordArray.random(c-1)).concat(D.lib.WordArray.create([c<<24],1))},unpad:function(m){var S=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=S}},D.pad.Iso10126})},osHv:function(N,J,M){(function(D){D(M("VrN/"))})(function(D){"use strict";var m=D.Pos;function S(b,i){return b.line-i.line||b.ch-i.ch}var P="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",c=P+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",h=new RegExp("<(/?)(["+P+"]["+c+"]*)","g");function w(b,i,s,t){this.line=i,this.ch=s,this.cm=b,this.text=b.getLine(i),this.min=t?Math.max(t.from,b.firstLine()):b.firstLine(),this.max=t?Math.min(t.to-1,b.lastLine()):b.lastLine()}function d(b,i){var s=b.cm.getTokenTypeAt(m(b.line,i));return s&&/\btag\b/.test(s)}function o(b){return b.line>=b.max?void 0:(b.ch=0,b.text=b.cm.getLine(++b.line),!0)}function a(b){return b.line<=b.min?void 0:(b.text=b.cm.getLine(--b.line),b.ch=b.text.length,!0)}function n(b){for(;;){var i=b.text.indexOf(">",b.ch);if(i==-1){if(o(b))continue;return}if(!d(b,i+1)){b.ch=i+1;continue}var s=b.text.lastIndexOf("/",i),t=s>-1&&!/\S/.test(b.text.slice(s+1,i));return b.ch=i+1,t?"selfClose":"regular"}}function u(b){for(;;){var i=b.ch?b.text.lastIndexOf("<",b.ch-1):-1;if(i==-1){if(a(b))continue;return}if(!d(b,i+1)){b.ch=i;continue}h.lastIndex=i,b.ch=i;var s=h.exec(b.text);if(s&&s.index==i)return s}}function p(b){for(;;){h.lastIndex=b.ch;var i=h.exec(b.text);if(!i){if(o(b))continue;return}if(!d(b,i.index+1)){b.ch=i.index+1;continue}return b.ch=i.index+i[0].length,i}}function f(b){for(;;){var i=b.ch?b.text.lastIndexOf(">",b.ch-1):-1;if(i==-1){if(a(b))continue;return}if(!d(b,i+1)){b.ch=i;continue}var s=b.text.lastIndexOf("/",i),t=s>-1&&!/\S/.test(b.text.slice(s+1,i));return b.ch=i+1,t?"selfClose":"regular"}}function v(b,i){for(var s=[];;){var t=p(b),T,_=b.line,l=b.ch-(t?t[0].length:0);if(!t||!(T=n(b)))return;if(T=="selfClose")continue;if(t[1]){for(var k=s.length-1;k>=0;--k)if(s[k]==t[2]){s.length=k;break}if(k<0&&(!i||i==t[2]))return{tag:t[2],from:m(_,l),to:m(b.line,b.ch)}}else s.push(t[2])}}function g(b,i){for(var s=[];;){var t=f(b);if(!t)return;if(t=="selfClose"){u(b);continue}var T=b.line,_=b.ch,l=u(b);if(!l)return;if(l[1])s.push(l[2]);else{for(var k=s.length-1;k>=0;--k)if(s[k]==l[2]){s.length=k;break}if(k<0&&(!i||i==l[2]))return{tag:l[2],from:m(b.line,b.ch),to:m(T,_)}}}}D.registerHelper("fold","xml",function(b,i){for(var s=new w(b,i.line,0);;){var t=p(s);if(!t||s.line!=i.line)return;var T=n(s);if(!T)return;if(!t[1]&&T!="selfClose"){var _=m(s.line,s.ch),l=v(s,t[2]);return l&&S(l.from,_)>0?{from:_,to:l.from}:null}}}),D.findMatchingTag=function(b,i,s){var t=new w(b,i.line,i.ch,s);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var T=n(t),_=T&&m(t.line,t.ch),l=T&&u(t);if(!T||!l||S(t,i)>0)return;var k={from:m(t.line,t.ch),to:_,tag:l[2]};return T=="selfClose"?{open:k,close:null,at:"open"}:l[1]?{open:g(t,l[2]),close:k,at:"close"}:(t=new w(b,_.line,_.ch,s),{open:k,close:v(t,l[2]),at:"open"})},D.findEnclosingTag=function(b,i,s,t){for(var T=new w(b,i.line,i.ch,s);;){var _=g(T,t);if(!_)break;var l=new w(b,i.line,i.ch,s),k=v(l,_.tag);if(k)return{open:_,close:k}}},D.scanForClosingTag=function(b,i,s,t){var T=new w(b,i.line,i.ch,t?{from:0,to:t}:null);return v(T,s)}})},p5ED:function(N,J,M){"use strict";var D=M("+L6B"),m=M("2/Rp"),S=M("5Dmo"),P=M("3S7+"),c=M("k1fw"),h=M("tJVT"),w=M("q1tI"),d=M.n(w),o=M("vHTk"),a=M.n(o),n=M("yEEn"),u=M("ZW9T"),p=M("1vsH");J.a=function(f){var v=f.name,g=f.data,b=f.theme,i=f.type,s=f.filename,t=f.monacoEditor,T=f.className,_=f.style,l=f.close,k=f.onClose,O=f.hasMask,x=Object(w.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),y=Object(h.a)(x,2),E=y[0],C=y[1],I=Object(w.useState)(""),j=Object(h.a)(I,2),L=j[0],H=j[1],W=Object(w.useRef)();s&&(t.filename=s),Object(w.useEffect)(function(){var B,z,V=(B=document.cookie)===null||B===void 0||((z=B.replace(/\s/g,""))===null||z===void 0)?void 0:z.split(";");V==null||V.map(function(ie){var ce=ie.split("=");ce[0]==="_educoder_session"&&H(ce[1])})},[]);var U=function(){if(g.startsWith("http")||g.startsWith("/")){G();return}Object(p.x)(s||"educoder",g,s)},G=function(){Object(p.v)(s||v,g)};return console.log("data:",g,"fileanme:",s," name:",v),d.a.createElement("div",{style:Object(c.a)({},_||{}),className:"".concat(O&&a.a.bgBlack," ").concat(i?a.a.wrp:"hide")},l&&d.a.createElement("div",{className:a.a.close,ref:W},d.a.createElement(P.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return W.current}},d.a.createElement("span",{onClick:G},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(P.a,{title:"\u5173\u95ED",getPopupContainer:function(){return W.current}},d.a.createElement("span",{className:"",onClick:k},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(a.a[T]," ").concat(T," ").concat(a.a.monaco," ").concat(i==="txt"?"show":"hide")},i==="txt"&&d.a.createElement(u.b,t)),i==="audio"&&d.a.createElement("audio",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?g:"data:audio/mp3;base64,").concat(g),autoPlay:!0}),i==="video"&&d.a.createElement(d.a.Fragment,null,g!=null&&g.startsWith("/")?d.a.createElement("video",{controls:!0,src:"".concat(g),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(g),autoPlay:!0})),i==="html"&&d.a.createElement("iframe",{src:g+"&disposition=inline"}),i==="pdf"&&d.a.createElement("embed",{className:a.a.embed,src:g}),i==="image"&&d.a.createElement(d.a.Fragment,null,d.a.createElement("img",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(g)})),i==="other"&&d.a.createElement("div",null,d.a.createElement(m.a,{type:"primary",size:"large",onClick:U},d.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(i==="download"||i==="office")&&d.a.createElement(m.a,{type:"primary",size:"large",onClick:U},d.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(N,J,M){},pA7S:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,c=S.BlockCipher,h=m.algo,w=[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],d=[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],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{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],u=h.DES=c.extend({_doReset:function(){for(var g=this._key,b=g.words,i=[],s=0;s<56;s++){var t=w[s]-1;i[s]=b[t>>>5]>>>31-t%32&1}for(var T=this._subKeys=[],_=0;_<16;_++){for(var l=T[_]=[],k=o[_],s=0;s<24;s++)l[s/6|0]|=i[(d[s]-1+k)%28]<<31-s%6,l[4+(s/6|0)]|=i[28+(d[s+24]-1+k)%28]<<31-s%6;l[0]=l[0]<<1|l[0]>>>31;for(var s=1;s<7;s++)l[s]=l[s]>>>(s-1)*4+3;l[7]=l[7]<<5|l[7]>>>27}for(var O=this._invSubKeys=[],s=0;s<16;s++)O[s]=T[15-s]},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._subKeys)},decryptBlock:function(g,b){this._doCryptBlock(g,b,this._invSubKeys)},_doCryptBlock:function(g,b,i){this._lBlock=g[b],this._rBlock=g[b+1],p.call(this,4,252645135),p.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),p.call(this,1,1431655765);for(var s=0;s<16;s++){for(var t=i[s],T=this._lBlock,_=this._rBlock,l=0,k=0;k<8;k++)l|=a[k][((_^t[k])&n[k])>>>0];this._lBlock=_,this._rBlock=T^l}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,p.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),g[b]=this._lBlock,g[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(g,b){var i=(this._lBlock>>>g^this._rBlock)&b;this._rBlock^=i,this._lBlock^=i<<g}function f(g,b){var i=(this._rBlock>>>g^this._lBlock)&b;this._lBlock^=i,this._rBlock^=i<<g}m.DES=c._createHelper(u);var v=h.TripleDES=c.extend({_doReset:function(){var g=this._key,b=g.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var i=b.slice(0,2),s=b.length<4?b.slice(0,2):b.slice(2,4),t=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=u.createEncryptor(P.create(i)),this._des2=u.createEncryptor(P.create(s)),this._des3=u.createEncryptor(P.create(t))},encryptBlock:function(g,b){this._des1.encryptBlock(g,b),this._des2.decryptBlock(g,b),this._des3.encryptBlock(g,b)},decryptBlock:function(g,b){this._des3.decryptBlock(g,b),this._des2.encryptBlock(g,b),this._des1.decryptBlock(g,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});m.TripleDES=c._createHelper(v)}(),D.TripleDES})},pIsd:function(N,J,M){var D=M("BJfS"),m=function(c){var h=/[height|width]$/;return h.test(c)},S=function(c){var h="",w=Object.keys(c);return w.forEach(function(d,o){var a=c[d];d=D(d),m(d)&&typeof a=="number"&&(a=a+"px"),a===!0?h+=d:a===!1?h+="not "+d:h+="("+d+": "+a+")",o<w.length-1&&(h+=" and ")}),h},P=function(c){var h="";return typeof c=="string"?c:c instanceof Array?(c.forEach(function(w,d){h+=S(w),d<c.length-1&&(h+=", ")}),h):S(c)};N.exports=P},qBft:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.AnsiX923={pad:function(m,S){var P=m.sigBytes,c=S*4,h=c-P%c,w=P+h-1;m.clamp(),m.words[w>>>2]|=h<<24-w%4*8,m.sigBytes+=h},unpad:function(m){var S=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=S}},D.pad.Ansix923})},qHvr:function(N,J,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("5NDa"),P=M("5rEg"),c=M("miYZ"),h=M("tsqr"),w=M("tJVT"),d=M("q1tI"),o=M.n(d),a=M("4i/N");function n(u){var p=u.isAddmodle,f=u.setIsAdd,v=u.createTeam,g=Object(d.useState)(""),b=Object(w.a)(g,2),i=b[0],s=b[1];return o.a.createElement(m.a,{centered:!0,title:o.a.createElement("div",{style:{alignItems:"center",display:"flex"}},o.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),o.a.createElement(a.a,{onClick:function(){return f(!1)},style:{cursor:"porint"}})),visible:p,closable:!1,destroyOnClose:!0,onOk:function(){if(!i){h.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}v(i)},onCancel:function(){return f(!1)}},o.a.createElement("div",null,o.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",o.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},o.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(T){return s(T.target.value)}}))))}J.a=n},qM6L:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,c=m.enc,h=c.Utf16=c.Utf16BE={stringify:function(d){for(var o=d.words,a=d.sigBytes,n=[],u=0;u<a;u+=2){var p=o[u>>>2]>>>16-u%4*8&65535;n.push(String.fromCharCode(p))}return n.join("")},parse:function(d){for(var o=d.length,a=[],n=0;n<o;n++)a[n>>>1]|=d.charCodeAt(n)<<16-n%2*16;return P.create(a,o*2)}};c.Utf16LE={stringify:function(d){for(var o=d.words,a=d.sigBytes,n=[],u=0;u<a;u+=2){var p=w(o[u>>>2]>>>16-u%4*8&65535);n.push(String.fromCharCode(p))}return n.join("")},parse:function(d){for(var o=d.length,a=[],n=0;n<o;n++)a[n>>>1]|=w(d.charCodeAt(n)<<16-n%2*16);return P.create(a,o*2)}};function w(d){return d<<8&4278255360|d>>>8&16711935}}(),D.enc.Utf16})},qu8F:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return D.mode.CTRGladman=function(){var m=D.lib.BlockCipherMode.extend();function S(h){if((h>>24&255)===255){var w=h>>16&255,d=h>>8&255,o=h&255;w===255?(w=0,d===255?(d=0,o===255?o=0:++o):++d):++w,h=0,h+=w<<16,h+=d<<8,h+=o}else h+=1<<24;return h}function P(h){return(h[0]=S(h[0]))===0&&(h[1]=S(h[1])),h}var c=m.Encryptor=m.extend({processBlock:function(h,w){var d=this._cipher,o=d.blockSize,a=this._iv,n=this._counter;a&&(n=this._counter=a.slice(0),this._iv=void 0),P(n);var u=n.slice(0);d.encryptBlock(u,0);for(var p=0;p<o;p++)h[w+p]^=u[p]}});return m.Decryptor=c,m}(),D.mode.CTRGladman})},"rAM+":function(N,J,M){"use strict";M.d(J,"a",function(){return m});var D=M("Qw5x");function m(S,P){var c;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(c=Object(D.a)(S))||P&&S&&typeof S.length=="number"){c&&(S=c);var h=0,w=function(){};return{s:w,n:function(){return h>=S.length?{done:!0}:{done:!1,value:S[h++]}},e:function(u){throw u},f:w}}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 d=!0,o=!1,a;return{s:function(){c=S[Symbol.iterator]()},n:function(){var u=c.next();return d=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!d&&c.return!=null&&c.return()}finally{if(o)throw a}}}}},rUJ1:function(N,J){const M=/[&<>"']/,D=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=O=>P[O];function h(O,x){if(x){if(M.test(O))return O.replace(D,c)}else if(m.test(O))return O.replace(S,c);return O}const w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(O){return O.replace(w,(x,y)=>(y=y.toLowerCase(),y==="colon"?":":y.charAt(0)==="#"?y.charAt(1)==="x"?String.fromCharCode(parseInt(y.substring(2),16)):String.fromCharCode(+y.substring(1)):""))}const o=/(^|[^\[])\^/g;function a(O,x){O=O.source||O,x=x||"";const y={replace:(E,C)=>(C=C.source||C,C=C.replace(o,"$1"),O=O.replace(E,C),y),getRegex:()=>new RegExp(O,x)};return y}const n=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(O,x,y){if(O){let E;try{E=decodeURIComponent(d(y)).replace(n,"").toLowerCase()}catch(C){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}x&&!u.test(y)&&(y=i(x,y));try{y=encodeURI(y).replace(/%25/g,"%")}catch(E){return null}return y}const f={},v=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(O,x){f[" "+O]||(v.test(O)?f[" "+O]=O+"/":f[" "+O]=_(O,"/",!0)),O=f[" "+O];const y=O.indexOf(":")===-1;return x.substring(0,2)==="//"?y?x:O.replace(g,"$1")+x:x.charAt(0)==="/"?y?x:O.replace(b,"$1")+x:O+x}const s={exec:function(){}};function t(O){let x=1,y,E;for(;x<arguments.length;x++){y=arguments[x];for(E in y)Object.prototype.hasOwnProperty.call(y,E)&&(O[E]=y[E])}return O}function T(O,x){const y=O.replace(/\|/g,(I,j,L)=>{let H=!1,W=j;for(;--W>=0&&L[W]==="\\";)H=!H;return H?"|":" |"}),E=y.split(/ \|/);let C=0;if(E.length>x)E.splice(x);else for(;E.length<x;)E.push("");for(;C<E.length;C++)E[C]=E[C].trim().replace(/\\\|/g,"|");return E}function _(O,x,y){const E=O.length;if(E===0)return"";let C=0;for(;C<E;){const I=O.charAt(E-C-1);if(I===x&&!y)C++;else if(I!==x&&y)C++;else break}return O.substr(0,E-C)}function l(O,x){if(O.indexOf(x[1])===-1)return-1;const y=O.length;let E=0,C=0;for(;C<y;C++)if(O[C]==="\\")C++;else if(O[C]===x[0])E++;else if(O[C]===x[1]&&(E--,E<0))return C;return-1}function k(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}N.exports={escape:h,unescape:d,edit:a,cleanUrl:p,resolveUrl:i,noopTest:s,merge:t,splitCells:T,rtrim:_,findClosingBracket:l,checkSanitizeDeprecation:k}},rcnY:function(N,J,M){var D=M("aRTE");function m(S,P){this.totalCount=S,this.dataCount=P}m.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],m.getRSBlocks=function(S,P){var c=m.getRsBlockTable(S,P);if(c==null)throw new Error("bad rs block @ typeNumber:"+S+"/errorCorrectLevel:"+P);for(var h=c.length/3,w=new Array,d=0;d<h;d++)for(var o=c[d*3+0],a=c[d*3+1],n=c[d*3+2],u=0;u<o;u++)w.push(new m(a,n));return w},m.getRsBlockTable=function(S,P){switch(P){case D.L:return m.RS_BLOCK_TABLE[(S-1)*4+0];case D.M:return m.RS_BLOCK_TABLE[(S-1)*4+1];case D.Q:return m.RS_BLOCK_TABLE[(S-1)*4+2];case D.H:return m.RS_BLOCK_TABLE[(S-1)*4+3];default:return}},N.exports=m},sR1s:function(N,J,M){"use strict";M.d(J,"b",function(){return P}),M.d(J,"a",function(){return c}),M.d(J,"c",function(){return h}),M.d(J,"d",function(){return w});var D=M("U8pU"),m="RC_TABLE_KEY";function S(d){return d==null?[]:Array.isArray(d)?d:[d]}function P(d,o){if(!o&&typeof o!="number")return d;for(var a=S(o),n=d,u=0;u<a.length;u+=1){if(!n)return null;var p=a[u];n=n[p]}return n}function c(d){var o=[],a={};return d.forEach(function(n){for(var u=n||{},p=u.key,f=u.dataIndex,v=p||S(f).join("-")||m;a[v];)v="".concat(v,"_next");a[v]=!0,o.push(v)}),o}function h(){var d={};function o(p,f){f&&Object.keys(f).forEach(function(v){var g=f[v];g&&Object(D.a)(g)==="object"?(p[v]=p[v]||{},o(p[v],g)):p[v]=g})}for(var a=arguments.length,n=new Array(a),u=0;u<a;u++)n[u]=arguments[u];return n.forEach(function(p){o(d,p)}),d}function w(d){return d!=null}},sboe:function(N,J,M){"use strict";M.d(J,"a",function(){return S});var D=M("q1tI"),m=M.n(D),S=D.createContext(null)},t23M:function(N,J,M){"use strict";var D=M("VTBJ"),m=M("1OyB"),S=M("vuIU"),P=M("Ji7U"),c=M("LK+K"),h=M("q1tI"),w=M.n(h),d=M("m+aA"),o=M("Zm9Q"),a=M("Kwbf"),n=M("c+Xe"),u=M("bdgK"),p="rc-observer-key",f=function(v){Object(P.a)(b,v);var g=Object(c.a)(b);function b(){var i;return Object(m.a)(this,b),i=g.apply(this,arguments),i.resizeObserver=null,i.childNode=null,i.currentElement=null,i.state={width:0,height:0,offsetHeight:0,offsetWidth:0},i.onResize=function(s){var t=i.props.onResize,T=s[0].target,_=T.getBoundingClientRect(),l=_.width,k=_.height,O=T.offsetWidth,x=T.offsetHeight,y=Math.floor(l),E=Math.floor(k);if(i.state.width!==y||i.state.height!==E||i.state.offsetWidth!==O||i.state.offsetHeight!==x){var C={width:y,height:E,offsetWidth:O,offsetHeight:x};i.setState(C),t&&Promise.resolve().then(function(){t(Object(D.a)(Object(D.a)({},C),{},{offsetWidth:O,offsetHeight:x}))})}},i.setChildNode=function(s){i.childNode=s},i}return Object(S.a)(b,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var s=this.props.disabled;if(s){this.destroyObserver();return}var t=Object(d.a)(this.childNode||this),T=t!==this.currentElement;T&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,t=Object(o.a)(s);if(t.length>1)Object(a.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(a.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=t[0];if(h.isValidElement(T)&&Object(n.c)(T)){var _=T.ref;t[0]=h.cloneElement(T,{ref:Object(n.a)(_,this.setChildNode)})}return t.length===1?t[0]:t.map(function(l,k){return!h.isValidElement(l)||"key"in l&&l.key!==null?l:h.cloneElement(l,{key:"".concat(p,"-").concat(k)})})}}]),b}(h.Component);f.displayName="ResizeObserver",J.a=f},uGsb:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("MlIO"),M("1uat"))})(this,function(D){return function(){var m=D,S=m.x64,P=S.Word,c=S.WordArray,h=m.algo,w=h.SHA512,d=h.SHA384=w.extend({_doReset:function(){this._hash=new c.init([new P.init(3418070365,3238371032),new P.init(1654270250,914150663),new P.init(2438529370,812702999),new P.init(355462360,4144912697),new P.init(1731405415,4290775857),new P.init(2394180231,1750603025),new P.init(3675008525,1694076839),new P.init(1203062813,3204075428)])},_doFinalize:function(){var o=w._doFinalize.call(this);return o.sigBytes-=16,o}});m.SHA384=w._createHelper(d),m.HmacSHA384=w._createHmacHelper(d)}(),D.SHA384})},uGxW:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.NoPadding={pad:function(){},unpad:function(){}},D.pad.NoPadding})},uK0f:function(N,J,M){(function(D,m){N.exports=m()})(this,function(){"use strict";function D(m,S,P){P=P||{},P.childrenKeyName=P.childrenKeyName||"children";var c=m||[],h=[],w=0;do{var d=c.filter(function(o){return S(o,w)})[0];if(!d)break;h.push(d),c=d[P.childrenKeyName]||[],w+=1}while(c.length>0);return h}return D})},ulZh:function(N,J,M){typeof window!="undefined"&&function(m,S){N.exports=S()}(this,function(){return function(D){var m={};function S(P){if(m[P])return m[P].exports;var c=m[P]={i:P,l:!1,exports:{}};return D[P].call(c.exports,c,c.exports,S),c.l=!0,c.exports}return S.m=D,S.c=m,S.d=function(P,c,h){S.o(P,c)||Object.defineProperty(P,c,{enumerable:!0,get:h})},S.r=function(P){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})},S.t=function(P,c){if(c&1&&(P=S(P)),c&8)return P;if(c&4&&typeof P=="object"&&P&&P.__esModule)return P;var h=Object.create(null);if(S.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:P}),c&2&&typeof P!="string")for(var w in P)S.d(h,w,function(d){return P[d]}.bind(null,w));return h},S.n=function(P){var c=P&&P.__esModule?function(){return P.default}:function(){return P};return S.d(c,"a",c),c},S.o=function(P,c){return Object.prototype.hasOwnProperty.call(P,c)},S.p="/dist/",S(S.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(D,m,S){"use strict";var P=Object.prototype.hasOwnProperty,c="~";function h(){}Object.create&&(h.prototype=Object.create(null),new h().__proto__||(c=!1));function w(n,u,p){this.fn=n,this.context=u,this.once=p||!1}function d(n,u,p,f,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var g=new w(p,f||n,v),b=c?c+u:u;return n._events[b]?n._events[b].fn?n._events[b]=[n._events[b],g]:n._events[b].push(g):(n._events[b]=g,n._eventsCount++),n}function o(n,u){--n._eventsCount===0?n._events=new h:delete n._events[u]}function a(){this._events=new h,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],p,f;if(this._eventsCount===0)return u;for(f in p=this._events)P.call(p,f)&&u.push(c?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},a.prototype.listeners=function(u){var p=c?c+u:u,f=this._events[p];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,g=f.length,b=new Array(g);v<g;v++)b[v]=f[v].fn;return b},a.prototype.listenerCount=function(u){var p=c?c+u:u,f=this._events[p];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,p,f,v,g,b){var i=c?c+u:u;if(!this._events[i])return!1;var s=this._events[i],t=arguments.length,T,_;if(s.fn){s.once&&this.removeListener(u,s.fn,void 0,!0);switch(t){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,p),!0;case 3:return s.fn.call(s.context,p,f),!0;case 4:return s.fn.call(s.context,p,f,v),!0;case 5:return s.fn.call(s.context,p,f,v,g),!0;case 6:return s.fn.call(s.context,p,f,v,g,b),!0}for(_=1,T=new Array(t-1);_<t;_++)T[_-1]=arguments[_];s.fn.apply(s.context,T)}else{var l=s.length,k;for(_=0;_<l;_++){s[_].once&&this.removeListener(u,s[_].fn,void 0,!0);switch(t){case 1:s[_].fn.call(s[_].context);break;case 2:s[_].fn.call(s[_].context,p);break;case 3:s[_].fn.call(s[_].context,p,f);break;case 4:s[_].fn.call(s[_].context,p,f,v);break;default:if(!T)for(k=1,T=new Array(t-1);k<t;k++)T[k-1]=arguments[k];s[_].fn.apply(s[_].context,T)}}}return!0},a.prototype.on=function(u,p,f){return d(this,u,p,f,!1)},a.prototype.once=function(u,p,f){return d(this,u,p,f,!0)},a.prototype.removeListener=function(u,p,f,v){var g=c?c+u:u;if(!this._events[g])return this;if(!p)return o(this,g),this;var b=this._events[g];if(b.fn)b.fn===p&&(!v||b.once)&&(!f||b.context===f)&&o(this,g);else{for(var i=0,s=[],t=b.length;i<t;i++)(b[i].fn!==p||v&&!b[i].once||f&&b[i].context!==f)&&s.push(b[i]);s.length?this._events[g]=s.length===1?s[0]:s:o(this,g)}return this},a.prototype.removeAllListeners=function(u){var p;return u?(p=c?c+u:u,this._events[p]&&o(this,p)):(this._events=new h,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=c,a.EventEmitter=a,D.exports=a},"./node_modules/url-toolkit/src/url-toolkit.js":function(D,m,S){(function(P){var c=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,h=/^([^\/?#]*)([^]*)$/,w=/(?:\/|^)\.(?=\/)/g,d=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(a,n,u){if(u=u||{},a=a.trim(),n=n.trim(),!n){if(!u.alwaysNormalize)return a;var p=o.parseURL(a);if(!p)throw new Error("Error trying to parse base URL.");return p.path=o.normalizePath(p.path),o.buildURLFromParts(p)}var f=o.parseURL(n);if(!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return u.alwaysNormalize?(f.path=o.normalizePath(f.path),o.buildURLFromParts(f)):n;var v=o.parseURL(a);if(!v)throw new Error("Error trying to parse base URL.");if(!v.netLoc&&v.path&&v.path[0]!=="/"){var g=h.exec(v.path);v.netLoc=g[1],v.path=g[2]}v.netLoc&&!v.path&&(v.path="/");var b={scheme:v.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(b.netLoc=v.netLoc,f.path[0]!=="/"))if(!f.path)b.path=v.path,f.params||(b.params=v.params,f.query||(b.query=v.query));else{var i=v.path,s=i.substring(0,i.lastIndexOf("/")+1)+f.path;b.path=o.normalizePath(s)}return b.path===null&&(b.path=u.alwaysNormalize?o.normalizePath(f.path):f.path),o.buildURLFromParts(b)},parseURL:function(a){var n=c.exec(a);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(a){for(a=a.split("").reverse().join("").replace(w,"");a.length!==(a=a.replace(d,"")).length;);return a.split("").reverse().join("")},buildURLFromParts:function(a){return a.scheme+a.netLoc+a.path+a.params+a.query+a.fragment}};D.exports=o})(this)},"./node_modules/webworkify-webpack/index.js":function(D,m,S){function P(u){var p={};function f(g){if(p[g])return p[g].exports;var b=p[g]={i:g,l:!1,exports:{}};return u[g].call(b.exports,b,b.exports,f),b.l=!0,b.exports}f.m=u,f.c=p,f.i=function(g){return g},f.d=function(g,b,i){f.o(g,b)||Object.defineProperty(g,b,{configurable:!1,enumerable:!0,get:i})},f.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},f.n=function(g){var b=g&&g.__esModule?function(){return g.default}:function(){return g};return f.d(b,"a",b),b},f.o=function(g,b){return Object.prototype.hasOwnProperty.call(g,b)},f.p="/",f.oe=function(g){throw console.error(g),g};var v=f(f.s=ENTRY_MODULE);return v.default||v}var c="[\\.|\\-|\\+|\\w|/|@]+",h="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+c+").*?\\)";function w(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function d(u){return!isNaN(1*u)}function o(u,p,f){var v={};v[f]=[];var g=p.toString(),b=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!b)return v;for(var i=b[1],s=new RegExp("(\\\\n|\\W)"+w(i)+h,"g"),t;t=s.exec(g);){if(t[3]==="dll-reference")continue;v[f].push(t[3])}for(s=new RegExp("\\("+w(i)+'\\("(dll-reference\\s('+c+'))"\\)\\)'+h,"g");t=s.exec(g);)u[t[2]]||(v[f].push(t[1]),u[t[2]]=S(t[1]).m),v[t[2]]=v[t[2]]||[],v[t[2]].push(t[4]);for(var T=Object.keys(v),_=0;_<T.length;_++)for(var l=0;l<v[T[_]].length;l++)d(v[T[_]][l])&&(v[T[_]][l]=1*v[T[_]][l]);return v}function a(u){var p=Object.keys(u);return p.reduce(function(f,v){return f||u[v].length>0},!1)}function n(u,p){for(var f={main:[p]},v={main:[]},g={main:{}};a(f);)for(var b=Object.keys(f),i=0;i<b.length;i++){var s=b[i],t=f[s],T=t.pop();if(g[s]=g[s]||{},g[s][T]||!u[s][T])continue;g[s][T]=!0,v[s]=v[s]||[],v[s].push(T);for(var _=o(u,u[s][T],s),l=Object.keys(_),k=0;k<l.length;k++)f[l[k]]=f[l[k]]||[],f[l[k]]=f[l[k]].concat(_[l[k]])}return v}D.exports=function(u,p){p=p||{};var f={main:S.m},v=p.all?{main:Object.keys(f.main)}:n(f,u),g="";Object.keys(v).filter(function(T){return T!=="main"}).forEach(function(T){for(var _=0;v[T][_];)_++;v[T].push(_),f[T][_]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+T+" = ("+P.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+v[T].map(function(l){return""+JSON.stringify(l)+": "+f[T][l].toString()}).join(",")+`});
`}),g=g+"new (("+P.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+v.main.map(function(T){return""+JSON.stringify(T)+": "+f.main[T].toString()}).join(",")+"}))(self);";var b=new window.Blob([g],{type:"text/javascript"});if(p.bare)return b;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,s=i.createObjectURL(b),t=new window.Worker(s);return t.objectURL=s,t}},"./src/config.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"hlsDefaultConfig",function(){return k}),S.d(m,"mergeConfig",function(){return x}),S.d(m,"enableStreamingMode",function(){return y});var P=S("./src/controller/abr-controller.ts"),c=S("./src/controller/audio-stream-controller.ts"),h=S("./src/controller/audio-track-controller.ts"),w=S("./src/controller/subtitle-stream-controller.ts"),d=S("./src/controller/subtitle-track-controller.ts"),o=S("./src/controller/buffer-controller.ts"),a=S("./src/controller/timeline-controller.ts"),n=S("./src/controller/cap-level-controller.ts"),u=S("./src/controller/fps-controller.ts"),p=S("./src/controller/eme-controller.ts"),f=S("./src/controller/cmcd-controller.ts"),v=S("./src/utils/xhr-loader.ts"),g=S("./src/utils/fetch-loader.ts"),b=S("./src/utils/cues.ts"),i=S("./src/utils/mediakeys-helper.ts"),s=S("./src/utils/logger.ts");function t(){return t=Object.assign||function(E){for(var C=1;C<arguments.length;C++){var I=arguments[C];for(var j in I)Object.prototype.hasOwnProperty.call(I,j)&&(E[j]=I[j])}return E},t.apply(this,arguments)}function T(E,C){var I=Object.keys(E);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(E);C&&(j=j.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),I.push.apply(I,j)}return I}function _(E){for(var C=1;C<arguments.length;C++){var I=arguments[C]!=null?arguments[C]:{};C%2?T(Object(I),!0).forEach(function(j){l(E,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(I)):T(Object(I)).forEach(function(j){Object.defineProperty(E,j,Object.getOwnPropertyDescriptor(I,j))})}return E}function l(E,C,I){return C in E?Object.defineProperty(E,C,{value:I,enumerable:!0,configurable:!0,writable:!0}):E[C]=I,E}var k=_(_({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:v.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:P.default,bufferController:o.default,capLevelController:n.default,fpsController:u.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:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:w.SubtitleStreamController,subtitleTrackController:d.default,timelineController:a.TimelineController,audioStreamController:c.default,audioTrackController:h.default,emeController:p.default,cmcdController:f.default});function O(){return{cueHandler:b.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 x(E,C){if((C.liveSyncDurationCount||C.liveMaxLatencyDurationCount)&&(C.liveSyncDuration||C.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(C.liveMaxLatencyDurationCount!==void 0&&(C.liveSyncDurationCount===void 0||C.liveMaxLatencyDurationCount<=C.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(C.liveMaxLatencyDuration!==void 0&&(C.liveSyncDuration===void 0||C.liveMaxLatencyDuration<=C.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},E,C)}function y(E){var C=E.loader;if(C!==g.default&&C!==v.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),E.progressive=!1;else{var I=Object(g.fetchSupported)();I&&(E.loader=g.default,E.progressive=!0,E.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),c=S("./src/utils/ewma-bandwidth-estimator.ts"),h=S("./src/events.ts"),w=S("./src/utils/buffer-helper.ts"),d=S("./src/errors.ts"),o=S("./src/types/loader.ts"),a=S("./src/utils/logger.ts");function n(f,v){for(var g=0;g<v.length;g++){var b=v[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}function u(f,v,g){return v&&n(f.prototype,v),g&&n(f,g),f}var p=function(){function f(g){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=g;var b=g.config;this.bwEstimator=new c.default(b.abrEwmaSlowVoD,b.abrEwmaFastVoD,b.abrEwmaDefaultEstimate),this.registerListeners()}var v=f.prototype;return v.registerListeners=function(){var b=this.hls;b.on(h.Events.FRAG_LOADING,this.onFragLoading,this),b.on(h.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(h.Events.FRAG_BUFFERED,this.onFragBuffered,this),b.on(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(h.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var b=this.hls;b.off(h.Events.FRAG_LOADING,this.onFragLoading,this),b.off(h.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(h.Events.FRAG_BUFFERED,this.onFragBuffered,this),b.off(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(h.Events.ERROR,this.onError,this)},v.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},v.onFragLoading=function(b,i){var s=i.frag;if(s.type===o.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=s,this.partCurrent=(t=i.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},v.onLevelLoaded=function(b,i){var s=this.hls.config;i.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},v._abandonRulesCheck=function(){var b=this.fragCurrent,i=this.partCurrent,s=this.hls,t=s.autoLevelEnabled,T=s.config,_=s.media;if(!b||!_)return;var l=i?i.stats:b.stats,k=i?i.duration:b.duration;if(l.aborted){a.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||_.paused||!_.playbackRate||!_.readyState)return;var O=performance.now()-l.loading.start,x=Math.abs(_.playbackRate);if(O<=500*k/x)return;var y=s.levels,E=s.minAutoLevel,C=y[b.level],I=l.total||Math.max(l.loaded,Math.round(k*C.maxBitrate/8)),j=Math.max(1,l.bwEstimate?l.bwEstimate/8:l.loaded*1e3/O),L=(I-l.loaded)/j,H=_.currentTime,W=(w.BufferHelper.bufferInfo(_,H,T.maxBufferHole).end-H)/x;if(W>=2*k/x||L<=W)return;var U=Number.POSITIVE_INFINITY,G;for(G=b.level-1;G>E;G--){var B=y[G].maxBitrate;if(U=k*B/(8*.8*j),U<W)break}if(U>=L)return;var z=this.bwEstimator.getEstimate();a.logger.warn("Fragment "+b.sn+(i?" part "+i.index:"")+" of level "+b.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+`
Current BW estimate: `+(Object(P.isFiniteNumber)(z)?(z/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+L.toFixed(3)+` s
Estimated load time for the next fragment: `+U.toFixed(3)+` s
Time to underbuffer: `+W.toFixed(3)+" s"),s.nextLoadLevel=G,this.bwEstimator.sample(O,l.loaded),this.clearTimer(),b.loader&&(this.fragCurrent=this.partCurrent=null,b.loader.abort()),s.trigger(h.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:b,part:i,stats:l})},v.onFragLoaded=function(b,i){var s=i.frag,t=i.part;if(s.type===o.PlaylistLevelType.MAIN&&Object(P.isFiniteNumber)(s.sn)){var T=t?t.stats:s.stats,_=t?t.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var l=this.hls.levels[s.level],k=(l.loaded?l.loaded.bytes:0)+T.loaded,O=(l.loaded?l.loaded.duration:0)+_;l.loaded={bytes:k,duration:O},l.realBitrate=Math.round(8*k/O)}if(s.bitrateTest){var x={stats:T,frag:s,part:t,id:s.type};this.onFragBuffered(h.Events.FRAG_BUFFERED,x),s.bitrateTest=!1}}},v.onFragBuffered=function(b,i){var s=i.frag,t=i.part,T=t?t.stats:s.stats;if(T.aborted)return;if(s.type!==o.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var _=T.parsing.end-T.loading.start;this.bwEstimator.sample(_,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},v.onError=function(b,i){switch(i.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},v.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},v.getNextABRAutoLevel=function(){var b=this.fragCurrent,i=this.partCurrent,s=this.hls,t=s.maxAutoLevel,T=s.config,_=s.minAutoLevel,l=s.media,k=i?i.duration:b?b.duration:0,O=l?l.currentTime:0,x=l&&l.playbackRate!==0?Math.abs(l.playbackRate):1,y=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,E=(w.BufferHelper.bufferInfo(l,O,T.maxBufferHole).end-O)/x,C=this.findBestLevel(y,_,t,E,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(C>=0)return C;a.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var I=k?Math.min(k,T.maxStarvationDelay):T.maxStarvationDelay,j=T.abrBandWidthFactor,L=T.abrBandWidthUpFactor;if(!E){var H=this.bitrateTestDelay;if(H){var W=k?Math.min(k,T.maxLoadingDelay):T.maxLoadingDelay;I=W-H,a.logger.trace("bitrate test took "+Math.round(1e3*H)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*I)+" ms"),j=L=1}}return C=this.findBestLevel(y,_,t,E+I,j,L),Math.max(C,0)},v.findBestLevel=function(b,i,s,t,T,_){for(var l,k=this.fragCurrent,O=this.partCurrent,x=this.lastLoadedFragLevel,y=this.hls.levels,E=y[x],C=!!(E!=null&&(l=E.details)!==null&&l!==void 0&&l.live),I=E==null?void 0:E.codecSet,j=O?O.duration:k?k.duration:0,L=s;L>=i;L--){var H=y[L];if(!H||I&&H.codecSet!==I)continue;var W=H.details,U=(O?W==null?void 0:W.partTarget:W==null?void 0:W.averagetargetduration)||j,G=void 0;L<=x?G=T*b:G=_*b;var B=y[L].maxBitrate,z=B*U/G;if(a.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+L+"/"+Math.round(G)+"/"+B+"/"+U+"/"+t+"/"+z),G>B&&(!z||C&&!this.bitrateTestDelay||z<t))return L}return-1},u(f,[{key:"nextAutoLevel",get:function(){var b=this._nextAutoLevel,i=this.bwEstimator;if(b!==-1&&(!i||!i.canEstimate()))return b;var s=this.getNextABRAutoLevel();return b!==-1&&(s=Math.min(b,s)),s},set:function(b){this._nextAutoLevel=b}}]),f}();m.default=p},"./src/controller/audio-stream-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),c=S("./src/controller/base-stream-controller.ts"),h=S("./src/events.ts"),w=S("./src/utils/buffer-helper.ts"),d=S("./src/controller/fragment-tracker.ts"),o=S("./src/types/level.ts"),a=S("./src/types/loader.ts"),n=S("./src/loader/fragment.ts"),u=S("./src/demux/chunk-cache.ts"),p=S("./src/demux/transmuxer-interface.ts"),f=S("./src/types/transmuxer.ts"),v=S("./src/controller/fragment-finders.ts"),g=S("./src/utils/discontinuities.ts"),b=S("./src/errors.ts"),i=S("./src/utils/logger.ts");function s(){return s=Object.assign||function(k){for(var O=1;O<arguments.length;O++){var x=arguments[O];for(var y in x)Object.prototype.hasOwnProperty.call(x,y)&&(k[y]=x[y])}return k},s.apply(this,arguments)}function t(k,O){k.prototype=Object.create(O.prototype),k.prototype.constructor=k,T(k,O)}function T(k,O){return T=Object.setPrototypeOf||function(y,E){return y.__proto__=E,y},T(k,O)}var _=100,l=function(k){t(O,k);function O(y,E){var C;return C=k.call(this,y,E,"[audio-stream-controller]")||this,C.videoBuffer=null,C.videoTrackCC=-1,C.waitingVideoCC=-1,C.audioSwitch=!1,C.trackId=-1,C.waitingData=null,C.mainDetails=null,C.bufferFlushed=!1,C._registerListeners(),C}var x=O.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var E=this.hls;E.on(h.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(h.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.on(h.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(h.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(h.Events.ERROR,this.onError,this),E.on(h.Events.BUFFER_RESET,this.onBufferReset,this),E.on(h.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(h.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.on(h.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var E=this.hls;E.off(h.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(h.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.off(h.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(h.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(h.Events.ERROR,this.onError,this),E.off(h.Events.BUFFER_RESET,this.onBufferReset,this),E.off(h.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(h.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.off(h.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(E,C){var I=C.frag,j=C.id,L=C.initPTS;if(j==="main"){var H=I.cc;this.initPTS[I.cc]=L,this.log("InitPTS for cc: "+H+" found from main: "+L),this.videoTrackCC=H,this.state===c.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(E){if(!this.levels){this.startPosition=E,this.state=c.State.STOPPED;return}var C=this.lastCurrentTime;this.stopLoad(),this.setInterval(_),this.fragLoadError=0,C>0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+C.toFixed(3)),this.state=c.State.IDLE):(this.loadedmetadata=!1,this.state=c.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},x.doTick=function(){switch(this.state){case c.State.IDLE:this.doTickIdle();break;case c.State.WAITING_TRACK:{var E,C=this.levels,I=this.trackId,j=C==null||((E=C[I])===null||E===void 0)?void 0:E.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=c.State.WAITING_INIT_PTS}break}case c.State.FRAG_LOADING_WAITING_RETRY:{var L,H=performance.now(),W=this.retryDate;(!W||H>=W||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=c.State.IDLE);break}case c.State.WAITING_INIT_PTS:{var U=this.waitingData;if(U){var G=U.frag,B=U.part,z=U.cache,V=U.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=c.State.FRAG_LOADING;var ie=z.flush(),ce={frag:G,part:B,payload:ie,networkDetails:null};this._handleFragmentLoadProgress(ce),V&&k.prototype._handleFragmentLoadComplete.call(this,ce)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var he=this.getLoadPosition(),Ae=w.BufferHelper.bufferInfo(this.mediaBuffer,he,this.config.maxBufferHole),De=Object(v.fragmentWithinToleranceTest)(Ae.end,this.config.maxFragLookUpTolerance,G);De<0&&(i.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+Ae.end+" is needed"),this.clearWaitingFragment())}}else this.state=c.State.IDLE}}this.onTickEnd()},x.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=c.State.IDLE)},x.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var C=this.mediaBuffer?this.mediaBuffer:E,I=C.buffered;!this.loadedmetadata&&I.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},x.doTickIdle=function(){var E,C,I=this.hls,j=this.levels,L=this.media,H=this.trackId,W=I.config;if(!j||!j[H])return;if(!L&&(this.startFragRequested||!W.startFragPrefetch))return;var U=j[H],G=U.details;if(!G||G.live&&this.levelLastLoaded!==H||this.waitForCdnTuneIn(G)){this.state=c.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,a.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,a.PlaylistLevelType.AUDIO);if(B===null)return;var z=B.len,V=this.getMaxBufferLength(),ie=this.audioSwitch;if(z>=V&&!ie)return;if(!ie&&this._streamEnded(B,G)){I.trigger(h.Events.BUFFER_EOS,{type:"audio"}),this.state=c.State.ENDED;return}var ce=G.fragments,he=ce[0].start,Ae=B.end;if(ie){var De=this.getLoadPosition();Ae=De,G.PTSKnown&&De<he&&((B.end>he||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),L.currentTime=he+.05))}var pe=this.getNextFragment(Ae,G);if(!pe){this.bufferFlushed=!0;return}((E=pe.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((C=pe.decryptdata)!==null&&C!==void 0&&C.key)?this.loadKey(pe,G):this.loadFragment(pe,G,Ae)},x.getMaxBufferLength=function(){var E=k.prototype.getMaxBufferLength.call(this),C=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,a.PlaylistLevelType.MAIN);return C===null?E:Math.max(E,C.len)},x.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(E,C){var I=C.audioTracks;this.resetTransmuxer(),this.levels=I.map(function(j){return new o.Level(j)})},x.onAudioTrackSwitching=function(E,C){var I=!!C.url;this.trackId=C.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),I?this.setInterval(_):this.resetTransmuxer(),I?(this.audioSwitch=!0,this.state=c.State.IDLE):this.state=c.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(E,C){this.mainDetails=C.details},x.onAudioTrackLoaded=function(E,C){var I,j=this.levels,L=C.details,H=C.id;if(!j){this.warn("Audio tracks were reset while loading level "+H);return}this.log("Track "+H+" loaded ["+L.startSN+","+L.endSN+"],duration:"+L.totalduration);var W=j[H],U=0;if(L.live||(I=W.details)!==null&&I!==void 0&&I.live){var G=this.mainDetails;if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed||!G)return;!W.details&&L.hasProgramDateTime&&G.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(L,G),U=L.fragments[0].start):U=this.alignPlaylists(L,W.details)}W.details=L,this.levelLastLoaded=H,!this.startFragRequested&&(this.mainDetails||!L.live)&&this.setStartPosition(W.details,U),this.state===c.State.WAITING_TRACK&&!this.waitForCdnTuneIn(L)&&(this.state=c.State.IDLE),this.tick()},x._handleFragmentLoadProgress=function(E){var C,I=E.frag,j=E.part,L=E.payload,H=this.config,W=this.trackId,U=this.levels;if(!U){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+I.sn+" of level "+I.level+" will not be buffered");return}var G=U[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 z=H.defaultAudioCodec||G.audioCodec||"mp4a.40.2",V=this.transmuxer;V||(V=this.transmuxer=new p.default(this.hls,a.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ie=this.initPTS[I.cc],ce=(C=I.initSegment)===null||C===void 0?void 0:C.data;if(ie!==void 0){var he=!1,Ae=j?j.index:-1,De=Ae!==-1,pe=new f.ChunkMetadata(I.level,I.sn,I.stats.chunkCount,L.byteLength,Ae,De);V.push(L,ce,z,"",I,j,B.totalduration,he,pe,ie)}else{i.logger.log("Unknown video PTS for cc "+I.cc+", waiting for video PTS before demuxing audio frag "+I.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+W);var Te=this.waitingData=this.waitingData||{frag:I,part:j,cache:new u.default,complete:!1},ye=Te.cache;ye.push(new Uint8Array(L)),this.waitingVideoCC=this.videoTrackCC,this.state=c.State.WAITING_INIT_PTS}},x._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,E)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(E,C){var I=C.tracks.audio;I&&(this.mediaBuffer=I.buffer),C.tracks.video&&(this.videoBuffer=C.tracks.video.buffer)},x.onFragBuffered=function(E,C){var I=C.frag,j=C.part;if(I.type!==a.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(I)){this.warn("Fragment "+I.sn+(j?" p: "+j.index:"")+" of level "+I.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}I.sn!=="initSegment"&&(this.fragPrevious=I,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(h.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(I,j)},x.onError=function(E,C){switch(C.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:case b.ErrorDetails.KEY_LOAD_ERROR:case b.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(a.PlaylistLevelType.AUDIO,C);break;case b.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case b.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==c.State.ERROR&&this.state!==c.State.STOPPED&&(this.state=C.fatal?c.State.ERROR:c.State.IDLE,this.warn(C.details+" while loading frag, switching to "+this.state+" state"));break;case b.ErrorDetails.BUFFER_FULL_ERROR:if(C.parent==="audio"&&(this.state===c.State.PARSING||this.state===c.State.PARSED)){var I=!0,j=this.getFwdBufferInfo(this.mediaBuffer,a.PlaylistLevelType.AUDIO);j&&j.len>.5&&(I=!this.reduceMaxBufferLength(j.len)),I&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},x.onBufferFlushed=function(E,C){var I=C.type;I===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(E){var C,I="audio",j=this.hls,L=E.remuxResult,H=E.chunkMeta,W=this.getCurrentContext(H);if(!W){this.warn("The loading context changed while buffering fragment "+H.sn+" of level "+H.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(H.level);return}var U=W.frag,G=W.part,B=L.audio,z=L.text,V=L.id3,ie=L.initSegment;if(this.fragContextChanged(U))return;if(this.state=c.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),ie!=null&&ie.tracks&&(this._bufferInitSegment(ie.tracks,U,H),j.trigger(h.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:I,tracks:ie.tracks})),B){var ce=B.startPTS,he=B.endPTS,Ae=B.startDTS,De=B.endDTS;G&&(G.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ce,endPTS:he,startDTS:Ae,endDTS:De}),U.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ce,he,Ae,De),this.bufferFragmentData(B,U,G,H)}if(V!=null&&(C=V.samples)!==null&&C!==void 0&&C.length){var pe=s({frag:U,id:I},V);j.trigger(h.Events.FRAG_PARSING_METADATA,pe)}if(z){var Te=s({frag:U,id:I},z);j.trigger(h.Events.FRAG_PARSING_USERDATA,Te)}},x._bufferInitSegment=function(E,C,I){if(this.state!==c.State.PARSING)return;E.video&&delete E.video;var j=E.audio;if(!j)return;j.levelCodec=j.codec,j.id="audio",this.log("Init audio buffer, container:"+j.container+", codecs[parsed]=["+j.codec+"]"),this.hls.trigger(h.Events.BUFFER_CODECS,E);var L=j.initSegment;if(L!=null&&L.byteLength){var H={type:"audio",frag:C,part:null,chunkMeta:I,parent:C.type,data:L};this.hls.trigger(h.Events.BUFFER_APPENDING,H)}this.tick()},x.loadFragment=function(E,C,I){var j=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||j===d.FragmentState.NOT_LOADED||j===d.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):C.live&&!Object(P.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=c.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,E,C,I)))},x.completeAudioSwitch=function(){var E=this.hls,C=this.media,I=this.trackId;C&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(h.Events.AUDIO_TRACK_SWITCHED,{id:I})},O}(c.default);m.default=l},"./src/controller/audio-track-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),c=S("./src/errors.ts"),h=S("./src/controller/base-playlist-controller.ts"),w=S("./src/types/loader.ts");function d(p,f){for(var v=0;v<f.length;v++){var g=f[v];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}function o(p,f,v){return f&&d(p.prototype,f),v&&d(p,v),p}function a(p,f){p.prototype=Object.create(f.prototype),p.prototype.constructor=p,n(p,f)}function n(p,f){return n=Object.setPrototypeOf||function(g,b){return g.__proto__=b,g},n(p,f)}var u=function(p){a(f,p);function f(g){var b;return b=p.call(this,g,"[audio-track-controller]")||this,b.tracks=[],b.groupId=null,b.tracksInGroup=[],b.trackId=-1,b.trackName="",b.selectDefaultTrack=!0,b.registerListeners(),b}var v=f.prototype;return v.registerListeners=function(){var b=this.hls;b.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),b.on(P.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),b.on(P.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var b=this.hls;b.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),b.off(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),b.off(P.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),b.off(P.Events.ERROR,this.onError,this)},v.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},v.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},v.onManifestParsed=function(b,i){this.tracks=i.audioTracks||[]},v.onAudioTrackLoaded=function(b,i){var s=i.id,t=i.details,T=this.tracksInGroup[s];if(!T){this.warn("Invalid audio track id "+s);return}var _=T.details;T.details=i.details,this.log("audioTrack "+s+" loaded ["+t.startSN+"-"+t.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,i,_))},v.onLevelLoading=function(b,i){this.switchLevel(i.level)},v.onLevelSwitching=function(b,i){this.switchLevel(i.level)},v.switchLevel=function(b){var i=this.hls.levels[b];if(!(i!=null&&i.audioGroupIds))return;var s=i.audioGroupIds[i.urlId];if(this.groupId!==s){this.groupId=s;var t=this.tracks.filter(function(_){return!s||_.groupId===s});this.selectDefaultTrack&&!t.some(function(_){return _.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var T={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(P.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},v.onError=function(b,i){if(p.prototype.onError.call(this,b,i),i.fatal||!i.context)return;i.context.type===w.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},v.setAudioTrack=function(b){var i=this.tracksInGroup;if(b<0||b>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=i[this.trackId];this.log("Now switching to audio-track index "+b);var t=i[b],T=t.id,_=t.groupId,l=_===void 0?"":_,k=t.name,O=t.type,x=t.url;if(this.trackId=b,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(P.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:l,name:k,type:O,url:x}),t.details&&!t.details.live)return;var y=this.switchParams(t.url,s==null?void 0:s.details);this.loadPlaylist(y)},v.selectInitialTrack=function(){var b=this.tracksInGroup;console.assert(b.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,s=this.findTrackId(i)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},v.findTrackId=function(b){for(var i=this.tracksInGroup,s=0;s<i.length;s++){var t=i[s];if((!this.selectDefaultTrack||t.default)&&(!b||b===t.name))return t.id}return-1},v.loadPlaylist=function(b){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var s=i.id,t=i.groupId,T=i.url;if(b)try{T=b.addDirectives(T)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(P.Events.AUDIO_TRACK_LOADING,{url:T,id:s,groupId:t,deliveryDirectives:b||null})}},o(f,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(b){this.selectDefaultTrack=!1,this.setAudioTrack(b)}}]),f}(h.default);m.default=u},"./src/controller/base-playlist-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return o});var P=S("./src/polyfills/number.ts"),c=S("./src/types/level.ts"),h=S("./src/controller/level-helper.ts"),w=S("./src/utils/logger.ts"),d=S("./src/errors.ts"),o=function(){function a(u,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=w.logger.log.bind(w.logger,p+":"),this.warn=w.logger.warn.bind(w.logger,p+":"),this.hls=u}var n=a.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(p,f){f.fatal&&f.type===d.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(p,f){var v=f==null?void 0:f.renditionReports;if(v)for(var g=0;g<v.length;g++){var b=v[g],i=""+b.URI;if(i===p.substr(-i.length)){var s=parseInt(b["LAST-MSN"]),t=parseInt(b["LAST-PART"]);if(f&&this.hls.config.lowLatencyMode){var T=Math.min(f.age-f.partTarget,f.targetduration);t!==void 0&&T>f.partTarget&&(t+=1)}if(Object(P.isFiniteNumber)(s))return new c.HlsUrlParameters(s,Object(P.isFiniteNumber)(t)?t:void 0,c.HlsSkip.No)}}},n.loadPlaylist=function(p){},n.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},n.playlistLoaded=function(p,f,v){var g=this,b=f.details,i=f.stats,s=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(b.advancedDateTime=Date.now()-s,b.live||v!=null&&v.live){if(b.reloaded(v),v&&this.log("live playlist "+p+" "+(b.advanced?"REFRESHED "+b.lastPartSn+"-"+b.lastPartIndex:"MISSED")),v&&b.fragments.length>0&&Object(h.mergeDetails)(v,b),!this.canLoad||!b.live)return;var t,T=void 0,_=void 0;if(b.canBlockReload&&b.endSN&&b.advanced){var l=this.hls.config.lowLatencyMode,k=b.lastPartSn,O=b.endSN,x=b.lastPartIndex,y=x!==-1,E=k===O,C=l?0:x;y?(T=E?O+1:k,_=E?C:x+1):T=O+1;var I=b.age,j=I+b.ageHeader,L=Math.min(j-b.partTarget,b.targetduration*1.5);if(L>0){if(v&&L>v.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+v.tuneInGoal+" to: "+L+" with playlist age: "+b.age),L=0;else{var H=Math.floor(L/b.targetduration);if(T+=H,_!==void 0){var W=Math.round(L%b.targetduration/b.partTarget);_+=W}this.log("CDN Tune-in age: "+b.ageHeader+"s last advanced "+I.toFixed(2)+"s goal: "+L+" skip sn "+H+" to part "+_)}b.tuneInGoal=L}if(t=this.getDeliveryDirectives(b,f.deliveryDirectives,T,_),l||!E){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(b,f.deliveryDirectives,T,_);var U=Object(h.computeReloadInterval)(b,i);T!==void 0&&b.canBlockReload&&(U-=b.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(U)+" ms"),this.timer=self.setTimeout(function(){return g.loadPlaylist(t)},U)}else this.clearTimer()},n.getDeliveryDirectives=function(p,f,v,g){var b=Object(c.getSkipValue)(p,v);return f!=null&&f.skip&&p.deltaUpdateFailed&&(v=f.msn,g=f.part,b=c.HlsSkip.No),new c.HlsUrlParameters(v,g,b)},n.retryLoadingOrFail=function(p){var f=this,v=this.hls.config,g=this.retryCount<v.levelLoadingMaxRetry;if(g){var b;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(b=p.context)!==null&&b!==void 0&&b.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*v.levelLoadingRetryDelay,v.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return f.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return g},a}()},"./src/controller/base-stream-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"State",function(){return O}),S.d(m,"default",function(){return x});var P=S("./src/polyfills/number.ts"),c=S("./src/task-loop.ts"),h=S("./src/controller/fragment-tracker.ts"),w=S("./src/utils/buffer-helper.ts"),d=S("./src/utils/logger.ts"),o=S("./src/events.ts"),a=S("./src/errors.ts"),n=S("./src/types/transmuxer.ts"),u=S("./src/utils/mp4-tools.ts"),p=S("./src/utils/discontinuities.ts"),f=S("./src/controller/fragment-finders.ts"),v=S("./src/controller/level-helper.ts"),g=S("./src/loader/fragment-loader.ts"),b=S("./src/crypt/decrypter.ts"),i=S("./src/utils/time-ranges.ts"),s=S("./src/types/loader.ts");function t(y,E){for(var C=0;C<E.length;C++){var I=E[C];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(y,I.key,I)}}function T(y,E,C){return E&&t(y.prototype,E),C&&t(y,C),y}function _(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function l(y,E){y.prototype=Object.create(E.prototype),y.prototype.constructor=y,k(y,E)}function k(y,E){return k=Object.setPrototypeOf||function(I,j){return I.__proto__=j,I},k(y,E)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},x=function(y){l(E,y);function E(I,j,L){var H;return H=y.call(this)||this,H.hls=void 0,H.fragPrevious=null,H.fragCurrent=null,H.fragmentTracker=void 0,H.transmuxer=null,H._state=O.STOPPED,H.media=void 0,H.mediaBuffer=void 0,H.config=void 0,H.bitrateTest=!1,H.lastCurrentTime=0,H.nextLoadPosition=0,H.startPosition=0,H.loadedmetadata=!1,H.fragLoadError=0,H.retryDate=0,H.levels=null,H.fragmentLoader=void 0,H.levelLastLoaded=null,H.startFragRequested=!1,H.decrypter=void 0,H.initPTS=[],H.onvseeking=null,H.onvended=null,H.logPrefix="",H.log=void 0,H.warn=void 0,H.logPrefix=L,H.log=d.logger.log.bind(d.logger,L+":"),H.warn=d.logger.warn.bind(d.logger,L+":"),H.hls=I,H.fragmentLoader=new g.default(I.config),H.fragmentTracker=j,H.config=I.config,H.decrypter=new b.default(I,I.config),I.on(o.Events.KEY_LOADED,H.onKeyLoaded,_(H)),H}var C=E.prototype;return C.doTick=function(){this.onTickEnd()},C.onTickEnd=function(){},C.startLoad=function(j){},C.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},C._streamEnded=function(j,L){var H=this.fragCurrent,W=this.fragmentTracker;if(!L.live&&H&&H.sn===L.endSN&&!j.nextStart){var U=W.getState(H);return U===h.FragmentState.PARTIAL||U===h.FragmentState.OK}return!1},C.onMediaAttached=function(j,L){var H=this.media=this.mediaBuffer=L.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),H.addEventListener("seeking",this.onvseeking),H.addEventListener("ended",this.onvended);var W=this.config;this.levels&&W.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(W.startPosition)},C.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},C.onMediaSeeking=function(){var j=this.config,L=this.fragCurrent,H=this.media,W=this.mediaBuffer,U=this.state,G=H?H.currentTime:0,B=w.BufferHelper.bufferInfo(W||H,G,j.maxBufferHole);if(this.log("media seeking to "+(Object(P.isFiniteNumber)(G)?G.toFixed(3):G)+", state: "+U),U===O.ENDED)this.resetLoadingState();else if(L&&!B.len){var z=j.maxFragLookUpTolerance,V=L.start-z,ie=L.start+L.duration+z,ce=G>ie;(G<V||ce)&&(ce&&L.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),L.loader.abort()),this.resetLoadingState())}H&&(this.lastCurrentTime=G),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=G),this.tickImmediate()},C.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},C.onKeyLoaded=function(j,L){if(this.state!==O.KEY_LOADING||L.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var H=this.levels[L.frag.level].details;H&&this.loadFragment(L.frag,H,L.frag.start)},C.onHandlerDestroying=function(){this.stopLoad(),y.prototype.onHandlerDestroying.call(this)},C.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(o.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,y.prototype.onHandlerDestroyed.call(this)},C.loadKey=function(j,L){this.log("Loading key for "+j.sn+" of ["+L.startSN+"-"+L.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=O.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(o.Events.KEY_LOADING,{frag:j})},C.loadFragment=function(j,L,H){this._loadFragForPlayback(j,L,H)},C._loadFragForPlayback=function(j,L,H){var W=this,U=function(B){if(W.fragContextChanged(j)){W.warn("Fragment "+j.sn+(B.part?" p: "+B.part.index:"")+" of level "+j.level+" was dropped during download."),W.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,W._handleFragmentLoadProgress(B)};this._doFragLoad(j,L,H,U).then(function(G){if(!G)return;W.fragLoadError=0;var B=W.state;if(W.fragContextChanged(j)){(B===O.FRAG_LOADING||B===O.BACKTRACKING||!W.fragCurrent&&B===O.PARSING)&&(W.fragmentTracker.removeFragment(j),W.state=O.IDLE);return}if("payload"in G&&(W.log("Loaded fragment "+j.sn+" of level "+j.level),W.hls.trigger(o.Events.FRAG_LOADED,G),W.state===O.BACKTRACKING)){W.fragmentTracker.backtrack(j,G),W.resetFragmentLoading(j);return}W._handleFragmentLoadComplete(G)}).catch(function(G){W.warn(G),W.resetFragmentLoading(j)})},C.flushMainBuffer=function(j,L,H){if(H===void 0&&(H=null),!(j-L))return;var W={startOffset:j,endOffset:L,type:H};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,W)},C._loadInitSegment=function(j){var L=this;this._doFragLoad(j).then(function(H){if(!H||L.fragContextChanged(j)||!L.levels)throw new Error("init load aborted");return H}).then(function(H){var W=L.hls,U=H.payload,G=j.decryptdata;if(U&&U.byteLength>0&&G&&G.key&&G.iv&&G.method==="AES-128"){var B=self.performance.now();return L.decrypter.webCryptoDecrypt(new Uint8Array(U),G.key.buffer,G.iv.buffer).then(function(z){var V=self.performance.now();return W.trigger(o.Events.FRAG_DECRYPTED,{frag:j,payload:z,stats:{tstart:B,tdecrypt:V}}),H.payload=z,H})}return H}).then(function(H){var W=L.fragCurrent,U=L.hls,G=L.levels;if(!G)throw new Error("init load aborted, missing levels");var B=G[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var z=j.stats;L.state=O.IDLE,L.fragLoadError=0,j.data=new Uint8Array(H.payload),z.parsing.start=z.buffering.start=self.performance.now(),z.parsing.end=z.buffering.end=self.performance.now(),H.frag===W&&U.trigger(o.Events.FRAG_BUFFERED,{stats:z,frag:W,part:null,id:j.type}),L.tick()}).catch(function(H){L.warn(H),L.resetFragmentLoading(j)})},C.fragContextChanged=function(j){var L=this.fragCurrent;return!j||!L||j.level!==L.level||j.sn!==L.sn||j.urlId!==L.urlId},C.fragBufferedComplete=function(j,L){var H=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(L?" part: "+L.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+i.default.toString(w.BufferHelper.getBuffered(H))),this.state=O.IDLE,this.tick()},C._handleFragmentLoadComplete=function(j){var L=this.transmuxer;if(!L)return;var H=j.frag,W=j.part,U=j.partsLoaded,G=!U||U.length===0||U.some(function(z){return!z}),B=new n.ChunkMetadata(H.level,H.sn,H.stats.chunkCount+1,0,W?W.index:-1,!G);L.flush(B)},C._handleFragmentLoadProgress=function(j){},C._doFragLoad=function(j,L,H,W){var U=this;if(H===void 0&&(H=null),!this.levels)throw new Error("frag load aborted, missing levels");if(H=Math.max(j.start,H||0),this.config.lowLatencyMode&&L){var G=L.partList;if(G&&W){H>j.end&&L.fragmentHint&&(j=L.fragmentHint);var B=this.getNextPart(G,j,H);if(B>-1){var z=G[B];return this.log("Loading part sn: "+j.sn+" p: "+z.index+" cc: "+j.cc+" of playlist ["+L.startSN+"-"+L.endSN+"] parts [0-"+B+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(H.toFixed(3))),this.nextLoadPosition=z.start+z.duration,this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,part:G[B],targetBufferTime:H}),this.doFragPartsLoad(j,G,B,W).catch(function(V){return U.handleFragLoadError(V)})}else if(!j.url||this.loadedEndOfParts(G,H))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(L?"of ["+L.startSN+"-"+L.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(H.toFixed(3))),Object(P.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,targetBufferTime:H}),this.fragmentLoader.load(j,W).catch(function(V){return U.handleFragLoadError(V)})},C.doFragPartsLoad=function(j,L,H,W){var U=this;return new Promise(function(G,B){var z=[],V=function ie(ce){var he=L[ce];U.fragmentLoader.loadPart(j,he,W).then(function(Ae){z[he.index]=Ae;var De=Ae.part;U.hls.trigger(o.Events.FRAG_LOADED,Ae);var pe=L[ce+1];if(pe&&pe.fragment===j)ie(ce+1);else return G({frag:j,part:De,partsLoaded:z})}).catch(B)};V(H)})},C.handleFragLoadError=function(j){var L=j.data;return L&&L.details===a.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(L.frag,L.part):this.hls.trigger(o.Events.ERROR,L),null},C._handleTransmuxerFlush=function(j){var L=this.getCurrentContext(j);if(!L||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var H=L.frag,W=L.part,U=L.level,G=self.performance.now();H.stats.parsing.end=G,W&&(W.stats.parsing.end=G),this.updateLevelTiming(H,W,U,j.partial)},C.getCurrentContext=function(j){var L=this.levels,H=j.level,W=j.sn,U=j.part;if(!L||!L[H])return this.warn("Levels object was unset while buffering fragment "+W+" of level "+H+". The current chunk will not be buffered."),null;var G=L[H],B=U>-1?Object(v.getPartWith)(G,W,U):null,z=B?B.fragment:Object(v.getFragmentWithSN)(G,W,this.fragCurrent);return z?{frag:z,part:B,level:G}:null},C.bufferFragmentData=function(j,L,H,W){if(!j||this.state!==O.PARSING)return;var U=j.data1,G=j.data2,B=U;if(U&&G&&(B=Object(u.appendUint8Array)(U,G)),!B||!B.length)return;var z={type:j.type,frag:L,part:H,chunkMeta:W,parent:L.type,data:B};this.hls.trigger(o.Events.BUFFER_APPENDING,z),j.dropped&&j.independent&&!H&&this.flushBufferGap(L)},C.flushBufferGap=function(j){var L=this.media;if(!L)return;if(!w.BufferHelper.isBuffered(L,L.currentTime)){this.flushMainBuffer(0,j.start);return}var H=L.currentTime,W=w.BufferHelper.bufferInfo(L,H,0),U=j.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,U*.25),B=Math.max(Math.min(j.start-G,W.end-G),H+G);j.start-B>G&&this.flushMainBuffer(B,j.start)},C.getFwdBufferInfo=function(j,L){var H=this.config,W=this.getLoadPosition();if(!Object(P.isFiniteNumber)(W))return null;var U=w.BufferHelper.bufferInfo(j,W,H.maxBufferHole);if(U.len===0&&U.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(W,L);if(G&&U.nextStart<G.end)return w.BufferHelper.bufferInfo(j,W,Math.max(U.nextStart,H.maxBufferHole))}return U},C.getMaxBufferLength=function(j){var L=this.config,H;return j?H=Math.max(8*L.maxBufferSize/j,L.maxBufferLength):H=L.maxBufferLength,Math.min(H,L.maxMaxBufferLength)},C.reduceMaxBufferLength=function(j){var L=this.config,H=j||L.maxBufferLength;return L.maxMaxBufferLength>=H?(L.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+L.maxMaxBufferLength+"s"),!0):!1},C.getNextFragment=function(j,L){var H,W,U=L.fragments,G=U.length;if(!G)return null;var B=this.config,z=U[0].start,V;if(L.live){var ie=B.initialLiveManifestSize;if(G<ie)return this.warn("Not enough fragments to start playback (have: "+G+", need: "+ie+")"),null;!L.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(V=this.getInitialLiveFragment(L,U),this.startPosition=V?this.hls.liveSyncPosition||V.start:j)}else j<=z&&(V=U[0]);if(!V){var ce=B.lowLatencyMode?L.partEnd:L.fragmentEnd;V=this.getFragmentAtPosition(j,ce,L)}return(H=V)!==null&&H!==void 0&&H.initSegment&&!((W=V)!==null&&W!==void 0&&W.initSegment.data)&&!this.bitrateTest&&(V=V.initSegment),V},C.getNextPart=function(j,L,H){for(var W=-1,U=!1,G=!0,B=0,z=j.length;B<z;B++){var V=j[B];if(G=G&&!V.independent,W>-1&&H<V.start)break;var ie=V.loaded;!ie&&(U||V.independent||G)&&V.fragment===L&&(W=B),U=ie}return W},C.loadedEndOfParts=function(j,L){var H=j[j.length-1];return H&&L>H.start&&H.loaded},C.getInitialLiveFragment=function(j,L){var H=this.fragPrevious,W=null;if(H){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+H.programDateTime),W=Object(f.findFragmentByPDT)(L,H.endProgramDateTime,this.config.maxFragLookUpTolerance)),!W){var U=H.sn+1;if(U>=j.startSN&&U<=j.endSN){var G=L[U-j.startSN];H.cc===G.cc&&(W=G,this.log("Live playlist, switching playlist, load frag with next SN: "+W.sn))}W||(W=Object(f.findFragWithCC)(L,H.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?j.fragmentEnd:j.edge,j))}return W},C.getFragmentAtPosition=function(j,L,H){var W=this.config,U=this.fragPrevious,G=H.fragments,B=H.endSN,z=H.fragmentHint,V=W.maxFragLookUpTolerance,ie=!!(W.lowLatencyMode&&H.partList&&z);ie&&z&&!this.bitrateTest&&(G=G.concat(z),B=z.sn);var ce;if(j<L){var he=j>L-V?0:V;ce=Object(f.findFragmentByPTS)(U,G,j,he)}else ce=G[G.length-1];if(ce){var Ae=ce.sn-H.startSN,De=U&&ce.level===U.level,pe=G[Ae+1],Te=this.fragmentTracker.getState(ce);if(Te===h.FragmentState.BACKTRACKED){ce=null;for(var ye=Ae;G[ye]&&this.fragmentTracker.getState(G[ye])===h.FragmentState.BACKTRACKED;)U?ce=G[ye--]:ce=G[--ye];ce||(ce=pe)}else U&&ce.sn===U.sn&&!ie&&(De&&(ce.sn<B&&this.fragmentTracker.getState(pe)!==h.FragmentState.OK?(this.log("SN "+ce.sn+" just loaded, load next one: "+pe.sn),ce=pe):ce=null))}return ce},C.synchronizeToLiveEdge=function(j){var L=this.config,H=this.media;if(!H)return;var W=this.hls.liveSyncPosition,U=H.currentTime,G=j.fragments[0].start,B=j.edge,z=U>=G-L.maxFragLookUpTolerance&&U<=B;if(W!==null&&H.duration>W&&(U<W||!z)){var V=L.liveMaxLatencyDuration!==void 0?L.liveMaxLatencyDuration:L.liveMaxLatencyDurationCount*j.targetduration;(!z&&H.readyState<4||U<B-V)&&(this.loadedmetadata||(this.nextLoadPosition=W),H.readyState&&(this.warn("Playback: "+U.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+W.toFixed(3)),H.currentTime=W))}},C.alignPlaylists=function(j,L){var H=this.levels,W=this.levelLastLoaded,U=this.fragPrevious,G=W!==null?H[W]:null,B=j.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var z=j.fragments[0].start,V=!L,ie=j.alignedSliding&&Object(P.isFiniteNumber)(z);if(V||!ie&&!z){Object(p.alignStream)(U,G,j);var ce=j.fragments[0].start;return this.log("Live playlist sliding: "+ce.toFixed(2)+" start-sn: "+(L?L.startSN:"na")+"->"+j.startSN+" prev-sn: "+(U?U.sn:"na")+" fragments: "+B),ce}return z},C.waitForCdnTuneIn=function(j){var L=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*L)},C.setStartPosition=function(j,L){var H=this.startPosition;if(H<L&&(H=-1),H===-1||this.lastCurrentTime===-1){var W=j.startTimeOffset;Object(P.isFiniteNumber)(W)?(H=L+W,W<0&&(H+=j.totalduration),H=Math.min(Math.max(L,H),L+j.totalduration),this.log("Start time offset "+W+" found in playlist, adjust startPosition to "+H),this.startPosition=H):j.live?H=this.hls.liveSyncPosition||L:this.startPosition=H=0,this.lastCurrentTime=H}this.nextLoadPosition=H},C.getLoadPosition=function(){var j=this.media,L=0;return this.loadedmetadata&&j?L=j.currentTime:this.nextLoadPosition&&(L=this.nextLoadPosition),L},C.handleFragLoadAborted=function(j,L){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(L?" part"+L.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},C.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=O.IDLE)},C.onFragmentOrKeyLoadError=function(j,L){if(L.fatal)return;var H=L.frag;if(!H||H.type!==j)return;var W=this.fragCurrent;console.assert(W&&H.sn===W.sn&&H.level===W.level&&H.urlId===W.urlId,"Frag load error must match current frag to retry");var U=this.config;if(this.fragLoadError+1<=U.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(H.level))return;var G=Math.min(Math.pow(2,this.fragLoadError)*U.fragLoadingRetryDelay,U.fragLoadingMaxRetryTimeout);this.warn("Fragment "+H.sn+" of "+j+" "+H.level+" failed to load, retrying in "+G+"ms"),this.retryDate=self.performance.now()+G,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else L.levelRetry?(j===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(d.logger.error(L.details+" reaches max retry, redispatch as fatal ..."),L.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},C.afterBufferFlushed=function(j,L,H){if(!j)return;var W=w.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(L,W,H),this.state===O.ENDED&&this.resetLoadingState()},C.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},C.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var L=this.levels?this.levels[j].details:null;if(L!=null&&L.live)return this.startPosition=-1,this.setStartPosition(L,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},C.updateLevelTiming=function(j,L,H,W){var U=this,G=H.details;console.assert(!!G,"level.details must be defined");var B=Object.keys(j.elementaryStreams).reduce(function(z,V){var ie=j.elementaryStreams[V];if(ie){var ce=ie.endPTS-ie.startPTS;if(ce<=0)return U.warn("Could not parse fragment "+j.sn+" "+V+" duration reliably ("+ce+") resetting transmuxer to fallback to playlist timing"),U.resetTransmuxer(),z||!1;var he=W?0:Object(v.updateFragPTSDTS)(G,j,ie.startPTS,ie.endPTS,ie.startDTS,ie.endDTS);return U.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:G,level:H,drift:he,type:V,frag:j,start:ie.startPTS,end:ie.endPTS}),!0}return z},!1);B?(this.state=O.PARSED,this.hls.trigger(o.Events.FRAG_PARSED,{frag:j,part:L})):this.resetLoadingState()},C.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},T(E,[{key:"state",get:function(){return this._state},set:function(j){var L=this._state;L!==j&&(this._state=j,this.log(L+"->"+j))}}]),E}(c.default)},"./src/controller/buffer-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return f});var P=S("./src/polyfills/number.ts"),c=S("./src/events.ts"),h=S("./src/utils/logger.ts"),w=S("./src/errors.ts"),d=S("./src/utils/buffer-helper.ts"),o=S("./src/utils/mediasource-helper.ts"),a=S("./src/loader/fragment.ts"),n=S("./src/controller/buffer-operation-queue.ts"),u=Object(o.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function v(b){var i=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 s=i.hls,t=i.media,T=i.mediaSource;h.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),s.trigger(c.Events.MEDIA_ATTACHED,{media:t})),T&&T.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){h.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){h.logger.log("[buffer-controller]: Media source ended")},this.hls=b,this._initSourceBuffer(),this.registerListeners()}var g=v.prototype;return g.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},g.destroy=function(){this.unregisterListeners(),this.details=null},g.registerListeners=function(){var i=this.hls;i.on(c.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(c.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(c.Events.BUFFER_RESET,this.onBufferReset,this),i.on(c.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(c.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(c.Events.BUFFER_EOS,this.onBufferEos,this),i.on(c.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(c.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(c.Events.FRAG_PARSED,this.onFragParsed,this),i.on(c.Events.FRAG_CHANGED,this.onFragChanged,this)},g.unregisterListeners=function(){var i=this.hls;i.off(c.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(c.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(c.Events.BUFFER_RESET,this.onBufferReset,this),i.off(c.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(c.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(c.Events.BUFFER_EOS,this.onBufferEos,this),i.off(c.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(c.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(c.Events.FRAG_PARSED,this.onFragParsed,this),i.off(c.Events.FRAG_CHANGED,this.onFragChanged,this)},g._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},g.onManifestParsed=function(i,s){var t=2;(s.audio&&!s.video||!s.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,h.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},g.onMediaAttaching=function(i,s){var t=this.media=s.media;if(t&&u){var T=this.mediaSource=new u;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(T),this._objectUrl=t.src}},g.onMediaDetaching=function(){var i=this.media,s=this.mediaSource,t=this._objectUrl;if(s){if(h.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(T){h.logger.warn("[buffer-controller]: onMediaDetaching: "+T.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):h.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(c.Events.MEDIA_DETACHED,void 0)},g.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(s){var t=i.sourceBuffer[s];try{t&&(i.removeBufferListeners(s),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[s]=void 0)}catch(T){h.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",T)}}),this._initSourceBuffer()},g.onBufferCodecs=function(i,s){var t=this,T=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(_){if(T){var l=t.tracks[_];if(l&&typeof l.buffer.changeType=="function"){var k=s[_],O=k.codec,x=k.levelCodec,y=k.container,E=(l.levelCodec||l.codec).replace(p,"$1"),C=(x||O).replace(p,"$1");if(E!==C){var I=y+";codecs="+(x||O);t.appendChangeType(_,I)}}}else t.pendingTracks[_]=s[_]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},g.appendChangeType=function(i,s){var t=this,T=this.operationQueue,_={execute:function(){var k=t.sourceBuffer[i];k&&(h.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+s),k.changeType(s)),T.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(k){h.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",k)}};T.append(_,i)},g.onBufferAppending=function(i,s){var t=this,T=this.hls,_=this.operationQueue,l=this.tracks,k=s.data,O=s.type,x=s.frag,y=s.part,E=s.chunkMeta,C=E.buffering[O],I=self.performance.now();C.start=I;var j=x.stats.buffering,L=y?y.stats.buffering:null;j.start===0&&(j.start=I),L&&L.start===0&&(L.start=I);var H=l.audio,W=O==="audio"&&E.id===1&&(H==null?void 0:H.container)==="audio/mpeg",U={execute:function(){if(C.executeStart=self.performance.now(),W){var B=t.sourceBuffer[O];if(B){var z=x.start-B.timestampOffset;Math.abs(z)>=.1&&(h.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+x.start+" (delta: "+z+") sn: "+x.sn+")"),B.timestampOffset=x.start)}}t.appendExecutor(k,O)},onStart:function(){},onComplete:function(){var B=self.performance.now();C.executeEnd=C.end=B,j.first===0&&(j.first=B),L&&L.first===0&&(L.first=B);var z=t.sourceBuffer,V={};for(var ie in z)V[ie]=d.BufferHelper.getBuffered(z[ie]);t.appendError=0,t.hls.trigger(c.Events.BUFFER_APPENDED,{type:O,frag:x,part:y,chunkMeta:E,parent:x.type,timeRanges:V})},onError:function(B){h.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",B);var z={type:w.ErrorTypes.MEDIA_ERROR,parent:x.type,details:w.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?z.details=w.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,z.details=w.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>T.config.appendErrorMaxRetry&&(h.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),z.fatal=!0)),T.trigger(c.Events.ERROR,z)}};_.append(U,O)},g.onBufferFlushing=function(i,s){var t=this,T=this.operationQueue,_=function(k){return{execute:t.removeExecutor.bind(t,k,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(c.Events.BUFFER_FLUSHED,{type:k})},onError:function(x){h.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",x)}}};s.type?T.append(_(s.type),s.type):this.getSourceBufferTypes().forEach(function(l){T.append(_(l),l)})},g.onFragParsed=function(i,s){var t=this,T=s.frag,_=s.part,l=[],k=_?_.elementaryStreams:T.elementaryStreams;k[a.ElementaryStreamTypes.AUDIOVIDEO]?l.push("audiovideo"):(k[a.ElementaryStreamTypes.AUDIO]&&l.push("audio"),k[a.ElementaryStreamTypes.VIDEO]&&l.push("video"));var O=function(){var y=self.performance.now();T.stats.buffering.end=y,_&&(_.stats.buffering.end=y);var E=_?_.stats:T.stats;t.hls.trigger(c.Events.FRAG_BUFFERED,{frag:T,part:_,stats:E,id:T.type})};l.length===0&&h.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(O,l)},g.onFragChanged=function(i,s){this.flushBackBuffer()},g.onBufferEos=function(i,s){var t=this,T=this.getSourceBufferTypes().reduce(function(_,l){var k=t.sourceBuffer[l];return(!s.type||s.type===l)&&(k&&!k.ended&&(k.ended=!0,h.logger.log("[buffer-controller]: "+l+" sourceBuffer now EOS"))),_&&!!(!k||k.ended)},!0);T&&this.blockBuffers(function(){var _=t.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},g.onLevelUpdated=function(i,s){var t=s.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},g.flushBackBuffer=function(){var i=this.hls,s=this.details,t=this.media,T=this.sourceBuffer;if(!t||s===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var l=s.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(P.isFiniteNumber)(l)||l<0)return;var k=t.currentTime,O=s.levelTargetDuration,x=Math.max(l,O),y=Math.floor(k/O)*O-x;_.forEach(function(E){var C=T[E];if(C){var I=d.BufferHelper.getBuffered(C);I.length>0&&y>I.start(0)&&(i.trigger(c.Events.BACK_BUFFER_REACHED,{bufferEnd:y}),s.live&&i.trigger(c.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:y}),i.trigger(c.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:y,type:E}))}})},g.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,s=this.hls,t=this.media,T=this.mediaSource,_=i.fragments[0].start+i.totalduration,l=t.duration,k=Object(P.isFiniteNumber)(T.duration)?T.duration:0;i.live&&s.config.liveDurationInfinity?(h.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(i)):(_>k&&_>l||!Object(P.isFiniteNumber)(l))&&(h.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),T.duration=_)},g.updateSeekableRange=function(i){var s=this.mediaSource,t=i.fragments,T=t.length;if(T&&i.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var _=Math.max(0,t[0].start),l=Math.max(_,_+i.totalduration);s.setLiveSeekableRange(_,l)}},g.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,s=this.operationQueue,t=this.pendingTracks,T=Object.keys(t).length;if(T&&!i||T===2){this.createSourceBuffers(t),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(c.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}_.forEach(function(l){s.executeNext(l)})}},g.createSourceBuffers=function(i){var s=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var _ in i)if(!s[_]){var l=i[_];if(!l)throw Error("source buffer exists for track "+_+", however track does not");var k=l.levelCodec||l.codec,O=l.container+";codecs="+k;h.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var x=s[_]=t.addSourceBuffer(O),y=_;this.addBufferListener(y,"updatestart",this._onSBUpdateStart),this.addBufferListener(y,"updateend",this._onSBUpdateEnd),this.addBufferListener(y,"error",this._onSBUpdateError),this.tracks[_]={buffer:x,codec:k,container:l.container,levelCodec:l.levelCodec,id:l.id},T++}catch(E){h.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(c.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:O})}}T&&this.hls.trigger(c.Events.BUFFER_CREATED,{tracks:this.tracks})},g._onSBUpdateStart=function(i){var s=this.operationQueue,t=s.current(i);t.onStart()},g._onSBUpdateEnd=function(i){var s=this.operationQueue,t=s.current(i);t.onComplete(),s.shiftAndExecuteNext(i)},g._onSBUpdateError=function(i,s){h.logger.error("[buffer-controller]: "+i+" SourceBuffer error",s),this.hls.trigger(c.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(s)},g.removeExecutor=function(i,s,t){var T=this.media,_=this.mediaSource,l=this.operationQueue,k=this.sourceBuffer,O=k[i];if(!T||!_||!O){h.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),l.shiftAndExecuteNext(i);return}var x=Object(P.isFiniteNumber)(T.duration)?T.duration:Infinity,y=Object(P.isFiniteNumber)(_.duration)?_.duration:Infinity,E=Math.max(0,s),C=Math.min(t,x,y);C>E?(h.logger.log("[buffer-controller]: Removing ["+E+","+C+"] from the "+i+" SourceBuffer"),console.assert(!O.updating,i+" sourceBuffer must not be updating"),O.remove(E,C)):l.shiftAndExecuteNext(i)},g.appendExecutor=function(i,s){var t=this.operationQueue,T=this.sourceBuffer,_=T[s];if(!_){h.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(s);return}_.ended=!1,console.assert(!_.updating,s+" sourceBuffer must not be updating"),_.appendBuffer(i)},g.blockBuffers=function(i,s){var t=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){h.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var T=this.operationQueue,_=s.map(function(l){return T.appendBlocker(l)});Promise.all(_).then(function(){i(),s.forEach(function(l){var k=t.sourceBuffer[l];(!k||!k.updating)&&T.shiftAndExecuteNext(l)})})},g.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},g.addBufferListener=function(i,s,t){var T=this.sourceBuffer[i];if(!T)return;var _=t.bind(this,i);this.listeners[i].push({event:s,listener:_}),T.addEventListener(s,_)},g.removeBufferListeners=function(i){var s=this.sourceBuffer[i];if(!s)return;this.listeners[i].forEach(function(t){s.removeEventListener(t.event,t.listener)})},v}()},"./src/controller/buffer-operation-queue.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return c});var P=S("./src/utils/logger.ts"),c=function(){function h(d){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=d}var w=h.prototype;return w.append=function(o,a){var n=this.queues[a];n.push(o),n.length===1&&this.buffers[a]&&this.executeNext(a)},w.insertAbort=function(o,a){var n=this.queues[a];n.unshift(o),this.executeNext(a)},w.appendBlocker=function(o){var a,n=new Promise(function(p){a=p}),u={execute:a,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,o),n},w.executeNext=function(o){var a=this.buffers,n=this.queues,u=a[o],p=n[o];if(p.length){var f=p[0];try{f.execute()}catch(v){P.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),f.onError(v),(!u||!u.updating)&&(p.shift(),this.executeNext(o))}}},w.shiftAndExecuteNext=function(o){this.queues[o].shift(),this.executeNext(o)},w.current=function(o){return this.queues[o][0]},h}()},"./src/controller/cap-level-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts");function c(d,o){for(var a=0;a<o.length;a++){var n=o[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(d,n.key,n)}}function h(d,o,a){return o&&c(d.prototype,o),a&&c(d,a),d}var w=function(){function d(a){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=a,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var o=d.prototype;return o.setStreamController=function(n){this.streamController=n},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var n=this.hls;n.on(P.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var n=this.hls;n.off(P.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(n,u){d.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},o.onMediaAttaching=function(n,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},o.onManifestParsed=function(n,u){var p=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},o.onBufferCodecs=function(n,u){var p=this.hls;p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(n.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},o.getMaxLevel=function(n){var u=this,p=this.hls.levels;if(!p.length)return-1;var f=p.filter(function(v,g){return d.isLevelAllowed(g,u.restrictedLevels)&&g<=n});return this.clientRect=null,d.getMaxLevelByMediaSize(f,this.mediaWidth,this.mediaHeight)},o.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()},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,u={width:0,height:0};if(n){var p=n.getBoundingClientRect();u.width=p.width,u.height=p.height,!u.width&&!u.height&&(u.width=p.right-p.left||n.width||0,u.height=p.bottom-p.top||n.height||0)}return this.clientRect=u,u},d.isLevelAllowed=function(n,u){return u===void 0&&(u=[]),u.indexOf(n)===-1},d.getMaxLevelByMediaSize=function(n,u,p){if(!n||!n.length)return-1;for(var f=function(s,t){return t?s.width!==t.width||s.height!==t.height:!0},v=n.length-1,g=0;g<n.length;g+=1){var b=n[g];if((b.width>=u||b.height>=p)&&f(b,n[g+1])){v=g;break}}return v},h(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*d.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*d.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(u){}return n}}]),d}();m.default=w},"./src/controller/cmcd-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return f});var P=S("./src/events.ts"),c=S("./src/types/cmcd.ts"),h=S("./src/utils/buffer-helper.ts"),w=S("./src/utils/logger.ts");function d(v,g){for(var b=0;b<g.length;b++){var i=g[b];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(v,i.key,i)}}function o(v,g,b){return g&&d(v.prototype,g),b&&d(v,b),v}function a(v,g){var b=typeof Symbol!="undefined"&&v[Symbol.iterator]||v["@@iterator"];if(b)return(b=b.call(v)).next.bind(b);if(Array.isArray(v)||(b=n(v))||g&&v&&typeof v.length=="number"){b&&(v=b);var i=0;return function(){return i>=v.length?{done:!0}:{done:!1,value:v[i++]}}}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(v,g){if(!v)return;if(typeof v=="string")return u(v,g);var b=Object.prototype.toString.call(v).slice(8,-1);if(b==="Object"&&v.constructor&&(b=v.constructor.name),b==="Map"||b==="Set")return Array.from(v);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return u(v,g)}function u(v,g){(g==null||g>v.length)&&(g=v.length);for(var b=0,i=new Array(g);b<g;b++)i[b]=v[b];return i}function p(){return p=Object.assign||function(v){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var i in b)Object.prototype.hasOwnProperty.call(b,i)&&(v[i]=b[i])}return v},p.apply(this,arguments)}var f=function(){function v(b){var i=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(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(T){try{i.apply(T,{ot:c.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(_){w.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(T){try{var _=T.frag,l=i.hls.levels[_.level],k=i.getObjectType(_),O={d:_.duration*1e3,ot:k};(k===c.CMCDObjectType.VIDEO||k===c.CMCDObjectType.AUDIO||k==c.CMCDObjectType.MUXED)&&(O.br=l.bitrate/1e3,O.tb=i.getTopBandwidth(k),O.bl=i.getBufferLength(k)),i.apply(T,O)}catch(x){w.logger.warn("Could not generate segment CMCD data.",x)}},this.hls=b;var s=this.config=b.config,t=s.cmcd;t!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||v.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var g=v.prototype;return g.registerListeners=function(){var i=this.hls;i.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(P.Events.BUFFER_CREATED,this.onBufferCreated,this)},g.unregisterListeners=function(){var i=this.hls;i.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(P.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},g.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},g.onMediaAttached=function(i,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},g.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},g.onBufferCreated=function(i,s){var t,T;this.audioBuffer=(t=s.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(T=s.tracks.video)===null||T===void 0?void 0:T.buffer},g.createData=function(){var i;return{v:c.CMCDVersion,sf:c.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},g.apply=function(i,s){s===void 0&&(s={}),p(s,this.createData());var t=s.ot===c.CMCDObjectType.INIT||s.ot===c.CMCDObjectType.VIDEO||s.ot===c.CMCDObjectType.MUXED;if(this.starved&&t&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var T=v.toHeaders(s);if(!Object.keys(T).length)return;i.headers||(i.headers={}),p(i.headers,T)}else{var _=v.toQuery(s);if(!_)return;i.url=v.appendQueryToUri(i.url,_)}},g.getObjectType=function(i){var s=i.type;return s==="subtitle"?c.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?c.CMCDObjectType.INIT:s==="audio"?c.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?c.CMCDObjectType.VIDEO:c.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(i){for(var s=0,t=i===c.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,T=a(t),_;!(_=T()).done;){var l=_.value;l.bitrate>s&&(s=l.bitrate)}return s>0?s:NaN},g.getBufferLength=function(i){var s=this.hls.media,t=i===c.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!s)return NaN;var T=h.BufferHelper.bufferInfo(t,s.currentTime,this.config.maxBufferHole);return T.len*1e3},g.createPlaylistLoader=function(){var i=this.config.pLoader,s=this.applyPlaylistData,t=i||this.config.loader;return function(){function T(l){this.loader=void 0,this.loader=new t(l)}var _=T.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(k,O,x){s(k),this.loader.load(k,O,x)},o(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},g.createFragmentLoader=function(){var i=this.config.fLoader,s=this.applyFragmentData,t=i||this.config.loader;return function(){function T(l){this.loader=void 0,this.loader=new t(l)}var _=T.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(k,O,x){s(k),this.loader.load(k,O,x)},o(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},v.uuid=function(){var i=URL.createObjectURL(new Blob),s=i.toString();return URL.revokeObjectURL(i),s.substr(s.lastIndexOf("/")+1)},v.serialize=function(i){for(var s=[],t=function(W){return!Number.isNaN(W)&&W!=null&&W!==""&&W!==!1},T=function(W){return Math.round(W)},_=function(W){return T(W/100)*100},l=function(W){return encodeURIComponent(W)},k={br:T,d:T,bl:_,dl:_,mtp:_,nor:l,rtp:_,tb:T},O=Object.keys(i||{}).sort(),x=a(O),y;!(y=x()).done;){var E=y.value,C=i[E];if(!t(C))continue;if(E==="v"&&C===1)continue;if(E=="pr"&&C===1)continue;var I=k[E];I&&(C=I(C));var j=typeof C,L=void 0;E==="ot"||E==="sf"||E==="st"?L=E+"="+C:j==="boolean"?L=E:j==="number"?L=E+"="+C:L=E+"="+JSON.stringify(C),s.push(L)}return s.join(",")},v.toHeaders=function(i){for(var s=Object.keys(i),t={},T=["Object","Request","Session","Status"],_=[{},{},{},{}],l={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},k=0,O=s;k<O.length;k++){var x=O[k],y=l[x]!=null?l[x]:1;_[y][x]=i[x]}for(var E=0;E<_.length;E++){var C=v.serialize(_[E]);C&&(t["CMCD-"+T[E]]=C)}return t},v.toQuery=function(i){return"CMCD="+encodeURIComponent(v.serialize(i))},v.appendQueryToUri=function(i,s){if(!s)return i;var t=i.includes("?")?"&":"?";return""+i+t+s},v}()},"./src/controller/eme-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),c=S("./src/errors.ts"),h=S("./src/utils/logger.ts"),w=S("./src/utils/mediakeys-helper.ts");function d(f,v){for(var g=0;g<v.length;g++){var b=v[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}function o(f,v,g){return v&&d(f.prototype,v),g&&d(f,g),f}var a=3,n=function(v,g,b){var i={audioCapabilities:[],videoCapabilities:[]};return v.forEach(function(s){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:b.audioRobustness||""})}),g.forEach(function(s){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:b.videoRobustness||""})}),[i]},u=function(v,g,b,i){switch(v){case w.KeySystems.WIDEVINE:return n(g,b,i);default:throw new Error("Unknown key-system: "+v)}},p=function(){function f(g){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=g,this._config=g.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 v=f.prototype;return v.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},v._registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this)},v._unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this)},v.getLicenseServerUrl=function(b){switch(b){case w.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+b+'"')},v._attemptKeySystemAccess=function(b,i,s){var t=this,T=u(b,i,s,this._drmSystemOptions);h.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(b,T);this.mediaKeysPromise=_.then(function(l){return t._onMediaKeySystemAccessObtained(b,l)}),_.catch(function(l){h.logger.error('Failed to obtain key-system "'+b+'" access:',l)})},v._onMediaKeySystemAccessObtained=function(b,i){var s=this;h.logger.log('Access for key-system "'+b+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:b};this._mediaKeysList.push(t);var T=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(_){return t.mediaKeys=_,h.logger.log('Media-keys created for key-system "'+b+'"'),s._onMediaKeysCreated(),_});return T.catch(function(_){h.logger.error("Failed to create media-keys:",_)}),T},v._onMediaKeysCreated=function(){var b=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),b._onNewMediaKeySession(i.mediaKeysSession))})},v._onNewMediaKeySession=function(b){var i=this;h.logger.log("New key-system session "+b.sessionId),b.addEventListener("message",function(s){i._onKeySessionMessage(b,s.message)},!1)},v._onKeySessionMessage=function(b,i){h.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(s){h.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),b.update(s)})},v.onMediaEncrypted=function(b){var i=this;if(h.logger.log('Media is encrypted using "'+b.initDataType+'" init data type'),!this.mediaKeysPromise){h.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(T){if(!i._media)return;i._attemptSetMediaKeys(T),i._generateRequestWithPreferredKeySession(b.initDataType,b.initData)};this.mediaKeysPromise.then(s).catch(s)},v._attemptSetMediaKeys=function(b){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){h.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}h.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},v._generateRequestWithPreferredKeySession=function(b,i){var s=this,t=this._mediaKeysList[0];if(!t){h.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){h.logger.warn("Key-Session already initialized but requested again");return}var T=t.mediaKeysSession;if(!T){h.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){h.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}h.logger.log('Generating key-session request for "'+b+'" init data type'),t.mediaKeysSessionInitialized=!0,T.generateRequest(b,i).then(function(){h.logger.debug("Key-session generation succeeded")}).catch(function(_){h.logger.error("Error generating key-session request:",_),s.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},v._createLicenseXhr=function(b,i,s){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,b,i,s);var T=this._licenseXhrSetup;if(T)try{T.call(this.hls,t,b),T=void 0}catch(_){h.logger.error(_)}try{t.readyState||t.open("POST",b,!0),T&&T.call(this.hls,t,b)}catch(_){throw new Error("issue setting up KeySystem license XHR "+_)}return t},v._onLicenseRequestReadyStageChange=function(b,i,s,t){switch(b.readyState){case 4:if(b.status===200){this._requestLicenseFailureCount=0,h.logger.log("License request succeeded");var T=b.response,_=this._licenseResponseCallback;if(_)try{T=_.call(this.hls,b,i)}catch(k){h.logger.error(k)}t(T)}else{if(h.logger.error("License Request XHR failed ("+i+"). Status: "+b.status+" ("+b.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>a){this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var l=a-this._requestLicenseFailureCount+1;h.logger.warn("Retrying license request, "+l+" attempts left"),this._requestLicense(s,t)}break}},v._generateLicenseRequestChallenge=function(b,i){switch(b.mediaKeySystemDomain){case w.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+b.mediaKeySystemDomain)},v._requestLicense=function(b,i){h.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){h.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(s.mediaKeySystemDomain),T=this._createLicenseXhr(t,b,i);h.logger.log("Sending license request to URL: "+t);var _=this._generateLicenseRequestChallenge(s,b);T.send(_)}catch(l){h.logger.error("Failure requesting DRM license: "+l),this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.KEY_SYSTEM_ERROR,details:c.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},v.onMediaAttached=function(b,i){if(!this._emeEnabled)return;var s=i.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},v.onMediaDetached=function(){var b=this._media,i=this._mediaKeysList;if(!b)return;b.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return b.setMediaKeys(null)}).catch(function(){})},v.onManifestParsed=function(b,i){if(!this._emeEnabled)return;var s=i.levels.map(function(T){return T.audioCodec}).filter(function(T){return!!T}),t=i.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(w.KeySystems.WIDEVINE,s,t)},o(f,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),f}();m.default=p},"./src/controller/fps-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),c=S("./src/utils/logger.ts"),h=function(){function w(o){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=o,this.registerListeners()}var d=w.prototype;return d.setStreamController=function(a){this.streamController=a},d.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},d.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching)},d.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},d.onMediaAttaching=function(a,n){var u=this.hls.config;if(u.capLevelOnFPSDrop){var p=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),u.fpsDroppedMonitoringPeriod)}},d.checkFPS=function(a,n,u){var p=performance.now();if(n){if(this.lastTime){var f=p-this.lastTime,v=u-this.lastDroppedFrames,g=n-this.lastDecodedFrames,b=1e3*v/f,i=this.hls;if(i.trigger(P.Events.FPS_DROP,{currentDropped:v,currentDecoded:g,totalDroppedFrames:u}),b>0&&v>i.config.fpsDroppedMonitoringThreshold*g){var s=i.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=s)&&(s=s-1,i.trigger(P.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:i.currentLevel}),i.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=u,this.lastDecodedFrames=n}},d.checkFPSInterval=function(){var a=this.media;if(a)if(this.isVideoPlaybackQualityAvailable){var n=a.getVideoPlaybackQuality();this.checkFPS(a,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(a,a.webkitDecodedFrameCount,a.webkitDroppedFrameCount)},w}();m.default=h},"./src/controller/fragment-finders.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"findFragmentByPDT",function(){return h}),S.d(m,"findFragmentByPTS",function(){return w}),S.d(m,"fragmentWithinToleranceTest",function(){return d}),S.d(m,"pdtWithinToleranceTest",function(){return o}),S.d(m,"findFragWithCC",function(){return a});var P=S("./src/polyfills/number.ts"),c=S("./src/utils/binary-search.ts");function h(n,u,p){if(u===null||!Array.isArray(n)||!n.length||!Object(P.isFiniteNumber)(u))return null;var f=n[0].programDateTime;if(u<(f||0))return null;var v=n[n.length-1].endProgramDateTime;if(u>=(v||0))return null;p=p||0;for(var g=0;g<n.length;++g){var b=n[g];if(o(u,p,b))return b}return null}function w(n,u,p,f){p===void 0&&(p=0),f===void 0&&(f=0);var v=null;if(n?v=u[n.sn-u[0].sn+1]||null:p===0&&u[0].start===0&&(v=u[0]),v&&d(p,f,v)===0)return v;var g=c.default.search(u,d.bind(null,p,f));return g||v}function d(n,u,p){n===void 0&&(n=0),u===void 0&&(u=0);var f=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-f<=n?1:p.start-f>n&&p.start?-1:0}function o(n,u,p){var f=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,v=p.endProgramDateTime||0;return v-f>n}function a(n,u){return c.default.search(n,function(p){return p.cc<u?1:p.cc>u?-1:0})}},"./src/controller/fragment-tracker.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"FragmentState",function(){return h}),S.d(m,"FragmentTracker",function(){return w});var P=S("./src/events.ts"),c=S("./src/types/loader.ts"),h;(function(a){a.NOT_LOADED="NOT_LOADED",a.BACKTRACKED="BACKTRACKED",a.APPENDING="APPENDING",a.PARTIAL="PARTIAL",a.OK="OK"})(h||(h={}));var w=function(){function a(u){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=u,this._registerListeners()}var n=a.prototype;return n._registerListeners=function(){var p=this.hls;p.on(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var p=this.hls;p.off(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(p,f){if(f===c.PlaylistLevelType.MAIN){var v=this.activeFragment,g=this.activeParts;if(!v)return null;if(g)for(var b=g.length;b--;){var i=g[b],s=i?i.end:v.appendedPTS;if(i.start<=p&&s!==void 0&&p<=s)return b>9&&(this.activeParts=g.slice(b-9)),i}else if(v.start<=p&&v.appendedPTS!==void 0&&p<=v.appendedPTS)return v}return this.getBufferedFrag(p,f)},n.getBufferedFrag=function(p,f){for(var v=this.fragments,g=Object.keys(v),b=g.length;b--;){var i=v[g[b]];if((i==null?void 0:i.body.type)===f&&i.buffered){var s=i.body;if(s.start<=p&&p<=s.end)return s}}return null},n.detectEvictedFragments=function(p,f,v){var g=this;Object.keys(this.fragments).forEach(function(b){var i=g.fragments[b];if(!i)return;if(!i.buffered){i.body.type===v&&g.removeFragment(i.body);return}var s=i.range[p];if(!s)return;s.time.some(function(t){var T=!g.isTimeBuffered(t.startPTS,t.endPTS,f);return T&&g.removeFragment(i.body),T})})},n.detectPartialFragments=function(p){var f=this,v=this.timeRanges,g=p.frag,b=p.part;if(!v||g.sn==="initSegment")return;var i=o(g),s=this.fragments[i];if(!s)return;Object.keys(v).forEach(function(t){var T=g.elementaryStreams[t];if(!T)return;var _=v[t],l=b!==null||T.partial===!0;s.range[t]=f.getBufferedTimes(g,b,l,_)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},n.fragBuffered=function(p){var f=o(p),v=this.fragments[f];v&&(v.backtrack=v.loaded=null,v.buffered=!0)},n.getBufferedTimes=function(p,f,v,g){for(var b={time:[],partial:v},i=f?f.start:p.start,s=f?f.end:p.end,t=p.minEndPTS||s,T=p.maxStartPTS||i,_=0;_<g.length;_++){var l=g.start(_)-this.bufferPadding,k=g.end(_)+this.bufferPadding;if(T>=l&&t<=k){b.time.push({startPTS:Math.max(i,g.start(_)),endPTS:Math.min(s,g.end(_))});break}else if(i<k&&s>l)b.partial=!0,b.time.push({startPTS:Math.max(i,g.start(_)),endPTS:Math.min(s,g.end(_))});else if(s<=l)break}return b},n.getPartialFragment=function(p){var f=null,v,g,b,i=0,s=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(T){var _=t[T];if(!_)return;d(_)&&(g=_.body.start-s,b=_.body.end+s,p>=g&&p<=b&&(v=Math.min(p-g,b-p),i<=v&&(f=_.body,i=v)))}),f},n.getState=function(p){var f=o(p),v=this.fragments[f];return v?v.buffered?d(v)?h.PARTIAL:h.OK:v.backtrack?h.BACKTRACKED:h.APPENDING:h.NOT_LOADED},n.backtrack=function(p,f){var v=o(p),g=this.fragments[v];if(!g||g.backtrack)return null;var b=g.backtrack=f||g.loaded;return g.loaded=null,b},n.getBacktrackData=function(p){var f=o(p),v=this.fragments[f];if(v){var g,b=v.backtrack;if(b!=null&&(g=b.payload)!==null&&g!==void 0&&g.byteLength)return b;this.removeFragment(p)}return null},n.isTimeBuffered=function(p,f,v){for(var g,b,i=0;i<v.length;i++){if(g=v.start(i)-this.bufferPadding,b=v.end(i)+this.bufferPadding,p>=g&&f<=b)return!0;if(f<=g)return!1}return!1},n.onFragLoaded=function(p,f){var v=f.frag,g=f.part;if(v.sn==="initSegment"||v.bitrateTest||g)return;var b=o(v);this.fragments[b]={body:v,loaded:f,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(p,f){var v=this,g=f.frag,b=f.part,i=f.timeRanges;if(g.type===c.PlaylistLevelType.MAIN)if(this.activeFragment=g,b){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(b)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var T=i[t];if(v.detectEvictedFragments(t,T),!b)for(var _=0;_<T.length;_++)g.appendedPTS=Math.max(T.end(_),g.appendedPTS||0)})},n.onFragBuffered=function(p,f){this.detectPartialFragments(f)},n.hasFragment=function(p){var f=o(p);return!!this.fragments[f]},n.removeFragmentsInRange=function(p,f,v){var g=this;Object.keys(this.fragments).forEach(function(b){var i=g.fragments[b];if(!i)return;if(i.buffered){var s=i.body;s.type===v&&s.start<f&&s.end>p&&g.removeFragment(s)}})},n.removeFragment=function(p){var f=o(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[f]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},a}();function d(a){var n,u;return a.buffered&&(((n=a.range.video)===null||n===void 0?void 0:n.partial)||((u=a.range.audio)===null||u===void 0?void 0:u.partial))}function o(a){return a.type+"_"+a.level+"_"+a.urlId+"_"+a.sn}},"./src/controller/gap-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"STALL_MINIMUM_DURATION_MS",function(){return d}),S.d(m,"MAX_START_GAP_JUMP",function(){return o}),S.d(m,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return a}),S.d(m,"SKIP_BUFFER_RANGE_START",function(){return n}),S.d(m,"default",function(){return u});var P=S("./src/utils/buffer-helper.ts"),c=S("./src/errors.ts"),h=S("./src/events.ts"),w=S("./src/utils/logger.ts"),d=250,o=2,a=.1,n=.05,u=function(){function p(v,g,b,i){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=v,this.media=g,this.fragmentTracker=b,this.hls=i}var f=p.prototype;return f.destroy=function(){this.hls=this.fragmentTracker=this.media=null},f.poll=function(g){var b=this.config,i=this.media,s=this.stalled,t=i.currentTime,T=i.seeking,_=this.seeking&&!T,l=!this.seeking&&T;if(this.seeking=T,t!==g){if(this.moved=!0,s!==null){if(this.stallReported){var k=self.performance.now()-s;w.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((l||_)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!P.BufferHelper.getBuffered(i).length)return;var O=P.BufferHelper.bufferInfo(i,t,0),x=O.len>0,y=O.nextStart||0;if(!x&&!y)return;if(T){var E=O.len>o,C=!y||y-t>o&&!this.fragmentTracker.getPartialFragment(t);if(E||C)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var I,j=Math.max(y,O.start||0)-t,L=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,H=L==null||((I=L.details)===null||I===void 0)?void 0:I.live,W=H?L.details.targetduration*2:o;if(j>0&&j<=W){this._trySkipBufferHole(null);return}}var U=self.performance.now();if(s===null){this.stalled=U;return}var G=U-s;!T&&G>=d&&this._reportStall(O.len);var B=P.BufferHelper.bufferInfo(i,t,b.maxBufferHole);this._tryFixBufferStall(B,G)},f._tryFixBufferStall=function(g,b){var i=this.config,s=this.fragmentTracker,t=this.media,T=t.currentTime,_=s.getPartialFragment(T);if(_){var l=this._trySkipBufferHole(_);if(l)return}g.len>i.maxBufferHole&&b>i.highBufferWatchdogPeriod*1e3&&(w.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},f._reportStall=function(g){var b=this.hls,i=this.media,s=this.stallReported;s||(this.stallReported=!0,w.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+g+")"),b.trigger(h.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}))},f._trySkipBufferHole=function(g){for(var b=this.config,i=this.hls,s=this.media,t=s.currentTime,T=0,_=P.BufferHelper.getBuffered(s),l=0;l<_.length;l++){var k=_.start(l);if(t+b.maxBufferHole>=T&&t<k){var O=Math.max(k+n,s.currentTime+a);return w.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,s.currentTime=O,g&&i.trigger(h.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+O,frag:g}),O}T=_.end(l)}return 0},f._tryNudgeBuffer=function(){var g=this.config,b=this.hls,i=this.media,s=i.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<g.nudgeMaxRetry){var T=s+t*g.nudgeOffset;w.logger.warn("Nudging 'currentTime' from "+s+" to "+T),i.currentTime=T,b.trigger(h.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else w.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+g.nudgeMaxRetry+" nudges"),b.trigger(h.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),c=S("./src/utils/texttrack-utils.ts"),h=S("./src/demux/id3.ts"),w=.25,d=function(){function o(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var a=o.prototype;return a.destroy=function(){this._unregisterListeners()},a._registerListeners=function(){var u=this.hls;u.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},a._unregisterListeners=function(){var u=this.hls;u.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},a.onMediaAttached=function(u,p){this.media=p.media},a.onMediaDetaching=function(){if(!this.id3Track)return;Object(c.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},a.getID3Track=function(u){if(!this.media)return;for(var p=0;p<u.length;p++){var f=u[p];if(f.kind==="metadata"&&f.label==="id3")return Object(c.sendAddTrackEvent)(f,this.media),f}return this.media.addTextTrack("metadata","id3")},a.onFragParsingMetadata=function(u,p){if(!this.media)return;var f=p.frag,v=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var g=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,b=0;b<v.length;b++){var i=h.getID3Frames(v[b].data);if(i){var s=v[b].pts,t=b<v.length-1?v[b+1].pts:f.end,T=t-s;T<=0&&(t=s+w);for(var _=0;_<i.length;_++){var l=i[_];if(!h.isTimeStampFrame(l)){var k=new g(s,t,"");k.value=l,this.id3Track.addCue(k)}}}}},a.onBufferFlushing=function(u,p){var f=p.startOffset,v=p.endOffset,g=p.type;if(!g||g==="audio"){var b=this.id3Track;b&&Object(c.removeCuesInRange)(b,f,v)}},o}();m.default=d},"./src/controller/latency-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return o});var P=S("./src/errors.ts"),c=S("./src/events.ts"),h=S("./src/utils/logger.ts");function w(a,n){for(var u=0;u<n.length;u++){var p=n[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}function d(a,n,u){return n&&w(a.prototype,n),u&&w(a,u),a}var o=function(){function a(u){var p=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 p.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var n=a.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(c.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(c.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(c.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(c.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(c.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(c.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(c.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(c.Events.ERROR,this.onError)},n.onMediaAttached=function(p,f){this.media=f.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(p,f){var v=f.details;this.levelDetails=v,v.advanced&&this.timeupdate(),!v.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(p,f){if(f.details!==P.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,h.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var p=this.media,f=this.levelDetails;if(!p||!f)return;this.currentTime=p.currentTime;var v=this.computeLatency();if(v===null)return;this._latency=v;var g=this.config,b=g.lowLatencyMode,i=g.maxLiveSyncPlaybackRate;if(!b||i===1)return;var s=this.targetLatency;if(s===null)return;var t=v-s,T=Math.min(this.maxLatency,s+f.targetduration),_=t<T;if(f.live&&_&&t>.05&&this.forwardBufferLength>1){var l=Math.min(2,Math.max(1,i)),k=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;p.playbackRate=Math.min(l,Math.max(1,k))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},n.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},n.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},d(a,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,f=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:f?p.liveMaxLatencyDurationCount*f.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var f=p.holdBack,v=p.partHoldBack,g=p.targetduration,b=this.config,i=b.liveSyncDuration,s=b.liveSyncDurationCount,t=b.lowLatencyMode,T=this.hls.userConfig,_=t&&v||f;(T.liveSyncDuration||T.liveSyncDurationCount||_===0)&&(_=i!==void 0?i:s*g);var l=g,k=1;return _+Math.min(this.stallCount*k,l)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),f=this.targetLatency,v=this.levelDetails;if(p===null||f===null||v===null)return null;var g=v.edge,b=p-f-this.edgeStalled,i=g-v.totalduration,s=g-(this.config.lowLatencyMode&&v.partTarget||v.targetduration);return Math.min(Math.max(i,b),s)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var f=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-f,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,f=this.levelDetails;if(!p||!f)return 0;var v=p.buffered.length;return v?p.buffered.end(v-1):f.edge-this.currentTime}}]),a}()},"./src/controller/level-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return b});var P=S("./src/types/level.ts"),c=S("./src/events.ts"),h=S("./src/errors.ts"),w=S("./src/utils/codecs.ts"),d=S("./src/controller/level-helper.ts"),o=S("./src/controller/base-playlist-controller.ts"),a=S("./src/types/loader.ts");function n(){return n=Object.assign||function(i){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var T in t)Object.prototype.hasOwnProperty.call(t,T)&&(i[T]=t[T])}return i},n.apply(this,arguments)}function u(i,s){for(var t=0;t<s.length;t++){var T=s[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(i,T.key,T)}}function p(i,s,t){return s&&u(i.prototype,s),t&&u(i,t),i}function f(i,s){i.prototype=Object.create(s.prototype),i.prototype.constructor=i,v(i,s)}function v(i,s){return v=Object.setPrototypeOf||function(T,_){return T.__proto__=_,T},v(i,s)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),b=function(i){f(s,i);function s(T){var _;return _=i.call(this,T,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var t=s.prototype;return t._registerListeners=function(){var _=this.hls;_.on(c.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(c.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(c.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(c.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(c.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var _=this.hls;_.off(c.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(c.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(c.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(c.Events.FRAG_LOADED,this.onFragLoaded,this),_.off(c.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},t.startLoad=function(){var _=this._levels;_.forEach(function(l){l.loadError=0}),i.prototype.startLoad.call(this)},t.onManifestLoaded=function(_,l){var k=[],O=[],x=[],y,E={},C,I=!1,j=!1,L=!1;if(l.levels.forEach(function(G){var B=G.attrs;I=I||!!(G.width&&G.height),j=j||!!G.videoCodec,L=L||!!G.audioCodec,g&&G.audioCodec&&G.audioCodec.indexOf("mp4a.40.34")!==-1&&(G.audioCodec=void 0);var z=G.bitrate+"-"+G.attrs.RESOLUTION+"-"+G.attrs.CODECS;C=E[z],C?C.url.push(G.url):(C=new P.Level(G),E[z]=C,k.push(C)),B&&(B.AUDIO&&Object(d.addGroupId)(C,"audio",B.AUDIO),B.SUBTITLES&&Object(d.addGroupId)(C,"text",B.SUBTITLES))}),(I||j)&&L&&(k=k.filter(function(G){var B=G.videoCodec,z=G.width,V=G.height;return!!B||!!(z&&V)})),k=k.filter(function(G){var B=G.audioCodec,z=G.videoCodec;return(!B||Object(w.isCodecSupportedInMp4)(B,"audio"))&&(!z||Object(w.isCodecSupportedInMp4)(z,"video"))}),l.audioTracks&&(O=l.audioTracks.filter(function(G){return!G.audioCodec||Object(w.isCodecSupportedInMp4)(G.audioCodec,"audio")}),Object(d.assignTrackIdsByGroup)(O)),l.subtitles&&(x=l.subtitles,Object(d.assignTrackIdsByGroup)(x)),k.length>0){y=k[0].bitrate,k.sort(function(G,B){return G.bitrate-B.bitrate}),this._levels=k;for(var H=0;H<k.length;H++)if(k[H].bitrate===y){this._firstLevel=H,this.log("manifest loaded, "+k.length+" level(s) found, first bitrate: "+y);break}var W=L&&!j,U={levels:k,audioTracks:O,subtitleTracks:x,firstLevel:this._firstLevel,stats:l.stats,audio:L,video:j,altAudio:!W&&O.some(function(G){return!!G.url})};this.hls.trigger(c.Events.MANIFEST_PARSED,U),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(c.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:l.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(_,l){if(i.prototype.onError.call(this,_,l),l.fatal)return;var k=l.context,O=this._levels[this.currentLevelIndex];if(k&&(k.type===a.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&k.groupId===O.audioGroupIds[O.urlId]||k.type===a.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&k.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var x=!1,y=!0,E;switch(l.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:if(l.frag){var C=this._levels[l.frag.level];C?(C.fragmentError++,C.fragmentError>this.hls.config.fragLoadingMaxRetry&&(E=l.frag.level)):E=l.frag.level}break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(y=!1),E=k.level),x=!0;break;case h.ErrorDetails.REMUX_ALLOC_ERROR:E=l.level,x=!0;break}E!==void 0&&this.recoverLevel(l,E,x,y)},t.recoverLevel=function(_,l,k,O){var x=_.details,y=this._levels[l];if(y.loadError++,k){var E=this.retryLoadingOrFail(_);if(E)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var C=y.url.length;if(C>1&&y.loadError<C)_.levelRetry=!0,this.redundantFailover(l);else if(this.manualLevelIndex===-1){var I=l===0?this._levels.length-1:l-1;this.currentLevelIndex!==I&&this._levels[I].loadError===0&&(this.warn(x+": switch to "+I),_.levelRetry=!0,this.hls.nextAutoLevel=I)}}},t.redundantFailover=function(_){var l=this._levels[_],k=l.url.length;if(k>1){var O=(l.urlId+1)%k;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(x){x.urlId=O}),this.level=_}},t.onFragLoaded=function(_,l){var k=l.frag;if(k!==void 0&&k.type===a.PlaylistLevelType.MAIN){var O=this._levels[k.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(_,l){var k,O=l.level,x=l.details,y=this._levels[O];if(!y){var E;this.warn("Invalid level index "+O),(E=l.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(x.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(y.fragmentError===0&&(y.loadError=0,this.retryCount=0),this.playlistLoaded(O,l,y.details)):(k=l.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(x.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(_,l){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var O=-1,x=this.hls.audioTracks[l.id].groupId,y=0;y<k.audioGroupIds.length;y++)if(k.audioGroupIds[y]===x){O=y;break}O!==k.urlId&&(k.urlId=O,this.startLoad())}},t.loadPlaylist=function(_){var l=this.currentLevelIndex,k=this._levels[l];if(this.canLoad&&k&&k.url.length>0){var O=k.urlId,x=k.url[O];if(_)try{x=_.addDirectives(x)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Attempt loading level index "+l+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+O+" "+x),this.clearTimer(),this.hls.trigger(c.Events.LEVEL_LOADING,{url:x,level:l,id:O,deliveryDirectives:_||null})}},t.removeLevel=function(_,l){var k=function(y,E){return E!==l},O=this._levels.filter(function(x,y){return y!==_?!0:x.url.length>1&&l!==void 0?(x.url=x.url.filter(k),x.audioGroupIds&&(x.audioGroupIds=x.audioGroupIds.filter(k)),x.textGroupIds&&(x.textGroupIds=x.textGroupIds.filter(k)),x.urlId=0,!0):!1}).map(function(x,y){var E=x.details;return E!=null&&E.fragments&&E.fragments.forEach(function(C){C.level=y}),x});this._levels=O,this.hls.trigger(c.Events.LEVELS_UPDATED,{levels:O})},p(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var l,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===_&&(l=k[_])!==null&&l!==void 0&&l.details)return;if(_<0||_>=k.length){var O=_<0;if(this.hls.trigger(c.Events.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:O,reason:"invalid level idx"}),O)return;_=Math.min(_,k.length-1)}this.clearTimer();var x=this.currentLevelIndex,y=k[x],E=k[_];this.log("switching to level "+_+" from "+x),this.currentLevelIndex=_;var C=n({},E,{level:_,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete C._urlId,this.hls.trigger(c.Events.LEVEL_SWITCHING,C);var I=E.details;if(!I||I.live){var j=this.switchParams(E.uri,y==null?void 0:y.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),s}(o.default)},"./src/controller/level-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"addGroupId",function(){return h}),S.d(m,"assignTrackIdsByGroup",function(){return w}),S.d(m,"updatePTS",function(){return d}),S.d(m,"updateFragPTSDTS",function(){return a}),S.d(m,"mergeDetails",function(){return n}),S.d(m,"mapPartIntersection",function(){return u}),S.d(m,"mapFragmentIntersection",function(){return p}),S.d(m,"adjustSliding",function(){return f}),S.d(m,"addSliding",function(){return v}),S.d(m,"computeReloadInterval",function(){return g}),S.d(m,"getFragmentWithSN",function(){return b}),S.d(m,"getPartWith",function(){return i});var P=S("./src/polyfills/number.ts"),c=S("./src/utils/logger.ts");function h(s,t,T){switch(t){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(T);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(T);break}}function w(s){var t={};s.forEach(function(T){var _=T.groupId||"";T.id=t[_]=t[_]||0,t[_]++})}function d(s,t,T){var _=s[t],l=s[T];o(_,l)}function o(s,t){var T=t.startPTS;if(Object(P.isFiniteNumber)(T)){var _=0,l;t.sn>s.sn?(_=T-s.start,l=s):(_=s.start-T,l=t),l.duration!==_&&(l.duration=_)}else if(t.sn>s.sn){var k=s.cc===t.cc;k&&s.minEndPTS?t.start=s.start+(s.minEndPTS-s.start):t.start=s.start+s.duration}else t.start=Math.max(s.start-t.duration,0)}function a(s,t,T,_,l,k){var O=_-T;O<=0&&(c.logger.warn("Fragment should have a positive duration",t),_=T+t.duration,k=l+t.duration);var x=T,y=_,E=t.startPTS,C=t.endPTS;if(Object(P.isFiniteNumber)(E)){var I=Math.abs(E-T);Object(P.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(I,t.deltaPTS):t.deltaPTS=I,x=Math.max(T,E),T=Math.min(T,E),l=Math.min(l,t.startDTS),y=Math.min(_,C),_=Math.max(_,C),k=Math.max(k,t.endDTS)}t.duration=_-T;var j=T-t.start;t.appendedPTS=_,t.start=t.startPTS=T,t.maxStartPTS=x,t.startDTS=l,t.endPTS=_,t.minEndPTS=y,t.endDTS=k;var L=t.sn;if(!s||L<s.startSN||L>s.endSN)return 0;var H,W=L-s.startSN,U=s.fragments;for(U[W]=t,H=W;H>0;H--)o(U[H],U[H-1]);for(H=W;H<U.length-1;H++)o(U[H],U[H+1]);return s.fragmentHint&&o(U[U.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,j}function n(s,t){for(var T=null,_=s.fragments,l=_.length-1;l>=0;l--){var k=_[l].initSegment;if(k){T=k;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var O=0,x;if(p(s,t,function(H,W){H.relurl&&(O=H.cc-W.cc),Object(P.isFiniteNumber)(H.startPTS)&&Object(P.isFiniteNumber)(H.endPTS)&&(W.start=W.startPTS=H.startPTS,W.startDTS=H.startDTS,W.appendedPTS=H.appendedPTS,W.maxStartPTS=H.maxStartPTS,W.endPTS=H.endPTS,W.endDTS=H.endDTS,W.minEndPTS=H.minEndPTS,W.duration=H.endPTS-H.startPTS,W.duration&&(x=W),t.PTSKnown=t.alignedSliding=!0),W.elementaryStreams=H.elementaryStreams,W.loader=H.loader,W.stats=H.stats,W.urlId=H.urlId,H.initSegment&&(W.initSegment=H.initSegment,T=H.initSegment)}),T){var y=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;y.forEach(function(H){var W;(!H.initSegment||H.initSegment.relurl===((W=T)===null||W===void 0?void 0:W.relurl))&&(H.initSegment=T)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(H){return!H}),t.deltaUpdateFailed)){c.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 C=t.fragments;if(O){c.logger.warn("discontinuity sliding from playlist, take drift into account");for(var I=0;I<C.length;I++)C[I].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),u(s.partList,t.partList,function(H,W){W.elementaryStreams=H.elementaryStreams,W.stats=H.stats}),x?a(t,x,x.startPTS,x.endPTS,x.startDTS,x.endDTS):f(s,t),C.length&&(t.totalduration=t.edge-C[0].start),t.driftStartTime=s.driftStartTime,t.driftStart=s.driftStart;var j=t.advancedDateTime;if(t.advanced&&j){var L=t.edge;t.driftStart||(t.driftStartTime=j,t.driftStart=L),t.driftEndTime=j,t.driftEnd=L}else t.driftEndTime=s.driftEndTime,t.driftEnd=s.driftEnd,t.advancedDateTime=s.advancedDateTime}function u(s,t,T){if(s&&t)for(var _=0,l=0,k=s.length;l<=k;l++){var O=s[l],x=t[l+_];O&&x&&O.index===x.index&&O.fragment.sn===x.fragment.sn?T(O,x):_--}}function p(s,t,T){for(var _=t.skippedSegments,l=Math.max(s.startSN,t.startSN)-t.startSN,k=(s.fragmentHint?1:0)+(_?t.endSN:Math.min(s.endSN,t.endSN))-t.startSN,O=t.startSN-s.startSN,x=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,y=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,E=l;E<=k;E++){var C=y[O+E],I=x[E];_&&!I&&E<_&&(I=t.fragments[E]=C),C&&I&&T(C,I)}}function f(s,t){var T=t.startSN+t.skippedSegments-s.startSN,_=s.fragments;if(T<0||T>=_.length)return;v(t,_[T].start)}function v(s,t){if(t){for(var T=s.fragments,_=s.skippedSegments;_<T.length;_++)T[_].start+=t;s.fragmentHint&&(s.fragmentHint.start+=t)}}function g(s,t){var T=1e3*s.levelTargetDuration,_=T/2,l=s.age,k=l>0&&l<T*3,O=t.loading.end-t.loading.start,x,y=s.availabilityDelay;if(s.updated===!1)if(k){var E=333*s.misses;x=Math.max(Math.min(_,O*2),E),s.availabilityDelay=(s.availabilityDelay||0)+x}else x=_;else k?(y=Math.min(y||T/2,l),s.availabilityDelay=y,x=y+T-l):x=T-O;return Math.round(x)}function b(s,t,T){if(!s||!s.details)return null;var _=s.details,l=_.fragments[t-_.startSN];return l||(l=_.fragmentHint,l&&l.sn===t?l:t<_.startSN&&T&&T.sn===t?T:null)}function i(s,t,T){if(!s||!s.details)return null;var _=s.details.partList;if(_)for(var l=_.length;l--;){var k=_[l];if(k.index===T&&k.fragment.sn===t)return k}return null}},"./src/controller/stream-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return _});var P=S("./src/polyfills/number.ts"),c=S("./src/controller/base-stream-controller.ts"),h=S("./src/is-supported.ts"),w=S("./src/events.ts"),d=S("./src/utils/buffer-helper.ts"),o=S("./src/controller/fragment-tracker.ts"),a=S("./src/types/loader.ts"),n=S("./src/loader/fragment.ts"),u=S("./src/demux/transmuxer-interface.ts"),p=S("./src/types/transmuxer.ts"),f=S("./src/controller/gap-controller.ts"),v=S("./src/errors.ts"),g=S("./src/utils/logger.ts");function b(l,k){for(var O=0;O<k.length;O++){var x=k[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function i(l,k,O){return k&&b(l.prototype,k),O&&b(l,O),l}function s(l,k){l.prototype=Object.create(k.prototype),l.prototype.constructor=l,t(l,k)}function t(l,k){return t=Object.setPrototypeOf||function(x,y){return x.__proto__=y,x},t(l,k)}var T=100,_=function(l){s(k,l);function k(x,y){var E;return E=l.call(this,x,y,"[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 O=k.prototype;return O._registerListeners=function(){var y=this.hls;y.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),y.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),y.on(w.Events.ERROR,this.onError,this),y.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),y.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var y=this.hls;y.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),y.off(w.Events.ERROR,this.onError,this),y.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),y.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(y){if(this.levels){var E=this.lastCurrentTime,C=this.hls;if(this.stopLoad(),this.setInterval(T),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var I=C.startLevel;I===-1&&(C.config.testBandwidth?(I=0,this.bitrateTest=!0):I=C.nextAutoLevel),this.level=C.nextLoadLevel=I,this.loadedmetadata=!1}E>0&&y===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),y=E),this.state=c.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()}else this._forceStartLoad=!0,this.state=c.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,l.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case c.State.IDLE:this.doTickIdle();break;case c.State.WAITING_LEVEL:{var y,E=this.levels,C=this.level,I=E==null||((y=E[C])===null||y===void 0)?void 0:y.details;if(I&&(!I.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(I))break;this.state=c.State.IDLE;break}break}case c.State.FRAG_LOADING_WAITING_RETRY:{var j,L=self.performance.now(),H=this.retryDate;(!H||L>=H||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=c.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){l.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var y,E,C=this.hls,I=this.levelLastLoaded,j=this.levels,L=this.media,H=C.config,W=C.nextLoadLevel;if(I===null||!L&&(this.startFragRequested||!H.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[W])return;var U=j[W];this.level=C.nextLoadLevel=W;var G=U.details;if(!G||this.state===c.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==W){this.state=c.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:L,a.PlaylistLevelType.MAIN);if(B===null)return;var z=B.len,V=this.getMaxBufferLength(U.maxBitrate);if(z>=V)return;if(this._streamEnded(B,G)){var ie={};this.altAudio&&(ie.type="video"),this.hls.trigger(w.Events.BUFFER_EOS,ie),this.state=c.State.ENDED;return}var ce=B.end,he=this.getNextFragment(ce,G);if(this.couldBacktrack&&!this.fragPrevious&&he&&he.sn!=="initSegment"){var Ae=he.sn-G.startSN;Ae>1&&(he=G.fragments[Ae-1],this.fragmentTracker.removeFragment(he))}if(he&&this.fragmentTracker.getState(he)===o.FragmentState.OK&&this.nextLoadPosition>ce){var De=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(L,De,a.PlaylistLevelType.MAIN),he=this.getNextFragment(this.nextLoadPosition,G)}if(!he)return;he.initSegment&&!he.initSegment.data&&!this.bitrateTest&&(he=he.initSegment),((y=he.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((E=he.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(he,G):this.loadFragment(he,G,ce)},O.loadFragment=function(y,E,C){var I,j=this.fragmentTracker.getState(y);if(this.fragCurrent=y,j===o.FragmentState.BACKTRACKED){var L=this.fragmentTracker.getBacktrackData(y);if(L){this._handleFragmentLoadProgress(L),this._handleFragmentLoadComplete(L);return}else j=o.FragmentState.NOT_LOADED}j===o.FragmentState.NOT_LOADED||j===o.FragmentState.PARTIAL?y.sn==="initSegment"?this._loadInitSegment(y):this.bitrateTest?(y.bitrateTest=!0,this.log("Fragment "+y.sn+" of level "+y.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(y)):(this.startFragRequested=!0,l.prototype.loadFragment.call(this,y,E,C)):j===o.FragmentState.APPENDING?this.reduceMaxBufferLength(y.duration)&&this.fragmentTracker.removeFragment(y):((I=this.media)===null||I===void 0?void 0:I.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(y){var E=this.fragmentTracker.getAppendedFrag(y,a.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},O.getBufferedFrag=function(y){return this.fragmentTracker.getBufferedFrag(y,a.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(y){return y?this.getBufferedFrag(y.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var y=this.levels,E=this.media;if(E!=null&&E.readyState){var C,I=this.getAppendedFrag(E.currentTime);if(I&&I.start>1&&this.flushMainBuffer(0,I.start-1),!E.paused&&y){var j=this.hls.nextLoadLevel,L=y[j],H=this.fragLastKbps;H&&this.fragCurrent?C=this.fragCurrent.duration*L.maxBitrate/(1e3*H)+1:C=0}else C=0;var W=this.getBufferedFrag(E.currentTime+C);if(W){var U=this.followingBufferedFrag(W);if(U){this.abortCurrentFrag();var G=U.maxStartPTS?U.maxStartPTS:U.start,B=U.duration,z=Math.max(W.end,G+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(z,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var y=this.fragCurrent;this.fragCurrent=null,y!=null&&y.loader&&y.loader.abort(),this.state===c.State.KEY_LOADING&&(this.state=c.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(y,E){l.prototype.flushMainBuffer.call(this,y,E,this.altAudio?"video":null)},O.onMediaAttached=function(y,E){l.prototype.onMediaAttached.call(this,y,E);var C=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),C.addEventListener("playing",this.onvplaying),C.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,C,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var y=this.media;y&&(y.removeEventListener("playing",this.onvplaying),y.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),l.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var y=this.media,E=y?y.currentTime:null;Object(P.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(y,E){var C=!1,I=!1,j;E.levels.forEach(function(L){j=L.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(C=!0),j.indexOf("mp4a.40.5")!==-1&&(I=!0))}),this.audioCodecSwitch=C&&I&&!Object(h.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},O.onLevelLoading=function(y,E){var C=this.levels;if(!C||this.state!==c.State.IDLE)return;var I=C[E.level];(!I.details||I.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(I.details))&&(this.state=c.State.WAITING_LEVEL)},O.onLevelLoaded=function(y,E){var C,I=this.levels,j=E.level,L=E.details,H=L.totalduration;if(!I){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+L.startSN+","+L.endSN+"], cc ["+L.startCC+", "+L.endCC+"] duration:"+H);var W=this.fragCurrent;W&&(this.state===c.State.FRAG_LOADING||this.state===c.State.FRAG_LOADING_WAITING_RETRY)&&(W.level!==E.level&&W.loader&&(this.state=c.State.IDLE,W.loader.abort()));var U=I[j],G=0;if(L.live||(C=U.details)!==null&&C!==void 0&&C.live){if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed)return;G=this.alignPlaylists(L,U.details)}if(U.details=L,this.levelLastLoaded=j,this.hls.trigger(w.Events.LEVEL_UPDATED,{details:L,level:j}),this.state===c.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(L))return;this.state=c.State.IDLE}this.startFragRequested?L.live&&this.synchronizeToLiveEdge(L):this.setStartPosition(L,G),this.tick()},O._handleFragmentLoadProgress=function(y){var E,C=y.frag,I=y.part,j=y.payload,L=this.levels;if(!L){this.warn("Levels were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var H=L[C.level],W=H.details;if(!W){this.warn("Dropping fragment "+C.sn+" of level "+C.level+" after level details were reset");return}var U=H.videoCodec,G=W.PTSKnown||!W.live,B=(E=C.initSegment)===null||E===void 0?void 0:E.data,z=this._getAudioCodec(H),V=this.transmuxer=this.transmuxer||new u.default(this.hls,a.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ie=I?I.index:-1,ce=ie!==-1,he=new p.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,j.byteLength,ie,ce),Ae=this.initPTS[C.cc];V.push(j,B,z,U,C,I,W.totalduration,G,he,Ae)},O.onAudioTrackSwitching=function(y,E){var C=this.altAudio,I=!!E.url,j=E.id;if(!I){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 H=this.hls;C&&H.trigger(w.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),H.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:j})}},O.onAudioTrackSwitched=function(y,E){var C=E.id,I=!!this.hls.audioTracks[C].url;if(I){var j=this.videoBuffer;j&&this.mediaBuffer!==j&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=j)}this.altAudio=I,this.tick()},O.onBufferCreated=function(y,E){var C=E.tracks,I,j,L=!1;for(var H in C){var W=C[H];if(W.id==="main"){if(j=H,I=W,H==="video"){var U=C[H];U&&(this.videoBuffer=U.buffer)}}else L=!0}L&&I?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=I.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(y,E){var C=E.frag,I=E.part;if(C&&C.type!==a.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(I?" p: "+I.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state),this.state===c.State.PARSED&&(this.state=c.State.IDLE);return}var j=I?I.stats:C.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),C.sn!=="initSegment"&&(this.fragPrevious=C),this.fragBufferedComplete(C,I)},O.onError=function(y,E){switch(E.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(a.PlaylistLevelType.MAIN,E);break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==c.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=c.State.ERROR):!E.levelRetry&&this.state===c.State.WAITING_LEVEL&&(this.state=c.State.IDLE));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===c.State.PARSING||this.state===c.State.PARSED)){var C=!0,I=this.getFwdBufferInfo(this.media,a.PlaylistLevelType.MAIN);I&&I.len>.5&&(C=!this.reduceMaxBufferLength(I.len)),C&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var y=this.media,E=this.gapController;if(!y||!E||!y.readyState)return;var C=d.BufferHelper.getBuffered(y);!this.loadedmetadata&&C.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=y.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=c.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(y,E){var C=E.type;if(C!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var I=(C===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(I,C,a.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(y,E){this.levels=E.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var y=this.media,E=y.currentTime,C=this.startPosition;if(C>=0&&E<C){if(y.seeking){g.logger.log("could not seek to "+C+", already seeking at "+E);return}var I=d.BufferHelper.getBuffered(y),j=I.length?I.start(0):0,L=j-C;L>0&&(L<this.config.maxBufferHole||L<this.config.maxFragLookUpTolerance)&&(g.logger.log("adjusting start position by "+L+" to match buffer start"),C+=L,this.startPosition=C),this.log("seek to target start position "+C+" from current time "+E),y.currentTime=C}},O._getAudioCodec=function(y){var E=this.config.defaultAudioCodec||y.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},O._loadBitrateTestFrag=function(y){var E=this;this._doFragLoad(y).then(function(C){var I=E.hls;if(!C||I.nextLoadLevel||E.fragContextChanged(y))return;E.fragLoadError=0,E.state=c.State.IDLE,E.startFragRequested=!1,E.bitrateTest=!1;var j=y.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),I.trigger(w.Events.FRAG_LOADED,C)})},O._handleTransmuxComplete=function(y){var E,C="main",I=this.hls,j=y.remuxResult,L=y.chunkMeta,H=this.getCurrentContext(L);if(!H){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=H.frag,U=H.part,G=H.level,B=j.video,z=j.text,V=j.id3,ie=j.initSegment,ce=this.altAudio?void 0:j.audio;if(this.fragContextChanged(W))return;if(this.state=c.State.PARSING,ie){ie.tracks&&(this._bufferInitSegment(G,ie.tracks,W,L),I.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:C,tracks:ie.tracks}));var he=ie.initPTS,Ae=ie.timescale;Object(P.isFiniteNumber)(he)&&(this.initPTS[W.cc]=he,I.trigger(w.Events.INIT_PTS_FOUND,{frag:W,id:C,initPTS:he,timescale:Ae}))}if(B&&j.independent!==!1){if(G.details){var De=B.startPTS,pe=B.endPTS,Te=B.startDTS,ye=B.endDTS;if(U)U.elementaryStreams[B.type]={startPTS:De,endPTS:pe,startDTS:Te,endDTS:ye};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var ue=this.getLoadPosition()+this.config.maxBufferHole;if(ue<De){this.backtrack(W);return}W.setElementaryStreamInfo(B.type,W.start,pe,W.start,ye,!0)}W.setElementaryStreamInfo(B.type,De,pe,Te,ye),this.bufferFragmentData(B,W,U,L)}}else if(j.independent===!1){this.backtrack(W);return}if(ce){var le=ce.startPTS,te=ce.endPTS,fe=ce.startDTS,q=ce.endDTS;U&&(U.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:te,startDTS:fe,endDTS:q}),W.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,le,te,fe,q),this.bufferFragmentData(ce,W,U,L)}if(V!=null&&(E=V.samples)!==null&&E!==void 0&&E.length){var ee={frag:W,id:C,samples:V.samples};I.trigger(w.Events.FRAG_PARSING_METADATA,ee)}if(z){var Ce={frag:W,id:C,samples:z.samples};I.trigger(w.Events.FRAG_PARSING_USERDATA,Ce)}},O._bufferInitSegment=function(y,E,C,I){var j=this;if(this.state!==c.State.PARSING)return;this.audioOnly=!!E.audio&&!E.video,this.altAudio&&!this.audioOnly&&delete E.audio;var L=E.audio,H=E.video,W=E.audiovideo;if(L){var U=y.audioCodec,G=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(U&&(U.indexOf("mp4a.40.5")!==-1?U="mp4a.40.2":U="mp4a.40.5"),L.metadata.channelCount!==1&&G.indexOf("firefox")===-1&&(U="mp4a.40.5")),G.indexOf("android")!==-1&&L.container!=="audio/mpeg"&&(U="mp4a.40.2",this.log("Android: force audio codec to "+U)),y.audioCodec&&y.audioCodec!==U&&this.log('Swapping manifest audio codec "'+y.audioCodec+'" for "'+U+'"'),L.levelCodec=U,L.id="main",this.log("Init audio buffer, container:"+L.container+", codecs[selected/level/parsed]=["+(U||"")+"/"+(y.audioCodec||"")+"/"+L.codec+"]")}H&&(H.levelCodec=y.videoCodec,H.id="main",this.log("Init video buffer, container:"+H.container+", codecs[level/parsed]=["+(y.videoCodec||"")+"/"+H.codec+"]")),W&&this.log("Init audiovideo buffer, container:"+W.container+", codecs[level/parsed]=["+(y.attrs.CODECS||"")+"/"+W.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,E),Object.keys(E).forEach(function(B){var z=E[B],V=z.initSegment;V!=null&&V.byteLength&&j.hls.trigger(w.Events.BUFFER_APPENDING,{type:B,data:V,frag:C,part:null,chunkMeta:I,parent:C.type})}),this.tick()},O.backtrack=function(y){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(y);var E=this.fragmentTracker.backtrack(y);this.fragPrevious=null,this.nextLoadPosition=y.start,E?this.resetFragmentLoading(y):this.state=c.State.BACKTRACKING},O.checkFragmentChanged=function(){var y=this.media,E=null;if(y&&y.readyState>1&&y.seeking===!1){var C=y.currentTime;if(d.BufferHelper.isBuffered(y,C)?E=this.getAppendedFrag(C):d.BufferHelper.isBuffered(y,C+.1)&&(E=this.getAppendedFrag(C+.1)),E){var I=this.fragPlaying,j=E.level;(!I||E.sn!==I.sn||I.level!==j||E.urlId!==I.urlId)&&(this.hls.trigger(w.Events.FRAG_CHANGED,{frag:E}),(!I||I.level!==j)&&this.hls.trigger(w.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=E)}}},i(k,[{key:"nextLevel",get:function(){var y=this.nextBufferedFrag;return y?y.level:-1}},{key:"currentLevel",get:function(){var y=this.media;if(y){var E=this.getAppendedFrag(y.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var y=this.media;if(y){var E=this.getAppendedFrag(y.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(c.default)},"./src/controller/subtitle-stream-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"SubtitleStreamController",function(){return s});var P=S("./src/events.ts"),c=S("./src/utils/logger.ts"),h=S("./src/utils/buffer-helper.ts"),w=S("./src/controller/fragment-finders.ts"),d=S("./src/utils/discontinuities.ts"),o=S("./src/controller/level-helper.ts"),a=S("./src/controller/fragment-tracker.ts"),n=S("./src/controller/base-stream-controller.ts"),u=S("./src/types/loader.ts"),p=S("./src/types/level.ts");function f(t,T){for(var _=0;_<T.length;_++){var l=T[_];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}function v(t,T,_){return T&&f(t.prototype,T),_&&f(t,_),t}function g(t,T){t.prototype=Object.create(T.prototype),t.prototype.constructor=t,b(t,T)}function b(t,T){return b=Object.setPrototypeOf||function(l,k){return l.__proto__=k,l},b(t,T)}var i=500,s=function(t){g(T,t);function T(l,k){var O;return O=t.call(this,l,k,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var _=T.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var k=this.hls;k.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.on(P.Events.ERROR,this.onError,this),k.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.on(P.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.on(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.on(P.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_._unregisterListeners=function(){var k=this.hls;k.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.off(P.Events.ERROR,this.onError,this),k.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.off(P.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.off(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.off(P.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(i),this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(k,O){this.mainDetails=O.details},_.onSubtitleFragProcessed=function(k,O){var x=O.frag,y=O.success;if(this.fragPrevious=x,this.state=n.State.IDLE,!y)return;var E=this.tracksBuffered[this.currentTrackId];if(!E)return;for(var C,I=x.start,j=0;j<E.length;j++)if(I>=E[j].start&&I<=E[j].end){C=E[j];break}var L=x.start+x.duration;C?C.end=L:(C={start:I,end:L},E.push(C)),this.fragmentTracker.fragBuffered(x)},_.onBufferFlushing=function(k,O){var x=O.startOffset,y=O.endOffset;if(x===0&&y!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,C=this.levels;if(!C.length||!C[E]||!C[E].details)return;var I=C[E].details,j=I.targetduration,L=y-j;if(L<=0)return;O.endOffsetSubtitles=Math.max(0,L),this.tracksBuffered.forEach(function(H){for(var W=0;W<H.length;){if(H[W].end<=L){H.shift();continue}else if(H[W].start<L)H[W].start=L;else break;W++}}),this.fragmentTracker.removeFragmentsInRange(x,L,u.PlaylistLevelType.SUBTITLE)}},_.onError=function(k,O){var x,y=O.frag;if(!y||y.type!==u.PlaylistLevelType.SUBTITLE)return;(x=this.fragCurrent)!==null&&x!==void 0&&x.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},_.onSubtitleTracksUpdated=function(k,O){var x=this,y=O.subtitleTracks;this.tracksBuffered=[],this.levels=y.map(function(E){return new p.Level(E)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(E){x.tracksBuffered[E.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(k,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var x=this.levels[this.currentTrackId];x!=null&&x.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,x&&this.setInterval(i)},_.onSubtitleTrackLoaded=function(k,O){var x,y=O.details,E=O.id,C=this.currentTrackId,I=this.levels;if(!I.length)return;var j=I[C];if(E>=I.length||E!==C||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,y.live||(x=j.details)!==null&&x!==void 0&&x.live){var L=this.mainDetails;if(y.deltaUpdateFailed||!L)return;var H=L.fragments[0];if(!j.details)y.hasProgramDateTime&&L.hasProgramDateTime?Object(d.alignMediaPlaylistByPDT)(y,L):H&&Object(o.addSliding)(y,H.start);else{var W=this.alignPlaylists(y,j.details);W===0&&H&&Object(o.addSliding)(y,H.start)}}if(j.details=y,this.levelLastLoaded=E,this.tick(),y.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var U=Object(w.findFragmentByPTS)(null,y.fragments,this.media.currentTime,0);U||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},_._handleFragmentLoadComplete=function(k){var O=k.frag,x=k.payload,y=O.decryptdata,E=this.hls;if(this.fragContextChanged(O))return;if(x&&x.byteLength>0&&y&&y.key&&y.iv&&y.method==="AES-128"){var C=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(x),y.key.buffer,y.iv.buffer).then(function(I){var j=performance.now();E.trigger(P.Events.FRAG_DECRYPTED,{frag:O,payload:I,stats:{tstart:C,tdecrypt:j}})})}},_.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var k,O=this.currentTrackId,x=this.levels;if(!x.length||!x[O]||!x[O].details)return;var y=x[O].details,E=y.targetduration,C=this.config,I=this.media,j=h.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,I.currentTime-E,C.maxBufferHole),L=j.end,H=j.len,W=this.getMaxBufferLength()+E;if(H>W)return;console.assert(y,"Subtitle track details are defined on idle subtitle stream controller tick");var U=y.fragments,G=U.length,B=y.edge,z,V=this.fragPrevious;if(L<B){var ie=C.maxFragLookUpTolerance;V&&y.hasProgramDateTime&&(z=Object(w.findFragmentByPDT)(U,V.endProgramDateTime,ie)),z||(z=Object(w.findFragmentByPTS)(V,U,L,ie),!z&&V&&V.start<U[0].start&&(z=U[0]))}else z=U[G-1];(k=z)!==null&&k!==void 0&&k.encrypted?(c.logger.log("Loading key for "+z.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(P.Events.KEY_LOADING,{frag:z})):z&&this.fragmentTracker.getState(z)===a.FragmentState.NOT_LOADED&&this.loadFragment(z,y,L)}},_.loadFragment=function(k,O,x){this.fragCurrent=k,t.prototype.loadFragment.call(this,k,O,x)},v(T,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),T}(n.default)},"./src/controller/subtitle-track-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),c=S("./src/utils/texttrack-utils.ts"),h=S("./src/controller/base-playlist-controller.ts"),w=S("./src/types/loader.ts");function d(f,v){for(var g=0;g<v.length;g++){var b=v[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}function o(f,v,g){return v&&d(f.prototype,v),g&&d(f,g),f}function a(f,v){f.prototype=Object.create(v.prototype),f.prototype.constructor=f,n(f,v)}function n(f,v){return n=Object.setPrototypeOf||function(b,i){return b.__proto__=i,b},n(f,v)}var u=function(f){a(v,f);function v(b){var i;return i=f.call(this,b,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var g=v.prototype;return g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,f.prototype.destroy.call(this)},g.registerListeners=function(){var i=this.hls;i.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(P.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var i=this.hls;i.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(P.Events.ERROR,this.onError,this)},g.onMediaAttached=function(i,s){if(this.media=s.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)},g.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},g.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 i=p(this.media.textTracks);i.forEach(function(s){Object(c.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},g.onManifestParsed=function(i,s){this.tracks=s.subtitleTracks},g.onSubtitleTrackLoaded=function(i,s){var t=s.id,T=s.details,_=this.trackId,l=this.tracksInGroup[_];if(!l){this.warn("Invalid subtitle track id "+t);return}var k=l.details;l.details=s.details,this.log("subtitle track "+t+" loaded ["+T.startSN+"-"+T.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,s,k))},g.onLevelLoading=function(i,s){this.switchLevel(s.level)},g.onLevelSwitching=function(i,s){this.switchLevel(s.level)},g.switchLevel=function(i){var s=this.hls.levels[i];if(!(s!=null&&s.textGroupIds))return;var t=s.textGroupIds[s.urlId];if(this.groupId!==t){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=_;var l=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=t;var k={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(P.Events.SUBTITLE_TRACKS_UPDATED,k),l!==-1&&this.setSubtitleTrack(l,T)}},g.findTrackId=function(i){for(var s=this.tracksInGroup,t=0;t<s.length;t++){var T=s[t];if((!this.selectDefaultTrack||T.default)&&(!i||i===T.name))return T.id}return-1},g.onError=function(i,s){if(f.prototype.onError.call(this,i,s),s.fatal||!s.context)return;s.context.type===w.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},g.loadPlaylist=function(i){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var t=s.id,T=s.groupId,_=s.url;if(i)try{_=i.addDirectives(_)}catch(l){this.warn("Could not construct new URL with HLS Delivery Directives: "+l)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADING,{url:_,id:t,groupId:T,deliveryDirectives:i||null})}},g.toggleTrackModes=function(i){var s=this,t=this.media,T=this.subtitleDisplay,_=this.trackId;if(!t)return;var l=p(t.textTracks),k=l.filter(function(y){return y.groupId===s.groupId});if(i===-1)[].slice.call(l).forEach(function(y){y.mode="disabled"});else{var O=k[_];O&&(O.mode="disabled")}var x=k[i];x&&(x.mode=T?"showing":"hidden")},g.setSubtitleTrack=function(i,s){var t,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(t=T[i])!==null&&t!==void 0&&t.details)||i<-1||i>=T.length)return;this.clearTimer();var _=T[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,_){var l=_.id,k=_.groupId,O=k===void 0?"":k,x=_.name,y=_.type,E=_.url;this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:l,groupId:O,name:x,type:y,url:E});var C=this.switchParams(_.url,s==null?void 0:s.details);this.loadPlaylist(C)}else this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:i})},g.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,s=p(this.media.textTracks),t=0;t<s.length;t++)if(s[t].mode==="hidden")i=t;else if(s[t].mode==="showing"){i=t;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},o(v,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,s)}}]),v}(h.default);function p(f){for(var v=[],g=0;g<f.length;g++){var b=f[g];b.kind==="subtitles"&&b.label&&v.push(f[g])}return v}m.default=u},"./src/controller/timeline-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"TimelineController",function(){return p});var P=S("./src/polyfills/number.ts"),c=S("./src/events.ts"),h=S("./src/utils/cea-608-parser.ts"),w=S("./src/utils/output-filter.ts"),d=S("./src/utils/webvtt-parser.ts"),o=S("./src/utils/texttrack-utils.ts"),a=S("./src/utils/imsc1-ttml-parser.ts"),n=S("./src/types/loader.ts"),u=S("./src/utils/logger.ts"),p=function(){function b(s){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=g(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.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 w.default(this,"textTrack1"),T=new w.default(this,"textTrack2"),_=new w.default(this,"textTrack3"),l=new w.default(this,"textTrack4");this.cea608Parser1=new h.default(1,t,T),this.cea608Parser2=new h.default(3,_,l)}s.on(c.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(c.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(c.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(c.Events.FRAG_LOADING,this.onFragLoading,this),s.on(c.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(c.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(c.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(c.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(c.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(c.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=b.prototype;return i.destroy=function(){var t=this.hls;t.off(c.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(c.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(c.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(c.Events.FRAG_LOADING,this.onFragLoading,this),t.off(c.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(c.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(c.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(c.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(c.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(c.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(t,T,_,l,k){for(var O=!1,x=k.length;x--;){var y=k[x],E=v(y[0],y[1],T,_);if(E>=0&&(y[0]=Math.min(y[0],T),y[1]=Math.max(y[1],_),O=!0,E/(_-T)>.5))return}if(O||k.push([T,_]),this.config.renderTextTracksNatively){var C=this.captionsTracks[t];this.Cues.newCue(C,T,_,l)}else{var I=this.Cues.newCue(null,T,_,l);this.hls.trigger(c.Events.CUES_PARSED,{type:"captions",cues:I,track:t})}},i.onInitPtsFound=function(t,T){var _=this,l=T.frag,k=T.id,O=T.initPTS,x=T.timescale,y=this.unparsedVttFrags;k==="main"&&(this.initPTS[l.cc]=O,this.timescale[l.cc]=x),y.length&&(this.unparsedVttFrags=[],y.forEach(function(E){_.onFragLoaded(c.Events.FRAG_LOADED,E)}))},i.getExistingTrack=function(t){var T=this.media;if(T)for(var _=0;_<T.textTracks.length;_++){var l=T.textTracks[_];if(l[t])return l}return null},i.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},i.createNativeTrack=function(t){if(this.captionsTracks[t])return;var T=this.captionsProperties,_=this.captionsTracks,l=this.media,k=T[t],O=k.label,x=k.languageCode,y=this.getExistingTrack(t);if(y)_[t]=y,Object(o.clearCurrentCues)(_[t]),Object(o.sendAddTrackEvent)(_[t],l);else{var E=this.createTextTrack("captions",O,x);E&&(E[t]=!0,_[t]=E)}},i.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var T=this.captionsProperties[t];if(!T)return;var _=T.label,l={_id:t,label:_,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[t]=l,this.hls.trigger(c.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[l]})},i.createTextTrack=function(t,T,_){var l=this.media;return l?l.addTextTrack(t,T,_):void 0},i.onMediaAttaching=function(t,T){this.media=T.media,this._cleanTracks()},i.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(T){Object(o.clearCurrentCues)(t[T]),delete t[T]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),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())},i._cleanTracks=function(){var t=this.media;if(!t)return;var T=t.textTracks;if(T)for(var _=0;_<T.length;_++)Object(o.clearCurrentCues)(T[_])},i.onSubtitleTracksUpdated=function(t,T){var _=this;this.textTracks=[];var l=T.subtitleTracks||[],k=l.some(function(E){return E.textCodec===a.IMSC1_CODEC});if(this.config.enableWebVTT||k&&this.config.enableIMSC1){var O=this.tracks&&l&&this.tracks.length===l.length;if(this.tracks=l||[],this.config.renderTextTracksNatively){var x=this.media?this.media.textTracks:[];this.tracks.forEach(function(E,C){var I;if(C<x.length){for(var j=null,L=0;L<x.length;L++)if(f(x[L],E)){j=x[L];break}j&&(I=j)}I?Object(o.clearCurrentCues)(I):(I=_.createTextTrack("subtitles",E.name,E.lang),I&&(I.mode="disabled")),I&&(I.groupId=E.groupId,_.textTracks.push(I))})}else if(!O&&this.tracks&&this.tracks.length){var y=this.tracks.map(function(E){return{label:E.name,kind:E.type.toLowerCase(),default:E.default,subtitleTrack:E}});this.hls.trigger(c.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:y})}}},i.onManifestLoaded=function(t,T){var _=this;this.config.enableCEA708Captions&&T.captions&&T.captions.forEach(function(l){var k=/(?:CC|SERVICE)([1-4])/.exec(l.instreamId);if(!k)return;var O="textTrack"+k[1],x=_.captionsProperties[O];if(!x)return;x.label=l.name,l.lang&&(x.languageCode=l.lang),x.media=l})},i.onFragLoading=function(t,T){var _=this.cea608Parser1,l=this.cea608Parser2,k=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(_&&l))return;if(T.frag.type===n.PlaylistLevelType.MAIN){var x,y,E=T.frag.sn,C=(x=T==null||((y=T.part)===null||y===void 0)?void 0:y.index)!=null?x:-1;E===k+1||E===k&&C===O+1||(_.reset(),l.reset()),this.lastSn=E,this.lastPartIndex=C}},i.onFragLoaded=function(t,T){var _=T.frag,l=T.payload,k=this.initPTS,O=this.unparsedVttFrags;if(_.type===n.PlaylistLevelType.SUBTITLE)if(l.byteLength){if(!Object(P.isFiniteNumber)(k[_.cc])){O.push(T),k.length&&this.hls.trigger(c.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Missing initial subtitle PTS")});return}var x=_.decryptdata;if(x==null||x.key==null||x.method!=="AES-128"){var y=this.tracks[_.level],E=this.vttCCs;E[_.cc]||(E[_.cc]={start:_.start,prevCC:this.prevCC,new:!0},this.prevCC=_.cc),y&&y.textCodec===a.IMSC1_CODEC?this._parseIMSC1(_,l):this._parseVTTs(_,l,E)}}else this.hls.trigger(c.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(t,T){var _=this,l=this.hls;Object(a.parseIMSC1)(T,this.initPTS[t.cc],this.timescale[t.cc],function(k){_._appendCues(k,t.level),l.trigger(c.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(k){u.logger.log("Failed to parse IMSC1: "+k),l.trigger(c.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:k})})},i._parseVTTs=function(t,T,_){var l=this,k=this.hls;Object(d.parseWebVTT)(T,this.initPTS[t.cc],this.timescale[t.cc],_,t.cc,t.start,function(O){l._appendCues(O,t.level),k.trigger(c.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){l._fallbackToIMSC1(t,T),u.logger.log("Failed to parse VTT cue: "+O),k.trigger(c.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:O})})},i._fallbackToIMSC1=function(t,T){var _=this,l=this.tracks[t.level];l.textCodec||Object(a.parseIMSC1)(T,this.initPTS[t.cc],this.timescale[t.cc],function(){l.textCodec=a.IMSC1_CODEC,_._parseIMSC1(t,T)},function(){l.textCodec="wvtt"})},i._appendCues=function(t,T){var _=this.hls;if(this.config.renderTextTracksNatively){var l=this.textTracks[T];if(l.mode==="disabled")return;t.forEach(function(x){return Object(o.addCueToTrack)(l,x)})}else{var k=this.tracks[T],O=k.default?"default":"subtitles"+T;_.trigger(c.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},i.onFragDecrypted=function(t,T){var _=T.frag;if(_.type===n.PlaylistLevelType.SUBTITLE){if(!Object(P.isFiniteNumber)(this.initPTS[_.cc])){this.unparsedVttFrags.push(T);return}this.onFragLoaded(c.Events.FRAG_LOADED,T)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(t,T){var _=this.cea608Parser1,l=this.cea608Parser2;if(!this.enabled||!(_&&l))return;for(var k=0;k<T.samples.length;k++){var O=T.samples[k].bytes;if(O){var x=this.extractCea608Data(O);_.addData(T.samples[k].pts,x[0]),l.addData(T.samples[k].pts,x[1])}}},i.onBufferFlushing=function(t,T){var _=T.startOffset,l=T.endOffset,k=T.endOffsetSubtitles,O=T.type,x=this.media;if(!x||x.currentTime<l)return;if(!O||O==="video"){var y=this.captionsTracks;Object.keys(y).forEach(function(C){return Object(o.removeCuesInRange)(y[C],_,l)})}if(this.config.renderTextTracksNatively&&(_===0&&k!==void 0)){var E=this.textTracks;Object.keys(E).forEach(function(C){return Object(o.removeCuesInRange)(E[C],_,k)})}},i.extractCea608Data=function(t){for(var T=t[0]&31,_=2,l=[[],[]],k=0;k<T;k++){var O=t[_++],x=127&t[_++],y=127&t[_++],E=(4&O)!==0,C=3&O;if(x===0&&y===0)continue;E&&((C===0||C===1)&&(l[C].push(x),l[C].push(y)))}return l},b}();function f(b,i){return b&&b.label===i.name&&!(b.textTrack1||b.textTrack2)}function v(b,i,s,t){return Math.min(i,t)-Math.max(b,s)}function g(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function c(w,d){this.subtle=void 0,this.aesIV=void 0,this.subtle=w,this.aesIV=d}var h=c.prototype;return h.decrypt=function(d,o){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},o,d)},c}()},"./src/crypt/aes-decryptor.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"removePadding",function(){return c}),S.d(m,"default",function(){return h});var P=S("./src/utils/typed-array.ts");function c(w){var d=w.byteLength,o=d&&new DataView(w.buffer).getUint8(d-1);return o?Object(P.sliceUint8)(w,0,d-o):w}var h=function(){function w(){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 d=w.prototype;return d.uint8ArrayToUint32Array_=function(a){for(var n=new DataView(a),u=new Uint32Array(4),p=0;p<4;p++)u[p]=n.getUint32(p*4);return u},d.initTable=function(){var a=this.sBox,n=this.invSBox,u=this.subMix,p=u[0],f=u[1],v=u[2],g=u[3],b=this.invSubMix,i=b[0],s=b[1],t=b[2],T=b[3],_=new Uint32Array(256),l=0,k=0,O=0;for(O=0;O<256;O++)O<128?_[O]=O<<1:_[O]=O<<1^283;for(O=0;O<256;O++){var x=k^k<<1^k<<2^k<<3^k<<4;x=x>>>8^x&255^99,a[l]=x,n[x]=l;var y=_[l],E=_[y],C=_[E],I=_[x]*257^x*16843008;p[l]=I<<24|I>>>8,f[l]=I<<16|I>>>16,v[l]=I<<8|I>>>24,g[l]=I,I=C*16843009^E*65537^y*257^l*16843008,i[x]=I<<24|I>>>8,s[x]=I<<16|I>>>16,t[x]=I<<8|I>>>24,T[x]=I,l?(l=y^_[_[_[C^y]]],k^=_[_[k]]):l=k=1}},d.expandKey=function(a){for(var n=this.uint8ArrayToUint32Array_(a),u=!0,p=0;p<n.length&&u;)u=n[p]===this.key[p],p++;if(u)return;this.key=n;var f=this.keySize=n.length;if(f!==4&&f!==6&&f!==8)throw new Error("Invalid aes key size="+f);var v=this.ksRows=(f+6+1)*4,g,b,i=this.keySchedule=new Uint32Array(v),s=this.invKeySchedule=new Uint32Array(v),t=this.sBox,T=this.rcon,_=this.invSubMix,l=_[0],k=_[1],O=_[2],x=_[3],y,E;for(g=0;g<v;g++){if(g<f){y=i[g]=n[g];continue}E=y,g%f===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^=T[g/f|0]<<24):f>6&&g%f===4&&(E=t[E>>>24]<<24|t[E>>>16&255]<<16|t[E>>>8&255]<<8|t[E&255]),i[g]=y=(i[g-f]^E)>>>0}for(b=0;b<v;b++)g=v-b,b&3?E=i[g]:E=i[g-4],b<4||g<=4?s[b]=E:s[b]=l[t[E>>>24]]^k[t[E>>>16&255]]^O[t[E>>>8&255]]^x[t[E&255]],s[b]=s[b]>>>0},d.networkToHostOrderSwap=function(a){return a<<24|(a&65280)<<8|(a&16711680)>>8|a>>>24},d.decrypt=function(a,n,u){for(var p=this.keySize+6,f=this.invKeySchedule,v=this.invSBox,g=this.invSubMix,b=g[0],i=g[1],s=g[2],t=g[3],T=this.uint8ArrayToUint32Array_(u),_=T[0],l=T[1],k=T[2],O=T[3],x=new Int32Array(a),y=new Int32Array(x.length),E,C,I,j,L,H,W,U,G,B,z,V,ie,ce,he=this.networkToHostOrderSwap;n<x.length;){for(G=he(x[n]),B=he(x[n+1]),z=he(x[n+2]),V=he(x[n+3]),L=G^f[0],H=V^f[1],W=z^f[2],U=B^f[3],ie=4,ce=1;ce<p;ce++)E=b[L>>>24]^i[H>>16&255]^s[W>>8&255]^t[U&255]^f[ie],C=b[H>>>24]^i[W>>16&255]^s[U>>8&255]^t[L&255]^f[ie+1],I=b[W>>>24]^i[U>>16&255]^s[L>>8&255]^t[H&255]^f[ie+2],j=b[U>>>24]^i[L>>16&255]^s[H>>8&255]^t[W&255]^f[ie+3],L=E,H=C,W=I,U=j,ie=ie+4;E=v[L>>>24]<<24^v[H>>16&255]<<16^v[W>>8&255]<<8^v[U&255]^f[ie],C=v[H>>>24]<<24^v[W>>16&255]<<16^v[U>>8&255]<<8^v[L&255]^f[ie+1],I=v[W>>>24]<<24^v[U>>16&255]<<16^v[L>>8&255]<<8^v[H&255]^f[ie+2],j=v[U>>>24]<<24^v[L>>16&255]<<16^v[H>>8&255]<<8^v[W&255]^f[ie+3],y[n]=he(E^_),y[n+1]=he(j^l),y[n+2]=he(I^k),y[n+3]=he(C^O),_=G,l=B,k=z,O=V,n=n+4}return y.buffer},w}()},"./src/crypt/decrypter.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return n});var P=S("./src/crypt/aes-crypto.ts"),c=S("./src/crypt/fast-aes-key.ts"),h=S("./src/crypt/aes-decryptor.ts"),w=S("./src/utils/logger.ts"),d=S("./src/utils/mp4-tools.ts"),o=S("./src/utils/typed-array.ts"),a=16,n=function(){function u(f,v,g){var b=g===void 0?{}:g,i=b.removePKCS7Padding,s=i===void 0?!0:i;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=f,this.config=v,this.removePKCS7Padding=s,s)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(T){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=u.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var v=this.currentResult;if(!v){this.reset();return}var g=new Uint8Array(v);return this.reset(),this.removePKCS7Padding?Object(h.removePadding)(g):g},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(v,g,b,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(v),g,b);var s=this.flush();s&&i(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(v),g,b).then(i)},p.softwareDecrypt=function(v,g,b){var i=this.currentIV,s=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(v=Object(d.appendUint8Array)(t,v),this.remainderData=null);var T=this.getValidChunk(v);if(!T.length)return null;i&&(b=i);var _=this.softwareDecrypter;_||(_=this.softwareDecrypter=new h.default),_.expandKey(g);var l=s;return this.currentResult=_.decrypt(T.buffer,0,b),this.currentIV=Object(o.sliceUint8)(T,-16).buffer,l||null},p.webCryptoDecrypt=function(v,g,b){var i=this,s=this.subtle;return(this.key!==g||!this.fastAesKey)&&(this.key=g,this.fastAesKey=new c.default(s,g)),this.fastAesKey.expandKey().then(function(t){if(!s)return Promise.reject(new Error("web crypto not initialized"));var T=new P.default(s,b);return T.decrypt(v.buffer,t)}).catch(function(t){return i.onWebCryptoError(t,v,g,b)})},p.onWebCryptoError=function(v,g,b,i){return w.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",v),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(g,b,i)},p.getValidChunk=function(v){var g=v,b=v.length-v.length%a;return b!==v.length&&(g=Object(o.sliceUint8)(v,0,b),this.remainderData=Object(o.sliceUint8)(v,b)),g},p.logOnce=function(v){if(!this.logEnabled)return;w.logger.log("[decrypter.ts]: "+v),this.logEnabled=!1},u}()},"./src/crypt/fast-aes-key.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function c(w,d){this.subtle=void 0,this.key=void 0,this.subtle=w,this.key=d}var h=c.prototype;return h.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},c}()},"./src/demux/aacdemuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/demux/base-audio-demuxer.ts"),c=S("./src/demux/adts.ts"),h=S("./src/utils/logger.ts"),w=S("./src/demux/id3.ts");function d(n,u){n.prototype=Object.create(u.prototype),n.prototype.constructor=n,o(n,u)}function o(n,u){return o=Object.setPrototypeOf||function(f,v){return f.__proto__=v,f},o(n,u)}var a=function(n){d(u,n);function u(f,v){var g;return g=n.call(this)||this,g.observer=void 0,g.config=void 0,g.observer=f,g.config=v,g}var p=u.prototype;return p.resetInitSegment=function(v,g,b){n.prototype.resetInitSegment.call(this,v,g,b),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:v,duration:b,inputTimeScale:9e4,dropped:0}},u.probe=function(v){if(!v)return!1;for(var g=w.getID3Data(v,0)||[],b=g.length,i=v.length;b<i;b++)if(c.probe(v,b))return h.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(v,g){return c.canParse(v,g)},p.appendFrame=function(v,g,b){c.initTrackConfig(v,this.observer,g,b,v.manifestCodec);var i=c.appendFrame(v,g,b,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},u}(P.default);a.minProbeByteLength=9,m.default=a},"./src/demux/adts.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"getAudioConfig",function(){return w}),S.d(m,"isHeaderPattern",function(){return d}),S.d(m,"getHeaderLength",function(){return o}),S.d(m,"getFullFrameLength",function(){return a}),S.d(m,"canGetFrameLength",function(){return n}),S.d(m,"isHeader",function(){return u}),S.d(m,"canParse",function(){return p}),S.d(m,"probe",function(){return f}),S.d(m,"initTrackConfig",function(){return v}),S.d(m,"getFrameDuration",function(){return g}),S.d(m,"parseFrameHeader",function(){return b}),S.d(m,"appendFrame",function(){return i});var P=S("./src/utils/logger.ts"),c=S("./src/errors.ts"),h=S("./src/events.ts");function w(s,t,T,_){var l,k,O,x,y=navigator.userAgent.toLowerCase(),E=_,C=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];l=((t[T+2]&192)>>>6)+1;var I=(t[T+2]&60)>>>2;if(I>C.length-1){s.trigger(h.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+I});return}return O=(t[T+2]&1)<<2,O|=(t[T+3]&192)>>>6,P.logger.log("manifest codec:"+_+", ADTS type:"+l+", samplingIndex:"+I),/firefox/i.test(y)?I>=6?(l=5,x=new Array(4),k=I-3):(l=2,x=new Array(2),k=I):y.indexOf("android")!==-1?(l=2,x=new Array(2),k=I):(l=5,x=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&I>=6?k=I-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(I>=6&&O===1||/vivaldi/i.test(y))||!_&&O===1)&&(l=2,x=new Array(2)),k=I)),x[0]=l<<3,x[0]|=(I&14)>>1,x[1]|=(I&1)<<7,x[1]|=O<<3,l===5&&(x[1]|=(k&14)>>1,x[2]=(k&1)<<7,x[2]|=2<<2,x[3]=0),{config:x,samplerate:C[I],channelCount:O,codec:"mp4a.40."+l,manifestCodec:E}}function d(s,t){return s[t]===255&&(s[t+1]&246)===240}function o(s,t){return s[t+1]&1?7:9}function a(s,t){return(s[t+3]&3)<<11|s[t+4]<<3|(s[t+5]&224)>>>5}function n(s,t){return t+5<s.length}function u(s,t){return t+1<s.length&&d(s,t)}function p(s,t){return n(s,t)&&d(s,t)&&a(s,t)<=s.length-t}function f(s,t){if(u(s,t)){var T=o(s,t);if(t+T>=s.length)return!1;var _=a(s,t);if(_<=T)return!1;var l=t+_;return l===s.length||u(s,l)}return!1}function v(s,t,T,_,l){if(!s.samplerate){var k=w(t,T,_,l);if(!k)return;s.config=k.config,s.samplerate=k.samplerate,s.channelCount=k.channelCount,s.codec=k.codec,s.manifestCodec=k.manifestCodec,P.logger.log("parsed codec:"+s.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function g(s){return 1024*9e4/s}function b(s,t,T,_,l){var k=o(s,t),O=a(s,t);if(O-=k,O>0){var x=T+_*l;return{headerLength:k,frameLength:O,stamp:x}}}function i(s,t,T,_,l){var k=g(s.samplerate),O=b(t,T,_,l,k);if(O){var x=O.frameLength,y=O.headerLength,E=O.stamp,C=y+x,I=Math.max(0,T+C-t.length),j;I?(j=new Uint8Array(C-y),j.set(t.subarray(T+y,t.length),0)):j=t.subarray(T+y,T+C);var L={unit:j,pts:E};return I||s.samples.push(L),{sample:L,length:C,missing:I}}}},"./src/demux/base-audio-demuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"initPTSFn",function(){return a});var P=S("./src/polyfills/number.ts"),c=S("./src/demux/id3.ts"),h=S("./src/demux/dummy-demuxed-track.ts"),w=S("./src/utils/mp4-tools.ts"),d=S("./src/utils/typed-array.ts"),o=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=n.prototype;return u.resetInitSegment=function(f,v,g){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(){},u.resetContiguity=function(){},u.canParse=function(f,v){return!1},u.appendFrame=function(f,v,g){},u.demux=function(f,v){this.cachedData&&(f=Object(w.appendUint8Array)(this.cachedData,f),this.cachedData=null);var g=c.getID3Data(f,0),b=g?g.length:0,i,s,t=this._audioTrack,T=this._id3Track,_=g?c.getTimeStamp(g):void 0,l=f.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=a(_,v)),g&&g.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:g}),s=this.initPTS;b<l;){if(this.canParse(f,b)){var k=this.appendFrame(t,f,b);k?(this.frameIndex++,s=k.sample.pts,b+=k.length,i=b):b=l}else c.canParse(f,b)?(g=c.getID3Data(f,b),T.samples.push({pts:s,dts:s,data:g}),b+=g.length,i=b):b++;if(b===l&&i!==l){var O=Object(d.sliceUint8)(f,i);this.cachedData?this.cachedData=Object(w.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(h.dummyTrack)(),id3Track:T,textTrack:Object(h.dummyTrack)()}},u.demuxSampleAes=function(f,v,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(f){var v=this.cachedData;return v&&(this.cachedData=null,this.demux(v,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(h.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(h.dummyTrack)()}},u.destroy=function(){},n}(),a=function(u,p){return Object(P.isFiniteNumber)(u)?u*90:p*9e4};m.default=o},"./src/demux/chunk-cache.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function h(){this.chunks=[],this.dataLength=0}var w=h.prototype;return w.push=function(o){this.chunks.push(o),this.dataLength+=o.length},w.flush=function(){var o=this.chunks,a=this.dataLength,n;if(o.length)o.length===1?n=o[0]:n=c(o,a);else return new Uint8Array(0);return this.reset(),n},w.reset=function(){this.chunks.length=0,this.dataLength=0},h}();function c(h,w){for(var d=new Uint8Array(w),o=0,a=0;a<h.length;a++){var n=h[a];d.set(n,o),o+=n.length}return d}},"./src/demux/dummy-demuxed-track.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"dummyTrack",function(){return P});function P(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/logger.ts"),c=function(){function h(d){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=d,this.bytesAvailable=d.byteLength,this.word=0,this.bitsAvailable=0}var w=h.prototype;return w.loadWord=function(){var o=this.data,a=this.bytesAvailable,n=o.byteLength-a,u=new Uint8Array(4),p=Math.min(4,a);if(p===0)throw new Error("no bytes available");u.set(o.subarray(n,n+p)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},w.skipBits=function(o){var a;this.bitsAvailable>o?(this.word<<=o,this.bitsAvailable-=o):(o-=this.bitsAvailable,a=o>>3,o-=a>>3,this.bytesAvailable-=a,this.loadWord(),this.word<<=o,this.bitsAvailable-=o)},w.readBits=function(o){var a=Math.min(this.bitsAvailable,o),n=this.word>>>32-a;return o>32&&P.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=a,this.bitsAvailable>0?this.word<<=a:this.bytesAvailable>0&&this.loadWord(),a=o-a,a>0&&this.bitsAvailable?n<<a|this.readBits(a):n},w.skipLZ=function(){var o;for(o=0;o<this.bitsAvailable;++o)if((this.word&2147483648>>>o)!==0)return this.word<<=o,this.bitsAvailable-=o,o;return this.loadWord(),o+this.skipLZ()},w.skipUEG=function(){this.skipBits(1+this.skipLZ())},w.skipEG=function(){this.skipBits(1+this.skipLZ())},w.readUEG=function(){var o=this.skipLZ();return this.readBits(o+1)-1},w.readEG=function(){var o=this.readUEG();return 1&o?1+o>>>1:-1*(o>>>1)},w.readBoolean=function(){return this.readBits(1)===1},w.readUByte=function(){return this.readBits(8)},w.readUShort=function(){return this.readBits(16)},w.readUInt=function(){return this.readBits(32)},w.skipScalingList=function(o){for(var a=8,n=8,u,p=0;p<o;p++)n!==0&&(u=this.readEG(),n=(a+u+256)%256),a=n===0?a:n},w.readSPS=function(){var o=0,a=0,n=0,u=0,p,f,v,g=this.readUByte.bind(this),b=this.readBits.bind(this),i=this.readUEG.bind(this),s=this.readBoolean.bind(this),t=this.skipBits.bind(this),T=this.skipEG.bind(this),_=this.skipUEG.bind(this),l=this.skipScalingList.bind(this);g();var k=g();if(b(5),t(3),g(),_(),k===100||k===110||k===122||k===244||k===44||k===83||k===86||k===118||k===128){var O=i();if(O===3&&t(1),_(),_(),t(1),s())for(f=O!==3?8:12,v=0;v<f;v++)s()&&(v<6?l(16):l(64))}_();var x=i();if(x===0)i();else if(x===1)for(t(1),T(),T(),p=i(),v=0;v<p;v++)T();_(),t(1);var y=i(),E=i(),C=b(1);C===0&&t(1),t(1),s()&&(o=i(),a=i(),n=i(),u=i());var I=[1,1];if(s()&&s()){var j=g();switch(j){case 1:I=[1,1];break;case 2:I=[12,11];break;case 3:I=[10,11];break;case 4:I=[16,11];break;case 5:I=[40,33];break;case 6:I=[24,11];break;case 7:I=[20,11];break;case 8:I=[32,11];break;case 9:I=[80,33];break;case 10:I=[18,11];break;case 11:I=[15,11];break;case 12:I=[64,33];break;case 13:I=[160,99];break;case 14:I=[4,3];break;case 15:I=[3,2];break;case 16:I=[2,1];break;case 255:{I=[g()<<8|g(),g()<<8|g()];break}}}return{width:Math.ceil((y+1)*16-o*2-a*2),height:(2-C)*(E+1)*16-(C?2:4)*(n+u),pixelRatio:I}},w.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},h}();m.default=c},"./src/demux/id3.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isHeader",function(){return P}),S.d(m,"isFooter",function(){return c}),S.d(m,"getID3Data",function(){return h}),S.d(m,"canParse",function(){return d}),S.d(m,"getTimeStamp",function(){return o}),S.d(m,"isTimeStampFrame",function(){return a}),S.d(m,"getID3Frames",function(){return u}),S.d(m,"decodeFrame",function(){return p}),S.d(m,"utf8ArrayToStr",function(){return i}),S.d(m,"testables",function(){return s});var P=function(l,k){return k+10<=l.length&&(l[k]===73&&l[k+1]===68&&l[k+2]===51&&(l[k+3]<255&&l[k+4]<255&&(l[k+6]<128&&l[k+7]<128&&l[k+8]<128&&l[k+9]<128)))},c=function(l,k){return k+10<=l.length&&(l[k]===51&&l[k+1]===68&&l[k+2]===73&&(l[k+3]<255&&l[k+4]<255&&(l[k+6]<128&&l[k+7]<128&&l[k+8]<128&&l[k+9]<128)))},h=function(l,k){for(var O=k,x=0;P(l,k);){x+=10;var y=w(l,k+6);x+=y,c(l,k+10)&&(x+=10),k+=x}return x>0?l.subarray(O,O+x):void 0},w=function(l,k){var O=0;return O=(l[k]&127)<<21,O|=(l[k+1]&127)<<14,O|=(l[k+2]&127)<<7,O|=l[k+3]&127,O},d=function(l,k){return P(l,k)&&w(l,k+6)+10<=l.length-k},o=function(l){for(var k=u(l),O=0;O<k.length;O++){var x=k[O];if(a(x))return b(x)}return},a=function(l){return l&&l.key==="PRIV"&&l.info==="com.apple.streaming.transportStreamTimestamp"},n=function(l){var k=String.fromCharCode(l[0],l[1],l[2],l[3]),O=w(l,4),x=10;return{type:k,size:O,data:l.subarray(x,x+O)}},u=function(l){for(var k=0,O=[];P(l,k);){var x=w(l,k+6);k+=10;for(var y=k+x;k+8<y;){var E=n(l.subarray(k)),C=p(E);C&&O.push(C),k+=E.size+10}c(l,k)&&(k+=10)}return O},p=function(l){return l.type==="PRIV"?f(l):l.type[0]==="W"?g(l):v(l)},f=function(l){if(l.size<2)return;var k=i(l.data,!0),O=new Uint8Array(l.data.subarray(k.length+1));return{key:l.type,info:k,data:O.buffer}},v=function(l){if(l.size<2)return;if(l.type==="TXXX"){var k=1,O=i(l.data.subarray(k),!0);k+=O.length+1;var x=i(l.data.subarray(k));return{key:l.type,info:O,data:x}}var y=i(l.data.subarray(1));return{key:l.type,data:y}},g=function(l){if(l.type==="WXXX"){if(l.size<2)return;var k=1,O=i(l.data.subarray(k),!0);k+=O.length+1;var x=i(l.data.subarray(k));return{key:l.type,info:O,data:x}}var y=i(l.data);return{key:l.type,data:y}},b=function(l){if(l.data.byteLength===8){var k=new Uint8Array(l.data),O=k[3]&1,x=(k[4]<<23)+(k[5]<<15)+(k[6]<<7)+k[7];return x/=45,O&&(x+=4772185884e-2),Math.round(x)}return},i=function(l,k){k===void 0&&(k=!1);var O=T();if(O){var x=O.decode(l);if(k){var y=x.indexOf("\0");return y!==-1?x.substring(0,y):x}return x.replace(/\0/g,"")}for(var E=l.length,C,I,j,L="",H=0;H<E;){if(C=l[H++],C===0&&k)return L;if(C===0||C===3)continue;switch(C>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:L+=String.fromCharCode(C);break;case 12:case 13:I=l[H++],L+=String.fromCharCode((C&31)<<6|I&63);break;case 14:I=l[H++],j=l[H++],L+=String.fromCharCode((C&15)<<12|(I&63)<<6|(j&63)<<0);break;default:}}return L},s={decodeTextFrame:v},t;function T(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/demux/base-audio-demuxer.ts"),c=S("./src/demux/id3.ts"),h=S("./src/utils/logger.ts"),w=S("./src/demux/mpegaudio.ts");function d(n,u){n.prototype=Object.create(u.prototype),n.prototype.constructor=n,o(n,u)}function o(n,u){return o=Object.setPrototypeOf||function(f,v){return f.__proto__=v,f},o(n,u)}var a=function(n){d(u,n);function u(){return n.apply(this,arguments)||this}var p=u.prototype;return p.resetInitSegment=function(v,g,b){n.prototype.resetInitSegment.call(this,v,g,b),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:v,duration:b,inputTimeScale:9e4,dropped:0}},u.probe=function(v){if(!v)return!1;for(var g=c.getID3Data(v,0)||[],b=g.length,i=v.length;b<i;b++)if(w.probe(v,b))return h.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(v,g){return w.canParse(v,g)},p.appendFrame=function(v,g,b){return this.initPTS===null?void 0:w.appendFrame(v,g,b,this.initPTS,this.frameIndex)},u}(P.default);a.minProbeByteLength=4,m.default=a},"./src/demux/mp4demuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/mp4-tools.ts"),c=S("./src/demux/dummy-demuxed-track.ts"),h=function(){function w(o,a){this.remainderData=null,this.config=void 0,this.config=a}var d=w.prototype;return d.resetTimeStamp=function(){},d.resetInitSegment=function(){},d.resetContiguity=function(){},w.probe=function(a){return Object(P.findBox)({data:a,start:0,end:Math.min(a.length,16384)},["moof"]).length>0},d.demux=function(a){var n=a,u=Object(c.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(P.appendUint8Array)(this.remainderData,a));var p=Object(P.segmentValidRange)(n);this.remainderData=p.remainder,u.samples=p.valid||new Uint8Array}else u.samples=n;return{audioTrack:Object(c.dummyTrack)(),avcTrack:u,id3Track:Object(c.dummyTrack)(),textTrack:Object(c.dummyTrack)()}},d.flush=function(){var a=Object(c.dummyTrack)();return a.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(c.dummyTrack)(),avcTrack:a,id3Track:Object(c.dummyTrack)(),textTrack:Object(c.dummyTrack)()}},d.demuxSampleAes=function(a,n,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},d.destroy=function(){},w}();h.minProbeByteLength=1024,m.default=h},"./src/demux/mpegaudio.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"appendFrame",function(){return o}),S.d(m,"parseHeader",function(){return a}),S.d(m,"isHeaderPattern",function(){return n}),S.d(m,"isHeader",function(){return u}),S.d(m,"canParse",function(){return p}),S.d(m,"probe",function(){return f});var P=null,c=[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],h=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],w=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d=[0,1,1,4];function o(v,g,b,i,s){if(b+24>g.length)return;var t=a(g,b);if(t&&b+t.frameLength<=g.length){var T=t.samplesPerFrame*9e4/t.sampleRate,_=i+s*T,l={unit:g.subarray(b,b+t.frameLength),pts:_,dts:_};return v.config=[],v.channelCount=t.channelCount,v.samplerate=t.sampleRate,v.samples.push(l),{sample:l,length:t.frameLength,missing:0}}}function a(v,g){var b=v[g+1]>>3&3,i=v[g+1]>>1&3,s=v[g+2]>>4&15,t=v[g+2]>>2&3;if(b!==1&&s!==0&&s!==15&&t!==3){var T=v[g+2]>>1&1,_=v[g+3]>>6,l=b===3?3-i:i===3?3:4,k=c[l*14+s-1]*1e3,O=b===3?0:b===2?1:2,x=h[O*3+t],y=_===3?1:2,E=w[b][i],C=d[i],I=E*8*C,j=Math.floor(E*k/x+T)*C;if(P===null){var L=navigator.userAgent||"",H=L.match(/Chrome\/(\d+)/i);P=H?parseInt(H[1]):0}var W=!!P&&P<=87;return W&&i===2&&k>=224e3&&_===0&&(v[g+3]=v[g+3]|128),{sampleRate:x,channelCount:y,frameLength:j,samplesPerFrame:I}}}function n(v,g){return v[g]===255&&(v[g+1]&224)===224&&(v[g+1]&6)!==0}function u(v,g){return g+1<v.length&&n(v,g)}function p(v,g){var b=4;return n(v,g)&&b<=v.length-g}function f(v,g){if(g+1<v.length&&n(v,g)){var b=4,i=a(v,g),s=b;i!=null&&i.frameLength&&(s=i.frameLength);var t=g+s;return t===v.length||u(v,t)}return!1}},"./src/demux/sample-aes.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/crypt/decrypter.ts"),c=S("./src/demux/tsdemuxer.ts"),h=function(){function w(o,a,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new P.default(o,a,{removePKCS7Padding:!1})}var d=w.prototype;return d.decryptBuffer=function(a,n){this.decrypter.decrypt(a,this.keyData.key.buffer,this.keyData.iv.buffer,n)},d.decryptAacSample=function(a,n,u,p){var f=a[n].unit,v=f.subarray(16,f.length-f.length%16),g=v.buffer.slice(v.byteOffset,v.byteOffset+v.length),b=this;this.decryptBuffer(g,function(i){var s=new Uint8Array(i);f.set(s,16),p||b.decryptAacSamples(a,n+1,u)})},d.decryptAacSamples=function(a,n,u){for(;;n++){if(n>=a.length){u();return}if(a[n].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(a,n,u,p),!p)return}},d.getAvcEncryptedData=function(a){for(var n=Math.floor((a.length-48)/160)*16+16,u=new Int8Array(n),p=0,f=32;f<=a.length-16;f+=160,p+=16)u.set(a.subarray(f,f+16),p);return u},d.getAvcDecryptedUnit=function(a,n){for(var u=new Uint8Array(n),p=0,f=32;f<=a.length-16;f+=160,p+=16)a.set(u.subarray(p,p+16),f);return a},d.decryptAvcSample=function(a,n,u,p,f,v){var g=Object(c.discardEPB)(f.data),b=this.getAvcEncryptedData(g),i=this;this.decryptBuffer(b.buffer,function(s){f.data=i.getAvcDecryptedUnit(g,s),v||i.decryptAvcSamples(a,n,u+1,p)})},d.decryptAvcSamples=function(a,n,u,p){if(a instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,u=0){if(n>=a.length){p();return}for(var f=a[n].units;!(u>=f.length);u++){var v=f[u];if(v.data.length<=48||v.type!==1&&v.type!==5)continue;var g=this.decrypter.isSync();if(this.decryptAvcSample(a,n,u,p,v,g),!g)return}}},w}();m.default=h},"./src/demux/transmuxer-interface.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return f});var P=S("./node_modules/webworkify-webpack/index.js"),c=S.n(P),h=S("./src/events.ts"),w=S("./src/demux/transmuxer.ts"),d=S("./src/utils/logger.ts"),o=S("./src/errors.ts"),a=S("./src/utils/mediasource-helper.ts"),n=S("./node_modules/eventemitter3/index.js"),u=S.n(n),p=Object(a.getMediaSource)()||{isTypeSupported:function(){return!1}},f=function(){function v(b,i,s,t){var T=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=b,this.id=i,this.onTransmuxComplete=s,this.onFlush=t;var _=b.config,l=function(E,C){C=C||{},C.frag=T.frag,C.id=T.id,b.trigger(E,C)};this.observer=new n.EventEmitter,this.observer.on(h.Events.FRAG_DECRYPTED,l),this.observer.on(h.Events.ERROR,l);var k={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){d.logger.log("demuxing in webworker");var x;try{x=this.worker=P("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),x.addEventListener("message",this.onwmsg),x.onerror=function(y){b.trigger(h.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(y.message+" ("+y.filename+":"+y.lineno+")")})},x.postMessage({cmd:"init",typeSupported:k,vendor:O,id:i,config:JSON.stringify(_)})}catch(y){d.logger.warn("Error in worker:",y),d.logger.error("Error while initializing DemuxerWorker, fallback to inline"),x&&self.URL.revokeObjectURL(x.objectURL),this.transmuxer=new w.default(this.observer,k,_,O,i),this.worker=null}}else this.transmuxer=new w.default(this.observer,k,_,O,i)}var g=v.prototype;return g.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},g.push=function(i,s,t,T,_,l,k,O,x,y){var E=this;x.transmuxing.start=self.performance.now();var C=this.transmuxer,I=this.worker,j=l?l.start:_.start,L=_.decryptdata,H=this.frag,W=!(H&&_.cc===H.cc),U=!(H&&x.level===H.level),G=H?x.sn-H.sn:-1,B=this.part?x.part-this.part.index:1,z=!U&&(G===1||G===0&&B===1),V=self.performance.now();(U||G||_.stats.parsing.start===0)&&(_.stats.parsing.start=V),l&&(B||!z)&&(l.stats.parsing.start=V);var ie=new w.TransmuxState(W,z,O,U,j);if(!z||W){d.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+x.sn+" p: "+x.part+" level: "+x.level+" id: "+x.id+`
discontinuity: `+W+`
trackSwitch: `+U+`
contiguous: `+z+`
accurateTimeOffset: `+O+`
timeOffset: `+j);var ce=new w.TransmuxConfig(t,T,s,k,y);this.configureTransmuxer(ce)}if(this.frag=_,this.part=l,I)I.postMessage({cmd:"demux",data:i,decryptdata:L,chunkMeta:x,state:ie},i instanceof ArrayBuffer?[i]:[]);else if(C){var he=C.push(i,L,x,ie);Object(w.isPromise)(he)?he.then(function(Ae){E.handleTransmuxComplete(Ae)}):this.handleTransmuxComplete(he)}},g.flush=function(i){var s=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:i});else if(t){var _=t.flush(i);Object(w.isPromise)(_)?_.then(function(l){s.handleFlushResult(l,i)}):this.handleFlushResult(_,i)}},g.handleFlushResult=function(i,s){var t=this;i.forEach(function(T){t.handleTransmuxComplete(T)}),this.onFlush(s)},g.onWorkerMessage=function(i){var s=i.data,t=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,t.trigger(s.event,s.data);break}}},g.configureTransmuxer=function(i){var s=this.worker,t=this.transmuxer;s?s.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},g.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},v}()},"./src/demux/transmuxer-worker.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return o});var P=S("./src/demux/transmuxer.ts"),c=S("./src/events.ts"),h=S("./src/utils/logger.ts"),w=S("./node_modules/eventemitter3/index.js"),d=S.n(w);function o(f){var v=new w.EventEmitter,g=function(i,s){f.postMessage({event:i,data:s})};v.on(c.Events.FRAG_DECRYPTED,g),v.on(c.Events.ERROR,g),f.addEventListener("message",function(b){var i=b.data;switch(i.cmd){case"init":{var s=JSON.parse(i.config);f.transmuxer=new P.default(v,i.typeSupported,s,i.vendor,i.id),Object(h.enableLogs)(s.debug),g("init",null);break}case"configure":{f.transmuxer.configure(i.config);break}case"demux":{var t=f.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(P.isPromise)(t)?t.then(function(l){a(f,l)}):a(f,t);break}case"flush":{var T=i.chunkMeta,_=f.transmuxer.flush(T);Object(P.isPromise)(_)?_.then(function(l){u(f,l,T)}):u(f,_,T);break}default:break}})}function a(f,v){if(p(v.remuxResult))return;var g=[],b=v.remuxResult,i=b.audio,s=b.video;i&&n(g,i),s&&n(g,s),f.postMessage({event:"transmuxComplete",data:v},g)}function n(f,v){v.data1&&f.push(v.data1.buffer),v.data2&&f.push(v.data2.buffer)}function u(f,v,g){v.forEach(function(b){a(f,b)}),f.postMessage({event:"flush",data:g})}function p(f){return!f.audio&&!f.video&&!f.text&&!f.id3&&!f.initSegment}},"./src/demux/transmuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return s}),S.d(m,"isPromise",function(){return _}),S.d(m,"TransmuxConfig",function(){return l}),S.d(m,"TransmuxState",function(){return k});var P=S("./src/events.ts"),c=S("./src/errors.ts"),h=S("./src/crypt/decrypter.ts"),w=S("./src/demux/aacdemuxer.ts"),d=S("./src/demux/mp4demuxer.ts"),o=S("./src/demux/tsdemuxer.ts"),a=S("./src/demux/mp3demuxer.ts"),n=S("./src/remux/mp4-remuxer.ts"),u=S("./src/remux/passthrough-remuxer.ts"),p=S("./src/demux/chunk-cache.ts"),f=S("./src/utils/mp4-tools.ts"),v=S("./src/utils/logger.ts"),g;try{g=self.performance.now.bind(self.performance)}catch(O){v.logger.debug("Unable to use Performance API on this environment"),g=self.Date.now}var b=[{demux:o.default,remux:n.default},{demux:d.default,remux:u.default},{demux:w.default,remux:n.default},{demux:a.default,remux:n.default}],i=1024;b.forEach(function(O){var x=O.demux;i=Math.max(i,x.minProbeByteLength)});var s=function(){function O(y,E,C,I,j){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=y,this.typeSupported=E,this.config=C,this.vendor=I,this.id=j}var x=O.prototype;return x.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},x.push=function(E,C,I,j){var L=this,H=I.transmuxing;H.executeStart=g();var W=new Uint8Array(E),U=this.cache,G=this.config,B=this.currentTransmuxState,z=this.transmuxConfig;j&&(this.currentTransmuxState=j);var V=t(W,C);if(V&&V.method==="AES-128"){var ie=this.getDecrypter();if(G.enableSoftwareAES){var ce=ie.softwareDecrypt(W,V.key.buffer,V.iv.buffer);if(!ce)return H.executeEnd=g(),T(I);W=new Uint8Array(ce)}else return this.decryptionPromise=ie.webCryptoDecrypt(W,V.key.buffer,V.iv.buffer).then(function(Q){var X=L.push(Q,null,I);return L.decryptionPromise=null,X}),this.decryptionPromise}var he=j||B,Ae=he.contiguous,De=he.discontinuity,pe=he.trackSwitch,Te=he.accurateTimeOffset,ye=he.timeOffset,ue=z.audioCodec,le=z.videoCodec,te=z.defaultInitPts,fe=z.duration,q=z.initSegmentData;if((De||pe)&&this.resetInitSegment(q,ue,le,fe),De&&this.resetInitialTimestamp(te),Ae||this.resetContiguity(),this.needsProbing(W,De,pe)){if(U.dataLength){var ee=U.flush();W=Object(f.appendUint8Array)(ee,W)}this.configureTransmuxer(W,z)}var Ce=this.transmux(W,V,ye,Te,I),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,H.executeEnd=g(),Ce},x.flush=function(E){var C=this,I=E.transmuxing;I.executeStart=g();var j=this.decrypter,L=this.cache,H=this.currentTransmuxState,W=this.decryptionPromise;if(W)return W.then(function(){return C.flush(E)});var U=[],G=H.timeOffset;if(j){var B=j.flush();B&&U.push(this.push(B,null,E))}var z=L.dataLength;L.reset();var V=this.demuxer,ie=this.remuxer;if(!V||!ie)return z>=i&&this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),I.executeEnd=g(),[T(E)];var ce=V.flush(G);return _(ce)?ce.then(function(he){return C.flushRemux(U,he,E),U}):(this.flushRemux(U,ce,E),U)},x.flushRemux=function(E,C,I){var j=C.audioTrack,L=C.avcTrack,H=C.id3Track,W=C.textTrack,U=this.currentTransmuxState,G=U.accurateTimeOffset,B=U.timeOffset;v.logger.log("[transmuxer.ts]: Flushed fragment "+I.sn+(I.part>-1?" p: "+I.part:"")+" of level "+I.level);var z=this.remuxer.remux(j,L,H,W,B,G,!0,this.id);E.push({remuxResult:z,chunkMeta:I}),I.transmuxing.executeEnd=g()},x.resetInitialTimestamp=function(E){var C=this.demuxer,I=this.remuxer;if(!C||!I)return;C.resetTimeStamp(E),I.resetTimeStamp(E)},x.resetContiguity=function(){var E=this.demuxer,C=this.remuxer;if(!E||!C)return;E.resetContiguity(),C.resetNextTimestamp()},x.resetInitSegment=function(E,C,I,j){var L=this.demuxer,H=this.remuxer;if(!L||!H)return;L.resetInitSegment(C,I,j),H.resetInitSegment(E,C,I)},x.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},x.transmux=function(E,C,I,j,L){var H;return C&&C.method==="SAMPLE-AES"?H=this.transmuxSampleAes(E,C,I,j,L):H=this.transmuxUnencrypted(E,I,j,L),H},x.transmuxUnencrypted=function(E,C,I,j){var L=this.demuxer.demux(E,C,!1,!this.config.progressive),H=L.audioTrack,W=L.avcTrack,U=L.id3Track,G=L.textTrack,B=this.remuxer.remux(H,W,U,G,C,I,!1,this.id);return{remuxResult:B,chunkMeta:j}},x.transmuxSampleAes=function(E,C,I,j,L){var H=this;return this.demuxer.demuxSampleAes(E,C,I).then(function(W){var U=H.remuxer.remux(W.audioTrack,W.avcTrack,W.id3Track,W.textTrack,I,j,!1,H.id);return{remuxResult:U,chunkMeta:L}})},x.configureTransmuxer=function(E,C){for(var I=this.config,j=this.observer,L=this.typeSupported,H=this.vendor,W=C.audioCodec,U=C.defaultInitPts,G=C.duration,B=C.initSegmentData,z=C.videoCodec,V,ie=0,ce=b.length;ie<ce;ie++)if(b[ie].demux.probe(E)){V=b[ie];break}V||(v.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),V={demux:d.default,remux:u.default});var he=this.demuxer,Ae=this.remuxer,De=V.remux,pe=V.demux;(!Ae||!(Ae instanceof De))&&(this.remuxer=new De(j,I,L,H)),(!he||!(he instanceof pe))&&(this.demuxer=new pe(j,I,L),this.probe=pe.probe),this.resetInitSegment(B,W,z,G),this.resetInitialTimestamp(U)},x.needsProbing=function(E,C,I){return!this.demuxer||!this.remuxer||C||I},x.getDecrypter=function(){var E=this.decrypter;return E||(E=this.decrypter=new h.default(this.observer,this.config)),E},O}();function t(O,x){var y=null;return O.byteLength>0&&x!=null&&x.key!=null&&x.iv!==null&&x.method!=null&&(y=x),y}var T=function(x){return{remuxResult:{},chunkMeta:x}};function _(O){return"then"in O&&O.then instanceof Function}var l=function(x,y,E,C,I){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=x,this.videoCodec=y,this.initSegmentData=E,this.duration=C,this.defaultInitPts=I},k=function(x,y,E,C,I){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=x,this.contiguous=y,this.accurateTimeOffset=E,this.trackSwitch=C,this.timeOffset=I}},"./src/demux/tsdemuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"discardEPB",function(){return T});var P=S("./src/demux/adts.ts"),c=S("./src/demux/mpegaudio.ts"),h=S("./src/demux/exp-golomb.ts"),w=S("./src/demux/id3.ts"),d=S("./src/demux/sample-aes.ts"),o=S("./src/events.ts"),a=S("./src/utils/mp4-tools.ts"),n=S("./src/utils/logger.ts"),u=S("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},f=function(){function _(k,O,x){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=k,this.config=O,this.typeSupported=x}_.probe=function(O){var x=_.syncOffset(O);return x<0?!1:(x&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},_.syncOffset=function(O){for(var x=Math.min(1e3,O.length-3*188),y=0;y<x;){if(O[y]===71&&O[y+188]===71&&O[y+2*188]===71)return y;y++}return-1},_.createTrack=function(O,x){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:p[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?x:void 0}};var l=_.prototype;return l.resetInitSegment=function(O,x,y){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_.createTrack("video",y),this._audioTrack=_.createTrack("audio",y),this._id3Track=_.createTrack("id3",y),this._txtTrack=_.createTrack("text",y),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=x,this._duration=y},l.resetTimeStamp=function(){},l.resetContiguity=function(){var O=this._audioTrack,x=this._avcTrack,y=this._id3Track;O&&(O.pesData=null),x&&(x.pesData=null),y&&(y.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},l.demux=function(O,x,y,E){y===void 0&&(y=!1),E===void 0&&(E=!1),y||(this.sampleAes=null);var C,I=this._avcTrack,j=this._audioTrack,L=this._id3Track,H=I.pid,W=I.pesData,U=j.pid,G=L.pid,B=j.pesData,z=L.pesData,V=!1,ie=this.pmtParsed,ce=this._pmtId,he=O.length;if(this.remainderData&&(O=Object(a.appendUint8Array)(this.remainderData,O),he=O.length,this.remainderData=null),he<188&&!E)return this.remainderData=O,{audioTrack:j,avcTrack:I,id3Track:L,textTrack:this._txtTrack};var Ae=Math.max(0,_.syncOffset(O));he-=(he+Ae)%188,he<O.byteLength&&!E&&(this.remainderData=new Uint8Array(O.buffer,he,O.buffer.byteLength-he));for(var De=Ae;De<he;De+=188)if(O[De]===71){var pe=!!(O[De+1]&64),Te=((O[De+1]&31)<<8)+O[De+2],ye=(O[De+3]&48)>>4,ue=void 0;if(ye>1){if(ue=De+5+O[De+4],ue===De+188)continue}else ue=De+4;switch(Te){case H:pe&&(W&&(C=i(W))&&this.parseAVCPES(C,!1),W={data:[],size:0}),W&&(W.data.push(O.subarray(ue,De+188)),W.size+=De+188-ue);break;case U:pe&&(B&&(C=i(B))&&(j.isAAC?this.parseAACPES(C):this.parseMPEGPES(C)),B={data:[],size:0}),B&&(B.data.push(O.subarray(ue,De+188)),B.size+=De+188-ue);break;case G:pe&&(z&&(C=i(z))&&this.parseID3PES(C),z={data:[],size:0}),z&&(z.data.push(O.subarray(ue,De+188)),z.size+=De+188-ue);break;case 0:pe&&(ue+=O[ue]+1),ce=this._pmtId=g(O,ue);break;case ce:{pe&&(ue+=O[ue]+1);var le=b(O,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,y);H=le.avc,H>0&&(I.pid=H),U=le.audio,U>0&&(j.pid=U,j.isAAC=le.isAAC),G=le.id3,G>0&&(L.pid=G),V&&!ie&&(n.logger.log("reparse from beginning"),V=!1,De=Ae-188),ie=this.pmtParsed=!0;break}case 17:case 8191:break;default:V=!0;break}}else this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});I.pesData=W,j.pesData=B,L.pesData=z;var te={audioTrack:j,avcTrack:I,id3Track:L,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(te),te},l.flush=function(){var O=this.remainderData;this.remainderData=null;var x;return O?x=this.demux(O,-1,!1,!0):x={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(x),this.sampleAes?this.decrypt(x,this.sampleAes):x},l.extractRemainingSamples=function(O){var x=O.audioTrack,y=O.avcTrack,E=O.id3Track,C=y.pesData,I=x.pesData,j=E.pesData,L;C&&(L=i(C))?(this.parseAVCPES(L,!0),y.pesData=null):y.pesData=C,I&&(L=i(I))?(x.isAAC?this.parseAACPES(L):this.parseMPEGPES(L),x.pesData=null):(I!=null&&I.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),x.pesData=I),j&&(L=i(j))?(this.parseID3PES(L),E.pesData=null):E.pesData=j},l.demuxSampleAes=function(O,x,y){var E=this.demux(O,y,!0,!this.config.progressive),C=this.sampleAes=new d.default(this.observer,this.config,x);return this.decrypt(E,C)},l.decrypt=function(O,x){return new Promise(function(y){var E=O.audioTrack,C=O.avcTrack;E.samples&&E.isAAC?x.decryptAacSamples(E.samples,0,function(){C.samples?x.decryptAvcSamples(C.samples,0,0,function(){y(O)}):y(O)}):C.samples&&x.decryptAvcSamples(C.samples,0,0,function(){y(O)})})},l.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},l.parseAVCPES=function(O,x){var y=this,E=this._avcTrack,C=this.parseAVCNALu(O.data),I=!1,j=this.avcSample,L,H=!1;O.data=null,j&&C.length&&!E.audFound&&(s(j,E),j=this.avcSample=v(!1,O.pts,O.dts,"")),C.forEach(function(W){switch(W.type){case 1:{L=!0,j||(j=y.avcSample=v(!0,O.pts,O.dts,"")),I&&(j.debug+="NDR "),j.frame=!0;var U=W.data;if(H&&U.length>4){var G=new h.default(U).readSliceType();(G===2||G===4||G===7||G===9)&&(j.key=!0)}break}case 5:L=!0,j||(j=y.avcSample=v(!0,O.pts,O.dts,"")),I&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{L=!0,I&&j&&(j.debug+="SEI ");var B=new h.default(T(W.data));B.readUByte();for(var z=0,V=0,ie=!1,ce=0;!ie&&B.bytesAvailable>1;){z=0;do ce=B.readUByte(),z+=ce;while(ce===255);V=0;do ce=B.readUByte(),V+=ce;while(ce===255);if(z===4&&B.bytesAvailable!==0){ie=!0;var he=B.readUByte();if(he===181){var Ae=B.readUShort();if(Ae===49){var De=B.readUInt();if(De===1195456820){var pe=B.readUByte();if(pe===3){for(var Te=B.readUByte(),ye=B.readUByte(),ue=31&Te,le=[Te,ye],te=0;te<ue;te++)le.push(B.readUByte()),le.push(B.readUByte()),le.push(B.readUByte());t(y._txtTrack.samples,{type:3,pts:O.pts,bytes:le})}}}}}else if(z===5&&B.bytesAvailable!==0){if(ie=!0,V>16){for(var fe=[],q=0;q<16;q++)fe.push(B.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&fe.push("-");for(var ee=V-16,Ce=new Uint8Array(ee),re=0;re<ee;re++)Ce[re]=B.readUByte();t(y._txtTrack.samples,{pts:O.pts,payloadType:z,uuid:fe.join(""),userData:Object(w.utf8ArrayToStr)(Ce),userDataBytes:Ce})}}else if(V<B.bytesAvailable)for(var Q=0;Q<V;Q++)B.readUByte()}break}case 7:if(L=!0,H=!0,I&&j&&(j.debug+="SPS "),!E.sps){var X=new h.default(W.data),Z=X.readSPS();E.width=Z.width,E.height=Z.height,E.pixelRatio=Z.pixelRatio,E.sps=[W.data],E.duration=y._duration;for(var xe=W.data.subarray(1,4),ve="avc1.",Oe=0;Oe<3;Oe++){var Qe=xe[Oe].toString(16);Qe.length<2&&(Qe="0"+Qe),ve+=Qe}E.codec=ve}break;case 8:L=!0,I&&j&&(j.debug+="PPS "),E.pps||(E.pps=[W.data]);break;case 9:L=!1,E.audFound=!0,j&&s(j,E),j=y.avcSample=v(!1,O.pts,O.dts,I?"AUD ":"");break;case 12:L=!1;break;default:L=!1,j&&(j.debug+="unknown NAL "+W.type+" ");break}if(j&&L){var rt=j.units;rt.push(W)}}),x&&j&&(s(j,E),this.avcSample=null)},l.getLastNalUnit=function(){var O,x=this.avcSample,y;if(!x||x.units.length===0){var E=this._avcTrack.samples;x=E[E.length-1]}if((O=x)!==null&&O!==void 0&&O.units){var C=x.units;y=C[C.length-1]}return y},l.parseAVCNALu=function(O){var x=O.byteLength,y=this._avcTrack,E=y.naluState||0,C=E,I=[],j=0,L,H,W,U=-1,G=0;for(E===-1&&(U=0,G=O[0]&31,E=0,j=1);j<x;){if(L=O[j++],!E){E=L?0:1;continue}if(E===1){E=L?0:2;continue}if(!L)E=3;else if(L===1){if(U>=0){var B={data:O.subarray(U,j-E-1),type:G};I.push(B)}else{var z=this.getLastNalUnit();if(z&&(C&&j<=4-C&&(z.state&&(z.data=z.data.subarray(0,z.data.byteLength-C))),H=j-E-1,H>0)){var V=new Uint8Array(z.data.byteLength+H);V.set(z.data,0),V.set(O.subarray(0,H),z.data.byteLength),z.data=V,z.state=0}}j<x?(W=O[j]&31,U=j,G=W,E=0):E=-1}else E=0}if(U>=0&&E>=0){var ie={data:O.subarray(U,x),type:G,state:E};I.push(ie)}if(I.length===0){var ce=this.getLastNalUnit();if(ce){var he=new Uint8Array(ce.data.byteLength+O.byteLength);he.set(ce.data,0),he.set(O,ce.data.byteLength),ce.data=he}}return y.naluState=E,I},l.parseAACPES=function(O){var x=0,y=this._audioTrack,E=this.aacOverFlow,C=O.data;if(E){this.aacOverFlow=null;var I=E.sample.unit.byteLength,j=Math.min(E.missing,I),L=I-j;E.sample.unit.set(C.subarray(0,j),L),y.samples.push(E.sample),x=E.missing}var H,W;for(H=x,W=C.length;H<W-1&&!P.isHeader(C,H);H++);if(H!==x){var U,G;if(H<W-1?(U="AAC PES did not start with ADTS header,offset:"+H,G=!1):(U="no ADTS header found in AAC PES",G=!0),n.logger.warn("parsing error:"+U),this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:G,reason:U}),G)return}P.initTrackConfig(y,this.observer,C,H,this.audioCodec);var B;if(O.pts!==void 0)B=O.pts;else if(E){var z=P.getFrameDuration(y.samplerate);B=E.sample.pts+z}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var V=0;H<W;)if(P.isHeader(C,H)){if(H+5<W){var ie=P.appendFrame(y,C,H,B,V);if(ie)if(ie.missing)this.aacOverFlow=ie;else{H+=ie.length,V++;continue}}break}else H++},l.parseMPEGPES=function(O){var x=O.data,y=x.length,E=0,C=0,I=O.pts;if(I===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;C<y;)if(c.isHeader(x,C)){var j=c.appendFrame(this._audioTrack,x,C,I,E);if(j)C+=j.length,E++;else break}else C++},l.parseID3PES=function(O){if(O.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},_}();f.minProbeByteLength=188;function v(_,l,k,O){return{key:_,frame:!1,pts:l,dts:k,units:[],debug:O,length:0}}function g(_,l){return(_[l+10]&31)<<8|_[l+11]}function b(_,l,k,O){var x={audio:-1,avc:-1,id3:-1,isAAC:!0},y=(_[l+1]&15)<<8|_[l+2],E=l+3+y-4,C=(_[l+10]&15)<<8|_[l+11];for(l+=12+C;l<E;){var I=(_[l+1]&31)<<8|_[l+2];switch(_[l]){case 207:if(!O){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:x.audio===-1&&(x.audio=I);break;case 21:x.id3===-1&&(x.id3=I);break;case 219:if(!O){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:x.avc===-1&&(x.avc=I);break;case 3:case 4:k?x.audio===-1&&(x.audio=I,x.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}l+=((_[l+3]&15)<<8|_[l+4])+5}return x}function i(_){var l=0,k,O,x,y,E,C=_.data;if(!_||_.size===0)return null;for(;C[0].length<19&&C.length>1;){var I=new Uint8Array(C[0].length+C[1].length);I.set(C[0]),I.set(C[1],C[0].length),C[0]=I,C.splice(1,1)}k=C[0];var j=(k[0]<<16)+(k[1]<<8)+k[2];if(j===1){if(O=(k[4]<<8)+k[5],O&&O>_.size-6)return null;var L=k[7];L&192&&(y=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,L&64?(E=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,y-E>60*9e4&&(n.logger.warn(Math.round((y-E)/9e4)+"s delta between PTS and DTS, align them"),y=E)):E=y),x=k[8];var H=x+9;if(_.size<=H)return null;_.size-=H;for(var W=new Uint8Array(_.size),U=0,G=C.length;U<G;U++){k=C[U];var B=k.byteLength;if(H)if(H>B){H-=B;continue}else k=k.subarray(H),B-=H,H=0;W.set(k,l),l+=B}return O&&(O-=x+3),{data:W,pts:y,dts:E,len:O}}return null}function s(_,l){if(_.units.length&&_.frame){if(_.pts===void 0){var k=l.samples,O=k.length;if(O){var x=k[O-1];_.pts=x.pts,_.dts=x.dts}else{l.dropped++;return}}l.samples.push(_)}_.debug.length&&n.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function t(_,l){var k=_.length;if(k>0){if(l.pts>=_[k-1].pts)_.push(l);else for(var O=k-1;O>=0;O--)if(l.pts<_[O].pts){_.splice(O,0,l);break}}else _.push(l)}function T(_){for(var l=_.byteLength,k=[],O=1;O<l-2;)_[O]===0&&_[O+1]===0&&_[O+2]===3?(k.push(O+2),O+=2):O++;if(k.length===0)return _;var x=l-k.length,y=new Uint8Array(x),E=0;for(O=0;O<x;E++,O++)E===k[0]&&(E++,k.shift()),y[O]=_[E];return y}m.default=f},"./src/errors.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"ErrorTypes",function(){return P}),S.d(m,"ErrorDetails",function(){return c});var P;(function(h){h.NETWORK_ERROR="networkError",h.MEDIA_ERROR="mediaError",h.KEY_SYSTEM_ERROR="keySystemError",h.MUX_ERROR="muxError",h.OTHER_ERROR="otherError"})(P||(P={}));var c;(function(h){h.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",h.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",h.KEY_SYSTEM_NO_SESSION="keySystemNoSession",h.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",h.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",h.MANIFEST_LOAD_ERROR="manifestLoadError",h.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",h.MANIFEST_PARSING_ERROR="manifestParsingError",h.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",h.LEVEL_EMPTY_ERROR="levelEmptyError",h.LEVEL_LOAD_ERROR="levelLoadError",h.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",h.LEVEL_SWITCH_ERROR="levelSwitchError",h.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",h.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",h.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",h.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",h.FRAG_LOAD_ERROR="fragLoadError",h.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",h.FRAG_DECRYPT_ERROR="fragDecryptError",h.FRAG_PARSING_ERROR="fragParsingError",h.REMUX_ALLOC_ERROR="remuxAllocError",h.KEY_LOAD_ERROR="keyLoadError",h.KEY_LOAD_TIMEOUT="keyLoadTimeOut",h.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",h.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",h.BUFFER_APPEND_ERROR="bufferAppendError",h.BUFFER_APPENDING_ERROR="bufferAppendingError",h.BUFFER_STALLED_ERROR="bufferStalledError",h.BUFFER_FULL_ERROR="bufferFullError",h.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",h.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",h.INTERNAL_EXCEPTION="internalException",h.INTERNAL_ABORTED="aborted",h.UNKNOWN="unknown"})(c||(c={}))},"./src/events.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"Events",function(){return P});var P;(function(c){c.MEDIA_ATTACHING="hlsMediaAttaching",c.MEDIA_ATTACHED="hlsMediaAttached",c.MEDIA_DETACHING="hlsMediaDetaching",c.MEDIA_DETACHED="hlsMediaDetached",c.BUFFER_RESET="hlsBufferReset",c.BUFFER_CODECS="hlsBufferCodecs",c.BUFFER_CREATED="hlsBufferCreated",c.BUFFER_APPENDING="hlsBufferAppending",c.BUFFER_APPENDED="hlsBufferAppended",c.BUFFER_EOS="hlsBufferEos",c.BUFFER_FLUSHING="hlsBufferFlushing",c.BUFFER_FLUSHED="hlsBufferFlushed",c.MANIFEST_LOADING="hlsManifestLoading",c.MANIFEST_LOADED="hlsManifestLoaded",c.MANIFEST_PARSED="hlsManifestParsed",c.LEVEL_SWITCHING="hlsLevelSwitching",c.LEVEL_SWITCHED="hlsLevelSwitched",c.LEVEL_LOADING="hlsLevelLoading",c.LEVEL_LOADED="hlsLevelLoaded",c.LEVEL_UPDATED="hlsLevelUpdated",c.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",c.LEVELS_UPDATED="hlsLevelsUpdated",c.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",c.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",c.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",c.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",c.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",c.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",c.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",c.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",c.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",c.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",c.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",c.CUES_PARSED="hlsCuesParsed",c.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",c.INIT_PTS_FOUND="hlsInitPtsFound",c.FRAG_LOADING="hlsFragLoading",c.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",c.FRAG_LOADED="hlsFragLoaded",c.FRAG_DECRYPTED="hlsFragDecrypted",c.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",c.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",c.FRAG_PARSING_METADATA="hlsFragParsingMetadata",c.FRAG_PARSED="hlsFragParsed",c.FRAG_BUFFERED="hlsFragBuffered",c.FRAG_CHANGED="hlsFragChanged",c.FPS_DROP="hlsFpsDrop",c.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",c.ERROR="hlsError",c.DESTROYING="hlsDestroying",c.KEY_LOADING="hlsKeyLoading",c.KEY_LOADED="hlsKeyLoaded",c.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",c.BACK_BUFFER_REACHED="hlsBackBufferReached"})(P||(P={}))},"./src/hls.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return _});var P=S("./node_modules/url-toolkit/src/url-toolkit.js"),c=S.n(P),h=S("./src/loader/playlist-loader.ts"),w=S("./src/loader/key-loader.ts"),d=S("./src/controller/id3-track-controller.ts"),o=S("./src/controller/latency-controller.ts"),a=S("./src/controller/level-controller.ts"),n=S("./src/controller/fragment-tracker.ts"),u=S("./src/controller/stream-controller.ts"),p=S("./src/is-supported.ts"),f=S("./src/utils/logger.ts"),v=S("./src/config.ts"),g=S("./node_modules/eventemitter3/index.js"),b=S.n(g),i=S("./src/events.ts"),s=S("./src/errors.ts");function t(l,k){for(var O=0;O<k.length;O++){var x=k[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function T(l,k,O){return k&&t(l.prototype,k),O&&t(l,O),l}var _=function(){l.isSupported=function(){return Object(p.isSupported)()};function l(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new g.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 x=this.config=Object(v.mergeConfig)(l.DefaultConfig,O);this.userConfig=O,Object(f.enableLogs)(x.debug),this._autoLevelCapping=-1,x.progressive&&Object(v.enableStreamingMode)(x);var y=x.abrController,E=x.bufferController,C=x.capLevelController,I=x.fpsController,j=this.abrController=new y(this),L=this.bufferController=new E(this),H=this.capLevelController=new C(this),W=new I(this),U=new h.default(this),G=new w.default(this),B=new d.default(this),z=this.levelController=new a.default(this),V=new n.FragmentTracker(this),ie=this.streamController=new u.default(this,V);H.setStreamController(ie),W.setStreamController(ie);var ce=[z,ie];this.networkControllers=ce;var he=[U,G,j,L,H,W,B,V];this.audioTrackController=this.createController(x.audioTrackController,null,ce),this.createController(x.audioStreamController,V,ce),this.subtitleTrackController=this.createController(x.subtitleTrackController,null,ce),this.createController(x.subtitleStreamController,V,ce),this.createController(x.timelineController,null,he),this.emeController=this.createController(x.emeController,null,he),this.cmcdController=this.createController(x.cmcdController,null,he),this.latencyController=this.createController(o.default,null,he),this.coreComponents=he}var k=l.prototype;return k.createController=function(x,y,E){if(x){var C=y?new x(this,y):new x(this);return E&&E.push(C),C}return null},k.on=function(x,y,E){E===void 0&&(E=this),this._emitter.on(x,y,E)},k.once=function(x,y,E){E===void 0&&(E=this),this._emitter.once(x,y,E)},k.removeAllListeners=function(x){this._emitter.removeAllListeners(x)},k.off=function(x,y,E,C){E===void 0&&(E=this),this._emitter.off(x,y,E,C)},k.listeners=function(x){return this._emitter.listeners(x)},k.emit=function(x,y,E){return this._emitter.emit(x,y,E)},k.trigger=function(x,y){if(this.config.debug)return this.emit(x,x,y);try{return this.emit(x,x,y)}catch(E){f.logger.error("An internal error happened while handling event "+x+'. Error message: "'+E.message+'". Here is a stacktrace:',E),this.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:x,error:E})}return!1},k.listenerCount=function(x){return this._emitter.listenerCount(x)},k.destroy=function(){f.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(x){return x.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(x){return x.destroy()}),this.coreComponents.length=0},k.attachMedia=function(x){f.logger.log("attachMedia"),this._media=x,this.trigger(i.Events.MEDIA_ATTACHING,{media:x})},k.detachMedia=function(){f.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},k.loadSource=function(x){this.stopLoad();var y=this.media,E=this.url,C=this.url=P.buildAbsoluteURL(self.location.href,x,{alwaysNormalize:!0});f.logger.log("loadSource:"+C),y&&E&&E!==C&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(y)),this.trigger(i.Events.MANIFEST_LOADING,{url:x})},k.startLoad=function(x){x===void 0&&(x=-1),f.logger.log("startLoad("+x+")"),this.networkControllers.forEach(function(y){y.startLoad(x)})},k.stopLoad=function(){f.logger.log("stopLoad"),this.networkControllers.forEach(function(x){x.stopLoad()})},k.swapAudioCodec=function(){f.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},k.recoverMediaError=function(){f.logger.log("recoverMediaError");var x=this._media;this.detachMedia(),x&&this.attachMedia(x)},k.removeLevel=function(x,y){y===void 0&&(y=0),this.levelController.removeLevel(x,y)},T(l,[{key:"levels",get:function(){var x=this.levelController.levels;return x||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(x){f.logger.log("set currentLevel:"+x),this.loadLevel=x,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(x){f.logger.log("set nextLevel:"+x),this.levelController.manualLevel=x,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(x){f.logger.log("set loadLevel:"+x),this.levelController.manualLevel=x}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(x){this.levelController.nextLoadLevel=x}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(x){f.logger.log("set firstLevel:"+x),this.levelController.firstLevel=x}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(x){f.logger.log("set startLevel:"+x),x!==-1&&(x=Math.max(x,this.minAutoLevel)),this.levelController.startLevel=x}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(x){var y=!!x;y!==this.config.capLevelToPlayerSize&&(y?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=y)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(x){this._autoLevelCapping!==x&&(f.logger.log("set autoLevelCapping:"+x),this._autoLevelCapping=x)}},{key:"bandwidthEstimate",get:function(){var x=this.abrController.bwEstimator;return x?x.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var x=this.levels,y=this.config.minAutoBitrate;if(!x)return 0;for(var E=x.length,C=0;C<E;C++)if(x[C].maxBitrate>y)return C;return 0}},{key:"maxAutoLevel",get:function(){var x=this.levels,y=this.autoLevelCapping,E;return y===-1&&x&&x.length?E=x.length-1:E=y,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(x){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,x)}},{key:"audioTracks",get:function(){var x=this.audioTrackController;return x?x.audioTracks:[]}},{key:"audioTrack",get:function(){var x=this.audioTrackController;return x?x.audioTrack:-1},set:function(x){var y=this.audioTrackController;y&&(y.audioTrack=x)}},{key:"subtitleTracks",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTrack:-1},set:function(x){var y=this.subtitleTrackController;y&&(y.subtitleTrack=x)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var x=this.subtitleTrackController;return x?x.subtitleDisplay:!1},set:function(x){var y=this.subtitleTrackController;y&&(y.subtitleDisplay=x)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(x){this.config.lowLatencyMode=x}},{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 i.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return l.defaultConfig?l.defaultConfig:v.hlsDefaultConfig},set:function(x){l.defaultConfig=x}}]),l}();_.defaultConfig=void 0},"./src/is-supported.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isSupported",function(){return h}),S.d(m,"changeTypeSupported",function(){return w});var P=S("./src/utils/mediasource-helper.ts");function c(){return self.SourceBuffer||self.WebKitSourceBuffer}function h(){var d=Object(P.getMediaSource)();if(!d)return!1;var o=c(),a=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!o||o.prototype&&typeof o.prototype.appendBuffer=="function"&&typeof o.prototype.remove=="function";return!!a&&!!n}function w(){var d,o=c();return typeof(o==null||((d=o.prototype)===null||d===void 0)?void 0:d.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return f}),S.d(m,"LoadError",function(){return g});var P=S("./src/polyfills/number.ts"),c=S("./src/errors.ts");function h(b,i){b.prototype=Object.create(i.prototype),b.prototype.constructor=b,n(b,i)}function w(b){var i=typeof Map=="function"?new Map:void 0;return w=function(t){if(t===null||!a(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,T)}function T(){return d(t,arguments,u(this).constructor)}return T.prototype=Object.create(t.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),n(T,t)},w(b)}function d(b,i,s){return o()?d=Reflect.construct:d=function(T,_,l){var k=[null];k.push.apply(k,_);var O=Function.bind.apply(T,k),x=new O;return l&&n(x,l.prototype),x},d.apply(null,arguments)}function o(){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(b){return!1}}function a(b){return Function.toString.call(b).indexOf("[native code]")!==-1}function n(b,i){return n=Object.setPrototypeOf||function(t,T){return t.__proto__=T,t},n(b,i)}function u(b){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(b)}var p=Math.pow(2,17),f=function(){function b(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var i=b.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,T){var _=this,l=t.url;if(!l)return Promise.reject(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(l?"part list":"url")));this.abort();var k=this.config,O=k.fLoader,x=k.loader;return new Promise(function(y,E){_.loader&&_.loader.destroy();var C=_.loader=t.loader=O?new O(k):new x(k),I=v(t),j={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:p};t.stats=C.stats,C.load(I,j,{onSuccess:function(H,W,U,G){_.resetLoader(t,C),y({frag:t,part:null,payload:H.data,networkDetails:G})},onError:function(H,W,U){_.resetLoader(t,C),E(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:H,networkDetails:U}))},onAbort:function(H,W,U){_.resetLoader(t,C),E(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:U}))},onTimeout:function(H,W,U){_.resetLoader(t,C),E(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:U}))},onProgress:function(H,W,U,G){T&&T({frag:t,part:null,payload:U,networkDetails:G})}})})},i.loadPart=function(t,T,_){var l=this;this.abort();var k=this.config,O=k.fLoader,x=k.loader;return new Promise(function(y,E){l.loader&&l.loader.destroy();var C=l.loader=t.loader=O?new O(k):new x(k),I=v(t,T),j={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:p};T.stats=C.stats,C.load(I,j,{onSuccess:function(H,W,U,G){l.resetLoader(t,C),l.updateStatsFromPart(t,T);var B={frag:t,part:T,payload:H.data,networkDetails:G};_(B),y(B)},onError:function(H,W,U){l.resetLoader(t,C),E(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:T,response:H,networkDetails:U}))},onAbort:function(H,W,U){t.stats.aborted=T.stats.aborted,l.resetLoader(t,C),E(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:T,networkDetails:U}))},onTimeout:function(H,W,U){l.resetLoader(t,C),E(new g({type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:T,networkDetails:U}))}})})},i.updateStatsFromPart=function(t,T){var _=t.stats,l=T.stats,k=l.total;if(_.loaded+=l.loaded,k){var O=Math.round(t.duration/T.duration),x=Math.min(Math.round(_.loaded/k),O),y=O-x,E=y*Math.round(_.loaded/x);_.total=_.loaded+E}else _.total=Math.max(_.loaded,_.total);var C=_.loading,I=l.loading;C.start?C.first+=I.first-I.start:(C.start=I.start,C.first=I.first),C.end=I.end},i.resetLoader=function(t,T){t.loader=null,this.loader===T&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),T.destroy()},b}();function v(b,i){i===void 0&&(i=null);var s=i||b,t={frag:b,part:i,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},T=s.byteRangeStartOffset,_=s.byteRangeEndOffset;return Object(P.isFiniteNumber)(T)&&Object(P.isFiniteNumber)(_)&&(t.rangeStart=T,t.rangeEnd=_),t}var g=function(b){h(i,b);function i(s){for(var t,T=arguments.length,_=new Array(T>1?T-1:0),l=1;l<T;l++)_[l-1]=arguments[l];return t=b.call.apply(b,[this].concat(_))||this,t.data=void 0,t.data=s,t}return i}(w(Error))},"./src/loader/fragment.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"ElementaryStreamTypes",function(){return f}),S.d(m,"BaseSegment",function(){return v}),S.d(m,"Fragment",function(){return g}),S.d(m,"Part",function(){return b});var P=S("./src/polyfills/number.ts"),c=S("./node_modules/url-toolkit/src/url-toolkit.js"),h=S.n(c),w=S("./src/utils/logger.ts"),d=S("./src/loader/level-key.ts"),o=S("./src/loader/load-stats.ts");function a(i,s){i.prototype=Object.create(s.prototype),i.prototype.constructor=i,n(i,s)}function n(i,s){return n=Object.setPrototypeOf||function(T,_){return T.__proto__=_,T},n(i,s)}function u(i,s){for(var t=0;t<s.length;t++){var T=s[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(i,T.key,T)}}function p(i,s,t){return s&&u(i.prototype,s),t&&u(i,t),i}var f;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(f||(f={}));var v=function(){function i(t){var T;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(T={},T[f.AUDIO]=null,T[f.VIDEO]=null,T[f.AUDIOVIDEO]=null,T),this.baseurl=t}var s=i.prototype;return s.setByteRange=function(T,_){var l=T.split("@",2),k=[];l.length===1?k[0]=_?_.byteRangeEndOffset:0:k[0]=parseInt(l[1]),k[1]=parseInt(l[0])+k[0],this._byteRange=k},p(i,[{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(c.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(T){this._url=T}}]),i}(),g=function(i){a(s,i);function s(T,_){var l;return l=i.call(this,_)||this,l._decryptdata=null,l.rawProgramDateTime=null,l.programDateTime=null,l.tagList=[],l.duration=0,l.sn=0,l.levelkey=void 0,l.type=void 0,l.loader=null,l.level=-1,l.cc=0,l.startPTS=void 0,l.endPTS=void 0,l.appendedPTS=void 0,l.startDTS=void 0,l.endDTS=void 0,l.start=0,l.deltaPTS=void 0,l.maxStartPTS=void 0,l.minEndPTS=void 0,l.stats=new o.LoadStats,l.urlId=0,l.data=void 0,l.bitrateTest=!1,l.title=null,l.initSegment=null,l.type=T,l}var t=s.prototype;return t.createInitializationVector=function(_){for(var l=new Uint8Array(16),k=12;k<16;k++)l[k]=_>>8*(15-k)&255;return l},t.setDecryptDataFromLevelKey=function(_,l){var k=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(k=d.LevelKey.fromURI(_.uri),k.method=_.method,k.iv=this.createInitializationVector(l),k.keyFormat="identity"),k},t.setElementaryStreamInfo=function(_,l,k,O,x,y){y===void 0&&(y=!1);var E=this.elementaryStreams,C=E[_];if(!C){E[_]={startPTS:l,endPTS:k,startDTS:O,endDTS:x,partial:y};return}C.startPTS=Math.min(C.startPTS,l),C.endPTS=Math.max(C.endPTS,k),C.startDTS=Math.min(C.startDTS,O),C.endDTS=Math.max(C.endDTS,x)},t.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[f.AUDIO]=null,_[f.VIDEO]=null,_[f.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&w.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(P.isFiniteNumber)(this.programDateTime))return null;var _=Object(P.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),s}(v),b=function(i){a(s,i);function s(t,T,_,l,k){var O;O=i.call(this,_)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new o.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=T,O.index=l;var x=t.enumeratedString("BYTERANGE");return x&&O.setByteRange(x,k),k&&(O.fragOffset=k.fragOffset+k.duration),O}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var T=this.elementaryStreams;return!!(T.audio||T.video||T.audiovideo)}}]),s}(v)},"./src/loader/key-loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return w});var P=S("./src/events.ts"),c=S("./src/errors.ts"),h=S("./src/utils/logger.ts"),w=function(){function d(a){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=a,this._registerListeners()}var o=d.prototype;return o._registerListeners=function(){this.hls.on(P.Events.KEY_LOADING,this.onKeyLoading,this)},o._unregisterListeners=function(){this.hls.off(P.Events.KEY_LOADING,this.onKeyLoading)},o.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var u=this.loaders[n];u&&u.destroy()}this.loaders={}},o.onKeyLoading=function(n,u){var p=u.frag,f=p.type,v=this.loaders[f];if(!p.decryptdata){h.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var g=p.decryptdata.uri;if(g!==this.decrypturl||this.decryptkey===null){var b=this.hls.config;if(v&&(h.logger.warn("abort previous key loader for type:"+f),v.abort()),!g){h.logger.warn("key uri is falsy");return}var i=b.loader,s=p.loader=this.loaders[f]=new i(b);this.decrypturl=g,this.decryptkey=null;var t={url:g,frag:p,responseType:"arraybuffer"},T={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:b.fragLoadingRetryDelay,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(t,T,_)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(P.Events.KEY_LOADED,{frag:p}))},o.loadsuccess=function(n,u,p){var f=p.frag;if(!f.decryptdata){h.logger.error("after key load, decryptdata unset");return}this.decryptkey=f.decryptdata.key=new Uint8Array(n.data),f.loader=null,delete this.loaders[f.type],this.hls.trigger(P.Events.KEY_LOADED,{frag:f})},o.loaderror=function(n,u){var p=u.frag,f=p.loader;f&&f.abort(),delete this.loaders[p.type],this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:n})},o.loadtimeout=function(n,u){var p=u.frag,f=p.loader;f&&f.abort(),delete this.loaders[p.type],this.hls.trigger(P.Events.ERROR,{type:c.ErrorTypes.NETWORK_ERROR,details:c.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},d}()},"./src/loader/level-details.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"LevelDetails",function(){return d});var P=S("./src/polyfills/number.ts");function c(o,a){for(var n=0;n<a.length;n++){var u=a[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}function h(o,a,n){return a&&c(o.prototype,a),n&&c(o,n),o}var w=10,d=function(){function o(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 a=o.prototype;return a.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-u.lastPartSn,f=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!f||!!p,this.advanced=this.endSN>u.endSN||p>0||p===0&&f>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},h(o,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(P.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||w}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var p=this.driftEnd-this.driftStart;return p*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.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 u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"LevelKey",function(){return d});var P=S("./node_modules/url-toolkit/src/url-toolkit.js"),c=S.n(P);function h(o,a){for(var n=0;n<a.length;n++){var u=a[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}function w(o,a,n){return a&&h(o.prototype,a),n&&h(o,n),o}var d=function(){o.fromURL=function(n,u){return new o(n,u)},o.fromURI=function(n){return new o(n)};function o(a,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(P.buildAbsoluteURL)(a,n,{alwaysNormalize:!0}):this._uri=a}return w(o,[{key:"uri",get:function(){return this._uri}}]),o}()},"./src/loader/load-stats.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"LoadStats",function(){return P});var P=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(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return s});var P=S("./src/polyfills/number.ts"),c=S("./node_modules/url-toolkit/src/url-toolkit.js"),h=S.n(c),w=S("./src/loader/fragment.ts"),d=S("./src/loader/level-details.ts"),o=S("./src/loader/level-key.ts"),a=S("./src/utils/attr-list.ts"),n=S("./src/utils/logger.ts"),u=S("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,f=/#EXT-X-MEDIA:(.*)/g,v=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),g=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("|")),b=/\.(mp4|m4s|m4v|m4a)$/i;function i(k){var O,x;return b.test((O=(x=c.parseURL(k))===null||x===void 0?void 0:x.path)!=null?O:"")}var s=function(){function k(){}return k.findGroup=function(x,y){for(var E=0;E<x.length;E++){var C=x[E];if(C.id===y)return C}},k.convertAVC1ToAVCOTI=function(x){var y=x.split(".");if(y.length>2){var E=y.shift()+".";return E+=parseInt(y.shift()).toString(16),E+=("000"+parseInt(y.shift()).toString(16)).substr(-4),E}return x},k.resolve=function(x,y){return c.buildAbsoluteURL(y,x,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(x,y){var E=[],C={},I=!1;p.lastIndex=0;for(var j;(j=p.exec(x))!=null;)if(j[1]){var L=new a.AttrList(j[1]),H={attrs:L,bitrate:L.decimalInteger("AVERAGE-BANDWIDTH")||L.decimalInteger("BANDWIDTH"),name:L.NAME,url:k.resolve(j[2],y)},W=L.decimalResolution("RESOLUTION");W&&(H.width=W.width,H.height=W.height),t((L.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),H),H.videoCodec&&H.videoCodec.indexOf("avc1")!==-1&&(H.videoCodec=k.convertAVC1ToAVCOTI(H.videoCodec)),E.push(H)}else if(j[3]){var U=new a.AttrList(j[3]);U["DATA-ID"]&&(I=!0,C[U["DATA-ID"]]=U)}return{levels:E,sessionData:I?C:null}},k.parseMasterPlaylistMedia=function(x,y,E,C){C===void 0&&(C=[]);var I,j=[],L=0;for(f.lastIndex=0;(I=f.exec(x))!==null;){var H=new a.AttrList(I[1]);if(H.TYPE===E){var W={attrs:H,bitrate:0,id:L++,groupId:H["GROUP-ID"],instreamId:H["INSTREAM-ID"],name:H.NAME||H.LANGUAGE||"",type:E,default:H.bool("DEFAULT"),autoselect:H.bool("AUTOSELECT"),forced:H.bool("FORCED"),lang:H.LANGUAGE,url:H.URI?k.resolve(H.URI,y):""};if(C.length){var U=k.findGroup(C,W.groupId)||C[0];T(W,U,"audioCodec"),T(W,U,"textCodec")}j.push(W)}}return j},k.parseLevelPlaylist=function(x,y,E,C,I){var j=new d.LevelDetails(y),L=j.fragments,H=null,W=0,U=0,G=0,B=0,z=null,V=new w.Fragment(C,y),ie,ce,he,Ae=-1,De=!1;for(v.lastIndex=0,j.m3u8=x;(ie=v.exec(x))!==null;){De&&(De=!1,V=new w.Fragment(C,y),V.start=G,V.sn=W,V.cc=B,V.level=E,H&&(V.initSegment=H,V.rawProgramDateTime=H.rawProgramDateTime));var pe=ie[1];if(pe){V.duration=parseFloat(pe);var Te=(" "+ie[2]).slice(1);V.title=Te||null,V.tagList.push(Te?["INF",pe,Te]:["INF",pe])}else if(ie[3])Object(P.isFiniteNumber)(V.duration)&&(V.start=G,he&&(V.levelkey=he),V.sn=W,V.level=E,V.cc=B,V.urlId=I,L.push(V),V.relurl=(" "+ie[3]).slice(1),l(V,z),z=V,G+=V.duration,W++,U=0,De=!0);else if(ie[4]){var ye=(" "+ie[4]).slice(1);z?V.setByteRange(ye,z):V.setByteRange(ye)}else if(ie[5])V.rawProgramDateTime=(" "+ie[5]).slice(1),V.tagList.push(["PROGRAM-DATE-TIME",V.rawProgramDateTime]),Ae===-1&&(Ae=L.length);else{if(ie=ie[0].match(g),!ie){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(ce=1;ce<ie.length&&!(typeof ie[ce]!="undefined");ce++);var ue=(" "+ie[ce]).slice(1),le=(" "+ie[ce+1]).slice(1),te=ie[ce+2]?(" "+ie[ce+2]).slice(1):"";switch(ue){case"PLAYLIST-TYPE":j.type=le.toUpperCase();break;case"MEDIA-SEQUENCE":W=j.startSN=parseInt(le);break;case"SKIP":{var fe=new a.AttrList(le),q=fe.decimalInteger("SKIPPED-SEGMENTS");if(Object(P.isFiniteNumber)(q)){j.skippedSegments=q;for(var ee=q;ee--;)L.unshift(null);W+=q}var Ce=fe.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ce&&(j.recentlyRemovedDateranges=Ce.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(le);break;case"VERSION":j.version=parseInt(le);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(le||te)&&V.tagList.push(te?[le,te]:[le]);break;case"DIS":B++;case"GAP":V.tagList.push([ue]);break;case"BITRATE":V.tagList.push([ue,le]);break;case"DISCONTINUITY-SEQ":B=parseInt(le);break;case"KEY":{var re,Q=new a.AttrList(le),X=Q.enumeratedString("METHOD"),Z=Q.URI,xe=Q.hexadecimalInteger("IV"),ve=Q.enumeratedString("KEYFORMATVERSIONS"),Oe=Q.enumeratedString("KEYID"),Qe=(re=Q.enumeratedString("KEYFORMAT"))!=null?re:"identity",rt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(rt.indexOf(Qe)>-1){n.logger.warn("Keyformat "+Qe+" is not supported from the manifest");continue}else if(Qe!=="identity")continue;X&&(he=o.LevelKey.fromURL(y,Z),Z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(he.method=X,he.keyFormat=Qe,Oe&&(he.keyID=Oe),ve&&(he.keyFormatVersions=ve),he.iv=xe));break}case"START":{var nt=new a.AttrList(le),ct=nt.decimalFloatingPoint("TIME-OFFSET");Object(P.isFiniteNumber)(ct)&&(j.startTimeOffset=ct);break}case"MAP":{var dt=new a.AttrList(le);V.relurl=dt.URI,dt.BYTERANGE&&V.setByteRange(dt.BYTERANGE),V.level=E,V.sn="initSegment",he&&(V.levelkey=he),V.initSegment=null,H=V,De=!0;break}case"SERVER-CONTROL":{var pt=new a.AttrList(le);j.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),j.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new a.AttrList(le);j.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Pe=j.partList;Pe||(Pe=j.partList=[]);var at=U>0?Pe[Pe.length-1]:void 0,ft=U++,Je=new w.Part(new a.AttrList(le),V,y,ft,at);Pe.push(Je),V.duration+=Je.duration;break}case"PRELOAD-HINT":{var st=new a.AttrList(le);j.preloadHint=st;break}case"RENDITION-REPORT":{var Ue=new a.AttrList(le);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+ie);break}}}z&&!z.relurl?(L.pop(),G-=z.duration,j.partList&&(j.fragmentHint=z)):j.partList&&(l(V,z),V.cc=B,j.fragmentHint=V);var Me=L.length,Ne=L[0],Ee=L[Me-1];if(G+=j.skippedSegments*j.targetduration,G>0&&Me&&Ee){j.averagetargetduration=G/Me;var Se=Ee.sn;j.endSN=Se!=="initSegment"?Se:0,Ne&&(j.startCC=Ne.cc,Ne.initSegment||j.fragments.every(function(Re){return Re.relurl&&i(Re.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),V=new w.Fragment(C,y),V.relurl=Ee.relurl,V.level=E,V.sn="initSegment",Ne.initSegment=V,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(G+=j.fragmentHint.duration),j.totalduration=G,j.endCC=B,Ae>0&&_(L,Ae),j},k}();function t(k,O){["video","audio","text"].forEach(function(x){var y=k.filter(function(C){return Object(u.isCodecType)(C,x)});if(y.length){var E=y.filter(function(C){return C.lastIndexOf("avc1",0)===0||C.lastIndexOf("mp4a",0)===0});O[x+"Codec"]=E.length>0?E[0]:y[0],k=k.filter(function(C){return y.indexOf(C)===-1})}}),O.unknownCodecs=k}function T(k,O,x){var y=O[x];y&&(k[x]=y)}function _(k,O){for(var x=k[O],y=O;y--;){var E=k[y];if(!E)return;E.programDateTime=x.programDateTime-E.duration*1e3,x=E}}function l(k,O){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):O!=null&&O.programDateTime&&(k.programDateTime=O.endProgramDateTime),Object(P.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),c=S("./src/events.ts"),h=S("./src/errors.ts"),w=S("./src/utils/logger.ts"),d=S("./src/utils/mp4-tools.ts"),o=S("./src/loader/m3u8-parser.ts"),a=S("./src/types/loader.ts"),n=S("./src/utils/attr-list.ts");function u(v){var g=v.type;switch(g){case a.PlaylistContextType.AUDIO_TRACK:return a.PlaylistLevelType.AUDIO;case a.PlaylistContextType.SUBTITLE_TRACK:return a.PlaylistLevelType.SUBTITLE;default:return a.PlaylistLevelType.MAIN}}function p(v,g){var b=v.url;return(b===void 0||b.indexOf("data:")===0)&&(b=g.url),b}var f=function(){function v(b){this.hls=void 0,this.loaders=Object.create(null),this.hls=b,this.registerListeners()}var g=v.prototype;return g.registerListeners=function(){var i=this.hls;i.on(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(c.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(c.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(c.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.unregisterListeners=function(){var i=this.hls;i.off(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(c.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(c.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(c.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.createInternalLoader=function(i){var s=this.hls.config,t=s.pLoader,T=s.loader,_=t||T,l=new _(s);return i.loader=l,this.loaders[i.type]=l,l},g.getInternalLoader=function(i){return this.loaders[i.type]},g.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},g.destroyInternalLoaders=function(){for(var i in this.loaders){var s=this.loaders[i];s&&s.destroy(),this.resetInternalLoader(i)}},g.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},g.onManifestLoading=function(i,s){var t=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:a.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},g.onLevelLoading=function(i,s){var t=s.id,T=s.level,_=s.url,l=s.deliveryDirectives;this.load({id:t,groupId:null,level:T,responseType:"text",type:a.PlaylistContextType.LEVEL,url:_,deliveryDirectives:l})},g.onAudioTrackLoading=function(i,s){var t=s.id,T=s.groupId,_=s.url,l=s.deliveryDirectives;this.load({id:t,groupId:T,level:null,responseType:"text",type:a.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:l})},g.onSubtitleTrackLoading=function(i,s){var t=s.id,T=s.groupId,_=s.url,l=s.deliveryDirectives;this.load({id:t,groupId:T,level:null,responseType:"text",type:a.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:l})},g.load=function(i){var s,t=this.hls.config,T=this.getInternalLoader(i);if(T){var _=T.context;if(_&&_.url===i.url){w.logger.trace("[playlist-loader]: playlist request ongoing");return}w.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),T.abort()}var l,k,O,x;switch(i.type){case a.PlaylistContextType.MANIFEST:l=t.manifestLoadingMaxRetry,k=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,x=t.manifestLoadingMaxRetryTimeout;break;case a.PlaylistContextType.LEVEL:case a.PlaylistContextType.AUDIO_TRACK:case a.PlaylistContextType.SUBTITLE_TRACK:l=0,k=t.levelLoadingTimeOut;break;default:l=t.levelLoadingMaxRetry,k=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,x=t.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(i),(s=i.deliveryDirectives)!==null&&s!==void 0&&s.part){var y;if(i.type===a.PlaylistContextType.LEVEL&&i.level!==null?y=this.hls.levels[i.level].details:i.type===a.PlaylistContextType.AUDIO_TRACK&&i.id!==null?y=this.hls.audioTracks[i.id].details:i.type===a.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(y=this.hls.subtitleTracks[i.id].details),y){var E=y.partTarget,C=y.targetduration;E&&C&&(k=Math.min(Math.max(E*3,C*.8)*1e3,k))}}var I={timeout:k,maxRetry:l,retryDelay:O,maxRetryDelay:x,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(i,I,j)},g.loadsuccess=function(i,s,t,T){if(T===void 0&&(T=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,s,t,T);return}this.resetInternalLoader(t.type);var _=i.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",T);return}s.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,s,t,T):this.handleMasterPlaylist(i,s,t,T)},g.loaderror=function(i,s,t){t===void 0&&(t=null),this.handleNetworkError(s,t,!1,i)},g.loadtimeout=function(i,s,t){t===void 0&&(t=null),this.handleNetworkError(s,t,!0)},g.handleMasterPlaylist=function(i,s,t,T){var _=this.hls,l=i.data,k=p(i,t),O=o.default.parseMasterPlaylist(l,k),x=O.levels,y=O.sessionData;if(!x.length){this.handleManifestParsingError(i,t,"no level found in manifest",T);return}var E=x.map(function(W){return{id:W.attrs.AUDIO,audioCodec:W.audioCodec}}),C=x.map(function(W){return{id:W.attrs.SUBTITLES,textCodec:W.textCodec}}),I=o.default.parseMasterPlaylistMedia(l,k,"AUDIO",E),j=o.default.parseMasterPlaylistMedia(l,k,"SUBTITLES",C),L=o.default.parseMasterPlaylistMedia(l,k,"CLOSED-CAPTIONS");if(I.length){var H=I.some(function(W){return!W.url});!H&&x[0].audioCodec&&!x[0].attrs.AUDIO&&(w.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),I.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}_.trigger(c.Events.MANIFEST_LOADED,{levels:x,audioTracks:I,subtitles:j,captions:L,url:k,stats:s,networkDetails:T,sessionData:y})},g.handleTrackOrLevelPlaylist=function(i,s,t,T){var _=this.hls,l=t.id,k=t.level,O=t.type,x=p(i,t),y=Object(P.isFiniteNumber)(l)?l:0,E=Object(P.isFiniteNumber)(k)?k:y,C=u(t),I=o.default.parseLevelPlaylist(i.data,x,E,C,y);if(!I.fragments.length){_.trigger(c.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:x,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===a.PlaylistContextType.MANIFEST){var j={attrs:new n.AttrList({}),bitrate:0,details:I,name:"",url:x};_.trigger(c.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:x,stats:s,networkDetails:T,sessionData:null})}if(s.parsing.end=performance.now(),I.needSidxRanges){var L,H=(L=I.fragments[0].initSegment)===null||L===void 0?void 0:L.url;this.load({url:H,isSidxRequest:!0,type:O,level:k,levelDetails:I,id:l,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=I,this.handlePlaylistLoaded(i,s,t,T)},g.handleSidxRequest=function(i,s){var t=Object(d.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var T=t.references,_=s.levelDetails;T.forEach(function(l,k){var O=l.info,x=_.fragments[k];x.byteRange.length===0&&x.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),x.initSegment&&x.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},g.handleManifestParsingError=function(i,s,t,T){this.hls.trigger(c.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===a.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:s,networkDetails:T})},g.handleNetworkError=function(i,s,t,T){t===void 0&&(t=!1),w.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var _=h.ErrorDetails.UNKNOWN,l=!1,k=this.getInternalLoader(i);switch(i.type){case a.PlaylistContextType.MANIFEST:_=t?h.ErrorDetails.MANIFEST_LOAD_TIMEOUT:h.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case a.PlaylistContextType.LEVEL:_=t?h.ErrorDetails.LEVEL_LOAD_TIMEOUT:h.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case a.PlaylistContextType.AUDIO_TRACK:_=t?h.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case a.PlaylistContextType.SUBTITLE_TRACK:_=t?h.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:h.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1;break}k&&this.resetInternalLoader(i.type);var O={type:h.ErrorTypes.NETWORK_ERROR,details:_,fatal:l,url:i.url,loader:k,context:i,networkDetails:s};T&&(O.response=T),this.hls.trigger(c.Events.ERROR,O)},g.handlePlaylistLoaded=function(i,s,t,T){var _=t.type,l=t.level,k=t.id,O=t.groupId,x=t.loader,y=t.levelDetails,E=t.deliveryDirectives;if(!(y!=null&&y.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",T);return}if(!x)return;y.live&&(x.getCacheAge&&(y.ageHeader=x.getCacheAge()||0),(!x.getCacheAge||isNaN(y.ageHeader))&&(y.ageHeader=0));switch(_){case a.PlaylistContextType.MANIFEST:case a.PlaylistContextType.LEVEL:this.hls.trigger(c.Events.LEVEL_LOADED,{details:y,level:l||0,id:k||0,stats:s,networkDetails:T,deliveryDirectives:E});break;case a.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(c.Events.AUDIO_TRACK_LOADED,{details:y,id:k||0,groupId:O||"",stats:s,networkDetails:T,deliveryDirectives:E});break;case a.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(c.Events.SUBTITLE_TRACK_LOADED,{details:y,id:k||0,groupId:O||"",stats:s,networkDetails:T,deliveryDirectives:E});break}},v}();m.default=f},"./src/polyfills/number.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isFiniteNumber",function(){return P}),S.d(m,"MAX_SAFE_INTEGER",function(){return c});var P=Number.isFinite||function(h){return typeof h=="number"&&isFinite(h)},c=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(D,m,S){"use strict";S.r(m);var P=function(){function c(){}return c.getSilentFrame=function(w,d){switch(w){case"mp4a.40.2":if(d===1)return new Uint8Array([0,200,0,128,35,128]);if(d===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(d===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(d===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(d===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(d===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(d===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(d===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(d===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},c}();m.default=P},"./src/remux/mp4-generator.ts":function(D,m,S){"use strict";S.r(m);var P=Math.pow(2,32)-1,c=function(){function h(){}return h.init=function(){h.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 d;for(d in h.types)h.types.hasOwnProperty(d)&&(h.types[d]=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)]);var o=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]),a=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]);h.HDLR_TYPES={video:o,audio:a};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);h.STTS=h.STSC=h.STCO=u,h.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),h.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),h.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),h.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),f=new Uint8Array([97,118,99,49]),v=new Uint8Array([0,0,0,1]);h.FTYP=h.box(h.types.ftyp,p,v,p,f),h.DINF=h.box(h.types.dinf,h.box(h.types.dref,n))},h.box=function(d){for(var o=8,a=arguments.length,n=new Array(a>1?a-1:0),u=1;u<a;u++)n[u-1]=arguments[u];for(var p=n.length,f=p;p--;)o+=n[p].byteLength;var v=new Uint8Array(o);for(v[0]=o>>24&255,v[1]=o>>16&255,v[2]=o>>8&255,v[3]=o&255,v.set(d,4),p=0,o=8;p<f;p++)v.set(n[p],o),o+=n[p].byteLength;return v},h.hdlr=function(d){return h.box(h.types.hdlr,h.HDLR_TYPES[d])},h.mdat=function(d){return h.box(h.types.mdat,d)},h.mdhd=function(d,o){o*=d;var a=Math.floor(o/(P+1)),n=Math.floor(o%(P+1));return h.box(h.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,a>>24,a>>16&255,a>>8&255,a&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},h.mdia=function(d){return h.box(h.types.mdia,h.mdhd(d.timescale,d.duration),h.hdlr(d.type),h.minf(d))},h.mfhd=function(d){return h.box(h.types.mfhd,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255]))},h.minf=function(d){return d.type==="audio"?h.box(h.types.minf,h.box(h.types.smhd,h.SMHD),h.DINF,h.stbl(d)):h.box(h.types.minf,h.box(h.types.vmhd,h.VMHD),h.DINF,h.stbl(d))},h.moof=function(d,o,a){return h.box(h.types.moof,h.mfhd(d),h.traf(a,o))},h.moov=function(d){for(var o=d.length,a=[];o--;)a[o]=h.trak(d[o]);return h.box.apply(null,[h.types.moov,h.mvhd(d[0].timescale,d[0].duration)].concat(a).concat(h.mvex(d)))},h.mvex=function(d){for(var o=d.length,a=[];o--;)a[o]=h.trex(d[o]);return h.box.apply(null,[h.types.mvex].concat(a))},h.mvhd=function(d,o){o*=d;var a=Math.floor(o/(P+1)),n=Math.floor(o%(P+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,a>>24,a>>16&255,a>>8&255,a&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 h.box(h.types.mvhd,u)},h.sdtp=function(d){var o=d.samples||[],a=new Uint8Array(4+o.length),n,u;for(n=0;n<o.length;n++)u=o[n].flags,a[n+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return h.box(h.types.sdtp,a)},h.stbl=function(d){return h.box(h.types.stbl,h.stsd(d),h.box(h.types.stts,h.STTS),h.box(h.types.stsc,h.STSC),h.box(h.types.stsz,h.STSZ),h.box(h.types.stco,h.STCO))},h.avc1=function(d){var o=[],a=[],n,u,p;for(n=0;n<d.sps.length;n++)u=d.sps[n],p=u.byteLength,o.push(p>>>8&255),o.push(p&255),o=o.concat(Array.prototype.slice.call(u));for(n=0;n<d.pps.length;n++)u=d.pps[n],p=u.byteLength,a.push(p>>>8&255),a.push(p&255),a=a.concat(Array.prototype.slice.call(u));var f=h.box(h.types.avcC,new Uint8Array([1,o[3],o[4],o[5],252|3,224|d.sps.length].concat(o).concat([d.pps.length]).concat(a))),v=d.width,g=d.height,b=d.pixelRatio[0],i=d.pixelRatio[1];return h.box(h.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,v>>8&255,v&255,g>>8&255,g&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]),f,h.box(h.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),h.box(h.types.pasp,new Uint8Array([b>>24,b>>16&255,b>>8&255,b&255,i>>24,i>>16&255,i>>8&255,i&255])))},h.esds=function(d){var o=d.config.length;return new Uint8Array([0,0,0,0,3,23+o,0,1,0,4,15+o,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([o]).concat(d.config).concat([6,1,2]))},h.mp4a=function(d){var o=d.samplerate;return h.box(h.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]),h.box(h.types.esds,h.esds(d)))},h.mp3=function(d){var o=d.samplerate;return h.box(h.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]))},h.stsd=function(d){return d.type==="audio"?!d.isAAC&&d.codec==="mp3"?h.box(h.types.stsd,h.STSD,h.mp3(d)):h.box(h.types.stsd,h.STSD,h.mp4a(d)):h.box(h.types.stsd,h.STSD,h.avc1(d))},h.tkhd=function(d){var o=d.id,a=d.duration*d.timescale,n=d.width,u=d.height,p=Math.floor(a/(P+1)),f=Math.floor(a%(P+1));return h.box(h.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,o>>24&255,o>>16&255,o>>8&255,o&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,f>>24,f>>16&255,f>>8&255,f&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,u>>8&255,u&255,0,0]))},h.traf=function(d,o){var a=h.sdtp(d),n=d.id,u=Math.floor(o/(P+1)),p=Math.floor(o%(P+1));return h.box(h.types.traf,h.box(h.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),h.box(h.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,p>>24,p>>16&255,p>>8&255,p&255])),h.trun(d,a.length+16+20+8+16+8+8),a)},h.trak=function(d){return d.duration=d.duration||4294967295,h.box(h.types.trak,h.tkhd(d),h.mdia(d))},h.trex=function(d){var o=d.id;return h.box(h.types.trex,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},h.trun=function(d,o){var a=d.samples||[],n=a.length,u=12+16*n,p=new Uint8Array(u),f,v,g,b,i,s;for(o+=8+u,p.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0),f=0;f<n;f++)v=a[f],g=v.duration,b=v.size,i=v.flags,s=v.cts,p.set([g>>>24&255,g>>>16&255,g>>>8&255,g&255,b>>>24&255,b>>>16&255,b>>>8&255,b&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*f);return h.box(h.types.trun,p)},h.initSegment=function(d){h.types||h.init();var o=h.moov(d),a=new Uint8Array(h.FTYP.byteLength+o.byteLength);return a.set(h.FTYP),a.set(o,h.FTYP.byteLength),a},h}();c.types=void 0,c.HDLR_TYPES=void 0,c.STTS=void 0,c.STSC=void 0,c.STCO=void 0,c.STSZ=void 0,c.VMHD=void 0,c.SMHD=void 0,c.STSD=void 0,c.FTYP=void 0,c.DINF=void 0,m.default=c},"./src/remux/mp4-remuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return s}),S.d(m,"normalizePts",function(){return t});var P=S("./src/polyfills/number.ts"),c=S("./src/remux/aac-helper.ts"),h=S("./src/remux/mp4-generator.ts"),w=S("./src/events.ts"),d=S("./src/errors.ts"),o=S("./src/utils/logger.ts"),a=S("./src/types/loader.ts"),n=S("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(k){for(var O=1;O<arguments.length;O++){var x=arguments[O];for(var y in x)Object.prototype.hasOwnProperty.call(x,y)&&(k[y]=x[y])}return k},u.apply(this,arguments)}var p=10*1e3,f=1024,v=1152,g=null,b=null,i=!1,s=function(){function k(x,y,E,C){if(C===void 0&&(C=""),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=x,this.config=y,this.typeSupported=E,this.ISGenerated=!1,g===null){var I=navigator.userAgent||"",j=I.match(/Chrome\/(\d+)/i);g=j?parseInt(j[1]):0}if(b===null){var L=navigator.userAgent.match(/Safari\/(\d+)/i);b=L?parseInt(L[1]):0}i=!!g&&g<75||!!b&&b<600}var O=k.prototype;return O.destroy=function(){},O.resetTimeStamp=function(y){o.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=y},O.resetNextTimestamp=function(){o.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){o.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(y){var E=!1,C=y.reduce(function(I,j){var L=j.pts-I;return L<-4294967296?(E=!0,t(I,j.pts)):L>0?I:j.pts},y[0].pts);return E&&o.logger.debug("PTS rollover detected"),C},O.remux=function(y,E,C,I,j,L,H,W){var U,G,B,z,V,ie,ce=j,he=j,Ae=y.pid>-1,De=E.pid>-1,pe=E.samples.length,Te=y.samples.length>0,ye=pe>1,ue=(!Ae||Te)&&(!De||ye)||this.ISGenerated||H;if(ue){this.ISGenerated||(B=this.generateIS(y,E,j));var le=this.isVideoContiguous,te=-1;if(ye&&(te=T(E.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(ie=!0,te>0){o.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+pe+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(te),E.dropped+=te,he+=(E.samples[0].pts-fe)/(E.timescale||9e4)}else te===-1&&(o.logger.warn("[mp4-remuxer]: No keyframe found out of "+pe+" video samples"),ie=!1);if(this.ISGenerated){if(Te&&ye){var q=this.getVideoStartPts(E.samples),ee=t(y.samples[0].pts,q)-q,Ce=ee/E.inputTimeScale;ce+=Math.max(0,Ce),he+=Math.max(0,-Ce)}if(Te){if(y.samplerate||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(y,E,j)),G=this.remuxAudio(y,ce,this.isAudioContiguous,L,De||ye||W===a.PlaylistLevelType.AUDIO?he:void 0),ye){var re=G?G.endPTS-G.startPTS:0;E.inputTimeScale||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(y,E,j)),U=this.remuxVideo(E,he,le,re)}}else ye&&(U=this.remuxVideo(E,he,le,0));U&&(U.firstKeyFrame=te,U.independent=te!==-1)}}return this.ISGenerated&&(C.samples.length&&(V=this.remuxID3(C,j)),I.samples.length&&(z=this.remuxText(I,j))),{audio:G,video:U,initSegment:B,independent:ie,text:z,id3:V}},O.generateIS=function(y,E,C){var I=y.samples,j=E.samples,L=this.typeSupported,H={},W=!Object(P.isFiniteNumber)(this._initPTS),U="audio/mp4",G,B,z;if(W&&(G=B=Infinity),y.config&&I.length&&(y.timescale=y.samplerate,y.isAAC||(L.mpeg?(U="audio/mpeg",y.codec=""):L.mp3&&(y.codec="mp3")),H.audio={id:"audio",container:U,codec:y.codec,initSegment:!y.isAAC&&L.mpeg?new Uint8Array(0):h.default.initSegment([y]),metadata:{channelCount:y.channelCount}},W&&(z=y.inputTimeScale,G=B=I[0].pts-Math.round(z*C))),E.sps&&E.pps&&j.length&&(E.timescale=E.inputTimeScale,H.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:h.default.initSegment([E]),metadata:{width:E.width,height:E.height}},W)){z=E.inputTimeScale;var V=this.getVideoStartPts(j),ie=Math.round(z*C);B=Math.min(B,t(j[0].dts,V)-ie),G=Math.min(G,V-ie)}if(Object.keys(H).length)return this.ISGenerated=!0,W&&(this._initPTS=G,this._initDTS=B),{tracks:H,initPTS:G,timescale:z}},O.remuxVideo=function(y,E,C,I){var j=y.inputTimeScale,L=y.samples,H=[],W=L.length,U=this._initPTS,G=this.nextAvcDts,B=8,z,V,ie,ce=Number.POSITIVE_INFINITY,he=Number.NEGATIVE_INFINITY,Ae=0,De=!1;if(!C||G===null){var pe=E*j,Te=L[0].pts-t(L[0].dts,L[0].pts);G=pe-Te}for(var ye=0;ye<W;ye++){var ue=L[ye];if(ue.pts=t(ue.pts-U,G),ue.dts=t(ue.dts-U,G),ue.dts>ue.pts){var le=9e4*.2;Ae=Math.max(Math.min(Ae,ue.pts-ue.dts),-1*le)}ue.dts<L[ye>0?ye-1:ye].dts&&(De=!0)}De&&L.sort(function(or,Zt){var Et=or.dts-Zt.dts,jr=or.pts-Zt.pts;return Et||jr}),V=L[0].dts,ie=L[L.length-1].dts;var te=Math.round((ie-V)/(W-1));if(Ae<0){if(Ae<te*-2){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-te,!0)+" ms");for(var fe=Ae,q=0;q<W;q++)L[q].dts=fe=Math.max(fe,L[q].pts-te),L[q].pts=Math.max(fe,L[q].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(Ae,!0)+" ms to overcome this issue");for(var ee=0;ee<W;ee++)L[ee].dts=L[ee].dts+Ae}V=L[0].dts}if(C){var Ce=V-G,re=Ce>te,Q=Ce<-1;if(re||Q){re?o.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms ("+Ce+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Ce,!0)+" ms ("+Ce+"dts) overlapping between fragments detected"),V=G;var X=L[0].pts-Ce;L[0].dts=V,L[0].pts=X,o.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(X,!0)+"/"+Object(n.toMsFromMpegTsClock)(V,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms")}}i&&(V=Math.max(0,V));for(var Z=0,xe=0,ve=0;ve<W;ve++){for(var Oe=L[ve],Qe=Oe.units,rt=Qe.length,nt=0,ct=0;ct<rt;ct++)nt+=Qe[ct].data.length;xe+=nt,Z+=rt,Oe.length=nt,Oe.dts=Math.max(Oe.dts,V),Oe.pts=Math.max(Oe.pts,Oe.dts,0),ce=Math.min(Oe.pts,ce),he=Math.max(Oe.pts,he)}ie=L[W-1].dts;var dt=xe+4*Z+8,pt;try{pt=new Uint8Array(dt)}catch(or){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:dt,reason:"fail allocating video mdat "+dt});return}var He=new DataView(pt.buffer);He.setUint32(0,dt),pt.set(h.default.types.mdat,4);for(var Pe=0;Pe<W;Pe++){for(var at=L[Pe],ft=at.units,Je=0,st=0,Ue=ft.length;st<Ue;st++){var Me=ft[st],Ne=Me.data,Ee=Me.data.byteLength;He.setUint32(B,Ee),B+=4,pt.set(Ne,B),B+=Ee,Je+=4+Ee}if(Pe<W-1)z=L[Pe+1].dts-at.dts;else{var Se=this.config,Re=at.dts-L[Pe>0?Pe-1:Pe].dts;if(Se.stretchShortVideoTrack&&this.nextAudioPts!==null){var Le=Math.floor(Se.maxBufferHole*j),Ye=(I?ce+I*j:this.nextAudioPts)-at.pts;Ye>Le?(z=Ye-Re,z<0&&(z=Re),o.logger.log("[mp4-remuxer]: It is approximately "+Ye/90+" ms to the next segment; using duration "+z/90+" ms for the last video frame.")):z=Re}else z=Re}var tt=Math.round(at.pts-at.dts);H.push(new _(at.key,z,Je,tt))}if(H.length&&g&&g<70){var Ct=H[0].flags;Ct.dependsOn=2,Ct.isNonSync=0}console.assert(z!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=ie+z,this.isVideoContiguous=!0;var At=h.default.moof(y.sequenceNumber++,V,u({},y,{samples:H})),rr="video",gt={data1:At,data2:pt,startPTS:ce/j,endPTS:(he+z)/j,startDTS:V/j,endDTS:G/j,type:rr,hasAudio:!1,hasVideo:!0,nb:H.length,dropped:y.dropped};return y.samples=[],y.dropped=0,console.assert(pt.length,"MDAT length must not be zero"),gt},O.remuxAudio=function(y,E,C,I,j){var L=y.inputTimeScale,H=y.samplerate?y.samplerate:L,W=L/H,U=y.isAAC?f:v,G=U*W,B=this._initPTS,z=!y.isAAC&&this.typeSupported.mpeg,V=[],ie=y.samples,ce=z?0:8,he=this.nextAudioPts||-1,Ae=E*L;if(this.isAudioContiguous=C=C||ie.length&&he>0&&(I&&Math.abs(Ae-he)<9e3||Math.abs(t(ie[0].pts-B,Ae)-he)<20*G),ie.forEach(function(Ne){Ne.pts=t(Ne.pts-B,Ae)}),!C||he<0){if(ie=ie.filter(function(Ne){return Ne.pts>=0}),!ie.length)return;j===0?he=0:I?he=Math.max(0,Ae):he=ie[0].pts}if(y.isAAC)for(var De=j!==void 0,pe=this.config.maxAudioFramesDrift,Te=0,ye=he;Te<ie.length;Te++){var ue=ie[Te],le=ue.pts,te=le-ye,fe=Math.abs(1e3*te/L);if(te<=-pe*G&&De)Te===0&&(o.logger.warn("Audio frame @ "+(le/L).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*te/L)+" ms."),this.nextAudioPts=he=ye=le);else if(te>=pe*G&&fe<p&&De){var q=Math.round(te/G);ye=le-q*G,ye<0&&(q--,ye+=G),Te===0&&(this.nextAudioPts=he=ye),o.logger.warn("[mp4-remuxer]: Injecting "+q+" audio frame @ "+(ye/L).toFixed(3)+"s due to "+Math.round(1e3*te/L)+" ms gap.");for(var ee=0;ee<q;ee++){var Ce=Math.max(ye,0),re=c.default.getSilentFrame(y.manifestCodec||y.codec,y.channelCount);re||(o.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),re=ue.unit.subarray()),ie.splice(Te,0,{unit:re,pts:Ce}),ye+=G,Te++}}ue.pts=ye,ye+=G}for(var Q=null,X=null,Z,xe=0,ve=ie.length;ve--;)xe+=ie[ve].unit.byteLength;for(var Oe=0,Qe=ie.length;Oe<Qe;Oe++){var rt=ie[Oe],nt=rt.unit,ct=rt.pts;if(X!==null){var dt=V[Oe-1];dt.duration=Math.round((ct-X)/W)}else if(C&&y.isAAC&&(ct=he),Q=ct,xe>0){xe+=ce;try{Z=new Uint8Array(xe)}catch(Ne){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:xe,reason:"fail allocating audio mdat "+xe});return}if(!z){var pt=new DataView(Z.buffer);pt.setUint32(0,xe),Z.set(h.default.types.mdat,4)}}else return;Z.set(nt,ce);var He=nt.byteLength;ce+=He,V.push(new _(!0,U,He,0)),X=ct}var Pe=V.length;if(!Pe)return;var at=V[V.length-1];this.nextAudioPts=he=X+W*at.duration;var ft=z?new Uint8Array(0):h.default.moof(y.sequenceNumber++,Q/W,u({},y,{samples:V}));y.samples=[];var Je=Q/L,st=he/L,Ue="audio",Me={data1:ft,data2:Z,startPTS:Je,endPTS:st,startDTS:Je,endDTS:st,type:Ue,hasAudio:!0,hasVideo:!1,nb:Pe};return this.isAudioContiguous=!0,console.assert(Z.length,"MDAT length must not be zero"),Me},O.remuxEmptyAudio=function(y,E,C,I){var j=y.inputTimeScale,L=y.samplerate?y.samplerate:j,H=j/L,W=this.nextAudioPts,U=(W!==null?W:I.startDTS*j)+this._initDTS,G=I.endDTS*j+this._initDTS,B=H*f,z=Math.ceil((G-U)/B),V=c.default.getSilentFrame(y.manifestCodec||y.codec,y.channelCount);if(o.logger.warn("[mp4-remuxer]: remux empty Audio"),!V){o.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ie=[],ce=0;ce<z;ce++){var he=U+ce*B;ie.push({unit:V,pts:he,dts:he})}return y.samples=ie,this.remuxAudio(y,E,C,!1)},O.remuxID3=function(y,E){var C=y.samples.length;if(!C)return;for(var I=y.inputTimeScale,j=this._initPTS,L=this._initDTS,H=0;H<C;H++){var W=y.samples[H];W.pts=t(W.pts-j,E*I)/I,W.dts=t(W.dts-L,E*I)/I}var U=y.samples;return y.samples=[],{samples:U}},O.remuxText=function(y,E){var C=y.samples.length;if(!C)return;for(var I=y.inputTimeScale,j=this._initPTS,L=0;L<C;L++){var H=y.samples[L];H.pts=t(H.pts-j,E*I)/I}y.samples.sort(function(U,G){return U.pts-G.pts});var W=y.samples;return y.samples=[],{samples:W}},k}();function t(k,O){var x;if(O===null)return k;for(O<k?x=-8589934592:x=8589934592;Math.abs(k-O)>4294967296;)k+=x;return k}function T(k){for(var O=0;O<k.length;O++)if(k[O].key)return O;return-1}var _=function(O,x,y,E){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=x,this.size=y,this.cts=E,this.flags=new l(O)},l=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),c=S("./src/utils/mp4-tools.ts"),h=S("./src/loader/fragment.ts"),w=S("./src/utils/logger.ts"),d=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 u=n.prototype;return u.destroy=function(){},u.resetTimeStamp=function(f){this.initPTS=f,this.lastEndDTS=null},u.resetNextTimestamp=function(){this.lastEndDTS=null},u.resetInitSegment=function(f,v,g){this.audioCodec=v,this.videoCodec=g,this.generateInitSegment(f),this.emitInitSegment=!0},u.generateInitSegment=function(f){var v=this.audioCodec,g=this.videoCodec;if(!f||!f.byteLength){this.initTracks=void 0,this.initData=void 0;return}var b=this.initData=Object(c.parseInitSegment)(f);v||(v=a(b.audio,h.ElementaryStreamTypes.AUDIO)),g||(g=a(b.video,h.ElementaryStreamTypes.VIDEO));var i={};b.audio&&b.video?i.audiovideo={container:"video/mp4",codec:v+","+g,initSegment:f,id:"main"}:b.audio?i.audio={container:"audio/mp4",codec:v,initSegment:f,id:"audio"}:b.video?i.video={container:"video/mp4",codec:g,initSegment:f,id:"main"}:w.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},u.remux=function(f,v,g,b,i){var s=this.initPTS,t=this.lastEndDTS,T={audio:void 0,video:void 0,text:b,id3:g,initSegment:void 0};Object(P.isFiniteNumber)(t)||(t=this.lastEndDTS=i||0);var _=v.samples;if(!_||!_.length)return T;var l={initPTS:void 0,timescale:1},k=this.initData;if((!k||!k.length)&&(this.generateInitSegment(_),k=this.initData),!k||!k.length)return w.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),T;this.emitInitSegment&&(l.tracks=this.initTracks,this.emitInitSegment=!1),Object(P.isFiniteNumber)(s)||(this.initPTS=l.initPTS=s=o(k,_,t));var O=Object(c.getDuration)(_,k),x=t,y=O+x;Object(c.offsetStartDTS)(k,_,s),O>0?this.lastEndDTS=y:(w.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!k.audio,C=!!k.video,I="";E&&(I+="audio"),C&&(I+="video");var j={data1:_,startPTS:x,startDTS:x,endPTS:y,endDTS:y,type:I,hasAudio:E,hasVideo:C,nb:1,dropped:0};return T.audio=j.type==="audio"?j:void 0,T.video=j.type!=="audio"?j:void 0,T.text=b,T.id3=g,T.initSegment=l,T},n}(),o=function(u,p,f){return Object(c.getStartDTS)(u,p)-f};function a(n,u){var p=n==null?void 0:n.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||u===h.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}m.default=d},"./src/task-loop.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function c(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var h=c.prototype;return h.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},h.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},h.onHandlerDestroyed=function(){},h.hasInterval=function(){return!!this._tickInterval},h.hasNextTick=function(){return!!this._tickTimer},h.setInterval=function(d){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,d),!0)},h.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},h.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},h.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},h.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},h.doTick=function(){},c}()},"./src/types/cmcd.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"CMCDVersion",function(){return P}),S.d(m,"CMCDObjectType",function(){return c}),S.d(m,"CMCDStreamingFormat",function(){return h}),S.d(m,"CMCDStreamType",function(){return w});var P=1,c;(function(d){d.MANIFEST="m",d.AUDIO="a",d.VIDEO="v",d.MUXED="av",d.INIT="i",d.CAPTION="c",d.TIMED_TEXT="tt",d.KEY="k",d.OTHER="o"})(c||(c={}));var h;(function(d){d.DASH="d",d.HLS="h",d.SMOOTH="s",d.OTHER="o"})(h||(h={}));var w;(function(d){d.VOD="v",d.LIVE="l"})(w||(w={}))},"./src/types/level.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"HlsSkip",function(){return h}),S.d(m,"getSkipValue",function(){return w}),S.d(m,"HlsUrlParameters",function(){return d}),S.d(m,"Level",function(){return o});function P(a,n){for(var u=0;u<n.length;u++){var p=n[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}function c(a,n,u){return n&&P(a.prototype,n),u&&P(a,u),a}var h;(function(a){a.No="",a.Yes="YES",a.v2="v2"})(h||(h={}));function w(a,n){var u=a.canSkipUntil,p=a.canSkipDateRanges,f=a.endSN,v=n!==void 0?n-f:0;return u&&v<u?p?h.v2:h.Yes:h.No}var d=function(){function a(u,p,f){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=p,this.skip=f}var n=a.prototype;return n.addDirectives=function(p){var f=new self.URL(p);return this.msn!==void 0&&f.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&f.searchParams.set("_HLS_part",this.part.toString()),this.skip&&f.searchParams.set("_HLS_skip",this.skip),f.toString()},a}(),o=function(){function a(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(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return c(a,[{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(u){var p=u%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),a}()},"./src/types/loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"PlaylistContextType",function(){return P}),S.d(m,"PlaylistLevelType",function(){return c});var P;(function(h){h.MANIFEST="manifest",h.LEVEL="level",h.AUDIO_TRACK="audioTrack",h.SUBTITLE_TRACK="subtitleTrack"})(P||(P={}));var c;(function(h){h.MAIN="main",h.AUDIO="audio",h.SUBTITLE="subtitle"})(c||(c={}))},"./src/types/transmuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"ChunkMetadata",function(){return P});var P=function(w,d,o,a,n,u){a===void 0&&(a=0),n===void 0&&(n=-1),u===void 0&&(u=!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=c(),this.buffering={audio:c(),video:c(),audiovideo:c()},this.level=w,this.sn=d,this.id=o,this.size=a,this.part=n,this.partial=u};function c(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"AttrList",function(){return h});var P=/^(\d+)x(\d+)$/,c=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,h=function(){function w(o){typeof o=="string"&&(o=w.parseAttrList(o));for(var a in o)o.hasOwnProperty(a)&&(this[a]=o[a])}var d=w.prototype;return d.decimalInteger=function(a){var n=parseInt(this[a],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},d.hexadecimalInteger=function(a){if(this[a]){var n=(this[a]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var u=new Uint8Array(n.length/2),p=0;p<n.length/2;p++)u[p]=parseInt(n.slice(p*2,p*2+2),16);return u}else return null},d.hexadecimalIntegerAsNumber=function(a){var n=parseInt(this[a],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},d.decimalFloatingPoint=function(a){return parseFloat(this[a])},d.optionalFloat=function(a,n){var u=this[a];return u?parseFloat(u):n},d.enumeratedString=function(a){return this[a]},d.bool=function(a){return this[a]==="YES"},d.decimalResolution=function(a){var n=P.exec(this[a]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},w.parseAttrList=function(a){var n,u={},p='"';for(c.lastIndex=0;(n=c.exec(a))!==null;){var f=n[2];f.indexOf(p)===0&&f.lastIndexOf(p)===f.length-1&&(f=f.slice(1,-1)),u[n[1]]=f}return u},w}()},"./src/utils/binary-search.ts":function(D,m,S){"use strict";S.r(m);var P={search:function(h,w){for(var d=0,o=h.length-1,a=null,n=null;d<=o;){a=(d+o)/2|0,n=h[a];var u=w(n);if(u>0)d=a+1;else if(u<0)o=a-1;else return n}return null}};m.default=P},"./src/utils/buffer-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"BufferHelper",function(){return h});var P=S("./src/utils/logger.ts"),c={length:0,start:function(){return 0},end:function(){return 0}},h=function(){function w(){}return w.isBuffered=function(o,a){try{if(o){for(var n=w.getBuffered(o),u=0;u<n.length;u++)if(a>=n.start(u)&&a<=n.end(u))return!0}}catch(p){}return!1},w.bufferInfo=function(o,a,n){try{if(o){var u=w.getBuffered(o),p=[],f;for(f=0;f<u.length;f++)p.push({start:u.start(f),end:u.end(f)});return this.bufferedInfo(p,a,n)}}catch(v){}return{len:0,start:a,end:a,nextStart:void 0}},w.bufferedInfo=function(o,a,n){a=Math.max(0,a),o.sort(function(l,k){var O=l.start-k.start;return O||k.end-l.end});var u=[];if(n)for(var p=0;p<o.length;p++){var f=u.length;if(f){var v=u[f-1].end;o[p].start-v<n?o[p].end>v&&(u[f-1].end=o[p].end):u.push(o[p])}else u.push(o[p])}else u=o;for(var g=0,b,i=a,s=a,t=0;t<u.length;t++){var T=u[t].start,_=u[t].end;if(a+n>=T&&a<_)i=T,s=_,g=s-a;else if(a+n<T){b=T;break}}return{len:g,start:i||0,end:s||0,nextStart:b}},w.getBuffered=function(o){try{return o.buffered}catch(a){return P.logger.log("failed to get media.buffered",a),c}},w}()},"./src/utils/cea-608-parser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"Row",function(){return s}),S.d(m,"CaptionScreen",function(){return t});var P=S("./src/utils/logger.ts"),c={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},h=function(y){var E=y;return c.hasOwnProperty(y)&&(E=c[y]),String.fromCharCode(E)},w=15,d=100,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},a={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},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f;(function(x){x[x.ERROR=0]="ERROR",x[x.TEXT=1]="TEXT",x[x.WARNING=2]="WARNING",x[x.INFO=2]="INFO",x[x.DEBUG=3]="DEBUG",x[x.DATA=3]="DATA"})(f||(f={}));var v=function(){function x(){this.time=null,this.verboseLevel=f.ERROR}var y=x.prototype;return y.log=function(C,I){this.verboseLevel>=C&&P.logger.log(this.time+" ["+C+"] "+I)},x}(),g=function(y){for(var E=[],C=0;C<y.length;C++)E.push(y[C].toString(16));return E},b=function(){function x(E,C,I,j,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=C||!1,this.italics=I||!1,this.background=j||"black",this.flash=L||!1}var y=x.prototype;return y.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},y.setStyles=function(C){for(var I=["foreground","underline","italics","background","flash"],j=0;j<I.length;j++){var L=I[j];C.hasOwnProperty(L)&&(this[L]=C[L])}},y.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},y.equals=function(C){return this.foreground===C.foreground&&this.underline===C.underline&&this.italics===C.italics&&this.background===C.background&&this.flash===C.flash},y.copy=function(C){this.foreground=C.foreground,this.underline=C.underline,this.italics=C.italics,this.background=C.background,this.flash=C.flash},y.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},x}(),i=function(){function x(E,C,I,j,L,H){this.uchar=void 0,this.penState=void 0,this.uchar=E||" ",this.penState=new b(C,I,j,L,H)}var y=x.prototype;return y.reset=function(){this.uchar=" ",this.penState.reset()},y.setChar=function(C,I){this.uchar=C,this.penState.copy(I)},y.setPenState=function(C){this.penState.copy(C)},y.equals=function(C){return this.uchar===C.uchar&&this.penState.equals(C.penState)},y.copy=function(C){this.uchar=C.uchar,this.penState.copy(C.penState)},y.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},x}(),s=function(){function x(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 C=0;C<d;C++)this.chars.push(new i);this.logger=E,this.pos=0,this.currPenState=new b}var y=x.prototype;return y.equals=function(C){for(var I=!0,j=0;j<d;j++)if(!this.chars[j].equals(C.chars[j])){I=!1;break}return I},y.copy=function(C){for(var I=0;I<d;I++)this.chars[I].copy(C.chars[I])},y.isEmpty=function(){for(var C=!0,I=0;I<d;I++)if(!this.chars[I].isEmpty()){C=!1;break}return C},y.setCursor=function(C){this.pos!==C&&(this.pos=C),this.pos<0?(this.logger.log(f.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>d&&(this.logger.log(f.DEBUG,"Too large cursor position "+this.pos),this.pos=d)},y.moveCursor=function(C){var I=this.pos+C;if(C>1)for(var j=this.pos+1;j<I+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(I)},y.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},y.insertChar=function(C){C>=144&&this.backSpace();var I=h(C);if(this.pos>=d){this.logger.log(f.ERROR,"Cannot insert "+C.toString(16)+" ("+I+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(I,this.currPenState),this.moveCursor(1)},y.clearFromPos=function(C){var I;for(I=C;I<d;I++)this.chars[I].reset()},y.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},y.clearToEndOfRow=function(){this.clearFromPos(this.pos)},y.getTextString=function(){for(var C=[],I=!0,j=0;j<d;j++){var L=this.chars[j].uchar;L!==" "&&(I=!1),C.push(L)}return I?"":C.join("")},y.setPenStyles=function(C){this.currPenState.setStyles(C);var I=this.chars[this.pos];I.setPenState(this.currPenState)},x}(),t=function(){function x(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 C=0;C<w;C++)this.rows.push(new s(E));this.logger=E,this.currRow=w-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var y=x.prototype;return y.reset=function(){for(var C=0;C<w;C++)this.rows[C].clear();this.currRow=w-1},y.equals=function(C){for(var I=!0,j=0;j<w;j++)if(!this.rows[j].equals(C.rows[j])){I=!1;break}return I},y.copy=function(C){for(var I=0;I<w;I++)this.rows[I].copy(C.rows[I])},y.isEmpty=function(){for(var C=!0,I=0;I<w;I++)if(!this.rows[I].isEmpty()){C=!1;break}return C},y.backSpace=function(){var C=this.rows[this.currRow];C.backSpace()},y.clearToEndOfRow=function(){var C=this.rows[this.currRow];C.clearToEndOfRow()},y.insertChar=function(C){var I=this.rows[this.currRow];I.insertChar(C)},y.setPen=function(C){var I=this.rows[this.currRow];I.setPenStyles(C)},y.moveCursor=function(C){var I=this.rows[this.currRow];I.moveCursor(C)},y.setCursor=function(C){this.logger.log(f.INFO,"setCursor: "+C);var I=this.rows[this.currRow];I.setCursor(C)},y.setPAC=function(C){this.logger.log(f.INFO,"pacData = "+JSON.stringify(C));var I=C.row-1;if(this.nrRollUpRows&&I<this.nrRollUpRows-1&&(I=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==I){for(var j=0;j<w;j++)this.rows[j].clear();var L=this.currRow+1-this.nrRollUpRows,H=this.lastOutputScreen;if(H){var W=H.rows[L].cueStartTime,U=this.logger.time;if(W&&U!==null&&W<U)for(var G=0;G<this.nrRollUpRows;G++)this.rows[I-this.nrRollUpRows+G+1].copy(H.rows[L+G])}}this.currRow=I;var B=this.rows[this.currRow];if(C.indent!==null){var z=C.indent,V=Math.max(z-1,0);B.setCursor(C.indent),C.color=B.chars[V].penState.foreground}var ie={foreground:C.color,underline:C.underline,italics:C.italics,background:"black",flash:!1};this.setPen(ie)},y.setBkgData=function(C){this.logger.log(f.INFO,"bkgData = "+JSON.stringify(C)),this.backSpace(),this.setPen(C),this.insertChar(32)},y.setRollUpRows=function(C){this.nrRollUpRows=C},y.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(f.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(f.TEXT,this.getDisplayText());var C=this.currRow+1-this.nrRollUpRows,I=this.rows.splice(C,1)[0];I.clear(),this.rows.splice(this.currRow,0,I),this.logger.log(f.INFO,"Rolling up")},y.getDisplayText=function(C){C=C||!1;for(var I=[],j="",L=-1,H=0;H<w;H++){var W=this.rows[H].getTextString();W&&(L=H+1,C?I.push("Row "+L+": '"+W+"'"):I.push(W.trim()))}return I.length>0&&(C?j="["+I.join(" | ")+"]":j=I.join(`
`)),j},y.getTextAndFormat=function(){return this.rows},x}(),T=function(){function x(E,C,I){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=C,this.mode=null,this.verbose=0,this.displayedMemory=new t(I),this.nonDisplayedMemory=new t(I),this.lastOutputScreen=new t(I),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=I}var y=x.prototype;return y.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},y.getHandler=function(){return this.outputFilter},y.setHandler=function(C){this.outputFilter=C},y.setPAC=function(C){this.writeScreen.setPAC(C)},y.setBkgData=function(C){this.writeScreen.setBkgData(C)},y.setMode=function(C){if(C===this.mode)return;this.mode=C,this.logger.log(f.INFO,"MODE="+C),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=C},y.insertChars=function(C){for(var I=0;I<C.length;I++)this.writeScreen.insertChar(C[I]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(f.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(f.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},y.ccRCL=function(){this.logger.log(f.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},y.ccBS=function(){if(this.logger.log(f.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},y.ccAOF=function(){},y.ccAON=function(){},y.ccDER=function(){this.logger.log(f.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},y.ccRU=function(C){this.logger.log(f.INFO,"RU("+C+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(C)},y.ccFON=function(){this.logger.log(f.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},y.ccRDC=function(){this.logger.log(f.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},y.ccTR=function(){this.logger.log(f.INFO,"TR"),this.setMode("MODE_TEXT")},y.ccRTD=function(){this.logger.log(f.INFO,"RTD"),this.setMode("MODE_TEXT")},y.ccEDM=function(){this.logger.log(f.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},y.ccCR=function(){this.logger.log(f.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},y.ccENM=function(){this.logger.log(f.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},y.ccEOC=function(){if(this.logger.log(f.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var C=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=C,this.writeScreen=this.nonDisplayedMemory,this.logger.log(f.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},y.ccTO=function(C){this.logger.log(f.INFO,"TO("+C+") - Tab Offset"),this.writeScreen.moveCursor(C)},y.ccMIDROW=function(C){var I={flash:!1};if(I.underline=C%2===1,I.italics=C>=46,I.italics)I.foreground="white";else{var j=Math.floor(C/2)-16,L=["white","green","blue","cyan","red","yellow","magenta"];I.foreground=L[j]}this.logger.log(f.INFO,"MIDROW: "+JSON.stringify(I)),this.writeScreen.setPen(I)},y.outputDataUpdate=function(C){C===void 0&&(C=!1);var I=this.logger.time;if(I===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=I:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,I,this.lastOutputScreen),C&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:I),this.lastOutputScreen.copy(this.displayedMemory))},y.cueSplitAtTime=function(C){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,C,this.displayedMemory),this.cueStartTime=C))},x}(),_=function(){function x(E,C,I){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new v;this.channels=[null,new T(E,C,j),new T(E+1,I,j)],this.cmdHistory=O(),this.logger=j}var y=x.prototype;return y.getHandler=function(C){return this.channels[C].getHandler()},y.setHandler=function(C,I){this.channels[C].setHandler(I)},y.addData=function(C,I){var j,L,H,W=!1;this.logger.time=C;for(var U=0;U<I.length;U+=2){if(L=I[U]&127,H=I[U+1]&127,L===0&&H===0)continue;if(this.logger.log(f.DATA,"["+g([I[U],I[U+1]])+"] -> ("+g([L,H])+")"),j=this.parseCmd(L,H),j||(j=this.parseMidrow(L,H)),j||(j=this.parsePAC(L,H)),j||(j=this.parseBackgroundAttributes(L,H)),!j&&(W=this.parseChars(L,H),W)){var G=this.currentChannel;if(G&&G>0){var B=this.channels[G];B.insertChars(W)}else this.logger.log(f.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!W&&this.logger.log(f.WARNING,"Couldn't parse cleaned data "+g([L,H])+" orig: "+g([I[U],I[U+1]]))}},y.parseCmd=function(C,I){var j=this.cmdHistory,L=(C===20||C===28||C===21||C===29)&&I>=32&&I<=47,H=(C===23||C===31)&&I>=33&&I<=35;if(!(L||H))return!1;if(k(C,I,j))return l(null,null,j),this.logger.log(f.DEBUG,"Repeated command ("+g([C,I])+") is dropped"),!0;var W=C===20||C===21||C===23?1:2,U=this.channels[W];return C===20||C===21||C===28||C===29?I===32?U.ccRCL():I===33?U.ccBS():I===34?U.ccAOF():I===35?U.ccAON():I===36?U.ccDER():I===37?U.ccRU(2):I===38?U.ccRU(3):I===39?U.ccRU(4):I===40?U.ccFON():I===41?U.ccRDC():I===42?U.ccTR():I===43?U.ccRTD():I===44?U.ccEDM():I===45?U.ccCR():I===46?U.ccENM():I===47&&U.ccEOC():U.ccTO(I-32),l(C,I,j),this.currentChannel=W,!0},y.parseMidrow=function(C,I){var j=0;if((C===17||C===25)&&I>=32&&I<=47){if(C===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(f.ERROR,"Mismatch channel in midrow parsing"),!1;var L=this.channels[j];return L?(L.ccMIDROW(I),this.logger.log(f.DEBUG,"MIDROW ("+g([C,I])+")"),!0):!1}return!1},y.parsePAC=function(C,I){var j,L=this.cmdHistory,H=(C>=17&&C<=23||C>=25&&C<=31)&&I>=64&&I<=127,W=(C===16||C===24)&&I>=64&&I<=95;if(!(H||W))return!1;if(k(C,I,L))return l(null,null,L),!0;var U=C<=23?1:2;I>=64&&I<=95?j=U===1?o[C]:n[C]:j=U===1?a[C]:u[C];var G=this.channels[U];return G?(G.setPAC(this.interpretPAC(j,I)),l(C,I,L),this.currentChannel=U,!0):!1},y.interpretPAC=function(C,I){var j,L={color:null,italics:!1,indent:null,underline:!1,row:C};return I>95?j=I-96:j=I-64,L.underline=(j&1)===1,j<=13?L.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(L.italics=!0,L.color="white"):L.indent=Math.floor((j-16)/2)*4,L},y.parseChars=function(C,I){var j,L=null,H=null;if(C>=25?(j=2,H=C-8):(j=1,H=C),H>=17&&H<=19){var W;H===17?W=I+80:H===18?W=I+112:W=I+144,this.logger.log(f.INFO,"Special char '"+h(W)+"' in channel "+j),L=[W]}else C>=32&&C<=127&&(L=I===0?[C]:[C,I]);if(L){var U=g(L);this.logger.log(f.DEBUG,"Char codes = "+U.join(",")),l(C,I,this.cmdHistory)}return L},y.parseBackgroundAttributes=function(C,I){var j=(C===16||C===24)&&I>=32&&I<=47,L=(C===23||C===31)&&I>=45&&I<=47;if(!(j||L))return!1;var H,W={};C===16||C===24?(H=Math.floor((I-32)/2),W.background=p[H],I%2===1&&(W.background=W.background+"_semi")):I===45?W.background="transparent":(W.foreground="black",I===47&&(W.underline=!0));var U=C<=23?1:2,G=this.channels[U];return G.setBkgData(W),l(C,I,this.cmdHistory),!0},y.reset=function(){for(var C=0;C<Object.keys(this.channels).length;C++){var I=this.channels[C];I&&I.reset()}this.cmdHistory=O()},y.cueSplitAtTime=function(C){for(var I=0;I<this.channels.length;I++){var j=this.channels[I];j&&j.cueSplitAtTime(C)}},x}();function l(x,y,E){E.a=x,E.b=y}function k(x,y,E){return E.a===x&&E.b===y}function O(){return{a:null,b:null}}m.default=_},"./src/utils/codecs.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isCodecType",function(){return c}),S.d(m,"isCodecSupportedInMp4",function(){return h});var P={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 c(w,d){var o=P[d];return!!o&&o[w.slice(0,4)]===!0}function h(w,d){return MediaSource.isTypeSupported((d||"video")+'/mp4;codecs="'+w+'"')}},"./src/utils/cues.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/vttparser.ts"),c=S("./src/utils/webvtt-parser.ts"),h=S("./src/utils/texttrack-utils.ts"),w=/\s/,d={newCue:function(a,n,u,p){for(var f=[],v,g,b,i,s,t=self.VTTCue||self.TextTrackCue,T=0;T<p.rows.length;T++)if(v=p.rows[T],b=!0,i=0,s="",!v.isEmpty()){for(var _=0;_<v.chars.length;_++)w.test(v.chars[_].uchar)&&b?i++:(s+=v.chars[_].uchar,b=!1);v.cueStartTime=n,n===u&&(u+=1e-4),i>=16?i--:i++;var l=Object(P.fixLineBreaks)(s.trim()),k=Object(c.generateCueId)(n,u,l);(!a||!a.cues||!a.cues.getCueById(k))&&(g=new t(n,u,l),g.id=k,g.line=T+1,g.align="left",g.position=10+Math.min(80,Math.floor(i*8/32)*10),f.push(g))}return a&&f.length&&(f.sort(function(O,x){return O.line==="auto"||x.line==="auto"?0:O.line>8&&x.line>8?x.line-O.line:O.line-x.line}),f.forEach(function(O){return Object(h.addCueToTrack)(a,O)})),f}};m.default=d},"./src/utils/discontinuities.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"findFirstFragWithCC",function(){return w}),S.d(m,"shouldAlignOnDiscontinuities",function(){return d}),S.d(m,"findDiscontinuousReferenceFrag",function(){return o}),S.d(m,"adjustSlidingStart",function(){return n}),S.d(m,"alignStream",function(){return u}),S.d(m,"alignPDT",function(){return f}),S.d(m,"alignFragmentByPDTDelta",function(){return v}),S.d(m,"alignMediaPlaylistByPDT",function(){return g});var P=S("./src/polyfills/number.ts"),c=S("./src/utils/logger.ts"),h=S("./src/controller/level-helper.ts");function w(b,i){for(var s=null,t=0,T=b.length;t<T;t++){var _=b[t];if(_&&_.cc===i){s=_;break}}return s}function d(b,i,s){return!!(i.details&&(s.endCC>s.startCC||b&&b.cc<s.startCC))}function o(b,i){var s=b.fragments,t=i.fragments;if(!t.length||!s.length){c.logger.log("No fragments to align");return}var T=w(s,t[0].cc);if(!T||T&&!T.startPTS){c.logger.log("No frag in previous level to align on");return}return T}function a(b,i){if(b){var s=b.start+i;b.start=b.startPTS=s,b.endPTS=s+b.duration}}function n(b,i){for(var s=i.fragments,t=0,T=s.length;t<T;t++)a(s[t],b);i.fragmentHint&&a(i.fragmentHint,b),i.alignedSliding=!0}function u(b,i,s){if(!i)return;p(b,s,i),!s.alignedSliding&&i.details&&f(s,i.details),!s.alignedSliding&&i.details&&!s.skippedSegments&&Object(h.adjustSliding)(i.details,s)}function p(b,i,s){if(d(b,s,i)){var t=o(s.details,i);t&&Object(P.isFiniteNumber)(t.start)&&(c.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),n(t.start,i))}}function f(b,i){if(!i.fragments.length||!b.hasProgramDateTime||!i.hasProgramDateTime)return;var s=i.fragments[0].programDateTime,t=b.fragments[0].programDateTime,T=(t-s)/1e3+i.fragments[0].start;T&&Object(P.isFiniteNumber)(T)&&(c.logger.log("Adjusting PTS using programDateTime delta "+(t-s)+"ms, sliding:"+T.toFixed(3)+" "+b.url+" "),n(T,b))}function v(b,i){var s=b.programDateTime;if(!s)return;var t=(s-i)/1e3;b.start=b.startPTS=t,b.endPTS=t+b.duration}function g(b,i){if(!i.fragments.length||!b.hasProgramDateTime||!i.hasProgramDateTime)return;var s=i.fragments[0].programDateTime,t=i.fragments[0].start,T=s-t*1e3;b.fragments.forEach(function(_){v(_,T)}),b.fragmentHint&&v(b.fragmentHint,T),b.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/ewma.ts"),c=function(){function h(d,o,a){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=a,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new P.default(d),this.fast_=new P.default(o)}var w=h.prototype;return w.update=function(o,a){var n=this.slow_,u=this.fast_;this.slow_.halfLife!==o&&(this.slow_=new P.default(o,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==a&&(this.fast_=new P.default(a,u.getEstimate(),u.getTotalWeight()))},w.sample=function(o,a){o=Math.max(o,this.minDelayMs_);var n=8*a,u=o/1e3,p=n/u;this.fast_.sample(u,p),this.slow_.sample(u,p)},w.canEstimate=function(){var o=this.fast_;return o&&o.getTotalWeight()>=this.minWeight_},w.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},w.destroy=function(){},h}();m.default=c},"./src/utils/ewma.ts":function(D,m,S){"use strict";S.r(m);var P=function(){function c(w,d,o){d===void 0&&(d=0),o===void 0&&(o=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=w,this.alpha_=w?Math.exp(Math.log(.5)/w):0,this.estimate_=d,this.totalWeight_=o}var h=c.prototype;return h.sample=function(d,o){var a=Math.pow(this.alpha_,d);this.estimate_=o*(1-a)+a*this.estimate_,this.totalWeight_+=d},h.getTotalWeight=function(){return this.totalWeight_},h.getEstimate=function(){if(this.alpha_){var d=1-Math.pow(this.alpha_,this.totalWeight_);if(d)return this.estimate_/d}return this.estimate_},c}();m.default=P},"./src/utils/fetch-loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"fetchSupported",function(){return v});var P=S("./src/polyfills/number.ts"),c=S("./src/loader/load-stats.ts"),h=S("./src/demux/chunk-cache.ts");function w(t,T){t.prototype=Object.create(T.prototype),t.prototype.constructor=t,u(t,T)}function d(t){var T=typeof Map=="function"?new Map:void 0;return d=function(l){if(l===null||!n(l))return l;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(l))return T.get(l);T.set(l,k)}function k(){return o(l,arguments,p(this).constructor)}return k.prototype=Object.create(l.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),u(k,l)},d(t)}function o(t,T,_){return a()?o=Reflect.construct:o=function(k,O,x){var y=[null];y.push.apply(y,O);var E=Function.bind.apply(k,y),C=new E;return x&&u(C,x.prototype),C},o.apply(null,arguments)}function a(){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 u(t,T){return u=Object.setPrototypeOf||function(l,k){return l.__proto__=k,l},u(t,T)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},p(t)}function f(){return f=Object.assign||function(t){for(var T=1;T<arguments.length;T++){var _=arguments[T];for(var l in _)Object.prototype.hasOwnProperty.call(_,l)&&(t[l]=_[l])}return t},f.apply(this,arguments)}function v(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var g=function(){function t(_){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=_.fetchSetup||i,this.controller=new self.AbortController,this.stats=new c.LoadStats}var T=t.prototype;return T.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},T.abortInternal=function(){var l=this.response;(!l||!l.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var l;this.abortInternal(),(l=this.callbacks)!==null&&l!==void 0&&l.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(l,k,O){var x=this,y=this.stats;if(y.loading.start)throw new Error("Loader can only be used once.");y.loading.start=self.performance.now();var E=b(l,this.controller.signal),C=O.onProgress,I=l.responseType==="arraybuffer",j=I?"byteLength":"length";this.context=l,this.config=k,this.callbacks=O,this.request=this.fetchSetup(l,E),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){x.abortInternal(),O.onTimeout(y,l,x.response)},k.timeout),self.fetch(this.request).then(function(L){if(x.response=x.loader=L,!L.ok){var H=L.status,W=L.statusText;throw new s(W||"fetch, bad network response",H,L)}return y.loading.first=Math.max(self.performance.now(),y.loading.start),y.total=parseInt(L.headers.get("Content-Length")||"0"),C&&Object(P.isFiniteNumber)(k.highWaterMark)?x.loadProgressively(L,y,l,k.highWaterMark,C):I?L.arrayBuffer():L.text()}).then(function(L){var H=x.response;self.clearTimeout(x.requestTimeout),y.loading.end=Math.max(self.performance.now(),y.loading.first),y.loaded=y.total=L[j];var W={url:H.url,data:L};C&&!Object(P.isFiniteNumber)(k.highWaterMark)&&C(y,l,L,H),O.onSuccess(W,y,l,H)}).catch(function(L){if(self.clearTimeout(x.requestTimeout),y.aborted)return;var H=L.code||0;O.onError({code:H,text:L.message},l,L.details)})},T.getCacheAge=function(){var l=null;if(this.response){var k=this.response.headers.get("age");l=k?parseFloat(k):null}return l},T.loadProgressively=function(l,k,O,x,y){x===void 0&&(x=0);var E=new h.default,C=l.body.getReader(),I=function j(){return C.read().then(function(L){if(L.done)return E.dataLength&&y(k,O,E.flush(),l),Promise.resolve(new ArrayBuffer(0));var H=L.value,W=H.length;return k.loaded+=W,W<x||E.dataLength?(E.push(H),E.dataLength>=x&&y(k,O,E.flush(),l)):y(k,O,H,l),j()}).catch(function(){return Promise.reject()})};return I()},t}();function b(t,T){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(f({},t.headers))};return t.rangeEnd&&_.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),_}function i(t,T){return new self.Request(t.url,T)}var s=function(t){w(T,t);function T(_,l,k){var O;return O=t.call(this,_)||this,O.code=void 0,O.details=void 0,O.code=l,O.details=k,O}return T}(d(Error));m.default=g},"./src/utils/imsc1-ttml-parser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"IMSC1_CODEC",function(){return n}),S.d(m,"parseIMSC1",function(){return v});var P=S("./src/utils/mp4-tools.ts"),c=S("./src/utils/vttparser.ts"),h=S("./src/utils/vttcue.ts"),w=S("./src/demux/id3.ts"),d=S("./src/utils/timescale-conversion.ts"),o=S("./src/utils/webvtt-parser.ts");function a(){return a=Object.assign||function(x){for(var y=1;y<arguments.length;y++){var E=arguments[y];for(var C in E)Object.prototype.hasOwnProperty.call(E,C)&&(x[C]=E[C])}return x},a.apply(this,arguments)}var n="stpp.ttml.im1t",u=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function v(x,y,E,C,I){var j=Object(P.findBox)(new Uint8Array(x),["mdat"]);if(j.length===0){I(new Error("Could not parse IMSC1 mdat"));return}var L=j[0],H=Object(w.utf8ArrayToStr)(new Uint8Array(x,L.start,L.end-L.start)),W=Object(d.toTimescaleFromScale)(y,1,E);try{C(g(H,W))}catch(U){I(U)}}function g(x,y){var E=new DOMParser,C=E.parseFromString(x,"text/xml"),I=C.getElementsByTagName("tt")[0];if(!I)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},L=Object.keys(j).reduce(function(B,z){return B[z]=I.getAttribute("ttp:"+z)||j[z],B},{}),H=I.getAttribute("xml:space")!=="preserve",W=i(b(I,"styling","style")),U=i(b(I,"layout","region")),G=b(I,"body","[begin]");return[].map.call(G,function(B){var z=s(B,H);if(!z||!B.hasAttribute("begin"))return null;var V=l(B.getAttribute("begin"),L),ie=l(B.getAttribute("dur"),L),ce=l(B.getAttribute("end"),L);if(V===null)throw _(B);if(ce===null){if(ie===null)throw _(B);ce=V+ie}var he=new h.default(V-y,ce-y,z);he.id=Object(o.generateCueId)(he.startTime,he.endTime,he.text);var Ae=U[B.getAttribute("region")],De=W[B.getAttribute("style")];he.position=10,he.size=80;var pe=t(Ae,De),Te=pe.textAlign;if(Te){var ye=f[Te];ye&&(he.lineAlign=ye),he.align=Te}return a(he,pe),he}).filter(function(B){return B!==null})}function b(x,y,E){var C=x.getElementsByTagName(y)[0];return C?[].slice.call(C.querySelectorAll(E)):[]}function i(x){return x.reduce(function(y,E){var C=E.getAttribute("xml:id");return C&&(y[C]=E),y},{})}function s(x,y){return[].slice.call(x.childNodes).reduce(function(E,C,I){var j;return C.nodeName==="br"&&I?E+`
`:(j=C.childNodes)!==null&&j!==void 0&&j.length?s(C,y):y?E+C.textContent.trim().replace(/\s+/g," "):E+C.textContent},"")}function t(x,y){var E="http://www.w3.org/ns/ttml#styling",C=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return C.reduce(function(I,j){var L=T(y,E,j)||T(x,E,j);return L&&(I[j]=L),I},{})}function T(x,y,E){return x.hasAttributeNS(y,E)?x.getAttributeNS(y,E):null}function _(x){return new Error("Could not parse ttml timestamp "+x)}function l(x,y){if(!x)return null;var E=Object(c.parseTimeStamp)(x);return E===null&&(u.test(x)?E=k(x,y):p.test(x)&&(E=O(x,y))),E}function k(x,y){var E=u.exec(x),C=(E[4]|0)+(E[5]|0)/y.subFrameRate;return(E[1]|0)*3600+(E[2]|0)*60+(E[3]|0)+C/y.frameRate}function O(x,y){var E=p.exec(x),C=Number(E[1]),I=E[2];switch(I){case"h":return C*3600;case"m":return C*60;case"ms":return C*1e3;case"f":return C/y.frameRate;case"t":return C/y.tickRate}return C}},"./src/utils/logger.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"enableLogs",function(){return o}),S.d(m,"logger",function(){return a});var P=function(){},c={trace:P,debug:P,log:P,warn:P,info:P,error:P},h=c;function w(n){var u=self.console[n];return u?u.bind(self.console,"["+n+"] >"):P}function d(n){for(var u=arguments.length,p=new Array(u>1?u-1:0),f=1;f<u;f++)p[f-1]=arguments[f];p.forEach(function(v){h[v]=n[v]?n[v].bind(n):w(v)})}function o(n){if(self.console&&n===!0||typeof n=="object"){d(n,"debug","log","info","warn","error");try{h.log()}catch(u){h=c}}else h=c}var a=h},"./src/utils/mediakeys-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"KeySystems",function(){return P}),S.d(m,"requestMediaKeySystemAccess",function(){return c});var P;(function(h){h.WIDEVINE="com.widevine.alpha",h.PLAYREADY="com.microsoft.playready"})(P||(P={}));var c=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"getMediaSource",function(){return P});function P(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"bin2str",function(){return d}),S.d(m,"readUint16",function(){return o}),S.d(m,"readUint32",function(){return a}),S.d(m,"writeUint32",function(){return n}),S.d(m,"findBox",function(){return u}),S.d(m,"parseSegmentIndex",function(){return p}),S.d(m,"parseInitSegment",function(){return f}),S.d(m,"getStartDTS",function(){return v}),S.d(m,"getDuration",function(){return g}),S.d(m,"computeRawDurationFromSamples",function(){return b}),S.d(m,"offsetStartDTS",function(){return i}),S.d(m,"segmentValidRange",function(){return s}),S.d(m,"appendUint8Array",function(){return t});var P=S("./src/utils/typed-array.ts"),c=S("./src/loader/fragment.ts"),h=Math.pow(2,32)-1,w=[].push;function d(T){return String.fromCharCode.apply(null,T)}function o(T,_){"data"in T&&(_+=T.start,T=T.data);var l=T[_]<<8|T[_+1];return l<0?65536+l:l}function a(T,_){"data"in T&&(_+=T.start,T=T.data);var l=T[_]<<24|T[_+1]<<16|T[_+2]<<8|T[_+3];return l<0?4294967296+l:l}function n(T,_,l){"data"in T&&(_+=T.start,T=T.data),T[_]=l>>24,T[_+1]=l>>16&255,T[_+2]=l>>8&255,T[_+3]=l&255}function u(T,_){var l=[];if(!_.length)return l;var k,O,x;"data"in T?(k=T.data,O=T.start,x=T.end):(k=T,O=0,x=k.byteLength);for(var y=O;y<x;){var E=a(k,y),C=d(k.subarray(y+4,y+8)),I=E>1?y+E:x;if(C===_[0])if(_.length===1)l.push({data:k,start:y+8,end:I});else{var j=u({data:k,start:y+8,end:I},_.slice(1));j.length&&w.apply(l,j)}y=I}return l}function p(T){var _=u(T,["moov"]),l=_[0],k=l?l.end:null,O=u(T,["sidx"]);if(!O||!O[0])return null;var x=[],y=O[0],E=y.data[0],C=E===0?8:16,I=a(y,C);C+=4;var j=0,L=0;E===0?C+=8:C+=16,C+=2;var H=y.end+L,W=o(y,C);C+=2;for(var U=0;U<W;U++){var G=C,B=a(y,G);G+=4;var z=B&2147483647,V=(B&2147483648)>>>31;if(V===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ie=a(y,G);G+=4,x.push({referenceSize:z,subsegmentDuration:ie,info:{duration:ie/I,start:H,end:H+z-1}}),H+=z,G+=4,C=G}return{earliestPresentationTime:j,timescale:I,version:E,referencesCount:W,references:x,moovEndOffset:k}}function f(T){for(var _=[],l=u(T,["moov","trak"]),k=0;k<l.length;k++){var O=l[k],x=u(O,["tkhd"])[0];if(x){var y=x.data[x.start],E=y===0?12:20,C=a(x,E),I=u(O,["mdia","mdhd"])[0];if(I){y=I.data[I.start],E=y===0?12:20;var j=a(I,E),L=u(O,["mdia","hdlr"])[0];if(L){var H=d(L.data.subarray(L.start+8,L.start+12)),W={soun:c.ElementaryStreamTypes.AUDIO,vide:c.ElementaryStreamTypes.VIDEO}[H];if(W){var U=u(O,["mdia","minf","stbl","stsd"])[0],G=void 0;U&&(G=d(U.data.subarray(U.start+12,U.start+16))),_[C]={timescale:j,type:W},_[W]={timescale:j,id:C,codec:G}}}}}}var B=u(T,["moov","mvex","trex"]);return B.forEach(function(z){var V=a(z,4),ie=_[V];ie&&(ie.default={duration:a(z,12),flags:a(z,20)})}),_}function v(T,_){return u(_,["moof","traf"]).reduce(function(l,k){var O=u(k,["tfdt"])[0],x=O.data[O.start],y=u(k,["tfhd"]).reduce(function(E,C){var I=a(C,4),j=T[I];if(j){var L=a(O,4);x===1&&(L*=Math.pow(2,32),L+=a(O,8));var H=j.timescale||9e4,W=L/H;if(isFinite(W)&&(E===null||W<E))return W}return E},null);return y!==null&&isFinite(y)&&(l===null||y<l)?y:l},null)||0}function g(T,_){for(var l=0,k=0,O=0,x=u(T,["moof","traf"]),y=0;y<x.length;y++){var E=x[y],C=u(E,["tfhd"])[0],I=a(C,4),j=_[I];if(!j)continue;var L=j.default,H=a(C,0)|(L==null?void 0:L.flags),W=L==null?void 0:L.duration;H&8&&(H&2?W=a(C,12):W=a(C,8));for(var U=j.timescale||9e4,G=u(E,["trun"]),B=0;B<G.length;B++){if(W){var z=a(G[B],4);l=W*z}else l=b(G[B]);j.type===c.ElementaryStreamTypes.VIDEO?k+=l/U:j.type===c.ElementaryStreamTypes.AUDIO&&(O+=l/U)}}if(k===0&&O===0){var V=p(T);if(V!=null&&V.references)return V.references.reduce(function(ie,ce){return ie+ce.info.duration||0},0)}return k||O}function b(T){var _=a(T,0),l=8;_&1&&(l+=4),_&4&&(l+=4);for(var k=0,O=a(T,4),x=0;x<O;x++){if(_&256){var y=a(T,l);k+=y,l+=4}_&512&&(l+=4),_&1024&&(l+=4),_&2048&&(l+=4)}return k}function i(T,_,l){u(_,["moof","traf"]).forEach(function(k){u(k,["tfhd"]).forEach(function(O){var x=a(O,4),y=T[x];if(!y)return;var E=y.timescale||9e4;u(k,["tfdt"]).forEach(function(C){var I=C.data[C.start],j=a(C,4);if(I===0)n(C,4,j-l*E);else{j*=Math.pow(2,32),j+=a(C,8),j-=l*E,j=Math.max(j,0);var L=Math.floor(j/(h+1)),H=Math.floor(j%(h+1));n(C,4,L),n(C,8,H)}})})})}function s(T){var _={valid:null,remainder:null},l=u(T,["moof"]);if(l){if(l.length<2)return _.remainder=T,_}else return _;var k=l[l.length-1];return _.valid=Object(P.sliceUint8)(T,0,k.start-8),_.remainder=Object(P.sliceUint8)(T,k.start-8),_}function t(T,_){var l=new Uint8Array(T.length+_.length);return l.set(T),l.set(_,T.length),l}},"./src/utils/output-filter.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function c(w,d){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=w,this.trackName=d}var h=c.prototype;return h.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},h.newCue=function(d,o,a){(this.startTime===null||this.startTime>d)&&(this.startTime=d),this.endTime=o,this.screen=a,this.timelineController.createCaptionsTrack(this.trackName)},h.reset=function(){this.cueRanges=[]},c}()},"./src/utils/texttrack-utils.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"sendAddTrackEvent",function(){return c}),S.d(m,"addCueToTrack",function(){return h}),S.d(m,"clearCurrentCues",function(){return w}),S.d(m,"removeCuesInRange",function(){return d}),S.d(m,"getCuesInRange",function(){return a});var P=S("./src/utils/logger.ts");function c(n,u){var p;try{p=new Event("addtrack")}catch(f){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=n,u.dispatchEvent(p)}function h(n,u){var p=n.mode;if(p==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(u.id))try{if(n.addCue(u),!n.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(v){P.logger.debug("[texttrack-utils]: "+v);var f=new self.TextTrackCue(u.startTime,u.endTime,u.text);f.id=u.id,n.addCue(f)}p==="disabled"&&(n.mode=p)}function w(n){var u=n.mode;if(u==="disabled"&&(n.mode="hidden"),n.cues)for(var p=n.cues.length;p--;)n.removeCue(n.cues[p]);u==="disabled"&&(n.mode=u)}function d(n,u,p){var f=n.mode;if(f==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var v=a(n.cues,u,p),g=0;g<v.length;g++)n.removeCue(v[g]);f==="disabled"&&(n.mode=f)}function o(n,u){if(u<n[0].startTime)return 0;var p=n.length-1;if(u>n[p].endTime)return-1;for(var f=0,v=p;f<=v;){var g=Math.floor((v+f)/2);if(u<n[g].startTime)v=g-1;else if(u>n[g].startTime&&f<p)f=g+1;else return g}return n[f].startTime-u<u-n[v].startTime?f:v}function a(n,u,p){var f=[],v=o(n,u);if(v>-1)for(var g=v,b=n.length;g<b;g++){var i=n[g];if(i.startTime>=u&&i.endTime<=p)f.push(i);else if(i.startTime>p)return f}return f}},"./src/utils/time-ranges.ts":function(D,m,S){"use strict";S.r(m);var P={toString:function(h){for(var w="",d=h.length,o=0;o<d;o++)w+="["+h.start(o).toFixed(3)+","+h.end(o).toFixed(3)+"]";return w}};m.default=P},"./src/utils/timescale-conversion.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"toTimescaleFromBase",function(){return c}),S.d(m,"toTimescaleFromScale",function(){return h}),S.d(m,"toMsFromMpegTsClock",function(){return w}),S.d(m,"toMpegTsClockFromTimescale",function(){return d});var P=9e4;function c(o,a,n,u){n===void 0&&(n=1),u===void 0&&(u=!1);var p=o*a*n;return u?Math.round(p):p}function h(o,a,n,u){return n===void 0&&(n=1),u===void 0&&(u=!1),c(o,a,1/n,u)}function w(o,a){return a===void 0&&(a=!1),c(o,1e3,1/P,a)}function d(o,a){return a===void 0&&(a=1),c(o,P,1/a)}},"./src/utils/typed-array.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"sliceUint8",function(){return P});function P(c,h,w){return Uint8Array.prototype.slice?c.slice(h,w):new Uint8Array(Array.prototype.slice.call(c,h,w))}},"./src/utils/vttcue.ts":function(D,m,S){"use strict";S.r(m),m.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var P=["","lr","rl"],c=["start","middle","end","left","right"];function h(n,u){if(typeof u!="string")return!1;if(!Array.isArray(n))return!1;var p=u.toLowerCase();return~n.indexOf(p)?p:!1}function w(n){return h(P,n)}function d(n){return h(c,n)}function o(n){for(var u=arguments.length,p=new Array(u>1?u-1:0),f=1;f<u;f++)p[f-1]=arguments[f];for(var v=1;v<arguments.length;v++){var g=arguments[v];for(var b in g)n[b]=g[b]}return n}function a(n,u,p){var f=this,v={enumerable:!0};f.hasBeenReset=!1;var g="",b=!1,i=n,s=u,t=p,T=null,_="",l=!0,k="auto",O="start",x=50,y="middle",E=50,C="middle";Object.defineProperty(f,"id",o({},v,{get:function(){return g},set:function(j){g=""+j}})),Object.defineProperty(f,"pauseOnExit",o({},v,{get:function(){return b},set:function(j){b=!!j}})),Object.defineProperty(f,"startTime",o({},v,{get:function(){return i},set:function(j){if(typeof j!="number")throw new TypeError("Start time must be set to a number.");i=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"endTime",o({},v,{get:function(){return s},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");s=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"text",o({},v,{get:function(){return t},set:function(j){t=""+j,this.hasBeenReset=!0}})),Object.defineProperty(f,"region",o({},v,{get:function(){return T},set:function(j){T=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"vertical",o({},v,{get:function(){return _},set:function(j){var L=w(j);if(L===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=L,this.hasBeenReset=!0}})),Object.defineProperty(f,"snapToLines",o({},v,{get:function(){return l},set:function(j){l=!!j,this.hasBeenReset=!0}})),Object.defineProperty(f,"line",o({},v,{get:function(){return k},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");k=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"lineAlign",o({},v,{get:function(){return O},set:function(j){var L=d(j);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");O=L,this.hasBeenReset=!0}})),Object.defineProperty(f,"position",o({},v,{get:function(){return x},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");x=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"positionAlign",o({},v,{get:function(){return y},set:function(j){var L=d(j);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");y=L,this.hasBeenReset=!0}})),Object.defineProperty(f,"size",o({},v,{get:function(){return E},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");E=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"align",o({},v,{get:function(){return C},set:function(j){var L=d(j);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");C=L,this.hasBeenReset=!0}})),f.displayState=void 0}return a.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"parseTimeStamp",function(){return h}),S.d(m,"fixLineBreaks",function(){return u}),S.d(m,"VTTParser",function(){return p});var P=S("./src/utils/vttcue.ts"),c=function(){function f(){}var v=f.prototype;return v.decode=function(b,i){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))},f}();function h(f){function v(b,i,s,t){return(b|0)*3600+(i|0)*60+(s|0)+parseFloat(t||0)}var g=f.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return g?parseFloat(g[2])>59?v(g[2],g[3],0,g[4]):v(g[1],g[2],g[3],g[4]):null}var w=function(){function f(){this.values=Object.create(null)}var v=f.prototype;return v.set=function(b,i){!this.get(b)&&i!==""&&(this.values[b]=i)},v.get=function(b,i,s){return s?this.has(b)?this.values[b]:i[s]:this.has(b)?this.values[b]:i},v.has=function(b){return b in this.values},v.alt=function(b,i,s){for(var t=0;t<s.length;++t)if(i===s[t]){this.set(b,i);break}},v.integer=function(b,i){/^-?\d+$/.test(i)&&this.set(b,parseInt(i,10))},v.percent=function(b,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var s=parseFloat(i);if(s>=0&&s<=100)return this.set(b,s),!0}return!1},f}();function d(f,v,g,b){var i=b?f.split(b):[f];for(var s in i){if(typeof i[s]!="string")continue;var t=i[s].split(g);if(t.length!==2)continue;var T=t[0],_=t[1];v(T,_)}}var o=new P.default(0,0,""),a=o.align==="middle"?"middle":"center";function n(f,v,g){var b=f;function i(){var T=h(f);if(T===null)throw new Error("Malformed timestamp: "+b);return f=f.replace(/^[^\sa-zA-Z-]+/,""),T}function s(T,_){var l=new w;d(T,function(x,y){var E;switch(x){case"region":for(var C=g.length-1;C>=0;C--)if(g[C].id===y){l.set(x,g[C].region);break}break;case"vertical":l.alt(x,y,["rl","lr"]);break;case"line":E=y.split(","),l.integer(x,E[0]),l.percent(x,E[0])&&l.set("snapToLines",!1),l.alt(x,E[0],["auto"]),E.length===2&&l.alt("lineAlign",E[1],["start",a,"end"]);break;case"position":E=y.split(","),l.percent(x,E[0]),E.length===2&&l.alt("positionAlign",E[1],["start",a,"end","line-left","line-right","auto"]);break;case"size":l.percent(x,y);break;case"align":l.alt(x,y,["start",a,"end","left","right"]);break}},/:/,/\s/),_.region=l.get("region",null),_.vertical=l.get("vertical","");var k=l.get("line","auto");k==="auto"&&o.line===-1&&(k=-1),_.line=k,_.lineAlign=l.get("lineAlign","start"),_.snapToLines=l.get("snapToLines",!0),_.size=l.get("size",100),_.align=l.get("align",a);var O=l.get("position","auto");O==="auto"&&o.position===50&&(O=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=O}function t(){f=f.replace(/^\s+/,"")}if(t(),v.startTime=i(),t(),f.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+b);f=f.substr(3),t(),v.endTime=i(),t(),s(f,v)}function u(f){return f.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function f(){this.state="INITIAL",this.buffer="",this.decoder=new c,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var v=f.prototype;return v.parse=function(b){var i=this;b&&(i.buffer+=i.decoder.decode(b,{stream:!0}));function s(){var O=i.buffer,x=0;for(O=u(O);x<O.length&&O[x]!=="\r"&&O[x]!==`
`;)++x;var y=O.substr(0,x);return O[x]==="\r"&&++x,O[x]===`
`&&++x,i.buffer=O.substr(x),y}function t(O){d(O,function(x,y){},/:/)}try{var T="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;T=s();var _=T.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var l=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;l?l=!1:T=s();switch(i.state){case"HEADER":/:/.test(T)?t(T):T||(i.state="ID");continue;case"NOTE":T||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(T)){i.state="NOTE";break}if(!T)continue;if(i.cue=new P.default(0,0,""),i.state="CUE",T.indexOf("-->")===-1){i.cue.id=T;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{n(T,i.cue,i.regionList)}catch(O){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var k=T.indexOf("-->")!==-1;if(!T||k&&(l=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
`),i.cue.text+=T}continue;case"BADCUE":T||(i.state="ID")}}}catch(O){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},v.flush=function(){var b=this;try{if((b.cue||b.state==="HEADER")&&(b.buffer+=`
`,b.parse()),b.state==="INITIAL"||b.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){b.onparsingerror&&b.onparsingerror(i)}return b.onflush&&b.onflush(),this},f}()},"./src/utils/webvtt-parser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"generateCueId",function(){return p}),S.d(m,"parseWebVTT",function(){return v});var P=S("./src/polyfills/number.ts"),c=S("./src/utils/vttparser.ts"),h=S("./src/demux/id3.ts"),w=S("./src/utils/timescale-conversion.ts"),d=S("./src/remux/mp4-remuxer.ts"),o=/\r\n|\n\r|\n|\r/g,a=function(b,i,s){return s===void 0&&(s=0),b.substr(s,i.length)===i},n=function(b){var i=parseInt(b.substr(-3)),s=parseInt(b.substr(-6,2)),t=parseInt(b.substr(-9,2)),T=b.length>9?parseInt(b.substr(0,b.indexOf(":"))):0;if(!Object(P.isFiniteNumber)(i)||!Object(P.isFiniteNumber)(s)||!Object(P.isFiniteNumber)(t)||!Object(P.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+b);return i+=1e3*s,i+=60*1e3*t,i+=60*60*1e3*T,i},u=function(b){for(var i=5381,s=b.length;s;)i=i*33^b.charCodeAt(--s);return(i>>>0).toString()};function p(g,b,i){return u(g.toString())+u(b.toString())+u(i)}var f=function(b,i,s){var t=b[i],T=b[t.prevCC];if(!T||!T.new&&t.new){b.ccOffset=b.presentationOffset=t.start,t.new=!1;return}for(;(_=T)!==null&&_!==void 0&&_.new;){var _;b.ccOffset+=t.start-T.start,t.new=!1,t=T,T=b[t.prevCC]}b.presentationOffset=s};function v(g,b,i,s,t,T,_,l){var k=new c.VTTParser,O=Object(h.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(o,`
`).split(`
`),x=[],y=Object(w.toMpegTsClockFromTimescale)(b,i),E="00:00.000",C=0,I=0,j,L=!0,H=!1;k.oncue=function(W){var U=s[t],G=s.ccOffset,B=(C-y)/9e4;if(U!=null&&U.new&&(I!==void 0?G=s.ccOffset=U.start:f(s,t,B)),B&&(G=B-s.presentationOffset),H){var z=W.endTime-W.startTime,V=Object(d.normalizePts)((W.startTime+G-I)*9e4,T*9e4)/9e4;W.startTime=V,W.endTime=V+z}var ie=W.text.trim();W.text=decodeURIComponent(encodeURIComponent(ie)),W.id||(W.id=p(W.startTime,W.endTime,ie)),W.endTime>0&&x.push(W)},k.onparsingerror=function(W){j=W},k.onflush=function(){if(j){l(j);return}_(x)},O.forEach(function(W){if(L)if(a(W,"X-TIMESTAMP-MAP=")){L=!1,H=!0,W.substr(16).split(",").forEach(function(U){a(U,"LOCAL:")?E=U.substr(6):a(U,"MPEGTS:")&&(C=parseInt(U.substr(7)))});try{I=n(E)/1e3}catch(U){H=!1,j=U}return}else W===""&&(L=!1);k.parse(W+`
`)}),k.flush()}},"./src/utils/xhr-loader.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/logger.ts"),c=S("./src/loader/load-stats.ts"),h=/^age:\s*[\d.]+\s*$/m,w=function(){function d(a){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=a?a.xhrSetup:null,this.stats=new c.LoadStats,this.retryDelay=0}var o=d.prototype;return o.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},o.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()))},o.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},o.load=function(n,u,p){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=u,this.callbacks=p,this.retryDelay=u.retryDelay,this.loadInternal()},o.loadInternal=function(){var n=this.config,u=this.context;if(!n)return;var p=this.loader=new self.XMLHttpRequest,f=this.stats;f.loading.first=0,f.loaded=0;var v=this.xhrSetup;try{if(v)try{v(p,u.url)}catch(i){p.open("GET",u.url,!0),v(p,u.url)}p.readyState||p.open("GET",u.url,!0);var g=this.context.headers;if(g)for(var b in g)p.setRequestHeader(b,g[b])}catch(i){this.callbacks.onError({code:p.status,text:i.message},u,p);return}u.rangeEnd&&p.setRequestHeader("Range","bytes="+u.rangeStart+"-"+(u.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=u.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),p.send()},o.readystatechange=function(){var n=this.context,u=this.loader,p=this.stats;if(!n||!u)return;var f=u.readyState,v=this.config;if(p.aborted)return;if(f>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),f===4){u.onreadystatechange=null,u.onprogress=null;var g=u.status;if(g>=200&&g<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var b,i;if(n.responseType==="arraybuffer"?(b=u.response,i=b.byteLength):(b=u.responseText,i=b.length),p.loaded=p.total=i,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,n,b,u),!this.callbacks)return;var t={url:u.responseURL,data:b};this.callbacks.onSuccess(t,p,n,u)}else p.retry>=v.maxRetry||g>=400&&g<499?(P.logger.error(g+" while loading "+n.url),this.callbacks.onError({code:g,text:u.statusText},n,u)):(P.logger.warn(g+" 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,v.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout)},o.loadtimeout=function(){P.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},o.loadprogress=function(n){var u=this.stats;u.loaded=n.loaded,n.lengthComputable&&(u.total=n.total)},o.getCacheAge=function(){var n=null;if(this.loader&&h.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");n=u?parseFloat(u):null}return n},d}();m.default=w}}).default})},vHTk:function(N,J,M){N.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.StreamCipher,c=m.algo,h=c.RC4=P.extend({_doReset:function(){for(var o=this._key,a=o.words,n=o.sigBytes,u=this._S=[],p=0;p<256;p++)u[p]=p;for(var p=0,f=0;p<256;p++){var v=p%n,g=a[v>>>2]>>>24-v%4*8&255;f=(f+u[p]+g)%256;var b=u[p];u[p]=u[f],u[f]=b}this._i=this._j=0},_doProcessBlock:function(o,a){o[a]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var o=this._S,a=this._i,n=this._j,u=0,p=0;p<4;p++){a=(a+1)%256,n=(n+o[a])%256;var f=o[a];o[a]=o[n],o[n]=f,u|=o[(o[a]+o[n])%256]<<24-p*8}return this._i=a,this._j=n,u}m.RC4=P._createHelper(h);var d=c.RC4Drop=h.extend({cfg:h.cfg.extend({drop:192}),_doReset:function(){h._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)w.call(this)}});m.RC4Drop=P._createHelper(d)}(),D.RC4})},wCXF:function(N,J,M){"use strict";M.d(J,"a",function(){return nt});var D=M("rePB"),m=M("VTBJ"),S=M("KQm4"),P=M("U8pU"),c=M("ODXe"),h=M("q1tI"),w=M("TSYQ"),d=M.n(w),o=M("Gytx"),a=M.n(o),n=M("Kwbf"),u=M("t23M"),p=M("qx4F"),f=M("6eGT"),v=M("IBYe"),g=M("Ff2n"),b=M("c+Xe"),i=M("fyJ8"),s=M("biw7");function t(He,Pe,at,ft,Je){var st=at[He]||{},Ue=at[Pe]||{},Me,Ne;st.fixed==="left"?Me=ft.left[He]:Ue.fixed==="right"&&(Ne=ft.right[Pe]);var Ee=!1,Se=!1,Re=!1,Le=!1,Ye=at[Pe+1],tt=at[He-1];if(Je==="rtl"){if(Me!==void 0){var Ct=tt&&tt.fixed==="left";Le=!Ct}else if(Ne!==void 0){var At=Ye&&Ye.fixed==="right";Re=!At}}else if(Me!==void 0){var rr=Ye&&Ye.fixed==="left";Ee=!rr}else if(Ne!==void 0){var gt=tt&&tt.fixed==="right";Se=!gt}return{fixLeft:Me,fixRight:Ne,lastFixLeft:Ee,firstFixRight:Se,lastFixRight:Re,firstFixLeft:Le,isSticky:ft.isSticky}}var T=M("sR1s");function _(He){var Pe=He.cells,at=He.stickyOffsets,ft=He.flattenColumns,Je=He.rowComponent,st=He.cellComponent,Ue=He.onHeaderRow,Me=He.index,Ne=h.useContext(s.a),Ee=Ne.prefixCls,Se=Ne.direction,Re;Ue&&(Re=Ue(Pe.map(function(Ye){return Ye.column}),Me));var Le=Object(T.a)(Pe.map(function(Ye){return Ye.column}));return h.createElement(Je,Object.assign({},Re),Pe.map(function(Ye,tt){var Ct=Ye.column,At=t(Ye.colStart,Ye.colEnd,ft,at,Se),rr;return Ct&&Ct.onHeaderCell&&(rr=Ye.column.onHeaderCell(Ct)),h.createElement(i.a,Object.assign({},Ye,{ellipsis:Ct.ellipsis,align:Ct.align,component:st,prefixCls:Ee,key:Le[tt]},At,{additionalProps:rr,rowType:"header"}))}))}_.displayName="HeaderRow";var l=_;function k(He){var Pe=[];function at(Ue,Me){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Pe[Ne]=Pe[Ne]||[];var Ee=Me,Se=Ue.filter(Boolean).map(function(Re){var Le={key:Re.key,className:Re.className||"",children:Re.title,column:Re,colStart:Ee},Ye=1,tt=Re.children;return tt&&tt.length>0&&(Ye=at(tt,Ee,Ne+1).reduce(function(Ct,At){return Ct+At},0),Le.hasSubColumns=!0),"colSpan"in Re&&(Ye=Re.colSpan),"rowSpan"in Re&&(Le.rowSpan=Re.rowSpan),Le.colSpan=Ye,Le.colEnd=Le.colStart+Ye-1,Pe[Ne].push(Le),Ee+=Ye,Ye});return Se}at(He,0);for(var ft=Pe.length,Je=function(Me){Pe[Me].forEach(function(Ne){!("rowSpan"in Ne)&&!Ne.hasSubColumns&&(Ne.rowSpan=ft-Me)})},st=0;st<ft;st+=1)Je(st);return Pe}function O(He){var Pe=He.stickyOffsets,at=He.columns,ft=He.flattenColumns,Je=He.onHeaderRow,st=h.useContext(s.a),Ue=st.prefixCls,Me=st.getComponent,Ne=h.useMemo(function(){return k(at)},[at]),Ee=Me(["header","wrapper"],"thead"),Se=Me(["header","row"],"tr"),Re=Me(["header","cell"],"th");return h.createElement(Ee,{className:"".concat(Ue,"-thead")},Ne.map(function(Le,Ye){var tt=h.createElement(l,{key:Ye,flattenColumns:ft,cells:Le,stickyOffsets:Pe,rowComponent:Se,cellComponent:Re,onHeaderRow:Je,index:Ye});return tt}))}var x=O,y=M("hW8S");function E(He){for(var Pe=He.colWidths,at=He.columns,ft=He.columCount,Je=[],st=ft||at.length,Ue=!1,Me=st-1;Me>=0;Me-=1){var Ne=Pe[Me],Ee=at&&at[Me],Se=Ee&&Ee[y.a];(Ne||Se||Ue)&&(Je.unshift(h.createElement("col",Object.assign({key:Me,style:{width:Ne,minWidth:Ne}},Se))),Ue=!0)}return h.createElement("colgroup",null,Je)}var C=E;function I(He,Pe){return Object(h.useMemo)(function(){for(var at=[],ft=0;ft<Pe;ft+=1){var Je=He[ft];if(Je!==void 0)at[ft]=Je;else return null}return at},[He.join("_"),Pe])}var j=h.forwardRef(function(He,Pe){var at=He.noData,ft=He.columns,Je=He.flattenColumns,st=He.colWidths,Ue=He.columCount,Me=He.stickyOffsets,Ne=He.direction,Ee=He.fixHeader,Se=He.offsetHeader,Re=He.stickyClassName,Le=He.onScroll,Ye=Object(g.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),tt=h.useContext(s.a),Ct=tt.prefixCls,At=tt.scrollbarSize,rr=tt.isSticky,gt=rr&&!Ee?0:At,or=h.useRef(null),Zt=h.useCallback(function(un){Object(b.b)(Pe,un),Object(b.b)(or,un)},[]);h.useEffect(function(){var un;function Jr(Wt){var _n=Wt.currentTarget,Cn=Wt.deltaX;Cn&&(Le({currentTarget:_n,scrollLeft:_n.scrollLeft+Cn}),Wt.preventDefault())}return(un=or.current)===null||un===void 0||un.addEventListener("wheel",Jr),function(){var Wt;(Wt=or.current)===null||Wt===void 0||Wt.removeEventListener("wheel",Jr)}},[]);var Et=Je[Je.length-1],jr={fixed:Et?Et.fixed:null,onHeaderCell:function(){return{className:"".concat(Ct,"-cell-scrollbar")}}},Kr=Object(h.useMemo)(function(){return gt?[].concat(Object(S.a)(ft),[jr]):ft},[gt,ft]),Fr=Object(h.useMemo)(function(){return gt?[].concat(Object(S.a)(Je),[jr]):Je},[gt,Je]),rn=Object(h.useMemo)(function(){var un=Me.right,Jr=Me.left;return Object(m.a)(Object(m.a)({},Me),{},{left:Ne==="rtl"?[].concat(Object(S.a)(Jr.map(function(Wt){return Wt+gt})),[0]):Jr,right:Ne==="rtl"?un:[].concat(Object(S.a)(un.map(function(Wt){return Wt+gt})),[0]),isSticky:rr})},[gt,Me,rr]),Er=I(st,Ue);return h.createElement("div",{style:Object(m.a)({overflow:"hidden"},rr?{top:Se}:{}),ref:Zt,className:d()("".concat(Ct,"-header"),Object(D.a)({},Re,!!Re))},h.createElement("table",{style:{tableLayout:"fixed",visibility:at||Er?null:"hidden"}},h.createElement(C,{colWidths:Er?[].concat(Object(S.a)(Er),[gt]):[],columCount:Ue+1,columns:Fr}),h.createElement(x,Object.assign({},Ye,{stickyOffsets:rn,columns:Kr,flattenColumns:Fr}))))});j.displayName="FixedHeader";var L=j,H=h.createContext(null),W=H;function U(He){var Pe=He.prefixCls,at=He.children,ft=He.component,Je=He.cellComponent,st=He.fixHeader,Ue=He.fixColumn,Me=He.horizonScroll,Ne=He.className,Ee=He.expanded,Se=He.componentWidth,Re=He.colSpan,Le=h.useContext(s.a),Ye=Le.scrollbarSize;return h.useMemo(function(){var tt=at;return Ue&&(tt=h.createElement("div",{style:{width:Se-(st?Ye:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Pe,"-expanded-row-fixed")},tt)),h.createElement(ft,{className:Ne,style:{display:Ee?null:"none"}},h.createElement(i.a,{component:Je,prefixCls:Pe,colSpan:Re},tt))},[at,ft,st,Me,Ne,Ee,Se,Re,Ye])}var G=U;function B(He){var Pe=He.className,at=He.style,ft=He.record,Je=He.index,st=He.rowKey,Ue=He.getRowKey,Me=He.rowExpandable,Ne=He.expandedKeys,Ee=He.onRow,Se=He.indent,Re=Se===void 0?0:Se,Le=He.rowComponent,Ye=He.cellComponent,tt=He.childrenColumnName,Ct=h.useContext(s.a),At=Ct.prefixCls,rr=Ct.fixedInfoList,gt=h.useContext(W),or=gt.fixHeader,Zt=gt.fixColumn,Et=gt.horizonScroll,jr=gt.componentWidth,Kr=gt.flattenColumns,Fr=gt.expandableType,rn=gt.expandRowByClick,Er=gt.onTriggerExpand,un=gt.rowClassName,Jr=gt.expandedRowClassName,Wt=gt.indentSize,_n=gt.expandIcon,Cn=gt.expandedRowRender,Sn=gt.expandIconColumnIndex,gn=h.useState(!1),Ci=Object(c.a)(gn,2),ui=Ci[0],mn=Ci[1],mr=Ne&&Ne.has(He.recordKey);h.useEffect(function(){mr&&mn(!0)},[mr]);var Vn=Fr==="row"&&(!Me||Me(ft)),pi=Fr==="nest",Xn=tt&&ft&&ft[tt],nn=Vn||pi,Bn;Ee&&(Bn=Ee(ft,Je));var Si=function(K){if(rn&&nn&&Er(ft,K),Bn&&Bn.onClick){for(var $,ne=arguments.length,ge=new Array(ne>1?ne-1:0),oe=1;oe<ne;oe++)ge[oe-1]=arguments[oe];($=Bn).onClick.apply($,[K].concat(ge))}},mi;typeof un=="string"?mi=un:typeof un=="function"&&(mi=un(ft,Je,Re));var It=Object(T.a)(Kr),xr=h.createElement(Le,Object.assign({},Bn,{"data-row-key":st,className:d()(Pe,"".concat(At,"-row"),"".concat(At,"-row-level-").concat(Re),mi,Bn&&Bn.className),style:Object(m.a)(Object(m.a)({},at),Bn?Bn.style:null),onClick:Si}),Kr.map(function(se,K){var $=se.render,ne=se.dataIndex,ge=se.className,oe=It[K],Ke=rr[K],Ot;K===(Sn||0)&&pi&&(Ot=h.createElement(h.Fragment,null,h.createElement("span",{style:{paddingLeft:"".concat(Wt*Re,"px")},className:"".concat(At,"-row-indent indent-level-").concat(Re)}),_n({prefixCls:At,expanded:mr,expandable:Xn,record:ft,onExpand:Er})));var lt;return se.onCell&&(lt=se.onCell(ft,Je)),h.createElement(i.a,Object.assign({className:ge,ellipsis:se.ellipsis,align:se.align,component:Ye,prefixCls:At,key:oe,record:ft,index:Je,dataIndex:ne,render:$,shouldCellUpdate:se.shouldCellUpdate},Ke,{appendNode:Ot,additionalProps:lt}))})),ti;if(Vn&&(ui||mr)){var vi=Cn(ft,Je,Re+1,mr),Ri=Jr&&Jr(ft,Je,Re);ti=h.createElement(G,{expanded:mr,className:d()("".concat(At,"-expanded-row"),"".concat(At,"-expanded-row-level-").concat(Re+1),Ri),prefixCls:At,fixHeader:or,fixColumn:Zt,horizonScroll:Et,component:Le,componentWidth:jr,cellComponent:Ye,colSpan:Kr.length},vi)}var Di;return Xn&&mr&&(Di=(ft[tt]||[]).map(function(se,K){var $=Ue(se,K);return h.createElement(B,Object.assign({},He,{key:$,rowKey:$,record:se,recordKey:$,index:K,indent:Re+1}))})),h.createElement(h.Fragment,null,xr,ti,Di)}B.displayName="BodyRow";var z=B,V=h.createContext(null),ie=V;function ce(He){var Pe=He.columnKey,at=He.onColumnResize,ft=h.useRef();return h.useEffect(function(){ft.current&&at(Pe,ft.current.offsetWidth)},[]),h.createElement(u.a,{onResize:function(st){var Ue=st.offsetWidth;at(Pe,Ue)}},h.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},h.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function he(He){var Pe=He.data,at=He.getRowKey,ft=He.measureColumnWidth,Je=He.expandedKeys,st=He.onRow,Ue=He.rowExpandable,Me=He.emptyNode,Ne=He.childrenColumnName,Ee=h.useContext(ie),Se=Ee.onColumnResize,Re=h.useContext(s.a),Le=Re.prefixCls,Ye=Re.getComponent,tt=h.useContext(W),Ct=tt.fixHeader,At=tt.horizonScroll,rr=tt.flattenColumns,gt=tt.componentWidth;return h.useMemo(function(){var or=Ye(["body","wrapper"],"tbody"),Zt=Ye(["body","row"],"tr"),Et=Ye(["body","cell"],"td"),jr;Pe.length?jr=Pe.map(function(Fr,rn){var Er=at(Fr,rn);return h.createElement(z,{key:Er,rowKey:Er,record:Fr,recordKey:Er,index:rn,rowComponent:Zt,cellComponent:Et,expandedKeys:Je,onRow:st,getRowKey:at,rowExpandable:Ue,childrenColumnName:Ne})}):jr=h.createElement(G,{expanded:!0,className:"".concat(Le,"-placeholder"),prefixCls:Le,fixHeader:Ct,fixColumn:At,horizonScroll:At,component:Zt,componentWidth:gt,cellComponent:Et,colSpan:rr.length},Me);var Kr=Object(T.a)(rr);return h.createElement(or,{className:"".concat(Le,"-tbody")},ft&&h.createElement("tr",{"aria-hidden":"true",className:"".concat(Le,"-measure-row"),style:{height:0}},Kr.map(function(Fr){return h.createElement(ce,{key:Fr,columnKey:Fr,onColumnResize:Se})})),jr)},[Pe,Le,st,ft,Je,at,Ye,gt,Me,rr])}var Ae=h.memo(he);Ae.displayName="Body";var De=Ae,pe=M("wRmb"),Te=M("xEkU"),ye=M.n(Te);function ue(He){var Pe=Object(h.useRef)(He),at=Object(h.useState)({}),ft=Object(c.a)(at,2),Je=ft[1],st=Object(h.useRef)(null),Ue=Object(h.useRef)([]);function Me(Ne){st.current===null&&(Ue.current=[],st.current=ye()(function(){Ue.current.forEach(function(Ee){Pe.current=Ee(Pe.current)}),st.current=null,Je({})})),Ue.current.push(Ne)}return Object(h.useEffect)(function(){return function(){ye.a.cancel(st.current)}},[]),[Pe.current,Me]}function le(He){var Pe=Object(h.useRef)(He),at=Object(h.useRef)(null);function ft(){window.clearTimeout(at.current)}function Je(Ue){Pe.current=Ue,ft(),at.current=window.setTimeout(function(){Pe.current=null,at.current=null},100)}function st(){return Pe.current}return Object(h.useEffect)(function(){return ft},[]),[Je,st]}function te(He,Pe,at){var ft=Object(h.useMemo)(function(){for(var Je=[],st=[],Ue=0,Me=0,Ne=0;Ne<Pe;Ne+=1)if(at==="rtl"){st[Ne]=Me,Me+=He[Ne]||0;var Ee=Pe-Ne-1;Je[Ee]=Ue,Ue+=He[Ee]||0}else{Je[Ne]=Ue,Ue+=He[Ne]||0;var Se=Pe-Ne-1;st[Se]=Me,Me+=He[Se]||0}return{left:Je,right:st}},[He,Pe,at]);return ft}var fe=te;function q(He){var Pe=He.className,at=He.children;return h.createElement("div",{className:Pe},at)}var ee=q,Ce=M("n6Qo");function re(He){var Pe,at=He.prefixCls,ft=He.record,Je=He.onExpand,st=He.expanded,Ue=He.expandable,Me="".concat(at,"-row-expand-icon");if(!Ue)return h.createElement("span",{className:d()(Me,"".concat(at,"-row-spaced"))});var Ne=function(Se){Je(ft,Se),Se.stopPropagation()};return h.createElement("span",{className:d()(Me,(Pe={},Object(D.a)(Pe,"".concat(at,"-row-expanded"),st),Object(D.a)(Pe,"".concat(at,"-row-collapsed"),!st),Pe)),onClick:Ne})}function Q(He,Pe,at){var ft=[];function Je(st){(st||[]).forEach(function(Ue,Me){ft.push(Pe(Ue,Me)),Je(Ue[at])})}return Je(He),ft}var X=M("zT1h"),Z=M("y0+3"),xe=function(Pe,at){var ft,Je,st=Pe.scrollBodyRef,Ue=Pe.onScroll,Me=Pe.offsetScroll,Ne=h.useContext(s.a),Ee=Ne.prefixCls,Se=((ft=st.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,Re=((Je=st.current)===null||Je===void 0?void 0:Je.clientWidth)||0,Le=Se&&Re*(Re/Se),Ye=h.useRef(),tt=ue({scrollLeft:0,isHiddenScrollBar:!1}),Ct=Object(c.a)(tt,2),At=Ct[0],rr=Ct[1],gt=h.useRef({delta:0,x:0}),or=h.useState(!1),Zt=Object(c.a)(or,2),Et=Zt[0],jr=Zt[1],Kr=function(){jr(!1)},Fr=function(Wt){Wt.persist(),gt.current.delta=Wt.pageX-At.scrollLeft,gt.current.x=0,jr(!0),Wt.preventDefault()},rn=function(Wt){var _n,Cn=Wt||((_n=window)===null||_n===void 0?void 0:_n.event),Sn=Cn.buttons;if(!Et||Sn===0){Et&&jr(!1);return}var gn=gt.current.x+Wt.pageX-gt.current.x-gt.current.delta;gn<=0&&(gn=0),gn+Le>=Re&&(gn=Re-Le),Ue({scrollLeft:gn/Re*(Se+2)}),gt.current.x=Wt.pageX},Er=function(){var Wt=Object(Z.b)(st.current).top,_n=Wt+st.current.offsetHeight,Cn=document.documentElement.scrollTop+window.innerHeight;_n-Object(p.a)()<=Cn||Wt>=Cn-Me?rr(function(Sn){return Object(m.a)(Object(m.a)({},Sn),{},{isHiddenScrollBar:!0})}):rr(function(Sn){return Object(m.a)(Object(m.a)({},Sn),{},{isHiddenScrollBar:!1})})},un=function(Wt){rr(function(_n){return Object(m.a)(Object(m.a)({},_n),{},{scrollLeft:Wt/Se*Re||0})})};return h.useImperativeHandle(at,function(){return{setScrollLeft:un}}),h.useEffect(function(){var Jr=Object(X.a)(document.body,"mouseup",Kr,!1),Wt=Object(X.a)(document.body,"mousemove",rn,!1);return Er(),function(){Jr.remove(),Wt.remove()}},[Le,Et]),h.useEffect(function(){var Jr=Object(X.a)(window,"scroll",Er,!1),Wt=Object(X.a)(window,"resize",Er,!1);return function(){Jr.remove(),Wt.remove()}},[]),h.useEffect(function(){At.isHiddenScrollBar||rr(function(Jr){var Wt,_n;return Object(m.a)(Object(m.a)({},Jr),{},{scrollLeft:st.current.scrollLeft/((Wt=st.current)===null||Wt===void 0?void 0:Wt.scrollWidth)*((_n=st.current)===null||_n===void 0?void 0:_n.clientWidth)})})},[At.isHiddenScrollBar]),Se<=Re||!Le||At.isHiddenScrollBar?null:h.createElement("div",{style:{height:Object(p.a)(),width:Re,bottom:Me},className:"".concat(Ee,"-sticky-scroll")},h.createElement("div",{onMouseDown:Fr,ref:Ye,className:d()("".concat(Ee,"-sticky-scroll-bar"),Object(D.a)({},"".concat(Ee,"-sticky-scroll-bar-active"),Et)),style:{width:"".concat(Le,"px"),transform:"translate3d(".concat(At.scrollLeft,"px, 0, 0)")}}))},ve=h.forwardRef(xe);function Oe(He,Pe){return h.useMemo(function(){var at=!!He;return{isSticky:at,stickyClassName:at?"".concat(Pe,"-sticky-header"):"",offsetHeader:Object(P.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(P.a)(He)==="object"&&He.offsetScroll||0}},[He,Pe])}var Qe=[],rt={},nt="rc-table-internal-hook",ct=h.memo(function(He){var Pe=He.children;return Pe},function(He,Pe){return a()(He.props,Pe.props)?He.pingLeft!==Pe.pingLeft||He.pingRight!==Pe.pingRight:!1});function dt(He){var Pe,at=He.prefixCls,ft=He.className,Je=He.rowClassName,st=He.style,Ue=He.data,Me=He.rowKey,Ne=He.scroll,Ee=He.tableLayout,Se=He.direction,Re=He.title,Le=He.footer,Ye=He.summary,tt=He.id,Ct=He.showHeader,At=He.components,rr=He.emptyText,gt=He.onRow,or=He.onHeaderRow,Zt=He.internalHooks,Et=He.transformColumns,jr=He.internalRefs,Kr=He.sticky,Fr=Ue||Qe,rn=!!Fr.length,Er=h.useState(0),un=Object(c.a)(Er,2),Jr=un[0],Wt=un[1];h.useEffect(function(){Wt(Object(p.a)())});var _n=h.useMemo(function(){return Object(T.c)(At,{})},[At]),Cn=h.useCallback(function(Qt,Rt){return Object(T.b)(_n,Qt)||Rt},[_n]),Sn=h.useMemo(function(){return typeof Me=="function"?Me:function(Qt){var Rt=Qt&&Qt[Me];return Rt}},[Me]),gn=Object(y.c)(He),Ci=gn.expandIcon,ui=gn.expandedRowKeys,mn=gn.defaultExpandedRowKeys,mr=gn.defaultExpandAllRows,Vn=gn.expandedRowRender,pi=gn.onExpand,Xn=gn.onExpandedRowsChange,nn=gn.expandRowByClick,Bn=gn.rowExpandable,Si=gn.expandIconColumnIndex,mi=gn.expandedRowClassName,It=gn.childrenColumnName,xr=gn.indentSize,ti=Ci||re,vi=It||"children",Ri=h.useMemo(function(){return Vn?"row":He.expandable&&Zt===nt&&He.expandable.__PARENT_RENDER_ICON__||Fr.some(function(Qt){return Qt&&Object(P.a)(Qt)==="object"&&Qt[vi]})?"nest":!1},[!!Vn,Fr]),Di=h.useState(function(){return mn||(mr?Q(Fr,Sn,vi):[])}),se=Object(c.a)(Di,2),K=se[0],$=se[1],ne=h.useMemo(function(){return new Set(ui||K||[])},[ui,K]),ge=h.useCallback(function(Qt){var Rt=Sn(Qt,Fr.indexOf(Qt)),Kt,cr=ne.has(Rt);cr?(ne.delete(Rt),Kt=Object(S.a)(ne)):Kt=[].concat(Object(S.a)(ne),[Rt]),$(Kt),pi&&pi(!cr,Qt),Xn&&Xn(Kt)},[Sn,ne,Fr,pi,Xn]),oe=h.useState(0),Ke=Object(c.a)(oe,2),Ot=Ke[0],lt=Ke[1],_r=Object(pe.b)(Object(m.a)(Object(m.a)(Object(m.a)({},He),gn),{},{expandable:!!Vn,expandedKeys:ne,getRowKey:Sn,onTriggerExpand:ge,expandIcon:ti,expandIconColumnIndex:Si,direction:Se}),Zt===nt?Et:null),Pt=Object(c.a)(_r,2),Ur=Pt[0],Wr=Pt[1],cn=h.useMemo(function(){return{columns:Ur,flattenColumns:Wr}},[Ur,Wr]),ri=h.useRef(),gi=h.useRef(),Dn=h.useRef(),Mi=h.useState(!1),qi=Object(c.a)(Mi,2),Qn=qi[0],ci=qi[1],ji=h.useState(!1),Fi=Object(c.a)(ji,2),yi=Fi[0],Ui=Fi[1],bi=ue(new Map),oa=Object(c.a)(bi,2),sa=oa[0],Ei=oa[1],Gn=Object(T.a)(Wr),Vi=Gn.map(function(Qt){return sa.get(Qt)}),ta=h.useMemo(function(){return Vi},[Vi.join("_")]),_t=fe(ta,Wr.length,Se),et=Ne&&Object(T.d)(Ne.y),vt=Ne&&Object(T.d)(Ne.x),xt=vt&&Wr.some(function(Qt){var Rt=Qt.fixed;return Rt}),Mt=h.useRef(),Lt=Oe(Kr,at),Ht=Lt.isSticky,Bt=Lt.offsetHeader,ht=Lt.offsetScroll,wt=Lt.stickyClassName,St,vr,nr;et&&(vr={overflowY:"scroll",maxHeight:Ne.y}),vt&&(St={overflowX:"auto"},et||(vr={overflowY:"hidden"}),nr={width:Ne.x===!0?"auto":Ne.x,minWidth:"100%"});var tr=h.useCallback(function(Qt,Rt){Ei(function(Kt){var cr=new Map(Kt);return cr.set(Qt,Rt),cr})},[]),$t=le(null),ir=Object(c.a)($t,2),sr=ir[0],ot=ir[1];function Sr(Qt,Rt){if(!Rt)return;typeof Rt=="function"?Rt(Qt):Rt.scrollLeft!==Qt&&(Rt.scrollLeft=Qt)}var Lr=function(Rt){var Kt=Rt.currentTarget,cr=Rt.scrollLeft,qt=typeof cr=="number"?cr:Kt.scrollLeft,yt=Kt||rt;if(!ot()||ot()===yt){var bt;sr(yt),Sr(qt,gi.current),Sr(qt,Dn.current),Sr(qt,(bt=Mt.current)===null||bt===void 0?void 0:bt.setScrollLeft)}if(Kt){var Gt=Kt.scrollWidth,kt=Kt.clientWidth;ci(qt>0),Ui(qt<Gt-kt)}},yr=function(){Dn.current&&Lr({currentTarget:Dn.current})},ar=function(Rt){var Kt=Rt.width;yr(),lt(ri.current?ri.current.offsetWidth:Kt)};h.useEffect(function(){return yr},[]),h.useEffect(function(){vt&&yr()},[vt]),h.useEffect(function(){Zt===nt&&jr&&(jr.body.current=Dn.current)});var pr=Cn(["table"],"table"),er=h.useMemo(function(){return Ee||(xt?Ne.x==="max-content"?"auto":"fixed":et||Wr.some(function(Qt){var Rt=Qt.ellipsis;return Rt})?"fixed":"auto")},[et,xt,Wr,Ee]),lr,Br={colWidths:ta,columCount:Wr.length,stickyOffsets:_t,onHeaderRow:or,fixHeader:et},Ft=h.useMemo(function(){return rn?null:typeof rr=="function"?rr():rr},[rn,rr]),Xt=h.createElement(De,{data:Fr,measureColumnWidth:et||vt||Ht,expandedKeys:ne,rowExpandable:Bn,getRowKey:Sn,onRow:gt,emptyNode:Ft,childrenColumnName:vi}),zt=h.createElement(C,{colWidths:Wr.map(function(Qt){var Rt=Qt.width;return Rt}),columns:Wr}),ur=Ye&&h.createElement(Ce.b,null,Ye(Fr)),Ar=Cn(["body"]);if(et||Ht){var qe;typeof Ar=="function"?(qe=Ar(Fr,{scrollbarSize:Jr,ref:Dn,onScroll:Lr}),Br.colWidths=Wr.map(function(Qt,Rt){var Kt=Qt.width,cr=Rt===Ur.length-1?Kt-Jr:Kt;return typeof cr=="number"&&!Number.isNaN(cr)?cr:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):qe=h.createElement("div",{style:Object(m.a)(Object(m.a)({},St),vr),onScroll:Lr,ref:Dn,className:d()("".concat(at,"-body"))},h.createElement(pr,{style:Object(m.a)(Object(m.a)({},nr),{},{tableLayout:er})},zt,Xt,ur),Ht&&h.createElement(ve,{ref:Mt,offsetScroll:ht,scrollBodyRef:Dn,onScroll:Lr})),lr=h.createElement(h.Fragment,null,Ct!==!1&&h.createElement(L,Object.assign({noData:!Fr.length},Br,cn,{direction:Se,offsetHeader:Bt,stickyClassName:wt,ref:gi,onScroll:Lr})),qe)}else lr=h.createElement("div",{style:Object(m.a)(Object(m.a)({},St),vr),className:d()("".concat(at,"-content")),onScroll:Lr,ref:Dn},h.createElement(pr,{style:Object(m.a)(Object(m.a)({},nr),{},{tableLayout:er})},zt,Ct!==!1&&h.createElement(x,Object.assign({},Br,cn)),Xt,ur));var Ut=Object(y.b)(He),Gr=h.createElement("div",Object.assign({className:d()(at,ft,(Pe={},Object(D.a)(Pe,"".concat(at,"-rtl"),Se==="rtl"),Object(D.a)(Pe,"".concat(at,"-ping-left"),Qn),Object(D.a)(Pe,"".concat(at,"-ping-right"),yi),Object(D.a)(Pe,"".concat(at,"-layout-fixed"),Ee==="fixed"),Object(D.a)(Pe,"".concat(at,"-fixed-header"),et),Object(D.a)(Pe,"".concat(at,"-fixed-column"),xt),Object(D.a)(Pe,"".concat(at,"-scroll-horizontal"),vt),Object(D.a)(Pe,"".concat(at,"-has-fix-left"),Wr[0]&&Wr[0].fixed),Object(D.a)(Pe,"".concat(at,"-has-fix-right"),Wr[Wr.length-1]&&Wr[Wr.length-1].fixed==="right"),Pe)),style:st,id:tt,ref:ri},Ut),h.createElement(ct,{pingLeft:Qn,pingRight:yi,props:Object(m.a)(Object(m.a)({},He),{},{stickyOffsets:_t,mergedExpandedKeys:ne})},Re&&h.createElement(ee,{className:"".concat(at,"-title")},Re(Fr)),h.createElement("div",{className:"".concat(at,"-container")},lr),Le&&h.createElement(ee,{className:"".concat(at,"-footer")},Le(Fr))));vt&&(Gr=h.createElement(u.a,{onResize:ar},Gr));var Qr=h.useMemo(function(){return{prefixCls:at,getComponent:Cn,scrollbarSize:Jr,direction:Se,fixedInfoList:Wr.map(function(Qt,Rt){return t(Rt,Rt,Wr,_t,Se)}),isSticky:Ht}},[at,Cn,Jr,Se,Wr,_t,Se,Ht]),Vt=h.useMemo(function(){return Object(m.a)(Object(m.a)({},cn),{},{tableLayout:er,rowClassName:Je,expandedRowClassName:mi,componentWidth:Ot,fixHeader:et,fixColumn:xt,horizonScroll:vt,expandIcon:ti,expandableType:Ri,expandRowByClick:nn,expandedRowRender:Vn,onTriggerExpand:ge,expandIconColumnIndex:Si,indentSize:xr})},[cn,er,Je,mi,Ot,et,xt,vt,ti,Ri,nn,Vn,ge,Si,xr]),wr=h.useMemo(function(){return{onColumnResize:tr}},[tr]);return h.createElement(s.a.Provider,{value:Qr},h.createElement(W.Provider,{value:Vt},h.createElement(ie.Provider,{value:wr},Gr)))}dt.Column=v.a,dt.ColumnGroup=f.a,dt.Summary=Ce.a,dt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var pt=J.b=dt},wRmb:function(N,J,M){"use strict";M.d(J,"a",function(){return a});var D=M("rePB"),m=M("KQm4"),S=M("VTBJ"),P=M("Ff2n"),c=M("q1tI"),h=M.n(c),w=M("Kwbf"),d=M("Zm9Q"),o=M("hW8S");function a(v){return Object(d.a)(v).filter(function(g){return c.isValidElement(g)}).map(function(g){var b=g.key,i=g.props,s=i.children,t=Object(P.a)(i,["children"]),T=Object(S.a)({key:b},t);return s&&(T.children=a(s)),T})}function n(v){return v.reduce(function(g,b){var i=b.fixed,s=i===!0?"left":i,t=b.children;return t&&t.length>0?[].concat(Object(m.a)(g),Object(m.a)(n(t).map(function(T){return Object(S.a)({fixed:s},T)}))):[].concat(Object(m.a)(g),[Object(S.a)(Object(S.a)({},b),{},{fixed:s})])},[])}function u(v){for(var g=!0,b=0;b<v.length;b+=1){var i=v[b];if(g&&i.fixed!=="left")g=!1;else if(!g&&i.fixed==="left"){Object(w.a)(!1,"Index ".concat(b-1," of `columns` missing `fixed='left'` prop."));break}}for(var s=!0,t=v.length-1;t>=0;t-=1){var T=v[t];if(s&&T.fixed!=="right")s=!1;else if(!s&&T.fixed==="right"){Object(w.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function p(v){return v.map(function(g){var b=g.fixed,i=Object(P.a)(g,["fixed"]),s=b;return b==="left"?s="right":b==="right"&&(s="left"),Object(S.a)({fixed:s},i)})}function f(v,g){var b=v.prefixCls,i=v.columns,s=v.children,t=v.expandable,T=v.expandedKeys,_=v.getRowKey,l=v.onTriggerExpand,k=v.expandIcon,O=v.rowExpandable,x=v.expandIconColumnIndex,y=v.direction,E=v.expandRowByClick,C=c.useMemo(function(){return i||a(s)},[i,s]),I=c.useMemo(function(){if(t){var H,W=x||0,U=C[W],G=(H={},Object(D.a)(H,o.a,{className:"".concat(b,"-expand-icon-col")}),Object(D.a)(H,"title",""),Object(D.a)(H,"fixed",U?U.fixed:null),Object(D.a)(H,"className","".concat(b,"-row-expand-icon-cell")),Object(D.a)(H,"render",function(V,ie,ce){var he=_(ie,ce),Ae=T.has(he),De=O?O(ie):!0,pe=k({prefixCls:b,expanded:Ae,expandable:De,record:ie,onExpand:l});return E?c.createElement("span",{onClick:function(ye){return ye.stopPropagation()}},pe):pe}),H),B=C.slice();return W>=0&&B.splice(W,0,G),B}return C},[t,C,_,T,k,y]),j=c.useMemo(function(){var H=I;return g&&(H=g(H)),H.length||(H=[{render:function(){return null}}]),H},[g,I,y]),L=c.useMemo(function(){return y==="rtl"?p(n(j)):n(j)},[j,y]);return[j,L]}J.b=f},wU8J:function(N,J){function M(){this.buffer=new Array,this.length=0}M.prototype={get:function(D){var m=Math.floor(D/8);return(this.buffer[m]>>>7-D%8&1)==1},put:function(D,m){for(var S=0;S<m;S++)this.putBit((D>>>m-S-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(D){var m=Math.floor(this.length/8);this.buffer.length<=m&&this.buffer.push(0),D&&(this.buffer[m]|=128>>>this.length%8),this.length++}},N.exports=M},wZgz:function(N,J,M){(function(D,m,S){N.exports=J=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.BlockCipher,c=m.algo,h=[],w=[],d=[],o=[],a=[],n=[],u=[],p=[],f=[],v=[];(function(){for(var i=[],s=0;s<256;s++)s<128?i[s]=s<<1:i[s]=s<<1^283;for(var t=0,T=0,s=0;s<256;s++){var _=T^T<<1^T<<2^T<<3^T<<4;_=_>>>8^_&255^99,h[t]=_,w[_]=t;var l=i[t],k=i[l],O=i[k],x=i[_]*257^_*16843008;d[t]=x<<24|x>>>8,o[t]=x<<16|x>>>16,a[t]=x<<8|x>>>24,n[t]=x;var x=O*16843009^k*65537^l*257^t*16843008;u[_]=x<<24|x>>>8,p[_]=x<<16|x>>>16,f[_]=x<<8|x>>>24,v[_]=x,t?(t=l^i[i[i[O^l]]],T^=i[i[T]]):t=T=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],b=c.AES=P.extend({_doReset:function(){var i;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var s=this._keyPriorReset=this._key,t=s.words,T=s.sigBytes/4,_=this._nRounds=T+6,l=(_+1)*4,k=this._keySchedule=[],O=0;O<l;O++)O<T?k[O]=t[O]:(i=k[O-1],O%T?T>6&&O%T==4&&(i=h[i>>>24]<<24|h[i>>>16&255]<<16|h[i>>>8&255]<<8|h[i&255]):(i=i<<8|i>>>24,i=h[i>>>24]<<24|h[i>>>16&255]<<16|h[i>>>8&255]<<8|h[i&255],i^=g[O/T|0]<<24),k[O]=k[O-T]^i);for(var x=this._invKeySchedule=[],y=0;y<l;y++){var O=l-y;if(y%4)var i=k[O];else var i=k[O-4];y<4||O<=4?x[y]=i:x[y]=u[h[i>>>24]]^p[h[i>>>16&255]]^f[h[i>>>8&255]]^v[h[i&255]]}},encryptBlock:function(i,s){this._doCryptBlock(i,s,this._keySchedule,d,o,a,n,h)},decryptBlock:function(i,s){var t=i[s+1];i[s+1]=i[s+3],i[s+3]=t,this._doCryptBlock(i,s,this._invKeySchedule,u,p,f,v,w);var t=i[s+1];i[s+1]=i[s+3],i[s+3]=t},_doCryptBlock:function(i,s,t,T,_,l,k,O){for(var x=this._nRounds,y=i[s]^t[0],E=i[s+1]^t[1],C=i[s+2]^t[2],I=i[s+3]^t[3],j=4,L=1;L<x;L++){var H=T[y>>>24]^_[E>>>16&255]^l[C>>>8&255]^k[I&255]^t[j++],W=T[E>>>24]^_[C>>>16&255]^l[I>>>8&255]^k[y&255]^t[j++],U=T[C>>>24]^_[I>>>16&255]^l[y>>>8&255]^k[E&255]^t[j++],G=T[I>>>24]^_[y>>>16&255]^l[E>>>8&255]^k[C&255]^t[j++];y=H,E=W,C=U,I=G}var H=(O[y>>>24]<<24|O[E>>>16&255]<<16|O[C>>>8&255]<<8|O[I&255])^t[j++],W=(O[E>>>24]<<24|O[C>>>16&255]<<16|O[I>>>8&255]<<8|O[y&255])^t[j++],U=(O[C>>>24]<<24|O[I>>>16&255]<<16|O[y>>>8&255]<<8|O[E&255])^t[j++],G=(O[I>>>24]<<24|O[y>>>16&255]<<16|O[E>>>8&255]<<8|O[C&255])^t[j++];i[s]=H,i[s+1]=W,i[s+2]=U,i[s+3]=G},keySize:256/32});m.AES=P._createHelper(b)}(),D.AES})},wbyO:function(N,J,M){(function(D,m){N.exports=J=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,c=m.enc,h=c.Base64url={stringify:function(d,o=!0){var a=d.words,n=d.sigBytes,u=o?this._safe_map:this._map;d.clamp();for(var p=[],f=0;f<n;f+=3)for(var v=a[f>>>2]>>>24-f%4*8&255,g=a[f+1>>>2]>>>24-(f+1)%4*8&255,b=a[f+2>>>2]>>>24-(f+2)%4*8&255,i=v<<16|g<<8|b,s=0;s<4&&f+s*.75<n;s++)p.push(u.charAt(i>>>6*(3-s)&63));var t=u.charAt(64);if(t)for(;p.length%4;)p.push(t);return p.join("")},parse:function(d,o=!0){var a=d.length,n=o?this._safe_map:this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var p=0;p<n.length;p++)u[n.charCodeAt(p)]=p}var f=n.charAt(64);if(f){var v=d.indexOf(f);v!==-1&&(a=v)}return w(d,a,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function w(d,o,a){for(var n=[],u=0,p=0;p<o;p++)if(p%4){var f=a[d.charCodeAt(p-1)]<<p%4*2,v=a[d.charCodeAt(p)]>>>6-p%4*2,g=f|v;n[u>>>2]|=g<<24-u%4*8,u++}return P.create(n,u)}}(),D.enc.Base64url})},"y0+3":function(N,J,M){"use strict";M.d(J,"a",function(){return n}),M.d(J,"b",function(){return p});var D=/margin|padding|width|height|max|min|offset/,m={left:!0,top:!0},S={cssFloat:1,styleFloat:1,float:1};function P(f){return f.nodeType===1?f.ownerDocument.defaultView.getComputedStyle(f,null):{}}function c(f,v,g){if(v=v.toLowerCase(),g==="auto"){if(v==="height")return f.offsetHeight;if(v==="width")return f.offsetWidth}return v in m||(m[v]=D.test(v)),m[v]?parseFloat(g)||0:g}function h(f,v){var g=arguments.length,b=P(f);return v=S[v]?"cssFloat"in f.style?"cssFloat":"styleFloat":v,g===1?b:c(f,v,b[v]||f.style[v])}function w(f,v,g){var b=arguments.length;if(v=S[v]?"cssFloat"in f.style?"cssFloat":"styleFloat":v,b===3)return typeof g=="number"&&D.test(v)&&(g="".concat(g,"px")),f.style[v]=g,g;for(var i in v)v.hasOwnProperty(i)&&w(f,i,v[i]);return P(f)}function d(f){return f===document.body?document.documentElement.clientWidth:f.offsetWidth}function o(f){return f===document.body?window.innerHeight||document.documentElement.clientHeight:f.offsetHeight}function a(){var f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),v=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:f,height:v}}function n(){var f=document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight;return{width:f,height:v}}function u(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(f){var v=f.getBoundingClientRect(),g=document.documentElement;return{left:v.left+(window.pageXOffset||g.scrollLeft)-(g.clientLeft||document.body.clientLeft||0),top:v.top+(window.pageYOffset||g.scrollTop)-(g.clientTop||document.body.clientTop||0)}}},zrhs:function(N,J,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("PpiC"),P=M("q1tI"),c=M.n(P),h=M("9kvl"),w=function(o){var a=o.shixunsDetail,n=o.globalSetting,u=o.loading,p=o.dispatch,f=Object(S.a)(o,["shixunsDetail","globalSetting","loading","dispatch"]);return c.a.createElement(m.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:a.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){p({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){p({type:"shixunsDetail/setActionTabs",payload:{}})}},c.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",c.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};J.a=Object(h.a)(function(d){var o=d.shixunsDetail,a=d.loading,n=d.globalSetting;return{shixunsDetail:o,globalSetting:n,loading:a.models.index}})(w)}}]);