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

530 lines
1.9 MiB

This file contains invisible Unicode characters!

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[136,4,6,7,8,11,15,20],{"+NIl":function(H,q,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(g,T){"use strict";function N(n,s){n.cmdState.push(s)}function v(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var s=n.cmdState.pop();s&&s.closeBracket()}function w(n){for(var s=n.cmdState,h=s.length-1;h>=0;h--){var f=s[h];if(f.name=="DEFAULT")continue;return f}return{styleIdentifier:function(){return null}}}function b(n,s,h){return function(){this.name=n,this.bracketNo=0,this.style=s,this.styles=h,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var t={};t.importmodule=b("importmodule","tag",["string","builtin"]),t.documentclass=b("documentclass","tag",["","atom"]),t.usepackage=b("usepackage","tag",["atom"]),t.begin=b("begin","tag",["atom"]),t.end=b("end","tag",["atom"]),t.label=b("label","tag",["atom"]),t.ref=b("ref","tag",["atom"]),t.eqref=b("eqref","tag",["atom"]),t.cite=b("cite","tag",["atom"]),t.bibitem=b("bibitem","tag",["atom"]),t.Bibitem=b("Bibitem","tag",["atom"]),t.RBibitem=b("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function d(n,s){n.f=s}function a(n,s){var h;if(n.match(/^\\[a-zA-Z@]+/)){var f=n.current().slice(1);return h=t.hasOwnProperty(f)?t[f]:t.DEFAULT,h=new h,N(s,h),d(s,o),h.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return d(s,function(i,r){return c(i,r,"\\]")}),"keyword";if(n.match("\\("))return d(s,function(i,r){return c(i,r,"\\)")}),"keyword";if(n.match("$$"))return d(s,function(i,r){return c(i,r,"$$")}),"keyword";if(n.match("$"))return d(s,function(i,r){return c(i,r,"$")}),"keyword";var u=n.next();if(u=="%")return n.skipToEnd(),"comment";if(u=="}"||u=="]"){if(h=v(s),h)h.closeBracket(u),d(s,o);else return"error";return"bracket"}else return u=="{"||u=="["?(h=t.DEFAULT,h=new h,N(s,h),"bracket"):/\d/.test(u)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),h=w(s),h.name=="begin"&&(h.argument=n.current()),h.styleIdentifier())}function c(n,s,h){if(n.eatSpace())return null;if(h&&n.match(h))return d(s,a),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var f=n.next();return f=="{"||f=="}"||f=="["||f=="]"||f=="("||f==")"?"bracket":f=="%"?(n.skipToEnd(),"comment"):"error"}function o(n,s){var h=n.peek(),f;return h=="{"||h=="["?(f=v(s),f.openBracket(h),n.eat(h),d(s,a),"bracket"):/[ \t\r]/.test(h)?(n.eat(h),null):(d(s,a),m(s),a(n,s))}return{startState:function(){var n=T.inMathMode?function(s,h){return c(s,h)}:a;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,s){return s.f(n,s)},blankLine:function(n){n.f=a,n.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"+ua5":function(H,q,L){},"/cxE":function(H,q,L){"use strict";L.d(q,"f",function(){return T}),L.d(q,"g",function(){return N}),L.d(q,"h",function(){return v}),L.d(q,"e",function(){return w}),L.d(q,"b",function(){return b}),L.d(q,"c",function(){return t}),L.d(q,"d",function(){return d}),L.d(q,"a",function(){return a});class P{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
`+c.stack):c},0)}}emit(c){this.listeners.forEach(o=>{o(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new P;function T(c){w(c)||g.onUnexpectedError(c);return}function N(c){w(c)||g.onUnexpectedExternalError(c);return}function v(c){if(c instanceof Error){let{name:o,message:n}=c;const s=c.stacktrace||c.stack;return{$isError:!0,name:o,message:n,stack:s}}return c}const m="Canceled";function w(c){return c instanceof Error&&c.name===m&&c.message===m}function b(){const c=new Error(m);return c.name=c.message,c}function t(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function d(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class a extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(H,q,L){(function(P){P(L("VrN/"))})(function(P){P.defineOption("placeholder","",function(b,t,d){var a=d&&d!=P.Init;if(t&&!a)b.on("blur",v),b.on("change",m),b.on("swapDoc",m),P.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){N(b)}),m(b);else if(!t&&a){b.off("blur",v),b.off("change",m),b.off("swapDoc",m),P.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),g(b);var c=b.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}t&&!b.hasFocus()&&v(b)});function g(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function T(b){g(b);var t=b.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=b.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var d=b.getOption("placeholder");typeof d=="string"&&(d=document.createTextNode(d)),t.appendChild(d),b.display.lineSpace.insertBefore(t,b.display.lineSpace.firstChild)}function N(b){setTimeout(function(){var t=!1,d=b.getInputField();d.nodeName=="TEXTAREA"?t=!d.value:b.lineCount()==1&&(t=!/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent)),t?T(b):g(b)},20)}function v(b){w(b)&&T(b)}function m(b){var t=b.getWrapperElement(),d=w(b);t.className=t.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?T(b):g(b)}function w(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1eCo":function(H,q,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var g={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(N,v){var m=N.indentUnit,w={},b=v.htmlMode?g:T;for(var t in b)w[t]=b[t];for(var t in v)w[t]=v[t];var d,a;function c(C,j){function F(K){return j.tokenize=K,K(C,j)}var M=C.next();if(M=="<")return C.eat("!")?C.eat("[")?C.match("CDATA[")?F(s("atom","]]>")):null:C.match("--")?F(s("comment","-->")):C.match("DOCTYPE",!0,!0)?(C.eatWhile(/[\w\._\-]/),F(h(1))):null:C.eat("?")?(C.eatWhile(/[\w\._\-]/),j.tokenize=s("meta","?>"),"meta"):(d=C.eat("/")?"closeTag":"openTag",j.tokenize=o,"tag bracket");if(M=="&"){var Y;return C.eat("#")?C.eat("x")?Y=C.eatWhile(/[a-fA-F\d]/)&&C.eat(";"):Y=C.eatWhile(/[\d]/)&&C.eat(";"):Y=C.eatWhile(/[\w\.\-:]/)&&C.eat(";"),Y?"atom":"error"}else return C.eatWhile(/[^&<]/),null}c.isInText=!0;function o(C,j){var F=C.next();if(F==">"||F=="/"&&C.eat(">"))return j.tokenize=c,d=F==">"?"endTag":"selfcloseTag","tag bracket";if(F=="=")return d="equals",null;if(F=="<"){j.tokenize=c,j.state=r,j.tagName=j.tagStart=null;var M=j.tokenize(C,j);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(F)?(j.tokenize=n(F),j.stringStartCol=C.column(),j.tokenize(C,j)):(C.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(C){var j=function(F,M){for(;!F.eol();)if(F.next()==C){M.tokenize=o;break}return"string"};return j.isInAttribute=!0,j}function s(C,j){return function(F,M){for(;!F.eol();){if(F.match(j)){M.tokenize=c;break}F.next()}return C}}function h(C){return function(j,F){for(var M;(M=j.next())!=null;){if(M=="<")return F.tokenize=h(C+1),F.tokenize(j,F);if(M==">")if(C==1){F.tokenize=c;break}else return F.tokenize=h(C-1),F.tokenize(j,F)}return"meta"}}function f(C,j,F){this.prev=C.context,this.tagName=j,this.indent=C.indented,this.startOfLine=F,(w.doNotIndent.hasOwnProperty(j)||C.context&&C.context.noIndent)&&(this.noIndent=!0)}function u(C){C.context&&(C.context=C.context.prev)}function i(C,j){for(var F;;){if(!C.context)return;if(F=C.context.tagName,!w.contextGrabbers.hasOwnProperty(F)||!w.contextGrabbers[F].hasOwnProperty(j))return;u(C)}}function r(C,j,F){return C=="openTag"?(F.tagStart=j.column(),E):C=="closeTag"?y:r}function E(C,j,F){return C=="word"?(F.tagName=j.current(),a="tag",O):w.allowMissingTagName&&C=="endTag"?(a="tag bracket",O(C,j,F)):(a="error",E)}function y(C,j,F){if(C=="word"){var M=j.current();return F.context&&F.context.tagName!=M&&w.implicitlyClosed.hasOwnProperty(F.context.tagName)&&u(F),F.context&&F.context.tagName==M||w.matchClosing===!1?(a="tag",p):(a="tag error",R)}else return w.allowMissingTagName&&C=="endTag"?(a="tag bracket",p(C,j,F)):(a="error",R)}function p(C,j,F){return C!="endTag"?(a="error",p):(u(F),r)}function R(C,j,F){return a="error",p(C,j,F)}function O(C,j,F){if(C=="word")return a="attribute",_;if(C=="endTag"||C=="selfcloseTag"){var M=F.tagName,Y=F.tagStart;return F.tagName=F.tagStart=null,C=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(M)?i(F,M):(i(F,M),F.context=new f(F,M,Y==F.indented)),r}return a="error",O}function _(C,j,F){return C=="equals"?x:(w.allowMissing||(a="error"),O(C,j,F))}function x(C,j,F){return C=="string"?S:C=="word"&&w.allowUnquoted?(a="string",O):(a="error",O(C,j,F))}function S(C,j,F){return C=="string"?S:O(C,j,F)}return{startState:function(C){var j={tokenize:c,state:r,indented:C||0,tagName:null,tagStart:null,context:null};return C!=null&&(j.baseIndent=C),j},token:function(C,j){if(!j.tagName&&C.sol()&&(j.indented=C.indentation()),C.eatSpace())return null;d=null;var F=j.tokenize(C,j);return(F||d)&&F!="comment"&&(a=null,j.state=j.state(d||F,C,j),a&&(F=a=="error"?F+" error":a)),F},indent:function(C,j,F){var M=C.context;if(C.tokenize.isInAttribute)return C.tagStart==C.indented?C.stringStartCol+1:C.indented+m;if(M&&M.noIndent)return P.Pass;if(C.tokenize!=o&&C.tokenize!=c)return F?F.match(/^(\s*)/)[0].length:0;if(C.tagName)return w.multilineTagIndentPastTag!==!1?C.tagStart+C.tagName.length+2:C.tagStart+m*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(j))return 0;var Y=j&&/^<(\/)?([\w_:\.-]*)/.exec(j);if(Y&&Y[1])for(;M;)if(M.tagName==Y[2]){M=M.prev;break}else if(w.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(Y)for(;M;){var K=w.contextGrabbers[M.tagName];if(K&&K.hasOwnProperty(Y[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+m:C.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(C){C.state==x&&(C.state=O)},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(C){for(var j=[],F=C.context;F;F=F.prev)F.tagName&&j.push(F.tagName);return j.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("MlIO"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.Hasher,v=g.x64,m=v.Word,w=v.WordArray,b=g.algo;function t(){return m.create.apply(m,arguments)}var d=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],a=[];(function(){for(var o=0;o<80;o++)a[o]=t()})();var c=b.SHA512=N.extend({_doReset:function(){this._hash=new w.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(o,n){for(var s=this._hash.words,h=s[0],f=s[1],u=s[2],i=s[3],r=s[4],E=s[5],y=s[6],p=s[7],R=h.high,O=h.low,_=f.high,x=f.low,S=u.high,C=u.low,j=i.high,F=i.low,M=r.high,Y=r.low,K=E.high,A=E.low,W=y.high,U=y.low,D=p.high,X=p.low,ie=R,oe=O,de=_,Ce=x,Ae=S,me=C,Se=j,ye=F,se=M,ee=Y,B=K,G=A,V=W,Q=U,Z=D,ne=X,re=0;re<80;re++){var $,J,le=a[re];if(re<16)J=le.high=o[n+re*2]|0,$=le.low=o[n+re*2+1]|0;else{var ue=a[re-15],we=ue.high,Fe=ue.low,Xe=(we>>>1|Fe<<31)^(we>>>8|Fe<<24)^we>>>7,$e=(Fe>>>1|we<<31)^(Fe>>>8|we<<24)^(Fe>>>7|we<<25),et=a[re-2],nt=et.high,at=et.low,Be=(nt>>>19|at<<13)^(nt<<3|at>>>29)^nt>>>6,Ie=(at>>>19|nt<<13)^(at<<3|nt>>>29)^(at>>>6|nt<<26),rt=a[re-7],lt=rt.high,_e=rt.low,ce=a[re-16],fe=ce.high,ve=ce.low;$=$e+_e,J=Xe+lt+($>>>0<$e>>>0?1:0),$=$+Ie,J=J+Be+($>>>0<Ie>>>0?1:0),$=$+ve,J=J+fe+($>>>0<ve>>>0?1:0),le.high=J,le.low=$}var Oe=se&B^~se&V,ge=ee&G^~ee&Q,Ee=ie&de^ie&Ae^de&Ae,Re=oe&Ce^oe&me^Ce&me,Le=(ie>>>28|oe<<4)^(ie<<30|oe>>>2)^(ie<<25|oe>>>7),Pe=(oe>>>28|ie<<4)^(oe<<30|ie>>>2)^(oe<<25|ie>>>7),Ke=(se>>>14|ee<<18)^(se>>>18|ee<<14)^(se<<23|ee>>>9),it=(ee>>>14|se<<18)^(ee>>>18|se<<14)^(ee<<23|se>>>9),st=d[re],Ot=st.high,Rt=st.low,sr=ne+it,Zt=Z+Ke+(sr>>>0<ne>>>0?1:0),sr=sr+ge,Zt=Zt+Oe+(sr>>>0<ge>>>0?1:0),sr=sr+Rt,Zt=Zt+Ot+(sr>>>0<Rt>>>0?1:0),sr=sr+$,Zt=Zt+J+(sr>>>0<$>>>0?1:0),wt=Pe+Re,Br=Le+Ee+(wt>>>0<Pe>>>0?1:0);Z=V,ne=Q,V=B,Q=G,B=se,G=ee,ee=ye+sr|0,se=Se+Zt+(ee>>>0<ye>>>0?1:0)|0,Se=Ae,ye=me,Ae=de,me=Ce,de=ie,Ce=oe,oe=sr+wt|0,ie=Zt+Br+(oe>>>0<sr>>>0?1:0)|0}O=h.low=O+oe,h.high=R+ie+(O>>>0<oe>>>0?1:0),x=f.low=x+Ce,f.high=_+de+(x>>>0<Ce>>>0?1:0),C=u.low=C+me,u.high=S+Ae+(C>>>0<me>>>0?1:0),F=i.low=F+ye,i.high=j+Se+(F>>>0<ye>>>0?1:0),Y=r.low=Y+ee,r.high=M+se+(Y>>>0<ee>>>0?1:0),A=E.low=A+G,E.high=K+B+(A>>>0<G>>>0?1:0),U=y.low=U+Q,y.high=W+V+(U>>>0<Q>>>0?1:0),X=p.low=X+ne,p.high=D+Z+(X>>>0<ne>>>0?1:0)},_doFinalize:function(){var o=this._data,n=o.words,s=this._nDataBytes*8,h=o.sigBytes*8;n[h>>>5]|=128<<24-h%32,n[(h+128>>>10<<5)+30]=Math.floor(s/4294967296),n[(h+128>>>10<<5)+31]=s,o.sigBytes=n.length*4,this._process();var f=this._hash.toX32();return f},clone:function(){var o=N.clone.call(this);return o._hash=this._hash.clone(),o},blockSize:1024/32});g.SHA512=N._createHelper(c),g.HmacSHA512=N._createHmacHelper(c)}(),P.SHA512})},"24hK":function(H,q,L){"use strict";L.d(q,"a",function(){return g});class P{constructor(T){this.element=T,this.next=P.Undefined,this.prev=P.Undefined}}P.Undefined=new P(void 0);class g{constructor(){this._first=P.Undefined,this._last=P.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===P.Undefined}clear(){let T=this._first;for(;T!==P.Undefined;){const N=T.next;T.prev=P.Undefined,T.next=P.Undefined,T=N}this._first=P.Undefined,this._last=P.Undefined,this._size=0}unshift(T){return this._insert(T,!1)}push(T){return this._insert(T,!0)}_insert(T,N){const v=new P(T);if(this._first===P.Undefined)this._first=v,this._last=v;else if(N){const w=this._last;this._last=v,v.prev=w,w.next=v}else{const w=this._first;this._first=v,v.next=w,w.prev=v}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(v))}}shift(){if(this._first===P.Undefined)return;{const T=this._first.element;return this._remove(this._first),T}}pop(){if(this._last===P.Undefined)return;{const T=this._last.element;return this._remove(this._last),T}}_remove(T){if(T.prev!==P.Undefined&&T.next!==P.Undefined){const N=T.prev;N.next=T.next,T.next.prev=N}else T.prev===P.Undefined&&T.next===P.Undefined?(this._first=P.Undefined,this._last=P.Undefined):T.next===P.Undefined?(this._last=this._last.prev,this._last.next=P.Undefined):T.prev===P.Undefined&&(this._first=this._first.next,this._first.prev=P.Undefined);this._size-=1}*[Symbol.iterator](){let T=this._first;for(;T!==P.Undefined;)yield T.element,T=T.next}}},"3/fG":function(H,q,L){"use strict";L.d(q,"a",function(){return g});function P(T,N){let v;return N.length===0?v=T:v=T.replace(/\{(\d+)\}/g,function(m,w){const b=w[0];return typeof N[b]!="undefined"?N[b]:m}),v}function g(T,N,...v){return P(N,v)}},"3y9D":function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.WordArray,v=T.Hasher,m=g.algo,w=[],b=m.SHA1=v.extend({_doReset:function(){this._hash=new N.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,d){for(var a=this._hash.words,c=a[0],o=a[1],n=a[2],s=a[3],h=a[4],f=0;f<80;f++){if(f<16)w[f]=t[d+f]|0;else{var u=w[f-3]^w[f-8]^w[f-14]^w[f-16];w[f]=u<<1|u>>>31}var i=(c<<5|c>>>27)+h+w[f];f<20?i+=(o&n|~o&s)+1518500249:f<40?i+=(o^n^s)+1859775393:f<60?i+=(o&n|o&s|n&s)-1894007588:i+=(o^n^s)-899497514,h=s,s=n,n=o<<30|o>>>2,o=c,c=i}a[0]=a[0]+c|0,a[1]=a[1]+o|0,a[2]=a[2]+n|0,a[3]=a[3]+s|0,a[4]=a[4]+h|0},_doFinalize:function(){var t=this._data,d=t.words,a=this._nDataBytes*8,c=t.sigBytes*8;return d[c>>>5]|=128<<24-c%32,d[(c+64>>>9<<4)+14]=Math.floor(a/4294967296),d[(c+64>>>9<<4)+15]=a,t.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var t=v.clone.call(this);return t._hash=this._hash.clone(),t}});g.SHA1=v._createHelper(b),g.HmacSHA1=v._createHmacHelper(b)}(),P.SHA1})},4:function(H,q){},"55Ip":function(H,q,L){"use strict";L.d(q,"a",function(){return i});var P=L("Ty5D"),g=L("dI71"),T=L("q1tI"),N=L.n(T),v=L("YS25"),m=L("17x9"),w=L.n(m),b=L("wx14"),t=L("zLVn"),d=L("9R94"),a=function(x){Object(g.a)(S,x);function S(){for(var j,F=arguments.length,M=new Array(F),Y=0;Y<F;Y++)M[Y]=arguments[Y];return j=x.call.apply(x,[this].concat(M))||this,j.history=Object(v.a)(j.props),j}var C=S.prototype;return C.render=function(){return N.a.createElement(P.c,{history:this.history,children:this.props.children})},S}(N.a.Component),c=function(x){Object(g.a)(S,x);function S(){for(var j,F=arguments.length,M=new Array(F),Y=0;Y<F;Y++)M[Y]=arguments[Y];return j=x.call.apply(x,[this].concat(M))||this,j.history=Object(v.b)(j.props),j}var C=S.prototype;return C.render=function(){return N.a.createElement(P.c,{history:this.history,children:this.props.children})},S}(N.a.Component),o=function(S,C){return typeof S=="function"?S(C):S},n=function(S,C){return typeof S=="string"?Object(v.c)(S,null,null,C):S},s=function(S){return S},h=N.a.forwardRef;typeof h=="undefined"&&(h=s);function f(x){return!!(x.metaKey||x.altKey||x.ctrlKey||x.shiftKey)}var u=h(function(x,S){var C=x.innerRef,j=x.navigate,F=x.onClick,M=Object(t.a)(x,["innerRef","navigate","onClick"]),Y=M.target,K=Object(b.a)({},M,{onClick:function(W){try{F&&F(W)}catch(U){throw W.preventDefault(),U}!W.defaultPrevented&&W.button===0&&(!Y||Y==="_self")&&!f(W)&&(W.preventDefault(),j())}});return s!==h?K.ref=S||C:K.ref=C,N.a.createElement("a",K)}),i=h(function(x,S){var C=x.component,j=C===void 0?u:C,F=x.replace,M=x.to,Y=x.innerRef,K=Object(t.a)(x,["component","replace","to","innerRef"]);return N.a.createElement(P.e.Consumer,null,function(A){A||Object(d.a)(!1);var W=A.history,U=n(o(M,A.location),A.location),D=U?W.createHref(U):"",X=Object(b.a)({},K,{href:D,navigate:function(){var oe=o(M,A.location),de=F?W.replace:W.push;de(oe)}});return s!==h?X.ref=S||Y:X.innerRef=Y,N.a.createElement(j,X)})});if(!1)var r,E;var y=function(S){return S},p=N.a.forwardRef;typeof p=="undefined"&&(p=y);function R(){for(var x=arguments.length,S=new Array(x),C=0;C<x;C++)S[C]=arguments[C];return S.filter(function(j){return j}).join(" ")}var O=p(function(x,S){var C=x["aria-current"],j=C===void 0?"page":C,F=x.activeClassName,M=F===void 0?"active":F,Y=x.activeStyle,K=x.className,A=x.exact,W=x.isActive,U=x.location,D=x.sensitive,X=x.strict,ie=x.style,oe=x.to,de=x.innerRef,Ce=Object(t.a)(x,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return N.a.createElement(P.e.Consumer,null,function(Ae){Ae||Object(d.a)(!1);var me=U||Ae.location,Se=n(o(oe,me),me),ye=Se.pathname,se=ye&&ye.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ee=se?Object(P.f)(me.pathname,{path:se,exact:A,sensitive:D,strict:X}):null,B=!!(W?W(ee,me):ee),G=B?R(K,M):K,V=B?Object(b.a)({},ie,{},Y):ie,Q=Object(b.a)({"aria-current":B&&j||null,className:G,style:V,to:Se},Ce);return y!==p?Q.ref=S||de:Q.innerRef=de,N.a.createElement(i,Q)})});if(!1)var _},"5VLF":function(H,q,L){"use strict";var P,g;function T(N,v,m){var w=function(b,t){return N.js_beautify(b,t)};return w.js=N.js_beautify,w.css=v.css_beautify,w.html=m.html_beautify,w.js_beautify=N.js_beautify,w.css_beautify=v.css_beautify,w.html_beautify=m.html_beautify,w}!(P=[L("6UM0"),L("TXwP"),L("psGv")],g=function(N,v,m){return T(N,v,m)}.apply(q,P),g!==void 0&&(H.exports=g))},"5Y4S":function(H,q,L){"use strict";L.d(q,"a",function(){return T});var P=L("MNsG");const g=P.b.performance&&typeof P.b.performance.now=="function";class T{constructor(N){this._highResolution=g&&N,this._startTime=this._now(),this._stopTime=-1}static create(N=!0){return new T(N)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?P.b.performance.now():Date.now()}}},"5hvy":function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("MlIO"))})(this,function(P){return function(g){var T=P,N=T.lib,v=N.WordArray,m=N.Hasher,w=T.x64,b=w.Word,t=T.algo,d=[],a=[],c=[];(function(){for(var s=1,h=0,f=0;f<24;f++){d[s+5*h]=(f+1)*(f+2)/2%64;var u=h%5,i=(2*s+3*h)%5;s=u,h=i}for(var s=0;s<5;s++)for(var h=0;h<5;h++)a[s+5*h]=h+(2*s+3*h)%5*5;for(var r=1,E=0;E<24;E++){for(var y=0,p=0,R=0;R<7;R++){if(r&1){var O=(1<<R)-1;O<32?p^=1<<O:y^=1<<O-32}r&128?r=r<<1^113:r<<=1}c[E]=b.create(y,p)}})();var o=[];(function(){for(var s=0;s<25;s++)o[s]=b.create()})();var n=t.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var s=this._state=[],h=0;h<25;h++)s[h]=new b.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(s,h){for(var f=this._state,u=this.blockSize/2,i=0;i<u;i++){var r=s[h+2*i],E=s[h+2*i+1];r=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var y=f[i];y.high^=E,y.low^=r}for(var p=0;p<24;p++){for(var R=0;R<5;R++){for(var O=0,_=0,x=0;x<5;x++){var y=f[R+5*x];O^=y.high,_^=y.low}var S=o[R];S.high=O,S.low=_}for(var R=0;R<5;R++)for(var C=o[(R+4)%5],j=o[(R+1)%5],F=j.high,M=j.low,O=C.high^(F<<1|M>>>31),_=C.low^(M<<1|F>>>31),x=0;x<5;x++){var y=f[R+5*x];y.high^=O,y.low^=_}for(var Y=1;Y<25;Y++){var O,_,y=f[Y],K=y.high,A=y.low,W=d[Y];W<32?(O=K<<W|A>>>32-W,_=A<<W|K>>>32-W):(O=A<<W-32|K>>>64-W,_=K<<W-32|A>>>64-W);var U=o[a[Y]];U.high=O,U.low=_}var D=o[0],X=f[0];D.high=X.high,D.low=X.low;for(var R=0;R<5;R++)for(var x=0;x<5;x++){var Y=R+5*x,y=f[Y],ie=o[Y],oe=o[(R+1)%5+5*x],de=o[(R+2)%5+5*x];y.high=ie.high^~oe.high&de.high,y.low=ie.low^~oe.low&de.low}var y=f[0],Ce=c[p];y.high^=Ce.high,y.low^=Ce.low}},_doFinalize:function(){var s=this._data,h=s.words,f=this._nDataBytes*8,u=s.sigBytes*8,i=this.blockSize*32;h[u>>>5]|=1<<24-u%32,h[(g.ceil((u+1)/i)*i>>>5)-1]|=128,s.sigBytes=h.length*4,this._process();for(var r=this._state,E=this.cfg.outputLength/8,y=E/8,p=[],R=0;R<y;R++){var O=r[R],_=O.high,x=O.low;_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,p.push(x),p.push(_)}return new v.init(p,E)},clone:function(){for(var s=m.clone.call(this),h=s._state=this._state.slice(0),f=0;f<25;f++)h[f]=h[f].clone();return s}});T.SHA3=m._createHelper(n),T.HmacSHA3=m._createHmacHelper(n)}(Math),P.SHA3})},"6RRn":function(H,q,L){"use strict";var P=L("wCXF"),g=L("n6Qo");L.d(q,"b",function(){return g.a});var T=L("IBYe"),N=L("6eGT"),v=L("hW8S");L.d(q,"a",function(){return v.a}),q.c=P.b},"6UM0":function(H,q,L){var P,g;(function(){var T;(function(){"use strict";var v=[function(t,d,a){var c=a(1).Beautifier,o=a(5).Options;function n(s,h){var f=new c(s,h);return f.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new o}},function(t,d,a){var c=a(2).Output,o=a(3).Token,n=a(4),s=a(5).Options,h=a(7).Tokenizer,f=a(7).line_starters,u=a(7).positionable_operators,i=a(7).TOKEN;function r(D,X){return X.indexOf(D)!==-1}function E(D){return D.replace(/^\s+/g,"")}function y(D){for(var X={},ie=0;ie<D.length;ie++)X[D[ie].replace(/-/g,"_")]=D[ie];return X}function p(D,X){return D&&D.type===i.RESERVED&&D.text===X}function R(D,X){return D&&D.type===i.RESERVED&&r(D.text,X)}var O=["case","return","do","if","throw","else","await","break","continue","async"],_=["before-newline","after-newline","preserve-newline"],x=y(_),S=[x.before_newline,x.preserve_newline],C={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function j(D,X){if(X.multiline_frame||X.mode===C.ForInitializer||X.mode===C.Conditional)return;D.remove_indent(X.start_line_index)}function F(D){D=D.replace(n.allLineBreaks,`
`);for(var X=[],ie=D.indexOf(`
`);ie!==-1;)X.push(D.substring(0,ie)),D=D.substring(ie+1),ie=D.indexOf(`
`);return D.length&&X.push(D),X}function M(D){return D===C.ArrayLiteral}function Y(D){return r(D,[C.Expression,C.ForInitializer,C.Conditional])}function K(D,X){for(var ie=0;ie<D.length;ie++){var oe=D[ie].trim();if(oe.charAt(0)!==X)return!1}return!0}function A(D,X){for(var ie=0,oe=D.length,de;ie<oe;ie++)if(de=D[ie],de&&de.indexOf(X)!==0)return!1;return!0}function W(D,X){X=X||{},this._source_text=D||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new s(X)}W.prototype.create_flags=function(D,X){var ie=0;D&&(ie=D.indentation_level,!this._output.just_added_newline()&&D.line_indent_level>ie&&(ie=D.line_indent_level));var oe={mode:X,parent:D,last_token:D?D.last_token:new o(i.START_BLOCK,""),last_word:D?D.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ie,alignment:0,line_indent_level:D?D.line_indent_level:ie,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},W.prototype._reset=function(D){var X=D.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,X),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(C.BlockStatement);var ie=new h(D,this._options);return this._tokens=ie.tokenize(),D},W.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D,X=this._reset(this._source_text),ie=this._options.eol;this._options.eol==="auto"&&(ie=`
`,X&&n.lineBreak.test(X||"")&&(ie=X.match(n.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return D=this._output.get_code(ie),D},W.prototype.handle_token=function(D,X){D.type===i.START_EXPR?this.handle_start_expr(D):D.type===i.END_EXPR?this.handle_end_expr(D):D.type===i.START_BLOCK?this.handle_start_block(D):D.type===i.END_BLOCK?this.handle_end_block(D):D.type===i.WORD?this.handle_word(D):D.type===i.RESERVED?this.handle_word(D):D.type===i.SEMICOLON?this.handle_semicolon(D):D.type===i.STRING?this.handle_string(D):D.type===i.EQUALS?this.handle_equals(D):D.type===i.OPERATOR?this.handle_operator(D):D.type===i.COMMA?this.handle_comma(D):D.type===i.BLOCK_COMMENT?this.handle_block_comment(D,X):D.type===i.COMMENT?this.handle_comment(D,X):D.type===i.DOT?this.handle_dot(D):D.type===i.EOF?this.handle_eof(D):D.type===i.UNKNOWN?this.handle_unknown(D,X):this.handle_unknown(D,X)},W.prototype.handle_whitespace_and_comments=function(D,X){var ie=D.newlines,oe=this._options.keep_array_indentation&&M(this._flags.mode);if(D.comments_before)for(var de=D.comments_before.next();de;)this.handle_whitespace_and_comments(de,X),this.handle_token(de,X),de=D.comments_before.next();if(oe)for(var Ce=0;Ce<ie;Ce+=1)this.print_newline(Ce>0,X);else if(this._options.max_preserve_newlines&&ie>this._options.max_preserve_newlines&&(ie=this._options.max_preserve_newlines),this._options.preserve_newlines&&ie>1){this.print_newline(!1,X);for(var Ae=1;Ae<ie;Ae+=1)this.print_newline(!0,X)}};var U=["async","break","continue","return","throw","yield"];W.prototype.allow_wrap_or_preserved_newline=function(D,X){if(X=X===void 0?!1:X,this._output.just_added_newline())return;var ie=this._options.preserve_newlines&&D.newlines||X,oe=r(this._flags.last_token.text,u)||r(D.text,u);if(oe){var de=r(this._flags.last_token.text,u)&&r(this._options.operator_position,S)||r(D.text,u);ie=ie&&de}if(ie)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(R(this._flags.last_token,U))return;this._output.set_wrap_point()}},W.prototype.print_newline=function(D,X){if(!X&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ie=this._tokens.peek();this._flags.mode===C.Statement&&!(this._flags.if_block&&p(ie,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(D)&&(this._flags.multiline_frame=!0)},W.prototype.print_token_line_indentation=function(D){this._output.just_added_newline()&&(this._options.keep_array_indentation&&D.newlines&&(D.text==="["||M(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(D.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},W.prototype.print_token=function(D){if(this._output.raw){this._output.add_raw_token(D);return}if(this._options.comma_first&&D.previous&&D.previous.type===i.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var X=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(X),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(D),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(D),this._output.non_breaking_space=!0,this._output.add_token(D.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},W.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},W.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},W.prototype.set_mode=function(D){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,D),this._flags=this.create_flags(this._previous_flags,D),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},W.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===C.Statement&&j(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},W.prototype.start_of_object_property=function(){return this._flags.parent.mode===C.ObjectLiteral&&this._flags.mode===C.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},W.prototype.start_of_statement=function(D){var X=!1;return X=X||R(this._flags.last_token,["var","let","const"])&&D.type===i.WORD,X=X||p(this._flags.last_token,"do"),X=X||!(this._flags.parent.mode===C.ObjectLiteral&&this._flags.mode===C.Statement)&&R(this._flags.last_token,U)&&!D.newlines,X=X||p(this._flags.last_token,"else")&&!(p(D,"if")&&!D.comments_before),X=X||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===C.ForInitializer||this._previous_flags.mode===C.Conditional),X=X||this._flags.last_token.type===i.WORD&&this._flags.mode===C.BlockStatement&&!this._flags.in_case&&!(D.text==="--"||D.text==="++")&&this._last_last_text!=="function"&&D.type!==i.WORD&&D.type!==i.RESERVED,X=X||this._flags.mode===C.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),X?(this.set_mode(C.Statement),this.indent(),this.handle_whitespace_and_comments(D,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D,R(D,["do","for","if","while"])),!0):!1},W.prototype.handle_start_expr=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D);var X=C.Expression;if(D.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,f)&&(this._output.space_before_token=!0),this.print_token(D),this.set_mode(X),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}X=C.ArrayLiteral,M(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),r(this._flags.last_token.type,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,X=C.ForInitializer):r(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,X=C.Conditional):r(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&D.whitespace_before===""?this._output.space_before_token=!1:(r(this._flags.last_token.text,f)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var ie=this._tokens.peek(-3);if(this._options.space_after_named_function&&ie){var oe=this._tokens.peek(-4);R(ie,["async","function"])||ie.text==="*"&&R(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===C.ObjectLiteral?(ie.text==="{"||ie.text===","||ie.text==="*"&&(oe.text==="{"||oe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(D);(this._flags.last_token.type===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===C.ObjectLiteral&&r(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(D,D.newlines),this.print_token(D),this.set_mode(X),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},W.prototype.handle_end_expr=function(D){for(;this._flags.mode===C.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(D,D.text==="]"&&M(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(D),this.restore_mode(),j(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===C.Conditional&&(this._previous_flags.mode=C.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},W.prototype.handle_start_block=function(D){this.handle_whitespace_and_comments(D);var X=this._tokens.peek(),ie=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(C.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(C.BlockStatement):ie&&(r(ie.text,[":",","])&&r(X.type,[i.STRING,i.WORD,i.RESERVED])||r(X.text,["get","set","..."])&&r(ie.type,[i.WORD,i.RESERVED]))?r(this._last_last_text,["class","interface"])&&!r(ie.text,[":",","])?this.set_mode(C.BlockStatement):this.set_mode(C.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(C.BlockStatement):r(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(C.ObjectLiteral):this.set_mode(C.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!X.comments_before&&X.text==="}",de=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var Ce=0,Ae=null;this._flags.inline_frame=!0;do if(Ce+=1,Ae=this._tokens.peek(Ce-1),Ae.newlines){this._flags.inline_frame=!1;break}while(Ae.type!==i.EOF&&!(Ae.type===i.END_BLOCK&&Ae.opened===D))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(de||this._flags.last_token.type===i.EQUALS||R(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(M(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(D),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(D),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},W.prototype.handle_end_block=function(D){for(this.handle_whitespace_and_comments(D);this._flags.mode===C.Statement;)this.restore_mode();var X=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!X?this._output.space_before_token=!0:this._options.brace_style==="expand"?X||this.print_newline():X||(M(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(D)},W.prototype.handle_word=function(D){if(D.type===i.RESERVED){if(r(D.text,["set","get"])&&this._flags.mode!==C.ObjectLiteral)D.type=i.WORD;else if(D.text==="import"&&r(this._tokens.peek().text,["(","."]))D.type=i.WORD;else if(r(D.text,["as","from"])&&!this._flags.import_block)D.type=i.WORD;else if(this._flags.mode===C.ObjectLiteral){var X=this._tokens.peek();X.text===":"&&(D.type=i.WORD)}}if(this.start_of_statement(D)?R(this._flags.last_token,["var","let","const"])&&D.type===i.WORD&&(this._flags.declaration_statement=!0):D.newlines&&!Y(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(D),this.print_newline()):this.handle_whitespace_and_comments(D),this._flags.do_block&&!this._flags.do_while)if(p(D,"while")){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&p(D,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===C.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(D,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(D),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D)),p(D,"function")){(r(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(r(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!D.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,U)?this._output.space_before_token=!0:p(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Y(this._flags.mode)||M(this._flags.mode))||this.print_newline(),this.print_token(D),this._flags.last_word=D.text;return}var ie="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?ie="SPACE":R(D,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines?ie="NEWLINE":(ie="SPACE",this._output.space_before_token=!0):ie="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===C.BlockStatement?ie="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&Y(this._flags.mode)?ie="SPACE":this._flags.last_token.type===i.STRING?ie="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===C.ObjectLiteral&&r(this._last_last_text,["{",","]))?ie="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?ie="SPACE":ie="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,ie="NEWLINE"),R(D,f)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ie="SPACE":ie="NEWLINE"),R(D,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===C.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ie==="NEWLINE"?R(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(D,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!R(D,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(D,"if")&&p(D.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(D,f)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&M(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ie==="SPACE"&&(this._output.space_before_token=!0);D.previous&&(D.previous.type===i.WORD||D.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(D),this._flags.last_word=D.text,D.type===i.RESERVED&&(D.text==="do"?this._flags.do_block=!0:D.text==="if"?this._flags.if_block=!0:D.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(D,"from")&&(this._flags.import_block=!1))},W.prototype.handle_semicolon=function(D){this.start_of_statement(D)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(D);for(var X=this._tokens.peek();this._flags.mode===C.Statement&&!(this._flags.if_block&&p(X,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(D)},W.prototype.handle_string=function(D){D.text.startsWith("`")&&D.newlines===0&&D.whitespace_before===""&&(D.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(D)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(D),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D):D.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(D.previous.text==="]"||D.previous.text===")")&&D.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(D)},W.prototype.handle_equals=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0},W.prototype.handle_comma=function(D){this.handle_whitespace_and_comments(D,!0),this.print_token(D),this._output.space_before_token=!0,this._flags.declaration_statement?(Y(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(D)):this._flags.mode===C.ObjectLiteral||this._flags.mode===C.Statement&&this._flags.parent.mode===C.ObjectLiteral?(this._flags.mode===C.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(D)},W.prototype.handle_operator=function(D){var X=D.text==="*"&&(R(this._flags.last_token,["function","yield"])||r(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),ie=r(D.text,["-","+"])&&(r(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||r(this._flags.last_token.text,f)||this._flags.last_token.text===",");if(!this.start_of_statement(D)){var oe=!X;this.handle_whitespace_and_comments(D,oe)}if(D.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(D);return}if(D.text==="::"){this.print_token(D);return}if(this._flags.last_token.type===i.OPERATOR&&r(this._options.operator_position,S)&&this.allow_wrap_or_preserved_newline(D),D.text===":"&&this._flags.in_case){this.print_token(D),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var de=!0,Ce=!0,Ae=!1;if(D.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Ae=!0):D.text==="?"&&(this._flags.ternary_depth+=1),!ie&&!X&&this._options.preserve_newlines&&r(D.text,u)){var me=D.text===":",Se=me&&Ae,ye=me&&!Ae;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!ye,this.print_token(D),(!me||Se)&&this.allow_wrap_or_preserved_newline(D),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!me||Se?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(D):this._output.space_before_token=!1,this.print_token(D),this._output.space_before_token=!0;return;case x.preserve_newline:ye||this.allow_wrap_or_preserved_newline(D),de=!(this._output.just_added_newline()||ye),this._output.space_before_token=de,this.print_token(D),this._output.space_before_token=!0;return}}if(X){this.allow_wrap_or_preserved_newline(D),de=!1;var se=this._tokens.peek();Ce=se&&r(se.type,[i.WORD,i.RESERVED])}else if(D.text==="...")this.allow_wrap_or_preserved_newline(D),de=this._flags.last_token.type===i.START_BLOCK,Ce=!1;else if(r(D.text,["--","++","!","~"])||ie){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(D),de=!1,Ce=!1,D.newlines&&(D.text==="--"||D.text==="++"||D.text==="~")){var ee=R(this._flags.last_token,O)&&D.newlines;ee&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ee,!0)}this._flags.last_token.text===";"&&Y(this._flags.mode)&&(de=!0),this._flags.last_token.type===i.RESERVED?de=!0:this._flags.last_token.type===i.END_EXPR?de=!(this._flags.last_token.text==="]"&&(D.text==="--"||D.text==="++")):this._flags.last_token.type===i.OPERATOR&&(de=r(D.text,["--","-","++","+"])&&r(this._flags.last_token.text,["--","-","++","+"]),r(D.text,["+","-"])&&r(this._flags.last_token.text,["--","++"])&&(Ce=!0)),(this._flags.mode===C.BlockStatement&&!this._flags.inline_frame||this._flags.mode===C.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||de,this.print_token(D),this._output.space_before_token=Ce},W.prototype.handle_block_comment=function(D,X){if(this._output.raw){this._output.add_raw_token(D),D.directives&&D.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(D.directives){this.print_newline(!1,X),this.print_token(D),D.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(D.text)&&!D.newlines){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0;return}else this.print_block_commment(D,X)},W.prototype.print_block_commment=function(D,X){var ie=F(D.text),oe,de=!1,Ce=!1,Ae=D.whitespace_before,me=Ae.length;if(this.print_newline(!1,X),this.print_token_line_indentation(D),this._output.add_token(ie[0]),this.print_newline(!1,X),ie.length>1){for(ie=ie.slice(1),de=K(ie,"*"),Ce=A(ie,Ae),de&&(this._flags.alignment=1),oe=0;oe<ie.length;oe++)de?(this.print_token_line_indentation(D),this._output.add_token(E(ie[oe]))):Ce&&ie[oe]?(this.print_token_line_indentation(D),this._output.add_token(ie[oe].substring(me))):(this._output.current_line.set_indent(-1),this._output.add_token(ie[oe])),this.print_newline(!1,X);this._flags.alignment=0}},W.prototype.handle_comment=function(D,X){D.newlines?this.print_newline(!1,X):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(D),this.print_newline(!1,X)},W.prototype.handle_dot=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),R(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(D,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(D)},W.prototype.handle_unknown=function(D,X){this.print_token(D),D.text[D.text.length-1]===`
`&&this.print_newline(!1,X)},W.prototype.handle_eof=function(D){for(;this._flags.mode===C.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D)},t.exports.Beautifier=W},function(t){function d(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var o=new d(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},d.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},d.prototype.has_match=function(o){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(o))return!0;return!1},d.prototype.set_indent=function(o,n){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(o){this.__items.push(o);var n=o.lastIndexOf(`
`);n!==-1?this.__character_count=o.length-n:this.__character_count+=o.length},d.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,n){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),n=n||"",o.indent_level>0&&(n=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}a.prototype.get_indent_size=function(o,n){var s=this.__base_string_length;return n=n||0,o<0&&(s=0),s+=o*this.__indent_size,s+=n,s},a.prototype.get_indent_string=function(o,n){var s=this.__base_string;return n=n||0,o<0&&(o=0,s=""),n+=o*this.__indent_size,this.__ensure_cache(n),s+=this.__cache[n],s},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,n=0,s="";this.__indent_size&&o>=this.__indent_size&&(n=Math.floor(o/this.__indent_size),o-=n*this.__indent_size,s=new Array(n+1).join(this.__indent_string)),o&&(s+=new Array(o+1).join(" ")),this.__cache.push(s)};function c(o,n){this.__indent_cache=new a(o,n),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(o,n){return this.__indent_cache.get_indent_string(o,n)},c.prototype.get_indent_size=function(o,n){return this.__indent_cache.get_indent_size(o,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(o){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return o!==`
`&&(s=s.replace(/[\n]/g,o)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(o,n){return o=o||0,n=n||0,this.next_line.set_indent(o,n),this.__lines.length>1?(this.current_line.set_indent(o,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(o){for(var n=0;n<o.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(o){for(var n=this.__lines.length;o<n;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(o,n){for(var s=this.__lines.length-2;s>=0;){var h=this.__lines[s];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==n){this.__lines.splice(s+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},function(t){function d(a,c,o,n){this.type=a,this.text=c,this.comments_before=null,this.newlines=o||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=d},function(t,d){var a="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",s="(?:\\\\u[0-9a-fA-F]{4}|["+a+o+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+c+o+n+"])*";d.identifier=new RegExp(s+h,"g"),d.identifierStart=new RegExp(s),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+o+n+"])+");var f=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;d.newline=/[\n\r\u2028\u2029]/,d.lineBreak=new RegExp(`\r
|`+d.newline.source),d.allLineBreaks=new RegExp(d.lineBreak.source,"g")},function(t,d,a){var c=a(6).Options,o=["before-newline","after-newline","preserve-newline"];function n(s){c.call(this,s,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u<f.length;u++)f[u]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=f[u];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",o),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}n.prototype=new c,t.exports.Options=n},function(t){function d(o,n){this.raw_options=a(o,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(o,n){var s=this.raw_options[o],h=n||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(h=s.concat()):typeof s=="string"&&(h=s.split(/[^a-zA-Z0-9_\/\-]+/)),h},d.prototype._get_boolean=function(o,n){var s=this.raw_options[o],h=s===void 0?!!n:!!s;return h},d.prototype._get_characters=function(o,n){var s=this.raw_options[o],h=n||"";return typeof s=="string"&&(h=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),h},d.prototype._get_number=function(o,n){var s=this.raw_options[o];n=parseInt(n,10),isNaN(n)&&(n=0);var h=parseInt(s,10);return isNaN(h)&&(h=n),h},d.prototype._get_selection=function(o,n,s){var h=this._get_selection_list(o,n,s);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[o]+"'");return h[0]},d.prototype._get_selection_list=function(o,n,s){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[n[0]],!this._is_valid_selection(s,n))throw new Error("Invalid Default Value!");var h=this._get_array(o,s);if(!this._is_valid_selection(h,n))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[o]+"'");return h},d.prototype._is_valid_selection=function(o,n){return o.length&&n.length&&!o.some(function(s){return n.indexOf(s)===-1})};function a(o,n){var s={};o=c(o);var h;for(h in o)h!==n&&(s[h]=o[h]);if(n&&o[n])for(h in o[n])s[h]=o[n][h];return s}function c(o){var n={},s;for(s in o){var h=s.replace(/-/g,"_");n[h]=o[s]}return n}t.exports.Options=d,t.exports.normalizeOpts=c,t.exports.mergeOpts=a},function(t,d,a){var c=a(8).InputScanner,o=a(9).Tokenizer,n=a(9).TOKEN,s=a(13).Directives,h=a(4),f=a(12).Pattern,u=a(14).TemplatablePattern;function i(K,A){return A.indexOf(K)!==-1}var r={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},E=new s(/\/\*/,/\*\//),y=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,p=/[0-9]/,R=/[^\d\.]/,O=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var x=new RegExp(_),S="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),C=S.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),j=new RegExp("^(?:"+C.join("|")+")$"),F,M=function(K,A){o.call(this,K,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var W=new f(this._input),U=new u(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(h.identifier).matching(h.identifierMatch),number:W.matching(y),punct:W.matching(x),comment:W.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:W.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:W.matching(/<!--/),html_comment_end:W.matching(/-->/),include:W.starting_with(/#include/).until_after(h.lineBreak),shebang:W.starting_with(/#!/).until_after(h.lineBreak),xml:W.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};M.prototype=new o,M.prototype._is_comment=function(K){return K.type===r.COMMENT||K.type===r.BLOCK_COMMENT||K.type===r.UNKNOWN},M.prototype._is_opening=function(K){return K.type===r.START_BLOCK||K.type===r.START_EXPR},M.prototype._is_closing=function(K,A){return(K.type===r.END_BLOCK||K.type===r.END_EXPR)&&A&&(K.text==="]"&&A.text==="["||K.text===")"&&A.text==="("||K.text==="}"&&A.text==="{")},M.prototype._reset=function(){F=!1},M.prototype._get_next_token=function(K,A){var W=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(r.EOF,""):(W=W||this._read_non_javascript(U),W=W||this._read_string(U),W=W||this._read_word(K),W=W||this._read_singles(U),W=W||this._read_comment(U),W=W||this._read_regexp(U,K),W=W||this._read_xml(U,K),W=W||this._read_punctuation(),W=W||this._create_token(r.UNKNOWN,this._input.next()),W)},M.prototype._read_word=function(K){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(h.allLineBreaks,`
`),!(K.type===r.DOT||K.type===r.RESERVED&&(K.text==="set"||K.text==="get"))&&j.test(A)?(A==="in"||A==="of")&&(K.type===r.WORD||K.type===r.STRING)?this._create_token(r.OPERATOR,A):this._create_token(r.RESERVED,A):this._create_token(r.WORD,A);if(A=this.__patterns.number.read(),A!=="")return this._create_token(r.WORD,A)},M.prototype._read_singles=function(K){var A=null;return K==="("||K==="["?A=this._create_token(r.START_EXPR,K):K===")"||K==="]"?A=this._create_token(r.END_EXPR,K):K==="{"?A=this._create_token(r.START_BLOCK,K):K==="}"?A=this._create_token(r.END_BLOCK,K):K===";"?A=this._create_token(r.SEMICOLON,K):K==="."&&R.test(this._input.peek(1))?A=this._create_token(r.DOT,K):K===","&&(A=this._create_token(r.COMMA,K)),A&&this._input.next(),A},M.prototype._read_punctuation=function(){var K=this.__patterns.punct.read();if(K!=="")return K==="="?this._create_token(r.EQUALS,K):K==="?."?this._create_token(r.DOT,K):this._create_token(r.OPERATOR,K)},M.prototype._read_non_javascript=function(K){var A="";if(K==="#"){if(this._is_first_token()&&(A=this.__patterns.shebang.read(),A))return this._create_token(r.UNKNOWN,A.trim()+`
`);if(A=this.__patterns.include.read(),A)return this._create_token(r.UNKNOWN,A.trim()+`
`);K=this._input.next();var W="#";if(this._input.hasNext()&&this._input.testChar(p)){do K=this._input.next(),W+=K;while(this._input.hasNext()&&K!=="#"&&K!=="=");return K==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(W+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(W+="{}",this._input.next(),this._input.next())),this._create_token(r.WORD,W)}this._input.back()}else if(K==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)A+=this._input.next();return F=!0,this._create_token(r.COMMENT,A)}}else if(F&&K==="-"&&(A=this.__patterns.html_comment_end.read(),A))return F=!1,this._create_token(r.COMMENT,A);return null},M.prototype._read_comment=function(K){var A=null;if(K==="/"){var W="";if(this._input.peek(1)==="*"){W=this.__patterns.block_comment.read();var U=E.get_directives(W);U&&U.ignore==="start"&&(W+=E.readIgnored(this._input)),W=W.replace(h.allLineBreaks,`
`),A=this._create_token(r.BLOCK_COMMENT,W),A.directives=U}else this._input.peek(1)==="/"&&(W=this.__patterns.comment.read(),A=this._create_token(r.COMMENT,W))}return A},M.prototype._read_string=function(K){if(K==="`"||K==="'"||K==='"'){var A=this._input.next();return this.has_char_escapes=!1,K==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(K),this.has_char_escapes&&this._options.unescape_strings&&(A=Y(A)),this._input.peek()===K&&(A+=this._input.next()),A=A.replace(h.allLineBreaks,`
`),this._create_token(r.STRING,A)}return null},M.prototype._allow_regexp_or_xml=function(K){return K.type===r.RESERVED&&i(K.text,["return","case","throw","else","do","typeof","yield"])||K.type===r.END_EXPR&&K.text===")"&&K.opened.previous.type===r.RESERVED&&i(K.opened.previous.text,["if","while","for"])||i(K.type,[r.COMMENT,r.START_EXPR,r.START_BLOCK,r.START,r.END_BLOCK,r.OPERATOR,r.EQUALS,r.EOF,r.SEMICOLON,r.COMMA])},M.prototype._read_regexp=function(K,A){if(K==="/"&&this._allow_regexp_or_xml(A)){for(var W=this._input.next(),U=!1,D=!1;this._input.hasNext()&&(U||D||this._input.peek()!==K)&&!this._input.testChar(h.newline);)W+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?D=!0:this._input.peek()==="]"&&(D=!1)),this._input.next();return this._input.peek()===K&&(W+=this._input.next(),W+=this._input.read(h.identifier)),this._create_token(r.STRING,W)}return null},M.prototype._read_xml=function(K,A){if(this._options.e4x&&K==="<"&&this._allow_regexp_or_xml(A)){var W="",U=this.__patterns.xml.read_match();if(U){for(var D=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),X=D.indexOf("{")===0,ie=0;U;){var oe=!!U[1],de=U[2],Ce=!!U[U.length-1]||de.slice(0,8)==="![CDATA[";if(!Ce&&(de===D||X&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--ie:++ie),W+=U[0],ie<=0)break;U=this.__patterns.xml.read_match()}return U||(W+=this._input.match(/[\s\S]*/g)[0]),W=W.replace(h.allLineBreaks,`
`),this._create_token(r.STRING,W)}}return null};function Y(K){for(var A="",W=0,U=new c(K),D=null;U.hasNext();)if(D=U.match(/([\s]|[^\\]|\\\\)+/g),D&&(A+=D[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")D=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")D=U.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",U.hasNext()&&(A+=U.next());continue}if(!D)return K;if(W=parseInt(D[1],16),W>126&&W<=255&&D[0].indexOf("x")===0)return K;if(W>=0&&W<32){A+="\\"+D[0];continue}else W===34||W===39||W===92?A+="\\"+String.fromCharCode(W):A+=String.fromCharCode(W)}return A}M.prototype._read_string_recursive=function(K,A,W){var U,D;K==="'"?D=this.__patterns.single_quote:K==='"'?D=this.__patterns.double_quote:K==="`"?D=this.__patterns.template_text:K==="}"&&(D=this.__patterns.template_expression);for(var X=D.read(),ie="";this._input.hasNext();){if(ie=this._input.next(),ie===K||!A&&h.newline.test(ie)){this._input.back();break}else ie==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ie+=this._input.next()):W&&(W==="${"&&ie==="$"&&this._input.peek()==="{"&&(ie+=this._input.next()),W===ie&&(K==="`"?ie+=this._read_string_recursive("}",A,"`"):ie+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(ie+=this._input.next())));ie+=D.read(),X+=ie}return X},t.exports.Tokenizer=M,t.exports.TOKEN=r,t.exports.positionable_operators=O.slice(),t.exports.line_starters=S.slice()},function(t){var d=RegExp.prototype.hasOwnProperty("sticky");function a(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},a.prototype.peek=function(c){var o=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(o=this.__input.charAt(c)),o},a.prototype.__match=function(c,o){c.lastIndex=o;var n=c.exec(this.__input);return n&&!(d&&c.sticky)&&(n.index!==o&&(n=null)),n},a.prototype.test=function(c,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(c,o):!1},a.prototype.testChar=function(c,o){var n=this.peek(o);return c.lastIndex=0,n!==null&&c.test(n)},a.prototype.match=function(c){var o=this.__match(c,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(c,o,n){var s="",h;return c&&(h=this.match(c),h&&(s+=h[0])),o&&(h||!c)&&(s+=this.readUntil(o,n)),s},a.prototype.readUntil=function(c,o){var n="",s=this.__position;c.lastIndex=this.__position;var h=c.exec(this.__input);return h?(s=h.index,o&&(s+=h[0].length)):s=this.__input_length,n=this.__input.substring(this.__position,s),this.__position=s,n},a.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},a.prototype.get_regexp=function(c,o){var n=null,s="g";return o&&d&&(s="y"),typeof c=="string"&&c!==""?n=new RegExp(c,s):c&&(n=new RegExp(c.source,s)),n},a.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(c){var o=this.__position,n=this.readUntilAfter(c);return this.__position=o,n},a.prototype.lookBack=function(c){var o=this.__position-1;return o>=c.length&&this.__input.substring(o-c.length,o).toLowerCase()===c},t.exports.InputScanner=a},function(t,d,a){var c=a(8).InputScanner,o=a(3).Token,n=a(10).TokenStream,s=a(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(u,i){this._input=new c(u),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var u,i=new o(h.START,""),r=null,E=[],y=new n;i.type!==h.EOF;){for(u=this._get_next_token(i,r);this._is_comment(u);)y.add(u),u=this._get_next_token(i,r);y.isEmpty()||(u.comments_before=y,y=new n),u.parent=r,this._is_opening(u)?(E.push(r),r=u):r&&this._is_closing(u,r)&&(u.opened=r,r.closed=u,r=E.pop(),u.parent=r),u.previous=i,i.next=u,this.__tokens.add(u),i=u}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(u,i){this._readWhitespace();var r=this._input.read(/.+/g);return r?this._create_token(h.RAW,r):this._create_token(h.EOF,"")},f.prototype._is_comment=function(u){return!1},f.prototype._is_opening=function(u){return!1},f.prototype._is_closing=function(u,i){return!1},f.prototype._create_token=function(u,i){var r=new o(u,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return r},f.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=f,t.exports.TOKEN=h},function(t){function d(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position<this.__tokens_length},d.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},d.prototype.peek=function(a){var c=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(c=this.__tokens[a]),c},d.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},t.exports.TokenStream=d},function(t,d,a){var c=a(12).Pattern;function o(n,s){c.call(this,n,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new c,o.prototype.__set_whitespace_patterns=function(n,s){n+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var s=this.__split(this._newline_regexp,n);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return n},o.prototype.matching=function(n,s){var h=this._create();return h.__set_whitespace_patterns(n,s),h._update(),h},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(n,s){n.lastIndex=0;for(var h=0,f=[],u=n.exec(s);u;)f.push(s.substring(h,u.index)),h=u.index+u[0].length,u=n.exec(s);return h<s.length?f.push(s.substring(h,s.length)):f.push(""),f},t.exports.WhitespacePattern=o},function(t){function d(a,c){this._input=a,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}d.prototype.read=function(){var a=this._input.read(this._starting_pattern);return(!this._starting_pattern||a)&&(a+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),a},d.prototype.read_match=function(){return this._input.match(this._match_pattern)},d.prototype.until_after=function(a){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(a),c._update(),c},d.prototype.until=function(a){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(a),c._update(),c},d.prototype.starting_with=function(a){var c=this._create();return c._starting_pattern=this._input.get_regexp(a,!0),c._update(),c},d.prototype.matching=function(a){var c=this._create();return c._match_pattern=this._input.get_regexp(a,!0),c._update(),c},d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){},t.exports.Pattern=d},function(t){function d(a,c){a=typeof a=="string"?a:a.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)c[o[1]]=o[2],o=this.__directive_pattern.exec(a);return c},d.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=d},function(t,d,a){var c=a(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(s,h){c.call(this,s,h),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var f=new c(s);this.__patterns={handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:f.starting_with(/{{{/).until_after(/}}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),php:f.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:f.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:f.starting_with(/{%/).until_after(/%}/),django_value:f.starting_with(/{{/).until_after(/}}/),django_comment:f.starting_with(/{#/).until_after(/#}/),smarty:f.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:f.starting_with(/{\*/).until_after(/\*}/),smarty_literal:f.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new c,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(s){var h=this._create();return h._disabled[s]=!0,h._update(),h},n.prototype.read_options=function(s){var h=this._create();for(var f in o)h._disabled[f]=s.templating.indexOf(f)===-1;return h._update(),h},n.prototype.exclude=function(s){var h=this._create();return h._excluded[s]=!0,h._update(),h},n.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),s+=h,h=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},n.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},n.prototype._read_template=function(){var s="",h=this._input.peek();if(h==="<"){var f=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&f==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&f==="%"&&(s=s||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},t.exports.TemplatablePattern=n}],m={};function w(t){var d=m[t];if(d!==void 0)return d.exports;var a=m[t]={exports:{}};return v[t](a,a.exports,w),a.exports}var b=w(0);T=b})();var N=T;!(P=[],g=function(){return{js_beautify:N}}.apply(q,P),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,q,L){"use strict";function P(g){return null}q.a=P},"746U":function(H,q,L){"use strict";L.d(q,"f",function(){return P}),L.d(q,"l",function(){return g}),L.d(q,"k",function(){return T}),L.d(q,"j",function(){return N}),L.d(q,"g",function(){return v}),L.d(q,"m",function(){return m}),L.d(q,"h",function(){return w}),L.d(q,"n",function(){return b}),L.d(q,"c",function(){return t}),L.d(q,"a",function(){return d}),L.d(q,"i",function(){return a}),L.d(q,"o",function(){return c}),L.d(q,"e",function(){return s}),L.d(q,"d",function(){return h}),L.d(q,"p",function(){return f}),L.d(q,"b",function(){return u});function P(i){return Array.isArray(i)}function g(i){return typeof i=="string"}function T(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function N(i){return typeof i=="number"&&!isNaN(i)}function v(i){return i===!0||i===!1}function m(i){return typeof i=="undefined"}function w(i){return!b(i)}function b(i){return m(i)||i===null}function t(i,r){if(!i)throw new Error(r?`Unexpected type, expected '${r}'`:"Unexpected type")}function d(i){if(b(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function a(i){return typeof i=="function"}function c(i,r){const E=Math.min(i.length,r.length);for(let y=0;y<E;y++)o(i[y],r[y])}function o(i,r){if(g(r)){if(typeof i!==r)throw new Error(`argument does not match constraint: typeof ${r}`)}else if(a(r)){try{if(i instanceof r)return}catch(E){}if(!b(i)&&i.constructor===r)return;if(r.length===1&&r.call(void 0,i)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function n(i){let r=[],E=Object.getPrototypeOf(i);for(;Object.prototype!==E;)r=r.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return r}function s(i){const r=[];for(const E of n(i))typeof i[E]=="function"&&r.push(E);return r}function h(i,r){const E=p=>function(){const R=Array.prototype.slice.call(arguments,0);return r(p,R)};let y={};for(const p of i)y[p]=E(p);return y}function f(i){return i===null?void 0:i}function u(i,r="Unreachable"){throw new Error(r)}},"7Cbv":function(H,q,L){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function T(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(g)}var N=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function v(o){return typeof o=="string"&&N.test(o)}for(var m=v,w=[],b=0;b<256;++b)w.push((b+256).toString(16).substr(1));function t(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(w[o[n+0]]+w[o[n+1]]+w[o[n+2]]+w[o[n+3]]+"-"+w[o[n+4]]+w[o[n+5]]+"-"+w[o[n+6]]+w[o[n+7]]+"-"+w[o[n+8]]+w[o[n+9]]+"-"+w[o[n+10]]+w[o[n+11]]+w[o[n+12]]+w[o[n+13]]+w[o[n+14]]+w[o[n+15]]).toLowerCase();if(!m(s))throw TypeError("Stringified UUID is invalid");return s}var d=t;function a(o,n,s){o=o||{};var h=o.random||(o.rng||T)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,n){s=s||0;for(var f=0;f<16;++f)n[s+f]=h[f];return n}return d(h)}var c=q.a=a},"7ahc":function(H,q,L){"use strict";L.d(q,"a",function(){return E});var P=L("k1fw"),g=L("0Owb"),T=L("+L6B"),N=L("2/Rp"),v=L("y8nQ"),m=L("Vl3Y"),w=L("tJVT"),b=L("OaEy"),t=L("2fM7"),d=L("q1tI"),a=L.n(d),c=L("VrN/"),o=L.n(c),n=L("p77/"),s=L.n(n),h=L("c5Ni"),f=L.n(h),u=t.a.Option,i={labelCol:{span:4},wrapperCol:{span:20}},r={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};q.b=function(y){var p=y.callback,R=y.onCancel,O=Object(d.useState)("python"),_=Object(w.a)(O,2),x=_[0],S=_[1];function C(F){S(r[F][1])}function j(F){p(F)}return a.a.createElement(m.a,Object(g.a)({},i,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:j}),a.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},a.a.createElement(t.a,{onChange:C},Object.keys(r).map(function(F){return a.a.createElement(u,{key:F,value:F},r[F][0])}))),a.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},a.a.createElement(E,{mode:x})),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(N.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(N.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function E(y){var p=y.value,R=y.onChange,O=y.mode,_=y.options,x=_===void 0?{}:_,S=Object(d.useRef)(),C=Object(d.useState)(),j=Object(w.a)(C,2),F=j[0],M=j[1];return Object(d.useEffect)(function(){if(F){function Y(K){var A=K.getValue();R&&R(A)}return F.on("change",Y),function(){F.off("change",Y)}}},[F,R]),Object(d.useEffect)(function(){F&&F.setOption("mode",O)},[F,O]),Object(d.useEffect)(function(){F&&((p!==F.getValue()||p==="")&&setTimeout(function(){F.setValue(p||" ")},300))},[F,p]),Object(d.useEffect)(function(){if(S.current&&!F){var Y=o.a.fromTextArea(S.current,Object(P.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));M(Y)}},[S.current,F]),a.a.createElement("div",{className:"my-codemirror-container"},a.a.createElement("textarea",{ref:S}))}},"815F":function(H,q,L){"use strict";L.d(q,"e",function(){return w}),L.d(q,"c",function(){return t}),L.d(q,"d",function(){return d}),L.d(q,"a",function(){return c}),L.d(q,"f",function(){return o}),L.d(q,"b",function(){return n});var P=L("KQm4"),g=L("VTBJ"),T=L("Ff2n"),N=L("Zm9Q"),v=L("Kwbf"),m=L("OZM5");function w(s,h){return s!=null?s:h}function b(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function f(u){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(r){var E=r.key,y=r.children;Object(v.a)(E!=null,"Tree node must have a certain key: [".concat(i).concat(E,"]"));var p=String(E);Object(v.a)(!h.has(p)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(p)),h.set(p,!0),f(y,"".concat(i).concat(p," > "))})}f(s)}function t(s){function h(f){var u=Object(N.a)(f);return u.map(function(i){if(!Object(m.i)(i))return Object(v.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var r=i.key,E=i.props,y=E.children,p=Object(T.a)(E,["children"]),R=Object(g.a)({key:r},p),O=h(y);return O.length&&(R.children=O),R}).filter(function(i){return i})}return h(s)}function d(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=new Set(h===!0?[]:h),u=[];function i(r){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.map(function(y,p){var R=Object(m.h)(E?E.pos:"0",p),O=w(y.key,R),_=Object(g.a)(Object(g.a)({},y),{},{parent:E,pos:R,children:null,data:y,isStart:[].concat(Object(P.a)(E?E.isStart:[]),[p===0]),isEnd:[].concat(Object(P.a)(E?E.isEnd:[]),[p===r.length-1])});return u.push(_),h===!0||f.has(O)?_.children=i(y.children||[],_):_.children=[],_})}return i(s),u}function a(s,h,f){var u;f?typeof f=="string"?u=function(E){return E[f]}:typeof f=="function"&&(u=function(E){return f(E)}):u=function(E,y){return w(E.key,y)};function i(r,E,y){var p=r?r.children:s,R=r?Object(m.h)(y.pos,E):"0";if(r){var O=u(r,R),_={node:r,index:E,pos:R,key:O,parentPos:y.node?y.pos:null,level:y.level+1};h(_)}p&&p.forEach(function(x,S){i(x,S,{node:r,pos:R,level:y?y.level+1:-1})})}i(null)}function c(s){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=h.initWrapper,u=h.processEntity,i=h.onProcessFinished,r=arguments.length>2?arguments[2]:void 0,E={},y={},p={posEntities:E,keyEntities:y};return f&&(p=f(p)||p),a(s,function(R){var O=R.node,_=R.index,x=R.pos,S=R.key,C=R.parentPos,j=R.level,F={node:O,index:_,key:S,pos:x,level:j},M=w(S,x);E[x]=F,y[M]=F,F.parent=E[C],F.parent&&(F.parent.children=F.parent.children||[],F.parent.children.push(F)),u&&u(F,p)},r),i&&i(p),p}function o(s,h){var f=h.expandedKeys,u=h.selectedKeys,i=h.loadedKeys,r=h.loadingKeys,E=h.checkedKeys,y=h.halfCheckedKeys,p=h.dragOverNodeKey,R=h.dropPosition,O=h.keyEntities,_=O[s],x={eventKey:s,expanded:f.indexOf(s)!==-1,selected:u.indexOf(s)!==-1,loaded:i.indexOf(s)!==-1,loading:r.indexOf(s)!==-1,checked:E.indexOf(s)!==-1,halfChecked:y.indexOf(s)!==-1,pos:String(_?_.pos:""),dragOver:p===s&&R===0,dragOverGapTop:p===s&&R===-1,dragOverGapBottom:p===s&&R===1};return x}function n(s){var h=s.data,f=s.expanded,u=s.selected,i=s.checked,r=s.loaded,E=s.loading,y=s.halfChecked,p=s.dragOver,R=s.dragOverGapTop,O=s.dragOverGapBottom,_=s.pos,x=s.active,S=Object(g.a)(Object(g.a)({},h),{},{expanded:f,selected:u,checked:i,loaded:r,loading:E,halfChecked:y,dragOver:p,dragOverGapTop:R,dragOverGapBottom:O,pos:_,active:x});return"props"in S||Object.defineProperty(S,"props",{get:function(){return Object(v.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),S}},"8EBN":function(H,q,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g<P.modeInfo.length;g++){var T=P.modeInfo[g];T.mimes&&(T.mime=T.mimes[0])}P.findModeByMIME=function(N){N=N.toLowerCase();for(var v=0;v<P.modeInfo.length;v++){var m=P.modeInfo[v];if(m.mime==N)return m;if(m.mimes){for(var w=0;w<m.mimes.length;w++)if(m.mimes[w]==N)return m}}if(/\+xml$/.test(N))return P.findModeByMIME("application/xml");if(/\+json$/.test(N))return P.findModeByMIME("application/json")},P.findModeByExtension=function(N){N=N.toLowerCase();for(var v=0;v<P.modeInfo.length;v++){var m=P.modeInfo[v];if(m.ext){for(var w=0;w<m.ext.length;w++)if(m.ext[w]==N)return m}}},P.findModeByFileName=function(N){for(var v=0;v<P.modeInfo.length;v++){var m=P.modeInfo[v];if(m.file&&m.file.test(N))return m}var w=N.lastIndexOf("."),b=w>-1&&N.substring(w+1,N.length);if(b)return P.findModeByExtension(b)},P.findModeByName=function(N){N=N.toLowerCase();for(var v=0;v<P.modeInfo.length;v++){var m=P.modeInfo[v];if(m.name.toLowerCase()==N)return m;if(m.alias){for(var w=0;w<m.alias.length;w++)if(m.alias[w].toLowerCase()==N)return m}}}})},"8HAY":function(H,q,L){"use strict";L.d(q,"a",function(){return v}),L.d(q,"b",function(){return m}),L.d(q,"d",function(){return w}),L.d(q,"e",function(){return b}),L.d(q,"c",function(){return t});var P=L("MI8n"),g=L("pmY6"),T=L("3/fG"),N=function(d,a,c,o){function n(s){return s instanceof c?s:new c(function(h){h(s)})}return new(c||(c=Promise))(function(s,h){function f(r){try{i(o.next(r))}catch(E){h(E)}}function u(r){try{i(o.throw(r))}catch(E){h(E)}}function i(r){r.done?s(r.value):n(r.value).then(f,u)}i((o=o.apply(d,a||[])).next())})};class v extends g.a{constructor(d,a="",c="",o=!0,n){super();this._onDidChange=this._register(new P.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=d,this._label=a,this._cssClass=c,this._enabled=o,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(d){this._setLabel(d)}_setLabel(d){this._label!==d&&(this._label=d,this._onDidChange.fire({label:d}))}get tooltip(){return this._tooltip||""}set tooltip(d){this._setTooltip(d)}_setTooltip(d){this._tooltip!==d&&(this._tooltip=d,this._onDidChange.fire({tooltip:d}))}get class(){return this._cssClass}set class(d){this._setClass(d)}_setClass(d){this._cssClass!==d&&(this._cssClass=d,this._onDidChange.fire({class:d}))}get enabled(){return this._enabled}set enabled(d){this._setEnabled(d)}_setEnabled(d){this._enabled!==d&&(this._enabled=d,this._onDidChange.fire({enabled:d}))}get checked(){return this._checked}set checked(d){this._setChecked(d)}_setChecked(d){this._checked!==d&&(this._checked=d,this._onDidChange.fire({checked:d}))}run(d,a){return N(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(d))})}}class m extends g.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new P.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new P.b),this.onDidRun=this._onDidRun.event}run(d,a){return N(this,void 0,void 0,function*(){if(!d.enabled)return;this._onBeforeRun.fire({action:d});let c;try{yield this.runAction(d,a)}catch(o){c=o}this._onDidRun.fire({action:d,error:c})})}runAction(d,a){return N(this,void 0,void 0,function*(){yield d.run(a)})}}class w extends v{constructor(d){super(w.ID,d,d?"separator text":"separator");this.checked=!1,this.enabled=!1}}w.ID="vs.actions.separator";class b{constructor(d,a,c,o){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=d,this.label=a,this.class=o,this._actions=c}get actions(){return this._actions}dispose(){}run(){return N(this,void 0,void 0,function*(){})}}class t extends v{constructor(){super(t.ID,T.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8hTe":function(H,q,L){H.exports={button:"button___1wy9m"}},"9Bee":function(H,q,L){"use strict";var P=L("DYRE"),g=L("zeV3"),T=L("+L6B"),N=L("2/Rp"),v=L("k1fw"),m=L("9og8"),w=L("tJVT"),b=L("WmNS"),t=L.n(b),d=L("q1tI"),a=L.n(d),c=L("vg9a"),o=L("DlQD"),n=L.n(o),s=L("rUJ1");function h(_e,ce){var fe=_e.match(/^(\s+)(?:```)/);if(fe===null)return ce;var ve=fe[1];return ce.split(`
`).map(function(Oe){var ge=Oe.match(/^\s+/);if(ge===null)return Oe;var Ee=Object(w.a)(ge,1),Re=Ee[0];return Re.length>=ve.length?Oe.slice(ve.length):Oe}).join(`
`)}var f=[],u=["<ul>"],i=new n.a.Renderer,r=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){f.length=0,u=["<ul>"]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(_e,ce,fe,ve){if(ce>=_e.length||_e[ce].level<=fe)return ce;var Oe=_e[ce];ve.push("<li><a href='#"+Oe.anchor+"'>"+Oe.text+"</a>"),ce++;var ge=[];return ce=p(_e,ce,Oe.level,ge),ge.length>0&&(ve.push("<ul>"),ge.forEach(function(Ee){ve.push(Ee)}),ve.push("</ul>")),ve.push("</li>"),ce=p(_e,ce,fe,ve),ce}function R(){return p(f,0,0,u),u.push("</ul>"),u.join("")}var O={heading:function(ce){var fe=r.exec(ce);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},fences:function(ce){var fe=this.rules.block.fences.exec(ce);if(fe){var ve=fe[0],Oe=h(ve,fe[3]||""),ge=fe[2]?fe[2].trim():fe[2];if(["latex","katex","math"].indexOf(ge)>=0){var Ee=S(),Re=Oe;Oe=Ee,C[Ee]={type:"block",expression:Re}}return{type:"code",raw:ve,lang:ge,text:Oe}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,S=function(){return"__special_katext_id_".concat(x++,"__")},C={};function j(){return C}function F(){x=0,C={}}function M(_e){return _e=_e.replace(_,function(ce,fe){var ve=S();return C[ve]={type:"inline",expression:fe},ve}),_e}var Y=i.listitem;i.listitem=function(_e){return Y(M(_e))};var K=i.paragraph;i.paragraph=function(_e){return K(M(_e))};var A=i.tablecell;i.tablecell=function(_e,ce){return A(M(_e),ce)},i.code=function(_e,ce,fe){var ve=(ce||"").match(/\S*/)[0];return ve?["latex","katex","math"].indexOf(ve)>=0?"<p class='editormd-tex'>".concat(_e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ce,'">').concat(fe?_e:Object(s.escape)(_e,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(fe?_e:Object(s.escape)(_e,!0))+"</code></pre>"},i.heading=function(_e,ce,fe){var ve=this.options.headerPrefix+fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:ve,level:ce,text:_e}),"<h"+ce+' id="'+ve+'">'+_e+"</h"+ce+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:O,renderer:i});var W=n.a,U=L("SJMd"),D=L("ulZh"),X=L.n(D),ie=L("m3rI"),oe=L("Oy/b"),de=L("p5ED"),Ce=L("ErOA"),Ae=L("STEk");/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var me=function(_e,ce){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ve){fe.__proto__=ve}||function(fe,ve){for(var Oe in ve)Object.prototype.hasOwnProperty.call(ve,Oe)&&(fe[Oe]=ve[Oe])})(_e,ce)};function Se(_e,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Class extends value "+String(ce)+" is not a constructor or null");function fe(){this.constructor=_e}me(_e,ce),_e.prototype=ce===null?Object.create(ce):(fe.prototype=ce.prototype,new fe)}function ye(_e,ce,fe,ve){return new(fe||(fe=Promise))(function(Oe,ge){function Ee(Pe){try{Le(ve.next(Pe))}catch(Ke){ge(Ke)}}function Re(Pe){try{Le(ve.throw(Pe))}catch(Ke){ge(Ke)}}function Le(Pe){var Ke;Pe.done?Oe(Pe.value):(Ke=Pe.value,Ke instanceof fe?Ke:new fe(function(it){it(Ke)})).then(Ee,Re)}Le((ve=ve.apply(_e,ce||[])).next())})}function se(_e,ce){var fe,ve,Oe,ge,Ee={label:0,sent:function(){if(1&Oe[0])throw Oe[1];return Oe[1]},trys:[],ops:[]};return ge={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function Re(Le){return function(Pe){return function(Ke){if(fe)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(fe=1,ve&&(Oe=2&Ke[0]?ve.return:Ke[0]?ve.throw||((Oe=ve.return)&&Oe.call(ve),0):ve.next)&&!(Oe=Oe.call(ve,Ke[1])).done)return Oe;switch(ve=0,Oe&&(Ke=[2&Ke[0],Oe.value]),Ke[0]){case 0:case 1:Oe=Ke;break;case 4:return Ee.label++,{value:Ke[1],done:!1};case 5:Ee.label++,ve=Ke[1],Ke=[0];continue;case 7:Ke=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(Oe=Ee.trys,(Oe=Oe.length>0&&Oe[Oe.length-1])||Ke[0]!==6&&Ke[0]!==2)){Ee=0;continue}if(Ke[0]===3&&(!Oe||Ke[1]>Oe[0]&&Ke[1]<Oe[3])){Ee.label=Ke[1];break}if(Ke[0]===6&&Ee.label<Oe[1]){Ee.label=Oe[1],Oe=Ke;break}if(Oe&&Ee.label<Oe[2]){Ee.label=Oe[2],Ee.ops.push(Ke);break}Oe[2]&&Ee.ops.pop(),Ee.trys.pop();continue}Ke=ce.call(_e,Ee)}catch(it){Ke=[6,it],ve=0}finally{fe=Oe=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([Le,Pe])}}}var ee=function(){function _e(){}return _e.addKey=function(ce){_e.key=ce},Object.defineProperty(_e,"isLicensed",{get:function(){return!!_e.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(_e.key)},enumerable:!1,configurable:!0}),_e}(),B=function(){function _e(){}return _e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},_e.setAttributes=function(ce,fe){for(var ve=0,Oe=fe;ve<Oe.length;ve++){var ge=Oe[ve],Ee=ge[0],Re=ge[1];ce.setAttribute(Ee,Re)}},_e.createRect=function(ce,fe,ve){var Oe=document.createElementNS("http://www.w3.org/2000/svg","rect");return Oe.setAttribute("width",ce.toString()),Oe.setAttribute("height",fe.toString()),ve&&_e.setAttributes(Oe,ve),Oe},_e.createLine=function(ce,fe,ve,Oe,ge){var Ee=document.createElementNS("http://www.w3.org/2000/svg","line");return Ee.setAttribute("x1",ce.toString()),Ee.setAttribute("y1",fe.toString()),Ee.setAttribute("x2",ve.toString()),Ee.setAttribute("y2",Oe.toString()),ge&&_e.setAttributes(Ee,ge),Ee},_e.createPolygon=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ve.setAttribute("points",ce),fe&&_e.setAttributes(ve,fe),ve},_e.createCircle=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","circle");return ve.setAttribute("cx",(ce/2).toString()),ve.setAttribute("cy",(ce/2).toString()),ve.setAttribute("r",ce.toString()),fe&&_e.setAttributes(ve,fe),ve},_e.createEllipse=function(ce,fe,ve){var Oe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Oe.setAttribute("cx",(ce/2).toString()),Oe.setAttribute("cy",(fe/2).toString()),Oe.setAttribute("rx",(ce/2).toString()),Oe.setAttribute("ry",(fe/2).toString()),ve&&_e.setAttributes(Oe,ve),Oe},_e.createGroup=function(ce){var fe=document.createElementNS("http://www.w3.org/2000/svg","g");return ce&&_e.setAttributes(fe,ce),fe},_e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},_e.createMarker=function(ce,fe,ve,Oe,ge,Ee,Re){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return _e.setAttributes(Le,[["id",ce],["orient",fe],["markerWidth",ve.toString()],["markerHeight",Oe.toString()],["refX",ge.toString()],["refY",Ee.toString()]]),Le.appendChild(Re),Le},_e.createText=function(ce){var fe=document.createElementNS("http://www.w3.org/2000/svg","text");return fe.setAttribute("x","0"),fe.setAttribute("y","0"),ce&&_e.setAttributes(fe,ce),fe},_e.createTSpan=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ve.textContent=ce,fe&&_e.setAttributes(ve,fe),ve},_e.createImage=function(ce){var fe=document.createElementNS("http://www.w3.org/2000/svg","image");return ce&&_e.setAttributes(fe,ce),fe},_e.createPoint=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ve.x=ce,ve.y=fe,ve},_e.createPath=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","path");return ve.setAttribute("d",ce),fe&&_e.setAttributes(ve,fe),ve},_e.createElement=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg",ce);return fe&&_e.setAttributes(ve,fe),ve},_e.getHollowRectanglePath=function(ce,fe,ve,Oe,ge,Ee,Re,Le){return"M"+ce+","+fe+"V"+(fe+Oe)+"H"+(ce+ve)+"V"+fe+"H"+ge+"V"+Ee+"H"+(ge+Re)+"V"+(Ee+Le)+"H"+ge+"V"+fe+"Z"},_e}(),G=function(){function _e(ce){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ce+"_"}return Object.defineProperty(_e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(_e.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(_e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),_e.prototype.addClass=function(ce){return this.styleSheet===void 0&&this.addStyleSheet(),ce.name=""+this.classNamePrefix+ce.localName,this.classes.push(ce),this.styleSheet.sheet.insertRule("."+ce.name+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length),ce},_e.prototype.addRule=function(ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ce),this.styleSheet.sheet.insertRule(ce.selector+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length)},_e.prototype.addStyleSheet=function(){var ce;this.styleSheet=document.createElement("style"),((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).appendChild(this.styleSheet),this.addRule(new V("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new V("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new V("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Q("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Q("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},_e.prototype.removeStyleSheet=function(){var ce;this.styleSheet&&(((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},_e}(),V=function(_e,ce){this.selector=_e,this.style=ce},Q=function(_e,ce){this.localName=_e,this.style=ce},Z=function(){function _e(){this.blocks=[],this.display=""}return _e.prototype.addButtonBlock=function(ce){ce.className=this.blockClassName,ce.buttonClassName=this.buttonClassName,ce.buttonColorsClassName=this.buttonColorsClassName,ce.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(ce)},_e.prototype.addElementBlock=function(ce){ce.className===void 0&&(ce.className=this.blockClassName),this.blocks.push(ce)},_e.prototype.getUI=function(){var ce=document.createElement("div");return ce.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,ce.style.display=this.display,this.blocks.forEach(function(fe){return ce.appendChild(fe.getUI())}),ce},_e}(),ne=function(){function _e(){}return _e.prototype.getUI=function(){var ce=document.createElement("div");if(ce.className=this.className,this.minWidth!==void 0&&(ce.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":ce.style.justifyContent="flex-start";break;case"center":ce.style.justifyContent="center";break;case"end":ce.style.justifyContent="flex-end"}return ce.style.whiteSpace="nowrap",ce},_e}(),re=function(_e){function ce(){var fe=_e!==null&&_e.apply(this,arguments)||this;return fe.buttons=[],fe}return Se(ce,_e),ce.prototype.addButton=function(fe){fe.className=this.buttonClassName,fe.colorsClassName=this.buttonColorsClassName,fe.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(fe)},ce.prototype.getUI=function(){var fe=_e.prototype.getUI.call(this);return this.buttons.forEach(function(ve){return fe.appendChild(ve.getUI())}),fe},ce}(ne),$=function(){function _e(ce,fe){this._isActive=!1,this._isHidden=!1,this._icon=ce,this.title=fe,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(_e.prototype,"icon",{get:function(){return this._icon},set:function(ce){this._icon=ce,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isActive",{get:function(){return this._isActive},set:function(ce){this._isActive=ce,this.adjustClassName()},enumerable:!1,configurable:!0}),_e.prototype.getUI=function(){var ce=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 ce.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},_e.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,"")))},_e.prototype.hide=function(){this._isHidden=!0},_e}(),J=function(_e){function ce(){var fe=_e!==null&&_e.apply(this,arguments)||this;return fe.elements=[],fe}return Se(ce,_e),ce.prototype.addElement=function(fe){this.elements.push(fe)},ce.prototype.getUI=function(){var fe=_e.prototype.getUI.call(this);return this.elements.forEach(function(ve){return fe.appendChild(ve)}),fe},ce}(ne),le=function(){function _e(ce,fe){this.horizontal=ce,this.vertical=fe}return Object.defineProperty(_e.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),_e.prototype.getVerticalLength=function(ce){return ce/this.ratio},_e.prototype.getHorizontalLength=function(ce){return ce*this.ratio},_e}(),ue=function(){function _e(){}return _e.getIcon=function(ce,fe){if(ce>0&&fe>0){var ve=new le(ce,fe),Oe=ve.ratio>=1?20:ve.getHorizontalLength(20),ge=ve.ratio<1?20:ve.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Re=B.createDefs();Ee.appendChild(Re);var Le=B.createElement("clipPath",[["id","text-bg-clip"]]);Re.appendChild(Le);var Pe=B.createPath(B.getHollowRectanglePath((24-Oe)/2,(24-ge)/2,Oe,ge,(24-Oe)/2+2,(24-ge)/2+2,Oe-4,ge-4));Ee.appendChild(Pe);var Ke=B.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ke.appendChild(B.createTSpan(ce+":"+fe)),Ee.appendChild(Ke);var it=Ke.getBBox();B.setAttributes(Ke,[["x",((24-it.width)/2).toString()],["y",((24-it.height)/2-it.y).toString()]]);var st=B.createPath(B.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(it.width))/2,(24-Math.ceil(it.height))/2,Math.ceil(it.width),Math.ceil(it.height)));return Le.appendChild(st),B.setAttributes(Pe,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.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>'},_e}(),we=function(_e){function ce(fe,ve,Oe){var ge=_e.call(this,fe,ve)||this;return ge.isDropdownOpen=!1,ge.onClick=ge.dropdownButtonClicked,ge.dropdownButtons=Oe,ge}return Se(ce,_e),ce.prototype.setupDropdown=function(){var fe=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ve){ve.className=fe.className,ve.colorsClassName=fe.colorsClassName,fe.dropdownBlock.appendChild(ve.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ce.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ce.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ce.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ce.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ce.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ce}($),Fe=function(){function _e(ce,fe){this.GRIP_SIZE=10,this.color=ce,this.fillColor=fe,this.visual=B.createGroup(),this.visual.appendChild(B.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(B.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return _e.prototype.ownsTarget=function(ce){return ce===this.visual||ce===this.visual.childNodes[0]||ce===this.visual.childNodes[1]},_e.prototype.setCenter=function(ce,fe){this.visual.childNodes.forEach(function(ve){return B.setAttributes(ve,[["cx",ce.toString()],["cy",fe.toString()]])})},_e}(),Xe=function(){function _e(ce,fe,ve,Oe){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ce,this.canvasHeight=fe,this.margin=ve,this.container=Oe,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(_e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ce){this._aspectRatio=ce,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ce){this._isGridVisible=ce,this.gridContainer&&B.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ce){this._zoomFactor=ce,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),_e.prototype.open=function(){var ce=this;this.cropShadeElement=B.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=B.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var fe=0;fe<this.numberOfGridLines;fe++)this.horizontalGridLines.push(B.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(B.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ve){return ce.gridContainer.appendChild(ve)}),this.verticalGridLines.forEach(function(ve){return ce.gridContainer.appendChild(ve)}),this.cropRectElement=B.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},_e.prototype.setCropRectangle=function(ce){this.cropRect=ce;var fe=Object.assign({},this.cropRect);this.zoomFactor!==1&&(fe.width=this.cropRect.width*this.zoomFactor,fe.height=this.cropRect.height*this.zoomFactor,fe.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-fe.width/2,fe.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-fe.height/2),B.setAttributes(this.cropRectElement,[["x",fe.x.toString()],["y",fe.y.toString()],["width",fe.width.toString()],["height",fe.height.toString()]]);var ve=fe.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ge,Ee){var Re=fe.y+ve*(Ee+1);B.setAttributes(ge,[["x1",""+fe.x],["y1",""+Re],["x2",""+(fe.x+fe.width)],["y2",""+Re]])});var Oe=fe.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ge,Ee){var Re=fe.x+Oe*(Ee+1);B.setAttributes(ge,[["x1",""+Re],["y1",""+fe.y],["x2",""+Re],["y2",""+(fe.y+fe.height)]])}),B.setAttributes(this.cropShadeElement,[["d",B.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,fe.x,fe.y,fe.width,fe.height)]]),this.topLeftGrip.setCenter(fe.x,fe.y),this.topRightGrip.setCenter(fe.x+fe.width,fe.y),this.bottomLeftGrip.setCenter(fe.x,fe.y+fe.height),this.bottomRightGrip.setCenter(fe.x+fe.width,fe.y+fe.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},_e.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)},_e.prototype.clientToLocalCoordinates=function(ce,fe){var ve=this.container.getBoundingClientRect();return{x:ce-ve.left+this.margin,y:fe-ve.top+this.margin}},_e.prototype.onPointerDown=function(ce){this.container.setPointerCapture(ce.pointerId),this.previousPoint=this.clientToLocalCoordinates(ce.clientX,ce.clientY),this.cropRectElement===ce.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ce.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ce.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ce.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ce.target)&&(this.activeGrip=this.bottomRightGrip)},_e.prototype.onPointerMove=function(ce){if(this.isMoving)this.move(this.clientToLocalCoordinates(ce.clientX,ce.clientY));else if(this.activeGrip){var fe=this.clientToLocalCoordinates(ce.clientX,ce.clientY);this.resize(fe)}ce.preventDefault()},_e.prototype.onPointerUp=function(ce){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ce.pointerId)},_e.prototype.move=function(ce){var fe=ce.x-this.previousPoint.x,ve=ce.y-this.previousPoint.y;this.zoomFactor!==1&&(fe=-fe/this.zoomFactor,ve=-ve/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+fe),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ve),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ce},_e.prototype.resize=function(ce){var fe=Object.assign({},this.cropRect),ve=ce.x-this.previousPoint.x,Oe=ce.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:fe.x+ve<this.margin&&(ve=this.margin-fe.x),fe.x+=ve,fe.width=this.cropRect.x+this.cropRect.width-fe.x;break;case this.bottomRightGrip:case this.topRightGrip:fe.width+ve>this.canvasWidth*this.zoomFactor&&(ve=this.canvasWidth*this.zoomFactor-fe.width),fe.width+=ve}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(fe.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ve),fe.height=this.aspectRatio.getVerticalLength(fe.width)):(fe.y+=Oe,fe.height=this.cropRect.y+this.cropRect.height-fe.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?fe.height=this.aspectRatio.getVerticalLength(fe.width):fe.height+=Oe}fe.width<10&&(fe.x=this.cropRect.x,fe.width=10),fe.height<10&&(fe.y=this.cropRect.y,fe.height=10),this.previousPoint=ce,fe.x>=this.margin&&fe.y>=this.margin&&fe.x-this.margin+fe.width<=this.canvasWidth&&fe.y-this.margin+fe.height<=this.canvasHeight&&(this.cropRect=fe,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},_e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ce=this.cropRect.x+this.cropRect.width/2,fe=this.cropRect.y+this.cropRect.height/2,ve=this.aspectRatio.getHorizontalLength(this.cropRect.height),Oe=this.aspectRatio.getVerticalLength(this.cropRect.width);ve/this.canvasWidth<Oe/this.canvasHeight?this.cropRect.width=ve:this.cropRect.height=Oe,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=ce-this.cropRect.width/2,this.cropRect.y=fe-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)}},_e.prototype.getRescaledRect=function(ce,fe,ve,Oe,ge,Ee){var Re=ve/ce,Le=Oe/fe;return{x:(ge.x-Ee)*Re+Ee,y:(ge.y-Ee)*Le+Ee,width:ge.width*Re,height:ge.height*Le}},_e.prototype.scaleCanvas=function(ce,fe){var ve=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ce,fe,this.cropRect,this.margin);this.canvasWidth=ce,this.canvasHeight=fe,this.onCropChange&&this.onCropChange(ve),this.setCropRectangle(ve)},_e}(),$e=function(){function _e(ce){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ce,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(_e.prototype,"angle",{get:function(){return this._angle},set:function(ce){this._angle=ce,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),_e.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},_e.prototype.onPointerDown=function(ce){this.controlContainer.setPointerCapture(ce.pointerId),this.isDragging=!0,this.previousPoint={x:ce.clientX,y:ce.clientY}},_e.prototype.onPointerMove=function(ce){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ce.clientX-this.previousPoint.x)/5),this.previousPoint.x=ce.clientX)},_e.prototype.onPointerUp=function(ce){this.isDragging&&this.onAngleChange&&this.onAngleChange((ce.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ce.pointerId)},_e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ce=this.angleLabelText.getBBox();B.setAttributes(this.angleLabelElement,[["x",((this.width-ce.width)/2).toString()],["y",(this.height/2).toString()]])}},_e.prototype.positionScaleShape=function(){if(this.scaleShape){var ce=this.scaleShape.transform.baseVal.getItem(0);ce.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ce,0)}},_e.prototype.getVisual=function(){var ce=document.createElementNS("http://www.w3.org/2000/svg","svg");ce.setAttribute("xmlns","http://www.w3.org/2000/svg"),ce.setAttribute("width",this.width+"px"),ce.setAttribute("height",this.height+"px"),ce.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ce.style.flexShrink="0",document.body.appendChild(ce);for(var fe="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ve=1;ve<=this.width/5+10;ve++){var Oe=ve%5==0?this.height/3:this.height/6;fe+="h4v"+-Oe+"h1v"+Oe}fe+="v1H0Z",this.scaleShape=B.createPath(fe);var ge=B.createTransform();this.scaleShape.transform.baseVal.appendItem(ge),ce.appendChild(this.scaleShape),this.angleLabelElement=B.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=B.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=B.createTSpan("");return Ee.innerHTML="&deg;",this.angleLabelElement.appendChild(Ee),ce.appendChild(this.angleLabelElement),document.body.removeChild(ce),ce},_e}(),et=function(){function _e(){this.naturalSize=!1,this.imageType="image/png"}return _e.prototype.rasterize=function(ce,fe,ve,Oe,ge,Ee,Re){var Le=this;return new Promise(function(Pe){var Ke=document.createElement("canvas");Ke.width=ce.width.baseVal.value-2*Oe,Ke.height=ce.height.baseVal.value-2*Oe;var it=1,st=1;Le.naturalSize===!0?(it=fe.naturalWidth/(ce.width.baseVal.value-2*Oe)/Ee,st=fe.naturalHeight/(ce.height.baseVal.value-2*Oe)/Re,Ke.width=fe.naturalWidth/Ee,Ke.height=fe.naturalHeight/Re):Le.width!==void 0&&Le.height!==void 0&&(it=Le.width/ve.width,st=Le.height/ve.height,Ke.width*=it,Ke.height*=st);var Ot=Ke.getContext("2d");Ot.translate(Ke.width/2,Ke.height/2),Ot.rotate(ge*Math.PI/180),Ot.scale(Ee,Re),Ot.translate(-Ke.width/2,-Ke.height/2),Ot.drawImage(fe,0,0,Ke.width,Ke.height);var Rt=document.createElement("canvas");Rt.width=ve.width*it,Rt.height=ve.height*st,Rt.getContext("2d").putImageData(Ot.getImageData((ve.x-Oe)*it,(ve.y-Oe)*st,ve.width*it,ve.height*st),0,0),Pe(Rt.toDataURL(Le.imageType,Le.imageQuality))})},_e}(),nt=function(){function _e(ce){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=_e.instanceCounter++,this.styles=new G(this.instanceNo),this.target=ce,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(_e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ce){this._zoomToCropEnabled=ce,ce?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ce){this._isGridVisible=ce,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ce){this._gridLines=ce,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ce){this._rotationAngle=ce,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"aspectRatio",{get:function(){var ce;return(ce=this._aspectRatio)!==null&&ce!==void 0?ce:this.aspectRatios[0]},set:function(ce){this._aspectRatio=ce},enumerable:!1,configurable:!0}),_e.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},_e.prototype.show=function(){this.showUI(),this.open()},_e.prototype.close=function(ce){ce===void 0&&(ce=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ce||this.closeEventListeners.forEach(function(fe){return fe()}),this._isOpen=!1)},_e.prototype.addRenderEventListener=function(ce){this.renderEventListeners.push(ce)},_e.prototype.removeRenderEventListener=function(ce){this.renderEventListeners.indexOf(ce)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ce),1)},_e.prototype.addCloseEventListener=function(ce){this.closeEventListeners.push(ce)},_e.prototype.removeCloseEventListener=function(ce){this.closeEventListeners.indexOf(ce)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ce),1)},_e.prototype.setupResizeObserver=function(){var ce=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ce.resize(ce.target.clientWidth,ce.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))},_e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ce=1*this.target.clientWidth/this.target.clientHeight,fe=this.contentDiv.clientWidth/ce>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ce:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ve=fe+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/ce;this.resize(fe,ve)}},_e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},_e.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",B.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},_e.prototype.resize=function(ce,fe){this.imageWidth=Math.round(ce),this.imageHeight=Math.round(fe),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()},_e.prototype.setEditingTarget=function(){var ce=document.createElement("canvas");ce.width=this.target.naturalWidth,ce.height=this.target.naturalHeight,ce.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var fe=ce.toDataURL();B.setAttributes(this.editingTarget,[["href",fe]]),this.setEditingTargetSize()},_e.prototype.setTopLeft=function(){var ce=this.target.getBoundingClientRect(),fe=this.editorCanvas.getBoundingClientRect();this.left=ce.left-fe.left-this.CANVAS_MARGIN,this.top=ce.top-fe.top-this.CANVAS_MARGIN},_e.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=B.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=B.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=B.createGroup(),this.editingTargetRotationScaleContainer=B.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var ce=B.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(ce);var fe=B.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(fe),this.editingTargetContainer=B.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)},_e.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},_e.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=B.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Xe(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},_e.prototype.zoomToCrop=function(){if(this.cropRect){var ce=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,fe=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=ce+"px "+fe+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-ce+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-fe+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},_e.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)},_e.prototype.cropRectChanged=function(ce){this.cropRect=ce,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},_e.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},_e.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"},_e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},_e.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 ce=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,fe=this.target.offsetTop>ce+this.CANVAS_MARGIN?this.target.offsetTop-(ce+this.CANVAS_MARGIN):0;this.coverDiv.style.top=fe+"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},_e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},_e.prototype.addTopToolbar=function(){var ce=this;this.topToolbar=new Z,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 fe=new re;fe.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(fe);var ve=[];this.aspectRatios.forEach(function(st){var Ot=new $(ue.getIcon(st.horizontal,st.vertical),st.horizontal===0&&st.vertical===0?"FREE":st.horizontal+":"+st.vertical);Ot.onClick=function(){return ce.ratioButtonClicked(st)},ve.push(Ot)}),this.aspectRatioButton=new we(ue.getIcon(0,0),"Aspect ratio",ve),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,fe.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Oe=new $('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Oe.isActive=this.isGridVisible,Oe.onClick=function(){ce.isGridVisible=!ce.isGridVisible,Oe.isActive=ce.isGridVisible},fe.addButton(Oe);var ge=new $('<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(ge.isActive=this.zoomToCropEnabled,ge.onClick=function(){ce.zoomToCropEnabled=!ce.zoomToCropEnabled,ge.isActive=ce.zoomToCropEnabled},fe.addButton(ge),!ee.isLicensed){var Ee=new J;this.topToolbar.addElementBlock(Ee);var Re=document.createElement("div");Re.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Le=document.createElement("a");Le.style.color="currentColor",Le.href="https://markerjs.com/products/cropro",Le.target="_blank",Le.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Re.appendChild(Le),Ee.addElement(Re)}var Pe=new re;Pe.minWidth=3*this.toolbarHeight+"px",Pe.contentAlign="end",this.topToolbar.addButtonBlock(Pe);var Ke=new $('<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");Ke.onClick=this.startRenderAndClose,Pe.addButton(Ke),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ke.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var it=new $('<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");it.onClick=this.close,Pe.addButton(it),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(it.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},_e.prototype.addBottomToolbar=function(){var ce=this;this.bottomToolbar=new Z,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 fe=new re;fe.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(fe);var ve=new $('<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");ve.onClick=this.rotateLeftButtonClicked,fe.addButton(ve);var Oe=new $('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Oe.onClick=this.rotateRightButtonClicked,fe.addButton(Oe);var ge=new J;ge.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ge),this.straightener=new $e("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Pe){ce.rotateBy(Pe),ce.straightener.angle=ce.rotationAngle},ge.addElement(this.straightener.getUI());var Ee=new re;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Re=new $('<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");Re.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Re);var Le=new $('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Le.onClick=this.flipVerticallyButtonClicked,Ee.addButton(Le)},_e.prototype.ratioButtonClicked=function(ce){this.aspectRatio=ce,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},_e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ue.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},_e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new le(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},_e.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},_e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},_e.prototype.restoreState=function(ce){if(ce){var fe=this.cropLayer.getRescaledRect(ce.width,ce.height,this.imageWidth,this.imageHeight,ce.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(fe),this.cropRectChanged(fe),this.flippedHorizontally=ce.flippedHorizontally,this.flippedVertically=ce.flippedVertically,this.applyFlip(),this.rotationAngle=ce.rotationAngle,this.applyRotation()}},_e.prototype.clientToLocalCoordinates=function(ce,fe){var ve=this.cropImage.getBoundingClientRect();return{x:ce-ve.left,y:fe-ve.top}},_e.prototype.onWindowResize=function(){this.positionUI()},_e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ce=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ce+"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()},_e.prototype.rotateLeftButtonClicked=function(){var ce=this.rotationAngle-90;this.rotationAngle%90!=0&&(ce+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ce)},_e.prototype.rotateRightButtonClicked=function(){var ce=this.rotationAngle+90;this.rotationAngle%90!=0&&(ce-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ce)},_e.prototype.rotateTo=function(ce){ce=(ce=ce>180?ce-360:ce)<=-180?ce+360:ce,this.rotationAngle=ce,this.applyRotation()},_e.prototype.rotateBy=function(ce){this.rotateTo((this.rotationAngle+ce)%360)},_e.prototype.applyRotation=function(){var ce=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var fe=this.editingTargetRotationContainer.transform.baseVal.getItem(0);fe.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(fe,0);var ve=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ve.width,this.imageHeight/ve.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ce},_e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},_e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},_e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},_e.prototype.startRenderAndClose=function(){return ye(this,void 0,void 0,function(){var ce,fe;return se(this,function(ve){switch(ve.label){case 0:return[4,this.render()];case 1:return ce=ve.sent(),fe=this.getState(),this.renderEventListeners.forEach(function(Oe){return Oe(ce,fe)}),this.close(!0),[2]}})})},_e.prototype.render=function(){return ye(this,void 0,void 0,function(){var ce;return se(this,function(fe){switch(fe.label){case 0:return(ce=new et).naturalSize=this.renderAtNaturalSize,ce.imageType=this.renderImageType,ce.imageQuality=this.renderImageQuality,ce.width=this.renderWidth,ce.height=this.renderHeight,this.unzoomFromCrop(),B.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ce.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 fe.sent(),[4,ce.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,fe.sent()]}})})},_e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Q("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 Q("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Q("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var ce=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Q("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*ce)+`px;
height: `+(this.toolbarHeight-2*ce)+`px;
padding: `+ce+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new V("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new V("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Q("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 Q("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Q("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 Q("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*ce)+`px;
padding: `+ce+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Q("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},_e.instanceCounter=0,_e}(),at=L("8hTe"),Be=L.n(at),Ie=/<pre[^>]*>/g;function rt(_e){var ce=document.createElement("div");return ce.innerHTML=_e,ce.childNodes.length===0?"":ce.childNodes[0].nodeValue}var lt=q.a=function(_e){var ce=_e.value,fe=ce===void 0?"":ce,ve=_e.edit,Oe=ve===void 0?!1:ve,ge=_e.className,Ee=_e.showTextOnly,Re=_e.showLines,Le=_e.replaces,Pe=_e.zoomImg,Ke=_e.hasMask,it=_e.style,st=it===void 0?{}:it,Ot=_e.stylesPrev,Rt=Ot===void 0?{}:Ot,sr=String(fe),Zt=Object(d.useRef)(),wt=Object(d.useRef)(),Br=Object(d.useState)(""),Nr=Object(w.a)(Br,2),jr=Nr[0],cn=Nr[1],xr=Object(d.useState)("office"),an=Object(w.a)(xr,2),tn=an[0],Ir=an[1],hn=function(){var Kr=new nt(wt.current);Kr.displayMode="popup",Kr.addRenderEventListener(function(){var rn=Object(m.a)(t.a.mark(function Or(Lr){var Wr;return t.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return Zt.current.style.display="none",yn.next=3,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Lr}});case 3:Wr=yn.sent,Wr!=null&&Wr.id&&Le(wt.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(Wr==null?void 0:Wr.id,"?type=").concat(Wr.content_type));case 5:case"end":return yn.stop()}},Or)}));return function(Or){return rn.apply(this,arguments)}}()),Kr.show()},lr=function(){var Kr=new Ae.a(wt.current);Kr.settings.displayMode="popup",Kr.addEventListener("render",function(){var rn=Object(m.a)(t.a.mark(function Or(Lr){var Wr;return t.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:if(Zt.current.style.display="none",!wt.current){yn.next=6;break}return yn.next=4,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Lr.dataUrl}});case 4:Wr=yn.sent,Wr!=null&&Wr.id&&Le(wt.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(Wr==null?void 0:Wr.id,"?type=").concat(Wr.content_type));case 6:case"end":return yn.stop()}},Or)}));return function(Or){return rn.apply(this,arguments)}}()),Kr.show(),window.markerArea=Kr},Cr=Object(d.useMemo)(function(){Zt.current&&(Zt.current.style.zIndex=-1);try{var Bt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Kr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,rn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;sr=sr.replace(Bt,"("+ie.a.API_SERVER+"/api/attachments/").replace(Kr,'"'+ie.a.API_SERVER+"/api/attachments/").replace(rn,'"'+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,`
`)}catch(jn){}var Or=W(sr),Lr=j();if(sr.match(/\[TOC\]/)&&(Or=Or.replace("<p>[TOC]</p>",R()),E()),Or=Or.replace(/(__special_katext_id_\d+__)/g,function(jn,yn){var St=Lr[yn],ur=St.type,oi=St.expression;return Object(oe.renderToString)(rt(oi)||"",{displayMode:ur==="block",throwOnError:!1,output:"html"})}),Or=Or.replace(/▁/g,"\u2581\u2581\u2581"),F(),Ee){var Wr=document.createElement("div");return Wr.innerHTML=Or,Wr.innerText}return setTimeout(function(){return Wn()},500),Or},[sr]),gr=Object(d.useRef)();y.WebkitLineClamp=Re,Re&&(st=Object(v.a)(Object(v.a)({},st),y));function xn(Bt){var Kr=Bt.target;if(Kr.tagName.toUpperCase()==="IMG"){if(Pe){var rn=Kr.getAttribute("src");cn(rn),Ir("image")}}else if(Kr.tagName.toUpperCase()==="A"){var Or=Kr.getAttribute("href");if(Or.indexOf("office")>-1)Bt.preventDefault(),cn(Or),Ir("office");else if(Or.indexOf("application/pdf")>-1)Bt.preventDefault(),cn(Or),Ir("pdf");else if(Or.indexOf("text/html")>-1)Bt.preventDefault(),cn(Or),Ir("html");else if(Or.startsWith("#")){Bt.preventDefault();var Lr=document.getElementById(Or.replace("#",""));Lr&&Lr.scrollIntoView(!0)}}}var Wn=function(){var Kr,rn=(Kr=gr.current)===null||Kr===void 0?void 0:Kr.querySelectorAll("video");rn==null||rn.forEach(function(Or){if(Or.oncontextmenu=function(){return!1},Or.src.indexOf(".m3u8")>-1&&!Or.canPlayType("application/vnd.apple.mpegurl")){if(X.a.isSupported()){var Lr=new X.a;Lr.loadSource(Or.src),Lr.attachMedia(Or)}}})};Object(d.useEffect)(function(){if(gr.current&&Cr&&(Cr.match(Ie)&&window.PR.prettyPrint()),gr.current)return gr.current.addEventListener("click",xn),function(){gr.current.removeEventListener("click",xn),F(),E()}},[Cr,gr.current,xn]);var gn=function(Kr){if(!Oe)return;Kr.target.nodeName==="IMG"?(Zt.current.style.zIndex=1,Zt.current.style.display="flex",Zt.current.style.width=Kr.target.clientWidth+"px",Zt.current.style.height=Kr.target.clientHeight+"px",Zt.current.style.top=Kr.target.offsetTop+"px",Zt.current.style.left=Kr.target.offsetLeft+"px",wt.current.src=Kr.target.getAttribute("src")):Zt.current.style.display="none"};return a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{ref:gr,style:Object(v.a)({},st),className:"".concat(ge||""," markdown-body ").concat(Be.a.mdBody),onMouseOver:gn,dangerouslySetInnerHTML:{__html:Cr}}),a.a.createElement("div",{ref:Zt,className:Be.a.button},a.a.createElement(g.a,null,a.a.createElement(N.a,{onClick:function(){return hn()}},"\u88C1\u526A"),a.a.createElement(N.a,{onClick:function(){return lr()}},"\u7F16\u8F91"))),a.a.createElement("img",{ref:wt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),a.a.createElement(de.a,{close:!0,data:jr,type:jr!=null&&jr.length?tn:"",style:Object(v.a)({},Rt),onClose:function(){return cn("")}}))}},"9OqN":function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.CTR=function(){var g=P.lib.BlockCipherMode.extend(),T=g.Encryptor=g.extend({processBlock:function(N,v){var m=this._cipher,w=m.blockSize,b=this._iv,t=this._counter;b&&(t=this._counter=b.slice(0),this._iv=void 0);var d=t.slice(0);m.encryptBlock(d,0),t[w-1]=t[w-1]+1|0;for(var a=0;a<w;a++)N[v+a]^=d[a]}});return g.Decryptor=T,g}(),P.mode.CTR})},"9VGf":function(H,q,L){"use strict";L.d(q,"a",function(){return T});var P=L("q1tI"),g=L.n(P);function T(N,v){var m=Object(P.useRef)();Object(P.useEffect)(function(){m.current=N}),Object(P.useEffect)(function(){function w(){m.current()}if(v!==null){var b=setInterval(w,v);return function(){return clearInterval(b)}}},[v])}},ALsQ:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.CFB=function(){var g=P.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(N,v){var m=this._cipher,w=m.blockSize;T.call(this,N,v,w,m),this._prevBlock=N.slice(v,v+w)}}),g.Decryptor=g.extend({processBlock:function(N,v){var m=this._cipher,w=m.blockSize,b=N.slice(v,v+w);T.call(this,N,v,w,m),this._prevBlock=b}});function T(N,v,m,w){var b,t=this._iv;t?(b=t.slice(0),this._iv=void 0):b=this._prevBlock,w.encryptBlock(b,0);for(var d=0;d<m;d++)N[v+d]^=b[d]}return g}(),P.mode.CFB})},BJfS:function(H,q){var L=function(P){return P.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}).toLowerCase()};H.exports=L},BU3w:function(H,q,L){"use strict";L.d(q,"a",function(){return m});var P=L("MNnm"),g="rc-util-key";function T(w){if(w.attachTo)return w.attachTo;var b=document.querySelector("head");return b||document.body}function N(w){var b,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var d=document.createElement("style");if((b=t.csp)===null||b===void 0?void 0:b.nonce){var a;d.nonce=(a=t.csp)===null||a===void 0?void 0:a.nonce}d.innerHTML=w;var c=T(t),o=c.firstChild;return t.prepend&&c.prepend?c.prepend(d):t.prepend&&o?c.insertBefore(d,o):c.appendChild(d),d}var v=new Map;function m(w,b){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=T(t);if(!v.has(d)){var a=N("",t),c=a.parentNode;v.set(d,c),c.removeChild(a)}var o=Array.from(v.get(d).children).find(function(u){return u.tagName==="STYLE"&&u[g]===b});if(o){var n,s;if(((n=t.csp)===null||n===void 0?void 0:n.nonce)&&o.nonce!==((s=t.csp)===null||s===void 0?void 0:s.nonce)){var h;o.nonce=(h=t.csp)===null||h===void 0?void 0:h.nonce}return o.innerHTML!==w&&(o.innerHTML=w),o}var f=N(w,t);return f[g]=b,f}},Bd2K:function(H,q,L){(function(P){P(L("VrN/"),L("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(t,d,a){if(a!=P.Init&&a&&t.removeKeyMap("autoCloseTags"),!d)return;var c={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(c["'/'"]=function(o){return m(o)}),(typeof d!="object"||d.whenOpening!==!1)&&(c["'>'"]=function(o){return N(o)}),t.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function N(t){if(t.getOption("disableInput"))return P.Pass;for(var d=t.listSelections(),a=[],c=t.getOption("autoCloseTags"),o=0;o<d.length;o++){if(!d[o].empty())return P.Pass;var n=d[o].head,s=t.getTokenAt(n),h=P.innerMode(t.getMode(),s.state),f=h.state,u=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(f),i=u&&u.name;if(!i)return P.Pass;var r=h.mode.configuration=="html",E=typeof c=="object"&&c.dontCloseTags||r&&g,y=typeof c=="object"&&c.indentTags||r&&T;s.end>n.ch&&(i=i.slice(0,i.length-s.end+n.ch));var p=i.toLowerCase();if(!i||s.type=="string"&&(s.end!=n.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&u.close||s.string.indexOf("/")==n.ch-s.start-1||E&&w(E,p)>-1||b(t,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f)||[],i,n,!0))return P.Pass;var R=typeof c=="object"&&c.emptyTags;if(R&&w(R,i)>-1){a[o]={text:"/>",newPos:P.Pos(n.line,n.ch+2)};continue}var O=y&&w(y,p)>-1;a[o]={indent:O,text:">"+(O?`
`:"")+"</"+i+">",newPos:O?P.Pos(n.line+1,0):P.Pos(n.line,n.ch+1)}}for(var _=typeof c=="object"&&c.dontIndentOnAutoClose,o=d.length-1;o>=0;o--){var x=a[o];t.replaceRange(x.text,d[o].head,d[o].anchor,"+insert");var S=t.listSelections().slice(0);S[o]={head:x.newPos,anchor:x.newPos},t.setSelections(S),!_&&x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function v(t,d){for(var a=t.listSelections(),c=[],o=d?"/":"</",n=t.getOption("autoCloseTags"),s=typeof n=="object"&&n.dontIndentOnSlash,h=0;h<a.length;h++){if(!a[h].empty())return P.Pass;var f=a[h].head,u=t.getTokenAt(f),i=P.innerMode(t.getMode(),u.state),r=i.state;if(d&&(u.type=="string"||u.string.charAt(0)!="<"||u.start!=f.ch-1))return P.Pass;var E,y=i.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(y&&i.mode.name=="javascript")E=o+"script";else if(y&&i.mode.name=="css")E=o+"style";else{var p=i.mode.xmlCurrentContext&&i.mode.xmlCurrentContext(r);if(!p||p.length&&b(t,p,p[p.length-1],f))return P.Pass;E=o+p[p.length-1]}t.getLine(f.line).charAt(u.end)!=">"&&(E+=">"),c[h]=E}if(t.replaceSelections(c),a=t.listSelections(),!s)for(var h=0;h<a.length;h++)(h==a.length-1||a[h].head.line<a[h+1].head.line)&&t.indentLine(a[h].head.line)}function m(t){return t.getOption("disableInput")?P.Pass:v(t,!0)}P.commands.closeTag=function(t){return v(t)};function w(t,d){if(t.indexOf)return t.indexOf(d);for(var a=0,c=t.length;a<c;++a)if(t[a]==d)return a;return-1}function b(t,d,a,c,o){if(!P.scanForClosingTag)return!1;var n=Math.min(t.lastLine()+1,c.line+500),s=P.scanForClosingTag(t,c,null,n);if(!s||s.tag!=a)return!1;for(var h=o?1:0,f=d.length-1;f>=0&&d[f]==a;f--)++h;c=s.to;for(var f=1;f<h;f++){var u=P.scanForClosingTag(t,c,null,n);if(!u||u.tag!=a)return!1;c=u.to}return!0}})},BjJ7:function(H,q,L){"use strict";L.d(q,"d",function(){return g}),L.d(q,"c",function(){return T}),L.d(q,"e",function(){return N}),L.d(q,"b",function(){return v}),L.d(q,"a",function(){return w});var P=L("m3rI");function g(b){var t=!0;if(b.length>0){for(var d=0;d<b.length;d++)if(b[d].compile_success==0||!b[d].compile_success){t=!1;break}}else t=!1;return t}function T(b){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",d=[],a=0;a<b.length;a++){var c=b[a],o=t?"".concat(t,"/").concat(c.name):"".concat(c.name);d.push({title:c.name,isLeaf:!(c.type==="tree"),key:o})}return d}function N(b,t,d){for(var a=0;a<b.length;a++){var c=b[a];if(c.key===t){c.children=d;break}c.children&&N(c.children,t,d)}return b}function v(b,t,d){var a;return function(){var c=this,o=arguments,n=function(){a=null,d||b.apply(c,o)},s=d&&!a;clearTimeout(a),a=setTimeout(n,t),s&&b.apply(c,o)}}var m=!0,w=P.a.API_SERVER},"C+DQ":function(H,q,L){},"C/vA":function(H,q,L){"use strict";L.d(q,"a",function(){return P});function P(g){const T=this;let N=!1,v;return function(){return N||(N=!0,v=g.apply(T,arguments)),v}}},"Cg/j":function(H,q,L){"use strict";L.d(q,"b",function(){return P}),L.d(q,"a",function(){return g}),L.d(q,"c",function(){return N}),L.d(q,"d",function(){return v});var P;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function w(b){return b[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=w})(P||(P={}));const g=N("instantiationService");function T(m,w,b,t){w[P.DI_TARGET]===w?w[P.DI_DEPENDENCIES].push({id:m,index:b,optional:t}):(w[P.DI_DEPENDENCIES]=[{id:m,index:b,optional:t}],w[P.DI_TARGET]=w)}function N(m){if(P.serviceIds.has(m))return P.serviceIds.get(m);const w=function(b,t,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");T(w,b,d,!1)};return w.toString=()=>m,P.serviceIds.set(m,w),w}function v(m){return function(w,b,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");T(m,w,t,!0)}}},Dgm7:function(H,q,L){H.exports=L.p+"static/auth.ea067b42.png"},DlQD:function(H,q,L){(function(P,g){H.exports=g()})(this,function(){"use strict";function P(fe,ve){for(var Oe=0;Oe<ve.length;Oe++){var ge=ve[Oe];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(fe,ge.key,ge)}}function g(fe,ve,Oe){return ve&&P(fe.prototype,ve),Oe&&P(fe,Oe),fe}function T(fe,ve){if(!fe)return;if(typeof fe=="string")return N(fe,ve);var Oe=Object.prototype.toString.call(fe).slice(8,-1);if(Oe==="Object"&&fe.constructor&&(Oe=fe.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(fe);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return N(fe,ve)}function N(fe,ve){(ve==null||ve>fe.length)&&(ve=fe.length);for(var Oe=0,ge=new Array(ve);Oe<ve;Oe++)ge[Oe]=fe[Oe];return ge}function v(fe,ve){var Oe;if(typeof Symbol=="undefined"||fe[Symbol.iterator]==null){if(Array.isArray(fe)||(Oe=T(fe))||ve&&fe&&typeof fe.length=="number"){Oe&&(fe=Oe);var ge=0;return function(){return ge>=fe.length?{done:!0}:{done:!1,value:fe[ge++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Oe=fe[Symbol.iterator](),Oe.next.bind(Oe)}function m(fe,ve){return ve={exports:{}},fe(ve,ve.exports),ve.exports}var w=m(function(fe){function ve(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(ge){fe.exports.defaults=ge}fe.exports={defaults:ve(),getDefaults:ve,changeDefaults:Oe}}),b=w.defaults,t=w.getDefaults,d=w.changeDefaults,a=/[&<>"']/,c=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(ve){return s[ve]};function f(fe,ve){if(ve){if(a.test(fe))return fe.replace(c,h)}else if(o.test(fe))return fe.replace(n,h);return fe}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(fe){return fe.replace(u,function(ve,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var r=/(^|[^\[])\^/g;function E(fe,ve){fe=fe.source||fe,ve=ve||"";var Oe={replace:function(Ee,Re){return Re=Re.source||Re,Re=Re.replace(r,"$1"),fe=fe.replace(Ee,Re),Oe},getRegex:function(){return new RegExp(fe,ve)}};return Oe}var y=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(fe,ve,Oe){if(fe){var ge;try{ge=decodeURIComponent(i(Oe)).replace(y,"").toLowerCase()}catch(Ee){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}ve&&!p.test(Oe)&&(Oe=C(ve,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(Ee){return null}return Oe}var O={},_=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(fe,ve){O[" "+fe]||(_.test(fe)?O[" "+fe]=fe+"/":O[" "+fe]=Y(fe,"/",!0)),fe=O[" "+fe];var Oe=fe.indexOf(":")===-1;return ve.substring(0,2)==="//"?Oe?ve:fe.replace(x,"$1")+ve:ve.charAt(0)==="/"?Oe?ve:fe.replace(S,"$1")+ve:fe+ve}var j={exec:function(){}};function F(fe){for(var ve=1,Oe,ge;ve<arguments.length;ve++){Oe=arguments[ve];for(ge in Oe)Object.prototype.hasOwnProperty.call(Oe,ge)&&(fe[ge]=Oe[ge])}return fe}function M(fe,ve){var Oe=fe.replace(/\|/g,function(Re,Le,Pe){for(var Ke=!1,it=Le;--it>=0&&Pe[it]==="\\";)Ke=!Ke;return Ke?"|":" |"}),ge=Oe.split(/ \|/),Ee=0;if(ge.length>ve)ge.splice(ve);else for(;ge.length<ve;)ge.push("");for(;Ee<ge.length;Ee++)ge[Ee]=ge[Ee].trim().replace(/\\\|/g,"|");return ge}function Y(fe,ve,Oe){var ge=fe.length;if(ge===0)return"";for(var Ee=0;Ee<ge;){var Re=fe.charAt(ge-Ee-1);if(Re===ve&&!Oe)Ee++;else if(Re!==ve&&Oe)Ee++;else break}return fe.substr(0,ge-Ee)}function K(fe,ve){if(fe.indexOf(ve[1])===-1)return-1;for(var Oe=fe.length,ge=0,Ee=0;Ee<Oe;Ee++)if(fe[Ee]==="\\")Ee++;else if(fe[Ee]===ve[0])ge++;else if(fe[Ee]===ve[1]&&(ge--,ge<0))return Ee;return-1}function A(fe){fe&&fe.sanitize&&!fe.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 W={escape:f,unescape:i,edit:E,cleanUrl:R,resolveUrl:C,noopTest:j,merge:F,splitCells:M,rtrim:Y,findClosingBracket:K,checkSanitizeDeprecation:A},U=w.defaults,D=W.rtrim,X=W.splitCells,ie=W.escape,oe=W.findClosingBracket;function de(fe,ve,Oe){var ge=ve.href,Ee=ve.title?ie(ve.title):null,Re=fe[1].replace(/\\([\[\]])/g,"$1");return fe[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:ge,title:Ee,text:Re}:{type:"image",raw:Oe,href:ge,title:Ee,text:ie(Re)}}function Ce(fe,ve){var Oe=fe.match(/^(\s+)(?:```)/);if(Oe===null)return ve;var ge=Oe[1];return ve.split(`
`).map(function(Ee){var Re=Ee.match(/^\s+/);if(Re===null)return Ee;var Le=Re[0];return Le.length>=ge.length?Ee.slice(ge.length):Ee}).join(`
`)}var Ae=function(){function fe(Oe){this.options=Oe||U}var ve=fe.prototype;return ve.space=function(ge){var Ee=this.rules.block.newline.exec(ge);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
`}},ve.code=function(ge,Ee){var Re=this.rules.block.code.exec(ge);if(Re){var Le=Ee[Ee.length-1];if(Le&&Le.type==="paragraph")return{raw:Re[0],text:Re[0].trimRight()};var Pe=Re[0].replace(/^ {4}/gm,"");return{type:"code",raw:Re[0],codeBlockStyle:"indented",text:this.options.pedantic?Pe:D(Pe,`
`)}}},ve.fences=function(ge){var Ee=this.rules.block.fences.exec(ge);if(Ee){var Re=Ee[0],Le=Ce(Re,Ee[3]||"");return{type:"code",raw:Re,lang:Ee[2]?Ee[2].trim():Ee[2],text:Le}}},ve.heading=function(ge){var Ee=this.rules.block.heading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},ve.nptable=function(ge){var Ee=this.rules.block.nptable.exec(ge);if(Ee){var Re={type:"table",header:X(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[],raw:Ee[0]};if(Re.header.length===Re.align.length){var Le=Re.align.length,Pe;for(Pe=0;Pe<Le;Pe++)/^ *-+: *$/.test(Re.align[Pe])?Re.align[Pe]="right":/^ *:-+: *$/.test(Re.align[Pe])?Re.align[Pe]="center":/^ *:-+ *$/.test(Re.align[Pe])?Re.align[Pe]="left":Re.align[Pe]=null;for(Le=Re.cells.length,Pe=0;Pe<Le;Pe++)Re.cells[Pe]=X(Re.cells[Pe],Re.header.length);return Re}}},ve.hr=function(ge){var Ee=this.rules.block.hr.exec(ge);if(Ee)return{type:"hr",raw:Ee[0]}},ve.blockquote=function(ge){var Ee=this.rules.block.blockquote.exec(ge);if(Ee){var Re=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:Re}}},ve.list=function(ge){var Ee=this.rules.block.list.exec(ge);if(Ee){for(var Re=Ee[0],Le=Ee[2],Pe=Le.length>1,Ke=Le[Le.length-1]===")",it={type:"list",raw:Re,ordered:Pe,start:Pe?+Le.slice(0,-1):"",loose:!1,items:[]},st=Ee[0].match(this.rules.block.item),Ot=!1,Rt,sr,Zt,wt,Br,Nr,jr,cn=st.length,xr=0;xr<cn;xr++)Rt=st[xr],Re=Rt,sr=Rt.length,Rt=Rt.replace(/^ *([*+-]|\d+[.)]) */,""),~Rt.indexOf(`
`)&&(sr-=Rt.length,Rt=this.options.pedantic?Rt.replace(/^ {1,4}/gm,""):Rt.replace(new RegExp("^ {1,"+sr+"}","gm"),"")),xr!==cn-1&&(Zt=this.rules.block.bullet.exec(st[xr+1])[0],(Pe?Zt.length===1||!Ke&&Zt[Zt.length-1]===")":Zt.length>1||this.options.smartLists&&Zt!==Le)&&(wt=st.slice(xr+1).join(`
`),it.raw=it.raw.substring(0,it.raw.length-wt.length),xr=cn-1)),Br=Ot||/\n\n(?!\s*$)/.test(Rt),xr!==cn-1&&(Ot=Rt.charAt(Rt.length-1)===`
`,Br||(Br=Ot)),Br&&(it.loose=!0),Nr=/^\[[ xX]\] /.test(Rt),jr=void 0,Nr&&(jr=Rt[1]!==" ",Rt=Rt.replace(/^\[[ xX]\] +/,"")),it.items.push({type:"list_item",raw:Re,task:Nr,checked:jr,loose:Br,text:Rt});return it}},ve.html=function(ge){var Ee=this.rules.block.html.exec(ge);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):ie(Ee[0]):Ee[0]}},ve.def=function(ge){var Ee=this.rules.block.def.exec(ge);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var Re=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:Re,raw:Ee[0],href:Ee[2],title:Ee[3]}}},ve.table=function(ge){var Ee=this.rules.block.table.exec(ge);if(Ee){var Re={type:"table",header:X(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[]};if(Re.header.length===Re.align.length){Re.raw=Ee[0];var Le=Re.align.length,Pe;for(Pe=0;Pe<Le;Pe++)/^ *-+: *$/.test(Re.align[Pe])?Re.align[Pe]="right":/^ *:-+: *$/.test(Re.align[Pe])?Re.align[Pe]="center":/^ *:-+ *$/.test(Re.align[Pe])?Re.align[Pe]="left":Re.align[Pe]=null;for(Le=Re.cells.length,Pe=0;Pe<Le;Pe++)Re.cells[Pe]=X(Re.cells[Pe].replace(/^ *\| *| *\| *$/g,""),Re.header.length);return Re}}},ve.lheading=function(ge){var Ee=this.rules.block.lheading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},ve.paragraph=function(ge){var Ee=this.rules.block.paragraph.exec(ge);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
`?Ee[1].slice(0,-1):Ee[1]}},ve.text=function(ge,Ee){var Re=this.rules.block.text.exec(ge);if(Re){var Le=Ee[Ee.length-1];return Le&&Le.type==="text"?{raw:Re[0],text:Re[0]}:{type:"text",raw:Re[0],text:Re[0]}}},ve.escape=function(ge){var Ee=this.rules.inline.escape.exec(ge);if(Ee)return{type:"escape",raw:Ee[0],text:ie(Ee[1])}},ve.tag=function(ge,Ee,Re){var Le=this.rules.inline.tag.exec(ge);if(Le)return!Ee&&/^<a /i.test(Le[0])?Ee=!0:Ee&&/^<\/a>/i.test(Le[0])&&(Ee=!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:Ee,inRawBlock:Re,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ie(Le[0]):Le[0]}},ve.link=function(ge){var Ee=this.rules.inline.link.exec(ge);if(Ee){var Re=oe(Ee[2],"()");if(Re>-1){var Le=Ee[0].indexOf("!")===0?5:4,Pe=Le+Ee[1].length+Re;Ee[2]=Ee[2].substring(0,Re),Ee[0]=Ee[0].substring(0,Pe).trim(),Ee[3]=""}var Ke=Ee[2],it="";if(this.options.pedantic){var st=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ke);st?(Ke=st[1],it=st[3]):it=""}else it=Ee[3]?Ee[3].slice(1,-1):"";Ke=Ke.trim().replace(/^<([\s\S]*)>$/,"$1");var Ot=de(Ee,{href:Ke&&Ke.replace(this.rules.inline._escapes,"$1"),title:it&&it.replace(this.rules.inline._escapes,"$1")},Ee[0]);return Ot}},ve.reflink=function(ge,Ee){var Re;if((Re=this.rules.inline.reflink.exec(ge))||(Re=this.rules.inline.nolink.exec(ge))){var Le=(Re[2]||Re[1]).replace(/\s+/g," ");if(Le=Ee[Le.toLowerCase()],!Le||!Le.href){var Pe=Re[0].charAt(0);return{type:"text",raw:Pe,text:Pe}}var Ke=de(Re,Le,Re[0]);return Ke}},ve.strong=function(ge,Ee,Re){Re===void 0&&(Re="");var Le=this.rules.inline.strong.start.exec(ge);if(Le&&(!Le[1]||Le[1]&&(Re===""||this.rules.inline.punctuation.exec(Re)))){Ee=Ee.slice(-1*ge.length);var Pe=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Pe.lastIndex=0;for(var Ke;(Le=Pe.exec(Ee))!=null;)if(Ke=this.rules.inline.strong.middle.exec(Ee.slice(0,Le.index+3)),Ke)return{type:"strong",raw:ge.slice(0,Ke[0].length),text:ge.slice(2,Ke[0].length-2)}}},ve.em=function(ge,Ee,Re){Re===void 0&&(Re="");var Le=this.rules.inline.em.start.exec(ge);if(Le&&(!Le[1]||Le[1]&&(Re===""||this.rules.inline.punctuation.exec(Re)))){Ee=Ee.slice(-1*ge.length);var Pe=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Pe.lastIndex=0;for(var Ke;(Le=Pe.exec(Ee))!=null;)if(Ke=this.rules.inline.em.middle.exec(Ee.slice(0,Le.index+2)),Ke)return{type:"em",raw:ge.slice(0,Ke[0].length),text:ge.slice(1,Ke[0].length-1)}}},ve.codespan=function(ge){var Ee=this.rules.inline.code.exec(ge);if(Ee){var Re=Ee[2].replace(/\n/g," "),Le=/[^ ]/.test(Re),Pe=Re.startsWith(" ")&&Re.endsWith(" ");return Le&&Pe&&(Re=Re.substring(1,Re.length-1)),Re=ie(Re,!0),{type:"codespan",raw:Ee[0],text:Re}}},ve.br=function(ge){var Ee=this.rules.inline.br.exec(ge);if(Ee)return{type:"br",raw:Ee[0]}},ve.del=function(ge){var Ee=this.rules.inline.del.exec(ge);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},ve.autolink=function(ge,Ee){var Re=this.rules.inline.autolink.exec(ge);if(Re){var Le,Pe;return Re[2]==="@"?(Le=ie(this.options.mangle?Ee(Re[1]):Re[1]),Pe="mailto:"+Le):(Le=ie(Re[1]),Pe=Le),{type:"link",raw:Re[0],text:Le,href:Pe,tokens:[{type:"text",raw:Le,text:Le}]}}},ve.url=function(ge,Ee){var Re;if(Re=this.rules.inline.url.exec(ge)){var Le,Pe;if(Re[2]==="@")Le=ie(this.options.mangle?Ee(Re[0]):Re[0]),Pe="mailto:"+Le;else{var Ke;do Ke=Re[0],Re[0]=this.rules.inline._backpedal.exec(Re[0])[0];while(Ke!==Re[0]);Le=ie(Re[0]),Re[1]==="www."?Pe="http://"+Le:Pe=Le}return{type:"link",raw:Re[0],text:Le,href:Pe,tokens:[{type:"text",raw:Le,text:Le}]}}},ve.inlineText=function(ge,Ee,Re){var Le=this.rules.inline.text.exec(ge);if(Le){var Pe;return Ee?Pe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ie(Le[0]):Le[0]:Pe=ie(this.options.smartypants?Re(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Pe}}},fe}(),me=W.noopTest,Se=W.edit,ye=W.merge,se={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:me,table:me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,se.def=Se(se.def).replace("label",se._label).replace("title",se._title).getRegex(),se.bullet=/(?:[*+-]|\d{1,9}[.)])/,se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,se.item=Se(se.item,"gm").replace(/bull/g,se.bullet).getRegex(),se.list=Se(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex(),se._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",se._comment=/<!--(?!-?>)[\s\S]*?-->/,se.html=Se(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),se.paragraph=Se(se._paragraph).replace("hr",se.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",se._tag).getRegex(),se.blockquote=Se(se.blockquote).replace("paragraph",se.paragraph).getRegex(),se.normal=ye({},se),se.gfm=ye({},se.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*|$)"}),se.gfm.nptable=Se(se.gfm.nptable).replace("hr",se.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",se._tag).getRegex(),se.gfm.table=Se(se.gfm.table).replace("hr",se.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",se._tag).getRegex(),se.pedantic=ye({},se.normal,{html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:me,paragraph:Se(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:me,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ee._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ee.punctuation=Se(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex(),ee._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ee._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ee.em.start=Se(ee.em.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.middle=Se(ee.em.middle).replace(/punctuation/g,ee._punctuation).replace(/overlapSkip/g,ee._overlapSkip).getRegex(),ee.em.endAst=Se(ee.em.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.endUnd=Se(ee.em.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.start=Se(ee.strong.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.middle=Se(ee.strong.middle).replace(/punctuation/g,ee._punctuation).replace(/blockSkip/g,ee._blockSkip).getRegex(),ee.strong.endAst=Se(ee.strong.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.endUnd=Se(ee.strong.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.blockSkip=Se(ee._blockSkip,"g").getRegex(),ee.overlapSkip=Se(ee._overlapSkip,"g").getRegex(),ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ee._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])?)+(?![-_])/,ee.autolink=Se(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex(),ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ee.tag=Se(ee.tag).replace("comment",se._comment).replace("attribute",ee._attribute).getRegex(),ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ee._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ee.link=Se(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex(),ee.reflink=Se(ee.reflink).replace("label",ee._label).getRegex(),ee.reflinkSearch=Se(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex(),ee.normal=ye({},ee),ee.pedantic=ye({},ee.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:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()}),ee.gfm=ye({},ee.normal,{escape:Se(ee.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ee.gfm.url=Se(ee.gfm.url,"i").replace("email",ee.gfm._extended_email).getRegex(),ee.breaks=ye({},ee.gfm,{br:Se(ee.br).replace("{2,}","*").getRegex(),text:Se(ee.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var B={block:se,inline:ee},G=w.defaults,V=B.block,Q=B.inline;function Z(fe){return fe.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 ne(fe){var ve="",Oe,ge,Ee=fe.length;for(Oe=0;Oe<Ee;Oe++)ge=fe.charCodeAt(Oe),Math.random()>.5&&(ge="x"+ge.toString(16)),ve+="&#"+ge+";";return ve}var re=function(){function fe(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||G,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:V.normal,inline:Q.normal};this.options.pedantic?(ge.block=V.pedantic,ge.inline=Q.pedantic):this.options.gfm&&(ge.block=V.gfm,this.options.breaks?ge.inline=Q.breaks:ge.inline=Q.gfm),this.tokenizer.rules=ge}fe.lex=function(ge,Ee){var Re=new fe(Ee);return Re.lex(ge)};var ve=fe.prototype;return ve.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},ve.blockTokens=function(ge,Ee,Re){Ee===void 0&&(Ee=[]),Re===void 0&&(Re=!0),ge=ge.replace(/^ +$/gm,"");for(var Le,Pe,Ke,it;ge;){if(Le=this.tokenizer.space(ge)){ge=ge.substring(Le.raw.length),Le.type&&Ee.push(Le);continue}if(Le=this.tokenizer.code(ge,Ee)){ge=ge.substring(Le.raw.length),Le.type?Ee.push(Le):(it=Ee[Ee.length-1],it.raw+=`
`+Le.raw,it.text+=`
`+Le.text);continue}if(Le=this.tokenizer.fences(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Le=this.tokenizer.heading(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Le=this.tokenizer.nptable(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Le=this.tokenizer.hr(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Le=this.tokenizer.blockquote(ge)){ge=ge.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],Re),Ee.push(Le);continue}if(Le=this.tokenizer.list(ge)){for(ge=ge.substring(Le.raw.length),Ke=Le.items.length,Pe=0;Pe<Ke;Pe++)Le.items[Pe].tokens=this.blockTokens(Le.items[Pe].text,[],!1);Ee.push(Le);continue}if(Le=this.tokenizer.html(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Re&&(Le=this.tokenizer.def(ge))){ge=ge.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(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Le=this.tokenizer.lheading(ge)){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Re&&(Le=this.tokenizer.paragraph(ge))){ge=ge.substring(Le.raw.length),Ee.push(Le);continue}if(Le=this.tokenizer.text(ge,Ee)){ge=ge.substring(Le.raw.length),Le.type?Ee.push(Le):(it=Ee[Ee.length-1],it.raw+=`
`+Le.raw,it.text+=`
`+Le.text);continue}if(ge){var st="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return Ee},ve.inline=function(ge){var Ee,Re,Le,Pe,Ke,it,st=ge.length;for(Ee=0;Ee<st;Ee++){it=ge[Ee];switch(it.type){case"paragraph":case"text":case"heading":{it.tokens=[],this.inlineTokens(it.text,it.tokens);break}case"table":{for(it.tokens={header:[],cells:[]},Pe=it.header.length,Re=0;Re<Pe;Re++)it.tokens.header[Re]=[],this.inlineTokens(it.header[Re],it.tokens.header[Re]);for(Pe=it.cells.length,Re=0;Re<Pe;Re++)for(Ke=it.cells[Re],it.tokens.cells[Re]=[],Le=0;Le<Ke.length;Le++)it.tokens.cells[Re][Le]=[],this.inlineTokens(Ke[Le],it.tokens.cells[Re][Le]);break}case"blockquote":{this.inline(it.tokens);break}case"list":{for(Pe=it.items.length,Re=0;Re<Pe;Re++)this.inline(it.items[Re].tokens);break}}}return ge},ve.inlineTokens=function(ge,Ee,Re,Le,Pe){Ee===void 0&&(Ee=[]),Re===void 0&&(Re=!1),Le===void 0&&(Le=!1),Pe===void 0&&(Pe="");var Ke,it=ge,st;if(this.tokens.links){var Ot=Object.keys(this.tokens.links);if(Ot.length>0)for(;(st=this.tokenizer.rules.inline.reflinkSearch.exec(it))!=null;)Ot.includes(st[0].slice(st[0].lastIndexOf("[")+1,-1))&&(it=it.slice(0,st.index)+"["+"a".repeat(st[0].length-2)+"]"+it.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(st=this.tokenizer.rules.inline.blockSkip.exec(it))!=null;)it=it.slice(0,st.index)+"["+"a".repeat(st[0].length-2)+"]"+it.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ge;){if(Ke=this.tokenizer.escape(ge)){ge=ge.substring(Ke.raw.length),Ee.push(Ke);continue}if(Ke=this.tokenizer.tag(ge,Re,Le)){ge=ge.substring(Ke.raw.length),Re=Ke.inLink,Le=Ke.inRawBlock,Ee.push(Ke);continue}if(Ke=this.tokenizer.link(ge)){ge=ge.substring(Ke.raw.length),Ke.type==="link"&&(Ke.tokens=this.inlineTokens(Ke.text,[],!0,Le)),Ee.push(Ke);continue}if(Ke=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring(Ke.raw.length),Ke.type==="link"&&(Ke.tokens=this.inlineTokens(Ke.text,[],!0,Le)),Ee.push(Ke);continue}if(Ke=this.tokenizer.strong(ge,it,Pe)){ge=ge.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],Re,Le),Ee.push(Ke);continue}if(Ke=this.tokenizer.em(ge,it,Pe)){ge=ge.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],Re,Le),Ee.push(Ke);continue}if(Ke=this.tokenizer.codespan(ge)){ge=ge.substring(Ke.raw.length),Ee.push(Ke);continue}if(Ke=this.tokenizer.br(ge)){ge=ge.substring(Ke.raw.length),Ee.push(Ke);continue}if(Ke=this.tokenizer.del(ge)){ge=ge.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],Re,Le),Ee.push(Ke);continue}if(Ke=this.tokenizer.autolink(ge,ne)){ge=ge.substring(Ke.raw.length),Ee.push(Ke);continue}if(!Re&&(Ke=this.tokenizer.url(ge,ne))){ge=ge.substring(Ke.raw.length),Ee.push(Ke);continue}if(Ke=this.tokenizer.inlineText(ge,Le,Z)){ge=ge.substring(Ke.raw.length),Pe=Ke.raw.slice(-1),Ee.push(Ke);continue}if(ge){var Rt="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(Rt);break}else throw new Error(Rt)}}return Ee},g(fe,null,[{key:"rules",get:function(){return{block:V,inline:Q}}}]),fe}(),$=w.defaults,J=W.cleanUrl,le=W.escape,ue=function(){function fe(Oe){this.options=Oe||$}var ve=fe.prototype;return ve.code=function(ge,Ee,Re){var Le=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Pe=this.options.highlight(ge,Le);Pe!=null&&Pe!==ge&&(Re=!0,ge=Pe)}return Le?'<pre><code class="'+this.options.langPrefix+le(Le,!0)+'">'+(Re?ge:le(ge,!0))+`</code></pre>
`:"<pre><code>"+(Re?ge:le(ge,!0))+`</code></pre>
`},ve.blockquote=function(ge){return`<blockquote>
`+ge+`</blockquote>
`},ve.html=function(ge){return ge},ve.heading=function(ge,Ee,Re,Le){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+Le.slug(Re)+'">'+ge+"</h"+Ee+`>
`:"<h"+Ee+">"+ge+"</h"+Ee+`>
`},ve.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ve.list=function(ge,Ee,Re){var Le=Ee?"ol":"ul",Pe=Ee&&Re!==1?' start="'+Re+'"':"";return"<"+Le+Pe+`>
`+ge+"</"+Le+`>
`},ve.listitem=function(ge){return"<li>"+ge+`</li>
`},ve.checkbox=function(ge){return"<input "+(ge?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ve.paragraph=function(ge){return"<p>"+ge+`</p>
`},ve.table=function(ge,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
<thead>
`+ge+`</thead>
`+Ee+`</table>
`},ve.tablerow=function(ge){return`<tr>
`+ge+`</tr>
`},ve.tablecell=function(ge,Ee){var Re=Ee.header?"th":"td",Le=Ee.align?"<"+Re+' align="'+Ee.align+'">':"<"+Re+">";return Le+ge+"</"+Re+`>
`},ve.strong=function(ge){return"<strong>"+ge+"</strong>"},ve.em=function(ge){return"<em>"+ge+"</em>"},ve.codespan=function(ge){return"<code>"+ge+"</code>"},ve.br=function(){return this.options.xhtml?"<br/>":"<br>"},ve.del=function(ge){return"<del>"+ge+"</del>"},ve.link=function(ge,Ee,Re){if(ge=J(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Re;var Le='<a href="'+le(ge)+'"';return Ee&&(Le+=' title="'+Ee+'"'),Le+=">"+Re+"</a>",Le},ve.image=function(ge,Ee,Re){if(ge=J(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Re;var Le='<img src="'+ge+'" alt="'+Re+'"';return Ee&&(Le+=' title="'+Ee+'"'),Le+=this.options.xhtml?"/>":">",Le},ve.text=function(ge){return ge},fe}(),we=function(){function fe(){}var ve=fe.prototype;return ve.strong=function(ge){return ge},ve.em=function(ge){return ge},ve.codespan=function(ge){return ge},ve.del=function(ge){return ge},ve.html=function(ge){return ge},ve.text=function(ge){return ge},ve.link=function(ge,Ee,Re){return""+Re},ve.image=function(ge,Ee,Re){return""+Re},ve.br=function(){return""},fe}(),Fe=function(){function fe(){this.seen={}}var ve=fe.prototype;return ve.slug=function(ge){var Ee=ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var Re=Ee;do this.seen[Re]++,Ee=Re+"-"+this.seen[Re];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},fe}(),Xe=w.defaults,$e=W.unescape,et=function(){function fe(Oe){this.options=Oe||Xe,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new we,this.slugger=new Fe}fe.parse=function(ge,Ee){var Re=new fe(Ee);return Re.parse(ge)};var ve=fe.prototype;return ve.parse=function(ge,Ee){Ee===void 0&&(Ee=!0);var Re="",Le,Pe,Ke,it,st,Ot,Rt,sr,Zt,wt,Br,Nr,jr,cn,xr,an,tn,Ir,hn=ge.length;for(Le=0;Le<hn;Le++){wt=ge[Le];switch(wt.type){case"space":continue;case"hr":{Re+=this.renderer.hr();continue}case"heading":{Re+=this.renderer.heading(this.parseInline(wt.tokens),wt.depth,$e(this.parseInline(wt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Re+=this.renderer.code(wt.text,wt.lang,wt.escaped);continue}case"table":{for(sr="",Rt="",it=wt.header.length,Pe=0;Pe<it;Pe++)Rt+=this.renderer.tablecell(this.parseInline(wt.tokens.header[Pe]),{header:!0,align:wt.align[Pe]});for(sr+=this.renderer.tablerow(Rt),Zt="",it=wt.cells.length,Pe=0;Pe<it;Pe++){for(Ot=wt.tokens.cells[Pe],Rt="",st=Ot.length,Ke=0;Ke<st;Ke++)Rt+=this.renderer.tablecell(this.parseInline(Ot[Ke]),{header:!1,align:wt.align[Ke]});Zt+=this.renderer.tablerow(Rt)}Re+=this.renderer.table(sr,Zt);continue}case"blockquote":{Zt=this.parse(wt.tokens),Re+=this.renderer.blockquote(Zt);continue}case"list":{for(Br=wt.ordered,Nr=wt.start,jr=wt.loose,it=wt.items.length,Zt="",Pe=0;Pe<it;Pe++)xr=wt.items[Pe],an=xr.checked,tn=xr.task,cn="",xr.task&&(Ir=this.renderer.checkbox(an),jr?xr.tokens.length>0&&xr.tokens[0].type==="text"?(xr.tokens[0].text=Ir+" "+xr.tokens[0].text,xr.tokens[0].tokens&&xr.tokens[0].tokens.length>0&&xr.tokens[0].tokens[0].type==="text"&&(xr.tokens[0].tokens[0].text=Ir+" "+xr.tokens[0].tokens[0].text)):xr.tokens.unshift({type:"text",text:Ir}):cn+=Ir),cn+=this.parse(xr.tokens,jr),Zt+=this.renderer.listitem(cn,tn,an);Re+=this.renderer.list(Zt,Br,Nr);continue}case"html":{Re+=this.renderer.html(wt.text);continue}case"paragraph":{Re+=this.renderer.paragraph(this.parseInline(wt.tokens));continue}case"text":{for(Zt=wt.tokens?this.parseInline(wt.tokens):wt.text;Le+1<hn&&ge[Le+1].type==="text";)wt=ge[++Le],Zt+=`
`+(wt.tokens?this.parseInline(wt.tokens):wt.text);Re+=Ee?this.renderer.paragraph(Zt):Zt;continue}default:{var lr='Token with "'+wt.type+'" type was not found.';if(this.options.silent){console.error(lr);return}else throw new Error(lr)}}}return Re},ve.parseInline=function(ge,Ee){Ee=Ee||this.renderer;var Re="",Le,Pe,Ke=ge.length;for(Le=0;Le<Ke;Le++){Pe=ge[Le];switch(Pe.type){case"escape":{Re+=Ee.text(Pe.text);break}case"html":{Re+=Ee.html(Pe.text);break}case"link":{Re+=Ee.link(Pe.href,Pe.title,this.parseInline(Pe.tokens,Ee));break}case"image":{Re+=Ee.image(Pe.href,Pe.title,Pe.text);break}case"strong":{Re+=Ee.strong(this.parseInline(Pe.tokens,Ee));break}case"em":{Re+=Ee.em(this.parseInline(Pe.tokens,Ee));break}case"codespan":{Re+=Ee.codespan(Pe.text);break}case"br":{Re+=Ee.br();break}case"del":{Re+=Ee.del(this.parseInline(Pe.tokens,Ee));break}case"text":{Re+=Ee.text(Pe.text);break}default:{var it='Token with "'+Pe.type+'" type was not found.';if(this.options.silent){console.error(it);return}else throw new Error(it)}}}return Re},fe}(),nt=W.merge,at=W.checkSanitizeDeprecation,Be=W.escape,Ie=w.getDefaults,rt=w.changeDefaults,lt=w.defaults;function _e(fe,ve,Oe){if(typeof fe=="undefined"||fe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof fe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(fe)+", string expected");if(typeof ve=="function"&&(Oe=ve,ve=null),ve=nt({},_e.defaults,ve||{}),at(ve),Oe){var ge=ve.highlight,Ee;try{Ee=re.lex(fe,ve)}catch(Ke){return Oe(Ke)}var Re=function(it){var st;if(!it)try{st=et.parse(Ee,ve)}catch(Ot){it=Ot}return ve.highlight=ge,it?Oe(it):Oe(null,st)};if(!ge||ge.length<3)return Re();if(delete ve.highlight,!Ee.length)return Re();var Le=0;_e.walkTokens(Ee,function(Ke){Ke.type==="code"&&(Le++,setTimeout(function(){ge(Ke.text,Ke.lang,function(it,st){if(it)return Re(it);st!=null&&st!==Ke.text&&(Ke.text=st,Ke.escaped=!0),Le--,Le===0&&Re()})},0))}),Le===0&&Re();return}try{var Pe=re.lex(fe,ve);return ve.walkTokens&&_e.walkTokens(Pe,ve.walkTokens),et.parse(Pe,ve)}catch(Ke){if(Ke.message+=`
Please report this to https://github.com/markedjs/marked.`,ve.silent)return"<p>An error occurred:</p><pre>"+Be(Ke.message+"",!0)+"</pre>";throw Ke}}_e.options=_e.setOptions=function(fe){return nt(_e.defaults,fe),rt(_e.defaults),_e},_e.getDefaults=Ie,_e.defaults=lt,_e.use=function(fe){var ve=nt({},fe);if(fe.renderer&&function(){var ge=_e.defaults.renderer||new ue,Ee=function(Pe){var Ke=ge[Pe];ge[Pe]=function(){for(var it=arguments.length,st=new Array(it),Ot=0;Ot<it;Ot++)st[Ot]=arguments[Ot];var Rt=fe.renderer[Pe].apply(ge,st);return Rt===!1&&(Rt=Ke.apply(ge,st)),Rt}};for(var Re in fe.renderer)Ee(Re);ve.renderer=ge}(),fe.tokenizer&&function(){var ge=_e.defaults.tokenizer||new Ae,Ee=function(Pe){var Ke=ge[Pe];ge[Pe]=function(){for(var it=arguments.length,st=new Array(it),Ot=0;Ot<it;Ot++)st[Ot]=arguments[Ot];var Rt=fe.tokenizer[Pe].apply(ge,st);return Rt===!1&&(Rt=Ke.apply(ge,st)),Rt}};for(var Re in fe.tokenizer)Ee(Re);ve.tokenizer=ge}(),fe.walkTokens){var Oe=_e.defaults.walkTokens;ve.walkTokens=function(ge){fe.walkTokens(ge),Oe&&Oe(ge)}}_e.setOptions(ve)},_e.walkTokens=function(fe,ve){for(var Oe=v(fe),ge;!(ge=Oe()).done;){var Ee=ge.value;ve(Ee);switch(Ee.type){case"table":{for(var Re=v(Ee.tokens.header),Le;!(Le=Re()).done;){var Pe=Le.value;_e.walkTokens(Pe,ve)}for(var Ke=v(Ee.tokens.cells),it;!(it=Ke()).done;)for(var st=it.value,Ot=v(st),Rt;!(Rt=Ot()).done;){var sr=Rt.value;_e.walkTokens(sr,ve)}break}case"list":{_e.walkTokens(Ee.items,ve);break}default:Ee.tokens&&_e.walkTokens(Ee.tokens,ve)}}},_e.Parser=et,_e.parser=et.parse,_e.Renderer=ue,_e.TextRenderer=we,_e.Lexer=re,_e.lexer=re.lex,_e.Tokenizer=Ae,_e.Slugger=Fe,_e.parse=_e;var ce=_e;return ce})},E4JC:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.StreamCipher,v=g.algo,m=[],w=[],b=[],t=v.Rabbit=N.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,o=0;o<4;o++)a[o]=(a[o]<<8|a[o]>>>24)&16711935|(a[o]<<24|a[o]>>>8)&4278255360;var n=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],s=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)s[o]^=n[o+4&7];if(c){var h=c.words,f=h[0],u=h[1],i=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=i>>>16|r&4294901760,y=r<<16|i&65535;s[0]^=i,s[1]^=E,s[2]^=r,s[3]^=y,s[4]^=i,s[5]^=E,s[6]^=r,s[7]^=y;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(a,c){var o=this._X;d.call(this),m[0]=o[0]^o[5]>>>16^o[3]<<16,m[1]=o[2]^o[7]>>>16^o[5]<<16,m[2]=o[4]^o[1]>>>16^o[7]<<16,m[3]=o[6]^o[3]>>>16^o[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,a[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function d(){for(var a=this._X,c=this._C,o=0;o<8;o++)w[o]=c[o];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<w[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<w[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<w[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<w[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<w[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<w[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<w[6]>>>0?1:0)|0,this._b=c[7]>>>0<w[7]>>>0?1:0;for(var o=0;o<8;o++){var n=a[o]+c[o],s=n&65535,h=n>>>16,f=((s*s>>>17)+s*h>>>15)+h*h,u=((n&4294901760)*n|0)+((n&65535)*n|0);b[o]=f^u}a[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,a[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,a[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,a[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,a[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,a[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,a[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,a[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.Rabbit=N._createHelper(t)}(),P.Rabbit})},ELLl:function(H,q,L){(function(P){P(L("VrN/"))})(function(P){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=P.Pos;P.defineOption("autoCloseBrackets",!1,function(s,h,f){f&&f!=P.Init&&(s.removeKeyMap(v),s.state.closeBrackets=null),h&&(m(N(h,"pairs")),s.state.closeBrackets=h,s.addKeyMap(v))});function N(s,h){return h=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[h]!=null?s[h]:g[h]}var v={Backspace:t,Enter:d};function m(s){for(var h=0;h<s.length;h++){var f=s.charAt(h),u="'"+f+"'";v[u]||(v[u]=w(f))}}m(g.pairs+"`");function w(s){return function(h){return c(h,s)}}function b(s){var h=s.state.closeBrackets;if(!h||h.override)return h;var f=s.getModeAt(s.getCursor());return f.closeBrackets||h}function t(s){var h=b(s);if(!h||s.getOption("disableInput"))return P.Pass;for(var f=N(h,"pairs"),u=s.listSelections(),i=0;i<u.length;i++){if(!u[i].empty())return P.Pass;var r=o(s,u[i].head);if(!r||f.indexOf(r)%2!=0)return P.Pass}for(var i=u.length-1;i>=0;i--){var E=u[i].head;s.replaceRange("",T(E.line,E.ch-1),T(E.line,E.ch+1),"+delete")}}function d(s){var h=b(s),f=h&&N(h,"explode");if(!f||s.getOption("disableInput"))return P.Pass;for(var u=s.listSelections(),i=0;i<u.length;i++){if(!u[i].empty())return P.Pass;var r=o(s,u[i].head);if(!r||f.indexOf(r)%2!=0)return P.Pass}s.operation(function(){var E=s.lineSeparator()||`
`;s.replaceSelection(E+E,null),s.execCommand("goCharLeft"),u=s.listSelections();for(var y=0;y<u.length;y++){var p=u[y].head.line;s.indentLine(p,null,!0),s.indentLine(p+1,null,!0)}})}function a(s){var h=P.cmpPos(s.anchor,s.head)>0;return{anchor:new T(s.anchor.line,s.anchor.ch+(h?-1:1)),head:new T(s.head.line,s.head.ch+(h?1:-1))}}function c(s,h){var f=b(s);if(!f||s.getOption("disableInput"))return P.Pass;var u=N(f,"pairs"),i=u.indexOf(h);if(i==-1)return P.Pass;for(var r=N(f,"closeBefore"),E=N(f,"triples"),y=u.charAt(i+1)==h,p=s.listSelections(),R=i%2==0,O,_=0;_<p.length;_++){var x=p[_],S=x.head,C,j=s.getRange(S,T(S.line,S.ch+1));if(R&&!x.empty())C="surround";else if((y||!R)&&j==h)y&&n(s,S)?C="both":E.indexOf(h)>=0&&s.getRange(S,T(S.line,S.ch+3))==h+h+h?C="skipThree":C="skip";else if(y&&S.ch>1&&E.indexOf(h)>=0&&s.getRange(T(S.line,S.ch-2),S)==h+h){if(S.ch>2&&/\bstring/.test(s.getTokenTypeAt(T(S.line,S.ch-2))))return P.Pass;C="addFour"}else if(y){var F=S.ch==0?" ":s.getRange(T(S.line,S.ch-1),S);if(!P.isWordChar(j)&&F!=h&&!P.isWordChar(F))C="both";else return P.Pass}else if(R&&(j.length===0||/\s/.test(j)||r.indexOf(j)>-1))C="both";else return P.Pass;if(!O)O=C;else if(O!=C)return P.Pass}var M=i%2?u.charAt(i-1):h,Y=i%2?h:u.charAt(i+1);s.operation(function(){if(O=="skip")s.execCommand("goCharRight");else if(O=="skipThree")for(var K=0;K<3;K++)s.execCommand("goCharRight");else if(O=="surround"){for(var A=s.getSelections(),K=0;K<A.length;K++)A[K]=M+A[K]+Y;s.replaceSelections(A,"around"),A=s.listSelections().slice();for(var K=0;K<A.length;K++)A[K]=a(A[K]);s.setSelections(A)}else O=="both"?(s.replaceSelection(M+Y,null),s.triggerElectric(M+Y),s.execCommand("goCharLeft")):O=="addFour"&&(s.replaceSelection(M+M+M+M,"before"),s.execCommand("goCharRight"))})}function o(s,h){var f=s.getRange(T(h.line,h.ch-1),T(h.line,h.ch+1));return f.length==2?f:null}function n(s,h){var f=s.getTokenAt(T(h.line,h.ch+1));return/\bstring/.test(f.type)&&f.start==h.ch&&(h.ch==0||!/\bstring/.test(s.getTokenTypeAt(h)))}})},ELcG:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(g){var T=P,N=T.lib,v=N.WordArray,m=N.Hasher,w=T.algo,b=v.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),t=v.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=v.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]),a=v.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),c=v.create([0,1518500249,1859775393,2400959708,2840853838]),o=v.create([1352829926,1548603684,1836072691,2053994217,0]),n=w.RIPEMD160=m.extend({_doReset:function(){this._hash=v.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,y){for(var p=0;p<16;p++){var R=y+p,O=E[R];E[R]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var _=this._hash.words,x=c.words,S=o.words,C=b.words,j=t.words,F=d.words,M=a.words,Y,K,A,W,U,D,X,ie,oe,de;D=Y=_[0],X=K=_[1],ie=A=_[2],oe=W=_[3],de=U=_[4];for(var Ce,p=0;p<80;p+=1)Ce=Y+E[y+C[p]]|0,p<16?Ce+=s(K,A,W)+x[0]:p<32?Ce+=h(K,A,W)+x[1]:p<48?Ce+=f(K,A,W)+x[2]:p<64?Ce+=u(K,A,W)+x[3]:Ce+=i(K,A,W)+x[4],Ce=Ce|0,Ce=r(Ce,F[p]),Ce=Ce+U|0,Y=U,U=W,W=r(A,10),A=K,K=Ce,Ce=D+E[y+j[p]]|0,p<16?Ce+=i(X,ie,oe)+S[0]:p<32?Ce+=u(X,ie,oe)+S[1]:p<48?Ce+=f(X,ie,oe)+S[2]:p<64?Ce+=h(X,ie,oe)+S[3]:Ce+=s(X,ie,oe)+S[4],Ce=Ce|0,Ce=r(Ce,M[p]),Ce=Ce+de|0,D=de,de=oe,oe=r(ie,10),ie=X,X=Ce;Ce=_[1]+A+oe|0,_[1]=_[2]+W+de|0,_[2]=_[3]+U+D|0,_[3]=_[4]+Y+X|0,_[4]=_[0]+K+ie|0,_[0]=Ce},_doFinalize:function(){var E=this._data,y=E.words,p=this._nDataBytes*8,R=E.sigBytes*8;y[R>>>5]|=128<<24-R%32,y[(R+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,E.sigBytes=(y.length+1)*4,this._process();for(var O=this._hash,_=O.words,x=0;x<5;x++){var S=_[x];_[x]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return O},clone:function(){var E=m.clone.call(this);return E._hash=this._hash.clone(),E}});function s(E,y,p){return E^y^p}function h(E,y,p){return E&y|~E&p}function f(E,y,p){return(E|~y)^p}function u(E,y,p){return E&p|y&~p}function i(E,y,p){return E^(y|~p)}function r(E,y){return E<<y|E>>>32-y}T.RIPEMD160=m._createHelper(n),T.HmacRIPEMD160=m._createHmacHelper(n)}(Math),P.RIPEMD160})},ETIr:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.WordArray,v=g.enc,m=v.Base64={stringify:function(b){var t=b.words,d=b.sigBytes,a=this._map;b.clamp();for(var c=[],o=0;o<d;o+=3)for(var n=t[o>>>2]>>>24-o%4*8&255,s=t[o+1>>>2]>>>24-(o+1)%4*8&255,h=t[o+2>>>2]>>>24-(o+2)%4*8&255,f=n<<16|s<<8|h,u=0;u<4&&o+u*.75<d;u++)c.push(a.charAt(f>>>6*(3-u)&63));var i=a.charAt(64);if(i)for(;c.length%4;)c.push(i);return c.join("")},parse:function(b){var t=b.length,d=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var c=0;c<d.length;c++)a[d.charCodeAt(c)]=c}var o=d.charAt(64);if(o){var n=b.indexOf(o);n!==-1&&(t=n)}return w(b,t,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function w(b,t,d){for(var a=[],c=0,o=0;o<t;o++)if(o%4){var n=d[b.charCodeAt(o-1)]<<o%4*2,s=d[b.charCodeAt(o)]>>>6-o%4*2,h=n|s;a[c>>>2]|=h<<24-c%4*8,c++}return N.create(a,c)}}(),P.enc.Base64})},"F+F2":function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var g=P,T=g.lib,N=T.WordArray,v=N.init,m=N.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 b=w.byteLength,t=[],d=0;d<b;d++)t[d>>>2]|=w[d]<<24-d%4*8;v.call(this,t,b)}else v.apply(this,arguments)};m.prototype=N}(),P.lib.WordArray})},FWmy:function(H,q,L){"use strict";L.d(q,"a",function(){return P});function P(g,T){if(!g)throw new Error(T?`Assertion failed (${T})`:"Assertion Failed")}},GRO8:function(H,q,L){"use strict";L.r(q);var P=L("k1fw"),g=L("2qtc"),T=L("kLXV"),N=L("lUTK"),v=L("BvKs"),m=L("+L6B"),w=L("2/Rp"),b=L("T2oS"),t=L("W9HT"),d=L("sPJy"),a=L("bE4q"),c=L("miYZ"),o=L("tsqr"),n=L("9og8"),s=L("tJVT"),h=L("PpiC"),f=L("WmNS"),u=L.n(f),i=L("q1tI"),r=L.n(i),E=L("Ty5D"),y=L("55Ip"),p=L("9kvl"),R=L("KeDT"),O=L.n(R),_=L("zrhs"),x=L("DZo9"),S=L("8z0m"),C=L("LtfV"),j=L("KhGG"),F=S.a.Dragger,M=function(qe){var pt=qe.user,_t=qe.dispatch,Ut=qe.classroomList,Dt=qe.shixunsDetail,Vt=qe.getResults,Pt=Object(E.i)(),ut=Object(i.useState)(),vt=Object(s.a)(ut,2),yt=vt[0],tr=vt[1],Jt=Object(i.useState)([]),Wt=Object(s.a)(Jt,2),Ft=Wt[0],Xt=Wt[1],qt=Object(i.useState)(!1),Ze=Object(s.a)(qt,2),vr=Ze[0],Ar=Ze[1],cr={onRemove:function(){Xt([])},beforeUpload:function(bt){if(console.log(bt),(bt==null?void 0:bt.size)>1024*1024*500)return o.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var ft=[];return ft.push(bt),Xt([].concat(ft)),!1},fileList:Ft};return r.a.createElement(T.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:vr,onOk:Object(n.a)(u.a.mark(function ht(){var bt,ft,Tt;return u.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(!((Ft==null?void 0:Ft.length)<=0)){rr.next=3;break}return o.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),rr.abrupt("return");case 3:return Ar(!0),rr.next=6,Object(j.c)(Ft[0],{login:(bt=pt.userInfo)===null||bt===void 0?void 0:bt.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(ft=Ft[0])===null||ft===void 0?void 0:ft.name});case 6:Tt=rr.sent,(Tt==null?void 0:Tt.status)===0?(o.b.info("\u63D0\u4EA4\u6210\u529F"),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Ar(!1),Xt([]),Vt(Dt.actionTabs.params.value)):(Ar(!1),o.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return rr.stop()}},ht)})),onCancel:function(){Xt([]),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},r.a.createElement(F,cr,r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(C.a,null)),r.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},Y=Object(p.a)(function(mt){var qe=mt.user,pt=mt.classroomList,_t=mt.shixunsDetail;return{user:qe,classroomList:pt,shixunsDetail:_t}})(M),K=L("14J3"),A=L("BMrR"),W=L("5NDa"),U=L("5rEg"),D=L("9Bee"),X=L("m3rI"),ie=L("ErOA"),oe=L("NLgs"),de=L("fV52"),Ce=L("3I+P"),Ae=L("OaEy"),me=L("2fM7"),Se=L("5bA4"),ye=L("UESt"),se=me.a.Option;function ee(mt){var qe=mt.rewarddata,pt=mt.getlistdatas,_t=mt.is_signed,Ut=mt.dispatch,Dt=mt.userlist,Vt=Object(i.useRef)(null),Pt=Object(i.useState)(!1),ut=Object(s.a)(Pt,2),vt=ut[0],yt=ut[1],tr=Object(i.useState)(void 0),Jt=Object(s.a)(tr,2),Wt=Jt[0],Ft=Jt[1],Xt=Object(i.useState)(""),qt=Object(s.a)(Xt,2),Ze=qt[0],vr=qt[1],Ar=Object(i.useState)(void 0),cr=Object(s.a)(Ar,2),ht=cr[0],bt=cr[1],ft=Object(i.useState)(void 0),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Gt=Object(i.useState)(void 0),yr=Object(s.a)(Gt,2),kr=yr[0],or=yr[1];function Qe(nr){return kt.apply(this,arguments)}function kt(){return kt=Object(n.a)(u.a.mark(function nr(br){var Tr;return u.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!br.user_received){Ht.next=3;break}return window.open(br.click_info),Ht.abrupt("return");case 3:if(Object(oe.f)(Ut)){Ht.next=5;break}return Ht.abrupt("return");case 5:if(!(_t===!1)){Ht.next=8;break}return o.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Ht.abrupt("return");case 8:if(!(br.click_event==="Pop")){Ht.next=14;break}return vr(br.id),yt(!0),Ht.abrupt("return");case 14:Ft(void 0);case 15:return Ht.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:br.id}});case 17:Tr=Ht.sent,Tr&&Tr.status===0&&(pt(),br.click_event==="Link"?(o.b.info("\u9886\u53D6\u6210\u529F"),window.open(br.click_info)):o.b.info(br.click_info));case 19:case"end":return Ht.stop()}},nr)})),kt.apply(this,arguments)}function Zr(){return Vr.apply(this,arguments)}function Vr(){return Vr=Object(n.a)(u.a.mark(function nr(){var br;return u.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!(Dt&&!Dt.real_name)){At.next=4;break}if(ht){At.next=4;break}return o.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 4:if(!(Dt&&!Dt.email)){At.next=8;break}if(zt){At.next=8;break}return o.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){At.next=12;break}if(kr){At.next=12;break}return o.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 12:if(Wt){At.next=15;break}return o.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),At.abrupt("return");case 15:return At.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:Ze,className:Wt,name:ht,mail:zt,phone:kr}});case 17:br=At.sent,br&&br.status===0&&(yt(!1),pt(),o.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 At.stop()}},nr)})),Vr.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement(T.a,{visible:vt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return yt(!1)},onOk:function(){Zr()}},r.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",r.a.createElement(U.a,{className:Dt&&Dt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||ht,disabled:Dt&&Dt.real_name||!1,onChange:function(br){return bt(br.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",r.a.createElement(U.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||zt,disabled:Dt&&Dt.email||!1,onChange:function(br){return rr(br.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",r.a.createElement(U.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||kr,disabled:Dt&&Dt.phone||!1,onChange:function(br){return or(br.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",r.a.createElement(me.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(br){Ft(br)}},r.a.createElement(se,{value:"\u5927\u4E00"},"\u5927\u4E00"),r.a.createElement(se,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),r.a.createElement(se,{value:"\u5927\u4E09"},"\u5927\u4E09"),r.a.createElement(se,{value:"\u5927\u56DB"},"\u5927\u56DB"),r.a.createElement(se,{value:"\u5927\u4E94"},"\u5927\u4E94"),r.a.createElement(se,{value:"\u7855\u4E00"},"\u7855\u4E00"),r.a.createElement(se,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),r.a.createElement(se,{value:"\u7855\u4E09"},"\u7855\u4E09"),r.a.createElement(se,{value:"\u535A\u4E00"},"\u535A\u4E00"),r.a.createElement(se,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),r.a.createElement(se,{value:"\u535A\u4E09"},"\u535A\u4E09"),r.a.createElement(se,{value:"\u535A\u56DB"},"\u535A\u56DB"),r.a.createElement(se,{value:"\u535A\u4E94"},"\u535A\u4E94")),r.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),qe&&qe.length>3?r.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},r.a.createElement("span",{className:O.a.spanprev,onClick:function(){Vt.current.prev()}},r.a.createElement(Se.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),r.a.createElement(Ce.a,{ref:Vt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},qe&&qe.map(function(nr,br){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:X.a.IMG_SERVER+"/".concat(nr.image_url)}),nr.user_received===!1||nr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Qe(nr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),r.a.createElement("span",{className:O.a.spannext,onClick:function(){Vt.current.next()}},r.a.createElement(ye.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):r.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},qe&&qe.map(function(nr,br){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:X.a.IMG_SERVER+"/".concat(nr.image_url)}),nr.user_received===!1||nr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Qe(nr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var B=ee,G=function(qe,pt){var _t=qe.StaffDetail,Ut=qe.HeaderDetail,Dt=qe.ItemData,Vt=qe.setIssee,Pt=qe.ModelType,ut=qe.dispatch,vt=qe.userinfo,yt=qe.Editable,tr=Object(i.useState)(!1),Jt=Object(s.a)(tr,2),Wt=Jt[0],Ft=Jt[1],Xt=Object(i.useState)([]),qt=Object(s.a)(Xt,2),Ze=qt[0],vr=qt[1],Ar=Object(i.useState)(""),cr=Object(s.a)(Ar,2),ht=cr[0],bt=cr[1],ft=Object(i.useState)(""),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Gt=Object(i.useState)(!1),yr=Object(s.a)(Gt,2),kr=yr[0],or=yr[1],Qe=Object(E.i)(),kt=Qe.identifier,Zr=Object(i.useRef)(null),Vr=Object(i.useRef)(null);Zr.current=_t==null?void 0:_t.enrolled,Object(i.useEffect)(function(){var At;return(At=Vr.current)===null||At===void 0||At.addEventListener("click",nr),function(){var Ht;(Ht=Vr.current)===null||Ht===void 0||Ht.removeEventListener("click",nr)}},[]);var nr=function(Ht){var ir;if((Ht==null||((ir=Ht.target)===null||ir===void 0)?void 0:ir.id)==="modal-upload"){if(!Object(oe.e)(ut))return;if(!Zr.current){T.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Ft(!0)}};Object(i.useEffect)(function(){if(Ut!=null&&Ut.upload_file){var At,Ht,ir;vr([{name:Ut==null||((At=Ut.upload_file)===null||At===void 0)?void 0:At.title,status:"done",uid:"123456789"}]),rr(Ut==null?void 0:Ut.upload_file_url),bt(Ut==null||((Ht=Ut.upload_file)===null||Ht===void 0||((ir=Ht.url)===null||ir===void 0))?void 0:ir.split("/")[3])}},[Ut==null?void 0:Ut.upload_file]);var br={name:"file",multiple:!1,withCredentials:!0,action:X.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:Ze,onChange:function(Ht){var ir=Ht.file.status,Kt=[Object(P.a)({},Ht.file)];if(vr(Kt),Ht.file.status==="uploading"&&or(!0),ir==="done"){var ct,dt;bt((ct=Kt[0])===null||ct===void 0||((dt=ct.response)===null||dt===void 0)?void 0:dt.id),or(!1)}ir==="error"&&(vr([]),or(!1))},beforeUpload:function(Ht){var ir=Ht.size/1024/1024<1e3;return ir?Promise.resolve():(o.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Tr=function(){Ft(!0)};return Object(i.useImperativeHandle)(pt,function(){return{handleVisible:Tr}}),r.a.createElement("div",{ref:Vr},Pt==="reward"?r.a.createElement(B,{userlist:vt,dispatch:ut,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,r.a.createElement("div",{style:{textAlign:"right"}},((vt==null?void 0:vt.admin)||(vt==null?void 0:vt.business)||yt)&&r.a.createElement(w.a,{onClick:function(){return Vt(!1)}},"\u7F16\u8F91")),r.a.createElement(D.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(At,Ht){return r.a.createElement("div",null,r.a.createElement("a",{href:(X.a===null||X.a===void 0?void 0:X.a.API_SERVER)+At.url,target:"_self",download:At.title},r.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),r.a.createElement("span",{style:{color:"#000000"}},At.title),r.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},At.filesize)))}),r.a.createElement(T.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Wt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:kr,onCancel:function(){return Ft(!1)},onOk:Object(n.a)(u.a.mark(function At(){var Ht;return u.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!(!ht&&!zt)){Kt.next=3;break}return Ft(!1),Kt.abrupt("return");case 3:return or(!0),Kt.next=6,Object(ie.a)("/api/competitions/".concat(kt,"/upload_file.json"),{method:"post",body:{attachment_id:ht,upload_file_url:zt}});case 6:Ht=Kt.sent,Ht.status===0&&(Ft(!1),or(!1));case 8:case"end":return Kt.stop()}},At)}))},r.a.createElement("div",null,r.a.createElement(A.a,{align:"middle",className:"mb20"},r.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),r.a.createElement(U.a,{style:{width:416},value:zt,onChange:function(Ht){var ir;return rr((ir=Ht.target)===null||ir===void 0?void 0:ir.value)}})),r.a.createElement(A.a,{align:"top"},r.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),r.a.createElement(S.a,br,r.a.createElement(w.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},V=Object(i.forwardRef)(G),Q=L("Ot1p"),Z=L("hJwl");function ne(mt){var qe=mt.ItemData,pt=mt.setIssee,_t=mt.MenuItem,Ut=mt.dispatch,Dt=mt.identifier,Vt=mt.ModelType,Pt=mt.userinfo,ut=mt.getrightdatas,vt=Object(i.useState)([]),yt=Object(s.a)(vt,2),tr=yt[0],Jt=yt[1],Wt=Object(i.useState)(qe.md_content),Ft=Object(s.a)(Wt,2),Xt=Ft[0],qt=Ft[1];Object(i.useEffect)(function(){var bt,ft=[];qe==null||((bt=qe.attachments)===null||bt===void 0)||bt.map(function(Tt){var zt={uid:Tt.id,name:Tt.title,response:{id:Tt.id}};ft.push(zt)}),Jt(ft)},[qe==null?void 0:qe.attachments]);function Ze(){var bt,ft=[];return qe==null||((bt=qe.attachments)===null||bt===void 0)||bt.map(function(Tt){var zt={uid:Tt==null?void 0:Tt.id,name:Tt.title,response:{id:Tt.id}};ft.push(zt)}),ft}var vr={name:"file",multiple:!0,withCredentials:!0,action:X.a.API_SERVER+"/api/attachments.json",defaultFileList:Ze(),onRemove:function(ft){Object(Z.t)({id:ft.uid})},onChange:function(ft){var Tt=ft.file.status;Tt!=="uploading",Tt==="removed"&&Jt(ft.fileList),Tt==="done"?(Jt(ft.fileList),o.b.success("".concat(ft.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Tt==="error"&&o.b.error("".concat(ft.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(ft){var Tt=ft.size/1024/1024<150;return Tt||o.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Tt}};console.log(vr);function Ar(){return cr.apply(this,arguments)}function cr(){return cr=Object(n.a)(u.a.mark(function bt(){var ft;return u.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,Ut({type:"competitions/updateMdContent",payload:{attachment_ids:ht(tr),competition_module_id:qe.id,md_content_id:qe.md_id,content:Xt,identifier:Dt}});case 2:ft=zt.sent,ft&&(o.b.info("\u63D0\u4EA4\u6210\u529F"),pt(!0),ut(_t));case 4:case"end":return zt.stop()}},bt)})),cr.apply(this,arguments)}function ht(bt){var ft=[];return bt&&bt.map(function(Tt){ft.push(Tt.response.id)}),ft}return r.a.createElement("div",null,Vt==="reward"?r.a.createElement(B,{userlist:Pt,dispatch:Ut,rewarddata:qe.reward_setting,is_signed:qe.is_signed}):null,r.a.createElement(Q.a,{defaultValue:Xt,onChange:function(ft){return qt(ft)}}),r.a.createElement(S.a,vr,r.a.createElement(w.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ar()}},"\u63D0\u4EA4"),r.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return pt(!0)}},"\u53D6\u6D88")))}var re=ne,$=L("g9YV"),J=L("wCAj"),le=L("Znn+"),ue=L("ZTPi");function we(){return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),r.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Fe=we,Xe=L("5Dmo"),$e=L("3S7+"),et=L("jCWc"),nt=L("kPKH"),at=L("IzEo"),Be=L("bx4M");function Ie(mt){var qe=mt.oneItem,pt=mt.towItem,_t=mt.threeItem;return r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement(A.a,{gutter:16,style:{justifyContent:"center"}},r.a.createElement(nt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},r.a.createElement(Be.a,{title:r.a.createElement("div",{className:O.a.towtop},r.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(y.a,{to:"/users/".concat(pt==null?void 0:pt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(pt==null?void 0:pt.user_image)}),(pt==null?void 0:pt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},pt==null?void 0:pt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},pt==null?void 0:pt.record_user_name)))),className:O.a.towdiv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},pt==null?void 0:pt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},pt==null?void 0:pt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(pt==null?void 0:pt.extra_score)+parseFloat(pt==null?void 0:pt.score),"\u5206"))),r.a.createElement(nt.a,{span:6},r.a.createElement(Be.a,{title:r.a.createElement("div",{className:O.a.onetop},r.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(y.a,{to:"/users/".concat(qe==null?void 0:qe.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(qe==null?void 0:qe.user_image)}),(qe==null?void 0:qe.competition_prize)&&r.a.createElement("p",{className:O.a.prize},qe==null?void 0:qe.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},qe==null?void 0:qe.record_user_name)))),className:O.a.onediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},qe==null?void 0:qe.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},qe==null?void 0:qe.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(qe==null?void 0:qe.extra_score)+parseFloat(qe==null?void 0:qe.score),"\u5206"))),r.a.createElement(nt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},r.a.createElement(Be.a,{title:r.a.createElement("div",{className:O.a.threetop},r.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(y.a,{to:"/users/".concat(_t==null?void 0:_t.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(_t==null?void 0:_t.user_image)}),(_t==null?void 0:_t.competition_prize)&&r.a.createElement("p",{className:O.a.prize},_t==null?void 0:_t.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},_t==null?void 0:_t.record_user_name)))),className:O.a.threediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},_t==null?void 0:_t.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},_t==null?void 0:_t.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(_t==null?void 0:_t.extra_score)+parseFloat(_t==null?void 0:_t.score),"\u5206")))))}var rt=Ie;function lt(mt){var qe,pt,_t,Ut,Dt,Vt,Pt,ut,vt,yt,tr,Jt,Wt,Ft,Xt,qt,Ze,vr,Ar,cr,ht,bt,ft,Tt,zt,rr,Gt,yr,kr,or,Qe=mt.ItemData;return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement(rt,{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||((qe=Qe.user_ranks)===null||qe===void 0)?void 0:qe.length)>0&&r.a.createElement("div",{className:O.a.myTeam},(Qe==null||((pt=Qe.user_ranks)===null||pt===void 0||((_t=pt[0])===null||_t===void 0))?void 0:_t.success)===!1?r.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u664B\u7EA7\uFF1A",r.a.createElement("span",{style:{color:(Qe==null||((Ut=Qe.user_ranks)===null||Ut===void 0||((Dt=Ut[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(Qe==null||((Vt=Qe.user_ranks)===null||Vt===void 0||((Pt=Vt[0])===null||Pt===void 0))?void 0:Pt.success)===!1?"\u5426":Qe!=null&&(ut=Qe.user_ranks)!==null&&ut!==void 0&&(vt=ut[0])!==null&&vt!==void 0&&vt.success?"\u662F":"")),(Qe==null||((yt=Qe.user_ranks)===null||yt===void 0||((tr=yt[0])===null||tr===void 0))?void 0:tr.awards)&&r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u83B7\u5956\uFF1A",r.a.createElement("span",null,(Qe==null||((Jt=Qe.user_ranks)===null||Jt===void 0||((Wt=Jt[0])===null||Wt===void 0))?void 0:Wt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(Qe==null||((Ft=Qe.user_ranks)===null||Ft===void 0||((Xt=Ft[0])===null||Xt===void 0))?void 0:Xt.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):r.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",Qe==null||((qt=Qe.user_ranks)===null||qt===void 0||((Ze=qt[0])===null||Ze===void 0))?void 0:Ze.rank),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6218\u961F\u540D"},Qe==null||((vr=Qe.user_ranks)===null||vr===void 0||((Ar=vr[0])===null||Ar===void 0))?void 0:Ar.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u65F6\u95F4"},Qe==null||((cr=Qe.user_ranks)===null||cr===void 0||((ht=cr[0])===null||ht===void 0))?void 0:ht.cost_time)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement($e.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Qe==null||((bt=Qe.user_ranks)===null||bt===void 0||((ft=bt[0])===null||ft===void 0))?void 0:ft.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Qe==null||((Tt=Qe.user_ranks)===null||Tt===void 0||((zt=Tt[0])===null||zt===void 0))?void 0:zt.score)),r.a.createElement("span",null,r.a.createElement($e.a,{title:"\u603B\u5206"},parseFloat(Qe==null||((rr=Qe.user_ranks)===null||rr===void 0||((Gt=rr[0])===null||Gt===void 0))?void 0:Gt.extra_score)+parseFloat(Qe==null||((yr=Qe.user_ranks)===null||yr===void 0||((kr=yr[0])===null||kr===void 0))?void 0:kr.score)||0))),Qe==null||((or=Qe.teams)===null||or===void 0)?void 0:or.map(function(kt,Zr){return r.a.createElement("div",{className:O.a.bottomItem},r.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Zr+1),r.a.createElement(y.a,{to:"/users/".concat(kt==null?void 0:kt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},r.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(kt==null?void 0:kt.user_image)}),(kt==null?void 0:kt.competition_prize)&&r.a.createElement("span",{className:O.a.spanrightradius},kt==null?void 0:kt.competition_prize)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6218\u961F\u540D"},kt==null?void 0:kt.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},kt.school_name)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement($e.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},kt.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},kt.score)),r.a.createElement("span",{style:{color:"#0152d9"}},r.a.createElement($e.a,{title:"\u603B\u5206"},parseFloat(kt.extra_score)+parseFloat(kt.score))))}))}var _e=lt,ce=ue.a.TabPane;function fe(mt){var qe,pt,_t,Ut,Dt,Vt,Pt=mt.ChartRules,ut=mt.ItemData,vt=mt.getCharts,yt=mt.Selectkey,tr=mt.getChartRules,Jt=mt.userinfo,Wt=mt.Editable,Ft=mt.HeaderDetail,Xt=Object(i.useState)(!1),qt=Object(s.a)(Xt,2),Ze=qt[0],vr=qt[1],Ar=Object(i.useState)(""),cr=Object(s.a)(Ar,2),ht=cr[0],bt=cr[1],ft=Object(i.useState)(!0),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Gt=Object(i.useState)(),yr=Object(s.a)(Gt,2),kr=yr[0],or=yr[1],Qe=Object(i.useState)(),kt=Object(s.a)(Qe,2),Zr=kt[0],Vr=kt[1],nr=Object(E.i)(),br=nr.identifier;Object(i.useEffect)(function(){if(zt){var ir,Kt=Pt==null||((ir=Pt.stages)===null||ir===void 0)?void 0:ir[0];if(or(Kt),Kt!=null&&Kt.id){var ct,dt,Mt;((Ft==null?void 0:Ft.task)==="mAP"||(Ft==null?void 0:Ft.task)==="dog")&&vt(Kt==null?void 0:Kt.id),bt(((ct=Pt.rule_contents)===null||ct===void 0||((dt=ct.filter(function(qr){return parseInt(qr.competition_stage_id)===parseInt(Kt==null?void 0:Kt.id)}))===null||dt===void 0||((Mt=dt[0])===null||Mt===void 0))?void 0:Mt.content)||"")}else{var xt,_r,Jr;(Ft==null?void 0:Ft.task)==="mAP"||(Ft==null?void 0:Ft.task)==="dog",bt(((xt=Pt.rule_contents)===null||xt===void 0||((_r=xt.filter(function(qr){return parseInt(qr.competition_stage_id)===0}))===null||_r===void 0||((Jr=_r[0])===null||Jr===void 0))?void 0:Jr.content)||"")}}},[Pt]);function Tr(){return At.apply(this,arguments)}function At(){return At=Object(n.a)(u.a.mark(function ir(){var Kt,ct,dt,Mt,xt,_r,Jr,qr,mr;return u.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:if(ht){Rr.next=3;break}return o.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Rr.abrupt("return");case 3:if(rr(!1),Kt=kr==null?void 0:kr.id,!Kt){Rr.next=12;break}return Rr.next=8,Object(ie.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:ht,md_content_id:(ct=Pt.rule_contents)===null||ct===void 0||((dt=ct.filter(function(on){return parseInt(on.competition_stage_id)===parseInt(Kt)}))===null||dt===void 0||((Mt=dt[0])===null||Mt===void 0))?void 0:Mt.id,stage_id:kr==null?void 0:kr.id}});case 8:xt=Rr.sent,xt.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),vr(!1),tr()),Rr.next=16;break;case 12:return Rr.next=14,Object(ie.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:ht,md_content_id:(_r=Pt.rule_contents)===null||_r===void 0||((Jr=_r.filter(function(on){return parseInt(on.competition_stage_id)===0}))===null||Jr===void 0||((qr=Jr[0])===null||qr===void 0))?void 0:qr.id,stage_id:kr==null?void 0:kr.id}});case 14:mr=Rr.sent,mr.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),vr(!1),tr());case 16:case"end":return Rr.stop()}},ir)})),At.apply(this,arguments)}var Ht=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Kt,ct,dt){return r.a.createElement("span",null,dt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Kt){return r.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(Kt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Kt){return r.a.createElement("span",{title:Kt},Kt&&(Kt==null?void 0:Kt.length)>=15?(Kt==null?void 0:Kt.substr(0,15))+"...":Kt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Kt){return r.a.createElement("span",null,Kt||"--")}},{title:(Ft==null?void 0:Ft.task)==="mAP"?"mAP\u6307\u6807":(Ft==null?void 0:Ft.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(Kt){return r.a.createElement("span",null,Kt||"--")}}];return r.a.createElement("div",null,(Pt==null||((qe=Pt.stages)===null||qe===void 0)?void 0:qe.length)>0?null:r.a.createElement(Fe,null),(Pt==null||((pt=Pt.stages)===null||pt===void 0)?void 0:pt.length)>0&&r.a.createElement(ue.a,{animated:!0,tabBarExtraContent:((Jt==null?void 0:Jt.admin)||(Jt==null?void 0:Jt.business)||Wt)&&r.a.createElement(w.a,{onClick:function(){vr(!0)}},"\u7F16\u8F91"),onChange:function(Kt){var ct,dt,Mt,xt,_r;vr(!1);var Jr=Pt==null||((ct=Pt.stages)===null||ct===void 0)?void 0:ct.filter(function(mr){return parseInt(Kt)===parseInt(mr==null?void 0:mr.id)})[0];or(Jr);var qr=Jr==null||((dt=Jr.children)===null||dt===void 0)?void 0:dt[0];Vr(qr),bt(((Mt=Pt.rule_contents)===null||Mt===void 0||((xt=Mt.filter(function(mr){return parseInt(mr.competition_stage_id)===parseInt(Jr==null?void 0:Jr.id)}))===null||xt===void 0||((_r=xt[0])===null||_r===void 0))?void 0:_r.content)||""),vt((qr==null?void 0:qr.id)||Kt)}},Pt&&Pt.stages.map(function(ir,Kt){return r.a.createElement(ce,{tab:ir.name,key:ir.id===null?0:ir.id},Ze===!1&&Pt&&Pt.rule_contents.map(function(ct,dt){if(ir.id===ct.competition_stage_id)return r.a.createElement(D.a,{key:dt,value:ct.content===void 0||ct.content===null?"":ct.content});if(ir.id===null&&ct.competition_stage_id===0)return r.a.createElement(D.a,{key:dt,value:ct.content===void 0||ct.content===null?"":ct.content})}))})),(kr==null||((_t=kr.children)===null||_t===void 0)?void 0:_t.length)>0&&r.a.createElement(ue.a,{activeKey:(Zr==null?void 0:Zr.id)+"",onChange:function(Kt){var ct,dt=kr==null||((ct=kr.children)===null||ct===void 0)?void 0:ct.filter(function(Mt){return parseInt(Kt)===parseInt(Mt==null?void 0:Mt.id)})[0];Vr(dt),vt(Kt)}},kr==null||((Ut=kr.children)===null||Ut===void 0)?void 0:Ut.map(function(ir,Kt){return r.a.createElement(ce,{tab:ir.name,key:ir.id===null?0:ir.id})})),Ze&&r.a.createElement("div",null,r.a.createElement(Q.a,{defaultValue:ht,onChange:function(Kt){bt(Kt)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Tr()}},"\u63D0\u4EA4"),r.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return vr(!1)}},"\u53D6\u6D88"))),(ut==null||((Dt=ut.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&((Ft==null?void 0:Ft.task)==="mAP"||(Ft==null?void 0:Ft.task)==="dog"||(Ft==null?void 0:Ft.task)==="Jittor-3")?r.a.createElement(J.a,{dataSource:ut==null?void 0:ut.teams,columns:Ht,pagination:!1}):(ut==null||((Vt=ut.teams)===null||Vt===void 0)?void 0:Vt.length)>0&&r.a.createElement(_e,{ItemData:ut}))}var ve=fe,Oe=L("/zsF"),ge=L("PArb");function Ee(mt){var qe,pt,_t,Ut,Dt,Vt,Pt,ut=mt.Prize,vt=Object(E.i)(),yt=Object(i.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"}]),tr=Object(s.a)(yt,2),Jt=tr[0],Wt=tr[1],Ft=function(){var Xt=Object(n.a)(u.a.mark(function qt(Ze){var vr;return u.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return cr.next=2,Object(Z.u)({type:Ze.type,id:vt.identifier});case 2:vr=cr.sent,(vr==null?void 0:vr.status)===0&&(location.href="/competitions/exports?id=".concat(vt.identifier,"&type=").concat(Ze.type));case 4:case"end":return cr.stop()}},qt)}));return function(Ze){return Xt.apply(this,arguments)}}();return r.a.createElement("div",null,r.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),r.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ut==null||((qe=ut.personal_certifications)===null||qe===void 0)?void 0:qe.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:X.a.API_SERVER+"".concat(ut==null||((pt=ut.personal_certifications[0])===null||pt===void 0)?void 0:pt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),r.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ut==null||((_t=ut.team_certifications)===null||_t===void 0)?void 0:_t.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:X.a.API_SERVER+"".concat(ut==null||((Ut=ut.team_certifications[0])===null||Ut===void 0)?void 0:Ut.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),r.a.createElement(ge.a,null),(ut==null||((Dt=ut.teams)===null||Dt===void 0)?void 0:Dt.length)>0?r.a.createElement("div",null,r.a.createElement("p",null,(ut==null?void 0:ut.teams)&&(ut==null||((Vt=ut.teams[0])===null||Vt===void 0)?void 0:Vt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),r.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},r.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),r.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),r.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ut==null?void 0:ut.teams)&&(ut==null||((Pt=ut.teams[0])===null||Pt===void 0)?void 0:Pt.team_members.map(function(Xt,qt){var Ze,vr,Ar,cr,ht,bt;return r.a.createElement("p",{className:O.a.teamItem},r.a.createElement("span",{style:{width:"5%"}},Xt==null?void 0:Xt.role),r.a.createElement("span",{style:{width:"5%"}},Xt==null?void 0:Xt.name),r.a.createElement("span",{style:{width:"10%"}},(Xt==null?void 0:Xt.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Xt==null?void 0:Xt.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},(Xt==null?void 0:Xt.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Xt==null?void 0:Xt.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},Xt!=null&&Xt.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},Xt!=null&&Xt.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(Xt==null?void 0:Xt.role)==="\u961F\u957F"?r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ut==null?void 0:ut.teams)&&(ut==null||((Ze=ut.teams[0])===null||Ze===void 0||((vr=Ze.bank_account)===null||vr===void 0))?void 0:vr.bank),(ut==null?void 0:ut.teams)&&(ut==null||((Ar=ut.teams[0])===null||Ar===void 0||((cr=Ar.bank_account)===null||cr===void 0))?void 0:cr.second_bank),(ut==null?void 0:ut.teams)&&(ut==null||((ht=ut.teams[0])===null||ht===void 0||((bt=ht.bank_account)===null||bt===void 0))?void 0:bt.card_no)):r.a.createElement("span",{style:{width:"50%"}}))}))):null,r.a.createElement(A.a,{gutter:[20,20]},Jt.map(function(Xt,qt){return r.a.createElement(nt.a,{key:qt},r.a.createElement(w.a,{type:"primary",onClick:function(){return Ft(Xt)}},Xt.name))})))}var Re=Ee,Le=L("0Owb"),Pe=L("7Kak"),Ke=L("9yH6"),it=L("y8nQ"),st=L("Vl3Y"),Ot=L("1vsH"),Rt=L("Dgm7"),sr=L.n(Rt),Zt=L("NnUe"),wt=L.n(Zt),Br=S.a.Dragger,Nr=10,jr=function(qe){var pt=qe.user,_t=qe.account,Ut=qe.globalSetting,Dt=qe.loading,Vt=qe.dispatch,Pt=Object(h.a)(qe,["user","account","globalSetting","loading","dispatch"]),ut=st.a.useForm(),vt=Object(s.a)(ut,1),yt=vt[0],tr=Object(i.useState)({}),Jt=Object(s.a)(tr,2),Wt=Jt[0],Ft=Jt[1],Xt=Object(i.useState)(!0),qt=Object(s.a)(Xt,2),Ze=qt[0],vr=qt[1],Ar=Object(i.useState)(),cr=Object(s.a)(Ar,2),ht=cr[0],bt=cr[1],ft=Object(i.useState)(),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Gt=Object(i.useState)(),yr=Object(s.a)(Gt,2),kr=yr[0],or=yr[1],Qe=Object(i.useState)(),kt=Object(s.a)(Qe,2),Zr=kt[0],Vr=kt[1];Object(i.useEffect)(function(){if(!_t.basicInfo)return;var Kt=_t.basicInfo,ct={name:Kt.show_realname?Kt.name:Object(Ot.H)(Kt.name),gender:Kt.gender};bt(Kt.name),vr(Kt.show_realname),yt.setFieldsValue(ct),Ft(ct)},[_t.basicInfo]);var nr=function(ct){if(ct.file.status==="uploading"){Vr(!0);return}if(ct.file.status==="done"){var dt;console.log(ct.file,ct.file.response),or((dt=ct.file.response)===null||dt===void 0?void 0:dt.id),Object(Ot.D)(ct.file.originFileObj,function(Mt){rr(Mt),Vr(!1)})}},br=function(ct){Ft(Object(P.a)({},yt.getFieldsValue())),"name"in ct&&bt(ct.name)},Tr=function(){var ct=!Ze;vr(ct);var dt=ct?ht:Object(Ot.H)(ht);yt.setFieldsValue({name:dt})},At=function(){var Kt=Object(n.a)(u.a.mark(function ct(dt){var Mt,xt,_r,Jr,qr,mr,Xr,Rr;return u.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(_r=dt||{},Jr=_r.name,qr=_r.gender,mr=_r.idNumber,zt){Fr.next=4;break}return o.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Fr.abrupt("return");case 4:return Fr.next=6,Vt({type:"account/applyRealNameAuth",payload:{id:((Mt=_t.basicInfo)===null||Mt===void 0?void 0:Mt.id)||((xt=pt.userInfo)===null||xt===void 0?void 0:xt.login),name:Jr,gender:qr,id_number:mr,show_realname:Ze,attachment_ids:[kr]}});case 6:Xr=Fr.sent,Ht(),Xr&&(o.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Vt({type:"account/getBasicInfo",payload:{login:(Rr=pt.userInfo)===null||Rr===void 0?void 0:Rr.login}}));case 9:case"end":return Fr.stop()}},ct)}));return function(dt){return Kt.apply(this,arguments)}}(),Ht=function(){Vt({type:"account/setActionTabs",payload:{}})},ir={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(X.a.API_SERVER,"/api/attachments.json"),className:wt.a.uploader,onChange:nr,beforeUpload:function(ct){var dt=ct.type==="image/jpeg"||ct.type==="image/png"||ct.type==="image/jpg"||ct.type==="image/bmp";return dt||o.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),dt}};return r.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:_t.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},r.a.createElement(t.a,{spinning:!!Zr},r.a.createElement(st.a,{className:wt.a.formWrap,form:yt,layout:"horizontal",onValuesChange:br,onFinish:At},r.a.createElement(st.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(Nr,"\u4E2A\u5B57\u7B26")},{validator:Ot.K}],extra:r.a.createElement("span",null,Ze?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},r.a.createElement(U.a,{disabled:!Ze,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Nr,"\u4E2A\u5B57\u7B26"),maxLength:Nr,addonAfter:r.a.createElement("i",{className:"iconfont ".concat(Ze?"icon-xianshi":"icon-yincang"," font18 ").concat(wt.a.color0152d9),onClick:Tr})})),r.a.createElement(st.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},r.a.createElement(Ke.a.Group,null,r.a.createElement(Ke.a,{value:0},"\u7537"),r.a.createElement(Ke.a,{value:1},"\u5973"))),r.a.createElement(st.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),r.a.createElement(st.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},r.a.createElement("div",{className:wt.a.flexRow},r.a.createElement("div",{className:"".concat(wt.a.flexColumn," ").concat(wt.a.example)},r.a.createElement("span",{className:wt.a.exampleImg},r.a.createElement("img",{src:sr.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(wt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:wt.a.flexColumn},r.a.createElement(Br,Object(Le.a)({},ir,{accept:".png,.jpg,.bmp,.jpeg"}),zt?r.a.createElement("img",{src:zt,className:wt.a.uploadImg}):r.a.createElement("div",{className:wt.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(wt.a.uploadTipIcon)})),r.a.createElement("p",{className:wt.a.uploadTip},r.a.createElement("a",{className:wt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:wt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:wt.a.footerWrap},r.a.createElement(st.a.Item,null,r.a.createElement(w.a,{className:"mr5",size:"large",onClick:Ht},"\u53D6\u6D88"),r.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:wt.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),r.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),r.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),r.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),r.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),r.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),r.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},cn=Object(p.a)(function(mt){var qe=mt.user,pt=mt.account,_t=mt.loading,Ut=mt.globalSetting;return{user:qe,account:pt,globalSetting:Ut,loading:_t.effects}})(jr),xr=L("O3gP"),an=L("lrIw"),tn=L("KXlV"),Ir=L.n(tn),hn=L("Sjjz"),lr=L.n(hn),Cr=U.a.TextArea,gr=function(qe){var pt=qe.account,_t=qe.globalSetting,Ut=qe.loading,Dt=qe.dispatch,Vt=qe.schoolName,Pt=qe.departmentName,ut=qe.visible,vt=qe.onClose,yt=vt===void 0?function(){}:vt,tr=qe.onSuccess,Jt=tr===void 0?function(){}:tr,Wt=Object(h.a)(qe,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Ft=st.a.useForm(),Xt=Object(s.a)(Ft,1),qt=Xt[0],Ze=Object(i.useRef)();Object(i.useEffect)(function(){Ze.current=Wt.schoolId},[Wt.schoolId]),Object(i.useEffect)(function(){qt.setFieldsValue({department:Pt})},[Pt]);var vr=function(){var Ar=Object(n.a)(u.a.mark(function cr(ht){var bt,ft,Tt,zt;return u.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return bt=ht||{},ft=bt.department,Tt=bt.remarks,Gt.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:Ze.current,name:ft,remarks:Tt}});case 3:zt=Gt.sent,yt(),zt&&(o.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),Jt(ft));case 6:case"end":return Gt.stop()}},cr)}));return function(ht){return Ar.apply(this,arguments)}}();return r.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ut,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(st.a,{className:lr.a.formWrap,form:qt,labelCol:{span:4},wrapperCol:{span:20},onFinish:vr},r.a.createElement(st.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Vt),r.a.createElement(st.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),r.a.createElement(st.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(Cr,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:lr.a.footerWrap},r.a.createElement(st.a.Item,null,r.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){yt()}},"\u53D6\u6D88"),r.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplyDepartment"]},"\u4FDD\u5B58")))))},xn=Object(p.a)(function(mt){var qe=mt.account,pt=mt.loading,_t=mt.globalSetting;return{account:qe,globalSetting:_t,loading:pt.effects}})(gr),Wn=L("6UJt"),gn=L("DFOY"),Bt=L("jO45"),Kr=L("jN4g"),rn=L("gJ3r"),Or=L("jwmR"),Lr=L.n(Or),Wr=function(qe,pt){return pt.some(function(_t){return _t.label.toLowerCase().indexOf(qe.toLowerCase())>-1})},jn=U.a.TextArea,yn=function(qe){var pt=qe.account,_t=qe.globalSetting,Ut=qe.loading,Dt=qe.dispatch,Vt=qe.schoolName,Pt=qe.visible,ut=qe.onClose,vt=ut===void 0?function(){}:ut,yt=qe.onSuccess,tr=yt===void 0?function(){}:yt,Jt=Object(h.a)(qe,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Wt=st.a.useForm(),Ft=Object(s.a)(Wt,1),Xt=Ft[0];Object(i.useEffect)(function(){Xt.setFieldsValue({name:Vt})},[Vt]);var qt=function(){var Ze=Object(n.a)(u.a.mark(function vr(Ar){var cr,ht,bt,ft,Tt,zt,rr;return u.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return cr=Ar||{},ht=cr.name,bt=cr.city,ft=bt===void 0?[]:bt,Tt=cr.address,zt=cr.remarks,yr.next=3,Dt({type:"account/appplySchool",payload:{name:ht,province:ft[0],city:ft[1],address:Tt,remarks:zt}});case 3:rr=yr.sent,vt(),rr&&(o.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),tr(ht));case 6:case"end":return yr.stop()}},vr)}));return function(Ar){return Ze.apply(this,arguments)}}();return r.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Pt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(st.a,{className:Lr.a.formWrap,form:Xt,labelCol:{span:4},wrapperCol:{span:20},onFinish:qt},r.a.createElement(st.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},r.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),r.a.createElement("div",{className:"".concat(Lr.a.flexRow," ").concat(Lr.a.example)},r.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),r.a.createElement("div",{className:Lr.a.flexColumn},r.a.createElement("div",null,r.a.createElement(Bt.a,{style:{color:"rgb(82, 196, 26)"}}),r.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),r.a.createElement("div",null,r.a.createElement(Kr.a,{style:{color:"red"}}),r.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),r.a.createElement(st.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},r.a.createElement(gn.a,{allowClear:!0,size:"large",options:rn.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Wr}})),r.a.createElement(st.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},r.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),r.a.createElement(st.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(jn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:Lr.a.footerWrap},r.a.createElement(st.a.Item,null,r.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){vt()}},"\u53D6\u6D88"),r.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplySchool"]},"\u4FDD\u5B58")))))},St=Object(p.a)(function(mt){var qe=mt.account,pt=mt.loading,_t=mt.globalSetting;return{account:qe,globalSetting:_t,loading:pt.effects}})(yn),ur=me.a.Option,oi=S.a.Dragger,wi=function(qe){var pt,_t,Ut=qe.user,Dt=qe.account,Vt=qe.globalSetting,Pt=qe.loading,ut=qe.dispatch,vt=qe.Scoid,yt=Object(h.a)(qe,["user","account","globalSetting","loading","dispatch","Scoid"]),tr=st.a.useForm(),Jt=Object(s.a)(tr,1),Wt=Jt[0],Ft=Object(i.useState)({}),Xt=Object(s.a)(Ft,2),qt=Xt[0],Ze=Xt[1],vr=Object(i.useState)([]),Ar=Object(s.a)(vr,2),cr=Ar[0],ht=Ar[1],bt=Object(i.useState)([]),ft=Object(s.a)(bt,2),Tt=ft[0],zt=ft[1],rr=Object(i.useState)([]),Gt=Object(s.a)(rr,2),yr=Gt[0],kr=Gt[1],or=Object(i.useState)([]),Qe=Object(s.a)(or,2),kt=Qe[0],Zr=Qe[1],Vr=Object(i.useState)(),nr=Object(s.a)(Vr,2),br=nr[0],Tr=nr[1],At=Object(i.useState)(),Ht=Object(s.a)(At,2),ir=Ht[0],Kt=Ht[1],ct=Object(i.useState)(),dt=Object(s.a)(ct,2),Mt=dt[0],xt=dt[1],_r=Object(i.useState)(),Jr=Object(s.a)(_r,2),qr=Jr[0],mr=Jr[1],Xr=Object(i.useState)(),Rr=Object(s.a)(Xr,2),on=Rr[0],Fr=Rr[1];Object(i.useEffect)(function(){sn()},[]),Object(i.useEffect)(function(){Object(n.a)(u.a.mark(function Ge(){var Ue;return u.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:if(vt){ot.next=2;break}return ot.abrupt("return");case 2:return ot.next=4,Hn(vt);case 4:Ue=ot.sent,kr(Ue==null?void 0:Ue.departments);case 6:case"end":return ot.stop()}},Ge)}))()},[vt]);var sn=function(){var Ge=Object(n.a)(u.a.mark(function Ue(){var Ye;return u.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,ut({type:"account/getSchoolOption"});case 2:Ye=Et.sent,ht(Ye==null?void 0:Ye.schools);case 4:case"end":return Et.stop()}},Ue)}));return function(){return Ge.apply(this,arguments)}}(),Hn=function(Ue){return ut({type:"account/getDepartmentOption",payload:{id:Ue}})};Object(i.useEffect)(function(){if(!Dt.basicInfo)return;var Ge=Dt.basicInfo,Ue={identity:Ge.identity,school:Ge.school_name,department:Ge.department_name,studentNo:Ge.student_id,jobTitle:Ge.identity=="teacher"?Ge.technical_title:"\u6559\u6388",manager:Ge.identity=="professional"?Ge.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Wt.setFieldsValue(Ue),Ze(Ue)},[Dt.basicInfo]);var ke=function(){mr(!0)},We=function(){if(!cr.find(function(Ue){return Ue.name===qt.school})){o.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Fr(!0)},Ve=function(Ue){if(Ze(Object(P.a)({},Wt.getFieldsValue())),"school"in Ue){zt(cr.filter(function(ot){return ot.name.includes(Ue.school)}));var Ye=(cr.find(function(ot){return ot.name===Ue.school})||{}).id;Ye?Ne(Ue.school):(Wt.setFieldsValue({department:""}),Ze(Object(P.a)(Object(P.a)({},qt),{school:Ue.school,department:""})))}},Ne=function(){var Ge=Object(n.a)(u.a.mark(function Ue(Ye,ot){var Et,Ct,Nt,Er,Hr,Ur;return u.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Er=(Et=cr.find(function(Yr){return Yr.name===Ye}))===null||Et===void 0?void 0:Et.id,Pr.next=3,Hn(Er);case 3:if(Pr.t0=Pr.sent,Pr.t0){Pr.next=6;break}Pr.t0={};case 6:Hr=Pr.t0,kr(Hr==null?void 0:Hr.departments),Ur=ot||(Hr==null||((Ct=Hr.departments)===null||Ct===void 0||((Nt=Ct[0])===null||Nt===void 0))?void 0:Nt.name),Wt.setFieldsValue({department:Ur}),Ze(Object(P.a)(Object(P.a)({},qt),{school:Ye,department:Ur}));case 11:case"end":return Pr.stop()}},Ue)}));return function(Ye,ot){return Ge.apply(this,arguments)}}(),be=function(){var Ge=Object(n.a)(u.a.mark(function Ue(Ye){return u.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,sn();case 2:Wt.setFieldsValue({school:Ye,department:""}),Ze(Object(P.a)(Object(P.a)({},qt),{school:Ye,department:""}));case 4:case"end":return Et.stop()}},Ue)}));return function(Ye){return Ge.apply(this,arguments)}}(),De=function(Ue){if(Ue.file.status==="uploading"){xt(!0);return}if(Ue.file.status==="done"){var Ye;console.log(Ue.file,Ue.file.response),Kt((Ye=Ue.file.response)===null||Ye===void 0?void 0:Ye.id),Object(Ot.D)(Ue.file.originFileObj,function(ot){Tr(ot),xt(!1)})}},Te=function(){var Ge=Object(n.a)(u.a.mark(function Ue(Ye){var ot,Et,Ct,Nt,Er,Hr,Ur,Gr,Pr,Yr,$r,un,en,Tn,nn,Sr;return u.a.wrap(function(Qr){for(;;)switch(Qr.prev=Qr.next){case 0:if(Er=Ye||{},Hr=Er.school,Ur=Er.department,Gr=Er.identity,Pr=Er.studentNo,Yr=Er.jobTitle,$r=Er.manager,br){Qr.next=4;break}return o.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Qr.abrupt("return");case 4:return un=(ot=cr.find(function(ln){return ln.name===Hr}))===null||ot===void 0?void 0:ot.id,en=(Et=yr.find(function(ln){return ln.name===Ur}))===null||Et===void 0?void 0:Et.id,Gr==="student"?Tn=Pr:Gr==="teacher"?Tn=Yr:Tn=$r,Qr.next=9,ut({type:"account/applyProfessionalAuth",payload:{id:((Ct=Dt.basicInfo)===null||Ct===void 0?void 0:Ct.id)||((Nt=Ut.userInfo)===null||Nt===void 0?void 0:Nt.login),school_id:un,department_id:en,identity:Gr,extra:Tn,attachment_ids:[ir]}});case 9:nn=Qr.sent,Me(),nn&&(o.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ut({type:"account/getBasicInfo",payload:{login:(Sr=Ut.userInfo)===null||Sr===void 0?void 0:Sr.login}}));case 12:case"end":return Qr.stop()}},Ue)}));return function(Ye){return Ge.apply(this,arguments)}}(),Me=function(){ut({type:"account/setActionTabs",payload:{}})},He={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(X.a.API_SERVER,"/api/attachments.json"),className:wt.a.uploader,onChange:De,beforeUpload:function(Ue){var Ye=Ue.type==="image/jpeg"||Ue.type==="image/png"||Ue.type==="image/jpg"||Ue.type==="image/bmp";return Ye||o.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ye}};return r.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:wt.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:r.a.createElement("div",null,r.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(wt.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},r.a.createElement(t.a,{spinning:!!Mt},r.a.createElement(st.a,{className:wt.a.formWrap,form:Wt,layout:"horizontal",onValuesChange:Ve,onFinish:Te},r.a.createElement(A.a,{gutter:[10,0]},r.a.createElement(nt.a,{flex:"300px"},r.a.createElement(st.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},r.a.createElement(me.a,null,r.a.createElement(ur,{value:"teacher"},"\u6559\u5E08"),r.a.createElement(ur,{value:"student"},"\u5B66\u751F"),r.a.createElement(ur,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),qt.identity==="student"&&r.a.createElement(nt.a,{flex:"200px"},r.a.createElement(st.a.Item,{initialValue:qt.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},r.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),qt.identity==="teacher"&&r.a.createElement(nt.a,{flex:"200px"},r.a.createElement(st.a.Item,{initialValue:qt.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(me.a,null,r.a.createElement(ur,{value:"\u6559\u6388"},"\u6559\u6388"),r.a.createElement(ur,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),r.a.createElement(ur,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),r.a.createElement(ur,{value:"\u52A9\u6559"},"\u52A9\u6559")))),qt.identity==="professional"&&r.a.createElement(nt.a,{flex:"200px"},r.a.createElement(st.a.Item,{initialValue:qt.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(me.a,null,r.a.createElement(ur,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),r.a.createElement(ur,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),r.a.createElement(ur,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),r.a.createElement(ur,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),r.a.createElement(ur,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),r.a.createElement(st.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:qt.department&&!(yr!=null&&yr.find(function(Ge){return Ge.name===qt.department}))&&r.a.createElement("div",{className:wt.a.schoolHintWrap},r.a.createElement("span",{className:wt.a.colorCDCDCD},qt.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(qt.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),r.a.createElement("span",{className:"".concat(wt.a.color0152d9," current"),onClick:We},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},r.a.createElement(an.a,{showSearch:!0,onChange:function(Ue){return Zr(yr.filter(function(Ye){return Ye.name.includes(Ue)}))},options:kt==null?void 0:kt.map(function(Ge){return{value:Ge.name}})})),r.a.createElement(st.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},r.a.createElement("div",{className:wt.a.flexRow},r.a.createElement("div",{className:"".concat(wt.a.flexColumn," ").concat(wt.a.example)},r.a.createElement("span",{className:wt.a.exampleImg},r.a.createElement("img",{src:Ir.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(wt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:wt.a.flexColumn},r.a.createElement(oi,Object(Le.a)({},He,{accept:".png,.jpg,.bmp,.jpeg"}),br?r.a.createElement("img",{src:br,className:wt.a.uploadImg}):r.a.createElement("div",{className:wt.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(wt.a.uploadTipIcon)})),r.a.createElement("p",{className:wt.a.uploadTip},r.a.createElement("a",{className:wt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:wt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:wt.a.footerWrap},r.a.createElement(st.a.Item,null,r.a.createElement(w.a,{className:"mr5",size:"large",onClick:Me},"\u53D6\u6D88"),r.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Pt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:wt.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),r.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),r.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),r.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),r.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),r.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Vt!=null&&(pt=Vt.setting)!==null&&pt!==void 0&&pt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),r.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),r.a.createElement(St,{visible:qr,onClose:function(){return mr(!1)},schoolName:qt.school,onSuccess:be}),r.a.createElement(xn,{visible:on,onClose:function(){return Fr(!1)},schoolId:(_t=cr.find(function(Ge){return Ge.name===qt.school}))===null||_t===void 0?void 0:_t.id,schoolName:qt.school,departmentName:qt.department,onSuccess:function(Ue){return Ne(qt.school,Ue)}}))},Pi=Object(p.a)(function(mt){var qe=mt.user,pt=mt.account,_t=mt.loading,Ut=mt.globalSetting;return{user:qe,account:pt,globalSetting:Ut,loading:_t.effects}})(wi),vi=L("aCH8"),Un=L.n(vi);function wr(mt){var qe=mt.type,pt=mt.dispatch,_t=mt.userid,Ut=mt.isshow,Dt=mt.setPhoneshow,Vt=mt.setEmailshow,Pt="79e33abd4b6588941ab7622aed1e67e8",ut=Object(i.useState)(""),vt=Object(s.a)(ut,2),yt=vt[0],tr=vt[1],Jt=Object(i.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Wt=Object(s.a)(Jt,2),Ft=Wt[0],Xt=Wt[1],qt=Object(i.useState)(60),Ze=Object(s.a)(qt,2),vr=Ze[0],Ar=Ze[1],cr=Object(i.useState)(!1),ht=Object(s.a)(cr,2),bt=ht[0],ft=ht[1],Tt=Object(i.useState)(""),zt=Object(s.a)(Tt,2),rr=zt[0],Gt=zt[1];function yr(){return kr.apply(this,arguments)}function kr(){return kr=Object(n.a)(u.a.mark(function nr(){var br;return u.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(yt){At.next=3;break}return qe===3?o.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):o.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 3:return At.next=5,pt({type:"competitions/getVerification",payload:{type:qe,login:yt,smscode:Un()(Pt+yt)}});case 5:br=At.sent,br.status===1&&(o.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),or(),ft(!0));case 7:case"end":return At.stop()}},nr)})),kr.apply(this,arguments)}function or(){Ar(60);var nr=setInterval(function(){--vr,vr>-1?Ar(vr):(clearInterval(nr),ft(!1))},1e3)}function Qe(){return kt.apply(this,arguments)}function kt(){return kt=Object(n.a)(u.a.mark(function nr(){var br;return u.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,pt({type:"competitions/PhoneBind",payload:{userid:_t,code:rr,phone:yt}});case 2:br=At.sent,br.status===0&&(o.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return At.stop()}},nr)})),kt.apply(this,arguments)}function Zr(){return Vr.apply(this,arguments)}function Vr(){return Vr=Object(n.a)(u.a.mark(function nr(){var br;return u.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,pt({type:"competitions/EmailBind",payload:{userid:_t,code:rr,email:yt}});case 2:br=At.sent,br.status===0&&(o.b.info("\u7ED1\u5B9A\u6210\u529F"),Vt("none"));case 4:case"end":return At.stop()}},nr)})),Vr.apply(this,arguments)}return r.a.createElement("div",{style:{display:Ut}},r.a.createElement("p",null,r.a.createElement(U.a,{value:yt,onChange:function(br){return tr(br.target.value)},placeholder:qe===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),r.a.createElement("span",null,r.a.createElement(U.a,{value:rr,onChange:function(br){return Gt(br.target.value)},placeholder:qe===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",r.a.createElement(w.a,{disabled:bt,onClick:function(){return yr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},bt?"\u91CD\u65B0\u53D1\u9001".concat(vr,"s"):Ft),r.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},r.a.createElement(w.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!rr){o.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}qe===3?Qe():Zr()}},"\u786E\u8BA4"),r.a.createElement(w.a,{style:{marginLeft:"20px"},onClick:function(){qe===3?Dt("none"):Vt("none")}},"\u53D6\u6D88")))}var si=wr;function It(mt){var qe=mt.dispatch,pt=mt.userid,_t={wrapperCol:{offset:3,span:21}},Ut=st.a.useForm(),Dt=Object(s.a)(Ut,1),Vt=Dt[0],Pt=Object(E.i)(),ut=Pt.identifier;return r.a.createElement("div",{style:{width:"500px"}},r.a.createElement(st.a,{form:Vt,name:"basic"},r.a.createElement(st.a.Item,Object(Le.a)({},_t,{label:r.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(st.a.Item,Object(Le.a)({},_t,{label:r.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(st.a.Item,Object(Le.a)({},_t,{label:r.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),r.a.createElement(U.a,null)),r.a.createElement(st.a.Item,null,r.a.createElement(w.a,{type:"primary",htmlType:"submit",onClick:Object(n.a)(u.a.mark(function vt(){return u.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:Vt.validateFields().then(function(){var Jt=Object(n.a)(u.a.mark(function Wt(Ft){var Xt;return u.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,qe({type:"competitions/setleader",payload:Object(P.a)({identifier:ut,user_id:pt},Ft)});case 2:Xt=Ze.sent,Xt.status===0&&o.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return Ze.stop()}},Wt)}));return function(Wt){return Jt.apply(this,arguments)}}());case 1:case"end":return tr.stop()}},vt)}))},"\u63D0\u4EA4"))))}var Zn=It,Bn={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function zi(mt){var qe,pt,_t,Ut,Dt,Vt,Pt,ut,vt=mt.Prize,yt=mt.Accounts,tr=mt.dispatch,Jt=mt.userid,Wt=Object(i.useState)("none"),Ft=Object(s.a)(Wt,2),Xt=Ft[0],qt=Ft[1],Ze=Object(i.useState)("none"),vr=Object(s.a)(Ze,2),Ar=vr[0],cr=vr[1];function ht(ft){return bt.apply(this,arguments)}function bt(){return bt=Object(n.a)(u.a.mark(function ft(Tt){var zt;return u.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(!(Tt==="1")){Gt.next=6;break}return Gt.next=3,tr({type:"competitions/Authentication"});case 3:zt=Gt.sent,Gt.next=9;break;case 6:return Gt.next=8,tr({type:"competitions/Professional"});case 8:zt=Gt.sent;case 9:zt.status===0&&o.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return Gt.stop()}},ft)})),bt.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(yt==null?void 0:yt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(yt==null?void 0:yt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){tr({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u59D3\u540D\uFF1A",r.a.createElement("span",null,yt==null?void 0:yt.name),(yt==null?void 0:yt.authentication)==="uncertified"?null:(yt==null?void 0:yt.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(w.a,{type:"primary",onClick:function(){return ht("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," ","\u5DF2\u8BA4\u8BC1")),r.a.createElement("p",null,"\u6027\u522B\uFF1A",r.a.createElement("span",null,(yt==null?void 0:yt.gender)===0?"\u7537":"\u5973"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(yt==null?void 0:yt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(yt==null?void 0:yt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){tr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u804C\u4E1A\uFF1A",r.a.createElement("span",null,yt&&yt.identity&&Bn[yt.identity]),(yt==null?void 0:yt.authentication)==="uncertified"?null:(yt==null?void 0:yt.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(w.a,{type:"primary",onClick:function(){return ht("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),r.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),r.a.createElement(w.a,{type:"primary",onClick:function(){tr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),r.a.createElement("p",null,"\u5B66\u53F7\uFF1A",r.a.createElement("span",null,(yt==null?void 0:yt.student_id)||"--")),r.a.createElement("p",null,"\u5B66\u6821\uFF1A",r.a.createElement("span",null,(yt==null?void 0:yt.school_name)||"--")),r.a.createElement("p",null,"\u9662\u7CFB\uFF1A",r.a.createElement("span",null,(yt==null?void 0:yt.department_name)||"--"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(yt==null?void 0:yt.phone)||"--"),Xt==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){qt("block")}},"\u66F4\u6362"):null),r.a.createElement(si,{type:3,dispatch:tr,userid:yt==null?void 0:yt.id,isshow:Xt,setPhoneshow:qt,setEmailshow:cr}),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(yt==null?void 0:yt.mail)||"--"),Ar==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){cr("block")}},"\u66F4\u6362"):null),r.a.createElement(si,{type:4,dispatch:tr,userid:yt==null?void 0:yt.id,isshow:Ar,setEmailshow:cr,setPhoneshow:qt})),vt!=null&&vt.leader&&vt!==null&&vt!==void 0&&vt.teams&&vt!==null&&vt!==void 0&&(qe=vt.teams[0])!==null&&qe!==void 0&&(pt=qe.bank_account)!==null&&pt!==void 0&&pt.bank?r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),r.a.createElement(Zn,{dispatch:tr,userid:Jt})),vt!=null&&vt.leader?r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),r.a.createElement("span",null,(vt==null?void 0:vt.teams)&&(vt==null||((_t=vt.teams[0])===null||_t===void 0||((Ut=_t.bank_account)===null||Ut===void 0))?void 0:Ut.bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),r.a.createElement("span",null,(vt==null?void 0:vt.teams)&&(vt==null||((Dt=vt.teams[0])===null||Dt===void 0||((Vt=Dt.bank_account)===null||Vt===void 0))?void 0:Vt.second_bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),r.a.createElement("span",null,(vt==null?void 0:vt.teams)&&(vt==null||((Pt=vt.teams[0])===null||Pt===void 0||((ut=Pt.bank_account)===null||ut===void 0))?void 0:ut.card_no)||"--"))):null,r.a.createElement(Pi,{Scoid:yt==null?void 0:yt.school_id}),r.a.createElement(cn,null))}var Ti=zi,ri=ue.a.TabPane;function Qi(mt){var qe=mt.Prize,pt=mt.Accounts,_t=mt.getAccounts,Ut=mt.dispatch,Dt=mt.userid;return r.a.createElement("div",{className:"fr"},r.a.createElement("div",{className:"mb100 "},r.a.createElement(ue.a,{defaultActiveKey:"1",onChange:function(Pt){Pt==="2"&&_t()}},r.a.createElement(ri,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},r.a.createElement(Re,{Prize:qe})),r.a.createElement(ri,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},r.a.createElement(Ti,{userid:Dt,dispatch:Ut,Prize:qe,Accounts:pt})))))}var Zi=Qi,li=L("xKgJ"),In=L("wd/R"),ui=L.n(In),Mi=ue.a.TabPane;function yi(mt){var qe,pt,_t,Ut,Dt,Vt,Pt=mt.ChartRules,ut=mt.ItemData,vt=mt.getCharts,yt=mt.Selectkey,tr=mt.HeaderDetail,Jt=mt.getChartRules,Wt=mt.userinfo,Ft=mt.Editable,Xt=mt.dispatch,qt=mt.StaffDetail,Ze=Object(i.useState)(!1),vr=Object(s.a)(Ze,2),Ar=vr[0],cr=vr[1],ht=Object(i.useState)(""),bt=Object(s.a)(ht,2),ft=bt[0],Tt=bt[1],zt=Object(i.useState)(!0),rr=Object(s.a)(zt,2),Gt=rr[0],yr=rr[1],kr=Object(i.useState)(),or=Object(s.a)(kr,2),Qe=or[0],kt=or[1],Zr=Object(i.useState)(),Vr=Object(s.a)(Zr,2),nr=Vr[0],br=Vr[1],Tr=Object(E.i)(),At=Tr.identifier;Object(i.useEffect)(function(){if(Gt){var ct,dt,Mt,xt,_r=Pt==null||((ct=Pt.stages)===null||ct===void 0)?void 0:ct[0];kt(_r);var Jr=Pt==null||((dt=Pt.stages)===null||dt===void 0||((Mt=dt[0])===null||Mt===void 0||((xt=Mt.children)===null||xt===void 0)))?void 0:xt[0];if(br(Jr),_r!=null&&_r.id){var qr,mr,Xr;vt(_r==null?void 0:_r.id),Tt(((qr=Pt.rule_contents)===null||qr===void 0||((mr=qr.filter(function(sn){return parseInt(sn.competition_stage_id)===parseInt(_r==null?void 0:_r.id)}))===null||mr===void 0||((Xr=mr[0])===null||Xr===void 0))?void 0:Xr.content)||"")}else{var Rr,on,Fr;vt(0),Tt(((Rr=Pt.rule_contents)===null||Rr===void 0||((on=Rr.filter(function(sn){return parseInt(sn.competition_stage_id)===0}))===null||on===void 0||((Fr=on[0])===null||Fr===void 0))?void 0:Fr.content)||"")}}},[Pt]);function Ht(){return ir.apply(this,arguments)}function ir(){return ir=Object(n.a)(u.a.mark(function ct(){var dt,Mt,xt,_r,Jr,qr,mr,Xr,Rr;return u.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(ft){Fr.next=3;break}return o.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Fr.abrupt("return");case 3:if(yr(!1),dt=Qe==null?void 0:Qe.id,!dt){Fr.next=12;break}return Fr.next=8,Object(ie.a)("/api/competitions/".concat(At,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:ft,md_content_id:(Mt=Pt.rule_contents)===null||Mt===void 0||((xt=Mt.filter(function(sn){return parseInt(sn.competition_stage_id)===parseInt(dt)}))===null||xt===void 0||((_r=xt[0])===null||_r===void 0))?void 0:_r.id,stage_id:Qe==null?void 0:Qe.id}});case 8:Jr=Fr.sent,Jr.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),cr(!1),Jt()),Fr.next=16;break;case 12:return Fr.next=14,Object(ie.a)("/api/competitions/".concat(At,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:ft,md_content_id:(qr=Pt.rule_contents)===null||qr===void 0||((mr=qr.filter(function(sn){return parseInt(sn.competition_stage_id)===0}))===null||mr===void 0||((Xr=mr[0])===null||Xr===void 0))?void 0:Xr.id,stage_id:Qe==null?void 0:Qe.id}});case 14:Rr=Fr.sent,Rr.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),cr(!1),Jt());case 16:case"end":return Fr.stop()}},ct)})),ir.apply(this,arguments)}var Kt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(dt,Mt,xt){return r.a.createElement("span",null,dt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(dt){return r.a.createElement($e.a,{title:dt},r.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=10?(dt==null?void 0:dt.substr(0,10))+"...":dt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(dt){return r.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=6?(dt==null?void 0:dt.substr(0,6))+"...":dt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(dt){return r.a.createElement("span",null,dt===1?"\u8BA1\u7B97\u4E2D":dt===2?"\u5B8C\u6210":dt===0?"\u5F85\u8BA1\u7B97":dt===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(dt){return r.a.createElement("span",null,dt||"--")}},!(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(dt){return(dt==null?void 0:dt.length)>0?dt==null?void 0:dt.map(function(Mt,xt){return r.a.createElement("span",null,Mt==null?void 0:Mt.name,"\uFF1A",Mt==null?void 0:Mt.value," ",r.a.createElement("br",null))}):r.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(dt){return r.a.createElement("span",null,dt||"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="score"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="fid"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="total_score"}))===null||Mt===void 0)?void 0:Mt.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(dt){return r.a.createElement("span",null,dt||"--")}},!(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(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="Coffee"}))===null||Mt===void 0)?void 0:Mt.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(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="Easyship"}))===null||Mt===void 0)?void 0:Mt.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(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="Scar"}))===null||Mt===void 0)?void 0:Mt.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(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="Scarf"}))===null||Mt===void 0)?void 0:Mt.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(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(xt){return(xt==null?void 0:xt.name)==="Total"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(dt){return r.a.createElement("a",{href:dt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(ct){return!!ct});return r.a.createElement("div",null,(Pt==null||((qe=Pt.stages)===null||qe===void 0)?void 0:qe.length)>0?null:r.a.createElement(Fe,null),(Pt==null||((pt=Pt.stages)===null||pt===void 0)?void 0:pt.length)>0&&r.a.createElement(ue.a,{animated:!0,tabBarExtraContent:Wt!=null&&Wt.admin||Wt!=null&&Wt.business||Ft?r.a.createElement(w.a,{onClick:function(){cr(!0)}},"\u7F16\u8F91"):qt.enrolled&&(Qe==null?void 0:Qe.start_time)&&(Qe==null?void 0:Qe.end_time)&&r.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",ui()(Qe==null?void 0:Qe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",ui()(Qe==null?void 0:Qe.end_time).format("YYYY-MM-DD HH:mm:ss"),r.a.createElement(w.a,{style:{marginLeft:"20px"},disabled:ui()(Qe==null?void 0:Qe.start_time).unix()>ui()(ui()().format("YYYY-MM-DD HH:mm:s")).unix()||ui()(ui()().format("YYYY-MM-DD HH:mm:s")).unix()>ui()(Qe==null?void 0:Qe.end_time).unix(),onClick:function(){Xt({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(nr==null?void 0:nr.id)||(Qe==null?void 0:Qe.id),id:tr==null?void 0:tr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(dt){var Mt,xt,_r,Jr,qr;cr(!1);var mr=Pt==null||((Mt=Pt.stages)===null||Mt===void 0)?void 0:Mt.filter(function(Rr){return parseInt(dt)===parseInt(Rr==null?void 0:Rr.id)})[0],Xr=mr==null||((xt=mr.children)===null||xt===void 0)?void 0:xt[0];br(Xr),kt(mr),Tt(((_r=Pt.rule_contents)===null||_r===void 0||((Jr=_r.filter(function(Rr){return parseInt(Rr.competition_stage_id)===parseInt(mr==null?void 0:mr.id)}))===null||Jr===void 0||((qr=Jr[0])===null||qr===void 0))?void 0:qr.content)||""),vt((Xr==null?void 0:Xr.id)||dt)}},Pt&&Pt.stages.map(function(ct,dt){return r.a.createElement(Mi,{tab:ct.name,key:ct.id===null?0:ct.id},Ar===!1&&Pt&&Pt.rule_contents.map(function(Mt,xt){if(ct.id===Mt.competition_stage_id)return r.a.createElement(D.a,{key:xt,value:Mt.content===void 0||Mt.content===null?"":Mt.content});if(ct.id===null&&Mt.competition_stage_id===0)return r.a.createElement(D.a,{key:xt,value:Mt.content===void 0||Mt.content===null?"":Mt.content})}))})),(Qe==null||((_t=Qe.children)===null||_t===void 0)?void 0:_t.length)>0&&r.a.createElement(ue.a,{activeKey:(nr==null?void 0:nr.id)+"",onChange:function(dt){var Mt,xt=Qe==null||((Mt=Qe.children)===null||Mt===void 0)?void 0:Mt.filter(function(_r){return parseInt(dt)===parseInt(_r==null?void 0:_r.id)})[0];br(xt),vt(dt)}},Qe==null||((Ut=Qe.children)===null||Ut===void 0)?void 0:Ut.map(function(ct,dt){return r.a.createElement(Mi,{tab:ct.name,key:ct.id===null?0:ct.id})})),Ar&&r.a.createElement("div",null,r.a.createElement(Q.a,{defaultValue:ft,onChange:function(dt){Tt(dt)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ht()}},"\u63D0\u4EA4"),r.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return cr(!1)}},"\u53D6\u6D88"))),((Dt=tr.competition_modules.filter(function(ct){return ct.id===yt}))===null||Dt===void 0||((Vt=Dt[0])===null||Vt===void 0)?void 0:Vt.show_leaderboard)&&r.a.createElement(J.a,{dataSource:ut==null?void 0:ut.results,columns:Kt}))}var bi=yi,Da=L("DjyN"),Vi=L("NUBc"),zn=ue.a.TabPane;function Gi(mt){var qe,pt,_t,Ut,Dt,Vt,Pt=mt.loading,ut=mt.ChartRules,vt=mt.ItemData,yt=mt.getCharts,tr=mt.Selectkey,Jt=mt.HeaderDetail,Wt=mt.getChartRules,Ft=mt.userinfo,Xt=mt.Editable,qt=mt.dispatch,Ze=mt.StaffDetail,vr=Object(i.useState)(!1),Ar=Object(s.a)(vr,2),cr=Ar[0],ht=Ar[1],bt=Object(i.useState)(""),ft=Object(s.a)(bt,2),Tt=ft[0],zt=ft[1],rr=Object(i.useState)(!0),Gt=Object(s.a)(rr,2),yr=Gt[0],kr=Gt[1],or=Object(i.useState)(),Qe=Object(s.a)(or,2),kt=Qe[0],Zr=Qe[1],Vr=Object(i.useState)(),nr=Object(s.a)(Vr,2),br=nr[0],Tr=nr[1],At=Object(E.i)(),Ht=At.identifier,ir=Object(i.useState)({page:1,limit:10,sort:"desc"}),Kt=Object(s.a)(ir,2),ct=Kt[0],dt=Kt[1];Object(i.useEffect)(function(){var xt;yr&&ut!==null&&ut!==void 0&&(xt=ut.stages)!==null&&xt!==void 0&&xt[0]&&Mt()},[ut==null||((qe=ut.stages)===null||qe===void 0)?void 0:qe[0]]);var Mt=function(){var xt=Object(n.a)(u.a.mark(function _r(){var Jr,qr,mr,Xr,Rr,on;return u.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return Rr=ut==null||((Jr=ut.stages)===null||Jr===void 0)?void 0:Jr[0],Zr(Rr),on=ut==null||((qr=ut.stages)===null||qr===void 0||((mr=qr[0])===null||mr===void 0||((Xr=mr.children)===null||Xr===void 0)))?void 0:Xr[0],Tr(on),ct.id=(on==null?void 0:on.id)||(Rr==null?void 0:Rr.id),dt(Object(P.a)({},ct)),sn.next=7,yt(Object(P.a)(Object(P.a)({},ct),{},{stage_id:ct.id}));case 7:case"end":return sn.stop()}},_r)}));return function(){return xt.apply(this,arguments)}}();return r.a.createElement("div",null,(ut==null||((pt=ut.stages)===null||pt===void 0)?void 0:pt.length)>0?null:r.a.createElement(Fe,null),(ut==null||((_t=ut.stages)===null||_t===void 0)?void 0:_t.length)>0&&r.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var xt=Object(n.a)(u.a.mark(function _r(Jr){var qr,mr,Xr,Rr,on,Fr,sn;return u.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ht(!1),Fr=ut==null||((qr=ut.stages)===null||qr===void 0)?void 0:qr.filter(function(We){return parseInt(Jr)===parseInt(We==null?void 0:We.id)})[0],sn=Fr==null||((mr=Fr.children)===null||mr===void 0)?void 0:mr[0],Tr(sn),Zr(Fr),zt(((Xr=ut.rule_contents)===null||Xr===void 0||((Rr=Xr.filter(function(We){return parseInt(We.competition_stage_id)===parseInt(Fr==null?void 0:Fr.id)}))===null||Rr===void 0||((on=Rr[0])===null||on===void 0))?void 0:on.content)||""),ct.page=1,ct.limit=10,ct.id=(sn==null?void 0:sn.id)||Jr,dt(Object(P.a)({},ct)),ke.next=9,yt(Object(P.a)({},ct));case 9:case"end":return ke.stop()}},_r)}));return function(_r){return xt.apply(this,arguments)}}()},ut&&ut.stages.map(function(xt,_r){return r.a.createElement(zn,{tab:xt.name,key:xt.id===null?0:xt.id})})),(kt==null||((Ut=kt.children)===null||Ut===void 0)?void 0:Ut.length)>0&&r.a.createElement(ue.a,{activeKey:(br==null?void 0:br.id)+"",onChange:function(){var xt=Object(n.a)(u.a.mark(function _r(Jr){var qr,mr;return u.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return mr=kt==null||((qr=kt.children)===null||qr===void 0)?void 0:qr.filter(function(on){return parseInt(Jr)===parseInt(on==null?void 0:on.id)})[0],Tr(mr),ct.page=1,ct.limit=10,ct.id=Jr,dt(Object(P.a)({},ct)),Rr.next=5,yt(Object(P.a)({},ct));case 5:case"end":return Rr.stop()}},_r)}));return function(_r){return xt.apply(this,arguments)}}()},kt==null||((Dt=kt.children)===null||Dt===void 0)?void 0:Dt.map(function(xt,_r){return r.a.createElement(zn,{tab:xt.name,key:xt.id===null?0:xt.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){ct.page=1,ct.sort=ct.sort==="desc"?"asc":"desc",dt(Object(P.a)({},ct)),yt(Object(P.a)({},ct))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",ct.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(ct.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",r.a.createElement(U.a.Search,{onSearch:function(_r){ct.page=1,ct.search=_r,dt(Object(P.a)({},ct)),yt(Object(P.a)({},ct))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),r.a.createElement(t.a,{spinning:Pt},vt==null||((Vt=vt.results)===null||Vt===void 0)?void 0:Vt.map(function(xt,_r){return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:_r===0?14:30}},r.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},r.a.createElement("img",{src:X.a.IMG_SERVER+"/images/"+(xt==null?void 0:xt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),r.a.createElement("div",{style:{marginLeft:10}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},xt==null?void 0:xt.user_name),r.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(xt==null?void 0:xt.team_name)||"- -")),r.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821"," ",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(xt==null?void 0:xt.school_name)||"- -")))),r.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},r.a.createElement("div",null,r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",xt==null?void 0:xt.created_at),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(xt==null?void 0:xt.ts_mem)||"- -","MB"),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(xt==null?void 0:xt.ts_time)||"- -","\u79D2")),r.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(xt==null?void 0:xt.game_identifier),target:"_blank"},r.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),r.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),r.a.createElement(Vi.a,{total:vt==null?void 0:vt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ct.page,onChange:function(_r,Jr){ct.page=_r,dt(Object(P.a)({},ct)),yt(Object(P.a)({},ct))}})))}var _a=Gi,Ni=function(qe){var pt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],_t=["","\u5341","\u767E","\u5343","\u4E07"];qe=parseInt(qe);var Ut=function(ut){for(var vt=ut.toString().split("").reverse(),yt="",tr=0;tr<vt.length;tr++)yt=(tr==0&&vt[tr]==0||tr>0&&vt[tr]==0&&vt[tr-1]==0?"":pt[vt[tr]]+(vt[tr]==0?_t[0]:_t[tr]))+yt;return yt},Dt=Math.floor(qe/1e4),Vt=qe%1e4;return Vt.toString().length<4&&(Vt="0"+Vt),Dt?Ut(Dt)+"\u4E07"+Ut(Vt):Ut(qe)};function ci(mt){var qe,pt=mt.item,_t=mt.index,Ut=mt.StaffDetail,Dt=Object(i.useState)(!0),Vt=Object(s.a)(Dt,2),Pt=Vt[0],ut=Vt[1],vt=Object(i.useState)(!0),yt=Object(s.a)(vt,2),tr=yt[0],Jt=yt[1],Wt=Object(i.useRef)();return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},r.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},r.a.createElement("img",{src:X.a.IMG_SERVER+"/"+(pt==null?void 0:pt.pic),style:{width:220,height:130,borderRadius:"4px"}}),r.a.createElement("div",{style:{marginLeft:20,width:"75%"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Ni(_t+1),"\uFF1A",r.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},pt==null?void 0:pt.name)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},pt==null?void 0:pt.challenges_count)," ")),r.a.createElement("div",{ref:Wt},r.a.createElement(D.a,{style:{maxHeight:Pt&&100},value:pt==null?void 0:pt.description})),r.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ut(!Pt)}},Pt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",r.a.createElement("i",{className:"iconfont font14 ".concat(Pt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),r.a.createElement("div",{style:{marginTop:14,maxHeight:tr&&58,overflow:"hidden"}},pt==null||((qe=pt.challenges)===null||qe===void 0)?void 0:qe.map(function(Ft,Xt){return r.a.createElement("div",{style:{marginTop:Xt===0?0:12}},r.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),r.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",Xt+1,"\u5173",Ft==null?void 0:Ft.name))})),r.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},r.a.createElement("span",{onClick:function(){Jt(!tr)}},tr?"\u5C55\u5F00":"\u6536\u8D77"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(tr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Ut==null?void 0:Ut.enrolled)&&r.a.createElement(w.a,{onClick:function(){window.open("/shixuns/".concat(pt==null?void 0:pt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var oa=ci,pa=ue.a.TabPane;function sa(mt){var qe,pt,_t,Ut,Dt,Vt,Pt=mt.loading,ut=mt.ChartRules,vt=mt.ItemData,yt=mt.getCharts,tr=mt.Selectkey,Jt=mt.HeaderDetail,Wt=mt.getChartRules,Ft=mt.userinfo,Xt=mt.Editable,qt=mt.dispatch,Ze=mt.StaffDetail,vr=Object(i.useState)(!1),Ar=Object(s.a)(vr,2),cr=Ar[0],ht=Ar[1],bt=Object(i.useState)(""),ft=Object(s.a)(bt,2),Tt=ft[0],zt=ft[1],rr=Object(i.useState)(!0),Gt=Object(s.a)(rr,2),yr=Gt[0],kr=Gt[1],or=Object(i.useState)(),Qe=Object(s.a)(or,2),kt=Qe[0],Zr=Qe[1],Vr=Object(i.useState)(),nr=Object(s.a)(Vr,2),br=nr[0],Tr=nr[1],At=Object(E.i)(),Ht=At.identifier,ir=Object(i.useState)({page:1,limit:10}),Kt=Object(s.a)(ir,2),ct=Kt[0],dt=Kt[1],Mt=Object(i.useState)(),xt=Object(s.a)(Mt,2),_r=xt[0],Jr=xt[1];Object(i.useEffect)(function(){var mr;yr&&ut!==null&&ut!==void 0&&(mr=ut.stages)!==null&&mr!==void 0&&mr[0]&&qr()},[ut==null||((qe=ut.stages)===null||qe===void 0)?void 0:qe[0]]);var qr=function(){var mr=Object(n.a)(u.a.mark(function Xr(){var Rr,on,Fr,sn,Hn,ke;return u.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Hn=ut==null||((Rr=ut.stages)===null||Rr===void 0)?void 0:Rr[0],Zr(Hn),ke=ut==null||((on=ut.stages)===null||on===void 0||((Fr=on[0])===null||Fr===void 0||((sn=Fr.children)===null||sn===void 0)))?void 0:sn[0],Tr(ke),ct.id=(ke==null?void 0:ke.id)||(Hn==null?void 0:Hn.id),dt(Object(P.a)({},ct)),Ve.next=7,yt(Object(P.a)(Object(P.a)({},ct),{},{stage_id:ct.id}));case 7:case"end":return Ve.stop()}},Xr)}));return function(){return mr.apply(this,arguments)}}();return r.a.createElement("div",null,(ut==null||((pt=ut.stages)===null||pt===void 0)?void 0:pt.length)>0?null:r.a.createElement(Fe,null),(ut==null||((_t=ut.stages)===null||_t===void 0)?void 0:_t.length)>0&&r.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var mr=Object(n.a)(u.a.mark(function Xr(Rr){var on,Fr,sn,Hn,ke,We,Ve;return u.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return ht(!1),We=ut==null||((on=ut.stages)===null||on===void 0)?void 0:on.filter(function(De){return parseInt(Rr)===parseInt(De==null?void 0:De.id)})[0],Ve=We==null||((Fr=We.children)===null||Fr===void 0)?void 0:Fr[0],Tr(Ve),Zr(We),zt(((sn=ut.rule_contents)===null||sn===void 0||((Hn=sn.filter(function(De){return parseInt(De.competition_stage_id)===parseInt(We==null?void 0:We.id)}))===null||Hn===void 0||((ke=Hn[0])===null||ke===void 0))?void 0:ke.content)||""),ct.page=1,ct.limit=10,ct.id=(Ve==null?void 0:Ve.id)||Rr,dt(Object(P.a)({},ct)),be.next=9,yt(Object(P.a)({},ct));case 9:case"end":return be.stop()}},Xr)}));return function(Xr){return mr.apply(this,arguments)}}()},ut&&ut.stages.map(function(mr,Xr){return r.a.createElement(pa,{tab:mr.name,key:mr.id===null?0:mr.id})})),(kt==null||((Ut=kt.children)===null||Ut===void 0)?void 0:Ut.length)>0&&r.a.createElement(ue.a,{activeKey:(br==null?void 0:br.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var mr=Object(n.a)(u.a.mark(function Xr(Rr){var on,Fr;return u.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Fr=kt==null||((on=kt.children)===null||on===void 0)?void 0:on.filter(function(ke){return parseInt(Rr)===parseInt(ke==null?void 0:ke.id)})[0],Tr(Fr),ct.page=1,ct.limit=10,ct.id=Rr,dt(Object(P.a)({},ct)),Hn.next=5,yt(Object(P.a)({},ct));case 5:case"end":return Hn.stop()}},Xr)}));return function(Xr){return mr.apply(this,arguments)}}()},kt==null||((Dt=kt.children)===null||Dt===void 0)?void 0:Dt.map(function(mr,Xr){return r.a.createElement(pa,{tab:mr.name,key:mr.id===null?0:mr.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},vt==null?void 0:vt.start_time,"~",vt==null?void 0:vt.end_time)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(vt==null?void 0:vt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),r.a.createElement(t.a,{spinning:Pt},vt==null||((Vt=vt.results)===null||Vt===void 0)?void 0:Vt.map(function(mr,Xr){return r.a.createElement(oa,{StaffDetail:Ze,item:mr,index:Xr})})),r.a.createElement(Vi.a,{total:vt==null?void 0:vt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ct.page,onChange:function(Xr,Rr){ct.page=Xr,dt(Object(P.a)({},ct)),yt(Object(P.a)({},ct))}})))}var ma=sa,qi=L("UfjD"),Si=L("qHvr"),ea=function(qe){var pt,_t,Ut,Dt,Vt,Pt,ut,vt,yt=qe.globalSetting,tr=qe.loading,Jt=qe.dispatch,Wt=qe.user,Ft=Object(h.a)(qe,["globalSetting","loading","dispatch","user"]),Xt=Object(i.useState)({avatar_url:""}),qt=Object(s.a)(Xt,2),Ze=qt[0],vr=qt[1],Ar=Object(i.useState)([]),cr=Object(s.a)(Ar,2),ht=cr[0],bt=cr[1],ft=Object(E.i)(),Tt=ft.identifier,zt=Object(i.useState)([]),rr=Object(s.a)(zt,2),Gt=rr[0],yr=rr[1],kr=Object(i.useState)(!0),or=Object(s.a)(kr,2),Qe=or[0],kt=or[1],Zr=Object(i.useState)([]),Vr=Object(s.a)(Zr,2),nr=Vr[0],br=Vr[1],Tr=Object(i.useState)([]),At=Object(s.a)(Tr,2),Ht=At[0],ir=At[1],Kt=Object(i.useState)(!1),ct=Object(s.a)(Kt,2),dt=ct[0],Mt=ct[1],xt=Object(i.useState)(!1),_r=Object(s.a)(xt,2),Jr=_r[0],qr=_r[1],mr=Object(i.useState)(!1),Xr=Object(s.a)(mr,2),Rr=Xr[0],on=Xr[1],Fr=Object(i.useState)([]),sn=Object(s.a)(Fr,2),Hn=sn[0],ke=sn[1],We=Object(i.useState)([]),Ve=Object(s.a)(We,2),Ne=Ve[0],be=Ve[1],De=Object(i.useState)([]),Te=Object(s.a)(De,2),Me=Te[0],He=Te[1],Ge=Object(i.useState)(!1),Ue=Object(s.a)(Ge,2),Ye=Ue[0],ot=Ue[1],Et=Object(i.useState)([]),Ct=Object(s.a)(Et,2),Nt=Ct[0],Er=Ct[1],Hr=Object(i.useState)(),Ur=Object(s.a)(Hr,2),Gr=Ur[0],Pr=Ur[1],Yr=Object(i.useState)(!0),$r=Object(s.a)(Yr,2),un=$r[0],en=$r[1],Tn=Object(i.useState)(!1),nn=Object(s.a)(Tn,2),Sr=nn[0],Dr=nn[1],Qr=Object(i.useState)(!1),ln=Object(s.a)(Qr,2),hr=ln[0],fn=ln[1],Pn=Object(i.useState)(!1),vn=Object(s.a)(Pn,2),On=vn[0],bn=vn[1],Gn=Object(i.useState)(!1),$n=Object(s.a)(Gn,2),Mn=$n[0],ni=$n[1],Fi=Object(i.useState)(!1),pi=Object(s.a)(Fi,2),Jn=pi[0],An=pi[1],Rn=Object(i.useState)(!0),Nn=Object(s.a)(Rn,2),kn=Nn[0],Vn=Nn[1],_i=Object(E.h)(),Xi=Object(i.useRef)(null);Object(i.useEffect)(function(){Tt&&En(),Object(Ot.X)("\u7ADE\u8D5B")},[Tt]);function En(){return Ai.apply(this,arguments)}function Ai(){return Ai=Object(n.a)(u.a.mark(function dr(){var fr;return u.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.t0=bt,pn.next=3,Jt({type:"competitions/getStaff",payload:{identifier:Tt}});case 3:return pn.t1=pn.sent,(0,pn.t0)(pn.t1),pn.next=7,Jt({type:"competitions/getHeader",payload:{identifier:Tt}});case 7:fr=pn.sent,vr(fr),Object(Ot.X)((fr==null?void 0:fr.name)||"\u7ADE\u8D5B");case 10:case"end":return pn.stop()}},dr)})),Ai.apply(this,arguments)}Object(i.useEffect)(function(){var dr;Pr(parseInt(_i==null||((dr=_i.query)===null||dr===void 0)?void 0:dr.type)===1)},[_i]),Object(i.useEffect)(function(){var dr;if((Ze==null||((dr=Ze.competition_modules)===null||dr===void 0)?void 0:dr.length)>0){var fr,Qt;if((_i==null||((fr=_i.query)===null||fr===void 0)?void 0:fr.active)==="\u8D5B\u9898\u53D1\u5E03"){var pn,er=Ze==null||((pn=Ze.competition_modules)===null||pn===void 0)?void 0:pn.find(function(ua){return ua.name==="\u8D5B\u9898\u53D1\u5E03"});if(er){Ri(er);return}}Ri(Ze==null||((Qt=Ze.competition_modules)===null||Qt===void 0)?void 0:Qt[0])}},[Ze]);function Ri(dr){return Sn.apply(this,arguments)}function Sn(){return Sn=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(He(fr.id),Me=fr.id,br(fr),!(fr.module_type==="entrance")){er.next=9;break}return er.next=6,Jt({type:"competitions/getItem",payload:{url:fr.module_url,module_type:"entrance"}});case 6:Qt=er.sent,er.next=12;break;case 9:return er.next=11,Jt({type:"competitions/getItem",payload:{url:fr.module_url}});case 11:Qt=er.sent;case 12:Mt(!1),on(!1),ot(!1),yr(Qt),Dr(!1),fn(!1),ir(fr.module_type),fr.module_type==="chart"?(Mt(!0),kt(!1),Ba()):fr.module_type==="certificate"?(on(!0),Mt(!1),kt(!1),ga()):fr.module_type==="md_tab"?(ot(!0),kt(!1),localStorage.setItem("issee","2"),Mt(!1),on(!1),na()):fr.module_type==="md_shixun"?(Dr(!0),kt(!1),na()):fr.module_type==="entrance"?(fn(!0),kt(!1),na()):(kt(!0),localStorage.setItem("issee","1"));case 20:case"end":return er.stop()}},dr)})),Sn.apply(this,arguments)}function _n(dr,fr,Qt){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(n.a)(u.a.mark(function dr(fr,Qt,pn){var er,ua;return u.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:if(fr.stopPropagation(),Object(oe.e)(Jt)){Dn.next=3;break}return Dn.abrupt("return");case 3:if(!(Ze!=null&&Ze.is_authentication&&!(Wt!=null&&(er=Wt.userInfo)!==null&&er!==void 0&&er.authentication))){Dn.next=6;break}return Jt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Dn.abrupt("return");case 6:if(!(Ze!=null&&Ze.enroll_url)){Dn.next=9;break}return Object(Ot.S)(Ze==null?void 0:Ze.enroll_url),Dn.abrupt("return");case 9:if(!(pn==="ismodel")){Dn.next=23;break}if(!(Qt.member_of_course===!0)){Dn.next=14;break}Object(Ot.S)("/classrooms/".concat(Qt.course_id)),Dn.next=21;break;case 14:if(Qt.invite_code){Dn.next=17;break}return o.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"),Dn.abrupt("return");case 17:return Dn.next=19,Jt({type:"competitions/addApplytojoincourse",payload:{invite_code:Qt.invite_code,student:1}});case 19:ua=Dn.sent,ua.status===0&&Object(Ot.S)("/classrooms/".concat(Qt.course_id));case 21:Dn.next=27;break;case 23:if(!(ht.enrolled===!0)){Dn.next=26;break}return Object(Ot.S)(pn),Dn.abrupt("return");case 26:bn(!0);case 27:case"end":return Dn.stop()}},dr)})),Xn.apply(this,arguments)}function Ba(){return xa.apply(this,arguments)}function xa(){return xa=Object(n.a)(u.a.mark(function dr(){return u.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.t0=qr,Qt.next=3,Jt({type:"competitions/ChartRules",payload:{identifier:Tt}});case 3:return Qt.t1=Qt.sent,Qt.next=6,(0,Qt.t0)(Qt.t1);case 6:case"end":return Qt.stop()}},dr)})),xa.apply(this,arguments)}function ta(dr){return ra.apply(this,arguments)}function ra(){return ra=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Jt({type:"competitions/Charts",payload:{identifier:Tt,stage_id:fr}});case 2:Qt=er.sent,yr(Qt);case 4:case"end":return er.stop()}},dr)})),ra.apply(this,arguments)}function La(dr){return wa.apply(this,arguments)}function wa(){return wa=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return en(!0),er.next=3,Jt({type:"competitions/Results",payload:Object(P.a)({identifier:Tt,stage_id:fr==null?void 0:fr.id},fr)});case 3:Qt=er.sent,yr(Qt),en(!1);case 6:case"end":return er.stop()}},dr)})),wa.apply(this,arguments)}function ka(dr){return Ha.apply(this,arguments)}function Ha(){return Ha=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return en(!0),er.next=3,Jt({type:"competitions/Results",payload:Object(P.a)({identifier:Tt,stage_id:fr==null?void 0:fr.id,module_type:"entrance"},fr)});case 3:Qt=er.sent,yr(Qt),en(!1);case 6:case"end":return er.stop()}},dr)})),Ha.apply(this,arguments)}function Xa(dr){return Pa.apply(this,arguments)}function Pa(){return Pa=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Jt({type:"competitions/Results",payload:{identifier:Tt,stage_id:fr}});case 2:if(Qt=er.sent,!(localStorage.getItem("issee")==="1")){er.next=5;break}return er.abrupt("return");case 5:yr(Qt);case 6:case"end":return er.stop()}},dr)})),Pa.apply(this,arguments)}function na(){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(n.a)(u.a.mark(function dr(){return u.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.t0=Er,Qt.next=3,Jt({type:"competitions/TabResults",payload:{identifier:Tt,competition_module_id:Me}});case 3:Qt.t1=Qt.sent,(0,Qt.t0)(Qt.t1);case 5:case"end":return Qt.stop()}},dr)})),Ta.apply(this,arguments)}function ga(){return ia.apply(this,arguments)}function ia(){return ia=Object(n.a)(u.a.mark(function dr(){var fr,Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Jt({type:"competitions/Prize",payload:{identifier:Tt,user_id:Wt==null||((fr=Wt.userInfo)===null||fr===void 0)?void 0:fr.user_id}});case 2:Qt=er.sent,ke(Qt);case 4:case"end":return er.stop()}},dr)})),ia.apply(this,arguments)}function co(){return va.apply(this,arguments)}function va(){return va=Object(n.a)(u.a.mark(function dr(){var fr,Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Jt({type:"competitions/Accounts",payload:{id:Wt==null||((fr=Wt.userInfo)===null||fr===void 0)?void 0:fr.user_id}});case 2:Qt=er.sent,be(Qt);case 4:case"end":return er.stop()}},dr)})),va.apply(this,arguments)}function Sa(dr){return aa.apply(this,arguments)}function aa(){return aa=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(kn){er.next=2;break}return er.abrupt("return");case 2:if(Vn(!1),!la()){er.next=5;break}return er.abrupt("return");case 5:return er.next=7,Jt({type:"competitions/AddTeam",payload:{identifier:Tt,name:fr}});case 7:Qt=er.sent,Qt&&Qt.status===0?(o.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),En(),ni(!1)):Vn(!0);case 9:case"end":return er.stop()}},dr)})),aa.apply(this,arguments)}function la(){var dr,fr;if(Wt!=null&&(dr=Wt.userInfo)!==null&&dr!==void 0&&dr.is_teacher){var Qt;if(ht!=null&&(Qt=ht.teacher_staff)!==null&&Qt!==void 0&&Qt.mutiple_limited&&(ht!=null&&ht.enrolled))return o.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Vn(!0),!0}else{var pn;if(ht!=null&&(pn=ht.member_staff)!==null&&pn!==void 0&&pn.mutiple_limited&&(ht!=null&&ht.enrolled))return o.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Vn(!0),!0}if(ht!=null&&ht.enroll_ended)return o.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Vn(!0),!0;if(Wt!=null&&(fr=Wt.userInfo)!==null&&fr!==void 0&&fr.is_teacher){if(!ht.teacher_staff)return o.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Vn(!0),!0}else if(!(ht!=null&&ht.member_staff))return o.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Vn(!0),!0}function ji(dr){return Yi.apply(this,arguments)}function Yi(){return Yi=Object(n.a)(u.a.mark(function dr(fr){var Qt;return u.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(kn){er.next=2;break}return er.abrupt("return");case 2:if(!la()){er.next=4;break}return er.abrupt("return");case 4:return Vn(!1),er.next=7,Jt({type:"competitions/JoinTeam",payload:{identifier:Tt,invite_code:fr}});case 7:Qt=er.sent,Qt&&Qt.status===0?(o.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),An(!1),Vn(!0),En()):Vn(!0);case 9:case"end":return er.stop()}},dr)})),Yi.apply(this,arguments)}return r.a.createElement("div",{className:"edu-container minH500"},r.a.createElement(a.a,{className:"mt10",separator:">"},r.a.createElement(a.a.Item,null,r.a.createElement(y.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),r.a.createElement(a.a.Item,null,Ze.name,Ze.sub_title?"-"+Ze.sub_title:null)),r.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},r.a.createElement(t.a,{spinning:tr.effects["competitions/getHeader"]},r.a.createElement("div",{style:{height:"355px",width:"800px"}},(Ze==null?void 0:Ze.avatar_url)&&(Ze==null?void 0:Ze.avatar_url)!==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:X.a.IMG_SERVER+"/"+(Ze==null?void 0:Ze.avatar_url)}),!(Ze!=null&&Ze.avatar_url)&&(Ze==null?void 0:Ze.avatar_url)==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:X.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),r.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},r.a.createElement("p",{className:"".concat(O.a.titlesize)},Ze.name,Ze.sub_title?"-"+Ze.sub_title:null),r.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u5956\u91D1"),Ze!=null&&Ze.bonus?r.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(Ze&&Ze.bonus).toLocaleString()):r.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u6D4F\u89C8"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Ze&&Ze.visits_count).toLocaleString())),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u62A5\u540D"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Ze&&Ze.member_count).toLocaleString()))),r.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},r.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),Ze.start_time,"~",Ze.end_time),r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),Ze.enroll_end_time),Ze.competition_status==="ended"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,Ze.competition_status==="nearly_published"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,Ze.competition_status==="progressing"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,r.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(Ze==null?void 0:Ze.mode)<=2&&ht.enrolled&&r.a.createElement(w.a,{onClick:function(fr){if((Ze==null?void 0:Ze.mode)===1){var Qt;Ri((Qt=Ze.competition_modules)===null||Qt===void 0?void 0:Qt.find(function(pn){return pn.module_type==="entrance"}))}else _n(fr,Ze,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(Ze==null?void 0:Ze.mode)===2||(Ze==null?void 0:Ze.mode)===1&&((pt=Ze.competition_modules)===null||pt===void 0||((_t=pt.filter(function(dr){return dr.module_type==="entrance"}))===null||_t===void 0)?void 0:_t.length)>0?"":"none"},className:O.a.buttonsize},(Ze==null?void 0:Ze.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(Ze==null?void 0:Ze.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),Ze.competition_status==="ended"?r.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,Ze.competition_status==="nearly_published"?r.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,Ze.competition_status!=="nearly_published"&&Ze.enroll_end&&Ze.competition_status!=="ended"?r.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,Ze.competition_status==="progressing"&&Ze.enroll_end!=!0?r.a.createElement(w.a,{type:"primary",disabled:ht.enrolled&&!Ze.need_attachment,className:O.a.buttonsize,onClick:function(fr){if(ht.enrolled&&Ze.need_attachment){var Qt;(Qt=Xi.current)===null||Qt===void 0||Qt.handleVisible();return}_n(fr,Ze,Ze.mode===2?"ismodel":Ze.personal?"personal":"/competitions/index/".concat(Ze.identifier,"/enroll"))}},ht.enrolled?Ze.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":Ze!=null&&Ze.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Wt.userInfo.real_name!="\u6E38\u5BA2"&&!(Ze!=null&&Ze.enroll_url)&&r.a.createElement("span",{onClick:function(fr){return _n(fr,Ze,Ze.mode===2?"ismodel":Ze.personal?"personal":"/competitions/index/".concat(Ze.identifier,"/enroll"))},className:O.a.myteam},Object(li.v)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),r.a.createElement("div",{className:O.a.bootmdetail},r.a.createElement("div",{className:O.a.flex1},r.a.createElement(v.a,{selectedKeys:["".concat(Me)]},Ze&&Ze.competition_modules&&Ze.competition_modules.map(function(dr,fr){if(dr.module_type!="enroll")return r.a.createElement(v.a.Item,{className:O.a.menuItem,onClick:function(){if(dr!=null&&dr.is_authentication){if(!Object(oe.e)(Jt))return;o.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Ri(dr)},key:dr.id},dr.name)}))),r.a.createElement("div",{className:O.a.flex6,style:{padding:(Sr||hr)&&0}},Rr?r.a.createElement(Zi,{dispatch:Jt,userid:Wt==null||((Ut=Wt.userInfo)===null||Ut===void 0)?void 0:Ut.user_id,Prize:Hn,Accounts:Ne,getAccounts:co}):null,dt?r.a.createElement(ve,{HeaderDetail:Ze,userinfo:Wt.userInfo,Editable:Ze==null||((Dt=Ze.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:ta,getChartRules:Ba,Selectkey:Me,ChartRules:Jr,ItemData:Gt}):null,Qe?r.a.createElement(V,{ref:Xi,StaffDetail:ht,HeaderDetail:Ze,userinfo:Wt.userInfo,Editable:Ze==null||((Vt=Ze.permission)===null||Vt===void 0)?void 0:Vt.editable,ItemData:Gt,setIssee:kt,ModelType:Ht,dispatch:Jt}):null,!Qe&&!Sr&&!hr&&!dt&&!Rr&&!Ye?r.a.createElement(re,{userinfo:Wt.userInfo,ModelType:Ht,getrightdatas:Ri,dispatch:Jt,MenuItem:nr,setIssee:kt,identifier:Tt,ItemData:Gt}):null,Ye&&r.a.createElement(bi,{dispatch:Jt,StaffDetail:ht,userinfo:Wt.userInfo,HeaderDetail:Ze,Editable:Ze==null||((Pt=Ze.permission)===null||Pt===void 0)?void 0:Pt.editable,getCharts:Xa,getChartRules:na,Selectkey:Me,ChartRules:Nt,ItemData:Gt}),Sr&&r.a.createElement(_a,{loading:un,dispatch:Jt,StaffDetail:ht,userinfo:Wt.userInfo,HeaderDetail:Ze,Editable:Ze==null||((ut=Ze.permission)===null||ut===void 0)?void 0:ut.editable,getCharts:La,getChartRules:na,Selectkey:Me,ChartRules:Nt,ItemData:Gt}),hr&&r.a.createElement(ma,{loading:un,dispatch:Jt,StaffDetail:ht,userinfo:Wt.userInfo,HeaderDetail:Ze,Editable:Ze==null||((vt=Ze.permission)===null||vt===void 0)?void 0:vt.editable,getCharts:ka,getChartRules:na,Selectkey:Me,ChartRules:Nt,ItemData:Gt}))),r.a.createElement(_.a,null),r.a.createElement(Y,{getResults:Xa}),r.a.createElement(T.a,{visible:Gr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Pr(!1)}},r.a.createElement("div",{className:O.a.modal},r.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),r.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",r.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),r.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),r.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),r.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),r.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),r.a.createElement(w.a,{type:"primary",onClick:function(){return Object(Ot.S)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),r.a.createElement(T.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:On,onCancel:function(){bn(!1)},footer:!1},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},r.a.createElement(w.a,{type:"primary",style:{height:40},onClick:function(){An(!0),bn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),r.a.createElement(w.a,{style:{height:40},onClick:function(){ni(!0),bn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),Jn?r.a.createElement(qi.a,{isjoin:Jn,setJoin:An,JoinTeams:ji}):null,Mn?r.a.createElement(Si.a,{isAddmodle:Mn,setIsAdd:ni,createTeam:Sa}):null)},Ea=q.default=Object(p.a)(function(mt){var qe=mt.loading,pt=mt.globalSetting,_t=mt.user;return{globalSetting:pt,loading:qe,user:_t}})(ea)},GRuw:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("lPiR"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.WordArray,v=g.algo,m=v.SHA256,w=v.SHA224=m.extend({_doReset:function(){this._hash=new N.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=m._doFinalize.call(this);return b.sigBytes-=4,b}});g.SHA224=m._createHelper(w),g.HmacSHA224=m._createHmacHelper(w)}(),P.SHA224})},GfqC:function(H,q,L){"use strict";var P=L("q1tI"),g=L.n(P),T=L("TSYQ"),N=L.n(T);function v(W,U){var D="cannot "+W.method+" "+W.action+" "+U.status+"'",X=new Error(D);return X.status=U.status,X.method=W.method,X.url=W.action,X}function m(W){var U=W.responseText||W.response;if(!U)return U;try{return JSON.parse(U)}catch(D){return U}}function w(W){var U=new XMLHttpRequest;W.onProgress&&U.upload&&(U.upload.onprogress=function(oe){oe.total>0&&(oe.percent=oe.loaded/oe.total*100),W.onProgress(oe)});var D=new FormData;W.data&&Object.keys(W.data).forEach(function(ie){var oe=W.data[ie];if(Array.isArray(oe)){oe.forEach(function(de){D.append(ie+"[]",de)});return}D.append(ie,W.data[ie])}),W.file instanceof Blob?D.append(W.filename,W.file,W.file.name):D.append(W.filename,W.file),U.onerror=function(oe){W.onError(oe)},U.onload=function(){return U.status<200||U.status>=300?W.onError(v(W,U),m(U)):W.onSuccess(m(U),U)},U.open(W.method,W.action,!0),W.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var X=W.headers||{};return X["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(X).forEach(function(ie){X[ie]!==null&&U.setRequestHeader(ie,X[ie])}),U.send(D),{abort:function(){U.abort()}}}var b=+new Date,t=0;function d(){return"rc-upload-"+b+"-"+ ++t}function a(W,U){return W.indexOf(U,W.length-U.length)!==-1}var c=function(W,U){if(W&&U){var D=Array.isArray(U)?U:U.split(","),X=W.name||"",ie=W.type||"",oe=ie.replace(/\/.*$/,"");return D.some(function(de){var Ce=de.trim();return Ce.charAt(0)==="."?a(X.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?oe===Ce.replace(/\/.*$/,""):ie===Ce})}return!0};function o(W,U){var D=W.createReader(),X=[];function ie(){D.readEntries(function(oe){var de=Array.prototype.slice.apply(oe);X=X.concat(de);var Ce=!de.length;Ce?U(X):ie()})}ie()}var n=function(U,D,X){var ie=function oe(de,Ce){Ce=Ce||"",de.isFile?de.file(function(Ae){X(Ae)&&(de.fullPath&&!Ae.webkitRelativePath&&(Object.defineProperties(Ae,{webkitRelativePath:{writable:!0}}),Ae.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(Ae,{webkitRelativePath:{writable:!1}})),D([Ae]))}):de.isDirectory&&o(de,function(Ae){Ae.forEach(function(me){oe(me,""+Ce+de.name+"/")})})};U.forEach(function(oe){ie(oe.webkitGetAsEntry())})},s=n,h=Object.assign||function(W){for(var U=1;U<arguments.length;U++){var D=arguments[U];for(var X in D)Object.prototype.hasOwnProperty.call(D,X)&&(W[X]=D[X])}return W},f=function(){function W(U,D){var X=[],ie=!0,oe=!1,de=void 0;try{for(var Ce=U[Symbol.iterator](),Ae;!(ie=(Ae=Ce.next()).done)&&!(X.push(Ae.value),D&&X.length===D);ie=!0);}catch(me){oe=!0,de=me}finally{try{!ie&&Ce.return&&Ce.return()}finally{if(oe)throw de}}return X}return function(U,D){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return W(U,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function W(U,D){for(var X=0;X<D.length;X++){var ie=D[X];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(U,ie.key,ie)}}return function(U,D,X){return D&&W(U.prototype,D),X&&W(U,X),U}}();function i(W,U,D){return U in W?Object.defineProperty(W,U,{value:D,enumerable:!0,configurable:!0,writable:!0}):W[U]=D,W}function r(W,U){var D={};for(var X in W){if(U.indexOf(X)>=0)continue;if(!Object.prototype.hasOwnProperty.call(W,X))continue;D[X]=W[X]}return D}function E(W,U){if(!(W instanceof U))throw new TypeError("Cannot call a class as a function")}function y(W,U){if(!W)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:W}function p(W,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);W.prototype=Object.create(U&&U.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(W,U):W.__proto__=U)}var R=function(U){return Object.keys(U).reduce(function(D,X){return(X.substr(0,5)==="data-"||X.substr(0,5)==="aria-"||X==="role")&&(D[X]=U[X]),D},{})},O=function(W){p(U,W);function U(){var D,X,ie,oe;E(this,U);for(var de=arguments.length,Ce=Array(de),Ae=0;Ae<de;Ae++)Ce[Ae]=arguments[Ae];return oe=(X=(ie=y(this,(D=U.__proto__||Object.getPrototypeOf(U)).call.apply(D,[this].concat(Ce))),ie),ie.state={uid:d()},ie.reqs={},ie.onChange=function(me){var Se=me.target.files;ie.uploadFiles(Se),ie.reset()},ie.onClick=function(me){var Se=ie.fileInput;if(!Se)return;var ye=ie.props,se=ye.children,ee=ye.onClick;se&&se.type==="button"&&(Se.parentNode.focus(),Se.parentNode.querySelector("button").blur()),Se.click(),ee&&ee(me)},ie.onKeyDown=function(me){me.key==="Enter"&&ie.onClick()},ie.onFileDrop=function(me){var Se=ie.props.multiple;if(me.preventDefault(),me.type==="dragover")return;if(ie.props.directory)s(Array.prototype.slice.call(me.dataTransfer.items),ie.uploadFiles,function(se){return c(se,ie.props.accept)});else{var ye=Array.prototype.slice.call(me.dataTransfer.files).filter(function(se){return c(se,ie.props.accept)});Se===!1&&(ye=ye.slice(0,1)),ie.uploadFiles(ye)}},ie.uploadFiles=function(me){var Se=Array.prototype.slice.call(me);Se.map(function(ye){return ye.uid=d(),ye}).forEach(function(ye){ie.upload(ye,Se)})},ie.saveFileInput=function(me){ie.fileInput=me},X),y(ie,oe)}return u(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(X,ie){var oe=this,de=this.props;if(!de.beforeUpload)return setTimeout(function(){return oe.post(X)},0);var Ce=de.beforeUpload(X,ie);Ce&&Ce.then?Ce.then(function(Ae){var me=Object.prototype.toString.call(Ae);return me==="[object File]"||me==="[object Blob]"?oe.post(Ae):oe.post(X)}).catch(function(Ae){console.log(Ae)}):Ce!==!1&&setTimeout(function(){return oe.post(X)},0);return}},{key:"post",value:function(X){var ie=this;if(!this._isMounted)return;var oe=this.props,de=oe.onStart,Ce=oe.onProgress,Ae=oe.transformFile,me=Ae===void 0?function(Se){return Se}:Ae;new Promise(function(Se){var ye=oe.action;return typeof ye=="function"&&(ye=ye(X)),Se(ye)}).then(function(Se){var ye=X.uid,se=oe.customRequest||w,ee=Promise.resolve(me(X)).then(function(B){var G=oe.data;return typeof G=="function"&&(G=G(B)),Promise.all([B,G])}).catch(function(B){console.error(B)});ee.then(function(B){var G=f(B,2),V=G[0],Q=G[1],Z={action:Se,filename:oe.name,data:Q,file:V,headers:oe.headers,withCredentials:oe.withCredentials,method:oe.method||"post",onProgress:Ce?function(ne){Ce(ne,X)}:null,onSuccess:function(re,$){delete ie.reqs[ye],oe.onSuccess(re,X,$)},onError:function(re,$){delete ie.reqs[ye],oe.onError(re,$,X)}};de(X),ie.reqs[ye]=se(Z)})})}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(X){var ie=this.reqs;if(X){var oe=X;X&&X.uid&&(oe=X.uid),ie[oe]&&ie[oe].abort&&ie[oe].abort(),delete ie[oe]}else Object.keys(ie).forEach(function(de){ie[de]&&ie[de].abort&&ie[de].abort(),delete ie[de]})}},{key:"render",value:function(){var X,ie=this.props,oe=ie.component,de=ie.prefixCls,Ce=ie.className,Ae=ie.disabled,me=ie.id,Se=ie.style,ye=ie.multiple,se=ie.accept,ee=ie.children,B=ie.directory,G=ie.openFileDialogOnClick,V=ie.onMouseEnter,Q=ie.onMouseLeave,Z=r(ie,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ne=N()((X={},i(X,de,!0),i(X,de+"-disabled",Ae),i(X,Ce,Ce),X)),re=Ae?{}:{onClick:G?this.onClick:function(){},onKeyDown:G?this.onKeyDown:function(){},onMouseEnter:V,onMouseLeave:Q,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(oe,h({},re,{className:ne,role:"button",style:Se}),g.a.createElement("input",h({},R(Z),{id:me,type:"file",ref:this.saveFileInput,onClick:function(J){return J.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:se,directory:B?"directory":null,webkitdirectory:B?"webkitdirectory":null,multiple:ye,onChange:this.onChange})),ee)}}]),U}(P.Component),_=O,x=Object.assign||function(W){for(var U=1;U<arguments.length;U++){var D=arguments[U];for(var X in D)Object.prototype.hasOwnProperty.call(D,X)&&(W[X]=D[X])}return W},S=function(){function W(U,D){for(var X=0;X<D.length;X++){var ie=D[X];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(U,ie.key,ie)}}return function(U,D,X){return D&&W(U.prototype,D),X&&W(U,X),U}}();function C(W,U){if(!(W instanceof U))throw new TypeError("Cannot call a class as a function")}function j(W,U){if(!W)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:W}function F(W,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);W.prototype=Object.create(U&&U.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(W,U):W.__proto__=U)}function M(){}var Y=function(W){F(U,W);function U(){var D,X,ie,oe;C(this,U);for(var de=arguments.length,Ce=Array(de),Ae=0;Ae<de;Ae++)Ce[Ae]=arguments[Ae];return oe=(X=(ie=j(this,(D=U.__proto__||Object.getPrototypeOf(U)).call.apply(D,[this].concat(Ce))),ie),ie.saveUploader=function(me){ie.uploader=me},X),j(ie,oe)}return S(U,[{key:"abort",value:function(X){this.uploader.abort(X)}},{key:"render",value:function(){return g.a.createElement(_,x({},this.props,{ref:this.saveUploader}))}}]),U}(P.Component);Y.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var K=Y,A=q.a=K},HmJG:function(H,q,L){},IBYe:function(H,q,L){"use strict";function P(g){return null}q.a=P},Ib8C:function(H,q,L){(function(P){(function(g,T){H.exports=q=T()})(this,function(){var g=g||function(T,N){var v;if(typeof window!="undefined"&&window.crypto&&(v=window.crypto),typeof self!="undefined"&&self.crypto&&(v=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(v=globalThis.crypto),!v&&typeof window!="undefined"&&window.msCrypto&&(v=window.msCrypto),!v&&typeof P!="undefined"&&P.crypto&&(v=P.crypto),!v&&!0)try{v=L(4)}catch(i){}var m=function(){if(v){if(typeof v.getRandomValues=="function")try{return v.getRandomValues(new Uint32Array(1))[0]}catch(i){}if(typeof v.randomBytes=="function")try{return v.randomBytes(4).readInt32LE()}catch(i){}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function i(){}return function(r){var E;return i.prototype=r,E=new i,i.prototype=null,E}}(),b={},t=b.lib={},d=t.Base=function(){return{extend:function(i){var r=w(this);return i&&r.mixIn(i),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var i=this.extend();return i.init.apply(i,arguments),i},init:function(){},mixIn:function(i){for(var r in i)i.hasOwnProperty(r)&&(this[r]=i[r]);i.hasOwnProperty("toString")&&(this.toString=i.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=t.WordArray=d.extend({init:function(i,r){i=this.words=i||[],r!=N?this.sigBytes=r:this.sigBytes=i.length*4},toString:function(i){return(i||o).stringify(this)},concat:function(i){var r=this.words,E=i.words,y=this.sigBytes,p=i.sigBytes;if(this.clamp(),y%4)for(var R=0;R<p;R++){var O=E[R>>>2]>>>24-R%4*8&255;r[y+R>>>2]|=O<<24-(y+R)%4*8}else for(var _=0;_<p;_+=4)r[y+_>>>2]=E[_>>>2];return this.sigBytes+=p,this},clamp:function(){var i=this.words,r=this.sigBytes;i[r>>>2]&=4294967295<<32-r%4*8,i.length=T.ceil(r/4)},clone:function(){var i=d.clone.call(this);return i.words=this.words.slice(0),i},random:function(i){for(var r=[],E=0;E<i;E+=4)r.push(m());return new a.init(r,i)}}),c=b.enc={},o=c.Hex={stringify:function(i){for(var r=i.words,E=i.sigBytes,y=[],p=0;p<E;p++){var R=r[p>>>2]>>>24-p%4*8&255;y.push((R>>>4).toString(16)),y.push((R&15).toString(16))}return y.join("")},parse:function(i){for(var r=i.length,E=[],y=0;y<r;y+=2)E[y>>>3]|=parseInt(i.substr(y,2),16)<<24-y%8*4;return new a.init(E,r/2)}},n=c.Latin1={stringify:function(i){for(var r=i.words,E=i.sigBytes,y=[],p=0;p<E;p++){var R=r[p>>>2]>>>24-p%4*8&255;y.push(String.fromCharCode(R))}return y.join("")},parse:function(i){for(var r=i.length,E=[],y=0;y<r;y++)E[y>>>2]|=(i.charCodeAt(y)&255)<<24-y%4*8;return new a.init(E,r)}},s=c.Utf8={stringify:function(i){try{return decodeURIComponent(escape(n.stringify(i)))}catch(r){throw new Error("Malformed UTF-8 data")}},parse:function(i){return n.parse(unescape(encodeURIComponent(i)))}},h=t.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(i){typeof i=="string"&&(i=s.parse(i)),this._data.concat(i),this._nDataBytes+=i.sigBytes},_process:function(i){var r,E=this._data,y=E.words,p=E.sigBytes,R=this.blockSize,O=R*4,_=p/O;i?_=T.ceil(_):_=T.max((_|0)-this._minBufferSize,0);var x=_*R,S=T.min(x*4,p);if(x){for(var C=0;C<x;C+=R)this._doProcessBlock(y,C);r=y.splice(0,x),E.sigBytes-=S}return new a.init(r,S)},clone:function(){var i=d.clone.call(this);return i._data=this._data.clone(),i},_minBufferSize:0}),f=t.Hasher=h.extend({cfg:d.extend(),init:function(i){this.cfg=this.cfg.extend(i),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(i){return this._append(i),this._process(),this},finalize:function(i){i&&this._append(i);var r=this._doFinalize();return r},blockSize:512/32,_createHelper:function(i){return function(r,E){return new i.init(E).finalize(r)}},_createHmacHelper:function(i){return function(r,E){return new u.HMAC.init(i,E).finalize(r)}}}),u=b.algo={};return b}(Math);return g})}).call(this,L("IyRk"))},JYp7:function(H,q,L){"use strict";L.d(q,"a",function(){return P});var P;(function(g){function T(r){return r&&typeof r=="object"&&typeof r[Symbol.iterator]=="function"}g.is=T;const N=Object.freeze([]);function v(){return N}g.empty=v;function*m(r){yield r}g.single=m;function w(r){return r||N}g.from=w;function b(r){return!r||r[Symbol.iterator]().next().done===!0}g.isEmpty=b;function t(r){return r[Symbol.iterator]().next().value}g.first=t;function d(r,E){for(const y of r)if(E(y))return!0;return!1}g.some=d;function a(r,E){for(const y of r)if(E(y))return y;return}g.find=a;function*c(r,E){for(const y of r)E(y)&&(yield y)}g.filter=c;function*o(r,E){let y=0;for(const p of r)yield E(p,y++)}g.map=o;function*n(...r){for(const E of r)for(const y of E)yield y}g.concat=n;function*s(r){for(const E of r)for(const y of E)yield y}g.concatNested=s;function h(r,E,y){let p=y;for(const R of r)p=E(p,R);return p}g.reduce=h;function*f(r,E,y=r.length){for(E<0&&(E+=r.length),y<0?y+=r.length:y>r.length&&(y=r.length);E<y;E++)yield r[E]}g.slice=f;function u(r,E=Number.POSITIVE_INFINITY){const y=[];if(E===0)return[y,r];const p=r[Symbol.iterator]();for(let R=0;R<E;R++){const O=p.next();if(O.done)return[y,g.empty()];y.push(O.value)}return[y,{[Symbol.iterator](){return p}}]}g.consume=u;function i(r,E,y=(p,R)=>p===R){const p=r[Symbol.iterator](),R=E[Symbol.iterator]();for(;;){const O=p.next(),_=R.next();if(O.done!==_.done)return!1;if(O.done)return!0;if(!y(O.value,_.value))return!1}}g.equals=i})(P||(P={}))},K3mO:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.Base,v=T.WordArray,m=g.algo,w=m.MD5,b=m.EvpKDF=N.extend({cfg:N.extend({keySize:128/32,hasher:w,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,d){for(var a,c=this.cfg,o=c.hasher.create(),n=v.create(),s=n.words,h=c.keySize,f=c.iterations;s.length<h;){a&&o.update(a),a=o.update(t).finalize(d),o.reset();for(var u=1;u<f;u++)a=o.finalize(a),o.reset();n.concat(a)}return n.sigBytes=h*4,n}});g.EvpKDF=function(t,d,a){return b.create(a).compute(t,d)}}(),P.EvpKDF})},KXlV:function(H,q,L){H.exports=L.p+"static/job.65c6034f.png"},KeDT:function(H,q,L){H.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:function(H,q,L){"use strict";L.d(q,"a",function(){return p}),L.d(q,"c",function(){return _});var P=L("0Owb"),g=L("miYZ"),T=L("tsqr"),N=L("oBTY"),v=L("tJVT"),m=L("PpiC"),w=L("k1fw"),b=L("9og8"),t=L("DZo9"),d=L("8z0m"),a=L("WmNS"),c=L.n(a),o=L("q1tI"),n=L.n(o),s=L("ErOA"),h=L("NFKh"),f=L.n(h),u=L("7Cbv"),i=L("9kvl"),r=L("mxV5"),E=L.n(r),y=d.a.Dragger,p=function(C){var j="bf3c199c2470cb477d907b1e0917c17b",F="5183666c72eec9e4",M=f.a.enc.Utf8.parse(j),Y=f.a.enc.Utf8.parse(F),K=f.a.AES.decrypt(C,M,{iv:Y,mode:f.a.mode.CBC});return K.toString(f.a.enc.Utf8)},R,O=function(){var S=Object(b.a)(c.a.mark(function C(j){var F,M,Y,K,A,W,U,D,X,ie,oe;return c.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return U=j.identifier,D=j.oldFilename,X=j.newFilename,Ce.next=3,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return ie=Ce.sent,ie.data=JSON.parse(p(ie.data)),oe=new E.a({endpoint:ie==null||((F=ie.data)===null||F===void 0)?void 0:F.end_point,region:ie==null||((M=ie.data)===null||M===void 0)?void 0:M.region,accessKeyId:ie==null||((Y=ie.data)===null||Y===void 0)?void 0:Y.access_key_id,accessKeySecret:ie==null||((K=ie.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:ie==null||((A=ie.data)===null||A===void 0)?void 0:A.bucket,stsToken:ie==null||((W=ie.data)===null||W===void 0)?void 0:W.security_token}),Ce.abrupt("return",new Promise(function(Ae,me){console.log(11111,"".concat(U,"/").concat(D),"".concat(U,"/").concat(X),ie.data),oe.copy("/".concat(U,"/").concat(D),"/".concat(U,"/").concat(X)).then(function(Se){console.log("\u62F7\u8D1D\u6210\u529F",Se)}).catch(function(Se){console.log(Se)})}));case 7:case"end":return Ce.stop()}},C)}));return function(j){return S.apply(this,arguments)}}(),_=function(){var S=Object(b.a)(c.a.mark(function C(j,F,M){var Y,K,A,W,U,D,X,ie,oe,de;return c.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return F.file_name=j.name,Ae.next=3,Object(s.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return X=Ae.sent,console.log("decrypt(res.data):",p(X.data)),X.data=JSON.parse(p(X.data)),ie=j.name.split("."),ie.pop(),oe=F.realFileName?ie:Object(u.a)(),de=new E.a({endpoint:X==null||((Y=X.data)===null||Y===void 0)?void 0:Y.end_point,region:X==null||((K=X.data)===null||K===void 0)?void 0:K.region,accessKeyId:X==null||((A=X.data)===null||A===void 0)?void 0:A.access_key_id,accessKeySecret:X==null||((W=X.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:X==null||((U=X.data)===null||U===void 0)?void 0:U.bucket,stsToken:X==null||((D=X.data)===null||D===void 0)?void 0:D.security_token}),Ae.abrupt("return",new Promise(function(me,Se){var ye;de.multipartUpload("".concat(oe),new Blob([j],{type:j.type}),Object(w.a)(Object(w.a)({timeout:200*1e3,partSize:102400},M),{},{callback:{url:X==null||((ye=X.data)===null||ye===void 0)?void 0:ye.callback_url,host:X==null?void 0:X.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(F)}})).then(function(se){var ee;j.response=(ee=se.data)===null||ee===void 0?void 0:ee.data,me(se==null?void 0:se.data)}).catch(function(se){Se(se),console.log("err:",se)})}));case 11:case"end":return Ae.stop()}},C)}));return function(j,F,M){return S.apply(this,arguments)}}(),x=function(C){var j=C.user,F=C.cancelUpload,M=Object(m.a)(C,["user","cancelUpload"]),Y=Object(o.useState)([]),K=Object(v.a)(Y,2),A=K[0],W=K[1],U=Object(o.useState)(),D=Object(v.a)(U,2),X=D[0],ie=D[1],oe={onRemove:function(Ae){W(Object(N.a)(A.filter(function(me){return me.name!==Ae.name}))),M.onChange(A.filter(function(me){return me.name!==Ae.name}))},disabled:M.disabled,multiple:!0,fileList:A==null?void 0:A.map(function(Ce){return Ce.file}),customRequest:function(){},beforeUpload:function(){var Ce=Object(b.a)(c.a.mark(function me(Se){var ye;return c.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(ye=M.maxSize||1024*1024*1024*1,!A.filter(function(B){return B.name===Se.name}).length){ee.next=4;break}return T.b.info("".concat(Se.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ee.abrupt("return");case 4:if(!((Se==null?void 0:Se.size)>ye)){ee.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ye/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ee.abrupt("return",!1);case 7:return A.push({name:Se.name,file:Se}),W(Object(N.a)(A)),M.onChange(A),ee.abrupt("return",!1);case 11:case"end":return ee.stop()}},me)}));function Ae(me){return Ce.apply(this,arguments)}return Ae}()},de=function(){var Ce=Object(b.a)(c.a.mark(function Ae(me,Se){var ye,se,ee,B,G,V,Q,Z,ne,re;return c.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return Se.file_name=me.name,Q=me.name,J.next=4,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Z=J.sent,Z.data=JSON.parse(p(Z.data)),!((Z==null?void 0:Z.status)!==0)){J.next=12;break}return A[A.findIndex(function(le){return le.name===Q})].status="error",A[A.findIndex(function(le){return le.name===Q})].file.status="error",M.onChange(A),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return X=new E.a({endpoint:Z==null||((ye=Z.data)===null||ye===void 0)?void 0:ye.end_point,region:Z==null||((se=Z.data)===null||se===void 0)?void 0:se.region,accessKeyId:Z==null||((ee=Z.data)===null||ee===void 0)?void 0:ee.access_key_id,accessKeySecret:Z==null||((B=Z.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:Z==null||((G=Z.data)===null||G===void 0)?void 0:G.bucket,stsToken:Z==null||((V=Z.data)===null||V===void 0)?void 0:V.security_token}),console.log(me,"file"),ie(X),ne=me.name.split("."),ne.pop(),re=Se.realFileName?ne:Object(u.a)(),J.abrupt("return",new Promise(function(le,ue){try{var we;X.multipartUpload("".concat(M.identifier,"/").concat(re).concat(Q.indexOf(".")>-1?"."+Q.split(".").pop():""),new Blob([me.file],{type:me.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Xe,$e,et){try{console.log("\u8FDB\u5EA6",Xe,$e,et);var nt=A.findIndex(function(at){return at.name===Q});A[nt].file.percent=Xe*100,A[nt].tempCheckpoint=$e,W(Object(N.a)(A))}catch(at){}},checkpoint:A[A.findIndex(function(Fe){return Fe.name===Q})].tempCheckpoint,callback:{customValue:{id:Q+""},url:Z==null||((we=Z.data)===null||we===void 0)?void 0:we.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(s.e)(Se)}}).then(function(Fe){var Xe,$e=A.findIndex(function(Ie){return Ie.name===Q}),et="done";if(((Xe=Fe.data)===null||Xe===void 0?void 0:Xe.status)===0){var nt;me.response=(nt=Fe.data)===null||nt===void 0?void 0:nt.data;var at=A.findIndex(function(Ie){return Ie.name===Q});A[at].status="done",A[at].file.status="done"}else{var Be;T.b.warn((Be=Fe.data)===null||Be===void 0?void 0:Be.message),et="error"}A[$e].status=et,A[$e].file.status=et,M.onChange(A),le(Fe==null?void 0:Fe.data)}).catch(function(Fe){A[A.findIndex(function(Xe){return Xe.name===Q})].status="error",A[A.findIndex(function(Xe){return Xe.name===Q})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),W(Object(N.a)(A)),M.onChange(A),ue(Fe),console.log("err:",Fe)})}catch(Fe){}}));case 19:case"end":return J.stop()}},Ae)}));return function(me,Se){return Ce.apply(this,arguments)}}();return Object(o.useEffect)(function(){A.every(function(Ce){return Ce==="done"||Ce==="error"})&&M.onComplete(A)},[A]),Object(o.useEffect)(function(){if(F){var Ce;(Ce=X)===null||Ce===void 0||Ce.cancel()}},[F]),Object(o.useEffect)(function(){M.uploading&&A.map(function(){var Ce=Object(b.a)(c.a.mark(function Ae(me){var Se,ye;return c.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(!((!me.status||me.status==="error")&&!F)){ee.next=6;break}return me.status="uploading",me.file.status="uploading",ee.next=5,de(me,{login:j==null||((Se=j.userInfo)===null||Se===void 0)?void 0:Se.login,container_type:M.container_type,container_id:M.container_id,description:M.description,realFileName:M.realFileName});case 5:ye=ee.sent;case 6:case"end":return ee.stop()}},Ae)}));return function(Ae){return Ce.apply(this,arguments)}}())},[M.uploading]),n.a.createElement(y,Object(P.a)({},oe,{height:M.height,className:M.className}),n.a.createElement("p",{className:"ant-upload-hint"},M.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};q.b=Object(i.a)(function(S){var C=S.loading,j=S.globalSetting,F=S.user;return{globalSetting:j,loading:C.models.competitions,user:F}})(x)},KmYQ:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(g,T){var N=T*4;g.clamp(),g.sigBytes+=N-(g.sigBytes%N||N)},unpad:function(g){for(var T=g.words,N=g.sigBytes-1,N=g.sigBytes-1;N>=0;N--)if(T[N>>>2]>>>24-N%4*8&255){g.sigBytes=N+1;break}}},P.pad.ZeroPadding})},M8RZ:function(H,q,L){"use strict";L.d(q,"a",function(){return t});var P=L("fWQN"),g=L("mtLc"),T=L("yKVA"),N=L("879j"),v=L("q1tI"),m=L.n(v),w=L("i8i4"),b=L.n(w),t=function(d){Object(T.a)(c,d);var a=Object(N.a)(c);function c(o){var n;Object(P.a)(this,c),n=a.call(this,o);var s=window.document;return n.node=s.createElement("div"),s.body.appendChild(n.node),n}return Object(g.a)(c,[{key:"render",value:function(){var n=this.props.children;return Object(w.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(m.a.Component)},MI8n:function(H,q,L){"use strict";L.d(q,"c",function(){return v}),L.d(q,"b",function(){return t}),L.d(q,"e",function(){return d}),L.d(q,"a",function(){return a}),L.d(q,"d",function(){return c}),L.d(q,"f",function(){return o});var P=L("/cxE"),g=L("pmY6"),T=L("24hK"),N=L("5Y4S"),v;(function(n){n.None=()=>g.a.None;function s(M){return(Y,K=null,A)=>{let W=!1,U;return U=M(D=>W?void 0:(U?U.dispose():W=!0,Y.call(K,D)),null,A),W&&U.dispose(),U}}n.once=s;function h(M,Y){return y((K,A=null,W)=>M(U=>K.call(A,Y(U)),null,W))}n.map=h;function f(M,Y){return y((K,A=null,W)=>M(U=>{Y(U),K.call(A,U)},null,W))}n.forEach=f;function u(M,Y){return y((K,A=null,W)=>M(U=>Y(U)&&K.call(A,U),null,W))}n.filter=u;function i(M){return M}n.signal=i;function r(...M){return(Y,K=null,A)=>Object(g.e)(...M.map(W=>W(U=>Y.call(K,U),null,A)))}n.any=r;function E(M,Y,K){let A=K;return h(M,W=>(A=Y(A,W),A))}n.reduce=E;function y(M){let Y;const K=new t({onFirstListenerAdd(){Y=M(K.fire,K)},onLastListenerRemove(){Y.dispose()}});return K.event}function p(M,Y,K=100,A=!1,W){let U,D,X,ie=0;const oe=new t({leakWarningThreshold:W,onFirstListenerAdd(){U=M(de=>{ie++,D=Y(D,de),A&&!X&&(oe.fire(D),D=void 0),clearTimeout(X),X=setTimeout(()=>{const Ce=D;D=void 0,X=void 0,(!A||ie>1)&&oe.fire(Ce),ie=0},K)})},onLastListenerRemove(){U.dispose()}});return oe.event}n.debounce=p;function R(M,Y=(K,A)=>K===A){let K=!0,A;return u(M,W=>{const U=K||!Y(W,A);return K=!1,A=W,U})}n.latch=R;function O(M,Y){return[n.filter(M,Y),n.filter(M,K=>!Y(K))]}n.split=O;function _(M,Y=!1,K=[]){let A=K.slice(),W=M(X=>{A?A.push(X):D.fire(X)});const U=()=>{A&&A.forEach(X=>D.fire(X)),A=null},D=new t({onFirstListenerAdd(){W||(W=M(X=>D.fire(X)))},onFirstListenerDidAdd(){A&&(Y?setTimeout(U):U())},onLastListenerRemove(){W&&W.dispose(),W=null}});return D.event}n.buffer=_;class x{constructor(M){this.event=M}map(M){return new x(h(this.event,M))}forEach(M){return new x(f(this.event,M))}filter(M){return new x(u(this.event,M))}reduce(M,Y){return new x(E(this.event,M,Y))}latch(){return new x(R(this.event))}debounce(M,Y=100,K=!1,A){return new x(p(this.event,M,Y,K,A))}on(M,Y,K){return this.event(M,Y,K)}once(M,Y,K){return s(this.event)(M,Y,K)}}function S(M){return new x(M)}n.chain=S;function C(M,Y,K=A=>A){const A=(...X)=>D.fire(K(...X)),W=()=>M.on(Y,A),U=()=>M.removeListener(Y,A),D=new t({onFirstListenerAdd:W,onLastListenerRemove:U});return D.event}n.fromNodeEventEmitter=C;function j(M,Y,K=A=>A){const A=(...X)=>D.fire(K(...X)),W=()=>M.addEventListener(Y,A),U=()=>M.removeEventListener(Y,A),D=new t({onFirstListenerAdd:W,onLastListenerRemove:U});return D.event}n.fromDOMEventEmitter=j;function F(M){return new Promise(Y=>s(M)(Y))}n.toPromise=F})(v||(v={}));class m{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${m._idPool++}`}start(n){this._stopWatch=new N.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let w=-1;class b{constructor(n,s=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let s=w;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||n<s)return;this._stacks||(this._stacks=new Map);const h=new Error().stack.split(`
`).slice(3).join(`
`),f=this._stacks.get(h)||0;if(this._stacks.set(h,f+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let u,i=0;for(const[r,E]of this._stacks)(!u||i<E)&&(u=r,i=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${i}):`),console.warn(u)}return()=>{const u=this._stacks.get(h)||0;this._stacks.set(h,u-1)}}}class t{constructor(n){var s;this._disposed=!1,this._options=n,this._leakageMon=w>0?new b(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,s,h)=>{var f;this._listeners||(this._listeners=new T.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(s?[n,s]:n);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,s);const r=(f=this._leakageMon)===null||f===void 0?void 0:f.check(this._listeners.size),E=Object(g.i)(()=>{if(r&&r(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const y=this._listeners&&!this._listeners.isEmpty();y||this._options.onLastListenerRemove(this)}});return h instanceof g.b?h.add(E):Array.isArray(h)&&h.push(E),E}),this._event}fire(n){var s,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new T.a);for(let f of this._listeners)this._deliveryQueue.push([f,n]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[f,u]=this._deliveryQueue.shift();try{typeof f=="function"?f.call(void 0,u):f[0].call(f[1],u)}catch(i){Object(P.f)(i)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var n,s,h,f,u;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(f=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||f===void 0||f.call(h),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class d extends t{constructor(n){super(n);this._isPaused=0,this._eventQueue=new T.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class a extends d{constructor(n){var s;super(n);this._delay=(s=n.delay)!==null&&s!==void 0?s:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class c{constructor(){this.buffers=[]}wrapEvent(n){return(s,h,f)=>n(u=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>s.call(h,u)):s.call(h,u)},void 0,f)}bufferEvents(n){const s=[];this.buffers.push(s);const h=n();return this.buffers.pop(),s.forEach(f=>f()),h}}class o{constructor(){this.listening=!1,this.inputEvent=v.None,this.inputEventListener=g.a.None,this.emitter=new t({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(H,q,L){"use strict";(function(P,g){L.d(q,"b",function(){return h}),L.d(q,"i",function(){return r}),L.d(q,"f",function(){return E}),L.d(q,"d",function(){return y}),L.d(q,"g",function(){return p}),L.d(q,"h",function(){return R}),L.d(q,"c",function(){return O}),L.d(q,"k",function(){return _}),L.d(q,"j",function(){return x}),L.d(q,"a",function(){return S}),L.d(q,"e",function(){return F});var T;const N="en";let v=!1,m=!1,w=!1,b=!1,t=!1,d=!1,a=!1,c,o=N,n,s;const h=typeof self=="object"?self:typeof P=="object"?P:{};let f;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?f=h.vscode.process:typeof g!="undefined"&&(f=g);const u=typeof((T=f==null?void 0:f.versions)===null||T===void 0?void 0:T.electron)=="string"&&f.type==="renderer";if(typeof navigator=="object"&&!u)s=navigator.userAgent,v=s.indexOf("Windows")>=0,m=s.indexOf("Macintosh")>=0,a=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,w=s.indexOf("Linux")>=0,d=!0,c=navigator.language,o=c;else if(typeof f=="object"){v=f.platform==="win32",m=f.platform==="darwin",w=f.platform==="linux",b=w&&!!f.env.SNAP&&!!f.env.SNAP_REVISION,c=N,o=N;const M=f.env.VSCODE_NLS_CONFIG;if(M)try{const Y=JSON.parse(M),K=Y.availableLanguages["*"];c=Y.locale,o=K||N,n=Y._translationsConfigFile}catch(Y){}t=!0}else console.error("Unable to resolve platform.");let i=0;m?i=1:v?i=3:w&&(i=2);const r=v,E=m,y=w,p=t,R=d,O=a,_=s,x=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let K=[];h.addEventListener("message",W=>{if(W.data&&W.data.vscodeSetImmediateId)for(let U=0,D=K.length;U<D;U++){const X=K[U];if(X.id===W.data.vscodeSetImmediateId){K.splice(U,1),X.callback();return}}});let A=0;return W=>{const U=++A;K.push({id:U,callback:W}),h.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(f==null?void 0:f.nextTick)=="function")return f.nextTick.bind(f);const Y=Promise.resolve();return K=>Y.then(K)}(),S=m||a?2:v?1:3;let C=!0,j=!1;function F(){if(!j){j=!0;const M=new Uint8Array(2);M[0]=1,M[1]=2;const Y=new Uint16Array(M.buffer);C=Y[0]===(2<<8)+1}return C}}).call(this,L("IyRk"),L("Q2Ig"))},MlIO:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(g){var T=P,N=T.lib,v=N.Base,m=N.WordArray,w=T.x64={},b=w.Word=v.extend({init:function(d,a){this.high=d,this.low=a}}),t=w.WordArray=v.extend({init:function(d,a){d=this.words=d||[],a!=g?this.sigBytes=a:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,a=d.length,c=[],o=0;o<a;o++){var n=d[o];c.push(n.high),c.push(n.low)}return m.create(c,this.sigBytes)},clone:function(){for(var d=v.clone.call(this),a=d.words=this.words.slice(0),c=a.length,o=0;o<c;o++)a[o]=a[o].clone();return d}})}(),P})},N0LK:function(H,q,L){"use strict";L.d(q,"C",function(){return P}),L.d(q,"v",function(){return T}),L.d(q,"s",function(){return N}),L.d(q,"t",function(){return v}),L.d(q,"U",function(){return m}),L.d(q,"J",function(){return w}),L.d(q,"O",function(){return b}),L.d(q,"p",function(){return t}),L.d(q,"T",function(){return d}),L.d(q,"q",function(){return a}),L.d(q,"N",function(){return c}),L.d(q,"M",function(){return o}),L.d(q,"Q",function(){return n}),L.d(q,"u",function(){return s}),L.d(q,"x",function(){return h}),L.d(q,"I",function(){return f}),L.d(q,"f",function(){return u}),L.d(q,"h",function(){return i}),L.d(q,"g",function(){return r}),L.d(q,"i",function(){return E}),L.d(q,"G",function(){return y}),L.d(q,"H",function(){return p}),L.d(q,"r",function(){return R}),L.d(q,"R",function(){return O}),L.d(q,"d",function(){return _}),L.d(q,"e",function(){return x}),L.d(q,"E",function(){return S}),L.d(q,"F",function(){return C}),L.d(q,"j",function(){return j}),L.d(q,"z",function(){return F}),L.d(q,"K",function(){return Y}),L.d(q,"L",function(){return K}),L.d(q,"m",function(){return W}),L.d(q,"k",function(){return D}),L.d(q,"A",function(){return ie}),L.d(q,"a",function(){return oe}),L.d(q,"n",function(){return de}),L.d(q,"l",function(){return Ce}),L.d(q,"D",function(){return Ae}),L.d(q,"B",function(){return me}),L.d(q,"b",function(){return Se}),L.d(q,"S",function(){return ye}),L.d(q,"o",function(){return se}),L.d(q,"P",function(){return ee}),L.d(q,"w",function(){return B}),L.d(q,"c",function(){return G}),L.d(q,"y",function(){return Z});function P(J){return!J||typeof J!="string"?!0:J.trim().length===0}const g=/{(\d+)}/g;function T(J,...le){return le.length===0?J:J.replace(g,function(ue,we){const Fe=parseInt(we,10);return isNaN(Fe)||Fe<0||Fe>=le.length?ue:le[Fe]})}function N(J){return J.replace(/[<>&]/g,function(le){switch(le){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return le}})}function v(J){return J.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(J,le=" "){const ue=w(J,le);return b(ue,le)}function w(J,le){if(!J||!le)return J;const ue=le.length;if(ue===0||J.length===0)return J;let we=0;for(;J.indexOf(le,we)===we;)we=we+ue;return J.substring(we)}function b(J,le){if(!J||!le)return J;const ue=le.length,we=J.length;if(ue===0||we===0)return J;let Fe=we,Xe=-1;for(;!(Xe=J.lastIndexOf(le,Fe-1),Xe===-1||Xe+ue!==Fe);){if(Xe===0)return"";Fe=Xe}return J.substring(0,Fe)}function t(J){return J.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(J){return J.replace(/\*/g,"")}function a(J,le,ue={}){if(!J)throw new Error("Cannot create regex from empty string");le||(J=v(J)),ue.wholeWord&&(/\B/.test(J.charAt(0))||(J="\\b"+J),/\B/.test(J.charAt(J.length-1))||(J=J+"\\b"));let we="";return ue.global&&(we+="g"),ue.matchCase||(we+="i"),ue.multiline&&(we+="m"),ue.unicode&&(we+="u"),new RegExp(J,we)}function c(J){if(J.source==="^"||J.source==="^$"||J.source==="$"||J.source==="^\\s*$")return!1;const le=J.exec("");return!!(le&&J.lastIndex===0)}function o(J){return(J.global?"g":"")+(J.ignoreCase?"i":"")+(J.multiline?"m":"")+(J.unicode?"u":"")}function n(J){return J.split(/\r\n|\r|\n/)}function s(J){for(let le=0,ue=J.length;le<ue;le++){const we=J.charCodeAt(le);if(we!==32&&we!==9)return le}return-1}function h(J,le=0,ue=J.length){for(let we=le;we<ue;we++){const Fe=J.charCodeAt(we);if(Fe!==32&&Fe!==9)return J.substring(le,we)}return J.substring(le,ue)}function f(J,le=J.length-1){for(let ue=le;ue>=0;ue--){const we=J.charCodeAt(ue);if(we!==32&&we!==9)return ue}return-1}function u(J,le){return J<le?-1:J>le?1:0}function i(J,le,ue=0,we=J.length,Fe=0,Xe=le.length){for(;ue<we&&Fe<Xe;ue++,Fe++){let nt=J.charCodeAt(ue),at=le.charCodeAt(Fe);if(nt<at)return-1;if(nt>at)return 1}const $e=we-ue,et=Xe-Fe;return $e<et?-1:$e>et?1:0}function r(J,le){return E(J,le,0,J.length,0,le.length)}function E(J,le,ue=0,we=J.length,Fe=0,Xe=le.length){for(;ue<we&&Fe<Xe;ue++,Fe++){let nt=J.charCodeAt(ue),at=le.charCodeAt(Fe);if(nt===at)continue;if(nt>=128||at>=128)return i(J.toLowerCase(),le.toLowerCase(),ue,we,Fe,Xe);y(nt)&&(nt-=32),y(at)&&(at-=32);const Be=nt-at;if(Be===0)continue;return Be}const $e=we-ue,et=Xe-Fe;return $e<et?-1:$e>et?1:0}function y(J){return J>=97&&J<=122}function p(J){return J>=65&&J<=90}function R(J,le){return J.length===le.length&&E(J,le)===0}function O(J,le){const ue=le.length;return le.length>J.length?!1:E(J,le,0,ue)===0}function _(J,le){let ue,we=Math.min(J.length,le.length);for(ue=0;ue<we;ue++)if(J.charCodeAt(ue)!==le.charCodeAt(ue))return ue;return we}function x(J,le){let ue,we=Math.min(J.length,le.length);const Fe=J.length-1,Xe=le.length-1;for(ue=0;ue<we;ue++)if(J.charCodeAt(Fe-ue)!==le.charCodeAt(Xe-ue))return ue;return we}function S(J){return 55296<=J&&J<=56319}function C(J){return 56320<=J&&J<=57343}function j(J,le){return(J-55296<<10)+(le-56320)+65536}function F(J,le,ue){const we=J.charCodeAt(ue);if(S(we)&&ue+1<le){const Fe=J.charCodeAt(ue+1);if(C(Fe))return j(we,Fe)}return we}function M(J,le){const ue=J.charCodeAt(le-1);if(C(ue)&&le>1){const we=J.charCodeAt(le-2);if(S(we))return j(we,ue)}return ue}function Y(J,le){const ue=V.getInstance(),we=le,Fe=J.length,Xe=F(J,Fe,le);le+=Xe>=65536?2:1;let $e=ue.getGraphemeBreakType(Xe);for(;le<Fe;){const et=F(J,Fe,le),nt=ue.getGraphemeBreakType(et);if(G($e,nt))break;le+=et>=65536?2:1,$e=nt}return le-we}function K(J,le){const ue=V.getInstance(),we=le,Fe=M(J,le);le-=Fe>=65536?2:1;let Xe=ue.getGraphemeBreakType(Fe);for(;le>0;){const $e=M(J,le),et=ue.getGraphemeBreakType($e);if(G(et,Xe))break;le-=$e>=65536?2:1,Xe=et}return we-le}const A=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function W(J){return A.test(J)}const U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function D(J){return U.test(J)}const X=/^[\t\n\r\x20-\x7E]*$/;function ie(J){return X.test(J)}const oe=/[\u2028\u2029]/;function de(J){return oe.test(J)}function Ce(J){for(let le=0,ue=J.length;le<ue;le++)if(Ae(J.charCodeAt(le)))return!0;return!1}function Ae(J){return J=+J,J>=11904&&J<=55215||J>=63744&&J<=64255||J>=65281&&J<=65374}function me(J){return J>=127462&&J<=127487||J===8986||J===8987||J===9200||J===9203||J>=9728&&J<=10175||J===11088||J===11093||J>=127744&&J<=128591||J>=128640&&J<=128764||J>=128992&&J<=129003||J>=129280&&J<=129535||J>=129648&&J<=129750}const Se=String.fromCharCode(65279);function ye(J){return!!(J&&J.length>0&&J.charCodeAt(0)===65279)}function se(J,le=!1){return J?(le&&(J=J.replace(/\\./g,"")),J.toLowerCase()!==J):!1}function ee(J){const le=90-65+1;return J=J%(2*le),J<le?String.fromCharCode(97+J):String.fromCharCode(65+J-le)}function B(J){const le=V.getInstance();return le.getGraphemeBreakType(J)}function G(J,le){return J===0?le!==5&&le!==7:J===2&&le===3?!1:J===4||J===2||J===3||(le===4||le===2||le===3)?!0:J===8&&(le===8||le===9||le===11||le===12)||((J===11||J===9)&&(le===9||le===10)||((J===12||J===10)&&le===10||(le===5||le===13||(le===7||(J===1||J===13&&le===14)))))?!1:!(J===6&&le===6)}class V{constructor(){this._data=Q()}static getInstance(){return V._INSTANCE||(V._INSTANCE=new V),V._INSTANCE}getGraphemeBreakType(J){if(J<32)return J===10?3:J===13?2:4;if(J<127)return 0;const le=this._data,ue=le.length/3;let we=1;for(;we<=ue;)if(J<le[3*we])we=2*we;else if(J>le[3*we+1])we=2*we+1;else return le[3*we+2];return 0}}V._INSTANCE=null;function Q(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Z(J,le){if(J===0)return 0;const ue=ne(J,le);if(ue!==void 0)return ue;const we=M(le,J);return J-=re(we),J}function ne(J,le){let ue=M(le,J);for(J-=re(ue);$(ue)||ue===65039||ue===8419;){if(J===0)return;ue=M(le,J),J-=re(ue)}if(!me(ue))return;if(J>=0){const we=M(le,J);we===8205&&(J-=re(we))}return J}function re(J){return J>=65536?2:1}function $(J){return 127995<=J&&J<=127999}},NFKh:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("MlIO"),L("F+F2"),L("qM6L"),L("ETIr"),L("wbyO"),L("cv67"),L("3y9D"),L("lPiR"),L("GRuw"),L("1uat"),L("uGsb"),L("5hvy"),L("ELcG"),L("WYAk"),L("e7zE"),L("K3mO"),L("OLod"),L("ALsQ"),L("9OqN"),L("qu8F"),L("S6kV"),L("gb/T"),L("qBft"),L("oRuE"),L("jO9C"),L("KmYQ"),L("uGxW"),L("bQjk"),L("wZgz"),L("pA7S"),L("w7YG"),L("E4JC"),L("PVpz"))})(this,function(P){return P})},NLgs:function(H,q,L){"use strict";L.d(q,"e",function(){return f}),L.d(q,"f",function(){return u}),L.d(q,"d",function(){return r}),L.d(q,"c",function(){return E}),L.d(q,"a",function(){return y}),L.d(q,"b",function(){return p});var P=L("miYZ"),g=L("tsqr"),T=L("9og8"),N=L("2qtc"),v=L("kLXV"),m=L("WmNS"),w=L.n(m),b=L("q1tI"),t=L.n(b),d=L("9kvl"),a=L("xKgJ"),c=L("1vsH"),o=L("RCxd"),n=L("yTi+"),s=L.n(n),h=L("m3rI"),f=function(O){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(u(O)&&i(_))},u=function(O){return Object(a.p)()?!0:(O({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},i=function(){var O,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,x=Object(d.c)()._store.getState(),S=x.user;return(O=S.userInfo)!==null&&O!==void 0&&O.profile_completed?!0:(v.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:_?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){d.d.push("/account/profile/edit")}}),!1)},r=function(){var O,_=Object(d.c)()._store.getState(),x=_.user;return(O=x.userInfo)!==null&&O!==void 0&&O.professional_certification?!0:(v.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(c.S)("/account/certification")}}),!1)},E=function(){var O;if(Object(a.a)())return!0;var _=Object(d.c)()._store.getState(),x=_.user,S=_.globalSetting;return v.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:h.a.IMG_SERVER+(S==null||((O=S.setting)===null||O===void 0)?void 0:O.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},y=function(O,_){var x;if(O)return!0;var S=Object(d.c)()._store.getState(),C=S.user,j=S.globalSetting;return v.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,_||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),t.a.createElement("div",{style:{marginLeft:"110px"}},t.a.createElement("img",{src:h.a.IMG_SERVER+(j==null||((x=j.setting)===null||x===void 0)?void 0:x.authority_qrcode_url),width:200}),t.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},p=function(O){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",x=Object(d.c)()._store.getState(),S=x.shixunsDetail.detail;return(S==null?void 0:S.public)===2||(S==null?void 0:S.public)===1||(S==null?void 0:S.shixun_status)===3?(v.a.info({centered:!0,icon:t.a.createElement(o.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(S==null?void 0:S.public)===2?"\u5DF2\u516C\u5F00":(S==null?void 0:S.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",_,"\u3002"),t.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),t.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:s.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(S==null?void 0:S.shixun_status)===2?(v.a.confirm({centered:!0,icon:t.a.createElement(o.a,null),title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",_,"\u3002"),t.a.createElement("br",null),t.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){v.a.confirm({width:440,centered:!0,icon:t.a.createElement(o.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 j=Object(T.a)(w.a.mark(function M(){var Y;return w.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,O({type:"shixunsDetail/cancelRelease",payload:{id:S==null?void 0:S.identifier}});case 2:Y=A.sent,Y.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),O({type:"shixunsDetail/getShixunsDetail",payload:{id:S==null?void 0:S.identifier}}),O({type:"practiceSetting/getCommonData",payload:{id:S==null?void 0:S.identifier}}));case 4:case"end":return A.stop()}},M)}));function F(){return j.apply(this,arguments)}return F}()})}}),!0):!1}},NnUe:function(H,q,L){H.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(H,q,L){"use strict";L.d(q,"a",function(){return m});var P=L("Kwbf");function g(w,b){var t=new Set;return w.forEach(function(d){b.has(d)||t.add(d)}),t}function T(w){var b=w||{},t=b.disabled,d=b.disableCheckbox,a=b.checkable;return!!(t||d)||a===!1}function N(w,b,t,d){for(var a=new Set(w),c=new Set,o=0;o<=t;o+=1){var n=b.get(o)||new Set;n.forEach(function(u){var i=u.key,r=u.node,E=u.children,y=E===void 0?[]:E;a.has(i)&&!d(r)&&y.filter(function(p){return!d(p.node)}).forEach(function(p){a.add(p.key)})})}for(var s=new Set,h=t;h>=0;h-=1){var f=b.get(h)||new Set;f.forEach(function(u){var i=u.parent,r=u.node;if(d(r)||!u.parent||s.has(u.parent.key))return;if(d(u.parent.node)){s.add(i.key);return}var E=!0,y=!1;(i.children||[]).filter(function(p){return!d(p.node)}).forEach(function(p){var R=p.key,O=a.has(R);E&&!O&&(E=!1),!y&&(O||c.has(R))&&(y=!0)}),E&&a.add(i.key),y&&c.add(i.key),s.add(i.key)})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(g(c,a))}}function v(w,b,t,d,a){for(var c=new Set(w),o=new Set(b),n=0;n<=d;n+=1){var s=t.get(n)||new Set;s.forEach(function(i){var r=i.key,E=i.node,y=i.children,p=y===void 0?[]:y;!c.has(r)&&!o.has(r)&&!a(E)&&p.filter(function(R){return!a(R.node)}).forEach(function(R){c.delete(R.key)})})}o=new Set;for(var h=new Set,f=d;f>=0;f-=1){var u=t.get(f)||new Set;u.forEach(function(i){var r=i.parent,E=i.node;if(a(E)||!i.parent||h.has(i.parent.key))return;if(a(i.parent.node)){h.add(r.key);return}var y=!0,p=!1;(r.children||[]).filter(function(R){return!a(R.node)}).forEach(function(R){var O=R.key,_=c.has(O);y&&!_&&(y=!1),!p&&(_||o.has(O))&&(p=!0)}),y||c.delete(r.key),p&&o.add(r.key),h.add(r.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(o,c))}}function m(w,b,t,d){var a=[],c;d?c=d:c=T;var o=new Set(w.filter(function(f){var u=!!t[f];return u||a.push(f),u})),n=new Map,s=0;Object.keys(t).forEach(function(f){var u=t[f],i=u.level,r=n.get(i);r||(r=new Set,n.set(i,r)),r.add(u),s=Math.max(s,i)}),Object(P.a)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(f){return"'".concat(f,"'")}).join(", ")));var h;return b===!0?h=N(o,n,s,c):h=v(o,b.halfCheckedKeys,n,s,c),h}},OLod:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("K3mO"))})(this,function(P){P.lib.Cipher||function(g){var T=P,N=T.lib,v=N.Base,m=N.WordArray,w=N.BufferedBlockAlgorithm,b=T.enc,t=b.Utf8,d=b.Base64,a=T.algo,c=a.EvpKDF,o=N.Cipher=w.extend({cfg:v.extend(),createEncryptor:function(S,C){return this.create(this._ENC_XFORM_MODE,S,C)},createDecryptor:function(S,C){return this.create(this._DEC_XFORM_MODE,S,C)},init:function(S,C,j){this.cfg=this.cfg.extend(j),this._xformMode=S,this._key=C,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){S&&this._append(S);var C=this._doFinalize();return C},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function S(C){return typeof C=="string"?x:R}return function(C){return{encrypt:function(j,F,M){return S(F).encrypt(C,j,F,M)},decrypt:function(j,F,M){return S(F).decrypt(C,j,F,M)}}}}()}),n=N.StreamCipher=o.extend({_doFinalize:function(){var S=this._process(!0);return S},blockSize:1}),s=T.mode={},h=N.BlockCipherMode=v.extend({createEncryptor:function(S,C){return this.Encryptor.create(S,C)},createDecryptor:function(S,C){return this.Decryptor.create(S,C)},init:function(S,C){this._cipher=S,this._iv=C}}),f=s.CBC=function(){var S=h.extend();S.Encryptor=S.extend({processBlock:function(j,F){var M=this._cipher,Y=M.blockSize;C.call(this,j,F,Y),M.encryptBlock(j,F),this._prevBlock=j.slice(F,F+Y)}}),S.Decryptor=S.extend({processBlock:function(j,F){var M=this._cipher,Y=M.blockSize,K=j.slice(F,F+Y);M.decryptBlock(j,F),C.call(this,j,F,Y),this._prevBlock=K}});function C(j,F,M){var Y,K=this._iv;K?(Y=K,this._iv=g):Y=this._prevBlock;for(var A=0;A<M;A++)j[F+A]^=Y[A]}return S}(),u=T.pad={},i=u.Pkcs7={pad:function(S,C){for(var j=C*4,F=j-S.sigBytes%j,M=F<<24|F<<16|F<<8|F,Y=[],K=0;K<F;K+=4)Y.push(M);var A=m.create(Y,F);S.concat(A)},unpad:function(S){var C=S.words[S.sigBytes-1>>>2]&255;S.sigBytes-=C}},r=N.BlockCipher=o.extend({cfg:o.cfg.extend({mode:f,padding:i}),reset:function(){var S;o.reset.call(this);var C=this.cfg,j=C.iv,F=C.mode;this._xformMode==this._ENC_XFORM_MODE?S=F.createEncryptor:(S=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==S?this._mode.init(this,j&&j.words):(this._mode=S.call(F,this,j&&j.words),this._mode.__creator=S)},_doProcessBlock:function(S,C){this._mode.processBlock(S,C)},_doFinalize:function(){var S,C=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(C.pad(this._data,this.blockSize),S=this._process(!0)):(S=this._process(!0),C.unpad(S)),S},blockSize:128/32}),E=N.CipherParams=v.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),y=T.format={},p=y.OpenSSL={stringify:function(S){var C,j=S.ciphertext,F=S.salt;return F?C=m.create([1398893684,1701076831]).concat(F).concat(j):C=j,C.toString(d)},parse:function(S){var C,j=d.parse(S),F=j.words;return F[0]==1398893684&&F[1]==1701076831&&(C=m.create(F.slice(2,4)),F.splice(0,4),j.sigBytes-=16),E.create({ciphertext:j,salt:C})}},R=N.SerializableCipher=v.extend({cfg:v.extend({format:p}),encrypt:function(S,C,j,F){F=this.cfg.extend(F);var M=S.createEncryptor(j,F),Y=M.finalize(C),K=M.cfg;return E.create({ciphertext:Y,key:j,iv:K.iv,algorithm:S,mode:K.mode,padding:K.padding,blockSize:S.blockSize,formatter:F.format})},decrypt:function(S,C,j,F){F=this.cfg.extend(F),C=this._parse(C,F.format);var M=S.createDecryptor(j,F).finalize(C.ciphertext);return M},_parse:function(S,C){return typeof S=="string"?C.parse(S,this):S}}),O=T.kdf={},_=O.OpenSSL={execute:function(S,C,j,F){F||(F=m.random(64/8));var M=c.create({keySize:C+j}).compute(S,F),Y=m.create(M.words.slice(C),j*4);return M.sigBytes=C*4,E.create({key:M,iv:Y,salt:F})}},x=N.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:_}),encrypt:function(S,C,j,F){F=this.cfg.extend(F);var M=F.kdf.execute(j,S.keySize,S.ivSize);F.iv=M.iv;var Y=R.encrypt.call(this,S,C,M.key,F);return Y.mixIn(M),Y},decrypt:function(S,C,j,F){F=this.cfg.extend(F),C=this._parse(C,F.format);var M=F.kdf.execute(j,S.keySize,S.ivSize,C.salt);F.iv=M.iv;var Y=R.decrypt.call(this,S,C,M.key,F);return Y}})}()})},OZM5:function(H,q,L){"use strict";L.d(q,"b",function(){return d}),L.d(q,"a",function(){return a}),L.d(q,"k",function(){return c}),L.d(q,"h",function(){return o}),L.d(q,"i",function(){return n}),L.d(q,"g",function(){return s}),L.d(q,"c",function(){return h}),L.d(q,"d",function(){return f}),L.d(q,"j",function(){return r}),L.d(q,"e",function(){return E}),L.d(q,"f",function(){return y});var P=L("KQm4"),g=L("U8pU"),T=L("Ff2n"),N=L("q1tI"),v=L.n(N),m=L("Kwbf"),w=L("WaYH"),b=.25,t=2;function d(p,R){var O=p.slice(),_=O.indexOf(R);return _>=0&&O.splice(_,1),O}function a(p,R){var O=p.slice();return O.indexOf(R)===-1&&O.push(R),O}function c(p){return p.split("-")}function o(p,R){return"".concat(p,"-").concat(R)}function n(p){return p&&p.type&&p.type.isTreeNode}function s(p,R){var O=[p],_=R[p];function x(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];S.forEach(function(C){var j=C.key,F=C.children;O.push(j),x(F)})}return x(_.children),O}function h(p,R){var O=p.clientY,_=R.selectHandle.getBoundingClientRect(),x=_.top,S=_.bottom,C=_.height,j=Math.max(C*b,t);return O<=x+j?-1:O>=S-j?1:0}function f(p,R){if(!p)return;var O=R.multiple;return O?p.slice():p.length?[p[0]]:p}var u=function(R){return R};function i(p,R){if(!p)return[];var O=R||{},_=O.processProps,x=_===void 0?u:_,S=Array.isArray(p)?p:[p];return S.map(function(C){var j=C.children,F=Object(T.a)(C,["children"]),M=i(j,R);return v.a.createElement(w.a,Object.assign({},x(F)),M)})}function r(p){if(!p)return null;var R;if(Array.isArray(p))R={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")R={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function E(p,R){var O=new Set;function _(x){if(O.has(x))return;var S=R[x];if(!S)return;O.add(x);var C=S.parent,j=S.node;if(j.disabled)return;C&&_(C.key)}return(p||[]).forEach(function(x){_(x)}),Object(P.a)(O)}function y(p){var R={};return Object.keys(p).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(R[O]=p[O])}),R}},Ot1p:function(H,q,L){"use strict";var P=L("2qtc"),g=L("kLXV"),T=L("rAM+"),N=L("miYZ"),v=L("tsqr"),m=L("9og8"),w=L("tJVT"),b=L("jrin"),t=L("WmNS"),d=L.n(t),a=L("q1tI"),c=L.n(a),o=L("VrN/"),n=L.n(o),s=L("bdgK"),h=L("p77/"),f=L("Bd2K"),u=L("ELLl"),i=L("19Vz"),r=L("lZu9"),E=L("+NIl"),y=L("kSUc"),p=L("9Bee"),R=function(Pe){var Ke=Pe.value,it=Ke===void 0?"":Ke,st=Pe.className,Ot=Pe.showTextOnly,Rt=Pe.showLines,sr=Pe.style,Zt=sr===void 0?{}:sr,wt=Object(a.useMemo)(function(){return""},[it]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:wt}}))},O=L("0Owb"),_=L("dejd"),x=L("C+DQ"),S=L("1vsH"),C=L("m3rI"),j=[{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 F(Pe){var Ke=Pe.onActionCallback,it=Pe.title,st=Pe.icon,Ot=Pe.actionName,Rt=Pe.className,sr=Rt===void 0?"":Rt,Zt=Pe.children;function wt(){Ke(Ot)}return c.a.createElement("a",{title:it,className:sr,onClick:wt},c.a.createElement("i",{className:"md-iconfont ".concat(st)}),Zt)}var M=function(Pe){var Ke=Pe.watch,it=Pe.showNullButton,st=Pe.onActionCallback,Ot=Pe.fullScreen,Rt=Pe.insertTemp,sr=Pe.hidetoolBar,Zt=Pe.uuid,wt=Pe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(S.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(S.F)("_educoder_session"),"&key=").concat(Zt,"&api=").concat(encodeURIComponent(C.a.PROXY_SERVER)));var Br=[].concat(j,[{title:"".concat(Ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ke?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!sr&&Br.map(function(Nr,jr){return c.a.createElement("li",{key:jr},Nr.actionName?c.a.createElement(F,Object(O.a)({},Nr,{onActionCallback:st})):c.a.createElement("span",{className:"v-line"}))}),it?c.a.createElement("li",null,c.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:st},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Rt&&c.a.createElement("li",null,c.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Rt),onActionCallback:st},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(F,{icon:"".concat(Ot?"icon-shrink":"icon-enlarge"),title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:st})))},Y=L("M8RZ"),K=L("+L6B"),A=L("2/Rp"),W=L("y8nQ"),U=L("Vl3Y"),D=L("5NDa"),X=L("5rEg"),ie={labelCol:{span:4},wrapperCol:{span:20}},oe=function(Pe){var Ke=Pe.callback,it=Pe.onCancel;function st(Ot){Ke(Ot)}return c.a.createElement(U.a,Object(O.a)({},ie,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:st}),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(X.a,null)),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(X.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:it},"\u53D6\u6D88")))},de=L("7ahc"),Ce=L("HmJG"),Ae=L("BjJ7"),me=U.a.useForm,Se={width:280,marginRight:10},ye={labelCol:{span:5},wrapperCol:{span:19}},se=function(Pe){var Ke=Pe.callback,it=Pe.onCancel,st=me(),Ot=Object(w.a)(st,1),Rt=Ot[0];function sr(Br){Ke(Br)}function Zt(Br,Nr){if(Br.status===-1){v.b.error(Br.message);return}Rt.setFieldsValue({src:"/api/attachments/".concat(Br.id),type:Nr.type})}function wt(Br){var Nr=Br.target.files[0];B(Nr,Zt)}return c.a.createElement(U.a,Object(O.a)({form:Rt},ye,{className:"upload-image-panel",onFinish:sr}),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},c.a.createElement(X.a,{style:Se})),c.a.createElement(ee,{onFileChange:wt}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(X.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:it},"\u53D6\u6D88")))};function ee(Pe){var Ke=Pe.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:Ke}))}function B(Pe,Ke){if(!Pe)throw new String("\u6CA1\u6709\u6587\u4EF6");var it=new FormData;it.append("editormd-image-file",Pe),it.append("file_param_name","editormd-image-file"),it.append("byxhr","true");var st=new window.XMLHttpRequest;st.withCredentials=!0,st.addEventListener("load",function(Ot){Ke(JSON.parse(Ot.target.responseText),Pe)},!1),st.addEventListener("error",function(Ot){console.error(Ot)},!1),st.open("POST","".concat(Ae.a,"/api/attachments.json")),st.send(it)}var G=L("giR+"),V=L("fyUT"),Q=L("7Kak"),Z=L("9yH6"),ne=Z.a.Group,re={margin:"0 8px"},$=function(Pe){var Ke=Pe.callback,it=Pe.onCancel;function st(Ot){Ke(Ot)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:st},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:re},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:re},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(V.a,null)),c.a.createElement("span",{style:re},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(V.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(ne,null,c.a.createElement(Z.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Z.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Z.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Z.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:it},"\u53D6\u6D88")))},J=L("ErOA"),le=L("7Cbv"),ue="link",we="upload-image",Fe="code-block",Xe="add-table",$e="------------",et={default:$e,left:":".concat($e),center:":".concat($e,":"),right:"".concat($e,":")},nt=L("9VGf"),at,Be;function Ie(){}var rt=0,lt=1e4,_e="\u2581",ce=`
**\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 fe(Pe){return/^\d+$/.test(Pe)?"".concat(Pe,"px"):Pe}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,Oe=ve?"Cmd":"Ctrl",ge=["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"],Ee=(at={},Object(b.a)(at,Oe+"-B","bold"),Object(b.a)(at,Oe+"-I","italic"),at),Re=(Be={},Object(b.a)(Be,ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Be,Fe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Be,we,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Be,Xe,"\u6DFB\u52A0\u8868\u683C"),Be),Le=q.a=function(Pe){var Ke=Pe.defaultValue,it=Ke===void 0?"":Ke,st=Pe.onChange,Ot=Pe.width,Rt=Ot===void 0?"100%":Ot,sr=Pe.height,Zt=sr===void 0?400:sr,wt=Pe.miniToolbar,Br=wt===void 0?!1:wt,Nr=Pe.isFocus,jr=Nr===void 0?!1:Nr,cn=Pe.watch,xr=Pe.insertTemp,an=Pe.mode,tn=an===void 0?"markdown":an,Ir=Pe.id,hn=Ir===void 0?"markdown-editor-id":Ir,lr=Pe.showResizeBar,Cr=lr===void 0?!1:lr,gr=Pe.noStorage,xn=gr===void 0?!1:gr,Wn=Pe.showNullButton,gn=Wn===void 0?!1:Wn,Bt=Pe.hidetoolBar,Kr=Bt===void 0?!1:Bt,rn=Pe.fullScreen,Or=rn===void 0?!1:rn,Lr=Pe.onBlur,Wr=Pe.onCMBeforeChange,jn=Pe.onFullScreen,yn=Pe.className,St=yn===void 0?"":yn,ur=Pe.disablePaste,oi=ur===void 0?!1:ur,wi=Pe.placeholder,Pi=wi===void 0?"":wi,vi=Pe.values,Un=vi===void 0?"":vi,wr=Object(a.useState)(null),si=Object(w.a)(wr,2),It=si[0],Zn=si[1],Bn=Object(a.useState)(it),zi=Object(w.a)(Bn,2),Ti=zi[0],ri=zi[1],Qi=Object(a.useState)(cn),Zi=Object(w.a)(Qi,2),li=Zi[0],In=Zi[1],ui=Object(a.useState)(Or),Mi=Object(w.a)(ui,2),yi=Mi[0],bi=Mi[1],Da=Object(a.useState)(""),Vi=Object(w.a)(Da,2),zn=Vi[0],Gi=Vi[1],_a=Object(a.useState)(0),Ni=Object(w.a)(_a,2),ci=Ni[0],oa=Ni[1],pa=Object(a.useState)(Zt),sa=Object(w.a)(pa,2),ma=sa[0],qi=sa[1],Si=Object(a.useState)(!1),ea=Object(w.a)(Si,2),Ea=ea[0],mt=ea[1],qe=Object(a.useRef)(Object(le.a)()),pt=Object(a.useRef)(!1),_t=Object(a.useRef)(),Ut=Object(a.useRef)(),Dt=Object(a.useRef)(),Vt=Object(a.useRef)(),Pt=Object(a.useRef)(),ut=function(){var ht=Object(m.a)(d.a.mark(function bt(){var ft,Tt;return d.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,Object(J.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:qe.current}});case 2:Tt=rr.sent,Tt!=null&&(ft=Tt.attachments)!==null&&ft!==void 0&&ft.length&&(console.log("cm:",It,Ut),Tt.attachments.map(function(Gt){Gt.content_type.indexOf("image")>-1?It.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):Gt.content_type.indexOf("video")>-1?It.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Gt.content_type.indexOf("pdf")>-1?It.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,'&disposition=inline" target="_blank">').concat(Gt.name,"</a>")):It.replaceSelection("[".concat(Gt.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}));case 4:case"end":return rr.stop()}},bt)}));return function(){return ht.apply(this,arguments)}}();Object(a.useEffect)(function(){ri(Un),It==null||It.setValue(Un)},[Un]),Object(a.useEffect)(function(){jn==null||jn(yi)},[yi]),Object(a.useEffect)(function(){if(Ut.current){var ht=n.a.fromTextArea(Ut.current,{mode:tn,lineNumbers:!Br,lineWrapping:!0,value:it,autoCloseTags:!0,autoCloseBrackets:!0});jr&&ht.focus();function bt(ft,Tt){if(oi){Tt.preventDefault();return}var zt=Tt.clipboardData;if(zt){var rr=zt.types.toString(),Gt=zt.items;if(rr==="Files"||zt.types.indexOf("Files")>-1){if(Tt.preventDefault(),tn=="stex")return;try{var yr,kr=Gt[1];((yr=Gt[0])===null||yr===void 0?void 0:yr.kind)==="file"&&(kr=Gt[0]);var or=kr.getAsFile(),Qe=or.name.split(".").pop();B(or,function(kt){if(kt.id){var Zr,Vr,nr;(or==null||((Zr=or.type)===null||Zr===void 0)?void 0:Zr.indexOf("image"))>-1?ht.replaceSelection("![,](/api/attachments/".concat(kt.id,"?type=").concat(kt.content_type,")")):(or==null||((Vr=or.type)===null||Vr===void 0)?void 0:Vr.indexOf("video"))>-1?ht.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,'"></video>')):(or==null||((nr=or.type)===null||nr===void 0)?void 0:nr.indexOf("pdf"))>-1?ht.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(or.type,'&disposition=inline" target="_blank">').concat(or.name,"</a>")):ge.includes(Qe)?ht.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,'?type=office&disposition=inline" target="_blank">').concat(or.name,"</a>")):ht.replaceSelection("[".concat(or.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(kt.content_type,")"))}else(kt==null?void 0:kt.status)===401&&(document.location.href="/user/login")})}catch(kt){v.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ht.on("paste",bt),ht.on("dragleave",function(ft,Tt){Dt.current.classList.remove("mouse-hover-md")}),ht.on("dragover",function(ft,Tt){Dt.current.classList.add("mouse-hover-md")}),ht.on("drop",function(ft,Tt){Dt.current.classList.add("mouse-hover-md");var zt;if(zt=Tt.dataTransfer.files,zt.length>0){Tt.preventDefault(),Tt.stopPropagation();for(var rr=function(kr){var or=zt[kr],Qe=or.name.split(".").pop();B(or,function(kt){if(kt.id){var Zr,Vr,nr;(or==null||((Zr=or.type)===null||Zr===void 0)?void 0:Zr.indexOf("image"))>-1?ht.replaceSelection("![,](/api/attachments/".concat(kt.id,"?type=").concat(kt.content_type,")")):(or==null||((Vr=or.type)===null||Vr===void 0)?void 0:Vr.indexOf("video"))>-1?ht.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,'"></video>')):(or==null||((nr=or.type)===null||nr===void 0)?void 0:nr.indexOf("pdf"))>-1?ht.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(or.type,'&disposition=inline" target="_blank">').concat(or.name,"</a>")):ge.includes(Qe)?ht.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,'?type=office&disposition=inline" target="_blank">').concat(or.name,"</a>")):ht.replaceSelection("[".concat(or.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(kt.content_type,")"))}else(kt==null?void 0:kt.status)===401&&(document.location.href="/user/login")})},Gt=0;Gt<zt.length;Gt++)rr(Gt)}}),Zn(ht),function(){ht.off("paste",bt)}}},[]);var vt=Object(a.useCallback)(function(){if(Dt.current)try{}catch(ht){console.log(ht,"---- to set md editor body height")}},[ma,Dt,yi]);Object(a.useEffect)(function(){function ht(){var ft=new s.default(function(Tt){var zt=Object(T.a)(Tt),rr;try{for(zt.s();!(rr=zt.n()).done;){var Gt=rr.value;(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&(vt(),It.setSize("100%","100%"),It.refresh())}}catch(yr){zt.e(yr)}finally{zt.f()}});return ft.observe(Ut.current.parentElement),ft}if(It){var bt=ht();return function(){bt.unobserve(Ut.current.parentElement)}}},[It,vt]),Object(a.useEffect)(function(){if(It){for(var ht=[],bt=function(){var Gt=Tt[ft];zt=Object(w.a)(Gt,2);var yr=zt[0],kr=zt[1],or=Object(b.a)({},yr,function(){yt(kr)});ht.push(or),It.addKeyMap(or)},ft=0,Tt=Object.entries(Ee);ft<Tt.length;ft++){var zt;bt()}return _t.current=setInterval(function(){pt.current&&ut()},4e3),function(){clearInterval(_t.current);var rr=Object(T.a)(ht),Gt;try{for(rr.s();!(Gt=rr.n()).done;){var yr=Gt.value;It.removeKeyMap(yr)}}catch(kr){rr.e(kr)}finally{rr.f()}}}},[It]),Object(a.useEffect)(function(){Or!==yi&&bi(Or)},[Or]),Object(nt.a)(function(){if(!xn&&ci>0){var ht=new Date().getTime(),bt=window.sessionStorage.getItem(hn);ht>=ci+lt&&(!bt||bt!==Ti)&&(window.sessionStorage.setItem(hn,Ti),mt(!0))}},lt),Object(a.useEffect)(function(){In(cn)},[It,cn]),Object(a.useEffect)(function(){It&&(jr&&It.focus())},[It,jr]),Object(a.useEffect)(function(){if(li&&It){var ht=It.getScrollerElement();function bt(ft){var Tt=ft.target;if(Pt.current){var zt=Tt.scrollTop/Tt.scrollHeight;Pt.current.scrollTop=Pt.current.scrollHeight*zt}}return ht.addEventListener("scroll",bt),function(){ht.removeEventListener("scroll",bt)}}},[It,li]),Object(a.useEffect)(function(){if(It&&Wr){function ht(bt,ft){Wr(bt,ft)}return It.on("beforeChange",ht),function(){It.off("beforeChange",ht)}}},[It,Wr]),Object(a.useEffect)(function(){if(It&&Lr){function ht(){Lr(It.getValue())}return It.on("blur",ht),function(){It.off("blur",ht)}}},[It,Lr]),Object(a.useEffect)(function(){if(It){function ht(bt){var ft=bt.getValue();ri(ft),oa(new Date().getTime()),bt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),st&&st(ft)}return It.on("change",ht),function(){It.off("change",ht)}}},[It,st]),Object(a.useEffect)(function(){It&&(it==null?(It.setValue(""),ri("")):it!==It.getValue()&&(It.setValue(it),ri(it),It.setCursor(It.lineCount(),0)))},[It,it]);var yt=Object(a.useCallback)(function(ht){var bt=It.getCursor(),ft=It.getSelection(),Tt=ft.split(`
`);switch(ht){case"bold":return It.replaceSelection("**"+ft+"**"),ft===""&&It.setCursor(bt.line,bt.ch+2),It.focus();case"italic":return It.replaceSelection("*"+ft+"*"),ft===""&&It.setCursor(bt.line,bt.ch+1),It.focus();case"code":return It.replaceSelection("`"+ft+"`"),ft===""&&It.setCursor(bt.line,bt.ch+1),It.focus();case"inline-latex":return It.replaceSelection("`$$"+ft+"$$`"),ft===""&&It.setCursor(bt.line,bt.ch+3),It.focus();case"latex":return It.replaceSelection("```latex\n"+ft+"\n```"),It.setCursor(bt.line+1,ft.length+1),It.focus();case"line-break":return It.replaceSelection(`<br/>
`),It.focus();case"list-ul":return ft===""?It.replaceSelection("- "+ft):It.replaceSelection(Tt.map(function(zt){return zt===""?"":"- ".concat(zt)}).join(`
`)),It.focus();case"list-ol":return ft===""?It.replaceSelection("1. "+ft):It.replaceSelection(Tt.map(function(zt,rr){return zt===""?"":"".concat(rr+1,". ").concat(zt)}).join(`
`)),It.focus();case"add-null-ch":return ft===""&&It.setCursor(bt.line,bt.ch+1),It.replaceSelection(_e),It.focus();case"inster-template-1":return ft===""&&It.setCursor(bt.line,bt.ch),It.replaceSelection(ce),It.focus();case"eraser":return It.setValue(""),It.focus();case"trigger-watch":return In(!li),It.focus();case"trigger-full-screen":return bi(!yi),It.focus();case ue:Gi(ue);return;case Fe:Gi(Fe);return;case we:Gi(we);return;case Xe:Gi(Xe);return;default:throw new Error}},[It,li,yi]),tr=Object(a.useCallback)(function(ht){Gi("");switch(zn){case ue:var bt=ht.title,ft=ht.link;return It.replaceSelection("[".concat(bt,"](").concat(ft,")")),It.focus();case Fe:var Tt=ht.language,zt=ht.content;return It.replaceSelection(["```"+Tt,zt,"```"].join(`
`)),It.focus();case we:var rr=ht.src,Gt=ht.alt;return Gt?It.replaceSelection("![ ".concat(Gt," ]( ").concat(rr,' "').concat(Gt,'" )')):It.replaceSelection("![,](".concat(rr,")")),It.focus();case Xe:for(var yr=ht.row,kr=ht.col,or=ht.align,Qe=`
`,kt=0;kt<yr;kt++){for(var Zr=[],Vr=[],nr=0;nr<kr;nr++)kt===1&&Vr.push(et[or]),Zr.push(" ");kt===1&&(Qe+="| ".concat(Vr.join(" | "),` |
`)),Qe+="| ".concat(Zr.join(kr===1?"":" | "),` |
`)}return It.replaceSelection(Qe+`
`),It.focus();default:throw new Error}},[It,zn]),Jt=Object(a.useMemo)(function(){switch(zn){case ue:return c.a.createElement(oe,{callback:tr,onCancel:Wt});case Fe:return c.a.createElement(de.b,{callback:tr,onCancel:Wt});case we:return c.a.createElement(se,{callback:tr,onCancel:Wt});case Xe:return c.a.createElement($,{callback:tr,onCancel:Wt});default:return null}},[zn]);function Wt(){Gi("")}Object(a.useEffect)(function(){if(Vt.current){var ht=Vt.current,bt=!1,ft=0;function Tt(Gt){bt=!0,ft=Gt.pageY}function zt(){bt=!1}function rr(Gt){if(bt){var yr=Gt.pageY-ft;yr<0&&(yr=0),yr>300&&(yr=300);var kr=Zt+yr+"px";qi(kr)}}return ht.addEventListener("mousedown",Tt),document.addEventListener("mousemove",rr),document.addEventListener("mouseup",zt),function(){ht.removeEventListener("mousedown",Tt),document.removeEventListener("mousemove",rr),document.removeEventListener("mouseup",zt)}}},[It,Vt]),Object(a.useEffect)(function(){qi(Zt)},[Zt]);var Ft=fe(Rt),Xt=fe(ma),qt={width:Ft,height:Xt},Ze=Object(a.useMemo)(function(){if(ci){var ht=new Date(ci),bt=ht.getHours(),ft=ht.getMinutes(),Tt=ht.getSeconds();return bt=bt<10?"0"+bt:bt,ft=ft<10?"0"+ft:ft,Tt=Tt<10?"0"+Tt:Tt,"".concat(bt,":").concat(ft,":").concat(Tt)}return 0},[ci]);function vr(){window.sessionStorage.removeItem(hn),mt(!1),oa(0)}function Ar(){mt(!1),oa(0),It.setValue(window.sessionStorage.getItem(hn))}function cr(ht,bt){var ft=It.getValue();ft=ft.replace(ht,bt),ri(ft),It==null||It.setValue(ft)}return c.a.createElement(a.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dt},c.a.createElement("div",{className:"markdown-editor-container ".concat(St," ").concat(li?"on-preview":""," ").concat(Br?"mini":""," ").concat(yi?"full-screen":""),style:qt},c.a.createElement(M,{insertTemp:xr,watch:li,fullScreen:yi,showNullButton:gn,onActionCallback:yt,hidetoolBar:Kr,uuid:qe.current,setOpenPhones:function(){pt.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Ut,placeholder:Pi})),li?c.a.createElement("div",{ref:Pt,className:"preview-container"},tn==="stex"&&c.a.createElement(R,{value:Ti}),tn!=="stex"&&c.a.createElement(p.a,{edit:!0,value:Ti,replaces:cr})):null))),Cr?c.a.createElement("a",{ref:Vt,className:"editor-resize"}):null,c.a.createElement(Y.a,null,Re[zn]?c.a.createElement(g.a,{centered:!0,title:Re[zn],visible:!0,onCancel:Wt,footer:null,className:"markdown-popup-form"},Jt):null))}},PVpz:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.StreamCipher,v=g.algo,m=[],w=[],b=[],t=v.RabbitLegacy=N.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,o=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],n=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var s=0;s<4;s++)d.call(this);for(var s=0;s<8;s++)n[s]^=o[s+4&7];if(c){var h=c.words,f=h[0],u=h[1],i=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=i>>>16|r&4294901760,y=r<<16|i&65535;n[0]^=i,n[1]^=E,n[2]^=r,n[3]^=y,n[4]^=i,n[5]^=E,n[6]^=r,n[7]^=y;for(var s=0;s<4;s++)d.call(this)}},_doProcessBlock:function(a,c){var o=this._X;d.call(this),m[0]=o[0]^o[5]>>>16^o[3]<<16,m[1]=o[2]^o[7]>>>16^o[5]<<16,m[2]=o[4]^o[1]>>>16^o[7]<<16,m[3]=o[6]^o[3]>>>16^o[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,a[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function d(){for(var a=this._X,c=this._C,o=0;o<8;o++)w[o]=c[o];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<w[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<w[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<w[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<w[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<w[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<w[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<w[6]>>>0?1:0)|0,this._b=c[7]>>>0<w[7]>>>0?1:0;for(var o=0;o<8;o++){var n=a[o]+c[o],s=n&65535,h=n>>>16,f=((s*s>>>17)+s*h>>>15)+h*h,u=((n&4294901760)*n|0)+((n&65535)*n|0);b[o]=f^u}a[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,a[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,a[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,a[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,a[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,a[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,a[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,a[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.RabbitLegacy=N._createHelper(t)}(),P.RabbitLegacy})},RxwV:function(H,q,L){"use strict";var P=L("q1tI"),g=L("uciX"),T=L("2W6z"),N=L.n(T),v=L("4IlW"),m=L("uK0f"),w=L.n(m);function b(Se,ye){if(Se===ye)return!0;if(!Se||!ye)return!1;var se=Se.length;if(ye.length!==se)return!1;for(var ee=0;ee<se;ee++)if(Se[ee]!==ye[ee])return!1;return!0}function t(Se){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(se){return typeof se}:t=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},t(Se)}function d(Se,ye){if(!(Se instanceof ye))throw new TypeError("Cannot call a class as a function")}function a(Se,ye){for(var se=0;se<ye.length;se++){var ee=ye[se];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Se,ee.key,ee)}}function c(Se,ye,se){return ye&&a(Se.prototype,ye),se&&a(Se,se),Se}function o(Se,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function");Se.prototype=Object.create(ye&&ye.prototype,{constructor:{value:Se,writable:!0,configurable:!0}}),ye&&n(Se,ye)}function n(Se,ye){return n=Object.setPrototypeOf||function(ee,B){return ee.__proto__=B,ee},n(Se,ye)}function s(Se){var ye=u();return function(){var se=i(Se),ee;if(ye){var B=i(this).constructor;ee=Reflect.construct(se,arguments,B)}else ee=se.apply(this,arguments);return h(this,ee)}}function h(Se,ye){return ye&&(t(ye)==="object"||typeof ye=="function")?ye:f(Se)}function f(Se){if(Se===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Se}function u(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Se){return!1}}function i(Se){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},i(Se)}var r=function(){var Se=function(ye){o(ee,ye);var se=s(ee);function ee(){var B;return d(this,ee),B=se.apply(this,arguments),B.menuItems={},B.saveMenuItem=function(G){return function(V){B.menuItems[G]=V}},B}return c(ee,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(G){!G.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(G){var V=this.props,Q=V.fieldNames,Z=V.defaultFieldNames;return Q[G]||Z[G]}},{key:"getOption",value:function(G,V){var Q=this.props,Z=Q.prefixCls,ne=Q.expandTrigger,re=Q.expandIcon,$=Q.loadingIcon,J=this.props.onSelect.bind(this,G,V),le=this.props.onItemDoubleClick.bind(this,G,V),ue={onClick:J,onDoubleClick:le},we="".concat(Z,"-menu-item"),Fe=null,Xe=G[this.getFieldName("children")]&&G[this.getFieldName("children")].length>0;(Xe||G.isLeaf===!1)&&(we+=" ".concat(Z,"-menu-item-expand"),G.loading||(Fe=P.createElement("span",{className:"".concat(Z,"-menu-item-expand-icon")},re))),ne==="hover"&&(Xe||G.isLeaf===!1)&&(ue={onMouseEnter:this.delayOnSelect.bind(this,J),onMouseLeave:this.delayOnSelect.bind(this),onClick:J}),this.isActiveOption(G,V)&&(we+=" ".concat(Z,"-menu-item-active"),ue.ref=this.saveMenuItem(V)),G.disabled&&(we+=" ".concat(Z,"-menu-item-disabled"));var $e=null;G.loading&&(we+=" ".concat(Z,"-menu-item-loading"),$e=$||null);var et="";return"title"in G?et=G.title:typeof G[this.getFieldName("label")]=="string"&&(et=G[this.getFieldName("label")]),P.createElement("li",Object.assign({key:G[this.getFieldName("value")],className:we,title:et},ue,{role:"menuitem",onMouseDown:function(at){return at.preventDefault()}}),G[this.getFieldName("label")],Fe,$e)}},{key:"getActiveOptions",value:function(G){var V=this,Q=this.props.options,Z=G||this.props.activeValue;return w()(Q,function(ne,re){return ne[V.getFieldName("value")]===Z[re]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var G=this,V=this.props.options,Q=this.getActiveOptions().map(function(Z){return Z[G.getFieldName("children")]}).filter(function(Z){return!!Z});return Q.unshift(V),Q}},{key:"delayOnSelect",value:function(G){for(var V=this,Q=arguments.length,Z=new Array(Q>1?Q-1:0),ne=1;ne<Q;ne++)Z[ne-1]=arguments[ne];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof G=="function"&&(this.delayTimer=window.setTimeout(function(){G(Z),V.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var G=this.getShowOptions().length,V=0;V<G;V++){var Q=this.menuItems[V];Q&&Q.parentElement&&(Q.parentElement.scrollTop=Q.offsetTop)}}},{key:"isActiveOption",value:function(G,V){var Q=this.props.activeValue,Z=Q===void 0?[]:Q;return Z[V]===G[this.getFieldName("value")]}},{key:"render",value:function(){var G=this,V=this.props,Q=V.prefixCls,Z=V.dropdownMenuColumnStyle;return P.createElement("div",null,this.getShowOptions().map(function(ne,re){return P.createElement("ul",{className:"".concat(Q,"-menu"),key:re,style:Z},ne.map(function($){return G.getOption($,re)}))}))}}]),ee}(P.Component);return Se.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Se}(),E=r,y={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},p=y;function R(Se){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(se){return typeof se}:R=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},R(Se)}function O(Se,ye){if(Se==null)return{};var se=_(Se,ye),ee,B;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(Se);for(B=0;B<G.length;B++){if(ee=G[B],ye.indexOf(ee)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Se,ee))continue;se[ee]=Se[ee]}}return se}function _(Se,ye){if(Se==null)return{};var se={},ee=Object.keys(Se),B,G;for(G=0;G<ee.length;G++){if(B=ee[G],ye.indexOf(B)>=0)continue;se[B]=Se[B]}return se}function x(Se){return F(Se)||j(Se)||C(Se)||S()}function S(){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(Se,ye){if(!Se)return;if(typeof Se=="string")return M(Se,ye);var se=Object.prototype.toString.call(Se).slice(8,-1);if(se==="Object"&&Se.constructor&&(se=Se.constructor.name),se==="Map"||se==="Set")return Array.from(Se);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return M(Se,ye)}function j(Se){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Se))return Array.from(Se)}function F(Se){if(Array.isArray(Se))return M(Se)}function M(Se,ye){(ye==null||ye>Se.length)&&(ye=Se.length);for(var se=0,ee=new Array(ye);se<ye;se++)ee[se]=Se[se];return ee}function Y(Se,ye){if(!(Se instanceof ye))throw new TypeError("Cannot call a class as a function")}function K(Se,ye){for(var se=0;se<ye.length;se++){var ee=ye[se];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Se,ee.key,ee)}}function A(Se,ye,se){return ye&&K(Se.prototype,ye),se&&K(Se,se),Se}function W(Se,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function");Se.prototype=Object.create(ye&&ye.prototype,{constructor:{value:Se,writable:!0,configurable:!0}}),ye&&U(Se,ye)}function U(Se,ye){return U=Object.setPrototypeOf||function(ee,B){return ee.__proto__=B,ee},U(Se,ye)}function D(Se){var ye=oe();return function(){var se=de(Se),ee;if(ye){var B=de(this).constructor;ee=Reflect.construct(se,arguments,B)}else ee=se.apply(this,arguments);return X(this,ee)}}function X(Se,ye){return ye&&(R(ye)==="object"||typeof ye=="function")?ye:ie(Se)}function ie(Se){if(Se===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Se}function oe(){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(Se){return!1}}function de(Se){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},de(Se)}var Ce=function(){var Se=function(ye){W(ee,ye);var se=D(ee);function ee(B){var G;Y(this,ee),G=se.call(this,B),G.setPopupVisible=function(Q){var Z=G.state.value;"popupVisible"in G.props||G.setState({popupVisible:Q}),Q&&!G.state.popupVisible&&G.setState({activeValue:Z}),G.props.onPopupVisibleChange(Q)},G.handleChange=function(Q,Z,ne){var re=Z.visible;(ne.type!=="keydown"||ne.keyCode===v.a.ENTER)&&(G.props.onChange(Q.map(function($){return $[G.getFieldName("value")]}),Q),G.setPopupVisible(re))},G.handlePopupVisibleChange=function(Q){G.setPopupVisible(Q)},G.handleMenuSelect=function(Q,Z,ne){var re=G.trigger.getRootDomNode();re&&re.focus&&re.focus();var $=G.props,J=$.changeOnSelect,le=$.loadData,ue=$.expandTrigger;if(!Q||Q.disabled)return;var we=G.state.activeValue;we=we.slice(0,Z+1),we[Z]=Q[G.getFieldName("value")];var Fe=G.getActiveOptions(we);if(Q.isLeaf===!1&&!Q[G.getFieldName("children")]&&le){J&&G.handleChange(Fe,{visible:!0},ne),G.setState({activeValue:we}),le(Fe);return}var Xe={};!Q[G.getFieldName("children")]||!Q[G.getFieldName("children")].length?(G.handleChange(Fe,{visible:!1},ne),Xe.value=we):J&&(ne.type==="click"||ne.type==="keydown")&&(ue==="hover"?G.handleChange(Fe,{visible:!1},ne):G.handleChange(Fe,{visible:!0},ne),Xe.value=we),Xe.activeValue=we,("value"in G.props||ne.type==="keydown"&&ne.keyCode!==v.a.ENTER)&&delete Xe.value,G.setState(Xe)},G.handleItemDoubleClick=function(){var Q=G.props.changeOnSelect;Q&&G.setPopupVisible(!1)},G.handleKeyDown=function(Q){var Z=G.props.children;if(Z&&Z.props.onKeyDown){Z.props.onKeyDown(Q);return}var ne=x(G.state.activeValue),re=ne.length-1<0?0:ne.length-1,$=G.getCurrentLevelOptions(),J=$.map(function(Fe){return Fe[G.getFieldName("value")]}).indexOf(ne[re]);if(Q.keyCode!==v.a.DOWN&&Q.keyCode!==v.a.UP&&Q.keyCode!==v.a.LEFT&&Q.keyCode!==v.a.RIGHT&&Q.keyCode!==v.a.ENTER&&Q.keyCode!==v.a.SPACE&&Q.keyCode!==v.a.BACKSPACE&&Q.keyCode!==v.a.ESC&&Q.keyCode!==v.a.TAB)return;if(!G.state.popupVisible&&Q.keyCode!==v.a.BACKSPACE&&Q.keyCode!==v.a.LEFT&&Q.keyCode!==v.a.RIGHT&&Q.keyCode!==v.a.ESC&&Q.keyCode!==v.a.TAB){G.setPopupVisible(!0);return}if(Q.keyCode===v.a.DOWN||Q.keyCode===v.a.UP){Q.preventDefault();var le=J;le!==-1?Q.keyCode===v.a.DOWN?(le+=1,le=le>=$.length?0:le):(le-=1,le=le<0?$.length-1:le):le=0,ne[re]=$[le][G.getFieldName("value")]}else if(Q.keyCode===v.a.LEFT||Q.keyCode===v.a.BACKSPACE)Q.preventDefault(),ne.splice(ne.length-1,1);else if(Q.keyCode===v.a.RIGHT)Q.preventDefault(),$[J]&&$[J][G.getFieldName("children")]&&ne.push($[J][G.getFieldName("children")][0][G.getFieldName("value")]);else if(Q.keyCode===v.a.ESC||Q.keyCode===v.a.TAB){G.setPopupVisible(!1);return}(!ne||ne.length===0)&&G.setPopupVisible(!1);var ue=G.getActiveOptions(ne),we=ue[ue.length-1];G.handleMenuSelect(we,ue.length-1,Q),G.props.onKeyDown&&G.props.onKeyDown(Q)},G.saveTrigger=function(Q){G.trigger=Q};var V=[];return"value"in B?V=B.value||[]:"defaultValue"in B&&(V=B.defaultValue||[]),N()(!("filedNames"in B),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),G.state={popupVisible:B.popupVisible,activeValue:V,value:V,prevProps:B},G.defaultFieldNames={label:"label",value:"value",children:"children"},G}return A(ee,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(G){var V=this.defaultFieldNames,Q=this.props,Z=Q.fieldNames,ne=Q.filedNames;return"filedNames"in this.props?ne[G]||V[G]:Z[G]||V[G]}},{key:"getFieldNames",value:function(){var G=this.props,V=G.fieldNames,Q=G.filedNames;return"filedNames"in this.props?Q:V}},{key:"getCurrentLevelOptions",value:function(){var G=this,V=this.props.options,Q=V===void 0?[]:V,Z=this.state.activeValue,ne=Z===void 0?[]:Z,re=w()(Q,function($,J){return $[G.getFieldName("value")]===ne[J]},{childrenKeyName:this.getFieldName("children")});return re[re.length-2]?re[re.length-2][this.getFieldName("children")]:x(Q).filter(function($){return!$.disabled})}},{key:"getActiveOptions",value:function(G){var V=this;return w()(this.props.options||[],function(Q,Z){return Q[V.getFieldName("value")]===G[Z]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var G=this.props,V=G.prefixCls,Q=G.transitionName,Z=G.popupClassName,ne=G.options,re=ne===void 0?[]:ne,$=G.disabled,J=G.builtinPlacements,le=G.popupPlacement,ue=G.children,we=G.dropdownRender,Fe=O(G,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Xe=P.createElement("div",null),$e="";re&&re.length>0?Xe=P.createElement(E,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):$e=" ".concat(V,"-menus-empty");var et=Xe;return we&&(et=we(Xe)),P.createElement(g.a,Object.assign({ref:this.saveTrigger},Fe,{popupPlacement:le,builtinPlacements:J,popupTransitionName:Q,action:$?[]:["click"],popupVisible:$?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(V,"-menus"),popupClassName:Z+$e,popup:et}),P.cloneElement(ue,{onKeyDown:this.handleKeyDown,tabIndex:$?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(G,V){var Q=V.prevProps,Z=Q===void 0?{}:Q,ne={prevProps:G};return"value"in G&&!b(Z.value,G.value)&&(ne.value=G.value||[],"loadData"in G||(ne.activeValue=G.value||[])),"popupVisible"in G&&(ne.popupVisible=G.popupVisible),ne}}]),ee}(P.Component);return Se.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:p,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Se}(),Ae=Ce,me=q.a=Ae},S6kV:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.OFB=function(){var g=P.lib.BlockCipherMode.extend(),T=g.Encryptor=g.extend({processBlock:function(N,v){var m=this._cipher,w=m.blockSize,b=this._iv,t=this._keystream;b&&(t=this._keystream=b.slice(0),this._iv=void 0),m.encryptBlock(t,0);for(var d=0;d<w;d++)N[v+d]^=t[d]}});return g.Decryptor=T,g}(),P.mode.OFB})},"SA+Z":function(H,q,L){var P=L("wTVA"),g=L("EbDI"),T=L("ZhPi"),N=L("wkBT");function v(m){return P(m)||g(m)||T(m)||N()}H.exports=v,H.exports.__esModule=!0,H.exports.default=H.exports},SJMd:function(H,q){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var L,P,g,T=!1,N,v;window.PR_SHOULD_USE_CONTINUATION=!0;var m,w;(function(){var b=window,t=["break,continue,do,else,for,if,return,while"],d=[t,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],a=[d,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[a,"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"],o=[a,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[a,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",h=[a,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],f="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",u=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],i=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],r=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[c,n,o,h,f,u,i,r],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,p="str",R="kwd",O="com",_="typ",x="lit",S="pun",C="pln",j="tag",F="dec",M="src",Y="atn",K="atv",A="nocode",W="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ne){for(var re=0,$=!1,J=!1,le=0,ue=ne.length;le<ue;++le){var we=ne[le];if(we.ignoreCase)J=!0;else if(/[a-z]/i.test(we.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){$=!0,J=!1;break}}var Fe={b:8,t:9,n:10,v:11,f:12,r:13};function Xe(Be){var Ie=Be.charCodeAt(0);if(Ie!==92)return Ie;var rt=Be.charAt(1);return Ie=Fe[rt],Ie||("0"<=rt&&rt<="7"?parseInt(Be.substring(1),8):rt==="u"||rt==="x"?parseInt(Be.substring(2),16):Be.charCodeAt(1))}function $e(Be){if(Be<32)return(Be<16?"\\x0":"\\x")+Be.toString(16);var Ie=String.fromCharCode(Be);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function et(Be){var Ie=Be.substring(1,Be.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),rt=[],lt=Ie[0]==="^",_e=["["];lt&&_e.push("^");for(var ce=lt?1:0,fe=Ie.length;ce<fe;++ce){var ve=Ie[ce];if(/\\[bdsw]/i.test(ve))_e.push(ve);else{var Oe=Xe(ve),ge;ce+2<fe&&Ie[ce+1]==="-"?(ge=Xe(Ie[ce+2]),ce+=2):ge=Oe,rt.push([Oe,ge]),ge<65||Oe>122||(ge<65||Oe>90||rt.push([Math.max(65,Oe)|32,Math.min(ge,90)|32]),ge<97||Oe>122||rt.push([Math.max(97,Oe)&~32,Math.min(ge,122)&~32]))}}rt.sort(function(Pe,Ke){return Pe[0]-Ke[0]||Ke[1]-Pe[1]});for(var Ee=[],Re=[],ce=0;ce<rt.length;++ce){var Le=rt[ce];Le[0]<=Re[1]+1?Re[1]=Math.max(Re[1],Le[1]):Ee.push(Re=Le)}for(var ce=0;ce<Ee.length;++ce){var Le=Ee[ce];_e.push($e(Le[0])),Le[1]>Le[0]&&(Le[1]+1>Le[0]&&_e.push("-"),_e.push($e(Le[1])))}return _e.push("]"),_e.join("")}function nt(Be){for(var Ie=Be.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),rt=Ie.length,lt=[],_e=0,ce=0;_e<rt;++_e){var fe=Ie[_e];if(fe==="(")++ce;else if(fe.charAt(0)==="\\"){var ve=+fe.substring(1);ve&&(ve<=ce?lt[ve]=-1:Ie[_e]=$e(ve))}}for(var _e=1;_e<lt.length;++_e)lt[_e]===-1&&(lt[_e]=++re);for(var _e=0,ce=0;_e<rt;++_e){var fe=Ie[_e];if(fe==="(")++ce,lt[ce]||(Ie[_e]="(?:");else if(fe.charAt(0)==="\\"){var ve=+fe.substring(1);ve&&ve<=ce&&(Ie[_e]="\\"+lt[ve])}}for(var _e=0;_e<rt;++_e)Ie[_e]==="^"&&Ie[_e+1]!=="^"&&(Ie[_e]="");if(Be.ignoreCase&&$)for(var _e=0;_e<rt;++_e){var fe=Ie[_e],Oe=fe.charAt(0);fe.length>=2&&Oe==="["?Ie[_e]=et(fe):Oe!=="\\"&&(Ie[_e]=fe.replace(/[a-zA-Z]/g,function(Re){var Le=Re.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return Ie.join("")}for(var at=[],le=0,ue=ne.length;le<ue;++le){var we=ne[le];if(we.global||we.multiline)throw new Error(""+we);at.push("(?:"+nt(we)+")")}return new RegExp(at.join("|"),J?"gi":"g")}function D(ne,re){var $=/(?:^|\s)nocode(?:\s|$)/,J=[],le=0,ue=[],we=0;function Fe(Xe){var $e=Xe.nodeType;if($e==1){if($.test(Xe.className))return;for(var et=Xe.firstChild;et;et=et.nextSibling)Fe(et);var nt=Xe.nodeName.toLowerCase();(nt==="br"||nt==="li")&&(J[we]=`
`,ue[we<<1]=le++,ue[we++<<1|1]=Xe)}else if($e==3||$e==4){var at=Xe.nodeValue;at.length&&(re?at=at.replace(/\r\n?/g,`
`):at=at.replace(/[ \t\r\n]+/g," "),J[we]=at,ue[we<<1]=le,le+=at.length,ue[we++<<1|1]=Xe)}}return Fe(ne),{sourceCode:J.join("").replace(/\n$/,""),spans:ue}}function X(ne,re,$,J,le){if(!$)return;var ue={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:$,spans:null,basePos:re,decorations:null};J(ue),le.push.apply(le,ue.decorations)}var ie=/\S/;function oe(ne){for(var re=void 0,$=ne.firstChild;$;$=$.nextSibling){var J=$.nodeType;re=J===1?re?ne:$:J===3&&ie.test($.nodeValue)?ne:re}return re===ne?void 0:re}function de(ne,re){var $={},J;(function(){for(var we=ne.concat(re),Fe=[],Xe={},$e=0,et=we.length;$e<et;++$e){var nt=we[$e],at=nt[3];if(at)for(var Be=at.length;--Be>=0;)$[at.charAt(Be)]=nt;var Ie=nt[1],rt=""+Ie;Xe.hasOwnProperty(rt)||(Fe.push(Ie),Xe[rt]=null)}Fe.push(/[\0-\uffff]/),J=U(Fe)})();var le=re.length,ue=function(we){for(var Fe=we.sourceCode,Xe=we.basePos,$e=we.sourceNode,et=[Xe,C],nt=0,at=Fe.match(J)||[],Be={},Ie=0,rt=at.length;Ie<rt;++Ie){var lt=at[Ie],_e=Be[lt],ce=void 0,fe;if(typeof _e=="string")fe=!1;else{var ve=$[lt.charAt(0)];if(ve)ce=lt.match(ve[1]),_e=ve[0];else{for(var Oe=0;Oe<le;++Oe)if(ve=re[Oe],ce=lt.match(ve[1]),ce){_e=ve[0];break}ce||(_e=C)}fe=_e.length>=5&&_e.substring(0,5)==="lang-",fe&&!(ce&&typeof ce[1]=="string")&&(fe=!1,_e=M),fe||(Be[lt]=_e)}var ge=nt;if(nt+=lt.length,!fe)et.push(Xe+ge,_e);else{var Ee=ce[1],Re=lt.indexOf(Ee),Le=Re+Ee.length;ce[2]&&(Le=lt.length-ce[2].length,Re=Le-Ee.length);var Pe=_e.substring(5);X($e,Xe+ge,lt.substring(0,Re),ue,et),X($e,Xe+ge+Re,Ee,ee(Pe,Ee),et),X($e,Xe+ge+Le,lt.substring(Le),ue,et)}}we.decorations=et};return ue}function Ce(ne){var re=[],$=[];ne.tripleQuotedStrings?re.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?re.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):re.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&$.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var J=ne.hashComments;J&&(ne.cStyleComments?(J>1?re.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):re.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),$.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):re.push([O,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&($.push([O,/^\/\/[^\r\n]*/,null]),$.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var le=ne.regexLiterals;if(le){var ue=le>1?"":`
\r`,we=ue?".":"[\\S\\s]",Fe="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+we+")*(?:\\x5D|$))+/";$.push(["lang-regex",RegExp("^"+W+"("+Fe+")")])}var Xe=ne.types;Xe&&$.push([_,Xe]);var $e=(""+ne.keywords).replace(/^ | $/g,"");$e.length&&$.push([R,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),re.push([C,/^\s+/,null,` \r
\xA0`]);var et="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(et+="(?!s*/)"),$.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[C,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[C,/^\\[\s\S]?/,null],[S,new RegExp(et),null]),de(re,$)}var Ae=Ce({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function me(ne,re,$){for(var J=/(?:^|\s)nocode(?:\s|$)/,le=/\r\n?|\n/,ue=ne.ownerDocument,we=ue.createElement("li");ne.firstChild;)we.appendChild(ne.firstChild);var Fe=[we];function Xe(Ie){var rt=Ie.nodeType;if(rt==1&&!J.test(Ie.className))if(Ie.nodeName==="br")$e(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var lt=Ie.firstChild;lt;lt=lt.nextSibling)Xe(lt);else if((rt==3||rt==4)&&$){var _e=Ie.nodeValue,ce=_e.match(le);if(ce){var fe=_e.substring(0,ce.index);Ie.nodeValue=fe;var ve=_e.substring(ce.index+ce[0].length);if(ve){var Oe=Ie.parentNode;Oe.insertBefore(ue.createTextNode(ve),Ie.nextSibling)}$e(Ie),fe||Ie.parentNode.removeChild(Ie)}}}function $e(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function rt(ce,fe){var ve=fe?ce.cloneNode(!1):ce,Oe=ce.parentNode;if(Oe){var ge=rt(Oe,1),Ee=ce.nextSibling;ge.appendChild(ve);for(var Re=Ee;Re;Re=Ee)Ee=Re.nextSibling,ge.appendChild(Re)}return ve}for(var lt=rt(Ie.nextSibling,0),_e;(_e=lt.parentNode)&&_e.nodeType===1;)lt=_e;Fe.push(lt)}for(var et=0;et<Fe.length;++et)Xe(Fe[et]);re===(re|0)&&Fe[0].setAttribute("value",re);var nt=ue.createElement("ol");nt.className="linenums";for(var at=Math.max(0,re-1|0)||0,et=0,Be=Fe.length;et<Be;++et)we=Fe[et],we.className="L"+(et+at)%10,we.firstChild||we.appendChild(ue.createTextNode("\xA0")),nt.appendChild(we);ne.appendChild(nt)}function Se(ne){var re=/\bMSIE\s(\d+)/.exec(navigator.userAgent);re=re&&+re[1]<=8;var $=/\n/g,J=ne.sourceCode,le=J.length,ue=0,we=ne.spans,Fe=we.length,Xe=0,$e=ne.decorations,et=$e.length,nt=0;$e[et]=le;var at,Be;for(Be=at=0;Be<et;)$e[Be]!==$e[Be+2]?($e[at++]=$e[Be++],$e[at++]=$e[Be++]):Be+=2;for(et=at,Be=at=0;Be<et;){for(var Ie=$e[Be],rt=$e[Be+1],lt=Be+2;lt+2<=et&&$e[lt+1]===rt;)lt+=2;$e[at++]=Ie,$e[at++]=rt,Be=lt}et=$e.length=at;var _e=ne.sourceNode,ce="";_e&&(ce=_e.style.display,_e.style.display="none");try{for(var fe=null;Xe<Fe;){var ve=we[Xe],Oe=we[Xe+2]||le,ge=$e[nt+2]||le,lt=Math.min(Oe,ge),Ee=we[Xe+1],Re;if(Ee.nodeType!==1&&(Re=J.substring(ue,lt))){re&&(Re=Re.replace($,"\r")),Ee.nodeValue=Re;var Le=Ee.ownerDocument,Pe=Le.createElement("span");Pe.className=$e[nt+1];var Ke=Ee.parentNode;Ke.replaceChild(Pe,Ee),Pe.appendChild(Ee),ue<Oe&&(we[Xe+1]=Ee=Le.createTextNode(J.substring(lt,Oe)),Ke.insertBefore(Ee,Pe.nextSibling))}ue=lt,ue>=Oe&&(Xe+=2),ue>=ge&&(nt+=2)}}finally{_e&&(_e.style.display=ce)}}var ye={};function se(ne,re){for(var $=re.length;--$>=0;){var J=re[$];ye.hasOwnProperty(J)?b.console&&console.warn("cannot override language handler %s",J):ye[J]=ne}}function ee(ne,re){return ne&&ye.hasOwnProperty(ne)||(ne=/^\s*</.test(re)?"default-markup":"default-code"),ye[ne]}se(Ae,["default-code"]),se(de([],[[C,/^[^<?]+/],[F,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[S,/^(?:<[%?]|[%?]>)/],["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"]),se(de([[C,/^[\s]+/,null,` \r
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[j,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Y,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[S,/^[=<>\/]+/],["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"]),se(de([],[[K,/^[\s\S]+/]]),["uq.val"]),se(Ce({keywords:c,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),se(Ce({keywords:"null,true,false"}),["json"]),se(Ce({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),se(Ce({keywords:o,cStyleComments:!0}),["java"]),se(Ce({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),se(Ce({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),se(Ce({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),se(Ce({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),se(Ce({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),se(Ce({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),se(de([],[[p,/^[\s\S]+/]]),["regex"]);function B(ne){var re=ne.langExtension;try{var $=D(ne.sourceNode,ne.pre),J=$.sourceCode;ne.sourceCode=J,ne.spans=$.spans,ne.basePos=0,ee(re,J)(ne),Se(ne)}catch(le){b.console&&console.log(le&&le.stack||le)}}function G(ne,re,$){var J=$||!1,le=re||null,ue=document.createElement("div");ue.innerHTML="<pre>"+ne+"</pre>",ue=ue.firstChild,J&&me(ue,J,!0);var we={langExtension:le,numberLines:J,sourceNode:ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return B(we),ue.innerHTML}function V(ne,re){var $=re||document.body,J=$.ownerDocument||document;function le(ve){return $.getElementsByTagName(ve)}for(var ue=[le("pre"),le("code"),le("xmp")],we=[],Fe=0;Fe<ue.length;++Fe)for(var Xe=0,$e=ue[Fe].length;Xe<$e;++Xe)we.push(ue[Fe][Xe]);ue=null;var et=Date;et.now||(et={now:function(){return+new Date}});var nt=0,at=/\blang(?:uage)?-([\w.]+)(?!\S)/,Be=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,rt=/pre|xmp/i,lt=/^code$/i,_e=/^(?:pre|code|xmp)$/i,ce={};function fe(){for(var ve=b.PR_SHOULD_USE_CONTINUATION?et.now()+250:Infinity;nt<we.length&&et.now()<ve;nt++){for(var Oe=we[nt],ge=ce,Ee=Oe;Ee=Ee.previousSibling;){var Re=Ee.nodeType,Le=(Re===7||Re===8)&&Ee.nodeValue;if(Le?!/^\??prettify\b/.test(Le):Re!==3||/\S/.test(Ee.nodeValue))break;if(Le){ge={},Le.replace(/\b(\w+)=([\w:.%+-]+)/g,function(cn,xr,an){ge[xr]=an});break}}var Pe=Oe.className;if((ge!==ce||Be.test(Pe))&&!Ie.test(Pe)){for(var Ke=!1,it=Oe.parentNode;it;it=it.parentNode){var st=it.tagName;if(_e.test(st)&&it.className&&Be.test(it.className)){Ke=!0;break}}if(!Ke){Oe.className+=" prettyprinted";var Ot=ge.lang;if(!Ot){Ot=Pe.match(at);var Rt;!Ot&&(Rt=oe(Oe))&&lt.test(Rt.tagName)&&(Ot=Rt.className.match(at)),Ot&&(Ot=Ot[1])}var sr;if(rt.test(Oe.tagName))sr=1;else{var Zt=Oe.currentStyle,wt=J.defaultView,Br=Zt?Zt.whiteSpace:wt&&wt.getComputedStyle?wt.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;sr=Br&&Br.substring(0,3)==="pre"}var Nr=ge.linenums;(Nr=Nr==="true"||+Nr)||(Nr=Pe.match(/\blinenums\b(?::(\d+))?/),Nr=Nr?Nr[1]&&Nr[1].length?+Nr[1]:!0:!1),Nr&&me(Oe,Nr,sr);var jr={langExtension:Ot,sourceNode:Oe,numberLines:Nr,pre:sr,sourceCode:null,basePos:null,spans:null,decorations:null};B(jr)}}}nt<we.length?b.setTimeout(fe,250):typeof ne=="function"&&ne()}fe()}var Q=b.PR={createSimpleLexer:de,registerLangHandler:se,sourceDecorator:Ce,PR_ATTRIB_NAME:Y,PR_ATTRIB_VALUE:K,PR_COMMENT:O,PR_DECLARATION:F,PR_KEYWORD:R,PR_LITERAL:x,PR_NOCODE:A,PR_PLAIN:C,PR_PUNCTUATION:S,PR_SOURCE:M,PR_STRING:p,PR_TAG:j,PR_TYPE:_,prettyPrintOne:T?b.prettyPrintOne=G:m=G,prettyPrint:w=T?b.prettyPrint=V:w=V},Z=b.define;typeof Z=="function"&&Z.amd&&Z("google-code-prettify",[],function(){return Q})})()},STEk:function(H,q,L){"use strict";L.d(q,"a",function(){return se});/*! *****************************************************************************
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 P=function(ee,B){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,V){G.__proto__=V}||function(G,V){for(var Q in V)Object.prototype.hasOwnProperty.call(V,Q)&&(G[Q]=V[Q])})(ee,B)};function g(ee,B){function G(){this.constructor=ee}P(ee,B),ee.prototype=B===null?Object.create(B):(G.prototype=B.prototype,new G)}function T(ee,B,G,V){return new(G||(G=Promise))(function(Q,Z){function ne(J){try{$(V.next(J))}catch(le){Z(le)}}function re(J){try{$(V.throw(J))}catch(le){Z(le)}}function $(J){var le;J.done?Q(J.value):(le=J.value,le instanceof G?le:new G(function(ue){ue(le)})).then(ne,re)}$((V=V.apply(ee,B||[])).next())})}function N(ee,B){var G,V,Q,Z,ne={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return Z={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(Z[Symbol.iterator]=function(){return this}),Z;function re($){return function(J){return function(le){if(G)throw new TypeError("Generator is already executing.");for(;ne;)try{if(G=1,V&&(Q=2&le[0]?V.return:le[0]?V.throw||((Q=V.return)&&Q.call(V),0):V.next)&&!(Q=Q.call(V,le[1])).done)return Q;switch(V=0,Q&&(le=[2&le[0],Q.value]),le[0]){case 0:case 1:Q=le;break;case 4:return ne.label++,{value:le[1],done:!1};case 5:ne.label++,V=le[1],le=[0];continue;case 7:le=ne.ops.pop(),ne.trys.pop();continue;default:if(!(Q=ne.trys,(Q=Q.length>0&&Q[Q.length-1])||le[0]!==6&&le[0]!==2)){ne=0;continue}if(le[0]===3&&(!Q||le[1]>Q[0]&&le[1]<Q[3])){ne.label=le[1];break}if(le[0]===6&&ne.label<Q[1]){ne.label=Q[1],Q=le;break}if(Q&&ne.label<Q[2]){ne.label=Q[2],ne.ops.push(le);break}Q[2]&&ne.ops.pop(),ne.trys.pop();continue}le=B.call(ee,ne)}catch(ue){le=[6,ue],V=0}finally{G=Q=0}if(5&le[0])throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}([$,J])}}}function v(){for(var ee=0,B=0,G=arguments.length;B<G;B++)ee+=arguments[B].length;var V=Array(ee),Q=0;for(B=0;B<G;B++)for(var Z=arguments[B],ne=0,re=Z.length;ne<re;ne++,Q++)V[Q]=Z[ne];return V}var m=function(){function ee(){}return ee.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ee.setAttributes=function(B,G){for(var V=0,Q=G;V<Q.length;V++){var Z=Q[V],ne=Z[0],re=Z[1];B.setAttribute(ne,re)}},ee.createRect=function(B,G,V){var Q=document.createElementNS("http://www.w3.org/2000/svg","rect");return Q.setAttribute("width",B.toString()),Q.setAttribute("height",G.toString()),V&&ee.setAttributes(Q,V),Q},ee.createLine=function(B,G,V,Q,Z){var ne=document.createElementNS("http://www.w3.org/2000/svg","line");return ne.setAttribute("x1",B.toString()),ne.setAttribute("y1",G.toString()),ne.setAttribute("x2",V.toString()),ne.setAttribute("y2",Q.toString()),Z&&ee.setAttributes(ne,Z),ne},ee.createPolygon=function(B,G){var V=document.createElementNS("http://www.w3.org/2000/svg","polygon");return V.setAttribute("points",B),G&&ee.setAttributes(V,G),V},ee.createCircle=function(B,G){var V=document.createElementNS("http://www.w3.org/2000/svg","circle");return V.setAttribute("cx",(B/2).toString()),V.setAttribute("cy",(B/2).toString()),V.setAttribute("r",B.toString()),G&&ee.setAttributes(V,G),V},ee.createEllipse=function(B,G,V){var Q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Q.setAttribute("cx",(B/2).toString()),Q.setAttribute("cy",(G/2).toString()),Q.setAttribute("rx",(B/2).toString()),Q.setAttribute("ry",(G/2).toString()),V&&ee.setAttributes(Q,V),Q},ee.createGroup=function(B){var G=document.createElementNS("http://www.w3.org/2000/svg","g");return B&&ee.setAttributes(G,B),G},ee.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ee.createMarker=function(B,G,V,Q,Z,ne,re){var $=document.createElementNS("http://www.w3.org/2000/svg","marker");return ee.setAttributes($,[["id",B],["orient",G],["markerWidth",V.toString()],["markerHeight",Q.toString()],["refX",Z.toString()],["refY",ne.toString()]]),$.appendChild(re),$},ee.createText=function(B){var G=document.createElementNS("http://www.w3.org/2000/svg","text");return G.setAttribute("x","0"),G.setAttribute("y","0"),B&&ee.setAttributes(G,B),G},ee.createTSpan=function(B,G){var V=document.createElementNS("http://www.w3.org/2000/svg","tspan");return V.textContent=B,G&&ee.setAttributes(V,G),V},ee.createImage=function(B){var G=document.createElementNS("http://www.w3.org/2000/svg","image");return B&&ee.setAttributes(G,B),G},ee.createPoint=function(B,G){var V=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return V.x=B,V.y=G,V},ee.createPath=function(B,G){var V=document.createElementNS("http://www.w3.org/2000/svg","path");return V.setAttribute("d",B),G&&ee.setAttributes(V,G),V},ee}(),w=function(){function ee(){}return ee.addKey=function(B){ee.key=B},Object.defineProperty(ee,"isLicensed",{get:function(){return!!ee.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ee.key)},enumerable:!1,configurable:!0}),ee}(),b=function(){function ee(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ee.prototype.rasterize=function(B,G,V){var Q=this;return new Promise(function(Z){var ne=V!==void 0?V:document.createElement("canvas");B===null&&(Q.markersOnly=!0,Q.naturalSize=!1);var re=document.createElementNS("http://www.w3.org/2000/svg","svg");re.setAttribute("xmlns","http://www.w3.org/2000/svg"),re.setAttribute("width",G.width.baseVal.valueAsString),re.setAttribute("height",G.height.baseVal.valueAsString),re.setAttribute("viewBox","0 0 "+G.viewBox.baseVal.width.toString()+" "+G.viewBox.baseVal.height.toString()),re.innerHTML=G.innerHTML,Q.naturalSize===!0?(re.width.baseVal.value=B.naturalWidth,re.height.baseVal.value=B.naturalHeight):Q.width!==void 0&&Q.height!==void 0&&(re.width.baseVal.value=Q.width,re.height.baseVal.value=Q.height),ne.width=re.width.baseVal.value,ne.height=re.height.baseVal.value;var $=re.outerHTML,J=ne.getContext("2d");Q.markersOnly!==!0&&J.drawImage(B,0,0,ne.width,ne.height);var le=window.URL,ue=new Image(ne.width,ne.height);ue.setAttribute("crossOrigin","anonymous");var we=new Blob([$],{type:"image/svg+xml"}),Fe=le.createObjectURL(we);ue.onload=function(){J.drawImage(ue,0,0),le.revokeObjectURL(Fe);var Xe=ne.toDataURL(Q.imageType,Q.imageQuality);Z(Xe)},ue.src=Fe})},ee}(),t=function(){},d=function(){function ee(B){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+B+"_"}return Object.defineProperty(ee.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ee.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(ee.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ee.prototype.addClass=function(B){return this.styleSheet===void 0&&this.addStyleSheet(),B.name=""+this.classNamePrefix+B.localName,this.classes.push(B),this.styleSheet.sheet.insertRule("."+B.name+" {"+B.style+"}",this.styleSheet.sheet.cssRules.length),B},ee.prototype.addRule=function(B){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(B),this.styleSheet.sheet.insertRule(B.selector+" {"+B.style+"}",this.styleSheet.sheet.cssRules.length)},ee.prototype.addStyleSheet=function(){var B;this.styleSheet=document.createElement("style"),((B=this.styleSheetRoot)!==null&&B!==void 0?B:document.head).appendChild(this.styleSheet),this.addRule(new a("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new a("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new a("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new c("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new c("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},ee.prototype.removeStyleSheet=function(){var B;this.styleSheet&&(((B=this.styleSheetRoot)!==null&&B!==void 0?B:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ee}(),a=function(ee,B){this.selector=ee,this.style=B},c=function(ee,B){this.localName=ee,this.style=B},o=function(){function ee(B,G,V,Q,Z){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=B,this.displayMode=G,this.markerItems=V,this.uiStyleSettings=Q,this.styles=Z,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ee.prototype.show=function(B){var G=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=B,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var V=document.createElement("div");V.className=this.toolbarBlockStyleClass.name,V.style.whiteSpace="nowrap",this.uiContainer.appendChild(V),this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Z){var ne=document.createElement("div");ne.className=""+G.toolbarButtonStyleClass.name,ne.setAttribute("data-type-name",Z.typeName),ne.innerHTML=Z.icon,ne.addEventListener("click",function(){G.markerToolbarButtonClicked(ne,Z)}),G.buttons.push(ne),G.markerButtons.push(ne)}),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 Q=document.createElement("div");Q.className=this.toolbarBlockStyleClass.name,Q.style.whiteSpace="nowrap",Q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Q),this.addActionButton(Q,'<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(Q,'<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()},ee.prototype.addButtonClickListener=function(B){this.buttonClickListeners.push(B)},ee.prototype.removeButtonClickListener=function(B){this.buttonClickListeners.indexOf(B)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(B),1)},ee.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ee.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var B=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var G=0;G<this.markerButtons.length;G++)G<B||G===B&&this.markerButtons.length-1===B?this.markerButtonBlock.appendChild(this.markerButtons[G]):(G===B&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[G]))}},ee.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")},ee.prototype.resetButtonStyles=function(){var B=this;this.buttons.forEach(function(G){G.className=G.className.replace(B.uiStyleSettings.toolbarButtonStyleColorsClassName?B.uiStyleSettings.toolbarButtonStyleColorsClassName:B.toolbarButtonStyleColorsClass.name,"").trim(),G.className=G.className.replace(B.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?B.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:B.toolbarActiveButtonStyleColorsClass.name,"").trim(),G.className+=" "+(B.uiStyleSettings.toolbarButtonStyleColorsClassName?B.uiStyleSettings.toolbarButtonStyleColorsClassName:B.toolbarButtonStyleColorsClass.name)})},ee.prototype.addActionButton=function(B,G,V){var Q=this,Z=document.createElement("div");switch(Z.className=""+this.toolbarButtonStyleClass.name,Z.innerHTML=G,Z.setAttribute("data-action",V),Z.addEventListener("click",function(){Q.actionToolbarButtonClicked(Z,V)}),V){case"select":Z.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Z.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Z.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Z.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Z.style.fill=this.uiStyleSettings.closeButtonColor}B.appendChild(Z),this.buttons.push(Z)},ee.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new c("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new c("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new c("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new c("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new c("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var B=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new c("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*B)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*B)+`px;
padding: `+B+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new c("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new a("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new a("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},ee.prototype.markerToolbarButtonClicked=function(B,G){this.setActiveButton(B),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("marker",G)}),this.markerButtonOverflowBlock.style.display="none"},ee.prototype.actionToolbarButtonClicked=function(B,G){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("action",G)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ee.prototype.setActiveButton=function(B){this.resetButtonStyles(),B.className=B.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),B.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ee.prototype.setActiveMarkerButton=function(B){var G=this.markerButtons.find(function(V){return V.getAttribute("data-type-name")===B});G&&this.setActiveButton(G)},ee.prototype.setCurrentMarker=function(B){var G=this;this.currentMarker=B,this.buttons.filter(function(V){return/delete|notes/.test(V.getAttribute("data-action"))}).forEach(function(V){G.currentMarker===void 0?(V.style.fillOpacity="0.4",V.style.pointerEvents="none"):(V.style.fillOpacity="1",V.style.pointerEvents="all")})},ee}(),n=function(){function ee(B,G,V,Q){this.panels=[],this.panelButtons=[],this.markerjsContainer=B,this.displayMode=G,this.uiStyleSettings=V,this.styles=Q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ee.prototype.addStyles=function(){var B;this.toolboxStyleClass=this.styles.addClass(new c("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new c("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var G=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new c("toolbox-panel-row_colors",`
background-color: `+((B=this.uiStyleSettings.toolboxBackgroundColor)!==null&&B!==void 0?B:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*G)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*G)+`px;
padding: `+G+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new a("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new a("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ee.prototype.show=function(B){var G;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=B,this.uiContainer.className=this.toolboxStyleClass.name+" "+((G=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&G!==void 0?G:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ee.prototype.setPanelButtons=function(B){var G,V,Q=this;this.panels=B,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((G=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&G!==void 0?G:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Z){var ne;Z.uiStyleSettings=Q.uiStyleSettings;var re=document.createElement("div");re.className=Q.toolboxButtonStyleClass.name+" "+((ne=Q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ne!==void 0?ne:Q.toolboxButtonStyleColorsClass.name),re.innerHTML=Z.icon,re.title=Z.title,re.addEventListener("click",function(){Q.panelButtonClick(Z)}),Q.panelButtons.push(re),Q.buttonRow.appendChild(re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ee.prototype.panelButtonClick=function(B){var G=this,V=-1;if(B!==this.activePanel){V=this.panels.indexOf(B),this.panelRow.innerHTML="";var Q=B.getUi();Q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Q),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=B}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){G.displayMode==="inline"?G.panelRow.style.display="none":G.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Z,ne){var re,$;Z.className=G.toolboxButtonStyleClass.name+" "+(ne===V?""+((re=G.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&re!==void 0?re:G.toolboxActiveButtonStyleColorsClass.name):""+(($=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$!==void 0?$:G.toolboxButtonStyleColorsClass.name))})},ee}(),s=function(ee,B){this.title=ee,this.icon=B},h=function(ee){function B(G,V,Q,Z){var ne=ee.call(this,G,Z||'<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 ne.colors=[],ne.addTransparent=!1,ne.colorBoxes=[],ne.colors=V,ne.currentColor=Q,ne.setCurrentColor=ne.setCurrentColor.bind(ne),ne.getColorBox=ne.getColorBox.bind(ne),ne}return g(B,ee),B.prototype.getUi=function(){var G=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.whiteSpace="nowrap",this.colors.forEach(function(Q){var Z=G.getColorBox(Q);V.appendChild(Z),G.colorBoxes.push(Z)}),V},B.prototype.getColorBox=function(G){var V=this,Q=this.uiStyleSettings.toolbarHeight/4,Z=this.uiStyleSettings.toolbarHeight-Q,ne=document.createElement("div");ne.style.display="inline-block",ne.style.boxSizing="content-box",ne.style.width=Z-2+"px",ne.style.height=Z-2+"px",ne.style.padding="1px",ne.style.marginRight="2px",ne.style.marginBottom="2px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderRadius=(Z+2)/2+"px",ne.style.borderColor=G===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){V.setCurrentColor(G,ne)});var re=document.createElement("div");return re.style.display="inline-block",re.style.width=Z-2+"px",re.style.height=Z-2+"px",re.style.backgroundColor=G,re.style.borderRadius=Z/2+"px",G==="transparent"&&(re.style.fill=this.uiStyleSettings.toolboxAccentColor,re.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>`),ne.appendChild(re),ne},B.prototype.setCurrentColor=function(G,V){var Q=this;this.currentColor=G,this.colorBoxes.forEach(function(Z){Z.style.borderColor=Z===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(G)},B}(s),f=function(){function ee(B,G,V){this._state="new",this._isSelected=!1,this._container=B,this._overlayContainer=G,this.globalSettings=V,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ee.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(B){return!1},Object.defineProperty(ee.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ee.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ee.prototype.pointerDown=function(B,G){},ee.prototype.dblClick=function(B,G){},ee.prototype.manipulate=function(B){},ee.prototype.pointerUp=function(B){this.stateChanged()},ee.prototype.dispose=function(){},ee.prototype.addMarkerVisualToContainer=function(B){this.container.childNodes.length>0?this.container.insertBefore(B,this.container.childNodes[0]):this.container.appendChild(B)},ee.prototype.getState=function(){return{typeName:ee.typeName,state:this.state,notes:this.notes}},ee.prototype.restoreState=function(B){this._state=B.state,this.notes=B.notes},ee.prototype.scale=function(B,G){},ee.prototype.colorChanged=function(B){this.onColorChanged&&this.onColorChanged(B),this.stateChanged()},ee.prototype.fillColorChanged=function(B){this.onFillColorChanged&&this.onFillColorChanged(B),this.stateChanged()},ee.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var B=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),B.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(B)&&this.onStateChanged(this)}},ee.typeName="MarkerBase",ee}(),u=function(){function ee(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ee.prototype.findGripByVisual=function(B){return this.topLeft.ownsTarget(B)?this.topLeft:this.topCenter.ownsTarget(B)?this.topCenter:this.topRight.ownsTarget(B)?this.topRight:this.centerLeft.ownsTarget(B)?this.centerLeft:this.centerRight.ownsTarget(B)?this.centerRight:this.bottomLeft.ownsTarget(B)?this.bottomLeft:this.bottomCenter.ownsTarget(B)?this.bottomCenter:this.bottomRight.ownsTarget(B)?this.bottomRight:void 0},ee}(),i=function(){function ee(){this.GRIP_SIZE=10,this.visual=m.createGroup(),this.visual.appendChild(m.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(m.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ee.prototype.ownsTarget=function(B){return B===this.visual||B===this.visual.childNodes[0]||B===this.visual.childNodes[1]},ee}(),r=function(){function ee(){}return ee.toITransformMatrix=function(B){return{a:B.a,b:B.b,c:B.c,d:B.d,e:B.e,f:B.f}},ee.toSVGMatrix=function(B,G){return B.a=G.a,B.b=G.b,B.c=G.c,B.d=G.d,B.e=G.e,B.f=G.f,B},ee}(),E=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.left=0,Z.top=0,Z.width=0,Z.height=0,Z.defaultSize={x:50,y:20},Z.offsetX=0,Z.offsetY=0,Z.rotationAngle=0,Z.CB_DISTANCE=10,Z._suppressMarkerCreateEvent=!1,Z.container.transform.baseVal.appendItem(m.createTransform()),Z.setupControlBox(),Z}return g(B,ee),Object.defineProperty(B.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"visual",{get:function(){return this._visual},set:function(G){this._visual=G;var V=m.createTransform();this._visual.transform.baseVal.appendItem(V)},enumerable:!1,configurable:!0}),B.prototype.ownsTarget=function(G){return!!ee.prototype.ownsTarget.call(this,G)||!!(this.controlGrips.findGripByVisual(G)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(G))},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.state==="new"&&(this.left=G.x,this.top=G.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Q=this.unrotatePoint(G);if(this.manipulationStartX=Q.x,this.manipulationStartY=Q.y,this.offsetX=Q.x-this.left,this.offsetY=Q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(V),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V)){this.activeGrip=this.rotatorGrip;var Z=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Z.x-this.width/2,this.top=Z.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ne=this.container.transform.baseVal.getItem(0);ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ne,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},B.prototype.pointerUp=function(G){var V=this.state;ee.prototype.pointerUp.call(this,G),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(G),this._state="select",V==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},B.prototype.moveVisual=function(G){this.visual.style.transform="translate("+G.x+"px, "+G.y+"px)"},B.prototype.manipulate=function(G){var V=this.unrotatePoint(G);this.state==="creating"?this.resize(G):this.state==="move"?(this.left=this.manipulationStartLeft+(V.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(V.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(V):this.state==="rotate"&&this.rotate(G)},B.prototype.resize=function(G){var V=this.manipulationStartLeft,Q=this.manipulationStartWidth,Z=this.manipulationStartTop,ne=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:V=this.manipulationStartLeft+G.x-this.manipulationStartX,Q=this.manipulationStartWidth+this.manipulationStartLeft-V;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Q=this.manipulationStartWidth+G.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Z=this.manipulationStartTop+G.y-this.manipulationStartY,ne=this.manipulationStartHeight+this.manipulationStartTop-Z;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ne=this.manipulationStartHeight+G.y-this.manipulationStartY}Q>=0?(this.left=V,this.width=Q):(this.left=V+Q,this.width=-Q),ne>=0?(this.top=Z,this.height=ne):(this.top=Z+ne,this.height=-ne),this.setSize()},B.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},B.prototype.rotate=function(G){if(Math.abs(G.x-this.centerX)>.1){var V=Math.sign(G.x-this.centerX);this.rotationAngle=180*Math.atan((G.y-this.centerY)/(G.x-this.centerX))/Math.PI+90*V,this.applyRotation()}},B.prototype.applyRotation=function(){var G=this.container.transform.baseVal.getItem(0);G.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(G,0)},B.prototype.rotatePoint=function(G){if(this.rotationAngle===0)return G;var V=this.container.getCTM(),Q=m.createPoint(G.x,G.y);return{x:(Q=Q.matrixTransform(V)).x,y:Q.y}},B.prototype.unrotatePoint=function(G){if(this.rotationAngle===0)return G;var V=this.container.getCTM();V=V.inverse();var Q=m.createPoint(G.x,G.y);return{x:(Q=Q.matrixTransform(V)).x,y:Q.y}},B.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},B.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},B.prototype.setupControlBox=function(){this.controlBox=m.createGroup();var G=m.createTransform();G.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(G),this.container.appendChild(this.controlBox),this.controlRect=m.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=m.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new u,this.addControlGrips(),this.controlBox.style.display="none"},B.prototype.adjustControlBox=function(){var G=this.controlBox.transform.baseVal.getItem(0);G.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(G,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()},B.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()},B.prototype.createGrip=function(){var G=new i;return G.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(G.visual),G},B.prototype.positionGrips=function(){var G=this.controlGrips.topLeft.GRIP_SIZE,V=-G/2,Q=V,Z=(this.width+this.CB_DISTANCE)/2-G/2,ne=(this.height+this.CB_DISTANCE)/2-G/2,re=this.height+this.CB_DISTANCE-G/2,$=this.width+this.CB_DISTANCE-G/2;this.positionGrip(this.controlGrips.topLeft.visual,V,Q),this.positionGrip(this.controlGrips.topCenter.visual,Z,Q),this.positionGrip(this.controlGrips.topRight.visual,$,Q),this.positionGrip(this.controlGrips.centerLeft.visual,V,ne),this.positionGrip(this.controlGrips.centerRight.visual,$,ne),this.positionGrip(this.controlGrips.bottomLeft.visual,V,re),this.positionGrip(this.controlGrips.bottomCenter.visual,Z,re),this.positionGrip(this.controlGrips.bottomRight.visual,$,re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Z,Q-3*this.CB_DISTANCE)},B.prototype.positionGrip=function(G,V,Q){var Z=G.transform.baseVal.getItem(0);Z.setTranslate(V,Q),G.transform.baseVal.replaceItem(Z,0)},B.prototype.hideControlBox=function(){this.controlBox.style.display="none"},B.prototype.showControlBox=function(){this.controlBox.style.display=""},B.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:r.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:r.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ee.prototype.getState.call(this))},B.prototype.restoreState=function(G){ee.prototype.restoreState.call(this,G);var V=G;this.left=V.left,this.top=V.top,this.width=V.width,this.height=V.height,this.rotationAngle=V.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(r.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,V.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(r.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,V.containerTransformMatrix))},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V);var Q=this.rotatePoint({x:this.left,y:this.top}),Z=this.unrotatePoint({x:Q.x*G,y:Q.y*V});this.left=Z.x,this.top=Z.y,this.width=this.width*G,this.height=this.height*V,this.adjustControlBox()},B}(f),y=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.fillColor="transparent",Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.opacity=1,Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setFillColor=Z.setFillColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.createVisual=Z.createVisual.bind(Z),Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.visual)},B.prototype.createVisual=function(){this.visual=m.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.state==="new"&&(this.createVisual(),this.moveVisual(G),this._state="creating")},B.prototype.manipulate=function(G){ee.prototype.manipulate.call(this,G)},B.prototype.resize=function(G){ee.prototype.resize.call(this,G),this.setSize()},B.prototype.setSize=function(){ee.prototype.setSize.call(this),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},B.prototype.pointerUp=function(G){ee.prototype.pointerUp.call(this,G),this.setSize()},B.prototype.setStrokeColor=function(G){this.strokeColor=G,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(G),this.stateChanged()},B.prototype.setFillColor=function(G){this.fillColor=G,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},B.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},B.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},B.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this))},B.prototype.restoreState=function(G){var V=G;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),ee.prototype.restoreState.call(this,G),this.setSize()},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V),this.setSize()},B.title="Rectangle marker",B}(E),p=function(ee){function B(G,V,Q,Z){var ne=ee.call(this,G,Z||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ne.widths=[],ne.widthBoxes=[],ne.widths=V,ne.currentWidth=Q,ne.setCurrentWidth=ne.setCurrentWidth.bind(ne),ne}return g(B,ee),B.prototype.getUi=function(){var G=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.widths.forEach(function(Q){var Z=document.createElement("div");Z.style.display="flex",Z.style.flexGrow="2",Z.style.alignItems="center",Z.style.justifyContent="space-between",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.borderColor=Q===G.currentWidth?G.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){G.setCurrentWidth(Q,Z)}),V.appendChild(Z);var ne=document.createElement("div");ne.innerText=Q.toString(),ne.style.marginRight="5px",Z.appendChild(ne);var re=document.createElement("div");re.style.minHeight="20px",re.style.flexGrow="2",re.style.display="flex",re.style.alignItems="center";var $=document.createElement("hr");$.style.minWidth="20px",$.style.border="0px",$.style.borderTop=Q+"px solid "+G.uiStyleSettings.toolboxColor,$.style.flexGrow="2",re.appendChild($),Z.appendChild(re),G.widthBoxes.push(Z)}),V},B.prototype.setCurrentWidth=function(G,V){var Q=this;this.currentWidth=G,this.widthBoxes.forEach(function(Z){Z.style.borderColor=Z===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},B}(s),R=function(ee){function B(G,V,Q,Z){var ne=ee.call(this,G,Z||'<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 ne.styles=[],ne.styleBoxes=[],ne.styles=V,ne.currentStyle=Q,ne.setCurrentStyle=ne.setCurrentStyle.bind(ne),ne}return g(B,ee),B.prototype.getUi=function(){var G=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.styles.forEach(function(Q){var Z=document.createElement("div");Z.style.display="flex",Z.style.alignItems="center",Z.style.justifyContent="space-between",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.overflow="hidden",Z.style.maxWidth=100/G.styles.length-5+"%",Z.style.borderColor=Q===G.currentStyle?G.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){G.setCurrentStyle(Q,Z)}),V.appendChild(Z);var ne=document.createElement("div");ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.overflow="hidden";var re=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+G.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Q!==""?'stroke-dasharray="'+Q+'"':"")+` />
</svg>`;ne.innerHTML=re,Z.appendChild(ne),G.styleBoxes.push(Z)}),V},B.prototype.setCurrentStyle=function(G,V){var Q=this;this.currentStyle=G,this.styleBoxes.forEach(function(Z){Z.style.borderColor=Z===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},B}(s),O=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.strokePanel=new h("Line color",Q.defaultColorSet,Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z}return g(B,ee),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=ee.prototype.getState.call(this);return G.typeName=B.typeName,G},B.typeName="FrameMarker",B.title="Frame marker",B.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',B}(y),_=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},x=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.x1=0,Z.y1=0,Z.x2=0,Z.y2=0,Z.defaultLength=50,Z.manipulationStartX=0,Z.manipulationStartY=0,Z.manipulationStartX1=0,Z.manipulationStartY1=0,Z.manipulationStartX2=0,Z.manipulationStartY2=0,Z.setupControlBox(),Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!!ee.prototype.ownsTarget.call(this,G)||!(!this.grip1.ownsTarget(G)&&!this.grip2.ownsTarget(G))},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.manipulationStartX=G.x,this.manipulationStartY=G.y,this.state==="new"&&(this.x1=G.x,this.y1=G.y,this.x2=G.x,this.y2=G.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(V)?this.activeGrip=this.grip1:this.grip2.ownsTarget(V)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},B.prototype.pointerUp=function(G){var V=this.state;ee.prototype.pointerUp.call(this,G),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(G),this._state="select",V==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},B.prototype.adjustVisual=function(){},B.prototype.manipulate=function(G){this.state==="creating"?this.resize(G):this.state==="move"?(this.x1=this.manipulationStartX1+G.x-this.manipulationStartX,this.y1=this.manipulationStartY1+G.y-this.manipulationStartY,this.x2=this.manipulationStartX2+G.x-this.manipulationStartX,this.y2=this.manipulationStartY2+G.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(G)},B.prototype.resize=function(G){switch(this.activeGrip){case this.grip1:this.x1=G.x,this.y1=G.y;break;case this.grip2:case void 0:this.x2=G.x,this.y2=G.y}this.adjustVisual(),this.adjustControlBox()},B.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},B.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},B.prototype.setupControlBox=function(){this.controlBox=m.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},B.prototype.adjustControlBox=function(){this.positionGrips()},B.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},B.prototype.createGrip=function(){var G=new i;return G.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(G.visual),G},B.prototype.positionGrips=function(){var G=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-G/2,this.y1-G/2),this.positionGrip(this.grip2.visual,this.x2-G/2,this.y2-G/2)},B.prototype.positionGrip=function(G,V,Q){var Z=G.transform.baseVal.getItem(0);Z.setTranslate(V,Q),G.transform.baseVal.replaceItem(Z,0)},B.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ee.prototype.getState.call(this))},B.prototype.restoreState=function(G){ee.prototype.restoreState.call(this,G);var V=G;this.x1=V.x1,this.y1=V.y1,this.x2=V.x2,this.y2=V.y2},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V),this.x1=this.x1*G,this.y1=this.y1*V,this.x2=this.x2*G,this.y2=this.y2*V,this.adjustVisual(),this.adjustControlBox()},B}(f),S=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.strokePanel=new h("Line color",Q.defaultColorSet,Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.visual&&G!==this.selectorLine&&G!==this.visibleLine)},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},B.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),m.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},B.prototype.setStrokeColor=function(G){this.strokeColor=G,this.adjustVisual(),this.colorChanged(G)},B.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.adjustVisual()},B.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.adjustVisual(),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){ee.prototype.restoreState.call(this,G);var V=G;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.createVisual(),this.adjustVisual()},B.typeName="LineMarker",B.title="Line marker",B.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',B}(x),C=function(ee){function B(G,V,Q,Z){var ne=ee.call(this,G,Z||'<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 ne.fonts=[],ne.fontBoxes=[],ne.fonts=V,ne.currentFont=Q,ne.setCurrentFont=ne.setCurrentFont.bind(ne),ne}return g(B,ee),B.prototype.getUi=function(){var G=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.flexGrow="2",this.fonts.forEach(function(Q){var Z=document.createElement("div");Z.style.display="inline-block",Z.style.alignItems="center",Z.style.justifyContent="space-between",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.overflow="hidden",Z.style.maxWidth=100/G.fonts.length-5+"%",Z.style.borderColor=Q===G.currentFont?G.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){G.setCurrentFont(Q,Z)}),V.appendChild(Z);var ne=document.createElement("div");ne.style.display="flex",ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.fontFamily=Q,ne.style.overflow="hidden";var re=document.createElement("div");re.style.whiteSpace="nowrap",re.style.overflow="hidden",re.style.textOverflow="ellipsis",re.innerHTML="The quick brown fox jumps over the lazy dog",ne.appendChild(re),Z.appendChild(ne),G.fontBoxes.push(Z)}),V},B.prototype.setCurrentFont=function(G,V){var Q=this;this.currentFont=G,this.fontBoxes.forEach(function(Z){Z.style.borderColor=Z===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},B}(s),j=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.color="transparent",Z.padding=5,Z.DEFAULT_TEXT="your text here",Z.text=Z.DEFAULT_TEXT,Z.isMoved=!1,Z.color=Q.defaultColor,Z.fontFamily=Q.defaultFontFamily,Z.defaultSize={x:100,y:30},Z.setColor=Z.setColor.bind(Z),Z.setFont=Z.setFont.bind(Z),Z.renderText=Z.renderText.bind(Z),Z.sizeText=Z.sizeText.bind(Z),Z.textEditDivClicked=Z.textEditDivClicked.bind(Z),Z.showTextEditor=Z.showTextEditor.bind(Z),Z.setSize=Z.setSize.bind(Z),Z.positionTextEditor=Z.positionTextEditor.bind(Z),Z.colorPanel=new h("Color",Q.defaultColorSet,Q.defaultColor),Z.colorPanel.onColorChanged=Z.setColor,Z.fontFamilyPanel=new C("Font",Q.defaultFontFamilies,Q.defaultFontFamily),Z.fontFamilyPanel.onFontChanged=Z.setFont,Z}return g(B,ee),B.prototype.ownsTarget=function(G){if(ee.prototype.ownsTarget.call(this,G)||G===this.visual||G===this.textElement||G===this.bgRectangle)return!0;var V=!1;return this.textElement.childNodes.forEach(function(Q){Q===G&&(V=!0)}),V},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.bgRectangle=m.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=m.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.isMoved=!1,this.pointerDownPoint=G,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(G),this._state="creating")},B.prototype.renderText=function(){var G=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(V){G.textElement.appendChild(m.createTSpan(V.trim()===""?" ":V.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},B.prototype.getTextScale=function(){var G=this.textElement.getBBox(),V=1;if(G.width>0&&G.height>0){var Q=(1*this.width-this.width*this.padding*2/100)/G.width,Z=(1*this.height-this.height*this.padding*2/100)/G.height;V=Math.min(Q,Z)}return V},B.prototype.getTextPosition=function(G){var V=this.textElement.getBBox(),Q=0,Z=0;return V.width>0&&V.height>0&&(Q=(this.width-V.width*G)/2,Z=this.height/2-V.height*G/2),{x:Q,y:Z}},B.prototype.sizeText=function(){var G=this.textElement.getBBox(),V=this.getTextScale(),Q=this.getTextPosition(V);Q.y-=G.y*V,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Q.x+"px, "+Q.y+"px) scale("+V+", "+V+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Q.x,Q.y),this.textElement.transform.baseVal.getItem(1).setScale(V,V))},B.prototype.manipulate=function(G){ee.prototype.manipulate.call(this,G),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(G.x-this.pointerDownPoint.x)>5||Math.abs(G.y-this.pointerDownPoint.y)>5)},B.prototype.resize=function(G){ee.prototype.resize.call(this,G),this.isMoved=!0,this.setSize(),this.sizeText()},B.prototype.setSize=function(){ee.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},B.prototype.pointerUp=function(G){var V=this.state;V==="creating"&&(this._suppressMarkerCreateEvent=!0),ee.prototype.pointerUp.call(this,G),this.setSize(),(V==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},B.prototype.showTextEditor=function(){var G=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(V){V.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var V=Number.parseFloat(G.textEditor.style.fontSize);G.textEditor.clientWidth>=Number.parseInt(G.textEditor.style.maxWidth)&&V>.9;)V-=.1,G.textEditor.style.fontSize=Math.max(V,.9)+"em"}),this.textEditor.addEventListener("keyup",function(V){V.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(V){if(V.clipboardData){var Q=V.clipboardData.getData("text"),Z=window.getSelection();if(!Z.rangeCount)return!1;Z.deleteFromDocument(),Z.getRangeAt(0).insertNode(document.createTextNode(Q)),V.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){G.textEditDivClicked(G.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},B.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var G=this.getTextScale(),V=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Q=this.textElement.getBBox(),Z={x:Q.width*G,y:Q.height*G};V.x-=Z.x/2,V.y-=Z.y/2,this.textEditor.style.top=V.y+"px",this.textEditor.style.left=V.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-V.x+"px",this.textEditor.style.fontSize=Math.max(16*G,12)+"px",this.textElement.style.display="none"}},B.prototype.textEditDivClicked=function(G){this.text=G.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},B.prototype.select=function(){ee.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},B.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ee.prototype.deselect.call(this)},B.prototype.dblClick=function(G,V){ee.prototype.dblClick.call(this,G,V),this.showTextEditor()},B.prototype.setColor=function(G){this.textElement&&m.setAttributes(this.textElement,[["fill",G]]),this.color=G,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(G)},B.prototype.setFont=function(G){this.textElement&&m.setAttributes(this.textElement,[["font-family",G]]),this.fontFamily=G,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},B.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},B.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){var V=G;this.color=V.color,this.fontFamily=V.fontFamily,this.padding=V.padding,this.text=V.text,this.createVisual(),ee.prototype.restoreState.call(this,G),this.setSize()},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V),this.setSize(),this.sizeText(),this.positionTextEditor()},B.typeName="TextMarker",B.title="Text marker",B.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>',B}(E),F=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.color="transparent",Z.lineWidth=3,Z.drawing=!1,Z.pixelRatio=1,Z.color=Q.defaultColor,Z.lineWidth=Q.defaultStrokeWidth,Z.pixelRatio=Q.freehandPixelRatio,Z.setColor=Z.setColor.bind(Z),Z.addCanvas=Z.addCanvas.bind(Z),Z.finishCreation=Z.finishCreation.bind(Z),Z.setLineWidth=Z.setLineWidth.bind(Z),Z.colorPanel=new h("Color",Q.defaultColorSet,Q.defaultColor),Z.colorPanel.onColorChanged=Z.setColor,Z.lineWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.lineWidthPanel.onWidthChanged=Z.setLineWidth,Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.visual&&G!==this.drawingImage)},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.drawingImage=m.createImage(),this.visual.appendChild(this.drawingImage);var G=m.createTransform();this.visual.transform.baseVal.appendItem(G),this.addMarkerVisualToContainer(this.visual)},B.prototype.pointerDown=function(G,V){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(G.x,G.y),this.drawing=!0):ee.prototype.pointerDown.call(this,G,V)},B.prototype.manipulate=function(G){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(G.x,G.y),this.canvasContext.stroke()):ee.prototype.manipulate.call(this,G)},B.prototype.resize=function(G){ee.prototype.resize.call(this,G),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},B.prototype.pointerUp=function(G){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ee.prototype.pointerUp.call(this,G)},B.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)},B.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.select.call(this)},B.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.deselect.call(this)},B.prototype.finishCreation=function(){for(var G=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),V=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Q=V[0],Z=V[1],ne=V[2],re=V[3],$=!1,J=0;J<this.canvasElement.height;J++)for(var le=0;le<this.canvasElement.width;le++)G.data[J*this.canvasElement.width*4+4*le+3]>0&&($=!0,J<Z&&(Z=J),le<Q&&(Q=le),J>re&&(re=J),le>ne&&(ne=le));if($){this.left=Q/this.pixelRatio,this.top=Z/this.pixelRatio,this.width=(ne-Q)/this.pixelRatio,this.height=(re-Z)/this.pixelRatio;var ue=document.createElement("canvas");ue.width=ne-Q,ue.height=re-Z,ue.getContext("2d").putImageData(this.canvasContext.getImageData(Q,Z,ne-Q,re-Z),0,0),this.drawingImgUrl=ue.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},B.prototype.setDrawingImage=function(){m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},B.prototype.setColor=function(G){this.color=G,this.colorChanged(G)},B.prototype.setLineWidth=function(G){this.lineWidth=G},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=Object.assign({drawingImgUrl:this.drawingImgUrl},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){this.createVisual(),ee.prototype.restoreState.call(this,G),this.drawingImgUrl=G.drawingImgUrl,this.setDrawingImage()},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V),this.setDrawingImage()},B.typeName="FreehandMarker",B.title="Freehand marker",B.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>',B}(E),M=function(ee){function B(G,V,Q){var Z=ee.call(this,G,Q||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Z.typeBoxes=[],Z.currentType=V,Z.setCurrentType=Z.setCurrentType.bind(Z),Z}return g(B,ee),B.prototype.getUi=function(){var G=this,V=document.createElement("div");V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2";for(var Q=function(re){var $="both";switch(re){case 0:$="both";break;case 1:$="start";break;case 2:$="end";break;case 3:$="none"}var J=document.createElement("div");if(J.style.display="flex",J.style.flexGrow="2",J.style.alignItems="center",J.style.justifyContent="space-between",J.style.padding="5px",J.style.borderWidth="2px",J.style.borderStyle="solid",J.style.borderColor=$===Z.currentType?Z.uiStyleSettings.toolboxAccentColor:"transparent",J.addEventListener("click",function(){G.setCurrentType($,J)}),V.appendChild(J),$==="both"||$==="start"){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.minHeight="20px",le.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,le.style.marginLeft="5px",J.appendChild(le)}var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.minHeight="20px",ue.style.flexGrow="2";var we=document.createElement("hr");if(we.style.minWidth="20px",we.style.border="0px",we.style.borderTop="3px solid "+(Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxColor:"#eeeeee"),we.style.flexGrow="2",ue.appendChild(we),J.appendChild(ue),$==="both"||$==="end"){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.minHeight="20px",Fe.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="`+(Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Fe.style.marginRight="5px",J.appendChild(Fe)}Z.typeBoxes.push(J)},Z=this,ne=0;ne<4;ne++)Q(ne);return V},B.prototype.setCurrentType=function(G,V){var Q=this;this.currentType=G,this.typeBoxes.forEach(function(Z){Z.style.borderColor=Z===V?Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},B}(s),Y=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.arrowType="end",Z.arrowBaseHeight=10,Z.arrowBaseWidth=10,Z.getArrowPoints=Z.getArrowPoints.bind(Z),Z.setArrowType=Z.setArrowType.bind(Z),Z.arrowTypePanel=new M("Arrow type","end"),Z.arrowTypePanel.onArrowTypeChanged=Z.setArrowType,Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.arrow1&&G!==this.arrow2)},B.prototype.getArrowPoints=function(G,V){var Q=this.arrowBaseWidth+2*this.strokeWidth,Z=this.arrowBaseHeight+2*this.strokeWidth;return G-Q/2+","+(V+Z/2)+" "+G+","+(V-Z/2)+" "+(G+Q/2)+","+(V+Z/2)},B.prototype.createTips=function(){this.arrow1=m.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=m.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow2)},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.state==="creating"&&this.createTips()},B.prototype.adjustVisual=function(){if(ee.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",m.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),m.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var G=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.arrow1.transform.baseVal.getItem(0);V.setRotate(G,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(V,0);var Q=this.arrow2.transform.baseVal.getItem(0);Q.setRotate(G+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Q,0)}},B.prototype.setArrowType=function(G){this.arrowType=G,this.adjustVisual(),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=Object.assign({arrowType:this.arrowType},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){ee.prototype.restoreState.call(this,G);var V=G;this.arrowType=V.arrowType,this.createTips(),this.adjustVisual()},B.typeName="ArrowMarker",B.title="Arrow marker",B.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',B}(S),K=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.fillColor=Q.defaultFillColor,Z.strokeWidth=0,Z.fillPanel=new h("Color",Q.defaultColorSet,Q.defaultFillColor),Z.fillPanel.onColorChanged=Z.setFillColor,Z}return g(B,ee),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=ee.prototype.getState.call(this);return G.typeName=B.typeName,G},B.typeName="CoverMarker",B.title="Cover marker",B.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',B}(y),A=function(ee){function B(G,V,Q,Z){var ne=ee.call(this,G,Z||'<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 ne.opacities=[],ne.opacityBoxes=[],ne.opacities=V,ne.currentOpacity=Q,ne.setCurrentOpacity=ne.setCurrentOpacity.bind(ne),ne}return g(B,ee),B.prototype.getUi=function(){var G=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",V.style.justifyContent="space-between",this.opacities.forEach(function(Q){var Z=document.createElement("div");Z.style.display="flex",Z.style.alignItems="center",Z.style.justifyContent="center",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.borderColor=Q===G.currentOpacity?G.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){G.setCurrentOpacity(Q,Z)}),V.appendChild(Z);var ne=document.createElement("div");ne.innerText=100*Q+"%",Z.appendChild(ne),G.opacityBoxes.push(Z)}),V},B.prototype.setCurrentOpacity=function(G,V){var Q=this;this.currentOpacity=G,this.opacityBoxes.forEach(function(Z){Z.style.borderColor=Z===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},B}(s),W=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.setOpacity=Z.setOpacity.bind(Z),Z.fillColor=Q.defaultHighlightColor,Z.strokeWidth=0,Z.opacity=Q.defaultHighlightOpacity,Z.fillPanel=new h("Color",Q.defaultColorSet,Z.fillColor),Z.fillPanel.onColorChanged=Z.setFillColor,Z.opacityPanel=new A("Opacity",Q.defaultOpacitySteps,Z.opacity),Z.opacityPanel.onOpacityChanged=Z.setOpacity,Z}return g(B,ee),B.prototype.setOpacity=function(G){this.opacity=G,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=ee.prototype.getState.call(this);return G.typeName=B.typeName,G},B.typeName="HighlightMarker",B.title="Highlight marker",B.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>',B}(K),U='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',D=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.bgColor="transparent",Z.tipPosition={x:0,y:0},Z.tipBase1Position={x:0,y:0},Z.tipBase2Position={x:0,y:0},Z.tipMoving=!1,Z.color=Q.defaultStrokeColor,Z.bgColor=Q.defaultFillColor,Z.fontFamily=Q.defaultFontFamily,Z.defaultSize={x:100,y:30},Z.setBgColor=Z.setBgColor.bind(Z),Z.getTipPoints=Z.getTipPoints.bind(Z),Z.positionTip=Z.positionTip.bind(Z),Z.setTipPoints=Z.setTipPoints.bind(Z),Z.colorPanel=new h("Text color",Q.defaultColorSet,Z.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>'),Z.colorPanel.onColorChanged=Z.setColor,Z.bgColorPanel=new h("Fill color",Q.defaultColorSet,Z.bgColor,U),Z.bgColorPanel.onColorChanged=Z.setBgColor,Z.fontFamilyPanel=new C("Font",Q.defaultFontFamilies,Q.defaultFontFamily),Z.fontFamilyPanel.onFontChanged=Z.setFont,Z.tipGrip=new i,Z.tipGrip.visual.transform.baseVal.appendItem(m.createTransform()),Z.controlBox.appendChild(Z.tipGrip.visual),Z}return g(B,ee),B.prototype.ownsTarget=function(G){return ee.prototype.ownsTarget.call(this,G)||this.tipGrip.ownsTarget(G)||this.tip===G},B.prototype.createTip=function(){m.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=m.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},B.prototype.pointerDown=function(G,V){this.state==="new"&&ee.prototype.pointerDown.call(this,G,V),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(V)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ee.prototype.pointerDown.call(this,G,V)},B.prototype.pointerUp=function(G){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ee.prototype.pointerUp.call(this,G);else{var V=this.state==="creating";ee.prototype.pointerUp.call(this,G),this.setTipPoints(V),this.positionTip()}},B.prototype.manipulate=function(G){if(this.tipMoving){var V=this.unrotatePoint(G);this.tipPosition={x:V.x-this.manipulationStartLeft,y:V.y-this.manipulationStartTop},this.positionTip()}else ee.prototype.manipulate.call(this,G)},B.prototype.setBgColor=function(G){this.bgRectangle&&this.tip&&(m.setAttributes(this.bgRectangle,[["fill",G]]),m.setAttributes(this.tip,[["fill",G]])),this.bgColor=G,this.fillColorChanged(G)},B.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},B.prototype.setTipPoints=function(G){G===void 0&&(G=!1);var V=Math.min(this.height/2,15),Q=this.height/5;G&&(this.tipPosition={x:V+Q/2,y:this.height+20});var Z=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Z<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:V,y:0},this.tipBase2Position={x:V+Q,y:0}):(this.tipBase1Position={x:0,y:V},this.tipBase2Position={x:0,y:V+Q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Z<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-V-Q,y:0},this.tipBase2Position={x:this.width-V,y:0}):(this.tipBase1Position={x:this.width,y:V},this.tipBase2Position={x:this.width,y:V+Q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Z<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-V-Q,y:this.height},this.tipBase2Position={x:this.width-V,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-V-Q},this.tipBase2Position={x:this.width,y:this.height-V}):Z<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:V,y:this.height},this.tipBase2Position={x:V+Q,y:this.height}):(this.tipBase1Position={x:0,y:this.height-V},this.tipBase2Position={x:0,y:this.height-V-Q})},B.prototype.resize=function(G){ee.prototype.resize.call(this,G),this.positionTip()},B.prototype.positionTip=function(){m.setAttributes(this.tip,[["points",this.getTipPoints()]]);var G=this.tipGrip.visual.transform.baseVal.getItem(0);G.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(G,0)},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),B.prototype.select=function(){this.positionTip(),ee.prototype.select.call(this)},B.prototype.getState=function(){var G=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){var V=G;this.bgColor=V.bgColor,this.tipPosition=V.tipPosition,ee.prototype.restoreState.call(this,G),this.createTip(),this.setTipPoints()},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V),this.tipPosition={x:this.tipPosition.x*G,y:this.tipPosition.y*V},this.positionTip()},B.typeName="CalloutMarker",B.title="Callout marker",B.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>',B}(j),X=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.fillColor="transparent",Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.opacity=1,Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.fillColor=Q.defaultFillColor,Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setFillColor=Z.setFillColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.setOpacity=Z.setOpacity.bind(Z),Z.createVisual=Z.createVisual.bind(Z),Z.strokePanel=new h("Line color",v(Q.defaultColorSet,["transparent"]),Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.fillPanel=new h("Fill color",v(Q.defaultColorSet,["transparent"]),Z.fillColor,U),Z.fillPanel.onColorChanged=Z.setFillColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z.opacityPanel=new A("Opacity",Q.defaultOpacitySteps,Z.opacity),Z.opacityPanel.onOpacityChanged=Z.setOpacity,Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.visual)},B.prototype.createVisual=function(){this.visual=m.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.state==="new"&&(this.createVisual(),this.moveVisual(G),this._state="creating")},B.prototype.manipulate=function(G){ee.prototype.manipulate.call(this,G)},B.prototype.resize=function(G){ee.prototype.resize.call(this,G),this.setSize()},B.prototype.setSize=function(){ee.prototype.setSize.call(this),m.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},B.prototype.pointerUp=function(G){ee.prototype.pointerUp.call(this,G),this.setSize()},B.prototype.setStrokeColor=function(G){this.strokeColor=G,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(G),this.stateChanged()},B.prototype.setFillColor=function(G){this.fillColor=G,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(G),this.stateChanged()},B.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},B.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},B.prototype.setOpacity=function(G){this.opacity=G,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){var V=G;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),ee.prototype.restoreState.call(this,G),this.setSize()},B.prototype.scale=function(G,V){ee.prototype.scale.call(this,G,V),this.setSize()},B.typeName="EllipseMarker",B.title="Ellipse marker",B.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>',B}(E),ie=function(ee){function B(G,V,Q){return ee.call(this,G,V,Q)||this}return g(B,ee),Object.defineProperty(B.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.tip1&&G!==this.tip2)},B.prototype.createTips=function(){this.tip1=m.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.tip1),this.tip2=m.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.tip2)},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.state==="creating"&&this.createTips()},B.prototype.adjustVisual=function(){if(ee.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(m.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var G=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.tip1.transform.baseVal.getItem(0);V.setRotate(G,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(V,0);var Q=this.tip2.transform.baseVal.getItem(0);Q.setRotate(G+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Q,0)}},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=ee.prototype.getState.call(this);return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){ee.prototype.restoreState.call(this,G),this.createTips(),this.adjustVisual()},B.typeName="MeasurementMarker",B.title="Measurement marker",B.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>',B}(S),oe=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.strokePanel.colors=Q.defaultColorSet,Z.fillColor="transparent",Z}return g(B,ee),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=ee.prototype.getState.call(this);return G.typeName=B.typeName,G},B.typeName="EllipseFrameMarker",B.title="Ellipse frame marker",B.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>',B}(X),de=function(){function ee(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ee.prototype.addUndoStep=function(B){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(B)||(this.undoStack.push(B),JSON.stringify(this.lastRedoStep)!==JSON.stringify(B)&&this.redoStack.splice(0,this.redoStack.length))},ee.prototype.replaceLastUndoStep=function(B){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=B)},ee.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ee.prototype.undo=function(){if(this.undoStack.length>1){var B=this.undoStack.pop();return B!==void 0&&this.redoStack.push(B),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ee.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ee}(),Ce=function(ee){function B(G,V,Q){var Z=ee.call(this,G,V,Q)||this;return Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.curveX=0,Z.curveY=0,Z.manipulationStartCurveX=0,Z.manipulationStartCurveY=0,Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.positionGrips=Z.positionGrips.bind(Z),Z.addControlGrips=Z.addControlGrips.bind(Z),Z.adjustVisual=Z.adjustVisual.bind(Z),Z.setupControlBox=Z.setupControlBox.bind(Z),Z.resize=Z.resize.bind(Z),Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.strokePanel=new h("Line color",Q.defaultColorSet,Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z}return g(B,ee),B.prototype.ownsTarget=function(G){return!(!ee.prototype.ownsTarget.call(this,G)&&G!==this.visual&&G!==this.selectorCurve&&G!==this.visibleCurve&&!this.curveGrip.ownsTarget(G))},B.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorCurve=m.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=m.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},B.prototype.pointerDown=function(G,V){ee.prototype.pointerDown.call(this,G,V),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=G.x,this.curveY=G.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(V)&&(this.activeGrip=this.curveGrip,this._state="resize")},B.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),m.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},B.prototype.setupControlBox=function(){ee.prototype.setupControlBox.call(this),this.curveControlLine1=m.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=m.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},B.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ee.prototype.addControlGrips.call(this)},B.prototype.positionGrips=function(){ee.prototype.positionGrips.call(this);var G=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-G/2,this.curveY-G/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()))},B.prototype.manipulate=function(G){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+G.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+G.y-this.manipulationStartY),ee.prototype.manipulate.call(this,G)},B.prototype.resize=function(G){this.activeGrip===this.curveGrip&&(this.curveX=G.x,this.curveY=G.y),ee.prototype.resize.call(this,G),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},B.prototype.setStrokeColor=function(G){this.strokeColor=G,this.adjustVisual(),this.colorChanged(G)},B.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.adjustVisual()},B.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.adjustVisual()},B.prototype.scale=function(G,V){this.curveX=this.curveX*G,this.curveY=this.curveY*V,ee.prototype.scale.call(this,G,V)},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var G=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ee.prototype.getState.call(this));return G.typeName=B.typeName,G},B.prototype.restoreState=function(G){ee.prototype.restoreState.call(this,G);var V=G;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.curveX=V.curveX,this.curveY=V.curveY,this.createVisual(),this.adjustVisual()},B.typeName="CurveMarker",B.title="Curve marker",B.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>',B}(x),Ae=function(){function ee(B,G){G===void 0&&(G=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=B,this.cancelable=G}return Object.defineProperty(ee.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ee.prototype.preventDefault=function(){this._defaultPrevented=!0},ee}(),me=function(ee){function B(G,V,Q){var Z=ee.call(this,G,!1)||this;return Z.dataUrl=V,Z.state=Q,Z}return g(B,ee),B}(Ae),Se=function(ee){function B(G,V,Q){Q===void 0&&(Q=!1);var Z=ee.call(this,G,Q)||this;return Z.marker=V,Z}return g(B,ee),B}(Ae),ye=function(){function ee(){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 ee.prototype.addEventListener=function(B,G){this[B].push(G)},ee.prototype.removeEventListener=function(B,G){var V=this[B].indexOf(G);V>-1&&this[B].splice(V,1)},ee}(),se=function(){function ee(B){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new _,this._isOpen=!1,this.undoRedoManager=new de,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 ye,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ee.instanceCounter++,this.styles=new d(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=B,this.targetRoot=document.body,this.width=B.clientWidth,this.height=B.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(ee.prototype,"ALL_MARKER_TYPES",{get:function(){return[O,F,Y,j,oe,X,W,D,ie,K,S,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[O,F,Y,j,X,W,D]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"BASIC_MARKER_TYPES",{get:function(){return[O,F,Y,j,W]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(B){var G=this;this._availableMarkerTypes.splice(0),B.forEach(function(V){if(typeof V=="string"){var Q=G.ALL_MARKER_TYPES.find(function(Z){return Z.typeName===V});Q!==void 0&&G._availableMarkerTypes.push(Q)}else G._availableMarkerTypes.push(V)})},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(B){this._zoomLevel=B,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(ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ee.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),w.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ee.prototype.show=function(){var B=this;this.styles.styleSheetRoot===void 0&&t.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=t.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(G){return G(new Ae(B))})},ee.prototype.render=function(){return T(this,void 0,void 0,function(){var B;return N(this,function(G){switch(G.label){case 0:return this.setCurrentMarker(),(B=new b).naturalSize=this.renderAtNaturalSize,B.imageType=this.renderImageType,B.imageQuality=this.renderImageQuality,B.markersOnly=this.renderMarkersOnly,B.width=this.renderWidth,B.height=this.renderHeight,[4,B.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return G.sent(),[4,B.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,G.sent()]}})})},ee.prototype.close=function(B){var G=this;if(B===void 0&&(B=!1),this.isOpen){var V=!1;B||this.eventListeners.beforeclose.forEach(function(Q){var Z=new Ae(G,!0);Q(Z),Z.defaultPrevented&&(V=!0)}),V||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Q){return Q(new Ae(G))}),this.detachEvents(),this._isOpen=!1)}},ee.prototype.addMarkersToToolbar=function(){for(var B,G=[],V=0;V<arguments.length;V++)G[V]=arguments[V];(B=this._availableMarkerTypes).push.apply(B,G)},ee.prototype.addRenderEventListener=function(B){this.addEventListener("render",function(G){B(G.dataUrl,G.state)})},ee.prototype.removeRenderEventListener=function(B){},ee.prototype.addCloseEventListener=function(B){this.addEventListener("close",function(){B()})},ee.prototype.removeCloseEventListener=function(B){},ee.prototype.setupResizeObserver=function(){var B=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){B.resize(B.target.clientWidth,B.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return B.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ee.prototype.onPopupTargetResize=function(){var B=1*this.target.clientWidth/this.target.clientHeight,G=this.editorCanvas.clientWidth/B>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*B:this.editorCanvas.clientWidth,V=G<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/B;this.resize(G,V)},ee.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ee.prototype.resize=function(B,G){this._isResizing=!0;var V=B/this.imageWidth,Q=G/this.imageHeight;this.imageWidth=Math.round(B),this.imageHeight=Math.round(G),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(V,Q),this._isResizing=!1},ee.prototype.scaleMarkers=function(B,G){var V,Q=this;this._currentMarker&&this._currentMarker instanceof j?this._currentMarker.scale(B,G):(V=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Z){Z!==Q._currentMarker&&Z.scale(B,G)}),V!==void 0&&this.setCurrentMarker(V)},ee.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"},ee.prototype.setTopLeft=function(){var B=this.editingTarget.getBoundingClientRect(),G=this.editorCanvas.getBoundingClientRect();this.left=B.left-G.left,this.top=B.top-G.top},ee.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)},ee.prototype.addDefs=function(){for(var B,G=[],V=0;V<arguments.length;V++)G[V]=arguments[V];this.defs=m.createDefs(),this.addDefsToImage(),(B=this.defs).append.apply(B,G)},ee.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ee.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)},ee.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ee.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ee.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)},ee.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ee.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)},ee.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 B=document.createElement("a");B.href="https://markerjs.com/",B.target="_blank",B.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>',B.title="Powered by marker.js",B.style.display="grid",B.style.alignItems="center",B.style.justifyItems="center",B.style.padding="3px",B.style.width="20px",B.style.height="20px",this.logoUI.appendChild(B),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ee.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")},ee.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"},ee.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ee.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 B=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=B+"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 o(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new n(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ee.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ee.prototype.removeMarker=function(B){this.markerImage.removeChild(B.container),this.markers.indexOf(B)>-1&&this.markers.splice(this.markers.indexOf(B),1),B.dispose()},ee.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())},ee.prototype.toolbarButtonClicked=function(B,G){if(B==="marker"&&G!==void 0)this.createNewMarker(G);else if(B==="action")switch(G){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()}},ee.prototype.deleteSelectedMarker=function(){var B=this;if(this._currentMarker!==void 0){var G=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Q){var Z=new Se(B,B._currentMarker,!0);Q(Z),Z.defaultPrevented&&(G=!0)}),!G){var V=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Q){return Q(new Se(B,V))})}}},ee.prototype.clear=function(){var B=this,G=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ne){var re=new Se(B,void 0,!0);ne(re),re.defaultPrevented&&(G=!0)}),!G)){this.setCurrentMarker();for(var V=function(ne){var re=Q.markers[ne];Q.setCurrentMarker(Q.markers[ne]),Q._currentMarker.dispose(),Q.markerImage.removeChild(Q._currentMarker.container),Q.markers.splice(Q.markers.indexOf(Q._currentMarker),1),Q.eventListeners.markerdelete.forEach(function($){return $(new Se(B,re))})},Q=this,Z=this.markers.length-1;Z>=0;Z--)V(Z);this.addUndoStep()}},Object.defineProperty(ee.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ee.prototype.showNotesEditor=function(){var B;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=(B=this._currentMarker.notes)!==null&&B!==void 0?B:"",this.overlayContainer.appendChild(this.notesArea))},ee.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)},ee.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ee.prototype.addUndoStep=function(){var B=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var G=this.getState(),V=this.undoRedoManager.getLastUndoStep();if(!V||V.width===G.width&&V.height===G.height){var Q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(G),Q<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Z){return Z(new Ae(B))})}else this.undoRedoManager.replaceLastUndoStep(G),this.eventListeners.statechange.forEach(function(Z){return Z(new Ae(B))})}},ee.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ee.prototype.undoStep=function(){var B=this,G=this.undoRedoManager.undo();G!==void 0&&(this.restoreState(G),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(V){return V(new Ae(B))}))},ee.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ee.prototype.redoStep=function(){var B=this,G=this.undoRedoManager.redo();G!==void 0&&(this.restoreState(G),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(V){return V(new Ae(B))}))},ee.prototype.stepZoom=function(){var B=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=B<this.zoomSteps.length-1?this.zoomSteps[B+1]:this.zoomSteps[0]},ee.prototype.panTo=function(B){this.contentDiv.scrollBy({left:this.prevPanPoint.x-B.x,top:this.prevPanPoint.y-B.y}),this.prevPanPoint=B},ee.prototype.startRenderAndClose=function(){return T(this,void 0,void 0,function(){var B,G,V=this;return N(this,function(Q){switch(Q.label){case 0:return[4,this.render()];case 1:return B=Q.sent(),G=this.getState(),this.eventListeners.render.forEach(function(Z){return Z(new me(V,B,G))}),this.close(!0),[2]}})})},ee.prototype.getState=function(B){B===!0&&this.setCurrentMarker();var G={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(V){return G.markers.push(V.getState())}),G},ee.prototype.restoreState=function(B){var G=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);B.markers.forEach(function(V){var Q=G._availableMarkerTypes.find(function(ne){return ne.typeName===V.typeName});if(Q!==void 0){var Z=G.addNewMarker(Q);Z.restoreState(V),G.markers.push(Z)}}),B.width&&B.height&&(B.width!==this.imageWidth||B.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/B.width,this.imageHeight/B.height),this.eventListeners.restorestate.forEach(function(V){return V(new Ae(G))})},ee.prototype.addNewMarker=function(B){var G=m.createGroup();return this.markerImage.appendChild(G),new B(G,this.overlayContainer,this.settings)},ee.prototype.createNewMarker=function(B){var G,V=this;(G=typeof B=="string"?this._availableMarkerTypes.find(function(Q){return Q.typeName===B}):B)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(G),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(G.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Q){return Q(new Se(V,V._currentMarker))}))},ee.prototype.markerCreated=function(B){var G=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(B),this.setCurrentMarker(B),B instanceof F&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(F):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(V){return V(new Se(G,G._currentMarker))})},ee.prototype.colorChanged=function(B){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=B,this.settings.defaultStrokeColor=B)},ee.prototype.fillColorChanged=function(B){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=B)},ee.prototype.markerStateChanged=function(B){var G=this;this.eventListeners.markerchange.forEach(function(V){return V(new Se(G,B))})},ee.prototype.setCurrentMarker=function(B){var G=this;this._currentMarker!==B&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(V){return V(new Se(G,G._currentMarker))})),this._currentMarker=B,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(V){return V(new Se(G,G._currentMarker))}))},ee.prototype.onPointerDown=function(B){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||B.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var G=this.markers.find(function(V){return V.ownsTarget(B.target)});G!==void 0?(this.setCurrentMarker(G),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(B.clientX,B.clientY),B.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:B.clientX,y:B.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(B.clientX,B.clientY))},ee.prototype.onDblClick=function(B){if(this._isFocused||this.focus(),this.mode==="select"){var G=this.markers.find(function(V){return V.ownsTarget(B.target)});G!==void 0&&G!==this._currentMarker&&this.setCurrentMarker(G),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(B.clientX,B.clientY),B.target):this.setCurrentMarker()}},ee.prototype.onPointerMove=function(B){this.touchPoints!==1&&B.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||B.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(B.clientX,B.clientY)):this.zoomLevel>1&&this.panTo({x:B.clientX,y:B.clientY}))},ee.prototype.onPointerUp=function(B){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(B.clientX,B.clientY)),this.isDragging=!1,this.addUndoStep()},ee.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ee.prototype.onKeyUp=function(B){this._currentMarker===void 0||this.notesArea!==void 0||B.key!=="Delete"&&B.key!=="Backspace"||this.deleteSelectedMarker()},ee.prototype.clientToLocalCoordinates=function(B,G){var V=this.markerImage.getBoundingClientRect();return{x:(B-V.left)/this.zoomLevel,y:(G-V.top)/this.zoomLevel}},ee.prototype.onWindowResize=function(){this.positionUI()},ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var B=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=B+"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()},ee.prototype.addLicenseKey=function(B){w.addKey(B)},ee.prototype.addEventListener=function(B,G){this.eventListeners.addEventListener(B,G)},ee.prototype.removeEventListener=function(B,G){this.eventListeners.removeEventListener(B,G)},ee.prototype.renderState=function(B){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(B),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ee.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ee.prototype.focus=function(){var B=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(G){return G(new Ae(B))}))},ee.prototype.blur=function(){var B=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(G){return G(new Ae(B))}))},ee.instanceCounter=0,ee}()},Sjjz:function(H,q,L){H.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},T8No:function(H,q,L){"use strict";L.d(q,"a",function(){return w}),L.d(q,"e",function(){return b}),L.d(q,"c",function(){return S}),L.d(q,"b",function(){return C}),L.d(q,"d",function(){return j}),L.d(q,"f",function(){return Y});var P=L("MNsG"),g=L("N0LK"),T=L("Cg/j");let N=P.k||"";const v=new Map;v.set("false",!1),v.set("true",!0),v.set("isMac",P.f),v.set("isLinux",P.d),v.set("isWindows",P.i),v.set("isWeb",P.h),v.set("isMacNative",P.f&&!P.h),v.set("isEdge",N.indexOf("Edg/")>=0),v.set("isFirefox",N.indexOf("Firefox")>=0),v.set("isChrome",N.indexOf("Chrome")>=0),v.set("isSafari",N.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class w{static has(A){return c.create(A)}static equals(A,W){return o.create(A,W)}static regex(A,W){return p.create(A,W)}static not(A){return f.create(A)}static and(...A){return _.create(A,null)}static or(...A){return x.create(A,null,!0)}static deserialize(A,W=!1){return A?this._deserializeOrExpression(A,W):void 0}static _deserializeOrExpression(A,W){let U=A.split("||");return x.create(U.map(D=>this._deserializeAndExpression(D,W)),null,!0)}static _deserializeAndExpression(A,W){let U=A.split("&&");return _.create(U.map(D=>this._deserializeOne(D,W)),null)}static _deserializeOne(A,W){if(A=A.trim(),A.indexOf("!=")>=0){let U=A.split("!=");return h.create(U[0].trim(),this._deserializeValue(U[1],W))}if(A.indexOf("==")>=0){let U=A.split("==");return o.create(U[0].trim(),this._deserializeValue(U[1],W))}if(A.indexOf("=~")>=0){let U=A.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],W))}if(A.indexOf(" in ")>=0){let U=A.split(" in ");return n.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(A)){const U=A.split(">=");return r.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(A)){const U=A.split(">");return i.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(A)){const U=A.split("<=");return y.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(A)){const U=A.split("<");return E.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(A)?f.create(A.substr(1).trim()):c.create(A)}static _deserializeValue(A,W){if(A=A.trim(),A==="true")return!0;if(A==="false")return!1;let U=/^'([^']*)'$/.exec(A);return U?U[1].trim():A}static _deserializeRegexValue(A,W){if(Object(g.C)(A)){if(W)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=A.indexOf("/"),D=A.lastIndexOf("/");if(U===D||U<0){if(W)throw new Error(`bad regexp-value '${A}', missing /-enclosure`);return console.warn(`bad regexp-value '${A}', missing /-enclosure`),null}let X=A.slice(U+1,D),ie=A[D+1]==="i"?"i":"";try{return new RegExp(X,ie)}catch(oe){if(W)throw new Error(`bad regexp-value '${A}', parse error: ${oe}`);return console.warn(`bad regexp-value '${A}', parse error: ${oe}`),null}}}function b(A,W){const U=A?A.substituteConstants():void 0,D=W?W.substituteConstants():void 0;return!U&&!D?!0:!U||!D?!1:U.equals(D)}function t(A,W){return A.cmp(W)}class d{constructor(){this.type=0}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!1}serialize(){return"false"}keys(){return[]}negate(){return a.INSTANCE}}d.INSTANCE=new d;class a{constructor(){this.type=1}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!0}serialize(){return"true"}keys(){return[]}negate(){return d.INSTANCE}}a.INSTANCE=new a;class c{constructor(A,W){this.key=A,this.negated=W,this.type=2}static create(A,W=null){const U=v.get(A);return typeof U=="boolean"?U?a.INSTANCE:d.INSTANCE:new c(A,W)}cmp(A){return A.type!==this.type?this.type-A.type:F(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=v.get(this.key);return typeof A=="boolean"?A?a.INSTANCE:d.INSTANCE:this}evaluate(A){return!!A.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}class o{constructor(A,W,U){this.key=A,this.value=W,this.negated=U,this.type=4}static create(A,W,U=null){if(typeof W=="boolean")return W?c.create(A,U):f.create(A,U);const D=v.get(A);if(typeof D=="boolean"){const X=D?"true":"false";return W===X?a.INSTANCE:d.INSTANCE}return new o(A,W,U)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=v.get(this.key);if(typeof A=="boolean"){const W=A?"true":"false";return this.value===W?a.INSTANCE:d.INSTANCE}return this}evaluate(A){return A.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class n{constructor(A,W){this.key=A,this.valueKey=W,this.type=10,this.negated=null}static create(A,W){return new n(A,W)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.valueKey,A.key,A.valueKey)}equals(A){return A.type===this.type?this.key===A.key&&this.valueKey===A.valueKey:!1}substituteConstants(){return this}evaluate(A){const W=A.getValue(this.valueKey),U=A.getValue(this.key);return Array.isArray(W)?W.indexOf(U)>=0:typeof U=="string"&&typeof W=="object"&&W!==null?m.call(W,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(A){this._actual=A,this.type=11}static create(A){return new s(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class h{constructor(A,W,U){this.key=A,this.value=W,this.negated=U,this.type=5}static create(A,W,U=null){if(typeof W=="boolean")return W?f.create(A,U):c.create(A,U);const D=v.get(A);if(typeof D=="boolean"){const X=D?"true":"false";return W===X?d.INSTANCE:a.INSTANCE}return new h(A,W,U)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=v.get(this.key);if(typeof A=="boolean"){const W=A?"true":"false";return this.value===W?d.INSTANCE:a.INSTANCE}return this}evaluate(A){return A.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class f{constructor(A,W){this.key=A,this.negated=W,this.type=3}static create(A,W=null){const U=v.get(A);return typeof U=="boolean"?U?d.INSTANCE:a.INSTANCE:new f(A,W)}cmp(A){return A.type!==this.type?this.type-A.type:F(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=v.get(this.key);return typeof A=="boolean"?A?d.INSTANCE:a.INSTANCE:this}evaluate(A){return!A.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}function u(A,W){if(typeof A=="string"){const U=parseFloat(A);isNaN(U)||(A=U)}return typeof A=="string"||typeof A=="number"?W(A):d.INSTANCE}class i{constructor(A,W,U){this.key=A,this.value=W,this.negated=U,this.type=12}static create(A,W,U=null){return u(W,D=>new i(A,D,U))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class r{constructor(A,W,U){this.key=A,this.value=W,this.negated=U,this.type=13}static create(A,W,U=null){return u(W,D=>new r(A,D,U))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(A,W,U){this.key=A,this.value=W,this.negated=U,this.type=14}static create(A,W,U=null){return u(W,D=>new E(A,D,U))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class y{constructor(A,W,U){this.key=A,this.value=W,this.negated=U,this.type=15}static create(A,W,U=null){return u(W,D=>new y(A,D,U))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class p{constructor(A,W){this.key=A,this.regexp=W,this.type=7,this.negated=null}static create(A,W){return new p(A,W)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.key<A.key)return-1;if(this.key>A.key)return 1;const W=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return W<U?-1:W>U?1:0}equals(A){if(A.type===this.type){const W=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return this.key===A.key&&W===U}return!1}substituteConstants(){return this}evaluate(A){let W=A.getValue(this.key);return this.regexp?this.regexp.test(W):!1}serialize(){const A=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${A}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(A){this._actual=A,this.type=8}static create(A){return new R(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(A){let W=null;for(let U=0,D=A.length;U<D;U++){const X=A[U].substituteConstants();if(A[U]!==X&&W===null){W=[];for(let ie=0;ie<U;ie++)W[ie]=A[ie]}W!==null&&(W[U]=X)}return W===null?A:W}class _{constructor(A,W){this.expr=A,this.negated=W,this.type=6}static create(A,W){return _._normalizeArr(A,W)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let W=0,U=this.expr.length;W<U;W++){const D=t(this.expr[W],A.expr[W]);if(D!==0)return D}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let W=0,U=this.expr.length;W<U;W++)if(!this.expr[W].equals(A.expr[W]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:_.create(A,this.negated)}evaluate(A){for(let W=0,U=this.expr.length;W<U;W++)if(!this.expr[W].evaluate(A))return!1;return!0}static _normalizeArr(A,W){const U=[];let D=!1;for(const X of A){if(!X)continue;if(X.type===1){D=!0;continue}if(X.type===0)return d.INSTANCE;if(X.type===6){U.push(...X.expr);continue}U.push(X)}if(U.length===0&&D)return a.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(t);for(let X=1;X<U.length;X++)U[X-1].equals(U[X])&&(U.splice(X,1),X--);if(U.length===1)return U[0];for(;U.length>1;){const X=U[U.length-1];if(X.type!==9)break;U.pop();const ie=U.pop(),oe=U.length===0,de=x.create(X.expr.map(Ce=>_.create([Ce,ie],null)),null,oe);de&&(U.push(de),U.sort(t))}return U.length===1?U[0]:new _(U,W)}serialize(){return this.expr.map(A=>A.serialize()).join(" && ")}keys(){const A=[];for(let W of this.expr)A.push(...W.keys());return A}negate(){if(!this.negated){const A=[];for(let W of this.expr)A.push(W.negate());this.negated=x.create(A,this,!0)}return this.negated}}class x{constructor(A,W){this.expr=A,this.negated=W,this.type=9}static create(A,W,U){return x._normalizeArr(A,W,U)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let W=0,U=this.expr.length;W<U;W++){const D=t(this.expr[W],A.expr[W]);if(D!==0)return D}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let W=0,U=this.expr.length;W<U;W++)if(!this.expr[W].equals(A.expr[W]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:x.create(A,this.negated,!1)}evaluate(A){for(let W=0,U=this.expr.length;W<U;W++)if(this.expr[W].evaluate(A))return!0;return!1}static _normalizeArr(A,W,U){let D=[],X=!1;if(A){for(let ie=0,oe=A.length;ie<oe;ie++){const de=A[ie];if(!de)continue;if(de.type===0){X=!0;continue}if(de.type===1)return a.INSTANCE;if(de.type===9){D=D.concat(de.expr);continue}D.push(de)}if(D.length===0&&X)return d.INSTANCE;D.sort(t)}if(D.length===0)return;if(D.length===1)return D[0];for(let ie=1;ie<D.length;ie++)D[ie-1].equals(D[ie])&&(D.splice(ie,1),ie--);if(D.length===1)return D[0];if(U){for(let ie=0;ie<D.length;ie++)for(let oe=ie+1;oe<D.length;oe++)Y(D[ie],D[oe])&&(D.splice(oe,1),oe--);if(D.length===1)return D[0]}return new x(D,W)}serialize(){return this.expr.map(A=>A.serialize()).join(" || ")}keys(){const A=[];for(let W of this.expr)A.push(...W.keys());return A}negate(){if(!this.negated){let A=[];for(let W of this.expr)A.push(W.negate());for(;A.length>1;){const W=A.shift(),U=A.shift(),D=[];for(const ie of K(W))for(const oe of K(U))D.push(_.create([ie,oe],null));const X=A.length===0;A.unshift(x.create(D,null,X))}this.negated=A[0]}return this.negated}}class S extends c{constructor(A,W,U){super(A,null);this._defaultValue=W,typeof U=="object"?S._info.push(Object.assign(Object.assign({},U),{key:A})):U!==!0&&S._info.push({key:A,description:U,type:W!=null?typeof W:void 0})}static all(){return S._info.values()}bindTo(A){return A.createKey(this.key,this._defaultValue)}getValue(A){return A.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(A){return o.create(this.key,A)}}S._info=[];const C=Object(T.c)("contextKeyService"),j="setContext";function F(A,W){return A<W?-1:A>W?1:0}function M(A,W,U,D){return A<U?-1:A>U?1:W<D?-1:W>D?1:0}function Y(A,W){if(W.type===6&&A.type!==9&&A.type!==6){for(const X of W.expr)if(A.equals(X))return!0}const U=A.negate(),D=K(U).concat(K(W));D.sort(t);for(let X=0;X<D.length;X++){const ie=D[X],oe=ie.negate();for(let de=X+1;de<D.length;de++){const Ce=D[de];if(oe.equals(Ce))return!0}}return!1}function K(A){return A.type===9?A.expr:[A]}},TXwP:function(H,q,L){var P,g;(function(){var T;(function(){"use strict";var v=[,,function(t){function d(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var o=new d(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},d.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},d.prototype.has_match=function(o){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(o))return!0;return!1},d.prototype.set_indent=function(o,n){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(o){this.__items.push(o);var n=o.lastIndexOf(`
`);n!==-1?this.__character_count=o.length-n:this.__character_count+=o.length},d.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,n){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),n=n||"",o.indent_level>0&&(n=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}a.prototype.get_indent_size=function(o,n){var s=this.__base_string_length;return n=n||0,o<0&&(s=0),s+=o*this.__indent_size,s+=n,s},a.prototype.get_indent_string=function(o,n){var s=this.__base_string;return n=n||0,o<0&&(o=0,s=""),n+=o*this.__indent_size,this.__ensure_cache(n),s+=this.__cache[n],s},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,n=0,s="";this.__indent_size&&o>=this.__indent_size&&(n=Math.floor(o/this.__indent_size),o-=n*this.__indent_size,s=new Array(n+1).join(this.__indent_string)),o&&(s+=new Array(o+1).join(" ")),this.__cache.push(s)};function c(o,n){this.__indent_cache=new a(o,n),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(o,n){return this.__indent_cache.get_indent_string(o,n)},c.prototype.get_indent_size=function(o,n){return this.__indent_cache.get_indent_size(o,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(o){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return o!==`
`&&(s=s.replace(/[\n]/g,o)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(o,n){return o=o||0,n=n||0,this.next_line.set_indent(o,n),this.__lines.length>1?(this.current_line.set_indent(o,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(o){for(var n=0;n<o.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(o){for(var n=this.__lines.length;o<n;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(o,n){for(var s=this.__lines.length-2;s>=0;){var h=this.__lines[s];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==n){this.__lines.splice(s+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},,,,function(t){function d(o,n){this.raw_options=a(o,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(o,n){var s=this.raw_options[o],h=n||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(h=s.concat()):typeof s=="string"&&(h=s.split(/[^a-zA-Z0-9_\/\-]+/)),h},d.prototype._get_boolean=function(o,n){var s=this.raw_options[o],h=s===void 0?!!n:!!s;return h},d.prototype._get_characters=function(o,n){var s=this.raw_options[o],h=n||"";return typeof s=="string"&&(h=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),h},d.prototype._get_number=function(o,n){var s=this.raw_options[o];n=parseInt(n,10),isNaN(n)&&(n=0);var h=parseInt(s,10);return isNaN(h)&&(h=n),h},d.prototype._get_selection=function(o,n,s){var h=this._get_selection_list(o,n,s);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[o]+"'");return h[0]},d.prototype._get_selection_list=function(o,n,s){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[n[0]],!this._is_valid_selection(s,n))throw new Error("Invalid Default Value!");var h=this._get_array(o,s);if(!this._is_valid_selection(h,n))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[o]+"'");return h},d.prototype._is_valid_selection=function(o,n){return o.length&&n.length&&!o.some(function(s){return n.indexOf(s)===-1})};function a(o,n){var s={};o=c(o);var h;for(h in o)h!==n&&(s[h]=o[h]);if(n&&o[n])for(h in o[n])s[h]=o[n][h];return s}function c(o){var n={},s;for(s in o){var h=s.replace(/-/g,"_");n[h]=o[s]}return n}t.exports.Options=d,t.exports.normalizeOpts=c,t.exports.mergeOpts=a},,function(t){var d=RegExp.prototype.hasOwnProperty("sticky");function a(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},a.prototype.peek=function(c){var o=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(o=this.__input.charAt(c)),o},a.prototype.__match=function(c,o){c.lastIndex=o;var n=c.exec(this.__input);return n&&!(d&&c.sticky)&&(n.index!==o&&(n=null)),n},a.prototype.test=function(c,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(c,o):!1},a.prototype.testChar=function(c,o){var n=this.peek(o);return c.lastIndex=0,n!==null&&c.test(n)},a.prototype.match=function(c){var o=this.__match(c,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(c,o,n){var s="",h;return c&&(h=this.match(c),h&&(s+=h[0])),o&&(h||!c)&&(s+=this.readUntil(o,n)),s},a.prototype.readUntil=function(c,o){var n="",s=this.__position;c.lastIndex=this.__position;var h=c.exec(this.__input);return h?(s=h.index,o&&(s+=h[0].length)):s=this.__input_length,n=this.__input.substring(this.__position,s),this.__position=s,n},a.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},a.prototype.get_regexp=function(c,o){var n=null,s="g";return o&&d&&(s="y"),typeof c=="string"&&c!==""?n=new RegExp(c,s):c&&(n=new RegExp(c.source,s)),n},a.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(c){var o=this.__position,n=this.readUntilAfter(c);return this.__position=o,n},a.prototype.lookBack=function(c){var o=this.__position-1;return o>=c.length&&this.__input.substring(o-c.length,o).toLowerCase()===c},t.exports.InputScanner=a},,,,,function(t){function d(a,c){a=typeof a=="string"?a:a.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)c[o[1]]=o[2],o=this.__directive_pattern.exec(a);return c},d.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=d},,function(t,d,a){var c=a(16).Beautifier,o=a(17).Options;function n(s,h){var f=new c(s,h);return f.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new o}},function(t,d,a){var c=a(17).Options,o=a(2).Output,n=a(8).InputScanner,s=a(13).Directives,h=new s(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,i=/\s/,r=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,y=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(R,O){this._source_text=R||"",this._options=new c(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(R){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return O},p.prototype.eatWhitespace=function(R){for(var O=i.test(this._input.peek()),_=0;i.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===`
`&&((_===0||_<this._options.max_preserve_newlines)&&(_++,this._output.add_new_line(!0)));return O},p.prototype.foundNestedPseudoClass=function(){for(var R=0,O=1,_=this._input.peek(O);_;){if(_==="{")return!0;if(_==="(")R+=1;else if(_===")"){if(R===0)return!1;R-=1}else if(_===";"||_==="}")return!1;O++,_=this._input.peek(O)}return!1},p.prototype.print_string=function(R){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(R)},p.prototype.preserveSingleSpace=function(R){R&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,O=this._options.eol;O==="auto"&&(O=`
`,R&&f.test(R||"")&&(O=R.match(f)[0])),R=R.replace(u,`
`);var _=R.match(/^[\t ]*/)[0];this._output=new o(this._options,_),this._input=new n(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,S=!1,C=!1,j=!1,F=!1,M=!1,Y=!1,K=this._ch,A=!1,W,U,D;W=this._input.read(r),U=W!=="",D=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var X=this._input.read(E),ie=h.get_directives(X);ie&&ie.ignore==="start"&&(X+=h.readIgnored(this._input)),this.print_string(X),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(y)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);oe.match(/[ :]$/)&&(oe=this.eatString(": ").replace(/\s$/,""),this.print_string(oe),this._output.space_before_token=!0),oe=oe.replace(/\s$/,""),oe==="extend"?F=!0:oe==="import"&&(M=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(j=!0)):!S&&x===0&&oe.indexOf(":")!==-1&&(C=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")C&&(C=!1,this.outdent()),j?(j=!1,S=this._indentLevel>=this._nestedLevel):S=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&S&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(D==="("?this._output.space_before_token=!1:D!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),D==="{"&&this._output.trim(!0),M=!1,F=!1,C&&(this.outdent(),C=!1),this.print_string(this._ch),S=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var de=0;de<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;de++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[de])){A=!0;break}(S||j)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!F&&x===0?(this.print_string(":"),C||(C=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ce=D==='"'||D==="'";this.preserveSingleSpace(Ce||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")A=!1,x===0?(C&&(this.outdent(),C=!1),F=!1,M=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),x++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),x&&(x--,this.outdent()));else{var Ae=!1;this._input.lookBack("with")&&(Ae=!0),this.preserveSingleSpace(U||Ae),this.print_string(this._ch),C&&D==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),Y=!0):(this.eatWhitespace(),x++,this.indent())}else if(this._ch===")")x&&(x--,this.outdent()),Y&&this._input.peek()===";"&&this._options.selector_separator_newline&&(Y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!C||Y)&&x===0&&!M&&!F?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!C&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&i.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),i.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var me=D==='"'||D==="'";this.preserveSingleSpace(me||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&A&&this._output.add_new_line()}var Se=this._output.get_code(O);return Se},t.exports.Beautifier=p},function(t,d,a){var c=a(6).Options;function o(n){c.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f<h.length;f++)h[f]!=="expand"?this.brace_style="collapse":this.brace_style=h[f]}o.prototype=new c,t.exports.Options=o}],m={};function w(t){var d=m[t];if(d!==void 0)return d.exports;var a=m[t]={exports:{}};return v[t](a,a.exports,w),a.exports}var b=w(15);T=b})();var N=T;!(P=[],g=function(){return{css_beautify:N}}.apply(q,P),g!==void 0&&(H.exports=g))})()},UfjD:function(H,q,L){"use strict";var P=L("2qtc"),g=L("kLXV"),T=L("5NDa"),N=L("5rEg"),v=L("miYZ"),m=L("tsqr"),w=L("tJVT"),b=L("q1tI"),t=L.n(b),d=L("4i/N");function a(c){var o=c.isjoin,n=c.setJoin,s=c.JoinTeams,h=Object(b.useState)(""),f=Object(w.a)(h,2),u=f[0],i=f[1];return t.a.createElement(g.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),t.a.createElement(d.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:o,closable:!1,destroyOnClose:!0,onOk:function(){if(!u){m.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}s(u)},onCancel:function(){return n(!1)}},t.a.createElement("div",null,t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},t.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",t.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:u,maxLength:60,addonAfter:String(u&&u.length||0)+"/60",onChange:function(E){return i(E.target.value)}}))))}q.a=a},Vhoy:function(H,q,L){"use strict";L.d(q,"d",function(){return N}),L.d(q,"e",function(){return v}),L.d(q,"c",function(){return m}),L.d(q,"b",function(){return w}),L.d(q,"a",function(){return b});var P=L("MI8n");class g{constructor(){this._icons=new Map,this._onDidRegister=new P.b}add(t){const d=this._icons.get(t.id);d?t.description?d.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const T=new g,N=T;function v(t,d){return new w(t,d)}function m(t){return t?t.replace(/\$\((.*?)\)/g,(d,a)=>` ${a} `).trim():""}class w{constructor(t,d,a){this.id=t,this.definition=d,this.description=a,T.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var b;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const d=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function a(n){if(n instanceof w)return["codicon","codicon-"+n.id];const s=d.exec(n.id);if(!s)return a(w.error);let[,h,f]=s;const u=["codicon","codicon-"+h];return f&&u.push("codicon-modifier-"+f.substr(1)),u}t.asClassNameArray=a;function c(n){return a(n).join(" ")}t.asClassName=c;function o(n){return"."+a(n).join(".")}t.asCSSSelector=o})(b||(b={})),function(t){t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",{fontCharacter:"\\ea71"}),t.closeDirty=new t("close-dirty",{fontCharacter:"\\ea71"}),t.debugBreakpoint=new t("debug-breakpoint",{fontCharacter:"\\ea71"}),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),t.debugHint=new t("debug-hint",{fontCharacter:"\\ea71"}),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circleOutline=new t("circle-outline",{fontCharacter:"\\eabc"}),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.debugStackframeDot=new t("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLargeOutline=new t("circle-large-outline",{fontCharacter:"\\ebb5"}),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"})}(w||(w={}))},"VrN/":function(H,q,L){(function(P,g){H.exports=g()})(this,function(){"use strict";var P=navigator.userAgent,g=navigator.platform,T=/gecko\/\d/i.test(P),N=/MSIE \d/.test(P),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),m=/Edge\/(\d+)/.exec(P),w=N||v||m,b=w&&(N?document.documentMode||6:+(m||v)[1]),t=!m&&/WebKit\//.test(P),d=t&&/Qt\/\d+\.\d+/.test(P),a=!m&&/Chrome\//.test(P),c=/Opera\//.test(P),o=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),s=/PhantomJS/.test(P),h=!m&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),f=/Android/.test(P),u=h||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),i=h||/Mac/.test(g),r=/\bCrOS\b/.test(P),E=/win/i.test(g),y=c&&P.match(/Version\/(\d*\.\d*)/);y&&(y=Number(y[1])),y&&y>=15&&(c=!1,t=!0);var p=i&&(d||c&&(y==null||y<12.11)),R=T||w&&b>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _=function(e,l){var k=e.className,I=O(l).exec(k);if(I){var z=k.slice(I.index+I[0].length);e.className=k.slice(0,I.index)+(z?I[1]+z:"")}};function x(e){for(var l=e.childNodes.length;l>0;--l)e.removeChild(e.firstChild);return e}function S(e,l){return x(e).appendChild(l)}function C(e,l,k,I){var z=document.createElement(e);if(k&&(z.className=k),I&&(z.style.cssText=I),typeof l=="string")z.appendChild(document.createTextNode(l));else if(l)for(var te=0;te<l.length;++te)z.appendChild(l[te]);return z}function j(e,l,k,I){var z=C(e,l,k,I);return z.setAttribute("role","presentation"),z}var F;document.createRange?F=function(e,l,k,I){var z=document.createRange();return z.setEnd(I||e,k),z.setStart(e,l),z}:F=function(e,l,k){var I=document.body.createTextRange();try{I.moveToElementText(e.parentNode)}catch(z){return I}return I.collapse(!0),I.moveEnd("character",k),I.moveStart("character",l),I};function M(e,l){if(l.nodeType==3&&(l=l.parentNode),e.contains)return e.contains(l);do if(l.nodeType==11&&(l=l.host),l==e)return!0;while(l=l.parentNode)}function Y(){var e;try{e=document.activeElement}catch(l){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function K(e,l){var k=e.className;O(l).test(k)||(e.className+=(k?" ":"")+l)}function A(e,l){for(var k=e.split(" "),I=0;I<k.length;I++)k[I]&&!O(k[I]).test(l)&&(l+=" "+k[I]);return l}var W=function(e){e.select()};h?W=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(W=function(e){try{e.select()}catch(l){}});function U(e){var l=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,l)}}function D(e,l,k){l||(l={});for(var I in e)e.hasOwnProperty(I)&&(k!==!1||!l.hasOwnProperty(I))&&(l[I]=e[I]);return l}function X(e,l,k,I,z){l==null&&(l=e.search(/[^\s\u00a0]/),l==-1&&(l=e.length));for(var te=I||0,ae=z||0;;){var he=e.indexOf(" ",te);if(he<0||he>=l)return ae+(l-te);ae+=he-te,ae+=k-ae%k,te=he+1}}var ie=function(){this.id=null,this.f=null,this.time=0,this.handler=U(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,l){this.f=l;var k=+new Date+e;(!this.id||k<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=k)};function oe(e,l){for(var k=0;k<e.length;++k)if(e[k]==l)return k;return-1}var de=50,Ce={toString:function(){return"CodeMirror.Pass"}},Ae={scroll:!1},me={origin:"*mouse"},Se={origin:"+move"};function ye(e,l,k){for(var I=0,z=0;;){var te=e.indexOf(" ",I);te==-1&&(te=e.length);var ae=te-I;if(te==e.length||z+ae>=l)return I+Math.min(ae,l-z);if(z+=te-I,z+=k-z%k,I=te+1,z>=l)return I}}var se=[""];function ee(e){for(;se.length<=e;)se.push(B(se)+" ");return se[e]}function B(e){return e[e.length-1]}function G(e,l){for(var k=[],I=0;I<e.length;I++)k[I]=l(e[I],I);return k}function V(e,l,k){for(var I=0,z=k(l);I<e.length&&k(e[I])<=z;)I++;e.splice(I,0,l)}function Q(){}function Z(e,l){var k;return Object.create?k=Object.create(e):(Q.prototype=e,k=new Q),l&&D(l,k),k}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function $(e,l){return l?l.source.indexOf("\\w")>-1&&re(e)?!0:l.test(e):re(e)}function J(e){for(var l in e)if(e.hasOwnProperty(l)&&e[l])return!1;return!0}var le=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&le.test(e)}function we(e,l,k){for(;(k<0?l>0:l<e.length)&&ue(e.charAt(l));)l+=k;return l}function Fe(e,l,k){for(var I=l>k?-1:1;;){if(l==k)return l;var z=(l+k)/2,te=I<0?Math.ceil(z):Math.floor(z);if(te==l)return e(te)?l:k;e(te)?k=te:l=te+I}}function Xe(e,l,k,I){if(!e)return I(l,k,"ltr",0);for(var z=!1,te=0;te<e.length;++te){var ae=e[te];(ae.from<k&&ae.to>l||l==k&&ae.to==l)&&(I(Math.max(ae.from,l),Math.min(ae.to,k),ae.level==1?"rtl":"ltr",te),z=!0)}z||I(l,k,"ltr")}var $e=null;function et(e,l,k){var I;$e=null;for(var z=0;z<e.length;++z){var te=e[z];if(te.from<l&&te.to>l)return z;te.to==l&&(te.from!=te.to&&k=="before"?I=z:$e=z),te.from==l&&(te.from!=te.to&&k!="before"?I=z:$e=z)}return I!=null?I:$e}var nt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",l="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function k(xe){return xe<=247?e.charAt(xe):1424<=xe&&xe<=1524?"R":1536<=xe&&xe<=1785?l.charAt(xe-1536):1774<=xe&&xe<=2220?"r":8192<=xe&&xe<=8203?"w":xe==8204?"b":"L"}var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,z=/[stwN]/,te=/[LRr]/,ae=/[Lb1n]/,he=/[1n]/;function pe(xe,je,ze){this.level=xe,this.from=je,this.to=ze}return function(xe,je){var ze=je=="ltr"?"L":"R";if(xe.length==0||je=="ltr"&&!I.test(xe))return!1;for(var tt=xe.length,Je=[],gt=0;gt<tt;++gt)Je.push(k(xe.charCodeAt(gt)));for(var Lt=0,jt=ze;Lt<tt;++Lt){var Yt=Je[Lt];Yt=="m"?Je[Lt]=jt:jt=Yt}for(var ar=0,$t=ze;ar<tt;++ar){var pr=Je[ar];pr=="1"&&$t=="r"?Je[ar]="n":te.test(pr)&&($t=pr,pr=="r"&&(Je[ar]="R"))}for(var zr=1,Mr=Je[0];zr<tt-1;++zr){var dn=Je[zr];dn=="+"&&Mr=="1"&&Je[zr+1]=="1"?Je[zr]="1":dn==","&&Mr==Je[zr+1]&&(Mr=="1"||Mr=="n")&&(Je[zr]=Mr),Mr=dn}for(var Fn=0;Fn<tt;++Fn){var mi=Je[Fn];if(mi==",")Je[Fn]="N";else if(mi=="%"){var Yn=void 0;for(Yn=Fn+1;Yn<tt&&Je[Yn]=="%";++Yn);for(var Ki=Fn&&Je[Fn-1]=="!"||Yn<tt&&Je[Yn]=="1"?"1":"N",Bi=Fn;Bi<Yn;++Bi)Je[Bi]=Ki;Fn=Yn-1}}for(var ii=0,Hi=ze;ii<tt;++ii){var xi=Je[ii];Hi=="L"&&xi=="1"?Je[ii]="L":te.test(xi)&&(Hi=xi)}for(var fi=0;fi<tt;++fi)if(z.test(Je[fi])){var ai=void 0;for(ai=fi+1;ai<tt&&z.test(Je[ai]);++ai);for(var Qn=(fi?Je[fi-1]:ze)=="L",Wi=(ai<tt?Je[ai]:ze)=="L",lo=Qn==Wi?Qn?"L":"R":ze,Ua=fi;Ua<ai;++Ua)Je[Ua]=lo;fi=ai-1}for(var Oi=[],ba,gi=0;gi<tt;)if(ae.test(Je[gi])){var ps=gi;for(++gi;gi<tt&&ae.test(Je[gi]);++gi);Oi.push(new pe(0,ps,gi))}else{var Ia=gi,Ka=Oi.length,Va=je=="rtl"?1:0;for(++gi;gi<tt&&Je[gi]!="L";++gi);for(var ki=Ia;ki<gi;)if(he.test(Je[ki])){Ia<ki&&(Oi.splice(Ka,0,new pe(1,Ia,ki)),Ka+=Va);var uo=ki;for(++ki;ki<gi&&he.test(Je[ki]);++ki);Oi.splice(Ka,0,new pe(2,uo,ki)),Ka+=Va,Ia=ki}else++ki;Ia<gi&&Oi.splice(Ka,0,new pe(1,Ia,gi))}return je=="ltr"&&(Oi[0].level==1&&(ba=xe.match(/^\s+/))&&(Oi[0].from=ba[0].length,Oi.unshift(new pe(0,0,ba[0].length))),B(Oi).level==1&&(ba=xe.match(/\s+$/))&&(B(Oi).to-=ba[0].length,Oi.push(new pe(0,tt-ba[0].length,tt)))),je=="rtl"?Oi.reverse():Oi}}();function at(e,l){var k=e.order;return k==null&&(k=e.order=nt(e.text,l)),k}var Be=[],Ie=function(e,l,k){if(e.addEventListener)e.addEventListener(l,k,!1);else if(e.attachEvent)e.attachEvent("on"+l,k);else{var I=e._handlers||(e._handlers={});I[l]=(I[l]||Be).concat(k)}};function rt(e,l){return e._handlers&&e._handlers[l]||Be}function lt(e,l,k){if(e.removeEventListener)e.removeEventListener(l,k,!1);else if(e.detachEvent)e.detachEvent("on"+l,k);else{var I=e._handlers,z=I&&I[l];if(z){var te=oe(z,k);te>-1&&(I[l]=z.slice(0,te).concat(z.slice(te+1)))}}}function _e(e,l){var k=rt(e,l);if(!k.length)return;for(var I=Array.prototype.slice.call(arguments,2),z=0;z<k.length;++z)k[z].apply(null,I)}function ce(e,l,k){return typeof l=="string"&&(l={type:l,preventDefault:function(){this.defaultPrevented=!0}}),_e(e,k||l.type,e,l),Re(l)||l.codemirrorIgnore}function fe(e){var l=e._handlers&&e._handlers.cursorActivity;if(!l)return;for(var k=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),I=0;I<l.length;++I)oe(k,l[I])==-1&&k.push(l[I])}function ve(e,l){return rt(e,l).length>0}function Oe(e){e.prototype.on=function(l,k){Ie(this,l,k)},e.prototype.off=function(l,k){lt(this,l,k)}}function ge(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Re(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Le(e){ge(e),Ee(e)}function Pe(e){return e.target||e.srcElement}function Ke(e){var l=e.which;return l==null&&(e.button&1?l=1:e.button&2?l=3:e.button&4&&(l=2)),i&&e.ctrlKey&&l==1&&(l=3),l}var it=function(){if(w&&b<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}(),st;function Ot(e){if(st==null){var l=C("span","\u200B");S(e,C("span",[l,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(st=l.offsetWidth<=1&&l.offsetHeight>2&&!(w&&b<8))}var k=st?C("span","\u200B"):C("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return k.setAttribute("cm-text",""),k}var Rt;function sr(e){if(Rt!=null)return Rt;var l=S(e,document.createTextNode("A\u062EA")),k=F(l,0,1).getBoundingClientRect(),I=F(l,1,2).getBoundingClientRect();return x(e),!k||k.left==k.right?!1:Rt=I.right-k.right<3}var Zt=`
b`.split(/\n/).length!=3?function(e){for(var l=0,k=[],I=e.length;l<=I;){var z=e.indexOf(`
`,l);z==-1&&(z=e.length);var te=e.slice(l,e.charAt(z-1)=="\r"?z-1:z),ae=te.indexOf("\r");ae!=-1?(k.push(te.slice(0,ae)),l+=ae+1):(k.push(te),l=z+1)}return k}:function(e){return e.split(/\r\n?|\n/)},wt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(l){return!1}}:function(e){var l;try{l=e.ownerDocument.selection.createRange()}catch(k){}return!l||l.parentElement()!=e?!1:l.compareEndPoints("StartToEnd",l)!=0},Br=function(){var e=C("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Nr=null;function jr(e){if(Nr!=null)return Nr;var l=S(e,C("span","x")),k=l.getBoundingClientRect(),I=F(l,0,1).getBoundingClientRect();return Nr=Math.abs(k.left-I.left)>1}var cn={},xr={};function an(e,l){arguments.length>2&&(l.dependencies=Array.prototype.slice.call(arguments,2)),cn[e]=l}function tn(e,l){xr[e]=l}function Ir(e){if(typeof e=="string"&&xr.hasOwnProperty(e))e=xr[e];else if(e&&typeof e.name=="string"&&xr.hasOwnProperty(e.name)){var l=xr[e.name];typeof l=="string"&&(l={name:l}),e=Z(l,e),e.name=l.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function hn(e,l){l=Ir(l);var k=cn[l.name];if(!k)return hn(e,"text/plain");var I=k(e,l);if(lr.hasOwnProperty(l.name)){var z=lr[l.name];for(var te in z){if(!z.hasOwnProperty(te))continue;I.hasOwnProperty(te)&&(I["_"+te]=I[te]),I[te]=z[te]}}if(I.name=l.name,l.helperType&&(I.helperType=l.helperType),l.modeProps)for(var ae in l.modeProps)I[ae]=l.modeProps[ae];return I}var lr={};function Cr(e,l){var k=lr.hasOwnProperty(e)?lr[e]:lr[e]={};D(l,k)}function gr(e,l){if(l===!0)return l;if(e.copyState)return e.copyState(l);var k={};for(var I in l){var z=l[I];z instanceof Array&&(z=z.concat([])),k[I]=z}return k}function xn(e,l){for(var k;e.innerMode&&!(k=e.innerMode(l),!k||k.mode==e);)l=k.state,e=k.mode;return k||{mode:e,state:l}}function Wn(e,l,k){return e.startState?e.startState(l,k):!0}var gn=function(e,l,k){this.pos=this.start=0,this.string=e,this.tabSize=l||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=k};gn.prototype.eol=function(){return this.pos>=this.string.length},gn.prototype.sol=function(){return this.pos==this.lineStart},gn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},gn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},gn.prototype.eat=function(e){var l=this.string.charAt(this.pos),k;if(typeof e=="string"?k=l==e:k=l&&(e.test?e.test(l):e(l)),k)return++this.pos,l},gn.prototype.eatWhile=function(e){for(var l=this.pos;this.eat(e););return this.pos>l},gn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},gn.prototype.skipToEnd=function(){this.pos=this.string.length},gn.prototype.skipTo=function(e){var l=this.string.indexOf(e,this.pos);if(l>-1)return this.pos=l,!0},gn.prototype.backUp=function(e){this.pos-=e},gn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},gn.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},gn.prototype.match=function(e,l,k){if(typeof e=="string"){var I=function(ae){return k?ae.toLowerCase():ae},z=this.string.substr(this.pos,e.length);if(I(z)==I(e))return l!==!1&&(this.pos+=e.length),!0}else{var te=this.string.slice(this.pos).match(e);return te&&te.index>0?null:(te&&l!==!1&&(this.pos+=te[0].length),te)}},gn.prototype.current=function(){return this.string.slice(this.start,this.pos)},gn.prototype.hideFirstChars=function(e,l){this.lineStart+=e;try{return l()}finally{this.lineStart-=e}},gn.prototype.lookAhead=function(e){var l=this.lineOracle;return l&&l.lookAhead(e)},gn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Bt(e,l){if(l-=e.first,l<0||l>=e.size)throw new Error("There is no line "+(l+e.first)+" in the document.");for(var k=e;!k.lines;)for(var I=0;;++I){var z=k.children[I],te=z.chunkSize();if(l<te){k=z;break}l-=te}return k.lines[l]}function Kr(e,l,k){var I=[],z=l.line;return e.iter(l.line,k.line+1,function(te){var ae=te.text;z==k.line&&(ae=ae.slice(0,k.ch)),z==l.line&&(ae=ae.slice(l.ch)),I.push(ae),++z}),I}function rn(e,l,k){var I=[];return e.iter(l,k,function(z){I.push(z.text)}),I}function Or(e,l){var k=l-e.height;if(k)for(var I=e;I;I=I.parent)I.height+=k}function Lr(e){if(e.parent==null)return null;for(var l=e.parent,k=oe(l.lines,e),I=l.parent;I;l=I,I=I.parent)for(var z=0;!(I.children[z]==l);++z)k+=I.children[z].chunkSize();return k+l.first}function Wr(e,l){var k=e.first;e:do{for(var I=0;I<e.children.length;++I){var z=e.children[I],te=z.height;if(l<te){e=z;continue e}l-=te,k+=z.chunkSize()}return k}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var he=e.lines[ae],pe=he.height;if(l<pe)break;l-=pe}return k+ae}function jn(e,l){return l>=e.first&&l<e.first+e.size}function yn(e,l){return String(e.lineNumberFormatter(l+e.firstLineNumber))}function St(e,l,k){if(k===void 0&&(k=null),!(this instanceof St))return new St(e,l,k);this.line=e,this.ch=l,this.sticky=k}function ur(e,l){return e.line-l.line||e.ch-l.ch}function oi(e,l){return e.sticky==l.sticky&&ur(e,l)==0}function wi(e){return St(e.line,e.ch)}function Pi(e,l){return ur(e,l)<0?l:e}function vi(e,l){return ur(e,l)<0?e:l}function Un(e,l){return Math.max(e.first,Math.min(l,e.first+e.size-1))}function wr(e,l){if(l.line<e.first)return St(e.first,0);var k=e.first+e.size-1;return l.line>k?St(k,Bt(e,k).text.length):si(l,Bt(e,l.line).text.length)}function si(e,l){var k=e.ch;return k==null||k>l?St(e.line,l):k<0?St(e.line,0):e}function It(e,l){for(var k=[],I=0;I<l.length;I++)k[I]=wr(e,l[I]);return k}var Zn=function(e,l){this.state=e,this.lookAhead=l},Bn=function(e,l,k,I){this.state=l,this.doc=e,this.line=k,this.maxLookAhead=I||0,this.baseTokens=null,this.baseTokenPos=1};Bn.prototype.lookAhead=function(e){var l=this.doc.getLine(this.line+e);return l!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),l},Bn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var l=this.baseTokens[this.baseTokenPos+1];return{type:l&&l.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Bn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Bn.fromSaved=function(e,l,k){return l instanceof Zn?new Bn(e,gr(e.mode,l.state),k,l.lookAhead):new Bn(e,gr(e.mode,l),k)},Bn.prototype.save=function(e){var l=e!==!1?gr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Zn(l,this.maxLookAhead):l};function zi(e,l,k,I){var z=[e.state.modeGen],te={};yi(e,l.text,e.doc.mode,k,function(xe,je){return z.push(xe,je)},te,I);for(var ae=k.state,he=function(xe){k.baseTokens=z;var je=e.state.overlays[xe],ze=1,tt=0;k.state=!0,yi(e,l.text,je.mode,k,function(Je,gt){for(var Lt=ze;tt<Je;){var jt=z[ze];jt>Je&&z.splice(ze,1,Je,z[ze+1],jt),ze+=2,tt=Math.min(Je,jt)}if(!gt)return;if(je.opaque)z.splice(Lt,ze-Lt,Je,"overlay "+gt),ze=Lt+2;else for(;Lt<ze;Lt+=2){var Yt=z[Lt+1];z[Lt+1]=(Yt?Yt+" ":"")+"overlay "+gt}},te),k.state=ae,k.baseTokens=null,k.baseTokenPos=1},pe=0;pe<e.state.overlays.length;++pe)he(pe);return{styles:z,classes:te.bgClass||te.textClass?te:null}}function Ti(e,l,k){if(!l.styles||l.styles[0]!=e.state.modeGen){var I=ri(e,Lr(l)),z=l.text.length>e.options.maxHighlightLength&&gr(e.doc.mode,I.state),te=zi(e,l,I);z&&(I.state=z),l.stateAfter=I.save(!z),l.styles=te.styles,te.classes?l.styleClasses=te.classes:l.styleClasses&&(l.styleClasses=null),k===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return l.styles}function ri(e,l,k){var I=e.doc,z=e.display;if(!I.mode.startState)return new Bn(I,!0,l);var te=bi(e,l,k),ae=te>I.first&&Bt(I,te-1).stateAfter,he=ae?Bn.fromSaved(I,ae,te):new Bn(I,Wn(I.mode),te);return I.iter(te,l,function(pe){Qi(e,pe.text,he);var xe=he.line;pe.stateAfter=xe==l-1||xe%5==0||xe>=z.viewFrom&&xe<z.viewTo?he.save():null,he.nextLine()}),k&&(I.modeFrontier=he.line),he}function Qi(e,l,k,I){var z=e.doc.mode,te=new gn(l,e.options.tabSize,k);for(te.start=te.pos=I||0,l==""&&Zi(z,k.state);!te.eol();)li(z,te,k.state),te.start=te.pos}function Zi(e,l){if(e.blankLine)return e.blankLine(l);if(!e.innerMode)return;var k=xn(e,l);if(k.mode.blankLine)return k.mode.blankLine(k.state)}function li(e,l,k,I){for(var z=0;z<10;z++){I&&(I[0]=xn(e,k).mode);var te=e.token(l,k);if(l.pos>l.start)return te}throw new Error("Mode "+e.name+" failed to advance stream.")}var In=function(e,l,k){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=l||null,this.state=k};function ui(e,l,k,I){var z=e.doc,te=z.mode,ae;l=wr(z,l);var he=Bt(z,l.line),pe=ri(e,l.line,k),xe=new gn(he.text,e.options.tabSize,pe),je;for(I&&(je=[]);(I||xe.pos<l.ch)&&!xe.eol();)xe.start=xe.pos,ae=li(te,xe,pe.state),I&&je.push(new In(xe,ae,gr(z.mode,pe.state)));return I?je:new In(xe,ae,pe.state)}function Mi(e,l){if(e)for(;;){var k=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!k)break;e=e.slice(0,k.index)+e.slice(k.index+k[0].length);var I=k[1]?"bgClass":"textClass";l[I]==null?l[I]=k[2]:new RegExp("(?:^|\\s)"+k[2]+"(?:$|\\s)").test(l[I])||(l[I]+=" "+k[2])}return e}function yi(e,l,k,I,z,te,ae){var he=k.flattenSpans;he==null&&(he=e.options.flattenSpans);var pe=0,xe=null,je=new gn(l,e.options.tabSize,I),ze,tt=e.options.addModeClass&&[null];for(l==""&&Mi(Zi(k,I.state),te);!je.eol();){if(je.pos>e.options.maxHighlightLength?(he=!1,ae&&Qi(e,l,I,je.pos),je.pos=l.length,ze=null):ze=Mi(li(k,je,I.state,tt),te),tt){var Je=tt[0].name;Je&&(ze="m-"+(ze?Je+" "+ze:Je))}if(!he||xe!=ze){for(;pe<je.start;)pe=Math.min(je.start,pe+5e3),z(pe,xe);xe=ze}je.start=je.pos}for(;pe<je.pos;){var gt=Math.min(je.pos,pe+5e3);z(gt,xe),pe=gt}}function bi(e,l,k){for(var I,z,te=e.doc,ae=k?-1:l-(e.doc.mode.innerMode?1e3:100),he=l;he>ae;--he){if(he<=te.first)return te.first;var pe=Bt(te,he-1),xe=pe.stateAfter;if(xe&&(!k||he+(xe instanceof Zn?xe.lookAhead:0)<=te.modeFrontier))return he;var je=X(pe.text,null,e.options.tabSize);(z==null||I>je)&&(z=he-1,I=je)}return z}function Da(e,l){if(e.modeFrontier=Math.min(e.modeFrontier,l),e.highlightFrontier<l-10)return;for(var k=e.first,I=l-1;I>k;I--){var z=Bt(e,I).stateAfter;if(z&&(!(z instanceof Zn)||I+z.lookAhead<l)){k=I+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,k)}var Vi=!1,zn=!1;function Gi(){Vi=!0}function _a(){zn=!0}function Ni(e,l,k){this.marker=e,this.from=l,this.to=k}function ci(e,l){if(e)for(var k=0;k<e.length;++k){var I=e[k];if(I.marker==l)return I}}function oa(e,l){for(var k,I=0;I<e.length;++I)e[I]!=l&&(k||(k=[])).push(e[I]);return k}function pa(e,l){e.markedSpans=e.markedSpans?e.markedSpans.concat([l]):[l],l.marker.attachLine(e)}function sa(e,l,k){var I;if(e)for(var z=0;z<e.length;++z){var te=e[z],ae=te.marker,he=te.from==null||(ae.inclusiveLeft?te.from<=l:te.from<l);if(he||te.from==l&&ae.type=="bookmark"&&(!k||!te.marker.insertLeft)){var pe=te.to==null||(ae.inclusiveRight?te.to>=l:te.to>l);(I||(I=[])).push(new Ni(ae,te.from,pe?null:te.to))}}return I}function ma(e,l,k){var I;if(e)for(var z=0;z<e.length;++z){var te=e[z],ae=te.marker,he=te.to==null||(ae.inclusiveRight?te.to>=l:te.to>l);if(he||te.from==l&&ae.type=="bookmark"&&(!k||te.marker.insertLeft)){var pe=te.from==null||(ae.inclusiveLeft?te.from<=l:te.from<l);(I||(I=[])).push(new Ni(ae,pe?null:te.from-l,te.to==null?null:te.to-l))}}return I}function qi(e,l){if(l.full)return null;var k=jn(e,l.from.line)&&Bt(e,l.from.line).markedSpans,I=jn(e,l.to.line)&&Bt(e,l.to.line).markedSpans;if(!k&&!I)return null;var z=l.from.ch,te=l.to.ch,ae=ur(l.from,l.to)==0,he=sa(k,z,ae),pe=ma(I,te,ae),xe=l.text.length==1,je=B(l.text).length+(xe?z:0);if(he)for(var ze=0;ze<he.length;++ze){var tt=he[ze];if(tt.to==null){var Je=ci(pe,tt.marker);Je?xe&&(tt.to=Je.to==null?null:Je.to+je):tt.to=z}}if(pe)for(var gt=0;gt<pe.length;++gt){var Lt=pe[gt];if(Lt.to!=null&&(Lt.to+=je),Lt.from==null){var jt=ci(he,Lt.marker);jt||(Lt.from=je,xe&&(he||(he=[])).push(Lt))}else Lt.from+=je,xe&&(he||(he=[])).push(Lt)}he&&(he=Si(he)),pe&&pe!=he&&(pe=Si(pe));var Yt=[he];if(!xe){var ar=l.text.length-2,$t;if(ar>0&&he)for(var pr=0;pr<he.length;++pr)he[pr].to==null&&($t||($t=[])).push(new Ni(he[pr].marker,null,null));for(var zr=0;zr<ar;++zr)Yt.push($t);Yt.push(pe)}return Yt}function Si(e){for(var l=0;l<e.length;++l){var k=e[l];k.from!=null&&k.from==k.to&&k.marker.clearWhenEmpty!==!1&&e.splice(l--,1)}return e.length?e:null}function ea(e,l,k){var I=null;if(e.iter(l.line,k.line+1,function(Je){if(Je.markedSpans)for(var gt=0;gt<Je.markedSpans.length;++gt){var Lt=Je.markedSpans[gt].marker;Lt.readOnly&&(!I||oe(I,Lt)==-1)&&(I||(I=[])).push(Lt)}}),!I)return null;for(var z=[{from:l,to:k}],te=0;te<I.length;++te)for(var ae=I[te],he=ae.find(0),pe=0;pe<z.length;++pe){var xe=z[pe];if(ur(xe.to,he.from)<0||ur(xe.from,he.to)>0)continue;var je=[pe,1],ze=ur(xe.from,he.from),tt=ur(xe.to,he.to);(ze<0||!ae.inclusiveLeft&&!ze)&&je.push({from:xe.from,to:he.from}),(tt>0||!ae.inclusiveRight&&!tt)&&je.push({from:he.to,to:xe.to}),z.splice.apply(z,je),pe+=je.length-3}return z}function Ea(e){var l=e.markedSpans;if(!l)return;for(var k=0;k<l.length;++k)l[k].marker.detachLine(e);e.markedSpans=null}function mt(e,l){if(!l)return;for(var k=0;k<l.length;++k)l[k].marker.attachLine(e);e.markedSpans=l}function qe(e){return e.inclusiveLeft?-1:0}function pt(e){return e.inclusiveRight?1:0}function _t(e,l){var k=e.lines.length-l.lines.length;if(k!=0)return k;var I=e.find(),z=l.find(),te=ur(I.from,z.from)||qe(e)-qe(l);if(te)return-te;var ae=ur(I.to,z.to)||pt(e)-pt(l);return ae||l.id-e.id}function Ut(e,l){var k=zn&&e.markedSpans,I;if(k)for(var z=void 0,te=0;te<k.length;++te)z=k[te],z.marker.collapsed&&(l?z.from:z.to)==null&&(!I||_t(I,z.marker)<0)&&(I=z.marker);return I}function Dt(e){return Ut(e,!0)}function Vt(e){return Ut(e,!1)}function Pt(e,l){var k=zn&&e.markedSpans,I;if(k)for(var z=0;z<k.length;++z){var te=k[z];te.marker.collapsed&&(te.from==null||te.from<l)&&(te.to==null||te.to>l)&&(!I||_t(I,te.marker)<0)&&(I=te.marker)}return I}function ut(e,l,k,I,z){var te=Bt(e,l),ae=zn&&te.markedSpans;if(ae)for(var he=0;he<ae.length;++he){var pe=ae[he];if(!pe.marker.collapsed)continue;var xe=pe.marker.find(0),je=ur(xe.from,k)||qe(pe.marker)-qe(z),ze=ur(xe.to,I)||pt(pe.marker)-pt(z);if(je>=0&&ze<=0||je<=0&&ze>=0)continue;if(je<=0&&(pe.marker.inclusiveRight&&z.inclusiveLeft?ur(xe.to,k)>=0:ur(xe.to,k)>0)||je>=0&&(pe.marker.inclusiveRight&&z.inclusiveLeft?ur(xe.from,I)<=0:ur(xe.from,I)<0))return!0}}function vt(e){for(var l;l=Dt(e);)e=l.find(-1,!0).line;return e}function yt(e){for(var l;l=Vt(e);)e=l.find(1,!0).line;return e}function tr(e){for(var l,k;l=Vt(e);)e=l.find(1,!0).line,(k||(k=[])).push(e);return k}function Jt(e,l){var k=Bt(e,l),I=vt(k);return k==I?l:Lr(I)}function Wt(e,l){if(l>e.lastLine())return l;var k=Bt(e,l),I;if(!Ft(e,k))return l;for(;I=Vt(k);)k=I.find(1,!0).line;return Lr(k)+1}function Ft(e,l){var k=zn&&l.markedSpans;if(k)for(var I=void 0,z=0;z<k.length;++z){if(I=k[z],!I.marker.collapsed)continue;if(I.from==null)return!0;if(I.marker.widgetNode)continue;if(I.from==0&&I.marker.inclusiveLeft&&Xt(e,l,I))return!0}}function Xt(e,l,k){if(k.to==null){var I=k.marker.find(1,!0);return Xt(e,I.line,ci(I.line.markedSpans,k.marker))}if(k.marker.inclusiveRight&&k.to==l.text.length)return!0;for(var z=void 0,te=0;te<l.markedSpans.length;++te)if(z=l.markedSpans[te],z.marker.collapsed&&!z.marker.widgetNode&&z.from==k.to&&(z.to==null||z.to!=k.from)&&(z.marker.inclusiveLeft||k.marker.inclusiveRight)&&Xt(e,l,z))return!0}function qt(e){e=vt(e);for(var l=0,k=e.parent,I=0;I<k.lines.length;++I){var z=k.lines[I];if(z==e)break;l+=z.height}for(var te=k.parent;te;k=te,te=k.parent)for(var ae=0;ae<te.children.length;++ae){var he=te.children[ae];if(he==k)break;l+=he.height}return l}function Ze(e){if(e.height==0)return 0;for(var l=e.text.length,k,I=e;k=Dt(I);){var z=k.find(0,!0);I=z.from.line,l+=z.from.ch-z.to.ch}for(I=e;k=Vt(I);){var te=k.find(0,!0);l-=I.text.length-te.from.ch,I=te.to.line,l+=I.text.length-te.to.ch}return l}function vr(e){var l=e.display,k=e.doc;l.maxLine=Bt(k,k.first),l.maxLineLength=Ze(l.maxLine),l.maxLineChanged=!0,k.iter(function(I){var z=Ze(I);z>l.maxLineLength&&(l.maxLineLength=z,l.maxLine=I)})}var Ar=function(e,l,k){this.text=e,mt(this,l),this.height=k?k(this):1};Ar.prototype.lineNo=function(){return Lr(this)},Oe(Ar);function cr(e,l,k,I){e.text=l,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ea(e),mt(e,k);var z=I?I(e):1;z!=e.height&&Or(e,z)}function ht(e){e.parent=null,Ea(e)}var bt={},ft={};function Tt(e,l){if(!e||/^\s*$/.test(e))return null;var k=l.addModeClass?ft:bt;return k[e]||(k[e]=e.replace(/\S+/g,"cm-$&"))}function zt(e,l){var k=j("span",null,null,t?"padding-right: .1px":null),I={pre:j("pre",[k],"CodeMirror-line"),content:k,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};l.measure={};for(var z=0;z<=(l.rest?l.rest.length:0);z++){var te=z?l.rest[z-1]:l.line,ae=void 0;I.pos=0,I.addToken=Gt,sr(e.display.measure)&&(ae=at(te,e.doc.direction))&&(I.addToken=kr(I.addToken,ae)),I.map=[];var he=l!=e.display.externalMeasured&&Lr(te);Qe(te,I,Ti(e,te,he)),te.styleClasses&&(te.styleClasses.bgClass&&(I.bgClass=A(te.styleClasses.bgClass,I.bgClass||"")),te.styleClasses.textClass&&(I.textClass=A(te.styleClasses.textClass,I.textClass||""))),I.map.length==0&&I.map.push(0,0,I.content.appendChild(Ot(e.display.measure))),z==0?(l.measure.map=I.map,l.measure.cache={}):((l.measure.maps||(l.measure.maps=[])).push(I.map),(l.measure.caches||(l.measure.caches=[])).push({}))}if(t){var pe=I.content.lastChild;(/\bcm-tab\b/.test(pe.className)||pe.querySelector&&pe.querySelector(".cm-tab"))&&(I.content.className="cm-tab-wrap-hack")}return _e(e,"renderLine",e,l.line,I.pre),I.pre.className&&(I.textClass=A(I.pre.className,I.textClass||"")),I}function rr(e){var l=C("span","\u2022","cm-invalidchar");return l.title="\\u"+e.charCodeAt(0).toString(16),l.setAttribute("aria-label",l.title),l}function Gt(e,l,k,I,z,te,ae){if(!l)return;var he=e.splitSpaces?yr(l,e.trailingSpace):l,pe=e.cm.state.specialChars,xe=!1,je;if(!pe.test(l))e.col+=l.length,je=document.createTextNode(he),e.map.push(e.pos,e.pos+l.length,je),w&&b<9&&(xe=!0),e.pos+=l.length;else{je=document.createDocumentFragment();for(var ze=0;;){pe.lastIndex=ze;var tt=pe.exec(l),Je=tt?tt.index-ze:l.length-ze;if(Je){var gt=document.createTextNode(he.slice(ze,ze+Je));w&&b<9?je.appendChild(C("span",[gt])):je.appendChild(gt),e.map.push(e.pos,e.pos+Je,gt),e.col+=Je,e.pos+=Je}if(!tt)break;ze+=Je+1;var Lt=void 0;if(tt[0]==" "){var jt=e.cm.options.tabSize,Yt=jt-e.col%jt;Lt=je.appendChild(C("span",ee(Yt),"cm-tab")),Lt.setAttribute("role","presentation"),Lt.setAttribute("cm-text"," "),e.col+=Yt}else tt[0]=="\r"||tt[0]==`
`?(Lt=je.appendChild(C("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Lt.setAttribute("cm-text",tt[0]),e.col+=1):(Lt=e.cm.options.specialCharPlaceholder(tt[0]),Lt.setAttribute("cm-text",tt[0]),w&&b<9?je.appendChild(C("span",[Lt])):je.appendChild(Lt),e.col+=1);e.map.push(e.pos,e.pos+1,Lt),e.pos++}}if(e.trailingSpace=he.charCodeAt(l.length-1)==32,k||I||z||xe||te||ae){var ar=k||"";I&&(ar+=I),z&&(ar+=z);var $t=C("span",[je],ar,te);if(ae)for(var pr in ae)ae.hasOwnProperty(pr)&&pr!="style"&&pr!="class"&&$t.setAttribute(pr,ae[pr]);return e.content.appendChild($t)}e.content.appendChild(je)}function yr(e,l){if(e.length>1&&!/ /.test(e))return e;for(var k=l,I="",z=0;z<e.length;z++){var te=e.charAt(z);te==" "&&k&&(z==e.length-1||e.charCodeAt(z+1)==32)&&(te="\xA0"),I+=te,k=te==" "}return I}function kr(e,l){return function(k,I,z,te,ae,he,pe){z=z?z+" cm-force-border":"cm-force-border";for(var xe=k.pos,je=xe+I.length;;){for(var ze=void 0,tt=0;tt<l.length&&!(ze=l[tt],ze.to>xe&&ze.from<=xe);tt++);if(ze.to>=je)return e(k,I,z,te,ae,he,pe);e(k,I.slice(0,ze.to-xe),z,te,null,he,pe),te=null,I=I.slice(ze.to-xe),xe=ze.to}}}function or(e,l,k,I){var z=!I&&k.widgetNode;z&&e.map.push(e.pos,e.pos+l,z),!I&&e.cm.display.input.needsContentAttribute&&(z||(z=e.content.appendChild(document.createElement("span"))),z.setAttribute("cm-marker",k.id)),z&&(e.cm.display.input.setUneditable(z),e.content.appendChild(z)),e.pos+=l,e.trailingSpace=!1}function Qe(e,l,k){var I=e.markedSpans,z=e.text,te=0;if(!I){for(var ae=1;ae<k.length;ae+=2)l.addToken(l,z.slice(te,te=k[ae]),Tt(k[ae+1],l.cm.options));return}for(var he=z.length,pe=0,xe=1,je="",ze,tt,Je=0,gt,Lt,jt,Yt,ar;;){if(Je==pe){gt=Lt=jt=tt="",ar=null,Yt=null,Je=Infinity;for(var $t=[],pr=void 0,zr=0;zr<I.length;++zr){var Mr=I[zr],dn=Mr.marker;if(dn.type=="bookmark"&&Mr.from==pe&&dn.widgetNode)$t.push(dn);else if(Mr.from<=pe&&(Mr.to==null||Mr.to>pe||dn.collapsed&&Mr.to==pe&&Mr.from==pe)){if(Mr.to!=null&&Mr.to!=pe&&Je>Mr.to&&(Je=Mr.to,Lt=""),dn.className&&(gt+=" "+dn.className),dn.css&&(tt=(tt?tt+";":"")+dn.css),dn.startStyle&&Mr.from==pe&&(jt+=" "+dn.startStyle),dn.endStyle&&Mr.to==Je&&(pr||(pr=[])).push(dn.endStyle,Mr.to),dn.title&&((ar||(ar={})).title=dn.title),dn.attributes)for(var Fn in dn.attributes)(ar||(ar={}))[Fn]=dn.attributes[Fn];dn.collapsed&&(!Yt||_t(Yt.marker,dn)<0)&&(Yt=Mr)}else Mr.from>pe&&Je>Mr.from&&(Je=Mr.from)}if(pr)for(var mi=0;mi<pr.length;mi+=2)pr[mi+1]==Je&&(Lt+=" "+pr[mi]);if(!Yt||Yt.from==pe)for(var Yn=0;Yn<$t.length;++Yn)or(l,0,$t[Yn]);if(Yt&&(Yt.from||0)==pe){if(or(l,(Yt.to==null?he+1:Yt.to)-pe,Yt.marker,Yt.from==null),Yt.to==null)return;Yt.to==pe&&(Yt=!1)}}if(pe>=he)break;for(var Ki=Math.min(he,Je);;){if(je){var Bi=pe+je.length;if(!Yt){var ii=Bi>Ki?je.slice(0,Ki-pe):je;l.addToken(l,ii,ze?ze+gt:gt,jt,pe+ii.length==Je?Lt:"",tt,ar)}if(Bi>=Ki){je=je.slice(Ki-pe),pe=Ki;break}pe=Bi,jt=""}je=z.slice(te,te=k[xe++]),ze=Tt(k[xe++],l.cm.options)}}}function kt(e,l,k){this.line=l,this.rest=tr(l),this.size=this.rest?Lr(B(this.rest))-k+1:1,this.node=this.text=null,this.hidden=Ft(e,l)}function Zr(e,l,k){for(var I=[],z,te=l;te<k;te=z){var ae=new kt(e.doc,Bt(e.doc,te),te);z=te+ae.size,I.push(ae)}return I}var Vr=null;function nr(e){Vr?Vr.ops.push(e):e.ownsGroup=Vr={ops:[e],delayedCallbacks:[]}}function br(e){var l=e.delayedCallbacks,k=0;do{for(;k<l.length;k++)l[k].call(null);for(var I=0;I<e.ops.length;I++){var z=e.ops[I];if(z.cursorActivityHandlers)for(;z.cursorActivityCalled<z.cursorActivityHandlers.length;)z.cursorActivityHandlers[z.cursorActivityCalled++].call(null,z.cm)}}while(k<l.length)}function Tr(e,l){var k=e.ownsGroup;if(!k)return;try{br(k)}finally{Vr=null,l(k)}}var At=null;function Ht(e,l){var k=rt(e,l);if(!k.length)return;var I=Array.prototype.slice.call(arguments,2),z;Vr?z=Vr.delayedCallbacks:At?z=At:(z=At=[],setTimeout(ir,0));for(var te=function(he){z.push(function(){return k[he].apply(null,I)})},ae=0;ae<k.length;++ae)te(ae)}function ir(){var e=At;At=null;for(var l=0;l<e.length;++l)e[l]()}function Kt(e,l,k,I){for(var z=0;z<l.changes.length;z++){var te=l.changes[z];te=="text"?xt(e,l):te=="gutter"?Jr(e,l,k,I):te=="class"?_r(e,l):te=="widget"&&qr(e,l,I)}l.changes=null}function ct(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&&b<8&&(e.node.style.zIndex=2)),e.node}function dt(e,l){var k=l.bgClass?l.bgClass+" "+(l.line.bgClass||""):l.line.bgClass;if(k&&(k+=" CodeMirror-linebackground"),l.background)k?l.background.className=k:(l.background.parentNode.removeChild(l.background),l.background=null);else if(k){var I=ct(l);l.background=I.insertBefore(C("div",null,k),I.firstChild),e.display.input.setUneditable(l.background)}}function Mt(e,l){var k=e.display.externalMeasured;return k&&k.line==l.line?(e.display.externalMeasured=null,l.measure=k.measure,k.built):zt(e,l)}function xt(e,l){var k=l.text.className,I=Mt(e,l);l.text==l.node&&(l.node=I.pre),l.text.parentNode.replaceChild(I.pre,l.text),l.text=I.pre,I.bgClass!=l.bgClass||I.textClass!=l.textClass?(l.bgClass=I.bgClass,l.textClass=I.textClass,_r(e,l)):k&&(l.text.className=k)}function _r(e,l){dt(e,l),l.line.wrapClass?ct(l).className=l.line.wrapClass:l.node!=l.text&&(l.node.className="");var k=l.textClass?l.textClass+" "+(l.line.textClass||""):l.line.textClass;l.text.className=k||""}function Jr(e,l,k,I){if(l.gutter&&(l.node.removeChild(l.gutter),l.gutter=null),l.gutterBackground&&(l.node.removeChild(l.gutterBackground),l.gutterBackground=null),l.line.gutterClass){var z=ct(l);l.gutterBackground=C("div",null,"CodeMirror-gutter-background "+l.line.gutterClass,"left: "+(e.options.fixedGutter?I.fixedPos:-I.gutterTotalWidth)+"px; width: "+I.gutterTotalWidth+"px"),e.display.input.setUneditable(l.gutterBackground),z.insertBefore(l.gutterBackground,l.text)}var te=l.line.gutterMarkers;if(e.options.lineNumbers||te){var ae=ct(l),he=l.gutter=C("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?I.fixedPos:-I.gutterTotalWidth)+"px");if(e.display.input.setUneditable(he),ae.insertBefore(he,l.text),l.line.gutterClass&&(he.className+=" "+l.line.gutterClass),e.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(l.lineNumber=he.appendChild(C("div",yn(e.options,k),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+I.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),te)for(var pe=0;pe<e.display.gutterSpecs.length;++pe){var xe=e.display.gutterSpecs[pe].className,je=te.hasOwnProperty(xe)&&te[xe];je&&he.appendChild(C("div",[je],"CodeMirror-gutter-elt","left: "+I.gutterLeft[xe]+"px; width: "+I.gutterWidth[xe]+"px"))}}}function qr(e,l,k){l.alignable&&(l.alignable=null);for(var I=O("CodeMirror-linewidget"),z=l.node.firstChild,te=void 0;z;z=te)te=z.nextSibling,I.test(z.className)&&l.node.removeChild(z);Xr(e,l,k)}function mr(e,l,k,I){var z=Mt(e,l);return l.text=l.node=z.pre,z.bgClass&&(l.bgClass=z.bgClass),z.textClass&&(l.textClass=z.textClass),_r(e,l),Jr(e,l,k,I),Xr(e,l,I),l.node}function Xr(e,l,k){if(Rr(e,l.line,l,k,!0),l.rest)for(var I=0;I<l.rest.length;I++)Rr(e,l.rest[I],l,k,!1)}function Rr(e,l,k,I,z){if(!l.widgets)return;for(var te=ct(k),ae=0,he=l.widgets;ae<he.length;++ae){var pe=he[ae],xe=C("div",[pe.node],"CodeMirror-linewidget"+(pe.className?" "+pe.className:""));pe.handleMouseEvents||xe.setAttribute("cm-ignore-events","true"),on(pe,xe,k,I),e.display.input.setUneditable(xe),z&&pe.above?te.insertBefore(xe,k.gutter||k.text):te.appendChild(xe),Ht(pe,"redraw")}}function on(e,l,k,I){if(e.noHScroll){(k.alignable||(k.alignable=[])).push(l);var z=I.wrapperWidth;l.style.left=I.fixedPos+"px",e.coverGutter||(z-=I.gutterTotalWidth,l.style.paddingLeft=I.gutterTotalWidth+"px"),l.style.width=z+"px"}e.coverGutter&&(l.style.zIndex=5,l.style.position="relative",e.noHScroll||(l.style.marginLeft=-I.gutterTotalWidth+"px"))}function Fr(e){if(e.height!=null)return e.height;var l=e.doc.cm;if(!l)return 0;if(!M(document.body,e.node)){var k="position: relative;";e.coverGutter&&(k+="margin-left: -"+l.display.gutters.offsetWidth+"px;"),e.noHScroll&&(k+="width: "+l.display.wrapper.clientWidth+"px;"),S(l.display.measure,C("div",[e.node],null,k))}return e.height=e.node.parentNode.offsetHeight}function sn(e,l){for(var k=Pe(l);k!=e.wrapper;k=k.parentNode)if(!k||k.nodeType==1&&k.getAttribute("cm-ignore-events")=="true"||k.parentNode==e.sizer&&k!=e.mover)return!0}function Hn(e){return e.lineSpace.offsetTop}function ke(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function We(e){if(e.cachedPaddingH)return e.cachedPaddingH;var l=S(e.measure,C("pre","x","CodeMirror-line-like")),k=window.getComputedStyle?window.getComputedStyle(l):l.currentStyle,I={left:parseInt(k.paddingLeft),right:parseInt(k.paddingRight)};return!isNaN(I.left)&&!isNaN(I.right)&&(e.cachedPaddingH=I),I}function Ve(e){return de-e.display.nativeBarWidth}function Ne(e){return e.display.scroller.clientWidth-Ve(e)-e.display.barWidth}function be(e){return e.display.scroller.clientHeight-Ve(e)-e.display.barHeight}function De(e,l,k){var I=e.options.lineWrapping,z=I&&Ne(e);if(!l.measure.heights||I&&l.measure.width!=z){var te=l.measure.heights=[];if(I){l.measure.width=z;for(var ae=l.text.firstChild.getClientRects(),he=0;he<ae.length-1;he++){var pe=ae[he],xe=ae[he+1];Math.abs(pe.bottom-xe.bottom)>2&&te.push((pe.bottom+xe.top)/2-k.top)}}te.push(k.bottom-k.top)}}function Te(e,l,k){if(e.line==l)return{map:e.measure.map,cache:e.measure.cache};for(var I=0;I<e.rest.length;I++)if(e.rest[I]==l)return{map:e.measure.maps[I],cache:e.measure.caches[I]};for(var z=0;z<e.rest.length;z++)if(Lr(e.rest[z])>k)return{map:e.measure.maps[z],cache:e.measure.caches[z],before:!0}}function Me(e,l){l=vt(l);var k=Lr(l),I=e.display.externalMeasured=new kt(e.doc,l,k);I.lineN=k;var z=I.built=zt(e,I);return I.text=z.pre,S(e.display.lineMeasure,z.pre),I}function He(e,l,k,I){return Ye(e,Ue(e,l),k,I)}function Ge(e,l){if(l>=e.display.viewFrom&&l<e.display.viewTo)return e.display.view[An(e,l)];var k=e.display.externalMeasured;if(k&&l>=k.lineN&&l<k.lineN+k.size)return k}function Ue(e,l){var k=Lr(l),I=Ge(e,k);I&&!I.text?I=null:I&&I.changes&&(Kt(e,I,k,Mn(e)),e.curOp.forceUpdate=!0),I||(I=Me(e,l));var z=Te(I,l,k);return{line:l,view:I,rect:null,map:z.map,cache:z.cache,before:z.before,hasHeights:!1}}function Ye(e,l,k,I,z){l.before&&(k=-1);var te=k+(I||""),ae;return l.cache.hasOwnProperty(te)?ae=l.cache[te]:(l.rect||(l.rect=l.view.text.getBoundingClientRect()),l.hasHeights||(De(e,l.view,l.rect),l.hasHeights=!0),ae=Nt(e,l,k,I),ae.bogus||(l.cache[te]=ae)),{left:ae.left,right:ae.right,top:z?ae.rtop:ae.top,bottom:z?ae.rbottom:ae.bottom}}var ot={left:0,right:0,top:0,bottom:0};function Et(e,l,k){for(var I,z,te,ae,he,pe,xe=0;xe<e.length;xe+=3)if(he=e[xe],pe=e[xe+1],l<he?(z=0,te=1,ae="left"):l<pe?(z=l-he,te=z+1):(xe==e.length-3||l==pe&&e[xe+3]>l)&&(te=pe-he,z=te-1,l>=pe&&(ae="right")),z!=null){if(I=e[xe+2],he==pe&&k==(I.insertLeft?"left":"right")&&(ae=k),k=="left"&&z==0)for(;xe&&e[xe-2]==e[xe-3]&&e[xe-1].insertLeft;)I=e[(xe-=3)+2],ae="left";if(k=="right"&&z==pe-he)for(;xe<e.length-3&&e[xe+3]==e[xe+4]&&!e[xe+5].insertLeft;)I=e[(xe+=3)+2],ae="right";break}return{node:I,start:z,end:te,collapse:ae,coverStart:he,coverEnd:pe}}function Ct(e,l){var k=ot;if(l=="left")for(var I=0;I<e.length&&!((k=e[I]).left!=k.right);I++);else for(var z=e.length-1;z>=0&&!((k=e[z]).left!=k.right);z--);return k}function Nt(e,l,k,I){var z=Et(l.map,k,I),te=z.node,ae=z.start,he=z.end,pe=z.collapse,xe;if(te.nodeType==3){for(var je=0;je<4;je++){for(;ae&&ue(l.line.text.charAt(z.coverStart+ae));)--ae;for(;z.coverStart+he<z.coverEnd&&ue(l.line.text.charAt(z.coverStart+he));)++he;if(w&&b<9&&ae==0&&he==z.coverEnd-z.coverStart?xe=te.parentNode.getBoundingClientRect():xe=Ct(F(te,ae,he).getClientRects(),I),xe.left||xe.right||ae==0)break;he=ae,ae=ae-1,pe="right"}w&&b<11&&(xe=Er(e.display.measure,xe))}else{ae>0&&(pe=I="right");var ze;e.options.lineWrapping&&(ze=te.getClientRects()).length>1?xe=ze[I=="right"?ze.length-1:0]:xe=te.getBoundingClientRect()}if(w&&b<9&&!ae&&(!xe||!xe.left&&!xe.right)){var tt=te.parentNode.getClientRects()[0];tt?xe={left:tt.left,right:tt.left+$n(e.display),top:tt.top,bottom:tt.bottom}:xe=ot}for(var Je=xe.top-l.rect.top,gt=xe.bottom-l.rect.top,Lt=(Je+gt)/2,jt=l.view.measure.heights,Yt=0;Yt<jt.length-1&&!(Lt<jt[Yt]);Yt++);var ar=Yt?jt[Yt-1]:0,$t=jt[Yt],pr={left:(pe=="right"?xe.right:xe.left)-l.rect.left,right:(pe=="left"?xe.left:xe.right)-l.rect.left,top:ar,bottom:$t};return!xe.left&&!xe.right&&(pr.bogus=!0),e.options.singleCursorHeightPerLine||(pr.rtop=Je,pr.rbottom=gt),pr}function Er(e,l){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!jr(e))return l;var k=screen.logicalXDPI/screen.deviceXDPI,I=screen.logicalYDPI/screen.deviceYDPI;return{left:l.left*k,right:l.right*k,top:l.top*I,bottom:l.bottom*I}}function Hr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var l=0;l<e.rest.length;l++)e.measure.caches[l]={}}function Ur(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var l=0;l<e.display.view.length;l++)Hr(e.display.view[l])}function Gr(e){Ur(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pr(){return a&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Yr(){return a&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function $r(e){var l=0;if(e.widgets)for(var k=0;k<e.widgets.length;++k)e.widgets[k].above&&(l+=Fr(e.widgets[k]));return l}function un(e,l,k,I,z){if(!z){var te=$r(l);k.top+=te,k.bottom+=te}if(I=="line")return k;I||(I="local");var ae=qt(l);if(I=="local"?ae+=Hn(e.display):ae-=e.display.viewOffset,I=="page"||I=="window"){var he=e.display.lineSpace.getBoundingClientRect();ae+=he.top+(I=="window"?0:Yr());var pe=he.left+(I=="window"?0:Pr());k.left+=pe,k.right+=pe}return k.top+=ae,k.bottom+=ae,k}function en(e,l,k){if(k=="div")return l;var I=l.left,z=l.top;if(k=="page")I-=Pr(),z-=Yr();else if(k=="local"||!k){var te=e.display.sizer.getBoundingClientRect();I+=te.left,z+=te.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:I-ae.left,top:z-ae.top}}function Tn(e,l,k,I,z){return I||(I=Bt(e.doc,l.line)),un(e,I,He(e,I,l.ch,z),k)}function nn(e,l,k,I,z,te){I=I||Bt(e.doc,l.line),z||(z=Ue(e,I));function ae(gt,Lt){var jt=Ye(e,z,gt,Lt?"right":"left",te);return Lt?jt.left=jt.right:jt.right=jt.left,un(e,I,jt,k)}var he=at(I,e.doc.direction),pe=l.ch,xe=l.sticky;if(pe>=I.text.length?(pe=I.text.length,xe="before"):pe<=0&&(pe=0,xe="after"),!he)return ae(xe=="before"?pe-1:pe,xe=="before");function je(gt,Lt,jt){var Yt=he[Lt],ar=Yt.level==1;return ae(jt?gt-1:gt,ar!=jt)}var ze=et(he,pe,xe),tt=$e,Je=je(pe,ze,xe=="before");return tt!=null&&(Je.other=je(pe,tt,xe!="before")),Je}function Sr(e,l){var k=0;l=wr(e.doc,l),e.options.lineWrapping||(k=$n(e.display)*l.ch);var I=Bt(e.doc,l.line),z=qt(I)+Hn(e.display);return{left:k,right:k,top:z,bottom:z+I.height}}function Dr(e,l,k,I,z){var te=St(e,l,k);return te.xRel=z,I&&(te.outside=I),te}function Qr(e,l,k){var I=e.doc;if(k+=e.display.viewOffset,k<0)return Dr(I.first,0,null,-1,-1);var z=Wr(I,k),te=I.first+I.size-1;if(z>te)return Dr(I.first+I.size-1,Bt(I,te).text.length,null,1,1);l<0&&(l=0);for(var ae=Bt(I,z);;){var he=Pn(e,ae,z,l,k),pe=Pt(ae,he.ch+(he.xRel>0||he.outside>0?1:0));if(!pe)return he;var xe=pe.find(1);if(xe.line==z)return xe;ae=Bt(I,z=xe.line)}}function ln(e,l,k,I){I-=$r(l);var z=l.text.length,te=Fe(function(ae){return Ye(e,k,ae-1).bottom<=I},z,0);return z=Fe(function(ae){return Ye(e,k,ae).top>I},te,z),{begin:te,end:z}}function hr(e,l,k,I){k||(k=Ue(e,l));var z=un(e,l,Ye(e,k,I),"line").top;return ln(e,l,k,z)}function fn(e,l,k,I){return e.bottom<=k?!1:e.top>k?!0:(I?e.left:e.right)>l}function Pn(e,l,k,I,z){z-=qt(l);var te=Ue(e,l),ae=$r(l),he=0,pe=l.text.length,xe=!0,je=at(l,e.doc.direction);if(je){var ze=(e.options.lineWrapping?On:vn)(e,l,k,te,je,I,z);xe=ze.level!=1,he=xe?ze.from:ze.to-1,pe=xe?ze.to:ze.from-1}var tt=null,Je=null,gt=Fe(function(zr){var Mr=Ye(e,te,zr);return Mr.top+=ae,Mr.bottom+=ae,fn(Mr,I,z,!1)?(Mr.top<=z&&Mr.left<=I&&(tt=zr,Je=Mr),!0):!1},he,pe),Lt,jt,Yt=!1;if(Je){var ar=I-Je.left<Je.right-I,$t=ar==xe;gt=tt+($t?0:1),jt=$t?"after":"before",Lt=ar?Je.left:Je.right}else{!xe&&(gt==pe||gt==he)&&gt++,jt=gt==0?"after":gt==l.text.length?"before":Ye(e,te,gt-(xe?1:0)).bottom+ae<=z==xe?"after":"before";var pr=nn(e,St(k,gt,jt),"line",l,te);Lt=pr.left,Yt=z<pr.top?-1:z>=pr.bottom?1:0}return gt=we(l.text,gt,1),Dr(k,gt,jt,Yt,I-Lt)}function vn(e,l,k,I,z,te,ae){var he=Fe(function(ze){var tt=z[ze],Je=tt.level!=1;return fn(nn(e,St(k,Je?tt.to:tt.from,Je?"before":"after"),"line",l,I),te,ae,!0)},0,z.length-1),pe=z[he];if(he>0){var xe=pe.level!=1,je=nn(e,St(k,xe?pe.from:pe.to,xe?"after":"before"),"line",l,I);fn(je,te,ae,!0)&&je.top>ae&&(pe=z[he-1])}return pe}function On(e,l,k,I,z,te,ae){var he=ln(e,l,I,ae),pe=he.begin,xe=he.end;/\s/.test(l.text.charAt(xe-1))&&xe--;for(var je=null,ze=null,tt=0;tt<z.length;tt++){var Je=z[tt];if(Je.from>=xe||Je.to<=pe)continue;var gt=Je.level!=1,Lt=Ye(e,I,gt?Math.min(xe,Je.to)-1:Math.max(pe,Je.from)).right,jt=Lt<te?te-Lt+1e9:Lt-te;(!je||ze>jt)&&(je=Je,ze=jt)}return je||(je=z[z.length-1]),je.from<pe&&(je={from:pe,to:je.to,level:je.level}),je.to>xe&&(je={from:je.from,to:xe,level:je.level}),je}var bn;function Gn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(bn==null){bn=C("pre",null,"CodeMirror-line-like");for(var l=0;l<49;++l)bn.appendChild(document.createTextNode("x")),bn.appendChild(C("br"));bn.appendChild(document.createTextNode("x"))}S(e.measure,bn);var k=bn.offsetHeight/50;return k>3&&(e.cachedTextHeight=k),x(e.measure),k||1}function $n(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var l=C("span","xxxxxxxxxx"),k=C("pre",[l],"CodeMirror-line-like");S(e.measure,k);var I=l.getBoundingClientRect(),z=(I.right-I.left)/10;return z>2&&(e.cachedCharWidth=z),z||10}function Mn(e){for(var l=e.display,k={},I={},z=l.gutters.clientLeft,te=l.gutters.firstChild,ae=0;te;te=te.nextSibling,++ae){var he=e.display.gutterSpecs[ae].className;k[he]=te.offsetLeft+te.clientLeft+z,I[he]=te.clientWidth}return{fixedPos:ni(l),gutterTotalWidth:l.gutters.offsetWidth,gutterLeft:k,gutterWidth:I,wrapperWidth:l.wrapper.clientWidth}}function ni(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fi(e){var l=Gn(e.display),k=e.options.lineWrapping,I=k&&Math.max(5,e.display.scroller.clientWidth/$n(e.display)-3);return function(z){if(Ft(e.doc,z))return 0;var te=0;if(z.widgets)for(var ae=0;ae<z.widgets.length;ae++)z.widgets[ae].height&&(te+=z.widgets[ae].height);return k?te+(Math.ceil(z.text.length/I)||1)*l:te+l}}function pi(e){var l=e.doc,k=Fi(e);l.iter(function(I){var z=k(I);z!=I.height&&Or(I,z)})}function Jn(e,l,k,I){var z=e.display;if(!k&&Pe(l).getAttribute("cm-not-content")=="true")return null;var te,ae,he=z.lineSpace.getBoundingClientRect();try{te=l.clientX-he.left,ae=l.clientY-he.top}catch(ze){return null}var pe=Qr(e,te,ae),xe;if(I&&pe.xRel>0&&(xe=Bt(e.doc,pe.line).text).length==pe.ch){var je=X(xe,xe.length,e.options.tabSize)-xe.length;pe=St(pe.line,Math.max(0,Math.round((te-We(e.display).left)/$n(e.display))-je))}return pe}function An(e,l){if(l>=e.display.viewTo)return null;if(l-=e.display.viewFrom,l<0)return null;for(var k=e.display.view,I=0;I<k.length;I++)if(l-=k[I].size,l<0)return I}function Rn(e,l,k,I){l==null&&(l=e.doc.first),k==null&&(k=e.doc.first+e.doc.size),I||(I=0);var z=e.display;if(I&&k<z.viewTo&&(z.updateLineNumbers==null||z.updateLineNumbers>l)&&(z.updateLineNumbers=l),e.curOp.viewChanged=!0,l>=z.viewTo)zn&&Jt(e.doc,l)<z.viewTo&&kn(e);else if(k<=z.viewFrom)zn&&Wt(e.doc,k+I)>z.viewFrom?kn(e):(z.viewFrom+=I,z.viewTo+=I);else if(l<=z.viewFrom&&k>=z.viewTo)kn(e);else if(l<=z.viewFrom){var te=Vn(e,k,k+I,1);te?(z.view=z.view.slice(te.index),z.viewFrom=te.lineN,z.viewTo+=I):kn(e)}else if(k>=z.viewTo){var ae=Vn(e,l,l,-1);ae?(z.view=z.view.slice(0,ae.index),z.viewTo=ae.lineN):kn(e)}else{var he=Vn(e,l,l,-1),pe=Vn(e,k,k+I,1);he&&pe?(z.view=z.view.slice(0,he.index).concat(Zr(e,he.lineN,pe.lineN)).concat(z.view.slice(pe.index)),z.viewTo+=I):kn(e)}var xe=z.externalMeasured;xe&&(k<xe.lineN?xe.lineN+=I:l<xe.lineN+xe.size&&(z.externalMeasured=null))}function Nn(e,l,k){e.curOp.viewChanged=!0;var I=e.display,z=e.display.externalMeasured;if(z&&l>=z.lineN&&l<z.lineN+z.size&&(I.externalMeasured=null),l<I.viewFrom||l>=I.viewTo)return;var te=I.view[An(e,l)];if(te.node==null)return;var ae=te.changes||(te.changes=[]);oe(ae,k)==-1&&ae.push(k)}function kn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Vn(e,l,k,I){var z=An(e,l),te,ae=e.display.view;if(!zn||k==e.doc.first+e.doc.size)return{index:z,lineN:k};for(var he=e.display.viewFrom,pe=0;pe<z;pe++)he+=ae[pe].size;if(he!=l){if(I>0){if(z==ae.length-1)return null;te=he+ae[z].size-l,z++}else te=he-l;l+=te,k+=te}for(;Jt(e.doc,k)!=k;){if(z==(I<0?0:ae.length-1))return null;k+=I*ae[z-(I<0?1:0)].size,z+=I}return{index:z,lineN:k}}function _i(e,l,k){var I=e.display,z=I.view;z.length==0||l>=I.viewTo||k<=I.viewFrom?(I.view=Zr(e,l,k),I.viewFrom=l):(I.viewFrom>l?I.view=Zr(e,l,I.viewFrom).concat(I.view):I.viewFrom<l&&(I.view=I.view.slice(An(e,l))),I.viewFrom=l,I.viewTo<k?I.view=I.view.concat(Zr(e,I.viewTo,k)):I.viewTo>k&&(I.view=I.view.slice(0,An(e,k)))),I.viewTo=k}function Xi(e){for(var l=e.display.view,k=0,I=0;I<l.length;I++){var z=l[I];!z.hidden&&(!z.node||z.changes)&&++k}return k}function En(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ai(e,l){l===void 0&&(l=!0);for(var k=e.doc,I={},z=I.cursors=document.createDocumentFragment(),te=I.selection=document.createDocumentFragment(),ae=0;ae<k.sel.ranges.length;ae++){if(!l&&ae==k.sel.primIndex)continue;var he=k.sel.ranges[ae];if(he.from().line>=e.display.viewTo||he.to().line<e.display.viewFrom)continue;var pe=he.empty();(pe||e.options.showCursorWhenSelecting)&&Ri(e,he.head,z),pe||_n(e,he,te)}return I}function Ri(e,l,k){var I=nn(e,l,"div",null,null,!e.options.singleCursorHeightPerLine),z=k.appendChild(C("div","\xA0","CodeMirror-cursor"));if(z.style.left=I.left+"px",z.style.top=I.top+"px",z.style.height=Math.max(0,I.bottom-I.top)*e.options.cursorHeight+"px",I.other){var te=k.appendChild(C("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=I.other.left+"px",te.style.top=I.other.top+"px",te.style.height=(I.other.bottom-I.other.top)*.85+"px"}}function Sn(e,l){return e.top-l.top||e.left-l.left}function _n(e,l,k){var I=e.display,z=e.doc,te=document.createDocumentFragment(),ae=We(e.display),he=ae.left,pe=Math.max(I.sizerWidth,Ne(e)-I.sizer.offsetLeft)-ae.right,xe=z.direction=="ltr";function je($t,pr,zr,Mr){pr<0&&(pr=0),pr=Math.round(pr),Mr=Math.round(Mr),te.appendChild(C("div",null,"CodeMirror-selected","position: absolute; left: "+$t+`px;
top: `+pr+"px; width: "+(zr==null?pe-$t:zr)+`px;
height: `+(Mr-pr)+"px"))}function ze($t,pr,zr){var Mr=Bt(z,$t),dn=Mr.text.length,Fn,mi;function Yn(ii,Hi){return Tn(e,St($t,ii),"div",Mr,Hi)}function Ki(ii,Hi,xi){var fi=hr(e,Mr,null,ii),ai=Hi=="ltr"==(xi=="after")?"left":"right",Qn=xi=="after"?fi.begin:fi.end-(/\s/.test(Mr.text.charAt(fi.end-1))?2:1);return Yn(Qn,ai)[ai]}var Bi=at(Mr,z.direction);return Xe(Bi,pr||0,zr==null?dn:zr,function(ii,Hi,xi,fi){var ai=xi=="ltr",Qn=Yn(ii,ai?"left":"right"),Wi=Yn(Hi-1,ai?"right":"left"),lo=pr==null&&ii==0,Ua=zr==null&&Hi==dn,Oi=fi==0,ba=!Bi||fi==Bi.length-1;if(Wi.top-Qn.top<=3){var gi=(xe?lo:Ua)&&Oi,ps=(xe?Ua:lo)&&ba,Ia=gi?he:(ai?Qn:Wi).left,Ka=ps?pe:(ai?Wi:Qn).right;je(Ia,Qn.top,Ka-Ia,Qn.bottom)}else{var Va,ki,uo,ms;ai?(Va=xe&&lo&&Oi?he:Qn.left,ki=xe?pe:Ki(ii,xi,"before"),uo=xe?he:Ki(Hi,xi,"after"),ms=xe&&Ua&&ba?pe:Wi.right):(Va=xe?Ki(ii,xi,"before"):he,ki=!xe&&lo&&Oi?pe:Qn.right,uo=!xe&&Ua&&ba?he:Wi.left,ms=xe?Ki(Hi,xi,"after"):pe),je(Va,Qn.top,ki-Va,Qn.bottom),Qn.bottom<Wi.top&&je(he,Qn.bottom,null,Wi.top),je(uo,Wi.top,ms-uo,Wi.bottom)}(!Fn||Sn(Qn,Fn)<0)&&(Fn=Qn),Sn(Wi,Fn)<0&&(Fn=Wi),(!mi||Sn(Qn,mi)<0)&&(mi=Qn),Sn(Wi,mi)<0&&(mi=Wi)}),{start:Fn,end:mi}}var tt=l.from(),Je=l.to();if(tt.line==Je.line)ze(tt.line,tt.ch,Je.ch);else{var gt=Bt(z,tt.line),Lt=Bt(z,Je.line),jt=vt(gt)==vt(Lt),Yt=ze(tt.line,tt.ch,jt?gt.text.length+1:null).end,ar=ze(Je.line,jt?0:null,Je.ch).start;jt&&(Yt.top<ar.top-2?(je(Yt.right,Yt.top,null,Yt.bottom),je(he,ar.top,ar.left,ar.bottom)):je(Yt.right,Yt.top,ar.left-Yt.right,Yt.bottom)),Yt.bottom<ar.top&&je(he,Yt.bottom,null,ar.top)}k.appendChild(te)}function Xn(e){if(!e.state.focused)return;var l=e.display;clearInterval(l.blinker);var k=!0;l.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?l.blinker=setInterval(function(){e.hasFocus()||ra(e),l.cursorDiv.style.visibility=(k=!k)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(l.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),ta(e))}function xa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ra(e))},100)}function ta(e,l){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(_e(e,"focus",e,l),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),t&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xn(e)}function ra(e,l){if(e.state.delayingBlurEvent)return;e.state.focused&&(_e(e,"blur",e,l),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function La(e){for(var l=e.display,k=l.lineDiv.offsetTop,I=0;I<l.view.length;I++){var z=l.view[I],te=e.options.lineWrapping,ae=void 0,he=0;if(z.hidden)continue;if(w&&b<8){var pe=z.node.offsetTop+z.node.offsetHeight;ae=pe-k,k=pe}else{var xe=z.node.getBoundingClientRect();ae=xe.bottom-xe.top,!te&&z.text.firstChild&&(he=z.text.firstChild.getBoundingClientRect().right-xe.left-1)}var je=z.line.height-ae;if((je>.005||je<-.005)&&(Or(z.line,ae),wa(z.line),z.rest))for(var ze=0;ze<z.rest.length;ze++)wa(z.rest[ze]);if(he>e.display.sizerWidth){var tt=Math.ceil(he/$n(e.display));tt>e.display.maxLineLength&&(e.display.maxLineLength=tt,e.display.maxLine=z.line,e.display.maxLineChanged=!0)}}}function wa(e){if(e.widgets)for(var l=0;l<e.widgets.length;++l){var k=e.widgets[l],I=k.node.parentNode;I&&(k.height=I.offsetHeight)}}function ka(e,l,k){var I=k&&k.top!=null?Math.max(0,k.top):e.scroller.scrollTop;I=Math.floor(I-Hn(e));var z=k&&k.bottom!=null?k.bottom:I+e.wrapper.clientHeight,te=Wr(l,I),ae=Wr(l,z);if(k&&k.ensure){var he=k.ensure.from.line,pe=k.ensure.to.line;he<te?(te=he,ae=Wr(l,qt(Bt(l,he))+e.wrapper.clientHeight)):Math.min(pe,l.lastLine())>=ae&&(te=Wr(l,qt(Bt(l,pe))-e.wrapper.clientHeight),ae=pe)}return{from:te,to:Math.max(ae,te+1)}}function Ha(e,l){if(ce(e,"scrollCursorIntoView"))return;var k=e.display,I=k.sizer.getBoundingClientRect(),z=null;if(l.top+I.top<0?z=!0:l.bottom+I.top>(window.innerHeight||document.documentElement.clientHeight)&&(z=!1),z!=null&&!s){var te=C("div","\u200B",null,`position: absolute;
top: `+(l.top-k.viewOffset-Hn(e.display))+`px;
height: `+(l.bottom-l.top+Ve(e)+k.barHeight)+`px;
left: `+l.left+"px; width: "+Math.max(2,l.right-l.left)+"px;");e.display.lineSpace.appendChild(te),te.scrollIntoView(z),e.display.lineSpace.removeChild(te)}}function Xa(e,l,k,I){I==null&&(I=0);var z;!e.options.lineWrapping&&l==k&&(l=l.ch?St(l.line,l.sticky=="before"?l.ch-1:l.ch,"after"):l,k=l.sticky=="before"?St(l.line,l.ch+1,"before"):l);for(var te=0;te<5;te++){var ae=!1,he=nn(e,l),pe=!k||k==l?he:nn(e,k);z={left:Math.min(he.left,pe.left),top:Math.min(he.top,pe.top)-I,right:Math.max(he.left,pe.left),bottom:Math.max(he.bottom,pe.bottom)+I};var xe=na(e,z),je=e.doc.scrollTop,ze=e.doc.scrollLeft;if(xe.scrollTop!=null&&(aa(e,xe.scrollTop),Math.abs(e.doc.scrollTop-je)>1&&(ae=!0)),xe.scrollLeft!=null&&(ji(e,xe.scrollLeft),Math.abs(e.doc.scrollLeft-ze)>1&&(ae=!0)),!ae)break}return z}function Pa(e,l){var k=na(e,l);k.scrollTop!=null&&aa(e,k.scrollTop),k.scrollLeft!=null&&ji(e,k.scrollLeft)}function na(e,l){var k=e.display,I=Gn(e.display);l.top<0&&(l.top=0);var z=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:k.scroller.scrollTop,te=be(e),ae={};l.bottom-l.top>te&&(l.bottom=l.top+te);var he=e.doc.height+ke(k),pe=l.top<I,xe=l.bottom>he-I;if(l.top<z)ae.scrollTop=pe?0:l.top;else if(l.bottom>z+te){var je=Math.min(l.top,(xe?he:l.bottom)-te);je!=z&&(ae.scrollTop=je)}var ze=e.options.fixedGutter?0:k.gutters.offsetWidth,tt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:k.scroller.scrollLeft-ze,Je=Ne(e)-k.gutters.offsetWidth,gt=l.right-l.left>Je;return gt&&(l.right=l.left+Je),l.left<10?ae.scrollLeft=0:l.left<tt?ae.scrollLeft=Math.max(0,l.left+ze-(gt?0:10)):l.right>Je+tt-3&&(ae.scrollLeft=l.right+(gt?0:10)-Je),ae}function Ta(e,l){if(l==null)return;va(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+l}function ga(e){va(e);var l=e.getCursor();e.curOp.scrollToPos={from:l,to:l,margin:e.options.cursorScrollMargin}}function ia(e,l,k){(l!=null||k!=null)&&va(e),l!=null&&(e.curOp.scrollLeft=l),k!=null&&(e.curOp.scrollTop=k)}function co(e,l){va(e),e.curOp.scrollToPos=l}function va(e){var l=e.curOp.scrollToPos;if(l){e.curOp.scrollToPos=null;var k=Sr(e,l.from),I=Sr(e,l.to);Sa(e,k,I,l.margin)}}function Sa(e,l,k,I){var z=na(e,{left:Math.min(l.left,k.left),top:Math.min(l.top,k.top)-I,right:Math.max(l.right,k.right),bottom:Math.max(l.bottom,k.bottom)+I});ia(e,z.scrollLeft,z.scrollTop)}function aa(e,l){if(Math.abs(e.doc.scrollTop-l)<2)return;T||za(e,{top:l}),la(e,l,!0),T&&za(e),Wa(e,100)}function la(e,l,k){if(l=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,l)),e.display.scroller.scrollTop==l&&!k)return;e.doc.scrollTop=l,e.display.scrollbars.setScrollTop(l),e.display.scroller.scrollTop!=l&&(e.display.scroller.scrollTop=l)}function ji(e,l,k,I){if(l=Math.max(0,Math.min(l,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(k?l==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-l)<2)&&!I)return;e.doc.scrollLeft=l,mn(e),e.display.scroller.scrollLeft!=l&&(e.display.scroller.scrollLeft=l),e.display.scrollbars.setScrollLeft(l)}function Yi(e){var l=e.display,k=l.gutters.offsetWidth,I=Math.round(e.doc.height+ke(e.display));return{clientHeight:l.scroller.clientHeight,viewHeight:l.wrapper.clientHeight,scrollWidth:l.scroller.scrollWidth,clientWidth:l.scroller.clientWidth,viewWidth:l.wrapper.clientWidth,barLeft:e.options.fixedGutter?k:0,docHeight:I,scrollHeight:I+Ve(e)+l.barHeight,nativeBarWidth:l.nativeBarWidth,gutterWidth:k}}var dr=function(e,l,k){this.cm=k;var I=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),z=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");I.tabIndex=z.tabIndex=-1,e(I),e(z),Ie(I,"scroll",function(){I.clientHeight&&l(I.scrollTop,"vertical")}),Ie(z,"scroll",function(){z.clientWidth&&l(z.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dr.prototype.update=function(e){var l=e.scrollWidth>e.clientWidth+1,k=e.scrollHeight>e.clientHeight+1,I=e.nativeBarWidth;if(k){this.vert.style.display="block",this.vert.style.bottom=l?I+"px":"0";var z=e.viewHeight-(l?I:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+z)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(l){this.horiz.style.display="block",this.horiz.style.right=k?I+"px":"0",this.horiz.style.left=e.barLeft+"px";var te=e.viewWidth-e.barLeft-(k?I:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(I==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:k?I:0,bottom:l?I:0}},dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dr.prototype.zeroWidthHack=function(){var e=i&&!n?"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},dr.prototype.enableZeroWidthBar=function(e,l,k){e.style.pointerEvents="auto";function I(){var z=e.getBoundingClientRect(),te=k=="vert"?document.elementFromPoint(z.right-1,(z.top+z.bottom)/2):document.elementFromPoint((z.right+z.left)/2,z.bottom-1);te!=e?e.style.pointerEvents="none":l.set(1e3,I)}l.set(1e3,I)},dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var fr=function(){};fr.prototype.update=function(){return{bottom:0,right:0}},fr.prototype.setScrollLeft=function(){},fr.prototype.setScrollTop=function(){},fr.prototype.clear=function(){};function Qt(e,l){l||(l=Yi(e));var k=e.display.barWidth,I=e.display.barHeight;pn(e,l);for(var z=0;z<4&&k!=e.display.barWidth||I!=e.display.barHeight;z++)k!=e.display.barWidth&&e.options.lineWrapping&&La(e),pn(e,Yi(e)),k=e.display.barWidth,I=e.display.barHeight}function pn(e,l){var k=e.display,I=k.scrollbars.update(l);k.sizer.style.paddingRight=(k.barWidth=I.right)+"px",k.sizer.style.paddingBottom=(k.barHeight=I.bottom)+"px",k.heightForcer.style.borderBottom=I.bottom+"px solid transparent",I.right&&I.bottom?(k.scrollbarFiller.style.display="block",k.scrollbarFiller.style.height=I.bottom+"px",k.scrollbarFiller.style.width=I.right+"px"):k.scrollbarFiller.style.display="",I.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(k.gutterFiller.style.display="block",k.gutterFiller.style.height=I.bottom+"px",k.gutterFiller.style.width=l.gutterWidth+"px"):k.gutterFiller.style.display=""}var er={native:dr,null:fr};function ua(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new er[e.options.scrollbarStyle](function(l){e.display.wrapper.insertBefore(l,e.display.scrollbarFiller),Ie(l,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),l.setAttribute("cm-not-content","true")},function(l,k){k=="horizontal"?ji(e,l):aa(e,l)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var Ya=0;function Dn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ya},nr(e.curOp)}function Ca(e){var l=e.curOp;l&&Tr(l,function(k){for(var I=0;I<k.ops.length;I++)k.ops[I].cm.curOp=null;Io(k)})}function Io(e){for(var l=e.ops,k=0;k<l.length;k++)Jo(l[k]);for(var I=0;I<l.length;I++)Qo(l[I]);for(var z=0;z<l.length;z++)Zo(l[z]);for(var te=0;te<l.length;te++)ho(l[te]);for(var ae=0;ae<l.length;ae++)qo(l[ae])}function Jo(e){var l=e.cm,k=l.display;Do(l),e.updateMaxLine&&vr(l),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<k.viewFrom||e.scrollToPos.to.line>=k.viewTo)||k.maxLineChanged&&l.options.lineWrapping,e.update=e.mustUpdate&&new $i(l,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Oa(e.cm,e.update)}function Zo(e){var l=e.cm,k=l.display;e.updatedDisplay&&La(l),e.barMeasure=Yi(l),k.maxLineChanged&&!l.options.lineWrapping&&(e.adjustWidthTo=He(l,k.maxLine,k.maxLine.text.length).left+3,l.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(k.scroller.clientWidth,k.sizer.offsetLeft+e.adjustWidthTo+Ve(l)+l.display.barWidth),e.maxScrollLeft=Math.max(0,k.sizer.offsetLeft+e.adjustWidthTo-Ne(l))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=k.input.prepareSelection())}function ho(e){var l=e.cm;e.adjustWidthTo!=null&&(l.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<l.doc.scrollLeft&&ji(l,Math.min(l.display.scroller.scrollLeft,e.maxScrollLeft),!0),l.display.maxLineChanged=!1);var k=e.focus&&e.focus==Y();e.preparedSelection&&l.display.input.showSelection(e.preparedSelection,k),(e.updatedDisplay||e.startHeight!=l.doc.height)&&Qt(l,e.barMeasure),e.updatedDisplay&&Cn(l,e.barMeasure),e.selectionChanged&&Xn(l),l.state.focused&&e.updateInput&&l.display.input.reset(e.typing),k&&Ba(e.cm)}function qo(e){var l=e.cm,k=l.display,I=l.doc;if(e.updatedDisplay&&$a(l,e.update),k.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(k.wheelStartX=k.wheelStartY=null),e.scrollTop!=null&&la(l,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ji(l,e.scrollLeft,!0,!0),e.scrollToPos){var z=Xa(l,wr(I,e.scrollToPos.from),wr(I,e.scrollToPos.to),e.scrollToPos.margin);Ha(l,z)}var te=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(te)for(var he=0;he<te.length;++he)te[he].lines.length||_e(te[he],"hide");if(ae)for(var pe=0;pe<ae.length;++pe)ae[pe].lines.length&&_e(ae[pe],"unhide");k.wrapper.offsetHeight&&(I.scrollTop=l.display.scroller.scrollTop),e.changeObjs&&_e(l,"changes",l,e.changeObjs),e.update&&e.update.finish()}function Ii(e,l){if(e.curOp)return l();Dn(e);try{return l()}finally{Ca(e)}}function qn(e,l){return function(){if(e.curOp)return l.apply(e,arguments);Dn(e);try{return l.apply(e,arguments)}finally{Ca(e)}}}function Ei(e){return function(){if(this.curOp)return e.apply(this,arguments);Dn(this);try{return e.apply(this,arguments)}finally{Ca(this)}}}function ei(e){return function(){var l=this.cm;if(!l||l.curOp)return e.apply(this,arguments);Dn(l);try{return e.apply(this,arguments)}finally{Ca(l)}}}function Wa(e,l){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(l,U(es,e))}function es(e){var l=e.doc;if(l.highlightFrontier>=e.display.viewTo)return;var k=+new Date+e.options.workTime,I=ri(e,l.highlightFrontier),z=[];l.iter(I.line,Math.min(l.first+l.size,e.display.viewTo+500),function(te){if(I.line>=e.display.viewFrom){var ae=te.styles,he=te.text.length>e.options.maxHighlightLength?gr(l.mode,I.state):null,pe=zi(e,te,I,!0);he&&(I.state=he),te.styles=pe.styles;var xe=te.styleClasses,je=pe.classes;je?te.styleClasses=je:xe&&(te.styleClasses=null);for(var ze=!ae||ae.length!=te.styles.length||xe!=je&&(!xe||!je||xe.bgClass!=je.bgClass||xe.textClass!=je.textClass),tt=0;!ze&&tt<ae.length;++tt)ze=ae[tt]!=te.styles[tt];ze&&z.push(I.line),te.stateAfter=I.save(),I.nextLine()}else te.text.length<=e.options.maxHighlightLength&&Qi(e,te.text,I),te.stateAfter=I.line%5==0?I.save():null,I.nextLine();if(+new Date>k)return Wa(e,e.options.workDelay),!0}),l.highlightFrontier=I.line,l.modeFrontier=Math.max(l.modeFrontier,I.line),z.length&&Ii(e,function(){for(var te=0;te<z.length;te++)Nn(e,z[te],"text")})}var $i=function(e,l,k){var I=e.display;this.viewport=l,this.visible=ka(I,e.doc,l),this.editorIsHidden=!I.wrapper.offsetWidth,this.wrapperHeight=I.wrapper.clientHeight,this.wrapperWidth=I.wrapper.clientWidth,this.oldDisplayWidth=Ne(e),this.force=k,this.dims=Mn(e),this.events=[]};$i.prototype.signal=function(e,l){ve(e,l)&&this.events.push(arguments)},$i.prototype.finish=function(){for(var e=0;e<this.events.length;e++)_e.apply(null,this.events[e])};function Do(e){var l=e.display;!l.scrollbarsClipped&&l.scroller.offsetWidth&&(l.nativeBarWidth=l.scroller.offsetWidth-l.scroller.clientWidth,l.heightForcer.style.height=Ve(e)+"px",l.sizer.style.marginBottom=-l.nativeBarWidth+"px",l.sizer.style.borderRightWidth=Ve(e)+"px",l.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var l=Y();if(!l||!M(e.display.lineDiv,l))return null;var k={activeElt:l};if(window.getSelection){var I=window.getSelection();I.anchorNode&&I.extend&&M(e.display.lineDiv,I.anchorNode)&&(k.anchorNode=I.anchorNode,k.anchorOffset=I.anchorOffset,k.focusNode=I.focusNode,k.focusOffset=I.focusOffset)}return k}function ko(e){if(!e||!e.activeElt||e.activeElt==Y())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode)){var l=window.getSelection(),k=document.createRange();k.setEnd(e.anchorNode,e.anchorOffset),k.collapse(!1),l.removeAllRanges(),l.addRange(k),l.extend(e.focusNode,e.focusOffset)}}function Oa(e,l){var k=e.display,I=e.doc;if(l.editorIsHidden)return kn(e),!1;if(!l.force&&l.visible.from>=k.viewFrom&&l.visible.to<=k.viewTo&&(k.updateLineNumbers==null||k.updateLineNumbers>=k.viewTo)&&k.renderedView==k.view&&Xi(e)==0)return!1;di(e)&&(kn(e),l.dims=Mn(e));var z=I.first+I.size,te=Math.max(l.visible.from-e.options.viewportMargin,I.first),ae=Math.min(z,l.visible.to+e.options.viewportMargin);k.viewFrom<te&&te-k.viewFrom<20&&(te=Math.max(I.first,k.viewFrom)),k.viewTo>ae&&k.viewTo-ae<20&&(ae=Math.min(z,k.viewTo)),zn&&(te=Jt(e.doc,te),ae=Wt(e.doc,ae));var he=te!=k.viewFrom||ae!=k.viewTo||k.lastWrapHeight!=l.wrapperHeight||k.lastWrapWidth!=l.wrapperWidth;_i(e,te,ae),k.viewOffset=qt(Bt(e.doc,k.viewFrom)),e.display.mover.style.top=k.viewOffset+"px";var pe=Xi(e);if(!he&&pe==0&&!l.force&&k.renderedView==k.view&&(k.updateLineNumbers==null||k.updateLineNumbers>=k.viewTo))return!1;var xe=Lo(e);return pe>4&&(k.lineDiv.style.display="none"),Po(e,k.updateLineNumbers,l.dims),pe>4&&(k.lineDiv.style.display=""),k.renderedView=k.view,ko(xe),x(k.cursorDiv),x(k.selectionDiv),k.gutters.style.height=k.sizer.style.minHeight=0,he&&(k.lastWrapHeight=l.wrapperHeight,k.lastWrapWidth=l.wrapperWidth,Wa(e,400)),k.updateLineNumbers=null,!0}function $a(e,l){for(var k=l.viewport,I=!0;;I=!1){if(!I||!e.options.lineWrapping||l.oldDisplayWidth==Ne(e)){if(k&&k.top!=null&&(k={top:Math.min(e.doc.height+ke(e.display)-be(e),k.top)}),l.visible=ka(e.display,e.doc,k),l.visible.from>=e.display.viewFrom&&l.visible.to<=e.display.viewTo)break}else I&&(l.visible=ka(e.display,e.doc,k));if(!Oa(e,l))break;La(e);var z=Yi(e);En(e),Qt(e,z),Cn(e,z),l.force=!1}l.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(l.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,l){var k=new $i(e,l);if(Oa(e,k)){La(e),$a(e,k);var I=Yi(e);En(e),Qt(e,I),Cn(e,I),k.finish()}}function Po(e,l,k){var I=e.display,z=e.options.lineNumbers,te=I.lineDiv,ae=te.firstChild;function he(gt){var Lt=gt.nextSibling;return t&&i&&e.display.currentWheelTarget==gt?gt.style.display="none":gt.parentNode.removeChild(gt),Lt}for(var pe=I.view,xe=I.viewFrom,je=0;je<pe.length;je++){var ze=pe[je];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=te){var tt=mr(e,ze,xe,k);te.insertBefore(tt,ae)}else{for(;ae!=ze.node;)ae=he(ae);var Je=z&&l!=null&&l<=xe&&ze.lineNumber;ze.changes&&(oe(ze.changes,"gutter")>-1&&(Je=!1),Kt(e,ze,xe,k)),Je&&(x(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(yn(e.options,xe)))),ae=ze.node.nextSibling}xe+=ze.size}for(;ae;)ae=he(ae)}function Ja(e){var l=e.gutters.offsetWidth;e.sizer.style.marginLeft=l+"px"}function Cn(e,l){e.display.sizer.style.minHeight=l.docHeight+"px",e.display.heightForcer.style.top=l.docHeight+"px",e.display.gutters.style.height=l.docHeight+e.display.barHeight+Ve(e)+"px"}function mn(e){var l=e.display,k=l.view;if(!l.alignWidgets&&(!l.gutters.firstChild||!e.options.fixedGutter))return;for(var I=ni(l)-l.scroller.scrollLeft+e.doc.scrollLeft,z=l.gutters.offsetWidth,te=I+"px",ae=0;ae<k.length;ae++)if(!k[ae].hidden){e.options.fixedGutter&&(k[ae].gutter&&(k[ae].gutter.style.left=te),k[ae].gutterBackground&&(k[ae].gutterBackground.style.left=te));var he=k[ae].alignable;if(he)for(var pe=0;pe<he.length;pe++)he[pe].style.left=te}e.options.fixedGutter&&(l.gutters.style.left=I+z+"px")}function di(e){if(!e.options.lineNumbers)return!1;var l=e.doc,k=yn(e.options,l.first+l.size-1),I=e.display;if(k.length!=I.lineNumChars){var z=I.measure.appendChild(C("div",[C("div",k)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=z.firstChild.offsetWidth,ae=z.offsetWidth-te;return I.lineGutter.style.width="",I.lineNumInnerWidth=Math.max(te,I.lineGutter.offsetWidth-ae)+1,I.lineNumWidth=I.lineNumInnerWidth+ae,I.lineNumChars=I.lineNumInnerWidth?k.length:-1,I.lineGutter.style.width=I.lineNumWidth+"px",Ja(e.display),!0}return!1}function Di(e,l){for(var k=[],I=!1,z=0;z<e.length;z++){var te=e[z],ae=null;if(typeof te!="string"&&(ae=te.style,te=te.className),te=="CodeMirror-linenumbers")if(l)I=!0;else continue;k.push({className:te,style:ae})}return l&&!I&&k.push({className:"CodeMirror-linenumbers",style:null}),k}function Ma(e){var l=e.gutters,k=e.gutterSpecs;x(l),e.lineGutter=null;for(var I=0;I<k.length;++I){var z=k[I],te=z.className,ae=z.style,he=l.appendChild(C("div",null,"CodeMirror-gutter "+te));ae&&(he.style.cssText=ae),te=="CodeMirror-linenumbers"&&(e.lineGutter=he,he.style.width=(e.lineNumWidth||1)+"px")}l.style.display=k.length?"":"none",Ja(e)}function ca(e){Ma(e.display),Rn(e),mn(e)}function Ga(e,l,k,I){var z=this;this.input=k,z.scrollbarFiller=C("div",null,"CodeMirror-scrollbar-filler"),z.scrollbarFiller.setAttribute("cm-not-content","true"),z.gutterFiller=C("div",null,"CodeMirror-gutter-filler"),z.gutterFiller.setAttribute("cm-not-content","true"),z.lineDiv=j("div",null,"CodeMirror-code"),z.selectionDiv=C("div",null,null,"position: relative; z-index: 1"),z.cursorDiv=C("div",null,"CodeMirror-cursors"),z.measure=C("div",null,"CodeMirror-measure"),z.lineMeasure=C("div",null,"CodeMirror-measure"),z.lineSpace=j("div",[z.measure,z.lineMeasure,z.selectionDiv,z.cursorDiv,z.lineDiv],null,"position: relative; outline: none");var te=j("div",[z.lineSpace],"CodeMirror-lines");z.mover=C("div",[te],null,"position: relative"),z.sizer=C("div",[z.mover],"CodeMirror-sizer"),z.sizerWidth=null,z.heightForcer=C("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),z.gutters=C("div",null,"CodeMirror-gutters"),z.lineGutter=null,z.scroller=C("div",[z.sizer,z.heightForcer,z.gutters],"CodeMirror-scroll"),z.scroller.setAttribute("tabIndex","-1"),z.wrapper=C("div",[z.scrollbarFiller,z.gutterFiller,z.scroller],"CodeMirror"),w&&b<8&&(z.gutters.style.zIndex=-1,z.scroller.style.paddingRight=0),!t&&!(T&&u)&&(z.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(z.wrapper):e(z.wrapper)),z.viewFrom=z.viewTo=l.first,z.reportedViewFrom=z.reportedViewTo=l.first,z.view=[],z.renderedView=null,z.externalMeasured=null,z.viewOffset=0,z.lastWrapHeight=z.lastWrapWidth=0,z.updateLineNumbers=null,z.nativeBarWidth=z.barHeight=z.barWidth=0,z.scrollbarsClipped=!1,z.lineNumWidth=z.lineNumInnerWidth=z.lineNumChars=null,z.alignWidgets=!1,z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.maxLine=null,z.maxLineLength=0,z.maxLineChanged=!1,z.wheelDX=z.wheelDY=z.wheelStartX=z.wheelStartY=null,z.shift=!1,z.selForContextMenu=null,z.activeTouch=null,z.gutterSpecs=Di(I.gutters,I.lineNumbers),Ma(z),k.init(z)}var ya=0,hi=null;w?hi=-.53:T?hi=15:a?hi=-.7:o&&(hi=-1/3);function Qa(e){var l=e.wheelDeltaX,k=e.wheelDeltaY;return l==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(l=e.detail),k==null&&e.detail&&e.axis==e.VERTICAL_AXIS?k=e.detail:k==null&&(k=e.wheelDelta),{x:l,y:k}}function fo(e){var l=Qa(e);return l.x*=hi,l.y*=hi,l}function po(e,l){var k=Qa(l),I=k.x,z=k.y,te=e.display,ae=te.scroller,he=ae.scrollWidth>ae.clientWidth,pe=ae.scrollHeight>ae.clientHeight;if(!(I&&he||z&&pe))return;if(z&&i&&t){e:for(var xe=l.target,je=te.view;xe!=ae;xe=xe.parentNode)for(var ze=0;ze<je.length;ze++)if(je[ze].node==xe){e.display.currentWheelTarget=xe;break e}}if(I&&!T&&!c&&hi!=null){z&&pe&&aa(e,Math.max(0,ae.scrollTop+z*hi)),ji(e,Math.max(0,ae.scrollLeft+I*hi)),(!z||z&&pe)&&ge(l),te.wheelStartX=null;return}if(z&&hi!=null){var tt=z*hi,Je=e.doc.scrollTop,gt=Je+te.wrapper.clientHeight;tt<0?Je=Math.max(0,Je+tt-50):gt=Math.min(e.doc.height,gt+tt+50),za(e,{top:Je,bottom:gt})}ya<20&&(te.wheelStartX==null?(te.wheelStartX=ae.scrollLeft,te.wheelStartY=ae.scrollTop,te.wheelDX=I,te.wheelDY=z,setTimeout(function(){if(te.wheelStartX==null)return;var Lt=ae.scrollLeft-te.wheelStartX,jt=ae.scrollTop-te.wheelStartY,Yt=jt&&te.wheelDY&&jt/te.wheelDY||Lt&&te.wheelDX&&Lt/te.wheelDX;if(te.wheelStartX=te.wheelStartY=null,!Yt)return;hi=(hi*ya+Yt)/(ya+1),++ya},200)):(te.wheelDX+=I,te.wheelDY+=z))}var Li=function(e,l){this.ranges=e,this.primIndex=l};Li.prototype.primary=function(){return this.ranges[this.primIndex]},Li.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var l=0;l<this.ranges.length;l++){var k=this.ranges[l],I=e.ranges[l];if(!oi(k.anchor,I.anchor)||!oi(k.head,I.head))return!1}return!0},Li.prototype.deepCopy=function(){for(var e=[],l=0;l<this.ranges.length;l++)e[l]=new wn(wi(this.ranges[l].anchor),wi(this.ranges[l].head));return new Li(e,this.primIndex)},Li.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Li.prototype.contains=function(e,l){l||(l=e);for(var k=0;k<this.ranges.length;k++){var I=this.ranges[k];if(ur(l,I.from())>=0&&ur(e,I.to())<=0)return k}return-1};var wn=function(e,l){this.anchor=e,this.head=l};wn.prototype.from=function(){return vi(this.anchor,this.head)},wn.prototype.to=function(){return Pi(this.anchor,this.head)},wn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ji(e,l,k){var I=e&&e.options.selectionsMayTouch,z=l[k];l.sort(function(tt,Je){return ur(tt.from(),Je.from())}),k=oe(l,z);for(var te=1;te<l.length;te++){var ae=l[te],he=l[te-1],pe=ur(he.to(),ae.from());if(I&&!ae.empty()?pe>0:pe>=0){var xe=vi(he.from(),ae.from()),je=Pi(he.to(),ae.to()),ze=he.empty()?ae.from()==ae.head:he.from()==he.head;te<=k&&--k,l.splice(--te,2,new wn(ze?je:xe,ze?xe:je))}}return new Li(l,k)}function da(e,l){return new Li([new wn(e,l||e)],0)}function ha(e){return e.text?St(e.from.line+e.text.length-1,B(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,l){if(ur(e,l.from)<0)return e;if(ur(e,l.to)<=0)return ha(l);var k=e.line+l.text.length-(l.to.line-l.from.line)-1,I=e.ch;return e.line==l.to.line&&(I+=ha(l).ch-l.to.ch),St(k,I)}function Za(e,l){for(var k=[],I=0;I<e.sel.ranges.length;I++){var z=e.sel.ranges[I];k.push(new wn(mo(z.anchor,l),mo(z.head,l)))}return Ji(e.cm,k,e.sel.primIndex)}function Mo(e,l,k){return e.line==l.line?St(k.line,e.ch-l.ch+k.ch):St(k.line+(e.line-l.line),e.ch)}function No(e,l,k){for(var I=[],z=St(e.first,0),te=z,ae=0;ae<l.length;ae++){var he=l[ae],pe=Mo(he.from,z,te),xe=Mo(ha(he),z,te);if(z=he.to,te=xe,k=="around"){var je=e.sel.ranges[ae],ze=ur(je.head,je.anchor)<0;I[ae]=new wn(ze?xe:pe,ze?pe:xe)}else I[ae]=new wn(pe,pe)}return new Li(I,e.sel.primIndex)}function Aa(e){e.doc.mode=hn(e.options,e.doc.modeOption),go(e)}function go(e){e.doc.iter(function(l){l.stateAfter&&(l.stateAfter=null),l.styles&&(l.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Wa(e,100),e.state.modeGen++,e.curOp&&Rn(e)}function gs(e,l){return l.from.ch==0&&l.to.ch==0&&B(l.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,l,k,I){function z(ar){return k?k[ar]:null}function te(ar,$t,pr){cr(ar,$t,pr,I),Ht(ar,"change",ar,l)}function ae(ar,$t){for(var pr=[],zr=ar;zr<$t;++zr)pr.push(new Ar(xe[zr],z(zr),I));return pr}var he=l.from,pe=l.to,xe=l.text,je=Bt(e,he.line),ze=Bt(e,pe.line),tt=B(xe),Je=z(xe.length-1),gt=pe.line-he.line;if(l.full)e.insert(0,ae(0,xe.length)),e.remove(xe.length,e.size-xe.length);else if(gs(e,l)){var Lt=ae(0,xe.length-1);te(ze,ze.text,Je),gt&&e.remove(he.line,gt),Lt.length&&e.insert(he.line,Lt)}else if(je==ze)if(xe.length==1)te(je,je.text.slice(0,he.ch)+tt+je.text.slice(pe.ch),Je);else{var jt=ae(1,xe.length-1);jt.push(new Ar(tt+je.text.slice(pe.ch),Je,I)),te(je,je.text.slice(0,he.ch)+xe[0],z(0)),e.insert(he.line+1,jt)}else if(xe.length==1)te(je,je.text.slice(0,he.ch)+xe[0]+ze.text.slice(pe.ch),z(0)),e.remove(he.line+1,gt);else{te(je,je.text.slice(0,he.ch)+xe[0],z(0)),te(ze,tt+ze.text.slice(pe.ch),Je);var Yt=ae(1,xe.length-1);gt>1&&e.remove(he.line+1,gt-1),e.insert(he.line+1,Yt)}Ht(e,"change",e,l)}function Na(e,l,k){function I(z,te,ae){if(z.linked)for(var he=0;he<z.linked.length;++he){var pe=z.linked[he];if(pe.doc==te)continue;var xe=ae&&pe.sharedHist;if(k&&!xe)continue;l(pe.doc,xe),I(pe.doc,z,xe)}}I(e,null,!0)}function vs(e,l){if(l.cm)throw new Error("This document is already in use.");e.doc=l,l.cm=e,pi(e),Aa(e),ys(e),e.options.lineWrapping||vr(e),e.options.mode=l.modeOption,Rn(e)}function ys(e){(e.doc.direction=="rtl"?K:_)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ii(e,function(){ys(e),Rn(e)})}function Fo(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,l){var k={from:wi(l.from),to:ha(l),text:Kr(e,l.from,l.to)};return Es(e,k,l.from.line,l.to.line+1),Na(e,function(I){return Es(I,k,l.from.line,l.to.line+1)},!0),k}function bs(e){for(;e.length;){var l=B(e);if(l.ranges)e.pop();else break}}function ml(e,l){if(l)return bs(e.done),B(e.done);if(e.done.length&&!B(e.done).ranges)return B(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),B(e.done)}function _s(e,l,k,I){var z=e.history;z.undone.length=0;var te=+new Date,ae,he;if((z.lastOp==I||z.lastOrigin==l.origin&&l.origin&&(l.origin.charAt(0)=="+"&&z.lastModTime>te-(e.cm?e.cm.options.historyEventDelay:500)||l.origin.charAt(0)=="*"))&&(ae=ml(z,z.lastOp==I)))he=B(ae.changes),ur(l.from,l.to)==0&&ur(l.from,he.to)==0?he.to=ha(l):ae.changes.push(rs(e,l));else{var pe=B(z.done);for((!pe||!pe.ranges)&&jo(e.sel,z.done),ae={changes:[rs(e,l)],generation:z.generation},z.done.push(ae);z.done.length>z.undoDepth;)z.done.shift(),z.done[0].ranges||z.done.shift()}z.done.push(k),z.generation=++z.maxGeneration,z.lastModTime=z.lastSelTime=te,z.lastOp=z.lastSelOp=I,z.lastOrigin=z.lastSelOrigin=l.origin,he||_e(e,"historyAdded")}function gl(e,l,k,I){var z=l.charAt(0);return z=="*"||z=="+"&&k.ranges.length==I.ranges.length&&k.somethingSelected()==I.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,l,k,I){var z=e.history,te=I&&I.origin;k==z.lastSelOp||te&&z.lastSelOrigin==te&&(z.lastModTime==z.lastSelTime&&z.lastOrigin==te||gl(e,te,B(z.done),l))?z.done[z.done.length-1]=l:jo(l,z.done),z.lastSelTime=+new Date,z.lastSelOrigin=te,z.lastSelOp=k,I&&I.clearRedo!==!1&&bs(z.undone)}function jo(e,l){var k=B(l);k&&k.ranges&&k.equals(e)||l.push(e)}function Es(e,l,k,I){var z=l["spans_"+e.id],te=0;e.iter(Math.max(e.first,k),Math.min(e.first+e.size,I),function(ae){ae.markedSpans&&((z||(z=l["spans_"+e.id]={}))[te]=ae.markedSpans),++te})}function yl(e){if(!e)return null;for(var l,k=0;k<e.length;++k)e[k].marker.explicitlyCleared?l||(l=e.slice(0,k)):l&&l.push(e[k]);return l?l.length?l:null:e}function bl(e,l){var k=l["spans_"+e.id];if(!k)return null;for(var I=[],z=0;z<l.text.length;++z)I.push(yl(k[z]));return I}function xs(e,l){var k=bl(e,l),I=qi(e,l);if(!k)return I;if(!I)return k;for(var z=0;z<k.length;++z){var te=k[z],ae=I[z];if(te&&ae){e:for(var he=0;he<ae.length;++he){for(var pe=ae[he],xe=0;xe<te.length;++xe)if(te[xe].marker==pe.marker)continue e;te.push(pe)}}else ae&&(k[z]=ae)}return k}function qa(e,l,k){for(var I=[],z=0;z<e.length;++z){var te=e[z];if(te.ranges){I.push(k?Li.prototype.deepCopy.call(te):te);continue}var ae=te.changes,he=[];I.push({changes:he});for(var pe=0;pe<ae.length;++pe){var xe=ae[pe],je=void 0;if(he.push({from:xe.from,to:xe.to,text:xe.text}),l)for(var ze in xe)(je=ze.match(/^spans_(\d+)$/))&&(oe(l,Number(je[1]))>-1&&(B(he)[ze]=xe[ze],delete xe[ze]))}}return I}function ns(e,l,k,I){if(I){var z=e.anchor;if(k){var te=ur(l,z)<0;te!=ur(k,z)<0?(z=l,l=k):te!=ur(l,k)<0&&(l=k)}return new wn(z,l)}else return new wn(k||l,l)}function Uo(e,l,k,I,z){z==null&&(z=e.cm&&(e.cm.display.shift||e.extend)),Ci(e,new Li([ns(e.sel.primary(),l,k,z)],0),I)}function ws(e,l,k){for(var I=[],z=e.cm&&(e.cm.display.shift||e.extend),te=0;te<e.sel.ranges.length;te++)I[te]=ns(e.sel.ranges[te],l[te],null,z);var ae=Ji(e.cm,I,e.sel.primIndex);Ci(e,ae,k)}function is(e,l,k,I){var z=e.sel.ranges.slice(0);z[l]=k,Ci(e,Ji(e.cm,z,e.sel.primIndex),I)}function Ts(e,l,k,I){Ci(e,da(l,k),I)}function _l(e,l,k){var I={ranges:l.ranges,update:function(z){this.ranges=[];for(var te=0;te<z.length;te++)this.ranges[te]=new wn(wr(e,z[te].anchor),wr(e,z[te].head))},origin:k&&k.origin};return _e(e,"beforeSelectionChange",e,I),e.cm&&_e(e.cm,"beforeSelectionChange",e.cm,I),I.ranges!=l.ranges?Ji(e.cm,I.ranges,I.ranges.length-1):l}function Ss(e,l,k){var I=e.history.done,z=B(I);z&&z.ranges?(I[I.length-1]=l,Bo(e,l,k)):Ci(e,l,k)}function Ci(e,l,k){Bo(e,l,k),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,k)}function Bo(e,l,k){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(l=_l(e,l,k));var I=k&&k.bias||(ur(l.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,l,I,!0)),!(k&&k.scroll===!1)&&e.cm&&ga(e.cm)}function Cs(e,l){if(l.equals(e.sel))return;e.sel=l,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,fe(e.cm)),Ht(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,l,k,I){for(var z,te=0;te<l.ranges.length;te++){var ae=l.ranges[te],he=l.ranges.length==e.sel.ranges.length&&e.sel.ranges[te],pe=Ho(e,ae.anchor,he&&he.anchor,k,I),xe=Ho(e,ae.head,he&&he.head,k,I);(z||pe!=ae.anchor||xe!=ae.head)&&(z||(z=l.ranges.slice(0,te)),z[te]=new wn(pe,xe))}return z?Ji(e.cm,z,l.primIndex):l}function eo(e,l,k,I,z){var te=Bt(e,l.line);if(te.markedSpans)for(var ae=0;ae<te.markedSpans.length;++ae){var he=te.markedSpans[ae],pe=he.marker,xe="selectLeft"in pe?!pe.selectLeft:pe.inclusiveLeft,je="selectRight"in pe?!pe.selectRight:pe.inclusiveRight;if((he.from==null||(xe?he.from<=l.ch:he.from<l.ch))&&(he.to==null||(je?he.to>=l.ch:he.to>l.ch))){if(z&&(_e(pe,"beforeCursorEnter"),pe.explicitlyCleared))if(te.markedSpans){--ae;continue}else break;if(!pe.atomic)continue;if(k){var ze=pe.find(I<0?1:-1),tt=void 0;if((I<0?je:xe)&&(ze=Rs(e,ze,-I,ze&&ze.line==l.line?te:null)),ze&&ze.line==l.line&&(tt=ur(ze,k))&&(I<0?tt<0:tt>0))return eo(e,ze,l,I,z)}var Je=pe.find(I<0?-1:1);return(I<0?xe:je)&&(Je=Rs(e,Je,I,Je.line==l.line?te:null)),Je?eo(e,Je,l,I,z):null}}return l}function Ho(e,l,k,I,z){var te=I||1,ae=eo(e,l,k,te,z)||!z&&eo(e,l,k,te,!0)||eo(e,l,k,-te,z)||!z&&eo(e,l,k,-te,!0);return ae||(e.cantEdit=!0,St(e.first,0))}function Rs(e,l,k,I){return k<0&&l.ch==0?l.line>e.first?wr(e,St(l.line-1)):null:k>0&&l.ch==(I||Bt(e,l.line)).text.length?l.line<e.first+e.size-1?St(l.line+1,0):null:new St(l.line,l.ch+k)}function Is(e){e.setSelection(St(e.firstLine(),0),St(e.lastLine()),Ae)}function Ds(e,l,k){var I={canceled:!1,from:l.from,to:l.to,text:l.text,origin:l.origin,cancel:function(){return I.canceled=!0}};return k&&(I.update=function(z,te,ae,he){z&&(I.from=wr(e,z)),te&&(I.to=wr(e,te)),ae&&(I.text=ae),he!==void 0&&(I.origin=he)}),_e(e,"beforeChange",e,I),e.cm&&_e(e.cm,"beforeChange",e.cm,I),I.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:I.from,to:I.to,text:I.text,origin:I.origin}}function to(e,l,k){if(e.cm){if(!e.cm.curOp)return qn(e.cm,to)(e,l,k);if(e.cm.state.suppressEdits)return}if((ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))&&(l=Ds(e,l,!0),!l))return;var I=Vi&&!k&&ea(e,l.from,l.to);if(I)for(var z=I.length-1;z>=0;--z)Ls(e,{from:I[z].from,to:I[z].to,text:z?[""]:l.text,origin:l.origin});else Ls(e,l)}function Ls(e,l){if(l.text.length==1&&l.text[0]==""&&ur(l.from,l.to)==0)return;var k=Za(e,l);_s(e,l,k,e.cm?e.cm.curOp.id:NaN),vo(e,l,k,qi(e,l));var I=[];Na(e,function(z,te){!te&&oe(I,z.history)==-1&&(Ns(z.history,l),I.push(z.history)),vo(z,l,null,qi(z,l))})}function Wo(e,l,k){var I=e.cm&&e.cm.state.suppressEdits;if(I&&!k)return;for(var z=e.history,te,ae=e.sel,he=l=="undo"?z.done:z.undone,pe=l=="undo"?z.undone:z.done,xe=0;xe<he.length&&!(te=he[xe],k?te.ranges&&!te.equals(e.sel):!te.ranges);xe++);if(xe==he.length)return;for(z.lastOrigin=z.lastSelOrigin=null;;)if(te=he.pop(),te.ranges){if(jo(te,pe),k&&!te.equals(e.sel)){Ci(e,te,{clearRedo:!1});return}ae=te}else if(I){he.push(te);return}else break;var je=[];jo(ae,pe),pe.push({changes:je,generation:z.generation}),z.generation=te.generation||++z.maxGeneration;for(var ze=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),tt=function(Lt){var jt=te.changes[Lt];if(jt.origin=l,ze&&!Ds(e,jt,!1))return he.length=0,{};je.push(rs(e,jt));var Yt=Lt?Za(e,jt):B(he);vo(e,jt,Yt,xs(e,jt)),!Lt&&e.cm&&e.cm.scrollIntoView({from:jt.from,to:ha(jt)});var ar=[];Na(e,function($t,pr){!pr&&oe(ar,$t.history)==-1&&(Ns($t.history,jt),ar.push($t.history)),vo($t,jt,null,xs($t,jt))})},Je=te.changes.length-1;Je>=0;--Je){var gt=tt(Je);if(gt)return gt.v}}function ks(e,l){if(l==0)return;if(e.first+=l,e.sel=new Li(G(e.sel.ranges,function(z){return new wn(St(z.anchor.line+l,z.anchor.ch),St(z.head.line+l,z.head.ch))}),e.sel.primIndex),e.cm){Rn(e.cm,e.first,e.first-l,l);for(var k=e.cm.display,I=k.viewFrom;I<k.viewTo;I++)Nn(e.cm,I,"gutter")}}function vo(e,l,k,I){if(e.cm&&!e.cm.curOp)return qn(e.cm,vo)(e,l,k,I);if(l.to.line<e.first){ks(e,l.text.length-1-(l.to.line-l.from.line));return}if(l.from.line>e.lastLine())return;if(l.from.line<e.first){var z=l.text.length-1-(e.first-l.from.line);ks(e,z),l={from:St(e.first,0),to:St(l.to.line+z,l.to.ch),text:[B(l.text)],origin:l.origin}}var te=e.lastLine();l.to.line>te&&(l={from:l.from,to:St(te,Bt(e,te).text.length),text:[l.text[0]],origin:l.origin}),l.removed=Kr(e,l.from,l.to),k||(k=Za(e,l)),e.cm?El(e.cm,l,I):ts(e,l,I),Bo(e,k,Ae),e.cantEdit&&Ho(e,St(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,l,k){var I=e.doc,z=e.display,te=l.from,ae=l.to,he=!1,pe=te.line;e.options.lineWrapping||(pe=Lr(vt(Bt(I,te.line))),I.iter(pe,ae.line+1,function(Je){if(Je==z.maxLine)return he=!0,!0})),I.sel.contains(l.from,l.to)>-1&&fe(e),ts(I,l,k,Fi(e)),e.options.lineWrapping||(I.iter(pe,te.line+l.text.length,function(Je){var gt=Ze(Je);gt>z.maxLineLength&&(z.maxLine=Je,z.maxLineLength=gt,z.maxLineChanged=!0,he=!1)}),he&&(e.curOp.updateMaxLine=!0)),Da(I,te.line),Wa(e,400);var xe=l.text.length-(ae.line-te.line)-1;l.full?Rn(e):te.line==ae.line&&l.text.length==1&&!gs(e.doc,l)?Nn(e,te.line,"text"):Rn(e,te.line,ae.line+1,xe);var je=ve(e,"changes"),ze=ve(e,"change");if(ze||je){var tt={from:te,to:ae,text:l.text,removed:l.removed,origin:l.origin};ze&&Ht(e,"change",e,tt),je&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(tt)}e.display.selForContextMenu=null}function ro(e,l,k,I,z){var te;I||(I=k),ur(I,k)<0&&(te=[I,k],k=te[0],I=te[1]),typeof l=="string"&&(l=e.splitLines(l)),to(e,{from:k,to:I,text:l,origin:z})}function Ps(e,l,k,I){k<e.line?e.line+=I:l<e.line&&(e.line=l,e.ch=0)}function Ms(e,l,k,I){for(var z=0;z<e.length;++z){var te=e[z],ae=!0;if(te.ranges){te.copied||(te=e[z]=te.deepCopy(),te.copied=!0);for(var he=0;he<te.ranges.length;he++)Ps(te.ranges[he].anchor,l,k,I),Ps(te.ranges[he].head,l,k,I);continue}for(var pe=0;pe<te.changes.length;++pe){var xe=te.changes[pe];if(k<xe.from.line)xe.from=St(xe.from.line+I,xe.from.ch),xe.to=St(xe.to.line+I,xe.to.ch);else if(l<=xe.to.line){ae=!1;break}}ae||(e.splice(0,z+1),z=0)}}function Ns(e,l){var k=l.from.line,I=l.to.line,z=l.text.length-(I-k)-1;Ms(e.done,k,I,z),Ms(e.undone,k,I,z)}function yo(e,l,k,I){var z=l,te=l;return typeof l=="number"?te=Bt(e,Un(e,l)):z=Lr(l),z==null?null:(I(te,z)&&e.cm&&Nn(e.cm,z,k),te)}function bo(e){this.lines=e,this.parent=null;for(var l=0,k=0;k<e.length;++k)e[k].parent=this,l+=e[k].height;this.height=l}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,l){for(var k=e,I=e+l;k<I;++k){var z=this.lines[k];this.height-=z.height,ht(z),Ht(z,"delete")}this.lines.splice(e,l)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,l,k){this.height+=k,this.lines=this.lines.slice(0,e).concat(l).concat(this.lines.slice(e));for(var I=0;I<l.length;++I)l[I].parent=this},iterN:function(e,l,k){for(var I=e+l;e<I;++e)if(k(this.lines[e]))return!0}};function _o(e){this.children=e;for(var l=0,k=0,I=0;I<e.length;++I){var z=e[I];l+=z.chunkSize(),k+=z.height,z.parent=this}this.size=l,this.height=k,this.parent=null}_o.prototype={chunkSize:function(){return this.size},removeInner:function(e,l){this.size-=l;for(var k=0;k<this.children.length;++k){var I=this.children[k],z=I.chunkSize();if(e<z){var te=Math.min(l,z-e),ae=I.height;if(I.removeInner(e,te),this.height-=ae-I.height,z==te&&(this.children.splice(k--,1),I.parent=null),(l-=te)==0)break;e=0}else e-=z}if(this.size-l<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var he=[];this.collapse(he),this.children=[new bo(he)],this.children[0].parent=this}},collapse:function(e){for(var l=0;l<this.children.length;++l)this.children[l].collapse(e)},insertInner:function(e,l,k){this.size+=l.length,this.height+=k;for(var I=0;I<this.children.length;++I){var z=this.children[I],te=z.chunkSize();if(e<=te){if(z.insertInner(e,l,k),z.lines&&z.lines.length>50){for(var ae=z.lines.length%25+25,he=ae;he<z.lines.length;){var pe=new bo(z.lines.slice(he,he+=25));z.height-=pe.height,this.children.splice(++I,0,pe),pe.parent=this}z.lines=z.lines.slice(0,ae),this.maybeSpill()}break}e-=te}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var l=e.children.splice(e.children.length-5,5),k=new _o(l);if(e.parent){e.size-=k.size,e.height-=k.height;var z=oe(e.parent.children,e);e.parent.children.splice(z+1,0,k)}else{var I=new _o(e.children);I.parent=e,e.children=[I,k],e=I}k.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,l,k){for(var I=0;I<this.children.length;++I){var z=this.children[I],te=z.chunkSize();if(e<te){var ae=Math.min(l,te-e);if(z.iterN(e,ae,k))return!0;if((l-=ae)==0)break;e=0}else e-=te}}};var Eo=function(e,l,k){if(k)for(var I in k)k.hasOwnProperty(I)&&(this[I]=k[I]);this.doc=e,this.node=l};Eo.prototype.clear=function(){var e=this.doc.cm,l=this.line.widgets,k=this.line,I=Lr(k);if(I==null||!l)return;for(var z=0;z<l.length;++z)l[z]==this&&l.splice(z--,1);l.length||(k.widgets=null);var te=Fr(this);Or(k,Math.max(0,k.height-te)),e&&(Ii(e,function(){Fs(e,k,-te),Nn(e,I,"widget")}),Ht(e,"lineWidgetCleared",e,this,I))},Eo.prototype.changed=function(){var e=this,l=this.height,k=this.doc.cm,I=this.line;this.height=null;var z=Fr(this)-l;if(!z)return;Ft(this.doc,I)||Or(I,I.height+z),k&&Ii(k,function(){k.curOp.forceUpdate=!0,Fs(k,I,z),Ht(k,"lineWidgetChanged",k,e,Lr(I))})},Oe(Eo);function Fs(e,l,k){qt(l)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ta(e,k)}function xl(e,l,k,I){var z=new Eo(e,k,I),te=e.cm;return te&&z.noHScroll&&(te.display.alignWidgets=!0),yo(e,l,"widget",function(ae){var he=ae.widgets||(ae.widgets=[]);if(z.insertAt==null?he.push(z):he.splice(Math.min(he.length-1,Math.max(0,z.insertAt)),0,z),z.line=ae,te&&!Ft(e,ae)){var pe=qt(ae)<e.scrollTop;Or(ae,ae.height+Fr(z)),pe&&Ta(te,z.height),te.curOp.forceUpdate=!0}return!0}),te&&Ht(te,"lineWidgetAdded",te,z,typeof l=="number"?l:Lr(l)),z}var js=0,Fa=function(e,l){this.lines=[],this.type=l,this.doc=e,this.id=++js};Fa.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,l=e&&!e.curOp;if(l&&Dn(e),ve(this,"clear")){var k=this.find();k&&Ht(this,"clear",k.from,k.to)}for(var I=null,z=null,te=0;te<this.lines.length;++te){var ae=this.lines[te],he=ci(ae.markedSpans,this);e&&!this.collapsed?Nn(e,Lr(ae),"text"):e&&(he.to!=null&&(z=Lr(ae)),he.from!=null&&(I=Lr(ae))),ae.markedSpans=oa(ae.markedSpans,he),he.from==null&&this.collapsed&&!Ft(this.doc,ae)&&e&&Or(ae,Gn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var pe=0;pe<this.lines.length;++pe){var xe=vt(this.lines[pe]),je=Ze(xe);je>e.display.maxLineLength&&(e.display.maxLine=xe,e.display.maxLineLength=je,e.display.maxLineChanged=!0)}I!=null&&e&&this.collapsed&&Rn(e,I,z+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Ht(e,"markerCleared",e,this,I,z),l&&Ca(e),this.parent&&this.parent.clear()},Fa.prototype.find=function(e,l){e==null&&this.type=="bookmark"&&(e=1);for(var k,I,z=0;z<this.lines.length;++z){var te=this.lines[z],ae=ci(te.markedSpans,this);if(ae.from!=null&&(k=St(l?te:Lr(te),ae.from),e==-1))return k;if(ae.to!=null&&(I=St(l?te:Lr(te),ae.to),e==1))return I}return k&&{from:k,to:I}},Fa.prototype.changed=function(){var e=this,l=this.find(-1,!0),k=this,I=this.doc.cm;if(!l||!I)return;Ii(I,function(){var z=l.line,te=Lr(l.line),ae=Ge(I,te);if(ae&&(Hr(ae),I.curOp.selectionChanged=I.curOp.forceUpdate=!0),I.curOp.updateMaxLine=!0,!Ft(k.doc,z)&&k.height!=null){var he=k.height;k.height=null;var pe=Fr(k)-he;pe&&Or(z,z.height+pe)}Ht(I,"markerChanged",I,e)})},Fa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var l=this.doc.cm.curOp;(!l.maybeHiddenMarkers||oe(l.maybeHiddenMarkers,this)==-1)&&(l.maybeUnhiddenMarkers||(l.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Fa.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var l=this.doc.cm.curOp;(l.maybeHiddenMarkers||(l.maybeHiddenMarkers=[])).push(this)}},Oe(Fa);function no(e,l,k,I,z){if(I&&I.shared)return wl(e,l,k,I,z);if(e.cm&&!e.cm.curOp)return qn(e.cm,no)(e,l,k,I,z);var te=new Fa(e,z),ae=ur(l,k);if(I&&D(I,te,!1),ae>0||ae==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=j("span",[te.replacedWith],"CodeMirror-widget"),I.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),I.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(ut(e,l.line,l,k,te)||l.line!=k.line&&ut(e,k.line,l,k,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");_a()}te.addToHistory&&_s(e,{from:l,to:k,origin:"markText"},e.sel,NaN);var he=l.line,pe=e.cm,xe;if(e.iter(he,k.line+1,function(ze){pe&&te.collapsed&&!pe.options.lineWrapping&&vt(ze)==pe.display.maxLine&&(xe=!0),te.collapsed&&he!=l.line&&Or(ze,0),pa(ze,new Ni(te,he==l.line?l.ch:null,he==k.line?k.ch:null)),++he}),te.collapsed&&e.iter(l.line,k.line+1,function(ze){Ft(e,ze)&&Or(ze,0)}),te.clearOnEnter&&Ie(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(Gi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),te.collapsed&&(te.id=++js,te.atomic=!0),pe){if(xe&&(pe.curOp.updateMaxLine=!0),te.collapsed)Rn(pe,l.line,k.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var je=l.line;je<=k.line;je++)Nn(pe,je,"text");te.atomic&&Os(pe.doc),Ht(pe,"markerAdded",pe,te)}return te}var xo=function(e,l){this.markers=e,this.primary=l;for(var k=0;k<e.length;++k)e[k].parent=this};xo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Ht(this,"clear")},xo.prototype.find=function(e,l){return this.primary.find(e,l)},Oe(xo);function wl(e,l,k,I,z){I=D(I),I.shared=!1;var te=[no(e,l,k,I,z)],ae=te[0],he=I.widgetNode;return Na(e,function(pe){he&&(I.widgetNode=he.cloneNode(!0)),te.push(no(pe,wr(pe,l),wr(pe,k),I,z));for(var xe=0;xe<pe.linked.length;++xe)if(pe.linked[xe].isParent)return;ae=B(te)}),new xo(te,ae)}function Us(e){return e.findMarks(St(e.first,0),e.clipPos(St(e.lastLine())),function(l){return l.parent})}function Tl(e,l){for(var k=0;k<l.length;k++){var I=l[k],z=I.find(),te=e.clipPos(z.from),ae=e.clipPos(z.to);if(ur(te,ae)){var he=no(e,te,ae,I.primary,I.primary.type);I.markers.push(he),he.parent=I}}}function Sl(e){for(var l=function(I){var z=e[I],te=[z.primary.doc];Na(z.primary.doc,function(pe){return te.push(pe)});for(var ae=0;ae<z.markers.length;ae++){var he=z.markers[ae];oe(te,he.doc)==-1&&(he.parent=null,z.markers.splice(ae--,1))}},k=0;k<e.length;k++)l(k)}var Cl=0,Ui=function(e,l,k,I,z){if(!(this instanceof Ui))return new Ui(e,l,k,I,z);k==null&&(k=0),_o.call(this,[new bo([new Ar("",null)])]),this.first=k,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=k;var te=St(k,0);this.sel=da(te),this.history=new Fo(null),this.id=++Cl,this.modeOption=l,this.lineSep=I,this.direction=z=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:te,to:te,text:e}),Ci(this,da(te),Ae)};Ui.prototype=Z(_o.prototype,{constructor:Ui,iter:function(e,l,k){k?this.iterN(e-this.first,l-e,k):this.iterN(this.first,this.first+this.size,e)},insert:function(e,l){for(var k=0,I=0;I<l.length;++I)k+=l[I].height;this.insertInner(e-this.first,l,k)},remove:function(e,l){this.removeInner(e-this.first,l)},getValue:function(e){var l=rn(this,this.first,this.first+this.size);return e===!1?l:l.join(e||this.lineSeparator())},setValue:ei(function(e){var l=St(this.first,0),k=this.first+this.size-1;to(this,{from:l,to:St(k,Bt(this,k).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ia(this.cm,0,0),Ci(this,da(l),Ae)}),replaceRange:function(e,l,k,I){l=wr(this,l),k=k?wr(this,k):l,ro(this,e,l,k,I)},getRange:function(e,l,k){var I=Kr(this,wr(this,e),wr(this,l));return k===!1?I:I.join(k||this.lineSeparator())},getLine:function(e){var l=this.getLineHandle(e);return l&&l.text},getLineHandle:function(e){if(jn(this,e))return Bt(this,e)},getLineNumber:function(e){return Lr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Bt(this,e)),vt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return wr(this,e)},getCursor:function(e){var l=this.sel.primary(),k;return e==null||e=="head"?k=l.head:e=="anchor"?k=l.anchor:e=="end"||e=="to"||e===!1?k=l.to():k=l.from(),k},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ei(function(e,l,k){Ts(this,wr(this,typeof e=="number"?St(e,l||0):e),null,k)}),setSelection:ei(function(e,l,k){Ts(this,wr(this,e),wr(this,l||e),k)}),extendSelection:ei(function(e,l,k){Uo(this,wr(this,e),l&&wr(this,l),k)}),extendSelections:ei(function(e,l){ws(this,It(this,e),l)}),extendSelectionsBy:ei(function(e,l){var k=G(this.sel.ranges,e);ws(this,It(this,k),l)}),setSelections:ei(function(e,l,k){if(!e.length)return;for(var I=[],z=0;z<e.length;z++)I[z]=new wn(wr(this,e[z].anchor),wr(this,e[z].head));l==null&&(l=Math.min(e.length-1,this.sel.primIndex)),Ci(this,Ji(this.cm,I,l),k)}),addSelection:ei(function(e,l,k){var I=this.sel.ranges.slice(0);I.push(new wn(wr(this,e),wr(this,l||e))),Ci(this,Ji(this.cm,I,I.length-1),k)}),getSelection:function(e){for(var l=this.sel.ranges,k,I=0;I<l.length;I++){var z=Kr(this,l[I].from(),l[I].to());k=k?k.concat(z):z}return e===!1?k:k.join(e||this.lineSeparator())},getSelections:function(e){for(var l=[],k=this.sel.ranges,I=0;I<k.length;I++){var z=Kr(this,k[I].from(),k[I].to());e!==!1&&(z=z.join(e||this.lineSeparator())),l[I]=z}return l},replaceSelection:function(e,l,k){for(var I=[],z=0;z<this.sel.ranges.length;z++)I[z]=e;this.replaceSelections(I,l,k||"+input")},replaceSelections:ei(function(e,l,k){for(var I=[],z=this.sel,te=0;te<z.ranges.length;te++){var ae=z.ranges[te];I[te]={from:ae.from(),to:ae.to(),text:this.splitLines(e[te]),origin:k}}for(var he=l&&l!="end"&&No(this,I,l),pe=I.length-1;pe>=0;pe--)to(this,I[pe]);he?Ss(this,he):this.cm&&ga(this.cm)}),undo:ei(function(){Wo(this,"undo")}),redo:ei(function(){Wo(this,"redo")}),undoSelection:ei(function(){Wo(this,"undo",!0)}),redoSelection:ei(function(){Wo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,l=0,k=0,I=0;I<e.done.length;I++)e.done[I].ranges||++l;for(var z=0;z<e.undone.length;z++)e.undone[z].ranges||++k;return{undo:l,redo:k}},clearHistory:function(){var e=this;this.history=new Fo(this.history.maxGeneration),Na(this,function(l){return l.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 l=this.history=new Fo(this.history.maxGeneration);l.done=qa(e.done.slice(0),null,!0),l.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:ei(function(e,l,k){return yo(this,e,"gutter",function(I){var z=I.gutterMarkers||(I.gutterMarkers={});return z[l]=k,!k&&J(z)&&(I.gutterMarkers=null),!0})}),clearGutter:ei(function(e){var l=this;this.iter(function(k){k.gutterMarkers&&k.gutterMarkers[e]&&yo(l,k,"gutter",function(){return k.gutterMarkers[e]=null,J(k.gutterMarkers)&&(k.gutterMarkers=null),!0})})}),lineInfo:function(e){var l;if(typeof e=="number"){if(!jn(this,e))return null;if(l=e,e=Bt(this,e),!e)return null}else if(l=Lr(e),l==null)return null;return{line:l,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ei(function(e,l,k){return yo(this,e,l=="gutter"?"gutter":"class",function(I){var z=l=="text"?"textClass":l=="background"?"bgClass":l=="gutter"?"gutterClass":"wrapClass";if(!I[z])I[z]=k;else{if(O(k).test(I[z]))return!1;I[z]+=" "+k}return!0})}),removeLineClass:ei(function(e,l,k){return yo(this,e,l=="gutter"?"gutter":"class",function(I){var z=l=="text"?"textClass":l=="background"?"bgClass":l=="gutter"?"gutterClass":"wrapClass",te=I[z];if(te)if(k==null)I[z]=null;else{var ae=te.match(O(k));if(!ae)return!1;var he=ae.index+ae[0].length;I[z]=te.slice(0,ae.index)+(!ae.index||he==te.length?"":" ")+te.slice(he)||null}else return!1;return!0})}),addLineWidget:ei(function(e,l,k){return xl(this,e,l,k)}),removeLineWidget:function(e){e.clear()},markText:function(e,l,k){return no(this,wr(this,e),wr(this,l),k,k&&k.type||"range")},setBookmark:function(e,l){var k={replacedWith:l&&(l.nodeType==null?l.widget:l),insertLeft:l&&l.insertLeft,clearWhenEmpty:!1,shared:l&&l.shared,handleMouseEvents:l&&l.handleMouseEvents};return e=wr(this,e),no(this,e,e,k,"bookmark")},findMarksAt:function(e){e=wr(this,e);var l=[],k=Bt(this,e.line).markedSpans;if(k)for(var I=0;I<k.length;++I){var z=k[I];(z.from==null||z.from<=e.ch)&&(z.to==null||z.to>=e.ch)&&l.push(z.marker.parent||z.marker)}return l},findMarks:function(e,l,k){e=wr(this,e),l=wr(this,l);var I=[],z=e.line;return this.iter(e.line,l.line+1,function(te){var ae=te.markedSpans;if(ae)for(var he=0;he<ae.length;he++){var pe=ae[he];!(pe.to!=null&&z==e.line&&e.ch>=pe.to||pe.from==null&&z!=e.line||pe.from!=null&&z==l.line&&pe.from>=l.ch)&&(!k||k(pe.marker))&&I.push(pe.marker.parent||pe.marker)}++z}),I},getAllMarks:function(){var e=[];return this.iter(function(l){var k=l.markedSpans;if(k)for(var I=0;I<k.length;++I)k[I].from!=null&&e.push(k[I].marker)}),e},posFromIndex:function(e){var l,k=this.first,I=this.lineSeparator().length;return this.iter(function(z){var te=z.text.length+I;if(te>e)return l=e,!0;e-=te,++k}),wr(this,St(k,l))},indexFromPos:function(e){e=wr(this,e);var l=e.ch;if(e.line<this.first||e.ch<0)return 0;var k=this.lineSeparator().length;return this.iter(this.first,e.line,function(I){l+=I.text.length+k}),l},copy:function(e){var l=new Ui(rn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return l.scrollTop=this.scrollTop,l.scrollLeft=this.scrollLeft,l.sel=this.sel,l.extend=!1,e&&(l.history.undoDepth=this.history.undoDepth,l.setHistory(this.getHistory())),l},linkedDoc:function(e){e||(e={});var l=this.first,k=this.first+this.size;e.from!=null&&e.from>l&&(l=e.from),e.to!=null&&e.to<k&&(k=e.to);var I=new Ui(rn(this,l,k),e.mode||this.modeOption,l,this.lineSep,this.direction);return e.sharedHist&&(I.history=this.history),(this.linked||(this.linked=[])).push({doc:I,sharedHist:e.sharedHist}),I.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(I,Us(this)),I},unlinkDoc:function(e){if(e instanceof Kn&&(e=e.doc),this.linked)for(var l=0;l<this.linked.length;++l){var k=this.linked[l];if(k.doc!=e)continue;this.linked.splice(l,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var I=[e.id];Na(e,function(z){return I.push(z.id)},!0),e.history=new Fo(null),e.history.done=qa(this.history.done,I),e.history.undone=qa(this.history.undone,I)}},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:ei(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(l){return l.order=null}),this.cm&&pl(this.cm)})}),Ui.prototype.eachLine=Ui.prototype.iter;var Bs=0;function Ol(e){var l=this;if(Hs(l),ce(l,e)||sn(l.display,e))return;ge(e),w&&(Bs=+new Date);var k=Jn(l,e,!0),I=e.dataTransfer.files;if(!k||l.isReadOnly())return;if(I&&I.length&&window.FileReader&&window.File)for(var z=I.length,te=Array(z),ae=0,he=function(){++ae==z&&qn(l,function(){k=wr(l.doc,k);var Je={from:k,to:k,text:l.doc.splitLines(te.filter(function(gt){return gt!=null}).join(l.doc.lineSeparator())),origin:"paste"};to(l.doc,Je),Ss(l.doc,da(wr(l.doc,k),wr(l.doc,ha(Je))))})()},pe=function(Je,gt){if(l.options.allowDropFileTypes&&oe(l.options.allowDropFileTypes,Je.type)==-1){he();return}var Lt=new FileReader;Lt.onerror=function(){return he()},Lt.onload=function(){var jt=Lt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(jt)){he();return}te[gt]=jt,he()},Lt.readAsText(Je)},xe=0;xe<I.length;xe++)pe(I[xe],xe);else{if(l.state.draggingText&&l.doc.sel.contains(k)>-1){l.state.draggingText(e),setTimeout(function(){return l.display.input.focus()},20);return}try{var je=e.dataTransfer.getData("Text");if(je){var ze;if(l.state.draggingText&&!l.state.draggingText.copy&&(ze=l.listSelections()),Bo(l.doc,da(k,k)),ze)for(var tt=0;tt<ze.length;++tt)ro(l.doc,"",ze[tt].anchor,ze[tt].head,"drag");l.replaceSelection(je,"around","paste"),l.display.input.focus()}}catch(Je){}}}function Al(e,l){if(w&&(!e.state.draggingText||+new Date-Bs<100)){Le(l);return}if(ce(e,l)||sn(e.display,l))return;if(l.dataTransfer.setData("Text",e.getSelection()),l.dataTransfer.effectAllowed="copyMove",l.dataTransfer.setDragImage&&!o){var k=C("img",null,null,"position: fixed; left: 0; top: 0;");k.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(k.width=k.height=1,e.display.wrapper.appendChild(k),k._top=k.offsetTop),l.dataTransfer.setDragImage(k,0,0),c&&k.parentNode.removeChild(k)}}function Rl(e,l){var k=Jn(e,l);if(!k)return;var I=document.createDocumentFragment();Ri(e,k,I),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),S(e.display.dragCursor,I)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var l=document.getElementsByClassName("CodeMirror"),k=[],I=0;I<l.length;I++){var z=l[I].CodeMirror;z&&k.push(z)}k.length&&k[0].operation(function(){for(var te=0;te<k.length;te++)e(k[te])})}var zs=!1;function Il(){if(zs)return;Dl(),zs=!0}function Dl(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ll)},100))}),Ie(window,"blur",function(){return Ws(ra)})}function Ll(e){var l=e.display;l.cachedCharWidth=l.cachedTextHeight=l.cachedPaddingH=null,l.scrollbarsClipped=!1,e.setSize()}for(var ja={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++)ja[wo+48]=ja[wo+96]=String(wo);for(var zo=65;zo<=90;zo++)ja[zo]=String.fromCharCode(zo);for(var To=1;To<=12;To++)ja[To+111]=ja[To+63235]="F"+To;var Ra={};Ra.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"},Ra.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"},Ra.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"},Ra.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"]},Ra.default=i?Ra.macDefault:Ra.pcDefault;function kl(e){var l=e.split(/-(?!$)/);e=l[l.length-1];for(var k,I,z,te,ae=0;ae<l.length-1;ae++){var he=l[ae];if(/^(cmd|meta|m)$/i.test(he))te=!0;else if(/^a(lt)?$/i.test(he))k=!0;else if(/^(c|ctrl|control)$/i.test(he))I=!0;else if(/^s(hift)?$/i.test(he))z=!0;else throw new Error("Unrecognized modifier name: "+he)}return k&&(e="Alt-"+e),I&&(e="Ctrl-"+e),te&&(e="Cmd-"+e),z&&(e="Shift-"+e),e}function Pl(e){var l={};for(var k in e)if(e.hasOwnProperty(k)){var I=e[k];if(/^(name|fallthrough|(de|at)tach)$/.test(k))continue;if(I=="..."){delete e[k];continue}for(var z=G(k.split(" "),kl),te=0;te<z.length;te++){var ae=void 0,he=void 0;te==z.length-1?(he=z.join(" "),ae=I):(he=z.slice(0,te+1).join(" "),ae="...");var pe=l[he];if(!pe)l[he]=ae;else if(pe!=ae)throw new Error("Inconsistent bindings for "+he)}delete e[k]}for(var xe in l)e[xe]=l[xe];return e}function io(e,l,k,I){l=Go(l);var z=l.call?l.call(e,I):l[e];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&k(z))return"handled";if(l.fallthrough){if(Object.prototype.toString.call(l.fallthrough)!="[object Array]")return io(e,l.fallthrough,k,I);for(var te=0;te<l.fallthrough.length;te++){var ae=io(e,l.fallthrough[te],k,I);if(ae)return ae}}}function Gs(e){var l=typeof e=="string"?e:ja[e.keyCode];return l=="Ctrl"||l=="Alt"||l=="Shift"||l=="Mod"}function Ks(e,l,k){var I=e;return l.altKey&&I!="Alt"&&(e="Alt-"+e),(p?l.metaKey:l.ctrlKey)&&I!="Ctrl"&&(e="Ctrl-"+e),(p?l.ctrlKey:l.metaKey)&&I!="Mod"&&(e="Cmd-"+e),!k&&l.shiftKey&&I!="Shift"&&(e="Shift-"+e),e}function Vs(e,l){if(c&&e.keyCode==34&&e.char)return!1;var k=ja[e.keyCode];return k==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(k=e.code),Ks(k,e,l))}function Go(e){return typeof e=="string"?Ra[e]:e}function ao(e,l){for(var k=e.doc.sel.ranges,I=[],z=0;z<k.length;z++){for(var te=l(k[z]);I.length&&ur(te.from,B(I).to)<=0;){var ae=I.pop();if(ur(ae.from,te.from)<0){te.from=ae.from;break}}I.push(te)}Ii(e,function(){for(var he=I.length-1;he>=0;he--)ro(e.doc,"",I[he].from,I[he].to,"+delete");ga(e)})}function as(e,l,k){var I=we(e.text,l+k,k);return I<0||I>e.text.length?null:I}function os(e,l,k){var I=as(e,l.ch,k);return I==null?null:new St(l.line,I,k<0?"after":"before")}function ss(e,l,k,I,z){if(e){l.doc.direction=="rtl"&&(z=-z);var te=at(k,l.doc.direction);if(te){var ae=z<0?B(te):te[0],he=z<0==(ae.level==1),pe=he?"after":"before",xe;if(ae.level>0||l.doc.direction=="rtl"){var je=Ue(l,k);xe=z<0?k.text.length-1:0;var ze=Ye(l,je,xe).top;xe=Fe(function(tt){return Ye(l,je,tt).top==ze},z<0==(ae.level==1)?ae.from:ae.to-1,xe),pe=="before"&&(xe=as(k,xe,1))}else xe=z<0?ae.to:ae.from;return new St(I,xe,pe)}}return new St(I,z<0?k.text.length:0,z<0?"before":"after")}function Ml(e,l,k,I){var z=at(l,e.doc.direction);if(!z)return os(l,k,I);k.ch>=l.text.length?(k.ch=l.text.length,k.sticky="before"):k.ch<=0&&(k.ch=0,k.sticky="after");var te=et(z,k.ch,k.sticky),ae=z[te];if(e.doc.direction=="ltr"&&ae.level%2==0&&(I>0?ae.to>k.ch:ae.from<k.ch))return os(l,k,I);var he=function(Yt,ar){return as(l,Yt instanceof St?Yt.ch:Yt,ar)},pe,xe=function(Yt){return e.options.lineWrapping?(pe=pe||Ue(e,l),hr(e,l,pe,Yt)):{begin:0,end:l.text.length}},je=xe(k.sticky=="before"?he(k,-1):k.ch);if(e.doc.direction=="rtl"||ae.level==1){var ze=ae.level==1==I<0,tt=he(k,ze?1:-1);if(tt!=null&&(ze?tt<=ae.to&&tt<=je.end:tt>=ae.from&&tt>=je.begin)){var Je=ze?"before":"after";return new St(k.line,tt,Je)}}var gt=function(Yt,ar,$t){for(var pr=function(Fn,mi){return mi?new St(k.line,he(Fn,1),"before"):new St(k.line,Fn,"after")};Yt>=0&&Yt<z.length;Yt+=ar){var zr=z[Yt],Mr=ar>0==(zr.level!=1),dn=Mr?$t.begin:he($t.end,-1);if(zr.from<=dn&&dn<zr.to)return pr(dn,Mr);if(dn=Mr?zr.from:he(zr.to,-1),$t.begin<=dn&&dn<$t.end)return pr(dn,Mr)}},Lt=gt(te+I,I,je);if(Lt)return Lt;var jt=I>0?je.end:he(je.begin,-1);return jt!=null&&!(I>0&&jt==l.text.length)&&(Lt=gt(I>0?0:z.length-1,I,xe(jt)),Lt)?Lt:null}var So={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ae)},killLine:function(e){return ao(e,function(l){if(l.empty()){var k=Bt(e.doc,l.head.line).text.length;return l.head.ch==k&&l.head.line<e.lastLine()?{from:l.head,to:St(l.head.line+1,0)}:{from:l.head,to:St(l.head.line,k)}}else return{from:l.from(),to:l.to()}})},deleteLine:function(e){return ao(e,function(l){return{from:St(l.from().line,0),to:wr(e.doc,St(l.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(l){return{from:St(l.from().line,0),to:l.from()}})},delWrappedLineLeft:function(e){return ao(e,function(l){var k=e.charCoords(l.head,"div").top+5,I=e.coordsChar({left:0,top:k},"div");return{from:I,to:l.from()}})},delWrappedLineRight:function(e){return ao(e,function(l){var k=e.charCoords(l.head,"div").top+5,I=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:k},"div");return{from:l.from(),to:I}})},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(St(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(St(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(l){return Xs(e,l.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(l){return Ys(e,l.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(l){return Nl(e,l.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(l){var k=e.cursorCoords(l.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:k},"div")},Se)},goLineLeft:function(e){return e.extendSelectionsBy(function(l){var k=e.cursorCoords(l.head,"div").top+5;return e.coordsChar({left:0,top:k},"div")},Se)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(l){var k=e.cursorCoords(l.head,"div").top+5,I=e.coordsChar({left:0,top:k},"div");return I.ch<e.getLine(I.line).search(/\S/)?Ys(e,l.head):I},Se)},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 l=[],k=e.listSelections(),I=e.options.tabSize,z=0;z<k.length;z++){var te=k[z].from(),ae=X(e.getLine(te.line),te.ch,I);l.push(ee(I-ae%I))}e.replaceSelections(l)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ii(e,function(){for(var l=e.listSelections(),k=[],I=0;I<l.length;I++){if(!l[I].empty())continue;var z=l[I].head,te=Bt(e.doc,z.line).text;if(te){if(z.ch==te.length&&(z=new St(z.line,z.ch-1)),z.ch>0)z=new St(z.line,z.ch+1),e.replaceRange(te.charAt(z.ch-1)+te.charAt(z.ch-2),St(z.line,z.ch-2),z,"+transpose");else if(z.line>e.doc.first){var ae=Bt(e.doc,z.line-1).text;ae&&(z=new St(z.line,1),e.replaceRange(te.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),St(z.line-1,ae.length-1),z,"+transpose"))}}k.push(new wn(z,z))}e.setSelections(k)})},newlineAndIndent:function(e){return Ii(e,function(){for(var l=e.listSelections(),k=l.length-1;k>=0;k--)e.replaceRange(e.doc.lineSeparator(),l[k].anchor,l[k].head,"+input");l=e.listSelections();for(var I=0;I<l.length;I++)e.indentLine(l[I].from().line,null,!0);ga(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,l){var k=Bt(e.doc,l),I=vt(k);return I!=k&&(l=Lr(I)),ss(!0,e,I,l,1)}function Nl(e,l){var k=Bt(e.doc,l),I=yt(k);return I!=k&&(l=Lr(I)),ss(!0,e,k,l,-1)}function Ys(e,l){var k=Xs(e,l.line),I=Bt(e.doc,k.line),z=at(I,e.doc.direction);if(!z||z[0].level==0){var te=Math.max(k.ch,I.text.search(/\S/)),ae=l.line==k.line&&l.ch<=te&&l.ch;return St(k.line,ae?0:te,k.sticky)}return k}function Ko(e,l,k){if(typeof l=="string"&&(l=So[l],!l))return!1;e.display.input.ensurePolled();var I=e.display.shift,z=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k&&(e.display.shift=!1),z=l(e)!=Ce}finally{e.display.shift=I,e.state.suppressEdits=!1}return z}function Fl(e,l,k){for(var I=0;I<e.state.keyMaps.length;I++){var z=io(l,e.state.keyMaps[I],k,e);if(z)return z}return e.options.extraKeys&&io(l,e.options.extraKeys,k,e)||io(l,e.options.keyMap,k,e)}var jl=new ie;function Co(e,l,k,I){var z=e.state.keySeq;if(z){if(Gs(l))return"handled";if(/\'$/.test(l)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==z&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,z+" "+l,k,I))return!0}return $s(e,l,k,I)}function $s(e,l,k,I){var z=Fl(e,l,I);return z=="multi"&&(e.state.keySeq=l),z=="handled"&&Ht(e,"keyHandled",e,l,k),(z=="handled"||z=="multi")&&(ge(k),Xn(e)),!!z}function Js(e,l){var k=Vs(l,!0);return k?l.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+k,l,function(I){return Ko(e,I,!0)})||Co(e,k,l,function(I){if(typeof I=="string"?/^go[A-Z]/.test(I):I.motion)return Ko(e,I)}):Co(e,k,l,function(I){return Ko(e,I)}):!1}function Ul(e,l,k){return Co(e,"'"+k+"'",l,function(I){return Ko(e,I,!0)})}var ls=null;function Qs(e){var l=this;if(e.target&&e.target!=l.display.input.getField())return;if(l.curOp.focus=Y(),ce(l,e))return;w&&b<11&&e.keyCode==27&&(e.returnValue=!1);var k=e.keyCode;l.display.shift=k==16||e.shiftKey;var I=Js(l,e);c&&(ls=I?k:null,!I&&k==88&&!Br&&(i?e.metaKey:e.ctrlKey)&&l.replaceSelection("",null,"cut")),T&&!i&&!I&&k==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),k==18&&!/\bCodeMirror-crosshair\b/.test(l.display.lineDiv.className)&&Bl(l)}function Bl(e){var l=e.display.lineDiv;K(l,"CodeMirror-crosshair");function k(I){(I.keyCode==18||!I.altKey)&&(_(l,"CodeMirror-crosshair"),lt(document,"keyup",k),lt(document,"mouseover",k))}Ie(document,"keyup",k),Ie(document,"mouseover",k)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),ce(this,e)}function el(e){var l=this;if(e.target&&e.target!=l.display.input.getField())return;if(sn(l.display,e)||ce(l,e)||e.ctrlKey&&!e.altKey||i&&e.metaKey)return;var k=e.keyCode,I=e.charCode;if(c&&k==ls){ls=null,ge(e);return}if(c&&(!e.which||e.which<10)&&Js(l,e))return;var z=String.fromCharCode(I==null?k:I);if(z=="\b")return;if(Ul(l,e,z))return;l.display.input.onKeyPress(e)}var Hl=400,us=function(e,l,k){this.time=e,this.pos=l,this.button=k};us.prototype.compare=function(e,l,k){return this.time+Hl>e&&ur(l,this.pos)==0&&k==this.button};var Oo,Ao;function Wl(e,l){var k=+new Date;return Ao&&Ao.compare(k,e,l)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(k,e,l)?(Ao=new us(k,e,l),Oo=null,"double"):(Oo=new us(k,e,l),Ao=null,"single")}function tl(e){var l=this,k=l.display;if(ce(l,e)||k.activeTouch&&k.input.supportsTouch())return;if(k.input.ensurePolled(),k.shift=e.shiftKey,sn(k,e)){t||(k.scroller.draggable=!1,setTimeout(function(){return k.scroller.draggable=!0},100));return}if(cs(l,e))return;var I=Jn(l,e),z=Ke(e),te=I?Wl(I,z):"single";if(window.focus(),z==1&&l.state.selectingText&&l.state.selectingText(e),I&&zl(l,z,I,te,e))return;z==1?I?Kl(l,I,te,e):Pe(e)==k.scroller&&ge(e):z==2?(I&&Uo(l.doc,I),setTimeout(function(){return k.input.focus()},20)):z==3&&(R?l.display.input.onContextMenu(e):xa(l))}function zl(e,l,k,I,z){var te="Click";return I=="double"?te="Double"+te:I=="triple"&&(te="Triple"+te),te=(l==1?"Left":l==2?"Middle":"Right")+te,Co(e,Ks(te,z),z,function(ae){if(typeof ae=="string"&&(ae=So[ae]),!ae)return!1;var he=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),he=ae(e,k)!=Ce}finally{e.state.suppressEdits=!1}return he})}function Gl(e,l,k){var I=e.getOption("configureMouse"),z=I?I(e,l,k):{};if(z.unit==null){var te=r?k.shiftKey&&k.metaKey:k.altKey;z.unit=te?"rectangle":l=="single"?"char":l=="double"?"word":"line"}return(z.extend==null||e.doc.extend)&&(z.extend=e.doc.extend||k.shiftKey),z.addNew==null&&(z.addNew=i?k.metaKey:k.ctrlKey),z.moveOnDrag==null&&(z.moveOnDrag=!(i?k.altKey:k.ctrlKey)),z}function Kl(e,l,k,I){w?setTimeout(U(Ba,e),0):e.curOp.focus=Y();var z=Gl(e,k,I),te=e.doc.sel,ae;e.options.dragDrop&&it&&!e.isReadOnly()&&k=="single"&&(ae=te.contains(l))>-1&&(ur((ae=te.ranges[ae]).from(),l)<0||l.xRel>0)&&(ur(ae.to(),l)>0||l.xRel<0)?Vl(e,I,l,z):Xl(e,I,l,z)}function Vl(e,l,k,I){var z=e.display,te=!1,ae=qn(e,function(xe){t&&(z.scroller.draggable=!1),e.state.draggingText=!1,lt(z.wrapper.ownerDocument,"mouseup",ae),lt(z.wrapper.ownerDocument,"mousemove",he),lt(z.scroller,"dragstart",pe),lt(z.scroller,"drop",ae),te||(ge(xe),I.addNew||Uo(e.doc,k,null,null,I.extend),t&&!o||w&&b==9?setTimeout(function(){z.wrapper.ownerDocument.body.focus({preventScroll:!0}),z.input.focus()},20):z.input.focus())}),he=function(xe){te=te||Math.abs(l.clientX-xe.clientX)+Math.abs(l.clientY-xe.clientY)>=10},pe=function(){return te=!0};t&&(z.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!I.moveOnDrag,z.scroller.dragDrop&&z.scroller.dragDrop(),Ie(z.wrapper.ownerDocument,"mouseup",ae),Ie(z.wrapper.ownerDocument,"mousemove",he),Ie(z.scroller,"dragstart",pe),Ie(z.scroller,"drop",ae),xa(e),setTimeout(function(){return z.input.focus()},20)}function rl(e,l,k){if(k=="char")return new wn(l,l);if(k=="word")return e.findWordAt(l);if(k=="line")return new wn(St(l.line,0),wr(e.doc,St(l.line+1,0)));var I=k(e,l);return new wn(I.from,I.to)}function Xl(e,l,k,I){var z=e.display,te=e.doc;ge(l);var ae,he,pe=te.sel,xe=pe.ranges;if(I.addNew&&!I.extend?(he=te.sel.contains(k),he>-1?ae=xe[he]:ae=new wn(k,k)):(ae=te.sel.primary(),he=te.sel.primIndex),I.unit=="rectangle")I.addNew||(ae=new wn(k,k)),k=Jn(e,l,!0,!0),he=-1;else{var je=rl(e,k,I.unit);I.extend?ae=ns(ae,je.anchor,je.head,I.extend):ae=je}I.addNew?he==-1?(he=xe.length,Ci(te,Ji(e,xe.concat([ae]),he),{scroll:!1,origin:"*mouse"})):xe.length>1&&xe[he].empty()&&I.unit=="char"&&!I.extend?(Ci(te,Ji(e,xe.slice(0,he).concat(xe.slice(he+1)),0),{scroll:!1,origin:"*mouse"}),pe=te.sel):is(te,he,ae,me):(he=0,Ci(te,new Li([ae],0),me),pe=te.sel);var ze=k;function tt($t){if(ur(ze,$t)==0)return;if(ze=$t,I.unit=="rectangle"){for(var pr=[],zr=e.options.tabSize,Mr=X(Bt(te,k.line).text,k.ch,zr),dn=X(Bt(te,$t.line).text,$t.ch,zr),Fn=Math.min(Mr,dn),mi=Math.max(Mr,dn),Yn=Math.min(k.line,$t.line),Ki=Math.min(e.lastLine(),Math.max(k.line,$t.line));Yn<=Ki;Yn++){var Bi=Bt(te,Yn).text,ii=ye(Bi,Fn,zr);Fn==mi?pr.push(new wn(St(Yn,ii),St(Yn,ii))):Bi.length>ii&&pr.push(new wn(St(Yn,ii),St(Yn,ye(Bi,mi,zr))))}pr.length||pr.push(new wn(k,k)),Ci(te,Ji(e,pe.ranges.slice(0,he).concat(pr),he),{origin:"*mouse",scroll:!1}),e.scrollIntoView($t)}else{var Hi=ae,xi=rl(e,$t,I.unit),fi=Hi.anchor,ai;ur(xi.anchor,fi)>0?(ai=xi.head,fi=vi(Hi.from(),xi.anchor)):(ai=xi.anchor,fi=Pi(Hi.to(),xi.head));var Qn=pe.ranges.slice(0);Qn[he]=Yl(e,new wn(wr(te,fi),ai)),Ci(te,Ji(e,Qn,he),me)}}var Je=z.wrapper.getBoundingClientRect(),gt=0;function Lt($t){var pr=++gt,zr=Jn(e,$t,!0,I.unit=="rectangle");if(!zr)return;if(ur(zr,ze)!=0){e.curOp.focus=Y(),tt(zr);var Mr=ka(z,te);(zr.line>=Mr.to||zr.line<Mr.from)&&setTimeout(qn(e,function(){gt==pr&&Lt($t)}),150)}else{var dn=$t.clientY<Je.top?-20:$t.clientY>Je.bottom?20:0;dn&&setTimeout(qn(e,function(){if(gt!=pr)return;z.scroller.scrollTop+=dn,Lt($t)}),50)}}function jt($t){e.state.selectingText=!1,gt=Infinity,$t&&(ge($t),z.input.focus()),lt(z.wrapper.ownerDocument,"mousemove",Yt),lt(z.wrapper.ownerDocument,"mouseup",ar),te.history.lastSelOrigin=null}var Yt=qn(e,function($t){$t.buttons===0||!Ke($t)?jt($t):Lt($t)}),ar=qn(e,jt);e.state.selectingText=ar,Ie(z.wrapper.ownerDocument,"mousemove",Yt),Ie(z.wrapper.ownerDocument,"mouseup",ar)}function Yl(e,l){var k=l.anchor,I=l.head,z=Bt(e.doc,k.line);if(ur(k,I)==0&&k.sticky==I.sticky)return l;var te=at(z);if(!te)return l;var ae=et(te,k.ch,k.sticky),he=te[ae];if(he.from!=k.ch&&he.to!=k.ch)return l;var pe=ae+(he.from==k.ch==(he.level!=1)?0:1);if(pe==0||pe==te.length)return l;var xe;if(I.line!=k.line)xe=(I.line-k.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var je=et(te,I.ch,I.sticky),ze=je-ae||(I.ch-k.ch)*(he.level==1?-1:1);je==pe-1||je==pe?xe=ze<0:xe=ze>0}var tt=te[pe+(xe?-1:0)],Je=xe==(tt.level==1),gt=Je?tt.from:tt.to,Lt=Je?"after":"before";return k.ch==gt&&k.sticky==Lt?l:new wn(new St(k.line,gt,Lt),I)}function nl(e,l,k,I){var z,te;if(l.touches)z=l.touches[0].clientX,te=l.touches[0].clientY;else try{z=l.clientX,te=l.clientY}catch(tt){return!1}if(z>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;I&&ge(l);var ae=e.display,he=ae.lineDiv.getBoundingClientRect();if(te>he.bottom||!ve(e,k))return Re(l);te-=he.top-ae.viewOffset;for(var pe=0;pe<e.display.gutterSpecs.length;++pe){var xe=ae.gutters.childNodes[pe];if(xe&&xe.getBoundingClientRect().right>=z){var je=Wr(e.doc,te),ze=e.display.gutterSpecs[pe];return _e(e,k,e,je,ze.className,l),Re(l)}}}function cs(e,l){return nl(e,l,"gutterClick",!0)}function il(e,l){if(sn(e.display,l)||$l(e,l))return;if(ce(e,l,"contextmenu"))return;R||e.display.input.onContextMenu(l)}function $l(e,l){return ve(e,"gutterContextMenu")?nl(e,l,"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-"),Gr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var l=e.optionHandlers;function k(I,z,te,ae){e.defaults[I]=z,te&&(l[I]=ae?function(he,pe,xe){xe!=oo&&te(he,pe,xe)}:te)}e.defineOption=k,e.Init=oo,k("value","",function(I,z){return I.setValue(z)},!0),k("mode",null,function(I,z){I.doc.modeOption=z,Aa(I)},!0),k("indentUnit",2,Aa,!0),k("indentWithTabs",!1),k("smartIndent",!0),k("tabSize",4,function(I){go(I),Gr(I),Rn(I)},!0),k("lineSeparator",null,function(I,z){if(I.doc.lineSep=z,!z)return;var te=[],ae=I.doc.first;I.doc.iter(function(pe){for(var xe=0;;){var je=pe.text.indexOf(z,xe);if(je==-1)break;xe=je+z.length,te.push(St(ae,je))}ae++});for(var he=te.length-1;he>=0;he--)ro(I.doc,z,te[he],St(te[he].line,te[he].ch+z.length))}),k("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(I,z,te){I.state.specialChars=new RegExp(z.source+(z.test(" ")?"":"| "),"g"),te!=oo&&I.refresh()}),k("specialCharPlaceholder",rr,function(I){return I.refresh()},!0),k("electricChars",!0),k("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),k("spellcheck",!1,function(I,z){return I.getInputField().spellcheck=z},!0),k("autocorrect",!1,function(I,z){return I.getInputField().autocorrect=z},!0),k("autocapitalize",!1,function(I,z){return I.getInputField().autocapitalize=z},!0),k("rtlMoveVisually",!E),k("wholeLineUpdateBefore",!0),k("theme","default",function(I){al(I),ca(I)},!0),k("keyMap","default",function(I,z,te){var ae=Go(z),he=te!=oo&&Go(te);he&&he.detach&&he.detach(I,ae),ae.attach&&ae.attach(I,he||null)}),k("extraKeys",null),k("configureMouse",null),k("lineWrapping",!1,Zl,!0),k("gutters",[],function(I,z){I.display.gutterSpecs=Di(z,I.options.lineNumbers),ca(I)},!0),k("fixedGutter",!0,function(I,z){I.display.gutters.style.left=z?ni(I.display)+"px":"0",I.refresh()},!0),k("coverGutterNextToScrollbar",!1,function(I){return Qt(I)},!0),k("scrollbarStyle","native",function(I){ua(I),Qt(I),I.display.scrollbars.setScrollTop(I.doc.scrollTop),I.display.scrollbars.setScrollLeft(I.doc.scrollLeft)},!0),k("lineNumbers",!1,function(I,z){I.display.gutterSpecs=Di(I.options.gutters,z),ca(I)},!0),k("firstLineNumber",1,ca,!0),k("lineNumberFormatter",function(I){return I},ca,!0),k("showCursorWhenSelecting",!1,En,!0),k("resetSelectionOnContextMenu",!0),k("lineWiseCopyCut",!0),k("pasteLinesPerSelection",!0),k("selectionsMayTouch",!1),k("readOnly",!1,function(I,z){z=="nocursor"&&(ra(I),I.display.input.blur()),I.display.input.readOnlyChanged(z)}),k("screenReaderLabel",null,function(I,z){z=z===""?null:z,I.display.input.screenReaderLabelChanged(z)}),k("disableInput",!1,function(I,z){z||I.display.input.reset()},!0),k("dragDrop",!0,Ql),k("allowDropFileTypes",null),k("cursorBlinkRate",530),k("cursorScrollMargin",0),k("cursorHeight",1,En,!0),k("singleCursorHeightPerLine",!0,En,!0),k("workTime",100),k("workDelay",100),k("flattenSpans",!0,go,!0),k("addModeClass",!1,go,!0),k("pollInterval",100),k("undoDepth",200,function(I,z){return I.doc.history.undoDepth=z}),k("historyEventDelay",1250),k("viewportMargin",10,function(I){return I.refresh()},!0),k("maxHighlightLength",1e4,go,!0),k("moveInputWithCursor",!0,function(I,z){z||I.display.input.resetPosition()}),k("tabindex",null,function(I,z){return I.display.input.getField().tabIndex=z||""}),k("autofocus",null),k("direction","ltr",function(I,z){return I.doc.setDirection(z)},!0),k("phrases",null)}function Ql(e,l,k){var I=k&&k!=oo;if(!l!=!I){var z=e.display.dragFunctions,te=l?Ie:lt;te(e.display.scroller,"dragstart",z.start),te(e.display.scroller,"dragenter",z.enter),te(e.display.scroller,"dragover",z.over),te(e.display.scroller,"dragleave",z.leave),te(e.display.scroller,"drop",z.drop)}}function Zl(e){e.options.lineWrapping?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),vr(e)),pi(e),Rn(e),Gr(e),setTimeout(function(){return Qt(e)},100)}function Kn(e,l){var k=this;if(!(this instanceof Kn))return new Kn(e,l);this.options=l=l?D(l):{},D(ol,l,!1);var I=l.value;typeof I=="string"?I=new Ui(I,l.mode,null,l.lineSeparator,l.direction):l.mode&&(I.modeOption=l.mode),this.doc=I;var z=new Kn.inputStyles[l.inputStyle](this),te=this.display=new Ga(e,I,z,l);te.wrapper.CodeMirror=this,al(this),l.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ua(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},l.autofocus&&!u&&te.input.focus(),w&&b<11&&setTimeout(function(){return k.display.input.reset(!0)},20),ql(this),Il(),Dn(this),this.curOp.forceUpdate=!0,vs(this,I),l.autofocus&&!u||this.hasFocus()?setTimeout(function(){k.hasFocus()&&!k.state.focused&&ta(k)},20):ra(this);for(var ae in Vo)Vo.hasOwnProperty(ae)&&Vo[ae](this,l[ae],oo);di(this),l.finishInit&&l.finishInit(this);for(var he=0;he<ds.length;++he)ds[he](this);Ca(this),t&&l.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Kn.defaults=ol,Kn.optionHandlers=Vo;function ql(e){var l=e.display;Ie(l.scroller,"mousedown",qn(e,tl)),w&&b<11?Ie(l.scroller,"dblclick",qn(e,function(pe){if(ce(e,pe))return;var xe=Jn(e,pe);if(!xe||cs(e,pe)||sn(e.display,pe))return;ge(pe);var je=e.findWordAt(xe);Uo(e.doc,je.anchor,je.head)})):Ie(l.scroller,"dblclick",function(pe){return ce(e,pe)||ge(pe)}),Ie(l.scroller,"contextmenu",function(pe){return il(e,pe)}),Ie(l.input.getField(),"contextmenu",function(pe){l.scroller.contains(pe.target)||il(e,pe)});var k,I={end:0};function z(){l.activeTouch&&(k=setTimeout(function(){return l.activeTouch=null},1e3),I=l.activeTouch,I.end=+new Date)}function te(pe){if(pe.touches.length!=1)return!1;var xe=pe.touches[0];return xe.radiusX<=1&&xe.radiusY<=1}function ae(pe,xe){if(xe.left==null)return!0;var je=xe.left-pe.left,ze=xe.top-pe.top;return je*je+ze*ze>20*20}Ie(l.scroller,"touchstart",function(pe){if(!ce(e,pe)&&!te(pe)&&!cs(e,pe)){l.input.ensurePolled(),clearTimeout(k);var xe=+new Date;l.activeTouch={start:xe,moved:!1,prev:xe-I.end<=300?I:null},pe.touches.length==1&&(l.activeTouch.left=pe.touches[0].pageX,l.activeTouch.top=pe.touches[0].pageY)}}),Ie(l.scroller,"touchmove",function(){l.activeTouch&&(l.activeTouch.moved=!0)}),Ie(l.scroller,"touchend",function(pe){var xe=l.activeTouch;if(xe&&!sn(l,pe)&&xe.left!=null&&!xe.moved&&new Date-xe.start<300){var je=e.coordsChar(l.activeTouch,"page"),ze;!xe.prev||ae(xe,xe.prev)?ze=new wn(je,je):!xe.prev.prev||ae(xe,xe.prev.prev)?ze=e.findWordAt(je):ze=new wn(St(je.line,0),wr(e.doc,St(je.line+1,0))),e.setSelection(ze.anchor,ze.head),e.focus(),ge(pe)}z()}),Ie(l.scroller,"touchcancel",z),Ie(l.scroller,"scroll",function(){l.scroller.clientHeight&&(aa(e,l.scroller.scrollTop),ji(e,l.scroller.scrollLeft,!0),_e(e,"scroll",e))}),Ie(l.scroller,"mousewheel",function(pe){return po(e,pe)}),Ie(l.scroller,"DOMMouseScroll",function(pe){return po(e,pe)}),Ie(l.wrapper,"scroll",function(){return l.wrapper.scrollTop=l.wrapper.scrollLeft=0}),l.dragFunctions={enter:function(pe){ce(e,pe)||Le(pe)},over:function(pe){ce(e,pe)||(Rl(e,pe),Le(pe))},start:function(pe){return Al(e,pe)},drop:qn(e,Ol),leave:function(pe){ce(e,pe)||Hs(e)}};var he=l.input.getField();Ie(he,"keyup",function(pe){return Zs.call(e,pe)}),Ie(he,"keydown",qn(e,Qs)),Ie(he,"keypress",qn(e,el)),Ie(he,"focus",function(pe){return ta(e,pe)}),Ie(he,"blur",function(pe){return ra(e,pe)})}var ds=[];Kn.defineInitHook=function(e){return ds.push(e)};function Ro(e,l,k,I){var z=e.doc,te;k==null&&(k="add"),k=="smart"&&(z.mode.indent?te=ri(e,l).state:k="prev");var ae=e.options.tabSize,he=Bt(z,l),pe=X(he.text,null,ae);he.stateAfter&&(he.stateAfter=null);var xe=he.text.match(/^\s*/)[0],je;if(!I&&!/\S/.test(he.text))je=0,k="not";else if(k=="smart"&&(je=z.mode.indent(te,he.text.slice(xe.length),he.text),je==Ce||je>150)){if(!I)return;k="prev"}k=="prev"?l>z.first?je=X(Bt(z,l-1).text,null,ae):je=0:k=="add"?je=pe+e.options.indentUnit:k=="subtract"?je=pe-e.options.indentUnit:typeof k=="number"&&(je=pe+k),je=Math.max(0,je);var ze="",tt=0;if(e.options.indentWithTabs)for(var Je=Math.floor(je/ae);Je;--Je)tt+=ae,ze+=" ";if(tt<je&&(ze+=ee(je-tt)),ze!=xe)return ro(z,ze,St(l,0),St(l,xe.length),"+input"),he.stateAfter=null,!0;for(var gt=0;gt<z.sel.ranges.length;gt++){var Lt=z.sel.ranges[gt];if(Lt.head.line==l&&Lt.head.ch<xe.length){var jt=St(l,xe.length);is(z,gt,new wn(jt,jt));break}}}var fa=null;function Xo(e){fa=e}function hs(e,l,k,I,z){var te=e.doc;e.display.shift=!1,I||(I=te.sel);var ae=+new Date-200,he=z=="paste"||e.state.pasteIncoming>ae,pe=Zt(l),xe=null;if(he&&I.ranges.length>1)if(fa&&fa.text.join(`
`)==l){if(I.ranges.length%fa.text.length==0){xe=[];for(var je=0;je<fa.text.length;je++)xe.push(te.splitLines(fa.text[je]))}}else pe.length==I.ranges.length&&e.options.pasteLinesPerSelection&&(xe=G(pe,function(Yt){return[Yt]}));for(var ze=e.curOp.updateInput,tt=I.ranges.length-1;tt>=0;tt--){var Je=I.ranges[tt],gt=Je.from(),Lt=Je.to();Je.empty()&&(k&&k>0?gt=St(gt.line,gt.ch-k):e.state.overwrite&&!he?Lt=St(Lt.line,Math.min(Bt(te,Lt.line).text.length,Lt.ch+B(pe).length)):he&&fa&&fa.lineWise&&fa.text.join(`
`)==pe.join(`
`)&&(gt=Lt=St(gt.line,0)));var jt={from:gt,to:Lt,text:xe?xe[tt%xe.length]:pe,origin:z||(he?"paste":e.state.cutIncoming>ae?"cut":"+input")};to(e.doc,jt),Ht(e,"inputRead",e,jt)}l&&!he&&ll(e,l),ga(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ze),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,l){var k=e.clipboardData&&e.clipboardData.getData("Text");if(k)return e.preventDefault(),!l.isReadOnly()&&!l.options.disableInput&&Ii(l,function(){return hs(l,k,0,null,"paste")}),!0}function ll(e,l){if(!e.options.electricChars||!e.options.smartIndent)return;for(var k=e.doc.sel,I=k.ranges.length-1;I>=0;I--){var z=k.ranges[I];if(z.head.ch>100||I&&k.ranges[I-1].head.line==z.head.line)continue;var te=e.getModeAt(z.head),ae=!1;if(te.electricChars){for(var he=0;he<te.electricChars.length;he++)if(l.indexOf(te.electricChars.charAt(he))>-1){ae=Ro(e,z.head.line,"smart");break}}else te.electricInput&&(te.electricInput.test(Bt(e.doc,z.head.line).text.slice(0,z.head.ch))&&(ae=Ro(e,z.head.line,"smart")));ae&&Ht(e,"electricInput",e,z.head.line)}}function ul(e){for(var l=[],k=[],I=0;I<e.doc.sel.ranges.length;I++){var z=e.doc.sel.ranges[I].head.line,te={anchor:St(z,0),head:St(z+1,0)};k.push(te),l.push(e.getRange(te.anchor,te.head))}return{text:l,ranges:k}}function cl(e,l,k,I){e.setAttribute("autocorrect",k?"":"off"),e.setAttribute("autocapitalize",I?"":"off"),e.setAttribute("spellcheck",!!l)}function dl(){var e=C("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),l=C("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),cl(e),l}function eu(e){var l=e.optionHandlers,k=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(I,z){var te=this.options,ae=te[I];if(te[I]==z&&I!="mode")return;te[I]=z,l.hasOwnProperty(I)&&qn(this,l[I])(this,z,ae),_e(this,"optionChange",this,I)},getOption:function(I){return this.options[I]},getDoc:function(){return this.doc},addKeyMap:function(I,z){this.state.keyMaps[z?"push":"unshift"](Go(I))},removeKeyMap:function(I){for(var z=this.state.keyMaps,te=0;te<z.length;++te)if(z[te]==I||z[te].name==I)return z.splice(te,1),!0},addOverlay:Ei(function(I,z){var te=I.token?I:e.getMode(this.options,I);if(te.startState)throw new Error("Overlays may not be stateful.");V(this.state.overlays,{mode:te,modeSpec:I,opaque:z&&z.opaque,priority:z&&z.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Rn(this)}),removeOverlay:Ei(function(I){for(var z=this.state.overlays,te=0;te<z.length;++te){var ae=z[te].modeSpec;if(ae==I||typeof I=="string"&&ae.name==I){z.splice(te,1),this.state.modeGen++,Rn(this);return}}}),indentLine:Ei(function(I,z,te){typeof z!="string"&&typeof z!="number"&&(z==null?z=this.options.smartIndent?"smart":"prev":z=z?"add":"subtract"),jn(this.doc,I)&&Ro(this,I,z,te)}),indentSelection:Ei(function(I){for(var z=this.doc.sel.ranges,te=-1,ae=0;ae<z.length;ae++){var he=z[ae];if(he.empty())he.head.line>te&&(Ro(this,he.head.line,I,!0),te=he.head.line,ae==this.doc.sel.primIndex&&ga(this));else{var pe=he.from(),xe=he.to(),je=Math.max(te,pe.line);te=Math.min(this.lastLine(),xe.line-(xe.ch?0:1))+1;for(var ze=je;ze<te;++ze)Ro(this,ze,I);var tt=this.doc.sel.ranges;pe.ch==0&&z.length==tt.length&&tt[ae].from().ch>0&&is(this.doc,ae,new wn(pe,tt[ae].to()),Ae)}}}),getTokenAt:function(I,z){return ui(this,I,z)},getLineTokens:function(I,z){return ui(this,St(I),z,!0)},getTokenTypeAt:function(I){I=wr(this.doc,I);var z=Ti(this,Bt(this.doc,I.line)),te=0,ae=(z.length-1)/2,he=I.ch,pe;if(he==0)pe=z[2];else for(;;){var xe=te+ae>>1;if((xe?z[xe*2-1]:0)>=he)ae=xe;else if(z[xe*2+1]<he)te=xe+1;else{pe=z[xe*2+2];break}}var je=pe?pe.indexOf("overlay "):-1;return je<0?pe:je==0?null:pe.slice(0,je-1)},getModeAt:function(I){var z=this.doc.mode;return z.innerMode?e.innerMode(z,this.getTokenAt(I).state).mode:z},getHelper:function(I,z){return this.getHelpers(I,z)[0]},getHelpers:function(I,z){var te=[];if(!k.hasOwnProperty(z))return te;var ae=k[z],he=this.getModeAt(I);if(typeof he[z]=="string")ae[he[z]]&&te.push(ae[he[z]]);else if(he[z])for(var pe=0;pe<he[z].length;pe++){var xe=ae[he[z][pe]];xe&&te.push(xe)}else he.helperType&&ae[he.helperType]?te.push(ae[he.helperType]):ae[he.name]&&te.push(ae[he.name]);for(var je=0;je<ae._global.length;je++){var ze=ae._global[je];ze.pred(he,this)&&oe(te,ze.val)==-1&&te.push(ze.val)}return te},getStateAfter:function(I,z){var te=this.doc;return I=Un(te,I==null?te.first+te.size-1:I),ri(this,I+1,z).state},cursorCoords:function(I,z){var te,ae=this.doc.sel.primary();return I==null?te=ae.head:typeof I=="object"?te=wr(this.doc,I):te=I?ae.from():ae.to(),nn(this,te,z||"page")},charCoords:function(I,z){return Tn(this,wr(this.doc,I),z||"page")},coordsChar:function(I,z){return I=en(this,I,z||"page"),Qr(this,I.left,I.top)},lineAtHeight:function(I,z){return I=en(this,{top:I,left:0},z||"page").top,Wr(this.doc,I+this.display.viewOffset)},heightAtLine:function(I,z,te){var ae=!1,he;if(typeof I=="number"){var pe=this.doc.first+this.doc.size-1;I<this.doc.first?I=this.doc.first:I>pe&&(I=pe,ae=!0),he=Bt(this.doc,I)}else he=I;return un(this,he,{top:0,left:0},z||"page",te||ae).top+(ae?this.doc.height-qt(he):0)},defaultTextHeight:function(){return Gn(this.display)},defaultCharWidth:function(){return $n(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(I,z,te,ae,he){var pe=this.display;I=nn(this,wr(this.doc,I));var xe=I.bottom,je=I.left;if(z.style.position="absolute",z.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(z),pe.sizer.appendChild(z),ae=="over")xe=I.top;else if(ae=="above"||ae=="near"){var ze=Math.max(pe.wrapper.clientHeight,this.doc.height),tt=Math.max(pe.sizer.clientWidth,pe.lineSpace.clientWidth);(ae=="above"||I.bottom+z.offsetHeight>ze)&&I.top>z.offsetHeight?xe=I.top-z.offsetHeight:I.bottom+z.offsetHeight<=ze&&(xe=I.bottom),je+z.offsetWidth>tt&&(je=tt-z.offsetWidth)}z.style.top=xe+"px",z.style.left=z.style.right="",he=="right"?(je=pe.sizer.clientWidth-z.offsetWidth,z.style.right="0px"):(he=="left"?je=0:he=="middle"&&(je=(pe.sizer.clientWidth-z.offsetWidth)/2),z.style.left=je+"px"),te&&Pa(this,{left:je,top:xe,right:je+z.offsetWidth,bottom:xe+z.offsetHeight})},triggerOnKeyDown:Ei(Qs),triggerOnKeyPress:Ei(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Ei(tl),execCommand:function(I){if(So.hasOwnProperty(I))return So[I].call(null,this)},triggerElectric:Ei(function(I){ll(this,I)}),findPosH:function(I,z,te,ae){var he=1;z<0&&(he=-1,z=-z);for(var pe=wr(this.doc,I),xe=0;xe<z&&!(pe=fs(this.doc,pe,he,te,ae),pe.hitSide);++xe);return pe},moveH:Ei(function(I,z){var te=this;this.extendSelectionsBy(function(ae){return te.display.shift||te.doc.extend||ae.empty()?fs(te.doc,ae.head,I,z,te.options.rtlMoveVisually):I<0?ae.from():ae.to()},Se)}),deleteH:Ei(function(I,z){var te=this.doc.sel,ae=this.doc;te.somethingSelected()?ae.replaceSelection("",null,"+delete"):ao(this,function(he){var pe=fs(ae,he.head,I,z,!1);return I<0?{from:pe,to:he.head}:{from:he.head,to:pe}})}),findPosV:function(I,z,te,ae){var he=1,pe=ae;z<0&&(he=-1,z=-z);for(var xe=wr(this.doc,I),je=0;je<z;++je){var ze=nn(this,xe,"div");if(pe==null?pe=ze.left:ze.left=pe,xe=hl(this,ze,he,te),xe.hitSide)break}return xe},moveV:Ei(function(I,z){var te=this,ae=this.doc,he=[],pe=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(je){if(pe)return I<0?je.from():je.to();var ze=nn(te,je.head,"div");je.goalColumn!=null&&(ze.left=je.goalColumn),he.push(ze.left);var tt=hl(te,ze,I,z);return z=="page"&&je==ae.sel.primary()&&Ta(te,Tn(te,tt,"div").top-ze.top),tt},Se),he.length)for(var xe=0;xe<ae.sel.ranges.length;xe++)ae.sel.ranges[xe].goalColumn=he[xe]}),findWordAt:function(I){var z=this.doc,te=Bt(z,I.line).text,ae=I.ch,he=I.ch;if(te){var pe=this.getHelper(I,"wordChars");(I.sticky=="before"||he==te.length)&&ae?--ae:++he;for(var xe=te.charAt(ae),je=$(xe,pe)?function(ze){return $(ze,pe)}:/\s/.test(xe)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!$(ze)};ae>0&&je(te.charAt(ae-1));)--ae;for(;he<te.length&&je(te.charAt(he));)++he}return new wn(St(I.line,ae),St(I.line,he))},toggleOverwrite:function(I){if(I!=null&&I==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),_e(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Y()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ei(function(I,z){ia(this,I,z)}),getScrollInfo:function(){var I=this.display.scroller;return{left:I.scrollLeft,top:I.scrollTop,height:I.scrollHeight-Ve(this)-this.display.barHeight,width:I.scrollWidth-Ve(this)-this.display.barWidth,clientHeight:be(this),clientWidth:Ne(this)}},scrollIntoView:Ei(function(I,z){I==null?(I={from:this.doc.sel.primary().head,to:null},z==null&&(z=this.options.cursorScrollMargin)):typeof I=="number"?I={from:St(I,0),to:null}:I.from==null&&(I={from:I,to:null}),I.to||(I.to=I.from),I.margin=z||0,I.from.line!=null?co(this,I):Sa(this,I.from,I.to,I.margin)}),setSize:Ei(function(I,z){var te=this,ae=function(pe){return typeof pe=="number"||/^\d+$/.test(String(pe))?pe+"px":pe};I!=null&&(this.display.wrapper.style.width=ae(I)),z!=null&&(this.display.wrapper.style.height=ae(z)),this.options.lineWrapping&&Ur(this);var he=this.display.viewFrom;this.doc.iter(he,this.display.viewTo,function(pe){if(pe.widgets){for(var xe=0;xe<pe.widgets.length;xe++)if(pe.widgets[xe].noHScroll){Nn(te,he,"widget");break}}++he}),this.curOp.forceUpdate=!0,_e(this,"refresh",this)}),operation:function(I){return Ii(this,I)},startOperation:function(){return Dn(this)},endOperation:function(){return Ca(this)},refresh:Ei(function(){var I=this.display.cachedTextHeight;Rn(this),this.curOp.forceUpdate=!0,Gr(this),ia(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(I==null||Math.abs(I-Gn(this.display))>.5||this.options.lineWrapping)&&pi(this),_e(this,"refresh",this)}),swapDoc:Ei(function(I){var z=this.doc;return z.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,I),Gr(this),this.display.input.reset(),ia(this,I.scrollLeft,I.scrollTop),this.curOp.forceScroll=!0,Ht(this,"swapDoc",this,z),z}),phrase:function(I){var z=this.options.phrases;return z&&Object.prototype.hasOwnProperty.call(z,I)?z[I]:I},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Oe(e),e.registerHelper=function(I,z,te){k.hasOwnProperty(I)||(k[I]=e[I]={_global:[]}),k[I][z]=te},e.registerGlobalHelper=function(I,z,te,ae){e.registerHelper(I,z,ae),k[I]._global.push({pred:te,val:ae})}}function fs(e,l,k,I,z){var te=l,ae=k,he=Bt(e,l.line),pe=z&&e.direction=="rtl"?-k:k;function xe(){var ar=l.line+pe;return ar<e.first||ar>=e.first+e.size?!1:(l=new St(ar,l.ch,l.sticky),he=Bt(e,ar))}function je(ar){var $t;if(I=="codepoint"){var pr=he.text.charCodeAt(l.ch+(I>0?0:-1));isNaN(pr)?$t=null:$t=new St(l.line,Math.max(0,Math.min(he.text.length,l.ch+k*(pr>=55296&&pr<56320?2:1))),-k)}else z?$t=Ml(e.cm,he,l,k):$t=os(he,l,k);if($t==null)if(!ar&&xe())l=ss(z,e.cm,he,l.line,pe);else return!1;else l=$t;return!0}if(I=="char"||I=="codepoint")je();else if(I=="column")je(!0);else if(I=="word"||I=="group")for(var ze=null,tt=I=="group",Je=e.cm&&e.cm.getHelper(l,"wordChars"),gt=!0;!(k<0&&!je(!gt));gt=!1){var Lt=he.text.charAt(l.ch)||`
`,jt=$(Lt,Je)?"w":tt&&Lt==`
`?"n":!tt||/\s/.test(Lt)?null:"p";if(tt&&!gt&&!jt&&(jt="s"),ze&&ze!=jt){k<0&&(k=1,je(),l.sticky="after");break}if(jt&&(ze=jt),k>0&&!je(!gt))break}var Yt=Ho(e,l,te,ae,!0);return oi(te,Yt)&&(Yt.hitSide=!0),Yt}function hl(e,l,k,I){var z=e.doc,te=l.left,ae;if(I=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),pe=Math.max(he-.5*Gn(e.display),3);ae=(k>0?l.bottom:l.top)+k*pe}else I=="line"&&(ae=k>0?l.bottom+3:l.top-3);for(var xe;!(xe=Qr(e,te,ae),!xe.outside);){if(k<0?ae<=0:ae>=z.height){xe.hitSide=!0;break}ae+=k*5}return xe}var Ln=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};Ln.prototype.init=function(e){var l=this,k=this,I=k.cm,z=k.div=e.lineDiv;cl(z,I.options.spellcheck,I.options.autocorrect,I.options.autocapitalize);function te(he){for(var pe=he.target;pe;pe=pe.parentNode){if(pe==z)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(pe.className))break}return!1}Ie(z,"paste",function(he){if(!te(he)||ce(I,he)||sl(he,I))return;b<=11&&setTimeout(qn(I,function(){return l.updateFromDOM()}),20)}),Ie(z,"compositionstart",function(he){l.composing={data:he.data,done:!1}}),Ie(z,"compositionupdate",function(he){l.composing||(l.composing={data:he.data,done:!1})}),Ie(z,"compositionend",function(he){l.composing&&(he.data!=l.composing.data&&l.readFromDOMSoon(),l.composing.done=!0)}),Ie(z,"touchstart",function(){return k.forceCompositionEnd()}),Ie(z,"input",function(){l.composing||l.readFromDOMSoon()});function ae(he){if(!te(he)||ce(I,he))return;if(I.somethingSelected())Xo({lineWise:!1,text:I.getSelections()}),he.type=="cut"&&I.replaceSelection("",null,"cut");else if(I.options.lineWiseCopyCut){var pe=ul(I);Xo({lineWise:!0,text:pe.text}),he.type=="cut"&&I.operation(function(){I.setSelections(pe.ranges,0,Ae),I.replaceSelection("",null,"cut")})}else return;if(he.clipboardData){he.clipboardData.clearData();var xe=fa.text.join(`
`);if(he.clipboardData.setData("Text",xe),he.clipboardData.getData("Text")==xe){he.preventDefault();return}}var je=dl(),ze=je.firstChild;I.display.lineSpace.insertBefore(je,I.display.lineSpace.firstChild),ze.value=fa.text.join(`
`);var tt=document.activeElement;W(ze),setTimeout(function(){I.display.lineSpace.removeChild(je),tt.focus(),tt==z&&k.showPrimarySelection()},50)}Ie(z,"copy",ae),Ie(z,"cut",ae)},Ln.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ln.prototype.prepareSelection=function(){var e=Ai(this.cm,!1);return e.focus=document.activeElement==this.div,e},Ln.prototype.showSelection=function(e,l){if(!e||!this.cm.display.view.length)return;(e.focus||l)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Ln.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ln.prototype.showPrimarySelection=function(){var e=this.getSelection(),l=this.cm,k=l.doc.sel.primary(),I=k.from(),z=k.to();if(l.display.viewTo==l.display.viewFrom||I.line>=l.display.viewTo||z.line<l.display.viewFrom){e.removeAllRanges();return}var te=Yo(l,e.anchorNode,e.anchorOffset),ae=Yo(l,e.focusNode,e.focusOffset);if(te&&!te.bad&&ae&&!ae.bad&&ur(vi(te,ae),I)==0&&ur(Pi(te,ae),z)==0)return;var he=l.display.view,pe=I.line>=l.display.viewFrom&&fl(l,I)||{node:he[0].measure.map[2],offset:0},xe=z.line<l.display.viewTo&&fl(l,z);if(!xe){var je=he[he.length-1].measure,ze=je.maps?je.maps[je.maps.length-1]:je.map;xe={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!pe||!xe){e.removeAllRanges();return}var tt=e.rangeCount&&e.getRangeAt(0),Je;try{Je=F(pe.node,pe.offset,xe.offset,xe.node)}catch(gt){}Je&&(!T&&l.state.focused?(e.collapse(pe.node,pe.offset),Je.collapsed||(e.removeAllRanges(),e.addRange(Je))):(e.removeAllRanges(),e.addRange(Je)),tt&&e.anchorNode==null?e.addRange(tt):T&&this.startGracePeriod()),this.rememberSelection()},Ln.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)},Ln.prototype.showMultipleSelections=function(e){S(this.cm.display.cursorDiv,e.cursors),S(this.cm.display.selectionDiv,e.selection)},Ln.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ln.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var l=e.getRangeAt(0).commonAncestorContainer;return M(this.div,l)},Ln.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ln.prototype.blur=function(){this.div.blur()},Ln.prototype.getField=function(){return this.div},Ln.prototype.supportsTouch=function(){return!0},Ln.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ii(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function l(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,l))}this.polling.set(this.cm.options.pollInterval,l)},Ln.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ln.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),l=this.cm;if(f&&a&&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 k=Yo(l,e.anchorNode,e.anchorOffset),I=Yo(l,e.focusNode,e.focusOffset);k&&I&&Ii(l,function(){Ci(l.doc,da(k,I),Ae),(k.bad||I.bad)&&(l.curOp.selectionChanged=!0)})},Ln.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,l=e.display,k=e.doc.sel.primary(),I=k.from(),z=k.to();if(I.ch==0&&I.line>e.firstLine()&&(I=St(I.line-1,Bt(e.doc,I.line-1).length)),z.ch==Bt(e.doc,z.line).text.length&&z.line<e.lastLine()&&(z=St(z.line+1,0)),I.line<l.viewFrom||z.line>l.viewTo-1)return!1;var te,ae,he;I.line==l.viewFrom||(te=An(e,I.line))==0?(ae=Lr(l.view[0].line),he=l.view[0].node):(ae=Lr(l.view[te].line),he=l.view[te-1].node.nextSibling);var pe=An(e,z.line),xe,je;if(pe==l.view.length-1?(xe=l.viewTo-1,je=l.lineDiv.lastChild):(xe=Lr(l.view[pe+1].line)-1,je=l.view[pe+1].node.previousSibling),!he)return!1;for(var ze=e.doc.splitLines(ru(e,he,je,ae,xe)),tt=Kr(e.doc,St(ae,0),St(xe,Bt(e.doc,xe).text.length));ze.length>1&&tt.length>1;)if(B(ze)==B(tt))ze.pop(),tt.pop(),xe--;else if(ze[0]==tt[0])ze.shift(),tt.shift(),ae++;else break;for(var Je=0,gt=0,Lt=ze[0],jt=tt[0],Yt=Math.min(Lt.length,jt.length);Je<Yt&&Lt.charCodeAt(Je)==jt.charCodeAt(Je);)++Je;for(var ar=B(ze),$t=B(tt),pr=Math.min(ar.length-(ze.length==1?Je:0),$t.length-(tt.length==1?Je:0));gt<pr&&ar.charCodeAt(ar.length-gt-1)==$t.charCodeAt($t.length-gt-1);)++gt;if(ze.length==1&&tt.length==1&&ae==I.line)for(;Je&&Je>I.ch&&ar.charCodeAt(ar.length-gt-1)==$t.charCodeAt($t.length-gt-1);)Je--,gt++;ze[ze.length-1]=ar.slice(0,ar.length-gt).replace(/^\u200b+/,""),ze[0]=ze[0].slice(Je).replace(/\u200b+$/,"");var zr=St(ae,Je),Mr=St(xe,tt.length?B(tt).length-gt:0);if(ze.length>1||ze[0]||ur(zr,Mr))return ro(e.doc,ze,zr,Mr,"+input"),!0},Ln.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ln.prototype.reset=function(){this.forceCompositionEnd()},Ln.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Ln.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)},Ln.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ii(this.cm,function(){return Rn(e.cm)})},Ln.prototype.setUneditable=function(e){e.contentEditable="false"},Ln.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||qn(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Ln.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ln.prototype.onContextMenu=function(){},Ln.prototype.resetPosition=function(){},Ln.prototype.needsContentAttribute=!0;function fl(e,l){var k=Ge(e,l.line);if(!k||k.hidden)return null;var I=Bt(e.doc,l.line),z=Te(k,I,l.line),te=at(I,e.doc.direction),ae="left";if(te){var he=et(te,l.ch);ae=he%2?"right":"left"}var pe=Et(z.map,l.ch,ae);return pe.offset=pe.collapse=="right"?pe.end:pe.start,pe}function tu(e){for(var l=e;l;l=l.parentNode)if(/CodeMirror-gutter-wrapper/.test(l.className))return!0;return!1}function so(e,l){return l&&(e.bad=!0),e}function ru(e,l,k,I,z){var te="",ae=!1,he=e.doc.lineSeparator(),pe=!1;function xe(Je){return function(gt){return gt.id==Je}}function je(){ae&&(te+=he,pe&&(te+=he),ae=pe=!1)}function ze(Je){Je&&(je(),te+=Je)}function tt(Je){if(Je.nodeType==1){var gt=Je.getAttribute("cm-text");if(gt){ze(gt);return}var Lt=Je.getAttribute("cm-marker"),jt;if(Lt){var Yt=e.findMarks(St(I,0),St(z+1,0),xe(+Lt));Yt.length&&(jt=Yt[0].find(0))&&ze(Kr(e.doc,jt.from,jt.to).join(he));return}if(Je.getAttribute("contenteditable")=="false")return;var ar=/^(pre|div|p|li|table|br)$/i.test(Je.nodeName);if(!/^br$/i.test(Je.nodeName)&&Je.textContent.length==0)return;ar&&je();for(var $t=0;$t<Je.childNodes.length;$t++)tt(Je.childNodes[$t]);/^(pre|p)$/i.test(Je.nodeName)&&(pe=!0),ar&&(ae=!0)}else Je.nodeType==3&&ze(Je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(tt(l),l==k);)l=l.nextSibling,pe=!1;return te}function Yo(e,l,k){var I;if(l==e.display.lineDiv){if(I=e.display.lineDiv.childNodes[k],!I)return so(e.clipPos(St(e.display.viewTo-1)),!0);l=null,k=0}else for(I=l;;I=I.parentNode){if(!I||I==e.display.lineDiv)return null;if(I.parentNode&&I.parentNode==e.display.lineDiv)break}for(var z=0;z<e.display.view.length;z++){var te=e.display.view[z];if(te.node==I)return nu(te,l,k)}}function nu(e,l,k){var I=e.text.firstChild,z=!1;if(!l||!M(I,l))return so(St(Lr(e.line),0),!0);if(l==I&&(z=!0,l=I.childNodes[k],k=0,!l)){var te=e.rest?B(e.rest):e.line;return so(St(Lr(te),te.text.length),z)}var ae=l.nodeType==3?l:null,he=l;for(!ae&&l.childNodes.length==1&&l.firstChild.nodeType==3&&(ae=l.firstChild,k&&(k=ae.nodeValue.length));he.parentNode!=I;)he=he.parentNode;var pe=e.measure,xe=pe.maps;function je(jt,Yt,ar){for(var $t=-1;$t<(xe?xe.length:0);$t++)for(var pr=$t<0?pe.map:xe[$t],zr=0;zr<pr.length;zr+=3){var Mr=pr[zr+2];if(Mr==jt||Mr==Yt){var dn=Lr($t<0?e.line:e.rest[$t]),Fn=pr[zr]+ar;return(ar<0||Mr!=jt)&&(Fn=pr[zr+(ar?1:0)]),St(dn,Fn)}}}var ze=je(ae,he,k);if(ze)return so(ze,z);for(var tt=he.nextSibling,Je=ae?ae.nodeValue.length-k:0;tt;tt=tt.nextSibling){if(ze=je(tt,tt.firstChild,0),ze)return so(St(ze.line,ze.ch-Je),z);Je+=tt.textContent.length}for(var gt=he.previousSibling,Lt=k;gt;gt=gt.previousSibling){if(ze=je(gt,gt.firstChild,-1),ze)return so(St(ze.line,ze.ch+Lt),z);Lt+=gt.textContent.length}}var ti=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ie,this.hasSelection=!1,this.composing=null};ti.prototype.init=function(e){var l=this,k=this,I=this.cm;this.createField(e);var z=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(z.style.width="0px"),Ie(z,"input",function(){w&&b>=9&&l.hasSelection&&(l.hasSelection=null),k.poll()}),Ie(z,"paste",function(ae){if(ce(I,ae)||sl(ae,I))return;I.state.pasteIncoming=+new Date,k.fastPoll()});function te(ae){if(ce(I,ae))return;if(I.somethingSelected())Xo({lineWise:!1,text:I.getSelections()});else if(I.options.lineWiseCopyCut){var he=ul(I);Xo({lineWise:!0,text:he.text}),ae.type=="cut"?I.setSelections(he.ranges,null,Ae):(k.prevInput="",z.value=he.text.join(`
`),W(z))}else return;ae.type=="cut"&&(I.state.cutIncoming=+new Date)}Ie(z,"cut",te),Ie(z,"copy",te),Ie(e.scroller,"paste",function(ae){if(sn(e,ae)||ce(I,ae))return;if(!z.dispatchEvent){I.state.pasteIncoming=+new Date,k.focus();return}var he=new Event("paste");he.clipboardData=ae.clipboardData,z.dispatchEvent(he)}),Ie(e.lineSpace,"selectstart",function(ae){sn(e,ae)||ge(ae)}),Ie(z,"compositionstart",function(){var ae=I.getCursor("from");k.composing&&k.composing.range.clear(),k.composing={start:ae,range:I.markText(ae,I.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(z,"compositionend",function(){k.composing&&(k.poll(),k.composing.range.clear(),k.composing=null)})},ti.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},ti.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ti.prototype.prepareSelection=function(){var e=this.cm,l=e.display,k=e.doc,I=Ai(e);if(e.options.moveInputWithCursor){var z=nn(e,k.sel.primary().head,"div"),te=l.wrapper.getBoundingClientRect(),ae=l.lineDiv.getBoundingClientRect();I.teTop=Math.max(0,Math.min(l.wrapper.clientHeight-10,z.top+ae.top-te.top)),I.teLeft=Math.max(0,Math.min(l.wrapper.clientWidth-10,z.left+ae.left-te.left))}return I},ti.prototype.showSelection=function(e){var l=this.cm,k=l.display;S(k.cursorDiv,e.cursors),S(k.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ti.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var l=this.cm;if(l.somethingSelected()){this.prevInput="";var k=l.getSelection();this.textarea.value=k,l.state.focused&&W(this.textarea),w&&b>=9&&(this.hasSelection=k)}else e||(this.prevInput=this.textarea.value="",w&&b>=9&&(this.hasSelection=null))},ti.prototype.getField=function(){return this.textarea},ti.prototype.supportsTouch=function(){return!1},ti.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||Y()!=this.textarea))try{this.textarea.focus()}catch(e){}},ti.prototype.blur=function(){this.textarea.blur()},ti.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ti.prototype.receivedFocus=function(){this.slowPoll()},ti.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()})},ti.prototype.fastPoll=function(){var e=!1,l=this;l.pollingFast=!0;function k(){var I=l.poll();!I&&!e?(e=!0,l.polling.set(60,k)):(l.pollingFast=!1,l.slowPoll())}l.polling.set(20,k)},ti.prototype.poll=function(){var e=this,l=this.cm,k=this.textarea,I=this.prevInput;if(this.contextMenuPending||!l.state.focused||wt(k)&&!I&&!this.composing||l.isReadOnly()||l.options.disableInput||l.state.keySeq)return!1;var z=k.value;if(z==I&&!l.somethingSelected())return!1;if(w&&b>=9&&this.hasSelection===z||i&&/[\uf700-\uf7ff]/.test(z))return l.display.input.reset(),!1;if(l.doc.sel==l.display.selForContextMenu){var te=z.charCodeAt(0);if(te==8203&&!I&&(I="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,he=Math.min(I.length,z.length);ae<he&&I.charCodeAt(ae)==z.charCodeAt(ae);)++ae;return Ii(l,function(){hs(l,z.slice(ae),I.length-ae,null,e.composing?"*compose":null),z.length>1e3||z.indexOf(`
`)>-1?k.value=e.prevInput="":e.prevInput=z,e.composing&&(e.composing.range.clear(),e.composing.range=l.markText(e.composing.start,l.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ti.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ti.prototype.onKeyPress=function(){w&&b>=9&&(this.hasSelection=null),this.fastPoll()},ti.prototype.onContextMenu=function(e){var l=this,k=l.cm,I=k.display,z=l.textarea;l.contextMenuPending&&l.contextMenuPending();var te=Jn(k,e),ae=I.scroller.scrollTop;if(!te||c)return;var he=k.options.resetSelectionOnContextMenu;he&&k.doc.sel.contains(te)==-1&&qn(k,Ci)(k.doc,da(te),Ae);var pe=z.style.cssText,xe=l.wrapper.style.cssText,je=l.wrapper.offsetParent.getBoundingClientRect();l.wrapper.style.cssText="position: static",z.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-je.top-5)+"px; left: "+(e.clientX-je.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 ze;t&&(ze=window.scrollY),I.input.focus(),t&&window.scrollTo(null,ze),I.input.reset(),k.somethingSelected()||(z.value=l.prevInput=" "),l.contextMenuPending=Je,I.selForContextMenu=k.doc.sel,clearTimeout(I.detectingSelectAll);function tt(){if(z.selectionStart!=null){var Lt=k.somethingSelected(),jt="\u200B"+(Lt?z.value:"");z.value="\u21DA",z.value=jt,l.prevInput=Lt?"":"\u200B",z.selectionStart=1,z.selectionEnd=jt.length,I.selForContextMenu=k.doc.sel}}function Je(){if(l.contextMenuPending!=Je)return;if(l.contextMenuPending=!1,l.wrapper.style.cssText=xe,z.style.cssText=pe,w&&b<9&&I.scrollbars.setScrollTop(I.scroller.scrollTop=ae),z.selectionStart!=null){(!w||w&&b<9)&&tt();var Lt=0,jt=function(){I.selForContextMenu==k.doc.sel&&z.selectionStart==0&&z.selectionEnd>0&&l.prevInput=="\u200B"?qn(k,Is)(k):Lt++<10?I.detectingSelectAll=setTimeout(jt,500):(I.selForContextMenu=null,I.input.reset())};I.detectingSelectAll=setTimeout(jt,200)}}if(w&&b>=9&&tt(),R){Le(e);var gt=function(){lt(window,"mouseup",gt),setTimeout(Je,20)};Ie(window,"mouseup",gt)}else setTimeout(Je,50)},ti.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ti.prototype.setUneditable=function(){},ti.prototype.needsContentAttribute=!1;function iu(e,l){if(l=l?D(l):{},l.value=e.value,!l.tabindex&&e.tabIndex&&(l.tabindex=e.tabIndex),!l.placeholder&&e.placeholder&&(l.placeholder=e.placeholder),l.autofocus==null){var k=Y();l.autofocus=k==e||e.getAttribute("autofocus")!=null&&k==document.body}function I(){e.value=he.getValue()}var z;if(e.form&&(Ie(e.form,"submit",I),!l.leaveSubmitMethodAlone)){var te=e.form;z=te.submit;try{var ae=te.submit=function(){I(),te.submit=z,te.submit(),te.submit=ae}}catch(pe){}}l.finishInit=function(pe){pe.save=I,pe.getTextArea=function(){return e},pe.toTextArea=function(){pe.toTextArea=isNaN,I(),e.parentNode.removeChild(pe.getWrapperElement()),e.style.display="",e.form&&(lt(e.form,"submit",I),!l.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=z))}},e.style.display="none";var he=Kn(function(pe){return e.parentNode.insertBefore(pe,e.nextSibling)},l);return he}function au(e){e.off=lt,e.on=Ie,e.wheelEventPixels=fo,e.Doc=Ui,e.splitLines=Zt,e.countColumn=X,e.findColumn=ye,e.isWordChar=re,e.Pass=Ce,e.signal=_e,e.Line=Ar,e.changeEnd=ha,e.scrollbarModel=er,e.Pos=St,e.cmpPos=ur,e.modes=cn,e.mimeModes=xr,e.resolveMode=Ir,e.getMode=hn,e.modeExtensions=lr,e.extendMode=Cr,e.copyState=gr,e.startState=Wn,e.innerMode=xn,e.commands=So,e.keyMap=Ra,e.keyName=Vs,e.isModifierKey=Gs,e.lookupKey=io,e.normalizeKeyMap=Pl,e.StringStream=gn,e.SharedTextMarker=xo,e.TextMarker=Fa,e.LineWidget=Eo,e.e_preventDefault=ge,e.e_stopPropagation=Ee,e.e_stop=Le,e.addClass=K,e.contains=M,e.rmClass=_,e.keyNames=ja}Jl(Kn),eu(Kn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var $o in Ui.prototype)Ui.prototype.hasOwnProperty($o)&&oe(ou,$o)<0&&(Kn.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ui.prototype[$o]));return Oe(Ui),Kn.inputStyles={textarea:ti,contenteditable:Ln},Kn.defineMode=function(e){!Kn.defaults.mode&&e!="null"&&(Kn.defaults.mode=e),an.apply(this,arguments)},Kn.defineMIME=tn,Kn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Kn.defineMIME("text/plain","null"),Kn.defineExtension=function(e,l){Kn.prototype[e]=l},Kn.defineDocExtension=function(e,l){Ui.prototype[e]=l},Kn.fromTextArea=iu,au(Kn),Kn.version="5.58.2",Kn})},WYAk:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){(function(){var g=P,T=g.lib,N=T.Base,v=g.enc,m=v.Utf8,w=g.algo,b=w.HMAC=N.extend({init:function(t,d){t=this._hasher=new t.init,typeof d=="string"&&(d=m.parse(d));var a=t.blockSize,c=a*4;d.sigBytes>c&&(d=t.finalize(d)),d.clamp();for(var o=this._oKey=d.clone(),n=this._iKey=d.clone(),s=o.words,h=n.words,f=0;f<a;f++)s[f]^=1549556828,h[f]^=909522486;o.sigBytes=n.sigBytes=c,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var d=this._hasher,a=d.finalize(t);d.reset();var c=d.finalize(this._oKey.clone().concat(a));return c}})})()})},WaYH:function(H,q,L){"use strict";var P=L("rePB"),g=L("Ff2n"),T=L("VTBJ"),N=L("1OyB"),v=L("vuIU"),m=L("JX7q"),w=L("Ji7U"),b=L("LK+K"),t=L("q1tI"),d=L("TSYQ"),a=L.n(d),c=L("sboe"),o=L("OZM5"),n=function(R){var O=R.prefixCls,_=R.level,x=R.isStart,S=R.isEnd;if(!_)return null;for(var C="".concat(O,"-indent-unit"),j=[],F=0;F<_;F+=1){var M;j.push(t.createElement("span",{key:F,className:a()(C,(M={},Object(P.a)(M,"".concat(C,"-start"),x[F+1]),Object(P.a)(M,"".concat(C,"-end"),S[F+1]),Object(P.a)(M,"".concat(C,"-end-first-level"),!F&&S[0]),M))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},j)},s=n,h=L("815F"),f="open",u="close",i="---",r=function(p){Object(w.a)(O,p);var R=Object(b.a)(O);function O(){var _;return Object(N.a)(this,O),_=R.apply(this,arguments),_.state={dragNodeHighlight:!1},_.onSelectorClick=function(x){var S=_.props.context.onNodeClick;S(x,Object(h.b)(_.props)),_.isSelectable()?_.onSelect(x):_.onCheck(x)},_.onSelectorDoubleClick=function(x){var S=_.props.context.onNodeDoubleClick;S(x,Object(h.b)(_.props))},_.onSelect=function(x){if(_.isDisabled())return;var S=_.props.context.onNodeSelect;x.preventDefault(),S(x,Object(h.b)(_.props))},_.onCheck=function(x){if(_.isDisabled())return;var S=_.props,C=S.disableCheckbox,j=S.checked,F=_.props.context.onNodeCheck;if(!_.isCheckable()||C)return;x.preventDefault();var M=!j;F(x,Object(h.b)(_.props),M)},_.onMouseEnter=function(x){var S=_.props.context.onNodeMouseEnter;S(x,Object(h.b)(_.props))},_.onMouseLeave=function(x){var S=_.props.context.onNodeMouseLeave;S(x,Object(h.b)(_.props))},_.onContextMenu=function(x){var S=_.props.context.onNodeContextMenu;S(x,Object(h.b)(_.props))},_.onDragStart=function(x){var S=_.props.context.onNodeDragStart;x.stopPropagation(),_.setState({dragNodeHighlight:!0}),S(x,Object(m.a)(_));try{x.dataTransfer.setData("text/plain","")}catch(C){}},_.onDragEnter=function(x){var S=_.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),S(x,Object(m.a)(_))},_.onDragOver=function(x){var S=_.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),S(x,Object(m.a)(_))},_.onDragLeave=function(x){var S=_.props.context.onNodeDragLeave;x.stopPropagation(),S(x,Object(m.a)(_))},_.onDragEnd=function(x){var S=_.props.context.onNodeDragEnd;x.stopPropagation(),_.setState({dragNodeHighlight:!1}),S(x,Object(m.a)(_))},_.onDrop=function(x){var S=_.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),_.setState({dragNodeHighlight:!1}),S(x,Object(m.a)(_))},_.onExpand=function(x){var S=_.props.context.onNodeExpand;S(x,Object(h.b)(_.props))},_.setSelectHandle=function(x){_.selectHandle=x},_.getNodeState=function(){var x=_.props.expanded;return _.isLeaf()?null:x?f:u},_.hasChildren=function(){var x=_.props.eventKey,S=_.props.context.keyEntities,C=S[x]||{},j=C.children;return!!(j||[]).length},_.isLeaf=function(){var x=_.props,S=x.isLeaf,C=x.loaded,j=_.props.context.loadData,F=_.hasChildren();return S===!1?!1:S||!j&&!F||j&&C&&!F},_.isDisabled=function(){var x=_.props.disabled,S=_.props.context.disabled;return!!(S||x)},_.isCheckable=function(){var x=_.props.checkable,S=_.props.context.checkable;return!S||x===!1?!1:S},_.syncLoadData=function(x){var S=x.expanded,C=x.loading,j=x.loaded,F=_.props.context,M=F.loadData,Y=F.onNodeLoad;if(C)return;M&&S&&!_.isLeaf()&&(!_.hasChildren()&&!j&&Y(Object(h.b)(_.props)))},_.renderSwitcher=function(){var x=_.props,S=x.expanded,C=x.switcherIcon,j=_.props.context,F=j.prefixCls,M=j.switcherIcon,Y=C||M;if(_.isLeaf())return t.createElement("span",{className:a()("".concat(F,"-switcher"),"".concat(F,"-switcher-noop"))},typeof Y=="function"?Y(Object(T.a)(Object(T.a)({},_.props),{},{isLeaf:!0})):Y);var K=a()("".concat(F,"-switcher"),"".concat(F,"-switcher_").concat(S?f:u));return t.createElement("span",{onClick:_.onExpand,className:K},typeof Y=="function"?Y(Object(T.a)(Object(T.a)({},_.props),{},{isLeaf:!1})):Y)},_.renderCheckbox=function(){var x=_.props,S=x.checked,C=x.halfChecked,j=x.disableCheckbox,F=_.props.context.prefixCls,M=_.isDisabled(),Y=_.isCheckable();if(!Y)return null;var K=typeof Y!="boolean"?Y:null;return t.createElement("span",{className:a()("".concat(F,"-checkbox"),S&&"".concat(F,"-checkbox-checked"),!S&&C&&"".concat(F,"-checkbox-indeterminate"),(M||j)&&"".concat(F,"-checkbox-disabled")),onClick:_.onCheck},K)},_.renderIcon=function(){var x=_.props.loading,S=_.props.context.prefixCls;return t.createElement("span",{className:a()("".concat(S,"-iconEle"),"".concat(S,"-icon__").concat(_.getNodeState()||"docu"),x&&"".concat(S,"-icon_loading"))})},_.renderSelector=function(){var x=_.state.dragNodeHighlight,S=_.props,C=S.title,j=S.selected,F=S.icon,M=S.loading,Y=S.data,K=_.props.context,A=K.prefixCls,W=K.showIcon,U=K.icon,D=K.draggable,X=K.loadData,ie=K.titleRender,oe=_.isDisabled(),de="".concat(A,"-node-content-wrapper"),Ce;if(W){var Ae=F||U;Ce=Ae?t.createElement("span",{className:a()("".concat(A,"-iconEle"),"".concat(A,"-icon__customize"))},typeof Ae=="function"?Ae(_.props):Ae):_.renderIcon()}else X&&M&&(Ce=_.renderIcon());var me;typeof C=="function"?me=C(Y):ie?me=ie(Y):me=C;var Se=t.createElement("span",{className:"".concat(A,"-title")},me);return t.createElement("span",{ref:_.setSelectHandle,title:typeof C=="string"?C:"",className:a()("".concat(de),"".concat(de,"-").concat(_.getNodeState()||"normal"),!oe&&(j||x)&&"".concat(A,"-node-selected"),!oe&&D&&"draggable"),draggable:!oe&&D||void 0,"aria-grabbed":!oe&&D||void 0,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onContextMenu:_.onContextMenu,onClick:_.onSelectorClick,onDoubleClick:_.onSelectorDoubleClick,onDragStart:D?_.onDragStart:void 0},Ce,Se)},_}return Object(v.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,S=this.props.context.selectable;return typeof x=="boolean"?x:S}},{key:"render",value:function(){var x,S=this.props,C=S.eventKey,j=S.className,F=S.style,M=S.dragOver,Y=S.dragOverGapTop,K=S.dragOverGapBottom,A=S.isLeaf,W=S.isStart,U=S.isEnd,D=S.expanded,X=S.selected,ie=S.checked,oe=S.halfChecked,de=S.loading,Ce=S.domRef,Ae=S.active,me=S.onMouseMove,Se=Object(g.a)(S,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ye=this.props.context,se=ye.prefixCls,ee=ye.filterTreeNode,B=ye.draggable,G=ye.keyEntities,V=this.isDisabled(),Q=Object(o.f)(Se),Z=G[C]||{},ne=Z.level,re=U[U.length-1];return t.createElement("div",Object.assign({ref:Ce,className:a()(j,"".concat(se,"-treenode"),(x={},Object(P.a)(x,"".concat(se,"-treenode-disabled"),V),Object(P.a)(x,"".concat(se,"-treenode-switcher-").concat(D?"open":"close"),!A),Object(P.a)(x,"".concat(se,"-treenode-checkbox-checked"),ie),Object(P.a)(x,"".concat(se,"-treenode-checkbox-indeterminate"),oe),Object(P.a)(x,"".concat(se,"-treenode-selected"),X),Object(P.a)(x,"".concat(se,"-treenode-loading"),de),Object(P.a)(x,"".concat(se,"-treenode-active"),Ae),Object(P.a)(x,"".concat(se,"-treenode-leaf-last"),re),Object(P.a)(x,"drag-over",!V&&M),Object(P.a)(x,"drag-over-gap-top",!V&&Y),Object(P.a)(x,"drag-over-gap-bottom",!V&&K),Object(P.a)(x,"filter-node",ee&&ee(Object(h.b)(this.props))),x)),style:F,onDragEnter:B?this.onDragEnter:void 0,onDragOver:B?this.onDragOver:void 0,onDragLeave:B?this.onDragLeave:void 0,onDrop:B?this.onDrop:void 0,onDragEnd:B?this.onDragEnd:void 0,onMouseMove:me},Q),t.createElement(s,{prefixCls:se,level:ne,isStart:W,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(t.Component),E=function(R){return t.createElement(c.a.Consumer,null,function(O){return t.createElement(r,Object.assign({},R,{context:O}))})};E.displayName="TreeNode",E.defaultProps={title:i},E.isTreeNode=1;var y=q.a=E},Y1PL:function(H,q,L){"use strict";L.r(q),L.d(q,"ResizableTextArea",function(){return oe});var P=L("wx14"),g=L("1OyB"),T=L("vuIU"),N=L("Ji7U"),v=L("LK+K"),m=L("q1tI"),w=L("VTBJ"),b=L("rePB"),t=L("Zm9Q"),d=L("Kwbf"),a=L("c+Xe"),c=L("m+aA"),o=L("bdgK"),n=new Map;function s(Ae){Ae.forEach(function(me){var Se,ye=me.target;(Se=n.get(ye))===null||Se===void 0||Se.forEach(function(se){return se(ye)})})}var h=new o.default(s),f=null,u=null;function i(Ae,me){n.has(Ae)||(n.set(Ae,new Set),h.observe(Ae)),n.get(Ae).add(me)}function r(Ae,me){n.has(Ae)&&(n.get(Ae).delete(me),n.get(Ae).size||(h.unobserve(Ae),n.delete(Ae)))}var E=function(Ae){Object(N.a)(Se,Ae);var me=Object(v.a)(Se);function Se(){return Object(g.a)(this,Se),me.apply(this,arguments)}return Object(T.a)(Se,[{key:"render",value:function(){return this.props.children}}]),Se}(m.Component),y=m.createContext(null);function p(Ae){var me=Ae.children,Se=Ae.onBatchResize,ye=m.useRef(0),se=m.useRef([]),ee=m.useContext(y),B=m.useCallback(function(G,V,Q){ye.current+=1;var Z=ye.current;se.current.push({size:G,element:V,data:Q}),Promise.resolve().then(function(){Z===ye.current&&(Se==null||Se(se.current),se.current=[])}),ee==null||ee(G,V,Q)},[Se,ee]);return m.createElement(y.Provider,{value:B},me)}function R(Ae){var me=Ae.children,Se=Ae.disabled,ye=m.useRef(null),se=m.useRef(null),ee=m.useContext(y),B=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),G=m.isValidElement(me)&&Object(a.c)(me),V=G?me.ref:null,Q=m.useMemo(function(){return Object(a.a)(V,ye)},[V,ye]),Z=m.useRef(Ae);Z.current=Ae;var ne=m.useCallback(function(re){var $=Z.current,J=$.onResize,le=$.data,ue=re.getBoundingClientRect(),we=ue.width,Fe=ue.height,Xe=re.offsetWidth,$e=re.offsetHeight,et=Math.floor(we),nt=Math.floor(Fe);if(B.current.width!==et||B.current.height!==nt||B.current.offsetWidth!==Xe||B.current.offsetHeight!==$e){var at={width:et,height:nt,offsetWidth:Xe,offsetHeight:$e};B.current=at;var Be=Xe===Math.round(we)?we:Xe,Ie=$e===Math.round(Fe)?Fe:$e,rt=Object(w.a)(Object(w.a)({},at),{},{offsetWidth:Be,offsetHeight:Ie});ee==null||ee(rt,re,le),J&&Promise.resolve().then(function(){J(rt,re)})}},[]);return m.useEffect(function(){var re=Object(c.a)(ye.current)||Object(c.a)(se.current);return re&&!Se&&i(re,ne),function(){return r(re,ne)}},[ye.current,Se]),m.createElement(E,{ref:se},G?m.cloneElement(me,{ref:Q}):me)}var O="rc-observer-key";function _(Ae){var me=Ae.children,Se=Object(t.a)(me);return Se.map(function(ye,se){var ee=(ye==null?void 0:ye.key)||"".concat(O,"-").concat(se);return m.createElement(R,Object(P.a)({},Ae,{key:ee}),ye)})}_.Collection=p;var x=_,S=L("bT9E"),C=L("TSYQ"),j=L.n(C),F=`
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
`,M=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],Y={},K;function A(Ae){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(me&&Y[Se])return Y[Se];var ye=window.getComputedStyle(Ae),se=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),ee=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),B=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),G=M.map(function(Q){return"".concat(Q,":").concat(ye.getPropertyValue(Q))}).join(";"),V={sizingStyle:G,paddingSize:ee,borderSize:B,boxSizing:se};return me&&Se&&(Y[Se]=V),V}function W(Ae){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),Ae.getAttribute("wrap")?K.setAttribute("wrap",Ae.getAttribute("wrap")):K.removeAttribute("wrap");var se=A(Ae,me),ee=se.paddingSize,B=se.borderSize,G=se.boxSizing,V=se.sizingStyle;K.setAttribute("style","".concat(V,";").concat(F)),K.value=Ae.value||Ae.placeholder||"";var Q=Number.MIN_SAFE_INTEGER,Z=Number.MAX_SAFE_INTEGER,ne=K.scrollHeight,re;if(G==="border-box"?ne+=B:G==="content-box"&&(ne-=ee),Se!==null||ye!==null){K.value=" ";var $=K.scrollHeight-ee;Se!==null&&(Q=$*Se,G==="border-box"&&(Q=Q+ee+B),ne=Math.max(Q,ne)),ye!==null&&(Z=$*ye,G==="border-box"&&(Z=Z+ee+B),re=ne>Z?"":"hidden",ne=Math.min(Z,ne))}return{height:ne,minHeight:Q,maxHeight:Z,overflowY:re,resize:"none"}}var U=L("Gytx"),D=L.n(U),X;(function(Ae){Ae[Ae.NONE=0]="NONE",Ae[Ae.RESIZING=1]="RESIZING",Ae[Ae.RESIZED=2]="RESIZED"})(X||(X={}));var ie=function(Ae){Object(N.a)(Se,Ae);var me=Object(v.a)(Se);function Se(ye){var se;return Object(g.a)(this,Se),se=me.call(this,ye),se.nextFrameActionId=void 0,se.resizeFrameId=void 0,se.textArea=void 0,se.saveTextArea=function(ee){se.textArea=ee},se.handleResize=function(ee){var B=se.state.resizeStatus,G=se.props,V=G.autoSize,Q=G.onResize;if(B!==X.NONE)return;typeof Q=="function"&&Q(ee),V&&se.resizeOnNextFrame()},se.resizeOnNextFrame=function(){cancelAnimationFrame(se.nextFrameActionId),se.nextFrameActionId=requestAnimationFrame(se.resizeTextarea)},se.resizeTextarea=function(){var ee=se.props.autoSize;if(!ee||!se.textArea)return;var B=ee.minRows,G=ee.maxRows,V=W(se.textArea,!1,B,G);se.setState({textareaStyles:V,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(se.resizeFrameId),se.resizeFrameId=requestAnimationFrame(function(){se.setState({resizeStatus:X.RESIZED},function(){se.resizeFrameId=requestAnimationFrame(function(){se.setState({resizeStatus:X.NONE}),se.fixFirefoxAutoScroll()})})})})},se.renderTextArea=function(){var ee=se.props,B=ee.prefixCls,G=B===void 0?"rc-textarea":B,V=ee.autoSize,Q=ee.onResize,Z=ee.className,ne=ee.disabled,re=se.state,$=re.textareaStyles,J=re.resizeStatus,le=Object(S.a)(se.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ue=j()(G,Z,Object(b.a)({},"".concat(G,"-disabled"),ne));"value"in le&&(le.value=le.value||"");var we=Object(w.a)(Object(w.a)(Object(w.a)({},se.props.style),$),J===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:se.handleResize,disabled:!(V||Q)},m.createElement("textarea",Object(P.a)({},le,{className:ue,style:we,ref:se.saveTextArea})))},se.state={textareaStyles:{},resizeStatus:X.NONE},se}return Object(T.a)(Se,[{key:"componentDidUpdate",value:function(se){(se.value!==this.props.value||!D()(se.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 se=this.textArea.selectionStart,ee=this.textArea.selectionEnd;this.textArea.setSelectionRange(se,ee)}}catch(B){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Se}(m.Component),oe=ie,de=function(Ae){Object(N.a)(Se,Ae);var me=Object(v.a)(Se);function Se(ye){var se;Object(g.a)(this,Se),se=me.call(this,ye),se.resizableTextArea=void 0,se.focus=function(){se.resizableTextArea.textArea.focus()},se.saveTextArea=function(B){se.resizableTextArea=B},se.handleChange=function(B){var G=se.props.onChange;se.setValue(B.target.value,function(){se.resizableTextArea.resizeTextarea()}),G&&G(B)},se.handleKeyDown=function(B){var G=se.props,V=G.onPressEnter,Q=G.onKeyDown;B.keyCode===13&&V&&V(B),Q&&Q(B)};var ee=typeof ye.value=="undefined"||ye.value===null?ye.defaultValue:ye.value;return se.state={value:ee},se}return Object(T.a)(Se,[{key:"setValue",value:function(se,ee){"value"in this.props||this.setState({value:se},ee)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(oe,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(se){return"value"in se?{value:se.value}:null}}]),Se}(m.Component),Ce=q.default=de},ZW9T:function(H,q,L){"use strict";L.d(q,"a",function(){return U});var P=L("k1fw"),g=L("oBTY"),T=L("miYZ"),N=L("tsqr"),v=L("rAM+"),m=L("tJVT"),w=L("PpiC"),b=L("q1tI"),t=L.n(b),d=L("bdgK"),a=L("9og8"),c=L("WmNS"),o=L.n(c),n={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},s={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},h={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},f={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},u=L("5VLF"),i=L.n(u),r={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},E=function(X,ie){return ie.map(function(oe){return{label:oe,kind:X.languages.CompletionItemKind.Keyword,insertText:oe}})},y=function(X){return Object.keys(r.tables).map(function(ie){return{label:ie,kind:X.languages.CompletionItemKind.Variable,insertText:ie}})},p=function(X,ie){var oe=r.tables[X];return oe?oe.map(function(de){return{label:de,kind:ie.languages.CompletionItemKind.Field,insertText:de}}):[]};function R(D,X,ie,oe,de){var Ce=X.getWordUntilPosition(ie),Ae={startLineNumber:ie.lineNumber,endLineNumber:ie.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},me=oe.map(function(Se){return{label:Se,kind:D.languages.CompletionItemKind.Keyword,insertText:Se,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}});return de.map(function(Se){me.push(Object(P.a)(Object(P.a)({},Se),{},{range:Ae}))}),me}var O=function(D){r.languages.map(function(de){return D.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Ae,me,Se){return Object(a.a)(o.a.mark(function ye(){var se;return o.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return se=i()(Ae.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),B.abrupt("return",[{range:Ae.getFullModelRange(),text:se}]);case 2:case"end":return B.stop()}},ye)}))()}}),de});var X=h.quickKey.map(function(de){return{label:de.label,kind:D.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ie=f.quickKey.map(function(de){return{label:de.label,kind:D.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=s.quickKey.map(function(de){return{label:de.label,kind:D.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}});D.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ce,Ae){var me=Ce.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},ye=Ce.getLineContent(Ae.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(h.keywords.map(function(se){return{label:se,kind:D.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})),Object(g.a)(h.quickKey.map(function(se){return{label:se.label,kind:D.languages.CompletionItemKind.Function,documentation:se.content,insertText:ye.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})))}}}),D.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ce,Ae){var me=Ce.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn};return{suggestions:Object(g.a)(n.keywords.map(function(ye){return{label:ye,kind:D.languages.CompletionItemKind.Function,documentation:ye,insertText:ye,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}}))}}}),D.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ce,Ae){var me=Ce.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},ye=Ce.getLineContent(Ae.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(s.keywords.map(function(se){return{label:se,kind:D.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})),Object(g.a)(s.quickKey.map(function(se){return{label:se.label,kind:D.languages.CompletionItemKind.Function,documentation:se.content,insertText:ye.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})))}}}),D.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ce,Ae){var me=Ce.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},ye=Ce.getLineContent(Ae.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(f.keywords.map(function(se){return{label:se,kind:D.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})),Object(g.a)(f.quickKey.map(function(se){return{label:se.label,kind:D.languages.CompletionItemKind.Function,documentation:se.content,insertText:ye.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})))}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=L("fjLI"),S=L("LvDl"),C=L("+ua5");function j(D){return/^\d+$/.test(D)?"".concat(D,"px"):D}function F(){}var M=!1,Y={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function K(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=D;if(Array.isArray(D)){for(var ie=0;ie<D.length;ie++){var oe=Y[D[ie]];if(oe)return oe}return X[0]}return Y[X]||X}var A=null,W=q.b=function(D){var X=D.width,ie=X===void 0?"100%":X,oe=D.height,de=oe===void 0?"100%":oe,Ce=D.value,Ae=D.language,me=Ae===void 0?"javascript":Ae,Se=D.style,ye=Se===void 0?{}:Se,se=D.options,ee=se===void 0?{}:se,B=D.overrideServices,G=B===void 0?{}:B,V=D.theme,Q=V===void 0?"vs-dark":V,Z=D.onEditBlur,ne=D.onSave,re=D.autoHeight,$=re===void 0?!1:re,J=D.forbidCopy,le=J===void 0?!1:J,ue=D.onChange,we=ue===void 0?F:ue,Fe=D.editorDidMount,Xe=Fe===void 0?F:Fe,$e=D.onFocus,et=$e===void 0?F:$e,nt=D.filename,at=nt===void 0?"educoder.txt":nt,Be=D.errorLine,Ie=D.errorContent,rt=Ie===void 0?"":Ie,lt=Object(w.a)(D,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),_e=Object(b.useRef)(),ce=Object(b.useRef)({}),fe=Object(b.useRef)(),ve=Object(b.useRef)(),Oe=Object(b.useRef)(!1),ge=Object(b.useRef)(),Ee=Object(b.useState)(!1),Re=Object(m.a)(Ee,2),Le=Re[0],Pe=Re[1];function Ke(){var lr;return _e.current&&(lr=new d.default(function(Cr){var gr=Object(v.a)(Cr),xn;try{for(gr.s();!(xn=gr.n()).done;){var Wn=xn.value;(Wn.target.offsetHeight>0||Wn.target.offsetWidth>0)&&ce.current.instance.layout()}}catch(gn){gr.e(gn)}finally{gr.f()}}),lr.observe(_e.current)),lr}function it(){N.b.warn(decodeURIComponent(_))}var st=function(){var Cr=ce.current.instance;if(Ce!=null&&Cr&&Le){var gr=Cr.getModel();gr&&Ce!==gr.getValue()&&(M=!0,gr.setValue(Ce),Cr.layout(),M=!1)}};Object(b.useEffect)(function(){ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){st()},500)},[Ce,Le,ce.current]),Object(b.useEffect)(function(){if(Be&&ce.current&&ce.current.instance){var lr=ce.current.instance;lr.changeViewZones(function(gr){var xn=document.createElement("div");xn.style.padding="10px 20px",xn.style.width="calc(100% - 20px)",xn.className="my-error-line-wrp",xn.innerHTML=rt,gr.addZone({afterLineNumber:Be||11,heightInLines:3,domNode:xn})});var Cr={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};lr.addOverlayWidget(Cr),lr.revealPositionInCenter({lineNumber:20,column:1})}},[Be,ce.current,Le]);function Ot(){var lr=ce.current.instance;if(lr){var Cr=lr.getSelection(),gr=ce.current.pastePos||{},xn=new A.Range(gr.startLineNumber||Cr.endLineNumber,gr.startColumn||Cr.endColumn,gr.endLineNumber||Cr.endLineNumber,gr.endColumn||Cr.endColumn);setTimeout(function(){lr.executeEdits("",[{range:xn,text:""}])},300)}}function Rt(lr){(window.navigator.platform.match("Mac")?lr.metaKey:lr.ctrlKey)&&lr.keyCode==83&&(lr.preventDefault(),ne())}var sr=function(){if($&&ce.current.instance){var Cr=ce.current.instance.getContentHeight();Ir(Cr<de?de:Cr)}else Ir(de)};function Zt(lr){var Cr=document.createEvent("MouseEvents");Cr.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),lr.dispatchEvent(Cr)}function wt(lr,Cr){var gr=window.URL||window.webkitURL||window,xn=new Blob([Cr]),Wn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wn.href=gr.createObjectURL(xn),Wn.download=lr,Zt(Wn)}Object(b.useEffect)(function(){sr()},[sr]),Object(b.useEffect)(function(){_e.current&&!Le&&Promise.all([L.e(17),L.e(29)]).then(L.t.bind(null,"M/lh",7)).then(function(lr){try{A=lr,ce.current.instance=A.editor.create(_e.current,{value:Ce,language:K(me),theme:Q,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},G);var Cr=ce.current.instance,gr=x.d._menuItems,xn=Object(g.a)(gr).find(function(rn){return rn[0]._debugName=="EditorContext"}),Wn=xn[1],gn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Bt=function(Or,Lr){var Wr=Or._first;do{var jn,yn,St=Lr.includes((jn=Wr.element)===null||jn===void 0||((yn=jn.command)===null||yn===void 0)?void 0:yn.id);St&&Or._remove(Wr)}while(Wr=Wr.next)};if(Xe(Cr,A),setTimeout(function(){sr(),ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){wt(at||"educoder.txt",Cr.getValue())}}),Cr.getDomNode().addEventListener("input",function(){fe.current.autoFormat&&Cr.getAction("editor.action.formatDocument").run()})},500),ce.current.subscription=Cr.onDidChangeModelContent(function(rn){Oe.current?clearTimeout(ge.current):(sr(),we(Cr.getValue(),rn)),ge.current=setTimeout(function(){Oe.current=!1},500)}),window.Monaco||O(A,K(me)),le&&(Bt(Wn,gn),_e.current.classList.add("noCopyPaste"),Cr.onKeyDown(function(rn){var Or=rn.keyCode,Lr=rn.ctrlKey,Wr=rn.metaKey;(Or===33||Or===52)&&(Wr||Lr)&&(it(),rn.preventDefault())})),window.Monaco=A,Z&&Cr.onDidBlurEditorWidget(function(){Z(Cr.getValue())}),et&&Cr.onDidFocusEditorText(function(){et(Cr.getValue())}),le){Cr.addCommand(A.KeyMod.CtrlCmd|A.KeyCode.KEY_V,function(){return it(),null}),Cr.onDidPaste(function(rn){ce.current.pastePos=rn});try{window.addEventListener("paste",Ot)}catch(rn){}}var Kr=Ke();return Pe(!0),function(){var rn=ce.current.instance;rn.dispose();var Or=rn.getModel();Or&&Or.dispose(),ce.current.subscription&&ce.current.subscription.dispose(),le&&window.removeEventListener("paste",Ot),Kr.unobserve(_e.current)}}catch(rn){}})},[]),Object(b.useEffect)(function(){var lr=ce.current.instance;if(lr&&Le)return document.addEventListener("keydown",Rt,!1),function(){document.removeEventListener("keydown",Rt)}},[ne,Le]),Object(b.useEffect)(function(){var lr=ce.current.instance;if(lr&&Le){var Cr=K(me);A.editor.setModelLanguage(lr.getModel(),Cr),console.log("language:",me,lr.getModel(),Cr)}},[me,Le]),Object(b.useEffect)(function(){var lr=ce.current.instance;lr&&Le&&A.editor.setTheme(Q)},[Q,Le]),Object(b.useEffect)(function(){var lr=ce.current.instance;fe.current=ee,lr&&Le&&(lr.updateOptions(Object(P.a)({},ee)),setTimeout(function(){lr.getModel().updateOptions(Object(P.a)({},ee))},200))},[JSON.stringify(ee),Le]),Object(b.useEffect)(function(){var lr=ce.current.instance;lr&&Le&&lr.layout()},[ie,de,Le]);var Br=Object(b.useState)(j(ie)),Nr=Object(m.a)(Br,2),jr=Nr[0],cn=Nr[1],xr=Object(b.useState)(j(de)),an=Object(m.a)(xr,2),tn=an[0],Ir=an[1],hn=Object(P.a)(Object(P.a)({},ye),{},{width:jr,height:tn});return t.a.createElement("div",{className:"my-monaco-editor",ref:_e,style:hn})};function U(D){var X=D.width,ie=X===void 0?"100%":X,oe=D.height,de=oe===void 0?"100%":oe,Ce=D.original,Ae=D.modified,me=D.language,Se=D.options,ye=Se===void 0?{}:Se,se=Object(b.useRef)(),ee=Object(b.useState)(null),B=Object(m.a)(ee,2),G=B[0],V=B[1];function Q($){var J;return se.current&&(J=new d.default(function(le){var ue=Object(v.a)(le),we;try{for(ue.s();!(we=ue.n()).done;){var Fe=we.value;(Fe.target.offsetHeight>0||Fe.target.offsetWidth>0)&&$.layout()}}catch(Xe){ue.e(Xe)}finally{ue.f()}}),J.observe(se.current)),J}Object(b.useEffect)(function(){se.current&&Promise.all([L.e(17),L.e(29)]).then(L.t.bind(null,"M/lh",7)).then(function($){A=$;var J=A.editor.createDiffEditor(se.current,Object(P.a)(Object(P.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},ye),{},{wordWrap:!0}));V(J);var le=Q(J);return function(){J.dispose();var ue=J.getModel();ue&&ue.dispose(),le.unobserve(se.current)}})},[]),Object(b.useEffect)(function(){G&&G.setModel({original:A.editor.createModel(Ce,me),modified:A.editor.createModel(Ae,me)})},[Ce,Ae,me,G]);var Z=j(ie),ne=j(de),re={width:Z,height:ne};return t.a.createElement("div",{className:"my-diff-editor",ref:se,style:re})}},Zss7:function(H,q,L){var P;(function(g){var T=/^\s+/,N=/\s+$/,v=0,m=g.round,w=g.min,b=g.max,t=g.random;function d(B,G){if(B=B||"",G=G||{},B instanceof d)return B;if(!(this instanceof d))return new d(B,G);var V=a(B);this._originalInput=B,this._r=V.r,this._g=V.g,this._b=V.b,this._a=V.a,this._roundA=m(100*this._a)/100,this._format=G.format||V.format,this._gradientType=G.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=V.ok,this._tc_id=v++}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var B=this.toRgb();return(B.r*299+B.g*587+B.b*114)/1e3},getLuminance:function(){var B=this.toRgb(),G,V,Q,Z,ne,re;return G=B.r/255,V=B.g/255,Q=B.b/255,G<=.03928?Z=G/12.92:Z=g.pow((G+.055)/1.055,2.4),V<=.03928?ne=V/12.92:ne=g.pow((V+.055)/1.055,2.4),Q<=.03928?re=Q/12.92:re=g.pow((Q+.055)/1.055,2.4),.2126*Z+.7152*ne+.0722*re},setAlpha:function(B){return this._a=W(B),this._roundA=m(100*this._a)/100,this},toHsv:function(){var B=s(this._r,this._g,this._b);return{h:B.h*360,s:B.s,v:B.v,a:this._a}},toHsvString:function(){var B=s(this._r,this._g,this._b),G=m(B.h*360),V=m(B.s*100),Q=m(B.v*100);return this._a==1?"hsv("+G+", "+V+"%, "+Q+"%)":"hsva("+G+", "+V+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var B=o(this._r,this._g,this._b);return{h:B.h*360,s:B.s,l:B.l,a:this._a}},toHslString:function(){var B=o(this._r,this._g,this._b),G=m(B.h*360),V=m(B.s*100),Q=m(B.l*100);return this._a==1?"hsl("+G+", "+V+"%, "+Q+"%)":"hsla("+G+", "+V+"%, "+Q+"%, "+this._roundA+")"},toHex:function(B){return f(this._r,this._g,this._b,B)},toHexString:function(B){return"#"+this.toHex(B)},toHex8:function(B){return u(this._r,this._g,this._b,this._a,B)},toHex8String:function(B){return"#"+this.toHex8(B)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(B){var G="#"+i(this._r,this._g,this._b,this._a),V=G,Q=this._gradientType?"GradientType = 1, ":"";if(B){var Z=d(B);V="#"+i(Z._r,Z._g,Z._b,Z._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+G+",endColorstr="+V+")"},toString:function(B){var G=!!B;B=B||this._format;var V=!1,Q=this._a<1&&this._a>=0,Z=!G&&Q&&(B==="hex"||B==="hex6"||B==="hex3"||B==="hex4"||B==="hex8"||B==="name");return Z?B==="name"&&this._a===0?this.toName():this.toRgbString():(B==="rgb"&&(V=this.toRgbString()),B==="prgb"&&(V=this.toPercentageRgbString()),(B==="hex"||B==="hex6")&&(V=this.toHexString()),B==="hex3"&&(V=this.toHexString(!0)),B==="hex4"&&(V=this.toHex8String(!0)),B==="hex8"&&(V=this.toHex8String()),B==="name"&&(V=this.toName()),B==="hsl"&&(V=this.toHslString()),B==="hsv"&&(V=this.toHsvString()),V||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(B,G){var V=B.apply(null,[this].concat([].slice.call(G)));return this._r=V._r,this._g=V._g,this._b=V._b,this.setAlpha(V._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(r,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(B,G){return B.apply(null,[this].concat([].slice.call(G)))},analogous:function(){return this._applyCombination(F,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(j,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},d.fromRatio=function(B,G){if(typeof B=="object"){var V={};for(var Q in B)B.hasOwnProperty(Q)&&(Q==="a"?V[Q]=B[Q]:V[Q]=Ce(B[Q]));B=V}return d(B,G)};function a(B){var G={r:0,g:0,b:0},V=1,Q=null,Z=null,ne=null,re=!1,$=!1;return typeof B=="string"&&(B=se(B)),typeof B=="object"&&(ye(B.r)&&ye(B.g)&&ye(B.b)?(G=c(B.r,B.g,B.b),re=!0,$=String(B.r).substr(-1)==="%"?"prgb":"rgb"):ye(B.h)&&ye(B.s)&&ye(B.v)?(Q=Ce(B.s),Z=Ce(B.v),G=h(B.h,Q,Z),re=!0,$="hsv"):ye(B.h)&&ye(B.s)&&ye(B.l)&&(Q=Ce(B.s),ne=Ce(B.l),G=n(B.h,Q,ne),re=!0,$="hsl"),B.hasOwnProperty("a")&&(V=B.a)),V=W(V),{ok:re,format:B.format||$,r:w(255,b(G.r,0)),g:w(255,b(G.g,0)),b:w(255,b(G.b,0)),a:V}}function c(B,G,V){return{r:U(B,255)*255,g:U(G,255)*255,b:U(V,255)*255}}function o(B,G,V){B=U(B,255),G=U(G,255),V=U(V,255);var Q=b(B,G,V),Z=w(B,G,V),ne,re,$=(Q+Z)/2;if(Q==Z)ne=re=0;else{var J=Q-Z;re=$>.5?J/(2-Q-Z):J/(Q+Z);switch(Q){case B:ne=(G-V)/J+(G<V?6:0);break;case G:ne=(V-B)/J+2;break;case V:ne=(B-G)/J+4;break}ne/=6}return{h:ne,s:re,l:$}}function n(B,G,V){var Q,Z,ne;B=U(B,360),G=U(G,100),V=U(V,100);function re(le,ue,we){return we<0&&(we+=1),we>1&&(we-=1),we<1/6?le+(ue-le)*6*we:we<1/2?ue:we<2/3?le+(ue-le)*(2/3-we)*6:le}if(G===0)Q=Z=ne=V;else{var $=V<.5?V*(1+G):V+G-V*G,J=2*V-$;Q=re(J,$,B+1/3),Z=re(J,$,B),ne=re(J,$,B-1/3)}return{r:Q*255,g:Z*255,b:ne*255}}function s(B,G,V){B=U(B,255),G=U(G,255),V=U(V,255);var Q=b(B,G,V),Z=w(B,G,V),ne,re,$=Q,J=Q-Z;if(re=Q===0?0:J/Q,Q==Z)ne=0;else{switch(Q){case B:ne=(G-V)/J+(G<V?6:0);break;case G:ne=(V-B)/J+2;break;case V:ne=(B-G)/J+4;break}ne/=6}return{h:ne,s:re,v:$}}function h(B,G,V){B=U(B,360)*6,G=U(G,100),V=U(V,100);var Q=g.floor(B),Z=B-Q,ne=V*(1-G),re=V*(1-Z*G),$=V*(1-(1-Z)*G),J=Q%6,le=[V,re,ne,ne,$,V][J],ue=[$,V,V,re,ne,ne][J],we=[ne,ne,$,V,V,re][J];return{r:le*255,g:ue*255,b:we*255}}function f(B,G,V,Q){var Z=[de(m(B).toString(16)),de(m(G).toString(16)),de(m(V).toString(16))];return Q&&Z[0].charAt(0)==Z[0].charAt(1)&&Z[1].charAt(0)==Z[1].charAt(1)&&Z[2].charAt(0)==Z[2].charAt(1)?Z[0].charAt(0)+Z[1].charAt(0)+Z[2].charAt(0):Z.join("")}function u(B,G,V,Q,Z){var ne=[de(m(B).toString(16)),de(m(G).toString(16)),de(m(V).toString(16)),de(Ae(Q))];return Z&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)&&ne[3].charAt(0)==ne[3].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0)+ne[3].charAt(0):ne.join("")}function i(B,G,V,Q){var Z=[de(Ae(Q)),de(m(B).toString(16)),de(m(G).toString(16)),de(m(V).toString(16))];return Z.join("")}d.equals=function(B,G){return!B||!G?!1:d(B).toRgbString()==d(G).toRgbString()},d.random=function(){return d.fromRatio({r:t(),g:t(),b:t()})};function r(B,G){G=G===0?0:G||10;var V=d(B).toHsl();return V.s-=G/100,V.s=D(V.s),d(V)}function E(B,G){G=G===0?0:G||10;var V=d(B).toHsl();return V.s+=G/100,V.s=D(V.s),d(V)}function y(B){return d(B).desaturate(100)}function p(B,G){G=G===0?0:G||10;var V=d(B).toHsl();return V.l+=G/100,V.l=D(V.l),d(V)}function R(B,G){G=G===0?0:G||10;var V=d(B).toRgb();return V.r=b(0,w(255,V.r-m(255*-(G/100)))),V.g=b(0,w(255,V.g-m(255*-(G/100)))),V.b=b(0,w(255,V.b-m(255*-(G/100)))),d(V)}function O(B,G){G=G===0?0:G||10;var V=d(B).toHsl();return V.l-=G/100,V.l=D(V.l),d(V)}function _(B,G){var V=d(B).toHsl(),Q=(V.h+G)%360;return V.h=Q<0?360+Q:Q,d(V)}function x(B){var G=d(B).toHsl();return G.h=(G.h+180)%360,d(G)}function S(B){var G=d(B).toHsl(),V=G.h;return[d(B),d({h:(V+120)%360,s:G.s,l:G.l}),d({h:(V+240)%360,s:G.s,l:G.l})]}function C(B){var G=d(B).toHsl(),V=G.h;return[d(B),d({h:(V+90)%360,s:G.s,l:G.l}),d({h:(V+180)%360,s:G.s,l:G.l}),d({h:(V+270)%360,s:G.s,l:G.l})]}function j(B){var G=d(B).toHsl(),V=G.h;return[d(B),d({h:(V+72)%360,s:G.s,l:G.l}),d({h:(V+216)%360,s:G.s,l:G.l})]}function F(B,G,V){G=G||6,V=V||30;var Q=d(B).toHsl(),Z=360/V,ne=[d(B)];for(Q.h=(Q.h-(Z*G>>1)+720)%360;--G;)Q.h=(Q.h+Z)%360,ne.push(d(Q));return ne}function M(B,G){G=G||6;for(var V=d(B).toHsv(),Q=V.h,Z=V.s,ne=V.v,re=[],$=1/G;G--;)re.push(d({h:Q,s:Z,v:ne})),ne=(ne+$)%1;return re}d.mix=function(B,G,V){V=V===0?0:V||50;var Q=d(B).toRgb(),Z=d(G).toRgb(),ne=V/100,re={r:(Z.r-Q.r)*ne+Q.r,g:(Z.g-Q.g)*ne+Q.g,b:(Z.b-Q.b)*ne+Q.b,a:(Z.a-Q.a)*ne+Q.a};return d(re)},d.readability=function(B,G){var V=d(B),Q=d(G);return(g.max(V.getLuminance(),Q.getLuminance())+.05)/(g.min(V.getLuminance(),Q.getLuminance())+.05)},d.isReadable=function(B,G,V){var Q=d.readability(B,G),Z,ne;ne=!1,Z=ee(V);switch(Z.level+Z.size){case"AAsmall":case"AAAlarge":ne=Q>=4.5;break;case"AAlarge":ne=Q>=3;break;case"AAAsmall":ne=Q>=7;break}return ne},d.mostReadable=function(B,G,V){var Q=null,Z=0,ne,re,$,J;V=V||{},re=V.includeFallbackColors,$=V.level,J=V.size;for(var le=0;le<G.length;le++)ne=d.readability(B,G[le]),ne>Z&&(Z=ne,Q=d(G[le]));return d.isReadable(B,Q,{level:$,size:J})||!re?Q:(V.includeFallbackColors=!1,d.mostReadable(B,["#fff","#000"],V))};var Y=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K=d.hexNames=A(Y);function A(B){var G={};for(var V in B)B.hasOwnProperty(V)&&(G[B[V]]=V);return G}function W(B){return B=parseFloat(B),(isNaN(B)||B<0||B>1)&&(B=1),B}function U(B,G){ie(B)&&(B="100%");var V=oe(B);return B=w(G,b(0,parseFloat(B))),V&&(B=parseInt(B*G,10)/100),g.abs(B-G)<1e-6?1:B%G/parseFloat(G)}function D(B){return w(1,b(0,B))}function X(B){return parseInt(B,16)}function ie(B){return typeof B=="string"&&B.indexOf(".")!=-1&&parseFloat(B)===1}function oe(B){return typeof B=="string"&&B.indexOf("%")!=-1}function de(B){return B.length==1?"0"+B:""+B}function Ce(B){return B<=1&&(B=B*100+"%"),B}function Ae(B){return g.round(parseFloat(B)*255).toString(16)}function me(B){return X(B)/255}var Se=function(){var B="[-\\+]?\\d+%?",G="[-\\+]?\\d*\\.\\d+%?",V="(?:"+G+")|(?:"+B+")",Q="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",Z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?";return{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+Z),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+Z),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+Z),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(B){return!!Se.CSS_UNIT.exec(B)}function se(B){B=B.replace(T,"").replace(N,"").toLowerCase();var G=!1;if(Y[B])B=Y[B],G=!0;else if(B=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var V;return(V=Se.rgb.exec(B))?{r:V[1],g:V[2],b:V[3]}:(V=Se.rgba.exec(B))?{r:V[1],g:V[2],b:V[3],a:V[4]}:(V=Se.hsl.exec(B))?{h:V[1],s:V[2],l:V[3]}:(V=Se.hsla.exec(B))?{h:V[1],s:V[2],l:V[3],a:V[4]}:(V=Se.hsv.exec(B))?{h:V[1],s:V[2],v:V[3]}:(V=Se.hsva.exec(B))?{h:V[1],s:V[2],v:V[3],a:V[4]}:(V=Se.hex8.exec(B))?{r:X(V[1]),g:X(V[2]),b:X(V[3]),a:me(V[4]),format:G?"name":"hex8"}:(V=Se.hex6.exec(B))?{r:X(V[1]),g:X(V[2]),b:X(V[3]),format:G?"name":"hex"}:(V=Se.hex4.exec(B))?{r:X(V[1]+""+V[1]),g:X(V[2]+""+V[2]),b:X(V[3]+""+V[3]),a:me(V[4]+""+V[4]),format:G?"name":"hex8"}:(V=Se.hex3.exec(B))?{r:X(V[1]+""+V[1]),g:X(V[2]+""+V[2]),b:X(V[3]+""+V[3]),format:G?"name":"hex"}:!1}function ee(B){var G,V;return B=B||{level:"AA",size:"small"},G=(B.level||"AA").toUpperCase(),V=(B.size||"small").toLowerCase(),G!=="AA"&&G!=="AAA"&&(G="AA"),V!=="small"&&V!=="large"&&(V="small"),{level:G,size:V}}H.exports?H.exports=d:!(P=function(){return d}.call(q,L,q,H),P!==void 0&&(H.exports=P))})(Math)},bQjk:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return function(g){var T=P,N=T.lib,v=N.CipherParams,m=T.enc,w=m.Hex,b=T.format,t=b.Hex={stringify:function(d){return d.ciphertext.toString(w)},parse:function(d){var a=w.parse(d);return v.create({ciphertext:a})}}}(),P.format.Hex})},bT9E:function(H,q,L){"use strict";L.d(q,"a",function(){return g});var P=L("VTBJ");function g(T,N){var v=Object(P.a)({},T);return Array.isArray(N)&&N.forEach(function(m){delete v[m]}),v}},biw7:function(H,q,L){"use strict";var P=L("q1tI"),g=L.n(P),T=P.createContext(null);q.a=T},c5Ni:function(H,q,L){},cv67:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(g){var T=P,N=T.lib,v=N.WordArray,m=N.Hasher,w=T.algo,b=[];(function(){for(var n=0;n<64;n++)b[n]=g.abs(g.sin(n+1))*4294967296|0})();var t=w.MD5=m.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,s){for(var h=0;h<16;h++){var f=s+h,u=n[f];n[f]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var i=this._hash.words,r=n[s+0],E=n[s+1],y=n[s+2],p=n[s+3],R=n[s+4],O=n[s+5],_=n[s+6],x=n[s+7],S=n[s+8],C=n[s+9],j=n[s+10],F=n[s+11],M=n[s+12],Y=n[s+13],K=n[s+14],A=n[s+15],W=i[0],U=i[1],D=i[2],X=i[3];W=d(W,U,D,X,r,7,b[0]),X=d(X,W,U,D,E,12,b[1]),D=d(D,X,W,U,y,17,b[2]),U=d(U,D,X,W,p,22,b[3]),W=d(W,U,D,X,R,7,b[4]),X=d(X,W,U,D,O,12,b[5]),D=d(D,X,W,U,_,17,b[6]),U=d(U,D,X,W,x,22,b[7]),W=d(W,U,D,X,S,7,b[8]),X=d(X,W,U,D,C,12,b[9]),D=d(D,X,W,U,j,17,b[10]),U=d(U,D,X,W,F,22,b[11]),W=d(W,U,D,X,M,7,b[12]),X=d(X,W,U,D,Y,12,b[13]),D=d(D,X,W,U,K,17,b[14]),U=d(U,D,X,W,A,22,b[15]),W=a(W,U,D,X,E,5,b[16]),X=a(X,W,U,D,_,9,b[17]),D=a(D,X,W,U,F,14,b[18]),U=a(U,D,X,W,r,20,b[19]),W=a(W,U,D,X,O,5,b[20]),X=a(X,W,U,D,j,9,b[21]),D=a(D,X,W,U,A,14,b[22]),U=a(U,D,X,W,R,20,b[23]),W=a(W,U,D,X,C,5,b[24]),X=a(X,W,U,D,K,9,b[25]),D=a(D,X,W,U,p,14,b[26]),U=a(U,D,X,W,S,20,b[27]),W=a(W,U,D,X,Y,5,b[28]),X=a(X,W,U,D,y,9,b[29]),D=a(D,X,W,U,x,14,b[30]),U=a(U,D,X,W,M,20,b[31]),W=c(W,U,D,X,O,4,b[32]),X=c(X,W,U,D,S,11,b[33]),D=c(D,X,W,U,F,16,b[34]),U=c(U,D,X,W,K,23,b[35]),W=c(W,U,D,X,E,4,b[36]),X=c(X,W,U,D,R,11,b[37]),D=c(D,X,W,U,x,16,b[38]),U=c(U,D,X,W,j,23,b[39]),W=c(W,U,D,X,Y,4,b[40]),X=c(X,W,U,D,r,11,b[41]),D=c(D,X,W,U,p,16,b[42]),U=c(U,D,X,W,_,23,b[43]),W=c(W,U,D,X,C,4,b[44]),X=c(X,W,U,D,M,11,b[45]),D=c(D,X,W,U,A,16,b[46]),U=c(U,D,X,W,y,23,b[47]),W=o(W,U,D,X,r,6,b[48]),X=o(X,W,U,D,x,10,b[49]),D=o(D,X,W,U,K,15,b[50]),U=o(U,D,X,W,O,21,b[51]),W=o(W,U,D,X,M,6,b[52]),X=o(X,W,U,D,p,10,b[53]),D=o(D,X,W,U,j,15,b[54]),U=o(U,D,X,W,E,21,b[55]),W=o(W,U,D,X,S,6,b[56]),X=o(X,W,U,D,A,10,b[57]),D=o(D,X,W,U,_,15,b[58]),U=o(U,D,X,W,Y,21,b[59]),W=o(W,U,D,X,R,6,b[60]),X=o(X,W,U,D,F,10,b[61]),D=o(D,X,W,U,y,15,b[62]),U=o(U,D,X,W,C,21,b[63]),i[0]=i[0]+W|0,i[1]=i[1]+U|0,i[2]=i[2]+D|0,i[3]=i[3]+X|0},_doFinalize:function(){var n=this._data,s=n.words,h=this._nDataBytes*8,f=n.sigBytes*8;s[f>>>5]|=128<<24-f%32;var u=g.floor(h/4294967296),i=h;s[(f+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,s[(f+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,n.sigBytes=(s.length+1)*4,this._process();for(var r=this._hash,E=r.words,y=0;y<4;y++){var p=E[y];E[y]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return r},clone:function(){var n=m.clone.call(this);return n._hash=this._hash.clone(),n}});function d(n,s,h,f,u,i,r){var E=n+(s&h|~s&f)+u+r;return(E<<i|E>>>32-i)+s}function a(n,s,h,f,u,i,r){var E=n+(s&f|h&~f)+u+r;return(E<<i|E>>>32-i)+s}function c(n,s,h,f,u,i,r){var E=n+(s^h^f)+u+r;return(E<<i|E>>>32-i)+s}function o(n,s,h,f,u,i,r){var E=n+(h^(s|~f))+u+r;return(E<<i|E>>>32-i)+s}T.MD5=m._createHelper(t),T.HmacMD5=m._createHmacHelper(t)}(Math),P.MD5})},dejd:function(H,q,L){},dmUQ:function(H,q,L){"use strict";var P=L("Ff2n"),g=L("rePB"),T=L("1OyB"),N=L("vuIU"),v=L("Ji7U"),m=L("md7G"),w=L("foSv"),b=L("q1tI"),t=L.n(b),d=L("TSYQ"),a=L.n(d),c=L("4IlW");function o(S,C){var j=Object.keys(S);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(S);C&&(F=F.filter(function(M){return Object.getOwnPropertyDescriptor(S,M).enumerable})),j.push.apply(j,F)}return j}function n(S){for(var C=1;C<arguments.length;C++){var j=arguments[C]!=null?arguments[C]:{};C%2?o(Object(j),!0).forEach(function(F){Object(g.a)(S,F,j[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(j)):o(Object(j)).forEach(function(F){Object.defineProperty(S,F,Object.getOwnPropertyDescriptor(j,F))})}return S}function s(S){var C=h();return function(){var F=Object(w.a)(S),M;if(C){var Y=Object(w.a)(this).constructor;M=Reflect.construct(F,arguments,Y)}else M=F.apply(this,arguments);return Object(m.a)(this,M)}}function h(){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(S){return!1}}function f(){}function u(S){S.preventDefault()}var i=function(C){return C.replace(/[^\w.-]+/g,"")},r=200,E=600,y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(C){return C!=null},R=function(C,j){return j===C||typeof j=="number"&&typeof C=="number"&&isNaN(j)&&isNaN(C)},O=function(S){Object(v.a)(j,S);var C=s(j);function j(F){var M;Object(T.a)(this,j),M=C.call(this,F),M.onKeyDown=function(A){var W=M.props,U=W.onKeyDown,D=W.onPressEnter;if(A.keyCode===c.a.UP){var X=M.getRatio(A);M.up(A,X,null),M.stop()}else if(A.keyCode===c.a.DOWN){var ie=M.getRatio(A);M.down(A,ie,null),M.stop()}else A.keyCode===c.a.ENTER&&D&&D(A);if(M.recordCursorPosition(),M.lastKeyCode=A.keyCode,U){for(var oe=arguments.length,de=new Array(oe>1?oe-1:0),Ce=1;Ce<oe;Ce++)de[Ce-1]=arguments[Ce];U.apply(void 0,[A].concat(de))}},M.onKeyUp=function(A){var W=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),W){for(var U=arguments.length,D=new Array(U>1?U-1:0),X=1;X<U;X++)D[X-1]=arguments[X];W.apply(void 0,[A].concat(D))}},M.onChange=function(A){var W=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(A)),M.setState({inputValue:M.rawInput}),W(M.toNumber(M.rawInput))},M.onMouseUp=function(){var A=M.props.onMouseUp;M.recordCursorPosition(),A&&A.apply(void 0,arguments)},M.onFocus=function(){var A;M.setState({focused:!0}),(A=M.props).onFocus.apply(A,arguments)},M.onBlur=function(){var A=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var W=M.getCurrentValidValue(M.state.inputValue),U=M.setValue(W,f);if(A){var D=M.input.value,X=M.getInputDisplayValue({focus:!1,value:U});M.input.value=X&&Number(X),A.apply(void 0,arguments),M.input.value=D}},M.getRatio=function(A){var W=1;return A.metaKey||A.ctrlKey?W=.1:A.shiftKey&&(W=10),W},M.getFullNum=function(A){return isNaN(A)?A:/e/i.test(String(A))?Number(A).toFixed(18).replace(/\.?0+$/,""):A},M.getPrecision=function(A){if(p(M.props.precision))return M.props.precision;var W=String(A);if(W.indexOf("e-")>=0)return parseInt(W.slice(W.indexOf("e-")+2),10);var U=0;return W.indexOf(".")>=0&&(U=W.length-W.indexOf(".")-1),U},M.getInputDisplayValue=function(A){var W=A||M.state,U=W.focused,D=W.inputValue,X=W.value,ie;U?ie=D:ie=M.toPrecisionAsStep(X),ie==null&&(ie="");var oe=M.formatWrapper(ie);return p(M.props.decimalSeparator)&&(oe=oe.toString().replace(".",M.props.decimalSeparator)),oe},M.recordCursorPosition=function(){try{M.cursorStart=M.input.selectionStart,M.cursorEnd=M.input.selectionEnd,M.currentValue=M.input.value,M.cursorBefore=M.input.value.substring(0,M.cursorStart),M.cursorAfter=M.input.value.substring(M.cursorEnd)}catch(A){}},M.restoreByAfter=function(A){if(A===void 0)return!1;var W=M.input.value,U=W.lastIndexOf(A);if(U===-1)return!1;var D=M.cursorBefore.length;return M.lastKeyCode===c.a.DELETE&&M.cursorBefore.charAt(D-1)===A[0]?(M.fixCaret(D,D),!0):U+A.length===W.length?(M.fixCaret(U,U),!0):!1},M.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(W,U){var D=A.substring(U);return M.restoreByAfter(D)})},M.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(A,W,U){M.pressingUpOrDown=!0,M.step("down",A,W,U)},M.up=function(A,W,U){M.pressingUpOrDown=!0,M.step("up",A,W,U)},M.saveInput=function(A){M.input=A};var Y=F.value;Y===void 0&&(Y=F.defaultValue),M.state={focused:F.autoFocus};var K=M.getValidValue(M.toNumber(Y));return M.state=n(n({},M.state),{},{inputValue:M.toPrecisionAsStep(K),value:K}),M}return Object(N.a)(j,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var Y=this.props,K=Y.value,A=Y.onChange,W=Y.max,U=Y.min,D=this.state.focused;if(M){if(!R(M.value,K)||!R(M.max,W)||!R(M.min,U)){var X=D?K:this.getValidValue(K),ie;this.pressingUpOrDown?ie=X:this.inputting?ie=this.rawInput:ie=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:ie})}var oe="value"in this.props?K:this.state.value;"max"in this.props&&M.max!==W&&typeof oe=="number"&&oe>W&&A&&A(W),"min"in this.props&&M.min!==U&&typeof oe=="number"&&oe<U&&A&&A(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case c.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case c.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ce){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(M){var Y=M;return Y===""?Y="":this.isNotCompleteNumber(parseFloat(Y))?Y=this.state.value:Y=this.getValidValue(Y),this.toNumber(Y)}},{key:"getValueFromEvent",value:function(M){var Y=M.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(Y=Y.replace(this.props.decimalSeparator,".")),Y}},{key:"getValidValue",value:function(M){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(M);return isNaN(A)?M:(A<Y&&(A=Y),A>K&&(A=K),A)}},{key:"setValue",value:function(M,Y){var K=this.props.precision,A=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),W=this.state.value,U=W===void 0?null:W,D=this.state.inputValue,X=D===void 0?null:D,ie=typeof A=="number"?A.toFixed(K):"".concat(A),oe=A!==U||ie!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},Y)):this.setState({value:A,inputValue:this.toPrecisionAsStep(M)},Y),oe&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(M){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,A=K.precision,W=K.step;if(p(A))return A;var U=this.getPrecision(Y),D=this.getPrecision(W),X=this.getPrecision(M);return M?Math.max(X,U+D):U+D}},{key:"getPrecisionFactor",value:function(M){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(M,Y);return Math.pow(10,K)}},{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(M){return this.props.formatter?this.props.formatter(M):M}},{key:"toPrecisionAsStep",value:function(M){if(this.isNotCompleteNumber(M)||M==="")return M;var Y=Math.abs(this.getMaxPrecision(M));return isNaN(Y)?M.toString():Number(M).toFixed(Y)}},{key:"toNumber",value:function(M){var Y=this.props.precision,K=this.state.focused,A=M&&M.length>16&&K;return this.isNotCompleteNumber(M)||A?M:p(Y)?Math.round(M*Math.pow(10,Y))/Math.pow(10,Y):Number(M)}},{key:"upStep",value:function(M,Y){var K=this.props.step,A=this.getPrecisionFactor(M,Y),W=Math.abs(this.getMaxPrecision(M,Y)),U=((A*M+A*K*Y)/A).toFixed(W);return this.toNumber(U)}},{key:"downStep",value:function(M,Y){var K=this.props.step,A=this.getPrecisionFactor(M,Y),W=Math.abs(this.getMaxPrecision(M,Y)),U=((A*M-A*K*Y)/A).toFixed(W);return this.toNumber(U)}},{key:"step",value:function(M,Y){var K=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,W=arguments.length>3?arguments[3]:void 0;this.stop(),Y&&(Y.persist(),Y.preventDefault());var U=this.props;if(U.disabled)return;var D=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(D))return;var X=this["".concat(M,"Step")](D,A),ie=X>U.max||X<U.min;if(X>U.max?X=U.max:X<U.min&&(X=U.min),this.setValue(X,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),ie)return;this.autoStepTimer=setTimeout(function(){K[M](Y,A,!0)},W?r:E)}},{key:"fixCaret",value:function(M,Y){if(M===void 0||Y===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,A=this.input.selectionEnd;(M!==K||Y!==A)&&this.input.setSelectionRange(M,Y)}catch(W){}}},{key:"render",value:function(){var M,Y=this.props,K=Y.prefixCls,A=Y.disabled,W=Y.readOnly,U=Y.useTouch,D=Y.autoComplete,X=Y.upHandler,ie=Y.downHandler,oe=Y.className,de=Y.max,Ce=Y.min,Ae=Y.style,me=Y.title,Se=Y.onMouseEnter,ye=Y.onMouseLeave,se=Y.onMouseOver,ee=Y.onMouseOut,B=Y.required,G=Y.onClick,V=Y.tabIndex,Q=Y.type,Z=Y.placeholder,ne=Y.id,re=Y.inputMode,$=Y.pattern,J=Y.step,le=Y.maxLength,ue=Y.autoFocus,we=Y.name,Fe=Y.onPaste,Xe=Y.onInput,$e=Object(P.a)(Y,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),et=this.state,nt=et.value,at=et.focused,Be=a()(K,(M={},Object(g.a)(M,oe,!!oe),Object(g.a)(M,"".concat(K,"-disabled"),A),Object(g.a)(M,"".concat(K,"-focused"),at),M)),Ie={};Object.keys($e).forEach(function(Le){(Le.substr(0,5)==="data-"||Le.substr(0,5)==="aria-"||Le==="role")&&(Ie[Le]=$e[Le])});var rt=!W&&!A,lt=this.getInputDisplayValue(null),_e=(nt||nt===0)&&(isNaN(nt)||Number(nt)>=de),ce=(nt||nt===0)&&(isNaN(nt)||Number(nt)<=Ce),fe=_e||A||W,ve=ce||A||W,Oe=a()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(g.a)({},"".concat(K,"-handler-up-disabled"),fe)),ge=a()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(g.a)({},"".concat(K,"-handler-down-disabled"),ve)),Ee=U?{onTouchStart:fe?f:this.up,onTouchEnd:this.stop}:{onMouseDown:fe?f:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Re=U?{onTouchStart:ve?f:this.down,onTouchEnd:this.stop}:{onMouseDown:ve?f:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Be,style:Ae,title:me,onMouseEnter:Se,onMouseLeave:ye,onMouseOver:se,onMouseOut:ee,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(K,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":fe,className:Oe}),X||t.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:u})),t.a.createElement("span",Object.assign({unselectable:"on"},Re,{role:"button","aria-label":"Decrease Value","aria-disabled":ve,className:ge}),ie||t.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:u}))),t.a.createElement("div",{className:"".concat(K,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ce,"aria-valuemax":de,"aria-valuenow":nt,required:B,type:Q,placeholder:Z,onPaste:Fe,onClick:G,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:V,autoComplete:D,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:f,onKeyUp:rt?this.onKeyUp:f,autoFocus:ue,maxLength:le,readOnly:W,disabled:A,max:de,min:Ce,step:J,name:we,title:me,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:$,inputMode:re,onInput:Xe},Ie))))}}]),j}(t.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:f,onKeyDown:f,onPressEnter:f,onFocus:f,onBlur:f,parser:i,required:!1,autoComplete:"off"};var _=O,x=q.a=_},e7zE:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.Base,v=T.WordArray,m=g.algo,w=m.SHA1,b=m.HMAC,t=m.PBKDF2=N.extend({cfg:N.extend({keySize:128/32,hasher:w,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,a){for(var c=this.cfg,o=b.create(c.hasher,d),n=v.create(),s=v.create([1]),h=n.words,f=s.words,u=c.keySize,i=c.iterations;h.length<u;){var r=o.update(a).finalize(s);o.reset();for(var E=r.words,y=E.length,p=r,R=1;R<i;R++){p=o.finalize(p),o.reset();for(var O=p.words,_=0;_<y;_++)E[_]^=O[_]}n.concat(r),f[0]++}return n.sigBytes=u*4,n}});g.PBKDF2=function(d,a,c){return t.create(c).compute(d,a)}}(),P.PBKDF2})},fjLI:function(H,q,L){"use strict";L.d(q,"f",function(){return o}),L.d(q,"b",function(){return n}),L.d(q,"a",function(){return s}),L.d(q,"d",function(){return h}),L.d(q,"e",function(){return f}),L.d(q,"c",function(){return u});var P=L("8HAY"),g=L("Vhoy"),T=L("MI8n"),N=L("JYp7"),v=L("pmY6"),m=L("24hK"),w=L("nnTU"),b=L("T8No"),t=L("Cg/j"),d=L("t9D7"),a=function(i,r,E,y){var p=arguments.length,R=p<3?r:y===null?y=Object.getOwnPropertyDescriptor(r,E):y,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(i,r,E,y);else for(var _=i.length-1;_>=0;_--)(O=i[_])&&(R=(p<3?O(R):p>3?O(r,E,R):O(r,E))||R);return p>3&&R&&Object.defineProperty(r,E,R),R},c=function(i,r){return function(E,y){r(E,y,i)}};function o(i){return i.command!==void 0}class n{constructor(i){this.id=n._idPool++,this._debugName=i}}n._idPool=0,n.CommandPalette=new n("CommandPalette"),n.EditorContext=new n("EditorContext"),n.SimpleEditorContext=new n("SimpleEditorContext"),n.EditorContextCopy=new n("EditorContextCopy"),n.EditorContextPeek=new n("EditorContextPeek"),n.MenubarEditMenu=new n("MenubarEditMenu"),n.MenubarCopy=new n("MenubarCopy"),n.MenubarGoMenu=new n("MenubarGoMenu"),n.MenubarSelectionMenu=new n("MenubarSelectionMenu"),n.InlineCompletionsActions=new n("InlineCompletionsActions");const s=Object(t.c)("menuService"),h=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new T.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:i=>i===n.CommandPalette}}addCommand(i){return this.addCommands(N.a.single(i))}addCommands(i){for(const r of i)this._commands.set(r.id,r);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(v.i)(()=>{let r=!1;for(const E of i)r=this._commands.delete(E.id)||r;r&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(i){return this._commands.get(i)}getCommands(){const i=new Map;return this._commands.forEach((r,E)=>i.set(E,r)),i}appendMenuItem(i,r){return this.appendMenuItems(N.a.single({id:i,item:r}))}appendMenuItems(i){const r=new Set,E=new m.a;for(const{id:y,item:p}of i){let R=this._menuItems.get(y);R||(R=new m.a,this._menuItems.set(y,R)),E.push(R.push(p)),r.add(y)}return this._onDidChangeMenu.fire(r),Object(v.i)(()=>{if(E.size>0){for(let y of E)y();this._onDidChangeMenu.fire(r),E.clear()}})}getMenuItems(i){let r;return this._menuItems.has(i)?r=[...this._menuItems.get(i)]:r=[],i===n.CommandPalette&&this._appendImplicitItems(r),r}_appendImplicitItems(i){const r=new Set;for(const E of i)o(E)&&(r.add(E.command.id),E.alt&&r.add(E.alt.id));this._commands.forEach((E,y)=>{r.has(y)||i.push({command:E})})}};class f extends P.e{constructor(i,r,E,y){super(`submenuitem.${i.submenu.id}`,typeof i.title=="string"?i.title:i.title.value,[],"submenu");this.item=i,this._menuService=r,this._contextKeyService=E,this._options=y}get actions(){const i=[],r=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=r.getActions(this._options);r.dispose();for(const[,y]of E)y.length>0&&(i.push(...y),i.push(new P.d));return i.length&&i.pop(),i}}let u=class i{constructor(r,E,y,p,R){var O,_;if(this._commandService=R,this.id=r.id,this.label=(y==null?void 0:y.renderShortTitle)&&r.shortTitle?typeof r.shortTitle=="string"?r.shortTitle:r.shortTitle.value:typeof r.title=="string"?r.title:r.title.value,this.tooltip=(_=typeof r.tooltip=="string"?r.tooltip:(O=r.tooltip)===null||O===void 0?void 0:O.value)!==null&&_!==void 0?_:"",this.enabled=!r.precondition||p.contextMatchesRules(r.precondition),this.checked=void 0,r.toggled){const x=r.toggled.condition?r.toggled:{condition:r.toggled};this.checked=p.contextMatchesRules(x.condition),this.checked&&x.tooltip&&(this.tooltip=typeof x.tooltip=="string"?x.tooltip:x.tooltip.value),x.title&&(this.label=typeof x.title=="string"?x.title:x.title.value)}this.item=r,this.alt=E?new i(E,void 0,y,p,R):void 0,this._options=y,d.d.isThemeIcon(r.icon)&&(this.class=g.a.asClassName(r.icon))}dispose(){}run(...r){var E,y;let p=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(p=[...p,this._options.arg]),((y=this._options)===null||y===void 0?void 0:y.shouldForwardArgs)&&(p=[...p,...r]),this._commandService.executeCommand(this.id,...p)}};u=a([c(3,b.b),c(4,w.b)],u)},fyJ8:function(H,q,L){"use strict";var P=L("rePB"),g=L("VTBJ"),T=L("Ff2n"),N=L("U8pU"),v=L("q1tI"),m=L.n(v),w=L("TSYQ"),b=L.n(w),t=L("c+Xe"),d=L("sR1s");function a(h){return h&&Object(N.a)(h)==="object"&&!Array.isArray(h)&&!v.isValidElement(h)}function c(h){return typeof h=="string"?!0:Object(t.c)(h)}function o(h,f){var u,i=h.prefixCls,r=h.className,E=h.record,y=h.index,p=h.dataIndex,R=h.render,O=h.children,_=h.component,x=_===void 0?"td":_,S=h.colSpan,C=h.rowSpan,j=h.fixLeft,F=h.fixRight,M=h.firstFixLeft,Y=h.lastFixLeft,K=h.firstFixRight,A=h.lastFixRight,W=h.appendNode,U=h.additionalProps,D=U===void 0?{}:U,X=h.ellipsis,ie=h.align,oe=h.rowType,de=h.isSticky,Ce="".concat(i,"-cell"),Ae,me;if(O)me=O;else{var Se=Object(d.b)(E,p);if(me=Se,R){var ye=R(Se,E,y);a(ye)?(me=ye.children,Ae=ye.props):me=ye}}Object(N.a)(me)==="object"&&!Array.isArray(me)&&!v.isValidElement(me)&&(me=null),X&&(Y||K)&&(me=v.createElement("span",{className:"".concat(Ce,"-content")},me));var se=Ae||{},ee=se.colSpan,B=se.rowSpan,G=se.style,V=se.className,Q=Object(T.a)(se,["colSpan","rowSpan","style","className"]),Z=ee!==void 0?ee:S,ne=B!==void 0?B:C;if(Z===0||ne===0)return null;var re={},$=typeof j=="number",J=typeof F=="number";$&&(re.position="sticky",re.left=j),J&&(re.position="sticky",re.right=F);var le={};ie&&(le.textAlign=ie);var ue,we=X===!0?{showTitle:!0}:X;we&&(we.showTitle||oe==="header")&&(typeof me=="string"||typeof me=="number"?ue=me.toString():v.isValidElement(me)&&typeof me.props.children=="string"&&(ue=me.props.children));var Fe=Object(g.a)(Object(g.a)(Object(g.a)({title:ue},Q),D),{},{colSpan:Z&&Z!==1?Z:null,rowSpan:ne&&ne!==1?ne:null,className:b()(Ce,r,(u={},Object(P.a)(u,"".concat(Ce,"-fix-left"),$),Object(P.a)(u,"".concat(Ce,"-fix-left-first"),M),Object(P.a)(u,"".concat(Ce,"-fix-left-last"),Y),Object(P.a)(u,"".concat(Ce,"-fix-right"),J),Object(P.a)(u,"".concat(Ce,"-fix-right-first"),K),Object(P.a)(u,"".concat(Ce,"-fix-right-last"),A),Object(P.a)(u,"".concat(Ce,"-ellipsis"),X),Object(P.a)(u,"".concat(Ce,"-with-append"),W),Object(P.a)(u,"".concat(Ce,"-fix-sticky"),($||J)&&de),u),D.className,V),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},D.style),le),re),G),ref:c(x)?f:null});return v.createElement(x,Object.assign({},Fe),W,me)}var n=v.forwardRef(o);n.displayName="Cell";var s=v.memo(n,function(h,f){return f.shouldCellUpdate?!f.shouldCellUpdate(f.record,h.record):!1});q.a=s},gJ3r:function(H,q,L){"use strict";L.d(q,"a",function(){return P});var P=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.ECB=function(){var g=P.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(T,N){this._cipher.encryptBlock(T,N)}}),g.Decryptor=g.extend({processBlock:function(T,N){this._cipher.decryptBlock(T,N)}}),g}(),P.mode.ECB})},h78n:function(H,q,L){"use strict";L.d(q,"a",function(){return M});var P=L("q1tI"),g=L.n(P),T=L("TSYQ"),N=L.n(T),v={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(A){var W=A.map(function(){return Object(P.useRef)()}),U=Object(P.useRef)();return Object(P.useEffect)(function(){var D=Date.now(),X=!1;Object.keys(W).forEach(function(ie){var oe=W[ie].current;if(!oe)return;X=!0;var de=oe.style;de.transitionDuration=".3s, .3s, .3s, .06s",U.current&&D-U.current<100&&(de.transitionDuration="0s, 0s")}),X&&(U.current=Date.now())}),[W]};function w(){return w=Object.assign||function(K){for(var A=1;A<arguments.length;A++){var W=arguments[A];for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&(K[U]=W[U])}return K},w.apply(this,arguments)}function b(K,A){return o(K)||c(K,A)||d(K,A)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(K,A){if(!K)return;if(typeof K=="string")return a(K,A);var W=Object.prototype.toString.call(K).slice(8,-1);if(W==="Object"&&K.constructor&&(W=K.constructor.name),W==="Map"||W==="Set")return Array.from(K);if(W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return a(K,A)}function a(K,A){(A==null||A>K.length)&&(A=K.length);for(var W=0,U=new Array(A);W<A;W++)U[W]=K[W];return U}function c(K,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var W=[],U=!0,D=!1,X=void 0;try{for(var ie=K[Symbol.iterator](),oe;!(U=(oe=ie.next()).done)&&!(W.push(oe.value),A&&W.length===A);U=!0);}catch(de){D=!0,X=de}finally{try{!U&&ie.return!=null&&ie.return()}finally{if(D)throw X}}return W}function o(K){if(Array.isArray(K))return K}function n(K,A){if(K==null)return{};var W=s(K,A),U,D;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(K);for(D=0;D<X.length;D++){if(U=X[D],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;W[U]=K[U]}}return W}function s(K,A){if(K==null)return{};var W={},U=Object.keys(K),D,X;for(X=0;X<U.length;X++){if(D=U[X],A.indexOf(D)>=0)continue;W[D]=K[D]}return W}var h=function(A){var W=A.className,U=A.percent,D=A.prefixCls,X=A.strokeColor,ie=A.strokeLinecap,oe=A.strokeWidth,de=A.style,Ce=A.trailColor,Ae=A.trailWidth,me=A.transition,Se=n(A,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Se.gapPosition;var ye=Array.isArray(U)?U:[U],se=Array.isArray(X)?X:[X],ee=m(ye),B=b(ee,1),G=B[0],V=oe/2,Q=100-oe/2,Z="M ".concat(ie==="round"?V:0,",").concat(V,`
L `).concat(ie==="round"?Q:100,",").concat(V),ne="0 0 100 ".concat(oe),re=0;return g.a.createElement("svg",w({className:N()("".concat(D,"-line"),W),viewBox:ne,preserveAspectRatio:"none",style:de},Se),g.a.createElement("path",{className:"".concat(D,"-line-trail"),d:Z,strokeLinecap:ie,stroke:Ce,strokeWidth:Ae||oe,fillOpacity:"0"}),ye.map(function($,J){var le={strokeDasharray:"".concat($,"px, 100px"),strokeDashoffset:"-".concat(re,"px"),transition:me||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ue=se[J]||se[se.length-1];return re+=$,g.a.createElement("path",{key:J,className:"".concat(D,"-line-path"),d:Z,strokeLinecap:ie,stroke:ue,strokeWidth:oe,fillOpacity:"0",ref:G[J],style:le})}))};h.defaultProps=v;var f=h;function u(){return u=Object.assign||function(K){for(var A=1;A<arguments.length;A++){var W=arguments[A];for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&(K[U]=W[U])}return K},u.apply(this,arguments)}function i(K,A){return R(K)||p(K,A)||E(K,A)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E(K,A){if(!K)return;if(typeof K=="string")return y(K,A);var W=Object.prototype.toString.call(K).slice(8,-1);if(W==="Object"&&K.constructor&&(W=K.constructor.name),W==="Map"||W==="Set")return Array.from(K);if(W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return y(K,A)}function y(K,A){(A==null||A>K.length)&&(A=K.length);for(var W=0,U=new Array(A);W<A;W++)U[W]=K[W];return U}function p(K,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var W=[],U=!0,D=!1,X=void 0;try{for(var ie=K[Symbol.iterator](),oe;!(U=(oe=ie.next()).done)&&!(W.push(oe.value),A&&W.length===A);U=!0);}catch(de){D=!0,X=de}finally{try{!U&&ie.return!=null&&ie.return()}finally{if(D)throw X}}return W}function R(K){if(Array.isArray(K))return K}function O(K,A){if(K==null)return{};var W=_(K,A),U,D;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(K);for(D=0;D<X.length;D++){if(U=X[D],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;W[U]=K[U]}}return W}function _(K,A){if(K==null)return{};var W={},U=Object.keys(K),D,X;for(X=0;X<U.length;X++){if(D=U[X],A.indexOf(D)>=0)continue;W[D]=K[D]}return W}var x=0;function S(K){return+K.replace("%","")}function C(K){return Array.isArray(K)?K:[K]}function j(K,A,W,U){var D=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,X=arguments.length>5?arguments[5]:void 0,ie=50-U/2,oe=0,de=-ie,Ce=0,Ae=-2*ie;switch(X){case"left":oe=-ie,de=0,Ce=2*ie,Ae=0;break;case"right":oe=ie,de=0,Ce=-2*ie,Ae=0;break;case"bottom":de=ie,Ae=2*ie;break;default:}var me="M 50,50 m ".concat(oe,",").concat(de,`
a `).concat(ie,",").concat(ie," 0 1 1 ").concat(Ce,",").concat(-Ae,`
a `).concat(ie,",").concat(ie," 0 1 1 ").concat(-Ce,",").concat(Ae),Se=Math.PI*2*ie,ye={stroke:W,strokeDasharray:"".concat(A/100*(Se-D),"px ").concat(Se,"px"),strokeDashoffset:"-".concat(D/2+K/100*(Se-D),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:me,pathStyle:ye}}var F=function(A){var W=A.prefixCls,U=A.strokeWidth,D=A.trailWidth,X=A.gapDegree,ie=A.gapPosition,oe=A.trailColor,de=A.strokeLinecap,Ce=A.style,Ae=A.className,me=A.strokeColor,Se=A.percent,ye=O(A,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),se=Object(P.useMemo)(function(){return x+=1,x},[]),ee=j(0,100,oe,U,X,ie),B=ee.pathString,G=ee.pathStyle,V=C(Se),Q=C(me),Z=Q.find(function(le){return Object.prototype.toString.call(le)==="[object Object]"}),ne=m(V),re=i(ne,1),$=re[0],J=function(){var ue=0;return V.map(function(we,Fe){var Xe=Q[Fe]||Q[Q.length-1],$e=Object.prototype.toString.call(Xe)==="[object Object]"?"url(#".concat(W,"-gradient-").concat(se,")"):"",et=j(ue,we,Xe,U,X,ie);return ue+=we,g.a.createElement("path",{key:Fe,className:"".concat(W,"-circle-path"),d:et.pathString,stroke:$e,strokeLinecap:de,strokeWidth:U,opacity:we===0?0:1,fillOpacity:"0",style:et.pathStyle,ref:$[Fe]})})};return g.a.createElement("svg",u({className:N()("".concat(W,"-circle"),Ae),viewBox:"0 0 100 100",style:Ce},ye),Z&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(W,"-gradient-").concat(se),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Z).sort(function(le,ue){return S(le)-S(ue)}).map(function(le,ue){return g.a.createElement("stop",{key:ue,offset:le,stopColor:Z[le]})}))),g.a.createElement("path",{className:"".concat(W,"-circle-trail"),d:B,stroke:oe,strokeLinecap:de,strokeWidth:D||U,fillOpacity:"0",style:G}),J().reverse())};F.defaultProps=v;var M=F,Y={Line:f,Circle:M}},hW8S:function(H,q,L){"use strict";L.d(q,"a",function(){return N}),L.d(q,"c",function(){return v}),L.d(q,"b",function(){return m});var P=L("VTBJ"),g=L("Ff2n"),T=L("Kwbf"),N="RC_TABLE_INTERNAL_COL_DEFINE";function v(w){var b=w.expandable,t=Object(g.a)(w,["expandable"]);return"expandable"in w?Object(P.a)(Object(P.a)({},t),b):t}function m(w){return Object.keys(w).reduce(function(b,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(b[t]=w[t]),b},{})}},ic2d:function(H,q,L){"use strict";L.d(q,"a",function(){return N});var P=L("FWmy"),g=L("746U");class T{constructor(){this.data=new Map}add(v,m){P.a(g.l(v)),P.a(g.k(m)),P.a(!this.data.has(v),"There is already an extension with this id"),this.data.set(v,m)}as(v){return this.data.get(v)||null}}const N=new T},jO9C:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(g,T){g.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(g,T)},unpad:function(g){P.pad.ZeroPadding.unpad(g),g.sigBytes--}},P.pad.Iso97971})},jwmR:function(H,q,L){H.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(H,q,L){"use strict";L.d(q,"a",function(){return mr});var P=L("rePB"),g=L("ODXe"),T=L("Ff2n"),N=L("VTBJ"),v=L("q1tI"),m=L("TSYQ"),w=L.n(m),b=L("Zm9Q"),t=L("6cGi"),d=L("KQm4"),a=L("xEkU"),c=L.n(a),o=L("t23M");function n(ke){var We=Object(v.useRef)(),Ve=Object(v.useRef)(!1);function Ne(){for(var be=arguments.length,De=new Array(be),Te=0;Te<be;Te++)De[Te]=arguments[Te];Ve.current||(c.a.cancel(We.current),We.current=c()(function(){ke.apply(void 0,De)}))}return Object(v.useEffect)(function(){return function(){Ve.current=!0,c.a.cancel(We.current)}},[]),Ne}function s(ke){var We=Object(v.useRef)([]),Ve=Object(v.useState)({}),Ne=Object(g.a)(Ve,2),be=Ne[1],De=Object(v.useRef)(typeof ke=="function"?ke():ke),Te=n(function(){var He=De.current;We.current.forEach(function(Ge){He=Ge(He)}),We.current=[],De.current=He,be({})});function Me(He){We.current.push(He),Te()}return[De.current,Me]}var h=L("4IlW");function f(ke,We){var Ve,Ne=ke.prefixCls,be=ke.id,De=ke.active,Te=ke.rtl,Me=ke.tab,He=Me.key,Ge=Me.tab,Ue=Me.disabled,Ye=Me.closeIcon,ot=ke.tabBarGutter,Et=ke.tabPosition,Ct=ke.closable,Nt=ke.renderWrapper,Er=ke.removeAriaLabel,Hr=ke.editable,Ur=ke.onClick,Gr=ke.onRemove,Pr=ke.onFocus,Yr="".concat(Ne,"-tab");v.useEffect(function(){return Gr},[]);var $r={};Et==="top"||Et==="bottom"?$r[Te?"marginLeft":"marginRight"]=ot:$r.marginBottom=ot;var un=Hr&&Ct!==!1&&!Ue;function en(Sr){if(Ue)return;Ur(Sr)}function Tn(Sr){Sr.preventDefault(),Sr.stopPropagation(),Hr.onEdit("remove",{key:He,event:Sr})}var nn=v.createElement("div",{key:He,ref:We,className:w()(Yr,(Ve={},Object(P.a)(Ve,"".concat(Yr,"-with-remove"),un),Object(P.a)(Ve,"".concat(Yr,"-active"),De),Object(P.a)(Ve,"".concat(Yr,"-disabled"),Ue),Ve)),style:$r,onClick:en},v.createElement("div",{role:"tab","aria-selected":De,id:be&&"".concat(be,"-tab-").concat(He),className:"".concat(Yr,"-btn"),"aria-controls":be&&"".concat(be,"-panel-").concat(He),"aria-disabled":Ue,tabIndex:Ue?null:0,onClick:function(Dr){Dr.stopPropagation(),en(Dr)},onKeyDown:function(Dr){[h.a.SPACE,h.a.ENTER].includes(Dr.which)&&(Dr.preventDefault(),en(Dr))},onFocus:Pr},Ge),un&&v.createElement("button",{type:"button","aria-label":Er||"remove",tabIndex:0,className:"".concat(Yr,"-remove"),onClick:function(Dr){Dr.stopPropagation(),Tn(Dr)}},Ye||Hr.removeIcon||"\xD7"));return Nt&&(nn=Nt(nn)),nn}var u=v.forwardRef(f),i={width:0,height:0,left:0,top:0};function r(ke,We,Ve){return Object(v.useMemo)(function(){for(var Ne,be=new Map,De=We.get((Ne=ke[0])===null||Ne===void 0?void 0:Ne.key)||i,Te=De.left+De.width,Me=0;Me<ke.length;Me+=1){var He=ke[Me].key,Ge=We.get(He);if(!Ge){var Ue;Ge=We.get((Ue=ke[Me-1])===null||Ue===void 0?void 0:Ue.key)||i}var Ye=be.get(He)||Object(N.a)({},Ge);Ye.right=Te-Ye.left-Ye.width,be.set(He,Ye)}return be},[ke.map(function(Ne){return Ne.key}).join("_"),We,Ve])}var E={width:0,height:0,left:0,top:0,right:0};function y(ke,We,Ve,Ne,be){var De=be.tabs,Te=be.tabPosition,Me=be.rtl,He,Ge,Ue;["top","bottom"].includes(Te)?(He="width",Ge=Me?"right":"left",Ue=Math.abs(We.left)):(He="height",Ge="top",Ue=-We.top);var Ye=We[He],ot=Ve[He],Et=Ne[He],Ct=Ye;return ot+Et>Ye&&(Ct=Ye-Et),Object(v.useMemo)(function(){if(!De.length)return[0,0];for(var Nt=De.length,Er=Nt,Hr=0;Hr<Nt;Hr+=1){var Ur=ke.get(De[Hr].key)||E;if(Ur[Ge]+Ur[He]>Ue+Ct){Er=Hr-1;break}}for(var Gr=0,Pr=Nt-1;Pr>=0;Pr-=1){var Yr=ke.get(De[Pr].key)||E;if(Yr[Ge]<Ue){Gr=Pr+1;break}}return[Gr,Er]},[ke,Ue,Ct,Te,De.map(function(Nt){return Nt.key}).join("_"),Me])}var p=L("wx14"),R=L("1OyB"),O=L("vuIU"),_=L("JX7q"),x=L("Ji7U"),S=L("LK+K"),C=L("I8Z2"),j=L("bT9E"),F=L("2GS6"),M=L("Gytx"),Y=L.n(M),K=L("U8pU"),A=/iPhone/i,W=/iPod/i,U=/iPad/i,D=/\bAndroid(?:.+)Mobile\b/i,X=/Android/i,ie=/\bAndroid(?:.+)SD4930UR\b/i,oe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,de=/Windows Phone/i,Ce=/\bWindows(?:.+)ARM\b/i,Ae=/BlackBerry/i,me=/BB10/i,Se=/Opera Mini/i,ye=/\b(CriOS|Chrome)(?:.+)Mobile/i,se=/Mobile(?:.+)Firefox\b/i;function ee(ke,We){return ke.test(We)}function B(ke){var We=ke||(typeof navigator!="undefined"?navigator.userAgent:""),Ve=(We||"").split("[FBAN");if(typeof Ve[1]!="undefined"){var Ne=Ve,be=Object(g.a)(Ne,1);We=be[0]}if(Ve=We.split("Twitter"),typeof Ve[1]!="undefined"){var De=Ve,Te=Object(g.a)(De,1);We=Te[0]}var Me={apple:{phone:ee(A,We)&&!ee(de,We),ipod:ee(W,We),tablet:!ee(A,We)&&ee(U,We)&&!ee(de,We),device:(ee(A,We)||ee(W,We)||ee(U,We))&&!ee(de,We)},amazon:{phone:ee(ie,We),tablet:!ee(ie,We)&&ee(oe,We),device:ee(ie,We)||ee(oe,We)},android:{phone:!ee(de,We)&&ee(ie,We)||!ee(de,We)&&ee(D,We),tablet:!ee(de,We)&&!ee(ie,We)&&!ee(D,We)&&(ee(oe,We)||ee(X,We)),device:!ee(de,We)&&(ee(ie,We)||ee(oe,We)||ee(D,We)||ee(X,We))||ee(/\bokhttp\b/i,We)},windows:{phone:ee(de,We),tablet:ee(Ce,We),device:ee(de,We)||ee(Ce,We)},other:{blackberry:ee(Ae,We),blackberry10:ee(me,We),opera:ee(Se,We),firefox:ee(se,We),chrome:ee(ye,We),device:ee(Ae,We)||ee(me,We)||ee(Se,We)||ee(se,We)||ee(ye,We)},any:null,phone:null,tablet:null};return Me.any=Me.apple.device||Me.android.device||Me.windows.device||Me.other.device,Me.phone=Me.apple.phone||Me.android.phone||Me.windows.phone,Me.tablet=Me.apple.tablet||Me.android.tablet||Me.windows.tablet,Me}var G=Object(N.a)(Object(N.a)({},B()),{},{isMobile:B}),V=G;function Q(){}function Z(ke,We,Ve){var Ne=We||"";return ke.key||"".concat(Ne,"item_").concat(Ve)}function ne(ke){return"".concat(ke,"-menu-")}function re(ke,We){var Ve=-1;v.Children.forEach(ke,function(Ne){Ve+=1,Ne&&Ne.type&&Ne.type.isMenuItemGroup?v.Children.forEach(Ne.props.children,function(be){Ve+=1,We(be,Ve)}):We(Ne,Ve)})}function $(ke,We,Ve){if(!ke||Ve.find)return;v.Children.forEach(ke,function(Ne){if(Ne){var be=Ne.type;if(!be||!(be.isSubMenu||be.isMenuItem||be.isMenuItemGroup))return;We.indexOf(Ne.key)!==-1?Ve.find=!0:Ne.props.children&&$(Ne.props.children,We,Ve)}})}var J=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],le=function(We){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=We&&typeof We.getBoundingClientRect=="function"&&We.getBoundingClientRect().width;if(Ne){if(Ve){var be=getComputedStyle(We),De=be.marginLeft,Te=be.marginRight;Ne+=+De.replace("px","")+ +Te.replace("px","")}Ne=+Ne.toFixed(6)}return Ne||0},ue=function(We,Ve,Ne){We&&Object(K.a)(We.style)==="object"&&(We.style[Ve]=Ne)},we=function(){return V.any},Fe=L("bdgK"),Xe=L("i8i4"),$e=L.n(Xe),et=L("wgJM"),nt=L("l4aY"),at=L("m+aA"),Be=L("c+Xe"),Ie=L("zT1h"),rt=L("QC+M");function lt(ke,We,Ve){return Ve?ke[0]===We[0]:ke[0]===We[0]&&ke[1]===We[1]}function _e(ke,We,Ve){var Ne=ke[We]||{};return Object(N.a)(Object(N.a)({},Ne),Ve)}function ce(ke,We,Ve,Ne){for(var be=Ve.points,De=Object.keys(ke),Te=0;Te<De.length;Te+=1){var Me=De[Te];if(lt(ke[Me].points,be,Ne))return"".concat(We,"-placement-").concat(Me)}return""}var fe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ke=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke==null?void 0:ke.substr(0,4)))},ve=L("MNnm");function Oe(ke,We){var Ve={};return Ve[ke.toLowerCase()]=We.toLowerCase(),Ve["Webkit".concat(ke)]="webkit".concat(We),Ve["Moz".concat(ke)]="moz".concat(We),Ve["ms".concat(ke)]="MS".concat(We),Ve["O".concat(ke)]="o".concat(We.toLowerCase()),Ve}function ge(ke,We){var Ve={animationend:Oe("Animation","AnimationEnd"),transitionend:Oe("Transition","TransitionEnd")};return ke&&("AnimationEvent"in We||delete Ve.animationend.animation,"TransitionEvent"in We||delete Ve.transitionend.transition),Ve}var Ee=ge(Object(ve.a)(),typeof window!="undefined"?window:{}),Re={};if(Object(ve.a)()){var Le=document.createElement("div");Re=Le.style}var Pe={};function Ke(ke){if(Pe[ke])return Pe[ke];var We=Ee[ke];if(We)for(var Ve=Object.keys(We),Ne=Ve.length,be=0;be<Ne;be+=1){var De=Ve[be];if(Object.prototype.hasOwnProperty.call(We,De)&&De in Re)return Pe[ke]=We[De],Pe[ke]}return""}var it=Ke("animationend"),st=Ke("transitionend"),Ot=!!(it&&st),Rt=it||"animationend",sr=st||"transitionend";function Zt(ke,We){if(!ke)return null;if(Object(K.a)(ke)==="object"){var Ve=We.replace(/-\w/g,function(Ne){return Ne[1].toUpperCase()});return ke[Ve]}return"".concat(ke,"-").concat(We)}var wt="none",Br="appear",Nr="enter",jr="leave",cn="none",xr="prepare",an="start",tn="active",Ir="end";function hn(ke){var We=Object(v.useRef)(!1),Ve=Object(v.useState)(ke),Ne=Object(g.a)(Ve,2),be=Ne[0],De=Ne[1];function Te(Me){We.current||De(Me)}return Object(v.useEffect)(function(){return function(){We.current=!0}},[]),[be,Te]}var lr=Object(ve.a)()?v.useLayoutEffect:v.useEffect,Cr=lr,gr=function(){var ke=v.useRef(null);function We(){et.a.cancel(ke.current)}function Ve(Ne){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;We();var De=Object(et.a)(function(){be<=1?Ne({isCanceled:function(){return De!==ke.current}}):Ve(Ne,be-1)});ke.current=De}return v.useEffect(function(){return function(){We()}},[]),[Ve,We]},xn=[xr,an,tn,Ir],Wn=!1,gn=!0;function Bt(ke){return ke===tn||ke===Ir}var Kr=function(ke,We){var Ve=v.useState(cn),Ne=Object(g.a)(Ve,2),be=Ne[0],De=Ne[1],Te=gr(),Me=Object(g.a)(Te,2),He=Me[0],Ge=Me[1];function Ue(){De(xr)}return Cr(function(){if(be!==cn&&be!==Ir){var Ye=xn.indexOf(be),ot=xn[Ye+1],Et=We(be);Et===Wn?De(ot):He(function(Ct){function Nt(){if(Ct.isCanceled())return;De(ot)}Et===!0?Nt():Promise.resolve(Et).then(Nt)})}},[ke,be]),v.useEffect(function(){return function(){Ge()}},[]),[Ue,be]},rn=function(ke){var We=Object(v.useRef)(),Ve=Object(v.useRef)(ke);Ve.current=ke;var Ne=v.useCallback(function(Te){Ve.current(Te)},[]);function be(Te){Te&&(Te.removeEventListener(sr,Ne),Te.removeEventListener(Rt,Ne))}function De(Te){We.current&&We.current!==Te&&be(We.current),Te&&Te!==We.current&&(Te.addEventListener(sr,Ne),Te.addEventListener(Rt,Ne),We.current=Te)}return v.useEffect(function(){return function(){be(We.current)}},[]),[De,be]};function Or(ke,We,Ve,Ne){var be=Ne.motionEnter,De=be===void 0?!0:be,Te=Ne.motionAppear,Me=Te===void 0?!0:Te,He=Ne.motionLeave,Ge=He===void 0?!0:He,Ue=Ne.motionDeadline,Ye=Ne.motionLeaveImmediately,ot=Ne.onAppearPrepare,Et=Ne.onEnterPrepare,Ct=Ne.onLeavePrepare,Nt=Ne.onAppearStart,Er=Ne.onEnterStart,Hr=Ne.onLeaveStart,Ur=Ne.onAppearActive,Gr=Ne.onEnterActive,Pr=Ne.onLeaveActive,Yr=Ne.onAppearEnd,$r=Ne.onEnterEnd,un=Ne.onLeaveEnd,en=Ne.onVisibleChanged,Tn=hn(),nn=Object(g.a)(Tn,2),Sr=nn[0],Dr=nn[1],Qr=hn(wt),ln=Object(g.a)(Qr,2),hr=ln[0],fn=ln[1],Pn=hn(null),vn=Object(g.a)(Pn,2),On=vn[0],bn=vn[1],Gn=Object(v.useRef)(!1),$n=Object(v.useRef)(null),Mn=Object(v.useRef)(!1),ni=Object(v.useRef)(null);function Fi(){var Sn=Ve();return Sn||ni.current}var pi=Object(v.useRef)(!1);function Jn(Sn){var _n=Fi();if(Sn&&!Sn.deadline&&Sn.target!==_n)return;var Xn;hr===Br&&pi.current?Xn=Yr==null?void 0:Yr(_n,Sn):hr===Nr&&pi.current?Xn=$r==null?void 0:$r(_n,Sn):hr===jr&&pi.current&&(Xn=un==null?void 0:un(_n,Sn)),Xn!==!1&&!Mn.current&&(fn(wt),bn(null))}var An=rn(Jn),Rn=Object(g.a)(An,1),Nn=Rn[0],kn=v.useMemo(function(){var Sn,_n,Xn;switch(hr){case"appear":return Sn={},Object(P.a)(Sn,xr,ot),Object(P.a)(Sn,an,Nt),Object(P.a)(Sn,tn,Ur),Sn;case"enter":return _n={},Object(P.a)(_n,xr,Et),Object(P.a)(_n,an,Er),Object(P.a)(_n,tn,Gr),_n;case"leave":return Xn={},Object(P.a)(Xn,xr,Ct),Object(P.a)(Xn,an,Hr),Object(P.a)(Xn,tn,Pr),Xn;default:return{}}},[hr]),Vn=Kr(hr,function(Sn){if(Sn===xr){var _n=kn[xr];return _n?_n(Fi()):Wn}if(En in kn){var Xn;bn(((Xn=kn[En])===null||Xn===void 0?void 0:Xn.call(kn,Fi(),null))||null)}return En===tn&&(Nn(Fi()),Ue>0&&(clearTimeout($n.current),$n.current=setTimeout(function(){Jn({deadline:!0})},Ue))),gn}),_i=Object(g.a)(Vn,2),Xi=_i[0],En=_i[1],Ai=Bt(En);pi.current=Ai,Cr(function(){Dr(We);var Sn=Gn.current;if(Gn.current=!0,!ke)return;var _n;!Sn&&We&&Me&&(_n=Br),Sn&&We&&De&&(_n=Nr),(Sn&&!We&&Ge||!Sn&&Ye&&!We&&Ge)&&(_n=jr),_n&&(fn(_n),Xi())},[We]),Object(v.useEffect)(function(){(hr===Br&&!Me||hr===Nr&&!De||hr===jr&&!Ge)&&fn(wt)},[Me,De,Ge]),Object(v.useEffect)(function(){return function(){clearTimeout($n.current),Mn.current=!0}},[]),Object(v.useEffect)(function(){Sr!==void 0&&hr===wt&&(en==null||en(Sr))},[Sr,hr]);var Ri=On;return kn[xr]&&En===an&&(Ri=Object(N.a)({transition:"none"},Ri)),[hr,En,Ri,Sr!=null?Sr:We]}var Lr=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(){return Object(R.a)(this,Ve),We.apply(this,arguments)}return Object(O.a)(Ve,[{key:"render",value:function(){return this.props.children}}]),Ve}(v.Component),Wr=Lr;function jn(ke){var We=ke;Object(K.a)(ke)==="object"&&(We=ke.transitionSupport);function Ve(be){return!!(be.motionName&&We)}var Ne=v.forwardRef(function(be,De){var Te=be.visible,Me=Te===void 0?!0:Te,He=be.removeOnLeave,Ge=He===void 0?!0:He,Ue=be.forceRender,Ye=be.children,ot=be.motionName,Et=be.leavedClassName,Ct=be.eventProps,Nt=Ve(be),Er=Object(v.useRef)(),Hr=Object(v.useRef)();function Ur(){try{return Object(at.a)(Er.current||Hr.current)}catch(fn){return null}}var Gr=Or(Nt,Me,Ur,be),Pr=Object(g.a)(Gr,4),Yr=Pr[0],$r=Pr[1],un=Pr[2],en=Pr[3],Tn=v.useRef(en);en&&(Tn.current=!0);var nn=Object(v.useRef)(De);nn.current=De;var Sr=v.useCallback(function(fn){Er.current=fn,Object(Be.b)(nn.current,fn)},[]),Dr,Qr=Object(N.a)(Object(N.a)({},Ct),{},{visible:Me});if(!Ye)Dr=null;else if(Yr===wt||!Ve(be))en?Dr=Ye(Object(N.a)({},Qr),Sr):!Ge&&Tn.current?Dr=Ye(Object(N.a)(Object(N.a)({},Qr),{},{className:Et}),Sr):Ue?Dr=Ye(Object(N.a)(Object(N.a)({},Qr),{},{style:{display:"none"}}),Sr):Dr=null;else{var ln,hr;$r===xr?hr="prepare":Bt($r)?hr="active":$r===an&&(hr="start"),Dr=Ye(Object(N.a)(Object(N.a)({},Qr),{},{className:w()(Zt(ot,Yr),(ln={},Object(P.a)(ln,Zt(ot,"".concat(Yr,"-").concat(hr)),hr),Object(P.a)(ln,ot,typeof ot=="string"),ln)),style:un}),Sr)}return v.createElement(Wr,{ref:Hr},Dr)});return Ne.displayName="CSSMotion",Ne}var yn=jn(Ot),St="add",ur="keep",oi="remove",wi="removed";function Pi(ke){var We;return ke&&Object(K.a)(ke)==="object"&&"key"in ke?We=ke:We={key:ke},Object(N.a)(Object(N.a)({},We),{},{key:String(We.key)})}function vi(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(Pi)}function Un(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ve=[],Ne=0,be=We.length,De=vi(ke),Te=vi(We);De.forEach(function(Ge){for(var Ue=!1,Ye=Ne;Ye<be;Ye+=1){var ot=Te[Ye];if(ot.key===Ge.key){Ne<Ye&&(Ve=Ve.concat(Te.slice(Ne,Ye).map(function(Et){return Object(N.a)(Object(N.a)({},Et),{},{status:St})})),Ne=Ye),Ve.push(Object(N.a)(Object(N.a)({},ot),{},{status:ur})),Ne+=1,Ue=!0;break}}Ue||Ve.push(Object(N.a)(Object(N.a)({},Ge),{},{status:oi}))}),Ne<be&&(Ve=Ve.concat(Te.slice(Ne).map(function(Ge){return Object(N.a)(Object(N.a)({},Ge),{},{status:St})})));var Me={};Ve.forEach(function(Ge){var Ue=Ge.key;Me[Ue]=(Me[Ue]||0)+1});var He=Object.keys(Me).filter(function(Ge){return Me[Ge]>1});return He.forEach(function(Ge){Ve=Ve.filter(function(Ue){var Ye=Ue.key,ot=Ue.status;return Ye!==Ge||ot!==oi}),Ve.forEach(function(Ue){Ue.key===Ge&&(Ue.status=ur)})}),Ve}var wr=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function si(ke){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yn,Ve=function(Ne){Object(x.a)(De,Ne);var be=Object(S.a)(De);function De(){var Te;return Object(R.a)(this,De),Te=be.apply(this,arguments),Te.state={keyEntities:[]},Te.removeKey=function(Me){Te.setState(function(He){var Ge=He.keyEntities;return{keyEntities:Ge.map(function(Ue){return Ue.key!==Me?Ue:Object(N.a)(Object(N.a)({},Ue),{},{status:wi})})}})},Te}return Object(O.a)(De,[{key:"render",value:function(){var Me=this,He=this.state.keyEntities,Ge=this.props,Ue=Ge.component,Ye=Ge.children,ot=Ge.onVisibleChanged,Et=Object(T.a)(Ge,["component","children","onVisibleChanged"]),Ct=Ue||v.Fragment,Nt={};return wr.forEach(function(Er){Nt[Er]=Et[Er],delete Et[Er]}),delete Et.keys,v.createElement(Ct,Et,He.map(function(Er){var Hr=Er.status,Ur=Object(T.a)(Er,["status"]),Gr=Hr===St||Hr===ur;return v.createElement(We,Object(p.a)({},Nt,{key:Ur.key,visible:Gr,eventProps:Ur,onVisibleChanged:function(Yr){ot==null||ot(Yr,{key:Ur.key}),Yr||Me.removeKey(Ur.key)}}),Ye)}))}}],[{key:"getDerivedStateFromProps",value:function(Me,He){var Ge=Me.keys,Ue=He.keyEntities,Ye=vi(Ge),ot=Un(Ue,Ye);return{keyEntities:ot.filter(function(Et){var Ct=Ue.find(function(Nt){var Er=Nt.key;return Et.key===Er});return!(Ct&&Ct.status===wi&&Et.status===oi)})}}}]),De}(v.Component);return Ve.defaultProps={component:"div"},Ve}var It=si(Ot),Zn=yn;function Bn(ke){var We=ke.prefixCls,Ve=ke.motion,Ne=ke.animation,be=ke.transitionName;return Ve||(Ne?{motionName:"".concat(We,"-").concat(Ne)}:be?{motionName:be}:null)}function zi(ke){var We=ke.prefixCls,Ve=ke.visible,Ne=ke.zIndex,be=ke.mask,De=ke.maskMotion,Te=ke.maskAnimation,Me=ke.maskTransitionName;if(!be)return null;var He={};return(De||Me||Te)&&(He=Object(N.a)({motionAppear:!0},Bn({motion:De,prefixCls:We,transitionName:Me,animation:Te}))),v.createElement(Zn,Object(p.a)({},He,{visible:Ve,removeOnLeave:!0}),function(Ge){var Ue=Ge.className;return v.createElement("div",{style:{zIndex:Ne},className:w()("".concat(We,"-mask"),Ue)})})}var Ti=L("9mu1"),ri=L("o0o1"),Qi=L.n(ri),Zi=L("HaE+"),li=["measure","align",null,"motion"],In=function(ke,We){var Ve=Object(v.useState)(null),Ne=Object(g.a)(Ve,2),be=Ne[0],De=Ne[1],Te=Object(v.useRef)(),Me=Object(v.useRef)(!1);function He(Ye){Me.current||De(Ye)}function Ge(){et.a.cancel(Te.current)}function Ue(Ye){Ge(),Te.current=Object(et.a)(function(){He(function(ot){switch(be){case"align":return"motion";case"motion":return"stable";default:}return ot}),Ye==null||Ye()})}return Object(v.useEffect)(function(){He("measure")},[ke]),Object(v.useEffect)(function(){switch(be){case"measure":We();break;default:}be&&(Te.current=Object(et.a)(Object(Zi.a)(Qi.a.mark(function Ye(){var ot,Et;return Qi.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:ot=li.indexOf(be),Et=li[ot+1],Et&&ot!==-1&&He(Et);case 3:case"end":return Nt.stop()}},Ye)}))))},[be]),Object(v.useEffect)(function(){return function(){Me.current=!0,Ge()}},[]),[be,Ue]},ui=function(ke){var We=v.useState({width:0,height:0}),Ve=Object(g.a)(We,2),Ne=Ve[0],be=Ve[1];function De(Me){be({width:Me.offsetWidth,height:Me.offsetHeight})}var Te=v.useMemo(function(){var Me={};if(ke){var He=Ne.width,Ge=Ne.height;ke.indexOf("height")!==-1&&Ge?Me.height=Ge:ke.indexOf("minHeight")!==-1&&Ge&&(Me.minHeight=Ge),ke.indexOf("width")!==-1&&He?Me.width=He:ke.indexOf("minWidth")!==-1&&He&&(Me.minWidth=He)}return Me},[ke,Ne]);return[Te,De]},Mi=v.forwardRef(function(ke,We){var Ve=ke.visible,Ne=ke.prefixCls,be=ke.className,De=ke.style,Te=ke.children,Me=ke.zIndex,He=ke.stretch,Ge=ke.destroyPopupOnHide,Ue=ke.forceRender,Ye=ke.align,ot=ke.point,Et=ke.getRootDomNode,Ct=ke.getClassNameFromAlign,Nt=ke.onAlign,Er=ke.onMouseEnter,Hr=ke.onMouseLeave,Ur=ke.onMouseDown,Gr=ke.onTouchStart,Pr=Object(v.useRef)(),Yr=Object(v.useRef)(),$r=Object(v.useState)(),un=Object(g.a)($r,2),en=un[0],Tn=un[1],nn=ui(He),Sr=Object(g.a)(nn,2),Dr=Sr[0],Qr=Sr[1];function ln(){He&&Qr(Et())}var hr=In(Ve,ln),fn=Object(g.a)(hr,2),Pn=fn[0],vn=fn[1],On=Object(v.useRef)();function bn(){return ot||Et}function Gn(){var An;(An=Pr.current)===null||An===void 0||An.forceAlign()}function $n(An,Rn){var Nn=Ct(Rn);en!==Nn&&Tn(Nn),Pn==="align"&&(en!==Nn?Promise.resolve().then(function(){Gn()}):vn(function(){var kn;(kn=On.current)===null||kn===void 0||kn.call(On)}),Nt==null||Nt(An,Rn))}var Mn=Object(N.a)({},Bn(ke));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(An){var Rn=Mn[An];Mn[An]=function(Nn,kn){return vn(),Rn==null?void 0:Rn(Nn,kn)}});function ni(){return new Promise(function(An){On.current=An})}v.useEffect(function(){!Mn.motionName&&Pn==="motion"&&vn()},[Mn.motionName,Pn]),v.useImperativeHandle(We,function(){return{forceAlign:Gn,getElement:function(){return Yr.current}}});var Fi=Object(N.a)(Object(N.a)({},Dr),{},{zIndex:Me,opacity:Pn==="motion"||Pn==="stable"||!Ve?void 0:0,pointerEvents:Pn==="stable"?void 0:"none"},De),pi=!0;(Ye==null?void 0:Ye.points)&&(Pn==="align"||Pn==="stable")&&(pi=!1);var Jn=Te;return v.Children.count(Te)>1&&(Jn=v.createElement("div",{className:"".concat(Ne,"-content")},Te)),v.createElement(Zn,Object(p.a)({visible:Ve,ref:Yr,leavedClassName:"".concat(Ne,"-hidden")},Mn,{onAppearPrepare:ni,onEnterPrepare:ni,removeOnLeave:Ge,forceRender:Ue}),function(An,Rn){var Nn=An.className,kn=An.style,Vn=w()(Ne,be,en,Nn);return v.createElement(Ti.a,{target:bn(),key:"popup",ref:Pr,monitorWindowResize:!0,disabled:pi,align:Ye,onAlign:$n},v.createElement("div",{ref:Rn,className:Vn,onMouseEnter:Er,onMouseLeave:Hr,onMouseDownCapture:Ur,onTouchStartCapture:Gr,style:Object(N.a)(Object(N.a)({},kn),Fi)},Jn))})});Mi.displayName="PopupInner";var yi=Mi,bi=v.forwardRef(function(ke,We){var Ve=ke.prefixCls,Ne=ke.visible,be=ke.zIndex,De=ke.children,Te=ke.mobile;Te=Te===void 0?{}:Te;var Me=Te.popupClassName,He=Te.popupStyle,Ge=Te.popupMotion,Ue=Ge===void 0?{}:Ge,Ye=Te.popupRender,ot=v.useRef();v.useImperativeHandle(We,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var Et=Object(N.a)({zIndex:be},He),Ct=De;return v.Children.count(De)>1&&(Ct=v.createElement("div",{className:"".concat(Ve,"-content")},De)),Ye&&(Ct=Ye(Ct)),v.createElement(Zn,Object(p.a)({visible:Ne,ref:ot,removeOnLeave:!0},Ue),function(Nt,Er){var Hr=Nt.className,Ur=Nt.style,Gr=w()(Ve,Me,Hr);return v.createElement("div",{ref:Er,className:Gr,style:Object(N.a)(Object(N.a)({},Ur),Et)},Ct)})});bi.displayName="MobilePopupInner";var Da=bi,Vi=["visible","mobile"],zn=v.forwardRef(function(ke,We){var Ve=ke.visible,Ne=ke.mobile,be=Object(T.a)(ke,Vi),De=Object(v.useState)(Ve),Te=Object(g.a)(De,2),Me=Te[0],He=Te[1],Ge=Object(v.useState)(!1),Ue=Object(g.a)(Ge,2),Ye=Ue[0],ot=Ue[1],Et=Object(N.a)(Object(N.a)({},be),{},{visible:Me});Object(v.useEffect)(function(){He(Ve),Ve&&Ne&&ot(fe())},[Ve,Ne]);var Ct=Ye?v.createElement(Da,Object(p.a)({},Et,{mobile:Ne,ref:We})):v.createElement(yi,Object(p.a)({},Et,{ref:We}));return v.createElement("div",null,v.createElement(zi,Et),Ct)});zn.displayName="Popup";var Gi=zn,_a=v.createContext(null),Ni=_a;function ci(){}function oa(){return""}function pa(ke){return ke?ke.ownerDocument:window.document}var sa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function ma(ke){var We=function(Ve){Object(x.a)(be,Ve);var Ne=Object(S.a)(be);function be(De){var Te;Object(R.a)(this,be),Te=Ne.call(this,De),Te.popupRef=v.createRef(),Te.triggerRef=v.createRef(),Te.attachId=void 0,Te.clickOutsideHandler=void 0,Te.touchOutsideHandler=void 0,Te.contextMenuOutsideHandler1=void 0,Te.contextMenuOutsideHandler2=void 0,Te.mouseDownTimeout=void 0,Te.focusTime=void 0,Te.preClickTime=void 0,Te.preTouchTime=void 0,Te.delayTimer=void 0,Te.hasPopupMouseDown=void 0,Te.onMouseEnter=function(He){var Ge=Te.props.mouseEnterDelay;Te.fireEvents("onMouseEnter",He),Te.delaySetPopupVisible(!0,Ge,Ge?null:He)},Te.onMouseMove=function(He){Te.fireEvents("onMouseMove",He),Te.setPoint(He)},Te.onMouseLeave=function(He){Te.fireEvents("onMouseLeave",He),Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onPopupMouseEnter=function(){Te.clearDelayTimer()},Te.onPopupMouseLeave=function(He){var Ge;if(He.relatedTarget&&!He.relatedTarget.setTimeout&&Object(nt.a)((Ge=Te.popupRef.current)===null||Ge===void 0?void 0:Ge.getElement(),He.relatedTarget))return;Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onFocus=function(He){Te.fireEvents("onFocus",He),Te.clearDelayTimer(),Te.isFocusToShow()&&(Te.focusTime=Date.now(),Te.delaySetPopupVisible(!0,Te.props.focusDelay))},Te.onMouseDown=function(He){Te.fireEvents("onMouseDown",He),Te.preClickTime=Date.now()},Te.onTouchStart=function(He){Te.fireEvents("onTouchStart",He),Te.preTouchTime=Date.now()},Te.onBlur=function(He){Te.fireEvents("onBlur",He),Te.clearDelayTimer(),Te.isBlurToHide()&&Te.delaySetPopupVisible(!1,Te.props.blurDelay)},Te.onContextMenu=function(He){He.preventDefault(),Te.fireEvents("onContextMenu",He),Te.setPopupVisible(!0,He)},Te.onContextMenuClose=function(){Te.isContextMenuToShow()&&Te.close()},Te.onClick=function(He){if(Te.fireEvents("onClick",He),Te.focusTime){var Ge;if(Te.preClickTime&&Te.preTouchTime?Ge=Math.min(Te.preClickTime,Te.preTouchTime):Te.preClickTime?Ge=Te.preClickTime:Te.preTouchTime&&(Ge=Te.preTouchTime),Math.abs(Ge-Te.focusTime)<20)return;Te.focusTime=0}Te.preClickTime=0,Te.preTouchTime=0,Te.isClickToShow()&&(Te.isClickToHide()||Te.isBlurToHide())&&He&&He.preventDefault&&He.preventDefault();var Ue=!Te.state.popupVisible;(Te.isClickToHide()&&!Ue||Ue&&Te.isClickToShow())&&Te.setPopupVisible(!Te.state.popupVisible,He)},Te.onPopupMouseDown=function(){if(Te.hasPopupMouseDown=!0,clearTimeout(Te.mouseDownTimeout),Te.mouseDownTimeout=window.setTimeout(function(){Te.hasPopupMouseDown=!1},0),Te.context){var He;(He=Te.context).onPopupMouseDown.apply(He,arguments)}},Te.onDocumentClick=function(He){if(Te.props.mask&&!Te.props.maskClosable)return;var Ge=He.target,Ue=Te.getRootDomNode(),Ye=Te.getPopupDomNode();(!Object(nt.a)(Ue,Ge)||Te.isContextMenuOnly())&&!Object(nt.a)(Ye,Ge)&&!Te.hasPopupMouseDown&&Te.close()},Te.getRootDomNode=function(){var He=Te.props.getTriggerDOMNode;if(He)return He(Te.triggerRef.current);try{var Ge=Object(at.a)(Te.triggerRef.current);if(Ge)return Ge}catch(Ue){}return $e.a.findDOMNode(Object(_.a)(Te))},Te.getPopupClassNameFromAlign=function(He){var Ge=[],Ue=Te.props,Ye=Ue.popupPlacement,ot=Ue.builtinPlacements,Et=Ue.prefixCls,Ct=Ue.alignPoint,Nt=Ue.getPopupClassNameFromAlign;return Ye&&ot&&Ge.push(ce(ot,Et,He,Ct)),Nt&&Ge.push(Nt(He)),Ge.join(" ")},Te.getComponent=function(){var He=Te.props,Ge=He.prefixCls,Ue=He.destroyPopupOnHide,Ye=He.popupClassName,ot=He.onPopupAlign,Et=He.popupMotion,Ct=He.popupAnimation,Nt=He.popupTransitionName,Er=He.popupStyle,Hr=He.mask,Ur=He.maskAnimation,Gr=He.maskTransitionName,Pr=He.maskMotion,Yr=He.zIndex,$r=He.popup,un=He.stretch,en=He.alignPoint,Tn=He.mobile,nn=He.forceRender,Sr=Te.state,Dr=Sr.popupVisible,Qr=Sr.point,ln=Te.getPopupAlign(),hr={};return Te.isMouseEnterToShow()&&(hr.onMouseEnter=Te.onPopupMouseEnter),Te.isMouseLeaveToHide()&&(hr.onMouseLeave=Te.onPopupMouseLeave),hr.onMouseDown=Te.onPopupMouseDown,hr.onTouchStart=Te.onPopupMouseDown,v.createElement(Gi,Object(p.a)({prefixCls:Ge,destroyPopupOnHide:Ue,visible:Dr,point:en&&Qr,className:Ye,align:ln,onAlign:ot,animation:Ct,getClassNameFromAlign:Te.getPopupClassNameFromAlign},hr,{stretch:un,getRootDomNode:Te.getRootDomNode,style:Er,mask:Hr,zIndex:Yr,transitionName:Nt,maskAnimation:Ur,maskTransitionName:Gr,maskMotion:Pr,ref:Te.popupRef,motion:Et,mobile:Tn,forceRender:nn}),typeof $r=="function"?$r():$r)},Te.attachParent=function(He){et.a.cancel(Te.attachId);var Ge=Te.props,Ue=Ge.getPopupContainer,Ye=Ge.getDocument,ot=Te.getRootDomNode(),Et;Ue?(ot||Ue.length===0)&&(Et=Ue(ot)):Et=Ye(Te.getRootDomNode()).body,Et?Et.appendChild(He):Te.attachId=Object(et.a)(function(){Te.attachParent(He)})},Te.getContainer=function(){var He=Te.props.getDocument,Ge=He(Te.getRootDomNode()).createElement("div");return Ge.style.position="absolute",Ge.style.top="0",Ge.style.left="0",Ge.style.width="100%",Te.attachParent(Ge),Ge},Te.setPoint=function(He){var Ge=Te.props.alignPoint;if(!Ge||!He)return;Te.setState({point:{pageX:He.pageX,pageY:He.pageY}})},Te.handlePortalUpdate=function(){Te.state.prevPopupVisible!==Te.state.popupVisible&&Te.props.afterPopupVisibleChange(Te.state.popupVisible)},Te.triggerContextValue={onPopupMouseDown:Te.onPopupMouseDown};var Me;return"popupVisible"in De?Me=!!De.popupVisible:Me=!!De.defaultPopupVisible,Te.state={prevPopupVisible:Me,popupVisible:Me},sa.forEach(function(He){Te["fire".concat(He)]=function(Ge){Te.fireEvents(He,Ge)}}),Te}return Object(O.a)(be,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this.props,Me=this.state;if(Me.popupVisible){var He;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(He=Te.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(He,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(He=He||Te.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(He,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(He=He||Te.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(He,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),et.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Te;return((Te=this.popupRef.current)===null||Te===void 0?void 0:Te.getElement())||null}},{key:"getPopupAlign",value:function(){var Te=this.props,Me=Te.popupPlacement,He=Te.popupAlign,Ge=Te.builtinPlacements;return Me&&Ge?_e(Ge,Me,He):He}},{key:"setPopupVisible",value:function(Te,Me){var He=this.props.alignPoint,Ge=this.state.popupVisible;this.clearDelayTimer(),Ge!==Te&&("popupVisible"in this.props||this.setState({popupVisible:Te,prevPopupVisible:Ge}),this.props.onPopupVisibleChange(Te)),He&&Me&&Te&&this.setPoint(Me)}},{key:"delaySetPopupVisible",value:function(Te,Me,He){var Ge=this,Ue=Me*1e3;if(this.clearDelayTimer(),Ue){var Ye=He?{pageX:He.pageX,pageY:He.pageY}:null;this.delayTimer=window.setTimeout(function(){Ge.setPopupVisible(Te,Ye),Ge.clearDelayTimer()},Ue)}else this.setPopupVisible(Te,He)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(Te){var Me=this.props.children.props,He=this.props;return Me[Te]&&He[Te]?this["fire".concat(Te)]:Me[Te]||He[Te]}},{key:"isClickToShow",value:function(){var Te=this.props,Me=Te.action,He=Te.showAction;return Me.indexOf("click")!==-1||He.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Te=this.props.action;return Te==="contextMenu"||Te.length===1&&Te[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Te=this.props,Me=Te.action,He=Te.showAction;return Me.indexOf("contextMenu")!==-1||He.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Te=this.props,Me=Te.action,He=Te.hideAction;return Me.indexOf("click")!==-1||He.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Te=this.props,Me=Te.action,He=Te.showAction;return Me.indexOf("hover")!==-1||He.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Te=this.props,Me=Te.action,He=Te.hideAction;return Me.indexOf("hover")!==-1||He.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Te=this.props,Me=Te.action,He=Te.showAction;return Me.indexOf("focus")!==-1||He.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Te=this.props,Me=Te.action,He=Te.hideAction;return Me.indexOf("focus")!==-1||He.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Te;(Te=this.popupRef.current)===null||Te===void 0||Te.forceAlign()}}},{key:"fireEvents",value:function(Te,Me){var He=this.props.children.props[Te];He&&He(Me);var Ge=this.props[Te];Ge&&Ge(Me)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Te=this.state.popupVisible,Me=this.props,He=Me.children,Ge=Me.forceRender,Ue=Me.alignPoint,Ye=Me.className,ot=Me.autoDestroy,Et=v.Children.only(He),Ct={key:"trigger"};this.isContextMenuToShow()?Ct.onContextMenu=this.onContextMenu:Ct.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Ct.onClick=this.onClick,Ct.onMouseDown=this.onMouseDown,Ct.onTouchStart=this.onTouchStart):(Ct.onClick=this.createTwoChains("onClick"),Ct.onMouseDown=this.createTwoChains("onMouseDown"),Ct.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Ct.onMouseEnter=this.onMouseEnter,Ue&&(Ct.onMouseMove=this.onMouseMove)):Ct.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Ct.onMouseLeave=this.onMouseLeave:Ct.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Ct.onFocus=this.onFocus,Ct.onBlur=this.onBlur):(Ct.onFocus=this.createTwoChains("onFocus"),Ct.onBlur=this.createTwoChains("onBlur"));var Nt=w()(Et&&Et.props&&Et.props.className,Ye);Nt&&(Ct.className=Nt);var Er=Object(N.a)({},Ct);Object(Be.c)(Et)&&(Er.ref=Object(Be.a)(this.triggerRef,Et.ref));var Hr=v.cloneElement(Et,Er),Ur;return(Te||this.popupRef.current||Ge)&&(Ur=v.createElement(ke,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Te&&ot&&(Ur=null),v.createElement(Ni.Provider,{value:this.triggerContextValue},Hr,Ur)}}],[{key:"getDerivedStateFromProps",value:function(Te,Me){var He=Te.popupVisible,Ge={};return He!==void 0&&Me.popupVisible!==He&&(Ge.popupVisible=He,Ge.prevPopupVisible=Me.popupVisible),Ge}}]),be}(v.Component);return We.contextType=Ni,We.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:oa,getDocument:pa,onPopupVisibleChange:ci,afterPopupVisibleChange:ci,onPopupAlign:ci,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},We}var qi=ma(rt.a),Si={adjustX:1,adjustY:1},ea={topLeft:{points:["bl","tl"],overflow:Si,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Si,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Si,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Si,offset:[4,0]}},Ea={topLeft:{points:["bl","tl"],overflow:Si,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Si,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Si,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Si,offset:[4,0]}},mt=ea,qe=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_t=function(We,Ve,Ne){var be=ne(Ve),De=We.getState();We.setState({defaultActiveFirst:Object(N.a)(Object(N.a)({},De.defaultActiveFirst),{},Object(P.a)({},be,Ne))})},Ut=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(Ne){var be;Object(R.a)(this,Ve),be=We.call(this,Ne),be.onDestroy=function(Ue){be.props.onDestroy(Ue)},be.onKeyDown=function(Ue){var Ye=Ue.keyCode,ot=be.menuInstance,Et=be.props.store,Ct=be.getVisible();if(Ye===h.a.ENTER)return be.onTitleClick(Ue),_t(Et,be.props.eventKey,!0),!0;if(Ye===h.a.RIGHT)return Ct?ot.onKeyDown(Ue):(be.triggerOpenChange(!0),_t(Et,be.props.eventKey,!0)),!0;if(Ye===h.a.LEFT){var Nt;if(Ct)Nt=ot.onKeyDown(Ue);else return;return Nt||(be.triggerOpenChange(!1),Nt=!0),Nt}return Ct&&(Ye===h.a.UP||Ye===h.a.DOWN)?ot.onKeyDown(Ue):void 0},be.onOpenChange=function(Ue){be.props.onOpenChange(Ue)},be.onPopupVisibleChange=function(Ue){be.triggerOpenChange(Ue,Ue?"mouseenter":"mouseleave")},be.onMouseEnter=function(Ue){var Ye=be.props,ot=Ye.eventKey,Et=Ye.onMouseEnter,Ct=Ye.store;_t(Ct,be.props.eventKey,!1),Et({key:ot,domEvent:Ue})},be.onMouseLeave=function(Ue){var Ye=be.props,ot=Ye.parentMenu,Et=Ye.eventKey,Ct=Ye.onMouseLeave;ot.subMenuInstance=Object(_.a)(be),Ct({key:Et,domEvent:Ue})},be.onTitleMouseEnter=function(Ue){var Ye=be.props,ot=Ye.eventKey,Et=Ye.onItemHover,Ct=Ye.onTitleMouseEnter;Et({key:ot,hover:!0}),Ct({key:ot,domEvent:Ue})},be.onTitleMouseLeave=function(Ue){var Ye=be.props,ot=Ye.parentMenu,Et=Ye.eventKey,Ct=Ye.onItemHover,Nt=Ye.onTitleMouseLeave;ot.subMenuInstance=Object(_.a)(be),Ct({key:Et,hover:!1}),Nt({key:Et,domEvent:Ue})},be.onTitleClick=function(Ue){var Ye=Object(_.a)(be),ot=Ye.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:Ue}),ot.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!be.getVisible(),"click"),_t(ot.store,be.props.eventKey,!1)},be.onSubMenuClick=function(Ue){typeof be.props.onClick=="function"&&be.props.onClick(be.addKeyPath(Ue))},be.onSelect=function(Ue){be.props.onSelect(Ue)},be.onDeselect=function(Ue){be.props.onDeselect(Ue)},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(Ue){be.menuInstance=Ue},be.addKeyPath=function(Ue){return Object(N.a)(Object(N.a)({},Ue),{},{keyPath:(Ue.keyPath||[]).concat(be.props.eventKey)})},be.triggerOpenChange=function(Ue,Ye){var ot=be.props.eventKey,Et=function(){be.onOpenChange({key:ot,item:Object(_.a)(be),trigger:Ye,open:Ue})};Ye==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){Et()},0):Et()},be.isChildrenSelected=function(){var Ue={find:!1};return $(be.props.children,be.props.selectedKeys,Ue),Ue.find},be.isInlineMode=function(){return be.getMode()==="inline"},be.adjustWidth=function(){if(!be.subMenuTitle||!be.menuInstance)return;var Ue=Xe.findDOMNode(be.menuInstance);if(Ue.offsetWidth>=be.subMenuTitle.offsetWidth)return;Ue.style.minWidth="".concat(be.subMenuTitle.offsetWidth,"px")},be.saveSubMenuTitle=function(Ue){be.subMenuTitle=Ue},be.getBaseProps=function(){var Ue=Object(_.a)(be),Ye=Ue.props,ot=be.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:be.getVisible(),level:Ye.level+1,inlineIndent:Ye.inlineIndent,focusable:!1,onClick:be.onSubMenuClick,onSelect:be.onSelect,onDeselect:be.onDeselect,onDestroy:be.onDestroy,selectedKeys:Ye.selectedKeys,eventKey:"".concat(Ye.eventKey,"-menu-"),openKeys:Ye.openKeys,motion:Ye.motion,onOpenChange:be.onOpenChange,subMenuOpenDelay:Ye.subMenuOpenDelay,parentMenu:Object(_.a)(be),subMenuCloseDelay:Ye.subMenuCloseDelay,forceSubMenuRender:Ye.forceSubMenuRender,triggerSubMenuAction:Ye.triggerSubMenuAction,builtinPlacements:Ye.builtinPlacements,defaultActiveFirst:Ye.store.getState().defaultActiveFirst[ne(Ye.eventKey)],multiple:Ye.multiple,prefixCls:Ye.rootPrefixCls,id:be.internalMenuId,manualRef:be.saveMenuInstance,itemIcon:Ye.itemIcon,expandIcon:Ye.expandIcon,direction:Ye.direction}},be.getMotion=function(Ue,Ye){var ot=Object(_.a)(be),Et=ot.haveRendered,Ct=be.props,Nt=Ct.motion,Er=Ct.rootPrefixCls,Hr=Object(N.a)(Object(N.a)({},Nt),{},{leavedClassName:"".concat(Er,"-hidden"),removeOnLeave:!1,motionAppear:Et||!Ye||Ue!=="inline"});return Hr};var De=Ne.store,Te=Ne.eventKey,Me=De.getState(),He=Me.defaultActiveFirst;be.isRootMenu=!1;var Ge=!1;return He&&(Ge=He[Te]),_t(De,Te,Ge),be.state={mode:Ne.mode,isOpen:Ne.isOpen},be}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,De=this.props,Te=De.mode,Me=De.parentMenu,He=De.manualRef,Ge=De.isOpen,Ue=function(){be.setState({mode:Te,isOpen:Ge})},Ye=Ge!==this.state.isOpen,ot=Te!==this.state.mode;if((ot||Ye)&&(et.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(et.a)(Ue):Ue()),He&&He(this),Te!=="horizontal"||!(Me==null?void 0:Me.isRootMenu)||!Ge)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,De=be.onDestroy,Te=be.eventKey;De&&De(Te),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),et.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(be,De){var Te=this.getBaseProps();return v.createElement(vr,Object(p.a)({},Te,{id:this.internalMenuId,className:be,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var be=this,De=this.getBaseProps(),Te=De.mode,Me=De.visible,He=De.forceSubMenuRender,Ge=De.direction,Ue=this.getMotion(Te,Me);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Me||He,!this.haveOpened)return v.createElement("div",null);var Ye=w()("".concat(De.prefixCls,"-sub"),Object(P.a)({},"".concat(De.prefixCls,"-rtl"),Ge==="rtl"));return this.isInlineMode()?v.createElement(Zn,Object(p.a)({visible:De.visible,forceRender:He},Ue),function(ot){var Et=ot.className,Ct=ot.style,Nt=w()(Ye,Et);return be.renderPopupMenu(Nt,Ct)}):this.renderPopupMenu(Ye)}},{key:"render",value:function(){var be,De,Te,Me=Object(N.a)({},this.props),He=this.getVisible(),Ge=this.getPrefixCls(),Ue=this.isInlineMode(),Ye=this.getMode(),ot=w()(Ge,"".concat(Ge,"-").concat(Ye),(be={},Object(P.a)(be,Me.className,!!Me.className),Object(P.a)(be,this.getOpenClassName(),He),Object(P.a)(be,this.getActiveClassName(),Me.active||He&&!Ue),Object(P.a)(be,this.getDisabledClassName(),Me.disabled),Object(P.a)(be,this.getSelectedClassName(),this.isChildrenSelected()),be));this.internalMenuId||(Me.eventKey?this.internalMenuId="".concat(Me.eventKey,"$Menu"):(qe+=1,this.internalMenuId="$__$".concat(qe,"$Menu")));var Et={},Ct={},Nt={};Me.disabled||(Et={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ct={onClick:this.onTitleClick},Nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Er={},Hr=Me.direction,Ur=Hr==="rtl";Ue&&(Ur?Er.paddingRight=Me.inlineIndent*Me.level:Er.paddingLeft=Me.inlineIndent*Me.level);var Gr={};this.getVisible()&&(Gr={"aria-owns":this.internalMenuId});var Pr=null;Ye!=="horizontal"&&(Pr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Pr=v.createElement(this.props.expandIcon,Object(N.a)({},this.props))));var Yr=v.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Er,className:"".concat(Ge,"-title"),role:"button"},Nt,Ct,{"aria-expanded":He},Gr,{"aria-haspopup":"true",title:typeof Me.title=="string"?Me.title:void 0}),Me.title,Pr||v.createElement("i",{className:"".concat(Ge,"-arrow")})),$r=this.renderChildren(),un=((De=Me.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?Me.parentMenu.props.getPopupContainer:function(bn){return bn.parentNode},en=pt[Ye],Tn=Me.popupOffset?{offset:Me.popupOffset}:{},nn=w()((Te={},Object(P.a)(Te,Me.popupClassName,Me.popupClassName&&!Ue),Object(P.a)(Te,"".concat(Ge,"-rtl"),Ur),Te)),Sr=Me.disabled,Dr=Me.triggerSubMenuAction,Qr=Me.subMenuOpenDelay,ln=Me.forceSubMenuRender,hr=Me.subMenuCloseDelay,fn=Me.builtinPlacements;J.forEach(function(bn){return delete Me[bn]}),delete Me.onClick;var Pn=Ur?Object(N.a)(Object(N.a)({},Ea),fn):Object(N.a)(Object(N.a)({},ea),fn);delete Me.direction;var vn=this.getBaseProps(),On=Ue?null:this.getMotion(vn.mode,vn.visible);return v.createElement("li",Object(p.a)({},Me,Et,{className:ot,role:"menuitem"}),v.createElement(qi,{prefixCls:Ge,popupClassName:w()("".concat(Ge,"-popup"),nn),getPopupContainer:un,builtinPlacements:Pn,popupPlacement:en,popupVisible:Ue?!1:He,popupAlign:Tn,popup:Ue?null:$r,action:Sr||Ue?[]:[Dr],mouseEnterDelay:Qr,mouseLeaveDelay:hr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:ln,popupMotion:On},Yr),Ue?$r:null)}}]),Ve}(v.Component);Ut.defaultProps={onMouseEnter:Q,onMouseLeave:Q,onTitleMouseEnter:Q,onTitleMouseLeave:Q,onTitleClick:Q,manualRef:Q,mode:"vertical",title:""};var Dt=Object(C.b)(function(ke,We){var Ve=ke.openKeys,Ne=ke.activeKey,be=ke.selectedKeys,De=We.eventKey,Te=We.subMenuKey;return{isOpen:Ve.indexOf(De)>-1,active:Ne[Te]===De,selectedKeys:be}})(Ut);Dt.isSubMenu=!0;var Vt=Dt,Pt="menuitem-overflowed",ut=.5,vt=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(){var Ne;return Object(R.a)(this,Ve),Ne=We.apply(this,arguments),Ne.resizeObserver=null,Ne.mutationObserver=null,Ne.originalTotalWidth=0,Ne.overflowedItems=[],Ne.menuItemSizes=[],Ne.cancelFrameId=null,Ne.state={lastVisibleIndex:void 0},Ne.childRef=v.createRef(),Ne.getMenuItemNodes=function(){var be=Ne.props.prefixCls,De=Ne.childRef.current;return De?[].slice.call(De.children).filter(function(Te){return Te.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},Ne.getOverflowedSubMenuItem=function(be,De,Te){var Me=Ne.props,He=Me.overflowedIndicator,Ge=Me.level,Ue=Me.mode,Ye=Me.prefixCls,ot=Me.theme;if(Ge!==1||Ue!=="horizontal")return null;var Et=Ne.props.children[0],Ct=Et.props,Nt=Ct.children,Er=Ct.title,Hr=Ct.style,Ur=Object(T.a)(Ct,["children","title","style"]),Gr=Object(N.a)({},Hr),Pr="".concat(be,"-overflowed-indicator"),Yr="".concat(be,"-overflowed-indicator");De.length===0&&Te!==!0?Gr=Object(N.a)(Object(N.a)({},Gr),{},{display:"none"}):Te&&(Gr=Object(N.a)(Object(N.a)({},Gr),{},{visibility:"hidden",position:"absolute"}),Pr="".concat(Pr,"-placeholder"),Yr="".concat(Yr,"-placeholder"));var $r=ot?"".concat(Ye,"-").concat(ot):"",un={};return J.forEach(function(en){Ur[en]!==void 0&&(un[en]=Ur[en])}),v.createElement(Vt,Object(p.a)({title:He,className:"".concat(Ye,"-overflowed-submenu"),popupClassName:$r},un,{key:Pr,eventKey:Yr,disabled:!1,style:Gr}),De)},Ne.setChildrenWidthAndResize=function(){if(Ne.props.mode!=="horizontal")return;var be=Ne.childRef.current;if(!be)return;var De=be.children;if(!De||De.length===0)return;var Te=be.children[De.length-1];ue(Te,"display","inline-block");var Me=Ne.getMenuItemNodes(),He=Me.filter(function(Ge){return Ge.className.split(" ").indexOf(Pt)>=0});He.forEach(function(Ge){ue(Ge,"display","inline-block")}),Ne.menuItemSizes=Me.map(function(Ge){return le(Ge,!0)}),He.forEach(function(Ge){ue(Ge,"display","none")}),Ne.overflowedIndicatorWidth=le(be.children[be.children.length-1],!0),Ne.originalTotalWidth=Ne.menuItemSizes.reduce(function(Ge,Ue){return Ge+Ue},0),Ne.handleResize(),ue(Te,"display","none")},Ne.handleResize=function(){if(Ne.props.mode!=="horizontal")return;var be=Ne.childRef.current;if(!be)return;var De=le(be);Ne.overflowedItems=[];var Te=0,Me;Ne.originalTotalWidth>De+ut&&(Me=-1,Ne.menuItemSizes.forEach(function(He){Te+=He,Te+Ne.overflowedIndicatorWidth<=De&&(Me+=1)})),Ne.setState({lastVisibleIndex:Me})},Ne}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){var be=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new Fe.default(function(Te){Te.forEach(function(){var Me=be.cancelFrameId;cancelAnimationFrame(Me),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(Te){be.resizeObserver.observe(Te)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(Te){be.resizeObserver.observe(Te)}),be.setChildrenWidthAndResize()}),this.mutationObserver.observe(De,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(be){var De=this,Te=this.state.lastVisibleIndex;return(be||[]).reduce(function(Me,He,Ge){var Ue=He;if(De.props.mode==="horizontal"){var Ye=De.getOverflowedSubMenuItem(He.props.eventKey,[]);Te!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&(Ge>Te&&(Ue=v.cloneElement(He,{style:{display:"none"},eventKey:"".concat(He.props.eventKey,"-hidden"),className:"".concat(Pt)})),Ge===Te+1&&(De.overflowedItems=be.slice(Te+1).map(function(Et){return v.cloneElement(Et,{key:Et.props.eventKey,mode:"vertical-left"})}),Ye=De.getOverflowedSubMenuItem(He.props.eventKey,De.overflowedItems)));var ot=[].concat(Object(d.a)(Me),[Ye,Ue]);return Ge===be.length-1&&ot.push(De.getOverflowedSubMenuItem(He.props.eventKey,[],!0)),ot}return[].concat(Object(d.a)(Me),[Ue])},[])}},{key:"render",value:function(){var be=this.props,De=be.visible,Te=be.prefixCls,Me=be.overflowedIndicator,He=be.mode,Ge=be.level,Ue=be.tag,Ye=be.children,ot=be.theme,Et=Object(T.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ct=Ue;return v.createElement(Ct,Object(p.a)({ref:this.childRef},Et),this.renderChildren(Ye))}}]),Ve}(v.Component);vt.defaultProps={tag:"div",className:""};var yt=vt;function tr(ke){return ke.length?ke.every(function(We){return!!We.props.disabled}):!0}function Jt(ke,We,Ve){var Ne=ke.getState();ke.setState({activeKey:Object(N.a)(Object(N.a)({},Ne.activeKey),{},Object(P.a)({},We,Ve))})}function Wt(ke){return ke.eventKey||"0-menu-"}function Ft(ke,We){var Ve=We,Ne=ke.children,be=ke.eventKey;if(Ve){var De;if(re(Ne,function(Te,Me){Te&&Te.props&&!Te.props.disabled&&Ve===Z(Te,be,Me)&&(De=!0)}),De)return Ve}return Ve=null,ke.defaultActiveFirst&&re(Ne,function(Te,Me){!Ve&&Te&&!Te.props.disabled&&(Ve=Z(Te,be,Me))}),Ve}function Xt(ke){if(!ke)return;var We=this.instanceArray.indexOf(ke);We!==-1?this.instanceArray[We]=ke:this.instanceArray.push(ke)}var qt=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(Ne){var be;return Object(R.a)(this,Ve),be=We.call(this,Ne),be.onKeyDown=function(De,Te){var Me=De.keyCode,He;if(be.getFlatInstanceArray().forEach(function(Ue){Ue&&Ue.props.active&&Ue.onKeyDown&&(He=Ue.onKeyDown(De))}),He)return 1;var Ge=null;return(Me===h.a.UP||Me===h.a.DOWN)&&(Ge=be.step(Me===h.a.UP?-1:1)),Ge?(De.preventDefault(),Jt(be.props.store,Wt(be.props),Ge.props.eventKey),typeof Te=="function"&&Te(Ge),1):void 0},be.onItemHover=function(De){var Te=De.key,Me=De.hover;Jt(be.props.store,Wt(be.props),Me?Te:null)},be.onDeselect=function(De){be.props.onDeselect(De)},be.onSelect=function(De){be.props.onSelect(De)},be.onClick=function(De){be.props.onClick(De)},be.onOpenChange=function(De){be.props.onOpenChange(De)},be.onDestroy=function(De){be.props.onDestroy(De)},be.getFlatInstanceArray=function(){return be.instanceArray},be.step=function(De){var Te=be.getFlatInstanceArray(),Me=be.props.store.getState().activeKey[Wt(be.props)],He=Te.length;if(!He)return null;De<0&&(Te=Te.concat().reverse());var Ge=-1;if(Te.every(function(Et,Ct){return Et&&Et.props.eventKey===Me?(Ge=Ct,!1):!0}),!be.props.defaultActiveFirst&&Ge!==-1&&tr(Te.slice(Ge,He-1)))return;var Ue=(Ge+1)%He,Ye=Ue;do{var ot=Te[Ye];if(!ot||ot.props.disabled)Ye=(Ye+1)%He;else return ot}while(Ye!==Ue);return null},be.renderCommonMenuItem=function(De,Te,Me){var He=be.props.store.getState(),Ge=Object(_.a)(be),Ue=Ge.props,Ye=Z(De,Ue.eventKey,Te),ot=De.props;if(!ot||typeof De.type=="string")return De;var Et=Ye===He.activeKey,Ct=Object(N.a)(Object(N.a)({mode:ot.mode||Ue.mode,level:Ue.level,inlineIndent:Ue.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:Ue.prefixCls,index:Te,parentMenu:Ue.parentMenu,manualRef:ot.disabled?void 0:Object(F.a)(De.ref,Xt.bind(Object(_.a)(be))),eventKey:Ye,active:!ot.disabled&&Et,multiple:Ue.multiple,onClick:function(Er){(ot.onClick||Q)(Er),be.onClick(Er)},onItemHover:be.onItemHover,motion:Ue.motion,subMenuOpenDelay:Ue.subMenuOpenDelay,subMenuCloseDelay:Ue.subMenuCloseDelay,forceSubMenuRender:Ue.forceSubMenuRender,onOpenChange:be.onOpenChange,onDeselect:be.onDeselect,onSelect:be.onSelect,builtinPlacements:Ue.builtinPlacements,itemIcon:ot.itemIcon||be.props.itemIcon,expandIcon:ot.expandIcon||be.props.expandIcon},Me),{},{direction:Ue.direction});return(Ue.mode==="inline"||we())&&(Ct.triggerSubMenuAction="click"),v.cloneElement(De,Object(N.a)(Object(N.a)({},Ct),{},{key:Ye||Te}))},be.renderMenuItem=function(De,Te,Me){if(!De)return null;var He=be.props.store.getState(),Ge={openKeys:He.openKeys,selectedKeys:He.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:Me};return be.renderCommonMenuItem(De,Te,Ge)},Ne.store.setState({activeKey:Object(N.a)(Object(N.a)({},Ne.store.getState().activeKey),{},Object(P.a)({},Ne.eventKey,Ft(Ne,Ne.activeKey)))}),be.instanceArray=[],be}return Object(O.a)(Ve,[{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||!Y()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var De=this.props,Te="activeKey"in De?De.activeKey:De.store.getState().activeKey[Wt(De)],Me=Ft(De,Te);if(Me!==Te)Jt(De.store,Wt(De),Me);else if("activeKey"in be){var He=Ft(be,be.activeKey);Me!==He&&Jt(De.store,Wt(De),Me)}}},{key:"render",value:function(){var be=this,De=Object(p.a)({},this.props);this.instanceArray=[];var Te=w()(De.prefixCls,De.className,"".concat(De.prefixCls,"-").concat(De.mode)),Me={className:Te,role:De.role||"menu"};De.id&&(Me.id=De.id),De.focusable&&(Me.tabIndex=0,Me.onKeyDown=this.onKeyDown);var He=De.prefixCls,Ge=De.eventKey,Ue=De.visible,Ye=De.level,ot=De.mode,Et=De.overflowedIndicator,Ct=De.theme;return J.forEach(function(Nt){return delete De[Nt]}),delete De.onClick,v.createElement(yt,Object(p.a)({},De,{prefixCls:He,mode:ot,tag:"ul",level:Ye,theme:Ct,visible:Ue,overflowedIndicator:Et},Me),Object(b.a)(De.children).map(function(Nt,Er){return be.renderMenuItem(Nt,Er,Ge||"0-menu-")}))}}]),Ve}(v.Component);qt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Q};var Ze=Object(C.b)()(qt),vr=Ze,Ar=L("Kwbf");function cr(ke,We,Ve){var Ne=ke.prefixCls,be=ke.motion,De=ke.defaultMotions,Te=De===void 0?{}:De,Me=ke.openAnimation,He=ke.openTransitionName,Ge=We.switchingModeFromInline;if(be)return be;if(Object(K.a)(Me)==="object"&&Me)Object(Ar.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Me=="string")return{motionName:"".concat(Ne,"-open-").concat(Me)};if(He)return{motionName:He};var Ue=Te[Ve];return Ue||(Ge?null:Te.other)}var ht=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(Ne){var be;Object(R.a)(this,Ve),be=We.call(this,Ne),be.onSelect=function(Me){var He=Object(_.a)(be),Ge=He.props;if(Ge.selectable){var Ue=be.store.getState(),Ye=Ue.selectedKeys,ot=Me.key;Ge.multiple?Ye=Ye.concat([ot]):Ye=[ot],"selectedKeys"in Ge||be.store.setState({selectedKeys:Ye}),Ge.onSelect(Object(N.a)(Object(N.a)({},Me),{},{selectedKeys:Ye}))}},be.onClick=function(Me){var He=be.getRealMenuMode(),Ge=Object(_.a)(be),Ue=Ge.store,Ye=Ge.props.onOpenChange;He!=="inline"&&!("openKeys"in be.props)&&(Ue.setState({openKeys:[]}),Ye([])),be.props.onClick(Me)},be.onKeyDown=function(Me,He){be.innerMenu.getWrappedInstance().onKeyDown(Me,He)},be.onOpenChange=function(Me){var He=Object(_.a)(be),Ge=He.props,Ue=be.store.getState().openKeys.concat(),Ye=!1,ot=function(Ct){var Nt=!1;if(Ct.open)Nt=Ue.indexOf(Ct.key)===-1,Nt&&Ue.push(Ct.key);else{var Er=Ue.indexOf(Ct.key);Nt=Er!==-1,Nt&&Ue.splice(Er,1)}Ye=Ye||Nt};Array.isArray(Me)?Me.forEach(ot):ot(Me),Ye&&("openKeys"in be.props||be.store.setState({openKeys:Ue}),Ge.onOpenChange(Ue))},be.onDeselect=function(Me){var He=Object(_.a)(be),Ge=He.props;if(Ge.selectable){var Ue=be.store.getState().selectedKeys.concat(),Ye=Me.key,ot=Ue.indexOf(Ye);ot!==-1&&Ue.splice(ot,1),"selectedKeys"in Ge||be.store.setState({selectedKeys:Ue}),Ge.onDeselect(Object(N.a)(Object(N.a)({},Me),{},{selectedKeys:Ue}))}},be.onMouseEnter=function(Me){be.restoreModeVerticalFromInline();var He=be.props.onMouseEnter;He&&He(Me)},be.onTransitionEnd=function(Me){var He=Me.propertyName==="width"&&Me.target===Me.currentTarget,Ge=Me.target.className,Ue=Object.prototype.toString.call(Ge)==="[object SVGAnimatedString]"?Ge.animVal:Ge,Ye=Me.propertyName==="font-size"&&Ue.indexOf("anticon")>=0;(He||Ye)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(Me){be.innerMenu=Me},be.isRootMenu=!0;var De=Ne.defaultSelectedKeys,Te=Ne.defaultOpenKeys;return"selectedKeys"in Ne&&(De=Ne.selectedKeys||[]),"openKeys"in Ne&&(Te=Ne.openKeys||[]),be.store=Object(C.c)({selectedKeys:De,openKeys:Te,activeKey:{"0-menu-":Ft(Ne,Ne.activeKey)}}),be.state={switchingModeFromInline:!1,prevProps:Ne,inlineOpenKeys:[],store:be.store},be}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){var De=this.props,Te=De.siderCollapsed,Me=De.inlineCollapsed,He=De.onOpenChange;(!be.inlineCollapsed&&Me||!be.siderCollapsed&&Te)&&He([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,De=this.store,Te=this.prevOpenKeys,Me=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");Me?(this.prevOpenKeys=De.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Te&&(this.store.setState({openKeys:Te}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var be=this.props.mode,De=this.state.switchingModeFromInline,Te=this.getInlineCollapsed();return De&&Te?"inline":Te?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,De=be.inlineCollapsed,Te=be.siderCollapsed;return Te!==void 0?Te:De}},{key:"restoreModeVerticalFromInline",value:function(){var be=this.state.switchingModeFromInline;be&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var be=Object(N.a)({},Object(j.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return be.className+=" ".concat(be.prefixCls,"-root"),be.direction==="rtl"&&(be.className+=" ".concat(be.prefixCls,"-rtl")),be=Object(N.a)(Object(N.a)({},be),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:cr(this.props,this.state,De)}),delete be.openAnimation,delete be.openTransitionName,v.createElement(C.a,{store:this.store},v.createElement(vr,Object(p.a)({},be,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(be,De){var Te=De.prevProps,Me=De.store,He=Me.getState(),Ge={},Ue={prevProps:be};return Te.mode==="inline"&&be.mode!=="inline"&&(Ue.switchingModeFromInline=!0),"openKeys"in be?Ge.openKeys=be.openKeys||[]:((be.inlineCollapsed&&!Te.inlineCollapsed||be.siderCollapsed&&!Te.siderCollapsed)&&(Ue.switchingModeFromInline=!0,Ue.inlineOpenKeys=He.openKeys,Ge.openKeys=[]),(!be.inlineCollapsed&&Te.inlineCollapsed||!be.siderCollapsed&&Te.siderCollapsed)&&(Ge.openKeys=De.inlineOpenKeys,Ue.inlineOpenKeys=[])),Object.keys(Ge).length&&Me.setState(Ge),Ue}}]),Ve}(v.Component);ht.defaultProps={selectable:!0,onClick:Q,onSelect:Q,onOpenChange:Q,onDeselect:Q,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:v.createElement("span",null,"\xB7\xB7\xB7")};var bt=ht,ft=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(){var Ne;return Object(R.a)(this,Ve),Ne=We.apply(this,arguments),Ne.onKeyDown=function(be){var De=be.keyCode;return De===h.a.ENTER?(Ne.onClick(be),!0):void 0},Ne.onMouseLeave=function(be){var De=Ne.props,Te=De.eventKey,Me=De.onItemHover,He=De.onMouseLeave;Me({key:Te,hover:!1}),He({key:Te,domEvent:be})},Ne.onMouseEnter=function(be){var De=Ne.props,Te=De.eventKey,Me=De.onItemHover,He=De.onMouseEnter;Me({key:Te,hover:!0}),He({key:Te,domEvent:be})},Ne.onClick=function(be){var De=Ne.props,Te=De.eventKey,Me=De.multiple,He=De.onClick,Ge=De.onSelect,Ue=De.onDeselect,Ye=De.isSelected,ot={key:Te,keyPath:[Te],item:Object(_.a)(Ne),domEvent:be};He(ot),Me?Ye?Ue(ot):Ge(ot):Ye||Ge(ot)},Ne.saveNode=function(be){Ne.node=be},Ne}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var be=this.props;be.onDestroy&&be.onDestroy(be.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var be,De=Object(N.a)({},this.props),Te=w()(this.getPrefixCls(),De.className,(be={},Object(P.a)(be,this.getActiveClassName(),!De.disabled&&De.active),Object(P.a)(be,this.getSelectedClassName(),De.isSelected),Object(P.a)(be,this.getDisabledClassName(),De.disabled),be)),Me=Object(N.a)(Object(N.a)({},De.attribute),{},{title:typeof De.title=="string"?De.title:void 0,className:Te,role:De.role||"menuitem","aria-disabled":De.disabled});De.role==="option"?Me=Object(N.a)(Object(N.a)({},Me),{},{role:"option","aria-selected":De.isSelected}):(De.role===null||De.role==="none")&&(Me.role="none");var He={onClick:De.disabled?null:this.onClick,onMouseLeave:De.disabled?null:this.onMouseLeave,onMouseEnter:De.disabled?null:this.onMouseEnter},Ge=Object(N.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?Ge.paddingRight=De.inlineIndent*De.level:Ge.paddingLeft=De.inlineIndent*De.level),J.forEach(function(Ye){return delete De[Ye]}),delete De.direction;var Ue=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ue=v.createElement(this.props.itemIcon,this.props)),v.createElement("li",Object(p.a)({},Object(j.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Me,He,{style:Ge,ref:this.saveNode}),De.children,Ue)}}]),Ve}(v.Component);ft.isMenuItem=!0,ft.defaultProps={onSelect:Q,onMouseEnter:Q,onMouseLeave:Q,manualRef:Q};var Tt=Object(C.b)(function(ke,We){var Ve=ke.activeKey,Ne=ke.selectedKeys,be=We.eventKey,De=We.subMenuKey;return{active:Ve[De]===be,isSelected:Array.isArray(Ne)?Ne.indexOf(be)!==-1:Ne===be}})(ft),zt=Tt,rr=function(ke){Object(x.a)(Ve,ke);var We=Object(S.a)(Ve);function Ve(){var Ne;return Object(R.a)(this,Ve),Ne=We.apply(this,arguments),Ne.renderInnerMenuItem=function(be){var De=Ne.props,Te=De.renderMenuItem,Me=De.index;return Te(be,Me,Ne.props.subMenuKey)},Ne}return Object(O.a)(Ve,[{key:"render",value:function(){var be=Object(p.a)({},this.props),De=be.className,Te=De===void 0?"":De,Me=be.rootPrefixCls,He="".concat(Me,"-item-group-title"),Ge="".concat(Me,"-item-group-list"),Ue=be.title,Ye=be.children;return J.forEach(function(ot){return delete be[ot]}),delete be.direction,v.createElement("li",Object(p.a)({},be,{onClick:function(Et){return Et.stopPropagation()},className:"".concat(Te," ").concat(Me,"-item-group")}),v.createElement("div",{className:He,title:typeof Ue=="string"?Ue:void 0},Ue),v.createElement("ul",{className:Ge},v.Children.map(Ye,this.renderInnerMenuItem)))}}]),Ve}(v.Component);rr.isMenuItemGroup=!0,rr.defaultProps={disabled:!0};var Gt=rr,yr=function(We){var Ve=We.className,Ne=We.rootPrefixCls,be=We.style;return v.createElement("li",{className:"".concat(Ve," ").concat(Ne,"-item-divider"),style:be})};yr.defaultProps={disabled:!0,className:"",style:{}};var kr=yr,or=bt,Qe=L("eDIo");function kt(ke,We){var Ve=ke.prefixCls,Ne=ke.editable,be=ke.locale,De=ke.style;return!Ne||Ne.showAdd===!1?null:v.createElement("button",{ref:We,type:"button",className:"".concat(Ve,"-nav-add"),style:De,"aria-label":(be==null?void 0:be.addAriaLabel)||"Add tab",onClick:function(Me){Ne.onEdit("add",{event:Me})}},Ne.addIcon||"+")}var Zr=v.forwardRef(kt);function Vr(ke,We){var Ve=ke.prefixCls,Ne=ke.id,be=ke.tabs,De=ke.locale,Te=ke.mobile,Me=ke.moreIcon,He=Me===void 0?"More":Me,Ge=ke.moreTransitionName,Ue=ke.style,Ye=ke.className,ot=ke.editable,Et=ke.tabBarGutter,Ct=ke.rtl,Nt=ke.onTabClick,Er=Object(v.useState)(!1),Hr=Object(g.a)(Er,2),Ur=Hr[0],Gr=Hr[1],Pr=Object(v.useState)(null),Yr=Object(g.a)(Pr,2),$r=Yr[0],un=Yr[1],en="".concat(Ne,"-more-popup"),Tn="".concat(Ve,"-dropdown"),nn=$r!==null?"".concat(en,"-").concat($r):null,Sr=De==null?void 0:De.dropdownAriaLabel,Dr=v.createElement(or,{onClick:function(On){var bn=On.key,Gn=On.domEvent;Nt(bn,Gn),Gr(!1)},id:en,tabIndex:-1,role:"listbox","aria-activedescendant":nn,selectedKeys:[$r],"aria-label":Sr!==void 0?Sr:"expanded dropdown"},be.map(function(vn){return v.createElement(zt,{key:vn.key,id:"".concat(en,"-").concat(vn.key),role:"option","aria-controls":Ne&&"".concat(Ne,"-panel-").concat(vn.key),disabled:vn.disabled},vn.tab)}));function Qr(vn){for(var On=be.filter(function(ni){return!ni.disabled}),bn=On.findIndex(function(ni){return ni.key===$r})||0,Gn=On.length,$n=0;$n<Gn;$n+=1){bn=(bn+vn+Gn)%Gn;var Mn=On[bn];if(!Mn.disabled){un(Mn.key);return}}}function ln(vn){var On=vn.which;if(!Ur){[h.a.DOWN,h.a.SPACE,h.a.ENTER].includes(On)&&(Gr(!0),vn.preventDefault());return}switch(On){case h.a.UP:Qr(-1),vn.preventDefault();break;case h.a.DOWN:Qr(1),vn.preventDefault();break;case h.a.ESC:Gr(!1);break;case h.a.SPACE:case h.a.ENTER:$r!==null&&Nt($r,vn);break}}Object(v.useEffect)(function(){var vn=document.getElementById(nn);vn&&vn.scrollIntoView&&vn.scrollIntoView(!1)},[$r]),Object(v.useEffect)(function(){Ur||un(null)},[Ur]);var hr=Object(P.a)({},Ct?"marginLeft":"marginRight",Et);be.length||(hr.visibility="hidden",hr.order=1);var fn=w()(Object(P.a)({},"".concat(Tn,"-rtl"),Ct)),Pn=Te?null:v.createElement(Qe.a,{prefixCls:Tn,overlay:Dr,trigger:["hover"],visible:Ur,transitionName:Ge,onVisibleChange:Gr,overlayClassName:fn,mouseEnterDelay:.1,mouseLeaveDelay:.1},v.createElement("button",{type:"button",className:"".concat(Ve,"-nav-more"),style:hr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":en,id:"".concat(Ne,"-more"),"aria-expanded":Ur,onKeyDown:ln},He));return v.createElement("div",{className:w()("".concat(Ve,"-nav-operations"),Ye),style:Ue,ref:We},Pn,v.createElement(Zr,{prefixCls:Ve,locale:De,editable:ot}))}var nr=v.forwardRef(Vr),br=Object(v.createContext)(null),Tr=.1,At=.01,Ht=20,ir=Math.pow(.995,Ht);function Kt(){var ke=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke.substr(0,4)))}function ct(ke,We){var Ve=Object(v.useState)(),Ne=Object(g.a)(Ve,2),be=Ne[0],De=Ne[1],Te=Object(v.useState)(0),Me=Object(g.a)(Te,2),He=Me[0],Ge=Me[1],Ue=Object(v.useState)(0),Ye=Object(g.a)(Ue,2),ot=Ye[0],Et=Ye[1],Ct=Object(v.useState)(),Nt=Object(g.a)(Ct,2),Er=Nt[0],Hr=Nt[1],Ur=Object(v.useRef)();function Gr(Sr){var Dr=Sr.touches[0],Qr=Dr.screenX,ln=Dr.screenY;De({x:Qr,y:ln}),window.clearInterval(Ur.current)}function Pr(Sr){if(!be)return;Sr.preventDefault();var Dr=Sr.touches[0],Qr=Dr.screenX,ln=Dr.screenY;De({x:Qr,y:ln});var hr=Qr-be.x,fn=ln-be.y;We(hr,fn);var Pn=Date.now();Ge(Pn),Et(Pn-He),Hr({x:hr,y:fn})}function Yr(){if(!be)return;if(De(null),Hr(null),Er){var Sr=Er.x/ot,Dr=Er.y/ot,Qr=Math.abs(Sr),ln=Math.abs(Dr);if(Math.max(Qr,ln)<Tr)return;var hr=Sr,fn=Dr;Ur.current=window.setInterval(function(){if(Math.abs(hr)<At&&Math.abs(fn)<At){window.clearInterval(Ur.current);return}hr*=ir,fn*=ir,We(hr*Ht,fn*Ht)},Ht)}}var $r=Object(v.useRef)(0),un=Object(v.useRef)(!1),en=Object(v.useRef)();function Tn(Sr){var Dr=Sr.deltaX,Qr=Sr.deltaY,ln=0,hr=Math.abs(Dr),fn=Math.abs(Qr);hr===fn?ln=en.current==="x"?Dr:Qr:hr>fn?(ln=Dr,en.current="x"):(ln=Qr,en.current="y");var Pn=Date.now();Pn-$r.current>100&&(un.current=!1),(We(-ln,-ln)||un.current)&&(Sr.preventDefault(),un.current=!0),$r.current=Pn}var nn=Object(v.useRef)(null);nn.current={onTouchStart:Gr,onTouchMove:Pr,onTouchEnd:Yr,onWheel:Tn},v.useEffect(function(){function Sr(hr){nn.current.onTouchStart(hr)}function Dr(hr){nn.current.onTouchMove(hr)}function Qr(hr){nn.current.onTouchEnd(hr)}function ln(hr){nn.current.onWheel(hr)}return document.addEventListener("touchmove",Dr,{passive:!1}),document.addEventListener("touchend",Qr,{passive:!1}),ke.current.addEventListener("touchstart",Sr,{passive:!1}),ke.current.addEventListener("wheel",ln),function(){document.removeEventListener("touchmove",Dr),document.removeEventListener("touchend",Qr)}},[])}function dt(){var ke=Object(v.useRef)(new Map);function We(Ne){return ke.current.has(Ne)||ke.current.set(Ne,v.createRef()),ke.current.get(Ne)}function Ve(Ne){ke.current.delete(Ne)}return[We,Ve]}function Mt(ke,We){var Ve=v.useRef(ke),Ne=v.useState({}),be=Object(g.a)(Ne,2),De=be[1];function Te(Me){var He=typeof Me=="function"?Me(Ve.current):Me;He!==Ve.current&&We(He,Ve.current),Ve.current=He,De({})}return[Ve.current,Te]}var xt=function(We){var Ve=We.position,Ne=We.prefixCls,be=We.extra;if(!be)return null;var De,Te=be;return Ve==="right"&&(De=Te.right||!Te.left&&Te||null),Ve==="left"&&(De=Te.left||null),De?v.createElement("div",{className:"".concat(Ne,"-extra-content")},De):null};function _r(ke,We){var Ve,Ne=v.useContext(br),be=Ne.prefixCls,De=Ne.tabs,Te=ke.className,Me=ke.style,He=ke.id,Ge=ke.animated,Ue=ke.activeKey,Ye=ke.rtl,ot=ke.extra,Et=ke.editable,Ct=ke.locale,Nt=ke.tabPosition,Er=ke.tabBarGutter,Hr=ke.children,Ur=ke.onTabClick,Gr=ke.onTabScroll,Pr=Object(v.useRef)(),Yr=Object(v.useRef)(),$r=Object(v.useRef)(),un=Object(v.useRef)(),en=dt(),Tn=Object(g.a)(en,2),nn=Tn[0],Sr=Tn[1],Dr=Nt==="top"||Nt==="bottom",Qr=Mt(0,function(Cn,mn){Dr&&Gr&&Gr({direction:Cn>mn?"left":"right"})}),ln=Object(g.a)(Qr,2),hr=ln[0],fn=ln[1],Pn=Mt(0,function(Cn,mn){!Dr&&Gr&&Gr({direction:Cn>mn?"top":"bottom"})}),vn=Object(g.a)(Pn,2),On=vn[0],bn=vn[1],Gn=Object(v.useState)(0),$n=Object(g.a)(Gn,2),Mn=$n[0],ni=$n[1],Fi=Object(v.useState)(0),pi=Object(g.a)(Fi,2),Jn=pi[0],An=pi[1],Rn=Object(v.useState)(0),Nn=Object(g.a)(Rn,2),kn=Nn[0],Vn=Nn[1],_i=Object(v.useState)(0),Xi=Object(g.a)(_i,2),En=Xi[0],Ai=Xi[1],Ri=Object(v.useState)(null),Sn=Object(g.a)(Ri,2),_n=Sn[0],Xn=Sn[1],Ba=Object(v.useState)(null),xa=Object(g.a)(Ba,2),ta=xa[0],ra=xa[1],La=Object(v.useState)(0),wa=Object(g.a)(La,2),ka=wa[0],Ha=wa[1],Xa=Object(v.useState)(0),Pa=Object(g.a)(Xa,2),na=Pa[0],Ta=Pa[1],ga=s(new Map),ia=Object(g.a)(ga,2),co=ia[0],va=ia[1],Sa=r(De,co,Mn),aa="".concat(be,"-nav-operations-hidden"),la=0,ji=0;Dr?Ye?(la=0,ji=Math.max(0,Mn-_n)):(la=Math.min(0,_n-Mn),ji=0):(la=Math.min(0,ta-Jn),ji=0);function Yi(Cn){return Cn<la?[la,!1]:Cn>ji?[ji,!1]:[Cn,!0]}var dr=Object(v.useRef)(),fr=Object(v.useState)(),Qt=Object(g.a)(fr,2),pn=Qt[0],er=Qt[1];function ua(){er(Date.now())}function Ya(){window.clearTimeout(dr.current)}ct(Pr,function(Cn,mn){var di=!1;function Di(Ma,ca){Ma(function(Ga){var ya=Yi(Ga+ca),hi=Object(g.a)(ya,2),Qa=hi[0],fo=hi[1];return di=fo,Qa})}if(Dr){if(_n>=Mn)return di;Di(fn,Cn)}else{if(ta>=Jn)return di;Di(bn,mn)}return Ya(),ua(),di}),Object(v.useEffect)(function(){return Ya(),pn&&(dr.current=window.setTimeout(function(){er(0)},100)),Ya},[pn]);function Dn(){var Cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ue,mn=Sa.get(Cn);if(!mn)return;if(Dr){var di=hr;Ye?mn.right<hr?di=mn.right:mn.right+mn.width>hr+_n&&(di=mn.right+mn.width-_n):mn.left<-hr?di=-mn.left:mn.left+mn.width>-hr+_n&&(di=-(mn.left+mn.width-_n)),bn(0),fn(Yi(di)[0])}else{var Di=On;mn.top<-On?Di=-mn.top:mn.top+mn.height>-On+ta&&(Di=-(mn.top+mn.height-ta)),fn(0),bn(Yi(Di)[0])}}var Ca=y(Sa,{width:_n,height:ta,left:hr,top:On},{width:kn,height:En},{width:ka,height:na},Object(N.a)(Object(N.a)({},ke),{},{tabs:De})),Io=Object(g.a)(Ca,2),Jo=Io[0],Qo=Io[1],Zo=De.map(function(Cn){var mn=Cn.key;return v.createElement(u,{id:He,prefixCls:be,key:mn,rtl:Ye,tab:Cn,closable:Cn.closable,editable:Et,active:mn===Ue,tabPosition:Nt,tabBarGutter:Er,renderWrapper:Hr,removeAriaLabel:Ct==null?void 0:Ct.removeAriaLabel,ref:nn(mn),onClick:function(Di){Ur(mn,Di)},onRemove:function(){Sr(mn)},onFocus:function(){Dn(mn),ua(),Ye||(Pr.current.scrollLeft=0),Pr.current.scrollTop=0}})}),ho=n(function(){var Cn,mn,di,Di,Ma,ca,Ga,ya,hi,Qa=((Cn=Pr.current)===null||Cn===void 0?void 0:Cn.offsetWidth)||0,fo=((mn=Pr.current)===null||mn===void 0?void 0:mn.offsetHeight)||0,po=((di=un.current)===null||di===void 0?void 0:di.offsetWidth)||0,Li=((Di=un.current)===null||Di===void 0?void 0:Di.offsetHeight)||0,wn=((Ma=$r.current)===null||Ma===void 0?void 0:Ma.offsetWidth)||0,Ji=((ca=$r.current)===null||ca===void 0?void 0:ca.offsetHeight)||0;Xn(Qa),ra(fo),Ha(po),Ta(Li);var da=(((Ga=Yr.current)===null||Ga===void 0?void 0:Ga.offsetWidth)||0)-po,ha=(((ya=Yr.current)===null||ya===void 0?void 0:ya.offsetHeight)||0)-Li;ni(da),An(ha);var mo=(hi=$r.current)===null||hi===void 0?void 0:hi.className.includes(aa);Vn(da-(mo?0:wn)),Ai(ha-(mo?0:Ji)),va(function(){var Za=new Map;return De.forEach(function(Mo){var No=Mo.key,Aa=nn(No).current;Aa&&Za.set(No,{width:Aa.offsetWidth,height:Aa.offsetHeight,left:Aa.offsetLeft,top:Aa.offsetTop})}),Za})}),qo=De.slice(0,Jo),Ii=De.slice(Qo+1),qn=[].concat(Object(d.a)(qo),Object(d.a)(Ii)),Ei=Object(v.useState)(),ei=Object(g.a)(Ei,2),Wa=ei[0],es=ei[1],$i=Sa.get(Ue),Do=Object(v.useRef)();function Lo(){c.a.cancel(Do.current)}Object(v.useEffect)(function(){var Cn={};return $i&&(Dr?(Ye?Cn.right=$i.right:Cn.left=$i.left,Cn.width=$i.width):(Cn.top=$i.top,Cn.height=$i.height)),Lo(),Do.current=c()(function(){es(Cn)}),Lo},[$i,Dr,Ye]),Object(v.useEffect)(function(){Dn()},[Ue,$i,Sa,Dr]),Object(v.useEffect)(function(){ho()},[Ye,Er,Ue,De.map(function(Cn){return Cn.key}).join("_")]);var ko=!!qn.length,Oa="".concat(be,"-nav-wrap"),$a,za,Po,Ja;return Dr?Ye?(za=hr>0,$a=hr+_n<Mn):($a=hr<0,za=-hr+_n<Mn):(Po=On<0,Ja=-On+ta<Jn),v.createElement("div",{ref:We,role:"tablist",className:w()("".concat(be,"-nav"),Te),style:Me,onKeyDown:function(){ua()}},v.createElement(xt,{position:"left",extra:ot,prefixCls:be}),v.createElement(o.a,{onResize:ho},v.createElement("div",{className:w()(Oa,(Ve={},Object(P.a)(Ve,"".concat(Oa,"-ping-left"),$a),Object(P.a)(Ve,"".concat(Oa,"-ping-right"),za),Object(P.a)(Ve,"".concat(Oa,"-ping-top"),Po),Object(P.a)(Ve,"".concat(Oa,"-ping-bottom"),Ja),Ve)),ref:Pr},v.createElement(o.a,{onResize:ho},v.createElement("div",{ref:Yr,className:"".concat(be,"-nav-list"),style:{transform:"translate(".concat(hr,"px, ").concat(On,"px)"),transition:pn?"none":void 0}},Zo,v.createElement(Zr,{ref:un,prefixCls:be,locale:Ct,editable:Et,style:{visibility:ko?"hidden":null}}),v.createElement("div",{className:w()("".concat(be,"-ink-bar"),Object(P.a)({},"".concat(be,"-ink-bar-animated"),Ge.inkBar)),style:Wa}))))),v.createElement(nr,Object.assign({},ke,{ref:$r,prefixCls:be,tabs:qn,className:!ko&&aa})),v.createElement(xt,{position:"right",extra:ot,prefixCls:be}))}var Jr=v.forwardRef(_r);function qr(ke){var We=ke.id,Ve=ke.activeKey,Ne=ke.animated,be=ke.tabPosition,De=ke.rtl,Te=ke.destroyInactiveTabPane,Me=v.useContext(br),He=Me.prefixCls,Ge=Me.tabs,Ue=Ne.tabPane,Ye=Ge.findIndex(function(ot){return ot.key===Ve});return v.createElement("div",{className:w()("".concat(He,"-content-holder"))},v.createElement("div",{className:w()("".concat(He,"-content"),"".concat(He,"-content-").concat(be),Object(P.a)({},"".concat(He,"-content-animated"),Ue)),style:Ye&&Ue?Object(P.a)({},De?"marginRight":"marginLeft","-".concat(Ye,"00%")):null},Ge.map(function(ot){return v.cloneElement(ot.node,{key:ot.key,prefixCls:He,tabKey:ot.key,id:We,animated:Ue,active:ot.key===Ve,destroyInactiveTabPane:Te})})))}function mr(ke){var We=ke.prefixCls,Ve=ke.forceRender,Ne=ke.className,be=ke.style,De=ke.id,Te=ke.active,Me=ke.animated,He=ke.destroyInactiveTabPane,Ge=ke.tabKey,Ue=ke.children,Ye=v.useState(Ve),ot=Object(g.a)(Ye,2),Et=ot[0],Ct=ot[1];v.useEffect(function(){Te?Ct(!0):He&&Ct(!1)},[Te,He]);var Nt={};return Te||(Me?(Nt.visibility="hidden",Nt.height=0,Nt.overflowY="hidden"):Nt.display="none"),v.createElement("div",{id:De&&"".concat(De,"-panel-").concat(Ge),role:"tabpanel",tabIndex:Te?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat(Ge),"aria-hidden":!Te,style:Object(N.a)(Object(N.a)({},Nt),be),className:w()("".concat(We,"-tabpane"),Te&&"".concat(We,"-tabpane-active"),Ne)},(Te||Et||Ve)&&Ue)}var Xr=0;function Rr(ke){return Object(b.a)(ke).map(function(We){if(v.isValidElement(We)){var Ve=We.key!==void 0?String(We.key):void 0;return Object(N.a)(Object(N.a)({key:Ve},We.props),{},{node:We})}return null}).filter(function(We){return We})}function on(ke,We){var Ve,Ne=ke.id,be=ke.prefixCls,De=be===void 0?"rc-tabs":be,Te=ke.className,Me=ke.children,He=ke.direction,Ge=ke.activeKey,Ue=ke.defaultActiveKey,Ye=ke.editable,ot=ke.animated,Et=ke.tabPosition,Ct=Et===void 0?"top":Et,Nt=ke.tabBarGutter,Er=ke.tabBarStyle,Hr=ke.tabBarExtraContent,Ur=ke.locale,Gr=ke.moreIcon,Pr=ke.moreTransitionName,Yr=ke.destroyInactiveTabPane,$r=ke.renderTabBar,un=ke.onChange,en=ke.onTabClick,Tn=ke.onTabScroll,nn=Object(T.a)(ke,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Sr=Rr(Me),Dr=He==="rtl",Qr;ot===!1?Qr={inkBar:!1,tabPane:!1}:Qr=Object(N.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var ln=Object(v.useState)(!1),hr=Object(g.a)(ln,2),fn=hr[0],Pn=hr[1];Object(v.useEffect)(function(){Pn(Kt())},[]);var vn=Object(t.a)(function(){var En;return(En=Sr[0])===null||En===void 0?void 0:En.key},{value:Ge,defaultValue:Ue}),On=Object(g.a)(vn,2),bn=On[0],Gn=On[1],$n=Object(v.useState)(function(){return Sr.findIndex(function(En){return En.key===bn})}),Mn=Object(g.a)($n,2),ni=Mn[0],Fi=Mn[1];Object(v.useEffect)(function(){var En=Sr.findIndex(function(Ri){return Ri.key===bn});if(En===-1){var Ai;En=Math.max(0,Math.min(ni,Sr.length-1)),Gn((Ai=Sr[En])===null||Ai===void 0?void 0:Ai.key)}Fi(En)},[Sr.map(function(En){return En.key}).join("_"),bn,ni]);var pi=Object(t.a)(null,{value:Ne}),Jn=Object(g.a)(pi,2),An=Jn[0],Rn=Jn[1],Nn=Ct;fn&&!["left","right"].includes(Ct)&&(Nn="top"),Object(v.useEffect)(function(){Ne||(Rn("rc-tabs-".concat(Xr)),Xr+=1)},[]);function kn(En,Ai){en==null||en(En,Ai),Gn(En),un==null||un(En)}var Vn={id:An,activeKey:bn,animated:Qr,tabPosition:Nn,rtl:Dr,mobile:fn},_i,Xi=Object(N.a)(Object(N.a)({},Vn),{},{editable:Ye,locale:Ur,moreIcon:Gr,moreTransitionName:Pr,tabBarGutter:Nt,onTabClick:kn,onTabScroll:Tn,extra:Hr,style:Er,panes:Me});return $r?_i=$r(Xi,Jr):_i=v.createElement(Jr,Object.assign({},Xi)),v.createElement(br.Provider,{value:{tabs:Sr,prefixCls:De}},v.createElement("div",Object.assign({ref:We,id:Ne,className:w()(De,"".concat(De,"-").concat(Nn),(Ve={},Object(P.a)(Ve,"".concat(De,"-mobile"),fn),Object(P.a)(Ve,"".concat(De,"-editable"),Ye),Object(P.a)(Ve,"".concat(De,"-rtl"),Dr),Ve),Te)},nn),_i,v.createElement(qr,Object.assign({destroyInactiveTabPane:Yr},Vn,{animated:Qr}))))}var Fr=v.forwardRef(on);Fr.TabPane=mr;var sn=Fr,Hn=q.b=sn},kSUc:function(H,q,L){},lPiR:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(g){var T=P,N=T.lib,v=N.WordArray,m=N.Hasher,w=T.algo,b=[],t=[];(function(){function c(h){for(var f=g.sqrt(h),u=2;u<=f;u++)if(!(h%u))return!1;return!0}function o(h){return(h-(h|0))*4294967296|0}for(var n=2,s=0;s<64;)c(n)&&(s<8&&(b[s]=o(g.pow(n,1/2))),t[s]=o(g.pow(n,1/3)),s++),n++})();var d=[],a=w.SHA256=m.extend({_doReset:function(){this._hash=new v.init(b.slice(0))},_doProcessBlock:function(c,o){for(var n=this._hash.words,s=n[0],h=n[1],f=n[2],u=n[3],i=n[4],r=n[5],E=n[6],y=n[7],p=0;p<64;p++){if(p<16)d[p]=c[o+p]|0;else{var R=d[p-15],O=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,_=d[p-2],x=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;d[p]=O+d[p-7]+x+d[p-16]}var S=i&r^~i&E,C=s&h^s&f^h&f,j=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),F=(i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25),M=y+F+S+t[p]+d[p],Y=j+C;y=E,E=r,r=i,i=u+M|0,u=f,f=h,h=s,s=M+Y|0}n[0]=n[0]+s|0,n[1]=n[1]+h|0,n[2]=n[2]+f|0,n[3]=n[3]+u|0,n[4]=n[4]+i|0,n[5]=n[5]+r|0,n[6]=n[6]+E|0,n[7]=n[7]+y|0},_doFinalize:function(){var c=this._data,o=c.words,n=this._nDataBytes*8,s=c.sigBytes*8;return o[s>>>5]|=128<<24-s%32,o[(s+64>>>9<<4)+14]=g.floor(n/4294967296),o[(s+64>>>9<<4)+15]=n,c.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});T.SHA256=m._createHelper(a),T.HmacSHA256=m._createHmacHelper(a)}(Math),P.SHA256})},lZu9:function(H,q,L){(function(P){P(L("VrN/"),L("1eCo"),L("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(g,T){var N=P.getMode(g,"text/html"),v=N.name=="null";function m(U){if(P.findModeByName){var D=P.findModeByName(U);D&&(U=D.mime||D.mimes[0])}var X=P.getMode(g,U);return X.name=="null"?null:X}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.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 b in w)w.hasOwnProperty(b)&&T.tokenTypeOverrides[b]&&(w[b]=T.tokenTypeOverrides[b]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,a=/^\[(x| )\](?=\s)/i,c=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,o=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,f=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,u=" ";function i(U,D,X){return D.f=D.inline=X,X(U,D)}function r(U,D,X){return D.f=D.block=X,X(U,D)}function E(U){return!U||!/\S/.test(U.string)}function y(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==R){var D=v;if(!D){var X=P.innerMode(N,U.htmlState);D=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}D&&(U.f=S,U.block=p,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function p(U,D){var X=U.column()===D.indentation,ie=E(D.prevLine.stream),oe=D.indentedCode,de=D.prevLine.hr,Ce=D.list!==!1,Ae=(D.listStack[D.listStack.length-1]||0)+3;D.indentedCode=!1;var me=D.indentation;if(D.indentationDiff===null&&(D.indentationDiff=D.indentation,Ce)){for(D.list=null;me<D.listStack[D.listStack.length-1];)D.listStack.pop(),D.listStack.length?D.indentation=D.listStack[D.listStack.length-1]:D.list=!1;D.list!==!1&&(D.indentationDiff=me-D.listStack[D.listStack.length-1])}var Se=!ie&&!de&&!D.prevLine.header&&(!Ce||!oe)&&!D.prevLine.fencedCodeEnd,ye=(D.list===!1||de||ie)&&D.indentation<=Ae&&U.match(t),se=null;if(D.indentationDiff>=4&&(oe||D.prevLine.fencedCodeEnd||D.prevLine.header||ie))return U.skipToEnd(),D.indentedCode=!0,w.code;if(U.eatSpace())return null;if(X&&D.indentation<=Ae&&(se=U.match(c))&&se[1].length<=6)return D.quote=0,D.header=se[1].length,D.thisLine.header=!0,T.highlightFormatting&&(D.formatting="header"),D.f=D.inline,_(D);if(D.indentation<=Ae&&U.eat(">"))return D.quote=X?1:D.quote+1,T.highlightFormatting&&(D.formatting="quote"),U.eatSpace(),_(D);if(!ye&&!D.setext&&X&&D.indentation<=Ae&&(se=U.match(d))){var ee=se[1]?"ol":"ul";return D.indentation=me+U.current().length,D.list=!0,D.quote=0,D.listStack.push(D.indentation),D.em=!1,D.strong=!1,D.code=!1,D.strikethrough=!1,T.taskLists&&U.match(a,!1)&&(D.taskList=!0),D.f=D.inline,T.highlightFormatting&&(D.formatting=["list","list-"+ee]),_(D)}else{if(X&&D.indentation<=Ae&&(se=U.match(s,!0)))return D.quote=0,D.fencedEndRE=new RegExp(se[1]+"+ *$"),D.localMode=T.fencedCodeBlockHighlighting&&m(se[2]||T.fencedCodeBlockDefaultMode),D.localMode&&(D.localState=P.startState(D.localMode)),D.f=D.block=O,T.highlightFormatting&&(D.formatting="code-block"),D.code=-1,_(D);if(D.setext||(!Se||!Ce)&&!D.quote&&D.list===!1&&!D.code&&!ye&&!h.test(U.string)&&(se=U.lookAhead(1))&&(se=se.match(o)))return D.setext?(D.header=D.setext,D.setext=0,U.skipToEnd(),T.highlightFormatting&&(D.formatting="header")):(D.header=se[0].charAt(0)=="="?1:2,D.setext=D.header),D.thisLine.header=!0,D.f=D.inline,_(D);if(ye)return U.skipToEnd(),D.hr=!0,D.thisLine.hr=!0,w.hr;if(U.peek()==="[")return i(U,D,Y)}return i(U,D,D.inline)}function R(U,D){var X=N.token(U,D.htmlState);if(!v){var ie=P.innerMode(N,D.htmlState);(ie.mode.name=="xml"&&ie.state.tagStart===null&&!ie.state.context&&ie.state.tokenize.isInText||D.md_inside&&U.current().indexOf(">")>-1)&&(D.f=S,D.block=p,D.htmlState=null)}return X}function O(U,D){var X=D.listStack[D.listStack.length-1]||0,ie=D.indentation<X,oe=X+3;if(D.fencedEndRE&&D.indentation<=oe&&(ie||U.match(D.fencedEndRE))){T.highlightFormatting&&(D.formatting="code-block");var de;return ie||(de=_(D)),D.localMode=D.localState=null,D.block=p,D.f=S,D.fencedEndRE=null,D.code=0,D.thisLine.fencedCodeEnd=!0,ie?r(U,D,D.block):de}else return D.localMode?D.localMode.token(U,D.localState):(U.skipToEnd(),w.code)}function _(U){var D=[];if(U.formatting){D.push(w.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var X=0;X<U.formatting.length;X++)D.push(w.formatting+"-"+U.formatting[X]),U.formatting[X]==="header"&&D.push(w.formatting+"-"+U.formatting[X]+"-"+U.header),U.formatting[X]==="quote"&&(!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?D.push(w.formatting+"-"+U.formatting[X]+"-"+U.quote):D.push("error"))}if(U.taskOpen)return D.push("meta"),D.length?D.join(" "):null;if(U.taskClosed)return D.push("property"),D.length?D.join(" "):null;if(U.linkHref?D.push(w.linkHref,"url"):(U.strong&&D.push(w.strong),U.em&&D.push(w.em),U.strikethrough&&D.push(w.strikethrough),U.emoji&&D.push(w.emoji),U.linkText&&D.push(w.linkText),U.code&&D.push(w.code),U.image&&D.push(w.image),U.imageAltText&&D.push(w.imageAltText,"link"),U.imageMarker&&D.push(w.imageMarker)),U.header&&D.push(w.header,w.header+"-"+U.header),U.quote&&(D.push(w.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?D.push(w.quote+"-"+U.quote):D.push(w.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var ie=(U.listStack.length-1)%3;ie?ie===1?D.push(w.list2):D.push(w.list3):D.push(w.list1)}return U.trailingSpaceNewLine?D.push("trailing-space-new-line"):U.trailingSpace&&D.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),D.length?D.join(" "):null}function x(U,D){return U.match(n,!0)?_(D):void 0}function S(U,D){var X=D.text(U,D);if(typeof X!="undefined")return X;if(D.list)return D.list=null,_(D);if(D.taskList){var ie=U.match(a,!0)[1]===" ";return ie?D.taskOpen=!0:D.taskClosed=!0,T.highlightFormatting&&(D.formatting="task"),D.taskList=!1,_(D)}if(D.taskOpen=!1,D.taskClosed=!1,D.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(D.formatting="header"),_(D);var oe=U.next();if(D.linkTitle){D.linkTitle=!1;var de=oe;oe==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ce="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(U.match(new RegExp(Ce),!0))return w.linkHref}if(oe==="`"){var Ae=D.formatting;T.highlightFormatting&&(D.formatting="code"),U.eatWhile("`");var me=U.current().length;if(D.code==0&&(!D.quote||me==1))return D.code=me,_(D);if(me==D.code){var Se=_(D);return D.code=0,Se}else return D.formatting=Ae,_(D)}else if(D.code)return _(D);if(oe==="\\"&&(U.next(),T.highlightFormatting)){var ye=_(D),se=w.formatting+"-escape";return ye?ye+" "+se:se}if(oe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return D.imageMarker=!0,D.image=!0,T.highlightFormatting&&(D.formatting="image"),_(D);if(oe==="["&&D.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return D.imageMarker=!1,D.imageAltText=!0,T.highlightFormatting&&(D.formatting="image"),_(D);if(oe==="]"&&D.imageAltText){T.highlightFormatting&&(D.formatting="image");var ye=_(D);return D.imageAltText=!1,D.image=!1,D.inline=D.f=j,ye}if(oe==="["&&!D.image)return D.linkText&&U.match(/^.*?\]/)||(D.linkText=!0,T.highlightFormatting&&(D.formatting="link")),_(D);if(oe==="]"&&D.linkText){T.highlightFormatting&&(D.formatting="link");var ye=_(D);return D.linkText=!1,D.inline=D.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?j:S,ye}if(oe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=C,T.highlightFormatting&&(D.formatting="link");var ye=_(D);return ye?ye+=" ":ye="",ye+w.linkInline}if(oe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=C,T.highlightFormatting&&(D.formatting="link");var ye=_(D);return ye?ye+=" ":ye="",ye+w.linkEmail}if(T.xml&&oe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ee=U.string.indexOf(">",U.pos);if(ee!=-1){var B=U.string.substring(U.start,ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(B)&&(D.md_inside=!0)}return U.backUp(1),D.htmlState=P.startState(N),r(U,D,R)}if(T.xml&&oe==="<"&&U.match(/^\/\w*?>/))return D.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var G=1,V=U.pos==1?" ":U.string.charAt(U.pos-2);G<3&&U.eat(oe);)G++;var Q=U.peek()||" ",Z=!/\s/.test(Q)&&(!f.test(Q)||/\s/.test(V)||f.test(V)),ne=!/\s/.test(V)&&(!f.test(V)||/\s/.test(Q)||f.test(Q)),re=null,$=null;if(G%2&&(!D.em&&Z&&(oe==="*"||!ne||f.test(V))?re=!0:D.em==oe&&ne&&(oe==="*"||!Z||f.test(Q))&&(re=!1)),G>1&&(!D.strong&&Z&&(oe==="*"||!ne||f.test(V))?$=!0:D.strong==oe&&ne&&(oe==="*"||!Z||f.test(Q))&&($=!1)),$!=null||re!=null){T.highlightFormatting&&(D.formatting=re==null?"strong":$==null?"em":"strong em"),re===!0&&(D.em=oe),$===!0&&(D.strong=oe);var Se=_(D);return re===!1&&(D.em=!1),$===!1&&(D.strong=!1),Se}}else if(oe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return _(D);U.backUp(1)}if(T.strikethrough){if(oe==="~"&&U.eatWhile(oe)){if(D.strikethrough){T.highlightFormatting&&(D.formatting="strikethrough");var Se=_(D);return D.strikethrough=!1,Se}else if(U.match(/^[^\s]/,!1))return D.strikethrough=!0,T.highlightFormatting&&(D.formatting="strikethrough"),_(D)}else if(oe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return _(D);U.backUp(2)}}if(T.emoji&&oe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){D.emoji=!0,T.highlightFormatting&&(D.formatting="emoji");var J=_(D);return D.emoji=!1,J}return oe===" "&&(U.match(/^ +$/,!1)?D.trailingSpace++:D.trailingSpace&&(D.trailingSpaceNewLine=!0)),_(D)}function C(U,D){var X=U.next();if(X===">"){D.f=D.inline=S,T.highlightFormatting&&(D.formatting="link");var ie=_(D);return ie?ie+=" ":ie="",ie+w.linkInline}return U.match(/^[^>]+/,!0),w.linkInline}function j(U,D){if(U.eatSpace())return null;var X=U.next();return X==="("||X==="["?(D.f=D.inline=M(X==="("?")":"]"),T.highlightFormatting&&(D.formatting="link-string"),D.linkHref=!0,_(D)):"error"}var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(U){return function(D,X){var ie=D.next();if(ie===U){X.f=X.inline=S,T.highlightFormatting&&(X.formatting="link-string");var oe=_(X);return X.linkHref=!1,oe}return D.match(F[U]),X.linkHref=!0,_(X)}}function Y(U,D){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(D.f=K,U.next(),T.highlightFormatting&&(D.formatting="link"),D.linkText=!0,_(D)):i(U,D,S)}function K(U,D){if(U.match(/^\]:/,!0)){D.f=D.inline=A,T.highlightFormatting&&(D.formatting="link");var X=_(D);return D.linkText=!1,X}return U.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function A(U,D){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?D.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),D.f=D.inline=S,w.linkHref+" url")}var W={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:S,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&P.copyState(N,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?P.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,D){if(D.formatting=!1,U!=D.thisLine.stream){if(D.header=0,D.hr=!1,U.match(/^\s*$/,!0))return y(D),null;if(D.prevLine=D.thisLine,D.thisLine={stream:U},D.taskList=!1,D.trailingSpace=0,D.trailingSpaceNewLine=!1,!D.localState&&(D.f=D.block,D.f!=R)){var X=U.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(D.indentation=X,D.indentationDiff=null,X>0)return null}}return D.f(U,D)},innerMode:function(U){return U.block==R?{state:U.htmlState,mode:N}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:W}},indent:function(U,D,X){return U.block==R&&N.indent?N.indent(U.htmlState,D,X):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,D,X):P.Pass},blankLine:y,getType:_,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return W},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(H){if(!0)module.exports=H();else var q})(function(){var define,module,exports;return function(){function H(q,L,P){function g(v,m){if(!L[v]){if(!q[v]){var w=typeof require=="function"&&require;if(!m&&w)return require(v,!0);if(T)return T(v,!0);var b=new Error("Cannot find module '"+v+"'");throw b.code="MODULE_NOT_FOUND",b}var t=L[v]={exports:{}};q[v][0].call(t.exports,function(d){var a=q[v][1][d];return g(a||d)},t,t.exports,H,q,L,P)}return L[v].exports}for(var T=typeof require=="function"&&require,N=0;N<P.length;N++)g(P[N]);return g}return H}()({1:[function(H,q,L){"use strict";var P=H("./browser/client");P.Buffer=H("buffer").Buffer,P.urllib=H("../shims/xhr"),P.version=H("./browser/version").version,q.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(H,q,L){(function(P,g){"use strict";var T=H("babel-runtime/core-js/promise"),N=t(T),v=H("babel-runtime/regenerator"),m=t(v),w=H("babel-runtime/core-js/object/assign"),b=t(w);function t(Y){return Y&&Y.__esModule?Y:{default:Y}}var d=H("debug")("ali-oss"),a=H("copy-to"),c=H("xml2js"),o=H("agentkeepalive"),n=H("merge-descriptors"),s=H("url"),h=H("is-type-of"),f=H("platform"),u=H("utility"),i=H("urllib"),r=H("./version"),E=H("bowser"),y=H("../common/signUtils"),p=H("../common/utils/isIP"),R=p.isIP,O=H("../common/client/initOptions"),_=H("../common/utils/createRequest"),x=_.createRequest,S=new o;function C(){var Y=f.name,K=f.version;Y&&Y.toLowerCase&&Y.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function j(){return location&&location.protocol==="https:"}function F(Y,K){if(C(),!(this instanceof F))return new F(Y,K);Y&&Y.inited?this.options=Y:this.options=F.initOptions(Y),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=i,this.agent=this.options.agent||S),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}q.exports=F,F.initOptions=function(K){K.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var A=(0,b.default)({secure:j(),useFetch:!1},K);return O(A)};var M=F.prototype;M.debug=d,n(M,H("./object")),n(M,H("../common/bucket/getBucketWebsite")),n(M,H("../common/bucket/putBucketWebsite")),n(M,H("../common/bucket/deleteBucketWebsite")),n(M,H("../common/bucket/getBucketLifecycle")),n(M,H("../common/bucket/putBucketLifecycle")),n(M,H("../common/bucket/deleteBucketLifecycle")),n(M,H("../common/bucket/putBucketVersioning")),n(M,H("../common/bucket/getBucketVersioning")),n(M,H("./managed-upload")),n(M,H("../common/multipart")),n(M,H("../common/parallel")),M.signature=function(K){return this.debug("authorization stringToSign: %s",K,"info"),y.computeSignature(this.options.accessKeySecret,K)},M.authorization=function(K,A,W,U){var D=y.buildCanonicalString(K.toUpperCase(),A,{headers:U,parameters:W});return y.authorization(this.options.accessKeyId,this.options.accessKeySecret,D)},M.request=function(K){var A,W,U,D,X,ie;return m.default.async(function(de){for(;;)switch(de.prev=de.next){case 0:return A=x.call(this,K),this.options.useFetch||(A.params.mode="disable-fetch"),W=void 0,U=void 0,D=!!K.stream,de.prev=5,de.next=8,m.default.awrap(this.urllib.request(A.url,A.params));case 8:W=de.sent,this.debug("response %s %s, got %s, headers: %j",K.method,A.url,W.status,W.headers,"info"),de.next=15;break;case 12:de.prev=12,de.t0=de.catch(5),U=de.t0;case 15:if(X=void 0,!(W&&K.successStatuses&&K.successStatuses.indexOf(W.status)===-1)){de.next=28;break}return de.next=19,m.default.awrap(this.requestError(W));case 19:if(X=de.sent,!(X.code==="RequestTimeTooSkewed"&&!D)){de.next=25;break}return this.options.amendTimeSkewed=+new Date(X.serverTime)-new Date,de.next=24,m.default.awrap(this.request(K));case 24:return de.abrupt("return",de.sent);case 25:X.params=K,de.next=32;break;case 28:if(!U){de.next=32;break}return de.next=31,m.default.awrap(this.requestError(U));case 31:X=de.sent;case 32:if(!X){de.next=34;break}throw X;case 34:if(!K.xmlResponse){de.next=39;break}return de.next=37,m.default.awrap(this.parseXML(W.data));case 37:ie=de.sent,W.data=ie;case 39:return de.abrupt("return",W);case 40:case"end":return de.stop()}},null,this,[[5,12]])},M._getResource=function(K){var A="/";return K.bucket&&(A+=K.bucket+"/"),K.object&&(A+=K.object),A},M._isIP=R,M._escape=function(K){return u.encodeURIComponent(K).replace(/%2F/g,"/")},M._getReqUrl=function(K){var A={};a(this.options.endpoint).to(A);var W=this._isIP(A.hostname),U=this.options.cname;K.bucket&&!U&&!W&&(A.host=K.bucket+"."+A.host);var D="/";K.bucket&&W&&(D+=K.bucket+"/"),K.object&&(D+=this._escape(K.object).replace(/\+/g,"%2B")),A.pathname=D;var X={};if(K.query&&n(X,K.query),K.subres){var ie={};h.string(K.subres)?ie[K.subres]="":h.array(K.subres)?K.subres.forEach(function(oe){ie[oe]=""}):ie=K.subres,n(X,ie)}return A.query=X,s.format(A)},M._getUserAgent=function(){var K=g&&g.browser?"js":"nodejs",A="aliyun-sdk-"+K+"/"+r.version,W=f.description;return!W&&g&&(W="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(A+" "+W)},M._checkUserAgent=function(K){var A=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return A},M.checkBrowserAndVersion=function(K,A){return E.name===K&&E.version.split(".")[0]===A},M.parseXML=function(K){return new N.default(function(A,W){P.isBuffer(K)&&(K=K.toString()),c.parseString(K,{explicitRoot:!1,explicitArray:!1},function(U,D){U?W(U):A(D)})})},M.requestError=function(K){var A,W,U,D;return m.default.async(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(A=null,!(!K.data||!K.data.length)){ie.next=5;break}K.status===-1||K.status===-2?(A=new Error(K.message),A.name=K.name,A.status=K.status,A.code=K.name):(K.status===404?(A=new Error("Object not exists"),A.name="NoSuchKeyError",A.status=404,A.code="NoSuchKey"):K.status===412?(A=new Error("Pre condition failed"),A.name="PreconditionFailedError",A.status=412,A.code="PreconditionFailed"):(A=new Error("Unknow error, status: "+K.status),A.name="UnknowError",A.status=K.status),A.requestId=K.headers["x-oss-request-id"],A.host=""),ie.next=33;break;case 5:return W=String(K.data),this.debug("request response error data: %s",W,"error"),U=void 0,ie.prev=8,ie.next=11,m.default.awrap(this.parseXML(W));case 11:if(ie.t0=ie.sent,ie.t0){ie.next=14;break}ie.t0={};case 14:U=ie.t0,ie.next=24;break;case 17:return ie.prev=17,ie.t1=ie.catch(8),this.debug(W,"error"),ie.t1.message+=`
raw xml: `+W,ie.t1.status=K.status,ie.t1.requestId=K.headers["x-oss-request-id"],ie.abrupt("return",ie.t1);case 24:D=U.Message||"unknow request error, status: "+K.status,U.Condition&&(D+=" (condition: "+U.Condition+")"),A=new Error(D),A.name=U.Code?U.Code+"Error":"UnknowError",A.status=K.status,A.code=U.Code,A.requestId=U.RequestId,A.hostId=U.HostId,A.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",A,"error"),ie.abrupt("return",A);case 35:case"end":return ie.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:H("../../node_modules/is-buffer/index.js")},H("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/core-js/array/from"),T=b(g),N=H("babel-runtime/core-js/promise"),v=b(N),m=H("babel-runtime/regenerator"),w=b(m);function b(y){return y&&y.__esModule?y:{default:y}}var t=H("is-type-of"),d=H("util"),a=H("path"),c=H("mime"),o=H("copy-to"),n=H("../common/utils/isBlob"),s=n.isBlob,h=H("../common/utils/isFile"),f=h.isFile,u=L;u.multipartUpload=function(p,R,O){var _,x,S,C,j,F,M,Y,K;return w.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){W.next=6;break}return W.next=5,w.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return W.abrupt("return",W.sent);case 6:return _=100*1024,O.mime||(f(R)?O.mime=c.getType(a.extname(R.name)):s(R)?O.mime=R.type:O.mime=c.getType(a.extname(R))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),W.next=12,w.default.awrap(this._getFileSize(R));case 12:if(x=W.sent,!(x<_)){W.next=25;break}return S=this._createStream(R,0,x),O.contentLength=x,W.next=18,w.default.awrap(this.putStream(p,S,O));case 18:if(C=W.sent,!(O&&O.progress)){W.next=22;break}return W.next=22,w.default.awrap(O.progress(1));case 22:return j={res:C.res,bucket:this.options.bucket,name:p,etag:C.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(j.data=C.data),W.abrupt("return",j);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){W.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<_)){W.next=29;break}throw new Error("partSize must not be smaller than "+_);case 29:return W.next=31,w.default.awrap(this.initMultipartUpload(p,O));case 31:if(F=W.sent,M=F.uploadId,Y=this._getPartSize(x,O.partSize),K={file:R,name:p,fileSize:x,partSize:Y,uploadId:M,doneParts:[]},!(O&&O.progress)){W.next=38;break}return W.next=38,w.default.awrap(O.progress(0,K,F.res));case 38:return W.next=40,w.default.awrap(this._resumeMultipart(K,O));case 40:return W.abrupt("return",W.sent);case 41:case"end":return W.stop()}},null,this)},u._resumeMultipart=function(p,R){var O,_,x,S,C,j,F,M,Y,K,A,W,U,D,X,ie,oe,de;return w.default.async(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(O=this,!this.isCancel()){Ae.next=3;break}throw this._makeCancelEvent();case 3:return _=p.file,x=p.fileSize,S=p.partSize,C=p.uploadId,j=p.doneParts,F=p.name,M=[],j.length>0&&o(j).to(M),Y=this._divideParts(x,S),K=Y.length,A=!1,W=function(Se,ye){var se=this;return new v.default(function(B,G){var V,Q,Z,ne;return w.default.async(function($){for(;;)switch($.prev=$.next){case 0:if($.prev=0,Se.isCancel()){$.next=18;break}return V=Y[ye-1],Q={stream:Se._createStream(_,V.start,V.end),size:V.end-V.start},$.next=6,w.default.awrap(Se._uploadPart(F,C,ye,Q));case 6:if(Z=$.sent,!(!Se.isCancel()&&!A)){$.next=15;break}if(p.doneParts.push({number:ye,etag:Z.res.headers.etag}),!R.progress){$.next=12;break}return $.next=12,w.default.awrap(R.progress(j.length/K,p,Z.res));case 12:B({number:ye,etag:Z.res.headers.etag}),$.next=16;break;case 15:B();case 16:$.next=19;break;case 18:B();case 19:$.next=30;break;case 21:$.prev=21,$.t0=$.catch(0),ne=new Error,ne.name=$.t0.name,ne.message=$.t0.message,ne.stack=$.t0.stack,ne.partNum=ye,o($.t0).to(ne),G(ne);case 30:case"end":return $.stop()}},null,se,[[0,21]])})},U=(0,T.default)(new Array(K),function(me,Se){return Se+1}),D=M.map(function(me){return me.number}),X=U.filter(function(me){return D.indexOf(me)<0}),ie=5,oe=R.parallel||ie,Ae.next=17,w.default.awrap(this._parallel(X,oe,function(me){return new v.default(function(Se,ye){W(O,me).then(function(se){se&&M.push(se),Se()}).catch(function(se){ye(se)})})}));case 17:if(de=Ae.sent,A=!0,!this.isCancel()){Ae.next=22;break}throw W=null,this._makeCancelEvent();case 22:if(!(de&&de.length>0)){Ae.next=25;break}throw de[0].message="Failed to upload some parts with error: "+de[0].toString()+" part_num: "+de[0].partNum,de[0];case 25:return Ae.next=27,w.default.awrap(this.completeMultipartUpload(F,C,M,R));case 27:return Ae.abrupt("return",Ae.sent);case 28:case"end":return Ae.stop()}},null,this)},u._getFileSize=function(p){return w.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!t.buffer(p)){O.next=4;break}return O.abrupt("return",p.length);case 4:if(!(s(p)||f(p))){O.next=6;break}return O.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var i=H("stream"),r=i.Readable;function E(y,p){if(!(this instanceof E))return new E(y,p);r.call(this,p),this.file=y,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(E,r),E.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,_=O+p;_=_>this.fileBuffer.length?this.fileBuffer.length:_,this.start=_,R=this.push(this.fileBuffer.slice(O,_))}},E.prototype._read=function(p){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var R=16*1024;p=p||R;var O=this;this.reader.onload=function(x){O.fileBuffer=P.from(new Uint8Array(x.target.result)),O.file=null,O.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},u._createStream=function(p,R,O){if(s(p)||f(p))return new E(p.slice(R,O));throw new Error("_createStream requires File/Blob.")},u._getPartSize=function(p,R){var O=10*1e3,_=1024*1024;return R?Math.max(Math.ceil(p/O),R):_},u._divideParts=function(p,R){for(var O=Math.ceil(p/R),_=[],x=0;x<O;x++){var S=R*x,C=Math.min(S+R,p);_.push({start:S,end:C})}return _}}).call(this,H("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/promise"),g=t(P),T=H("babel-runtime/core-js/object/keys"),N=t(T),v=H("babel-runtime/core-js/object/assign"),m=t(v),w=H("babel-runtime/regenerator"),b=t(w);function t(O){return O&&O.__esModule?O:{default:O}}var d=H("utility"),a=H("fs"),c=H("is-type-of"),o=H("url"),n=H("copy-to"),s=H("path"),h=H("mime"),f=H("../common/callback"),u=H("../common/signUtils"),i=H("merge-descriptors"),r=H("../common/utils/isBlob"),E=r.isBlob,y=H("../common/utils/isFile"),p=y.isFile,R=L;R.append=function(_,x,S){var C;return b.default.async(function(F){for(;;)switch(F.prev=F.next){case 0:return S=S||{},S.position===void 0&&(S.position="0"),S.subres={append:"",position:S.position},S.method="POST",F.next=6,b.default.awrap(this.put(_,x,S));case 6:return C=F.sent,C.nextAppendPosition=C.res.headers["x-oss-next-append-position"],F.abrupt("return",C);case 9:case"end":return F.stop()}},null,this)},R.put=function(_,x,S){var C,j,F,M,Y,K,A;return b.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(C=void 0,S=S||{},_=this._objectName(_),!c.buffer(x)){U.next=7;break}C=x,U.next=33;break;case 7:if(!(E(x)||p(x))){U.next=32;break}return S.mime||(p(x)?S.mime=h.getType(s.extname(x.name)):S.mime=x.type),j=this._createStream(x,0,x.size),U.next=12,b.default.awrap(this._getFileSize(x));case 12:return S.contentLength=U.sent,U.prev=13,U.next=16,b.default.awrap(this.putStream(_,j,S));case 16:return F=U.sent,U.abrupt("return",F);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,b.default.awrap(this.put(_,x,S));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return S.headers=S.headers||{},this._convertMetaToHeaders(S.meta,S.headers),M=S.method||"PUT",Y=this._objectRequestParams(M,_,S),f.encodeCallback(Y,S),Y.mime=S.mime,Y.content=C,Y.successStatuses=[200],U.next=43,b.default.awrap(this.request(Y));case 43:return K=U.sent,A={name:_,url:this._objectUrl(_),res:K.res},Y.headers&&Y.headers["x-oss-callback"]&&(A.data=JSON.parse(K.data.toString())),U.abrupt("return",A);case 47:case"end":return U.stop()}},null,this,[[13,20]])},R.putStream=function(_,x,S){var C,j,F,M;return b.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return S=S||{},S.headers=S.headers||{},_=this._objectName(_),S.contentLength?S.headers["Content-Length"]=S.contentLength:S.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(S.meta,S.headers),C=S.method||"PUT",j=this._objectRequestParams(C,_,S),f.encodeCallback(j,S),j.mime=S.mime,j.stream=x,j.successStatuses=[200],K.next=13,b.default.awrap(this.request(j));case 13:return F=K.sent,M={name:_,url:this._objectUrl(_),res:F.res},j.headers&&j.headers["x-oss-callback"]&&(M.data=JSON.parse(F.data.toString())),K.abrupt("return",M);case 17:case"end":return K.stop()}},null,this)},i(R,H("../common/object/copyObject")),i(R,H("../common/object/getObjectTagging")),i(R,H("../common/object/putObjectTagging")),i(R,H("../common/object/deleteObjectTagging")),i(R,H("../common/image")),i(R,H("../common/object/getBucketVersions")),i(R,H("../common/object/getACL")),i(R,H("../common/object/putACL")),i(R,H("../common/object/head")),i(R,H("../common/object/delete")),i(R,H("../common/object/get")),i(R,H("../common/object/putSymlink")),i(R,H("../common/object/getSymlink")),i(R,H("../common/object/deleteMulti")),i(R,H("../common/object/getObjectMeta")),R.putMeta=function(_,x,S){var C;return b.default.async(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,b.default.awrap(this.copy(_,_,{meta:x||{},timeout:S&&S.timeout,ctx:S&&S.ctx}));case 2:return C=F.sent,F.abrupt("return",C);case 4:case"end":return F.stop()}},null,this)},R.list=function(_,x){var S,C,j,F,M;return b.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return S=this._objectRequestParams("GET","",x),S.query=_,S.xmlResponse=!0,S.successStatuses=[200],K.next=6,b.default.awrap(this.request(S));case 6:return C=K.sent,j=C.data.Contents,F=this,j&&(Array.isArray(j)||(j=[j]),j=j.map(function(A){return{name:A.Key,url:F._objectUrl(A.Key),lastModified:A.LastModified,etag:A.ETag,type:A.Type,size:Number(A.Size),storageClass:A.StorageClass,owner:{id:A.Owner.ID,displayName:A.Owner.DisplayName}}})),M=C.data.CommonPrefixes||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(A){return A.Prefix})),K.abrupt("return",{res:C.res,objects:j,prefixes:M,nextMarker:C.data.NextMarker||null,isTruncated:C.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},R.restore=function(_,x){var S,C;return b.default.async(function(F){for(;;)switch(F.prev=F.next){case 0:return x=x||{},x.subres=(0,m.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),S=this._objectRequestParams("POST",_,x),S.successStatuses=[202],F.next=7,b.default.awrap(this.request(S));case 7:return C=F.sent,F.abrupt("return",{res:C.res});case 9:case"end":return F.stop()}},null,this)},R.signatureUrl=function(_,x){x=x||{},_=this._objectName(_),x.method=x.method||"GET";var S=d.timestamp()+(x.expires||1800),C={bucket:this.options.bucket,object:_},j=this._getResource(C);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var F=u._signatureForURL(this.options.accessKeySecret,x,j,S),M=o.parse(this._getReqUrl(C));return M.query={OSSAccessKeyId:this.options.accessKeyId,Expires:S,Signature:F.Signature},n(F.subResource).to(M.query),M.format()},R.getObjectUrl=function(_,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(_))},R._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},R.generateObjectUrl=function(O,_){if(_)_[_.length-1]!=="/"&&(_+="/");else{_=this.options.endpoint.format();var x=o.parse(_),S=this.options.bucket;x.hostname=S+"."+x.hostname,x.host=S+"."+x.host,_=x.format()}return _+this._escape(this._objectName(O))},R._objectRequestParams=function(_,x,S){if(!this.options.bucket)throw new Error("Please create a bucket first");S=S||{},x=this._objectName(x);var C={object:x,bucket:this.options.bucket,method:_,subres:S&&S.subres,timeout:S&&S.timeout,ctx:S&&S.ctx};return S.headers&&(C.headers={},n(S.headers).to(C.headers)),C},R._objectName=function(_){return _.replace(/^\/+/,"")},R._convertMetaToHeaders=function(_,x){if(!_)return;(0,N.default)(_).forEach(function(S){x["x-oss-meta-"+S]=_[S]})},R._deleteFileSafe=function(_){var x=this;return new g.default(function(S){a.exists(_,function(C){C?a.unlink(_,function(j){j&&x.debug("unlink %j error: %s",_,j,"error"),S()}):S()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(H,q,L){"use strict";L.version="6.10.0"},{}],6:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(w){return w&&w.__esModule?w:{default:w}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=L;m.deleteBucketLifecycle=function(b,t){var d,a;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return v(b),d=this._bucketRequestParams("DELETE",b,"lifecycle",t),d.successStatuses=[204],o.next=5,g.default.awrap(this.request(d));case 5:return a=o.sent,o.abrupt("return",{res:a.res});case 7:case"end":return o.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(w){return w&&w.__esModule?w:{default:w}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=L;m.deleteBucketWebsite=function(b,t){var d,a;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return v(b),d=this._bucketRequestParams("DELETE",b,"website",t),d.successStatuses=[204],o.next=5,g.default.awrap(this.request(d));case 5:return a=o.sent,o.abrupt("return",{res:a.res});case 7:case"end":return o.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(a){return a&&a.__esModule?a:{default:a}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=H("../utils/isArray"),w=m.isArray,b=H("../utils/formatObjKey"),t=b.formatObjKey,d=L;d.getBucketLifecycle=function(c,o){var n,s,h;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return v(c),n=this._bucketRequestParams("GET",c,"lifecycle",o),n.successStatuses=[200],n.xmlResponse=!0,u.next=6,g.default.awrap(this.request(n));case 6:return s=u.sent,h=s.data.Rule||null,h&&(w(h)||(h=[h]),h=h.map(function(i){return i.ID&&(i.id=i.ID,delete i.ID),i.Tag&&!w(i.Tag)&&(i.Tag=[i.Tag]),t(i,"firstLowerCase")})),u.abrupt("return",{rules:h,res:s.res});case 10:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(w){return w&&w.__esModule?w:{default:w}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=L;m.getBucketVersioning=function(b,t){var d,a,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return v(b),d=this._bucketRequestParams("GET",b,"versioning",t),d.xmlResponse=!0,d.successStatuses=[200],n.next=6,g.default.awrap(this.request(d));case 6:return a=n.sent,c=a.data.Status,n.abrupt("return",{status:a.status,versionStatus:c,res:a.res});case 9:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(t){return t&&t.__esModule?t:{default:t}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=H("../utils/isObject"),w=m.isObject,b=L;b.getBucketWebsite=function(d,a){var c,o,n;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return v(d),c=this._bucketRequestParams("GET",d,"website",a),c.successStatuses=[200],c.xmlResponse=!0,h.next=6,g.default.awrap(this.request(c));case 6:return o=h.sent,n=[],o.data.RoutingRules&&o.data.RoutingRules.RoutingRule&&(w(o.data.RoutingRules.RoutingRule)?n=[o.data.RoutingRules.RoutingRule]:n=o.data.RoutingRules.RoutingRule),h.abrupt("return",{index:o.data.IndexDocument&&o.data.IndexDocument.Suffix||"",supportSubDir:o.data.IndexDocument&&o.data.IndexDocument.SupportSubDir||"false",type:o.data.IndexDocument&&o.data.IndexDocument.Type,routingRules:n,error:o.data.ErrorDocument&&o.data.ErrorDocument.Key||null,res:o.res});case 10:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(p){return p&&p.__esModule?p:{default:p}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=H("../utils/isArray"),w=m.isArray,b=H("../utils/deepCopy"),t=b.deepCopy,d=H("../utils/isObject"),a=d.isObject,c=H("../utils/obj2xml"),o=c.obj2xml,n=H("../utils/checkObjectTag"),s=n.checkObjectTag,h=H("../utils/getStrBytesCount"),f=h.getStrBytesCount,u=L;u.putBucketLifecycle=function(R,O,_){var x,S,C,j,F;return g.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(v(R),w(O)){Y.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",R,"lifecycle",_),S=[],C={LifecycleConfiguration:{Rule:S}},O.forEach(function(K){i(K),y(K),K.id&&(K.ID=K.id,delete K.id),S.push(K)}),j=o(C,{headers:!0,firstUpperCase:!0}),x.content=j,x.mime="xml",x.successStatuses=[200],Y.next=13,g.default.awrap(this.request(x));case 13:return F=Y.sent,Y.abrupt("return",{res:F.res});case 15:case"end":return Y.stop()}},null,this)};function i(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function r(p,R){var O=p.days,_=p.createdBeforeDate;if(!O&&!_)throw new Error(R+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(_&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(_))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function E(p){if(!w(p)&&!a(p))throw new Error("tag must be Object or Array");p=a(p)?[p]:p;var R={},O=t(p);O.forEach(function(_){R[_.key]=_.value}),s(R)}function y(p){if(p.id&&f(p.id)>255)throw new Error("ID is composed of 255 bytes at most");if(p.prefix===""||p.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(p.status))throw new Error("Status must be Enabled or Disabled");if(p.transition){if(!["IA","Archive"].includes(p.transition.storageClass))throw new Error("StorageClass must be IA or Archive");r(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)r(p.expiration,"Expiration");else if(p.expiration.days||p.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(p.abortMultipartUpload&&r(p.abortMultipartUpload,"AbortMultipartUpload"),!p.expiration&&!p.abortMultipartUpload&&!p.transition&&!p.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(p.tag){if(p.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");E(p.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(t){return t&&t.__esModule?t:{default:t}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=H("../utils/obj2xml"),w=m.obj2xml,b=L;b.putBucketVersioning=function(d,a){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,n,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:if(v(d),["Enabled","Suspended"].includes(a)){f.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return o=this._bucketRequestParams("PUT",d,"versioning",c),n={VersioningConfiguration:{Status:a}},o.mime="xml",o.content=w(n,{headers:!0}),f.next=9,g.default.awrap(this.request(o));case 9:return s=f.sent,f.abrupt("return",{res:s.res,status:s.status});case 11:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(a){return a&&a.__esModule?a:{default:a}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=H("../utils/obj2xml"),w=m.obj2xml,b=H("../utils/isArray"),t=b.isArray,d=L;d.putBucketWebsite=function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],s,h,f,u,i;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(v(c),s=this._bucketRequestParams("PUT",c,"website",n),h={Suffix:o.index||"index.html"},f={IndexDocument:h},u={WebsiteConfiguration:f},o.supportSubDir&&(h.SupportSubDir=o.supportSubDir),o.type&&(h.Type=o.type),o.error&&(f.ErrorDocument={Key:o.error}),!(o.routingRules!==void 0)){E.next=12;break}if(t(o.routingRules)){E.next=11;break}throw new Error("RoutingRules must be Array");case 11:f.RoutingRules={RoutingRule:o.routingRules};case 12:return u=w(u),s.content=u,s.mime="xml",s.successStatuses=[200],E.next=18,g.default.awrap(this.request(s));case 18:return i=E.sent,E.abrupt("return",{res:i.res});case 20:case"end":return E.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/core-js/object/keys"),T=m(g),N=H("babel-runtime/core-js/json/stringify"),v=m(N);function m(w){return w&&w.__esModule?w:{default:w}}L.encodeCallback=function(b,t){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&t.callback){var d={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};t.callback.host&&(d.callbackHost=t.callback.host),t.callback.contentType&&(d.callbackBodyType=t.callback.contentType);var a=P.from((0,v.default)(d)).toString("base64");if(b.headers["x-oss-callback"]=a,t.callback.customValue){var c={};(0,T.default)(t.callback.customValue).forEach(function(o){c["x:"+o]=t.callback.customValue[o]}),b.headers["x-oss-callback-var"]=P.from((0,v.default)(c)).toString("base64")}}}}).call(this,H("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/assign"),g=T(P);function T(d){return d&&d.__esModule?d:{default:d}}var N=H("humanize-ms"),v=H("url"),m=H("../utils/checkBucketName"),w=m.checkBucketName;function b(d,a){var c=v.parse(d);if(c.protocol||(c=v.parse("http"+(a?"s":"")+"://"+d)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function t(d,a,c){var o=c?"https://":"http://",n=a?"-internal.aliyuncs.com":".aliyuncs.com",s="vpc100-oss-cn-";return d.substr(0,s.length)===s&&(n=".aliyuncs.com"),v.parse(o+d+n)}q.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&w(d.bucket);var a=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(a.accessKeyId=a.accessKeyId.trim(),a.accessKeySecret=a.accessKeySecret.trim(),a.timeout&&(a.timeout=N(a.timeout)),a.endpoint)a.endpoint=b(a.endpoint,a.secure);else if(a.region)a.endpoint=t(a.region,a.internal,a.secure);else throw new Error("require options.endpoint or options.region");return a.inited=!0,a}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(H,q,L){"use strict";var P=H("merge-descriptors"),g=L;P(g,H("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(a){return a&&a.__esModule?a:{default:a}}var N=H("../utils/checkBucketName"),v=N.checkBucketName,m=H("querystring"),w=H("js-base64"),b=w.Base64.encode,t=L;t.processObjectSave=function(c,o,n,s){var h,f,u,i;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return d(c,"sourceObject"),d(o,"targetObject"),d(n,"process"),o=this._objectName(o),s&&v(s),h=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),f=s?",b_"+b(s):"",o=b(o),u={"x-oss-process":n+"|sys/saveas,o_"+o+f},h.content=m.stringify(u),E.next=12,g.default.awrap(this.request(h));case 12:return i=E.sent,E.abrupt("return",{res:i.res,status:i.res.status});case 14:case"end":return E.stop()}},null,this)};function d(a,c){if(!a)throw new Error(c+" is required");if(typeof a!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=T(P);function T(t){return t&&t.__esModule?t:{default:t}}var N=H("copy-to"),v=H("./callback"),m=H("./utils/deepCopy"),w=m.deepCopy,b=L;b.listUploads=function(d,a){var c,o,n,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return a=a||{},c={},N(a).to(c),c.subres="uploads",o=this._objectRequestParams("GET","",c),o.query=d,o.xmlResponse=!0,o.successStatuses=[200],f.next=10,g.default.awrap(this.request(o));case 10:return n=f.sent,s=n.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),f.abrupt("return",{res:n.res,uploads:s,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return f.stop()}},null,this)},b.listParts=function(d,a,c,o){var n,s,h;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return o=o||{},n={},N(o).to(n),n.subres={uploadId:a},s=this._objectRequestParams("GET",d,n),s.query=c,s.xmlResponse=!0,s.successStatuses=[200],u.next=10,g.default.awrap(this.request(s));case 10:return h=u.sent,u.abrupt("return",{res:h.res,uploadId:h.data.UploadId,bucket:h.data.Bucket,name:h.data.Key,partNumberMarker:h.data.PartNumberMarker,nextPartNumberMarker:h.data.NextPartNumberMarker,maxParts:h.data.MaxParts,isTruncated:h.data.IsTruncated,parts:h.data.Part||[]});case 12:case"end":return u.stop()}},null,this)},b.abortMultipartUpload=function(d,a,c){var o,n,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return this._stop(),c=c||{},o={},N(c).to(o),o.subres={uploadId:a},n=this._objectRequestParams("DELETE",d,o),n.successStatuses=[204],f.next=9,g.default.awrap(this.request(n));case 9:return s=f.sent,f.abrupt("return",{res:s.res});case 11:case"end":return f.stop()}},null,this)},b.initMultipartUpload=function(d,a){var c,o,n;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return a=a||{},c={},N(a).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(a.meta,c.headers),c.subres="uploads",o=this._objectRequestParams("POST",d,c),o.mime=a.mime,o.xmlResponse=!0,o.successStatuses=[200],h.next=12,g.default.awrap(this.request(o));case 12:return n=h.sent,h.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return h.stop()}},null,this)},b.uploadPart=function(d,a,c,o,n,s,h){var f;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return f={stream:this._createStream(o,n,s),size:s-n},i.next=3,g.default.awrap(this._uploadPart(d,a,c,f,h));case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}},null,this)},b.completeMultipartUpload=function(d,a,c,o){var n,s,h,f,u,i,r,E;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(R,O){return R.number-O.number}).filter(function(R,O,_){return!O||R.number!==_[O-1].number}),s=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,h=0;h<n.length;h++)f=n[h],s+=`<Part>
`,s+="<PartNumber>"+f.number+`</PartNumber>
`,s+="<ETag>"+f.etag+`</ETag>
`,s+=`</Part>
`;return s+="</CompleteMultipartUpload>",o=o||{},u={},u=w(o),u.headers&&delete u.headers["x-oss-server-side-encryption"],u.subres={uploadId:a},i=this._objectRequestParams("POST",d,u),v.encodeCallback(i,u),i.mime="xml",i.content=s,i.headers&&i.headers["x-oss-callback"]||(i.xmlResponse=!0),i.successStatuses=[200],p.next=17,g.default.awrap(this.request(i));case 17:return r=p.sent,E={res:r.res,bucket:i.bucket,name:d,etag:r.res.headers.etag},i.headers&&i.headers["x-oss-callback"]&&(E.data=JSON.parse(r.data.toString())),p.abrupt("return",E);case 21:case"end":return p.stop()}},null,this)},b._uploadPart=function(d,a,c,o,n){var s,h,f;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return n=n||{},s={},N(n).to(s),s.headers={"Content-Length":o.size},s.subres={partNumber:c,uploadId:a},h=this._objectRequestParams("PUT",d,s),h.mime=s.mime,h.stream=o.stream,h.successStatuses=[200],i.next=11,g.default.awrap(this.request(h));case 11:if(f=i.sent,f.res.headers.etag){i.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 o.stream=null,h.stream=null,i.abrupt("return",{name:d,etag:f.res.headers.etag,res:f.res});case 17:case"end":return i.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=w(P),T=H("babel-runtime/core-js/object/keys"),N=w(T),v=H("babel-runtime/helpers/typeof"),m=w(v);function w(a){return a&&a.__esModule?a:{default:a}}var b=H("../utils/checkBucketName"),t=b.checkBucketName,d=L;d.copy=function(c,o,n,s){var h,f,u;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return(typeof n=="undefined"?"undefined":(0,m.default)(n))==="object"&&(s=n),s=s||{},s.headers=s.headers||{},(0,N.default)(s.headers).forEach(function(E){s.headers["x-oss-copy-source-"+E.toLowerCase()]=s.headers[E]}),s.meta&&(s.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(s.meta,s.headers),o=this._getSourceName(o,n),s.versionId&&(o=o+"?versionId="+s.versionId),s.headers["x-oss-copy-source"]=o,h=this._objectRequestParams("PUT",c,s),h.xmlResponse=!0,h.successStatuses=[200,304],r.next=14,g.default.awrap(this.request(h));case 14:return f=r.sent,u=f.data,u&&(u={etag:u.ETag,lastModified:u.LastModified}),r.abrupt("return",{data:u,res:f.res});case 18:case"end":return r.stop()}},null,this)},d._getSourceName=function(c,o){return typeof o=="string"?c=this._objectName(c):c[0]!=="/"?o=this.options.bucket:(o=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),t(o),c=encodeURI(c),c="/"+o+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.delete=function(b){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,a;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t.subres=(0,N.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectRequestParams("DELETE",b,t),d.successStatuses=[204],o.next=6,g.default.awrap(this.request(d));case 6:return a=o.sent,o.abrupt("return",{res:a.res});case 8:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(d){return d&&d.__esModule?d:{default:d}}var m=H("utility"),w=H("../utils/obj2xml"),b=w.obj2xml,t=L;t.deleteMulti=function(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,n,s,h,f,u,i,r,E,y,p,R;return g.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:if(o=[],!(!a||!a.length)){_.next=3;break}throw new Error("names is required");case 3:for(n=0;n<a.length;n++)s={},typeof a[n]=="string"?s.Key=m.escape(this._objectName(a[n])):(h=a[n],f=h.key,u=h.versionId,s.Key=m.escape(this._objectName(f)),s.VersionId=u),o.push(s);return i={Delete:{Quiet:!!c.quiet,Object:o}},r=b(i,{headers:!0}),c.subres=(0,N.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),E=this._objectRequestParams("POST","",c),E.mime="xml",E.content=r,E.xmlResponse=!0,E.successStatuses=[200],_.next=15,g.default.awrap(this.request(E));case 15:return y=_.sent,p=y.data,R=p&&p.Deleted||null,R&&(Array.isArray(R)||(R=[R])),_.abrupt("return",{res:y.res,deleted:R||[]});case 20:case"end":return _.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.deleteObjectTagging=function(b){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,a;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t.subres=(0,N.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),b=this._objectName(b),d=this._objectRequestParams("DELETE",b,t),d.successStatuses=[204],o.next=7,g.default.awrap(this.request(d));case 7:return a=o.sent,o.abrupt("return",{status:a.status,res:a.res});case 9:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(t){return t&&t.__esModule?t:{default:t}}var m=H("fs"),w=H("is-type-of"),b=L;b.get=function(d,a){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,n,s,h;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return o=null,n=!1,w.writableStream(a)?o=a:w.string(a)?(o=m.createWriteStream(a),n=!0):c=a,c=c||{},c.subres=(0,N.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),s=void 0,u.prev=8,h=this._objectRequestParams("GET",d,c),h.writeStream=o,h.successStatuses=[200,206,304],u.next=14,g.default.awrap(this.request(h));case 14:s=u.sent,n&&o.destroy(),u.next=25;break;case 18:if(u.prev=18,u.t0=u.catch(8),!n){u.next=24;break}return o.destroy(),u.next=24,g.default.awrap(this._deleteFileSafe(a));case 24:throw u.t0;case 25:return u.abrupt("return",{res:s.res,content:s.data});case 26:case"end":return u.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.getACL=function(b){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,a;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t.subres=(0,N.default)({acl:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,t),d.successStatuses=[200],d.xmlResponse=!0,o.next=8,g.default.awrap(this.request(d));case 8:return a=o.sent,o.abrupt("return",{acl:a.data.AccessControlList.Grant,owner:{id:a.data.Owner.ID,displayName:a.data.Owner.DisplayName},res:a.res});case 10:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/keys"),g=w(P),T=H("babel-runtime/regenerator"),N=w(T),v=H("babel-runtime/core-js/object/assign"),m=w(v);function w(h){return h&&h.__esModule?h:{default:h}}var b=L,t=H("../utils/isObject"),d=t.isObject,a=H("../utils/isArray"),c=a.isArray;b.getBucketVersions=o,b.listObjectVersions=o;function o(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,i,r,E,y,p;return N.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(h.versionIdMarker&&h.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return f.subres=(0,m.default)({versions:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),u=this._objectRequestParams("GET","",f),u.xmlResponse=!0,u.successStatuses=[200],u.query=s(h),O.next=10,N.default.awrap(this.request(u));case 10:return i=O.sent,r=i.data.Version||[],E=i.data.DeleteMarker||[],y=this,r&&(Array.isArray(r)||(r=[r]),r=r.map(function(_){return{name:_.Key,url:y._objectUrl(_.Key),lastModified:_.LastModified,isLatest:_.IsLatest==="true",versionId:_.VersionId,etag:_.ETag,type:_.Type,size:Number(_.Size),storageClass:_.StorageClass,owner:{id:_.Owner.ID,displayName:_.Owner.DisplayName}}})),E&&(c(E)||(E=[E]),E=E.map(function(_){return{name:_.Key,lastModified:_.LastModified,versionId:_.VersionId,owner:{id:_.Owner.ID,displayName:_.Owner.DisplayName}}})),p=i.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(_){return _.Prefix})),O.abrupt("return",{res:i.res,objects:r,deleteMarker:E,prefixes:p,nextMarker:i.data.NextMarker||null,NextVersionIdMarker:i.data.NextVersionIdMarker||null,isTruncated:i.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function n(h){return h.replace(/([A-Z])/g,"-$1").toLowerCase()}function s(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f={};return d(h)&&(0,g.default)(h).forEach(function(u){f[n(u)]=h[u]}),f}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.getObjectMeta=function(b,t){var d,a;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t=t||{},b=this._objectName(b),t.subres=(0,N.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectRequestParams("HEAD",b,t),d.successStatuses=[200],o.next=8,g.default.awrap(this.request(d));case 8:return a=o.sent,o.abrupt("return",{status:a.status,res:a.res});case 10:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(t){return t&&t.__esModule?t:{default:t}}var m=L,w=H("../utils/isObject"),b=w.isObject;m.getObjectTagging=function(d){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,o,n,s,h;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return a.subres=(0,N.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),d=this._objectName(d),c=this._objectRequestParams("GET",d,a),c.successStatuses=[200],u.next=7,g.default.awrap(this.request(c));case 7:return o=u.sent,u.next=10,g.default.awrap(this.parseXML(o.data));case 10:return n=u.sent,s=n.TagSet.Tag,s=s&&b(s)?[s]:s||[],h={},s.forEach(function(i){h[i.Key]=i.Value}),u.abrupt("return",{status:o.status,res:o.res,tag:h});case 16:case"end":return u.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.getSymlink=function(b){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,a,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return t.subres=(0,N.default)({symlink:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,t),d.successStatuses=[200],n.next=7,g.default.awrap(this.request(d));case 7:return a=n.sent,c=a.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(c),res:a.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=w(P),T=H("babel-runtime/core-js/object/keys"),N=w(T),v=H("babel-runtime/core-js/object/assign"),m=w(v);function w(t){return t&&t.__esModule?t:{default:t}}var b=L;b.head=function(d){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,o,n;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return a.subres=(0,m.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),c=this._objectRequestParams("HEAD",d,a),c.successStatuses=[200,304],h.next=6,g.default.awrap(this.request(c));case 6:return o=h.sent,n={meta:null,res:o.res,status:o.status},o.status===200&&(0,N.default)(o.headers).forEach(function(f){f.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[f.substring(11)]=o.headers[f])}),h.abrupt("return",n);case 10:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.putACL=function(b,t,d){var a,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return d=d||{},d.subres=(0,N.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.headers=d.headers||{},d.headers["x-oss-object-acl"]=t,b=this._objectName(b),a=this._objectRequestParams("PUT",b,d),a.successStatuses=[200],n.next=10,g.default.awrap(this.request(a));case 10:return c=n.sent,n.abrupt("return",{res:c.res});case 12:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=w(P),T=H("babel-runtime/core-js/object/keys"),N=w(T),v=H("babel-runtime/core-js/object/assign"),m=w(v);function w(o){return o&&o.__esModule?o:{default:o}}var b=H("../utils/obj2xml"),t=b.obj2xml,d=H("../utils/checkObjectTag"),a=d.checkObjectTag,c=L;c.putObjectTagging=function(n,s){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,u,i;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return a(s),h.subres=(0,m.default)({tagging:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),n=this._objectName(n),f=this._objectRequestParams("PUT",n,h),f.successStatuses=[200],s=(0,N.default)(s).map(function(y){return{Key:y,Value:s[y]}}),u={Tagging:{TagSet:{Tag:s}}},f.mime="xml",f.content=t(u),E.next=12,g.default.awrap(this.request(f));case 12:return i=E.sent,E.abrupt("return",{res:i.res,status:i.status});case 14:case"end":return E.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/object/assign"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m.putSymlink=function(b,t,d){var a,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return d=d||{},d.headers=d.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(d.meta,d.headers),d.headers["x-oss-symlink-target"]=t,d.subres=(0,N.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.storageClass&&(d.headers["x-oss-storage-class"]=d.storageClass),b=this._objectName(b),a=this._objectRequestParams("PUT",b,d),a.successStatuses=[200],n.next=13,g.default.awrap(this.request(a));case 13:return c=n.sent,n.abrupt("return",{res:c.res});case 15:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(H,q,L){"use strict";var P=H("babel-runtime/regenerator"),g=v(P),T=H("babel-runtime/core-js/promise"),N=v(T);function v(w){return w&&w.__esModule?w:{default:w}}var m=L;m._parallelNode=function(b,t,d,a){var c,o,n,s,h,f,u,i;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:c=this,o=[],n=[],s=b.length/t,h=b.length%t,f=h===0?s:(b.length-h)/t+1,u=1,i=0;case 8:if(!(i<b.length)){E.next=26;break}if(!c.isCancel()){E.next=11;break}return E.abrupt("break",26);case 11:if(a?n.push(d(c,b[i],a)):n.push(d(c,b[i])),!(n.length===t||u===f&&i===b.length-1)){E.next=23;break}return E.prev=13,u+=1,E.next=17,g.default.awrap(N.default.all(n));case 17:E.next=22;break;case 19:E.prev=19,E.t0=E.catch(13),o.push(E.t0);case 22:n=[];case 23:i++,E.next=8;break;case 26:return E.abrupt("return",o);case 27:case"end":return E.stop()}},null,this,[[13,19]])},m._parallel=function(b,t,d){var a=this;return new N.default(function(c){var o=[];if(t<=0||!b){c(o);return}function n(p){return function(){if(p===null)throw new Error("Callback was already called.");var R=p;p=null;for(var O=arguments.length,_=Array(O),x=0;x<O;x++)_[x]=arguments[x];R.apply(this,_)}}function s(p){var R=-1,O=p.length;return function(){return++R<O&&!a.isCancel()?{value:p[R],key:R}:null}}var h=s(b),f=!1,u=0,i=!1;function r(p,R){u-=1,p?(f=!0,o.push(p),c(o)):R==={}||f&&u<=0?(f=!0,c(o)):i||(a.isCancel()?c(o):y())}function E(p,R){d(p).then(function(O){R(null,O)}).catch(function(O){R(O)})}function y(){for(i=!0;u<t&&!f&&!a.isCancel();){var p=h();if(p===null||o.length>0){f=!0,u<=0&&c(o);return}u+=1,E(p.value,n(r))}i=!1}y()})},m.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/core-js/json/stringify"),T=m(g),N=H("babel-runtime/core-js/object/keys"),v=m(N);function m(t){return t&&t.__esModule?t:{default:t}}var w=H("./../../shims/crypto/crypto.js"),b=H("is-type-of");L.buildCanonicalizedResource=function(d,a){var c=""+d,o="?";if(b.string(a)&&a.trim()!=="")c+=o+a;else if(b.array(a))a.sort(),c+=o+a.join("&");else if(a){var n=function(f,u){return f[0]>u[0]?1:f[0]<u[0]?-1:0},s=function(f){c+=o+f,a[f]&&(c+="="+a[f]),o="&"};(0,v.default)(a).sort(n).forEach(s)}return c},L.buildCanonicalString=function(d,a,c,o){c=c||{};var n=c.headers||{},s="x-oss-",h=[],f={},u=[d.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],o||n["x-oss-date"]];return(0,v.default)(n).forEach(function(i){var r=i.toLowerCase();r.indexOf(s)===0&&(f[r]=String(n[i]).trim())}),(0,v.default)(f).sort().forEach(function(i){h.push(i+":"+f[i])}),u=u.concat(h),u.push(this.buildCanonicalizedResource(a,c.parameters)),u.join(`
`)},L.computeSignature=function(d,a){var c=w.createHmac("sha1",d);return c.update(P.from(a,"utf8")).digest("base64")},L.authorization=function(d,a,c){return"OSS "+d+":"+this.computeSignature(a,c)},L._signatureForURL=function(d){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],o=arguments[3],n={},s=a.subResource,h=s===void 0?{}:s;if(a.process){var f="x-oss-process";h[f]=a.process}if(a.trafficLimit){var u="x-oss-traffic-limit";h[u]=a.trafficLimit}if(a.response&&(0,v.default)(a.response).forEach(function(y){var p="response-"+y.toLowerCase();h[p]=a.response[y]}),(0,v.default)(a).forEach(function(y){var p=y.toLowerCase(),R=a[y];p.indexOf("x-oss-")===0?n[p]=R:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[y]=R)}),Object.prototype.hasOwnProperty.call(a,"security-token")&&(h["security-token"]=a["security-token"]),Object.prototype.hasOwnProperty.call(a,"callback")){var i={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};if(a.callback.host&&(i.callbackHost=a.callback.host),a.callback.contentType&&(i.callbackBodyType=a.callback.contentType),h.callback=P.from((0,T.default)(i)).toString("base64"),a.callback.customValue){var r={};(0,v.default)(a.callback.customValue).forEach(function(y){r["x:"+y]=a.callback.customValue[y]}),h["callback-var"]=P.from((0,T.default)(r)).toString("base64")}}var E=this.buildCanonicalString(a.method,c,{headers:n,parameters:h},o.toString());return{Signature:this.computeSignature(d,E),subResource:h}}}).call(this,H("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkBucketName=void 0,L.checkBucketName=function(P,g){var T=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/entries"),g=T(P);function T(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(L,"__esModule",{value:!0}),L.checkObjectTag=void 0;var N=H("./checkValid"),v=N.checkValid,m=H("./isObject"),w=m.isObject,b=[{validator:function(c){if(typeof c!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],t={key:[].concat(b,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(b,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function d(a){if(!w(a))throw new Error("tag must be Object");var c=(0,g.default)(a);if(c.length>10)throw new Error("maximum of 10 tags for a object");var o=["key","value"];c.forEach(function(n){n.forEach(function(s,h){v(s,t[o[h]])})})}L.checkObjectTag=d},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkValid=void 0;function P(g,T){T.forEach(function(N){if(N.validator)N.validator(g);else if(N.pattern&&!N.pattern.test(g))throw new Error(N.msg)})}L.checkValid=P},{}],38:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/core-js/object/assign"),T=N(g);function N(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(L,"__esModule",{value:!0}),L.createRequest=void 0;var v=H("./../../../shims/crypto/crypto.js"),m=H("debug")("ali-oss"),w=H("mime"),b=H("dateformat"),t=H("copy-to"),d=H("path");function a(n,s){return n[s]||n[s.toLowerCase()]}function c(n,s){delete n[s],delete n[s.toLowerCase()]}function o(n){var s=new Date;this.options.amendTimeSkewed&&(s=+new Date+this.options.amendTimeSkewed);var h={"x-oss-date":b(s,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(h["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(h,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(h["x-oss-security-token"]=this.options.stsToken),t(n.headers).to(h),a(h,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?h["Content-Type"]=n.mime:h["Content-Type"]=w.getType(n.mime||d.extname(n.object||""))),a(h,"Content-Type")||c(h,"Content-Type"),n.content&&(h["Content-Md5"]=v.createHash("md5").update(P.from(n.content,"utf8")).digest("base64"),h["Content-Length"]||(h["Content-Length"]=n.content.length));var f=this._getResource(n);h.authorization=this.authorization(n.method,f,n.subres,h);var u=this._getReqUrl(n);m("request %s %s, with headers %j, !!stream: %s",n.method,u,h,!!n.stream);var i=n.timeout||this.options.timeout,r={method:n.method,content:n.content,stream:n.stream,headers:h,timeout:i,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(r.agent=this.agent),this.httpsAgent&&(r.httpsAgent=this.httpsAgent),{url:u,params:r}}L.createRequest=o}).call(this,H("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/keys"),g=v(P),T=H("babel-runtime/helpers/typeof"),N=v(T);function v(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(L,"__esModule",{value:!0}),L.deepCopy=void 0,L.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,N.default)(m))!=="object")return m;var w=Array.isArray(m)?[]:{};return(0,g.default)(m).forEach(function(b){w[b]=L.deepCopy(m[b])}),w}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/keys"),g=v(P),T=H("babel-runtime/helpers/typeof"),N=v(T);function v(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(L,"__esModule",{value:!0}),L.formatObjKey=void 0;function m(b,t){if(b===null||(typeof b=="undefined"?"undefined":(0,N.default)(b))!=="object")return b;var d=void 0;if(Array.isArray(b)){d=[];for(var a=0;a<b.length;a++)d.push(m(b[a],t))}else d={},(0,g.default)(b).forEach(function(c){d[w(c,t)]=m(b[c],t)});return d}L.formatObjKey=m;function w(b,t){return t==="firstUpperCase"?b=b.replace(/^./,function(d){return d.toUpperCase()}):t==="firstLowerCase"&&(b=b.replace(/^./,function(d){return d.toLowerCase()})),b}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.getStrBytesCount=void 0;function P(g){for(var T=0,N=0;N<g.length;N++){var v=g.charAt(N);/^[\u00-\uff]$/.test(v)?T+=1:T+=2}return T}L.getStrBytesCount=P},{}],42:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isArray=void 0,L.isArray=function(P){return Object.prototype.toString.call(P)==="[object Array]"}},{}],43:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isBlob=void 0;function P(g){return typeof Blob!="undefined"&&g instanceof Blob}L.isBlob=P},{}],44:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isFile=void 0,L.isFile=function(P){return typeof File!="undefined"&&P instanceof File}},{}],45:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isIP=void 0,L.isIP=function(P){var g=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,T=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return g.test(P)||T.test(P)}},{}],46:[function(H,q,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isObject=void 0,L.isObject=function(P){return Object.prototype.toString.call(P)==="[object Object]"}},{}],47:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/keys"),g=T(P);function T(w){return w&&w.__esModule?w:{default:w}}Object.defineProperty(L,"__esModule",{value:!0}),L.obj2xml=void 0;var N=H("./formatObjKey");function v(w){return Object.prototype.toString.call(w).replace(/(.*? |])/g,"").toLowerCase()}function m(w,b){var t="";return b&&b.headers&&(t=`<?xml version="1.0" encoding="UTF-8"?>
`),b&&b.firstUpperCase&&(w=N.formatObjKey(w,"firstUpperCase")),v(w)==="object"?(0,g.default)(w).forEach(function(d){v(w[d])==="string"||v(w[d])==="number"?t+="<"+d+">"+w[d]+"</"+d+">":v(w[d])==="object"?t+="<"+d+">"+m(w[d])+"</"+d+">":v(w[d])==="array"?t+=w[d].map(function(a){return"<"+d+">"+m(a)+"</"+d+">"}).join(""):t+="<"+d+">"+w[d].toString()+"</"+d+">"}):t+=w.toString(),t}L.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(H,q,L){q.exports=P,q.exports.HttpsAgent=P;function P(){}},{}],49:[function(H,q,L){q.exports=H("./register")().Promise},{"./register":51}],50:[function(H,q,L){"use strict";var P="@@any-promise/REGISTRATION",g=null;q.exports=function(T,N){return function(m,w){m=m||null,w=w||{};var b=w.global!==!1;if(g===null&&b&&(g=T[P]||null),g!==null&&m!==null&&g.implementation!==m)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(m!==null&&typeof w.Promise!="undefined"?g={Promise:w.Promise,implementation:m}:g=N(m),b&&(T[P]=g)),g}}},{}],51:[function(H,q,L){"use strict";q.exports=H("./loader")(window,P);function P(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(H,q,L){q.exports={default:H("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(H,q,L){q.exports={default:H("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(H,q,L){q.exports={default:H("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(H,q,L){q.exports={default:H("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(H,q,L){q.exports={default:H("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(H,q,L){q.exports={default:H("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(H,q,L){q.exports={default:H("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(H,q,L){q.exports={default:H("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(H,q,L){q.exports={default:H("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(H,q,L){"use strict";L.__esModule=!0;var P=H("../core-js/symbol/iterator"),g=m(P),T=H("../core-js/symbol"),N=m(T),v=typeof N.default=="function"&&typeof g.default=="symbol"?function(w){return typeof w}:function(w){return w&&typeof N.default=="function"&&w.constructor===N.default&&w!==N.default.prototype?"symbol":typeof w};function m(w){return w&&w.__esModule?w:{default:w}}L.default=typeof N.default=="function"&&v(g.default)==="symbol"?function(w){return typeof w=="undefined"?"undefined":v(w)}:function(w){return w&&typeof N.default=="function"&&w.constructor===N.default&&w!==N.default.prototype?"symbol":typeof w=="undefined"?"undefined":v(w)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(H,q,L){q.exports=H("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(H,q,L){"use strict";L.byteLength=b,L.toByteArray=d,L.fromByteArray=o;for(var P=[],g=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,m=N.length;v<m;++v)P[v]=N[v],g[N.charCodeAt(v)]=v;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function w(n){var s=n.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=n.indexOf("=");h===-1&&(h=s);var f=h===s?0:4-h%4;return[h,f]}function b(n){var s=w(n),h=s[0],f=s[1];return(h+f)*3/4-f}function t(n,s,h){return(s+h)*3/4-h}function d(n){var s,h=w(n),f=h[0],u=h[1],i=new T(t(n,f,u)),r=0,E=u>0?f-4:f,y;for(y=0;y<E;y+=4)s=g[n.charCodeAt(y)]<<18|g[n.charCodeAt(y+1)]<<12|g[n.charCodeAt(y+2)]<<6|g[n.charCodeAt(y+3)],i[r++]=s>>16&255,i[r++]=s>>8&255,i[r++]=s&255;return u===2&&(s=g[n.charCodeAt(y)]<<2|g[n.charCodeAt(y+1)]>>4,i[r++]=s&255),u===1&&(s=g[n.charCodeAt(y)]<<10|g[n.charCodeAt(y+1)]<<4|g[n.charCodeAt(y+2)]>>2,i[r++]=s>>8&255,i[r++]=s&255),i}function a(n){return P[n>>18&63]+P[n>>12&63]+P[n>>6&63]+P[n&63]}function c(n,s,h){for(var f,u=[],i=s;i<h;i+=3)f=(n[i]<<16&16711680)+(n[i+1]<<8&65280)+(n[i+2]&255),u.push(a(f));return u.join("")}function o(n){for(var s,h=n.length,f=h%3,u=[],i=16383,r=0,E=h-f;r<E;r+=i)u.push(c(n,r,r+i>E?E:r+i));return f===1?(s=n[h-1],u.push(P[s>>2]+P[s<<4&63]+"==")):f===2&&(s=(n[h-2]<<8)+n[h-1],u.push(P[s>>10]+P[s>>4&63]+P[s<<2&63]+"=")),u.join("")}},{}],70:[function(H,q,L){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(P,g,T){typeof q!="undefined"&&q.exports?q.exports=T():typeof define=="function"&&define.amd?define(g,T):P[g]=T()}(this,"bowser",function(){var P=!0;function g(t){function d(W){var U=t.match(W);return U&&U.length>1&&U[1]||""}function a(W){var U=t.match(W);return U&&U.length>1&&U[2]||""}var c=d(/(ipod|iphone|ipad)/i).toLowerCase(),o=/like android/i.test(t),n=!o&&/android/i.test(t),s=/nexus\s*[0-6]\s*/i.test(t),h=!s&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),u=/silk/i.test(t),i=/sailfish/i.test(t),r=/tizen/i.test(t),E=/(web|hpw)(o|0)s/i.test(t),y=/windows phone/i.test(t),p=/SamsungBrowser/i.test(t),R=!y&&/windows/i.test(t),O=!c&&!u&&/macintosh/i.test(t),_=!n&&!i&&!r&&!E&&/linux/i.test(t),x=a(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),S=d(/version\/(\d+(\.\d+)?)/i),C=/tablet/i.test(t)&&!/tablet pc/i.test(t),j=!C&&/[^-]mobi/i.test(t),F=/xbox/i.test(t),M;/opera/i.test(t)?M={name:"Opera",opera:P,version:S||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?M={name:"Opera",opera:P,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||S}:/SamsungBrowser/i.test(t)?M={name:"Samsung Internet for Android",samsungBrowser:P,version:S||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?M={name:"NAVER Whale browser",whale:P,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?M={name:"MZ Browser",mzbrowser:P,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?M={name:"Opera Coast",coast:P,version:S||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?M={name:"Focus",focus:P,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?M={name:"Yandex Browser",yandexbrowser:P,version:S||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?M={name:"UC Browser",ucbrowser:P,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?M={name:"Maxthon",maxthon:P,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?M={name:"Epiphany",epiphany:P,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?M={name:"Puffin",puffin:P,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?M={name:"Sleipnir",sleipnir:P,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?M={name:"K-Meleon",kMeleon:P,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:y?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},x?(M.msedge=P,M.version=x):(M.msie=P,M.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?M={name:"Internet Explorer",msie:P,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?M={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?M={name:"Microsoft Edge",msedge:P,version:x}:/vivaldi/i.test(t)?M={name:"Vivaldi",vivaldi:P,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||S}:i?M={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?M={name:"SeaMonkey",seamonkey:P,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(M={name:"Firefox",firefox:P,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(M.firefoxos=P,M.osname="Firefox OS")):u?M={name:"Amazon Silk",silk:P,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?M={name:"PhantomJS",phantom:P,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?M={name:"SlimerJS",slimer:P,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:S||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:E?(M={name:"WebOS",osname:"WebOS",webos:P,version:S||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(M.touchpad=P)):/bada/i.test(t)?M={name:"Bada",osname:"Bada",bada:P,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:r?M={name:"Tizen",osname:"Tizen",tizen:P,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||S}:/qupzilla/i.test(t)?M={name:"QupZilla",qupzilla:P,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||S}:/chromium/i.test(t)?M={name:"Chromium",chromium:P,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||S}:/chrome|crios|crmo/i.test(t)?M={name:"Chrome",chrome:P,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?M={name:"Android",version:S}:/safari|applewebkit/i.test(t)?(M={name:"Safari",safari:P},S&&(M.version=S)):c?(M={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},S&&(M.version=S)):/googlebot/i.test(t)?M={name:"Googlebot",googlebot:P,version:d(/googlebot\/(\d+(\.\d+))/i)||S}:M={name:d(/^(.*)\/(.*) /),version:a(/^(.*)\/(.*) /)},!M.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(M.name=M.name||"Blink",M.blink=P):(M.name=M.name||"Webkit",M.webkit=P),!M.version&&S&&(M.version=S)):!M.opera&&/gecko\//i.test(t)&&(M.name=M.name||"Gecko",M.gecko=P,M.version=M.version||d(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(n||M.silk)?(M.android=P,M.osname="Android"):!M.windowsphone&&c?(M[c]=P,M.ios=P,M.osname="iOS"):O?(M.mac=P,M.osname="macOS"):F?(M.xbox=P,M.osname="Xbox"):R?(M.windows=P,M.osname="Windows"):_&&(M.linux=P,M.osname="Linux");function Y(W){switch(W){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 K="";M.windows?K=Y(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):M.windowsphone?K=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):M.mac?(K=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):c?(K=d(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):n?K=d(/android[ \/-](\d+(\.\d+)*)/i):M.webos?K=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):M.blackberry?K=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):M.bada?K=d(/bada\/(\d+(\.\d+)*)/i):M.tizen&&(K=d(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(M.osversion=K);var A=!M.windows&&K.split(".")[0];return C||h||c=="ipad"||n&&(A==3||A>=4&&!j)||M.silk?M.tablet=P:(j||c=="iphone"||c=="ipod"||n||s||M.blackberry||M.webos||M.bada)&&(M.mobile=P),M.msedge||M.msie&&M.version>=10||M.yandexbrowser&&M.version>=15||M.vivaldi&&M.version>=1||M.chrome&&M.version>=20||M.samsungBrowser&&M.version>=4||M.whale&&m([M.version,"1.0"])===1||M.mzbrowser&&m([M.version,"6.0"])===1||M.focus&&m([M.version,"1.0"])===1||M.firefox&&M.version>=20||M.safari&&M.version>=6||M.opera&&M.version>=10||M.ios&&M.osversion&&M.osversion.split(".")[0]>=6||M.blackberry&&M.version>=10.1||M.chromium&&M.version>=20?M.a=P:M.msie&&M.version<10||M.chrome&&M.version<20||M.firefox&&M.version<20||M.safari&&M.version<6||M.opera&&M.version<10||M.ios&&M.osversion&&M.osversion.split(".")[0]<6||M.chromium&&M.version<20?M.c=P:M.x=P,M}var T=g(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(t){for(var d=0;d<t.length;++d){var a=t[d];if(typeof a=="string"&&a in T)return!0}return!1};function N(t){return t.split(".").length}function v(t,d){var a=[],c;if(Array.prototype.map)return Array.prototype.map.call(t,d);for(c=0;c<t.length;c++)a.push(d(t[c]));return a}function m(t){for(var d=Math.max(N(t[0]),N(t[1])),a=v(t,function(c){var o=d-N(c);return c=c+new Array(o+1).join(".0"),v(c.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--d>=0;){if(a[0][d]>a[1][d])return 1;if(a[0][d]===a[1][d]){if(d===0)return 0}else return-1}}function w(t,d,a){var c=T;typeof d=="string"&&(a=d,d=void 0),d===void 0&&(d=!1),a&&(c=g(a));var o=""+c.version;for(var n in t)if(t.hasOwnProperty(n)&&c[n]){if(typeof t[n]!="string")throw new Error("Browser version in the minVersion map should be a string: "+n+": "+String(t));return m([o,t[n]])<0}return d}function b(t,d,a){return!w(t,d,a)}return T.isUnsupportedBrowser=w,T.compareVersions=m,T.check=b,T._detect=g,T.detect=g,T})},{}],71:[function(H,q,L){},{}],72:[function(H,q,L){var P=H("buffer").Buffer,g=P.isEncoding||function(b){switch(b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(b){if(b&&!g(b))throw new Error("Unknown encoding: "+b)}var N=L.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),T(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=w;break;default:this.write=v;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};N.prototype.write=function(b){for(var t="";this.charLength;){var d=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived<this.charLength)return"";b=b.slice(d,b.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,b.length===0)return t;break}this.detectIncompleteChar(b);var a=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,a),a-=this.charReceived),t+=b.toString(this.encoding,0,a);var a=t.length-1,c=t.charCodeAt(a);if(c>=55296&&c<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),b.copy(this.charBuffer,0,0,o),t.substring(0,a)}return t},N.prototype.detectIncompleteChar=function(b){for(var t=b.length>=3?3:b.length;t>0;t--){var d=b[b.length-t];if(t==1&&d>>5==6){this.charLength=2;break}if(t<=2&&d>>4==14){this.charLength=3;break}if(t<=3&&d>>3==30){this.charLength=4;break}}this.charReceived=t},N.prototype.end=function(b){var t="";if(b&&b.length&&(t=this.write(b)),this.charReceived){var d=this.charReceived,a=this.charBuffer,c=this.encoding;t+=a.slice(0,d).toString(c)}return t};function v(b){return b.toString(this.encoding)}function m(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function w(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(H,q,L){(function(P,g){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var T=H("base64-js"),N=H("ieee754"),v=H("isarray");L.Buffer=g,L.SlowBuffer=u,L.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:m(),L.kMaxLength=w();function m(){try{var ne=new Uint8Array(1);return ne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ne.foo()===42&&typeof ne.subarray=="function"&&ne.subarray(1,1).byteLength===0}catch(re){return!1}}function w(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(ne,re){if(w()<re)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(ne=new Uint8Array(re),ne.__proto__=g.prototype):(ne===null&&(ne=new g(re)),ne.length=re),ne}function g(ne,re,$){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(ne,re,$);if(typeof ne=="number"){if(typeof re=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ne)}return t(this,ne,re,$)}g.poolSize=8192,g._augment=function(ne){return ne.__proto__=g.prototype,ne};function t(ne,re,$,J){if(typeof re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&re instanceof ArrayBuffer?s(ne,re,$,J):typeof re=="string"?o(ne,re,$):h(ne,re)}g.from=function(ne,re,$){return t(null,ne,re,$)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0}));function d(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be a number');if(ne<0)throw new RangeError('"size" argument must not be negative')}function a(ne,re,$,J){return d(re),re<=0?b(ne,re):$!==void 0?typeof J=="string"?b(ne,re).fill($,J):b(ne,re).fill($):b(ne,re)}g.alloc=function(ne,re,$){return a(null,ne,re,$)};function c(ne,re){if(d(re),ne=b(ne,re<0?0:f(re)|0),!g.TYPED_ARRAY_SUPPORT)for(var $=0;$<re;++$)ne[$]=0;return ne}g.allocUnsafe=function(ne){return c(null,ne)},g.allocUnsafeSlow=function(ne){return c(null,ne)};function o(ne,re,$){if((typeof $!="string"||$==="")&&($="utf8"),!g.isEncoding($))throw new TypeError('"encoding" must be a valid string encoding');var J=i(re,$)|0;ne=b(ne,J);var le=ne.write(re,$);return le!==J&&(ne=ne.slice(0,le)),ne}function n(ne,re){var $=re.length<0?0:f(re.length)|0;ne=b(ne,$);for(var J=0;J<$;J+=1)ne[J]=re[J]&255;return ne}function s(ne,re,$,J){if(re.byteLength,$<0||re.byteLength<$)throw new RangeError("'offset' is out of bounds");if(re.byteLength<$+(J||0))throw new RangeError("'length' is out of bounds");return $===void 0&&J===void 0?re=new Uint8Array(re):J===void 0?re=new Uint8Array(re,$):re=new Uint8Array(re,$,J),g.TYPED_ARRAY_SUPPORT?(ne=re,ne.__proto__=g.prototype):ne=n(ne,re),ne}function h(ne,re){if(g.isBuffer(re)){var $=f(re.length)|0;return ne=b(ne,$),ne.length===0||re.copy(ne,0,0,$),ne}if(re){if(typeof ArrayBuffer!="undefined"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||Z(re.length)?b(ne,0):n(ne,re);if(re.type==="Buffer"&&v(re.data))return n(ne,re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(ne){if(ne>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return ne|0}function u(ne){return+ne!=ne&&(ne=0),g.alloc(+ne)}g.isBuffer=function(re){return!!(re!=null&&re._isBuffer)},g.compare=function(re,$){if(!g.isBuffer(re)||!g.isBuffer($))throw new TypeError("Arguments must be Buffers");if(re===$)return 0;for(var J=re.length,le=$.length,ue=0,we=Math.min(J,le);ue<we;++ue)if(re[ue]!==$[ue]){J=re[ue],le=$[ue];break}return J<le?-1:le<J?1:0},g.isEncoding=function(re){switch(String(re).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.concat=function(re,$){if(!v(re))throw new TypeError('"list" argument must be an Array of Buffers');if(re.length===0)return g.alloc(0);var J;if($===void 0)for($=0,J=0;J<re.length;++J)$+=re[J].length;var le=g.allocUnsafe($),ue=0;for(J=0;J<re.length;++J){var we=re[J];if(!g.isBuffer(we))throw new TypeError('"list" argument must be an Array of Buffers');we.copy(le,ue),ue+=we.length}return le};function i(ne,re){if(g.isBuffer(ne))return ne.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ne)||ne instanceof ArrayBuffer))return ne.byteLength;typeof ne!="string"&&(ne=""+ne);var $=ne.length;if($===0)return 0;for(var J=!1;;)switch(re){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return ee(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return V(ne).length;default:if(J)return ee(ne).length;re=(""+re).toLowerCase(),J=!0}}g.byteLength=i;function r(ne,re,$){var J=!1;if((re===void 0||re<0)&&(re=0),re>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,re>>>=0,$<=re)return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return W(this,re,$);case"utf8":case"utf-8":return F(this,re,$);case"ascii":return K(this,re,$);case"latin1":case"binary":return A(this,re,$);case"base64":return j(this,re,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,re,$);default:if(J)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),J=!0}}g.prototype._isBuffer=!0;function E(ne,re,$){var J=ne[re];ne[re]=ne[$],ne[$]=J}g.prototype.swap16=function(){var re=this.length;if(re%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $=0;$<re;$+=2)E(this,$,$+1);return this},g.prototype.swap32=function(){var re=this.length;if(re%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $=0;$<re;$+=4)E(this,$,$+3),E(this,$+1,$+2);return this},g.prototype.swap64=function(){var re=this.length;if(re%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $=0;$<re;$+=8)E(this,$,$+7),E(this,$+1,$+6),E(this,$+2,$+5),E(this,$+3,$+4);return this},g.prototype.toString=function(){var re=this.length|0;return re===0?"":arguments.length===0?F(this,0,re):r.apply(this,arguments)},g.prototype.equals=function(re){if(!g.isBuffer(re))throw new TypeError("Argument must be a Buffer");return this===re?!0:g.compare(this,re)===0},g.prototype.inspect=function(){var re="",$=L.INSPECT_MAX_BYTES;return this.length>0&&(re=this.toString("hex",0,$).match(/.{2}/g).join(" "),this.length>$&&(re+=" ... ")),"<Buffer "+re+">"},g.prototype.compare=function(re,$,J,le,ue){if(!g.isBuffer(re))throw new TypeError("Argument must be a Buffer");if($===void 0&&($=0),J===void 0&&(J=re?re.length:0),le===void 0&&(le=0),ue===void 0&&(ue=this.length),$<0||J>re.length||le<0||ue>this.length)throw new RangeError("out of range index");if(le>=ue&&$>=J)return 0;if(le>=ue)return-1;if($>=J)return 1;if($>>>=0,J>>>=0,le>>>=0,ue>>>=0,this===re)return 0;for(var we=ue-le,Fe=J-$,Xe=Math.min(we,Fe),$e=this.slice(le,ue),et=re.slice($,J),nt=0;nt<Xe;++nt)if($e[nt]!==et[nt]){we=$e[nt],Fe=et[nt];break}return we<Fe?-1:Fe<we?1:0};function y(ne,re,$,J,le){if(ne.length===0)return-1;if(typeof $=="string"?(J=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=le?0:ne.length-1),$<0&&($=ne.length+$),$>=ne.length){if(le)return-1;$=ne.length-1}else if($<0)if(le)$=0;else return-1;if(typeof re=="string"&&(re=g.from(re,J)),g.isBuffer(re))return re.length===0?-1:p(ne,re,$,J,le);if(typeof re=="number")return re=re&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ne,re,$):Uint8Array.prototype.lastIndexOf.call(ne,re,$):p(ne,[re],$,J,le);throw new TypeError("val must be string, number or Buffer")}function p(ne,re,$,J,le){var ue=1,we=ne.length,Fe=re.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(ne.length<2||re.length<2)return-1;ue=2,we/=2,Fe/=2,$/=2}function Xe(Be,Ie){return ue===1?Be[Ie]:Be.readUInt16BE(Ie*ue)}var $e;if(le){var et=-1;for($e=$;$e<we;$e++)if(Xe(ne,$e)===Xe(re,et===-1?0:$e-et)){if(et===-1&&(et=$e),$e-et+1===Fe)return et*ue}else et!==-1&&($e-=$e-et),et=-1}else for($+Fe>we&&($=we-Fe),$e=$;$e>=0;$e--){for(var nt=!0,at=0;at<Fe;at++)if(Xe(ne,$e+at)!==Xe(re,at)){nt=!1;break}if(nt)return $e}return-1}g.prototype.includes=function(re,$,J){return this.indexOf(re,$,J)!==-1},g.prototype.indexOf=function(re,$,J){return y(this,re,$,J,!0)},g.prototype.lastIndexOf=function(re,$,J){return y(this,re,$,J,!1)};function R(ne,re,$,J){$=Number($)||0;var le=ne.length-$;J?(J=Number(J),J>le&&(J=le)):J=le;var ue=re.length;if(ue%2!==0)throw new TypeError("Invalid hex string");J>ue/2&&(J=ue/2);for(var we=0;we<J;++we){var Fe=parseInt(re.substr(we*2,2),16);if(isNaN(Fe))return we;ne[$+we]=Fe}return we}function O(ne,re,$,J){return Q(ee(re,ne.length-$),ne,$,J)}function _(ne,re,$,J){return Q(B(re),ne,$,J)}function x(ne,re,$,J){return _(ne,re,$,J)}function S(ne,re,$,J){return Q(V(re),ne,$,J)}function C(ne,re,$,J){return Q(G(re,ne.length-$),ne,$,J)}g.prototype.write=function(re,$,J,le){if($===void 0)le="utf8",J=this.length,$=0;else if(J===void 0&&typeof $=="string")le=$,J=this.length,$=0;else if(isFinite($))$=$|0,isFinite(J)?(J=J|0,le===void 0&&(le="utf8")):(le=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-$;if((J===void 0||J>ue)&&(J=ue),re.length>0&&(J<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var we=!1;;)switch(le){case"hex":return R(this,re,$,J);case"utf8":case"utf-8":return O(this,re,$,J);case"ascii":return _(this,re,$,J);case"latin1":case"binary":return x(this,re,$,J);case"base64":return S(this,re,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,re,$,J);default:if(we)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),we=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(ne,re,$){return re===0&&$===ne.length?T.fromByteArray(ne):T.fromByteArray(ne.slice(re,$))}function F(ne,re,$){$=Math.min(ne.length,$);for(var J=[],le=re;le<$;){var ue=ne[le],we=null,Fe=ue>239?4:ue>223?3:ue>191?2:1;if(le+Fe<=$){var Xe,$e,et,nt;switch(Fe){case 1:ue<128&&(we=ue);break;case 2:Xe=ne[le+1],(Xe&192)===128&&(nt=(ue&31)<<6|Xe&63,nt>127&&(we=nt));break;case 3:Xe=ne[le+1],$e=ne[le+2],(Xe&192)===128&&($e&192)===128&&(nt=(ue&15)<<12|(Xe&63)<<6|$e&63,nt>2047&&(nt<55296||nt>57343)&&(we=nt));break;case 4:Xe=ne[le+1],$e=ne[le+2],et=ne[le+3],(Xe&192)===128&&($e&192)===128&&(et&192)===128&&(nt=(ue&15)<<18|(Xe&63)<<12|($e&63)<<6|et&63,nt>65535&&nt<1114112&&(we=nt))}}we===null?(we=65533,Fe=1):we>65535&&(we-=65536,J.push(we>>>10&1023|55296),we=56320|we&1023),J.push(we),le+=Fe}return Y(J)}var M=4096;function Y(ne){var re=ne.length;if(re<=M)return String.fromCharCode.apply(String,ne);for(var $="",J=0;J<re;)$+=String.fromCharCode.apply(String,ne.slice(J,J+=M));return $}function K(ne,re,$){var J="";$=Math.min(ne.length,$);for(var le=re;le<$;++le)J+=String.fromCharCode(ne[le]&127);return J}function A(ne,re,$){var J="";$=Math.min(ne.length,$);for(var le=re;le<$;++le)J+=String.fromCharCode(ne[le]);return J}function W(ne,re,$){var J=ne.length;(!re||re<0)&&(re=0),(!$||$<0||$>J)&&($=J);for(var le="",ue=re;ue<$;++ue)le+=se(ne[ue]);return le}function U(ne,re,$){for(var J=ne.slice(re,$),le="",ue=0;ue<J.length;ue+=2)le+=String.fromCharCode(J[ue]+J[ue+1]*256);return le}g.prototype.slice=function(re,$){var J=this.length;re=~~re,$=$===void 0?J:~~$,re<0?(re+=J,re<0&&(re=0)):re>J&&(re=J),$<0?($+=J,$<0&&($=0)):$>J&&($=J),$<re&&($=re);var le;if(g.TYPED_ARRAY_SUPPORT)le=this.subarray(re,$),le.__proto__=g.prototype;else{var ue=$-re;le=new g(ue,void 0);for(var we=0;we<ue;++we)le[we]=this[we+re]}return le};function D(ne,re,$){if(ne%1!==0||ne<0)throw new RangeError("offset is not uint");if(ne+re>$)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(re,$,J){re=re|0,$=$|0,J||D(re,$,this.length);for(var le=this[re],ue=1,we=0;++we<$&&(ue*=256);)le+=this[re+we]*ue;return le},g.prototype.readUIntBE=function(re,$,J){re=re|0,$=$|0,J||D(re,$,this.length);for(var le=this[re+--$],ue=1;$>0&&(ue*=256);)le+=this[re+--$]*ue;return le},g.prototype.readUInt8=function(re,$){return $||D(re,1,this.length),this[re]},g.prototype.readUInt16LE=function(re,$){return $||D(re,2,this.length),this[re]|this[re+1]<<8},g.prototype.readUInt16BE=function(re,$){return $||D(re,2,this.length),this[re]<<8|this[re+1]},g.prototype.readUInt32LE=function(re,$){return $||D(re,4,this.length),(this[re]|this[re+1]<<8|this[re+2]<<16)+this[re+3]*16777216},g.prototype.readUInt32BE=function(re,$){return $||D(re,4,this.length),this[re]*16777216+(this[re+1]<<16|this[re+2]<<8|this[re+3])},g.prototype.readIntLE=function(re,$,J){re=re|0,$=$|0,J||D(re,$,this.length);for(var le=this[re],ue=1,we=0;++we<$&&(ue*=256);)le+=this[re+we]*ue;return ue*=128,le>=ue&&(le-=Math.pow(2,8*$)),le},g.prototype.readIntBE=function(re,$,J){re=re|0,$=$|0,J||D(re,$,this.length);for(var le=$,ue=1,we=this[re+--le];le>0&&(ue*=256);)we+=this[re+--le]*ue;return ue*=128,we>=ue&&(we-=Math.pow(2,8*$)),we},g.prototype.readInt8=function(re,$){return $||D(re,1,this.length),this[re]&128?(255-this[re]+1)*-1:this[re]},g.prototype.readInt16LE=function(re,$){$||D(re,2,this.length);var J=this[re]|this[re+1]<<8;return J&32768?J|4294901760:J},g.prototype.readInt16BE=function(re,$){$||D(re,2,this.length);var J=this[re+1]|this[re]<<8;return J&32768?J|4294901760:J},g.prototype.readInt32LE=function(re,$){return $||D(re,4,this.length),this[re]|this[re+1]<<8|this[re+2]<<16|this[re+3]<<24},g.prototype.readInt32BE=function(re,$){return $||D(re,4,this.length),this[re]<<24|this[re+1]<<16|this[re+2]<<8|this[re+3]},g.prototype.readFloatLE=function(re,$){return $||D(re,4,this.length),N.read(this,re,!0,23,4)},g.prototype.readFloatBE=function(re,$){return $||D(re,4,this.length),N.read(this,re,!1,23,4)},g.prototype.readDoubleLE=function(re,$){return $||D(re,8,this.length),N.read(this,re,!0,52,8)},g.prototype.readDoubleBE=function(re,$){return $||D(re,8,this.length),N.read(this,re,!1,52,8)};function X(ne,re,$,J,le,ue){if(!g.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(re>le||re<ue)throw new RangeError('"value" argument is out of bounds');if($+J>ne.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(re,$,J,le){if(re=+re,$=$|0,J=J|0,!le){var ue=Math.pow(2,8*J)-1;X(this,re,$,J,ue,0)}var we=1,Fe=0;for(this[$]=re&255;++Fe<J&&(we*=256);)this[$+Fe]=re/we&255;return $+J},g.prototype.writeUIntBE=function(re,$,J,le){if(re=+re,$=$|0,J=J|0,!le){var ue=Math.pow(2,8*J)-1;X(this,re,$,J,ue,0)}var we=J-1,Fe=1;for(this[$+we]=re&255;--we>=0&&(Fe*=256);)this[$+we]=re/Fe&255;return $+J},g.prototype.writeUInt8=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,1,255,0),g.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),this[$]=re&255,$+1};function ie(ne,re,$,J){re<0&&(re=65535+re+1);for(var le=0,ue=Math.min(ne.length-$,2);le<ue;++le)ne[$+le]=(re&255<<8*(J?le:1-le))>>>(J?le:1-le)*8}g.prototype.writeUInt16LE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[$]=re&255,this[$+1]=re>>>8):ie(this,re,$,!0),$+2},g.prototype.writeUInt16BE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[$]=re>>>8,this[$+1]=re&255):ie(this,re,$,!1),$+2};function oe(ne,re,$,J){re<0&&(re=4294967295+re+1);for(var le=0,ue=Math.min(ne.length-$,4);le<ue;++le)ne[$+le]=re>>>(J?le:3-le)*8&255}g.prototype.writeUInt32LE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[$+3]=re>>>24,this[$+2]=re>>>16,this[$+1]=re>>>8,this[$]=re&255):oe(this,re,$,!0),$+4},g.prototype.writeUInt32BE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[$]=re>>>24,this[$+1]=re>>>16,this[$+2]=re>>>8,this[$+3]=re&255):oe(this,re,$,!1),$+4},g.prototype.writeIntLE=function(re,$,J,le){if(re=+re,$=$|0,!le){var ue=Math.pow(2,8*J-1);X(this,re,$,J,ue-1,-ue)}var we=0,Fe=1,Xe=0;for(this[$]=re&255;++we<J&&(Fe*=256);)re<0&&Xe===0&&this[$+we-1]!==0&&(Xe=1),this[$+we]=(re/Fe>>0)-Xe&255;return $+J},g.prototype.writeIntBE=function(re,$,J,le){if(re=+re,$=$|0,!le){var ue=Math.pow(2,8*J-1);X(this,re,$,J,ue-1,-ue)}var we=J-1,Fe=1,Xe=0;for(this[$+we]=re&255;--we>=0&&(Fe*=256);)re<0&&Xe===0&&this[$+we+1]!==0&&(Xe=1),this[$+we]=(re/Fe>>0)-Xe&255;return $+J},g.prototype.writeInt8=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,1,127,-128),g.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),re<0&&(re=255+re+1),this[$]=re&255,$+1},g.prototype.writeInt16LE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[$]=re&255,this[$+1]=re>>>8):ie(this,re,$,!0),$+2},g.prototype.writeInt16BE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[$]=re>>>8,this[$+1]=re&255):ie(this,re,$,!1),$+2},g.prototype.writeInt32LE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[$]=re&255,this[$+1]=re>>>8,this[$+2]=re>>>16,this[$+3]=re>>>24):oe(this,re,$,!0),$+4},g.prototype.writeInt32BE=function(re,$,J){return re=+re,$=$|0,J||X(this,re,$,4,2147483647,-2147483648),re<0&&(re=4294967295+re+1),g.TYPED_ARRAY_SUPPORT?(this[$]=re>>>24,this[$+1]=re>>>16,this[$+2]=re>>>8,this[$+3]=re&255):oe(this,re,$,!1),$+4};function de(ne,re,$,J,le,ue){if($+J>ne.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function Ce(ne,re,$,J,le){return le||de(ne,re,$,4,34028234663852886e22,-34028234663852886e22),N.write(ne,re,$,J,23,4),$+4}g.prototype.writeFloatLE=function(re,$,J){return Ce(this,re,$,!0,J)},g.prototype.writeFloatBE=function(re,$,J){return Ce(this,re,$,!1,J)};function Ae(ne,re,$,J,le){return le||de(ne,re,$,8,17976931348623157e292,-17976931348623157e292),N.write(ne,re,$,J,52,8),$+8}g.prototype.writeDoubleLE=function(re,$,J){return Ae(this,re,$,!0,J)},g.prototype.writeDoubleBE=function(re,$,J){return Ae(this,re,$,!1,J)},g.prototype.copy=function(re,$,J,le){if(J||(J=0),!le&&le!==0&&(le=this.length),$>=re.length&&($=re.length),$||($=0),le>0&&le<J&&(le=J),le===J)return 0;if(re.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("sourceStart out of bounds");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),re.length-$<le-J&&(le=re.length-$+J);var ue=le-J,we;if(this===re&&J<$&&$<le)for(we=ue-1;we>=0;--we)re[we+$]=this[we+J];else if(ue<1e3||!g.TYPED_ARRAY_SUPPORT)for(we=0;we<ue;++we)re[we+$]=this[we+J];else Uint8Array.prototype.set.call(re,this.subarray(J,J+ue),$);return ue},g.prototype.fill=function(re,$,J,le){if(typeof re=="string"){if(typeof $=="string"?(le=$,$=0,J=this.length):typeof J=="string"&&(le=J,J=this.length),re.length===1){var ue=re.charCodeAt(0);ue<256&&(re=ue)}if(le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!g.isEncoding(le))throw new TypeError("Unknown encoding: "+le)}else typeof re=="number"&&(re=re&255);if($<0||this.length<$||this.length<J)throw new RangeError("Out of range index");if(J<=$)return this;$=$>>>0,J=J===void 0?this.length:J>>>0,re||(re=0);var we;if(typeof re=="number")for(we=$;we<J;++we)this[we]=re;else{var Fe=g.isBuffer(re)?re:ee(new g(re,le).toString()),Xe=Fe.length;for(we=0;we<J-$;++we)this[we+$]=Fe[we%Xe]}return this};var me=/[^+\/0-9A-Za-z-_]/g;function Se(ne){if(ne=ye(ne).replace(me,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function ye(ne){return ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")}function se(ne){return ne<16?"0"+ne.toString(16):ne.toString(16)}function ee(ne,re){re=re||Infinity;for(var $,J=ne.length,le=null,ue=[],we=0;we<J;++we){if($=ne.charCodeAt(we),$>55295&&$<57344){if(!le){if($>56319){(re-=3)>-1&&ue.push(239,191,189);continue}else if(we+1===J){(re-=3)>-1&&ue.push(239,191,189);continue}le=$;continue}if($<56320){(re-=3)>-1&&ue.push(239,191,189),le=$;continue}$=(le-55296<<10|$-56320)+65536}else le&&((re-=3)>-1&&ue.push(239,191,189));if(le=null,$<128){if((re-=1)<0)break;ue.push($)}else if($<2048){if((re-=2)<0)break;ue.push($>>6|192,$&63|128)}else if($<65536){if((re-=3)<0)break;ue.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((re-=4)<0)break;ue.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return ue}function B(ne){for(var re=[],$=0;$<ne.length;++$)re.push(ne.charCodeAt($)&255);return re}function G(ne,re){for(var $,J,le,ue=[],we=0;we<ne.length&&!((re-=2)<0);++we)$=ne.charCodeAt(we),J=$>>8,le=$%256,ue.push(le),ue.push(J);return ue}function V(ne){return T.toByteArray(Se(ne))}function Q(ne,re,$,J){for(var le=0;le<J&&!(le+$>=re.length||le>=ne.length);++le)re[le+$]=ne[le];return le}function Z(ne){return ne!==ne}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(H,q,L){q.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(H,q,L){q.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(H,q,L){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=Array.prototype.slice;q.exports=g;function g(N,v){if(!(this instanceof g))return new g(N,v);this.src=N,this._withAccess=v}g.prototype.withAccess=function(N){return this._withAccess=N!==!1,this},g.prototype.pick=function(N){return Array.isArray(N)||(N=P.call(arguments)),N.length&&(this.keys=N),this},g.prototype.to=function(N){if(N=N||{},!this.src)return N;var v=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<v.length;m++){if(w=v[m],N[w]!==void 0)continue;N[w]=this.src[w]}return N}for(var m=0;m<v.length;m++){var w=v[m];if(!T(N,w))continue;var b=this.src.__lookupGetter__(w),t=this.src.__lookupSetter__(w);b&&N.__defineGetter__(w,b),t&&N.__defineSetter__(w,t),!b&&!t&&(N[w]=this.src[w])}return N},g.prototype.toCover=function(N){for(var v=this.keys||Object.keys(this.src),m=0;m<v.length;m++){var w=v[m];delete N[w];var b=this.src.__lookupGetter__(w),t=this.src.__lookupSetter__(w);b&&N.__defineGetter__(w,b),t&&N.__defineSetter__(w,t),!b&&!t&&(N[w]=this.src[w])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(N){var v={};return this.to(v),this.src=N,this.to(v),this.src=v,this};function T(N,v){return N[v]===void 0&&N.__lookupGetter__(v)===void 0&&N.__lookupSetter__(v)===void 0}},{}],77:[function(H,q,L){H("../../modules/es6.string.iterator"),H("../../modules/es6.array.from"),q.exports=H("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(H,q,L){var P=H("../../modules/_core"),g=P.JSON||(P.JSON={stringify:JSON.stringify});q.exports=function(N){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(H,q,L){H("../../modules/es6.object.assign"),q.exports=H("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(H,q,L){H("../../modules/es6.object.create");var P=H("../../modules/_core").Object;q.exports=function(T,N){return P.create(T,N)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(H,q,L){H("../../modules/es6.object.define-property");var P=H("../../modules/_core").Object;q.exports=function(T,N,v){return P.defineProperty(T,N,v)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(H,q,L){H("../../modules/es7.object.entries"),q.exports=H("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(H,q,L){H("../../modules/es6.object.get-own-property-names");var P=H("../../modules/_core").Object;q.exports=function(T){return P.getOwnPropertyNames(T)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(H,q,L){H("../../modules/es6.object.get-prototype-of"),q.exports=H("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(H,q,L){H("../../modules/es6.object.keys"),q.exports=H("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(H,q,L){H("../modules/es6.object.to-string"),H("../modules/es6.string.iterator"),H("../modules/web.dom.iterable"),H("../modules/es6.promise"),H("../modules/es7.promise.finally"),H("../modules/es7.promise.try"),q.exports=H("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(H,q,L){H("../modules/web.immediate"),q.exports=H("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(H,q,L){H("../../modules/es6.string.from-code-point"),q.exports=H("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(H,q,L){H("../../modules/es6.function.has-instance"),q.exports=H("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(H,q,L){H("../../modules/es6.symbol"),H("../../modules/es6.object.to-string"),H("../../modules/es7.symbol.async-iterator"),H("../../modules/es7.symbol.observable"),q.exports=H("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(H,q,L){H("../../modules/es6.string.iterator"),H("../../modules/web.dom.iterable"),q.exports=H("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(H,q,L){q.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(H,q,L){q.exports=function(){}},{}],94:[function(H,q,L){q.exports=function(P,g,T,N){if(!(P instanceof g)||N!==void 0&&N in P)throw TypeError(T+": incorrect invocation!");return P}},{}],95:[function(H,q,L){var P=H("./_is-object");q.exports=function(g){if(!P(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(H,q,L){var P=H("./_to-iobject"),g=H("./_to-length"),T=H("./_to-absolute-index");q.exports=function(N){return function(v,m,w){var b=P(v),t=g(b.length),d=T(w,t),a;if(N&&m!=m){for(;t>d;)if(a=b[d++],a!=a)return!0}else for(;t>d;d++)if((N||d in b)&&b[d]===m)return N||d||0;return!N&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(H,q,L){var P=H("./_cof"),g=H("./_wks")("toStringTag"),T=P(function(){return arguments}())=="Arguments",N=function(v,m){try{return v[m]}catch(w){}};q.exports=function(v){var m,w,b;return v===void 0?"Undefined":v===null?"Null":typeof(w=N(m=Object(v),g))=="string"?w:T?P(m):(b=P(m))=="Object"&&typeof m.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(H,q,L){var P={}.toString;q.exports=function(g){return P.call(g).slice(8,-1)}},{}],99:[function(H,q,L){var P=q.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(H,q,L){"use strict";var P=H("./_object-dp"),g=H("./_property-desc");q.exports=function(T,N,v){N in T?P.f(T,N,g(0,v)):T[N]=v}},{"./_object-dp":132,"./_property-desc":146}],101:[function(H,q,L){var P=H("./_a-function");q.exports=function(g,T,N){if(P(g),T===void 0)return g;switch(N){case 1:return function(v){return g.call(T,v)};case 2:return function(v,m){return g.call(T,v,m)};case 3:return function(v,m,w){return g.call(T,v,m,w)}}return function(){return g.apply(T,arguments)}}},{"./_a-function":92}],102:[function(H,q,L){q.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(H,q,L){q.exports=!H("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(H,q,L){var P=H("./_is-object"),g=H("./_global").document,T=P(g)&&P(g.createElement);q.exports=function(N){return T?g.createElement(N):{}}},{"./_global":110,"./_is-object":119}],105:[function(H,q,L){q.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(H,q,L){var P=H("./_object-keys"),g=H("./_object-gops"),T=H("./_object-pie");q.exports=function(N){var v=P(N),m=g.f;if(m)for(var w=m(N),b=T.f,t=0,d;w.length>t;)b.call(N,d=w[t++])&&v.push(d);return v}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(H,q,L){var P=H("./_global"),g=H("./_core"),T=H("./_ctx"),N=H("./_hide"),v=H("./_has"),m="prototype",w=function(b,t,d){var a=b&w.F,c=b&w.G,o=b&w.S,n=b&w.P,s=b&w.B,h=b&w.W,f=c?g:g[t]||(g[t]={}),u=f[m],i=c?P:o?P[t]:(P[t]||{})[m],r,E,y;c&&(d=t);for(r in d){if(E=!a&&i&&i[r]!==void 0,E&&v(f,r))continue;y=E?i[r]:d[r],f[r]=c&&typeof i[r]!="function"?d[r]:s&&E?T(y,P):h&&i[r]==y?function(p){var R=function(O,_,x){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(O);case 2:return new p(O,_)}return new p(O,_,x)}return p.apply(this,arguments)};return R[m]=p[m],R}(y):n&&typeof y=="function"?T(Function.call,y):y,n&&((f.virtual||(f.virtual={}))[r]=y,b&w.R&&u&&!u[r]&&N(u,r,y))}};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,q.exports=w},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(H,q,L){q.exports=function(P){try{return!!P()}catch(g){return!0}}},{}],109:[function(H,q,L){var P=H("./_ctx"),g=H("./_iter-call"),T=H("./_is-array-iter"),N=H("./_an-object"),v=H("./_to-length"),m=H("./core.get-iterator-method"),w={},b={},L=q.exports=function(t,d,a,c,o){var n=o?function(){return t}:m(t),s=P(a,c,d?2:1),h=0,f,u,i,r;if(typeof n!="function")throw TypeError(t+" is not iterable!");if(T(n)){for(f=v(t.length);f>h;h++)if(r=d?s(N(u=t[h])[0],u[1]):s(t[h]),r===w||r===b)return r}else for(i=n.call(t);!(u=i.next()).done;)if(r=g(i,s,u.value,d),r===w||r===b)return r};L.BREAK=w,L.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(H,q,L){var P=q.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(H,q,L){var P={}.hasOwnProperty;q.exports=function(g,T){return P.call(g,T)}},{}],112:[function(H,q,L){var P=H("./_object-dp"),g=H("./_property-desc");q.exports=H("./_descriptors")?function(T,N,v){return P.f(T,N,g(1,v))}:function(T,N,v){return T[N]=v,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(H,q,L){var P=H("./_global").document;q.exports=P&&P.documentElement},{"./_global":110}],114:[function(H,q,L){q.exports=!H("./_descriptors")&&!H("./_fails")(function(){return Object.defineProperty(H("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(H,q,L){q.exports=function(P,g,T){var N=T===void 0;switch(g.length){case 0:return N?P():P.call(T);case 1:return N?P(g[0]):P.call(T,g[0]);case 2:return N?P(g[0],g[1]):P.call(T,g[0],g[1]);case 3:return N?P(g[0],g[1],g[2]):P.call(T,g[0],g[1],g[2]);case 4:return N?P(g[0],g[1],g[2],g[3]):P.call(T,g[0],g[1],g[2],g[3])}return P.apply(T,g)}},{}],116:[function(H,q,L){var P=H("./_cof");q.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return P(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(H,q,L){var P=H("./_iterators"),g=H("./_wks")("iterator"),T=Array.prototype;q.exports=function(N){return N!==void 0&&(P.Array===N||T[g]===N)}},{"./_iterators":125,"./_wks":166}],118:[function(H,q,L){var P=H("./_cof");q.exports=Array.isArray||function(T){return P(T)=="Array"}},{"./_cof":98}],119:[function(H,q,L){q.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(H,q,L){var P=H("./_an-object");q.exports=function(g,T,N,v){try{return v?T(P(N)[0],N[1]):T(N)}catch(w){var m=g.return;throw m!==void 0&&P(m.call(g)),w}}},{"./_an-object":95}],121:[function(H,q,L){"use strict";var P=H("./_object-create"),g=H("./_property-desc"),T=H("./_set-to-string-tag"),N={};H("./_hide")(N,H("./_wks")("iterator"),function(){return this}),q.exports=function(v,m,w){v.prototype=P(N,{next:g(1,w)}),T(v,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(H,q,L){"use strict";var P=H("./_library"),g=H("./_export"),T=H("./_redefine"),N=H("./_hide"),v=H("./_iterators"),m=H("./_iter-create"),w=H("./_set-to-string-tag"),b=H("./_object-gpo"),t=H("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),a="@@iterator",c="keys",o="values",n=function(){return this};q.exports=function(s,h,f,u,i,r,E){m(f,h,u);var y=function(K){if(!d&&K in _)return _[K];switch(K){case c:return function(){return new f(this,K)};case o:return function(){return new f(this,K)}}return function(){return new f(this,K)}},p=h+" Iterator",R=i==o,O=!1,_=s.prototype,x=_[t]||_[a]||i&&_[i],S=x||y(i),C=i?R?y("entries"):S:void 0,j=h=="Array"&&_.entries||x,F,M,Y;if(j&&(Y=b(j.call(new s)),Y!==Object.prototype&&Y.next&&(w(Y,p,!0),!P&&typeof Y[t]!="function"&&N(Y,t,n))),R&&x&&x.name!==o&&(O=!0,S=function(){return x.call(this)}),(!P||E)&&(d||O||!_[t])&&N(_,t,S),v[h]=S,v[p]=n,i)if(F={values:R?S:y(o),keys:r?S:y(c),entries:C},E)for(M in F)M in _||T(_,M,F[M]);else g(g.P+g.F*(d||O),h,F);return F}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(H,q,L){var P=H("./_wks")("iterator"),g=!1;try{var T=[7][P]();T.return=function(){g=!0},Array.from(T,function(){throw 2})}catch(N){}q.exports=function(N,v){if(!v&&!g)return!1;var m=!1;try{var w=[7],b=w[P]();b.next=function(){return{done:m=!0}},w[P]=function(){return b},N(w)}catch(t){}return m}},{"./_wks":166}],124:[function(H,q,L){q.exports=function(P,g){return{value:g,done:!!P}}},{}],125:[function(H,q,L){q.exports={}},{}],126:[function(H,q,L){q.exports=!0},{}],127:[function(H,q,L){var P=H("./_uid")("meta"),g=H("./_is-object"),T=H("./_has"),N=H("./_object-dp").f,v=0,m=Object.isExtensible||function(){return!0},w=!H("./_fails")(function(){return m(Object.preventExtensions({}))}),b=function(o){N(o,P,{value:{i:"O"+ ++v,w:{}}})},t=function(o,n){if(!g(o))return typeof o=="symbol"?o:(typeof o=="string"?"S":"P")+o;if(!T(o,P)){if(!m(o))return"F";if(!n)return"E";b(o)}return o[P].i},d=function(o,n){if(!T(o,P)){if(!m(o))return!0;if(!n)return!1;b(o)}return o[P].w},a=function(o){return w&&c.NEED&&m(o)&&!T(o,P)&&b(o),o},c=q.exports={KEY:P,NEED:!1,fastKey:t,getWeak:d,onFreeze:a}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(H,q,L){var P=H("./_global"),g=H("./_task").set,T=P.MutationObserver||P.WebKitMutationObserver,N=P.process,v=P.Promise,m=H("./_cof")(N)=="process";q.exports=function(){var w,b,t,d=function(){var n,s;for(m&&(n=N.domain)&&n.exit();w;){s=w.fn,w=w.next;try{s()}catch(h){throw w?t():b=void 0,h}}b=void 0,n&&n.enter()};if(m)t=function(){N.nextTick(d)};else if(T&&!(P.navigator&&P.navigator.standalone)){var a=!0,c=document.createTextNode("");new T(d).observe(c,{characterData:!0}),t=function(){c.data=a=!a}}else if(v&&v.resolve){var o=v.resolve(void 0);t=function(){o.then(d)}}else t=function(){g.call(P,d)};return function(n){var s={fn:n,next:void 0};b&&(b.next=s),w||(w=s,t()),b=s}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(H,q,L){"use strict";var P=H("./_a-function");function g(T){var N,v;this.promise=new T(function(m,w){if(N!==void 0||v!==void 0)throw TypeError("Bad Promise constructor");N=m,v=w}),this.resolve=P(N),this.reject=P(v)}q.exports.f=function(T){return new g(T)}},{"./_a-function":92}],130:[function(H,q,L){"use strict";var P=H("./_descriptors"),g=H("./_object-keys"),T=H("./_object-gops"),N=H("./_object-pie"),v=H("./_to-object"),m=H("./_iobject"),w=Object.assign;q.exports=!w||H("./_fails")(function(){var b={},t={},d=Symbol(),a="abcdefghijklmnopqrst";return b[d]=7,a.split("").forEach(function(c){t[c]=c}),w({},b)[d]!=7||Object.keys(w({},t)).join("")!=a})?function(t,d){for(var a=v(t),c=arguments.length,o=1,n=T.f,s=N.f;c>o;)for(var h=m(arguments[o++]),f=n?g(h).concat(n(h)):g(h),u=f.length,i=0,r;u>i;)r=f[i++],(!P||s.call(h,r))&&(a[r]=h[r]);return a}:w},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(H,q,L){var P=H("./_an-object"),g=H("./_object-dps"),T=H("./_enum-bug-keys"),N=H("./_shared-key")("IE_PROTO"),v=function(){},m="prototype",w=function(){var b=H("./_dom-create")("iframe"),t=T.length,d="<",a=">",c;for(b.style.display="none",H("./_html").appendChild(b),b.src="javascript:",c=b.contentWindow.document,c.open(),c.write(d+"script"+a+"document.F=Object"+d+"/script"+a),c.close(),w=c.F;t--;)delete w[m][T[t]];return w()};q.exports=Object.create||function(t,d){var a;return t!==null?(v[m]=P(t),a=new v,v[m]=null,a[N]=t):a=w(),d===void 0?a:g(a,d)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(H,q,L){var P=H("./_an-object"),g=H("./_ie8-dom-define"),T=H("./_to-primitive"),N=Object.defineProperty;L.f=H("./_descriptors")?Object.defineProperty:function(m,w,b){if(P(m),w=T(w,!0),P(b),g)try{return N(m,w,b)}catch(t){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(m[w]=b.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(H,q,L){var P=H("./_object-dp"),g=H("./_an-object"),T=H("./_object-keys");q.exports=H("./_descriptors")?Object.defineProperties:function(v,m){g(v);for(var w=T(m),b=w.length,t=0,d;b>t;)P.f(v,d=w[t++],m[d]);return v}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(H,q,L){var P=H("./_object-pie"),g=H("./_property-desc"),T=H("./_to-iobject"),N=H("./_to-primitive"),v=H("./_has"),m=H("./_ie8-dom-define"),w=Object.getOwnPropertyDescriptor;L.f=H("./_descriptors")?w:function(t,d){if(t=T(t),d=N(d,!0),m)try{return w(t,d)}catch(a){}if(v(t,d))return g(!P.f.call(t,d),t[d])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(H,q,L){var P=H("./_to-iobject"),g=H("./_object-gopn").f,T={}.toString,N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],v=function(m){try{return g(m)}catch(w){return N.slice()}};q.exports.f=function(w){return N&&T.call(w)=="[object Window]"?v(w):g(P(w))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(H,q,L){var P=H("./_object-keys-internal"),g=H("./_enum-bug-keys").concat("length","prototype");L.f=Object.getOwnPropertyNames||function(N){return P(N,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(H,q,L){L.f=Object.getOwnPropertySymbols},{}],138:[function(H,q,L){var P=H("./_has"),g=H("./_to-object"),T=H("./_shared-key")("IE_PROTO"),N=Object.prototype;q.exports=Object.getPrototypeOf||function(v){return v=g(v),P(v,T)?v[T]:typeof v.constructor=="function"&&v instanceof v.constructor?v.constructor.prototype:v instanceof Object?N:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(H,q,L){var P=H("./_has"),g=H("./_to-iobject"),T=H("./_array-includes")(!1),N=H("./_shared-key")("IE_PROTO");q.exports=function(v,m){var w=g(v),b=0,t=[],d;for(d in w)d!=N&&(P(w,d)&&t.push(d));for(;m.length>b;)P(w,d=m[b++])&&(~T(t,d)||t.push(d));return t}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(H,q,L){var P=H("./_object-keys-internal"),g=H("./_enum-bug-keys");q.exports=Object.keys||function(N){return P(N,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(H,q,L){L.f={}.propertyIsEnumerable},{}],142:[function(H,q,L){var P=H("./_export"),g=H("./_core"),T=H("./_fails");q.exports=function(N,v){var m=(g.Object||{})[N]||Object[N],w={};w[N]=v(m),P(P.S+P.F*T(function(){m(1)}),"Object",w)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(H,q,L){var P=H("./_descriptors"),g=H("./_object-keys"),T=H("./_to-iobject"),N=H("./_object-pie").f;q.exports=function(v){return function(m){for(var w=T(m),b=g(w),t=b.length,d=0,a=[],c;t>d;)c=b[d++],(!P||N.call(w,c))&&a.push(v?[c,w[c]]:w[c]);return a}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(H,q,L){q.exports=function(P){try{return{e:!1,v:P()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(H,q,L){var P=H("./_an-object"),g=H("./_is-object"),T=H("./_new-promise-capability");q.exports=function(N,v){if(P(N),g(v)&&v.constructor===N)return v;var m=T.f(N),w=m.resolve;return w(v),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(H,q,L){q.exports=function(P,g){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:g}}},{}],147:[function(H,q,L){var P=H("./_hide");q.exports=function(g,T,N){for(var v in T)N&&g[v]?g[v]=T[v]:P(g,v,T[v]);return g}},{"./_hide":112}],148:[function(H,q,L){q.exports=H("./_hide")},{"./_hide":112}],149:[function(H,q,L){"use strict";var P=H("./_global"),g=H("./_core"),T=H("./_object-dp"),N=H("./_descriptors"),v=H("./_wks")("species");q.exports=function(m){var w=typeof g[m]=="function"?g[m]:P[m];N&&w&&!w[v]&&T.f(w,v,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(H,q,L){var P=H("./_object-dp").f,g=H("./_has"),T=H("./_wks")("toStringTag");q.exports=function(N,v,m){N&&!g(N=m?N:N.prototype,T)&&P(N,T,{configurable:!0,value:v})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(H,q,L){var P=H("./_shared")("keys"),g=H("./_uid");q.exports=function(T){return P[T]||(P[T]=g(T))}},{"./_shared":152,"./_uid":162}],152:[function(H,q,L){var P=H("./_core"),g=H("./_global"),T="__core-js_shared__",N=g[T]||(g[T]={});(q.exports=function(v,m){return N[v]||(N[v]=m!==void 0?m:{})})("versions",[]).push({version:P.version,mode:H("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(H,q,L){var P=H("./_an-object"),g=H("./_a-function"),T=H("./_wks")("species");q.exports=function(N,v){var m=P(N).constructor,w;return m===void 0||(w=P(m)[T])==null?v:g(w)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(H,q,L){var P=H("./_to-integer"),g=H("./_defined");q.exports=function(T){return function(N,v){var m=String(g(N)),w=P(v),b=m.length,t,d;return w<0||w>=b?T?"":void 0:(t=m.charCodeAt(w),t<55296||t>56319||w+1===b||(d=m.charCodeAt(w+1))<56320||d>57343?T?m.charAt(w):t:T?m.slice(w,w+2):(t-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(H,q,L){var P=H("./_ctx"),g=H("./_invoke"),T=H("./_html"),N=H("./_dom-create"),v=H("./_global"),m=v.process,w=v.setImmediate,b=v.clearImmediate,t=v.MessageChannel,d=v.Dispatch,a=0,c={},o="onreadystatechange",n,s,h,f=function(){var i=+this;if(c.hasOwnProperty(i)){var r=c[i];delete c[i],r()}},u=function(i){f.call(i.data)};(!w||!b)&&(w=function(r){for(var E=[],y=1;arguments.length>y;)E.push(arguments[y++]);return c[++a]=function(){g(typeof r=="function"?r:Function(r),E)},n(a),a},b=function(r){delete c[r]},H("./_cof")(m)=="process"?n=function(i){m.nextTick(P(f,i,1))}:d&&d.now?n=function(i){d.now(P(f,i,1))}:t?(s=new t,h=s.port2,s.port1.onmessage=u,n=P(h.postMessage,h,1)):v.addEventListener&&typeof postMessage=="function"&&!v.importScripts?(n=function(i){v.postMessage(i+"","*")},v.addEventListener("message",u,!1)):o in N("script")?n=function(i){T.appendChild(N("script"))[o]=function(){T.removeChild(this),f.call(i)}}:n=function(i){setTimeout(P(f,i,1),0)}),q.exports={set:w,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(H,q,L){var P=H("./_to-integer"),g=Math.max,T=Math.min;q.exports=function(N,v){return N=P(N),N<0?g(N+v,0):T(N,v)}},{"./_to-integer":157}],157:[function(H,q,L){var P=Math.ceil,g=Math.floor;q.exports=function(T){return isNaN(T=+T)?0:(T>0?g:P)(T)}},{}],158:[function(H,q,L){var P=H("./_iobject"),g=H("./_defined");q.exports=function(T){return P(g(T))}},{"./_defined":102,"./_iobject":116}],159:[function(H,q,L){var P=H("./_to-integer"),g=Math.min;q.exports=function(T){return T>0?g(P(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(H,q,L){var P=H("./_defined");q.exports=function(g){return Object(P(g))}},{"./_defined":102}],161:[function(H,q,L){var P=H("./_is-object");q.exports=function(g,T){if(!P(g))return g;var N,v;if(T&&typeof(N=g.toString)=="function"&&!P(v=N.call(g)))return v;if(typeof(N=g.valueOf)=="function"&&!P(v=N.call(g)))return v;if(!T&&typeof(N=g.toString)=="function"&&!P(v=N.call(g)))return v;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(H,q,L){var P=0,g=Math.random();q.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++P+g).toString(36))}},{}],163:[function(H,q,L){var P=H("./_global"),g=P.navigator;q.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(H,q,L){var P=H("./_global"),g=H("./_core"),T=H("./_library"),N=H("./_wks-ext"),v=H("./_object-dp").f;q.exports=function(m){var w=g.Symbol||(g.Symbol=T?{}:P.Symbol||{});m.charAt(0)!="_"&&!(m in w)&&v(w,m,{value:N.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(H,q,L){L.f=H("./_wks")},{"./_wks":166}],166:[function(H,q,L){var P=H("./_shared")("wks"),g=H("./_uid"),T=H("./_global").Symbol,N=typeof T=="function",v=q.exports=function(m){return P[m]||(P[m]=N&&T[m]||(N?T:g)("Symbol."+m))};v.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(H,q,L){var P=H("./_classof"),g=H("./_wks")("iterator"),T=H("./_iterators");q.exports=H("./_core").getIteratorMethod=function(N){if(N!=null)return N[g]||N["@@iterator"]||T[P(N)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(H,q,L){"use strict";var P=H("./_ctx"),g=H("./_export"),T=H("./_to-object"),N=H("./_iter-call"),v=H("./_is-array-iter"),m=H("./_to-length"),w=H("./_create-property"),b=H("./core.get-iterator-method");g(g.S+g.F*!H("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(d){var a=T(d),c=typeof this=="function"?this:Array,o=arguments.length,n=o>1?arguments[1]:void 0,s=n!==void 0,h=0,f=b(a),u,i,r,E;if(s&&(n=P(n,o>2?arguments[2]:void 0,2)),f!=null&&!(c==Array&&v(f)))for(E=f.call(a),i=new c;!(r=E.next()).done;h++)w(i,h,s?N(E,n,[r.value,h],!0):r.value);else for(u=m(a.length),i=new c(u);u>h;h++)w(i,h,s?n(a[h],h):a[h]);return i.length=h,i}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(H,q,L){"use strict";var P=H("./_add-to-unscopables"),g=H("./_iter-step"),T=H("./_iterators"),N=H("./_to-iobject");q.exports=H("./_iter-define")(Array,"Array",function(v,m){this._t=N(v),this._i=0,this._k=m},function(){var v=this._t,m=this._k,w=this._i++;return!v||w>=v.length?(this._t=void 0,g(1)):m=="keys"?g(0,w):m=="values"?g(0,v[w]):g(0,[w,v[w]])},"values"),T.Arguments=T.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(H,q,L){"use strict";var P=H("./_is-object"),g=H("./_object-gpo"),T=H("./_wks")("hasInstance"),N=Function.prototype;T in N||H("./_object-dp").f(N,T,{value:function(v){if(typeof this!="function"||!P(v))return!1;if(!P(this.prototype))return v instanceof this;for(;v=g(v);)if(this.prototype===v)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(H,q,L){var P=H("./_export");P(P.S+P.F,"Object",{assign:H("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(H,q,L){var P=H("./_export");P(P.S,"Object",{create:H("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(H,q,L){var P=H("./_export");P(P.S+P.F*!H("./_descriptors"),"Object",{defineProperty:H("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(H,q,L){H("./_object-sap")("getOwnPropertyNames",function(){return H("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(H,q,L){var P=H("./_to-object"),g=H("./_object-gpo");H("./_object-sap")("getPrototypeOf",function(){return function(N){return g(P(N))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(H,q,L){var P=H("./_to-object"),g=H("./_object-keys");H("./_object-sap")("keys",function(){return function(N){return g(P(N))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(H,q,L){arguments[4][71][0].apply(L,arguments)},{dup:71}],178:[function(H,q,L){"use strict";var P=H("./_library"),g=H("./_global"),T=H("./_ctx"),N=H("./_classof"),v=H("./_export"),m=H("./_is-object"),w=H("./_a-function"),b=H("./_an-instance"),t=H("./_for-of"),d=H("./_species-constructor"),a=H("./_task").set,c=H("./_microtask")(),o=H("./_new-promise-capability"),n=H("./_perform"),s=H("./_user-agent"),h=H("./_promise-resolve"),f="Promise",u=g.TypeError,i=g.process,r=i&&i.versions,E=r&&r.v8||"",y=g[f],p=N(i)=="process",R=function(){},O,_,x,S,C=_=o.f,j=!!function(){try{var D=y.resolve(1),X=(D.constructor={})[H("./_wks")("species")]=function(ie){ie(R,R)};return(p||typeof PromiseRejectionEvent=="function")&&D.then(R)instanceof X&&E.indexOf("6.6")!==0&&s.indexOf("Chrome/66")===-1}catch(ie){}}(),F=function(D){var X;return m(D)&&typeof(X=D.then)=="function"?X:!1},M=function(D,X){if(D._n)return;D._n=!0;var ie=D._c;c(function(){for(var oe=D._v,de=D._s==1,Ce=0,Ae=function(me){var Se=de?me.ok:me.fail,ye=me.resolve,se=me.reject,ee=me.domain,B,G,V;try{Se?(de||(D._h==2&&A(D),D._h=1),Se===!0?B=oe:(ee&&ee.enter(),B=Se(oe),ee&&(ee.exit(),V=!0)),B===me.promise?se(u("Promise-chain cycle")):(G=F(B))?G.call(B,ye,se):ye(B)):se(oe)}catch(Q){ee&&!V&&ee.exit(),se(Q)}};ie.length>Ce;)Ae(ie[Ce++]);D._c=[],D._n=!1,X&&!D._h&&Y(D)})},Y=function(D){a.call(g,function(){var X=D._v,ie=K(D),oe,de,Ce;if(ie&&(oe=n(function(){p?i.emit("unhandledRejection",X,D):(de=g.onunhandledrejection)?de({promise:D,reason:X}):(Ce=g.console)&&Ce.error&&Ce.error("Unhandled promise rejection",X)}),D._h=p||K(D)?2:1),D._a=void 0,ie&&oe.e)throw oe.v})},K=function(D){return D._h!==1&&(D._a||D._c).length===0},A=function(D){a.call(g,function(){var X;p?i.emit("rejectionHandled",D):(X=g.onrejectionhandled)&&X({promise:D,reason:D._v})})},W=function(D){var X=this;if(X._d)return;X._d=!0,X=X._w||X,X._v=D,X._s=2,X._a||(X._a=X._c.slice()),M(X,!0)},U=function(D){var X=this,ie;if(X._d)return;X._d=!0,X=X._w||X;try{if(X===D)throw u("Promise can't be resolved itself");(ie=F(D))?c(function(){var oe={_w:X,_d:!1};try{ie.call(D,T(U,oe,1),T(W,oe,1))}catch(de){W.call(oe,de)}}):(X._v=D,X._s=1,M(X,!1))}catch(oe){W.call({_w:X,_d:!1},oe)}};j||(y=function(X){b(this,y,f,"_h"),w(X),O.call(this);try{X(T(U,this,1),T(W,this,1))}catch(ie){W.call(this,ie)}},O=function(X){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=H("./_redefine-all")(y.prototype,{then:function(X,ie){var oe=C(d(this,y));return oe.ok=typeof X=="function"?X:!0,oe.fail=typeof ie=="function"&&ie,oe.domain=p?i.domain:void 0,this._c.push(oe),this._a&&this._a.push(oe),this._s&&M(this,!1),oe.promise},catch:function(D){return this.then(void 0,D)}}),x=function(){var D=new O;this.promise=D,this.resolve=T(U,D,1),this.reject=T(W,D,1)},o.f=C=function(D){return D===y||D===S?new x(D):_(D)}),v(v.G+v.W+v.F*!j,{Promise:y}),H("./_set-to-string-tag")(y,f),H("./_set-species")(f),S=H("./_core")[f],v(v.S+v.F*!j,f,{reject:function(X){var ie=C(this),oe=ie.reject;return oe(X),ie.promise}}),v(v.S+v.F*(P||!j),f,{resolve:function(X){return h(P&&this===S?y:this,X)}}),v(v.S+v.F*!(j&&H("./_iter-detect")(function(D){y.all(D).catch(R)})),f,{all:function(X){var ie=this,oe=C(ie),de=oe.resolve,Ce=oe.reject,Ae=n(function(){var me=[],Se=0,ye=1;t(X,!1,function(se){var ee=Se++,B=!1;me.push(void 0),ye++,ie.resolve(se).then(function(G){if(B)return;B=!0,me[ee]=G,--ye||de(me)},Ce)}),--ye||de(me)});return Ae.e&&Ce(Ae.v),oe.promise},race:function(X){var ie=this,oe=C(ie),de=oe.reject,Ce=n(function(){t(X,!1,function(Ae){ie.resolve(Ae).then(oe.resolve,de)})});return Ce.e&&de(Ce.v),oe.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(H,q,L){var P=H("./_export"),g=H("./_to-absolute-index"),T=String.fromCharCode,N=String.fromCodePoint;P(P.S+P.F*(!!N&&N.length!=1),"String",{fromCodePoint:function(m){for(var w=[],b=arguments.length,t=0,d;b>t;){if(d=+arguments[t++],g(d,1114111)!==d)throw RangeError(d+" is not a valid code point");w.push(d<65536?T(d):T(((d-=65536)>>10)+55296,d%1024+56320))}return w.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(H,q,L){"use strict";var P=H("./_string-at")(!0);H("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,T=this._i,N;return T>=g.length?{value:void 0,done:!0}:(N=P(g,T),this._i+=N.length,{value:N,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(H,q,L){"use strict";var P=H("./_global"),g=H("./_has"),T=H("./_descriptors"),N=H("./_export"),v=H("./_redefine"),m=H("./_meta").KEY,w=H("./_fails"),b=H("./_shared"),t=H("./_set-to-string-tag"),d=H("./_uid"),a=H("./_wks"),c=H("./_wks-ext"),o=H("./_wks-define"),n=H("./_enum-keys"),s=H("./_is-array"),h=H("./_an-object"),f=H("./_is-object"),u=H("./_to-object"),i=H("./_to-iobject"),r=H("./_to-primitive"),E=H("./_property-desc"),y=H("./_object-create"),p=H("./_object-gopn-ext"),R=H("./_object-gopd"),O=H("./_object-gops"),_=H("./_object-dp"),x=H("./_object-keys"),S=R.f,C=_.f,j=p.f,F=P.Symbol,M=P.JSON,Y=M&&M.stringify,K="prototype",A=a("_hidden"),W=a("toPrimitive"),U={}.propertyIsEnumerable,D=b("symbol-registry"),X=b("symbols"),ie=b("op-symbols"),oe=Object[K],de=typeof F=="function"&&!!O.f,Ce=P.QObject,Ae=!Ce||!Ce[K]||!Ce[K].findChild,me=T&&w(function(){return y(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a!=7})?function(ue,we,Fe){var Xe=S(oe,we);Xe&&delete oe[we],C(ue,we,Fe),Xe&&ue!==oe&&C(oe,we,Xe)}:C,Se=function(ue){var we=X[ue]=y(F[K]);return we._k=ue,we},ye=de&&typeof F.iterator=="symbol"?function(ue){return typeof ue=="symbol"}:function(ue){return ue instanceof F},se=function(we,Fe,Xe){return we===oe&&se(ie,Fe,Xe),h(we),Fe=r(Fe,!0),h(Xe),g(X,Fe)?(Xe.enumerable?(g(we,A)&&we[A][Fe]&&(we[A][Fe]=!1),Xe=y(Xe,{enumerable:E(0,!1)})):(g(we,A)||C(we,A,E(1,{})),we[A][Fe]=!0),me(we,Fe,Xe)):C(we,Fe,Xe)},ee=function(we,Fe){h(we);for(var Xe=n(Fe=i(Fe)),$e=0,et=Xe.length,nt;et>$e;)se(we,nt=Xe[$e++],Fe[nt]);return we},B=function(we,Fe){return Fe===void 0?y(we):ee(y(we),Fe)},G=function(we){var Fe=U.call(this,we=r(we,!0));return this===oe&&g(X,we)&&!g(ie,we)?!1:Fe||!g(this,we)||!g(X,we)||g(this,A)&&this[A][we]?Fe:!0},V=function(we,Fe){if(we=i(we),Fe=r(Fe,!0),we===oe&&g(X,Fe)&&!g(ie,Fe))return;var Xe=S(we,Fe);return Xe&&g(X,Fe)&&!(g(we,A)&&we[A][Fe])&&(Xe.enumerable=!0),Xe},Q=function(we){for(var Fe=j(i(we)),Xe=[],$e=0,et;Fe.length>$e;)!g(X,et=Fe[$e++])&&et!=A&&et!=m&&Xe.push(et);return Xe},Z=function(we){for(var Fe=we===oe,Xe=j(Fe?ie:i(we)),$e=[],et=0,nt;Xe.length>et;)g(X,nt=Xe[et++])&&(Fe?g(oe,nt):!0)&&$e.push(X[nt]);return $e};de||(F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var we=d(arguments.length>0?arguments[0]:void 0),Fe=function(Xe){this===oe&&Fe.call(ie,Xe),g(this,A)&&g(this[A],we)&&(this[A][we]=!1),me(this,we,E(1,Xe))};return T&&Ae&&me(oe,we,{configurable:!0,set:Fe}),Se(we)},v(F[K],"toString",function(){return this._k}),R.f=V,_.f=se,H("./_object-gopn").f=p.f=Q,H("./_object-pie").f=G,O.f=Z,T&&!H("./_library")&&v(oe,"propertyIsEnumerable",G,!0),c.f=function(ue){return Se(a(ue))}),N(N.G+N.W+N.F*!de,{Symbol:F});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ne.length>re;)a(ne[re++]);for(var $=x(a.store),J=0;$.length>J;)o($[J++]);N(N.S+N.F*!de,"Symbol",{for:function(ue){return g(D,ue+="")?D[ue]:D[ue]=F(ue)},keyFor:function(we){if(!ye(we))throw TypeError(we+" is not a symbol!");for(var Fe in D)if(D[Fe]===we)return Fe},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),N(N.S+N.F*!de,"Object",{create:B,defineProperty:se,defineProperties:ee,getOwnPropertyDescriptor:V,getOwnPropertyNames:Q,getOwnPropertySymbols:Z});var le=w(function(){O.f(1)});N(N.S+N.F*le,"Object",{getOwnPropertySymbols:function(we){return O.f(u(we))}}),M&&N(N.S+N.F*(!de||w(function(){var ue=F();return Y([ue])!="[null]"||Y({a:ue})!="{}"||Y(Object(ue))!="{}"})),"JSON",{stringify:function(we){for(var Fe=[we],Xe=1,$e,et;arguments.length>Xe;)Fe.push(arguments[Xe++]);return et=$e=Fe[1],!f($e)&&we===void 0||ye(we)?void 0:(s($e)||($e=function(nt,at){if(typeof et=="function"&&(at=et.call(this,nt,at)),!ye(at))return at}),Fe[1]=$e,Y.apply(M,Fe))}}),F[K][W]||H("./_hide")(F[K],W,F[K].valueOf),t(F,"Symbol"),t(Math,"Math",!0),t(P.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(H,q,L){var P=H("./_export"),g=H("./_object-to-array")(!0);P(P.S,"Object",{entries:function(N){return g(N)}})},{"./_export":107,"./_object-to-array":143}],183:[function(H,q,L){"use strict";var P=H("./_export"),g=H("./_core"),T=H("./_global"),N=H("./_species-constructor"),v=H("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(m){var w=N(this,g.Promise||T.Promise),b=typeof m=="function";return this.then(b?function(t){return v(w,m()).then(function(){return t})}:m,b?function(t){return v(w,m()).then(function(){throw t})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(H,q,L){"use strict";var P=H("./_export"),g=H("./_new-promise-capability"),T=H("./_perform");P(P.S,"Promise",{try:function(N){var v=g.f(this),m=T(N);return(m.e?v.reject:v.resolve)(m.v),v.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(H,q,L){H("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(H,q,L){H("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(H,q,L){H("./es6.array.iterator");for(var P=H("./_global"),g=H("./_hide"),T=H("./_iterators"),N=H("./_wks")("toStringTag"),v="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m<v.length;m++){var w=v[m],b=P[w],t=b&&b.prototype;t&&!t[N]&&g(t,N,w),T[w]=T.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(H,q,L){var P=H("./_export"),g=H("./_task");P(P.G+P.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/helpers/typeof"),T=N(g);function N(r){return r&&r.__esModule?r:{default:r}}function v(r){return Array.isArray?Array.isArray(r):i(r)==="[object Array]"}L.isArray=v;function m(r){return typeof r=="boolean"}L.isBoolean=m;function w(r){return r===null}L.isNull=w;function b(r){return r==null}L.isNullOrUndefined=b;function t(r){return typeof r=="number"}L.isNumber=t;function d(r){return typeof r=="string"}L.isString=d;function a(r){return(typeof r=="undefined"?"undefined":(0,T.default)(r))==="symbol"}L.isSymbol=a;function c(r){return r===void 0}L.isUndefined=c;function o(r){return i(r)==="[object RegExp]"}L.isRegExp=o;function n(r){return(typeof r=="undefined"?"undefined":(0,T.default)(r))==="object"&&r!==null}L.isObject=n;function s(r){return i(r)==="[object Date]"}L.isDate=s;function h(r){return i(r)==="[object Error]"||r instanceof Error}L.isError=h;function f(r){return typeof r=="function"}L.isFunction=f;function u(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||(typeof r=="undefined"?"undefined":(0,T.default)(r))==="symbol"||typeof r=="undefined"}L.isPrimitive=u,L.isBuffer=P.isBuffer;function i(r){return Object.prototype.toString.call(r)}}).call(this,{isBuffer:H("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(H,q,L){"use strict";var P=H("babel-runtime/helpers/typeof"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(N){"use strict";var v=function(){var d=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,a=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g;return function(o,n,s,h){if(arguments.length===1&&t(o)==="string"&&!/\d/.test(o)&&(n=o,o=void 0),o=o||new Date,o instanceof Date||(o=new Date(o)),isNaN(o))throw TypeError("Invalid date");n=String(v.masks[n]||n||v.masks.default);var f=n.slice(0,4);(f==="UTC:"||f==="GMT:")&&(n=n.slice(4),s=!0,f==="GMT:"&&(h=!0));var u=s?"getUTC":"get",i=o[u+"Date"](),r=o[u+"Day"](),E=o[u+"Month"](),y=o[u+"FullYear"](),p=o[u+"Hours"](),R=o[u+"Minutes"](),O=o[u+"Seconds"](),_=o[u+"Milliseconds"](),x=s?0:o.getTimezoneOffset(),S=w(o),C=b(o),j={d:i,dd:m(i),ddd:v.i18n.dayNames[r],dddd:v.i18n.dayNames[r+7],m:E+1,mm:m(E+1),mmm:v.i18n.monthNames[E],mmmm:v.i18n.monthNames[E+12],yy:String(y).slice(2),yyyy:y,h:p%12||12,hh:m(p%12||12),H:p,HH:m(p),M:R,MM:m(R),s:O,ss:m(O),l:m(_,3),L:m(Math.round(_/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:h?"GMT":s?"UTC":(String(o).match(a)||[""]).pop().replace(c,""),o:(x>0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][i%10>3?0:(i%100-i%10!=10)*i%10],W:S,N:C};return n.replace(d,function(F){return F in j?j[F]:F.slice(1,F.length-1)})}}();v.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"},v.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(d,a){for(d=String(d),a=a||2;d.length<a;)d="0"+d;return d}function w(d){var a=new Date(d.getFullYear(),d.getMonth(),d.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);var c=new Date(a.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var o=a.getTimezoneOffset()-c.getTimezoneOffset();a.setHours(a.getHours()-o);var n=(a-c)/(864e5*7);return 1+Math.floor(n)}function b(d){var a=d.getDay();return a===0&&(a=7),a}function t(d){return d===null?"null":d===void 0?"undefined":(typeof d=="undefined"?"undefined":(0,g.default)(d))!=="object"?typeof d=="undefined"?"undefined":(0,g.default)(d):Array.isArray(d)?"array":{}.toString.call(d).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return v}):(typeof L=="undefined"?"undefined":(0,g.default)(L))==="object"?q.exports=v:N.dateFormat=v})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(H,q,L){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var P=/["'&<>]/;q.exports=g;function g(T){var N=""+T,v=P.exec(N);if(!v)return N;var m,w="",b=0,t=0;for(b=v.index;b<N.length;b++){switch(N.charCodeAt(b)){case 34:m="&quot;";break;case 38:m="&amp;";break;case 39:m="&#39;";break;case 60:m="&lt;";break;case 62:m="&gt;";break;default:continue}t!==b&&(w+=N.substring(t,b)),t=b+1,w+=m}return t!==b?w+N.substring(t,b):w}},{}],192:[function(H,q,L){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}q.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(m){if(!T(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},P.prototype.emit=function(m){var w,b,t,d,a,c;if(this._events||(this._events={}),m==="error"&&(!this._events.error||N(this._events.error)&&!this._events.error.length)){if(w=arguments[1],w instanceof Error)throw w;var o=new Error('Uncaught, unspecified "error" event. ('+w+")");throw o.context=w,o}if(b=this._events[m],v(b))return!1;if(g(b))switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),b.apply(this,d)}else if(N(b))for(d=Array.prototype.slice.call(arguments,1),c=b.slice(),t=c.length,a=0;a<t;a++)c[a].apply(this,d);return!0},P.prototype.addListener=function(m,w){var b;if(!g(w))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,g(w.listener)?w.listener:w),this._events[m]?N(this._events[m])?this._events[m].push(w):this._events[m]=[this._events[m],w]:this._events[m]=w,N(this._events[m])&&!this._events[m].warned&&(v(this._maxListeners)?b=P.defaultMaxListeners:b=this._maxListeners,b&&b>0&&this._events[m].length>b&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(m,w){if(!g(w))throw TypeError("listener must be a function");var b=!1;function t(){this.removeListener(m,t),b||(b=!0,w.apply(this,arguments))}return t.listener=w,this.on(m,t),this},P.prototype.removeListener=function(m,w){var b,t,d,a;if(!g(w))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(b=this._events[m],d=b.length,t=-1,b===w||g(b.listener)&&b.listener===w)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,w);else if(N(b)){for(a=d;a-- >0;)if(b[a]===w||b[a].listener&&b[a].listener===w){t=a;break}if(t<0)return this;b.length===1?(b.length=0,delete this._events[m]):b.splice(t,1),this._events.removeListener&&this.emit("removeListener",m,w)}return this},P.prototype.removeAllListeners=function(m){var w,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(w in this._events){if(w==="removeListener")continue;this.removeAllListeners(w)}return this.removeAllListeners("removeListener"),this._events={},this}if(b=this._events[m],g(b))this.removeListener(m,b);else if(b)for(;b.length;)this.removeListener(m,b[b.length-1]);return delete this._events[m],this},P.prototype.listeners=function(m){var w;return!this._events||!this._events[m]?w=[]:g(this._events[m])?w=[this._events[m]]:w=this._events[m].slice(),w},P.prototype.listenerCount=function(m){if(this._events){var w=this._events[m];if(g(w))return 1;if(w)return w.length}return 0},P.listenerCount=function(m,w){return m.listenerCount(w)};function g(m){return typeof m=="function"}function T(m){return typeof m=="number"}function N(m){return typeof m=="object"&&m!==null}function v(m){return m===void 0}},{}],193:[function(H,q,L){var P=H("http"),g=q.exports;for(var T in P)P.hasOwnProperty(T)&&(g[T]=P[T]);g.request=function(N,v){return N||(N={}),N.scheme="https",N.protocol="https:",P.request.call(this,N,v)}},{http:231}],194:[function(H,q,L){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=H("util"),g=H("ms");q.exports=function(T){if(typeof T=="number")return T;var N=g(T);if(N===void 0){var v=new Error(P.format("humanize-ms(%j) result undefined",T));console.warn(v.stack)}return N}},{ms:204,util:243}],195:[function(H,q,L){L.read=function(P,g,T,N,v){var m,w,b=v*8-N-1,t=(1<<b)-1,d=t>>1,a=-7,c=T?v-1:0,o=T?-1:1,n=P[g+c];for(c+=o,m=n&(1<<-a)-1,n>>=-a,a+=b;a>0;m=m*256+P[g+c],c+=o,a-=8);for(w=m&(1<<-a)-1,m>>=-a,a+=N;a>0;w=w*256+P[g+c],c+=o,a-=8);if(m===0)m=1-d;else{if(m===t)return w?NaN:(n?-1:1)*Infinity;w=w+Math.pow(2,N),m=m-d}return(n?-1:1)*w*Math.pow(2,m-N)},L.write=function(P,g,T,N,v,m){var w,b,t,d=m*8-v-1,a=(1<<d)-1,c=a>>1,o=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=N?0:m-1,s=N?1:-1,h=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(b=isNaN(g)?1:0,w=a):(w=Math.floor(Math.log(g)/Math.LN2),g*(t=Math.pow(2,-w))<1&&(w--,t*=2),w+c>=1?g+=o/t:g+=o*Math.pow(2,1-c),g*t>=2&&(w++,t/=2),w+c>=a?(b=0,w=a):w+c>=1?(b=(g*t-1)*Math.pow(2,v),w=w+c):(b=g*Math.pow(2,c-1)*Math.pow(2,v),w=0));v>=8;P[T+n]=b&255,n+=s,b/=256,v-=8);for(w=w<<v|b,d+=v;d>0;P[T+n]=w&255,n+=s,w/=256,d-=8);P[T+n-s]|=h*128}},{}],196:[function(H,q,L){typeof Object.create=="function"?q.exports=function(g,T){T&&(g.super_=T,g.prototype=Object.create(T.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(g,T){if(T){g.super_=T;var N=function(){};N.prototype=T.prototype,g.prototype=new N,g.prototype.constructor=g}}},{}],197:[function(H,q,L){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/q.exports=function(T){return T!=null&&(P(T)||g(T)||!!T._isBuffer)};function P(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function g(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&P(T.slice(0,0))}},{}],198:[function(H,q,L){var P={}.toString;q.exports=Array.isArray||function(g){return P.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(H,q){typeof exports=="object"&&typeof module!="undefined"?module.exports=q(H):typeof define=="function"&&define.amd?define(q):q(H)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(H){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(H){for(var q={},L=0,P=H.length;L<P;L++)q[H.charAt(L)]=L;return q}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(H){if(H.length<2){var q=H.charCodeAt(0);return q<128?H:q<2048?fromCharCode(192|q>>>6)+fromCharCode(128|q&63):fromCharCode(224|q>>>12&15)+fromCharCode(128|q>>>6&63)+fromCharCode(128|q&63)}else{var q=65536+(H.charCodeAt(0)-55296)*1024+(H.charCodeAt(1)-56320);return fromCharCode(240|q>>>18&7)+fromCharCode(128|q>>>12&63)+fromCharCode(128|q>>>6&63)+fromCharCode(128|q&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(H){return H.replace(re_utob,cb_utob)},cb_encode=function(H){var q=[0,2,1][H.length%3],L=H.charCodeAt(0)<<16|(H.length>1?H.charCodeAt(1):0)<<8|(H.length>2?H.charCodeAt(2):0),P=[b64chars.charAt(L>>>18),b64chars.charAt(L>>>12&63),q>=2?"=":b64chars.charAt(L>>>6&63),q>=1?"=":b64chars.charAt(L&63)];return P.join("")},btoa=global.btoa?function(H){return global.btoa(H)}:function(H){return H.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(H){var q=Object.prototype.toString.call(H)==="[object Uint8Array]";return q?H.toString("base64"):btoa(utob(String(H)))},encode=function(H,q){return q?_encode(String(H)).replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,""):_encode(H)},encodeURI=function(H){return encode(H,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(H){switch(H.length){case 4:var q=(7&H.charCodeAt(0))<<18|(63&H.charCodeAt(1))<<12|(63&H.charCodeAt(2))<<6|63&H.charCodeAt(3),L=q-65536;return fromCharCode((L>>>10)+55296)+fromCharCode((L&1023)+56320);case 3:return fromCharCode((15&H.charCodeAt(0))<<12|(63&H.charCodeAt(1))<<6|63&H.charCodeAt(2));default:return fromCharCode((31&H.charCodeAt(0))<<6|63&H.charCodeAt(1))}},btou=function(H){return H.replace(re_btou,cb_btou)},cb_decode=function(H){var q=H.length,L=q%4,P=(q>0?b64tab[H.charAt(0)]<<18:0)|(q>1?b64tab[H.charAt(1)]<<12:0)|(q>2?b64tab[H.charAt(2)]<<6:0)|(q>3?b64tab[H.charAt(3)]:0),g=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return g.length-=[0,0,2,1][L],g.join("")},_atob=global.atob?function(H){return global.atob(H)}:function(H){return H.replace(/\S{1,4}/g,cb_decode)},atob=function(H){return _atob(String(H).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(H){return(H.constructor===buffer.constructor?H:buffer.from(H,"base64")).toString()}:function(H){return(H.constructor===buffer.constructor?H:new buffer(H,"base64")).toString()}:function(H){return btou(_atob(H))},decode=function(H){return _decode(String(H).replace(/[-_]/g,function(q){return q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var H=global.Base64;return global.Base64=_Base64,H};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(H){return{value:H,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(H){return encode(this,H)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(H,q,L){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";q.exports=g;var P=Object.prototype.hasOwnProperty;function g(T,N,v){if(!T)throw new TypeError("argument dest is required");if(!N)throw new TypeError("argument src is required");return v===void 0&&(v=!0),Object.getOwnPropertyNames(N).forEach(function(w){if(!v&&P.call(T,w))return;var b=Object.getOwnPropertyDescriptor(N,w);Object.defineProperty(T,w,b)}),T}},{}],201:[function(H,q,L){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(g,T){for(var N in g){var v=g[N].map(function(b){return b.toLowerCase()});N=N.toLowerCase();for(var m=0;m<v.length;m++){var w=v[m];if(w[0]=="*")continue;if(!T&&w in this._types)throw new Error('Attempt to change mapping for "'+w+'" extension from "'+this._types[w]+'" to "'+N+'". Pass `force=true` to allow this, otherwise remove "'+w+'" from the list of extensions for "'+N+'".');this._types[w]=N}if(T||!this._extensions[N]){var w=v[0];this._extensions[N]=w[0]!="*"?w:w.substr(1)}}},P.prototype.getType=function(g){g=String(g);var T=g.replace(/^.*[/\\]/,"").toLowerCase(),N=T.replace(/^.*\./,"").toLowerCase(),v=T.length<g.length,m=N.length<T.length-1;return(m||!v)&&this._types[N]||null},P.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},q.exports=P},{}],202:[function(H,q,L){"use strict";var P=H("./Mime");q.exports=new P(H("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(H,q,L){q.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(H,q,L){var P=1e3,g=P*60,T=g*60,N=T*24,v=N*7,m=N*365.25;q.exports=function(a,c){c=c||{};var o=typeof a;if(o==="string"&&a.length>0)return w(a);if(o==="number"&&isFinite(a))return c.long?t(a):b(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function w(a){if(a=String(a),a.length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!c)return;var o=parseFloat(c[1]),n=(c[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*m;case"weeks":case"week":case"w":return o*v;case"days":case"day":case"d":return o*N;case"hours":case"hour":case"hrs":case"hr":case"h":return o*T;case"minutes":case"minute":case"mins":case"min":case"m":return o*g;case"seconds":case"second":case"secs":case"sec":case"s":return o*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}function b(a){var c=Math.abs(a);return c>=N?Math.round(a/N)+"d":c>=T?Math.round(a/T)+"h":c>=g?Math.round(a/g)+"m":c>=P?Math.round(a/P)+"s":a+"ms"}function t(a){var c=Math.abs(a);return c>=N?d(a,c,N,"day"):c>=T?d(a,c,T,"hour"):c>=g?d(a,c,g,"minute"):c>=P?d(a,c,P,"second"):a+" ms"}function d(a,c,o,n){var s=c>=o*1.5;return Math.round(a/o)+" "+n+(s?"s":"")}},{}],205:[function(H,q,L){(function(P){function g(m,w){for(var b=0,t=m.length-1;t>=0;t--){var d=m[t];d==="."?m.splice(t,1):d===".."?(m.splice(t,1),b++):b&&(m.splice(t,1),b--)}if(w)for(;b--;b)m.unshift("..");return m}L.resolve=function(){for(var m="",w=!1,b=arguments.length-1;b>=-1&&!w;b--){var t=b>=0?arguments[b]:P.cwd();if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)continue;m=t+"/"+m,w=t.charAt(0)==="/"}return m=g(N(m.split("/"),function(d){return!!d}),!w).join("/"),(w?"/":"")+m||"."},L.normalize=function(m){var w=L.isAbsolute(m),b=v(m,-1)==="/";return m=g(N(m.split("/"),function(t){return!!t}),!w).join("/"),!m&&!w&&(m="."),m&&b&&(m+="/"),(w?"/":"")+m},L.isAbsolute=function(m){return m.charAt(0)==="/"},L.join=function(){var m=Array.prototype.slice.call(arguments,0);return L.normalize(N(m,function(w,b){if(typeof w!="string")throw new TypeError("Arguments to path.join must be strings");return w}).join("/"))},L.relative=function(m,w){m=L.resolve(m).substr(1),w=L.resolve(w).substr(1);function b(s){for(var h=0;h<s.length&&!(s[h]!=="");h++);for(var f=s.length-1;f>=0&&!(s[f]!=="");f--);return h>f?[]:s.slice(h,f-h+1)}for(var t=b(m.split("/")),d=b(w.split("/")),a=Math.min(t.length,d.length),c=a,o=0;o<a;o++)if(t[o]!==d[o]){c=o;break}for(var n=[],o=c;o<t.length;o++)n.push("..");return n=n.concat(d.slice(c)),n.join("/")},L.sep="/",L.delimiter=":",L.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var w=m.charCodeAt(0),b=w===47,t=-1,d=!0,a=m.length-1;a>=1;--a)if(w=m.charCodeAt(a),w===47){if(!d){t=a;break}}else d=!1;return t===-1?b?"/":".":b&&t===1?"/":m.slice(0,t)};function T(m){typeof m!="string"&&(m=m+"");var w=0,b=-1,t=!0,d;for(d=m.length-1;d>=0;--d)if(m.charCodeAt(d)===47){if(!t){w=d+1;break}}else b===-1&&(t=!1,b=d+1);return b===-1?"":m.slice(w,b)}L.basename=function(m,w){var b=T(m);return w&&b.substr(-1*w.length)===w&&(b=b.substr(0,b.length-w.length)),b},L.extname=function(m){typeof m!="string"&&(m=m+"");for(var w=-1,b=0,t=-1,d=!0,a=0,c=m.length-1;c>=0;--c){var o=m.charCodeAt(c);if(o===47){if(!d){b=c+1;break}continue}t===-1&&(d=!1,t=c+1),o===46?w===-1?w=c:a!==1&&(a=1):w!==-1&&(a=-1)}return w===-1||t===-1||a===0||a===1&&w===t-1&&w===b+1?"":m.slice(w,t)};function N(m,w){if(m.filter)return m.filter(w);for(var b=[],t=0;t<m.length;t++)w(m[t],t,m)&&b.push(m[t]);return b}var v="ab".substr(-1)==="b"?function(m,w,b){return m.substr(w,b)}:function(m,w,b){return w<0&&(w=m.length+w),m.substr(w,b)}}).call(this,H("_process"))},{_process:208}],206:[function(H,q,L){(function(P){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var g={function:!0,object:!0},T=g[typeof window]&&window||this,N=T,v=g[typeof L]&&L,m=g[typeof q]&&q&&!q.nodeType&&q,w=v&&m&&typeof P=="object"&&P;w&&(w.global===w||w.window===w||w.self===w)&&(T=w);var b=Math.pow(2,53)-1,t=/\bOpera/,d=this,a=Object.prototype,c=a.hasOwnProperty,o=a.toString;function n(_){return _=String(_),_.charAt(0).toUpperCase()+_.slice(1)}function s(_,x,S){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 x&&S&&/^Win/i.test(_)&&!/^Windows Phone /i.test(_)&&(C=C[/[\d.]+$/.exec(_)])&&(_="Windows "+C),_=String(_),x&&S&&(_=_.replace(RegExp(x,"i"),S)),_=f(_.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),_}function h(_,x){var S=-1,C=_?_.length:0;if(typeof C=="number"&&C>-1&&C<=b)for(;++S<C;)x(_[S],S,_);else u(_,x)}function f(_){return _=p(_),/^(?:webOS|i(?:OS|P))/.test(_)?_:n(_)}function u(_,x){for(var S in _)c.call(_,S)&&x(_[S],S,_)}function i(_){return _==null?n(_):o.call(_).slice(8,-1)}function r(_,x){var S=_!=null?typeof _[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(S)&&(S=="object"?!!_[x]:!0)}function E(_){return String(_).replace(/([ -])(?!$)/g,"$1?")}function y(_,x){var S=null;return h(_,function(C,j){S=x(S,C,j,_)}),S}function p(_){return String(_).replace(/^ +| +$/g,"")}function R(_){var x=T,S=_&&typeof _=="object"&&i(_)!="String";S&&(x=_,_=null);var C=x.navigator||{},j=C.userAgent||"";_||(_=j);var F=S||d==N,M=S?!!C.likeChrome:/\bChrome\b/.test(_)&&!/internal|\n/i.test(o.toString()),Y="Object",K=S?Y:"ScriptBridgingProxyObject",A=S?Y:"Environment",W=S&&x.java?"JavaPackage":i(x.java),U=S?Y:"RuntimeObject",D=/\bJava/.test(W)&&x.java,X=D&&i(x.environment)==A,ie=D?"a":"\u03B1",oe=D?"b":"\u03B2",de=x.document||{},Ce=x.operamini||x.opera,Ae=t.test(Ae=S&&Ce?Ce["[[Class]]"]:i(Ce))?Ae:Ce=null,me,Se=_,ye=[],se=null,ee=_==j,B=ee&&Ce&&typeof Ce.version=="function"&&Ce.version(),G,V=$([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Q=le(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Z=we([{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"]),ne=J({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}}),re=ue(["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 $(et){return y(et,function(nt,at){return nt||RegExp("\\b"+(at.pattern||E(at))+"\\b","i").exec(_)&&(at.label||at)})}function J(et){return y(et,function(nt,at,Be){return nt||(at[Z]||at[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Z)]||RegExp("\\b"+E(Be)+"(?:\\b|\\w*\\d)","i").exec(_))&&Be})}function le(et){return y(et,function(nt,at){return nt||RegExp("\\b"+(at.pattern||E(at))+"\\b","i").exec(_)&&(at.label||at)})}function ue(et){return y(et,function(nt,at){var Be=at.pattern||E(at);return!nt&&(nt=RegExp("\\b"+Be+"(?:/[\\d.]+|[ \\w.]*)","i").exec(_))&&(nt=s(nt,Be,at.label||at)),nt})}function we(et){return y(et,function(nt,at){var Be=at.pattern||E(at);return!nt&&(nt=RegExp("\\b"+Be+" *\\d+[.\\w_]*","i").exec(_)||RegExp("\\b"+Be+" *\\w+-[\\w]*","i").exec(_)||RegExp("\\b"+Be+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(_))&&((nt=String(at.label&&!RegExp(Be,"i").test(at.label)?at.label:nt).split("/"))[1]&&!/[\d.]+/.test(nt[0])&&(nt[0]+=" "+nt[1]),at=at.label||at,nt=f(nt[0].replace(RegExp(Be,"i"),at).replace(RegExp("; *(?:"+at+"[_-])?","i")," ").replace(RegExp("("+at+")[-_.]?(\\w)","i"),"$1 $2"))),nt})}function Fe(et){return y(et,function(nt,at){return nt||(RegExp(at+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(_)||0)[1]||null})}function Xe(){return this.description||""}if(V&&(V=[V]),ne&&!Z&&(Z=we([ne])),(me=/\bGoogle TV\b/.exec(Z))&&(Z=me[0]),/\bSimulator\b/i.test(_)&&(Z=(Z?Z+" ":"")+"Simulator"),Q=="Opera Mini"&&/\bOPiOS\b/.test(_)&&ye.push("running in Turbo/Uncompressed mode"),Q=="IE"&&/\blike iPhone OS\b/.test(_)?(me=R(_.replace(/like iPhone OS/,"")),ne=me.manufacturer,Z=me.product):/^iP/.test(Z)?(Q||(Q="Safari"),re="iOS"+((me=/ OS ([\d_]+)/i.exec(_))?" "+me[1].replace(/_/g,"."):"")):Q=="Konqueror"&&!/buntu/i.test(re)?re="Kubuntu":ne&&ne!="Google"&&(/Chrome/.test(Q)&&!/\bMobile Safari\b/i.test(_)||/\bVita\b/.test(Z))||/\bAndroid\b/.test(re)&&/^Chrome/.test(Q)&&/\bVersion\//i.test(_)?(Q="Android Browser",re=/\bAndroid\b/.test(re)?re:"Android"):Q=="Silk"?(/\bMobi/i.test(_)||(re="Android",ye.unshift("desktop mode")),/Accelerated *= *true/i.test(_)&&ye.unshift("accelerated")):Q=="PaleMoon"&&(me=/\bFirefox\/([\d.]+)\b/.exec(_))?ye.push("identifying as Firefox "+me[1]):Q=="Firefox"&&(me=/\b(Mobile|Tablet|TV)\b/i.exec(_))?(re||(re="Firefox OS"),Z||(Z=me[1])):!Q||(me=!/\bMinefield\b/i.test(_)&&/\b(?:Firefox|Safari)\b/.exec(Q))?(Q&&!Z&&/[\/,]|^[^(]+?\)/.test(_.slice(_.indexOf(me+"/")+8))&&(Q=null),(me=Z||ne||re)&&(Z||ne||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(re))&&(Q=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(re)?re:me)+" Browser")):Q=="Electron"&&(me=(/\bChrome\/([\d.]+)\b/.exec(_)||0)[1])&&ye.push("Chromium "+me),B||(B=Fe(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",E(Q),"(?:Firefox|Minefield|NetFront)"])),(me=V=="iCab"&&parseFloat(B)>3&&"WebKit"||/\bOpera\b/.test(Q)&&(/\bOPR\b/.test(_)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(_)&&!/^(?:Trident|EdgeHTML)$/.test(V)&&"WebKit"||!V&&/\bMSIE\b/i.test(_)&&(re=="Mac OS"?"Tasman":"Trident")||V=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Q)&&"NetFront")&&(V=[me]),Q=="IE"&&(me=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(_)||0)[1])?(Q+=" Mobile",re="Windows Phone "+(/\+$/.test(me)?me:me+".x"),ye.unshift("desktop mode")):/\bWPDesktop\b/i.test(_)?(Q="IE Mobile",re="Windows Phone 8.x",ye.unshift("desktop mode"),B||(B=(/\brv:([\d.]+)/.exec(_)||0)[1])):Q!="IE"&&V=="Trident"&&(me=/\brv:([\d.]+)/.exec(_))&&(Q&&ye.push("identifying as "+Q+(B?" "+B:"")),Q="IE",B=me[1]),ee){if(r(x,"global"))if(D&&(me=D.lang.System,Se=me.getProperty("os.arch"),re=re||me.getProperty("os.name")+" "+me.getProperty("os.version")),X){try{B=x.require("ringo/engine").version.join("."),Q="RingoJS"}catch(et){(me=x.system)&&me.global.system==x.system&&(Q="Narwhal",re||(re=me[0].os||null))}Q||(Q="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(me=x.process)&&(typeof me.versions=="object"&&(typeof me.versions.electron=="string"?(ye.push("Node "+me.versions.node),Q="Electron",B=me.versions.electron):typeof me.versions.nw=="string"&&(ye.push("Chromium "+B,"Node "+me.versions.node),Q="NW.js",B=me.versions.nw)),Q||(Q="Node.js",Se=me.arch,re=me.platform,B=/[\d.]+/.exec(me.version),B=B?B[0]:null));else i(me=x.runtime)==K?(Q="Adobe AIR",re=me.flash.system.Capabilities.os):i(me=x.phantom)==U?(Q="PhantomJS",B=(me=me.version||null)&&me.major+"."+me.minor+"."+me.patch):typeof de.documentMode=="number"&&(me=/\bTrident\/(\d+)/i.exec(_))?(B=[B,de.documentMode],(me=+me[1]+4)!=B[1]&&(ye.push("IE "+B[1]+" mode"),V&&(V[1]=""),B[1]=me),B=Q=="IE"?String(B[1].toFixed(1)):B[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Q)&&(ye.push("masking as "+Q+" "+B),Q="IE",B="11.0",V=["Trident"],re="Windows");re=re&&f(re)}if(B&&(me=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(B)||/(?:alpha|beta)(?: ?\d)?/i.exec(_+";"+(ee&&C.appMinorVersion))||/\bMinefield\b/i.test(_)&&"a")&&(se=/b/i.test(me)?"beta":"alpha",B=B.replace(RegExp(me+"\\+?$"),"")+(se=="beta"?oe:ie)+(/\d+\+?/.exec(me)||"")),Q=="Fennec"||Q=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(re))Q="Firefox Mobile";else if(Q=="Maxthon"&&B)B=B.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Z))Z=="Xbox 360"&&(re=null),Z=="Xbox 360"&&/\bIEMobile\b/.test(_)&&ye.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Q)||Q&&!Z&&!/Browser|Mobi/.test(Q))&&(re=="Windows CE"||/Mobi/i.test(_)))Q+=" Mobile";else if(Q=="IE"&&ee)try{x.external===null&&ye.unshift("platform preview")}catch(et){ye.unshift("embedded")}else(/\bBlackBerry\b/.test(Z)||/\bBB10\b/.test(_))&&(me=(RegExp(Z.replace(/ +/g," *")+"/([.\\d]+)","i").exec(_)||0)[1]||B)?(me=[me,/BB10/.test(_)],re=(me[1]?(Z=null,ne="BlackBerry"):"Device Software")+" "+me[0],B=null):this!=u&&Z!="Wii"&&(ee&&Ce||/Opera/.test(Q)&&/\b(?:MSIE|Firefox)\b/i.test(_)||Q=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(re)||Q=="IE"&&(re&&!/^Win/.test(re)&&B>5.5||/\bWindows XP\b/.test(re)&&B>8||B==8&&!/\bTrident\b/.test(_)))&&!t.test(me=R.call(u,_.replace(t,"")+";"))&&me.name&&(me="ing as "+me.name+((me=me.version)?" "+me:""),t.test(Q)?(/\bIE\b/.test(me)&&re=="Mac OS"&&(re=null),me="identify"+me):(me="mask"+me,Ae?Q=f(Ae.replace(/([a-z])([A-Z])/g,"$1 $2")):Q="Opera",/\bIE\b/.test(me)&&(re=null),ee||(B=null)),V=["Presto"],ye.push(me));(me=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(_)||0)[1])&&(me=[parseFloat(me.replace(/\.(\d)$/,".0$1")),me],Q=="Safari"&&me[1].slice(-1)=="+"?(Q="WebKit Nightly",se="alpha",B=me[1].slice(0,-1)):(B==me[1]||B==(me[2]=(/\bSafari\/([\d.]+\+?)/i.exec(_)||0)[1]))&&(B=null),me[1]=(/\bChrome\/([\d.]+)/i.exec(_)||0)[1],me[0]==537.36&&me[2]==537.36&&parseFloat(me[1])>=28&&V=="WebKit"&&(V=["Blink"]),!ee||!M&&!me[1]?(V&&(V[1]="like Safari"),me=(me=me[0],me<400?1:me<500?2:me<526?3:me<533?4:me<534?"4+":me<535?5:me<537?6:me<538?7:me<601?8:"8")):(V&&(V[1]="like Chrome"),me=me[1]||(me=me[0],me<530?1:me<532?2:me<532.05?3:me<533?4:me<534.03?5:me<534.07?6:me<534.1?7:me<534.13?8:me<534.16?9:me<534.24?10:me<534.3?11:me<535.01?12:me<535.02?"13+":me<535.07?15:me<535.11?16:me<535.19?17:me<536.05?18:me<536.1?19:me<537.01?20:me<537.11?"21+":me<537.13?23:me<537.18?24:me<537.24?25:me<537.36?26:V!="Blink"?"27":"28")),V&&(V[1]+=" "+(me+=typeof me=="number"?".x":/[.+]/.test(me)?"":"+")),Q=="Safari"&&(!B||parseInt(B)>45)&&(B=me)),Q=="Opera"&&(me=/\bzbov|zvav$/.exec(re))?(Q+=" ",ye.unshift("desktop mode"),me=="zvav"?(Q+="Mini",B=null):Q+="Mobile",re=re.replace(RegExp(" *"+me+"$"),"")):Q=="Safari"&&/\bChrome\b/.exec(V&&V[1])&&(ye.unshift("desktop mode"),Q="Chrome Mobile",B=null,/\bOS X\b/.test(re)?(ne="Apple",re="iOS 4.3+"):re=null),B&&B.indexOf(me=/[\d.]+$/.exec(re))==0&&_.indexOf("/"+me+"-")>-1&&(re=p(re.replace(me,""))),V&&!/\b(?:Avant|Nook)\b/.test(Q)&&(/Browser|Lunascape|Maxthon/.test(Q)||Q!="Safari"&&/^iOS/.test(re)&&/\bSafari\b/.test(V[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Q)&&V[1])&&((me=V[V.length-1])&&ye.push(me)),ye.length&&(ye=["("+ye.join("; ")+")"]),ne&&Z&&Z.indexOf(ne)<0&&ye.push("on "+ne),Z&&ye.push((/^on /.test(ye[ye.length-1])?"":"on ")+Z),re&&(me=/ ([\d.+]+)$/.exec(re),G=me&&re.charAt(re.length-me[0].length-1)=="/",re={architecture:32,family:me&&!G?re.replace(me[0],""):re,version:me?me[1]:null,toString:function(){var et=this.version;return this.family+(et&&!G?" "+et:"")+(this.architecture==64?" 64-bit":"")}}),(me=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Se))&&!/\bi686\b/i.test(Se)?(re&&(re.architecture=64,re.family=re.family.replace(RegExp(" *"+me),"")),Q&&(/\bWOW64\b/i.test(_)||ee&&/\w(?:86|32)$/.test(C.cpuClass||C.platform)&&!/\bWin64; x64\b/i.test(_))&&ye.unshift("32-bit")):re&&/^OS X/.test(re.family)&&Q=="Chrome"&&parseFloat(B)>=39&&(re.architecture=64),_||(_=null);var $e={};return $e.description=_,$e.layout=V&&V[0],$e.manufacturer=ne,$e.name=Q,$e.prerelease=se,$e.product=Z,$e.ua=_,$e.version=Q&&B,$e.os=re||{architecture:null,family:null,version:null,toString:function(){return"null"}},$e.parse=R,$e.toString=Xe,$e.version&&ye.unshift(B),$e.name&&ye.unshift(Q),re&&Q&&!(re==String(re).split(" ")[0]&&(re==Q.split(" ")[0]||Z))&&ye.push(Z?"("+re+")":"on "+re),ye.length&&($e.description=ye.join(" ")),$e}var O=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=O,define(function(){return O})):v&&m?u(O,function(_,x){v[x]=_}):T.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(H,q,L){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?q.exports={nextTick:g}:q.exports=P;function g(T,N,v,m){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var w=arguments.length,b,t;switch(w){case 0:case 1:return P.nextTick(T);case 2:return P.nextTick(function(){T.call(null,N)});case 3:return P.nextTick(function(){T.call(null,N,v)});case 4:return P.nextTick(function(){T.call(null,N,v,m)});default:for(b=new Array(w-1),t=0;t<b.length;)b[t++]=arguments[t];return P.nextTick(function(){T.apply(null,b)})}}}).call(this,H("_process"))},{_process:208}],208:[function(H,q,L){var P=q.exports={},g,T;function N(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=N}catch(h){g=N}try{typeof clearTimeout=="function"?T=clearTimeout:T=v}catch(h){T=v}})();function m(h){if(g===setTimeout)return setTimeout(h,0);if((g===N||!g)&&setTimeout)return g=setTimeout,setTimeout(h,0);try{return g(h,0)}catch(f){try{return g.call(null,h,0)}catch(u){return g.call(this,h,0)}}}function w(h){if(T===clearTimeout)return clearTimeout(h);if((T===v||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(h);try{return T(h)}catch(f){try{return T.call(null,h)}catch(u){return T.call(this,h)}}}var b=[],t=!1,d,a=-1;function c(){if(!t||!d)return;t=!1,d.length?b=d.concat(b):a=-1,b.length&&o()}function o(){if(t)return;var h=m(c);t=!0;for(var f=b.length;f;){for(d=b,b=[];++a<f;)d&&d[a].run();a=-1,f=b.length}d=null,t=!1,w(h)}P.nextTick=function(h){var f=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)f[u-1]=arguments[u];b.push(new n(h,f)),b.length===1&&!t&&m(o)};function n(h,f){this.fun=h,this.array=f}n.prototype.run=function(){this.fun.apply(null,this.array)},P.title="browser",P.browser=!0,P.env={},P.argv=[],P.version="",P.versions={};function s(){}P.on=s,P.addListener=s,P.once=s,P.off=s,P.removeListener=s,P.removeAllListeners=s,P.emit=s,P.prependListener=s,P.prependOnceListener=s,P.listeners=function(h){return[]},P.binding=function(h){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(h){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(H,q,L){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var T=typeof L=="object"&&L&&!L.nodeType&&L,N=typeof q=="object"&&q&&!q.nodeType&&q,v=typeof P=="object"&&P;(v.global===v||v.window===v||v.self===v)&&(g=v);var m,w=2147483647,b=36,t=1,d=26,a=38,c=700,o=72,n=128,s="-",h=/^xn--/,f=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,i={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},r=b-t,E=Math.floor,y=String.fromCharCode,p;function R(W){throw new RangeError(i[W])}function O(W,U){for(var D=W.length,X=[];D--;)X[D]=U(W[D]);return X}function _(W,U){var D=W.split("@"),X="";D.length>1&&(X=D[0]+"@",W=D[1]),W=W.replace(u,".");var ie=W.split("."),oe=O(ie,U).join(".");return X+oe}function x(W){for(var U=[],D=0,X=W.length,ie,oe;D<X;)ie=W.charCodeAt(D++),ie>=55296&&ie<=56319&&D<X?(oe=W.charCodeAt(D++),(oe&64512)==56320?U.push(((ie&1023)<<10)+(oe&1023)+65536):(U.push(ie),D--)):U.push(ie);return U}function S(W){return O(W,function(U){var D="";return U>65535&&(U-=65536,D+=y(U>>>10&1023|55296),U=56320|U&1023),D+=y(U),D}).join("")}function C(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:b}function j(W,U){return W+22+75*(W<26)-((U!=0)<<5)}function F(W,U,D){var X=0;for(W=D?E(W/c):W>>1,W+=E(W/U);W>r*d>>1;X+=b)W=E(W/r);return E(X+(r+1)*W/(W+a))}function M(W){var U=[],D=W.length,X,ie=0,oe=n,de=o,Ce,Ae,me,Se,ye,se,ee,B,G;for(Ce=W.lastIndexOf(s),Ce<0&&(Ce=0),Ae=0;Ae<Ce;++Ae)W.charCodeAt(Ae)>=128&&R("not-basic"),U.push(W.charCodeAt(Ae));for(me=Ce>0?Ce+1:0;me<D;){for(Se=ie,ye=1,se=b;!(me>=D&&R("invalid-input"),ee=C(W.charCodeAt(me++)),(ee>=b||ee>E((w-ie)/ye))&&R("overflow"),ie+=ee*ye,B=se<=de?t:se>=de+d?d:se-de,ee<B);se+=b)G=b-B,ye>E(w/G)&&R("overflow"),ye*=G;X=U.length+1,de=F(ie-Se,X,Se==0),E(ie/X)>w-oe&&R("overflow"),oe+=E(ie/X),ie%=X,U.splice(ie++,0,oe)}return S(U)}function Y(W){var U,D,X,ie,oe,de,Ce,Ae,me,Se,ye,se=[],ee,B,G,V;for(W=x(W),ee=W.length,U=n,D=0,oe=o,de=0;de<ee;++de)ye=W[de],ye<128&&se.push(y(ye));for(X=ie=se.length,ie&&se.push(s);X<ee;){for(Ce=w,de=0;de<ee;++de)ye=W[de],ye>=U&&ye<Ce&&(Ce=ye);for(B=X+1,Ce-U>E((w-D)/B)&&R("overflow"),D+=(Ce-U)*B,U=Ce,de=0;de<ee;++de)if(ye=W[de],ye<U&&++D>w&&R("overflow"),ye==U){for(Ae=D,me=b;!(Se=me<=oe?t:me>=oe+d?d:me-oe,Ae<Se);me+=b)V=Ae-Se,G=b-Se,se.push(y(j(Se+V%G,0))),Ae=E(V/G);se.push(y(j(Ae,0))),oe=F(D,B,X==ie),D=0,++X}++D,++U}return se.join("")}function K(W){return _(W,function(U){return h.test(U)?M(U.slice(4).toLowerCase()):U})}function A(W){return _(W,function(U){return f.test(U)?"xn--"+Y(U):U})}if(m={version:"1.4.1",ucs2:{decode:x,encode:S},decode:M,encode:Y,toASCII:A,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(T&&N)if(q.exports==T)N.exports=m;else for(p in m)m.hasOwnProperty(p)&&(T[p]=m[p]);else g.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(H,q,L){"use strict";function P(T,N){return Object.prototype.hasOwnProperty.call(T,N)}q.exports=function(T,N,v,m){N=N||"&",v=v||"=";var w={};if(typeof T!="string"||T.length===0)return w;var b=/\+/g;T=T.split(N);var t=1e3;m&&typeof m.maxKeys=="number"&&(t=m.maxKeys);var d=T.length;t>0&&d>t&&(d=t);for(var a=0;a<d;++a){var c=T[a].replace(b,"%20"),o=c.indexOf(v),n,s,h,f;o>=0?(n=c.substr(0,o),s=c.substr(o+1)):(n=c,s=""),h=decodeURIComponent(n),f=decodeURIComponent(s),P(w,h)?g(w[h])?w[h].push(f):w[h]=[w[h],f]:w[h]=f}return w};var g=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(H,q,L){"use strict";var P=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};q.exports=function(v,m,w,b){return m=m||"&",w=w||"=",v===null&&(v=void 0),typeof v=="object"?T(N(v),function(t){var d=encodeURIComponent(P(t))+w;return g(v[t])?T(v[t],function(a){return d+encodeURIComponent(P(a))}).join(m):d+encodeURIComponent(P(v[t]))}).join(m):b?encodeURIComponent(P(b))+w+encodeURIComponent(P(v)):""};var g=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};function T(v,m){if(v.map)return v.map(m);for(var w=[],b=0;b<v.length;b++)w.push(m(v[b],b));return w}var N=Object.keys||function(v){var m=[];for(var w in v)Object.prototype.hasOwnProperty.call(v,w)&&m.push(w);return m}},{}],212:[function(H,q,L){"use strict";L.decode=L.parse=H("./decode"),L.encode=L.stringify=H("./encode")},{"./decode":210,"./encode":211}],213:[function(H,q,L){q.exports=H("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=v(P),T=H("babel-runtime/core-js/object/keys"),N=v(T);function v(f){return f&&f.__esModule?f:{default:f}}var m=H("process-nextick-args"),w=N.default||function(f){var u=[];for(var i in f)u.push(i);return u};q.exports=n;var b=(0,g.default)(H("core-util-is"));b.inherits=H("inherits");var t=H("./_stream_readable"),d=H("./_stream_writable");b.inherits(n,t);for(var a=w(d.prototype),c=0;c<a.length;c++){var o=a[c];n.prototype[o]||(n.prototype[o]=d.prototype[o])}function n(f){if(!(this instanceof n))return new n(f);t.call(this,f),d.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",s)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(h,this)}function h(f){f.end()}Object.defineProperty(n.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=u,this._writableState.destroyed=u}}),n.prototype._destroy=function(f,u){this.push(null),this.end(),m.nextTick(u,f)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(w){return w&&w.__esModule?w:{default:w}}q.exports=m;var N=H("./_stream_transform"),v=(0,g.default)(H("core-util-is"));v.inherits=H("inherits"),v.inherits(m,N);function m(w){if(!(this instanceof m))return new m(w);N.call(this,w)}m.prototype._transform=function(w,b,t){t(null,w)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(H,q,L){(function(P,g){"use strict";var T=H("babel-runtime/core-js/object/get-prototype-of"),N=w(T),v=H("babel-runtime/core-js/object/create"),m=w(v);function w(V){return V&&V.__esModule?V:{default:V}}var b=H("process-nextick-args");q.exports=x;var t=H("isarray"),d;x.ReadableState=_;var a=H("events").EventEmitter,c=function(Q,Z){return Q.listeners(Z).length},o=H("./internal/streams/stream"),n=H("safe-buffer").Buffer,s=g.Uint8Array||function(){};function h(V){return n.from(V)}function f(V){return n.isBuffer(V)||V instanceof s}var u=(0,m.default)(H("core-util-is"));u.inherits=H("inherits");var i=H("util"),r=void 0;i&&i.debuglog?r=i.debuglog("stream"):r=function(){};var E=H("./internal/streams/BufferList"),y=H("./internal/streams/destroy"),p;u.inherits(x,o);var R=["error","close","destroy","pause","resume"];function O(V,Q,Z){if(typeof V.prependListener=="function")return V.prependListener(Q,Z);!V._events||!V._events[Q]?V.on(Q,Z):t(V._events[Q])?V._events[Q].unshift(Z):V._events[Q]=[Z,V._events[Q]]}function _(V,Q){d=d||H("./_stream_duplex"),V=V||{};var Z=Q instanceof d;this.objectMode=!!V.objectMode,Z&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var ne=V.highWaterMark,re=V.readableHighWaterMark,$=this.objectMode?16:16*1024;ne||ne===0?this.highWaterMark=ne:Z&&(re||re===0)?this.highWaterMark=re:this.highWaterMark=$,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(p||(p=H("string_decoder/").StringDecoder),this.decoder=new p(V.encoding),this.encoding=V.encoding)}function x(V){if(d=d||H("./_stream_duplex"),!(this instanceof x))return new x(V);this._readableState=new _(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),o.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Q){if(!this._readableState)return;this._readableState.destroyed=Q}}),x.prototype.destroy=y.destroy,x.prototype._undestroy=y.undestroy,x.prototype._destroy=function(V,Q){this.push(null),Q(V)},x.prototype.push=function(V,Q){var Z=this._readableState,ne;return Z.objectMode?ne=!0:typeof V=="string"&&(Q=Q||Z.defaultEncoding,Q!==Z.encoding&&(V=n.from(V,Q),Q=""),ne=!0),S(this,V,Q,!1,ne)},x.prototype.unshift=function(V){return S(this,V,null,!0,!1)};function S(V,Q,Z,ne,re){var $=V._readableState;if(Q===null)$.reading=!1,A(V,$);else{var J;re||(J=j($,Q)),J?V.emit("error",J):$.objectMode||Q&&Q.length>0?(typeof Q!="string"&&!$.objectMode&&(0,N.default)(Q)!==n.prototype&&(Q=h(Q)),ne?$.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):C(V,$,Q,!0):$.ended?V.emit("error",new Error("stream.push() after EOF")):($.reading=!1,$.decoder&&!Z?(Q=$.decoder.write(Q),$.objectMode||Q.length!==0?C(V,$,Q,!1):D(V,$)):C(V,$,Q,!1))):ne||($.reading=!1)}return F($)}function C(V,Q,Z,ne){Q.flowing&&Q.length===0&&!Q.sync?(V.emit("data",Z),V.read(0)):(Q.length+=Q.objectMode?1:Z.length,ne?Q.buffer.unshift(Z):Q.buffer.push(Z),Q.needReadable&&W(V)),D(V,Q)}function j(V,Q){var Z;return!f(Q)&&typeof Q!="string"&&Q!==void 0&&!V.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z}function F(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(V){return p||(p=H("string_decoder/").StringDecoder),this._readableState.decoder=new p(V),this._readableState.encoding=V,this};var M=8388608;function Y(V){return V>=M?V=M:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function K(V,Q){return V<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:V!==V?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(V>Q.highWaterMark&&(Q.highWaterMark=Y(V)),V<=Q.length?V:Q.ended?Q.length:(Q.needReadable=!0,0))}x.prototype.read=function(V){r("read",V),V=parseInt(V,10);var Q=this._readableState,Z=V;if(V!==0&&(Q.emittedReadable=!1),V===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended))return r("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?ee(this):W(this),null;if(V=K(V,Q),V===0&&Q.ended)return Q.length===0&&ee(this),null;var ne=Q.needReadable;r("need readable",ne),(Q.length===0||Q.length-V<Q.highWaterMark)&&(ne=!0,r("length less than watermark",ne)),Q.ended||Q.reading?(ne=!1,r("reading or ended",ne)):ne&&(r("do read"),Q.reading=!0,Q.sync=!0,Q.length===0&&(Q.needReadable=!0),this._read(Q.highWaterMark),Q.sync=!1,Q.reading||(V=K(Z,Q)));var re;return V>0?re=me(V,Q):re=null,re===null?(Q.needReadable=!0,V=0):Q.length-=V,Q.length===0&&(Q.ended||(Q.needReadable=!0),Z!==V&&Q.ended&&ee(this)),re!==null&&this.emit("data",re),re};function A(V,Q){if(Q.ended)return;if(Q.decoder){var Z=Q.decoder.end();Z&&Z.length&&(Q.buffer.push(Z),Q.length+=Q.objectMode?1:Z.length)}Q.ended=!0,W(V)}function W(V){var Q=V._readableState;Q.needReadable=!1,Q.emittedReadable||(r("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync?b.nextTick(U,V):U(V))}function U(V){r("emit readable"),V.emit("readable"),Ae(V)}function D(V,Q){Q.readingMore||(Q.readingMore=!0,b.nextTick(X,V,Q))}function X(V,Q){for(var Z=Q.length;!Q.reading&&!Q.flowing&&!Q.ended&&Q.length<Q.highWaterMark&&!(r("maybeReadMore read 0"),V.read(0),Z===Q.length);)Z=Q.length;Q.readingMore=!1}x.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(V,Q){var Z=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=V;break;case 1:ne.pipes=[ne.pipes,V];break;default:ne.pipes.push(V);break}ne.pipesCount+=1,r("pipe count=%d opts=%j",ne.pipesCount,Q);var re=(!Q||Q.end!==!1)&&V!==P.stdout&&V!==P.stderr,$=re?le:Be;ne.endEmitted?b.nextTick($):Z.once("end",$),V.on("unpipe",J);function J(Ie,rt){r("onunpipe"),Ie===Z&&(rt&&rt.hasUnpiped===!1&&(rt.hasUnpiped=!0,Fe()))}function le(){r("onend"),V.end()}var ue=ie(Z);V.on("drain",ue);var we=!1;function Fe(){r("cleanup"),V.removeListener("close",nt),V.removeListener("finish",at),V.removeListener("drain",ue),V.removeListener("error",et),V.removeListener("unpipe",J),Z.removeListener("end",le),Z.removeListener("end",Be),Z.removeListener("data",$e),we=!0,ne.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&ue()}var Xe=!1;Z.on("data",$e);function $e(Ie){r("ondata"),Xe=!1;var rt=V.write(Ie);rt===!1&&!Xe&&((ne.pipesCount===1&&ne.pipes===V||ne.pipesCount>1&&G(ne.pipes,V)!==-1)&&!we&&(r("false write response, pause",Z._readableState.awaitDrain),Z._readableState.awaitDrain++,Xe=!0),Z.pause())}function et(Ie){r("onerror",Ie),Be(),V.removeListener("error",et),c(V,"error")===0&&V.emit("error",Ie)}O(V,"error",et);function nt(){V.removeListener("finish",at),Be()}V.once("close",nt);function at(){r("onfinish"),V.removeListener("close",nt),Be()}V.once("finish",at);function Be(){r("unpipe"),Z.unpipe(V)}return V.emit("pipe",Z),ne.flowing||(r("pipe resume"),Z.resume()),V};function ie(V){return function(){var Q=V._readableState;r("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&c(V,"data")&&(Q.flowing=!0,Ae(V))}}x.prototype.unpipe=function(V){var Q=this._readableState,Z={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return V&&V!==Q.pipes?this:(V||(V=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,V&&V.emit("unpipe",this,Z),this);if(!V){var ne=Q.pipes,re=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var $=0;$<re;$++)ne[$].emit("unpipe",this,Z);return this}var J=G(Q.pipes,V);return J===-1?this:(Q.pipes.splice(J,1),Q.pipesCount-=1,Q.pipesCount===1&&(Q.pipes=Q.pipes[0]),V.emit("unpipe",this,Z),this)},x.prototype.on=function(V,Q){var Z=o.prototype.on.call(this,V,Q);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="readable"){var ne=this._readableState;!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.emittedReadable=!1,ne.reading?ne.length&&W(this):b.nextTick(oe,this))}return Z},x.prototype.addListener=x.prototype.on;function oe(V){r("readable nexttick read 0"),V.read(0)}x.prototype.resume=function(){var V=this._readableState;return V.flowing||(r("resume"),V.flowing=!0,de(this,V)),this};function de(V,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,b.nextTick(Ce,V,Q))}function Ce(V,Q){Q.reading||(r("resume read 0"),V.read(0)),Q.resumeScheduled=!1,Q.awaitDrain=0,V.emit("resume"),Ae(V),Q.flowing&&!Q.reading&&V.read(0)}x.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ae(V){var Q=V._readableState;for(r("flow",Q.flowing);Q.flowing&&V.read()!==null;);}x.prototype.wrap=function(V){var Q=this,Z=this._readableState,ne=!1;V.on("end",function(){if(r("wrapped end"),Z.decoder&&!Z.ended){var J=Z.decoder.end();J&&J.length&&Q.push(J)}Q.push(null)}),V.on("data",function(J){if(r("wrapped data"),Z.decoder&&(J=Z.decoder.write(J)),Z.objectMode&&J==null)return;if(!Z.objectMode&&(!J||!J.length))return;var le=Q.push(J);le||(ne=!0,V.pause())});for(var re in V)this[re]===void 0&&typeof V[re]=="function"&&(this[re]=function(J){return function(){return V[J].apply(V,arguments)}}(re));for(var $=0;$<R.length;$++)V.on(R[$],this.emit.bind(this,R[$]));return this._read=function(J){r("wrapped _read",J),ne&&(ne=!1,V.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=me;function me(V,Q){if(Q.length===0)return null;var Z;return Q.objectMode?Z=Q.buffer.shift():!V||V>=Q.length?(Q.decoder?Z=Q.buffer.join(""):Q.buffer.length===1?Z=Q.buffer.head.data:Z=Q.buffer.concat(Q.length),Q.buffer.clear()):Z=Se(V,Q.buffer,Q.decoder),Z}function Se(V,Q,Z){var ne;return V<Q.head.data.length?(ne=Q.head.data.slice(0,V),Q.head.data=Q.head.data.slice(V)):V===Q.head.data.length?ne=Q.shift():ne=Z?ye(V,Q):se(V,Q),ne}function ye(V,Q){var Z=Q.head,ne=1,re=Z.data;for(V-=re.length;Z=Z.next;){var $=Z.data,J=V>$.length?$.length:V;if(J===$.length?re+=$:re+=$.slice(0,V),V-=J,V===0){J===$.length?(++ne,Z.next?Q.head=Z.next:Q.head=Q.tail=null):(Q.head=Z,Z.data=$.slice(J));break}++ne}return Q.length-=ne,re}function se(V,Q){var Z=n.allocUnsafe(V),ne=Q.head,re=1;for(ne.data.copy(Z),V-=ne.data.length;ne=ne.next;){var $=ne.data,J=V>$.length?$.length:V;if($.copy(Z,Z.length-V,0,J),V-=J,V===0){J===$.length?(++re,ne.next?Q.head=ne.next:Q.head=Q.tail=null):(Q.head=ne,ne.data=$.slice(J));break}++re}return Q.length-=re,Z}function ee(V){var Q=V._readableState;if(Q.length>0)throw new Error('"endReadable()" called on non-empty stream');Q.endEmitted||(Q.ended=!0,b.nextTick(B,Q,V))}function B(V,Q){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,Q.readable=!1,Q.emit("end"))}function G(V,Q){for(var Z=0,ne=V.length;Z<ne;Z++)if(V[Z]===Q)return Z;return-1}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(d){return d&&d.__esModule?d:{default:d}}q.exports=w;var N=H("./_stream_duplex"),v=(0,g.default)(H("core-util-is"));v.inherits=H("inherits"),v.inherits(w,N);function m(d,a){var c=this._transformState;c.transforming=!1;var o=c.writecb;if(!o)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,a!=null&&this.push(a),o(d);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function w(d){if(!(this instanceof w))return new w(d);N.call(this,d),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",b)}function b(){var d=this;typeof this._flush=="function"?this._flush(function(a,c){t(d,a,c)}):t(this,null,null)}w.prototype.push=function(d,a){return this._transformState.needTransform=!1,N.prototype.push.call(this,d,a)},w.prototype._transform=function(d,a,c){throw new Error("_transform() is not implemented")},w.prototype._write=function(d,a,c){var o=this._transformState;if(o.writecb=c,o.writechunk=d,o.writeencoding=a,!o.transforming){var n=this._readableState;(o.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},w.prototype._read=function(d){var a=this._transformState;a.writechunk!==null&&a.writecb&&!a.transforming?(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform)):a.needTransform=!0},w.prototype._destroy=function(d,a){var c=this;N.prototype._destroy.call(this,d,function(o){a(o),c.emit("close")})};function t(d,a,c){if(a)return d.emit("error",a);if(c!=null&&d.push(c),d._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(d._transformState.transforming)throw new Error("Calling transform done when still transforming");return d.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(H,q,L){(function(P,g){"use strict";var T=H("babel-runtime/core-js/object/define-property"),N=o(T),v=H("babel-runtime/core-js/symbol/has-instance"),m=o(v),w=H("babel-runtime/core-js/symbol"),b=o(w),t=H("babel-runtime/core-js/object/create"),d=o(t),a=H("babel-runtime/core-js/set-immediate"),c=o(a);function o(se){return se&&se.__esModule?se:{default:se}}var n=H("process-nextick-args");q.exports=j;function s(se,ee,B){this.chunk=se,this.encoding=ee,this.callback=B,this.next=null}function h(se){var ee=this;this.next=null,this.entry=null,this.finish=function(){ye(ee,se)}}var f=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?c.default:n.nextTick,u;j.WritableState=S;var i=(0,d.default)(H("core-util-is"));i.inherits=H("inherits");var r={deprecate:H("util-deprecate")},E=H("./internal/streams/stream"),y=H("safe-buffer").Buffer,p=g.Uint8Array||function(){};function R(se){return y.from(se)}function O(se){return y.isBuffer(se)||se instanceof p}var _=H("./internal/streams/destroy");i.inherits(j,E);function x(){}function S(se,ee){u=u||H("./_stream_duplex"),se=se||{};var B=ee instanceof u;this.objectMode=!!se.objectMode,B&&(this.objectMode=this.objectMode||!!se.writableObjectMode);var G=se.highWaterMark,V=se.writableHighWaterMark,Q=this.objectMode?16:16*1024;G||G===0?this.highWaterMark=G:B&&(V||V===0)?this.highWaterMark=V:this.highWaterMark=Q,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 Z=se.decodeStrings===!1;this.decodeStrings=!Z,this.defaultEncoding=se.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){D(ee,ne)},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 h(this)}S.prototype.getBuffer=function(){for(var ee=this.bufferedRequest,B=[];ee;)B.push(ee),ee=ee.next;return B},function(){try{Object.defineProperty(S.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(se){}}();var C;typeof b.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(C=Function.prototype[m.default],(0,N.default)(j,m.default,{value:function(ee){return C.call(this,ee)?!0:this!==j?!1:ee&&ee._writableState instanceof S}})):C=function(ee){return ee instanceof this};function j(se){if(u=u||H("./_stream_duplex"),!C.call(j,this)&&!(this instanceof u))return new j(se);this._writableState=new S(se,this),this.writable=!0,se&&(typeof se.write=="function"&&(this._write=se.write),typeof se.writev=="function"&&(this._writev=se.writev),typeof se.destroy=="function"&&(this._destroy=se.destroy),typeof se.final=="function"&&(this._final=se.final)),E.call(this)}j.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function F(se,ee){var B=new Error("write after end");se.emit("error",B),n.nextTick(ee,B)}function M(se,ee,B,G){var V=!0,Q=!1;return B===null?Q=new TypeError("May not write null values to stream"):typeof B!="string"&&B!==void 0&&!ee.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q&&(se.emit("error",Q),n.nextTick(G,Q),V=!1),V}j.prototype.write=function(se,ee,B){var G=this._writableState,V=!1,Q=!G.objectMode&&O(se);return Q&&!y.isBuffer(se)&&(se=R(se)),typeof ee=="function"&&(B=ee,ee=null),Q?ee="buffer":ee||(ee=G.defaultEncoding),typeof B!="function"&&(B=x),G.ended?F(this,B):(Q||M(this,G,se,B))&&(G.pendingcb++,V=K(this,G,Q,se,ee,B)),V},j.prototype.cork=function(){var se=this._writableState;se.corked++},j.prototype.uncork=function(){var se=this._writableState;se.corked&&(se.corked--,!se.writing&&!se.corked&&!se.finished&&!se.bufferProcessing&&se.bufferedRequest&&oe(this,se))},j.prototype.setDefaultEncoding=function(ee){if(typeof ee=="string"&&(ee=ee.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ee+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ee);return this._writableState.defaultEncoding=ee,this};function Y(se,ee,B){return!se.objectMode&&se.decodeStrings!==!1&&typeof ee=="string"&&(ee=y.from(ee,B)),ee}Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(se,ee,B,G,V,Q){if(!B){var Z=Y(ee,G,V);G!==Z&&(B=!0,V="buffer",G=Z)}var ne=ee.objectMode?1:G.length;ee.length+=ne;var re=ee.length<ee.highWaterMark;if(re||(ee.needDrain=!0),ee.writing||ee.corked){var $=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:G,encoding:V,isBuf:B,callback:Q,next:null},$?$.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else A(se,ee,!1,ne,G,V,Q);return re}function A(se,ee,B,G,V,Q,Z){ee.writelen=G,ee.writecb=Z,ee.writing=!0,ee.sync=!0,B?se._writev(V,ee.onwrite):se._write(V,Q,ee.onwrite),ee.sync=!1}function W(se,ee,B,G,V){--ee.pendingcb,B?(n.nextTick(V,G),n.nextTick(me,se,ee),se._writableState.errorEmitted=!0,se.emit("error",G)):(V(G),se._writableState.errorEmitted=!0,se.emit("error",G),me(se,ee))}function U(se){se.writing=!1,se.writecb=null,se.length-=se.writelen,se.writelen=0}function D(se,ee){var B=se._writableState,G=B.sync,V=B.writecb;if(U(B),ee)W(se,B,G,ee,V);else{var Q=de(B);!Q&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&oe(se,B),G?f(X,se,B,Q,V):X(se,B,Q,V)}}function X(se,ee,B,G){B||ie(se,ee),ee.pendingcb--,G(),me(se,ee)}function ie(se,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,se.emit("drain"))}function oe(se,ee){ee.bufferProcessing=!0;var B=ee.bufferedRequest;if(se._writev&&B&&B.next){var G=ee.bufferedRequestCount,V=new Array(G),Q=ee.corkedRequestsFree;Q.entry=B;for(var Z=0,ne=!0;B;)V[Z]=B,B.isBuf||(ne=!1),B=B.next,Z+=1;V.allBuffers=ne,A(se,ee,!0,ee.length,V,"",Q.finish),ee.pendingcb++,ee.lastBufferedRequest=null,Q.next?(ee.corkedRequestsFree=Q.next,Q.next=null):ee.corkedRequestsFree=new h(ee),ee.bufferedRequestCount=0}else{for(;B;){var re=B.chunk,$=B.encoding,J=B.callback,le=ee.objectMode?1:re.length;if(A(se,ee,!1,le,re,$,J),B=B.next,ee.bufferedRequestCount--,ee.writing)break}B===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=B,ee.bufferProcessing=!1}j.prototype._write=function(se,ee,B){B(new Error("_write() is not implemented"))},j.prototype._writev=null,j.prototype.end=function(se,ee,B){var G=this._writableState;typeof se=="function"?(B=se,se=null,ee=null):typeof ee=="function"&&(B=ee,ee=null),se!=null&&this.write(se,ee),G.corked&&(G.corked=1,this.uncork()),!G.ending&&!G.finished&&Se(this,G,B)};function de(se){return se.ending&&se.length===0&&se.bufferedRequest===null&&!se.finished&&!se.writing}function Ce(se,ee){se._final(function(B){ee.pendingcb--,B&&se.emit("error",B),ee.prefinished=!0,se.emit("prefinish"),me(se,ee)})}function Ae(se,ee){!ee.prefinished&&!ee.finalCalled&&(typeof se._final=="function"?(ee.pendingcb++,ee.finalCalled=!0,n.nextTick(Ce,se,ee)):(ee.prefinished=!0,se.emit("prefinish")))}function me(se,ee){var B=de(ee);return B&&(Ae(se,ee),ee.pendingcb===0&&(ee.finished=!0,se.emit("finish"))),B}function Se(se,ee,B){ee.ending=!0,me(se,ee),B&&(ee.finished?n.nextTick(B):se.once("finish",B)),ee.ended=!0,se.writable=!1}function ye(se,ee,B){var G=se.entry;for(se.entry=null;G;){var V=G.callback;ee.pendingcb--,V(B),G=G.next}ee.corkedRequestsFree?ee.corkedRequestsFree.next=se:ee.corkedRequestsFree=se}Object.defineProperty(j.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ee){if(!this._writableState)return;this._writableState.destroyed=ee}}),j.prototype.destroy=_.destroy,j.prototype._undestroy=_.undestroy,j.prototype._destroy=function(se,ee){this.end(),ee(se)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(H,q,L){"use strict";function P(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}var g=H("safe-buffer").Buffer,T=H("util");function N(v,m,w){v.copy(m,w)}q.exports=function(){function v(){P(this,v),this.head=null,this.tail=null,this.length=0}return v.prototype.push=function(w){var b={data:w,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},v.prototype.unshift=function(w){var b={data:w,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},v.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},v.prototype.clear=function(){this.head=this.tail=null,this.length=0},v.prototype.join=function(w){if(this.length===0)return"";for(var b=this.head,t=""+b.data;b=b.next;)t+=w+b.data;return t},v.prototype.concat=function(w){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var b=g.allocUnsafe(w>>>0),t=this.head,d=0;t;)N(t.data,b,d),d+=t.data.length,t=t.next;return b},v}(),T&&T.inspect&&T.inspect.custom&&(q.exports.prototype[T.inspect.custom]=function(){var v=T.inspect({length:this.length});return this.constructor.name+" "+v})},{"safe-buffer":228,util:71}],220:[function(H,q,L){"use strict";var P=H("process-nextick-args");function g(v,m){var w=this,b=this._readableState&&this._readableState.destroyed,t=this._writableState&&this._writableState.destroyed;return b||t?(m?m(v):v&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(N,this,v),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(v||null,function(d){!m&&d?(P.nextTick(N,w,d),w._writableState&&(w._writableState.errorEmitted=!0)):m&&m(d)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function N(v,m){v.emit("error",m)}q.exports={destroy:g,undestroy:T}},{"process-nextick-args":207}],221:[function(H,q,L){"use strict";q.exports=H("events").EventEmitter},{events:192}],222:[function(H,q,L){q.exports=H("./readable").PassThrough},{"./readable":223}],223:[function(H,q,L){L=q.exports=H("./lib/_stream_readable.js"),L.Stream=L,L.Readable=L,L.Writable=H("./lib/_stream_writable.js"),L.Duplex=H("./lib/_stream_duplex.js"),L.Transform=H("./lib/_stream_transform.js"),L.PassThrough=H("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(H,q,L){q.exports=H("./readable").Transform},{"./readable":223}],225:[function(H,q,L){q.exports=H("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(H,q,L){var P=function(){return this}()||Function("return this")(),g=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,T=g&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,q.exports=H("./runtime"),g)P.regeneratorRuntime=T;else try{delete P.regeneratorRuntime}catch(N){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(H,q,L){!function(P){"use strict";var g=Object.prototype,T=g.hasOwnProperty,N,v=typeof Symbol=="function"?Symbol:{},m=v.iterator||"@@iterator",w=v.asyncIterator||"@@asyncIterator",b=v.toStringTag||"@@toStringTag",t=typeof q=="object",d=P.regeneratorRuntime;if(d){t&&(q.exports=d);return}d=P.regeneratorRuntime=t?q.exports:{};function a(K,A,W,U){var D=A&&A.prototype instanceof u?A:u,X=Object.create(D.prototype),ie=new F(U||[]);return X._invoke=x(K,W,ie),X}d.wrap=a;function c(K,A,W){try{return{type:"normal",arg:K.call(A,W)}}catch(U){return{type:"throw",arg:U}}}var o="suspendedStart",n="suspendedYield",s="executing",h="completed",f={};function u(){}function i(){}function r(){}var E={};E[m]=function(){return this};var y=Object.getPrototypeOf,p=y&&y(y(M([])));p&&p!==g&&T.call(p,m)&&(E=p);var R=r.prototype=u.prototype=Object.create(E);i.prototype=R.constructor=r,r.constructor=i,r[b]=i.displayName="GeneratorFunction";function O(K){["next","throw","return"].forEach(function(A){K[A]=function(W){return this._invoke(A,W)}})}d.isGeneratorFunction=function(K){var A=typeof K=="function"&&K.constructor;return A?A===i||(A.displayName||A.name)==="GeneratorFunction":!1},d.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,r):(K.__proto__=r,b in K||(K[b]="GeneratorFunction")),K.prototype=Object.create(R),K},d.awrap=function(K){return{__await:K}};function _(K){function A(D,X,ie,oe){var de=c(K[D],K,X);if(de.type==="throw")oe(de.arg);else{var Ce=de.arg,Ae=Ce.value;return Ae&&typeof Ae=="object"&&T.call(Ae,"__await")?Promise.resolve(Ae.__await).then(function(me){A("next",me,ie,oe)},function(me){A("throw",me,ie,oe)}):Promise.resolve(Ae).then(function(me){Ce.value=me,ie(Ce)},oe)}}var W;function U(D,X){function ie(){return new Promise(function(oe,de){A(D,X,oe,de)})}return W=W?W.then(ie,ie):ie()}this._invoke=U}O(_.prototype),_.prototype[w]=function(){return this},d.AsyncIterator=_,d.async=function(K,A,W,U){var D=new _(a(K,A,W,U));return d.isGeneratorFunction(A)?D:D.next().then(function(X){return X.done?X.value:D.next()})};function x(K,A,W){var U=o;return function(X,ie){if(U===s)throw new Error("Generator is already running");if(U===h){if(X==="throw")throw ie;return Y()}for(W.method=X,W.arg=ie;;){var oe=W.delegate;if(oe){var de=S(oe,W);if(de){if(de===f)continue;return de}}if(W.method==="next")W.sent=W._sent=W.arg;else if(W.method==="throw"){if(U===o)throw U=h,W.arg;W.dispatchException(W.arg)}else W.method==="return"&&W.abrupt("return",W.arg);U=s;var Ce=c(K,A,W);if(Ce.type==="normal"){if(U=W.done?h:n,Ce.arg===f)continue;return{value:Ce.arg,done:W.done}}else Ce.type==="throw"&&(U=h,W.method="throw",W.arg=Ce.arg)}}}function S(K,A){var W=K.iterator[A.method];if(W===N){if(A.delegate=null,A.method==="throw"){if(K.iterator.return&&(A.method="return",A.arg=N,S(K,A),A.method==="throw"))return f;A.method="throw",A.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var U=c(W,K.iterator,A.arg);if(U.type==="throw")return A.method="throw",A.arg=U.arg,A.delegate=null,f;var D=U.arg;if(!D)return A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,f;if(D.done)A[K.resultName]=D.value,A.next=K.nextLoc,A.method!=="return"&&(A.method="next",A.arg=N);else return D;return A.delegate=null,f}O(R),R[b]="Generator",R[m]=function(){return this},R.toString=function(){return"[object Generator]"};function C(K){var A={tryLoc:K[0]};1 in K&&(A.catchLoc=K[1]),2 in K&&(A.finallyLoc=K[2],A.afterLoc=K[3]),this.tryEntries.push(A)}function j(K){var A=K.completion||{};A.type="normal",delete A.arg,K.completion=A}function F(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(C,this),this.reset(!0)}d.keys=function(K){var A=[];for(var W in K)A.push(W);return A.reverse(),function U(){for(;A.length;){var D=A.pop();if(D in K)return U.value=D,U.done=!1,U}return U.done=!0,U}};function M(K){if(K){var A=K[m];if(A)return A.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var W=-1,U=function D(){for(;++W<K.length;)if(T.call(K,W))return D.value=K[W],D.done=!1,D;return D.value=N,D.done=!0,D};return U.next=U}}return{next:Y}}d.values=M;function Y(){return{value:N,done:!0}}F.prototype={constructor:F,reset:function(K){if(this.prev=0,this.next=0,this.sent=this._sent=N,this.done=!1,this.delegate=null,this.method="next",this.arg=N,this.tryEntries.forEach(j),!K)for(var A in this)A.charAt(0)==="t"&&T.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=N)},stop:function(){this.done=!0;var K=this.tryEntries[0],A=K.completion;if(A.type==="throw")throw A.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var A=this;function W(de,Ce){return X.type="throw",X.arg=K,A.next=de,Ce&&(A.method="next",A.arg=N),!!Ce}for(var U=this.tryEntries.length-1;U>=0;--U){var D=this.tryEntries[U],X=D.completion;if(D.tryLoc==="root")return W("end");if(D.tryLoc<=this.prev){var ie=T.call(D,"catchLoc"),oe=T.call(D,"finallyLoc");if(ie&&oe){if(this.prev<D.catchLoc)return W(D.catchLoc,!0);if(this.prev<D.finallyLoc)return W(D.finallyLoc)}else if(ie){if(this.prev<D.catchLoc)return W(D.catchLoc,!0)}else if(oe){if(this.prev<D.finallyLoc)return W(D.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,A){for(var W=this.tryEntries.length-1;W>=0;--W){var U=this.tryEntries[W];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var D=U;break}}D&&(K==="break"||K==="continue")&&D.tryLoc<=A&&A<=D.finallyLoc&&(D=null);var X=D?D.completion:{};return X.type=K,X.arg=A,D?(this.method="next",this.next=D.finallyLoc,f):this.complete(X)},complete:function(K,A){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&A&&(this.next=A),f},finish:function(K){for(var A=this.tryEntries.length-1;A>=0;--A){var W=this.tryEntries[A];if(W.finallyLoc===K)return this.complete(W.completion,W.afterLoc),j(W),f}},catch:function(K){for(var A=this.tryEntries.length-1;A>=0;--A){var W=this.tryEntries[A];if(W.tryLoc===K){var U=W.completion;if(U.type==="throw"){var D=U.arg;j(W)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(K,A,W){return this.delegate={iterator:M(K),resultName:A,nextLoc:W},this.method==="next"&&(this.arg=N),f}}}(function(){return this}()||Function("return this")())},{}],228:[function(H,q,L){var P=H("buffer"),g=P.Buffer;function T(v,m){for(var w in v)m[w]=v[w]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?q.exports=P:(T(P,L),L.Buffer=N);function N(v,m,w){return g(v,m,w)}T(g,N),N.from=function(v,m,w){if(typeof v=="number")throw new TypeError("Argument must not be a number");return g(v,m,w)},N.alloc=function(v,m,w){if(typeof v!="number")throw new TypeError("Argument must be a number");var b=g(v);return m!==void 0?typeof w=="string"?b.fill(m,w):b.fill(m):b.fill(0),b},N.allocUnsafe=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return g(v)},N.allocUnsafeSlow=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(v)}},{buffer:73}],229:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/core-js/string/from-code-point"),T=n(g),N=H("babel-runtime/core-js/json/stringify"),v=n(N),m=H("babel-runtime/helpers/typeof"),w=n(m),b=H("babel-runtime/core-js/object/define-property"),t=n(b),d=H("babel-runtime/core-js/object/keys"),a=n(d),c=H("babel-runtime/core-js/object/create"),o=n(c);function n(s){return s&&s.__esModule?s:{default:s}}(function(s){s.parser=function($,J){return new f($,J)},s.SAXParser=f,s.SAXStream=R,s.createStream=p,s.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];s.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function f($,J){if(!(this instanceof f))return new f($,J);var le=this;i(le),le.q=le.c="",le.bufferCheckPosition=s.MAX_BUFFER_LENGTH,le.opt=J||{},le.opt.lowercase=le.opt.lowercase||le.opt.lowercasetags,le.looseCase=le.opt.lowercase?"toLowerCase":"toUpperCase",le.tags=[],le.closed=le.closedRoot=le.sawRoot=!1,le.tag=le.error=null,le.strict=!!$,le.noscript=!!($||le.opt.noscript),le.state=X.BEGIN,le.strictEntities=le.opt.strictEntities,le.ENTITIES=le.strictEntities?(0,o.default)(s.XML_ENTITIES):(0,o.default)(s.ENTITIES),le.attribList=[],le.opt.xmlns&&(le.ns=(0,o.default)(C)),le.trackPosition=le.opt.position!==!1,le.trackPosition&&(le.position=le.line=le.column=0),oe(le,"onready")}o.default||(Object.create=function($){function J(){}J.prototype=$;var le=new J;return le}),a.default||(Object.keys=function($){var J=[];for(var le in $)$.hasOwnProperty(le)&&J.push(le);return J});function u($){for(var J=Math.max(s.MAX_BUFFER_LENGTH,10),le=0,ue=0,we=h.length;ue<we;ue++){var Fe=$[h[ue]].length;if(Fe>J)switch(h[ue]){case"textNode":Ce($);break;case"cdata":de($,"oncdata",$.cdata),$.cdata="";break;case"script":de($,"onscript",$.script),$.script="";break;default:me($,"Max buffer length exceeded: "+h[ue])}le=Math.max(le,Fe)}var Xe=s.MAX_BUFFER_LENGTH-le;$.bufferCheckPosition=Xe+$.position}function i($){for(var J=0,le=h.length;J<le;J++)$[h[J]]=""}function r($){Ce($),$.cdata!==""&&(de($,"oncdata",$.cdata),$.cdata=""),$.script!==""&&(de($,"onscript",$.script),$.script="")}f.prototype={end:function(){Se(this)},write:re,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){r(this)}};var E;try{E=H("stream").Stream}catch($){E=function(){}}var y=s.EVENTS.filter(function($){return $!=="error"&&$!=="end"});function p($,J){return new R($,J)}function R($,J){if(!(this instanceof R))return new R($,J);E.apply(this),this._parser=new f($,J),this.writable=!0,this.readable=!0;var le=this;this._parser.onend=function(){le.emit("end")},this._parser.onerror=function(ue){le.emit("error",ue),le._parser.error=null},this._decoder=null,y.forEach(function(ue){(0,t.default)(le,"on"+ue,{get:function(){return le._parser["on"+ue]},set:function(Fe){if(!Fe)return le.removeAllListeners(ue),le._parser["on"+ue]=Fe,Fe;le.on(ue,Fe)},enumerable:!0,configurable:!1})})}R.prototype=(0,o.default)(E.prototype,{constructor:{value:R}}),R.prototype.write=function($){if(typeof P=="function"&&typeof P.isBuffer=="function"&&P.isBuffer($)){if(!this._decoder){var J=H("string_decoder").StringDecoder;this._decoder=new J("utf8")}$=this._decoder.write($)}return this._parser.write($.toString()),this.emit("data",$),!0},R.prototype.end=function($){return $&&$.length&&this.write($),this._parser.end(),!0},R.prototype.on=function($,J){var le=this;return!le._parser["on"+$]&&y.indexOf($)!==-1&&(le._parser["on"+$]=function(){var ue=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ue.splice(0,0,$),le.emit.apply(le,ue)}),E.prototype.on.call(le,$,J)};var O="[CDATA[",_="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",S="http://www.w3.org/2000/xmlns/",C={xml:x,xmlns:S},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]/,F=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function K($){return $===" "||$===`
`||$==="\r"||$===" "}function A($){return $==='"'||$==="'"}function W($){return $===">"||K($)}function U($,J){return $.test(J)}function D($,J){return!U($,J)}var X=0;s.STATE={BEGIN:X++,BEGIN_WHITESPACE:X++,TEXT:X++,TEXT_ENTITY:X++,OPEN_WAKA:X++,SGML_DECL:X++,SGML_DECL_QUOTED:X++,DOCTYPE:X++,DOCTYPE_QUOTED:X++,DOCTYPE_DTD:X++,DOCTYPE_DTD_QUOTED:X++,COMMENT_STARTING:X++,COMMENT:X++,COMMENT_ENDING:X++,COMMENT_ENDED:X++,CDATA:X++,CDATA_ENDING:X++,CDATA_ENDING_2:X++,PROC_INST:X++,PROC_INST_BODY:X++,PROC_INST_ENDING:X++,OPEN_TAG:X++,OPEN_TAG_SLASH:X++,ATTRIB:X++,ATTRIB_NAME:X++,ATTRIB_NAME_SAW_WHITE:X++,ATTRIB_VALUE:X++,ATTRIB_VALUE_QUOTED:X++,ATTRIB_VALUE_CLOSED:X++,ATTRIB_VALUE_UNQUOTED:X++,ATTRIB_VALUE_ENTITY_Q:X++,ATTRIB_VALUE_ENTITY_U:X++,CLOSE_TAG:X++,CLOSE_TAG_SAW_WHITE:X++,SCRIPT:X++,SCRIPT_ENDING:X++},s.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},s.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,a.default)(s.ENTITIES).forEach(function($){var J=s.ENTITIES[$],le=typeof J=="number"?String.fromCharCode(J):J;s.ENTITIES[$]=le});for(var ie in s.STATE)s.STATE[s.STATE[ie]]=ie;X=s.STATE;function oe($,J,le){$[J]&&$[J](le)}function de($,J,le){$.textNode&&Ce($),oe($,J,le)}function Ce($){$.textNode=Ae($.opt,$.textNode),$.textNode&&oe($,"ontext",$.textNode),$.textNode=""}function Ae($,J){return $.trim&&(J=J.trim()),$.normalize&&(J=J.replace(/\s+/g," ")),J}function me($,J){return Ce($),$.trackPosition&&(J+=`
Line: `+$.line+`
Column: `+$.column+`
Char: `+$.c),J=new Error(J),$.error=J,oe($,"onerror",J),$}function Se($){return $.sawRoot&&!$.closedRoot&&ye($,"Unclosed root tag"),$.state!==X.BEGIN&&$.state!==X.BEGIN_WHITESPACE&&$.state!==X.TEXT&&me($,"Unexpected end"),Ce($),$.c="",$.closed=!0,oe($,"onend"),f.call($,$.strict,$.opt),$}function ye($,J){if((typeof $=="undefined"?"undefined":(0,w.default)($))!=="object"||!($ instanceof f))throw new Error("bad call to strictFail");$.strict&&me($,J)}function se($){$.strict||($.tagName=$.tagName[$.looseCase]());var J=$.tags[$.tags.length-1]||$,le=$.tag={name:$.tagName,attributes:{}};$.opt.xmlns&&(le.ns=J.ns),$.attribList.length=0,de($,"onopentagstart",le)}function ee($,J){var le=$.indexOf(":"),ue=le<0?["",$]:$.split(":"),we=ue[0],Fe=ue[1];return J&&$==="xmlns"&&(we="xmlns",Fe=""),{prefix:we,local:Fe}}function B($){if($.strict||($.attribName=$.attribName[$.looseCase]()),$.attribList.indexOf($.attribName)!==-1||$.tag.attributes.hasOwnProperty($.attribName)){$.attribName=$.attribValue="";return}if($.opt.xmlns){var J=ee($.attribName,!0),le=J.prefix,ue=J.local;if(le==="xmlns")if(ue==="xml"&&$.attribValue!==x)ye($,"xml: prefix must be bound to "+x+`
Actual: `+$.attribValue);else if(ue==="xmlns"&&$.attribValue!==S)ye($,"xmlns: prefix must be bound to "+S+`
Actual: `+$.attribValue);else{var we=$.tag,Fe=$.tags[$.tags.length-1]||$;we.ns===Fe.ns&&(we.ns=(0,o.default)(Fe.ns)),we.ns[ue]=$.attribValue}$.attribList.push([$.attribName,$.attribValue])}else $.tag.attributes[$.attribName]=$.attribValue,de($,"onattribute",{name:$.attribName,value:$.attribValue});$.attribName=$.attribValue=""}function G($,J){if($.opt.xmlns){var le=$.tag,ue=ee($.tagName);le.prefix=ue.prefix,le.local=ue.local,le.uri=le.ns[ue.prefix]||"",le.prefix&&!le.uri&&(ye($,"Unbound namespace prefix: "+(0,v.default)($.tagName)),le.uri=ue.prefix);var we=$.tags[$.tags.length-1]||$;le.ns&&we.ns!==le.ns&&(0,a.default)(le.ns).forEach(function(_e){de($,"onopennamespace",{prefix:_e,uri:le.ns[_e]})});for(var Fe=0,Xe=$.attribList.length;Fe<Xe;Fe++){var $e=$.attribList[Fe],et=$e[0],nt=$e[1],at=ee(et,!0),Be=at.prefix,Ie=at.local,rt=Be===""?"":le.ns[Be]||"",lt={name:et,value:nt,prefix:Be,local:Ie,uri:rt};Be&&Be!=="xmlns"&&!rt&&(ye($,"Unbound namespace prefix: "+(0,v.default)(Be)),lt.uri=Be),$.tag.attributes[et]=lt,de($,"onattribute",lt)}$.attribList.length=0}$.tag.isSelfClosing=!!J,$.sawRoot=!0,$.tags.push($.tag),de($,"onopentag",$.tag),J||(!$.noscript&&$.tagName.toLowerCase()==="script"?$.state=X.SCRIPT:$.state=X.TEXT,$.tag=null,$.tagName=""),$.attribName=$.attribValue="",$.attribList.length=0}function V($){if(!$.tagName){ye($,"Weird empty close tag."),$.textNode+="</>",$.state=X.TEXT;return}if($.script){if($.tagName!=="script"){$.script+="</"+$.tagName+">",$.tagName="",$.state=X.SCRIPT;return}de($,"onscript",$.script),$.script=""}var J=$.tags.length,le=$.tagName;$.strict||(le=le[$.looseCase]());for(var ue=le;J--;){var we=$.tags[J];if(we.name!==ue)ye($,"Unexpected close tag");else break}if(J<0){ye($,"Unmatched closing tag: "+$.tagName),$.textNode+="</"+$.tagName+">",$.state=X.TEXT;return}$.tagName=le;for(var Fe=$.tags.length;Fe-- >J;){var Xe=$.tag=$.tags.pop();$.tagName=$.tag.name,de($,"onclosetag",$.tagName);var $e={};for(var et in Xe.ns)$e[et]=Xe.ns[et];var nt=$.tags[$.tags.length-1]||$;$.opt.xmlns&&Xe.ns!==nt.ns&&(0,a.default)(Xe.ns).forEach(function(at){var Be=Xe.ns[at];de($,"onclosenamespace",{prefix:at,uri:Be})})}J===0&&($.closedRoot=!0),$.tagName=$.attribValue=$.attribName="",$.attribList.length=0,$.state=X.TEXT}function Q($){var J=$.entity,le=J.toLowerCase(),ue,we="";return $.ENTITIES[J]?$.ENTITIES[J]:$.ENTITIES[le]?$.ENTITIES[le]:(J=le,J.charAt(0)==="#"&&(J.charAt(1)==="x"?(J=J.slice(2),ue=parseInt(J,16),we=ue.toString(16)):(J=J.slice(1),ue=parseInt(J,10),we=ue.toString(10))),J=J.replace(/^0+/,""),isNaN(ue)||we.toLowerCase()!==J?(ye($,"Invalid character entity"),"&"+$.entity+";"):(0,T.default)(ue))}function Z($,J){J==="<"?($.state=X.OPEN_WAKA,$.startTagPosition=$.position):K(J)||(ye($,"Non-whitespace before first tag."),$.textNode=J,$.state=X.TEXT)}function ne($,J){var le="";return J<$.length&&(le=$.charAt(J)),le}function re($){var J=this;if(this.error)throw this.error;if(J.closed)return me(J,"Cannot write after close. Assign an onready handler.");if($===null)return Se(J);(typeof $=="undefined"?"undefined":(0,w.default)($))==="object"&&($=$.toString());for(var le=0,ue="";!(ue=ne($,le++),J.c=ue,!ue);){J.trackPosition&&(J.position++,ue===`
`?(J.line++,J.column=0):J.column++);switch(J.state){case X.BEGIN:if(J.state=X.BEGIN_WHITESPACE,ue==="\uFEFF")continue;Z(J,ue);continue;case X.BEGIN_WHITESPACE:Z(J,ue);continue;case X.TEXT:if(J.sawRoot&&!J.closedRoot){for(var we=le-1;ue&&ue!=="<"&&ue!=="&";)ue=ne($,le++),ue&&J.trackPosition&&(J.position++,ue===`
`?(J.line++,J.column=0):J.column++);J.textNode+=$.substring(we,le-1)}ue==="<"&&!(J.sawRoot&&J.closedRoot&&!J.strict)?(J.state=X.OPEN_WAKA,J.startTagPosition=J.position):(!K(ue)&&(!J.sawRoot||J.closedRoot)&&ye(J,"Text data outside of root node."),ue==="&"?J.state=X.TEXT_ENTITY:J.textNode+=ue);continue;case X.SCRIPT:ue==="<"?J.state=X.SCRIPT_ENDING:J.script+=ue;continue;case X.SCRIPT_ENDING:ue==="/"?J.state=X.CLOSE_TAG:(J.script+="<"+ue,J.state=X.SCRIPT);continue;case X.OPEN_WAKA:if(ue==="!")J.state=X.SGML_DECL,J.sgmlDecl="";else if(!K(ue))if(U(j,ue))J.state=X.OPEN_TAG,J.tagName=ue;else if(ue==="/")J.state=X.CLOSE_TAG,J.tagName="";else if(ue==="?")J.state=X.PROC_INST,J.procInstName=J.procInstBody="";else{if(ye(J,"Unencoded <"),J.startTagPosition+1<J.position){var Fe=J.position-J.startTagPosition;ue=new Array(Fe).join(" ")+ue}J.textNode+="<"+ue,J.state=X.TEXT}continue;case X.SGML_DECL:(J.sgmlDecl+ue).toUpperCase()===O?(de(J,"onopencdata"),J.state=X.CDATA,J.sgmlDecl="",J.cdata=""):J.sgmlDecl+ue==="--"?(J.state=X.COMMENT,J.comment="",J.sgmlDecl=""):(J.sgmlDecl+ue).toUpperCase()===_?(J.state=X.DOCTYPE,(J.doctype||J.sawRoot)&&ye(J,"Inappropriately located doctype declaration"),J.doctype="",J.sgmlDecl=""):ue===">"?(de(J,"onsgmldeclaration",J.sgmlDecl),J.sgmlDecl="",J.state=X.TEXT):(A(ue)&&(J.state=X.SGML_DECL_QUOTED),J.sgmlDecl+=ue);continue;case X.SGML_DECL_QUOTED:ue===J.q&&(J.state=X.SGML_DECL,J.q=""),J.sgmlDecl+=ue;continue;case X.DOCTYPE:ue===">"?(J.state=X.TEXT,de(J,"ondoctype",J.doctype),J.doctype=!0):(J.doctype+=ue,ue==="["?J.state=X.DOCTYPE_DTD:A(ue)&&(J.state=X.DOCTYPE_QUOTED,J.q=ue));continue;case X.DOCTYPE_QUOTED:J.doctype+=ue,ue===J.q&&(J.q="",J.state=X.DOCTYPE);continue;case X.DOCTYPE_DTD:J.doctype+=ue,ue==="]"?J.state=X.DOCTYPE:A(ue)&&(J.state=X.DOCTYPE_DTD_QUOTED,J.q=ue);continue;case X.DOCTYPE_DTD_QUOTED:J.doctype+=ue,ue===J.q&&(J.state=X.DOCTYPE_DTD,J.q="");continue;case X.COMMENT:ue==="-"?J.state=X.COMMENT_ENDING:J.comment+=ue;continue;case X.COMMENT_ENDING:ue==="-"?(J.state=X.COMMENT_ENDED,J.comment=Ae(J.opt,J.comment),J.comment&&de(J,"oncomment",J.comment),J.comment=""):(J.comment+="-"+ue,J.state=X.COMMENT);continue;case X.COMMENT_ENDED:ue!==">"?(ye(J,"Malformed comment"),J.comment+="--"+ue,J.state=X.COMMENT):J.state=X.TEXT;continue;case X.CDATA:ue==="]"?J.state=X.CDATA_ENDING:J.cdata+=ue;continue;case X.CDATA_ENDING:ue==="]"?J.state=X.CDATA_ENDING_2:(J.cdata+="]"+ue,J.state=X.CDATA);continue;case X.CDATA_ENDING_2:ue===">"?(J.cdata&&de(J,"oncdata",J.cdata),de(J,"onclosecdata"),J.cdata="",J.state=X.TEXT):ue==="]"?J.cdata+="]":(J.cdata+="]]"+ue,J.state=X.CDATA);continue;case X.PROC_INST:ue==="?"?J.state=X.PROC_INST_ENDING:K(ue)?J.state=X.PROC_INST_BODY:J.procInstName+=ue;continue;case X.PROC_INST_BODY:if(!J.procInstBody&&K(ue))continue;ue==="?"?J.state=X.PROC_INST_ENDING:J.procInstBody+=ue;continue;case X.PROC_INST_ENDING:ue===">"?(de(J,"onprocessinginstruction",{name:J.procInstName,body:J.procInstBody}),J.procInstName=J.procInstBody="",J.state=X.TEXT):(J.procInstBody+="?"+ue,J.state=X.PROC_INST_BODY);continue;case X.OPEN_TAG:U(F,ue)?J.tagName+=ue:(se(J),ue===">"?G(J):ue==="/"?J.state=X.OPEN_TAG_SLASH:(K(ue)||ye(J,"Invalid character in tag name"),J.state=X.ATTRIB));continue;case X.OPEN_TAG_SLASH:ue===">"?(G(J,!0),V(J)):(ye(J,"Forward-slash in opening tag not followed by >"),J.state=X.ATTRIB);continue;case X.ATTRIB:if(K(ue))continue;ue===">"?G(J):ue==="/"?J.state=X.OPEN_TAG_SLASH:U(j,ue)?(J.attribName=ue,J.attribValue="",J.state=X.ATTRIB_NAME):ye(J,"Invalid attribute name");continue;case X.ATTRIB_NAME:ue==="="?J.state=X.ATTRIB_VALUE:ue===">"?(ye(J,"Attribute without value"),J.attribValue=J.attribName,B(J),G(J)):K(ue)?J.state=X.ATTRIB_NAME_SAW_WHITE:U(F,ue)?J.attribName+=ue:ye(J,"Invalid attribute name");continue;case X.ATTRIB_NAME_SAW_WHITE:if(ue==="=")J.state=X.ATTRIB_VALUE;else{if(K(ue))continue;ye(J,"Attribute without value"),J.tag.attributes[J.attribName]="",J.attribValue="",de(J,"onattribute",{name:J.attribName,value:""}),J.attribName="",ue===">"?G(J):U(j,ue)?(J.attribName=ue,J.state=X.ATTRIB_NAME):(ye(J,"Invalid attribute name"),J.state=X.ATTRIB)}continue;case X.ATTRIB_VALUE:if(K(ue))continue;A(ue)?(J.q=ue,J.state=X.ATTRIB_VALUE_QUOTED):(ye(J,"Unquoted attribute value"),J.state=X.ATTRIB_VALUE_UNQUOTED,J.attribValue=ue);continue;case X.ATTRIB_VALUE_QUOTED:if(ue!==J.q){ue==="&"?J.state=X.ATTRIB_VALUE_ENTITY_Q:J.attribValue+=ue;continue}B(J),J.q="",J.state=X.ATTRIB_VALUE_CLOSED;continue;case X.ATTRIB_VALUE_CLOSED:K(ue)?J.state=X.ATTRIB:ue===">"?G(J):ue==="/"?J.state=X.OPEN_TAG_SLASH:U(j,ue)?(ye(J,"No whitespace between attributes"),J.attribName=ue,J.attribValue="",J.state=X.ATTRIB_NAME):ye(J,"Invalid attribute name");continue;case X.ATTRIB_VALUE_UNQUOTED:if(!W(ue)){ue==="&"?J.state=X.ATTRIB_VALUE_ENTITY_U:J.attribValue+=ue;continue}B(J),ue===">"?G(J):J.state=X.ATTRIB;continue;case X.CLOSE_TAG:if(J.tagName)ue===">"?V(J):U(F,ue)?J.tagName+=ue:J.script?(J.script+="</"+J.tagName,J.tagName="",J.state=X.SCRIPT):(K(ue)||ye(J,"Invalid tagname in closing tag"),J.state=X.CLOSE_TAG_SAW_WHITE);else{if(K(ue))continue;D(j,ue)?J.script?(J.script+="</"+ue,J.state=X.SCRIPT):ye(J,"Invalid tagname in closing tag."):J.tagName=ue}continue;case X.CLOSE_TAG_SAW_WHITE:if(K(ue))continue;ue===">"?V(J):ye(J,"Invalid characters in closing tag");continue;case X.TEXT_ENTITY:case X.ATTRIB_VALUE_ENTITY_Q:case X.ATTRIB_VALUE_ENTITY_U:var Xe,$e;switch(J.state){case X.TEXT_ENTITY:Xe=X.TEXT,$e="textNode";break;case X.ATTRIB_VALUE_ENTITY_Q:Xe=X.ATTRIB_VALUE_QUOTED,$e="attribValue";break;case X.ATTRIB_VALUE_ENTITY_U:Xe=X.ATTRIB_VALUE_UNQUOTED,$e="attribValue";break}ue===";"?(J[$e]+=Q(J),J.entity="",J.state=Xe):U(J.entity.length?Y:M,ue)?J.entity+=ue:(ye(J,"Invalid character in entity name"),J[$e]+="&"+J.entity+ue,J.entity="",J.state=Xe);continue;default:throw new Error(J,"Unknown state: "+J.state)}}return J.position>=J.bufferCheckPosition&&u(J),J}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var $=String.fromCharCode,J=Math.floor,le=function(){var we=16384,Fe=[],Xe,$e,et=-1,nt=arguments.length;if(!nt)return"";for(var at="";++et<nt;){var Be=Number(arguments[et]);if(!isFinite(Be)||Be<0||Be>1114111||J(Be)!==Be)throw RangeError("Invalid code point: "+Be);Be<=65535?Fe.push(Be):(Be-=65536,Xe=(Be>>10)+55296,$e=Be%1024+56320,Fe.push(Xe,$e)),(et+1===nt||Fe.length>we)&&(at+=$.apply(null,Fe),Fe.length=0)}return at};t.default?Object.defineProperty(String,"fromCodePoint",{value:le,configurable:!0,writable:!0}):String.fromCodePoint=le}()})(typeof L=="undefined"?(void 0).sax={}:L)}).call(this,H("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(H,q,L){q.exports=T;var P=H("events").EventEmitter,g=H("inherits");g(T,P),T.Readable=H("readable-stream/readable.js"),T.Writable=H("readable-stream/writable.js"),T.Duplex=H("readable-stream/duplex.js"),T.Transform=H("readable-stream/transform.js"),T.PassThrough=H("readable-stream/passthrough.js"),T.Stream=T;function T(){P.call(this)}T.prototype.pipe=function(N,v){var m=this;function w(n){N.writable&&(N.write(n)===!1&&m.pause&&m.pause())}m.on("data",w);function b(){m.readable&&m.resume&&m.resume()}N.on("drain",b),!N._isStdio&&(!v||v.end!==!1)&&(m.on("end",d),m.on("close",a));var t=!1;function d(){if(t)return;t=!0,N.end()}function a(){if(t)return;t=!0,typeof N.destroy=="function"&&N.destroy()}function c(n){if(o(),P.listenerCount(this,"error")===0)throw n}m.on("error",c),N.on("error",c);function o(){m.removeListener("data",w),N.removeListener("drain",b),m.removeListener("end",d),m.removeListener("close",a),m.removeListener("error",c),N.removeListener("error",c),m.removeListener("end",o),m.removeListener("close",o),N.removeListener("close",o)}return m.on("end",o),m.on("close",o),N.on("close",o),N.emit("pipe",m),N}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(H,q,L){(function(P){var g=H("./lib/request"),T=H("./lib/response"),N=H("xtend"),v=H("builtin-status-codes"),m=H("url"),w=L;w.request=function(b,t){typeof b=="string"?b=m.parse(b):b=N(b);var d=P.location.protocol.search(/^https?:$/)===-1?"http:":"",a=b.protocol||d,c=b.hostname||b.host,o=b.port,n=b.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),b.url=(c?a+"//"+c:"")+(o?":"+o:"")+n,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var s=new g(b);return t&&s.on("response",t),s},w.get=function(t,d){var a=w.request(t,d);return a.end(),a},w.ClientRequest=g,w.IncomingMessage=T.IncomingMessage,w.Agent=function(){},w.Agent.defaultMaxSockets=4,w.globalAgent=new w.Agent,w.STATUS_CODES=v,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(H,q,L){(function(P){"use strict";L.fetch=w(P.fetch)&&w(P.ReadableStream),L.writableStream=w(P.WritableStream),L.abortController=w(P.AbortController),L.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),L.blobConstructor=!0}catch(b){}var g;function T(){if(g!==void 0)return g;if(P.XMLHttpRequest){g=new P.XMLHttpRequest;try{g.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(b){g=null}}else g=null;return g}function N(b){var t=T();if(!t)return!1;try{return t.responseType=b,t.responseType===b}catch(d){}return!1}var v=typeof P.ArrayBuffer!="undefined",m=v&&w(P.ArrayBuffer.prototype.slice);L.arraybuffer=L.fetch||v&&N("arraybuffer"),L.msstream=!L.fetch&&m&&N("ms-stream"),L.mozchunkedarraybuffer=!L.fetch&&v&&N("moz-chunked-arraybuffer"),L.overrideMimeType=L.fetch||(T()?w(T().overrideMimeType):!1),L.vbArray=w(P.VBArray);function w(b){return typeof b=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(H,q,L){(function(P,g,T){"use strict";var N=H("babel-runtime/core-js/object/keys"),v=m(N);function m(u){return u&&u.__esModule?u:{default:u}}var w=H("./capability"),b=H("inherits"),t=H("./response"),d=H("readable-stream"),a=H("to-arraybuffer"),c=t.IncomingMessage,o=t.readyStates;function n(u,i){return w.fetch&&i?"fetch":w.mozchunkedarraybuffer?"moz-chunked-arraybuffer":w.msstream?"ms-stream":w.arraybuffer&&u?"arraybuffer":w.vbArray&&u?"text:vbarray":"text"}var s=q.exports=function(u){var i=this;d.Writable.call(i),i._opts=u,i._body=[],i._headers={},u.auth&&i.setHeader("Authorization","Basic "+new T(u.auth).toString("base64")),(0,v.default)(u.headers).forEach(function(y){i.setHeader(y,u.headers[y])});var r,E=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!w.abortController)E=!1,r=!0;else if(u.mode==="prefer-streaming")r=!1;else if(u.mode==="allow-wrong-content-type")r=!w.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");i._mode=n(r,E),i._fetchTimer=null,i.on("finish",function(){i._onFinish()})};b(s,d.Writable),s.prototype.setHeader=function(u,i){var r=this,E=u.toLowerCase();if(f.indexOf(E)!==-1)return;r._headers[E]={name:u,value:i}},s.prototype.getHeader=function(u){var i=this._headers[u.toLowerCase()];return i?i.value:null},s.prototype.removeHeader=function(u){var i=this;delete i._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(u._destroyed)return;var i=u._opts,r=u._headers,E=null;i.method!=="GET"&&i.method!=="HEAD"&&(w.arraybuffer?E=a(T.concat(u._body)):w.blobConstructor?E=new g.Blob(u._body.map(function(x){return a(x)}),{type:(r["content-type"]||{}).value||""}):E=T.concat(u._body).toString());var y=[];if((0,v.default)(r).forEach(function(x){var S=r[x].name,C=r[x].value;Array.isArray(C)?C.forEach(function(j){y.push([S,j])}):y.push([S,C])}),u._mode==="fetch"){var p=null,R=null;if(w.abortController){var O=new AbortController;p=O.signal,u._fetchAbortController=O,"requestTimeout"in i&&i.requestTimeout!==0&&(u._fetchTimer=g.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},i.requestTimeout))}g.fetch(u._opts.url,{method:u._opts.method,headers:y,body:E||void 0,mode:"cors",credentials:i.withCredentials?"include":"same-origin",signal:p}).then(function(x){u._fetchResponse=x,u._connect()},function(x){g.clearTimeout(u._fetchTimer),u._destroyed||u.emit("error",x)})}else{var _=u._xhr=new g.XMLHttpRequest;try{_.open(u._opts.method,u._opts.url,!0)}catch(x){P.nextTick(function(){u.emit("error",x)});return}"responseType"in _&&(_.responseType=u._mode.split(":")[0]),"withCredentials"in _&&(_.withCredentials=!!i.withCredentials),u._mode==="text"&&"overrideMimeType"in _&&_.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in i&&(_.timeout=i.requestTimeout,_.ontimeout=function(){u.emit("requestTimeout")}),y.forEach(function(x){_.setRequestHeader(x[0],x[1])}),u._response=null,_.onreadystatechange=function(){switch(_.readyState){case o.LOADING:case o.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(_.onprogress=function(){u._onXHRProgress()}),_.onerror=function(){if(u._destroyed)return;u.emit("error",new Error("XHR error"))};try{_.send(E)}catch(x){P.nextTick(function(){u.emit("error",x)});return}}};function h(u){try{var i=u.status;return i!==null&&i!==0}catch(r){return!1}}s.prototype._onXHRProgress=function(){var u=this;if(!h(u._xhr)||u._destroyed)return;u._response||u._connect(),u._response._onXHRProgress()},s.prototype._connect=function(){var u=this;if(u._destroyed)return;u._response=new c(u._xhr,u._fetchResponse,u._mode,u._fetchTimer),u._response.on("error",function(i){u.emit("error",i)}),u.emit("response",u._response)},s.prototype._write=function(u,i,r){var E=this;E._body.push(u),r()},s.prototype.abort=s.prototype.destroy=function(){var u=this;u._destroyed=!0,g.clearTimeout(u._fetchTimer),u._response&&(u._response._destroyed=!0),u._xhr?u._xhr.abort():u._fetchAbortController&&u._fetchAbortController.abort()},s.prototype.end=function(u,i,r){var E=this;typeof u=="function"&&(r=u,u=void 0),d.Writable.prototype.end.call(E,u,i,r)},s.prototype.flushHeaders=function(){},s.prototype.setTimeout=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(H,q,L){(function(P,g,T){"use strict";var N=H("babel-runtime/core-js/promise"),v=m(N);function m(c){return c&&c.__esModule?c:{default:c}}var w=H("./capability"),b=H("inherits"),t=H("readable-stream"),d=L.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=L.IncomingMessage=function(c,o,n,s){var h=this;if(t.Readable.call(h),h._mode=n,h.headers={},h.rawHeaders=[],h.trailers={},h.rawTrailers=[],h.on("end",function(){P.nextTick(function(){h.emit("close")})}),n==="fetch"){var f=function p(){i.read().then(function(R){if(h._destroyed)return;if(R.done){g.clearTimeout(s),h.push(null);return}h.push(new T(R.value)),p()}).catch(function(R){g.clearTimeout(s),h._destroyed||h.emit("error",R)})};if(h._fetchResponse=o,h.url=o.url,h.statusCode=o.status,h.statusMessage=o.statusText,o.headers.forEach(function(p,R){h.headers[R.toLowerCase()]=p,h.rawHeaders.push(R,p)}),w.writableStream){var u=new WritableStream({write:function(R){return new v.default(function(O,_){h._destroyed?_():h.push(new T(R))?O():h._resumeFetch=O})},close:function(){g.clearTimeout(s),h._destroyed||h.push(null)},abort:function(R){h._destroyed||h.emit("error",R)}});try{o.body.pipeTo(u).catch(function(p){g.clearTimeout(s),h._destroyed||h.emit("error",p)});return}catch(p){}}var i=o.body.getReader();f()}else{h._xhr=c,h._pos=0,h.url=c.responseURL,h.statusCode=c.status,h.statusMessage=c.statusText;var r=c.getAllResponseHeaders().split(/\r?\n/);if(r.forEach(function(p){var R=p.match(/^([^:]+):\s*(.*)/);if(R){var O=R[1].toLowerCase();O==="set-cookie"?(h.headers[O]===void 0&&(h.headers[O]=[]),h.headers[O].push(R[2])):h.headers[O]!==void 0?h.headers[O]+=", "+R[2]:h.headers[O]=R[2],h.rawHeaders.push(R[1],R[2])}}),h._charset="x-user-defined",!w.overrideMimeType){var E=h.rawHeaders["mime-type"];if(E){var y=E.match(/;\s*charset=([^;])(;|$)/);y&&(h._charset=y[1].toLowerCase())}h._charset||(h._charset="utf-8")}}};b(a,t.Readable),a.prototype._read=function(){var c=this,o=c._resumeFetch;o&&(c._resumeFetch=null,o())},a.prototype._onXHRProgress=function(){var c=this,o=c._xhr,n=null;switch(c._mode){case"text:vbarray":if(o.readyState!==d.DONE)break;try{n=new g.VBArray(o.responseBody).toArray()}catch(i){}if(n!==null){c.push(new T(n));break}case"text":try{n=o.responseText}catch(i){c._mode="text:vbarray";break}if(n.length>c._pos){var s=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var h=new T(s.length),f=0;f<s.length;f++)h[f]=s.charCodeAt(f)&255;c.push(h)}else c.push(s,c._charset);c._pos=n.length}break;case"arraybuffer":if(o.readyState!==d.DONE||!o.response)break;n=o.response,c.push(new T(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=o.response,o.readyState!==d.LOADING||!n)break;c.push(new T(new Uint8Array(n)));break;case"ms-stream":if(n=o.response,o.readyState!==d.LOADING)break;var u=new g.MSStreamReader;u.onprogress=function(){u.result.byteLength>c._pos&&(c.push(new T(new Uint8Array(u.result.slice(c._pos)))),c._pos=u.result.byteLength)},u.onload=function(){c.push(null)},u.readAsArrayBuffer(n);break}c._xhr.readyState===d.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(H,q,L){"use strict";var P=H("safe-buffer").Buffer,g=P.isEncoding||function(u){u=""+u;switch(u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(u){if(!u)return"utf8";for(var i;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(i)return;u=(""+u).toLowerCase(),i=!0}}function N(u){var i=T(u);if(typeof i!="string"&&(P.isEncoding===g||!g(u)))throw new Error("Unknown encoding: "+u);return i||u}L.StringDecoder=v;function v(u){this.encoding=N(u);var i;switch(this.encoding){case"utf16le":this.text=c,this.end=o,i=4;break;case"utf8":this.fillLast=t,i=4;break;case"base64":this.text=n,this.end=s,i=3;break;default:this.write=h,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(i)}v.prototype.write=function(u){if(u.length===0)return"";var i,r;if(this.lastNeed){if(i=this.fillLast(u),i===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<u.length?i?i+this.text(u,r):this.text(u,r):i||""},v.prototype.end=a,v.prototype.text=d,v.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length};function m(u){return u<=127?0:u>>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function w(u,i,r){var E=i.length-1;if(E<r)return 0;var y=m(i[E]);return y>=0?(y>0&&(u.lastNeed=y-1),y):--E<r||y===-2?0:(y=m(i[E]),y>=0?(y>0&&(u.lastNeed=y-2),y):--E<r||y===-2?0:(y=m(i[E]),y>=0?(y>0&&(y===2?y=0:u.lastNeed=y-3),y):0))}function b(u,i,r){if((i[0]&192)!==128)return u.lastNeed=0,"\uFFFD";if(u.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return u.lastNeed=1,"\uFFFD";if(u.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return u.lastNeed=2,"\uFFFD"}}function t(u){var i=this.lastTotal-this.lastNeed,r=b(this,u,i);if(r!==void 0)return r;if(this.lastNeed<=u.length)return u.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,i,0,u.length),this.lastNeed-=u.length}function d(u,i){var r=w(this,u,i);if(!this.lastNeed)return u.toString("utf8",i);this.lastTotal=r;var E=u.length-(r-this.lastNeed);return u.copy(this.lastChar,0,E),u.toString("utf8",i,E)}function a(u){var i=u&&u.length?this.write(u):"";return this.lastNeed?i+"\uFFFD":i}function c(u,i){if((u.length-i)%2===0){var r=u.toString("utf16le",i);if(r){var E=r.charCodeAt(r.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",i,u.length-1)}function o(u){var i=u&&u.length?this.write(u):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,r)}return i}function n(u,i){var r=(u.length-i)%3;return r===0?u.toString("base64",i):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",i,u.length-r))}function s(u){var i=u&&u.length?this.write(u):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(u){return u.toString(this.encoding)}function f(u){return u&&u.length?this.write(u):""}},{"safe-buffer":228}],236:[function(H,q,L){(function(P,g){var T=H("process/browser.js").nextTick,N=Function.prototype.apply,v=Array.prototype.slice,m={},w=0;L.setTimeout=function(){return new b(N.call(setTimeout,window,arguments),clearTimeout)},L.setInterval=function(){return new b(N.call(setInterval,window,arguments),clearInterval)},L.clearTimeout=L.clearInterval=function(t){t.close()};function b(t,d){this._id=t,this._clearFn=d}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},L.enroll=function(t,d){clearTimeout(t._idleTimeoutId),t._idleTimeout=d},L.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},L._unrefActive=L.active=function(t){clearTimeout(t._idleTimeoutId);var d=t._idleTimeout;d>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},d))},L.setImmediate=typeof P=="function"?P:function(t){var d=w++,a=arguments.length<2?!1:v.call(arguments,1);return m[d]=!0,T(function(){m[d]&&(a?t.apply(null,a):t.call(null),L.clearImmediate(d))}),d},L.clearImmediate=typeof g=="function"?g:function(t){delete m[t]}}).call(this,H("timers").setImmediate,H("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(H,q,L){var P=H("buffer").Buffer;q.exports=function(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(P.isBuffer(g)){for(var T=new Uint8Array(g.length),N=g.length,v=0;v<N;v++)T[v]=g[v];return T.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(H,q,L){"use strict";var P=H("punycode"),g=H("./util");L.parse=i,L.resolve=E,L.resolveObject=y,L.format=r,L.Url=T;function T(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var N=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["<",">",'"',"`"," ","\r",`
`," "],b=["{","}","|","\\","^","`"].concat(w),t=["'"].concat(b),d=["%","/","?",";","#"].concat(t),a=["/","?","#"],c=255,o=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,s={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},u=H("querystring");function i(p,R,O){if(p&&g.isObject(p)&&p instanceof T)return p;var _=new T;return _.parse(p,R,O),_}T.prototype.parse=function(p,R,O){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var _=p.indexOf("?"),x=_!==-1&&_<p.indexOf("#")?"?":"#",S=p.split(x),C=/\\/g;S[0]=S[0].replace(C,"/"),p=S.join(x);var j=p;if(j=j.trim(),!O&&p.split("#").length===1){var F=m.exec(j);if(F)return this.path=j,this.href=j,this.pathname=F[1],F[2]?(this.search=F[2],R?this.query=u.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var M=N.exec(j);if(M){M=M[0];var Y=M.toLowerCase();this.protocol=Y,j=j.substr(M.length)}if(O||M||j.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=j.substr(0,2)==="//";K&&!(M&&h[M])&&(j=j.substr(2),this.slashes=!0)}if(!h[M]&&(K||M&&!f[M])){for(var A=-1,W=0;W<a.length;W++){var U=j.indexOf(a[W]);U!==-1&&(A===-1||U<A)&&(A=U)}var D,X;A===-1?X=j.lastIndexOf("@"):X=j.lastIndexOf("@",A),X!==-1&&(D=j.slice(0,X),j=j.slice(X+1),this.auth=decodeURIComponent(D)),A=-1;for(var W=0;W<d.length;W++){var U=j.indexOf(d[W]);U!==-1&&(A===-1||U<A)&&(A=U)}A===-1&&(A=j.length),this.host=j.slice(0,A),j=j.slice(A),this.parseHost(),this.hostname=this.hostname||"";var ie=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ie)for(var oe=this.hostname.split(/\./),W=0,de=oe.length;W<de;W++){var Ce=oe[W];if(!Ce)continue;if(!Ce.match(o)){for(var Ae="",me=0,Se=Ce.length;me<Se;me++)Ce.charCodeAt(me)>127?Ae+="x":Ae+=Ce[me];if(!Ae.match(o)){var ye=oe.slice(0,W),se=oe.slice(W+1),ee=Ce.match(n);ee&&(ye.push(ee[1]),se.unshift(ee[2])),se.length&&(j="/"+se.join(".")+j),this.hostname=ye.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ie||(this.hostname=P.toASCII(this.hostname));var B=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+B,this.href+=this.host,ie&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),j[0]!=="/"&&(j="/"+j))}if(!s[Y])for(var W=0,de=t.length;W<de;W++){var V=t[W];if(j.indexOf(V)===-1)continue;var Q=encodeURIComponent(V);Q===V&&(Q=escape(V)),j=j.split(V).join(Q)}var Z=j.indexOf("#");Z!==-1&&(this.hash=j.substr(Z),j=j.slice(0,Z));var ne=j.indexOf("?");if(ne!==-1?(this.search=j.substr(ne),this.query=j.substr(ne+1),R&&(this.query=u.parse(this.query)),j=j.slice(0,ne)):R&&(this.search="",this.query={}),j&&(this.pathname=j),f[Y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var B=this.pathname||"",re=this.search||"";this.path=B+re}return this.href=this.format(),this};function r(p){return g.isString(p)&&(p=i(p)),p instanceof T?p.format():T.prototype.format.call(p)}T.prototype.format=function(){var p=this.auth||"";p&&(p=encodeURIComponent(p),p=p.replace(/%3A/i,":"),p+="@");var R=this.protocol||"",O=this.pathname||"",_=this.hash||"",x=!1,S="";this.host?x=p+this.host:this.hostname&&(x=p+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(S=u.stringify(this.query));var C=this.search||S&&"?"+S||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||f[R])&&x!==!1?(x="//"+(x||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):x||(x=""),_&&_.charAt(0)!=="#"&&(_="#"+_),C&&C.charAt(0)!=="?"&&(C="?"+C),O=O.replace(/[?#]/g,function(j){return encodeURIComponent(j)}),C=C.replace("#","%23"),R+x+O+C+_};function E(p,R){return i(p,!1,!0).resolve(R)}T.prototype.resolve=function(p){return this.resolveObject(i(p,!1,!0)).format()};function y(p,R){return p?i(p,!1,!0).resolveObject(R):R}T.prototype.resolveObject=function(p){if(g.isString(p)){var R=new T;R.parse(p,!1,!0),p=R}for(var O=new T,_=Object.keys(this),x=0;x<_.length;x++){var S=_[x];O[S]=this[S]}if(O.hash=p.hash,p.href==="")return O.href=O.format(),O;if(p.slashes&&!p.protocol){for(var C=Object.keys(p),j=0;j<C.length;j++){var F=C[j];F!=="protocol"&&(O[F]=p[F])}return f[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(p.protocol&&p.protocol!==O.protocol){if(!f[p.protocol]){for(var M=Object.keys(p),Y=0;Y<M.length;Y++){var K=M[Y];O[K]=p[K]}return O.href=O.format(),O}if(O.protocol=p.protocol,!p.host&&!h[p.protocol]){for(var de=(p.pathname||"").split("/");de.length&&!(p.host=de.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),O.pathname=de.join("/")}else O.pathname=p.pathname;if(O.search=p.search,O.query=p.query,O.host=p.host||"",O.auth=p.auth,O.hostname=p.hostname||p.host,O.port=p.port,O.pathname||O.search){var A=O.pathname||"",W=O.search||"";O.path=A+W}return O.slashes=O.slashes||p.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",D=p.host||p.pathname&&p.pathname.charAt(0)==="/",X=D||U||O.host&&p.pathname,ie=X,oe=O.pathname&&O.pathname.split("/")||[],de=p.pathname&&p.pathname.split("/")||[],Ce=O.protocol&&!f[O.protocol];if(Ce&&(O.hostname="",O.port=null,O.host&&(oe[0]===""?oe[0]=O.host:oe.unshift(O.host)),O.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(de[0]===""?de[0]=p.host:de.unshift(p.host)),p.host=null),X=X&&(de[0]===""||oe[0]==="")),D)O.host=p.host||p.host===""?p.host:O.host,O.hostname=p.hostname||p.hostname===""?p.hostname:O.hostname,O.search=p.search,O.query=p.query,oe=de;else if(de.length)oe||(oe=[]),oe.pop(),oe=oe.concat(de),O.search=p.search,O.query=p.query;else if(!g.isNullOrUndefined(p.search)){if(Ce){O.hostname=O.host=oe.shift();var Ae=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Ae&&(O.auth=Ae.shift(),O.host=O.hostname=Ae.shift())}return O.search=p.search,O.query=p.query,(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!oe.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var me=oe.slice(-1)[0],Se=(O.host||p.host||oe.length>1)&&(me==="."||me==="..")||me==="",ye=0,se=oe.length;se>=0;se--)me=oe[se],me==="."?oe.splice(se,1):me===".."?(oe.splice(se,1),ye++):ye&&(oe.splice(se,1),ye--);if(!X&&!ie)for(;ye--;ye)oe.unshift("..");X&&oe[0]!==""&&(!oe[0]||oe[0].charAt(0)!=="/")&&oe.unshift(""),Se&&oe.join("/").substr(-1)!=="/"&&oe.push("");var ee=oe[0]===""||oe[0]&&oe[0].charAt(0)==="/";if(Ce){O.hostname=O.host=ee?"":oe.length?oe.shift():"";var Ae=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Ae&&(O.auth=Ae.shift(),O.host=O.hostname=Ae.shift())}return X=X||O.host&&oe.length,X&&!ee&&oe.unshift(""),oe.length?O.pathname=oe.join("/"):(O.pathname=null,O.path=null),(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=p.auth||O.auth,O.slashes=O.slashes||p.slashes,O.href=O.format(),O},T.prototype.parseHost=function(){var p=this.host,R=v.exec(p);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),p=p.substr(0,p.length-R.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(H,q,L){"use strict";q.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(H,q,L){(function(P){q.exports=g;function g(N,v){if(T("noDeprecation"))return N;var m=!1;function w(){if(!m){if(T("throwDeprecation"))throw new Error(v);T("traceDeprecation")?console.trace(v):console.warn(v),m=!0}return N.apply(this,arguments)}return w}function T(N){try{if(!P.localStorage)return!1}catch(m){return!1}var v=P.localStorage[N];return v==null?!1:String(v).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(H,q,L){typeof Object.create=="function"?q.exports=function(g,T){g.super_=T,g.prototype=Object.create(T.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:q.exports=function(g,T){g.super_=T;var N=function(){};N.prototype=T.prototype,g.prototype=new N,g.prototype.constructor=g}},{}],242:[function(H,q,L){q.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(H,q,L){(function(P,g){var T=/%[sdj%]/g;L.format=function(A){if(!E(A)){for(var W=[],U=0;U<arguments.length;U++)W.push(m(arguments[U]));return W.join(" ")}for(var U=1,D=arguments,X=D.length,ie=String(A).replace(T,function(de){if(de==="%%")return"%";if(U>=X)return de;switch(de){case"%s":return String(D[U++]);case"%d":return Number(D[U++]);case"%j":try{return JSON.stringify(D[U++])}catch(Ce){return"[Circular]"}default:return de}}),oe=D[U];U<X;oe=D[++U])u(oe)||!O(oe)?ie+=" "+oe:ie+=" "+m(oe);return ie},L.deprecate=function(A,W){if(p(g.process))return function(){return L.deprecate(A,W).apply(this,arguments)};if(P.noDeprecation===!0)return A;var U=!1;function D(){if(!U){if(P.throwDeprecation)throw new Error(W);P.traceDeprecation?console.trace(W):console.error(W),U=!0}return A.apply(this,arguments)}return D};var N={},v;L.debuglog=function(A){if(p(v)&&(v=P.env.NODE_DEBUG||""),A=A.toUpperCase(),!N[A])if(new RegExp("\\b"+A+"\\b","i").test(v)){var W=P.pid;N[A]=function(){var U=L.format.apply(L,arguments);console.error("%s %d: %s",A,W,U)}}else N[A]=function(){};return N[A]};function m(A,W){var U={seen:[],stylize:b};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),f(W)?U.showHidden=W:W&&L._extend(U,W),p(U.showHidden)&&(U.showHidden=!1),p(U.depth)&&(U.depth=2),p(U.colors)&&(U.colors=!1),p(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=w),d(U,A,U.depth)}L.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function w(A,W){var U=m.styles[W];return U?"["+m.colors[U][0]+"m"+A+"["+m.colors[U][1]+"m":A}function b(A,W){return A}function t(A){var W={};return A.forEach(function(U,D){W[U]=!0}),W}function d(A,W,U){if(A.customInspect&&W&&S(W.inspect)&&W.inspect!==L.inspect&&!(W.constructor&&W.constructor.prototype===W)){var D=W.inspect(U,A);return E(D)||(D=d(A,D,U)),D}var X=a(A,W);if(X)return X;var ie=Object.keys(W),oe=t(ie);if(A.showHidden&&(ie=Object.getOwnPropertyNames(W)),x(W)&&(ie.indexOf("message")>=0||ie.indexOf("description")>=0))return c(W);if(ie.length===0){if(S(W)){var de=W.name?": "+W.name:"";return A.stylize("[Function"+de+"]","special")}if(R(W))return A.stylize(RegExp.prototype.toString.call(W),"regexp");if(_(W))return A.stylize(Date.prototype.toString.call(W),"date");if(x(W))return c(W)}var Ce="",Ae=!1,me=["{","}"];if(h(W)&&(Ae=!0,me=["[","]"]),S(W)){var Se=W.name?": "+W.name:"";Ce=" [Function"+Se+"]"}if(R(W)&&(Ce=" "+RegExp.prototype.toString.call(W)),_(W)&&(Ce=" "+Date.prototype.toUTCString.call(W)),x(W)&&(Ce=" "+c(W)),ie.length===0&&(!Ae||W.length==0))return me[0]+Ce+me[1];if(U<0)return R(W)?A.stylize(RegExp.prototype.toString.call(W),"regexp"):A.stylize("[Object]","special");A.seen.push(W);var ye;return Ae?ye=o(A,W,U,oe,ie):ye=ie.map(function(se){return n(A,W,U,oe,se,Ae)}),A.seen.pop(),s(ye,Ce,me)}function a(A,W){if(p(W))return A.stylize("undefined","undefined");if(E(W)){var U="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(U,"string")}if(r(W))return A.stylize(""+W,"number");if(f(W))return A.stylize(""+W,"boolean");if(u(W))return A.stylize("null","null")}function c(A){return"["+Error.prototype.toString.call(A)+"]"}function o(A,W,U,D,X){for(var ie=[],oe=0,de=W.length;oe<de;++oe)K(W,String(oe))?ie.push(n(A,W,U,D,String(oe),!0)):ie.push("");return X.forEach(function(Ce){Ce.match(/^\d+$/)||ie.push(n(A,W,U,D,Ce,!0))}),ie}function n(A,W,U,D,X,ie){var oe,de,Ce;if(Ce=Object.getOwnPropertyDescriptor(W,X)||{value:W[X]},Ce.get?Ce.set?de=A.stylize("[Getter/Setter]","special"):de=A.stylize("[Getter]","special"):Ce.set&&(de=A.stylize("[Setter]","special")),K(D,X)||(oe="["+X+"]"),de||(A.seen.indexOf(Ce.value)<0?(u(U)?de=d(A,Ce.value,null):de=d(A,Ce.value,U-1),de.indexOf(`
`)>-1&&(ie?de=de.split(`
`).map(function(Ae){return" "+Ae}).join(`
`).substr(2):de=`
`+de.split(`
`).map(function(Ae){return" "+Ae}).join(`
`))):de=A.stylize("[Circular]","special")),p(oe)){if(ie&&X.match(/^\d+$/))return de;oe=JSON.stringify(""+X),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.substr(1,oe.length-2),oe=A.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=A.stylize(oe,"string"))}return oe+": "+de}function s(A,W,U){var D=0,X=A.reduce(function(ie,oe){return D++,oe.indexOf(`
`)>=0&&D++,ie+oe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return X>60?U[0]+(W===""?"":W+`
`)+" "+A.join(`,
`)+" "+U[1]:U[0]+W+" "+A.join(", ")+" "+U[1]}function h(A){return Array.isArray(A)}L.isArray=h;function f(A){return typeof A=="boolean"}L.isBoolean=f;function u(A){return A===null}L.isNull=u;function i(A){return A==null}L.isNullOrUndefined=i;function r(A){return typeof A=="number"}L.isNumber=r;function E(A){return typeof A=="string"}L.isString=E;function y(A){return typeof A=="symbol"}L.isSymbol=y;function p(A){return A===void 0}L.isUndefined=p;function R(A){return O(A)&&j(A)==="[object RegExp]"}L.isRegExp=R;function O(A){return typeof A=="object"&&A!==null}L.isObject=O;function _(A){return O(A)&&j(A)==="[object Date]"}L.isDate=_;function x(A){return O(A)&&(j(A)==="[object Error]"||A instanceof Error)}L.isError=x;function S(A){return typeof A=="function"}L.isFunction=S;function C(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A=="undefined"}L.isPrimitive=C,L.isBuffer=H("./support/isBuffer");function j(A){return Object.prototype.toString.call(A)}function F(A){return A<10?"0"+A.toString(10):A.toString(10)}var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Y(){var A=new Date,W=[F(A.getHours()),F(A.getMinutes()),F(A.getSeconds())].join(":");return[A.getDate(),M[A.getMonth()],W].join(" ")}L.log=function(){console.log("%s - %s",Y(),L.format.apply(L,arguments))},L.inherits=H("inherits"),L._extend=function(A,W){if(!W||!O(W))return A;for(var U=Object.keys(W),D=U.length;D--;)A[U[D]]=W[U[D]];return A};function K(A,W){return Object.prototype.hasOwnProperty.call(A,W)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(H,q,L){"use strict";(function(){"use strict";L.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(H,q,L){"use strict";var P=H("babel-runtime/helpers/typeof"),g=v(P),T=H("babel-runtime/core-js/object/keys"),N=v(T);function v(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,w,b,t,d,a={}.hasOwnProperty;m=H("xmlbuilder"),w=H("./defaults").defaults,t=function(o){return typeof o=="string"&&(o.indexOf("&")>=0||o.indexOf(">")>=0||o.indexOf("<")>=0)},d=function(o){return"<![CDATA["+b(o)+"]]>"},b=function(o){return o.replace("]]>","]]]]><![CDATA[>")},L.Builder=function(){function c(o){var n,s,h;this.options={},s=w["0.2"];for(n in s){if(!a.call(s,n))continue;h=s[n],this.options[n]=h}for(n in o){if(!a.call(o,n))continue;h=o[n],this.options[n]=h}}return c.prototype.buildObject=function(o){var n,s,h,f,u;return n=this.options.attrkey,s=this.options.charkey,(0,N.default)(o).length===1&&this.options.rootName===w["0.2"].rootName?(u=(0,N.default)(o)[0],o=o[u]):u=this.options.rootName,h=function(i){return function(r,E){var y,p,R,O,_,x;if((typeof E=="undefined"?"undefined":(0,g.default)(E))!=="object")i.options.cdata&&t(E)?r.raw(d(E)):r.txt(E);else if(Array.isArray(E))for(O in E){if(!a.call(E,O))continue;p=E[O];for(_ in p)R=p[_],r=h(r.ele(_),R).up()}else for(_ in E){if(!a.call(E,_))continue;if(p=E[_],_===n){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(y in p)x=p[y],r=r.att(y,x)}else if(_===s)i.options.cdata&&t(p)?r=r.raw(d(p)):r=r.txt(p);else if(Array.isArray(p))for(O in p){if(!a.call(p,O))continue;R=p[O],typeof R=="string"?i.options.cdata&&t(R)?r=r.ele(_).raw(d(R)).up():r=r.ele(_,R).up():r=h(r.ele(_),R).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?r=h(r.ele(_),p).up():typeof p=="string"&&i.options.cdata&&t(p)?r=r.ele(_).raw(d(p)).up():(p==null&&(p=""),r=r.ele(_,p.toString()).up())}return r}}(this),f=m.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(f,o).end(this.options.renderOpts)},c}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(H,q,L){"use strict";(function(){L.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/promise"),g=t(P),T=H("babel-runtime/core-js/object/get-own-property-names"),N=t(T),v=H("babel-runtime/core-js/object/keys"),m=t(v),w=H("babel-runtime/helpers/typeof"),b=t(w);function t(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,a,c,o,n,s,h,f,u=function(y,p){return function(){return y.apply(p,arguments)}},i=function(y,p){for(var R in p)r.call(p,R)&&(y[R]=p[R]);function O(){this.constructor=y}return O.prototype=p.prototype,y.prototype=new O,y.__super__=p.prototype,y},r={}.hasOwnProperty;h=H("sax"),c=H("events"),d=H("./bom"),s=H("./processors"),f=H("timers").setImmediate,a=H("./defaults").defaults,o=function(y){return(typeof y=="undefined"?"undefined":(0,b.default)(y))==="object"&&y!=null&&(0,m.default)(y).length===0},n=function(y,p,R){var O,_,x;for(O=0,_=y.length;O<_;O++)x=y[O],p=x(p,R);return p},L.Parser=function(E){i(y,E);function y(p){this.parseStringPromise=u(this.parseStringPromise,this),this.parseString=u(this.parseString,this),this.reset=u(this.reset,this),this.assignOrPush=u(this.assignOrPush,this),this.processAsync=u(this.processAsync,this);var R,O,_;if(!(this instanceof L.Parser))return new L.Parser(p);this.options={},O=a["0.2"];for(R in O){if(!r.call(O,R))continue;_=O[R],this.options[R]=_}for(R in p){if(!r.call(p,R))continue;_=p[R],this.options[R]=_}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return y.prototype.processAsync=function(){var p,R;try{return this.remaining.length<=this.options.chunkSize?(p=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(p),this.saxParser.close()):(p=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(p),f(this.processAsync))}catch(O){if(R=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},y.prototype.assignOrPush=function(p,R,O){return R in p?(p[R]instanceof Array||(p[R]=[p[R]]),p[R].push(O)):this.options.explicitArray?p[R]=[O]:p[R]=O},y.prototype.reset=function(){var p,R,O,_;return this.removeAllListeners(),this.saxParser=h.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(S){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",S)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,_=[],p=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(x){return function(S){var C,j,F,M,Y;if(F={},F[R]="",!x.options.ignoreAttrs){Y=S.attributes;for(C in Y){if(!r.call(Y,C))continue;!(p in F)&&!x.options.mergeAttrs&&(F[p]={}),j=x.options.attrValueProcessors?n(x.options.attrValueProcessors,S.attributes[C],C):S.attributes[C],M=x.options.attrNameProcessors?n(x.options.attrNameProcessors,C):C,x.options.mergeAttrs?x.assignOrPush(F,M,j):F[p][M]=j}}return F["#name"]=x.options.tagNameProcessors?n(x.options.tagNameProcessors,S.name):S.name,x.options.xmlns&&(F[x.options.xmlnskey]={uri:S.uri,local:S.local}),_.push(F)}}(this),this.saxParser.onclosetag=function(x){return function(){var S,C,j,F,M,Y,K,A,W,U;if(Y=_.pop(),M=Y["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete Y["#name"],Y.cdata===!0&&(S=Y.cdata,delete Y.cdata),W=_[_.length-1],Y[R].match(/^\s*$/)&&!S?(C=Y[R],delete Y[R]):(x.options.trim&&(Y[R]=Y[R].trim()),x.options.normalize&&(Y[R]=Y[R].replace(/\s{2,}/g," ").trim()),Y[R]=x.options.valueProcessors?n(x.options.valueProcessors,Y[R],M):Y[R],(0,m.default)(Y).length===1&&R in Y&&!x.EXPLICIT_CHARKEY&&(Y=Y[R])),o(Y)&&(Y=x.options.emptyTag!==""?x.options.emptyTag:C),x.options.validator!=null&&(U="/"+function(){var D,X,ie;for(ie=[],D=0,X=_.length;D<X;D++)F=_[D],ie.push(F["#name"]);return ie}().concat(M).join("/"),function(){var D;try{return Y=x.options.validator(U,W&&W[M],Y)}catch(X){return D=X,x.emit("error",D)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof Y=="undefined"?"undefined":(0,b.default)(Y))==="object"){if(!x.options.preserveChildrenOrder)F={},x.options.attrkey in Y&&(F[x.options.attrkey]=Y[x.options.attrkey],delete Y[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in Y&&(F[x.options.charkey]=Y[x.options.charkey],delete Y[x.options.charkey]),(0,N.default)(Y).length>0&&(F[x.options.childkey]=Y),Y=F;else if(W){W[x.options.childkey]=W[x.options.childkey]||[],K={};for(j in Y){if(!r.call(Y,j))continue;K[j]=Y[j]}W[x.options.childkey].push(K),delete Y["#name"],(0,m.default)(Y).length===1&&R in Y&&!x.EXPLICIT_CHARKEY&&(Y=Y[R])}}return _.length>0?x.assignOrPush(W,M,Y):(x.options.explicitRoot&&(A=Y,Y={},Y[M]=A),x.resultObject=Y,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),O=function(x){return function(S){var C,j;if(j=_[_.length-1],j)return j[R]+=S,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||S.replace(/\\n/g,"").trim()!=="")&&(j[x.options.childkey]=j[x.options.childkey]||[],C={"#name":"__text__"},C[R]=S,x.options.normalize&&(C[R]=C[R].replace(/\s{2,}/g," ").trim()),j[x.options.childkey].push(C)),j}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(x){return function(S){var C;if(C=O(S),C)return C.cdata=!0}}(this)},y.prototype.parseString=function(p,R){var O;R!=null&&typeof R=="function"&&(this.on("end",function(_){return this.reset(),R(null,_)}),this.on("error",function(_){return this.reset(),R(_)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=d.stripBOM(p),this.options.async?(this.remaining=p,f(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(_){if(O=_,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},y.prototype.parseStringPromise=function(p){return new g.default(function(R){return function(O,_){return R.parseString(p,function(x,S){return x?_(x):O(S)})}}(this))},y}(c),L.parseString=function(E,y,p){var R,O,_;return p!=null?(typeof p=="function"&&(R=p),(typeof y=="undefined"?"undefined":(0,b.default)(y))==="object"&&(O=y)):(typeof y=="function"&&(R=y),O={}),_=new L.Parser(O),_.parseString(E,R)},L.parseStringPromise=function(E,y){var p,R;return(typeof y=="undefined"?"undefined":(0,b.default)(y))==="object"&&(p=y),R=new L.Parser(p),R.parseStringPromise(E)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(H,q,L){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),L.normalize=function(g){return g.toLowerCase()},L.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},L.stripPrefix=function(g){return g.replace(P,"")},L.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},L.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(H,q,L){"use strict";(function(){"use strict";var P,g,T,N,v=function(b,t){for(var d in t)m.call(t,d)&&(b[d]=t[d]);function a(){this.constructor=b}return a.prototype=t.prototype,b.prototype=new a,b.__super__=t.prototype,b},m={}.hasOwnProperty;g=H("./defaults"),P=H("./builder"),T=H("./parser"),N=H("./processors"),L.defaults=g.defaults,L.processors=N,L.ValidationError=function(w){v(b,w);function b(t){this.message=t}return b}(Error),L.Builder=P.Builder,L.Parser=T.Parser,L.parseString=T.parseString,L.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(H,q,L){"use strict";(function(){q.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(H,q,L){"use strict";(function(){q.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/get-prototype-of"),g=w(P),T=H("babel-runtime/helpers/typeof"),N=w(T),v=H("babel-runtime/core-js/object/assign"),m=w(v);function w(b){return b&&b.__esModule?b:{default:b}}(function(){var b,t,d,a,c,o,n,s=[].slice,h={}.hasOwnProperty;b=function(){var u,i,r,E,y,p;if(p=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],c(m.default))m.default.apply(null,arguments);else for(u=0,r=y.length;u<r;u++)if(E=y[u],E!=null)for(i in E){if(!h.call(E,i))continue;p[i]=E[i]}return p},c=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},o=function(u){var i;return!!u&&((i=typeof u=="undefined"?"undefined":(0,N.default)(u))==="function"||i==="object")},d=function(u){return c(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},a=function(u){var i;if(d(u))return!u.length;for(i in u){if(!h.call(u,i))continue;return!1}return!0},n=function(u){var i,r;return o(u)&&(r=(0,g.default)(u))&&(i=r.constructor)&&typeof i=="function"&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)},t=function(u){return c(u.valueOf)?u.valueOf():u},q.exports.assign=b,q.exports.isFunction=c,q.exports.isObject=o,q.exports.isArray=d,q.exports.isEmpty=a,q.exports.isPlainObject=n,q.exports.getValue=t}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(H,q,L){"use strict";(function(){q.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m;N=H("./NodeType"),m=H("./XMLNode"),q.exports=v=function(){function w(b,t,d){if(this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),t==null)throw new Error("Missing attribute name. "+this.debugInfo(t));this.name=this.stringify.name(t),this.value=this.stringify.attValue(d),this.type=N.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(t){return this.value=t||""}}),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,g.default)(this)},w.prototype.toString=function(b){return this.options.writer.attribute(this,this.options.writer.filterOptions(b))},w.prototype.debugInfo=function(b){return b=b||this.name,b==null?"parent: <"+this.parent.name+">":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},w.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},w}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w=function(d,a){for(var c in a)b.call(a,c)&&(d[c]=a[c]);function o(){this.constructor=d}return o.prototype=a.prototype,d.prototype=new o,d.__super__=a.prototype,d},b={}.hasOwnProperty;N=H("./NodeType"),m=H("./XMLCharacterData"),q.exports=v=function(t){w(d,t);function d(a,c){if(d.__super__.constructor.call(this,a),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=N.CData,this.value=this.stringify.cdata(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m=function(t,d){for(var a in d)w.call(d,a)&&(t[a]=d[a]);function c(){this.constructor=t}return c.prototype=d.prototype,t.prototype=new c,t.__super__=d.prototype,t},w={}.hasOwnProperty;v=H("./XMLNode"),q.exports=N=function(b){m(t,b);function t(d){t.__super__.constructor.call(this,d),this.value=""}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),t.prototype.clone=function(){return(0,g.default)(this)},t.prototype.substringData=function(d,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(d,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(d,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(d,a,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(d){return t.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)?!(d.data!==this.data):!1},t}(v)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w=function(d,a){for(var c in a)b.call(a,c)&&(d[c]=a[c]);function o(){this.constructor=d}return o.prototype=a.prototype,d.prototype=new o,d.__super__=a.prototype,d},b={}.hasOwnProperty;N=H("./NodeType"),v=H("./XMLCharacterData"),q.exports=m=function(t){w(d,t);function d(a,c){if(d.__super__.constructor.call(this,a),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=N.Comment,this.value=this.stringify.comment(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(a){return this.options.writer.comment(this,this.options.writer.filterOptions(a))},d}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/keys"),g=v(P),T=H("babel-runtime/core-js/object/create"),N=v(T);function v(m){return m&&m.__esModule?m:{default:m}}(function(){var m,w,b;w=H("./XMLDOMErrorHandler"),b=H("./XMLDOMStringList"),q.exports=m=function(){function t(){var d;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=d=(0,N.default)(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new b((0,g.default)(this.defaultParams))}}),t.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},t.prototype.canSetParameter=function(d,a){return!0},t.prototype.setParameter=function(d,a){return a!=null?this.params[d]=a:delete this.params[d]},t}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(H,q,L){"use strict";(function(){var P;q.exports=P=function(){function g(){}return g.prototype.handleError=function(T){throw new Error(T)},g}()}).call(void 0)},{}],260:[function(H,q,L){"use strict";(function(){var P;q.exports=P=function(){function g(){}return g.prototype.hasFeature=function(T,N){return!0},g.prototype.createDocumentType=function(T,N,v){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(T,N,v){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(T,N){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(H,q,L){"use strict";(function(){var P;q.exports=P=function(){function g(T){this.arr=T||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(T){return this.arr[T]||null},g.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},g}()}).call(void 0)},{}],262:[function(H,q,L){"use strict";(function(){var P,g,T,N=function(w,b){for(var t in b)v.call(b,t)&&(w[t]=b[t]);function d(){this.constructor=w}return d.prototype=b.prototype,w.prototype=new d,w.__super__=b.prototype,w},v={}.hasOwnProperty;T=H("./XMLNode"),P=H("./NodeType"),q.exports=g=function(m){N(w,m);function w(b,t,d,a,c,o){if(w.__super__.constructor.call(this,b),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(t));if(!a)throw new Error("Missing DTD attribute type. "+this.debugInfo(t));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(t));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(t));if(o&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(t));this.elementName=this.stringify.name(t),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(a),o&&(this.defaultValue=this.stringify.dtdAttDefault(o)),this.defaultValueType=c}return w.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},w}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(H,q,L){"use strict";(function(){var P,g,T,N=function(w,b){for(var t in b)v.call(b,t)&&(w[t]=b[t]);function d(){this.constructor=w}return d.prototype=b.prototype,w.prototype=new d,w.__super__=b.prototype,w},v={}.hasOwnProperty;T=H("./XMLNode"),P=H("./NodeType"),q.exports=g=function(m){N(w,m);function w(b,t,d){if(w.__super__.constructor.call(this,b),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(t),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return w.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},w}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(H,q,L){"use strict";(function(){var P,g,T,N,v=function(b,t){for(var d in t)m.call(t,d)&&(b[d]=t[d]);function a(){this.constructor=b}return a.prototype=t.prototype,b.prototype=new a,b.__super__=t.prototype,b},m={}.hasOwnProperty;N=H("./Utility").isObject,T=H("./XMLNode"),P=H("./NodeType"),q.exports=g=function(w){v(b,w);function b(t,d,a,c){if(b.__super__.constructor.call(this,t),a==null)throw new Error("Missing DTD entity name. "+this.debugInfo(a));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(a));if(this.pe=!!d,this.name=this.stringify.name(a),this.type=P.EntityDeclaration,!N(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}return Object.defineProperty(b.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(b.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(b.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(b.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlVersion",{get:function(){return null}}),b.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},b}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(H,q,L){"use strict";(function(){var P,g,T,N=function(w,b){for(var t in b)v.call(b,t)&&(w[t]=b[t]);function d(){this.constructor=w}return d.prototype=b.prototype,w.prototype=new d,w.__super__=b.prototype,w},v={}.hasOwnProperty;T=H("./XMLNode"),P=H("./NodeType"),q.exports=g=function(m){N(w,m);function w(b,t,d){if(w.__super__.constructor.call(this,b),t==null)throw new Error("Missing DTD notation name. "+this.debugInfo(t));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(t));this.name=this.stringify.name(t),this.type=P.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.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(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},w}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(H,q,L){"use strict";(function(){var P,g,T,N,v=function(b,t){for(var d in t)m.call(t,d)&&(b[d]=t[d]);function a(){this.constructor=b}return a.prototype=t.prototype,b.prototype=new a,b.__super__=t.prototype,b},m={}.hasOwnProperty;N=H("./Utility").isObject,T=H("./XMLNode"),P=H("./NodeType"),q.exports=g=function(w){v(b,w);function b(t,d,a,c){var o;b.__super__.constructor.call(this,t),N(d)&&(o=d,d=o.version,a=o.encoding,c=o.standalone),d||(d="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(d),a!=null&&(this.encoding=this.stringify.xmlEncoding(a)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return b.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},b}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(H,q,L){"use strict";(function(){var P,g,T,N,v,m,w,b,t,d=function(o,n){for(var s in n)a.call(n,s)&&(o[s]=n[s]);function h(){this.constructor=o}return h.prototype=n.prototype,o.prototype=new h,o.__super__=n.prototype,o},a={}.hasOwnProperty;t=H("./Utility").isObject,b=H("./XMLNode"),P=H("./NodeType"),g=H("./XMLDTDAttList"),N=H("./XMLDTDEntity"),T=H("./XMLDTDElement"),v=H("./XMLDTDNotation"),w=H("./XMLNamedNodeMap"),q.exports=m=function(c){d(o,c);function o(n,s,h){var f,u,i,r,E,y;if(o.__super__.constructor.call(this,n),this.type=P.DocType,n.children){for(r=n.children,u=0,i=r.length;u<i;u++)if(f=r[u],f.type===P.Element){this.name=f.name;break}}this.documentObject=n,t(s)&&(E=s,s=E.pubID,h=E.sysID),h==null&&(y=[s,h],h=y[0],s=y[1]),s!=null&&(this.pubID=this.stringify.dtdPubID(s)),h!=null&&(this.sysID=this.stringify.dtdSysID(h))}return Object.defineProperty(o.prototype,"entities",{get:function(){var s,h,f,u,i;for(u={},i=this.children,h=0,f=i.length;h<f;h++)s=i[h],s.type===P.EntityDeclaration&&!s.pe&&(u[s.name]=s);return new w(u)}}),Object.defineProperty(o.prototype,"notations",{get:function(){var s,h,f,u,i;for(u={},i=this.children,h=0,f=i.length;h<f;h++)s=i[h],s.type===P.NotationDeclaration&&(u[s.name]=s);return new w(u)}}),Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(o.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),o.prototype.element=function(n,s){var h;return h=new T(this,n,s),this.children.push(h),this},o.prototype.attList=function(n,s,h,f,u){var i;return i=new g(this,n,s,h,f,u),this.children.push(i),this},o.prototype.entity=function(n,s){var h;return h=new N(this,!1,n,s),this.children.push(h),this},o.prototype.pEntity=function(n,s){var h;return h=new N(this,!0,n,s),this.children.push(h),this},o.prototype.notation=function(n,s){var h;return h=new v(this,n,s),this.children.push(h),this},o.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},o.prototype.ele=function(n,s){return this.element(n,s)},o.prototype.att=function(n,s,h,f,u){return this.attList(n,s,h,f,u)},o.prototype.ent=function(n,s){return this.entity(n,s)},o.prototype.pent=function(n,s){return this.pEntity(n,s)},o.prototype.not=function(n,s){return this.notation(n,s)},o.prototype.up=function(){return this.root()||this.documentObject},o.prototype.isEqualNode=function(n){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?n.name!==this.name||n.publicId!==this.publicId?!1:!(n.systemId!==this.systemId):!1},o}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(H,q,L){"use strict";(function(){var P,g,T,N,v,m,w,b,t=function(c,o){for(var n in o)d.call(o,n)&&(c[n]=o[n]);function s(){this.constructor=c}return s.prototype=o.prototype,c.prototype=new s,c.__super__=o.prototype,c},d={}.hasOwnProperty;b=H("./Utility").isPlainObject,T=H("./XMLDOMImplementation"),g=H("./XMLDOMConfiguration"),v=H("./XMLNode"),P=H("./NodeType"),w=H("./XMLStringifier"),m=H("./XMLStringWriter"),q.exports=N=function(a){t(c,a);function c(o){c.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new g,o||(o={}),o.writer||(o.writer=new m),this.options=o,this.stringify=new w(o)}return Object.defineProperty(c.prototype,"implementation",{value:new T}),Object.defineProperty(c.prototype,"doctype",{get:function(){var n,s,h,f;for(f=this.children,s=0,h=f.length;s<h;s++)if(n=f[s],n.type===P.DocType)return n;return null}}),Object.defineProperty(c.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(c.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(c.prototype,"origin",{get:function(){return null}}),Object.defineProperty(c.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(c.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(c.prototype,"contentType",{get:function(){return null}}),c.prototype.end=function(o){var n;return n={},o?b(o)&&(n=o,o=this.options.writer):o=this.options.writer,o.document(this,o.filterOptions(n))},c.prototype.toString=function(o){return this.options.writer.document(this,this.options.writer.filterOptions(o))},c.prototype.createElement=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTextNode=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.renameNode=function(o,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createNodeIterator=function(o,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(o,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(v)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(H,q,L){"use strict";(function(){var P,g,T,N,v,m,w,b,t,d,a,c,o,n,s,h,f,u,i,r,E,y,p,R,O={}.hasOwnProperty;R=H("./Utility"),y=R.isObject,E=R.isFunction,p=R.isPlainObject,r=R.getValue,P=H("./NodeType"),c=H("./XMLDocument"),n=H("./XMLElement"),N=H("./XMLCData"),v=H("./XMLComment"),h=H("./XMLRaw"),i=H("./XMLText"),s=H("./XMLProcessingInstruction"),d=H("./XMLDeclaration"),a=H("./XMLDocType"),m=H("./XMLDTDAttList"),b=H("./XMLDTDEntity"),w=H("./XMLDTDElement"),t=H("./XMLDTDNotation"),T=H("./XMLAttribute"),u=H("./XMLStringifier"),f=H("./XMLStringWriter"),g=H("./WriterState"),q.exports=o=function(){function _(x,S,C){var j;this.name="?xml",this.type=P.Document,x||(x={}),j={},x.writer?p(x.writer)&&(j=x.writer,x.writer=new f):x.writer=new f,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(j),this.stringify=new u(x),this.onDataCallback=S||function(){},this.onEndCallback=C||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return _.prototype.createChildNode=function(x){var S,C,j,F,M,Y,K,A;switch(x.type){case P.CData:this.cdata(x.value);break;case P.Comment:this.comment(x.value);break;case P.Element:j={},K=x.attribs;for(C in K){if(!O.call(K,C))continue;S=K[C],j[C]=S.value}this.node(x.name,j);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(x.value);break;case P.Text:this.text(x.value);break;case P.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(A=x.children,M=0,Y=A.length;M<Y;M++)F=A[M],this.createChildNode(F),F.type===P.Element&&this.up();return this},_.prototype.dummy=function(){return this},_.prototype.node=function(x,S,C){var j;if(x==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(x));return this.openCurrent(),x=r(x),S==null&&(S={}),S=r(S),y(S)||(j=[S,C],C=j[0],S=j[1]),this.currentNode=new n(this,x,S),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,C!=null&&this.text(C),this},_.prototype.element=function(x,S,C){var j,F,M,Y,K,A;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||y(x)||E(x))for(Y=this.options.noValidation,this.options.noValidation=!0,A=new c(this.options).element("TEMP_ROOT"),A.element(x),this.options.noValidation=Y,K=A.children,F=0,M=K.length;F<M;F++)j=K[F],this.createChildNode(j),j.type===P.Element&&this.up();else this.node(x,S,C);return this},_.prototype.attribute=function(x,S){var C,j;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(x));if(x!=null&&(x=r(x)),y(x))for(C in x){if(!O.call(x,C))continue;j=x[C],this.attribute(C,j)}else E(S)&&(S=S.apply()),this.options.keepNullAttributes&&S==null?this.currentNode.attribs[x]=new T(this,x,""):S!=null&&(this.currentNode.attribs[x]=new T(this,x,S));return this},_.prototype.text=function(x){var S;return this.openCurrent(),S=new i(this,x),this.onData(this.writer.text(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.cdata=function(x){var S;return this.openCurrent(),S=new N(this,x),this.onData(this.writer.cdata(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.comment=function(x){var S;return this.openCurrent(),S=new v(this,x),this.onData(this.writer.comment(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.raw=function(x){var S;return this.openCurrent(),S=new h(this,x),this.onData(this.writer.raw(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.instruction=function(x,S){var C,j,F,M,Y;if(this.openCurrent(),x!=null&&(x=r(x)),S!=null&&(S=r(S)),Array.isArray(x))for(C=0,M=x.length;C<M;C++)j=x[C],this.instruction(j);else if(y(x))for(j in x){if(!O.call(x,j))continue;F=x[j],this.instruction(j,F)}else E(S)&&(S=S.apply()),Y=new s(this,x,S),this.onData(this.writer.processingInstruction(Y,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},_.prototype.declaration=function(x,S,C){var j;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return j=new d(this,x,S,C),this.onData(this.writer.declaration(j,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.doctype=function(x,S,C){if(this.openCurrent(),x==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new a(this,S,C),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},_.prototype.dtdElement=function(x,S){var C;return this.openCurrent(),C=new w(this,x,S),this.onData(this.writer.dtdElement(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.attList=function(x,S,C,j,F){var M;return this.openCurrent(),M=new m(this,x,S,C,j,F),this.onData(this.writer.dtdAttList(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.entity=function(x,S){var C;return this.openCurrent(),C=new b(this,!1,x,S),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.pEntity=function(x,S){var C;return this.openCurrent(),C=new b(this,!0,x,S),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.notation=function(x,S){var C;return this.openCurrent(),C=new t(this,x,S),this.onData(this.writer.dtdNotation(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},_.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},_.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},_.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},_.prototype.openNode=function(x){var S,C,j,F;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===P.Element&&(this.root=x),C="",x.type===P.Element){this.writerOptions.state=g.OpenTag,C=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,F=x.attribs;for(j in F){if(!O.call(F,j))continue;S=F[j],C+=this.writer.attribute(S,this.writerOptions,this.currentLevel)}C+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,C=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?C+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(C+=' SYSTEM "'+x.sysID+'"'),x.children?(C+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,C+=">"),C+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(C,this.currentLevel),x.isOpen=!0}},_.prototype.closeNode=function(x){var S;if(!x.isClosed)return S="",this.writerOptions.state=g.CloseTag,x.type===P.Element?S=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):S=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(S,this.currentLevel),x.isClosed=!0},_.prototype.onData=function(x,S){return this.documentStarted=!0,this.onDataCallback(x,S+1)},_.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},_.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},_.prototype.ele=function(){return this.element.apply(this,arguments)},_.prototype.nod=function(x,S,C){return this.node(x,S,C)},_.prototype.txt=function(x){return this.text(x)},_.prototype.dat=function(x){return this.cdata(x)},_.prototype.com=function(x){return this.comment(x)},_.prototype.ins=function(x,S){return this.instruction(x,S)},_.prototype.dec=function(x,S,C){return this.declaration(x,S,C)},_.prototype.dtd=function(x,S,C){return this.doctype(x,S,C)},_.prototype.e=function(x,S,C){return this.element(x,S,C)},_.prototype.n=function(x,S,C){return this.node(x,S,C)},_.prototype.t=function(x){return this.text(x)},_.prototype.d=function(x){return this.cdata(x)},_.prototype.c=function(x){return this.comment(x)},_.prototype.r=function(x){return this.raw(x)},_.prototype.i=function(x,S){return this.instruction(x,S)},_.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},_.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},_.prototype.ent=function(x,S){return this.entity(x,S)},_.prototype.pent=function(x,S){return this.pEntity(x,S)},_.prototype.not=function(x,S){return this.notation(x,S)},_}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w=function(d,a){for(var c in a)b.call(a,c)&&(d[c]=a[c]);function o(){this.constructor=d}return o.prototype=a.prototype,d.prototype=new o,d.__super__=a.prototype,d},b={}.hasOwnProperty;m=H("./XMLNode"),N=H("./NodeType"),q.exports=v=function(t){w(d,t);function d(a){d.__super__.constructor.call(this,a),this.type=N.Dummy}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(a){return""},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w,b,t,d,a,c,o=function(h,f){for(var u in f)n.call(f,u)&&(h[u]=f[u]);function i(){this.constructor=h}return i.prototype=f.prototype,h.prototype=new i,h.__super__=f.prototype,h},n={}.hasOwnProperty;c=H("./Utility"),a=c.isObject,d=c.isFunction,t=c.getValue,b=H("./XMLNode"),N=H("./NodeType"),v=H("./XMLAttribute"),w=H("./XMLNamedNodeMap"),q.exports=m=function(s){o(h,s);function h(f,u,i){var r,E,y,p;if(h.__super__.constructor.call(this,f),u==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(u),this.type=N.Element,this.attribs={},this.schemaTypeInfo=null,i!=null&&this.attribute(i),f.type===N.Document&&(this.isRoot=!0,this.documentObject=f,f.rootObject=this,f.children)){for(p=f.children,E=0,y=p.length;E<y;E++)if(r=p[E],r.type===N.DocType){r.name=this.name;break}}}return Object.defineProperty(h.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(h.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(h.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new w(this.attribs)),this.attributeMap}}),h.prototype.clone=function(){var f,u,i,r;i=(0,g.default)(this),i.isRoot&&(i.documentObject=null),i.attribs={},r=this.attribs;for(u in r){if(!n.call(r,u))continue;f=r[u],i.attribs[u]=f.clone()}return i.children=[],this.children.forEach(function(E){var y;return y=E.clone(),y.parent=i,i.children.push(y)}),i},h.prototype.attribute=function(f,u){var i,r;if(f!=null&&(f=t(f)),a(f))for(i in f){if(!n.call(f,i))continue;r=f[i],this.attribute(i,r)}else d(u)&&(u=u.apply()),this.options.keepNullAttributes&&u==null?this.attribs[f]=new v(this,f,""):u!=null&&(this.attribs[f]=new v(this,f,u));return this},h.prototype.removeAttribute=function(f){var u,i,r;if(f==null)throw new Error("Missing attribute name. "+this.debugInfo());if(f=t(f),Array.isArray(f))for(i=0,r=f.length;i<r;i++)u=f[i],delete this.attribs[u];else delete this.attribs[f];return this},h.prototype.toString=function(f){return this.options.writer.element(this,this.options.writer.filterOptions(f))},h.prototype.att=function(f,u){return this.attribute(f,u)},h.prototype.a=function(f,u){return this.attribute(f,u)},h.prototype.getAttribute=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f].value:null},h.prototype.setAttribute=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNode=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f]:null},h.prototype.setAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.removeAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNS=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setAttributeNS=function(f,u,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.removeAttributeNS=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNodeNS=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setAttributeNodeNS=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.hasAttribute=function(f){return this.attribs.hasOwnProperty(f)},h.prototype.hasAttributeNS=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setIdAttribute=function(f,u){return this.attribs.hasOwnProperty(f)?this.attribs[f].isId:u},h.prototype.setIdAttributeNS=function(f,u,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setIdAttributeNode=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(f,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByClassName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.isEqualNode=function(f){var u,i,r;if(!h.__super__.isEqualNode.apply(this,arguments).isEqualNode(f))return!1;if(f.namespaceURI!==this.namespaceURI)return!1;if(f.prefix!==this.prefix)return!1;if(f.localName!==this.localName)return!1;if(f.attribs.length!==this.attribs.length)return!1;for(u=i=0,r=this.attribs.length-1;0<=r?i<=r:i>=r;u=0<=r?++i:--i)if(!this.attribs[u].isEqualNode(f.attribs[u]))return!1;return!0},h}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/keys"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N;q.exports=N=function(){function v(m){this.nodes=m}return Object.defineProperty(v.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.getNamedItem=function(m){return this.nodes[m]},v.prototype.setNamedItem=function(m){var w;return w=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,w||null},v.prototype.removeNamedItem=function(m){var w;return w=this.nodes[m],delete this.nodes[m],w||null},v.prototype.item=function(m){return this.nodes[(0,g.default)(this.nodes)[m]]||null},v.prototype.getNamedItemNS=function(m,w){throw new Error("This DOM method is not implemented.")},v.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},v.prototype.removeNamedItemNS=function(m,w){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(H,q,L){"use strict";(function(){var P,g,T,N,v,m,w,b,t,d,a,c,o,n,s,h,f,u,i,r={}.hasOwnProperty;i=H("./Utility"),u=i.isObject,f=i.isFunction,h=i.isEmpty,s=i.getValue,b=null,T=null,N=null,v=null,m=null,o=null,n=null,c=null,w=null,g=null,a=null,t=null,P=null,q.exports=d=function(){function E(y){this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=H("./XMLElement"),T=H("./XMLCData"),N=H("./XMLComment"),v=H("./XMLDeclaration"),m=H("./XMLDocType"),o=H("./XMLRaw"),n=H("./XMLText"),c=H("./XMLProcessingInstruction"),w=H("./XMLDummy"),g=H("./NodeType"),a=H("./XMLNodeList"),t=H("./XMLNamedNodeMap"),P=H("./DocumentPosition"))}return Object.defineProperty(E.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(E.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(E.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(E.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new a(this.children)),this.childNodeList}}),Object.defineProperty(E.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(E.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(E.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(E.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(E.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(E.prototype,"textContent",{get:function(){var p,R,O,_,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",_=this.children,R=0,O=_.length;R<O;R++)p=_[R],p.textContent&&(x+=p.textContent);return x}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.setParent=function(y){var p,R,O,_,x;for(this.parent=y,y&&(this.options=y.options,this.stringify=y.stringify),_=this.children,x=[],R=0,O=_.length;R<O;R++)p=_[R],x.push(p.setParent(this));return x},E.prototype.element=function(y,p,R){var O,_,x,S,C,j,F,M,Y,K,A;if(j=null,p===null&&R==null&&(Y=[{},null],p=Y[0],R=Y[1]),p==null&&(p={}),p=s(p),u(p)||(K=[p,R],R=K[0],p=K[1]),y!=null&&(y=s(y)),Array.isArray(y))for(x=0,F=y.length;x<F;x++)_=y[x],j=this.element(_);else if(f(y))j=this.element(y.apply());else if(u(y))for(C in y){if(!r.call(y,C))continue;if(A=y[C],f(A)&&(A=A.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&C.indexOf(this.stringify.convertAttKey)===0)j=this.attribute(C.substr(this.stringify.convertAttKey.length),A);else if(!this.options.separateArrayItems&&Array.isArray(A)&&h(A))j=this.dummy();else if(u(A)&&h(A))j=this.element(C);else if(!this.options.keepNullNodes&&A==null)j=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(A))for(S=0,M=A.length;S<M;S++)_=A[S],O={},O[C]=_,j=this.element(O);else u(A)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?j=this.element(A):(j=this.element(C),j.element(A)):j=this.element(C,A)}else!this.options.keepNullNodes&&R===null?j=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&y.indexOf(this.stringify.convertTextKey)===0?j=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&y.indexOf(this.stringify.convertCDataKey)===0?j=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&y.indexOf(this.stringify.convertCommentKey)===0?j=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&y.indexOf(this.stringify.convertRawKey)===0?j=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&y.indexOf(this.stringify.convertPIKey)===0?j=this.instruction(y.substr(this.stringify.convertPIKey.length),R):j=this.node(y,p,R);if(j==null)throw new Error("Could not create any elements with: "+y+". "+this.debugInfo());return j},E.prototype.insertBefore=function(y,p,R){var O,_,x,S,C;if(y!=null?y.type:void 0)return x=y,S=p,x.setParent(this),S?(_=children.indexOf(S),C=children.splice(_),children.push(x),Array.prototype.push.apply(children,C)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(y));return _=this.parent.children.indexOf(this),C=this.parent.children.splice(_),O=this.parent.element(y,p,R),Array.prototype.push.apply(this.parent.children,C),O},E.prototype.insertAfter=function(y,p,R){var O,_,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(y));return _=this.parent.children.indexOf(this),x=this.parent.children.splice(_+1),O=this.parent.element(y,p,R),Array.prototype.push.apply(this.parent.children,x),O},E.prototype.remove=function(){var y,p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return y=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[y,y-y+1].concat(p=[])),this.parent},E.prototype.node=function(y,p,R){var O,_;return y!=null&&(y=s(y)),p||(p={}),p=s(p),u(p)||(_=[p,R],R=_[0],p=_[1]),O=new b(this,y,p),R!=null&&O.text(R),this.children.push(O),O},E.prototype.text=function(y){var p;return u(y)&&this.element(y),p=new n(this,y),this.children.push(p),this},E.prototype.cdata=function(y){var p;return p=new T(this,y),this.children.push(p),this},E.prototype.comment=function(y){var p;return p=new N(this,y),this.children.push(p),this},E.prototype.commentBefore=function(y){var p,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R),p=this.parent.comment(y),Array.prototype.push.apply(this.parent.children,O),this},E.prototype.commentAfter=function(y){var p,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R+1),p=this.parent.comment(y),Array.prototype.push.apply(this.parent.children,O),this},E.prototype.raw=function(y){var p;return p=new o(this,y),this.children.push(p),this},E.prototype.dummy=function(){var y;return y=new w(this),y},E.prototype.instruction=function(y,p){var R,O,_,x,S;if(y!=null&&(y=s(y)),p!=null&&(p=s(p)),Array.isArray(y))for(x=0,S=y.length;x<S;x++)R=y[x],this.instruction(R);else if(u(y))for(R in y){if(!r.call(y,R))continue;O=y[R],this.instruction(R,O)}else f(p)&&(p=p.apply()),_=new c(this,y,p),this.children.push(_);return this},E.prototype.instructionBefore=function(y,p){var R,O,_;return O=this.parent.children.indexOf(this),_=this.parent.children.splice(O),R=this.parent.instruction(y,p),Array.prototype.push.apply(this.parent.children,_),this},E.prototype.instructionAfter=function(y,p){var R,O,_;return O=this.parent.children.indexOf(this),_=this.parent.children.splice(O+1),R=this.parent.instruction(y,p),Array.prototype.push.apply(this.parent.children,_),this},E.prototype.declaration=function(y,p,R){var O,_;return O=this.document(),_=new v(O,y,p,R),O.children.length===0?O.children.unshift(_):O.children[0].type===g.Declaration?O.children[0]=_:O.children.unshift(_),O.root()||O},E.prototype.dtd=function(y,p){var R,O,_,x,S,C,j,F,M,Y;for(O=this.document(),_=new m(O,y,p),M=O.children,x=S=0,j=M.length;S<j;x=++S)if(R=M[x],R.type===g.DocType)return O.children[x]=_,_;for(Y=O.children,x=C=0,F=Y.length;C<F;x=++C)if(R=Y[x],R.isRoot)return O.children.splice(x,0,_),_;return O.children.push(_),_},E.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},E.prototype.root=function(){var y;for(y=this;y;){if(y.type===g.Document)return y.rootObject;if(y.isRoot)return y;y=y.parent}},E.prototype.document=function(){var y;for(y=this;y;){if(y.type===g.Document)return y;y=y.parent}},E.prototype.end=function(y){return this.document().end(y)},E.prototype.prev=function(){var y;if(y=this.parent.children.indexOf(this),y<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[y-1]},E.prototype.next=function(){var y;if(y=this.parent.children.indexOf(this),y===-1||y===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[y+1]},E.prototype.importDocument=function(y){var p;return p=y.root().clone(),p.parent=this,p.isRoot=!1,this.children.push(p),this},E.prototype.debugInfo=function(y){var p,R;return y=y||this.name,y==null&&!((p=this.parent)!=null?p.name:void 0)?"":y==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+y+">, parent: <"+this.parent.name+">":"node: <"+y+">"},E.prototype.ele=function(y,p,R){return this.element(y,p,R)},E.prototype.nod=function(y,p,R){return this.node(y,p,R)},E.prototype.txt=function(y){return this.text(y)},E.prototype.dat=function(y){return this.cdata(y)},E.prototype.com=function(y){return this.comment(y)},E.prototype.ins=function(y,p){return this.instruction(y,p)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(y,p,R){return this.declaration(y,p,R)},E.prototype.e=function(y,p,R){return this.element(y,p,R)},E.prototype.n=function(y,p,R){return this.node(y,p,R)},E.prototype.t=function(y){return this.text(y)},E.prototype.d=function(y){return this.cdata(y)},E.prototype.c=function(y){return this.comment(y)},E.prototype.r=function(y){return this.raw(y)},E.prototype.i=function(y,p){return this.instruction(y,p)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(y){return this.importDocument(y)},E.prototype.replaceChild=function(y,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(y,p){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(y){var p,R;return p=this,p===y?0:this.document()!==y.document()?(R=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?R|=P.Preceding:R|=P.Following,R):p.isAncestor(y)?P.Contains|P.Preceding:p.isDescendant(y)?P.Contains|P.Following:p.isPreceding(y)?P.Preceding:P.Following},E.prototype.isSameNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(y){var p,R,O;if(y.nodeType!==this.nodeType)return!1;if(y.children.length!==this.children.length)return!1;for(p=R=0,O=this.children.length-1;0<=O?R<=O:R>=O;p=0<=O?++R:--R)if(!this.children[p].isEqualNode(y.children[p]))return!1;return!0},E.prototype.getFeature=function(y,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(y,p,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(y){return y?y===this||this.isDescendant(y):!1},E.prototype.isDescendant=function(y){var p,R,O,_,x;for(x=this.children,O=0,_=x.length;O<_;O++){if(p=x[O],y===p)return!0;if(R=p.isDescendant(y),R)return!0}return!1},E.prototype.isAncestor=function(y){return y.isDescendant(this)},E.prototype.isPreceding=function(y){var p,R;return p=this.treePosition(y),R=this.treePosition(this),p===-1||R===-1?!1:p<R},E.prototype.isFollowing=function(y){var p,R;return p=this.treePosition(y),R=this.treePosition(this),p===-1||R===-1?!1:p>R},E.prototype.treePosition=function(y){var p,R;return R=0,p=!1,this.foreachTreeNode(this.document(),function(O){if(R++,!p&&O===y)return p=!0}),p?R:-1},E.prototype.foreachTreeNode=function(y,p){var R,O,_,x,S;for(y||(y=this.document()),x=y.children,O=0,_=x.length;O<_;O++){if(R=x[O],S=p(R))return S;if(S=this.foreachTreeNode(R,p),S)return S}},E}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(H,q,L){"use strict";(function(){var P;q.exports=P=function(){function g(T){this.nodes=T}return Object.defineProperty(g.prototype,"length",{get:function(){return this.nodes.length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.item=function(T){return this.nodes[T]||null},g}()}).call(void 0)},{}],275:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w=function(d,a){for(var c in a)b.call(a,c)&&(d[c]=a[c]);function o(){this.constructor=d}return o.prototype=a.prototype,d.prototype=new o,d.__super__=a.prototype,d},b={}.hasOwnProperty;N=H("./NodeType"),v=H("./XMLCharacterData"),q.exports=m=function(t){w(d,t);function d(a,c,o){if(d.__super__.constructor.call(this,a),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=N.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,o&&(this.value=this.stringify.insValue(o))}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(a){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(a))},d.prototype.isEqualNode=function(a){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?!(a.target!==this.target):!1},d}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w=function(d,a){for(var c in a)b.call(a,c)&&(d[c]=a[c]);function o(){this.constructor=d}return o.prototype=a.prototype,d.prototype=new o,d.__super__=a.prototype,d},b={}.hasOwnProperty;N=H("./NodeType"),v=H("./XMLNode"),q.exports=m=function(t){w(d,t);function d(a,c){if(d.__super__.constructor.call(this,a),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=N.Raw,this.value=this.stringify.raw(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(a){return this.options.writer.raw(this,this.options.writer.filterOptions(a))},d}(v)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(H,q,L){"use strict";(function(){var P,g,T,N,v=function(b,t){for(var d in t)m.call(t,d)&&(b[d]=t[d]);function a(){this.constructor=b}return a.prototype=t.prototype,b.prototype=new a,b.__super__=t.prototype,b},m={}.hasOwnProperty;P=H("./NodeType"),N=H("./XMLWriterBase"),g=H("./WriterState"),q.exports=T=function(w){v(b,w);function b(t,d){this.stream=t,b.__super__.constructor.call(this,d)}return b.prototype.endline=function(t,d,a){return t.isLastRootNode&&d.state===g.CloseTag?"":b.__super__.endline.call(this,t,d,a)},b.prototype.document=function(t,d){var a,c,o,n,s,h,f,u,i;for(f=t.children,c=o=0,s=f.length;o<s;c=++o)a=f[c],a.isLastRootNode=c===t.children.length-1;for(d=this.filterOptions(d),u=t.children,i=[],n=0,h=u.length;n<h;n++)a=u[n],i.push(this.writeChildNode(a,d,0));return i},b.prototype.attribute=function(t,d,a){return this.stream.write(b.__super__.attribute.call(this,t,d,a))},b.prototype.cdata=function(t,d,a){return this.stream.write(b.__super__.cdata.call(this,t,d,a))},b.prototype.comment=function(t,d,a){return this.stream.write(b.__super__.comment.call(this,t,d,a))},b.prototype.declaration=function(t,d,a){return this.stream.write(b.__super__.declaration.call(this,t,d,a))},b.prototype.docType=function(t,d,a){var c,o,n,s;if(a||(a=0),this.openNode(t,d,a),d.state=g.OpenTag,this.stream.write(this.indent(t,d,a)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,d,a)),d.state=g.InsideTag,s=t.children,o=0,n=s.length;o<n;o++)c=s[o],this.writeChildNode(c,d,a+1);d.state=g.CloseTag,this.stream.write("]")}return d.state=g.CloseTag,this.stream.write(d.spaceBeforeSlash+">"),this.stream.write(this.endline(t,d,a)),d.state=g.None,this.closeNode(t,d,a)},b.prototype.element=function(t,d,a){var c,o,n,s,h,f,u,i,r,E;a||(a=0),this.openNode(t,d,a),d.state=g.OpenTag,this.stream.write(this.indent(t,d,a)+"<"+t.name),r=t.attribs;for(u in r){if(!m.call(r,u))continue;c=r[u],this.attribute(c,d,a)}if(n=t.children.length,s=n===0?null:t.children[0],n===0||t.children.every(function(y){return(y.type===P.Text||y.type===P.Raw)&&y.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=g.CloseTag,this.stream.write("</"+t.name+">")):(d.state=g.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&n===1&&(s.type===P.Text||s.type===P.Raw)&&s.value!=null)this.stream.write(">"),d.state=g.InsideTag,d.suppressPrettyCount++,i=!0,this.writeChildNode(s,d,a+1),d.suppressPrettyCount--,i=!1,d.state=g.CloseTag,this.stream.write("</"+t.name+">");else{for(this.stream.write(">"+this.endline(t,d,a)),d.state=g.InsideTag,E=t.children,h=0,f=E.length;h<f;h++)o=E[h],this.writeChildNode(o,d,a+1);d.state=g.CloseTag,this.stream.write(this.indent(t,d,a)+"</"+t.name+">")}return this.stream.write(this.endline(t,d,a)),d.state=g.None,this.closeNode(t,d,a)},b.prototype.processingInstruction=function(t,d,a){return this.stream.write(b.__super__.processingInstruction.call(this,t,d,a))},b.prototype.raw=function(t,d,a){return this.stream.write(b.__super__.raw.call(this,t,d,a))},b.prototype.text=function(t,d,a){return this.stream.write(b.__super__.text.call(this,t,d,a))},b.prototype.dtdAttList=function(t,d,a){return this.stream.write(b.__super__.dtdAttList.call(this,t,d,a))},b.prototype.dtdElement=function(t,d,a){return this.stream.write(b.__super__.dtdElement.call(this,t,d,a))},b.prototype.dtdEntity=function(t,d,a){return this.stream.write(b.__super__.dtdEntity.call(this,t,d,a))},b.prototype.dtdNotation=function(t,d,a){return this.stream.write(b.__super__.dtdNotation.call(this,t,d,a))},b}(N)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(H,q,L){"use strict";(function(){var P,g,T=function(m,w){for(var b in w)N.call(w,b)&&(m[b]=w[b]);function t(){this.constructor=m}return t.prototype=w.prototype,m.prototype=new t,m.__super__=w.prototype,m},N={}.hasOwnProperty;g=H("./XMLWriterBase"),q.exports=P=function(v){T(m,v);function m(w){m.__super__.constructor.call(this,w)}return m.prototype.document=function(w,b){var t,d,a,c,o;for(b=this.filterOptions(b),c="",o=w.children,d=0,a=o.length;d<a;d++)t=o[d],c+=this.writeChildNode(t,b,0);return b.pretty&&c.slice(-b.newline.length)===b.newline&&(c=c.slice(0,-b.newline.length)),c},m}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(H,q,L){"use strict";(function(){var P,g=function(v,m){return function(){return v.apply(m,arguments)}},T={}.hasOwnProperty;q.exports=P=function(){function N(v){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var m,w,b;v||(v={}),this.options=v,this.options.version||(this.options.version="1.0"),w=v.stringify||{};for(m in w){if(!T.call(w,m))continue;b=w[m],this[m]=b}}return N.prototype.name=function(v){return this.options.noValidation?v:this.assertLegalName(""+v||"")},N.prototype.text=function(v){return this.options.noValidation?v:this.assertLegalChar(this.textEscape(""+v||""))},N.prototype.cdata=function(v){return this.options.noValidation?v:(v=""+v||"",v=v.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(v))},N.prototype.comment=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+v);return this.assertLegalChar(v)},N.prototype.raw=function(v){return this.options.noValidation?v:""+v||""},N.prototype.attValue=function(v){return this.options.noValidation?v:this.assertLegalChar(this.attEscape(v=""+v||""))},N.prototype.insTarget=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.insValue=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/\?>/))throw new Error("Invalid processing instruction value: "+v);return this.assertLegalChar(v)},N.prototype.xmlVersion=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+v);return v},N.prototype.xmlEncoding=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+v);return this.assertLegalChar(v)},N.prototype.xmlStandalone=function(v){return this.options.noValidation?v:v?"yes":"no"},N.prototype.dtdPubID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.dtdSysID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.dtdElementValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.dtdAttType=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.dtdAttDefault=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.dtdEntityValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.dtdNData=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},N.prototype.convertAttKey="@",N.prototype.convertPIKey="?",N.prototype.convertTextKey="#text",N.prototype.convertCDataKey="#cdata",N.prototype.convertCommentKey="#comment",N.prototype.convertRawKey="#raw",N.prototype.assertLegalChar=function(v){var m,w;if(this.options.noValidation)return v;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=v.match(m))throw new Error("Invalid character in string: "+v+" at index "+w.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=v.match(m)))throw new Error("Invalid character in string: "+v+" at index "+w.index);return v},N.prototype.assertLegalName=function(v){var m;if(this.options.noValidation)return v;if(this.assertLegalChar(v),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!v.match(m))throw new Error("Invalid character in name");return v},N.prototype.textEscape=function(v){var m;return this.options.noValidation?v:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(m,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},N.prototype.attEscape=function(v){var m;return this.options.noValidation?v:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(m,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},N}()}).call(void 0)},{}],280:[function(H,q,L){"use strict";var P=H("babel-runtime/core-js/object/create"),g=T(P);function T(N){return N&&N.__esModule?N:{default:N}}(function(){var N,v,m,w=function(d,a){for(var c in a)b.call(a,c)&&(d[c]=a[c]);function o(){this.constructor=d}return o.prototype=a.prototype,d.prototype=new o,d.__super__=a.prototype,d},b={}.hasOwnProperty;N=H("./NodeType"),v=H("./XMLCharacterData"),q.exports=m=function(t){w(d,t);function d(a,c){if(d.__super__.constructor.call(this,a),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=N.Text,this.value=this.stringify.text(c)}return Object.defineProperty(d.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"wholeText",{get:function(){var c,o,n;for(n="",o=this.previousSibling;o;)n=o.data+n,o=o.previousSibling;for(n+=this.data,c=this.nextSibling;c;)n=n+c.data,c=c.nextSibling;return n}}),d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(a){return this.options.writer.text(this,this.options.writer.filterOptions(a))},d.prototype.splitText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceWholeText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},d}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(H,q,L){"use strict";(function(){var P,g,T,N,v,m,w,b,t,d,a,c,o,n,s,h,f,u={}.hasOwnProperty;f=H("./Utility").assign,P=H("./NodeType"),t=H("./XMLDeclaration"),d=H("./XMLDocType"),T=H("./XMLCData"),N=H("./XMLComment"),c=H("./XMLElement"),n=H("./XMLRaw"),s=H("./XMLText"),o=H("./XMLProcessingInstruction"),a=H("./XMLDummy"),v=H("./XMLDTDAttList"),m=H("./XMLDTDElement"),w=H("./XMLDTDEntity"),b=H("./XMLDTDNotation"),g=H("./WriterState"),q.exports=h=function(){function i(r){var E,y,p;r||(r={}),this.options=r,y=r.writer||{};for(E in y){if(!u.call(y,E))continue;p=y[E],this["_"+E]=this[E],this[E]=p}}return i.prototype.filterOptions=function(r){var E,y,p,R,O,_,x,S;return r||(r={}),r=f({},this.options,r),E={writer:this},E.pretty=r.pretty||!1,E.allowEmpty=r.allowEmpty||!1,E.indent=(y=r.indent)!=null?y:" ",E.newline=(p=r.newline)!=null?p:`
`,E.offset=(R=r.offset)!=null?R:0,E.dontPrettyTextNodes=(O=(_=r.dontPrettyTextNodes)!=null?_:r.dontprettytextnodes)!=null?O:0,E.spaceBeforeSlash=(x=(S=r.spaceBeforeSlash)!=null?S:r.spacebeforeslash)!=null?x:"",E.spaceBeforeSlash===!0&&(E.spaceBeforeSlash=" "),E.suppressPrettyCount=0,E.user={},E.state=g.None,E},i.prototype.indent=function(r,E,y){var p;return!E.pretty||E.suppressPrettyCount?"":E.pretty&&(p=(y||0)+E.offset+1,p>0)?new Array(p).join(E.indent):""},i.prototype.endline=function(r,E,y){return!E.pretty||E.suppressPrettyCount?"":E.newline},i.prototype.attribute=function(r,E,y){var p;return this.openAttribute(r,E,y),p=" "+r.name+'="'+r.value+'"',this.closeAttribute(r,E,y),p},i.prototype.cdata=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<![CDATA[",E.state=g.InsideTag,p+=r.value,E.state=g.CloseTag,p+="]]>"+this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.comment=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<!-- ",E.state=g.InsideTag,p+=r.value,E.state=g.CloseTag,p+=" -->"+this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.declaration=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<?xml",E.state=g.InsideTag,p+=' version="'+r.version+'"',r.encoding!=null&&(p+=' encoding="'+r.encoding+'"'),r.standalone!=null&&(p+=' standalone="'+r.standalone+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.docType=function(r,E,y){var p,R,O,_,x;if(y||(y=0),this.openNode(r,E,y),E.state=g.OpenTag,_=this.indent(r,E,y),_+="<!DOCTYPE "+r.root().name,r.pubID&&r.sysID?_+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(_+=' SYSTEM "'+r.sysID+'"'),r.children.length>0){for(_+=" [",_+=this.endline(r,E,y),E.state=g.InsideTag,x=r.children,R=0,O=x.length;R<O;R++)p=x[R],_+=this.writeChildNode(p,E,y+1);E.state=g.CloseTag,_+="]"}return E.state=g.CloseTag,_+=E.spaceBeforeSlash+">",_+=this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),_},i.prototype.element=function(r,E,y){var p,R,O,_,x,S,C,j,F,M,Y,K,A,W;y||(y=0),M=!1,Y="",this.openNode(r,E,y),E.state=g.OpenTag,Y+=this.indent(r,E,y)+"<"+r.name,K=r.attribs;for(F in K){if(!u.call(K,F))continue;p=K[F],Y+=this.attribute(p,E,y)}if(O=r.children.length,_=O===0?null:r.children[0],O===0||r.children.every(function(U){return(U.type===P.Text||U.type===P.Raw)&&U.value===""}))E.allowEmpty?(Y+=">",E.state=g.CloseTag,Y+="</"+r.name+">"+this.endline(r,E,y)):(E.state=g.CloseTag,Y+=E.spaceBeforeSlash+"/>"+this.endline(r,E,y));else if(E.pretty&&O===1&&(_.type===P.Text||_.type===P.Raw)&&_.value!=null)Y+=">",E.state=g.InsideTag,E.suppressPrettyCount++,M=!0,Y+=this.writeChildNode(_,E,y+1),E.suppressPrettyCount--,M=!1,E.state=g.CloseTag,Y+="</"+r.name+">"+this.endline(r,E,y);else{if(E.dontPrettyTextNodes){for(A=r.children,x=0,C=A.length;x<C;x++)if(R=A[x],(R.type===P.Text||R.type===P.Raw)&&R.value!=null){E.suppressPrettyCount++,M=!0;break}}for(Y+=">"+this.endline(r,E,y),E.state=g.InsideTag,W=r.children,S=0,j=W.length;S<j;S++)R=W[S],Y+=this.writeChildNode(R,E,y+1);E.state=g.CloseTag,Y+=this.indent(r,E,y)+"</"+r.name+">",M&&E.suppressPrettyCount--,Y+=this.endline(r,E,y),E.state=g.None}return this.closeNode(r,E,y),Y},i.prototype.writeChildNode=function(r,E,y){switch(r.type){case P.CData:return this.cdata(r,E,y);case P.Comment:return this.comment(r,E,y);case P.Element:return this.element(r,E,y);case P.Raw:return this.raw(r,E,y);case P.Text:return this.text(r,E,y);case P.ProcessingInstruction:return this.processingInstruction(r,E,y);case P.Dummy:return"";case P.Declaration:return this.declaration(r,E,y);case P.DocType:return this.docType(r,E,y);case P.AttributeDeclaration:return this.dtdAttList(r,E,y);case P.ElementDeclaration:return this.dtdElement(r,E,y);case P.EntityDeclaration:return this.dtdEntity(r,E,y);case P.NotationDeclaration:return this.dtdNotation(r,E,y);default:throw new Error("Unknown XML node type: "+r.constructor.name)}},i.prototype.processingInstruction=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<?",E.state=g.InsideTag,p+=r.target,r.value&&(p+=" "+r.value),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.raw=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y),E.state=g.InsideTag,p+=r.value,E.state=g.CloseTag,p+=this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.text=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y),E.state=g.InsideTag,p+=r.value,E.state=g.CloseTag,p+=this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.dtdAttList=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<!ATTLIST",E.state=g.InsideTag,p+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType,r.defaultValueType!=="#DEFAULT"&&(p+=" "+r.defaultValueType),r.defaultValue&&(p+=' "'+r.defaultValue+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.dtdElement=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<!ELEMENT",E.state=g.InsideTag,p+=" "+r.name+" "+r.value,E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.dtdEntity=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<!ENTITY",E.state=g.InsideTag,r.pe&&(p+=" %"),p+=" "+r.name,r.value?p+=' "'+r.value+'"':(r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),r.nData&&(p+=" NDATA "+r.nData)),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.dtdNotation=function(r,E,y){var p;return this.openNode(r,E,y),E.state=g.OpenTag,p=this.indent(r,E,y)+"<!NOTATION",E.state=g.InsideTag,p+=" "+r.name,r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.pubID?p+=' PUBLIC "'+r.pubID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(r,E,y),E.state=g.None,this.closeNode(r,E,y),p},i.prototype.openNode=function(r,E,y){},i.prototype.closeNode=function(r,E,y){},i.prototype.openAttribute=function(r,E,y){},i.prototype.closeAttribute=function(r,E,y){},i}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(H,q,L){"use strict";(function(){var P,g,T,N,v,m,w,b,t,d;d=H("./Utility"),b=d.assign,t=d.isFunction,T=H("./XMLDOMImplementation"),N=H("./XMLDocument"),v=H("./XMLDocumentCB"),w=H("./XMLStringWriter"),m=H("./XMLStreamWriter"),P=H("./NodeType"),g=H("./WriterState"),q.exports.create=function(a,c,o,n){var s,h;if(a==null)throw new Error("Root element needs a name.");return n=b({},c,o,n),s=new N(n),h=s.element(a),n.headless||(s.declaration(n),(n.pubID!=null||n.sysID!=null)&&s.dtd(n)),h},q.exports.begin=function(a,c,o){var n;return t(a)&&(n=[a,c],c=n[0],o=n[1],a={}),c?new v(a,c,o):new N(a)},q.exports.stringWriter=function(a){return new w(a)},q.exports.streamWriter=function(a,c){return new m(a,c)},q.exports.implementation=new T,q.exports.nodeType=P,q.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(H,q,L){q.exports=g;var P=Object.prototype.hasOwnProperty;function g(){for(var T={},N=0;N<arguments.length;N++){var v=arguments[N];for(var m in v)P.call(v,m)&&(T[m]=v[m])}return T}},{}],284:[function(H,q,L){"use strict";var P=H("buffer").Buffer,g=H("./sha"),T=H("./md5"),N={sha1:g,md5:T},v=64,m=P.alloc(v);m.fill(0);function w(d,a,c){P.isBuffer(a)||(a=P.from(a)),P.isBuffer(c)||(c=P.from(c)),a.length>v?a=d(a):a.length<v&&(a=P.concat([a,m],v));for(var o=P.alloc(v),n=P.alloc(v),s=0;s<v;s++)o[s]=a[s]^54,n[s]=a[s]^92;var h=d(P.concat([o,c]));return d(P.concat([n,h]))}function b(d,a){d=d||"sha1";var c=N[d],o=[],n=0;return c||t("algorithm:",d,"is not yet supported"),{update:function(h){return P.isBuffer(h)||(h=P.from(h)),o.push(h),n+=h.length,this},digest:function(h){var f=P.concat(o),u=a?w(c,a,f):c(f);return o=null,h?u.toString(h):u}}}function t(){var d=[].slice.call(arguments).join(" ");throw new Error([d,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}L.createHash=function(d){return b(d)},L.createHmac=function(d,a){return b(d,a)},L.createCredentials=function(){t("sorry,createCredentials is not implemented yet")},L.createCipher=function(){t("sorry,createCipher is not implemented yet")},L.createCipheriv=function(){t("sorry,createCipheriv is not implemented yet")},L.createDecipher=function(){t("sorry,createDecipher is not implemented yet")},L.createDecipheriv=function(){t("sorry,createDecipheriv is not implemented yet")},L.createSign=function(){t("sorry,createSign is not implemented yet")},L.createVerify=function(){t("sorry,createVerify is not implemented yet")},L.createDiffieHellman=function(){t("sorry,createDiffieHellman is not implemented yet")},L.pbkdf2=function(){t("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(H,q,L){"use strict";var P=H("buffer").Buffer,g=4,T=P.alloc(g);T.fill(0);var N=8;function v(b,t){if(b.length%g!==0){var d=b.length+(g-b.length%g);b=P.concat([b,T],d)}for(var a=[],c=t?b.readInt32BE:b.readInt32LE,o=0;o<b.length;o+=g)a.push(c.call(b,o));return a}function m(b,t,d){for(var a=P.alloc(t),c=d?a.writeInt32BE:a.writeInt32LE,o=0;o<b.length;o++)c.call(a,b[o],o*4,!0);return a}function w(b,t,d,a){P.isBuffer(b)||(b=P.from(b));var c=t(v(b,a),b.length*N);return m(c,d,a)}q.exports={hash:w}},{buffer:73}],286:[function(H,q,L){"use strict";var P=H("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function T(a,c){a[c>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;for(var o=1732584193,n=-271733879,s=-1732584194,h=271733878,f=0;f<a.length;f+=16){var u=o,i=n,r=s,E=h;o=v(o,n,s,h,a[f+0],7,-680876936),h=v(h,o,n,s,a[f+1],12,-389564586),s=v(s,h,o,n,a[f+2],17,606105819),n=v(n,s,h,o,a[f+3],22,-1044525330),o=v(o,n,s,h,a[f+4],7,-176418897),h=v(h,o,n,s,a[f+5],12,1200080426),s=v(s,h,o,n,a[f+6],17,-1473231341),n=v(n,s,h,o,a[f+7],22,-45705983),o=v(o,n,s,h,a[f+8],7,1770035416),h=v(h,o,n,s,a[f+9],12,-1958414417),s=v(s,h,o,n,a[f+10],17,-42063),n=v(n,s,h,o,a[f+11],22,-1990404162),o=v(o,n,s,h,a[f+12],7,1804603682),h=v(h,o,n,s,a[f+13],12,-40341101),s=v(s,h,o,n,a[f+14],17,-1502002290),n=v(n,s,h,o,a[f+15],22,1236535329),o=m(o,n,s,h,a[f+1],5,-165796510),h=m(h,o,n,s,a[f+6],9,-1069501632),s=m(s,h,o,n,a[f+11],14,643717713),n=m(n,s,h,o,a[f+0],20,-373897302),o=m(o,n,s,h,a[f+5],5,-701558691),h=m(h,o,n,s,a[f+10],9,38016083),s=m(s,h,o,n,a[f+15],14,-660478335),n=m(n,s,h,o,a[f+4],20,-405537848),o=m(o,n,s,h,a[f+9],5,568446438),h=m(h,o,n,s,a[f+14],9,-1019803690),s=m(s,h,o,n,a[f+3],14,-187363961),n=m(n,s,h,o,a[f+8],20,1163531501),o=m(o,n,s,h,a[f+13],5,-1444681467),h=m(h,o,n,s,a[f+2],9,-51403784),s=m(s,h,o,n,a[f+7],14,1735328473),n=m(n,s,h,o,a[f+12],20,-1926607734),o=w(o,n,s,h,a[f+5],4,-378558),h=w(h,o,n,s,a[f+8],11,-2022574463),s=w(s,h,o,n,a[f+11],16,1839030562),n=w(n,s,h,o,a[f+14],23,-35309556),o=w(o,n,s,h,a[f+1],4,-1530992060),h=w(h,o,n,s,a[f+4],11,1272893353),s=w(s,h,o,n,a[f+7],16,-155497632),n=w(n,s,h,o,a[f+10],23,-1094730640),o=w(o,n,s,h,a[f+13],4,681279174),h=w(h,o,n,s,a[f+0],11,-358537222),s=w(s,h,o,n,a[f+3],16,-722521979),n=w(n,s,h,o,a[f+6],23,76029189),o=w(o,n,s,h,a[f+9],4,-640364487),h=w(h,o,n,s,a[f+12],11,-421815835),s=w(s,h,o,n,a[f+15],16,530742520),n=w(n,s,h,o,a[f+2],23,-995338651),o=b(o,n,s,h,a[f+0],6,-198630844),h=b(h,o,n,s,a[f+7],10,1126891415),s=b(s,h,o,n,a[f+14],15,-1416354905),n=b(n,s,h,o,a[f+5],21,-57434055),o=b(o,n,s,h,a[f+12],6,1700485571),h=b(h,o,n,s,a[f+3],10,-1894986606),s=b(s,h,o,n,a[f+10],15,-1051523),n=b(n,s,h,o,a[f+1],21,-2054922799),o=b(o,n,s,h,a[f+8],6,1873313359),h=b(h,o,n,s,a[f+15],10,-30611744),s=b(s,h,o,n,a[f+6],15,-1560198380),n=b(n,s,h,o,a[f+13],21,1309151649),o=b(o,n,s,h,a[f+4],6,-145523070),h=b(h,o,n,s,a[f+11],10,-1120210379),s=b(s,h,o,n,a[f+2],15,718787259),n=b(n,s,h,o,a[f+9],21,-343485551),o=t(o,u),n=t(n,i),s=t(s,r),h=t(h,E)}return Array(o,n,s,h)}function N(a,c,o,n,s,h){return t(d(t(t(c,a),t(n,h)),s),o)}function v(a,c,o,n,s,h,f){return N(c&o|~c&n,a,c,s,h,f)}function m(a,c,o,n,s,h,f){return N(c&n|o&~n,a,c,s,h,f)}function w(a,c,o,n,s,h,f){return N(c^o^n,a,c,s,h,f)}function b(a,c,o,n,s,h,f){return N(o^(c|~n),a,c,s,h,f)}function t(a,c){var o=(a&65535)+(c&65535),n=(a>>16)+(c>>16)+(o>>16);return n<<16|o&65535}function d(a,c){return a<<c|a>>>32-c}q.exports=function(c){return P.hash(c,T,16)}},{"./helpers":285}],287:[function(H,q,L){"use strict";var P=H("./helpers");function g(w,b){w[b>>5]|=128<<24-b%32,w[(b+64>>9<<4)+15]=b;for(var t=Array(80),d=1732584193,a=-271733879,c=-1732584194,o=271733878,n=-1009589776,s=0;s<w.length;s+=16){for(var h=d,f=a,u=c,i=o,r=n,E=0;E<80;E++){E<16?t[E]=w[s+E]:t[E]=m(t[E-3]^t[E-8]^t[E-14]^t[E-16],1);var y=v(v(m(d,5),T(E,a,c,o)),v(v(n,t[E]),N(E)));n=o,o=c,c=m(a,30),a=d,d=y}d=v(d,h),a=v(a,f),c=v(c,u),o=v(o,i),n=v(n,r)}return Array(d,a,c,o,n)}function T(w,b,t,d){return w<20?b&t|~b&d:w<40?b^t^d:w<60?b&t|b&d|t&d:b^t^d}function N(w){return w<20?1518500249:w<40?1859775393:w<60?-1894007588:-899497514}function v(w,b){var t=(w&65535)+(b&65535),d=(w>>16)+(b>>16)+(t>>16);return d<<16|t&65535}function m(w,b){return w<<b|w>>>32-b}q.exports=function(b){return P.hash(b,g,20,!0)}},{"./helpers":285}],288:[function(H,q,L){"use strict";q.exports=function(){return function(){}}},{}],289:[function(H,q,L){(function(P){"use strict";var g=H("babel-runtime/helpers/typeof"),T=N(g);function N(d){return d&&d.__esModule?d:{default:d}}var v=H("stream"),m=v.Stream,w=H("../lib/common/utils/isArray"),b=w.isArray;q.exports.string=function(a){return typeof a=="string"},q.exports.array=b,q.exports.buffer=P.isBuffer;function t(d){return d instanceof m}q.exports.writableStream=function(a){return t(a)&&typeof a._write=="function"&&(0,T.default)(a._writableState)==="object"}}).call(this,{isBuffer:H("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(H,q,L){"use strict";L.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(g){return P}},L.escape=H("escape-html"),L.timestamp=function(g){if(g){var T=g;return typeof T=="string"&&(T=Number(T)),String(g).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(H,q,L){(function(P,g){"use strict";var T=H("babel-runtime/core-js/json/stringify"),N=w(T),v=H("babel-runtime/helpers/typeof"),m=w(v);function w(E){return E&&E.__esModule?E:{default:E}}var b=H("util"),t=H("url"),d=H("http"),a=H("https"),c=H("debug")("urllib"),o=H("humanize-ms"),n,s=0,h=Math.pow(2,31)-10,f=/^https?:\/\//i;function u(E,y){return E===void 0?y:E}function i(E,y){return function(p,R,O){if(p)return y(p);E({data:R,status:O.statusCode,headers:O.headers,res:O})}}L.TIMEOUTS=[o("300s"),o("300s")];var r=["json","text"];L.request=function(y,p,R){return arguments.length===2&&typeof p=="function"&&(R=p,p=null),typeof R=="function"?L.requestWithCallback(y,p,R):(n||(n=H("any-promise")),new n(function(O,_){L.requestWithCallback(y,p,i(O,_))}))},L.requestWithCallback=function(y,p,R){if(!y||typeof y!="string"&&(typeof y=="undefined"?"undefined":(0,m.default)(y))!=="object"){var O=b.format("expect request url to be a string or a http request options, but got %j",y);throw new Error(O)}arguments.length===2&&typeof p=="function"&&(R=p,p=null),p=p||{},s>=h&&(s=0);var _=++s;p.requestUrls=p.requestUrls||[];var x={requestId:_,url:y,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",x),p.timeout=p.timeout||L.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var S=Date.now(),C;typeof y=="string"?(f.test(y)||(y="http://"+y),C=t.parse(y)):C=y;var j=(p.type||p.method||C.method||"GET").toUpperCase(),F=C.port||80,M=d,Y=u(p.agent,L.agent),K=p.fixJSONCtlChars;C.protocol==="https:"&&(M=a,Y=u(p.httpsAgent,L.httpsAgent),C.port||(F=443));var A={host:C.hostname||C.host||"localhost",path:C.path||"/",method:j,port:F,agent:Y,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?A.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(A.requestTimeout=p.timeout);for(var W=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<W.length;U++){var D=W[U];p.hasOwnProperty(D)&&(A[D]=p[D])}A.rejectUnauthorized===!1&&!A.hasOwnProperty("secureOptions")&&(A.secureOptions=H("constants").SSL_OP_NO_TLSv1_2);var X=p.auth||C.auth;X&&(A.auth=X);var ie=p.content||p.data,oe=j==="GET"||j==="HEAD"||p.dataAsQueryString;if(!p.content&&(ie&&!(typeof ie=="string"||g.isBuffer(ie))))if(oe)ie=p.nestedQuerystring?qs.stringify(ie):querystring.stringify(ie);else{var de=A.headers["Content-Type"]||A.headers["content-type"];de||(p.contentType==="json"?de="application/json":de="application/x-www-form-urlencoded",A.headers["Content-Type"]=de),parseContentType(de).type==="application/json"?ie=(0,N.default)(ie):ie=p.nestedQuerystring?qs.stringify(ie):querystring.stringify(ie)}oe&&ie&&(A.path+=(C.query?"&":"?")+ie,ie=null);var Ce=0;if(ie){var Ae=ie.length;g.isBuffer(ie)||(Ae=g.byteLength(ie)),Ce=A.headers["Content-Length"]=Ae}p.dataType==="json"&&(A.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(A);var me=null,Se=null,ye=null,se=!1,ee=!1,B=0,G=-1,V=!1,Q="",Z="",ne=null;p.timing&&(ne={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function re(){me&&(clearTimeout(me),me=null)}function $(){Se&&(clearTimeout(Se),Se=null)}function J(Ie,rt,lt){if($(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),_,P.pid,A.method,y),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),_,P.pid,Ie.name,Ie.message,Ie.stack);return}var _e=R;R=null;var ce={};if(lt&&(G=lt.statusCode,ce=lt.headers),G===401&&ce["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var fe=ce["www-authenticate"];if(fe.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",_,y,fe),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(A.method,A.path,fe,p.digestAuth),c("Request#%d %s: auth with digest header: %s",_,y,p.headers.Authorization),lt.headers["set-cookie"]&&(p.headers.Cookie=lt.headers["set-cookie"].join(";")),L.requestWithCallback(y,p,_e)}var ve=Date.now()-S;ne&&(ne.contentDownload=ve),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",ve,B,G,A.method,A.host,A.path,ee,ne);var Oe={status:G,statusCode:G,headers:ce,size:B,aborted:V,rt:ve,keepAliveSocket:ee,data:rt,requestUrls:p.requestUrls,timing:ne,remoteAddress:Q,remotePort:Z};if(Ie){var ge="";Y&&typeof Y.getCurrentStatus=="function"&&(ge=", agent status: "+(0,N.default)(Y.getCurrentStatus())),Ie.message+=", "+A.method+" "+y+" "+G+" (connected: "+se+", keepalive socket: "+ee+ge+`)
headers: `+(0,N.default)(ce),Ie.data=rt,Ie.path=A.path,Ie.status=G,Ie.headers=ce,Ie.res=Oe}_e(Ie,rt,p.streaming?lt:Oe),p.emitter&&(x.url=y,x.socket=at&&at.connection,x.options=A,x.size=Ce,p.emitter.emit("response",{requestId:_,error:Ie,ctx:p.ctx,req:x,res:Oe}))}function le(Ie){var rt=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var lt=Ie.headers.location;if(!lt)rt=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),rt.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)rt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+y),rt.name="MaxRedirectError";else{var _e=p.formatRedirectUrl?p.formatRedirectUrl(y,lt):t.resolve(y,lt);c("Request#%d %s: `redirected` from %s to %s",_,A.path,y,_e),$(),p.headers&&p.headers.Host&&f.test(lt)&&(p.headers.Host=null);var ce=R;return R=null,L.requestWithCallback(_e,p,ce),{redirect:!0,error:null}}}return{redirect:!1,error:rt}}!A.headers["User-Agent"]&&!A.headers["user-agent"]&&(A.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!A.headers["Accept-Encoding"]&&!A.headers["accept-encoding"]&&(A.headers["Accept-Encoding"]="gzip"));function ue(Ie,rt,lt){var _e=Ie.headers["content-encoding"];return lt(null,rt,_e)}var we=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",_,j,y,A.headers,A.path),p.requestUrls.push(y);function Fe(Ie){if(ne&&(ne.waiting=Date.now()-S),c("Request#%d %s `req response` event emit: status %d, headers: %j",_,y,Ie.statusCode,Ie.headers),p.streaming){var rt=le(Ie);if(rt.redirect){Ie.resume();return}return rt.error?(Ie.resume(),J(rt.error,null,Ie)):J(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",_,y,B)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",_,y,B)}),Ie.on("aborted",function(){V=!0,c("Request#%d %s: `res aborted` event emit, total size %d",_,y,B)}),we){var rt=le(Ie);if(rt.redirect){Ie.resume();return}return rt.error?(Ie.resume(),we.end(),J(rt.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",J.bind(null,null,null,Ie)):isNode010||isNode012?first([[we,"close"],[Ie,"aborted"]],function(ce,fe,ve){c("Request#%d %s: writeStream or res %s event emitted",_,y,ve),J(ye||null,null,Ie)}):we.on("close",function(){c("Request#%d %s: writeStream close event emitted",_,y),J(ye||null,null,Ie)}),Ie.pipe(we))}var lt=[];Ie.on("data",function(_e){c("Request#%d %s: `res data` event emit, size %d",_,y,_e.length),B+=_e.length,lt.push(_e)}),Ie.on("end",function(){var _e=g.concat(lt,B);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",_,y,B,Ie._dumped),ye)return J(ye,_e,Ie);var ce=le(Ie);if(ce.error)return J(ce.error,_e,Ie);if(ce.redirect)return;ue(Ie,_e,function(fe,ve,Oe){if(fe)return J(fe,_e,Ie);if(!Oe&&r.indexOf(p.dataType)>=0){try{ve=decodeBodyByCharset(ve,Ie)}catch(Ee){return c("decodeBodyByCharset error: %s",Ee),J(null,ve,Ie)}if(p.dataType==="json")if(B===0)ve=null;else{var ge=parseJSON(ve,K);ge.error?fe=ge.error:ve=ge.data}}V&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",_,y),J(fe,ve,Ie)})})}var Xe,$e;Array.isArray(p.timeout)?(Xe=o(p.timeout[0]),$e=o(p.timeout[1])):Xe=$e=o(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Xe,$e);function et(){c("Connect timer ticking, timeout: %d",Xe),me=setTimeout(function(){me=null,G===-1&&(G=-2);var Ie="Connect timeout for "+Xe+"ms",rt="ConnectionTimeoutError";at.socket||(rt="SocketAssignTimeoutError",Ie+=", working sockets is full"),ye=new Error(Ie),ye.name=rt,ye.requestId=_,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",_,y,ye.name,Ie,se),Be()},Xe)}function nt(){c("Response timer ticking, timeout: %d",$e),Se=setTimeout(function(){Se=null;var Ie="Response timeout for "+$e+"ms",rt="ResponseTimeoutError";ye=new Error(Ie),ye.name=rt,ye.requestId=_,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",_,y,ye.name,Ie,se),Be()},$e)}var at;A.mode=p.mode?p.mode:"";try{at=M.request(A,Fe)}catch(Ie){return J(Ie)}typeof window=="undefined"?et():at.on("requestTimeout",function(){G===-1&&(G=-2);var Ie="Connect timeout for "+Xe+"ms",rt="ConnectionTimeoutError";ye=new Error(Ie),ye.name=rt,ye.requestId=_,Be()});function Be(){c("Request#%d %s abort, connected: %s",_,y,se),at.socket||(ye.noSocket=!0,J(ye)),at.abort()}return ne&&at.on("finish",function(){ne.requestSent=Date.now()-S}),at.once("socket",function(Ie){ne&&(ne.queuing=Date.now()-S),isNode010&&Ie.socket&&(Ie=Ie.socket);var rt=Ie.readyState;if(rt==="opening"){Ie.once("lookup",function(lt,_e,ce){c("Request#%d %s lookup: %s, %s, %s",_,y,lt,_e,ce),ne&&(ne.dnslookup=Date.now()-S),_e&&(Q=_e)}),Ie.once("connect",function(){ne&&(ne.connected=Date.now()-S),re(),nt(),c("Request#%d %s new socket connected",_,y),se=!0,Q||(Q=Ie.remoteAddress),Z=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",_,y,rt),se=!0,ee=!0,Q||(Q=Ie.remoteAddress),Z=Ie.remotePort,re(),nt()}),at.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=se?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",_,y,Ie.name,Ie.message),J(ye||Ie)}),we&&we.once("error",function(Ie){Ie.message+=' (writeStream "error")',ye=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",_,y,Ie.name,Ie.message),Be()}),p.stream?(p.stream.pipe(at),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',ye=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",_,y,Ie.name,Ie.message),Be()})):at.end(ie),at.requestId=_,at}}).call(this,H("_process"),H("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n6Qo:function(H,q,L){"use strict";L.d(q,"a",function(){return b});var P=L("q1tI"),g=L("biw7"),T=L("fyJ8");function N(t){var d=t.className,a=t.index,c=t.children,o=t.colSpan,n=t.rowSpan,s=P.useContext(g.a),h=s.prefixCls,f=s.fixedInfoList,u=f[a];return P.createElement(T.a,Object.assign({className:d,index:a,component:"td",prefixCls:h,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:o,rowSpan:n}}}},u))}function v(t){return P.createElement("tr",Object.assign({},t))}function m(t){var d=t.children,a=P.useContext(g.a),c=a.prefixCls;return P.createElement("tfoot",{className:"".concat(c,"-summary")},d)}var w=q.b=m,b={Cell:N,Row:v}},nEHx:function(H,q,L){"use strict";L.d(q,"a",function(){return P});var P;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(P||(P={}))},nnTU:function(H,q,L){"use strict";L.d(q,"b",function(){return w}),L.d(q,"a",function(){return b});var P=L("MI8n"),g=L("JYp7"),T=L("pmY6"),N=L("24hK"),v=L("746U"),m=L("Cg/j");const w=Object(m.c)("commandService"),b=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new P.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,d){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!d)throw new Error("invalid command");return this.registerCommand({id:t,handler:d})}if(t.description){const s=[];for(let f of t.description.args)s.push(f.constraint);const h=t.handler;t.handler=function(f,...u){return Object(v.o)(u,s),h(f,...u)}}const{id:a}=t;let c=this._commands.get(a);c||(c=new N.a,this._commands.set(a,c));let o=c.unshift(t),n=Object(T.i)(()=>{o();const s=this._commands.get(a);(s==null?void 0:s.isEmpty())&&this._commands.delete(a)});return this._onDidRegisterCommand.fire(a),n}registerCommandAlias(t,d){return b.registerCommand(t,(a,...c)=>a.get(w).executeCommand(d,...c))}getCommand(t){const d=this._commands.get(t);return!d||d.isEmpty()?void 0:g.a.first(d)}getCommands(){const t=new Map;for(const d of this._commands.keys()){const a=this.getCommand(d);a&&t.set(d,a)}return t}};b.registerCommand("noop",()=>{})},oRuE:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(g,T){var N=T*4,v=N-g.sigBytes%N;g.concat(P.lib.WordArray.random(v-1)).concat(P.lib.WordArray.create([v<<24],1))},unpad:function(g){var T=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=T}},P.pad.Iso10126})},osHv:function(H,q,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var g=P.Pos;function T(f,u){return f.line-u.line||f.ch-u.ch}var N="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",v=N+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+N+"]["+v+"]*)","g");function w(f,u,i,r){this.line=u,this.ch=i,this.cm=f,this.text=f.getLine(u),this.min=r?Math.max(r.from,f.firstLine()):f.firstLine(),this.max=r?Math.min(r.to-1,f.lastLine()):f.lastLine()}function b(f,u){var i=f.cm.getTokenTypeAt(g(f.line,u));return i&&/\btag\b/.test(i)}function t(f){return f.line>=f.max?void 0:(f.ch=0,f.text=f.cm.getLine(++f.line),!0)}function d(f){return f.line<=f.min?void 0:(f.text=f.cm.getLine(--f.line),f.ch=f.text.length,!0)}function a(f){for(;;){var u=f.text.indexOf(">",f.ch);if(u==-1){if(t(f))continue;return}if(!b(f,u+1)){f.ch=u+1;continue}var i=f.text.lastIndexOf("/",u),r=i>-1&&!/\S/.test(f.text.slice(i+1,u));return f.ch=u+1,r?"selfClose":"regular"}}function c(f){for(;;){var u=f.ch?f.text.lastIndexOf("<",f.ch-1):-1;if(u==-1){if(d(f))continue;return}if(!b(f,u+1)){f.ch=u;continue}m.lastIndex=u,f.ch=u;var i=m.exec(f.text);if(i&&i.index==u)return i}}function o(f){for(;;){m.lastIndex=f.ch;var u=m.exec(f.text);if(!u){if(t(f))continue;return}if(!b(f,u.index+1)){f.ch=u.index+1;continue}return f.ch=u.index+u[0].length,u}}function n(f){for(;;){var u=f.ch?f.text.lastIndexOf(">",f.ch-1):-1;if(u==-1){if(d(f))continue;return}if(!b(f,u+1)){f.ch=u;continue}var i=f.text.lastIndexOf("/",u),r=i>-1&&!/\S/.test(f.text.slice(i+1,u));return f.ch=u+1,r?"selfClose":"regular"}}function s(f,u){for(var i=[];;){var r=o(f),E,y=f.line,p=f.ch-(r?r[0].length:0);if(!r||!(E=a(f)))return;if(E=="selfClose")continue;if(r[1]){for(var R=i.length-1;R>=0;--R)if(i[R]==r[2]){i.length=R;break}if(R<0&&(!u||u==r[2]))return{tag:r[2],from:g(y,p),to:g(f.line,f.ch)}}else i.push(r[2])}}function h(f,u){for(var i=[];;){var r=n(f);if(!r)return;if(r=="selfClose"){c(f);continue}var E=f.line,y=f.ch,p=c(f);if(!p)return;if(p[1])i.push(p[2]);else{for(var R=i.length-1;R>=0;--R)if(i[R]==p[2]){i.length=R;break}if(R<0&&(!u||u==p[2]))return{tag:p[2],from:g(f.line,f.ch),to:g(E,y)}}}}P.registerHelper("fold","xml",function(f,u){for(var i=new w(f,u.line,0);;){var r=o(i);if(!r||i.line!=u.line)return;var E=a(i);if(!E)return;if(!r[1]&&E!="selfClose"){var y=g(i.line,i.ch),p=s(i,r[2]);return p&&T(p.from,y)>0?{from:y,to:p.from}:null}}}),P.findMatchingTag=function(f,u,i){var r=new w(f,u.line,u.ch,i);if(r.text.indexOf(">")==-1&&r.text.indexOf("<")==-1)return;var E=a(r),y=E&&g(r.line,r.ch),p=E&&c(r);if(!E||!p||T(r,u)>0)return;var R={from:g(r.line,r.ch),to:y,tag:p[2]};return E=="selfClose"?{open:R,close:null,at:"open"}:p[1]?{open:h(r,p[2]),close:R,at:"close"}:(r=new w(f,y.line,y.ch,i),{open:R,close:s(r,p[2]),at:"open"})},P.findEnclosingTag=function(f,u,i,r){for(var E=new w(f,u.line,u.ch,i);;){var y=h(E,r);if(!y)break;var p=new w(f,u.line,u.ch,i),R=s(p,y.tag);if(R)return{open:y,close:R}}},P.scanForClosingTag=function(f,u,i,r){var E=new w(f,u.line,u.ch,r?{from:0,to:r}:null);return s(E,i)}})},p5ED:function(H,q,L){"use strict";var P=L("+L6B"),g=L("2/Rp"),T=L("5Dmo"),N=L("3S7+"),v=L("k1fw"),m=L("9og8"),w=L("tJVT"),b=L("WmNS"),t=L.n(b),d=L("q1tI"),a=L.n(d),c=L("vHTk"),o=L.n(c),n=L("yEEn"),s=L("ZW9T"),h=L("1vsH"),f=L("V0Rq"),u=L("m3rI");q.a=function(i){var r,E,y,p,R,O,_,x=i.editOffice,S=x===void 0?"view":x,C=i.data,j=i.theme,F=i.type,M=i.filename,Y=i.monacoEditor,K=i.className,A=i.style,W=i.close,U=i.onClose,D=i.hasMask,X=i.disabledDownload,ie=Object(d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),oe=Object(w.a)(ie,2),de=oe[0],Ce=oe[1],Ae=Object(d.useState)(""),me=Object(w.a)(Ae,2),Se=me[0],ye=me[1],se=Object(d.useState)(),ee=Object(w.a)(se,2),B=ee[0],G=ee[1],V=window.ENV==="build"?"/react/build":"",Q=u.a.PROXY_SERVER||location.origin,Z,ne=1024*1024,re=10*ne,$=Object(d.useRef)();(r=C)!==null&&r!==void 0&&r.startsWith("/api")&&F!=="txt"&&(C=(u.a.API_SERVER||location.origin)+C),F==="office"&&(Z=Object(h.T)(C).filesize,Z>re&&(F="other")),M&&Y&&(Y.filename=M),Object(d.useEffect)(function(){var we,Fe,Xe=(we=document.cookie)===null||we===void 0||((Fe=we.replace(/\s/g,""))===null||Fe===void 0)?void 0:Fe.split(";");Xe==null||Xe.map(function($e){var et=$e.split("=");et[0]==="_educoder_session"&&ye(et[1])})},[]),Object(d.useEffect)(function(){F==="office"&&J()},[F,C]);var J=function(){var we=Object(m.a)(t.a.mark(function Fe(){var Xe,$e,et;return t.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return console.log("data:",C),Xe=C,C.startsWith("http")||(Xe=location.origin+Xe),$e=new URL(Xe).pathname.split("/").pop(),at.next=6,Object(f.V)({attachment_id:$e});case 6:et=at.sent,G(et);case 8:case"end":return at.stop()}},Fe)}));return function(){return we.apply(this,arguments)}}(),le=function(){if(C.startsWith("http")||C.startsWith("blob:")){ue();return}Object(h.z)(M||"educoder",C,M)},ue=function(){Object(h.x)(M||"educoder",decodeURIComponent(C))};return a.a.createElement("div",{style:Object(v.a)({},A||{}),className:"".concat(D&&o.a.bgBlack," ").concat(F?o.a.wrp:"hide")},W&&a.a.createElement("div",{className:o.a.close,ref:$},!X&&a.a.createElement(N.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return $.current}},a.a.createElement("span",{onClick:ue},a.a.createElement("i",{className:"icon-quxiaozhiding"}))),a.a.createElement(N.a,{title:"\u5173\u95ED",getPopupContainer:function(){return $.current}},a.a.createElement("span",{className:"",onClick:U},a.a.createElement("i",{className:"icon-guanbi1"})))),a.a.createElement("div",{className:"".concat(o.a[K]," ").concat(K," ").concat(o.a.monaco," ").concat(F==="txt"?"show":"hide")},F==="txt"&&a.a.createElement(s.b,Y)),F==="audio"&&a.a.createElement("audio",{src:"".concat(((E=C)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((y=C)===null||y===void 0?void 0:y.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(C),autoPlay:!0}),F==="video"&&a.a.createElement(a.a.Fragment,null,((p=C)===null||p===void 0?void 0:p.indexOf("http"))>-1?a.a.createElement("video",{controls:!0,src:"".concat(C),autoPlay:!0}):a.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(C),autoPlay:!0})),F==="office"&&B&&a.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(B.key,"&url=").concat(Q+B.url,"&callbackUrl=").concat(Q+B.callbackUrl,"&fileType=").concat(B.fileType,"&title=").concat(B.title,"&model=").concat(S,"&officeServer=").concat(u.a.OFFICE_SERVER,"&disabledDownload=").concat(!!X)}),F==="html"&&a.a.createElement("iframe",{src:C+"&disposition=inline"}),F==="pdf"&&a.a.createElement("iframe",{src:"".concat(V,"/js/pdfview/index.html?url=").concat(C,"&disabledDownload=").concat(!!X)}),F==="image"&&a.a.createElement("img",{src:"".concat(((R=C)===null||R===void 0?void 0:R.indexOf("http://"))>-1||((O=C)===null||O===void 0?void 0:O.indexOf("https://"))>-1||(_=C)!==null&&_!==void 0&&_.startsWith("/api")?"":"data:image/png;base64,").concat(C)}),F==="other"&&a.a.createElement("div",null,a.a.createElement(g.a,{type:"primary",size:"large",onClick:le},a.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),F==="download"&&a.a.createElement(g.a,{type:"primary",size:"large",onClick:le},a.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(H,q,L){},pA7S:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.WordArray,v=T.BlockCipher,m=g.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],b=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],t=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],a=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=m.DES=v.extend({_doReset:function(){for(var h=this._key,f=h.words,u=[],i=0;i<56;i++){var r=w[i]-1;u[i]=f[r>>>5]>>>31-r%32&1}for(var E=this._subKeys=[],y=0;y<16;y++){for(var p=E[y]=[],R=t[y],i=0;i<24;i++)p[i/6|0]|=u[(b[i]-1+R)%28]<<31-i%6,p[4+(i/6|0)]|=u[28+(b[i+24]-1+R)%28]<<31-i%6;p[0]=p[0]<<1|p[0]>>>31;for(var i=1;i<7;i++)p[i]=p[i]>>>(i-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var O=this._invSubKeys=[],i=0;i<16;i++)O[i]=E[15-i]},encryptBlock:function(h,f){this._doCryptBlock(h,f,this._subKeys)},decryptBlock:function(h,f){this._doCryptBlock(h,f,this._invSubKeys)},_doCryptBlock:function(h,f,u){this._lBlock=h[f],this._rBlock=h[f+1],o.call(this,4,252645135),o.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),o.call(this,1,1431655765);for(var i=0;i<16;i++){for(var r=u[i],E=this._lBlock,y=this._rBlock,p=0,R=0;R<8;R++)p|=d[R][((y^r[R])&a[R])>>>0];this._lBlock=y,this._rBlock=E^p}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,o.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),o.call(this,16,65535),o.call(this,4,252645135),h[f]=this._lBlock,h[f+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function o(h,f){var u=(this._lBlock>>>h^this._rBlock)&f;this._rBlock^=u,this._lBlock^=u<<h}function n(h,f){var u=(this._rBlock>>>h^this._lBlock)&f;this._lBlock^=u,this._rBlock^=u<<h}g.DES=v._createHelper(c);var s=m.TripleDES=v.extend({_doReset:function(){var h=this._key,f=h.words;if(f.length!==2&&f.length!==4&&f.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=f.slice(0,2),i=f.length<4?f.slice(0,2):f.slice(2,4),r=f.length<6?f.slice(0,2):f.slice(4,6);this._des1=c.createEncryptor(N.create(u)),this._des2=c.createEncryptor(N.create(i)),this._des3=c.createEncryptor(N.create(r))},encryptBlock:function(h,f){this._des1.encryptBlock(h,f),this._des2.decryptBlock(h,f),this._des3.encryptBlock(h,f)},decryptBlock:function(h,f){this._des3.decryptBlock(h,f),this._des2.encryptBlock(h,f),this._des1.decryptBlock(h,f)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=v._createHelper(s)}(),P.TripleDES})},pIsd:function(H,q,L){var P=L("BJfS"),g=function(v){var m=/[height|width]$/;return m.test(v)},T=function(v){var m="",w=Object.keys(v);return w.forEach(function(b,t){var d=v[b];b=P(b),g(b)&&typeof d=="number"&&(d=d+"px"),d===!0?m+=b:d===!1?m+="not "+b:m+="("+b+": "+d+")",t<w.length-1&&(m+=" and ")}),m},N=function(v){var m="";return typeof v=="string"?v:v instanceof Array?(v.forEach(function(w,b){m+=T(w),b<v.length-1&&(m+=", ")}),m):T(v)};H.exports=N},pmY6:function(H,q,L){"use strict";L.d(q,"h",function(){return d}),L.d(q,"g",function(){return c}),L.d(q,"f",function(){return o}),L.d(q,"e",function(){return n}),L.d(q,"i",function(){return s}),L.d(q,"b",function(){return h}),L.d(q,"a",function(){return f}),L.d(q,"d",function(){return u}),L.d(q,"c",function(){return i});var P=L("C/vA"),g=L("JYp7");const T=!1;let N=null;function v(r){N=r}if(T){const r="__is_disposable_tracked__";v(new class{trackDisposable(E){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[r]||console.log(y)},3e3)}setParent(E,y){if(E&&E!==f.None)try{E[r]=!0}catch(p){}}markAsDisposed(E){if(E&&E!==f.None)try{E[r]=!0}catch(y){}}markAsSingleton(E){}})}function m(r){return N==null||N.trackDisposable(r),r}function w(r){N==null||N.markAsDisposed(r)}function b(r,E){N==null||N.setParent(r,E)}function t(r,E){if(!N)return;for(const y of r)N.setParent(y,E)}function d(r){return N==null||N.markAsSingleton(r),r}class a extends Error{constructor(r){super(`Encountered errors while disposing of store. Errors: [${r.join(", ")}]`);this.errors=r}}function c(r){return typeof r.dispose=="function"&&r.dispose.length===0}function o(r){if(g.a.is(r)){let E=[];for(const y of r)if(y)try{y.dispose()}catch(p){E.push(p)}if(E.length===1)throw E[0];if(E.length>1)throw new a(E);return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function n(...r){const E=s(()=>o(r));return t(r,E),E}function s(r){const E=m({dispose:Object(P.a)(()=>{w(E),r()})});return E}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){if(this._isDisposed)return;w(this),this._isDisposed=!0,this.clear()}clear(){try{o(this._toDispose.values())}finally{this._toDispose.clear()}}add(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return b(r,this),this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(r),r}}h.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new h,m(this),b(this._store,this)}dispose(){w(this),this._store.dispose()}_register(r){if(r===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(r)}}f.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(r){var E;if(this._isDisposed||r===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),r&&b(r,this),this._value=r}clear(){this.value=void 0}dispose(){var r;this._isDisposed=!0,w(this),(r=this._value)===null||r===void 0||r.dispose(),this._value=void 0}clearAndLeak(){const r=this._value;return this._value=void 0,r&&b(r,null),r}}class i{constructor(r){this.object=r}dispose(){}}},psGv:function(H,q,L){var P,g;(function(){var T;(function(){"use strict";var w=[,,function(a){function c(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var s=new c(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},c.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},c.prototype.has_match=function(s){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(s))return!0;return!1},c.prototype.set_indent=function(s,h){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},c.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},c.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},c.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},c.prototype.is_empty=function(){return this.__items.length===0},c.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},c.prototype.push=function(s){this.__items.push(s);var h=s.lastIndexOf(`
`);h!==-1?this.__character_count=s.length-h:this.__character_count+=s.length},c.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},c.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},c.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},c.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},c.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function o(s,h){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),h=h||"",s.indent_level>0&&(h=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}o.prototype.get_indent_size=function(s,h){var f=this.__base_string_length;return h=h||0,s<0&&(f=0),f+=s*this.__indent_size,f+=h,f},o.prototype.get_indent_string=function(s,h){var f=this.__base_string;return h=h||0,s<0&&(s=0,f=""),h+=s*this.__indent_size,this.__ensure_cache(h),f+=this.__cache[h],f},o.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var s=this.__cache.length,h=0,f="";this.__indent_size&&s>=this.__indent_size&&(h=Math.floor(s/this.__indent_size),s-=h*this.__indent_size,f=new Array(h+1).join(this.__indent_string)),s&&(f+=new Array(s+1).join(" ")),this.__cache.push(f)};function n(s,h){this.__indent_cache=new o(s,h),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(s,h){return this.__indent_cache.get_indent_string(s,h)},n.prototype.get_indent_size=function(s,h){return this.__indent_cache.get_indent_size(s,h)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(s){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var f=this.__lines.join(`
`);return s!==`
`&&(f=f.replace(/[\n]/g,s)),f},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(s,h){return s=s||0,h=h||0,this.next_line.set_indent(s,h),this.__lines.length>1?(this.current_line.set_indent(s,h),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(s){for(var h=0;h<s.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(s){for(var h=this.__lines.length;s<h;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(s,h){for(var f=this.__lines.length-2;f>=0;){var u=this.__lines[f];if(u.is_empty())break;if(u.item(0).indexOf(s)!==0&&u.item(-1)!==h){this.__lines.splice(f+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}f--}},a.exports.Output=n},function(a){function c(o,n,s,h){this.type=o,this.text=n,this.comments_before=null,this.newlines=s||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}a.exports.Token=c},,,function(a){function c(s,h){this.raw_options=o(s,h),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}c.prototype._get_array=function(s,h){var f=this.raw_options[s],u=h||[];return typeof f=="object"?f!==null&&typeof f.concat=="function"&&(u=f.concat()):typeof f=="string"&&(u=f.split(/[^a-zA-Z0-9_\/\-]+/)),u},c.prototype._get_boolean=function(s,h){var f=this.raw_options[s],u=f===void 0?!!h:!!f;return u},c.prototype._get_characters=function(s,h){var f=this.raw_options[s],u=h||"";return typeof f=="string"&&(u=f.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},c.prototype._get_number=function(s,h){var f=this.raw_options[s];h=parseInt(h,10),isNaN(h)&&(h=0);var u=parseInt(f,10);return isNaN(u)&&(u=h),u},c.prototype._get_selection=function(s,h,f){var u=this._get_selection_list(s,h,f);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
`+h+`
You passed in: '`+this.raw_options[s]+"'");return u[0]},c.prototype._get_selection_list=function(s,h,f){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(f=f||[h[0]],!this._is_valid_selection(f,h))throw new Error("Invalid Default Value!");var u=this._get_array(s,f);if(!this._is_valid_selection(u,h))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
`+h+`
You passed in: '`+this.raw_options[s]+"'");return u},c.prototype._is_valid_selection=function(s,h){return s.length&&h.length&&!s.some(function(f){return h.indexOf(f)===-1})};function o(s,h){var f={};s=n(s);var u;for(u in s)u!==h&&(f[u]=s[u]);if(h&&s[h])for(u in s[h])f[u]=s[h][u];return f}function n(s){var h={},f;for(f in s){var u=f.replace(/-/g,"_");h[u]=s[f]}return h}a.exports.Options=c,a.exports.normalizeOpts=n,a.exports.mergeOpts=o},,function(a){var c=RegExp.prototype.hasOwnProperty("sticky");function o(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position<this.__input_length},o.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},o.prototype.peek=function(n){var s=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(s=this.__input.charAt(n)),s},o.prototype.__match=function(n,s){n.lastIndex=s;var h=n.exec(this.__input);return h&&!(c&&n.sticky)&&(h.index!==s&&(h=null)),h},o.prototype.test=function(n,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(n,s):!1},o.prototype.testChar=function(n,s){var h=this.peek(s);return n.lastIndex=0,h!==null&&n.test(h)},o.prototype.match=function(n){var s=this.__match(n,this.__position);return s?this.__position+=s[0].length:s=null,s},o.prototype.read=function(n,s,h){var f="",u;return n&&(u=this.match(n),u&&(f+=u[0])),s&&(u||!n)&&(f+=this.readUntil(s,h)),f},o.prototype.readUntil=function(n,s){var h="",f=this.__position;n.lastIndex=this.__position;var u=n.exec(this.__input);return u?(f=u.index,s&&(f+=u[0].length)):f=this.__input_length,h=this.__input.substring(this.__position,f),this.__position=f,h},o.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},o.prototype.get_regexp=function(n,s){var h=null,f="g";return s&&c&&(f="y"),typeof n=="string"&&n!==""?h=new RegExp(n,f):n&&(h=new RegExp(n.source,f)),h},o.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},o.prototype.peekUntilAfter=function(n){var s=this.__position,h=this.readUntilAfter(n);return this.__position=s,h},o.prototype.lookBack=function(n){var s=this.__position-1;return s>=n.length&&this.__input.substring(s-n.length,s).toLowerCase()===n},a.exports.InputScanner=o},function(a,c,o){var n=o(8).InputScanner,s=o(3).Token,h=o(10).TokenStream,f=o(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(r,E){this._input=new n(r),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new f(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var r,E=new s(u.START,""),y=null,p=[],R=new h;E.type!==u.EOF;){for(r=this._get_next_token(E,y);this._is_comment(r);)R.add(r),r=this._get_next_token(E,y);R.isEmpty()||(r.comments_before=R,R=new h),r.parent=y,this._is_opening(r)?(p.push(y),y=r):y&&this._is_closing(r,y)&&(r.opened=y,y.closed=r,y=p.pop(),r.parent=y),r.previous=E,E.next=r,this.__tokens.add(r),E=r}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(r,E){this._readWhitespace();var y=this._input.read(/.+/g);return y?this._create_token(u.RAW,y):this._create_token(u.EOF,"")},i.prototype._is_comment=function(r){return!1},i.prototype._is_opening=function(r){return!1},i.prototype._is_closing=function(r,E){return!1},i.prototype._create_token=function(r,E){var y=new s(r,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return y},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},a.exports.Tokenizer=i,a.exports.TOKEN=u},function(a){function c(o){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=o}c.prototype.restart=function(){this.__position=0},c.prototype.isEmpty=function(){return this.__tokens_length===0},c.prototype.hasNext=function(){return this.__position<this.__tokens_length},c.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__tokens[this.__position],this.__position+=1),o},c.prototype.peek=function(o){var n=null;return o=o||0,o+=this.__position,o>=0&&o<this.__tokens_length&&(n=this.__tokens[o]),n},c.prototype.add=function(o){this.__parent_token&&(o.parent=this.__parent_token),this.__tokens.push(o),this.__tokens_length+=1},a.exports.TokenStream=c},function(a,c,o){var n=o(12).Pattern;function s(h,f){n.call(this,h,f),f?this._line_regexp=this._input.get_regexp(f._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}s.prototype=new n,s.prototype.__set_whitespace_patterns=function(h,f){h+="\\t ",f+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+f+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+f+"]")},s.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var h=this._input.read(this._match_pattern);if(h===" ")this.whitespace_before_token=" ";else if(h){var f=this.__split(this._newline_regexp,h);this.newline_count=f.length-1,this.whitespace_before_token=f[this.newline_count]}return h},s.prototype.matching=function(h,f){var u=this._create();return u.__set_whitespace_patterns(h,f),u._update(),u},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(h,f){h.lastIndex=0;for(var u=0,i=[],r=h.exec(f);r;)i.push(f.substring(u,r.index)),u=r.index+r[0].length,r=h.exec(f);return u<f.length?i.push(f.substring(u,f.length)):i.push(""),i},a.exports.WhitespacePattern=s},function(a){function c(o,n){this._input=o,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,n&&(this._starting_pattern=this._input.get_regexp(n._starting_pattern,!0),this._match_pattern=this._input.get_regexp(n._match_pattern,!0),this._until_pattern=this._input.get_regexp(n._until_pattern),this._until_after=n._until_after)}c.prototype.read=function(){var o=this._input.read(this._starting_pattern);return(!this._starting_pattern||o)&&(o+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),o},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(o){var n=this._create();return n._until_after=!0,n._until_pattern=this._input.get_regexp(o),n._update(),n},c.prototype.until=function(o){var n=this._create();return n._until_after=!1,n._until_pattern=this._input.get_regexp(o),n._update(),n},c.prototype.starting_with=function(o){var n=this._create();return n._starting_pattern=this._input.get_regexp(o,!0),n._update(),n},c.prototype.matching=function(o){var n=this._create();return n._match_pattern=this._input.get_regexp(o,!0),n._update(),n},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},a.exports.Pattern=c},function(a){function c(o,n){o=typeof o=="string"?o:o.source,n=typeof n=="string"?n:n.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+n,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+n,"g")}c.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var n={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(o);s;)n[s[1]]=s[2],s=this.__directive_pattern.exec(o);return n},c.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},a.exports.Directives=c},function(a,c,o){var n=o(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(f,u){n.call(this,f,u),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var i=new n(f);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new n,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(f){var u=this._create();return u._disabled[f]=!0,u._update(),u},h.prototype.read_options=function(f){var u=this._create();for(var i in s)u._disabled[i]=f.templating.indexOf(i)===-1;return u._update(),u},h.prototype.exclude=function(f){var u=this._create();return u._excluded[f]=!0,u._update(),u},h.prototype.read=function(){var f="";this._match_pattern?f=this._input.read(this._starting_pattern):f=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),f+=u,u=this._read_template();return this._until_after&&(f+=this._input.readUntilAfter(this._until_pattern)),f},h.prototype.__set_templated_pattern=function(){var f=[];this._disabled.php||f.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||f.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||f.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(f.push(this.__patterns.django._starting_pattern.source),f.push(this.__patterns.django_value._starting_pattern.source),f.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||f.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&f.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+f.join("|")+")")},h.prototype._read_template=function(){var f="",u=this._input.peek();if(u==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(f=f||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(f=f||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(f=f||this.__patterns.handlebars_comment.read(),f=f||this.__patterns.handlebars_unescaped.read(),f=f||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(f=f||this.__patterns.django_value.read()),this._excluded.django||(f=f||this.__patterns.django_comment.read(),f=f||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(f=f||this.__patterns.smarty_comment.read(),f=f||this.__patterns.smarty_literal.read(),f=f||this.__patterns.smarty.read()));return f},a.exports.TemplatablePattern=h},,,,function(a,c,o){var n=o(19).Beautifier,s=o(20).Options;function h(f,u,i,r){var E=new n(f,u,i,r);return E.beautify()}a.exports=h,a.exports.defaultOptions=function(){return new s}},function(a,c,o){var n=o(20).Options,s=o(2).Output,h=o(21).Tokenizer,f=o(21).TOKEN,u=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,r=function(j,F){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=j.max_preserve_newlines,this.preserve_newlines=j.preserve_newlines,this._output=new s(j,F)};r.prototype.current_line_has_match=function(j){return this._output.current_line.has_match(j)},r.prototype.set_space_before_token=function(j,F){this._output.space_before_token=j,this._output.non_breaking_space=F},r.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},r.prototype.add_raw_token=function(j){this._output.add_raw_token(j)},r.prototype.print_preserved_newlines=function(j){var F=0;j.type!==f.TEXT&&j.previous.type!==f.TEXT&&(F=j.newlines?1:0),this.preserve_newlines&&(F=j.newlines<this.max_preserve_newlines+1?j.newlines:this.max_preserve_newlines+1);for(var M=0;M<F;M++)this.print_newline(M>0);return F!==0},r.prototype.traverse_whitespace=function(j){return j.whitespace_before||j.newlines?(this.print_preserved_newlines(j)||(this._output.space_before_token=!0),!0):!1},r.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},r.prototype.print_newline=function(j){this._output.add_new_line(j)},r.prototype.print_token=function(j){j.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(j.text))},r.prototype.indent=function(){this.indent_level++},r.prototype.get_full_indent=function(j){return j=this.indent_level+(j||0),j<1?"":this._output.get_indent_string(j)};var E=function(j){for(var F=null,M=j.next;M.type!==f.EOF&&j.closed!==M;){if(M.type===f.ATTRIBUTE&&M.text==="type"){M.next&&M.next.type===f.EQUALS&&M.next.next&&M.next.next.type===f.VALUE&&(F=M.next.next.text);break}M=M.next}return F},y=function(j,F){var M=null,Y=null;return F.closed?(j==="script"?M="text/javascript":j==="style"&&(M="text/css"),M=E(F)||M,M.search("text/css")>-1?Y="css":M.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?Y="javascript":M.search(/(text|application|dojo)\/(x-)?(html)/)>-1?Y="html":M.search(/test\/null/)>-1&&(Y="null"),Y):null};function p(j,F){return F.indexOf(j)!==-1}function R(j,F,M){this.parent=j||null,this.tag=F?F.tag_name:"",this.indent_level=M||0,this.parser_token=F||null}function O(j){this._printer=j,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(j){var F=new R(this._current_frame,j,this._printer.indent_level);this._current_frame=F},O.prototype._try_pop_frame=function(j){var F=null;return j&&(F=j.parser_token,this._printer.indent_level=j.indent_level,this._current_frame=j.parent),F},O.prototype._get_frame=function(j,F){for(var M=this._current_frame;M&&!(j.indexOf(M.tag)!==-1);){if(F&&F.indexOf(M.tag)!==-1){M=null;break}M=M.parent}return M},O.prototype.try_pop=function(j,F){var M=this._get_frame([j],F);return this._try_pop_frame(M)},O.prototype.indent_to_tag=function(j){var F=this._get_frame(j);F&&(this._printer.indent_level=F.indent_level)};function _(j,F,M,Y){this._source_text=j||"",F=F||{},this._js_beautify=M,this._css_beautify=Y,this._tag_stack=null;var K=new n(F,"html");this._options=K,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var j=this._source_text,F=this._options.eol;this._options.eol==="auto"&&(F=`
`,j&&u.test(j)&&(F=j.match(u)[0])),j=j.replace(i,`
`);var M=j.match(/^[\t ]*/)[0],Y={text:"",type:""},K=new x,A=new r(this._options,M),W=new h(j,this._options).tokenize();this._tag_stack=new O(A);for(var U=null,D=W.next();D.type!==f.EOF;)D.type===f.TAG_OPEN||D.type===f.COMMENT?(U=this._handle_tag_open(A,D,K,Y),K=U):D.type===f.ATTRIBUTE||D.type===f.EQUALS||D.type===f.VALUE||D.type===f.TEXT&&!K.tag_complete?U=this._handle_inside_tag(A,D,K,W):D.type===f.TAG_CLOSE?U=this._handle_tag_close(A,D,K):D.type===f.TEXT?U=this._handle_text(A,D,K):A.add_raw_token(D),Y=U,D=W.next();var X=A._output.get_code(F);return X},_.prototype._handle_tag_close=function(j,F,M){var Y={text:F.text,type:F.type};return j.alignment_size=0,M.tag_complete=!0,j.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),M.is_unformatted?j.add_raw_token(F):(M.tag_start_char==="<"&&(j.set_space_before_token(F.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&M.has_wrapped_attrs&&j.print_newline(!1)),j.print_token(F)),M.indent_content&&!(M.is_unformatted||M.is_content_unformatted)&&(j.indent(),M.indent_content=!1),!M.is_inline_element&&!(M.is_unformatted||M.is_content_unformatted)&&j.set_wrap_point(),Y},_.prototype._handle_inside_tag=function(j,F,M,Y){var K=M.has_wrapped_attrs,A={text:F.text,type:F.type};if(j.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),M.is_unformatted)j.add_raw_token(F);else if(M.tag_start_char==="{"&&F.type===f.TEXT)j.print_preserved_newlines(F)?(F.newlines=0,j.add_raw_token(F)):j.print_token(F);else{if(F.type===f.ATTRIBUTE?(j.set_space_before_token(!0),M.attr_count+=1):(F.type===f.EQUALS||F.type===f.VALUE&&F.previous.type===f.EQUALS)&&j.set_space_before_token(!1),F.type===f.ATTRIBUTE&&M.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(j.traverse_whitespace(F),K=K||F.newlines!==0),this._is_wrap_attributes_force)){var W=M.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&M.attr_count===1){var U=!0,D=0,X;do{if(X=Y.peek(D),X.type===f.ATTRIBUTE){U=!1;break}D+=1}while(D<4&&X.type!==f.EOF&&X.type!==f.TAG_CLOSE);W=!U}W&&(j.print_newline(!1),K=!0)}j.print_token(F),K=K||j.previous_token_wrapped(),M.has_wrapped_attrs=K}return A},_.prototype._handle_text=function(j,F,M){var Y={text:F.text,type:"TK_CONTENT"};return M.custom_beautifier_name?this._print_custom_beatifier_text(j,F,M):M.is_unformatted||M.is_content_unformatted?j.add_raw_token(F):(j.traverse_whitespace(F),j.print_token(F)),Y},_.prototype._print_custom_beatifier_text=function(j,F,M){var Y=this;if(F.text!==""){var K=F.text,A,W=1,U="",D="";M.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?A=this._js_beautify:M.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?A=this._css_beautify:M.custom_beautifier_name==="html"&&(A=function(Ae,me){var Se=new _(Ae,me,Y._js_beautify,Y._css_beautify);return Se.beautify()}),this._options.indent_scripts==="keep"?W=0:this._options.indent_scripts==="separate"&&(W=-j.indent_level);var X=j.get_full_indent(W);if(K=K.replace(/\n[ \t]*$/,""),M.custom_beautifier_name!=="html"&&K[0]==="<"&&K.match(/^(<!--|<!\[CDATA\[)/)){var ie=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(K);if(!ie){j.add_raw_token(F);return}U=X+ie[1]+`
`,K=ie[4],ie[5]&&(D=X+ie[5]),K=K.replace(/\n[ \t]*$/,""),(ie[2]||ie[3].indexOf(`
`)!==-1)&&(ie=ie[3].match(/[ \t]+$/),ie&&(F.whitespace_before=ie[0]))}if(K)if(A){var oe=function(){this.eol=`
`};oe.prototype=this._options.raw_options;var de=new oe;K=A(X+K,de)}else{var Ce=F.whitespace_before;Ce&&(K=K.replace(new RegExp(`
(`+Ce+")?","g"),`
`)),K=X+K.replace(/\n/g,`
`+X)}U&&(K?K=U+K+`
`+D:K=U+D),j.print_newline(!1),K&&(F.text=K,F.whitespace_before="",F.newlines=0,j.add_raw_token(F),j.print_newline(!0))}},_.prototype._handle_tag_open=function(j,F,M,Y){var K=this._get_tag_open_token(F);return(M.is_unformatted||M.is_content_unformatted)&&!M.is_empty_element&&F.type===f.TAG_OPEN&&F.text.indexOf("</")===0?(j.add_raw_token(F),K.start_tag_token=this._tag_stack.try_pop(K.tag_name)):(j.traverse_whitespace(F),this._set_tag_position(j,F,K,M,Y),K.is_inline_element||j.set_wrap_point(),j.print_token(F)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(K.alignment_size=F.text.length+1),!K.tag_complete&&!K.is_unformatted&&(j.alignment_size=K.alignment_size),K};var x=function(j,F){if(this.parent=j||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!F)this.tag_complete=!0;else{var M;this.tag_start_char=F.text[0],this.text=F.text,this.tag_start_char==="<"?(M=F.text.match(/^<([^\s>]*)/),this.tag_check=M?M[1]:""):(M=F.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=M?M[1]:"",(F.text.startsWith("{{#>")||F.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&F.next!==null?this.tag_check=F.next.text.split(" ")[0]:this.tag_check=F.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),F.type===f.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||F.closed&&F.closed.text==="/>";var Y=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(Y=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(Y)))}};_.prototype._get_tag_open_token=function(j){var F=new x(this._tag_stack.get_parser_token(),j);return F.alignment_size=this._options.wrap_attributes_indent_size,F.is_end_tag=F.is_end_tag||p(F.tag_check,this._options.void_elements),F.is_empty_element=F.tag_complete||F.is_start_tag&&F.is_end_tag,F.is_unformatted=!F.tag_complete&&p(F.tag_check,this._options.unformatted),F.is_content_unformatted=!F.is_empty_element&&p(F.tag_check,this._options.content_unformatted),F.is_inline_element=p(F.tag_name,this._options.inline)||F.tag_name.includes("-")||F.tag_start_char==="{",F},_.prototype._set_tag_position=function(j,F,M,Y,K){if(M.is_empty_element||(M.is_end_tag?M.start_tag_token=this._tag_stack.try_pop(M.tag_name):(this._do_optional_end_element(M)&&(M.is_inline_element||j.print_newline(!1)),this._tag_stack.record_tag(M),(M.tag_name==="script"||M.tag_name==="style")&&!(M.is_unformatted||M.is_content_unformatted)&&(M.custom_beautifier_name=y(M.tag_check,F)))),p(M.tag_check,this._options.extra_liners)&&(j.print_newline(!1),j._output.just_added_blankline()||j.print_newline(!0)),M.is_empty_element){if(M.tag_start_char==="{"&&M.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),M.indent_content=!0;var A=j.current_line_has_match(/{{#if/);A||j.print_newline(!1)}M.tag_name==="!--"&&K.type===f.TAG_CLOSE&&Y.is_end_tag&&M.text.indexOf(`
`)===-1||(M.is_inline_element||M.is_unformatted||j.print_newline(!1),this._calcluate_parent_multiline(j,M))}else if(M.is_end_tag){var W=!1;W=M.start_tag_token&&M.start_tag_token.multiline_content,W=W||!M.is_inline_element&&!(Y.is_inline_element||Y.is_unformatted)&&!(K.type===f.TAG_CLOSE&&M.start_tag_token===Y)&&K.type!=="TK_CONTENT",(M.is_content_unformatted||M.is_unformatted)&&(W=!1),W&&j.print_newline(!1)}else M.indent_content=!M.custom_beautifier_name,M.tag_start_char==="<"&&(M.tag_name==="html"?M.indent_content=this._options.indent_inner_html:M.tag_name==="head"?M.indent_content=this._options.indent_head_inner_html:M.tag_name==="body"&&(M.indent_content=this._options.indent_body_inner_html)),!(M.is_inline_element||M.is_unformatted)&&(K.type!=="TK_CONTENT"||M.is_content_unformatted)&&j.print_newline(!1),this._calcluate_parent_multiline(j,M)},_.prototype._calcluate_parent_multiline=function(j,F){F.parent&&j._output.just_added_newline()&&!((F.is_inline_element||F.is_unformatted)&&F.parent.is_inline_element)&&(F.parent.multiline_content=!0)};var S=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],C=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(j){var F=null;if(j.is_empty_element||!j.is_start_tag||!j.parent)return;if(j.tag_name==="body")F=F||this._tag_stack.try_pop("head");else if(j.tag_name==="li")F=F||this._tag_stack.try_pop("li",["ol","ul"]);else if(j.tag_name==="dd"||j.tag_name==="dt")F=F||this._tag_stack.try_pop("dt",["dl"]),F=F||this._tag_stack.try_pop("dd",["dl"]);else if(j.parent.tag_name==="p"&&S.indexOf(j.tag_name)!==-1){var M=j.parent.parent;(!M||C.indexOf(M.tag_name)===-1)&&(F=F||this._tag_stack.try_pop("p"))}else j.tag_name==="rp"||j.tag_name==="rt"?(F=F||this._tag_stack.try_pop("rt",["ruby","rtc"]),F=F||this._tag_stack.try_pop("rp",["ruby","rtc"])):j.tag_name==="optgroup"?F=F||this._tag_stack.try_pop("optgroup",["select"]):j.tag_name==="option"?F=F||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):j.tag_name==="colgroup"?F=F||this._tag_stack.try_pop("caption",["table"]):j.tag_name==="thead"?(F=F||this._tag_stack.try_pop("caption",["table"]),F=F||this._tag_stack.try_pop("colgroup",["table"])):j.tag_name==="tbody"||j.tag_name==="tfoot"?(F=F||this._tag_stack.try_pop("caption",["table"]),F=F||this._tag_stack.try_pop("colgroup",["table"]),F=F||this._tag_stack.try_pop("thead",["table"]),F=F||this._tag_stack.try_pop("tbody",["table"])):j.tag_name==="tr"?(F=F||this._tag_stack.try_pop("caption",["table"]),F=F||this._tag_stack.try_pop("colgroup",["table"]),F=F||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(j.tag_name==="th"||j.tag_name==="td")&&(F=F||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),F=F||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return j.parent=this._tag_stack.get_parser_token(),F},a.exports.Beautifier=_},function(a,c,o){var n=o(6).Options;function s(h){n.call(this,h,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}s.prototype=new n,a.exports.Options=s},function(a,c,o){var n=o(9).Tokenizer,s=o(9).TOKEN,h=o(13).Directives,f=o(14).TemplatablePattern,u=o(12).Pattern,i={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},r=new h(/<\!--/,/-->/),E=function(y,p){n.call(this,y,p),this._current_tag_name="";var R=new f(this._input).read_options(this._options),O=new u(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(/<!--/).until_after(/-->/),cdata:O.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:O.starting_with(/<!\[/).until_after(/]>/),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(_).until_after(_)}};E.prototype=new n,E.prototype._is_comment=function(y){return!1},E.prototype._is_opening=function(y){return y.type===i.TAG_OPEN},E.prototype._is_closing=function(y,p){return y.type===i.TAG_CLOSE&&p&&((y.text===">"||y.text==="/>")&&p.text[0]==="<"||y.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(y,p){var R=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(i.EOF,""):(R=R||this._read_open_handlebars(O,p),R=R||this._read_attribute(O,y,p),R=R||this._read_close(O,p),R=R||this._read_raw_content(O,y,p),R=R||this._read_content_word(O),R=R||this._read_comment_or_cdata(O),R=R||this._read_processing(O),R=R||this._read_open(O,p),R=R||this._create_token(i.UNKNOWN,this._input.next()),R)},E.prototype._read_comment_or_cdata=function(y){var p=null,R=null,O=null;if(y==="<"){var _=this._input.peek(1);_==="!"&&(R=this.__patterns.comment.read(),R?(O=r.get_directives(R),O&&O.ignore==="start"&&(R+=r.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(p=this._create_token(i.COMMENT,R),p.directives=O)}return p},E.prototype._read_processing=function(y){var p=null,R=null,O=null;if(y==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(p=this._create_token(i.COMMENT,R),p.directives=O)}return p},E.prototype._read_open=function(y,p){var R=null,O=null;return p||y==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),O=this._create_token(i.TAG_OPEN,R)),O},E.prototype._read_open_handlebars=function(y,p){var R=null,O=null;return p||this._options.indent_handlebars&&y==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),O=this._create_token(i.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),O=this._create_token(i.TAG_OPEN,R))),O},E.prototype._read_close=function(y,p){var R=null,O=null;return p&&(p.text[0]==="<"&&(y===">"||y==="/"&&this._input.peek(1)===">")?(R=this._input.next(),y==="/"&&(R+=this._input.next()),O=this._create_token(i.TAG_CLOSE,R)):p.text[0]==="{"&&y==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(i.TAG_CLOSE,"}}"))),O},E.prototype._read_attribute=function(y,p,R){var O=null,_="";if(R&&R.text[0]==="<")if(y==="=")O=this._create_token(i.EQUALS,this._input.next());else if(y==='"'||y==="'"){var x=this._input.next();y==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),O=this._create_token(i.VALUE,x)}else _=this.__patterns.attribute.read(),_&&(p.type===i.EQUALS?O=this._create_token(i.VALUE,_):O=this._create_token(i.ATTRIBUTE,_));return O},E.prototype._is_content_unformatted=function(y){return this._options.void_elements.indexOf(y)===-1&&(this._options.content_unformatted.indexOf(y)!==-1||this._options.unformatted.indexOf(y)!==-1)},E.prototype._read_raw_content=function(y,p,R){var O="";if(R&&R.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(p.type===i.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var _=p.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var x=this._read_comment_or_cdata(y);if(x)return x.type=i.TEXT,x;O=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(O=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return O?this._create_token(i.TEXT,O):null},E.prototype._read_content_word=function(y){var p="";if(this._options.unformatted_content_delimiter&&(y===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(i.TEXT,p)},a.exports.Tokenizer=E,a.exports.TOKEN=i}],b={};function t(a){var c=b[a];if(c!==void 0)return c.exports;var o=b[a]={exports:{}};return w[a](o,o.exports,t),o.exports}var d=t(18);T=d})();var N=T;if(!0)!(P=[L,L("6UM0"),L("TXwP")],g=function(w){var b=L("6UM0"),t=L("TXwP");return{html_beautify:function(d,a){return N(d,a,b.js_beautify,t.css_beautify)}}}.apply(q,P),g!==void 0&&(H.exports=g));else var v,m})()},qBft:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(g,T){var N=g.sigBytes,v=T*4,m=v-N%v,w=N+m-1;g.clamp(),g.words[w>>>2]|=m<<24-w%4*8,g.sigBytes+=m},unpad:function(g){var T=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=T}},P.pad.Ansix923})},qHvr:function(H,q,L){"use strict";var P=L("2qtc"),g=L("kLXV"),T=L("5NDa"),N=L("5rEg"),v=L("miYZ"),m=L("tsqr"),w=L("tJVT"),b=L("q1tI"),t=L.n(b),d=L("4i/N");function a(c){var o=c.isAddmodle,n=c.setIsAdd,s=c.createTeam,h=Object(b.useState)(""),f=Object(w.a)(h,2),u=f[0],i=f[1];return t.a.createElement(g.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),t.a.createElement(d.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:o,closable:!1,destroyOnClose:!0,onOk:function(){if(!u){m.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}s(u)},onCancel:function(){return n(!1)}},t.a.createElement("div",null,t.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},t.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:u,maxLength:60,addonAfter:String(u&&u.length||0)+"/60",onChange:function(E){return i(E.target.value)}}))))}q.a=a},qM6L:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.WordArray,v=g.enc,m=v.Utf16=v.Utf16BE={stringify:function(b){for(var t=b.words,d=b.sigBytes,a=[],c=0;c<d;c+=2){var o=t[c>>>2]>>>16-c%4*8&65535;a.push(String.fromCharCode(o))}return a.join("")},parse:function(b){for(var t=b.length,d=[],a=0;a<t;a++)d[a>>>1]|=b.charCodeAt(a)<<16-a%2*16;return N.create(d,t*2)}};v.Utf16LE={stringify:function(b){for(var t=b.words,d=b.sigBytes,a=[],c=0;c<d;c+=2){var o=w(t[c>>>2]>>>16-c%4*8&65535);a.push(String.fromCharCode(o))}return a.join("")},parse:function(b){for(var t=b.length,d=[],a=0;a<t;a++)d[a>>>1]|=w(b.charCodeAt(a)<<16-a%2*16);return N.create(d,t*2)}};function w(b){return b<<8&4278255360|b>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return P.mode.CTRGladman=function(){var g=P.lib.BlockCipherMode.extend();function T(m){if((m>>24&255)===255){var w=m>>16&255,b=m>>8&255,t=m&255;w===255?(w=0,b===255?(b=0,t===255?t=0:++t):++b):++w,m=0,m+=w<<16,m+=b<<8,m+=t}else m+=1<<24;return m}function N(m){return(m[0]=T(m[0]))===0&&(m[1]=T(m[1])),m}var v=g.Encryptor=g.extend({processBlock:function(m,w){var b=this._cipher,t=b.blockSize,d=this._iv,a=this._counter;d&&(a=this._counter=d.slice(0),this._iv=void 0),N(a);var c=a.slice(0);b.encryptBlock(c,0);for(var o=0;o<t;o++)m[w+o]^=c[o]}});return g.Decryptor=v,g}(),P.mode.CTRGladman})},"rAM+":function(H,q,L){"use strict";L.d(q,"a",function(){return g});var P=L("Qw5x");function g(T,N){var v;if(typeof Symbol=="undefined"||T[Symbol.iterator]==null){if(Array.isArray(T)||(v=Object(P.a)(T))||N&&T&&typeof T.length=="number"){v&&(T=v);var m=0,w=function(){};return{s:w,n:function(){return m>=T.length?{done:!0}:{done:!1,value:T[m++]}},e:function(c){throw c},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 b=!0,t=!1,d;return{s:function(){v=T[Symbol.iterator]()},n:function(){var c=v.next();return b=c.done,c},e:function(c){t=!0,d=c},f:function(){try{!b&&v.return!=null&&v.return()}finally{if(t)throw d}}}}},rUJ1:function(H,q){const L=/[&<>"']/,P=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},v=O=>N[O];function m(O,_){if(_){if(L.test(O))return O.replace(P,v)}else if(g.test(O))return O.replace(T,v);return O}const w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(O){return O.replace(w,(_,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const t=/(^|[^\[])\^/g;function d(O,_){O=O.source||O,_=_||"";const x={replace:(S,C)=>(C=C.source||C,C=C.replace(t,"$1"),O=O.replace(S,C),x),getRegex:()=>new RegExp(O,_)};return x}const a=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function o(O,_,x){if(O){let S;try{S=decodeURIComponent(b(x)).replace(a,"").toLowerCase()}catch(C){return null}if(S.indexOf("javascript:")===0||S.indexOf("vbscript:")===0||S.indexOf("data:")===0)return null}_&&!c.test(x)&&(x=u(_,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(S){return null}return x}const n={},s=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(O,_){n[" "+O]||(s.test(O)?n[" "+O]=O+"/":n[" "+O]=y(O,"/",!0)),O=n[" "+O];const x=O.indexOf(":")===-1;return _.substring(0,2)==="//"?x?_:O.replace(h,"$1")+_:_.charAt(0)==="/"?x?_:O.replace(f,"$1")+_:O+_}const i={exec:function(){}};function r(O){let _=1,x,S;for(;_<arguments.length;_++){x=arguments[_];for(S in x)Object.prototype.hasOwnProperty.call(x,S)&&(O[S]=x[S])}return O}function E(O,_){const x=O.replace(/\|/g,(j,F,M)=>{let Y=!1,K=F;for(;--K>=0&&M[K]==="\\";)Y=!Y;return Y?"|":" |"}),S=x.split(/ \|/);let C=0;if(S.length>_)S.splice(_);else for(;S.length<_;)S.push("");for(;C<S.length;C++)S[C]=S[C].trim().replace(/\\\|/g,"|");return S}function y(O,_,x){const S=O.length;if(S===0)return"";let C=0;for(;C<S;){const j=O.charAt(S-C-1);if(j===_&&!x)C++;else if(j!==_&&x)C++;else break}return O.substr(0,S-C)}function p(O,_){if(O.indexOf(_[1])===-1)return-1;const x=O.length;let S=0,C=0;for(;C<x;C++)if(O[C]==="\\")C++;else if(O[C]===_[0])S++;else if(O[C]===_[1]&&(S--,S<0))return C;return-1}function R(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}H.exports={escape:m,unescape:b,edit:d,cleanUrl:o,resolveUrl:u,noopTest:i,merge:r,splitCells:E,rtrim:y,findClosingBracket:p,checkSanitizeDeprecation:R}},sR1s:function(H,q,L){"use strict";L.d(q,"b",function(){return N}),L.d(q,"a",function(){return v}),L.d(q,"c",function(){return m}),L.d(q,"d",function(){return w});var P=L("U8pU"),g="RC_TABLE_KEY";function T(b){return b==null?[]:Array.isArray(b)?b:[b]}function N(b,t){if(!t&&typeof t!="number")return b;for(var d=T(t),a=b,c=0;c<d.length;c+=1){if(!a)return null;var o=d[c];a=a[o]}return a}function v(b){var t=[],d={};return b.forEach(function(a){for(var c=a||{},o=c.key,n=c.dataIndex,s=o||T(n).join("-")||g;d[s];)s="".concat(s,"_next");d[s]=!0,t.push(s)}),t}function m(){var b={};function t(o,n){n&&Object.keys(n).forEach(function(s){var h=n[s];h&&Object(P.a)(h)==="object"?(o[s]=o[s]||{},t(o[s],h)):o[s]=h})}for(var d=arguments.length,a=new Array(d),c=0;c<d;c++)a[c]=arguments[c];return a.forEach(function(o){t(b,o)}),b}function w(b){return b!=null}},sboe:function(H,q,L){"use strict";L.d(q,"a",function(){return T});var P=L("q1tI"),g=L.n(P),T=P.createContext(null)},t23M:function(H,q,L){"use strict";var P=L("VTBJ"),g=L("1OyB"),T=L("vuIU"),N=L("Ji7U"),v=L("LK+K"),m=L("q1tI"),w=L.n(m),b=L("m+aA"),t=L("Zm9Q"),d=L("Kwbf"),a=L("c+Xe"),c=L("bdgK"),o="rc-observer-key",n=function(s){Object(N.a)(f,s);var h=Object(v.a)(f);function f(){var u;return Object(g.a)(this,f),u=h.apply(this,arguments),u.resizeObserver=null,u.childNode=null,u.currentElement=null,u.state={width:0,height:0,offsetHeight:0,offsetWidth:0},u.onResize=function(i){var r=u.props.onResize,E=i[0].target,y=E.getBoundingClientRect(),p=y.width,R=y.height,O=E.offsetWidth,_=E.offsetHeight,x=Math.floor(p),S=Math.floor(R);if(u.state.width!==x||u.state.height!==S||u.state.offsetWidth!==O||u.state.offsetHeight!==_){var C={width:x,height:S,offsetWidth:O,offsetHeight:_};u.setState(C),r&&Promise.resolve().then(function(){r(Object(P.a)(Object(P.a)({},C),{},{offsetWidth:O,offsetHeight:_}))})}},u.setChildNode=function(i){u.childNode=i},u}return Object(T.a)(f,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var i=this.props.disabled;if(i){this.destroyObserver();return}var r=Object(b.a)(this.childNode||this),E=r!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=r),!this.resizeObserver&&r&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(r))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var i=this.props.children,r=Object(t.a)(i);if(r.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(r.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=r[0];if(m.isValidElement(E)&&Object(a.c)(E)){var y=E.ref;r[0]=m.cloneElement(E,{ref:Object(a.a)(y,this.setChildNode)})}return r.length===1?r[0]:r.map(function(p,R){return!m.isValidElement(p)||"key"in p&&p.key!==null?p:m.cloneElement(p,{key:"".concat(o,"-").concat(R)})})}}]),f}(m.Component);n.displayName="ResizeObserver",q.a=n},t9D7:function(H,q,L){"use strict";L.d(q,"b",function(){return w}),L.d(q,"g",function(){return t}),L.d(q,"d",function(){return d}),L.d(q,"e",function(){return a}),L.d(q,"a",function(){return c}),L.d(q,"f",function(){return s}),L.d(q,"c",function(){return h});var P=L("Vhoy"),g=L("MI8n"),T=L("pmY6"),N=L("Cg/j"),v=L("ic2d"),m=L("nEHx");const w=Object(N.c)("themeService");var b;(function(f){function u(i){return i&&typeof i=="object"&&typeof i.id=="string"}f.isThemeColor=u})(b||(b={}));function t(f){return{id:f}}var d;(function(f){function u(R){return R&&typeof R=="object"&&typeof R.id=="string"&&(typeof R.color=="undefined"||b.isThemeColor(R.color))}f.isThemeIcon=u;const i=new RegExp(`^\\$\\((${P.a.iconNameExpression}(?:${P.a.iconModifierExpression})?)\\)$`);function r(R){const O=i.exec(R);if(!O)return;let[,_]=O;return{id:_}}f.fromString=r;function E(R,O){let _=R.id;const x=_.lastIndexOf("~");return x!==-1&&(_=_.substring(0,x)),O&&(_=`${_}~${O}`),{id:_}}f.modify=E;function y(R,O){var _,x;return R.id===O.id&&((_=R.color)===null||_===void 0?void 0:_.id)===((x=O.color)===null||x===void 0?void 0:x.id)}f.isEqual=y;function p(R,O){return{id:R.id,color:O?t(O):void 0}}f.asThemeIcon=p,f.asClassNameArray=P.a.asClassNameArray,f.asClassName=P.a.asClassName,f.asCSSSelector=P.a.asCSSSelector})(d||(d={}));function a(f){switch(f){case m.a.DARK:return"vs-dark";case m.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"};class o{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new g.b}onColorThemeChange(f){return this.themingParticipants.push(f),this.onThemingParticipantAddedEmitter.fire(f),Object(T.i)(()=>{const u=this.themingParticipants.indexOf(f);this.themingParticipants.splice(u,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new o;v.a.add(c.ThemingContribution,n);function s(f){return n.onColorThemeChange(f)}class h extends T.a{constructor(f){super();this.themeService=f,this.theme=f.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(u=>this.onThemeChange(u)))}onThemeChange(f){this.theme=f,this.updateStyles()}updateStyles(){}}},uGsb:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("MlIO"),L("1uat"))})(this,function(P){return function(){var g=P,T=g.x64,N=T.Word,v=T.WordArray,m=g.algo,w=m.SHA512,b=m.SHA384=w.extend({_doReset:function(){this._hash=new v.init([new N.init(3418070365,3238371032),new N.init(1654270250,914150663),new N.init(2438529370,812702999),new N.init(355462360,4144912697),new N.init(1731405415,4290775857),new N.init(2394180231,1750603025),new N.init(3675008525,1694076839),new N.init(1203062813,3204075428)])},_doFinalize:function(){var t=w._doFinalize.call(this);return t.sigBytes-=16,t}});g.SHA384=w._createHelper(b),g.HmacSHA384=w._createHmacHelper(b)}(),P.SHA384})},uGxW:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uK0f:function(H,q,L){(function(P,g){H.exports=g()})(this,function(){"use strict";function P(g,T,N){N=N||{},N.childrenKeyName=N.childrenKeyName||"children";var v=g||[],m=[],w=0;do{var b=v.filter(function(t){return T(t,w)})[0];if(!b)break;m.push(b),v=b[N.childrenKeyName]||[],w+=1}while(v.length>0);return m}return P})},ulZh:function(H,q,L){typeof window!="undefined"&&function(g,T){H.exports=T()}(this,function(){return function(P){var g={};function T(N){if(g[N])return g[N].exports;var v=g[N]={i:N,l:!1,exports:{}};return P[N].call(v.exports,v,v.exports,T),v.l=!0,v.exports}return T.m=P,T.c=g,T.d=function(N,v,m){T.o(N,v)||Object.defineProperty(N,v,{enumerable:!0,get:m})},T.r=function(N){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},T.t=function(N,v){if(v&1&&(N=T(N)),v&8)return N;if(v&4&&typeof N=="object"&&N&&N.__esModule)return N;var m=Object.create(null);if(T.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:N}),v&2&&typeof N!="string")for(var w in N)T.d(m,w,function(b){return N[b]}.bind(null,w));return m},T.n=function(N){var v=N&&N.__esModule?function(){return N.default}:function(){return N};return T.d(v,"a",v),v},T.o=function(N,v){return Object.prototype.hasOwnProperty.call(N,v)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,g,T){"use strict";var N=Object.prototype.hasOwnProperty,v="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(v=!1));function w(a,c,o){this.fn=a,this.context=c,this.once=o||!1}function b(a,c,o,n,s){if(typeof o!="function")throw new TypeError("The listener must be a function");var h=new w(o,n||a,s),f=v?v+c:c;return a._events[f]?a._events[f].fn?a._events[f]=[a._events[f],h]:a._events[f].push(h):(a._events[f]=h,a._eventsCount++),a}function t(a,c){--a._eventsCount===0?a._events=new m:delete a._events[c]}function d(){this._events=new m,this._eventsCount=0}d.prototype.eventNames=function(){var c=[],o,n;if(this._eventsCount===0)return c;for(n in o=this._events)N.call(o,n)&&c.push(v?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(o)):c},d.prototype.listeners=function(c){var o=v?v+c:c,n=this._events[o];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,h=n.length,f=new Array(h);s<h;s++)f[s]=n[s].fn;return f},d.prototype.listenerCount=function(c){var o=v?v+c:c,n=this._events[o];return n?n.fn?1:n.length:0},d.prototype.emit=function(c,o,n,s,h,f){var u=v?v+c:c;if(!this._events[u])return!1;var i=this._events[u],r=arguments.length,E,y;if(i.fn){i.once&&this.removeListener(c,i.fn,void 0,!0);switch(r){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,o),!0;case 3:return i.fn.call(i.context,o,n),!0;case 4:return i.fn.call(i.context,o,n,s),!0;case 5:return i.fn.call(i.context,o,n,s,h),!0;case 6:return i.fn.call(i.context,o,n,s,h,f),!0}for(y=1,E=new Array(r-1);y<r;y++)E[y-1]=arguments[y];i.fn.apply(i.context,E)}else{var p=i.length,R;for(y=0;y<p;y++){i[y].once&&this.removeListener(c,i[y].fn,void 0,!0);switch(r){case 1:i[y].fn.call(i[y].context);break;case 2:i[y].fn.call(i[y].context,o);break;case 3:i[y].fn.call(i[y].context,o,n);break;case 4:i[y].fn.call(i[y].context,o,n,s);break;default:if(!E)for(R=1,E=new Array(r-1);R<r;R++)E[R-1]=arguments[R];i[y].fn.apply(i[y].context,E)}}}return!0},d.prototype.on=function(c,o,n){return b(this,c,o,n,!1)},d.prototype.once=function(c,o,n){return b(this,c,o,n,!0)},d.prototype.removeListener=function(c,o,n,s){var h=v?v+c:c;if(!this._events[h])return this;if(!o)return t(this,h),this;var f=this._events[h];if(f.fn)f.fn===o&&(!s||f.once)&&(!n||f.context===n)&&t(this,h);else{for(var u=0,i=[],r=f.length;u<r;u++)(f[u].fn!==o||s&&!f[u].once||n&&f[u].context!==n)&&i.push(f[u]);i.length?this._events[h]=i.length===1?i[0]:i:t(this,h)}return this},d.prototype.removeAllListeners=function(c){var o;return c?(o=v?v+c:c,this._events[o]&&t(this,o)):(this._events=new m,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=v,d.EventEmitter=d,P.exports=d},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,g,T){(function(N){var v=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,w=/(?:\/|^)\.(?=\/)/g,b=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(d,a,c){if(c=c||{},d=d.trim(),a=a.trim(),!a){if(!c.alwaysNormalize)return d;var o=t.parseURL(d);if(!o)throw new Error("Error trying to parse base URL.");return o.path=t.normalizePath(o.path),t.buildURLFromParts(o)}var n=t.parseURL(a);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return c.alwaysNormalize?(n.path=t.normalizePath(n.path),t.buildURLFromParts(n)):a;var s=t.parseURL(d);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var h=m.exec(s.path);s.netLoc=h[1],s.path=h[2]}s.netLoc&&!s.path&&(s.path="/");var f={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(f.netLoc=s.netLoc,n.path[0]!=="/"))if(!n.path)f.path=s.path,n.params||(f.params=s.params,n.query||(f.query=s.query));else{var u=s.path,i=u.substring(0,u.lastIndexOf("/")+1)+n.path;f.path=t.normalizePath(i)}return f.path===null&&(f.path=c.alwaysNormalize?t.normalizePath(n.path):n.path),t.buildURLFromParts(f)},parseURL:function(d){var a=v.exec(d);return a?{scheme:a[1]||"",netLoc:a[2]||"",path:a[3]||"",params:a[4]||"",query:a[5]||"",fragment:a[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(w,"");d.length!==(d=d.replace(b,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};P.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(P,g,T){function N(c){var o={};function n(h){if(o[h])return o[h].exports;var f=o[h]={i:h,l:!1,exports:{}};return c[h].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.m=c,n.c=o,n.i=function(h){return h},n.d=function(h,f,u){n.o(h,f)||Object.defineProperty(h,f,{configurable:!1,enumerable:!0,get:u})},n.r=function(h){Object.defineProperty(h,"__esModule",{value:!0})},n.n=function(h){var f=h&&h.__esModule?function(){return h.default}:function(){return h};return n.d(f,"a",f),f},n.o=function(h,f){return Object.prototype.hasOwnProperty.call(h,f)},n.p="/",n.oe=function(h){throw console.error(h),h};var s=n(n.s=ENTRY_MODULE);return s.default||s}var v="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+v+").*?\\)";function w(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function b(c){return!isNaN(1*c)}function t(c,o,n){var s={};s[n]=[];var h=o.toString(),f=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!f)return s;for(var u=f[1],i=new RegExp("(\\\\n|\\W)"+w(u)+m,"g"),r;r=i.exec(h);){if(r[3]==="dll-reference")continue;s[n].push(r[3])}for(i=new RegExp("\\("+w(u)+'\\("(dll-reference\\s('+v+'))"\\)\\)'+m,"g");r=i.exec(h);)c[r[2]]||(s[n].push(r[1]),c[r[2]]=T(r[1]).m),s[r[2]]=s[r[2]]||[],s[r[2]].push(r[4]);for(var E=Object.keys(s),y=0;y<E.length;y++)for(var p=0;p<s[E[y]].length;p++)b(s[E[y]][p])&&(s[E[y]][p]=1*s[E[y]][p]);return s}function d(c){var o=Object.keys(c);return o.reduce(function(n,s){return n||c[s].length>0},!1)}function a(c,o){for(var n={main:[o]},s={main:[]},h={main:{}};d(n);)for(var f=Object.keys(n),u=0;u<f.length;u++){var i=f[u],r=n[i],E=r.pop();if(h[i]=h[i]||{},h[i][E]||!c[i][E])continue;h[i][E]=!0,s[i]=s[i]||[],s[i].push(E);for(var y=t(c,c[i][E],i),p=Object.keys(y),R=0;R<p.length;R++)n[p[R]]=n[p[R]]||[],n[p[R]]=n[p[R]].concat(y[p[R]])}return s}P.exports=function(c,o){o=o||{};var n={main:T.m},s=o.all?{main:Object.keys(n.main)}:a(n,c),h="";Object.keys(s).filter(function(E){return E!=="main"}).forEach(function(E){for(var y=0;s[E][y];)y++;s[E].push(y),n[E][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",h=h+"var "+E+" = ("+N.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+s[E].map(function(p){return""+JSON.stringify(p)+": "+n[E][p].toString()}).join(",")+`});
`}),h=h+"new (("+N.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+s.main.map(function(E){return""+JSON.stringify(E)+": "+n.main[E].toString()}).join(",")+"}))(self);";var f=new window.Blob([h],{type:"text/javascript"});if(o.bare)return f;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,i=u.createObjectURL(f),r=new window.Worker(i);return r.objectURL=i,r}},"./src/config.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"hlsDefaultConfig",function(){return R}),T.d(g,"mergeConfig",function(){return _}),T.d(g,"enableStreamingMode",function(){return x});var N=T("./src/controller/abr-controller.ts"),v=T("./src/controller/audio-stream-controller.ts"),m=T("./src/controller/audio-track-controller.ts"),w=T("./src/controller/subtitle-stream-controller.ts"),b=T("./src/controller/subtitle-track-controller.ts"),t=T("./src/controller/buffer-controller.ts"),d=T("./src/controller/timeline-controller.ts"),a=T("./src/controller/cap-level-controller.ts"),c=T("./src/controller/fps-controller.ts"),o=T("./src/controller/eme-controller.ts"),n=T("./src/controller/cmcd-controller.ts"),s=T("./src/utils/xhr-loader.ts"),h=T("./src/utils/fetch-loader.ts"),f=T("./src/utils/cues.ts"),u=T("./src/utils/mediakeys-helper.ts"),i=T("./src/utils/logger.ts");function r(){return r=Object.assign||function(S){for(var C=1;C<arguments.length;C++){var j=arguments[C];for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&(S[F]=j[F])}return S},r.apply(this,arguments)}function E(S,C){var j=Object.keys(S);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(S);C&&(F=F.filter(function(M){return Object.getOwnPropertyDescriptor(S,M).enumerable})),j.push.apply(j,F)}return j}function y(S){for(var C=1;C<arguments.length;C++){var j=arguments[C]!=null?arguments[C]:{};C%2?E(Object(j),!0).forEach(function(F){p(S,F,j[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(j)):E(Object(j)).forEach(function(F){Object.defineProperty(S,F,Object.getOwnPropertyDescriptor(j,F))})}return S}function p(S,C,j){return C in S?Object.defineProperty(S,C,{value:j,enumerable:!0,configurable:!0,writable:!0}):S[C]=j,S}var R=y(y({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:N.default,bufferController:t.default,capLevelController:a.default,fpsController:c.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:u.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:w.SubtitleStreamController,subtitleTrackController:b.default,timelineController:d.TimelineController,audioStreamController:v.default,audioTrackController:m.default,emeController:o.default,cmcdController:n.default});function O(){return{cueHandler:f.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function _(S,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 r({},S,C)}function x(S){var C=S.loader;if(C!==h.default&&C!==s.default)i.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),S.progressive=!1;else{var j=Object(h.fetchSupported)();j&&(S.loader=h.default,S.progressive=!0,S.enableSoftwareAES=!0,i.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/polyfills/number.ts"),v=T("./src/utils/ewma-bandwidth-estimator.ts"),m=T("./src/events.ts"),w=T("./src/utils/buffer-helper.ts"),b=T("./src/errors.ts"),t=T("./src/types/loader.ts"),d=T("./src/utils/logger.ts");function a(n,s){for(var h=0;h<s.length;h++){var f=s[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function c(n,s,h){return s&&a(n.prototype,s),h&&a(n,h),n}var o=function(){function n(h){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=h;var f=h.config;this.bwEstimator=new v.default(f.abrEwmaSlowVoD,f.abrEwmaFastVoD,f.abrEwmaDefaultEstimate),this.registerListeners()}var s=n.prototype;return s.registerListeners=function(){var f=this.hls;f.on(m.Events.FRAG_LOADING,this.onFragLoading,this),f.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),f.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.on(m.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(m.Events.FRAG_LOADING,this.onFragLoading,this),f.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.off(m.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(f,u){var i=u.frag;if(i.type===t.PlaylistLevelType.MAIN&&!this.timer){var r;this.fragCurrent=i,this.partCurrent=(r=u.part)!=null?r:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(f,u){var i=this.hls.config;u.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var f=this.fragCurrent,u=this.partCurrent,i=this.hls,r=i.autoLevelEnabled,E=i.config,y=i.media;if(!f||!y)return;var p=u?u.stats:f.stats,R=u?u.duration:f.duration;if(p.aborted){d.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!r||y.paused||!y.playbackRate||!y.readyState)return;var O=performance.now()-p.loading.start,_=Math.abs(y.playbackRate);if(O<=500*R/_)return;var x=i.levels,S=i.minAutoLevel,C=x[f.level],j=p.total||Math.max(p.loaded,Math.round(R*C.maxBitrate/8)),F=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/O),M=(j-p.loaded)/F,Y=y.currentTime,K=(w.BufferHelper.bufferInfo(y,Y,E.maxBufferHole).end-Y)/_;if(K>=2*R/_||M<=K)return;var A=Number.POSITIVE_INFINITY,W;for(W=f.level-1;W>S;W--){var U=x[W].maxBitrate;if(A=R*U/(8*.8*F),A<K)break}if(A>=M)return;var D=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+f.sn+(u?" part "+u.index:"")+" of level "+f.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+W+`
Current BW estimate: `+(Object(N.isFiniteNumber)(D)?(D/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+M.toFixed(3)+` s
Estimated load time for the next fragment: `+A.toFixed(3)+` s
Time to underbuffer: `+K.toFixed(3)+" s"),i.nextLoadLevel=W,this.bwEstimator.sample(O,p.loaded),this.clearTimer(),f.loader&&(this.fragCurrent=this.partCurrent=null,f.loader.abort()),i.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:f,part:u,stats:p})},s.onFragLoaded=function(f,u){var i=u.frag,r=u.part;if(i.type===t.PlaylistLevelType.MAIN&&Object(N.isFiniteNumber)(i.sn)){var E=r?r.stats:i.stats,y=r?r.duration:i.duration;if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[i.level],R=(p.loaded?p.loaded.bytes:0)+E.loaded,O=(p.loaded?p.loaded.duration:0)+y;p.loaded={bytes:R,duration:O},p.realBitrate=Math.round(8*R/O)}if(i.bitrateTest){var _={stats:E,frag:i,part:r,id:i.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,_),i.bitrateTest=!1}}},s.onFragBuffered=function(f,u){var i=u.frag,r=u.part,E=r?r.stats:i.stats;if(E.aborted)return;if(i.type!==t.PlaylistLevelType.MAIN||i.sn==="initSegment")return;var y=E.parsing.end-E.loading.start;this.bwEstimator.sample(y,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},s.onError=function(f,u){switch(u.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var f=this.fragCurrent,u=this.partCurrent,i=this.hls,r=i.maxAutoLevel,E=i.config,y=i.minAutoLevel,p=i.media,R=u?u.duration:f?f.duration:0,O=p?p.currentTime:0,_=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,S=(w.BufferHelper.bufferInfo(p,O,E.maxBufferHole).end-O)/_,C=this.findBestLevel(x,y,r,S,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(C>=0)return C;d.logger.trace((S?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var j=R?Math.min(R,E.maxStarvationDelay):E.maxStarvationDelay,F=E.abrBandWidthFactor,M=E.abrBandWidthUpFactor;if(!S){var Y=this.bitrateTestDelay;if(Y){var K=R?Math.min(R,E.maxLoadingDelay):E.maxLoadingDelay;j=K-Y,d.logger.trace("bitrate test took "+Math.round(1e3*Y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*j)+" ms"),F=M=1}}return C=this.findBestLevel(x,y,r,S+j,F,M),Math.max(C,0)},s.findBestLevel=function(f,u,i,r,E,y){for(var p,R=this.fragCurrent,O=this.partCurrent,_=this.lastLoadedFragLevel,x=this.hls.levels,S=x[_],C=!!(S!=null&&(p=S.details)!==null&&p!==void 0&&p.live),j=S==null?void 0:S.codecSet,F=O?O.duration:R?R.duration:0,M=i;M>=u;M--){var Y=x[M];if(!Y||j&&Y.codecSet!==j)continue;var K=Y.details,A=(O?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||F,W=void 0;M<=_?W=E*f:W=y*f;var U=x[M].maxBitrate,D=U*A/W;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+M+"/"+Math.round(W)+"/"+U+"/"+A+"/"+r+"/"+D),W>U&&(!D||C&&!this.bitrateTestDelay||D<r))return M}return-1},c(n,[{key:"nextAutoLevel",get:function(){var f=this._nextAutoLevel,u=this.bwEstimator;if(f!==-1&&(!u||!u.canEstimate()))return f;var i=this.getNextABRAutoLevel();return f!==-1&&(i=Math.min(f,i)),i},set:function(f){this._nextAutoLevel=f}}]),n}();g.default=o},"./src/controller/audio-stream-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/polyfills/number.ts"),v=T("./src/controller/base-stream-controller.ts"),m=T("./src/events.ts"),w=T("./src/utils/buffer-helper.ts"),b=T("./src/controller/fragment-tracker.ts"),t=T("./src/types/level.ts"),d=T("./src/types/loader.ts"),a=T("./src/loader/fragment.ts"),c=T("./src/demux/chunk-cache.ts"),o=T("./src/demux/transmuxer-interface.ts"),n=T("./src/types/transmuxer.ts"),s=T("./src/controller/fragment-finders.ts"),h=T("./src/utils/discontinuities.ts"),f=T("./src/errors.ts"),u=T("./src/utils/logger.ts");function i(){return i=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var _=arguments[O];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(R[x]=_[x])}return R},i.apply(this,arguments)}function r(R,O){R.prototype=Object.create(O.prototype),R.prototype.constructor=R,E(R,O)}function E(R,O){return E=Object.setPrototypeOf||function(x,S){return x.__proto__=S,x},E(R,O)}var y=100,p=function(R){r(O,R);function O(x,S){var C;return C=R.call(this,x,S,"[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 _=O.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var S=this.hls;S.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),S.on(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),S.on(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),S.on(m.Events.ERROR,this.onError,this),S.on(m.Events.BUFFER_RESET,this.onBufferReset,this),S.on(m.Events.BUFFER_CREATED,this.onBufferCreated,this),S.on(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),S.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),S.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var S=this.hls;S.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),S.off(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),S.off(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),S.off(m.Events.ERROR,this.onError,this),S.off(m.Events.BUFFER_RESET,this.onBufferReset,this),S.off(m.Events.BUFFER_CREATED,this.onBufferCreated,this),S.off(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),S.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),S.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onInitPtsFound=function(S,C){var j=C.frag,F=C.id,M=C.initPTS;if(F==="main"){var Y=j.cc;this.initPTS[j.cc]=M,this.log("InitPTS for cc: "+Y+" found from main: "+M),this.videoTrackCC=Y,this.state===v.State.WAITING_INIT_PTS&&this.tick()}},_.startLoad=function(S){if(!this.levels){this.startPosition=S,this.state=v.State.STOPPED;return}var C=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,C>0&&S===-1?(this.log("Override startPosition with lastCurrentTime @"+C.toFixed(3)),this.state=v.State.IDLE):(this.loadedmetadata=!1,this.state=v.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=S,this.tick()},_.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_TRACK:{var S,C=this.levels,j=this.trackId,F=C==null||((S=C[j])===null||S===void 0)?void 0:S.details;if(F){if(this.waitForCdnTuneIn(F))break;this.state=v.State.WAITING_INIT_PTS}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var M,Y=performance.now(),K=this.retryDate;(!K||Y>=K||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=v.State.IDLE);break}case v.State.WAITING_INIT_PTS:{var A=this.waitingData;if(A){var W=A.frag,U=A.part,D=A.cache,X=A.complete;if(this.initPTS[W.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.FRAG_LOADING;var ie=D.flush(),oe={frag:W,part:U,payload:ie,networkDetails:null};this._handleFragmentLoadProgress(oe),X&&R.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)u.logger.log("Waiting fragment cc ("+W.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Ce=w.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Ae=Object(s.fragmentWithinToleranceTest)(Ce.end,this.config.maxFragLookUpTolerance,W);Ae<0&&(u.logger.log("Waiting fragment cc ("+W.cc+") @ "+W.start+" cancelled because another fragment at "+Ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=v.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var S=this.waitingData;S&&(this.fragmentTracker.removeFragment(S.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.IDLE)},_.onTickEnd=function(){var S=this.media;if(!S||!S.readyState)return;var C=this.mediaBuffer?this.mediaBuffer:S,j=C.buffered;!this.loadedmetadata&&j.length&&(this.loadedmetadata=!0),this.lastCurrentTime=S.currentTime},_.doTickIdle=function(){var S,C,j=this.hls,F=this.levels,M=this.media,Y=this.trackId,K=j.config;if(!F||!F[Y])return;if(!M&&(this.startFragRequested||!K.startFragPrefetch))return;var A=F[Y],W=A.details;if(!W||W.live&&this.levelLastLoaded!==Y||this.waitForCdnTuneIn(W)){this.state=v.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,a.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(U===null)return;var D=U.len,X=this.getMaxBufferLength(),ie=this.audioSwitch;if(D>=X&&!ie)return;if(!ie&&this._streamEnded(U,W)){j.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=v.State.ENDED;return}var oe=W.fragments,de=oe[0].start,Ce=U.end;if(ie){var Ae=this.getLoadPosition();Ce=Ae,W.PTSKnown&&Ae<de&&((U.end>de||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=de+.05))}var me=this.getNextFragment(Ce,W);if(!me){this.bufferFlushed=!0;return}((S=me.decryptdata)===null||S===void 0?void 0:S.keyFormat)==="identity"&&!((C=me.decryptdata)!==null&&C!==void 0&&C.key)?this.loadKey(me,W):this.loadFragment(me,W,Ce)},_.getMaxBufferLength=function(){var S=R.prototype.getMaxBufferLength.call(this),C=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return C===null?S:Math.max(S,C.len)},_.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(S,C){var j=C.audioTracks;this.resetTransmuxer(),this.levels=j.map(function(F){return new t.Level(F)})},_.onAudioTrackSwitching=function(S,C){var j=!!C.url;this.trackId=C.id;var F=this.fragCurrent;F!=null&&F.loader&&F.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),j?this.setInterval(y):this.resetTransmuxer(),j?(this.audioSwitch=!0,this.state=v.State.IDLE):this.state=v.State.STOPPED,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},_.onLevelLoaded=function(S,C){this.mainDetails=C.details},_.onAudioTrackLoaded=function(S,C){var j,F=this.levels,M=C.details,Y=C.id;if(!F){this.warn("Audio tracks were reset while loading level "+Y);return}this.log("Track "+Y+" loaded ["+M.startSN+","+M.endSN+"],duration:"+M.totalduration);var K=F[Y],A=0;if(M.live||(j=K.details)!==null&&j!==void 0&&j.live){var W=this.mainDetails;if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed||!W)return;!K.details&&M.hasProgramDateTime&&W.hasProgramDateTime?(Object(h.alignMediaPlaylistByPDT)(M,W),A=M.fragments[0].start):A=this.alignPlaylists(M,K.details)}K.details=M,this.levelLastLoaded=Y,!this.startFragRequested&&(this.mainDetails||!M.live)&&this.setStartPosition(K.details,A),this.state===v.State.WAITING_TRACK&&!this.waitForCdnTuneIn(M)&&(this.state=v.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(S){var C,j=S.frag,F=S.part,M=S.payload,Y=this.config,K=this.trackId,A=this.levels;if(!A){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+j.sn+" of level "+j.level+" will not be buffered");return}var W=A[K];console.assert(W,"Audio track is defined on fragment load progress");var U=W.details;console.assert(U,"Audio track details are defined on fragment load progress");var D=Y.defaultAudioCodec||W.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new o.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ie=this.initPTS[j.cc],oe=(C=j.initSegment)===null||C===void 0?void 0:C.data;if(ie!==void 0){var de=!1,Ce=F?F.index:-1,Ae=Ce!==-1,me=new n.ChunkMetadata(j.level,j.sn,j.stats.chunkCount,M.byteLength,Ce,Ae);X.push(M,oe,D,"",j,F,U.totalduration,de,me,ie)}else{u.logger.log("Unknown video PTS for cc "+j.cc+", waiting for video PTS before demuxing audio frag "+j.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+K);var Se=this.waitingData=this.waitingData||{frag:j,part:F,cache:new c.default,complete:!1},ye=Se.cache;ye.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=v.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(S){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,S)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(S,C){var j=C.tracks.audio;j&&(this.mediaBuffer=j.buffer),C.tracks.video&&(this.videoBuffer=C.tracks.video.buffer)},_.onFragBuffered=function(S,C){var j=C.frag,F=C.part;if(j.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(j)){this.warn("Fragment "+j.sn+(F?" p: "+F.index:"")+" of level "+j.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}j.sn!=="initSegment"&&(this.fragPrevious=j,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(j,F)},_.onError=function(S,C){switch(C.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,C);break;case f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==v.State.ERROR&&this.state!==v.State.STOPPED&&(this.state=C.fatal?v.State.ERROR:v.State.IDLE,this.warn(C.details+" while loading frag, switching to "+this.state+" state"));break;case f.ErrorDetails.BUFFER_FULL_ERROR:if(C.parent==="audio"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var j=!0,F=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);F&&F.len>.5&&(j=!this.reduceMaxBufferLength(F.len)),j&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},_.onBufferFlushed=function(S,C){var j=C.type;j===a.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(S){var C,j="audio",F=this.hls,M=S.remuxResult,Y=S.chunkMeta,K=this.getCurrentContext(Y);if(!K){this.warn("The loading context changed while buffering fragment "+Y.sn+" of level "+Y.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(Y.level);return}var A=K.frag,W=K.part,U=M.audio,D=M.text,X=M.id3,ie=M.initSegment;if(this.fragContextChanged(A))return;if(this.state=v.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ie!=null&&ie.tracks&&(this._bufferInitSegment(ie.tracks,A,Y),F.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:j,tracks:ie.tracks})),U){var oe=U.startPTS,de=U.endPTS,Ce=U.startDTS,Ae=U.endDTS;W&&(W.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:de,startDTS:Ce,endDTS:Ae}),A.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,oe,de,Ce,Ae),this.bufferFragmentData(U,A,W,Y)}if(X!=null&&(C=X.samples)!==null&&C!==void 0&&C.length){var me=i({frag:A,id:j},X);F.trigger(m.Events.FRAG_PARSING_METADATA,me)}if(D){var Se=i({frag:A,id:j},D);F.trigger(m.Events.FRAG_PARSING_USERDATA,Se)}},_._bufferInitSegment=function(S,C,j){if(this.state!==v.State.PARSING)return;S.video&&delete S.video;var F=S.audio;if(!F)return;F.levelCodec=F.codec,F.id="audio",this.log("Init audio buffer, container:"+F.container+", codecs[parsed]=["+F.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,S);var M=F.initSegment;if(M!=null&&M.byteLength){var Y={type:"audio",frag:C,part:null,chunkMeta:j,parent:C.type,data:M};this.hls.trigger(m.Events.BUFFER_APPENDING,Y)}this.tick()},_.loadFragment=function(S,C,j){var F=this.fragmentTracker.getState(S);this.fragCurrent=S,(this.audioSwitch||F===b.FragmentState.NOT_LOADED||F===b.FragmentState.PARTIAL)&&(S.sn==="initSegment"?this._loadInitSegment(S):C.live&&!Object(N.isFiniteNumber)(this.initPTS[S.cc])?(this.log("Waiting for video PTS in continuity counter "+S.cc+" of live stream before loading audio fragment "+S.sn+" of level "+this.trackId),this.state=v.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,S,C,j)))},_.completeAudioSwitch=function(){var S=this.hls,C=this.media,j=this.trackId;C&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,S.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:j})},O}(v.default);g.default=p},"./src/controller/audio-track-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/events.ts"),v=T("./src/errors.ts"),m=T("./src/controller/base-playlist-controller.ts"),w=T("./src/types/loader.ts");function b(o,n){for(var s=0;s<n.length;s++){var h=n[s];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function t(o,n,s){return n&&b(o.prototype,n),s&&b(o,s),o}function d(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,a(o,n)}function a(o,n){return a=Object.setPrototypeOf||function(h,f){return h.__proto__=f,h},a(o,n)}var c=function(o){d(n,o);function n(h){var f;return f=o.call(this,h,"[audio-track-controller]")||this,f.tracks=[],f.groupId=null,f.tracksInGroup=[],f.trackId=-1,f.trackName="",f.selectDefaultTrack=!0,f.registerListeners(),f}var s=n.prototype;return s.registerListeners=function(){var f=this.hls;f.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),f.on(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.on(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.on(N.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),f.off(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.off(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.off(N.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,o.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(f,u){this.tracks=u.audioTracks||[]},s.onAudioTrackLoaded=function(f,u){var i=u.id,r=u.details,E=this.tracksInGroup[i];if(!E){this.warn("Invalid audio track id "+i);return}var y=E.details;E.details=u.details,this.log("audioTrack "+i+" loaded ["+r.startSN+"-"+r.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,u,y))},s.onLevelLoading=function(f,u){this.switchLevel(u.level)},s.onLevelSwitching=function(f,u){this.switchLevel(u.level)},s.switchLevel=function(f){var u=this.hls.levels[f];if(!(u!=null&&u.audioGroupIds))return;var i=u.audioGroupIds[u.urlId];if(this.groupId!==i){this.groupId=i;var r=this.tracks.filter(function(y){return!i||y.groupId===i});this.selectDefaultTrack&&!r.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var E={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(N.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},s.onError=function(f,u){if(o.prototype.onError.call(this,f,u),u.fatal||!u.context)return;u.context.type===w.PlaylistContextType.AUDIO_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},s.setAudioTrack=function(f){var u=this.tracksInGroup;if(f<0||f>=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var i=u[this.trackId];this.log("Now switching to audio-track index "+f);var r=u[f],E=r.id,y=r.groupId,p=y===void 0?"":y,R=r.name,O=r.type,_=r.url;if(this.trackId=f,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(N.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:p,name:R,type:O,url:_}),r.details&&!r.details.live)return;var x=this.switchParams(r.url,i==null?void 0:i.details);this.loadPlaylist(x)},s.selectInitialTrack=function(){var f=this.tracksInGroup;console.assert(f.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,i=this.findTrackId(u)||this.findTrackId();i!==-1?this.setAudioTrack(i):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(f){for(var u=this.tracksInGroup,i=0;i<u.length;i++){var r=u[i];if((!this.selectDefaultTrack||r.default)&&(!f||f===r.name))return r.id}return-1},s.loadPlaylist=function(f){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var i=u.id,r=u.groupId,E=u.url;if(f)try{E=f.addDirectives(E)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+i),this.clearTimer(),this.hls.trigger(N.Events.AUDIO_TRACK_LOADING,{url:E,id:i,groupId:r,deliveryDirectives:f||null})}},t(n,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(f){this.selectDefaultTrack=!1,this.setAudioTrack(f)}}]),n}(m.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return t});var N=T("./src/polyfills/number.ts"),v=T("./src/types/level.ts"),m=T("./src/controller/level-helper.ts"),w=T("./src/utils/logger.ts"),b=T("./src/errors.ts"),t=function(){function d(c,o){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,o+":"),this.warn=w.logger.warn.bind(w.logger,o+":"),this.hls=c}var a=d.prototype;return a.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},a.onError=function(o,n){n.fatal&&n.type===b.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},a.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},a.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},a.stopLoad=function(){this.canLoad=!1,this.clearTimer()},a.switchParams=function(o,n){var s=n==null?void 0:n.renditionReports;if(s)for(var h=0;h<s.length;h++){var f=s[h],u=""+f.URI;if(u===o.substr(-u.length)){var i=parseInt(f["LAST-MSN"]),r=parseInt(f["LAST-PART"]);if(n&&this.hls.config.lowLatencyMode){var E=Math.min(n.age-n.partTarget,n.targetduration);r!==void 0&&E>n.partTarget&&(r+=1)}if(Object(N.isFiniteNumber)(i))return new v.HlsUrlParameters(i,Object(N.isFiniteNumber)(r)?r:void 0,v.HlsSkip.No)}}},a.loadPlaylist=function(o){},a.shouldLoadTrack=function(o){return this.canLoad&&o&&!!o.url&&(!o.details||o.details.live)},a.playlistLoaded=function(o,n,s){var h=this,f=n.details,u=n.stats,i=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(f.advancedDateTime=Date.now()-i,f.live||s!=null&&s.live){if(f.reloaded(s),s&&this.log("live playlist "+o+" "+(f.advanced?"REFRESHED "+f.lastPartSn+"-"+f.lastPartIndex:"MISSED")),s&&f.fragments.length>0&&Object(m.mergeDetails)(s,f),!this.canLoad||!f.live)return;var r,E=void 0,y=void 0;if(f.canBlockReload&&f.endSN&&f.advanced){var p=this.hls.config.lowLatencyMode,R=f.lastPartSn,O=f.endSN,_=f.lastPartIndex,x=_!==-1,S=R===O,C=p?0:_;x?(E=S?O+1:R,y=S?C:_+1):E=O+1;var j=f.age,F=j+f.ageHeader,M=Math.min(F-f.partTarget,f.targetduration*1.5);if(M>0){if(s&&M>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+M+" with playlist age: "+f.age),M=0;else{var Y=Math.floor(M/f.targetduration);if(E+=Y,y!==void 0){var K=Math.round(M%f.targetduration/f.partTarget);y+=K}this.log("CDN Tune-in age: "+f.ageHeader+"s last advanced "+j.toFixed(2)+"s goal: "+M+" skip sn "+Y+" to part "+y)}f.tuneInGoal=M}if(r=this.getDeliveryDirectives(f,n.deliveryDirectives,E,y),p||!S){this.loadPlaylist(r);return}}else r=this.getDeliveryDirectives(f,n.deliveryDirectives,E,y);var A=Object(m.computeReloadInterval)(f,u);E!==void 0&&f.canBlockReload&&(A-=f.partTarget||1),this.log("reload live playlist "+o+" in "+Math.round(A)+" ms"),this.timer=self.setTimeout(function(){return h.loadPlaylist(r)},A)}else this.clearTimer()},a.getDeliveryDirectives=function(o,n,s,h){var f=Object(v.getSkipValue)(o,s);return n!=null&&n.skip&&o.deltaUpdateFailed&&(s=n.msn,h=n.part,f=v.HlsSkip.No),new v.HlsUrlParameters(s,h,f)},a.retryLoadingOrFail=function(o){var n=this,s=this.hls.config,h=this.retryCount<s.levelLoadingMaxRetry;if(h){var f;if(this.retryCount++,o.details.indexOf("LoadTimeOut")>-1&&(f=o.context)!==null&&f!==void 0&&f.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+o.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return n.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+o.details+'"')}}else this.warn('cannot recover from error "'+o.details+'"'),this.clearTimer(),o.fatal=!0;return h},d}()},"./src/controller/base-stream-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"State",function(){return O}),T.d(g,"default",function(){return _});var N=T("./src/polyfills/number.ts"),v=T("./src/task-loop.ts"),m=T("./src/controller/fragment-tracker.ts"),w=T("./src/utils/buffer-helper.ts"),b=T("./src/utils/logger.ts"),t=T("./src/events.ts"),d=T("./src/errors.ts"),a=T("./src/types/transmuxer.ts"),c=T("./src/utils/mp4-tools.ts"),o=T("./src/utils/discontinuities.ts"),n=T("./src/controller/fragment-finders.ts"),s=T("./src/controller/level-helper.ts"),h=T("./src/loader/fragment-loader.ts"),f=T("./src/crypt/decrypter.ts"),u=T("./src/utils/time-ranges.ts"),i=T("./src/types/loader.ts");function r(x,S){for(var C=0;C<S.length;C++){var j=S[C];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}function E(x,S,C){return S&&r(x.prototype,S),C&&r(x,C),x}function y(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function p(x,S){x.prototype=Object.create(S.prototype),x.prototype.constructor=x,R(x,S)}function R(x,S){return R=Object.setPrototypeOf||function(j,F){return j.__proto__=F,j},R(x,S)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},_=function(x){p(S,x);function S(j,F,M){var Y;return Y=x.call(this)||this,Y.hls=void 0,Y.fragPrevious=null,Y.fragCurrent=null,Y.fragmentTracker=void 0,Y.transmuxer=null,Y._state=O.STOPPED,Y.media=void 0,Y.mediaBuffer=void 0,Y.config=void 0,Y.bitrateTest=!1,Y.lastCurrentTime=0,Y.nextLoadPosition=0,Y.startPosition=0,Y.loadedmetadata=!1,Y.fragLoadError=0,Y.retryDate=0,Y.levels=null,Y.fragmentLoader=void 0,Y.levelLastLoaded=null,Y.startFragRequested=!1,Y.decrypter=void 0,Y.initPTS=[],Y.onvseeking=null,Y.onvended=null,Y.logPrefix="",Y.log=void 0,Y.warn=void 0,Y.logPrefix=M,Y.log=b.logger.log.bind(b.logger,M+":"),Y.warn=b.logger.warn.bind(b.logger,M+":"),Y.hls=j,Y.fragmentLoader=new h.default(j.config),Y.fragmentTracker=F,Y.config=j.config,Y.decrypter=new f.default(j,j.config),j.on(t.Events.KEY_LOADED,Y.onKeyLoaded,y(Y)),Y}var C=S.prototype;return C.doTick=function(){this.onTickEnd()},C.onTickEnd=function(){},C.startLoad=function(F){},C.stopLoad=function(){this.fragmentLoader.abort();var F=this.fragCurrent;F&&this.fragmentTracker.removeFragment(F),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},C._streamEnded=function(F,M){var Y=this.fragCurrent,K=this.fragmentTracker;if(!M.live&&Y&&Y.sn===M.endSN&&!F.nextStart){var A=K.getState(Y);return A===m.FragmentState.PARTIAL||A===m.FragmentState.OK}return!1},C.onMediaAttached=function(F,M){var Y=this.media=this.mediaBuffer=M.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),Y.addEventListener("seeking",this.onvseeking),Y.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(K.startPosition)},C.onMediaDetaching=function(){var F=this.media;F!=null&&F.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),F&&(F.removeEventListener("seeking",this.onvseeking),F.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 F=this.config,M=this.fragCurrent,Y=this.media,K=this.mediaBuffer,A=this.state,W=Y?Y.currentTime:0,U=w.BufferHelper.bufferInfo(K||Y,W,F.maxBufferHole);if(this.log("media seeking to "+(Object(N.isFiniteNumber)(W)?W.toFixed(3):W)+", state: "+A),A===O.ENDED)this.resetLoadingState();else if(M&&!U.len){var D=F.maxFragLookUpTolerance,X=M.start-D,ie=M.start+M.duration+D,oe=W>ie;(W<X||oe)&&(oe&&M.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),M.loader.abort()),this.resetLoadingState())}Y&&(this.lastCurrentTime=W),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=W),this.tickImmediate()},C.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},C.onKeyLoaded=function(F,M){if(this.state!==O.KEY_LOADING||M.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var Y=this.levels[M.frag.level].details;Y&&this.loadFragment(M.frag,Y,M.frag.start)},C.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},C.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(t.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,x.prototype.onHandlerDestroyed.call(this)},C.loadKey=function(F,M){this.log("Loading key for "+F.sn+" of ["+M.startSN+"-"+M.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+F.level),this.state=O.KEY_LOADING,this.fragCurrent=F,this.hls.trigger(t.Events.KEY_LOADING,{frag:F})},C.loadFragment=function(F,M,Y){this._loadFragForPlayback(F,M,Y)},C._loadFragForPlayback=function(F,M,Y){var K=this,A=function(U){if(K.fragContextChanged(F)){K.warn("Fragment "+F.sn+(U.part?" p: "+U.part.index:"")+" of level "+F.level+" was dropped during download."),K.fragmentTracker.removeFragment(F);return}F.stats.chunkCount++,K._handleFragmentLoadProgress(U)};this._doFragLoad(F,M,Y,A).then(function(W){if(!W)return;K.fragLoadError=0;var U=K.state;if(K.fragContextChanged(F)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!K.fragCurrent&&U===O.PARSING)&&(K.fragmentTracker.removeFragment(F),K.state=O.IDLE);return}if("payload"in W&&(K.log("Loaded fragment "+F.sn+" of level "+F.level),K.hls.trigger(t.Events.FRAG_LOADED,W),K.state===O.BACKTRACKING)){K.fragmentTracker.backtrack(F,W),K.resetFragmentLoading(F);return}K._handleFragmentLoadComplete(W)}).catch(function(W){K.warn(W),K.resetFragmentLoading(F)})},C.flushMainBuffer=function(F,M,Y){if(Y===void 0&&(Y=null),!(F-M))return;var K={startOffset:F,endOffset:M,type:Y};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,K)},C._loadInitSegment=function(F){var M=this;this._doFragLoad(F).then(function(Y){if(!Y||M.fragContextChanged(F)||!M.levels)throw new Error("init load aborted");return Y}).then(function(Y){var K=M.hls,A=Y.payload,W=F.decryptdata;if(A&&A.byteLength>0&&W&&W.key&&W.iv&&W.method==="AES-128"){var U=self.performance.now();return M.decrypter.webCryptoDecrypt(new Uint8Array(A),W.key.buffer,W.iv.buffer).then(function(D){var X=self.performance.now();return K.trigger(t.Events.FRAG_DECRYPTED,{frag:F,payload:D,stats:{tstart:U,tdecrypt:X}}),Y.payload=D,Y})}return Y}).then(function(Y){var K=M.fragCurrent,A=M.hls,W=M.levels;if(!W)throw new Error("init load aborted, missing levels");var U=W[F.level].details;console.assert(U,"Level details are defined when init segment is loaded");var D=F.stats;M.state=O.IDLE,M.fragLoadError=0,F.data=new Uint8Array(Y.payload),D.parsing.start=D.buffering.start=self.performance.now(),D.parsing.end=D.buffering.end=self.performance.now(),Y.frag===K&&A.trigger(t.Events.FRAG_BUFFERED,{stats:D,frag:K,part:null,id:F.type}),M.tick()}).catch(function(Y){M.warn(Y),M.resetFragmentLoading(F)})},C.fragContextChanged=function(F){var M=this.fragCurrent;return!F||!M||F.level!==M.level||F.sn!==M.sn||F.urlId!==M.urlId},C.fragBufferedComplete=function(F,M){var Y=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+F.type+" sn: "+F.sn+(M?" part: "+M.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+F.level+" "+u.default.toString(w.BufferHelper.getBuffered(Y))),this.state=O.IDLE,this.tick()},C._handleFragmentLoadComplete=function(F){var M=this.transmuxer;if(!M)return;var Y=F.frag,K=F.part,A=F.partsLoaded,W=!A||A.length===0||A.some(function(D){return!D}),U=new a.ChunkMetadata(Y.level,Y.sn,Y.stats.chunkCount+1,0,K?K.index:-1,!W);M.flush(U)},C._handleFragmentLoadProgress=function(F){},C._doFragLoad=function(F,M,Y,K){var A=this;if(Y===void 0&&(Y=null),!this.levels)throw new Error("frag load aborted, missing levels");if(Y=Math.max(F.start,Y||0),this.config.lowLatencyMode&&M){var W=M.partList;if(W&&K){Y>F.end&&M.fragmentHint&&(F=M.fragmentHint);var U=this.getNextPart(W,F,Y);if(U>-1){var D=W[U];return this.log("Loading part sn: "+F.sn+" p: "+D.index+" cc: "+F.cc+" of playlist ["+M.startSN+"-"+M.endSN+"] parts [0-"+U+"-"+(W.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+F.level+", target: "+parseFloat(Y.toFixed(3))),this.nextLoadPosition=D.start+D.duration,this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:F,part:W[U],targetBufferTime:Y}),this.doFragPartsLoad(F,W,U,K).catch(function(X){return A.handleFragLoadError(X)})}else if(!F.url||this.loadedEndOfParts(W,Y))return Promise.resolve(null)}}return this.log("Loading fragment "+F.sn+" cc: "+F.cc+" "+(M?"of ["+M.startSN+"-"+M.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+F.level+", target: "+parseFloat(Y.toFixed(3))),Object(N.isFiniteNumber)(F.sn)&&!this.bitrateTest&&(this.nextLoadPosition=F.start+F.duration),this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:F,targetBufferTime:Y}),this.fragmentLoader.load(F,K).catch(function(X){return A.handleFragLoadError(X)})},C.doFragPartsLoad=function(F,M,Y,K){var A=this;return new Promise(function(W,U){var D=[],X=function ie(oe){var de=M[oe];A.fragmentLoader.loadPart(F,de,K).then(function(Ce){D[de.index]=Ce;var Ae=Ce.part;A.hls.trigger(t.Events.FRAG_LOADED,Ce);var me=M[oe+1];if(me&&me.fragment===F)ie(oe+1);else return W({frag:F,part:Ae,partsLoaded:D})}).catch(U)};X(Y)})},C.handleFragLoadError=function(F){var M=F.data;return M&&M.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(M.frag,M.part):this.hls.trigger(t.Events.ERROR,M),null},C._handleTransmuxerFlush=function(F){var M=this.getCurrentContext(F);if(!M||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var Y=M.frag,K=M.part,A=M.level,W=self.performance.now();Y.stats.parsing.end=W,K&&(K.stats.parsing.end=W),this.updateLevelTiming(Y,K,A,F.partial)},C.getCurrentContext=function(F){var M=this.levels,Y=F.level,K=F.sn,A=F.part;if(!M||!M[Y])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+Y+". The current chunk will not be buffered."),null;var W=M[Y],U=A>-1?Object(s.getPartWith)(W,K,A):null,D=U?U.fragment:Object(s.getFragmentWithSN)(W,K,this.fragCurrent);return D?{frag:D,part:U,level:W}:null},C.bufferFragmentData=function(F,M,Y,K){if(!F||this.state!==O.PARSING)return;var A=F.data1,W=F.data2,U=A;if(A&&W&&(U=Object(c.appendUint8Array)(A,W)),!U||!U.length)return;var D={type:F.type,frag:M,part:Y,chunkMeta:K,parent:M.type,data:U};this.hls.trigger(t.Events.BUFFER_APPENDING,D),F.dropped&&F.independent&&!Y&&this.flushBufferGap(M)},C.flushBufferGap=function(F){var M=this.media;if(!M)return;if(!w.BufferHelper.isBuffered(M,M.currentTime)){this.flushMainBuffer(0,F.start);return}var Y=M.currentTime,K=w.BufferHelper.bufferInfo(M,Y,0),A=F.duration,W=Math.min(this.config.maxFragLookUpTolerance*2,A*.25),U=Math.max(Math.min(F.start-W,K.end-W),Y+W);F.start-U>W&&this.flushMainBuffer(U,F.start)},C.getFwdBufferInfo=function(F,M){var Y=this.config,K=this.getLoadPosition();if(!Object(N.isFiniteNumber)(K))return null;var A=w.BufferHelper.bufferInfo(F,K,Y.maxBufferHole);if(A.len===0&&A.nextStart!==void 0){var W=this.fragmentTracker.getBufferedFrag(K,M);if(W&&A.nextStart<W.end)return w.BufferHelper.bufferInfo(F,K,Math.max(A.nextStart,Y.maxBufferHole))}return A},C.getMaxBufferLength=function(F){var M=this.config,Y;return F?Y=Math.max(8*M.maxBufferSize/F,M.maxBufferLength):Y=M.maxBufferLength,Math.min(Y,M.maxMaxBufferLength)},C.reduceMaxBufferLength=function(F){var M=this.config,Y=F||M.maxBufferLength;return M.maxMaxBufferLength>=Y?(M.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+M.maxMaxBufferLength+"s"),!0):!1},C.getNextFragment=function(F,M){var Y,K,A=M.fragments,W=A.length;if(!W)return null;var U=this.config,D=A[0].start,X;if(M.live){var ie=U.initialLiveManifestSize;if(W<ie)return this.warn("Not enough fragments to start playback (have: "+W+", need: "+ie+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(M,A),this.startPosition=X?this.hls.liveSyncPosition||X.start:F)}else F<=D&&(X=A[0]);if(!X){var oe=U.lowLatencyMode?M.partEnd:M.fragmentEnd;X=this.getFragmentAtPosition(F,oe,M)}return(Y=X)!==null&&Y!==void 0&&Y.initSegment&&!((K=X)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},C.getNextPart=function(F,M,Y){for(var K=-1,A=!1,W=!0,U=0,D=F.length;U<D;U++){var X=F[U];if(W=W&&!X.independent,K>-1&&Y<X.start)break;var ie=X.loaded;!ie&&(A||X.independent||W)&&X.fragment===M&&(K=U),A=ie}return K},C.loadedEndOfParts=function(F,M){var Y=F[F.length-1];return Y&&M>Y.start&&Y.loaded},C.getInitialLiveFragment=function(F,M){var Y=this.fragPrevious,K=null;if(Y){if(F.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+Y.programDateTime),K=Object(n.findFragmentByPDT)(M,Y.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var A=Y.sn+1;if(A>=F.startSN&&A<=F.endSN){var W=M[A-F.startSN];Y.cc===W.cc&&(K=W,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(n.findFragWithCC)(M,Y.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(K=this.getFragmentAtPosition(U,this.bitrateTest?F.fragmentEnd:F.edge,F))}return K},C.getFragmentAtPosition=function(F,M,Y){var K=this.config,A=this.fragPrevious,W=Y.fragments,U=Y.endSN,D=Y.fragmentHint,X=K.maxFragLookUpTolerance,ie=!!(K.lowLatencyMode&&Y.partList&&D);ie&&D&&!this.bitrateTest&&(W=W.concat(D),U=D.sn);var oe;if(F<M){var de=F>M-X?0:X;oe=Object(n.findFragmentByPTS)(A,W,F,de)}else oe=W[W.length-1];if(oe){var Ce=oe.sn-Y.startSN,Ae=A&&oe.level===A.level,me=W[Ce+1],Se=this.fragmentTracker.getState(oe);if(Se===m.FragmentState.BACKTRACKED){oe=null;for(var ye=Ce;W[ye]&&this.fragmentTracker.getState(W[ye])===m.FragmentState.BACKTRACKED;)A?oe=W[ye--]:oe=W[--ye];oe||(oe=me)}else A&&oe.sn===A.sn&&!ie&&(Ae&&(oe.sn<U&&this.fragmentTracker.getState(me)!==m.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+me.sn),oe=me):oe=null))}return oe},C.synchronizeToLiveEdge=function(F){var M=this.config,Y=this.media;if(!Y)return;var K=this.hls.liveSyncPosition,A=Y.currentTime,W=F.fragments[0].start,U=F.edge,D=A>=W-M.maxFragLookUpTolerance&&A<=U;if(K!==null&&Y.duration>K&&(A<K||!D)){var X=M.liveMaxLatencyDuration!==void 0?M.liveMaxLatencyDuration:M.liveMaxLatencyDurationCount*F.targetduration;(!D&&Y.readyState<4||A<U-X)&&(this.loadedmetadata||(this.nextLoadPosition=K),Y.readyState&&(this.warn("Playback: "+A.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+K.toFixed(3)),Y.currentTime=K))}},C.alignPlaylists=function(F,M){var Y=this.levels,K=this.levelLastLoaded,A=this.fragPrevious,W=K!==null?Y[K]:null,U=F.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var D=F.fragments[0].start,X=!M,ie=F.alignedSliding&&Object(N.isFiniteNumber)(D);if(X||!ie&&!D){Object(o.alignStream)(A,W,F);var oe=F.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(M?M.startSN:"na")+"->"+F.startSN+" prev-sn: "+(A?A.sn:"na")+" fragments: "+U),oe}return D},C.waitForCdnTuneIn=function(F){var M=3;return F.live&&F.canBlockReload&&F.tuneInGoal>Math.max(F.partHoldBack,F.partTarget*M)},C.setStartPosition=function(F,M){var Y=this.startPosition;if(Y<M&&(Y=-1),Y===-1||this.lastCurrentTime===-1){var K=F.startTimeOffset;Object(N.isFiniteNumber)(K)?(Y=M+K,K<0&&(Y+=F.totalduration),Y=Math.min(Math.max(M,Y),M+F.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+Y),this.startPosition=Y):F.live?Y=this.hls.liveSyncPosition||M:this.startPosition=Y=0,this.lastCurrentTime=Y}this.nextLoadPosition=Y},C.getLoadPosition=function(){var F=this.media,M=0;return this.loadedmetadata&&F?M=F.currentTime:this.nextLoadPosition&&(M=this.nextLoadPosition),M},C.handleFragLoadAborted=function(F,M){this.transmuxer&&F.sn!=="initSegment"&&F.stats.aborted&&(this.warn("Fragment "+F.sn+(M?" part"+M.index:"")+" of level "+F.level+" was aborted"),this.resetFragmentLoading(F))},C.resetFragmentLoading=function(F){(!this.fragCurrent||!this.fragContextChanged(F))&&(this.state=O.IDLE)},C.onFragmentOrKeyLoadError=function(F,M){if(M.fatal)return;var Y=M.frag;if(!Y||Y.type!==F)return;var K=this.fragCurrent;console.assert(K&&Y.sn===K.sn&&Y.level===K.level&&Y.urlId===K.urlId,"Frag load error must match current frag to retry");var A=this.config;if(this.fragLoadError+1<=A.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(Y.level))return;var W=Math.min(Math.pow(2,this.fragLoadError)*A.fragLoadingRetryDelay,A.fragLoadingMaxRetryTimeout);this.warn("Fragment "+Y.sn+" of "+F+" "+Y.level+" failed to load, retrying in "+W+"ms"),this.retryDate=self.performance.now()+W,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else M.levelRetry?(F===i.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(b.logger.error(M.details+" reaches max retry, redispatch as fatal ..."),M.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},C.afterBufferFlushed=function(F,M,Y){if(!F)return;var K=w.BufferHelper.getBuffered(F);this.fragmentTracker.detectEvictedFragments(M,K,Y),this.state===O.ENDED&&this.resetLoadingState()},C.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},C.resetLiveStartWhenNotLoaded=function(F){if(!this.loadedmetadata){this.startFragRequested=!1;var M=this.levels?this.levels[F].details:null;if(M!=null&&M.live)return this.startPosition=-1,this.setStartPosition(M,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},C.updateLevelTiming=function(F,M,Y,K){var A=this,W=Y.details;console.assert(!!W,"level.details must be defined");var U=Object.keys(F.elementaryStreams).reduce(function(D,X){var ie=F.elementaryStreams[X];if(ie){var oe=ie.endPTS-ie.startPTS;if(oe<=0)return A.warn("Could not parse fragment "+F.sn+" "+X+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),A.resetTransmuxer(),D||!1;var de=K?0:Object(s.updateFragPTSDTS)(W,F,ie.startPTS,ie.endPTS,ie.startDTS,ie.endDTS);return A.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:W,level:Y,drift:de,type:X,frag:F,start:ie.startPTS,end:ie.endPTS}),!0}return D},!1);U?(this.state=O.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:F,part:M})):this.resetLoadingState()},C.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(S,[{key:"state",get:function(){return this._state},set:function(F){var M=this._state;M!==F&&(this._state=F,this.log(M+"->"+F))}}]),S}(v.default)},"./src/controller/buffer-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return n});var N=T("./src/polyfills/number.ts"),v=T("./src/events.ts"),m=T("./src/utils/logger.ts"),w=T("./src/errors.ts"),b=T("./src/utils/buffer-helper.ts"),t=T("./src/utils/mediasource-helper.ts"),d=T("./src/loader/fragment.ts"),a=T("./src/controller/buffer-operation-queue.ts"),c=Object(t.getMediaSource)(),o=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function s(f){var u=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var i=u.hls,r=u.media,E=u.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),r&&(u.updateMediaElementDuration(),i.trigger(v.Events.MEDIA_ATTACHED,{media:r})),E&&E.removeEventListener("sourceopen",u._onMediaSourceOpen),u.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=f,this._initSourceBuffer(),this.registerListeners()}var h=s.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null},h.registerListeners=function(){var u=this.hls;u.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(v.Events.BUFFER_RESET,this.onBufferReset,this),u.on(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(v.Events.BUFFER_EOS,this.onBufferEos,this),u.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(v.Events.FRAG_PARSED,this.onFragParsed,this),u.on(v.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(v.Events.BUFFER_RESET,this.onBufferReset,this),u.off(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(v.Events.BUFFER_EOS,this.onBufferEos,this),u.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(v.Events.FRAG_PARSED,this.onFragParsed,this),u.off(v.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new a.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},h.onManifestParsed=function(u,i){var r=2;(i.audio&&!i.video||!i.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(u,i){var r=this.media=i.media;if(r&&c){var E=this.mediaSource=new c;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(E),this._objectUrl=r.src}},h.onMediaDetaching=function(){var u=this.media,i=this.mediaSource,r=this._objectUrl;if(i){if(m.logger.log("[buffer-controller]: media source detaching"),i.readyState==="open")try{i.endOfStream()}catch(E){m.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(r&&self.URL.revokeObjectURL(r),u.src===r?(u.removeAttribute("src"),u.load()):m.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(v.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(i){var r=u.sourceBuffer[i];try{r&&(u.removeBufferListeners(i),u.mediaSource&&u.mediaSource.removeSourceBuffer(r),u.sourceBuffer[i]=void 0)}catch(E){m.logger.warn("[buffer-controller]: Failed to reset the "+i+" buffer",E)}}),this._initSourceBuffer()},h.onBufferCodecs=function(u,i){var r=this,E=this.getSourceBufferTypes().length;if(Object.keys(i).forEach(function(y){if(E){var p=r.tracks[y];if(p&&typeof p.buffer.changeType=="function"){var R=i[y],O=R.codec,_=R.levelCodec,x=R.container,S=(p.levelCodec||p.codec).replace(o,"$1"),C=(_||O).replace(o,"$1");if(S!==C){var j=x+";codecs="+(_||O);r.appendChangeType(y,j)}}}else r.pendingTracks[y]=i[y]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(u,i){var r=this,E=this.operationQueue,y={execute:function(){var R=r.sourceBuffer[u];R&&(m.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+i),R.changeType(i)),E.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(R){m.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",R)}};E.append(y,u)},h.onBufferAppending=function(u,i){var r=this,E=this.hls,y=this.operationQueue,p=this.tracks,R=i.data,O=i.type,_=i.frag,x=i.part,S=i.chunkMeta,C=S.buffering[O],j=self.performance.now();C.start=j;var F=_.stats.buffering,M=x?x.stats.buffering:null;F.start===0&&(F.start=j),M&&M.start===0&&(M.start=j);var Y=p.audio,K=O==="audio"&&S.id===1&&(Y==null?void 0:Y.container)==="audio/mpeg",A={execute:function(){if(C.executeStart=self.performance.now(),K){var U=r.sourceBuffer[O];if(U){var D=_.start-U.timestampOffset;Math.abs(D)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+D+") sn: "+_.sn+")"),U.timestampOffset=_.start)}}r.appendExecutor(R,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();C.executeEnd=C.end=U,F.first===0&&(F.first=U),M&&M.first===0&&(M.first=U);var D=r.sourceBuffer,X={};for(var ie in D)X[ie]=b.BufferHelper.getBuffered(D[ie]);r.appendError=0,r.hls.trigger(v.Events.BUFFER_APPENDED,{type:O,frag:_,part:x,chunkMeta:S,parent:_.type,timeRanges:X})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var D={type:w.ErrorTypes.MEDIA_ERROR,parent:_.type,details:w.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?D.details=w.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,D.details=w.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>E.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),D.fatal=!0)),E.trigger(v.Events.ERROR,D)}};y.append(A,O)},h.onBufferFlushing=function(u,i){var r=this,E=this.operationQueue,y=function(R){return{execute:r.removeExecutor.bind(r,R,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(v.Events.BUFFER_FLUSHED,{type:R})},onError:function(_){m.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",_)}}};i.type?E.append(y(i.type),i.type):this.getSourceBufferTypes().forEach(function(p){E.append(y(p),p)})},h.onFragParsed=function(u,i){var r=this,E=i.frag,y=i.part,p=[],R=y?y.elementaryStreams:E.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&p.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&p.push("video"));var O=function(){var x=self.performance.now();E.stats.buffering.end=x,y&&(y.stats.buffering.end=x);var S=y?y.stats:E.stats;r.hls.trigger(v.Events.FRAG_BUFFERED,{frag:E,part:y,stats:S,id:E.type})};p.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(O,p)},h.onFragChanged=function(u,i){this.flushBackBuffer()},h.onBufferEos=function(u,i){var r=this,E=this.getSourceBufferTypes().reduce(function(y,p){var R=r.sourceBuffer[p];return(!i.type||i.type===p)&&(R&&!R.ended&&(R.ended=!0,m.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),y&&!!(!R||R.ended)},!0);E&&this.blockBuffers(function(){var y=r.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},h.onLevelUpdated=function(u,i){var r=i.details;if(!r.fragments.length)return;this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var u=this.hls,i=this.details,r=this.media,E=this.sourceBuffer;if(!r||i===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var p=i.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(N.isFiniteNumber)(p)||p<0)return;var R=r.currentTime,O=i.levelTargetDuration,_=Math.max(p,O),x=Math.floor(R/O)*O-_;y.forEach(function(S){var C=E[S];if(C){var j=b.BufferHelper.getBuffered(C);j.length>0&&x>j.start(0)&&(u.trigger(v.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),i.live&&u.trigger(v.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),u.trigger(v.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:S}))}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,i=this.hls,r=this.media,E=this.mediaSource,y=u.fragments[0].start+u.totalduration,p=r.duration,R=Object(N.isFiniteNumber)(E.duration)?E.duration:0;u.live&&i.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(u)):(y>R&&y>p||!Object(N.isFiniteNumber)(p))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),E.duration=y)},h.updateSeekableRange=function(u){var i=this.mediaSource,r=u.fragments,E=r.length;if(E&&u.live&&i!==null&&i!==void 0&&i.setLiveSeekableRange){var y=Math.max(0,r[0].start),p=Math.max(y,y+u.totalduration);i.setLiveSeekableRange(y,p)}},h.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,i=this.operationQueue,r=this.pendingTracks,E=Object.keys(r).length;if(E&&!u||E===2){this.createSourceBuffers(r),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(v.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}y.forEach(function(p){i.executeNext(p)})}},h.createSourceBuffers=function(u){var i=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var y in u)if(!i[y]){var p=u[y];if(!p)throw Error("source buffer exists for track "+y+", however track does not");var R=p.levelCodec||p.codec,O=p.container+";codecs="+R;m.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var _=i[y]=r.addSourceBuffer(O),x=y;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[y]={buffer:_,codec:R,container:p.container,levelCodec:p.levelCodec,id:p.id},E++}catch(S){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+S.message),this.hls.trigger(v.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:S,mimeType:O})}}E&&this.hls.trigger(v.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(u){var i=this.operationQueue,r=i.current(u);r.onStart()},h._onSBUpdateEnd=function(u){var i=this.operationQueue,r=i.current(u);r.onComplete(),i.shiftAndExecuteNext(u)},h._onSBUpdateError=function(u,i){m.logger.error("[buffer-controller]: "+u+" SourceBuffer error",i),this.hls.trigger(v.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(u);r&&r.onError(i)},h.removeExecutor=function(u,i,r){var E=this.media,y=this.mediaSource,p=this.operationQueue,R=this.sourceBuffer,O=R[u];if(!E||!y||!O){m.logger.warn("[buffer-controller]: Attempting to remove from the "+u+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(u);return}var _=Object(N.isFiniteNumber)(E.duration)?E.duration:Infinity,x=Object(N.isFiniteNumber)(y.duration)?y.duration:Infinity,S=Math.max(0,i),C=Math.min(r,_,x);C>S?(m.logger.log("[buffer-controller]: Removing ["+S+","+C+"] from the "+u+" SourceBuffer"),console.assert(!O.updating,u+" sourceBuffer must not be updating"),O.remove(S,C)):p.shiftAndExecuteNext(u)},h.appendExecutor=function(u,i){var r=this.operationQueue,E=this.sourceBuffer,y=E[i];if(!y){m.logger.warn("[buffer-controller]: Attempting to append to the "+i+" SourceBuffer, but it does not exist"),r.shiftAndExecuteNext(i);return}y.ended=!1,console.assert(!y.updating,i+" sourceBuffer must not be updating"),y.appendBuffer(u)},h.blockBuffers=function(u,i){var r=this;if(i===void 0&&(i=this.getSourceBufferTypes()),!i.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var E=this.operationQueue,y=i.map(function(p){return E.appendBlocker(p)});Promise.all(y).then(function(){u(),i.forEach(function(p){var R=r.sourceBuffer[p];(!R||!R.updating)&&E.shiftAndExecuteNext(p)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(u,i,r){var E=this.sourceBuffer[u];if(!E)return;var y=r.bind(this,u);this.listeners[u].push({event:i,listener:y}),E.addEventListener(i,y)},h.removeBufferListeners=function(u){var i=this.sourceBuffer[u];if(!i)return;this.listeners[u].forEach(function(r){i.removeEventListener(r.event,r.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return v});var N=T("./src/utils/logger.ts"),v=function(){function m(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var w=m.prototype;return w.append=function(t,d){var a=this.queues[d];a.push(t),a.length===1&&this.buffers[d]&&this.executeNext(d)},w.insertAbort=function(t,d){var a=this.queues[d];a.unshift(t),this.executeNext(d)},w.appendBlocker=function(t){var d,a=new Promise(function(o){d=o}),c={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,t),a},w.executeNext=function(t){var d=this.buffers,a=this.queues,c=d[t],o=a[t];if(o.length){var n=o[0];try{n.execute()}catch(s){N.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(s),(!c||!c.updating)&&(o.shift(),this.executeNext(t))}}},w.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},w.current=function(t){return this.queues[t][0]},m}()},"./src/controller/cap-level-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/events.ts");function v(b,t){for(var d=0;d<t.length;d++){var a=t[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(b,a.key,a)}}function m(b,t,d){return t&&v(b.prototype,t),d&&v(b,d),b}var w=function(){function b(d){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=d,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=b.prototype;return t.setStreamController=function(a){this.streamController=a},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var a=this.hls;a.on(N.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var a=this.hls;a.off(N.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(a,c){b.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},t.onMediaAttaching=function(a,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},t.onManifestParsed=function(a,c){var o=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,o.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onBufferCodecs=function(a,c){var o=this.hls;o.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var a=this.hls.levels;if(a.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(a.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},t.getMaxLevel=function(a){var c=this,o=this.hls.levels;if(!o.length)return-1;var n=o.filter(function(s,h){return b.isLevelAllowed(h,c.restrictedLevels)&&h<=a});return this.clientRect=null,b.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},t.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var a=this.media,c={width:0,height:0};if(a){var o=a.getBoundingClientRect();c.width=o.width,c.height=o.height,!c.width&&!c.height&&(c.width=o.right-o.left||a.width||0,c.height=o.bottom-o.top||a.height||0)}return this.clientRect=c,c},b.isLevelAllowed=function(a,c){return c===void 0&&(c=[]),c.indexOf(a)===-1},b.getMaxLevelByMediaSize=function(a,c,o){if(!a||!a.length)return-1;for(var n=function(i,r){return r?i.width!==r.width||i.height!==r.height:!0},s=a.length-1,h=0;h<a.length;h+=1){var f=a[h];if((f.width>=c||f.height>=o)&&n(f,a[h+1])){s=h;break}}return s},m(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var a=1;try{a=self.devicePixelRatio}catch(c){}return a}}]),b}();g.default=w},"./src/controller/cmcd-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return n});var N=T("./src/events.ts"),v=T("./src/types/cmcd.ts"),m=T("./src/utils/buffer-helper.ts"),w=T("./src/utils/logger.ts");function b(s,h){for(var f=0;f<h.length;f++){var u=h[f];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}function t(s,h,f){return h&&b(s.prototype,h),f&&b(s,f),s}function d(s,h){var f=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(f)return(f=f.call(s)).next.bind(f);if(Array.isArray(s)||(f=a(s))||h&&s&&typeof s.length=="number"){f&&(s=f);var u=0;return function(){return u>=s.length?{done:!0}:{done:!1,value:s[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(s,h){if(!s)return;if(typeof s=="string")return c(s,h);var f=Object.prototype.toString.call(s).slice(8,-1);if(f==="Object"&&s.constructor&&(f=s.constructor.name),f==="Map"||f==="Set")return Array.from(s);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return c(s,h)}function c(s,h){(h==null||h>s.length)&&(h=s.length);for(var f=0,u=new Array(h);f<h;f++)u[f]=s[f];return u}function o(){return o=Object.assign||function(s){for(var h=1;h<arguments.length;h++){var f=arguments[h];for(var u in f)Object.prototype.hasOwnProperty.call(f,u)&&(s[u]=f[u])}return s},o.apply(this,arguments)}var n=function(){function s(f){var u=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){u.initialized&&(u.starved=!0),u.buffering=!0},this.onPlaying=function(){u.initialized||(u.initialized=!0),u.buffering=!1},this.applyPlaylistData=function(E){try{u.apply(E,{ot:v.CMCDObjectType.MANIFEST,su:!u.initialized})}catch(y){w.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(E){try{var y=E.frag,p=u.hls.levels[y.level],R=u.getObjectType(y),O={d:y.duration*1e3,ot:R};(R===v.CMCDObjectType.VIDEO||R===v.CMCDObjectType.AUDIO||R==v.CMCDObjectType.MUXED)&&(O.br=p.bitrate/1e3,O.tb=u.getTopBandwidth(R),O.bl=u.getBufferLength(R)),u.apply(E,O)}catch(_){w.logger.warn("Could not generate segment CMCD data.",_)}},this.hls=f;var i=this.config=f.config,r=i.cmcd;r!=null&&(i.pLoader=this.createPlaylistLoader(),i.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||s.uuid(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.registerListeners())}var h=s.prototype;return h.registerListeners=function(){var u=this.hls;u.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.on(N.Events.BUFFER_CREATED,this.onBufferCreated,this)},h.unregisterListeners=function(){var u=this.hls;u.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.off(N.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},h.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},h.onMediaAttached=function(u,i){this.media=i.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},h.onBufferCreated=function(u,i){var r,E;this.audioBuffer=(r=i.tracks.audio)===null||r===void 0?void 0:r.buffer,this.videoBuffer=(E=i.tracks.video)===null||E===void 0?void 0:E.buffer},h.createData=function(){var u;return{v:v.CMCDVersion,sf:v.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(u=this.media)===null||u===void 0?void 0:u.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},h.apply=function(u,i){i===void 0&&(i={}),o(i,this.createData());var r=i.ot===v.CMCDObjectType.INIT||i.ot===v.CMCDObjectType.VIDEO||i.ot===v.CMCDObjectType.MUXED;if(this.starved&&r&&(i.bs=!0,i.su=!0,this.starved=!1),i.su==null&&(i.su=this.buffering),this.useHeaders){var E=s.toHeaders(i);if(!Object.keys(E).length)return;u.headers||(u.headers={}),o(u.headers,E)}else{var y=s.toQuery(i);if(!y)return;u.url=s.appendQueryToUri(u.url,y)}},h.getObjectType=function(u){var i=u.type;return i==="subtitle"?v.CMCDObjectType.TIMED_TEXT:u.sn==="initSegment"?v.CMCDObjectType.INIT:i==="audio"?v.CMCDObjectType.AUDIO:i==="main"?this.hls.audioTracks.length?v.CMCDObjectType.VIDEO:v.CMCDObjectType.MUXED:void 0},h.getTopBandwidth=function(u){for(var i=0,r=u===v.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=d(r),y;!(y=E()).done;){var p=y.value;p.bitrate>i&&(i=p.bitrate)}return i>0?i:NaN},h.getBufferLength=function(u){var i=this.hls.media,r=u===v.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!r||!i)return NaN;var E=m.BufferHelper.bufferInfo(r,i.currentTime,this.config.maxBufferHole);return E.len*1e3},h.createPlaylistLoader=function(){var u=this.config.pLoader,i=this.applyPlaylistData,r=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new r(p)}var y=E.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(R,O,_){i(R),this.loader.load(R,O,_)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},h.createFragmentLoader=function(){var u=this.config.fLoader,i=this.applyFragmentData,r=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new r(p)}var y=E.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(R,O,_){i(R),this.loader.load(R,O,_)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},s.uuid=function(){var u=URL.createObjectURL(new Blob),i=u.toString();return URL.revokeObjectURL(u),i.substr(i.lastIndexOf("/")+1)},s.serialize=function(u){for(var i=[],r=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},E=function(K){return Math.round(K)},y=function(K){return E(K/100)*100},p=function(K){return encodeURIComponent(K)},R={br:E,d:E,bl:y,dl:y,mtp:y,nor:p,rtp:y,tb:E},O=Object.keys(u||{}).sort(),_=d(O),x;!(x=_()).done;){var S=x.value,C=u[S];if(!r(C))continue;if(S==="v"&&C===1)continue;if(S=="pr"&&C===1)continue;var j=R[S];j&&(C=j(C));var F=typeof C,M=void 0;S==="ot"||S==="sf"||S==="st"?M=S+"="+C:F==="boolean"?M=S:F==="number"?M=S+"="+C:M=S+"="+JSON.stringify(C),i.push(M)}return i.join(",")},s.toHeaders=function(u){for(var i=Object.keys(u),r={},E=["Object","Request","Session","Status"],y=[{},{},{},{}],p={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,O=i;R<O.length;R++){var _=O[R],x=p[_]!=null?p[_]:1;y[x][_]=u[_]}for(var S=0;S<y.length;S++){var C=s.serialize(y[S]);C&&(r["CMCD-"+E[S]]=C)}return r},s.toQuery=function(u){return"CMCD="+encodeURIComponent(s.serialize(u))},s.appendQueryToUri=function(u,i){if(!i)return u;var r=u.includes("?")?"&":"?";return""+u+r+i},s}()},"./src/controller/eme-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/events.ts"),v=T("./src/errors.ts"),m=T("./src/utils/logger.ts"),w=T("./src/utils/mediakeys-helper.ts");function b(n,s){for(var h=0;h<s.length;h++){var f=s[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function t(n,s,h){return s&&b(n.prototype,s),h&&b(n,h),n}var d=3,a=function(s,h,f){var u={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(i){u.audioCapabilities.push({contentType:'audio/mp4; codecs="'+i+'"',robustness:f.audioRobustness||""})}),h.forEach(function(i){u.videoCapabilities.push({contentType:'video/mp4; codecs="'+i+'"',robustness:f.videoRobustness||""})}),[u]},c=function(s,h,f,u){switch(s){case w.KeySystems.WIDEVINE:return a(h,f,u);default:throw new Error("Unknown key-system: "+s)}},o=function(){function n(h){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=h,this._config=h.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var s=n.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(f){switch(f){case w.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+f+'"')},s._attemptKeySystemAccess=function(f,u,i){var r=this,E=c(f,u,i,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(f,E);this.mediaKeysPromise=y.then(function(p){return r._onMediaKeySystemAccessObtained(f,p)}),y.catch(function(p){m.logger.error('Failed to obtain key-system "'+f+'" access:',p)})},s._onMediaKeySystemAccessObtained=function(f,u){var i=this;m.logger.log('Access for key-system "'+f+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:u,mediaKeySystemDomain:f};this._mediaKeysList.push(r);var E=Promise.resolve().then(function(){return u.createMediaKeys()}).then(function(y){return r.mediaKeys=y,m.logger.log('Media-keys created for key-system "'+f+'"'),i._onMediaKeysCreated(),y});return E.catch(function(y){m.logger.error("Failed to create media-keys:",y)}),E},s._onMediaKeysCreated=function(){var f=this;this._mediaKeysList.forEach(function(u){u.mediaKeysSession||(u.mediaKeysSession=u.mediaKeys.createSession(),f._onNewMediaKeySession(u.mediaKeysSession))})},s._onNewMediaKeySession=function(f){var u=this;m.logger.log("New key-system session "+f.sessionId),f.addEventListener("message",function(i){u._onKeySessionMessage(f,i.message)},!1)},s._onKeySessionMessage=function(f,u){m.logger.log("Got EME message event, creating license request"),this._requestLicense(u,function(i){m.logger.log("Received license data (length: "+(i&&i.byteLength)+"), updating key-session"),f.update(i)})},s.onMediaEncrypted=function(f){var u=this;if(m.logger.log('Media is encrypted using "'+f.initDataType+'" init data type'),!this.mediaKeysPromise){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var i=function(E){if(!u._media)return;u._attemptSetMediaKeys(E),u._generateRequestWithPreferredKeySession(f.initDataType,f.initData)};this.mediaKeysPromise.then(i).catch(i)},s._attemptSetMediaKeys=function(f){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var u=this._mediaKeysList[0];if(!u||!u.mediaKeys){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(u.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(f,u){var i=this,r=this._mediaKeysList[0];if(!r){m.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(r.mediaKeysSessionInitialized){m.logger.warn("Key-Session already initialized but requested again");return}var E=r.mediaKeysSession;if(!E){m.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!u){m.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}m.logger.log('Generating key-session request for "'+f+'" init data type'),r.mediaKeysSessionInitialized=!0,E.generateRequest(f,u).then(function(){m.logger.debug("Key-session generation succeeded")}).catch(function(y){m.logger.error("Error generating key-session request:",y),i.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(f,u,i){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,f,u,i);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,r,f),E=void 0}catch(y){m.logger.error(y)}try{r.readyState||r.open("POST",f,!0),E&&E.call(this.hls,r,f)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return r},s._onLicenseRequestReadyStageChange=function(f,u,i,r){switch(f.readyState){case 4:if(f.status===200){this._requestLicenseFailureCount=0,m.logger.log("License request succeeded");var E=f.response,y=this._licenseResponseCallback;if(y)try{E=y.call(this.hls,f,u)}catch(R){m.logger.error(R)}r(E)}else{if(m.logger.error("License Request XHR failed ("+u+"). Status: "+f.status+" ("+f.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>d){this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=d-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(i,r)}break}},s._generateLicenseRequestChallenge=function(f,u){switch(f.mediaKeySystemDomain){case w.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+f.mediaKeySystemDomain)},s._requestLicense=function(f,u){m.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var r=this.getLicenseServerUrl(i.mediaKeySystemDomain),E=this._createLicenseXhr(r,f,u);m.logger.log("Sending license request to URL: "+r);var y=this._generateLicenseRequestChallenge(i,f);E.send(y)}catch(p){m.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(f,u){if(!this._emeEnabled)return;var i=u.media;this._media=i,i.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var f=this._media,u=this._mediaKeysList;if(!f)return;f.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(u.map(function(i){if(i.mediaKeysSession)return i.mediaKeysSession.close().catch(function(){})})).then(function(){return f.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(f,u){if(!this._emeEnabled)return;var i=u.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),r=u.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(w.KeySystems.WIDEVINE,i,r)},t(n,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),n}();g.default=o},"./src/controller/fps-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/events.ts"),v=T("./src/utils/logger.ts"),m=function(){function w(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}var b=w.prototype;return b.setStreamController=function(d){this.streamController=d},b.registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(d,a){var c=this.hls.config;if(c.capLevelOnFPSDrop){var o=a.media instanceof self.HTMLVideoElement?a.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(d,a,c){var o=performance.now();if(a){if(this.lastTime){var n=o-this.lastTime,s=c-this.lastDroppedFrames,h=a-this.lastDecodedFrames,f=1e3*s/n,u=this.hls;if(u.trigger(N.Events.FPS_DROP,{currentDropped:s,currentDecoded:h,totalDroppedFrames:c}),f>0&&s>u.config.fpsDroppedMonitoringThreshold*h){var i=u.currentLevel;v.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+i),i>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=i)&&(i=i-1,u.trigger(N.Events.FPS_DROP_LEVEL_CAPPING,{level:i,droppedLevel:u.currentLevel}),u.autoLevelCapping=i,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=c,this.lastDecodedFrames=a}},b.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var a=d.getVideoPlaybackQuality();this.checkFPS(d,a.totalVideoFrames,a.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},w}();g.default=m},"./src/controller/fragment-finders.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"findFragmentByPDT",function(){return m}),T.d(g,"findFragmentByPTS",function(){return w}),T.d(g,"fragmentWithinToleranceTest",function(){return b}),T.d(g,"pdtWithinToleranceTest",function(){return t}),T.d(g,"findFragWithCC",function(){return d});var N=T("./src/polyfills/number.ts"),v=T("./src/utils/binary-search.ts");function m(a,c,o){if(c===null||!Array.isArray(a)||!a.length||!Object(N.isFiniteNumber)(c))return null;var n=a[0].programDateTime;if(c<(n||0))return null;var s=a[a.length-1].endProgramDateTime;if(c>=(s||0))return null;o=o||0;for(var h=0;h<a.length;++h){var f=a[h];if(t(c,o,f))return f}return null}function w(a,c,o,n){o===void 0&&(o=0),n===void 0&&(n=0);var s=null;if(a?s=c[a.sn-c[0].sn+1]||null:o===0&&c[0].start===0&&(s=c[0]),s&&b(o,n,s)===0)return s;var h=v.default.search(c,b.bind(null,o,n));return h||s}function b(a,c,o){a===void 0&&(a=0),c===void 0&&(c=0);var n=Math.min(c,o.duration+(o.deltaPTS?o.deltaPTS:0));return o.start+o.duration-n<=a?1:o.start-n>a&&o.start?-1:0}function t(a,c,o){var n=Math.min(c,o.duration+(o.deltaPTS?o.deltaPTS:0))*1e3,s=o.endProgramDateTime||0;return s-n>a}function d(a,c){return v.default.search(a,function(o){return o.cc<c?1:o.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"FragmentState",function(){return m}),T.d(g,"FragmentTracker",function(){return w});var N=T("./src/events.ts"),v=T("./src/types/loader.ts"),m;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(m||(m={}));var w=function(){function d(c){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=c,this._registerListeners()}var a=d.prototype;return a._registerListeners=function(){var o=this.hls;o.on(N.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.on(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(N.Events.FRAG_LOADED,this.onFragLoaded,this)},a._unregisterListeners=function(){var o=this.hls;o.off(N.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.off(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(N.Events.FRAG_LOADED,this.onFragLoaded,this)},a.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},a.getAppendedFrag=function(o,n){if(n===v.PlaylistLevelType.MAIN){var s=this.activeFragment,h=this.activeParts;if(!s)return null;if(h)for(var f=h.length;f--;){var u=h[f],i=u?u.end:s.appendedPTS;if(u.start<=o&&i!==void 0&&o<=i)return f>9&&(this.activeParts=h.slice(f-9)),u}else if(s.start<=o&&s.appendedPTS!==void 0&&o<=s.appendedPTS)return s}return this.getBufferedFrag(o,n)},a.getBufferedFrag=function(o,n){for(var s=this.fragments,h=Object.keys(s),f=h.length;f--;){var u=s[h[f]];if((u==null?void 0:u.body.type)===n&&u.buffered){var i=u.body;if(i.start<=o&&o<=i.end)return i}}return null},a.detectEvictedFragments=function(o,n,s){var h=this;Object.keys(this.fragments).forEach(function(f){var u=h.fragments[f];if(!u)return;if(!u.buffered){u.body.type===s&&h.removeFragment(u.body);return}var i=u.range[o];if(!i)return;i.time.some(function(r){var E=!h.isTimeBuffered(r.startPTS,r.endPTS,n);return E&&h.removeFragment(u.body),E})})},a.detectPartialFragments=function(o){var n=this,s=this.timeRanges,h=o.frag,f=o.part;if(!s||h.sn==="initSegment")return;var u=t(h),i=this.fragments[u];if(!i)return;Object.keys(s).forEach(function(r){var E=h.elementaryStreams[r];if(!E)return;var y=s[r],p=f!==null||E.partial===!0;i.range[r]=n.getBufferedTimes(h,f,p,y)}),i.backtrack=i.loaded=null,Object.keys(i.range).length?i.buffered=!0:this.removeFragment(i.body)},a.fragBuffered=function(o){var n=t(o),s=this.fragments[n];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},a.getBufferedTimes=function(o,n,s,h){for(var f={time:[],partial:s},u=n?n.start:o.start,i=n?n.end:o.end,r=o.minEndPTS||i,E=o.maxStartPTS||u,y=0;y<h.length;y++){var p=h.start(y)-this.bufferPadding,R=h.end(y)+this.bufferPadding;if(E>=p&&r<=R){f.time.push({startPTS:Math.max(u,h.start(y)),endPTS:Math.min(i,h.end(y))});break}else if(u<R&&i>p)f.partial=!0,f.time.push({startPTS:Math.max(u,h.start(y)),endPTS:Math.min(i,h.end(y))});else if(i<=p)break}return f},a.getPartialFragment=function(o){var n=null,s,h,f,u=0,i=this.bufferPadding,r=this.fragments;return Object.keys(r).forEach(function(E){var y=r[E];if(!y)return;b(y)&&(h=y.body.start-i,f=y.body.end+i,o>=h&&o<=f&&(s=Math.min(o-h,f-o),u<=s&&(n=y.body,u=s)))}),n},a.getState=function(o){var n=t(o),s=this.fragments[n];return s?s.buffered?b(s)?m.PARTIAL:m.OK:s.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},a.backtrack=function(o,n){var s=t(o),h=this.fragments[s];if(!h||h.backtrack)return null;var f=h.backtrack=n||h.loaded;return h.loaded=null,f},a.getBacktrackData=function(o){var n=t(o),s=this.fragments[n];if(s){var h,f=s.backtrack;if(f!=null&&(h=f.payload)!==null&&h!==void 0&&h.byteLength)return f;this.removeFragment(o)}return null},a.isTimeBuffered=function(o,n,s){for(var h,f,u=0;u<s.length;u++){if(h=s.start(u)-this.bufferPadding,f=s.end(u)+this.bufferPadding,o>=h&&n<=f)return!0;if(n<=h)return!1}return!1},a.onFragLoaded=function(o,n){var s=n.frag,h=n.part;if(s.sn==="initSegment"||s.bitrateTest||h)return;var f=t(s);this.fragments[f]={body:s,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},a.onBufferAppended=function(o,n){var s=this,h=n.frag,f=n.part,u=n.timeRanges;if(h.type===v.PlaylistLevelType.MAIN)if(this.activeFragment=h,f){var i=this.activeParts;i||(this.activeParts=i=[]),i.push(f)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(r){var E=u[r];if(s.detectEvictedFragments(r,E),!f)for(var y=0;y<E.length;y++)h.appendedPTS=Math.max(E.end(y),h.appendedPTS||0)})},a.onFragBuffered=function(o,n){this.detectPartialFragments(n)},a.hasFragment=function(o){var n=t(o);return!!this.fragments[n]},a.removeFragmentsInRange=function(o,n,s){var h=this;Object.keys(this.fragments).forEach(function(f){var u=h.fragments[f];if(!u)return;if(u.buffered){var i=u.body;i.type===s&&i.start<n&&i.end>o&&h.removeFragment(i)}})},a.removeFragment=function(o){var n=t(o);o.stats.loaded=0,o.clearElementaryStreamInfo(),delete this.fragments[n]},a.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function b(d){var a,c;return d.buffered&&(((a=d.range.video)===null||a===void 0?void 0:a.partial)||((c=d.range.audio)===null||c===void 0?void 0:c.partial))}function t(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"STALL_MINIMUM_DURATION_MS",function(){return b}),T.d(g,"MAX_START_GAP_JUMP",function(){return t}),T.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),T.d(g,"SKIP_BUFFER_RANGE_START",function(){return a}),T.d(g,"default",function(){return c});var N=T("./src/utils/buffer-helper.ts"),v=T("./src/errors.ts"),m=T("./src/events.ts"),w=T("./src/utils/logger.ts"),b=250,t=2,d=.1,a=.05,c=function(){function o(s,h,f,u){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=h,this.fragmentTracker=f,this.hls=u}var n=o.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(h){var f=this.config,u=this.media,i=this.stalled,r=u.currentTime,E=u.seeking,y=this.seeking&&!E,p=!this.seeking&&E;if(this.seeking=E,r!==h){if(this.moved=!0,i!==null){if(this.stallReported){var R=self.performance.now()-i;w.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||y)&&(this.stalled=null),u.paused||u.ended||u.playbackRate===0||!N.BufferHelper.getBuffered(u).length)return;var O=N.BufferHelper.bufferInfo(u,r,0),_=O.len>0,x=O.nextStart||0;if(!_&&!x)return;if(E){var S=O.len>t,C=!x||x-r>t&&!this.fragmentTracker.getPartialFragment(r);if(S||C)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var j,F=Math.max(x,O.start||0)-r,M=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,Y=M==null||((j=M.details)===null||j===void 0)?void 0:j.live,K=Y?M.details.targetduration*2:t;if(F>0&&F<=K){this._trySkipBufferHole(null);return}}var A=self.performance.now();if(i===null){this.stalled=A;return}var W=A-i;!E&&W>=b&&this._reportStall(O.len);var U=N.BufferHelper.bufferInfo(u,r,f.maxBufferHole);this._tryFixBufferStall(U,W)},n._tryFixBufferStall=function(h,f){var u=this.config,i=this.fragmentTracker,r=this.media,E=r.currentTime,y=i.getPartialFragment(E);if(y){var p=this._trySkipBufferHole(y);if(p)return}h.len>u.maxBufferHole&&f>u.highBufferWatchdogPeriod*1e3&&(w.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},n._reportStall=function(h){var f=this.hls,u=this.media,i=this.stallReported;i||(this.stallReported=!0,w.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+h+")"),f.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}))},n._trySkipBufferHole=function(h){for(var f=this.config,u=this.hls,i=this.media,r=i.currentTime,E=0,y=N.BufferHelper.getBuffered(i),p=0;p<y.length;p++){var R=y.start(p);if(r+f.maxBufferHole>=E&&r<R){var O=Math.max(R+a,i.currentTime+d);return w.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+O),this.moved=!0,this.stalled=null,i.currentTime=O,h&&u.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+O,frag:h}),O}E=y.end(p)}return 0},n._tryNudgeBuffer=function(){var h=this.config,f=this.hls,u=this.media,i=u.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<h.nudgeMaxRetry){var E=i+r*h.nudgeOffset;w.logger.warn("Nudging 'currentTime' from "+i+" to "+E),u.currentTime=E,f.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else w.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+h.nudgeMaxRetry+" nudges"),f.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},o}()},"./src/controller/id3-track-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/events.ts"),v=T("./src/utils/texttrack-utils.ts"),m=T("./src/demux/id3.ts"),w=.25,b=function(){function t(a){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=a,this._registerListeners()}var d=t.prototype;return d.destroy=function(){this._unregisterListeners()},d._registerListeners=function(){var c=this.hls;c.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(N.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d._unregisterListeners=function(){var c=this.hls;c.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(N.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d.onMediaAttached=function(c,o){this.media=o.media},d.onMediaDetaching=function(){if(!this.id3Track)return;Object(v.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},d.getID3Track=function(c){if(!this.media)return;for(var o=0;o<c.length;o++){var n=c[o];if(n.kind==="metadata"&&n.label==="id3")return Object(v.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")},d.onFragParsingMetadata=function(c,o){if(!this.media)return;var n=o.frag,s=o.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var h=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,f=0;f<s.length;f++){var u=m.getID3Frames(s[f].data);if(u){var i=s[f].pts,r=f<s.length-1?s[f+1].pts:n.end,E=r-i;E<=0&&(r=i+w);for(var y=0;y<u.length;y++){var p=u[y];if(!m.isTimeStampFrame(p)){var R=new h(i,r,"");R.value=p,this.id3Track.addCue(R)}}}}},d.onBufferFlushing=function(c,o){var n=o.startOffset,s=o.endOffset,h=o.type;if(!h||h==="audio"){var f=this.id3Track;f&&Object(v.removeCuesInRange)(f,n,s)}},t}();g.default=b},"./src/controller/latency-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return t});var N=T("./src/errors.ts"),v=T("./src/events.ts"),m=T("./src/utils/logger.ts");function w(d,a){for(var c=0;c<a.length;c++){var o=a[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function b(d,a,c){return a&&w(d.prototype,a),c&&w(d,c),d}var t=function(){function d(c){var o=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 o.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var a=d.prototype;return a.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},a.registerListeners=function(){this.hls.on(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(v.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){this.hls.off(v.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(v.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(v.Events.ERROR,this.onError)},a.onMediaAttached=function(o,n){this.media=n.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},a.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},a.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},a.onLevelUpdated=function(o,n){var s=n.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(o,n){if(n.details!==N.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,m.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},a.timeupdate=function(){var o=this.media,n=this.levelDetails;if(!o||!n)return;this.currentTime=o.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var h=this.config,f=h.lowLatencyMode,u=h.maxLiveSyncPlaybackRate;if(!f||u===1)return;var i=this.targetLatency;if(i===null)return;var r=s-i,E=Math.min(this.maxLatency,i+n.targetduration),y=r<E;if(n.live&&y&&r>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,u)),R=Math.round(2/(1+Math.exp(-.75*r-this.edgeStalled))*20)/20;o.playbackRate=Math.min(p,Math.max(1,R))}else o.playbackRate!==1&&o.playbackRate!==0&&(o.playbackRate=1)},a.estimateLiveEdge=function(){var o=this.levelDetails;return o===null?null:o.edge+o.age},a.computeLatency=function(){var o=this.estimateLiveEdge();return o===null?null:o-this.currentTime},b(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var o=this.config,n=this.levelDetails;return o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:n?o.liveMaxLatencyDurationCount*n.targetduration:0}},{key:"targetLatency",get:function(){var o=this.levelDetails;if(o===null)return null;var n=o.holdBack,s=o.partHoldBack,h=o.targetduration,f=this.config,u=f.liveSyncDuration,i=f.liveSyncDurationCount,r=f.lowLatencyMode,E=this.hls.userConfig,y=r&&s||n;(E.liveSyncDuration||E.liveSyncDurationCount||y===0)&&(y=u!==void 0?u:i*h);var p=h,R=1;return y+Math.min(this.stallCount*R,p)}},{key:"liveSyncPosition",get:function(){var o=this.estimateLiveEdge(),n=this.targetLatency,s=this.levelDetails;if(o===null||n===null||s===null)return null;var h=s.edge,f=o-n-this.edgeStalled,u=h-s.totalduration,i=h-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(u,f),i)}},{key:"drift",get:function(){var o=this.levelDetails;return o===null?1:o.drift}},{key:"edgeStalled",get:function(){var o=this.levelDetails;if(o===null)return 0;var n=(this.config.lowLatencyMode&&o.partTarget||o.targetduration)*3;return Math.max(o.age-n,0)}},{key:"forwardBufferLength",get:function(){var o=this.media,n=this.levelDetails;if(!o||!n)return 0;var s=o.buffered.length;return s?o.buffered.end(s-1):n.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return f});var N=T("./src/types/level.ts"),v=T("./src/events.ts"),m=T("./src/errors.ts"),w=T("./src/utils/codecs.ts"),b=T("./src/controller/level-helper.ts"),t=T("./src/controller/base-playlist-controller.ts"),d=T("./src/types/loader.ts");function a(){return a=Object.assign||function(u){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var E in r)Object.prototype.hasOwnProperty.call(r,E)&&(u[E]=r[E])}return u},a.apply(this,arguments)}function c(u,i){for(var r=0;r<i.length;r++){var E=i[r];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function o(u,i,r){return i&&c(u.prototype,i),r&&c(u,r),u}function n(u,i){u.prototype=Object.create(i.prototype),u.prototype.constructor=u,s(u,i)}function s(u,i){return s=Object.setPrototypeOf||function(E,y){return E.__proto__=y,E},s(u,i)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),f=function(u){n(i,u);function i(E){var y;return y=u.call(this,E,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var r=i.prototype;return r._registerListeners=function(){var y=this.hls;y.on(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(v.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(v.Events.ERROR,this.onError,this)},r._unregisterListeners=function(){var y=this.hls;y.off(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(v.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(v.Events.ERROR,this.onError,this)},r.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,u.prototype.destroy.call(this)},r.startLoad=function(){var y=this._levels;y.forEach(function(p){p.loadError=0}),u.prototype.startLoad.call(this)},r.onManifestLoaded=function(y,p){var R=[],O=[],_=[],x,S={},C,j=!1,F=!1,M=!1;if(p.levels.forEach(function(W){var U=W.attrs;j=j||!!(W.width&&W.height),F=F||!!W.videoCodec,M=M||!!W.audioCodec,h&&W.audioCodec&&W.audioCodec.indexOf("mp4a.40.34")!==-1&&(W.audioCodec=void 0);var D=W.bitrate+"-"+W.attrs.RESOLUTION+"-"+W.attrs.CODECS;C=S[D],C?C.url.push(W.url):(C=new N.Level(W),S[D]=C,R.push(C)),U&&(U.AUDIO&&Object(b.addGroupId)(C,"audio",U.AUDIO),U.SUBTITLES&&Object(b.addGroupId)(C,"text",U.SUBTITLES))}),(j||F)&&M&&(R=R.filter(function(W){var U=W.videoCodec,D=W.width,X=W.height;return!!U||!!(D&&X)})),R=R.filter(function(W){var U=W.audioCodec,D=W.videoCodec;return(!U||Object(w.isCodecSupportedInMp4)(U,"audio"))&&(!D||Object(w.isCodecSupportedInMp4)(D,"video"))}),p.audioTracks&&(O=p.audioTracks.filter(function(W){return!W.audioCodec||Object(w.isCodecSupportedInMp4)(W.audioCodec,"audio")}),Object(b.assignTrackIdsByGroup)(O)),p.subtitles&&(_=p.subtitles,Object(b.assignTrackIdsByGroup)(_)),R.length>0){x=R[0].bitrate,R.sort(function(W,U){return W.bitrate-U.bitrate}),this._levels=R;for(var Y=0;Y<R.length;Y++)if(R[Y].bitrate===x){this._firstLevel=Y,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+x);break}var K=M&&!F,A={levels:R,audioTracks:O,subtitleTracks:_,firstLevel:this._firstLevel,stats:p.stats,audio:M,video:F,altAudio:!K&&O.some(function(W){return!!W.url})};this.hls.trigger(v.Events.MANIFEST_PARSED,A),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},r.onError=function(y,p){if(u.prototype.onError.call(this,y,p),p.fatal)return;var R=p.context,O=this._levels[this.currentLevelIndex];if(R&&(R.type===d.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&R.groupId===O.audioGroupIds[O.urlId]||R.type===d.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&R.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var _=!1,x=!0,S;switch(p.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:if(p.frag){var C=this._levels[p.frag.level];C?(C.fragmentError++,C.fragmentError>this.hls.config.fragLoadingMaxRetry&&(S=p.frag.level)):S=p.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(x=!1),S=R.level),_=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:S=p.level,_=!0;break}S!==void 0&&this.recoverLevel(p,S,_,x)},r.recoverLevel=function(y,p,R,O){var _=y.details,x=this._levels[p];if(x.loadError++,R){var S=this.retryLoadingOrFail(y);if(S)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var C=x.url.length;if(C>1&&x.loadError<C)y.levelRetry=!0,this.redundantFailover(p);else if(this.manualLevelIndex===-1){var j=p===0?this._levels.length-1:p-1;this.currentLevelIndex!==j&&this._levels[j].loadError===0&&(this.warn(_+": switch to "+j),y.levelRetry=!0,this.hls.nextAutoLevel=j)}}},r.redundantFailover=function(y){var p=this._levels[y],R=p.url.length;if(R>1){var O=(p.urlId+1)%R;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(_){_.urlId=O}),this.level=y}},r.onFragLoaded=function(y,p){var R=p.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var O=this._levels[R.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},r.onLevelLoaded=function(y,p){var R,O=p.level,_=p.details,x=this._levels[O];if(!x){var S;this.warn("Invalid level index "+O),(S=p.deliveryDirectives)!==null&&S!==void 0&&S.skip&&(_.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(O,p,x.details)):(R=p.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(_.deltaUpdateFailed=!0)},r.onAudioTrackSwitched=function(y,p){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var O=-1,_=this.hls.audioTracks[p.id].groupId,x=0;x<R.audioGroupIds.length;x++)if(R.audioGroupIds[x]===_){O=x;break}O!==R.urlId&&(R.urlId=O,this.startLoad())}},r.loadPlaylist=function(y){var p=this.currentLevelIndex,R=this._levels[p];if(this.canLoad&&R&&R.url.length>0){var O=R.urlId,_=R.url[O];if(y)try{_=y.addDirectives(_)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+p+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+O+" "+_),this.clearTimer(),this.hls.trigger(v.Events.LEVEL_LOADING,{url:_,level:p,id:O,deliveryDirectives:y||null})}},r.removeLevel=function(y,p){var R=function(x,S){return S!==p},O=this._levels.filter(function(_,x){return x!==y?!0:_.url.length>1&&p!==void 0?(_.url=_.url.filter(R),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(R)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(R)),_.urlId=0,!0):!1}).map(function(_,x){var S=_.details;return S!=null&&S.fragments&&S.fragments.forEach(function(C){C.level=x}),_});this._levels=O,this.hls.trigger(v.Events.LEVELS_UPDATED,{levels:O})},o(i,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var p,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===y&&(p=R[y])!==null&&p!==void 0&&p.details)return;if(y<0||y>=R.length){var O=y<0;if(this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:O,reason:"invalid level idx"}),O)return;y=Math.min(y,R.length-1)}this.clearTimer();var _=this.currentLevelIndex,x=R[_],S=R[y];this.log("switching to level "+y+" from "+_),this.currentLevelIndex=y;var C=a({},S,{level:y,maxBitrate:S.maxBitrate,uri:S.uri,urlId:S.urlId});delete C._urlId,this.hls.trigger(v.Events.LEVEL_SWITCHING,C);var j=S.details;if(!j||j.live){var F=this.switchParams(S.uri,x==null?void 0:x.details);this.loadPlaylist(F)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),i}(t.default)},"./src/controller/level-helper.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"addGroupId",function(){return m}),T.d(g,"assignTrackIdsByGroup",function(){return w}),T.d(g,"updatePTS",function(){return b}),T.d(g,"updateFragPTSDTS",function(){return d}),T.d(g,"mergeDetails",function(){return a}),T.d(g,"mapPartIntersection",function(){return c}),T.d(g,"mapFragmentIntersection",function(){return o}),T.d(g,"adjustSliding",function(){return n}),T.d(g,"addSliding",function(){return s}),T.d(g,"computeReloadInterval",function(){return h}),T.d(g,"getFragmentWithSN",function(){return f}),T.d(g,"getPartWith",function(){return u});var N=T("./src/polyfills/number.ts"),v=T("./src/utils/logger.ts");function m(i,r,E){switch(r){case"audio":i.audioGroupIds||(i.audioGroupIds=[]),i.audioGroupIds.push(E);break;case"text":i.textGroupIds||(i.textGroupIds=[]),i.textGroupIds.push(E);break}}function w(i){var r={};i.forEach(function(E){var y=E.groupId||"";E.id=r[y]=r[y]||0,r[y]++})}function b(i,r,E){var y=i[r],p=i[E];t(y,p)}function t(i,r){var E=r.startPTS;if(Object(N.isFiniteNumber)(E)){var y=0,p;r.sn>i.sn?(y=E-i.start,p=i):(y=i.start-E,p=r),p.duration!==y&&(p.duration=y)}else if(r.sn>i.sn){var R=i.cc===r.cc;R&&i.minEndPTS?r.start=i.start+(i.minEndPTS-i.start):r.start=i.start+i.duration}else r.start=Math.max(i.start-r.duration,0)}function d(i,r,E,y,p,R){var O=y-E;O<=0&&(v.logger.warn("Fragment should have a positive duration",r),y=E+r.duration,R=p+r.duration);var _=E,x=y,S=r.startPTS,C=r.endPTS;if(Object(N.isFiniteNumber)(S)){var j=Math.abs(S-E);Object(N.isFiniteNumber)(r.deltaPTS)?r.deltaPTS=Math.max(j,r.deltaPTS):r.deltaPTS=j,_=Math.max(E,S),E=Math.min(E,S),p=Math.min(p,r.startDTS),x=Math.min(y,C),y=Math.max(y,C),R=Math.max(R,r.endDTS)}r.duration=y-E;var F=E-r.start;r.appendedPTS=y,r.start=r.startPTS=E,r.maxStartPTS=_,r.startDTS=p,r.endPTS=y,r.minEndPTS=x,r.endDTS=R;var M=r.sn;if(!i||M<i.startSN||M>i.endSN)return 0;var Y,K=M-i.startSN,A=i.fragments;for(A[K]=r,Y=K;Y>0;Y--)t(A[Y],A[Y-1]);for(Y=K;Y<A.length-1;Y++)t(A[Y],A[Y+1]);return i.fragmentHint&&t(A[A.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,F}function a(i,r){for(var E=null,y=i.fragments,p=y.length-1;p>=0;p--){var R=y[p].initSegment;if(R){E=R;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;var O=0,_;if(o(i,r,function(Y,K){Y.relurl&&(O=Y.cc-K.cc),Object(N.isFiniteNumber)(Y.startPTS)&&Object(N.isFiniteNumber)(Y.endPTS)&&(K.start=K.startPTS=Y.startPTS,K.startDTS=Y.startDTS,K.appendedPTS=Y.appendedPTS,K.maxStartPTS=Y.maxStartPTS,K.endPTS=Y.endPTS,K.endDTS=Y.endDTS,K.minEndPTS=Y.minEndPTS,K.duration=Y.endPTS-Y.startPTS,K.duration&&(_=K),r.PTSKnown=r.alignedSliding=!0),K.elementaryStreams=Y.elementaryStreams,K.loader=Y.loader,K.stats=Y.stats,K.urlId=Y.urlId,Y.initSegment&&(K.initSegment=Y.initSegment,E=Y.initSegment)}),E){var x=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;x.forEach(function(Y){var K;(!Y.initSegment||Y.initSegment.relurl===((K=E)===null||K===void 0?void 0:K.relurl))&&(Y.initSegment=E)})}if(r.skippedSegments&&(r.deltaUpdateFailed=r.fragments.some(function(Y){return!Y}),r.deltaUpdateFailed)){v.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var S=r.skippedSegments;S--;)r.fragments.shift();r.startSN=r.fragments[0].sn,r.startCC=r.fragments[0].cc}var C=r.fragments;if(O){v.logger.warn("discontinuity sliding from playlist, take drift into account");for(var j=0;j<C.length;j++)C[j].cc+=O}r.skippedSegments&&(r.startCC=r.fragments[0].cc),c(i.partList,r.partList,function(Y,K){K.elementaryStreams=Y.elementaryStreams,K.stats=Y.stats}),_?d(r,_,_.startPTS,_.endPTS,_.startDTS,_.endDTS):n(i,r),C.length&&(r.totalduration=r.edge-C[0].start),r.driftStartTime=i.driftStartTime,r.driftStart=i.driftStart;var F=r.advancedDateTime;if(r.advanced&&F){var M=r.edge;r.driftStart||(r.driftStartTime=F,r.driftStart=M),r.driftEndTime=F,r.driftEnd=M}else r.driftEndTime=i.driftEndTime,r.driftEnd=i.driftEnd,r.advancedDateTime=i.advancedDateTime}function c(i,r,E){if(i&&r)for(var y=0,p=0,R=i.length;p<=R;p++){var O=i[p],_=r[p+y];O&&_&&O.index===_.index&&O.fragment.sn===_.fragment.sn?E(O,_):y--}}function o(i,r,E){for(var y=r.skippedSegments,p=Math.max(i.startSN,r.startSN)-r.startSN,R=(i.fragmentHint?1:0)+(y?r.endSN:Math.min(i.endSN,r.endSN))-r.startSN,O=r.startSN-i.startSN,_=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,x=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,S=p;S<=R;S++){var C=x[O+S],j=_[S];y&&!j&&S<y&&(j=r.fragments[S]=C),C&&j&&E(C,j)}}function n(i,r){var E=r.startSN+r.skippedSegments-i.startSN,y=i.fragments;if(E<0||E>=y.length)return;s(r,y[E].start)}function s(i,r){if(r){for(var E=i.fragments,y=i.skippedSegments;y<E.length;y++)E[y].start+=r;i.fragmentHint&&(i.fragmentHint.start+=r)}}function h(i,r){var E=1e3*i.levelTargetDuration,y=E/2,p=i.age,R=p>0&&p<E*3,O=r.loading.end-r.loading.start,_,x=i.availabilityDelay;if(i.updated===!1)if(R){var S=333*i.misses;_=Math.max(Math.min(y,O*2),S),i.availabilityDelay=(i.availabilityDelay||0)+_}else _=y;else R?(x=Math.min(x||E/2,p),i.availabilityDelay=x,_=x+E-p):_=E-O;return Math.round(_)}function f(i,r,E){if(!i||!i.details)return null;var y=i.details,p=y.fragments[r-y.startSN];return p||(p=y.fragmentHint,p&&p.sn===r?p:r<y.startSN&&E&&E.sn===r?E:null)}function u(i,r,E){if(!i||!i.details)return null;var y=i.details.partList;if(y)for(var p=y.length;p--;){var R=y[p];if(R.index===E&&R.fragment.sn===r)return R}return null}},"./src/controller/stream-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return y});var N=T("./src/polyfills/number.ts"),v=T("./src/controller/base-stream-controller.ts"),m=T("./src/is-supported.ts"),w=T("./src/events.ts"),b=T("./src/utils/buffer-helper.ts"),t=T("./src/controller/fragment-tracker.ts"),d=T("./src/types/loader.ts"),a=T("./src/loader/fragment.ts"),c=T("./src/demux/transmuxer-interface.ts"),o=T("./src/types/transmuxer.ts"),n=T("./src/controller/gap-controller.ts"),s=T("./src/errors.ts"),h=T("./src/utils/logger.ts");function f(p,R){for(var O=0;O<R.length;O++){var _=R[O];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(p,_.key,_)}}function u(p,R,O){return R&&f(p.prototype,R),O&&f(p,O),p}function i(p,R){p.prototype=Object.create(R.prototype),p.prototype.constructor=p,r(p,R)}function r(p,R){return r=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},r(p,R)}var E=100,y=function(p){i(R,p);function R(_,x){var S;return S=p.call(this,_,x,"[stream-controller]")||this,S.audioCodecSwap=!1,S.gapController=null,S.level=-1,S._forceStartLoad=!1,S.altAudio=!1,S.audioOnly=!1,S.fragPlaying=null,S.onvplaying=null,S.onvseeked=null,S.fragLastKbps=0,S.stalled=!1,S.couldBacktrack=!1,S.audioCodecSwitch=!1,S.videoBuffer=null,S._registerListeners(),S}var O=R.prototype;return O._registerListeners=function(){var x=this.hls;x.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(w.Events.ERROR,this.onError,this),x.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var x=this.hls;x.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(w.Events.ERROR,this.onError,this),x.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(x){if(this.levels){var S=this.lastCurrentTime,C=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var j=C.startLevel;j===-1&&(C.config.testBandwidth?(j=0,this.bitrateTest=!0):j=C.nextAutoLevel),this.level=C.nextLoadLevel=j,this.loadedmetadata=!1}S>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+S.toFixed(3)),x=S),this.state=v.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=v.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_LEVEL:{var x,S=this.levels,C=this.level,j=S==null||((x=S[C])===null||x===void 0)?void 0:x.details;if(j&&(!j.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(j))break;this.state=v.State.IDLE;break}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var F,M=self.performance.now(),Y=this.retryDate;(!Y||M>=Y||(F=this.media)!==null&&F!==void 0&&F.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=v.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var x,S,C=this.hls,j=this.levelLastLoaded,F=this.levels,M=this.media,Y=C.config,K=C.nextLoadLevel;if(j===null||!M&&(this.startFragRequested||!Y.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!F||!F[K])return;var A=F[K];this.level=C.nextLoadLevel=K;var W=A.details;if(!W||this.state===v.State.WAITING_LEVEL||W.live&&this.levelLastLoaded!==K){this.state=v.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:M,d.PlaylistLevelType.MAIN);if(U===null)return;var D=U.len,X=this.getMaxBufferLength(A.maxBitrate);if(D>=X)return;if(this._streamEnded(U,W)){var ie={};this.altAudio&&(ie.type="video"),this.hls.trigger(w.Events.BUFFER_EOS,ie),this.state=v.State.ENDED;return}var oe=U.end,de=this.getNextFragment(oe,W);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Ce=de.sn-W.startSN;Ce>1&&(de=W.fragments[Ce-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===t.FragmentState.OK&&this.nextLoadPosition>oe){var Ae=this.audioOnly&&!this.altAudio?a.ElementaryStreamTypes.AUDIO:a.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,Ae,d.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,W)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((x=de.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((S=de.decryptdata)!==null&&S!==void 0&&S.key)?this.loadKey(de,W):this.loadFragment(de,W,oe)},O.loadFragment=function(x,S,C){var j,F=this.fragmentTracker.getState(x);if(this.fragCurrent=x,F===t.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(x);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);return}else F=t.FragmentState.NOT_LOADED}F===t.FragmentState.NOT_LOADED||F===t.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,x,S,C)):F===t.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((j=this.media)===null||j===void 0?void 0:j.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(x){var S=this.fragmentTracker.getAppendedFrag(x,d.PlaylistLevelType.MAIN);return S&&"fragment"in S?S.fragment:S},O.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,d.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var x=this.levels,S=this.media;if(S!=null&&S.readyState){var C,j=this.getAppendedFrag(S.currentTime);if(j&&j.start>1&&this.flushMainBuffer(0,j.start-1),!S.paused&&x){var F=this.hls.nextLoadLevel,M=x[F],Y=this.fragLastKbps;Y&&this.fragCurrent?C=this.fragCurrent.duration*M.maxBitrate/(1e3*Y)+1:C=0}else C=0;var K=this.getBufferedFrag(S.currentTime+C);if(K){var A=this.followingBufferedFrag(K);if(A){this.abortCurrentFrag();var W=A.maxStartPTS?A.maxStartPTS:A.start,U=A.duration,D=Math.max(K.end,W+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(D,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===v.State.KEY_LOADING&&(this.state=v.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(x,S){p.prototype.flushMainBuffer.call(this,x,S,this.altAudio?"video":null)},O.onMediaAttached=function(x,S){p.prototype.onMediaAttached.call(this,x,S);var C=S.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 n.default(this.config,C,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),p.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var x=this.media,S=x?x.currentTime:null;Object(N.isFiniteNumber)(S)&&this.log("Media seeked to "+S.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(x,S){var C=!1,j=!1,F;S.levels.forEach(function(M){F=M.audioCodec,F&&(F.indexOf("mp4a.40.2")!==-1&&(C=!0),F.indexOf("mp4a.40.5")!==-1&&(j=!0))}),this.audioCodecSwitch=C&&j&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=S.levels,this.startFragRequested=!1},O.onLevelLoading=function(x,S){var C=this.levels;if(!C||this.state!==v.State.IDLE)return;var j=C[S.level];(!j.details||j.details.live&&this.levelLastLoaded!==S.level||this.waitForCdnTuneIn(j.details))&&(this.state=v.State.WAITING_LEVEL)},O.onLevelLoaded=function(x,S){var C,j=this.levels,F=S.level,M=S.details,Y=M.totalduration;if(!j){this.warn("Levels were reset while loading level "+F);return}this.log("Level "+F+" loaded ["+M.startSN+","+M.endSN+"], cc ["+M.startCC+", "+M.endCC+"] duration:"+Y);var K=this.fragCurrent;K&&(this.state===v.State.FRAG_LOADING||this.state===v.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==S.level&&K.loader&&(this.state=v.State.IDLE,K.loader.abort()));var A=j[F],W=0;if(M.live||(C=A.details)!==null&&C!==void 0&&C.live){if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed)return;W=this.alignPlaylists(M,A.details)}if(A.details=M,this.levelLastLoaded=F,this.hls.trigger(w.Events.LEVEL_UPDATED,{details:M,level:F}),this.state===v.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(M))return;this.state=v.State.IDLE}this.startFragRequested?M.live&&this.synchronizeToLiveEdge(M):this.setStartPosition(M,W),this.tick()},O._handleFragmentLoadProgress=function(x){var S,C=x.frag,j=x.part,F=x.payload,M=this.levels;if(!M){this.warn("Levels were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var Y=M[C.level],K=Y.details;if(!K){this.warn("Dropping fragment "+C.sn+" of level "+C.level+" after level details were reset");return}var A=Y.videoCodec,W=K.PTSKnown||!K.live,U=(S=C.initSegment)===null||S===void 0?void 0:S.data,D=this._getAudioCodec(Y),X=this.transmuxer=this.transmuxer||new c.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ie=j?j.index:-1,oe=ie!==-1,de=new o.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,F.byteLength,ie,oe),Ce=this.initPTS[C.cc];X.push(F,U,D,A,C,j,K.totalduration,W,de,Ce)},O.onAudioTrackSwitching=function(x,S){var C=this.altAudio,j=!!S.url,F=S.id;if(!j){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var M=this.fragCurrent;M!=null&&M.loader&&(this.log("Switching to main audio track, cancel main fragment load"),M.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var Y=this.hls;C&&Y.trigger(w.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),Y.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:F})}},O.onAudioTrackSwitched=function(x,S){var C=S.id,j=!!this.hls.audioTracks[C].url;if(j){var F=this.videoBuffer;F&&this.mediaBuffer!==F&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=F)}this.altAudio=j,this.tick()},O.onBufferCreated=function(x,S){var C=S.tracks,j,F,M=!1;for(var Y in C){var K=C[Y];if(K.id==="main"){if(F=Y,j=K,Y==="video"){var A=C[Y];A&&(this.videoBuffer=A.buffer)}}else M=!0}M&&j?(this.log("Alternate track found, use "+F+".buffered to schedule main fragment loading"),this.mediaBuffer=j.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(x,S){var C=S.frag,j=S.part;if(C&&C.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(j?" p: "+j.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state),this.state===v.State.PARSED&&(this.state=v.State.IDLE);return}var F=j?j.stats:C.stats;this.fragLastKbps=Math.round(8*F.total/(F.buffering.end-F.loading.first)),C.sn!=="initSegment"&&(this.fragPrevious=C),this.fragBufferedComplete(C,j)},O.onError=function(x,S){switch(S.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.MAIN,S);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==v.State.ERROR&&(S.fatal?(this.warn(""+S.details),this.state=v.State.ERROR):!S.levelRetry&&this.state===v.State.WAITING_LEVEL&&(this.state=v.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(S.parent==="main"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var C=!0,j=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);j&&j.len>.5&&(C=!this.reduceMaxBufferLength(j.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 x=this.media,S=this.gapController;if(!x||!S||!x.readyState)return;var C=b.BufferHelper.getBuffered(x);!this.loadedmetadata&&C.length?(this.loadedmetadata=!0,this.seekToStartPos()):S.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=v.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(x,S){var C=S.type;if(C!==a.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var j=(C===a.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(j,C,d.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(x,S){this.levels=S.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var x=this.media,S=x.currentTime,C=this.startPosition;if(C>=0&&S<C){if(x.seeking){h.logger.log("could not seek to "+C+", already seeking at "+S);return}var j=b.BufferHelper.getBuffered(x),F=j.length?j.start(0):0,M=F-C;M>0&&(M<this.config.maxBufferHole||M<this.config.maxFragLookUpTolerance)&&(h.logger.log("adjusting start position by "+M+" to match buffer start"),C+=M,this.startPosition=C),this.log("seek to target start position "+C+" from current time "+S),x.currentTime=C}},O._getAudioCodec=function(x){var S=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&S&&(this.log("Swapping audio codec"),S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),S},O._loadBitrateTestFrag=function(x){var S=this;this._doFragLoad(x).then(function(C){var j=S.hls;if(!C||j.nextLoadLevel||S.fragContextChanged(x))return;S.fragLoadError=0,S.state=v.State.IDLE,S.startFragRequested=!1,S.bitrateTest=!1;var F=x.stats;F.parsing.start=F.parsing.end=F.buffering.start=F.buffering.end=self.performance.now(),j.trigger(w.Events.FRAG_LOADED,C)})},O._handleTransmuxComplete=function(x){var S,C="main",j=this.hls,F=x.remuxResult,M=x.chunkMeta,Y=this.getCurrentContext(M);if(!Y){this.warn("The loading context changed while buffering fragment "+M.sn+" of level "+M.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(M.level);return}var K=Y.frag,A=Y.part,W=Y.level,U=F.video,D=F.text,X=F.id3,ie=F.initSegment,oe=this.altAudio?void 0:F.audio;if(this.fragContextChanged(K))return;if(this.state=v.State.PARSING,ie){ie.tracks&&(this._bufferInitSegment(W,ie.tracks,K,M),j.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:C,tracks:ie.tracks}));var de=ie.initPTS,Ce=ie.timescale;Object(N.isFiniteNumber)(de)&&(this.initPTS[K.cc]=de,j.trigger(w.Events.INIT_PTS_FOUND,{frag:K,id:C,initPTS:de,timescale:Ce}))}if(U&&F.independent!==!1){if(W.details){var Ae=U.startPTS,me=U.endPTS,Se=U.startDTS,ye=U.endDTS;if(A)A.elementaryStreams[U.type]={startPTS:Ae,endPTS:me,startDTS:Se,endDTS:ye};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var se=this.getLoadPosition()+this.config.maxBufferHole;if(se<Ae){this.backtrack(K);return}K.setElementaryStreamInfo(U.type,K.start,me,K.start,ye,!0)}K.setElementaryStreamInfo(U.type,Ae,me,Se,ye),this.bufferFragmentData(U,K,A,M)}}else if(F.independent===!1){this.backtrack(K);return}if(oe){var ee=oe.startPTS,B=oe.endPTS,G=oe.startDTS,V=oe.endDTS;A&&(A.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:B,startDTS:G,endDTS:V}),K.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ee,B,G,V),this.bufferFragmentData(oe,K,A,M)}if(X!=null&&(S=X.samples)!==null&&S!==void 0&&S.length){var Q={frag:K,id:C,samples:X.samples};j.trigger(w.Events.FRAG_PARSING_METADATA,Q)}if(D){var Z={frag:K,id:C,samples:D.samples};j.trigger(w.Events.FRAG_PARSING_USERDATA,Z)}},O._bufferInitSegment=function(x,S,C,j){var F=this;if(this.state!==v.State.PARSING)return;this.audioOnly=!!S.audio&&!S.video,this.altAudio&&!this.audioOnly&&delete S.audio;var M=S.audio,Y=S.video,K=S.audiovideo;if(M){var A=x.audioCodec,W=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(A&&(A.indexOf("mp4a.40.5")!==-1?A="mp4a.40.2":A="mp4a.40.5"),M.metadata.channelCount!==1&&W.indexOf("firefox")===-1&&(A="mp4a.40.5")),W.indexOf("android")!==-1&&M.container!=="audio/mpeg"&&(A="mp4a.40.2",this.log("Android: force audio codec to "+A)),x.audioCodec&&x.audioCodec!==A&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+A+'"'),M.levelCodec=A,M.id="main",this.log("Init audio buffer, container:"+M.container+", codecs[selected/level/parsed]=["+(A||"")+"/"+(x.audioCodec||"")+"/"+M.codec+"]")}Y&&(Y.levelCodec=x.videoCodec,Y.id="main",this.log("Init video buffer, container:"+Y.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+Y.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,S),Object.keys(S).forEach(function(U){var D=S[U],X=D.initSegment;X!=null&&X.byteLength&&F.hls.trigger(w.Events.BUFFER_APPENDING,{type:U,data:X,frag:C,part:null,chunkMeta:j,parent:C.type})}),this.tick()},O.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var S=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,S?this.resetFragmentLoading(x):this.state=v.State.BACKTRACKING},O.checkFragmentChanged=function(){var x=this.media,S=null;if(x&&x.readyState>1&&x.seeking===!1){var C=x.currentTime;if(b.BufferHelper.isBuffered(x,C)?S=this.getAppendedFrag(C):b.BufferHelper.isBuffered(x,C+.1)&&(S=this.getAppendedFrag(C+.1)),S){var j=this.fragPlaying,F=S.level;(!j||S.sn!==j.sn||j.level!==F||S.urlId!==j.urlId)&&(this.hls.trigger(w.Events.FRAG_CHANGED,{frag:S}),(!j||j.level!==F)&&this.hls.trigger(w.Events.LEVEL_SWITCHED,{level:F}),this.fragPlaying=S)}}},u(R,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var S=this.getAppendedFrag(x.currentTime);if(S)return S.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var S=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(S)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(v.default)},"./src/controller/subtitle-stream-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"SubtitleStreamController",function(){return i});var N=T("./src/events.ts"),v=T("./src/utils/logger.ts"),m=T("./src/utils/buffer-helper.ts"),w=T("./src/controller/fragment-finders.ts"),b=T("./src/utils/discontinuities.ts"),t=T("./src/controller/level-helper.ts"),d=T("./src/controller/fragment-tracker.ts"),a=T("./src/controller/base-stream-controller.ts"),c=T("./src/types/loader.ts"),o=T("./src/types/level.ts");function n(r,E){for(var y=0;y<E.length;y++){var p=E[y];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(r,p.key,p)}}function s(r,E,y){return E&&n(r.prototype,E),y&&n(r,y),r}function h(r,E){r.prototype=Object.create(E.prototype),r.prototype.constructor=r,f(r,E)}function f(r,E){return f=Object.setPrototypeOf||function(p,R){return p.__proto__=R,p},f(r,E)}var u=500,i=function(r){h(E,r);function E(p,R){var O;return O=r.call(this,p,R,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var y=E.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var R=this.hls;R.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(N.Events.ERROR,this.onError,this),R.on(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(N.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(N.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var R=this.hls;R.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(N.Events.ERROR,this.onError,this),R.off(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(N.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(N.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=a.State.IDLE,this.setInterval(u),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(R,O){this.mainDetails=O.details},y.onSubtitleFragProcessed=function(R,O){var _=O.frag,x=O.success;if(this.fragPrevious=_,this.state=a.State.IDLE,!x)return;var S=this.tracksBuffered[this.currentTrackId];if(!S)return;for(var C,j=_.start,F=0;F<S.length;F++)if(j>=S[F].start&&j<=S[F].end){C=S[F];break}var M=_.start+_.duration;C?C.end=M:(C={start:j,end:M},S.push(C)),this.fragmentTracker.fragBuffered(_)},y.onBufferFlushing=function(R,O){var _=O.startOffset,x=O.endOffset;if(_===0&&x!==Number.POSITIVE_INFINITY){var S=this.currentTrackId,C=this.levels;if(!C.length||!C[S]||!C[S].details)return;var j=C[S].details,F=j.targetduration,M=x-F;if(M<=0)return;O.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(Y){for(var K=0;K<Y.length;){if(Y[K].end<=M){Y.shift();continue}else if(Y[K].start<M)Y[K].start=M;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(_,M,c.PlaylistLevelType.SUBTITLE)}},y.onError=function(R,O){var _,x=O.frag;if(!x||x.type!==c.PlaylistLevelType.SUBTITLE)return;(_=this.fragCurrent)!==null&&_!==void 0&&_.loader&&this.fragCurrent.loader.abort(),this.state=a.State.IDLE},y.onSubtitleTracksUpdated=function(R,O){var _=this,x=O.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(S){return new o.Level(S)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(S){_.tracksBuffered[S.id]=[]}),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(R,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var _=this.levels[this.currentTrackId];_!=null&&_.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,_&&this.setInterval(u)},y.onSubtitleTrackLoaded=function(R,O){var _,x=O.details,S=O.id,C=this.currentTrackId,j=this.levels;if(!j.length)return;var F=j[C];if(S>=j.length||S!==C||!F)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(_=F.details)!==null&&_!==void 0&&_.live){var M=this.mainDetails;if(x.deltaUpdateFailed||!M)return;var Y=M.fragments[0];if(!F.details)x.hasProgramDateTime&&M.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(x,M):Y&&Object(t.addSliding)(x,Y.start);else{var K=this.alignPlaylists(x,F.details);K===0&&Y&&Object(t.addSliding)(x,Y.start)}}if(F.details=x,this.levelLastLoaded=S,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===a.State.IDLE){var A=Object(w.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);A||(this.warn("Subtitle playlist not aligned with playback"),F.details=void 0)}},y._handleFragmentLoadComplete=function(R){var O=R.frag,_=R.payload,x=O.decryptdata,S=this.hls;if(this.fragContextChanged(O))return;if(_&&_.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var C=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(_),x.key.buffer,x.iv.buffer).then(function(j){var F=performance.now();S.trigger(N.Events.FRAG_DECRYPTED,{frag:O,payload:j,stats:{tstart:C,tdecrypt:F}})})}},y.doTick=function(){if(!this.media){this.state=a.State.IDLE;return}if(this.state===a.State.IDLE){var R,O=this.currentTrackId,_=this.levels;if(!_.length||!_[O]||!_[O].details)return;var x=_[O].details,S=x.targetduration,C=this.config,j=this.media,F=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,j.currentTime-S,C.maxBufferHole),M=F.end,Y=F.len,K=this.getMaxBufferLength()+S;if(Y>K)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var A=x.fragments,W=A.length,U=x.edge,D,X=this.fragPrevious;if(M<U){var ie=C.maxFragLookUpTolerance;X&&x.hasProgramDateTime&&(D=Object(w.findFragmentByPDT)(A,X.endProgramDateTime,ie)),D||(D=Object(w.findFragmentByPTS)(X,A,M,ie),!D&&X&&X.start<A[0].start&&(D=A[0]))}else D=A[W-1];(R=D)!==null&&R!==void 0&&R.encrypted?(v.logger.log("Loading key for "+D.sn),this.state=a.State.KEY_LOADING,this.hls.trigger(N.Events.KEY_LOADING,{frag:D})):D&&this.fragmentTracker.getState(D)===d.FragmentState.NOT_LOADED&&this.loadFragment(D,x,M)}},y.loadFragment=function(R,O,_){this.fragCurrent=R,r.prototype.loadFragment.call(this,R,O,_)},s(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(a.default)},"./src/controller/subtitle-track-controller.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/events.ts"),v=T("./src/utils/texttrack-utils.ts"),m=T("./src/controller/base-playlist-controller.ts"),w=T("./src/types/loader.ts");function b(n,s){for(var h=0;h<s.length;h++){var f=s[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function t(n,s,h){return s&&b(n.prototype,s),h&&b(n,h),n}function d(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,a(n,s)}function a(n,s){return a=Object.setPrototypeOf||function(f,u){return f.__proto__=u,f},a(n,s)}var c=function(n){d(s,n);function s(f){var u;return u=n.call(this,f,"[subtitle-track-controller]")||this,u.media=null,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.selectDefaultTrack=!0,u.queuedDefaultTrack=-1,u.trackChangeListener=function(){return u.onTextTracksChanged()},u.asyncPollTrackChange=function(){return u.pollTrackChange(0)},u.useTextTrackPolling=!1,u.subtitlePollingInterval=-1,u.subtitleDisplay=!0,u.registerListeners(),u}var h=s.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,n.prototype.destroy.call(this)},h.registerListeners=function(){var u=this.hls;u.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.on(N.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var u=this.hls;u.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.off(N.Events.ERROR,this.onError,this)},h.onMediaAttached=function(u,i){if(this.media=i.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)},h.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},h.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var u=o(this.media.textTracks);u.forEach(function(i){Object(v.clearCurrentCues)(i)}),this.subtitleTrack=-1,this.media=null},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(u,i){this.tracks=i.subtitleTracks},h.onSubtitleTrackLoaded=function(u,i){var r=i.id,E=i.details,y=this.trackId,p=this.tracksInGroup[y];if(!p){this.warn("Invalid subtitle track id "+r);return}var R=p.details;p.details=i.details,this.log("subtitle track "+r+" loaded ["+E.startSN+"-"+E.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,i,R))},h.onLevelLoading=function(u,i){this.switchLevel(i.level)},h.onLevelSwitching=function(u,i){this.switchLevel(i.level)},h.switchLevel=function(u){var i=this.hls.levels[u];if(!(i!=null&&i.textGroupIds))return;var r=i.textGroupIds[i.urlId];if(this.groupId!==r){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(O){return!r||O.groupId===r});this.tracksInGroup=y;var p=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=r;var R={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(N.Events.SUBTITLE_TRACKS_UPDATED,R),p!==-1&&this.setSubtitleTrack(p,E)}},h.findTrackId=function(u){for(var i=this.tracksInGroup,r=0;r<i.length;r++){var E=i[r];if((!this.selectDefaultTrack||E.default)&&(!u||u===E.name))return E.id}return-1},h.onError=function(u,i){if(n.prototype.onError.call(this,u,i),i.fatal||!i.context)return;i.context.type===w.PlaylistContextType.SUBTITLE_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},h.loadPlaylist=function(u){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var r=i.id,E=i.groupId,y=i.url;if(u)try{y=u.addDirectives(y)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADING,{url:y,id:r,groupId:E,deliveryDirectives:u||null})}},h.toggleTrackModes=function(u){var i=this,r=this.media,E=this.subtitleDisplay,y=this.trackId;if(!r)return;var p=o(r.textTracks),R=p.filter(function(x){return x.groupId===i.groupId});if(u===-1)[].slice.call(p).forEach(function(x){x.mode="disabled"});else{var O=R[y];O&&(O.mode="disabled")}var _=R[u];_&&(_.mode=E?"showing":"hidden")},h.setSubtitleTrack=function(u,i){var r,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=u;return}if(this.trackId!==u&&this.toggleTrackModes(u),this.trackId===u&&(u===-1||(r=E[u])!==null&&r!==void 0&&r.details)||u<-1||u>=E.length)return;this.clearTimer();var y=E[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,y){var p=y.id,R=y.groupId,O=R===void 0?"":R,_=y.name,x=y.type,S=y.url;this.hls.trigger(N.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:O,name:_,type:x,url:S});var C=this.switchParams(y.url,i==null?void 0:i.details);this.loadPlaylist(C)}else this.hls.trigger(N.Events.SUBTITLE_TRACK_SWITCH,{id:u})},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,i=o(this.media.textTracks),r=0;r<i.length;r++)if(i[r].mode==="hidden")u=r;else if(i[r].mode==="showing"){u=r;break}this.subtitleTrack!==u&&(this.subtitleTrack=u)},t(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1;var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(u,i)}}]),s}(m.default);function o(n){for(var s=[],h=0;h<n.length;h++){var f=n[h];f.kind==="subtitles"&&f.label&&s.push(n[h])}return s}g.default=c},"./src/controller/timeline-controller.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"TimelineController",function(){return o});var N=T("./src/polyfills/number.ts"),v=T("./src/events.ts"),m=T("./src/utils/cea-608-parser.ts"),w=T("./src/utils/output-filter.ts"),b=T("./src/utils/webvtt-parser.ts"),t=T("./src/utils/texttrack-utils.ts"),d=T("./src/utils/imsc1-ttml-parser.ts"),a=T("./src/types/loader.ts"),c=T("./src/utils/logger.ts"),o=function(){function f(i){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=h(),this.captionsProperties=void 0,this.hls=i,this.config=i.config,this.Cues=i.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var r=new w.default(this,"textTrack1"),E=new w.default(this,"textTrack2"),y=new w.default(this,"textTrack3"),p=new w.default(this,"textTrack4");this.cea608Parser1=new m.default(1,r,E),this.cea608Parser2=new m.default(3,y,p)}i.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.on(v.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.on(v.Events.FRAG_LOADING,this.onFragLoading,this),i.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(v.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.on(v.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.on(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.on(v.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var u=f.prototype;return u.destroy=function(){var r=this.hls;r.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.off(v.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.off(v.Events.FRAG_LOADING,this.onFragLoading,this),r.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),r.off(v.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.off(v.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.off(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(v.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},u.addCues=function(r,E,y,p,R){for(var O=!1,_=R.length;_--;){var x=R[_],S=s(x[0],x[1],E,y);if(S>=0&&(x[0]=Math.min(x[0],E),x[1]=Math.max(x[1],y),O=!0,S/(y-E)>.5))return}if(O||R.push([E,y]),this.config.renderTextTracksNatively){var C=this.captionsTracks[r];this.Cues.newCue(C,E,y,p)}else{var j=this.Cues.newCue(null,E,y,p);this.hls.trigger(v.Events.CUES_PARSED,{type:"captions",cues:j,track:r})}},u.onInitPtsFound=function(r,E){var y=this,p=E.frag,R=E.id,O=E.initPTS,_=E.timescale,x=this.unparsedVttFrags;R==="main"&&(this.initPTS[p.cc]=O,this.timescale[p.cc]=_),x.length&&(this.unparsedVttFrags=[],x.forEach(function(S){y.onFragLoaded(v.Events.FRAG_LOADED,S)}))},u.getExistingTrack=function(r){var E=this.media;if(E)for(var y=0;y<E.textTracks.length;y++){var p=E.textTracks[y];if(p[r])return p}return null},u.createCaptionsTrack=function(r){this.config.renderTextTracksNatively?this.createNativeTrack(r):this.createNonNativeTrack(r)},u.createNativeTrack=function(r){if(this.captionsTracks[r])return;var E=this.captionsProperties,y=this.captionsTracks,p=this.media,R=E[r],O=R.label,_=R.languageCode,x=this.getExistingTrack(r);if(x)y[r]=x,Object(t.clearCurrentCues)(y[r]),Object(t.sendAddTrackEvent)(y[r],p);else{var S=this.createTextTrack("captions",O,_);S&&(S[r]=!0,y[r]=S)}},u.createNonNativeTrack=function(r){if(this.nonNativeCaptionsTracks[r])return;var E=this.captionsProperties[r];if(!E)return;var y=E.label,p={_id:r,label:y,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[r]=p,this.hls.trigger(v.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},u.createTextTrack=function(r,E,y){var p=this.media;return p?p.addTextTrack(r,E,y):void 0},u.onMediaAttaching=function(r,E){this.media=E.media,this._cleanTracks()},u.onMediaDetaching=function(){var r=this.captionsTracks;Object.keys(r).forEach(function(E){Object(t.clearCurrentCues)(r[E]),delete r[E]}),this.nonNativeCaptionsTracks={}},u.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},u._cleanTracks=function(){var r=this.media;if(!r)return;var E=r.textTracks;if(E)for(var y=0;y<E.length;y++)Object(t.clearCurrentCues)(E[y])},u.onSubtitleTracksUpdated=function(r,E){var y=this;this.textTracks=[];var p=E.subtitleTracks||[],R=p.some(function(S){return S.textCodec===d.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var O=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(S,C){var j;if(C<_.length){for(var F=null,M=0;M<_.length;M++)if(n(_[M],S)){F=_[M];break}F&&(j=F)}j?Object(t.clearCurrentCues)(j):(j=y.createTextTrack("subtitles",S.name,S.lang),j&&(j.mode="disabled")),j&&(j.groupId=S.groupId,y.textTracks.push(j))})}else if(!O&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(S){return{label:S.name,kind:S.type.toLowerCase(),default:S.default,subtitleTrack:S}});this.hls.trigger(v.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},u.onManifestLoaded=function(r,E){var y=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(p){var R=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!R)return;var O="textTrack"+R[1],_=y.captionsProperties[O];if(!_)return;_.label=p.name,p.lang&&(_.languageCode=p.lang),_.media=p})},u.onFragLoading=function(r,E){var y=this.cea608Parser1,p=this.cea608Parser2,R=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(y&&p))return;if(E.frag.type===a.PlaylistLevelType.MAIN){var _,x,S=E.frag.sn,C=(_=E==null||((x=E.part)===null||x===void 0)?void 0:x.index)!=null?_:-1;S===R+1||S===R&&C===O+1||(y.reset(),p.reset()),this.lastSn=S,this.lastPartIndex=C}},u.onFragLoaded=function(r,E){var y=E.frag,p=E.payload,R=this.initPTS,O=this.unparsedVttFrags;if(y.type===a.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(N.isFiniteNumber)(R[y.cc])){O.push(E),R.length&&this.hls.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var _=y.decryptdata;if(_==null||_.key==null||_.method!=="AES-128"){var x=this.tracks[y.level],S=this.vttCCs;S[y.cc]||(S[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),x&&x.textCodec===d.IMSC1_CODEC?this._parseIMSC1(y,p):this._parseVTTs(y,p,S)}}else this.hls.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},u._parseIMSC1=function(r,E){var y=this,p=this.hls;Object(d.parseIMSC1)(E,this.initPTS[r.cc],this.timescale[r.cc],function(R){y._appendCues(R,r.level),p.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(R){c.logger.log("Failed to parse IMSC1: "+R),p.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:R})})},u._parseVTTs=function(r,E,y){var p=this,R=this.hls;Object(b.parseWebVTT)(E,this.initPTS[r.cc],this.timescale[r.cc],y,r.cc,r.start,function(O){p._appendCues(O,r.level),R.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(O){p._fallbackToIMSC1(r,E),c.logger.log("Failed to parse VTT cue: "+O),R.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:O})})},u._fallbackToIMSC1=function(r,E){var y=this,p=this.tracks[r.level];p.textCodec||Object(d.parseIMSC1)(E,this.initPTS[r.cc],this.timescale[r.cc],function(){p.textCodec=d.IMSC1_CODEC,y._parseIMSC1(r,E)},function(){p.textCodec="wvtt"})},u._appendCues=function(r,E){var y=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[E];if(p.mode==="disabled")return;r.forEach(function(_){return Object(t.addCueToTrack)(p,_)})}else{var R=this.tracks[E],O=R.default?"default":"subtitles"+E;y.trigger(v.Events.CUES_PARSED,{type:"subtitles",cues:r,track:O})}},u.onFragDecrypted=function(r,E){var y=E.frag;if(y.type===a.PlaylistLevelType.SUBTITLE){if(!Object(N.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(v.Events.FRAG_LOADED,E)}},u.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},u.onFragParsingUserdata=function(r,E){var y=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(y&&p))return;for(var R=0;R<E.samples.length;R++){var O=E.samples[R].bytes;if(O){var _=this.extractCea608Data(O);y.addData(E.samples[R].pts,_[0]),p.addData(E.samples[R].pts,_[1])}}},u.onBufferFlushing=function(r,E){var y=E.startOffset,p=E.endOffset,R=E.endOffsetSubtitles,O=E.type,_=this.media;if(!_||_.currentTime<p)return;if(!O||O==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(C){return Object(t.removeCuesInRange)(x[C],y,p)})}if(this.config.renderTextTracksNatively&&(y===0&&R!==void 0)){var S=this.textTracks;Object.keys(S).forEach(function(C){return Object(t.removeCuesInRange)(S[C],y,R)})}},u.extractCea608Data=function(r){for(var E=r[0]&31,y=2,p=[[],[]],R=0;R<E;R++){var O=r[y++],_=127&r[y++],x=127&r[y++],S=(4&O)!==0,C=3&O;if(_===0&&x===0)continue;S&&((C===0||C===1)&&(p[C].push(_),p[C].push(x)))}return p},f}();function n(f,u){return f&&f.label===u.name&&!(f.textTrack1||f.textTrack2)}function s(f,u,i,r){return Math.min(u,r)-Math.max(f,i)}function h(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return N});var N=function(){function v(w,b){this.subtle=void 0,this.aesIV=void 0,this.subtle=w,this.aesIV=b}var m=v.prototype;return m.decrypt=function(b,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,b)},v}()},"./src/crypt/aes-decryptor.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"removePadding",function(){return v}),T.d(g,"default",function(){return m});var N=T("./src/utils/typed-array.ts");function v(w){var b=w.byteLength,t=b&&new DataView(w.buffer).getUint8(b-1);return t?Object(N.sliceUint8)(w,0,b-t):w}var m=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 b=w.prototype;return b.uint8ArrayToUint32Array_=function(d){for(var a=new DataView(d),c=new Uint32Array(4),o=0;o<4;o++)c[o]=a.getUint32(o*4);return c},b.initTable=function(){var d=this.sBox,a=this.invSBox,c=this.subMix,o=c[0],n=c[1],s=c[2],h=c[3],f=this.invSubMix,u=f[0],i=f[1],r=f[2],E=f[3],y=new Uint32Array(256),p=0,R=0,O=0;for(O=0;O<256;O++)O<128?y[O]=O<<1:y[O]=O<<1^283;for(O=0;O<256;O++){var _=R^R<<1^R<<2^R<<3^R<<4;_=_>>>8^_&255^99,d[p]=_,a[_]=p;var x=y[p],S=y[x],C=y[S],j=y[_]*257^_*16843008;o[p]=j<<24|j>>>8,n[p]=j<<16|j>>>16,s[p]=j<<8|j>>>24,h[p]=j,j=C*16843009^S*65537^x*257^p*16843008,u[_]=j<<24|j>>>8,i[_]=j<<16|j>>>16,r[_]=j<<8|j>>>24,E[_]=j,p?(p=x^y[y[y[C^x]]],R^=y[y[R]]):p=R=1}},b.expandKey=function(d){for(var a=this.uint8ArrayToUint32Array_(d),c=!0,o=0;o<a.length&&c;)c=a[o]===this.key[o],o++;if(c)return;this.key=a;var n=this.keySize=a.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);var s=this.ksRows=(n+6+1)*4,h,f,u=this.keySchedule=new Uint32Array(s),i=this.invKeySchedule=new Uint32Array(s),r=this.sBox,E=this.rcon,y=this.invSubMix,p=y[0],R=y[1],O=y[2],_=y[3],x,S;for(h=0;h<s;h++){if(h<n){x=u[h]=a[h];continue}S=x,h%n===0?(S=S<<8|S>>>24,S=r[S>>>24]<<24|r[S>>>16&255]<<16|r[S>>>8&255]<<8|r[S&255],S^=E[h/n|0]<<24):n>6&&h%n===4&&(S=r[S>>>24]<<24|r[S>>>16&255]<<16|r[S>>>8&255]<<8|r[S&255]),u[h]=x=(u[h-n]^S)>>>0}for(f=0;f<s;f++)h=s-f,f&3?S=u[h]:S=u[h-4],f<4||h<=4?i[f]=S:i[f]=p[r[S>>>24]]^R[r[S>>>16&255]]^O[r[S>>>8&255]]^_[r[S&255]],i[f]=i[f]>>>0},b.networkToHostOrderSwap=function(d){return d<<24|(d&65280)<<8|(d&16711680)>>8|d>>>24},b.decrypt=function(d,a,c){for(var o=this.keySize+6,n=this.invKeySchedule,s=this.invSBox,h=this.invSubMix,f=h[0],u=h[1],i=h[2],r=h[3],E=this.uint8ArrayToUint32Array_(c),y=E[0],p=E[1],R=E[2],O=E[3],_=new Int32Array(d),x=new Int32Array(_.length),S,C,j,F,M,Y,K,A,W,U,D,X,ie,oe,de=this.networkToHostOrderSwap;a<_.length;){for(W=de(_[a]),U=de(_[a+1]),D=de(_[a+2]),X=de(_[a+3]),M=W^n[0],Y=X^n[1],K=D^n[2],A=U^n[3],ie=4,oe=1;oe<o;oe++)S=f[M>>>24]^u[Y>>16&255]^i[K>>8&255]^r[A&255]^n[ie],C=f[Y>>>24]^u[K>>16&255]^i[A>>8&255]^r[M&255]^n[ie+1],j=f[K>>>24]^u[A>>16&255]^i[M>>8&255]^r[Y&255]^n[ie+2],F=f[A>>>24]^u[M>>16&255]^i[Y>>8&255]^r[K&255]^n[ie+3],M=S,Y=C,K=j,A=F,ie=ie+4;S=s[M>>>24]<<24^s[Y>>16&255]<<16^s[K>>8&255]<<8^s[A&255]^n[ie],C=s[Y>>>24]<<24^s[K>>16&255]<<16^s[A>>8&255]<<8^s[M&255]^n[ie+1],j=s[K>>>24]<<24^s[A>>16&255]<<16^s[M>>8&255]<<8^s[Y&255]^n[ie+2],F=s[A>>>24]<<24^s[M>>16&255]<<16^s[Y>>8&255]<<8^s[K&255]^n[ie+3],x[a]=de(S^y),x[a+1]=de(F^p),x[a+2]=de(j^R),x[a+3]=de(C^O),y=W,p=U,R=D,O=X,a=a+4}return x.buffer},w}()},"./src/crypt/decrypter.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return a});var N=T("./src/crypt/aes-crypto.ts"),v=T("./src/crypt/fast-aes-key.ts"),m=T("./src/crypt/aes-decryptor.ts"),w=T("./src/utils/logger.ts"),b=T("./src/utils/mp4-tools.ts"),t=T("./src/utils/typed-array.ts"),d=16,a=function(){function c(n,s,h){var f=h===void 0?{}:h,u=f.removePKCS7Padding,i=u===void 0?!0:u;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=n,this.config=s,this.removePKCS7Padding=i,i)try{var r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(E){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var o=c.prototype;return o.destroy=function(){this.observer=null},o.isSync=function(){return this.config.enableSoftwareAES},o.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var h=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(h):h},o.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},o.decrypt=function(s,h,f,u){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),h,f);var i=this.flush();i&&u(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),h,f).then(u)},o.softwareDecrypt=function(s,h,f){var u=this.currentIV,i=this.currentResult,r=this.remainderData;this.logOnce("JS AES decrypt"),r&&(s=Object(b.appendUint8Array)(r,s),this.remainderData=null);var E=this.getValidChunk(s);if(!E.length)return null;u&&(f=u);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new m.default),y.expandKey(h);var p=i;return this.currentResult=y.decrypt(E.buffer,0,f),this.currentIV=Object(t.sliceUint8)(E,-16).buffer,p||null},o.webCryptoDecrypt=function(s,h,f){var u=this,i=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new v.default(i,h)),this.fastAesKey.expandKey().then(function(r){if(!i)return Promise.reject(new Error("web crypto not initialized"));var E=new N.default(i,f);return E.decrypt(s.buffer,r)}).catch(function(r){return u.onWebCryptoError(r,s,h,f)})},o.onWebCryptoError=function(s,h,f,u){return w.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(h,f,u)},o.getValidChunk=function(s){var h=s,f=s.length-s.length%d;return f!==s.length&&(h=Object(t.sliceUint8)(s,0,f),this.remainderData=Object(t.sliceUint8)(s,f)),h},o.logOnce=function(s){if(!this.logEnabled)return;w.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return N});var N=function(){function v(w,b){this.subtle=void 0,this.key=void 0,this.subtle=w,this.key=b}var m=v.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},v}()},"./src/demux/aacdemuxer.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/demux/base-audio-demuxer.ts"),v=T("./src/demux/adts.ts"),m=T("./src/utils/logger.ts"),w=T("./src/demux/id3.ts");function b(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,t(a,c)}function t(a,c){return t=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},t(a,c)}var d=function(a){b(c,a);function c(n,s){var h;return h=a.call(this)||this,h.observer=void 0,h.config=void 0,h.observer=n,h.config=s,h}var o=c.prototype;return o.resetInitSegment=function(s,h,f){a.prototype.resetInitSegment.call(this,s,h,f),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var h=w.getID3Data(s,0)||[],f=h.length,u=s.length;f<u;f++)if(v.probe(s,f))return m.logger.log("ADTS sync word found !"),!0;return!1},o.canParse=function(s,h){return v.canParse(s,h)},o.appendFrame=function(s,h,f){v.initTrackConfig(s,this.observer,h,f,s.manifestCodec);var u=v.appendFrame(s,h,f,this.initPTS,this.frameIndex);if(u&&u.missing===0)return u},c}(N.default);d.minProbeByteLength=9,g.default=d},"./src/demux/adts.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"getAudioConfig",function(){return w}),T.d(g,"isHeaderPattern",function(){return b}),T.d(g,"getHeaderLength",function(){return t}),T.d(g,"getFullFrameLength",function(){return d}),T.d(g,"canGetFrameLength",function(){return a}),T.d(g,"isHeader",function(){return c}),T.d(g,"canParse",function(){return o}),T.d(g,"probe",function(){return n}),T.d(g,"initTrackConfig",function(){return s}),T.d(g,"getFrameDuration",function(){return h}),T.d(g,"parseFrameHeader",function(){return f}),T.d(g,"appendFrame",function(){return u});var N=T("./src/utils/logger.ts"),v=T("./src/errors.ts"),m=T("./src/events.ts");function w(i,r,E,y){var p,R,O,_,x=navigator.userAgent.toLowerCase(),S=y,C=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((r[E+2]&192)>>>6)+1;var j=(r[E+2]&60)>>>2;if(j>C.length-1){i.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+j});return}return O=(r[E+2]&1)<<2,O|=(r[E+3]&192)>>>6,N.logger.log("manifest codec:"+y+", ADTS type:"+p+", samplingIndex:"+j),/firefox/i.test(x)?j>=6?(p=5,_=new Array(4),R=j-3):(p=2,_=new Array(2),R=j):x.indexOf("android")!==-1?(p=2,_=new Array(2),R=j):(p=5,_=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&j>=6?R=j-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(j>=6&&O===1||/vivaldi/i.test(x))||!y&&O===1)&&(p=2,_=new Array(2)),R=j)),_[0]=p<<3,_[0]|=(j&14)>>1,_[1]|=(j&1)<<7,_[1]|=O<<3,p===5&&(_[1]|=(R&14)>>1,_[2]=(R&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:C[j],channelCount:O,codec:"mp4a.40."+p,manifestCodec:S}}function b(i,r){return i[r]===255&&(i[r+1]&246)===240}function t(i,r){return i[r+1]&1?7:9}function d(i,r){return(i[r+3]&3)<<11|i[r+4]<<3|(i[r+5]&224)>>>5}function a(i,r){return r+5<i.length}function c(i,r){return r+1<i.length&&b(i,r)}function o(i,r){return a(i,r)&&b(i,r)&&d(i,r)<=i.length-r}function n(i,r){if(c(i,r)){var E=t(i,r);if(r+E>=i.length)return!1;var y=d(i,r);if(y<=E)return!1;var p=r+y;return p===i.length||c(i,p)}return!1}function s(i,r,E,y,p){if(!i.samplerate){var R=w(r,E,y,p);if(!R)return;i.config=R.config,i.samplerate=R.samplerate,i.channelCount=R.channelCount,i.codec=R.codec,i.manifestCodec=R.manifestCodec,N.logger.log("parsed codec:"+i.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function h(i){return 1024*9e4/i}function f(i,r,E,y,p){var R=t(i,r),O=d(i,r);if(O-=R,O>0){var _=E+y*p;return{headerLength:R,frameLength:O,stamp:_}}}function u(i,r,E,y,p){var R=h(i.samplerate),O=f(r,E,y,p,R);if(O){var _=O.frameLength,x=O.headerLength,S=O.stamp,C=x+_,j=Math.max(0,E+C-r.length),F;j?(F=new Uint8Array(C-x),F.set(r.subarray(E+x,r.length),0)):F=r.subarray(E+x,E+C);var M={unit:F,pts:S};return j||i.samples.push(M),{sample:M,length:C,missing:j}}}},"./src/demux/base-audio-demuxer.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"initPTSFn",function(){return d});var N=T("./src/polyfills/number.ts"),v=T("./src/demux/id3.ts"),m=T("./src/demux/dummy-demuxed-track.ts"),w=T("./src/utils/mp4-tools.ts"),b=T("./src/utils/typed-array.ts"),t=function(){function a(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=a.prototype;return c.resetInitSegment=function(n,s,h){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(n,s){return!1},c.appendFrame=function(n,s,h){},c.demux=function(n,s){this.cachedData&&(n=Object(w.appendUint8Array)(this.cachedData,n),this.cachedData=null);var h=v.getID3Data(n,0),f=h?h.length:0,u,i,r=this._audioTrack,E=this._id3Track,y=h?v.getTimeStamp(h):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(y,s)),h&&h.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:h}),i=this.initPTS;f<p;){if(this.canParse(n,f)){var R=this.appendFrame(r,n,f);R?(this.frameIndex++,i=R.sample.pts,f+=R.length,u=f):f=p}else v.canParse(n,f)?(h=v.getID3Data(n,f),E.samples.push({pts:i,dts:i,data:h}),f+=h.length,u=f):f++;if(f===p&&u!==p){var O=Object(b.sliceUint8)(n,u);this.cachedData?this.cachedData=Object(w.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:r,avcTrack:Object(m.dummyTrack)(),id3Track:E,textTrack:Object(m.dummyTrack)()}},c.demuxSampleAes=function(n,s,h){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(n){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},c.destroy=function(){},a}(),d=function(c,o){return Object(N.isFiniteNumber)(c)?c*90:o*9e4};g.default=t},"./src/demux/chunk-cache.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return N});var N=function(){function m(){this.chunks=[],this.dataLength=0}var w=m.prototype;return w.push=function(t){this.chunks.push(t),this.dataLength+=t.length},w.flush=function(){var t=this.chunks,d=this.dataLength,a;if(t.length)t.length===1?a=t[0]:a=v(t,d);else return new Uint8Array(0);return this.reset(),a},w.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function v(m,w){for(var b=new Uint8Array(w),t=0,d=0;d<m.length;d++){var a=m[d];b.set(a,t),t+=a.length}return b}},"./src/demux/dummy-demuxed-track.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"dummyTrack",function(){return N});function N(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/utils/logger.ts"),v=function(){function m(b){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=b,this.bytesAvailable=b.byteLength,this.word=0,this.bitsAvailable=0}var w=m.prototype;return w.loadWord=function(){var t=this.data,d=this.bytesAvailable,a=t.byteLength-d,c=new Uint8Array(4),o=Math.min(4,d);if(o===0)throw new Error("no bytes available");c.set(t.subarray(a,a+o)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=o*8,this.bytesAvailable-=o},w.skipBits=function(t){var d;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,d=t>>3,t-=d>>3,this.bytesAvailable-=d,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},w.readBits=function(t){var d=Math.min(this.bitsAvailable,t),a=this.word>>>32-d;return t>32&&N.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=d,this.bitsAvailable>0?this.word<<=d:this.bytesAvailable>0&&this.loadWord(),d=t-d,d>0&&this.bitsAvailable?a<<d|this.readBits(d):a},w.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if((this.word&2147483648>>>t)!==0)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},w.skipUEG=function(){this.skipBits(1+this.skipLZ())},w.skipEG=function(){this.skipBits(1+this.skipLZ())},w.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},w.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>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(t){for(var d=8,a=8,c,o=0;o<t;o++)a!==0&&(c=this.readEG(),a=(d+c+256)%256),d=a===0?d:a},w.readSPS=function(){var t=0,d=0,a=0,c=0,o,n,s,h=this.readUByte.bind(this),f=this.readBits.bind(this),u=this.readUEG.bind(this),i=this.readBoolean.bind(this),r=this.skipBits.bind(this),E=this.skipEG.bind(this),y=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);h();var R=h();if(f(5),r(3),h(),y(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var O=u();if(O===3&&r(1),y(),y(),r(1),i())for(n=O!==3?8:12,s=0;s<n;s++)i()&&(s<6?p(16):p(64))}y();var _=u();if(_===0)u();else if(_===1)for(r(1),E(),E(),o=u(),s=0;s<o;s++)E();y(),r(1);var x=u(),S=u(),C=f(1);C===0&&r(1),r(1),i()&&(t=u(),d=u(),a=u(),c=u());var j=[1,1];if(i()&&i()){var F=h();switch(F){case 1:j=[1,1];break;case 2:j=[12,11];break;case 3:j=[10,11];break;case 4:j=[16,11];break;case 5:j=[40,33];break;case 6:j=[24,11];break;case 7:j=[20,11];break;case 8:j=[32,11];break;case 9:j=[80,33];break;case 10:j=[18,11];break;case 11:j=[15,11];break;case 12:j=[64,33];break;case 13:j=[160,99];break;case 14:j=[4,3];break;case 15:j=[3,2];break;case 16:j=[2,1];break;case 255:{j=[h()<<8|h(),h()<<8|h()];break}}}return{width:Math.ceil((x+1)*16-t*2-d*2),height:(2-C)*(S+1)*16-(C?2:4)*(a+c),pixelRatio:j}},w.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},m}();g.default=v},"./src/demux/id3.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"isHeader",function(){return N}),T.d(g,"isFooter",function(){return v}),T.d(g,"getID3Data",function(){return m}),T.d(g,"canParse",function(){return b}),T.d(g,"getTimeStamp",function(){return t}),T.d(g,"isTimeStampFrame",function(){return d}),T.d(g,"getID3Frames",function(){return c}),T.d(g,"decodeFrame",function(){return o}),T.d(g,"utf8ArrayToStr",function(){return u}),T.d(g,"testables",function(){return i});var N=function(p,R){return R+10<=p.length&&(p[R]===73&&p[R+1]===68&&p[R+2]===51&&(p[R+3]<255&&p[R+4]<255&&(p[R+6]<128&&p[R+7]<128&&p[R+8]<128&&p[R+9]<128)))},v=function(p,R){return R+10<=p.length&&(p[R]===51&&p[R+1]===68&&p[R+2]===73&&(p[R+3]<255&&p[R+4]<255&&(p[R+6]<128&&p[R+7]<128&&p[R+8]<128&&p[R+9]<128)))},m=function(p,R){for(var O=R,_=0;N(p,R);){_+=10;var x=w(p,R+6);_+=x,v(p,R+10)&&(_+=10),R+=_}return _>0?p.subarray(O,O+_):void 0},w=function(p,R){var O=0;return O=(p[R]&127)<<21,O|=(p[R+1]&127)<<14,O|=(p[R+2]&127)<<7,O|=p[R+3]&127,O},b=function(p,R){return N(p,R)&&w(p,R+6)+10<=p.length-R},t=function(p){for(var R=c(p),O=0;O<R.length;O++){var _=R[O];if(d(_))return f(_)}return},d=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},a=function(p){var R=String.fromCharCode(p[0],p[1],p[2],p[3]),O=w(p,4),_=10;return{type:R,size:O,data:p.subarray(_,_+O)}},c=function(p){for(var R=0,O=[];N(p,R);){var _=w(p,R+6);R+=10;for(var x=R+_;R+8<x;){var S=a(p.subarray(R)),C=o(S);C&&O.push(C),R+=S.size+10}v(p,R)&&(R+=10)}return O},o=function(p){return p.type==="PRIV"?n(p):p.type[0]==="W"?h(p):s(p)},n=function(p){if(p.size<2)return;var R=u(p.data,!0),O=new Uint8Array(p.data.subarray(R.length+1));return{key:p.type,info:R,data:O.buffer}},s=function(p){if(p.size<2)return;if(p.type==="TXXX"){var R=1,O=u(p.data.subarray(R),!0);R+=O.length+1;var _=u(p.data.subarray(R));return{key:p.type,info:O,data:_}}var x=u(p.data.subarray(1));return{key:p.type,data:x}},h=function(p){if(p.type==="WXXX"){if(p.size<2)return;var R=1,O=u(p.data.subarray(R),!0);R+=O.length+1;var _=u(p.data.subarray(R));return{key:p.type,info:O,data:_}}var x=u(p.data);return{key:p.type,data:x}},f=function(p){if(p.data.byteLength===8){var R=new Uint8Array(p.data),O=R[3]&1,_=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return _/=45,O&&(_+=4772185884e-2),Math.round(_)}return},u=function(p,R){R===void 0&&(R=!1);var O=E();if(O){var _=O.decode(p);if(R){var x=_.indexOf("\0");return x!==-1?_.substring(0,x):_}return _.replace(/\0/g,"")}for(var S=p.length,C,j,F,M="",Y=0;Y<S;){if(C=p[Y++],C===0&&R)return M;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:M+=String.fromCharCode(C);break;case 12:case 13:j=p[Y++],M+=String.fromCharCode((C&31)<<6|j&63);break;case 14:j=p[Y++],F=p[Y++],M+=String.fromCharCode((C&15)<<12|(j&63)<<6|(F&63)<<0);break;default:}}return M},i={decodeTextFrame:s},r;function E(){return!r&&typeof self.TextDecoder!="undefined"&&(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/demux/base-audio-demuxer.ts"),v=T("./src/demux/id3.ts"),m=T("./src/utils/logger.ts"),w=T("./src/demux/mpegaudio.ts");function b(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,t(a,c)}function t(a,c){return t=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},t(a,c)}var d=function(a){b(c,a);function c(){return a.apply(this,arguments)||this}var o=c.prototype;return o.resetInitSegment=function(s,h,f){a.prototype.resetInitSegment.call(this,s,h,f),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var h=v.getID3Data(s,0)||[],f=h.length,u=s.length;f<u;f++)if(w.probe(s,f))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},o.canParse=function(s,h){return w.canParse(s,h)},o.appendFrame=function(s,h,f){return this.initPTS===null?void 0:w.appendFrame(s,h,f,this.initPTS,this.frameIndex)},c}(N.default);d.minProbeByteLength=4,g.default=d},"./src/demux/mp4demuxer.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/utils/mp4-tools.ts"),v=T("./src/demux/dummy-demuxed-track.ts"),m=function(){function w(t,d){this.remainderData=null,this.config=void 0,this.config=d}var b=w.prototype;return b.resetTimeStamp=function(){},b.resetInitSegment=function(){},b.resetContiguity=function(){},w.probe=function(d){return Object(N.findBox)({data:d,start:0,end:Math.min(d.length,16384)},["moof"]).length>0},b.demux=function(d){var a=d,c=Object(v.dummyTrack)();if(this.config.progressive){this.remainderData&&(a=Object(N.appendUint8Array)(this.remainderData,d));var o=Object(N.segmentValidRange)(a);this.remainderData=o.remainder,c.samples=o.valid||new Uint8Array}else c.samples=a;return{audioTrack:Object(v.dummyTrack)(),avcTrack:c,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},b.flush=function(){var d=Object(v.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(v.dummyTrack)(),avcTrack:d,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},b.demuxSampleAes=function(d,a,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},w}();m.minProbeByteLength=1024,g.default=m},"./src/demux/mpegaudio.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"appendFrame",function(){return t}),T.d(g,"parseHeader",function(){return d}),T.d(g,"isHeaderPattern",function(){return a}),T.d(g,"isHeader",function(){return c}),T.d(g,"canParse",function(){return o}),T.d(g,"probe",function(){return n});var N=null,v=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],w=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function t(s,h,f,u,i){if(f+24>h.length)return;var r=d(h,f);if(r&&f+r.frameLength<=h.length){var E=r.samplesPerFrame*9e4/r.sampleRate,y=u+i*E,p={unit:h.subarray(f,f+r.frameLength),pts:y,dts:y};return s.config=[],s.channelCount=r.channelCount,s.samplerate=r.sampleRate,s.samples.push(p),{sample:p,length:r.frameLength,missing:0}}}function d(s,h){var f=s[h+1]>>3&3,u=s[h+1]>>1&3,i=s[h+2]>>4&15,r=s[h+2]>>2&3;if(f!==1&&i!==0&&i!==15&&r!==3){var E=s[h+2]>>1&1,y=s[h+3]>>6,p=f===3?3-u:u===3?3:4,R=v[p*14+i-1]*1e3,O=f===3?0:f===2?1:2,_=m[O*3+r],x=y===3?1:2,S=w[f][u],C=b[u],j=S*8*C,F=Math.floor(S*R/_+E)*C;if(N===null){var M=navigator.userAgent||"",Y=M.match(/Chrome\/(\d+)/i);N=Y?parseInt(Y[1]):0}var K=!!N&&N<=87;return K&&u===2&&R>=224e3&&y===0&&(s[h+3]=s[h+3]|128),{sampleRate:_,channelCount:x,frameLength:F,samplesPerFrame:j}}}function a(s,h){return s[h]===255&&(s[h+1]&224)===224&&(s[h+1]&6)!==0}function c(s,h){return h+1<s.length&&a(s,h)}function o(s,h){var f=4;return a(s,h)&&f<=s.length-h}function n(s,h){if(h+1<s.length&&a(s,h)){var f=4,u=d(s,h),i=f;u!=null&&u.frameLength&&(i=u.frameLength);var r=h+i;return r===s.length||c(s,r)}return!1}},"./src/demux/sample-aes.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/crypt/decrypter.ts"),v=T("./src/demux/tsdemuxer.ts"),m=function(){function w(t,d,a){this.keyData=void 0,this.decrypter=void 0,this.keyData=a,this.decrypter=new N.default(t,d,{removePKCS7Padding:!1})}var b=w.prototype;return b.decryptBuffer=function(d,a){this.decrypter.decrypt(d,this.keyData.key.buffer,this.keyData.iv.buffer,a)},b.decryptAacSample=function(d,a,c,o){var n=d[a].unit,s=n.subarray(16,n.length-n.length%16),h=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),f=this;this.decryptBuffer(h,function(u){var i=new Uint8Array(u);n.set(i,16),o||f.decryptAacSamples(d,a+1,c)})},b.decryptAacSamples=function(d,a,c){for(;;a++){if(a>=d.length){c();return}if(d[a].unit.length<32)continue;var o=this.decrypter.isSync();if(this.decryptAacSample(d,a,c,o),!o)return}},b.getAvcEncryptedData=function(d){for(var a=Math.floor((d.length-48)/160)*16+16,c=new Int8Array(a),o=0,n=32;n<=d.length-16;n+=160,o+=16)c.set(d.subarray(n,n+16),o);return c},b.getAvcDecryptedUnit=function(d,a){for(var c=new Uint8Array(a),o=0,n=32;n<=d.length-16;n+=160,o+=16)d.set(c.subarray(o,o+16),n);return d},b.decryptAvcSample=function(d,a,c,o,n,s){var h=Object(v.discardEPB)(n.data),f=this.getAvcEncryptedData(h),u=this;this.decryptBuffer(f.buffer,function(i){n.data=u.getAvcDecryptedUnit(h,i),s||u.decryptAvcSamples(d,a,c+1,o)})},b.decryptAvcSamples=function(d,a,c,o){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;a++,c=0){if(a>=d.length){o();return}for(var n=d[a].units;!(c>=n.length);c++){var s=n[c];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var h=this.decrypter.isSync();if(this.decryptAvcSample(d,a,c,o,s,h),!h)return}}},w}();g.default=m},"./src/demux/transmuxer-interface.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return n});var N=T("./node_modules/webworkify-webpack/index.js"),v=T.n(N),m=T("./src/events.ts"),w=T("./src/demux/transmuxer.ts"),b=T("./src/utils/logger.ts"),t=T("./src/errors.ts"),d=T("./src/utils/mediasource-helper.ts"),a=T("./node_modules/eventemitter3/index.js"),c=T.n(a),o=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function s(f,u,i,r){var E=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=f,this.id=u,this.onTransmuxComplete=i,this.onFlush=r;var y=f.config,p=function(S,C){C=C||{},C.frag=E.frag,C.id=E.id,f.trigger(S,C)};this.observer=new a.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,p),this.observer.on(m.Events.ERROR,p);var R={mp4:o.isTypeSupported("video/mp4"),mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var _;try{_=this.worker=N("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(x){f.trigger(m.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},_.postMessage({cmd:"init",typeSupported:R,vendor:O,id:u,config:JSON.stringify(y)})}catch(x){b.logger.warn("Error in worker:",x),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),_&&self.URL.revokeObjectURL(_.objectURL),this.transmuxer=new w.default(this.observer,R,y,O,u),this.worker=null}}else this.transmuxer=new w.default(this.observer,R,y,O,u)}var h=s.prototype;return h.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var i=this.transmuxer;i&&(i.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},h.push=function(u,i,r,E,y,p,R,O,_,x){var S=this;_.transmuxing.start=self.performance.now();var C=this.transmuxer,j=this.worker,F=p?p.start:y.start,M=y.decryptdata,Y=this.frag,K=!(Y&&y.cc===Y.cc),A=!(Y&&_.level===Y.level),W=Y?_.sn-Y.sn:-1,U=this.part?_.part-this.part.index:1,D=!A&&(W===1||W===0&&U===1),X=self.performance.now();(A||W||y.stats.parsing.start===0)&&(y.stats.parsing.start=X),p&&(U||!D)&&(p.stats.parsing.start=X);var ie=new w.TransmuxState(K,D,O,A,F);if(!D||K){b.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+_.sn+" p: "+_.part+" level: "+_.level+" id: "+_.id+`
discontinuity: `+K+`
trackSwitch: `+A+`
contiguous: `+D+`
accurateTimeOffset: `+O+`
timeOffset: `+F);var oe=new w.TransmuxConfig(r,E,i,R,x);this.configureTransmuxer(oe)}if(this.frag=y,this.part=p,j)j.postMessage({cmd:"demux",data:u,decryptdata:M,chunkMeta:_,state:ie},u instanceof ArrayBuffer?[u]:[]);else if(C){var de=C.push(u,M,_,ie);Object(w.isPromise)(de)?de.then(function(Ce){S.handleTransmuxComplete(Ce)}):this.handleTransmuxComplete(de)}},h.flush=function(u){var i=this;u.transmuxing.start=self.performance.now();var r=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:u});else if(r){var y=r.flush(u);Object(w.isPromise)(y)?y.then(function(p){i.handleFlushResult(p,u)}):this.handleFlushResult(y,u)}},h.handleFlushResult=function(u,i){var r=this;u.forEach(function(E){r.handleTransmuxComplete(E)}),this.onFlush(i)},h.onWorkerMessage=function(u){var i=u.data,r=this.hls;switch(i.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(i.data);break}case"flush":{this.onFlush(i.data);break}default:{i.data=i.data||{},i.data.frag=this.frag,i.data.id=this.id,r.trigger(i.event,i.data);break}}},h.configureTransmuxer=function(u){var i=this.worker,r=this.transmuxer;i?i.postMessage({cmd:"configure",config:u}):r&&r.configure(u)},h.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},s}()},"./src/demux/transmuxer-worker.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return t});var N=T("./src/demux/transmuxer.ts"),v=T("./src/events.ts"),m=T("./src/utils/logger.ts"),w=T("./node_modules/eventemitter3/index.js"),b=T.n(w);function t(n){var s=new w.EventEmitter,h=function(u,i){n.postMessage({event:u,data:i})};s.on(v.Events.FRAG_DECRYPTED,h),s.on(v.Events.ERROR,h),n.addEventListener("message",function(f){var u=f.data;switch(u.cmd){case"init":{var i=JSON.parse(u.config);n.transmuxer=new N.default(s,u.typeSupported,i,u.vendor,u.id),Object(m.enableLogs)(i.debug),h("init",null);break}case"configure":{n.transmuxer.configure(u.config);break}case"demux":{var r=n.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(N.isPromise)(r)?r.then(function(p){d(n,p)}):d(n,r);break}case"flush":{var E=u.chunkMeta,y=n.transmuxer.flush(E);Object(N.isPromise)(y)?y.then(function(p){c(n,p,E)}):c(n,y,E);break}default:break}})}function d(n,s){if(o(s.remuxResult))return;var h=[],f=s.remuxResult,u=f.audio,i=f.video;u&&a(h,u),i&&a(h,i),n.postMessage({event:"transmuxComplete",data:s},h)}function a(n,s){s.data1&&n.push(s.data1.buffer),s.data2&&n.push(s.data2.buffer)}function c(n,s,h){s.forEach(function(f){d(n,f)}),n.postMessage({event:"flush",data:h})}function o(n){return!n.audio&&!n.video&&!n.text&&!n.id3&&!n.initSegment}},"./src/demux/transmuxer.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return i}),T.d(g,"isPromise",function(){return y}),T.d(g,"TransmuxConfig",function(){return p}),T.d(g,"TransmuxState",function(){return R});var N=T("./src/events.ts"),v=T("./src/errors.ts"),m=T("./src/crypt/decrypter.ts"),w=T("./src/demux/aacdemuxer.ts"),b=T("./src/demux/mp4demuxer.ts"),t=T("./src/demux/tsdemuxer.ts"),d=T("./src/demux/mp3demuxer.ts"),a=T("./src/remux/mp4-remuxer.ts"),c=T("./src/remux/passthrough-remuxer.ts"),o=T("./src/demux/chunk-cache.ts"),n=T("./src/utils/mp4-tools.ts"),s=T("./src/utils/logger.ts"),h;try{h=self.performance.now.bind(self.performance)}catch(O){s.logger.debug("Unable to use Performance API on this environment"),h=self.Date.now}var f=[{demux:t.default,remux:a.default},{demux:b.default,remux:c.default},{demux:w.default,remux:a.default},{demux:d.default,remux:a.default}],u=1024;f.forEach(function(O){var _=O.demux;u=Math.max(u,_.minProbeByteLength)});var i=function(){function O(x,S,C,j,F){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 o.default,this.observer=x,this.typeSupported=S,this.config=C,this.vendor=j,this.id=F}var _=O.prototype;return _.configure=function(S){this.transmuxConfig=S,this.decrypter&&this.decrypter.reset()},_.push=function(S,C,j,F){var M=this,Y=j.transmuxing;Y.executeStart=h();var K=new Uint8Array(S),A=this.cache,W=this.config,U=this.currentTransmuxState,D=this.transmuxConfig;F&&(this.currentTransmuxState=F);var X=r(K,C);if(X&&X.method==="AES-128"){var ie=this.getDecrypter();if(W.enableSoftwareAES){var oe=ie.softwareDecrypt(K,X.key.buffer,X.iv.buffer);if(!oe)return Y.executeEnd=h(),E(j);K=new Uint8Array(oe)}else return this.decryptionPromise=ie.webCryptoDecrypt(K,X.key.buffer,X.iv.buffer).then(function(re){var $=M.push(re,null,j);return M.decryptionPromise=null,$}),this.decryptionPromise}var de=F||U,Ce=de.contiguous,Ae=de.discontinuity,me=de.trackSwitch,Se=de.accurateTimeOffset,ye=de.timeOffset,se=D.audioCodec,ee=D.videoCodec,B=D.defaultInitPts,G=D.duration,V=D.initSegmentData;if((Ae||me)&&this.resetInitSegment(V,se,ee,G),Ae&&this.resetInitialTimestamp(B),Ce||this.resetContiguity(),this.needsProbing(K,Ae,me)){if(A.dataLength){var Q=A.flush();K=Object(n.appendUint8Array)(Q,K)}this.configureTransmuxer(K,D)}var Z=this.transmux(K,X,ye,Se,j),ne=this.currentTransmuxState;return ne.contiguous=!0,ne.discontinuity=!1,ne.trackSwitch=!1,Y.executeEnd=h(),Z},_.flush=function(S){var C=this,j=S.transmuxing;j.executeStart=h();var F=this.decrypter,M=this.cache,Y=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return C.flush(S)});var A=[],W=Y.timeOffset;if(F){var U=F.flush();U&&A.push(this.push(U,null,S))}var D=M.dataLength;M.reset();var X=this.demuxer,ie=this.remuxer;if(!X||!ie)return D>=u&&this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),j.executeEnd=h(),[E(S)];var oe=X.flush(W);return y(oe)?oe.then(function(de){return C.flushRemux(A,de,S),A}):(this.flushRemux(A,oe,S),A)},_.flushRemux=function(S,C,j){var F=C.audioTrack,M=C.avcTrack,Y=C.id3Track,K=C.textTrack,A=this.currentTransmuxState,W=A.accurateTimeOffset,U=A.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+j.sn+(j.part>-1?" p: "+j.part:"")+" of level "+j.level);var D=this.remuxer.remux(F,M,Y,K,U,W,!0,this.id);S.push({remuxResult:D,chunkMeta:j}),j.transmuxing.executeEnd=h()},_.resetInitialTimestamp=function(S){var C=this.demuxer,j=this.remuxer;if(!C||!j)return;C.resetTimeStamp(S),j.resetTimeStamp(S)},_.resetContiguity=function(){var S=this.demuxer,C=this.remuxer;if(!S||!C)return;S.resetContiguity(),C.resetNextTimestamp()},_.resetInitSegment=function(S,C,j,F){var M=this.demuxer,Y=this.remuxer;if(!M||!Y)return;M.resetInitSegment(C,j,F),Y.resetInitSegment(S,C,j)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(S,C,j,F,M){var Y;return C&&C.method==="SAMPLE-AES"?Y=this.transmuxSampleAes(S,C,j,F,M):Y=this.transmuxUnencrypted(S,j,F,M),Y},_.transmuxUnencrypted=function(S,C,j,F){var M=this.demuxer.demux(S,C,!1,!this.config.progressive),Y=M.audioTrack,K=M.avcTrack,A=M.id3Track,W=M.textTrack,U=this.remuxer.remux(Y,K,A,W,C,j,!1,this.id);return{remuxResult:U,chunkMeta:F}},_.transmuxSampleAes=function(S,C,j,F,M){var Y=this;return this.demuxer.demuxSampleAes(S,C,j).then(function(K){var A=Y.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,j,F,!1,Y.id);return{remuxResult:A,chunkMeta:M}})},_.configureTransmuxer=function(S,C){for(var j=this.config,F=this.observer,M=this.typeSupported,Y=this.vendor,K=C.audioCodec,A=C.defaultInitPts,W=C.duration,U=C.initSegmentData,D=C.videoCodec,X,ie=0,oe=f.length;ie<oe;ie++)if(f[ie].demux.probe(S)){X=f[ie];break}X||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:b.default,remux:c.default});var de=this.demuxer,Ce=this.remuxer,Ae=X.remux,me=X.demux;(!Ce||!(Ce instanceof Ae))&&(this.remuxer=new Ae(F,j,M,Y)),(!de||!(de instanceof me))&&(this.demuxer=new me(F,j,M),this.probe=me.probe),this.resetInitSegment(U,K,D,W),this.resetInitialTimestamp(A)},_.needsProbing=function(S,C,j){return!this.demuxer||!this.remuxer||C||j},_.getDecrypter=function(){var S=this.decrypter;return S||(S=this.decrypter=new m.default(this.observer,this.config)),S},O}();function r(O,_){var x=null;return O.byteLength>0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(x=_),x}var E=function(_){return{remuxResult:{},chunkMeta:_}};function y(O){return"then"in O&&O.then instanceof Function}var p=function(_,x,S,C,j){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=_,this.videoCodec=x,this.initSegmentData=S,this.duration=C,this.defaultInitPts=j},R=function(_,x,S,C,j){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=_,this.contiguous=x,this.accurateTimeOffset=S,this.trackSwitch=C,this.timeOffset=j}},"./src/demux/tsdemuxer.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"discardEPB",function(){return E});var N=T("./src/demux/adts.ts"),v=T("./src/demux/mpegaudio.ts"),m=T("./src/demux/exp-golomb.ts"),w=T("./src/demux/id3.ts"),b=T("./src/demux/sample-aes.ts"),t=T("./src/events.ts"),d=T("./src/utils/mp4-tools.ts"),a=T("./src/utils/logger.ts"),c=T("./src/errors.ts"),o={video:1,audio:2,id3:3,text:4},n=function(){function y(R,O,_){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=O,this.typeSupported=_}y.probe=function(O){var _=y.syncOffset(O);return _<0?!1:(_&&a.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},y.syncOffset=function(O){for(var _=Math.min(1e3,O.length-3*188),x=0;x<_;){if(O[x]===71&&O[x+188]===71&&O[x+2*188]===71)return x;x++}return-1},y.createTrack=function(O,_){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:o[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?_:void 0}};var p=y.prototype;return p.resetInitSegment=function(O,_,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",x),this._audioTrack=y.createTrack("audio",x),this._id3Track=y.createTrack("id3",x),this._txtTrack=y.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=_,this._duration=x},p.resetTimeStamp=function(){},p.resetContiguity=function(){var O=this._audioTrack,_=this._avcTrack,x=this._id3Track;O&&(O.pesData=null),_&&(_.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(O,_,x,S){x===void 0&&(x=!1),S===void 0&&(S=!1),x||(this.sampleAes=null);var C,j=this._avcTrack,F=this._audioTrack,M=this._id3Track,Y=j.pid,K=j.pesData,A=F.pid,W=M.pid,U=F.pesData,D=M.pesData,X=!1,ie=this.pmtParsed,oe=this._pmtId,de=O.length;if(this.remainderData&&(O=Object(d.appendUint8Array)(this.remainderData,O),de=O.length,this.remainderData=null),de<188&&!S)return this.remainderData=O,{audioTrack:F,avcTrack:j,id3Track:M,textTrack:this._txtTrack};var Ce=Math.max(0,y.syncOffset(O));de-=(de+Ce)%188,de<O.byteLength&&!S&&(this.remainderData=new Uint8Array(O.buffer,de,O.buffer.byteLength-de));for(var Ae=Ce;Ae<de;Ae+=188)if(O[Ae]===71){var me=!!(O[Ae+1]&64),Se=((O[Ae+1]&31)<<8)+O[Ae+2],ye=(O[Ae+3]&48)>>4,se=void 0;if(ye>1){if(se=Ae+5+O[Ae+4],se===Ae+188)continue}else se=Ae+4;switch(Se){case Y:me&&(K&&(C=u(K))&&this.parseAVCPES(C,!1),K={data:[],size:0}),K&&(K.data.push(O.subarray(se,Ae+188)),K.size+=Ae+188-se);break;case A:me&&(U&&(C=u(U))&&(F.isAAC?this.parseAACPES(C):this.parseMPEGPES(C)),U={data:[],size:0}),U&&(U.data.push(O.subarray(se,Ae+188)),U.size+=Ae+188-se);break;case W:me&&(D&&(C=u(D))&&this.parseID3PES(C),D={data:[],size:0}),D&&(D.data.push(O.subarray(se,Ae+188)),D.size+=Ae+188-se);break;case 0:me&&(se+=O[se]+1),oe=this._pmtId=h(O,se);break;case oe:{me&&(se+=O[se]+1);var ee=f(O,se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);Y=ee.avc,Y>0&&(j.pid=Y),A=ee.audio,A>0&&(F.pid=A,F.isAAC=ee.isAAC),W=ee.id3,W>0&&(M.pid=W),X&&!ie&&(a.logger.log("reparse from beginning"),X=!1,Ae=Ce-188),ie=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});j.pesData=K,F.pesData=U,M.pesData=D;var B={audioTrack:F,avcTrack:j,id3Track:M,textTrack:this._txtTrack};return S&&this.extractRemainingSamples(B),B},p.flush=function(){var O=this.remainderData;this.remainderData=null;var _;return O?_=this.demux(O,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},p.extractRemainingSamples=function(O){var _=O.audioTrack,x=O.avcTrack,S=O.id3Track,C=x.pesData,j=_.pesData,F=S.pesData,M;C&&(M=u(C))?(this.parseAVCPES(M,!0),x.pesData=null):x.pesData=C,j&&(M=u(j))?(_.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),_.pesData=null):(j!=null&&j.size&&a.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=j),F&&(M=u(F))?(this.parseID3PES(M),S.pesData=null):S.pesData=F},p.demuxSampleAes=function(O,_,x){var S=this.demux(O,x,!0,!this.config.progressive),C=this.sampleAes=new b.default(this.observer,this.config,_);return this.decrypt(S,C)},p.decrypt=function(O,_){return new Promise(function(x){var S=O.audioTrack,C=O.avcTrack;S.samples&&S.isAAC?_.decryptAacSamples(S.samples,0,function(){C.samples?_.decryptAvcSamples(C.samples,0,0,function(){x(O)}):x(O)}):C.samples&&_.decryptAvcSamples(C.samples,0,0,function(){x(O)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(O,_){var x=this,S=this._avcTrack,C=this.parseAVCNALu(O.data),j=!1,F=this.avcSample,M,Y=!1;O.data=null,F&&C.length&&!S.audFound&&(i(F,S),F=this.avcSample=s(!1,O.pts,O.dts,"")),C.forEach(function(K){switch(K.type){case 1:{M=!0,F||(F=x.avcSample=s(!0,O.pts,O.dts,"")),j&&(F.debug+="NDR "),F.frame=!0;var A=K.data;if(Y&&A.length>4){var W=new m.default(A).readSliceType();(W===2||W===4||W===7||W===9)&&(F.key=!0)}break}case 5:M=!0,F||(F=x.avcSample=s(!0,O.pts,O.dts,"")),j&&(F.debug+="IDR "),F.key=!0,F.frame=!0;break;case 6:{M=!0,j&&F&&(F.debug+="SEI ");var U=new m.default(E(K.data));U.readUByte();for(var D=0,X=0,ie=!1,oe=0;!ie&&U.bytesAvailable>1;){D=0;do oe=U.readUByte(),D+=oe;while(oe===255);X=0;do oe=U.readUByte(),X+=oe;while(oe===255);if(D===4&&U.bytesAvailable!==0){ie=!0;var de=U.readUByte();if(de===181){var Ce=U.readUShort();if(Ce===49){var Ae=U.readUInt();if(Ae===1195456820){var me=U.readUByte();if(me===3){for(var Se=U.readUByte(),ye=U.readUByte(),se=31&Se,ee=[Se,ye],B=0;B<se;B++)ee.push(U.readUByte()),ee.push(U.readUByte()),ee.push(U.readUByte());r(x._txtTrack.samples,{type:3,pts:O.pts,bytes:ee})}}}}}else if(D===5&&U.bytesAvailable!==0){if(ie=!0,X>16){for(var G=[],V=0;V<16;V++)G.push(U.readUByte().toString(16)),(V===3||V===5||V===7||V===9)&&G.push("-");for(var Q=X-16,Z=new Uint8Array(Q),ne=0;ne<Q;ne++)Z[ne]=U.readUByte();r(x._txtTrack.samples,{pts:O.pts,payloadType:D,uuid:G.join(""),userData:Object(w.utf8ArrayToStr)(Z),userDataBytes:Z})}}else if(X<U.bytesAvailable)for(var re=0;re<X;re++)U.readUByte()}break}case 7:if(M=!0,Y=!0,j&&F&&(F.debug+="SPS "),!S.sps){var $=new m.default(K.data),J=$.readSPS();S.width=J.width,S.height=J.height,S.pixelRatio=J.pixelRatio,S.sps=[K.data],S.duration=x._duration;for(var le=K.data.subarray(1,4),ue="avc1.",we=0;we<3;we++){var Fe=le[we].toString(16);Fe.length<2&&(Fe="0"+Fe),ue+=Fe}S.codec=ue}break;case 8:M=!0,j&&F&&(F.debug+="PPS "),S.pps||(S.pps=[K.data]);break;case 9:M=!1,S.audFound=!0,F&&i(F,S),F=x.avcSample=s(!1,O.pts,O.dts,j?"AUD ":"");break;case 12:M=!1;break;default:M=!1,F&&(F.debug+="unknown NAL "+K.type+" ");break}if(F&&M){var Xe=F.units;Xe.push(K)}}),_&&F&&(i(F,S),this.avcSample=null)},p.getLastNalUnit=function(){var O,_=this.avcSample,x;if(!_||_.units.length===0){var S=this._avcTrack.samples;_=S[S.length-1]}if((O=_)!==null&&O!==void 0&&O.units){var C=_.units;x=C[C.length-1]}return x},p.parseAVCNALu=function(O){var _=O.byteLength,x=this._avcTrack,S=x.naluState||0,C=S,j=[],F=0,M,Y,K,A=-1,W=0;for(S===-1&&(A=0,W=O[0]&31,S=0,F=1);F<_;){if(M=O[F++],!S){S=M?0:1;continue}if(S===1){S=M?0:2;continue}if(!M)S=3;else if(M===1){if(A>=0){var U={data:O.subarray(A,F-S-1),type:W};j.push(U)}else{var D=this.getLastNalUnit();if(D&&(C&&F<=4-C&&(D.state&&(D.data=D.data.subarray(0,D.data.byteLength-C))),Y=F-S-1,Y>0)){var X=new Uint8Array(D.data.byteLength+Y);X.set(D.data,0),X.set(O.subarray(0,Y),D.data.byteLength),D.data=X,D.state=0}}F<_?(K=O[F]&31,A=F,W=K,S=0):S=-1}else S=0}if(A>=0&&S>=0){var ie={data:O.subarray(A,_),type:W,state:S};j.push(ie)}if(j.length===0){var oe=this.getLastNalUnit();if(oe){var de=new Uint8Array(oe.data.byteLength+O.byteLength);de.set(oe.data,0),de.set(O,oe.data.byteLength),oe.data=de}}return x.naluState=S,j},p.parseAACPES=function(O){var _=0,x=this._audioTrack,S=this.aacOverFlow,C=O.data;if(S){this.aacOverFlow=null;var j=S.sample.unit.byteLength,F=Math.min(S.missing,j),M=j-F;S.sample.unit.set(C.subarray(0,F),M),x.samples.push(S.sample),_=S.missing}var Y,K;for(Y=_,K=C.length;Y<K-1&&!N.isHeader(C,Y);Y++);if(Y!==_){var A,W;if(Y<K-1?(A="AAC PES did not start with ADTS header,offset:"+Y,W=!1):(A="no ADTS header found in AAC PES",W=!0),a.logger.warn("parsing error:"+A),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:W,reason:A}),W)return}N.initTrackConfig(x,this.observer,C,Y,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(S){var D=N.getFrameDuration(x.samplerate);U=S.sample.pts+D}else{a.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;Y<K;)if(N.isHeader(C,Y)){if(Y+5<K){var ie=N.appendFrame(x,C,Y,U,X);if(ie)if(ie.missing)this.aacOverFlow=ie;else{Y+=ie.length,X++;continue}}break}else Y++},p.parseMPEGPES=function(O){var _=O.data,x=_.length,S=0,C=0,j=O.pts;if(j===void 0){a.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;C<x;)if(v.isHeader(_,C)){var F=v.appendFrame(this._audioTrack,_,C,j,S);if(F)C+=F.length,S++;else break}else C++},p.parseID3PES=function(O){if(O.pts===void 0){a.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},y}();n.minProbeByteLength=188;function s(y,p,R,O){return{key:y,frame:!1,pts:p,dts:R,units:[],debug:O,length:0}}function h(y,p){return(y[p+10]&31)<<8|y[p+11]}function f(y,p,R,O){var _={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(y[p+1]&15)<<8|y[p+2],S=p+3+x-4,C=(y[p+10]&15)<<8|y[p+11];for(p+=12+C;p<S;){var j=(y[p+1]&31)<<8|y[p+2];switch(y[p]){case 207:if(!O){a.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:_.audio===-1&&(_.audio=j);break;case 21:_.id3===-1&&(_.id3=j);break;case 219:if(!O){a.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:_.avc===-1&&(_.avc=j);break;case 3:case 4:R?_.audio===-1&&(_.audio=j,_.isAAC=!1):a.logger.log("MPEG audio found, not supported in this browser");break;case 36:a.logger.warn("Unsupported HEVC stream type found");break;default:break}p+=((y[p+3]&15)<<8|y[p+4])+5}return _}function u(y){var p=0,R,O,_,x,S,C=y.data;if(!y||y.size===0)return null;for(;C[0].length<19&&C.length>1;){var j=new Uint8Array(C[0].length+C[1].length);j.set(C[0]),j.set(C[1],C[0].length),C[0]=j,C.splice(1,1)}R=C[0];var F=(R[0]<<16)+(R[1]<<8)+R[2];if(F===1){if(O=(R[4]<<8)+R[5],O&&O>y.size-6)return null;var M=R[7];M&192&&(x=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,M&64?(S=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,x-S>60*9e4&&(a.logger.warn(Math.round((x-S)/9e4)+"s delta between PTS and DTS, align them"),x=S)):S=x),_=R[8];var Y=_+9;if(y.size<=Y)return null;y.size-=Y;for(var K=new Uint8Array(y.size),A=0,W=C.length;A<W;A++){R=C[A];var U=R.byteLength;if(Y)if(Y>U){Y-=U;continue}else R=R.subarray(Y),U-=Y,Y=0;K.set(R,p),p+=U}return O&&(O-=_+3),{data:K,pts:x,dts:S,len:O}}return null}function i(y,p){if(y.units.length&&y.frame){if(y.pts===void 0){var R=p.samples,O=R.length;if(O){var _=R[O-1];y.pts=_.pts,y.dts=_.dts}else{p.dropped++;return}}p.samples.push(y)}y.debug.length&&a.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function r(y,p){var R=y.length;if(R>0){if(p.pts>=y[R-1].pts)y.push(p);else for(var O=R-1;O>=0;O--)if(p.pts<y[O].pts){y.splice(O,0,p);break}}else y.push(p)}function E(y){for(var p=y.byteLength,R=[],O=1;O<p-2;)y[O]===0&&y[O+1]===0&&y[O+2]===3?(R.push(O+2),O+=2):O++;if(R.length===0)return y;var _=p-R.length,x=new Uint8Array(_),S=0;for(O=0;O<_;S++,O++)S===R[0]&&(S++,R.shift()),x[O]=y[S];return x}g.default=n},"./src/errors.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"ErrorTypes",function(){return N}),T.d(g,"ErrorDetails",function(){return v});var N;(function(m){m.NETWORK_ERROR="networkError",m.MEDIA_ERROR="mediaError",m.KEY_SYSTEM_ERROR="keySystemError",m.MUX_ERROR="muxError",m.OTHER_ERROR="otherError"})(N||(N={}));var v;(function(m){m.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",m.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",m.KEY_SYSTEM_NO_SESSION="keySystemNoSession",m.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",m.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",m.MANIFEST_LOAD_ERROR="manifestLoadError",m.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",m.MANIFEST_PARSING_ERROR="manifestParsingError",m.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",m.LEVEL_EMPTY_ERROR="levelEmptyError",m.LEVEL_LOAD_ERROR="levelLoadError",m.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",m.LEVEL_SWITCH_ERROR="levelSwitchError",m.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",m.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",m.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",m.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",m.FRAG_LOAD_ERROR="fragLoadError",m.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",m.FRAG_DECRYPT_ERROR="fragDecryptError",m.FRAG_PARSING_ERROR="fragParsingError",m.REMUX_ALLOC_ERROR="remuxAllocError",m.KEY_LOAD_ERROR="keyLoadError",m.KEY_LOAD_TIMEOUT="keyLoadTimeOut",m.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",m.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",m.BUFFER_APPEND_ERROR="bufferAppendError",m.BUFFER_APPENDING_ERROR="bufferAppendingError",m.BUFFER_STALLED_ERROR="bufferStalledError",m.BUFFER_FULL_ERROR="bufferFullError",m.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",m.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",m.INTERNAL_EXCEPTION="internalException",m.INTERNAL_ABORTED="aborted",m.UNKNOWN="unknown"})(v||(v={}))},"./src/events.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"Events",function(){return N});var N;(function(v){v.MEDIA_ATTACHING="hlsMediaAttaching",v.MEDIA_ATTACHED="hlsMediaAttached",v.MEDIA_DETACHING="hlsMediaDetaching",v.MEDIA_DETACHED="hlsMediaDetached",v.BUFFER_RESET="hlsBufferReset",v.BUFFER_CODECS="hlsBufferCodecs",v.BUFFER_CREATED="hlsBufferCreated",v.BUFFER_APPENDING="hlsBufferAppending",v.BUFFER_APPENDED="hlsBufferAppended",v.BUFFER_EOS="hlsBufferEos",v.BUFFER_FLUSHING="hlsBufferFlushing",v.BUFFER_FLUSHED="hlsBufferFlushed",v.MANIFEST_LOADING="hlsManifestLoading",v.MANIFEST_LOADED="hlsManifestLoaded",v.MANIFEST_PARSED="hlsManifestParsed",v.LEVEL_SWITCHING="hlsLevelSwitching",v.LEVEL_SWITCHED="hlsLevelSwitched",v.LEVEL_LOADING="hlsLevelLoading",v.LEVEL_LOADED="hlsLevelLoaded",v.LEVEL_UPDATED="hlsLevelUpdated",v.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",v.LEVELS_UPDATED="hlsLevelsUpdated",v.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",v.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",v.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",v.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",v.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",v.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",v.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",v.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",v.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",v.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",v.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",v.CUES_PARSED="hlsCuesParsed",v.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",v.INIT_PTS_FOUND="hlsInitPtsFound",v.FRAG_LOADING="hlsFragLoading",v.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",v.FRAG_LOADED="hlsFragLoaded",v.FRAG_DECRYPTED="hlsFragDecrypted",v.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",v.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",v.FRAG_PARSING_METADATA="hlsFragParsingMetadata",v.FRAG_PARSED="hlsFragParsed",v.FRAG_BUFFERED="hlsFragBuffered",v.FRAG_CHANGED="hlsFragChanged",v.FPS_DROP="hlsFpsDrop",v.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",v.ERROR="hlsError",v.DESTROYING="hlsDestroying",v.KEY_LOADING="hlsKeyLoading",v.KEY_LOADED="hlsKeyLoaded",v.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",v.BACK_BUFFER_REACHED="hlsBackBufferReached"})(N||(N={}))},"./src/hls.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return y});var N=T("./node_modules/url-toolkit/src/url-toolkit.js"),v=T.n(N),m=T("./src/loader/playlist-loader.ts"),w=T("./src/loader/key-loader.ts"),b=T("./src/controller/id3-track-controller.ts"),t=T("./src/controller/latency-controller.ts"),d=T("./src/controller/level-controller.ts"),a=T("./src/controller/fragment-tracker.ts"),c=T("./src/controller/stream-controller.ts"),o=T("./src/is-supported.ts"),n=T("./src/utils/logger.ts"),s=T("./src/config.ts"),h=T("./node_modules/eventemitter3/index.js"),f=T.n(h),u=T("./src/events.ts"),i=T("./src/errors.ts");function r(p,R){for(var O=0;O<R.length;O++){var _=R[O];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(p,_.key,_)}}function E(p,R,O){return R&&r(p.prototype,R),O&&r(p,O),p}var y=function(){p.isSupported=function(){return Object(o.isSupported)()};function p(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new h.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var _=this.config=Object(s.mergeConfig)(p.DefaultConfig,O);this.userConfig=O,Object(n.enableLogs)(_.debug),this._autoLevelCapping=-1,_.progressive&&Object(s.enableStreamingMode)(_);var x=_.abrController,S=_.bufferController,C=_.capLevelController,j=_.fpsController,F=this.abrController=new x(this),M=this.bufferController=new S(this),Y=this.capLevelController=new C(this),K=new j(this),A=new m.default(this),W=new w.default(this),U=new b.default(this),D=this.levelController=new d.default(this),X=new a.FragmentTracker(this),ie=this.streamController=new c.default(this,X);Y.setStreamController(ie),K.setStreamController(ie);var oe=[D,ie];this.networkControllers=oe;var de=[A,W,F,M,Y,K,U,X];this.audioTrackController=this.createController(_.audioTrackController,null,oe),this.createController(_.audioStreamController,X,oe),this.subtitleTrackController=this.createController(_.subtitleTrackController,null,oe),this.createController(_.subtitleStreamController,X,oe),this.createController(_.timelineController,null,de),this.emeController=this.createController(_.emeController,null,de),this.cmcdController=this.createController(_.cmcdController,null,de),this.latencyController=this.createController(t.default,null,de),this.coreComponents=de}var R=p.prototype;return R.createController=function(_,x,S){if(_){var C=x?new _(this,x):new _(this);return S&&S.push(C),C}return null},R.on=function(_,x,S){S===void 0&&(S=this),this._emitter.on(_,x,S)},R.once=function(_,x,S){S===void 0&&(S=this),this._emitter.once(_,x,S)},R.removeAllListeners=function(_){this._emitter.removeAllListeners(_)},R.off=function(_,x,S,C){S===void 0&&(S=this),this._emitter.off(_,x,S,C)},R.listeners=function(_){return this._emitter.listeners(_)},R.emit=function(_,x,S){return this._emitter.emit(_,x,S)},R.trigger=function(_,x){if(this.config.debug)return this.emit(_,_,x);try{return this.emit(_,_,x)}catch(S){n.logger.error("An internal error happened while handling event "+_+'. Error message: "'+S.message+'". Here is a stacktrace:',S),this.trigger(u.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:_,error:S})}return!1},R.listenerCount=function(_){return this._emitter.listenerCount(_)},R.destroy=function(){n.logger.log("destroy"),this.trigger(u.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(_){return _.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(_){return _.destroy()}),this.coreComponents.length=0},R.attachMedia=function(_){n.logger.log("attachMedia"),this._media=_,this.trigger(u.Events.MEDIA_ATTACHING,{media:_})},R.detachMedia=function(){n.logger.log("detachMedia"),this.trigger(u.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(_){this.stopLoad();var x=this.media,S=this.url,C=this.url=N.buildAbsoluteURL(self.location.href,_,{alwaysNormalize:!0});n.logger.log("loadSource:"+C),x&&S&&S!==C&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(u.Events.MANIFEST_LOADING,{url:_})},R.startLoad=function(_){_===void 0&&(_=-1),n.logger.log("startLoad("+_+")"),this.networkControllers.forEach(function(x){x.startLoad(_)})},R.stopLoad=function(){n.logger.log("stopLoad"),this.networkControllers.forEach(function(_){_.stopLoad()})},R.swapAudioCodec=function(){n.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){n.logger.log("recoverMediaError");var _=this._media;this.detachMedia(),_&&this.attachMedia(_)},R.removeLevel=function(_,x){x===void 0&&(x=0),this.levelController.removeLevel(_,x)},E(p,[{key:"levels",get:function(){var _=this.levelController.levels;return _||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(_){n.logger.log("set currentLevel:"+_),this.loadLevel=_,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(_){n.logger.log("set nextLevel:"+_),this.levelController.manualLevel=_,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(_){n.logger.log("set loadLevel:"+_),this.levelController.manualLevel=_}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(_){this.levelController.nextLoadLevel=_}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(_){n.logger.log("set firstLevel:"+_),this.levelController.firstLevel=_}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(_){n.logger.log("set startLevel:"+_),_!==-1&&(_=Math.max(_,this.minAutoLevel)),this.levelController.startLevel=_}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(_){var x=!!_;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(_){this._autoLevelCapping!==_&&(n.logger.log("set autoLevelCapping:"+_),this._autoLevelCapping=_)}},{key:"bandwidthEstimate",get:function(){var _=this.abrController.bwEstimator;return _?_.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var _=this.levels,x=this.config.minAutoBitrate;if(!_)return 0;for(var S=_.length,C=0;C<S;C++)if(_[C].maxBitrate>x)return C;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,x=this.autoLevelCapping,S;return x===-1&&_&&_.length?S=_.length-1:S=x,S}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(_){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,_)}},{key:"audioTracks",get:function(){var _=this.audioTrackController;return _?_.audioTracks:[]}},{key:"audioTrack",get:function(){var _=this.audioTrackController;return _?_.audioTrack:-1},set:function(_){var x=this.audioTrackController;x&&(x.audioTrack=_)}},{key:"subtitleTracks",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTrack:-1},set:function(_){var x=this.subtitleTrackController;x&&(x.subtitleTrack=_)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var _=this.subtitleTrackController;return _?_.subtitleDisplay:!1},set:function(_){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=_)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(_){this.config.lowLatencyMode=_}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return u.Events}},{key:"ErrorTypes",get:function(){return i.ErrorTypes}},{key:"ErrorDetails",get:function(){return i.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:s.hlsDefaultConfig},set:function(_){p.defaultConfig=_}}]),p}();y.defaultConfig=void 0},"./src/is-supported.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"isSupported",function(){return m}),T.d(g,"changeTypeSupported",function(){return w});var N=T("./src/utils/mediasource-helper.ts");function v(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var b=Object(N.getMediaSource)();if(!b)return!1;var t=v(),d=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!d&&!!a}function w(){var b,t=v();return typeof(t==null||((b=t.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return n}),T.d(g,"LoadError",function(){return h});var N=T("./src/polyfills/number.ts"),v=T("./src/errors.ts");function m(f,u){f.prototype=Object.create(u.prototype),f.prototype.constructor=f,a(f,u)}function w(f){var u=typeof Map=="function"?new Map:void 0;return w=function(r){if(r===null||!d(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(r))return u.get(r);u.set(r,E)}function E(){return b(r,arguments,c(this).constructor)}return E.prototype=Object.create(r.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),a(E,r)},w(f)}function b(f,u,i){return t()?b=Reflect.construct:b=function(E,y,p){var R=[null];R.push.apply(R,y);var O=Function.bind.apply(E,R),_=new O;return p&&a(_,p.prototype),_},b.apply(null,arguments)}function t(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function d(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function a(f,u){return a=Object.setPrototypeOf||function(r,E){return r.__proto__=E,r},a(f,u)}function c(f){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},c(f)}var o=Math.pow(2,17),n=function(){function f(i){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=i}var u=f.prototype;return u.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},u.abort=function(){this.loader&&this.loader.abort()},u.load=function(r,E){var y=this,p=r.url;if(!p)return Promise.reject(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var R=this.config,O=R.fLoader,_=R.loader;return new Promise(function(x,S){y.loader&&y.loader.destroy();var C=y.loader=r.loader=O?new O(R):new _(R),j=s(r),F={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:o};r.stats=C.stats,C.load(j,F,{onSuccess:function(Y,K,A,W){y.resetLoader(r,C),x({frag:r,part:null,payload:Y.data,networkDetails:W})},onError:function(Y,K,A){y.resetLoader(r,C),S(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,response:Y,networkDetails:A}))},onAbort:function(Y,K,A){y.resetLoader(r,C),S(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,networkDetails:A}))},onTimeout:function(Y,K,A){y.resetLoader(r,C),S(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,networkDetails:A}))},onProgress:function(Y,K,A,W){E&&E({frag:r,part:null,payload:A,networkDetails:W})}})})},u.loadPart=function(r,E,y){var p=this;this.abort();var R=this.config,O=R.fLoader,_=R.loader;return new Promise(function(x,S){p.loader&&p.loader.destroy();var C=p.loader=r.loader=O?new O(R):new _(R),j=s(r,E),F={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:o};E.stats=C.stats,C.load(j,F,{onSuccess:function(Y,K,A,W){p.resetLoader(r,C),p.updateStatsFromPart(r,E);var U={frag:r,part:E,payload:Y.data,networkDetails:W};y(U),x(U)},onError:function(Y,K,A){p.resetLoader(r,C),S(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,part:E,response:Y,networkDetails:A}))},onAbort:function(Y,K,A){r.stats.aborted=E.stats.aborted,p.resetLoader(r,C),S(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,part:E,networkDetails:A}))},onTimeout:function(Y,K,A){p.resetLoader(r,C),S(new h({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,part:E,networkDetails:A}))}})})},u.updateStatsFromPart=function(r,E){var y=r.stats,p=E.stats,R=p.total;if(y.loaded+=p.loaded,R){var O=Math.round(r.duration/E.duration),_=Math.min(Math.round(y.loaded/R),O),x=O-_,S=x*Math.round(y.loaded/_);y.total=y.loaded+S}else y.total=Math.max(y.loaded,y.total);var C=y.loading,j=p.loading;C.start?C.first+=j.first-j.start:(C.start=j.start,C.first=j.first),C.end=j.end},u.resetLoader=function(r,E){r.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},f}();function s(f,u){u===void 0&&(u=null);var i=u||f,r={frag:f,part:u,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},E=i.byteRangeStartOffset,y=i.byteRangeEndOffset;return Object(N.isFiniteNumber)(E)&&Object(N.isFiniteNumber)(y)&&(r.rangeStart=E,r.rangeEnd=y),r}var h=function(f){m(u,f);function u(i){for(var r,E=arguments.length,y=new Array(E>1?E-1:0),p=1;p<E;p++)y[p-1]=arguments[p];return r=f.call.apply(f,[this].concat(y))||this,r.data=void 0,r.data=i,r}return u}(w(Error))},"./src/loader/fragment.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"ElementaryStreamTypes",function(){return n}),T.d(g,"BaseSegment",function(){return s}),T.d(g,"Fragment",function(){return h}),T.d(g,"Part",function(){return f});var N=T("./src/polyfills/number.ts"),v=T("./node_modules/url-toolkit/src/url-toolkit.js"),m=T.n(v),w=T("./src/utils/logger.ts"),b=T("./src/loader/level-key.ts"),t=T("./src/loader/load-stats.ts");function d(u,i){u.prototype=Object.create(i.prototype),u.prototype.constructor=u,a(u,i)}function a(u,i){return a=Object.setPrototypeOf||function(E,y){return E.__proto__=y,E},a(u,i)}function c(u,i){for(var r=0;r<i.length;r++){var E=i[r];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function o(u,i,r){return i&&c(u.prototype,i),r&&c(u,r),u}var n;(function(u){u.AUDIO="audio",u.VIDEO="video",u.AUDIOVIDEO="audiovideo"})(n||(n={}));var s=function(){function u(r){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[n.AUDIO]=null,E[n.VIDEO]=null,E[n.AUDIOVIDEO]=null,E),this.baseurl=r}var i=u.prototype;return i.setByteRange=function(E,y){var p=E.split("@",2),R=[];p.length===1?R[0]=y?y.byteRangeEndOffset:0:R[0]=parseInt(p[1]),R[1]=parseInt(p[0])+R[0],this._byteRange=R},o(u,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(v.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),u}(),h=function(u){d(i,u);function i(E,y){var p;return p=u.call(this,y)||this,p._decryptdata=null,p.rawProgramDateTime=null,p.programDateTime=null,p.tagList=[],p.duration=0,p.sn=0,p.levelkey=void 0,p.type=void 0,p.loader=null,p.level=-1,p.cc=0,p.startPTS=void 0,p.endPTS=void 0,p.appendedPTS=void 0,p.startDTS=void 0,p.endDTS=void 0,p.start=0,p.deltaPTS=void 0,p.maxStartPTS=void 0,p.minEndPTS=void 0,p.stats=new t.LoadStats,p.urlId=0,p.data=void 0,p.bitrateTest=!1,p.title=null,p.initSegment=null,p.type=E,p}var r=i.prototype;return r.createInitializationVector=function(y){for(var p=new Uint8Array(16),R=12;R<16;R++)p[R]=y>>8*(15-R)&255;return p},r.setDecryptDataFromLevelKey=function(y,p){var R=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(R=b.LevelKey.fromURI(y.uri),R.method=y.method,R.iv=this.createInitializationVector(p),R.keyFormat="identity"),R},r.setElementaryStreamInfo=function(y,p,R,O,_,x){x===void 0&&(x=!1);var S=this.elementaryStreams,C=S[y];if(!C){S[y]={startPTS:p,endPTS:R,startDTS:O,endDTS:_,partial:x};return}C.startPTS=Math.min(C.startPTS,p),C.endPTS=Math.max(C.endPTS,R),C.startDTS=Math.min(C.startDTS,O),C.endDTS=Math.max(C.endDTS,_)},r.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[n.AUDIO]=null,y[n.VIDEO]=null,y[n.AUDIOVIDEO]=null},o(i,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="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'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(N.isFiniteNumber)(this.programDateTime))return null;var y=Object(N.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),i}(s),f=function(u){d(i,u);function i(r,E,y,p,R){var O;O=u.call(this,y)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new t.LoadStats,O.duration=r.decimalFloatingPoint("DURATION"),O.gap=r.bool("GAP"),O.independent=r.bool("INDEPENDENT"),O.relurl=r.enumeratedString("URI"),O.fragment=E,O.index=p;var _=r.enumeratedString("BYTERANGE");return _&&O.setByteRange(_,R),R&&(O.fragOffset=R.fragOffset+R.duration),O}return o(i,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),i}(s)},"./src/loader/key-loader.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return w});var N=T("./src/events.ts"),v=T("./src/errors.ts"),m=T("./src/utils/logger.ts"),w=function(){function b(d){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=d,this._registerListeners()}var t=b.prototype;return t._registerListeners=function(){this.hls.on(N.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(N.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var a in this.loaders){var c=this.loaders[a];c&&c.destroy()}this.loaders={}},t.onKeyLoading=function(a,c){var o=c.frag,n=o.type,s=this.loaders[n];if(!o.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var h=o.decryptdata.uri;if(h!==this.decrypturl||this.decryptkey===null){var f=this.hls.config;if(s&&(m.logger.warn("abort previous key loader for type:"+n),s.abort()),!h){m.logger.warn("key uri is falsy");return}var u=f.loader,i=o.loader=this.loaders[n]=new u(f);this.decrypturl=h,this.decryptkey=null;var r={url:h,frag:o,responseType:"arraybuffer"},E={timeout:f.fragLoadingTimeOut,maxRetry:0,retryDelay:f.fragLoadingRetryDelay,maxRetryDelay:f.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};i.load(r,E,y)}else this.decryptkey&&(o.decryptdata.key=this.decryptkey,this.hls.trigger(N.Events.KEY_LOADED,{frag:o}))},t.loadsuccess=function(a,c,o){var n=o.frag;if(!n.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=n.decryptdata.key=new Uint8Array(a.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(N.Events.KEY_LOADED,{frag:n})},t.loaderror=function(a,c){var o=c.frag,n=o.loader;n&&n.abort(),delete this.loaders[o.type],this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:o,response:a})},t.loadtimeout=function(a,c){var o=c.frag,n=o.loader;n&&n.abort(),delete this.loaders[o.type],this.hls.trigger(N.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:o})},b}()},"./src/loader/level-details.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"LevelDetails",function(){return b});var N=T("./src/polyfills/number.ts");function v(t,d){for(var a=0;a<d.length;a++){var c=d[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function m(t,d,a){return d&&v(t.prototype,d),a&&v(t,a),t}var w=10,b=function(){function t(a){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=a}var d=t.prototype;return d.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var o=this.lastPartSn-c.lastPartSn,n=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!n||!!o,this.advanced=this.endSN>c.endSN||o>0||o===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},m(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(N.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||w}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var o=this.driftEnd-this.driftStart;return o*1e3/c}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var c;return(c=this.fragments)!==null&&c!==void 0&&c.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),t}()},"./src/loader/level-key.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"LevelKey",function(){return b});var N=T("./node_modules/url-toolkit/src/url-toolkit.js"),v=T.n(N);function m(t,d){for(var a=0;a<d.length;a++){var c=d[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function w(t,d,a){return d&&m(t.prototype,d),a&&m(t,a),t}var b=function(){t.fromURL=function(a,c){return new t(a,c)},t.fromURI=function(a){return new t(a)};function t(d,a){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,a?this._uri=Object(N.buildAbsoluteURL)(d,a,{alwaysNormalize:!0}):this._uri=d}return w(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"LoadStats",function(){return N});var N=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return i});var N=T("./src/polyfills/number.ts"),v=T("./node_modules/url-toolkit/src/url-toolkit.js"),m=T.n(v),w=T("./src/loader/fragment.ts"),b=T("./src/loader/level-details.ts"),t=T("./src/loader/level-key.ts"),d=T("./src/utils/attr-list.ts"),a=T("./src/utils/logger.ts"),c=T("./src/utils/codecs.ts"),o=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,n=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),h=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),f=/\.(mp4|m4s|m4v|m4a)$/i;function u(R){var O,_;return f.test((O=(_=v.parseURL(R))===null||_===void 0?void 0:_.path)!=null?O:"")}var i=function(){function R(){}return R.findGroup=function(_,x){for(var S=0;S<_.length;S++){var C=_[S];if(C.id===x)return C}},R.convertAVC1ToAVCOTI=function(_){var x=_.split(".");if(x.length>2){var S=x.shift()+".";return S+=parseInt(x.shift()).toString(16),S+=("000"+parseInt(x.shift()).toString(16)).substr(-4),S}return _},R.resolve=function(_,x){return v.buildAbsoluteURL(x,_,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(_,x){var S=[],C={},j=!1;o.lastIndex=0;for(var F;(F=o.exec(_))!=null;)if(F[1]){var M=new d.AttrList(F[1]),Y={attrs:M,bitrate:M.decimalInteger("AVERAGE-BANDWIDTH")||M.decimalInteger("BANDWIDTH"),name:M.NAME,url:R.resolve(F[2],x)},K=M.decimalResolution("RESOLUTION");K&&(Y.width=K.width,Y.height=K.height),r((M.CODECS||"").split(/[ ,]+/).filter(function(W){return W}),Y),Y.videoCodec&&Y.videoCodec.indexOf("avc1")!==-1&&(Y.videoCodec=R.convertAVC1ToAVCOTI(Y.videoCodec)),S.push(Y)}else if(F[3]){var A=new d.AttrList(F[3]);A["DATA-ID"]&&(j=!0,C[A["DATA-ID"]]=A)}return{levels:S,sessionData:j?C:null}},R.parseMasterPlaylistMedia=function(_,x,S,C){C===void 0&&(C=[]);var j,F=[],M=0;for(n.lastIndex=0;(j=n.exec(_))!==null;){var Y=new d.AttrList(j[1]);if(Y.TYPE===S){var K={attrs:Y,bitrate:0,id:M++,groupId:Y["GROUP-ID"],instreamId:Y["INSTREAM-ID"],name:Y.NAME||Y.LANGUAGE||"",type:S,default:Y.bool("DEFAULT"),autoselect:Y.bool("AUTOSELECT"),forced:Y.bool("FORCED"),lang:Y.LANGUAGE,url:Y.URI?R.resolve(Y.URI,x):""};if(C.length){var A=R.findGroup(C,K.groupId)||C[0];E(K,A,"audioCodec"),E(K,A,"textCodec")}F.push(K)}}return F},R.parseLevelPlaylist=function(_,x,S,C,j){var F=new b.LevelDetails(x),M=F.fragments,Y=null,K=0,A=0,W=0,U=0,D=null,X=new w.Fragment(C,x),ie,oe,de,Ce=-1,Ae=!1;for(s.lastIndex=0,F.m3u8=_;(ie=s.exec(_))!==null;){Ae&&(Ae=!1,X=new w.Fragment(C,x),X.start=W,X.sn=K,X.cc=U,X.level=S,Y&&(X.initSegment=Y,X.rawProgramDateTime=Y.rawProgramDateTime));var me=ie[1];if(me){X.duration=parseFloat(me);var Se=(" "+ie[2]).slice(1);X.title=Se||null,X.tagList.push(Se?["INF",me,Se]:["INF",me])}else if(ie[3])Object(N.isFiniteNumber)(X.duration)&&(X.start=W,de&&(X.levelkey=de),X.sn=K,X.level=S,X.cc=U,X.urlId=j,M.push(X),X.relurl=(" "+ie[3]).slice(1),p(X,D),D=X,W+=X.duration,K++,A=0,Ae=!0);else if(ie[4]){var ye=(" "+ie[4]).slice(1);D?X.setByteRange(ye,D):X.setByteRange(ye)}else if(ie[5])X.rawProgramDateTime=(" "+ie[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),Ce===-1&&(Ce=M.length);else{if(ie=ie[0].match(h),!ie){a.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<ie.length&&!(typeof ie[oe]!="undefined");oe++);var se=(" "+ie[oe]).slice(1),ee=(" "+ie[oe+1]).slice(1),B=ie[oe+2]?(" "+ie[oe+2]).slice(1):"";switch(se){case"PLAYLIST-TYPE":F.type=ee.toUpperCase();break;case"MEDIA-SEQUENCE":K=F.startSN=parseInt(ee);break;case"SKIP":{var G=new d.AttrList(ee),V=G.decimalInteger("SKIPPED-SEGMENTS");if(Object(N.isFiniteNumber)(V)){F.skippedSegments=V;for(var Q=V;Q--;)M.unshift(null);K+=V}var Z=G.enumeratedString("RECENTLY-REMOVED-DATERANGES");Z&&(F.recentlyRemovedDateranges=Z.split(" "));break}case"TARGETDURATION":F.targetduration=parseFloat(ee);break;case"VERSION":F.version=parseInt(ee);break;case"EXTM3U":break;case"ENDLIST":F.live=!1;break;case"#":(ee||B)&&X.tagList.push(B?[ee,B]:[ee]);break;case"DIS":U++;case"GAP":X.tagList.push([se]);break;case"BITRATE":X.tagList.push([se,ee]);break;case"DISCONTINUITY-SEQ":U=parseInt(ee);break;case"KEY":{var ne,re=new d.AttrList(ee),$=re.enumeratedString("METHOD"),J=re.URI,le=re.hexadecimalInteger("IV"),ue=re.enumeratedString("KEYFORMATVERSIONS"),we=re.enumeratedString("KEYID"),Fe=(ne=re.enumeratedString("KEYFORMAT"))!=null?ne:"identity",Xe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Xe.indexOf(Fe)>-1){a.logger.warn("Keyformat "+Fe+" is not supported from the manifest");continue}else if(Fe!=="identity")continue;$&&(de=t.LevelKey.fromURL(x,J),J&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf($)>=0&&(de.method=$,de.keyFormat=Fe,we&&(de.keyID=we),ue&&(de.keyFormatVersions=ue),de.iv=le));break}case"START":{var $e=new d.AttrList(ee),et=$e.decimalFloatingPoint("TIME-OFFSET");Object(N.isFiniteNumber)(et)&&(F.startTimeOffset=et);break}case"MAP":{var nt=new d.AttrList(ee);X.relurl=nt.URI,nt.BYTERANGE&&X.setByteRange(nt.BYTERANGE),X.level=S,X.sn="initSegment",de&&(X.levelkey=de),X.initSegment=null,Y=X,Ae=!0;break}case"SERVER-CONTROL":{var at=new d.AttrList(ee);F.canBlockReload=at.bool("CAN-BLOCK-RELOAD"),F.canSkipUntil=at.optionalFloat("CAN-SKIP-UNTIL",0),F.canSkipDateRanges=F.canSkipUntil>0&&at.bool("CAN-SKIP-DATERANGES"),F.partHoldBack=at.optionalFloat("PART-HOLD-BACK",0),F.holdBack=at.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Be=new d.AttrList(ee);F.partTarget=Be.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=F.partList;Ie||(Ie=F.partList=[]);var rt=A>0?Ie[Ie.length-1]:void 0,lt=A++,_e=new w.Part(new d.AttrList(ee),X,x,lt,rt);Ie.push(_e),X.duration+=_e.duration;break}case"PRELOAD-HINT":{var ce=new d.AttrList(ee);F.preloadHint=ce;break}case"RENDITION-REPORT":{var fe=new d.AttrList(ee);F.renditionReports=F.renditionReports||[],F.renditionReports.push(fe);break}default:a.logger.warn("line parsed but not handled: "+ie);break}}}D&&!D.relurl?(M.pop(),W-=D.duration,F.partList&&(F.fragmentHint=D)):F.partList&&(p(X,D),X.cc=U,F.fragmentHint=X);var ve=M.length,Oe=M[0],ge=M[ve-1];if(W+=F.skippedSegments*F.targetduration,W>0&&ve&&ge){F.averagetargetduration=W/ve;var Ee=ge.sn;F.endSN=Ee!=="initSegment"?Ee:0,Oe&&(F.startCC=Oe.cc,Oe.initSegment||F.fragments.every(function(Re){return Re.relurl&&u(Re.relurl)})&&(a.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new w.Fragment(C,x),X.relurl=ge.relurl,X.level=S,X.sn="initSegment",Oe.initSegment=X,F.needSidxRanges=!0))}else F.endSN=0,F.startCC=0;return F.fragmentHint&&(W+=F.fragmentHint.duration),F.totalduration=W,F.endCC=U,Ce>0&&y(M,Ce),F},R}();function r(R,O){["video","audio","text"].forEach(function(_){var x=R.filter(function(C){return Object(c.isCodecType)(C,_)});if(x.length){var S=x.filter(function(C){return C.lastIndexOf("avc1",0)===0||C.lastIndexOf("mp4a",0)===0});O[_+"Codec"]=S.length>0?S[0]:x[0],R=R.filter(function(C){return x.indexOf(C)===-1})}}),O.unknownCodecs=R}function E(R,O,_){var x=O[_];x&&(R[_]=x)}function y(R,O){for(var _=R[O],x=O;x--;){var S=R[x];if(!S)return;S.programDateTime=_.programDateTime-S.duration*1e3,_=S}}function p(R,O){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):O!=null&&O.programDateTime&&(R.programDateTime=O.endProgramDateTime),Object(N.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/polyfills/number.ts"),v=T("./src/events.ts"),m=T("./src/errors.ts"),w=T("./src/utils/logger.ts"),b=T("./src/utils/mp4-tools.ts"),t=T("./src/loader/m3u8-parser.ts"),d=T("./src/types/loader.ts"),a=T("./src/utils/attr-list.ts");function c(s){var h=s.type;switch(h){case d.PlaylistContextType.AUDIO_TRACK:return d.PlaylistLevelType.AUDIO;case d.PlaylistContextType.SUBTITLE_TRACK:return d.PlaylistLevelType.SUBTITLE;default:return d.PlaylistLevelType.MAIN}}function o(s,h){var f=s.url;return(f===void 0||f.indexOf("data:")===0)&&(f=h.url),f}var n=function(){function s(f){this.hls=void 0,this.loaders=Object.create(null),this.hls=f,this.registerListeners()}var h=s.prototype;return h.registerListeners=function(){var u=this.hls;u.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(u){var i=this.hls.config,r=i.pLoader,E=i.loader,y=r||E,p=new y(i);return u.loader=p,this.loaders[u.type]=p,p},h.getInternalLoader=function(u){return this.loaders[u.type]},h.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},h.destroyInternalLoaders=function(){for(var u in this.loaders){var i=this.loaders[u];i&&i.destroy(),this.resetInternalLoader(u)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(u,i){var r=i.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},h.onLevelLoading=function(u,i){var r=i.id,E=i.level,y=i.url,p=i.deliveryDirectives;this.load({id:r,groupId:null,level:E,responseType:"text",type:d.PlaylistContextType.LEVEL,url:y,deliveryDirectives:p})},h.onAudioTrackLoading=function(u,i){var r=i.id,E=i.groupId,y=i.url,p=i.deliveryDirectives;this.load({id:r,groupId:E,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:p})},h.onSubtitleTrackLoading=function(u,i){var r=i.id,E=i.groupId,y=i.url,p=i.deliveryDirectives;this.load({id:r,groupId:E,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:p})},h.load=function(u){var i,r=this.hls.config,E=this.getInternalLoader(u);if(E){var y=E.context;if(y&&y.url===u.url){w.logger.trace("[playlist-loader]: playlist request ongoing");return}w.logger.log("[playlist-loader]: aborting previous loader for type: "+u.type),E.abort()}var p,R,O,_;switch(u.type){case d.PlaylistContextType.MANIFEST:p=r.manifestLoadingMaxRetry,R=r.manifestLoadingTimeOut,O=r.manifestLoadingRetryDelay,_=r.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:p=0,R=r.levelLoadingTimeOut;break;default:p=r.levelLoadingMaxRetry,R=r.levelLoadingTimeOut,O=r.levelLoadingRetryDelay,_=r.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(u),(i=u.deliveryDirectives)!==null&&i!==void 0&&i.part){var x;if(u.type===d.PlaylistContextType.LEVEL&&u.level!==null?x=this.hls.levels[u.level].details:u.type===d.PlaylistContextType.AUDIO_TRACK&&u.id!==null?x=this.hls.audioTracks[u.id].details:u.type===d.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(x=this.hls.subtitleTracks[u.id].details),x){var S=x.partTarget,C=x.targetduration;S&&C&&(R=Math.min(Math.max(S*3,C*.8)*1e3,R))}}var j={timeout:R,maxRetry:p,retryDelay:O,maxRetryDelay:_,highWaterMark:0},F={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(u,j,F)},h.loadsuccess=function(u,i,r,E){if(E===void 0&&(E=null),r.isSidxRequest){this.handleSidxRequest(u,r),this.handlePlaylistLoaded(u,i,r,E);return}this.resetInternalLoader(r.type);var y=u.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,r,"no EXTM3U delimiter",E);return}i.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,i,r,E):this.handleMasterPlaylist(u,i,r,E)},h.loaderror=function(u,i,r){r===void 0&&(r=null),this.handleNetworkError(i,r,!1,u)},h.loadtimeout=function(u,i,r){r===void 0&&(r=null),this.handleNetworkError(i,r,!0)},h.handleMasterPlaylist=function(u,i,r,E){var y=this.hls,p=u.data,R=o(u,r),O=t.default.parseMasterPlaylist(p,R),_=O.levels,x=O.sessionData;if(!_.length){this.handleManifestParsingError(u,r,"no level found in manifest",E);return}var S=_.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),C=_.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),j=t.default.parseMasterPlaylistMedia(p,R,"AUDIO",S),F=t.default.parseMasterPlaylistMedia(p,R,"SUBTITLES",C),M=t.default.parseMasterPlaylistMedia(p,R,"CLOSED-CAPTIONS");if(j.length){var Y=j.some(function(K){return!K.url});!Y&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(w.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),j.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new a.AttrList({}),bitrate:0,url:""}))}y.trigger(v.Events.MANIFEST_LOADED,{levels:_,audioTracks:j,subtitles:F,captions:M,url:R,stats:i,networkDetails:E,sessionData:x})},h.handleTrackOrLevelPlaylist=function(u,i,r,E){var y=this.hls,p=r.id,R=r.level,O=r.type,_=o(u,r),x=Object(N.isFiniteNumber)(p)?p:0,S=Object(N.isFiniteNumber)(R)?R:x,C=c(r),j=t.default.parseLevelPlaylist(u.data,_,S,C,x);if(!j.fragments.length){y.trigger(v.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof r.level=="number"?r.level:void 0});return}if(O===d.PlaylistContextType.MANIFEST){var F={attrs:new a.AttrList({}),bitrate:0,details:j,name:"",url:_};y.trigger(v.Events.MANIFEST_LOADED,{levels:[F],audioTracks:[],url:_,stats:i,networkDetails:E,sessionData:null})}if(i.parsing.end=performance.now(),j.needSidxRanges){var M,Y=(M=j.fragments[0].initSegment)===null||M===void 0?void 0:M.url;this.load({url:Y,isSidxRequest:!0,type:O,level:R,levelDetails:j,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}r.levelDetails=j,this.handlePlaylistLoaded(u,i,r,E)},h.handleSidxRequest=function(u,i){var r=Object(b.parseSegmentIndex)(new Uint8Array(u.data));if(!r)return;var E=r.references,y=i.levelDetails;E.forEach(function(p,R){var O=p.info,_=y.fragments[R];_.byteRange.length===0&&_.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),_.initSegment&&_.initSegment.setByteRange(String(r.moovEndOffset)+"@0")})},h.handleManifestParsingError=function(u,i,r,E){this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:i.type===d.PlaylistContextType.MANIFEST,url:u.url,reason:r,response:u,context:i,networkDetails:E})},h.handleNetworkError=function(u,i,r,E){r===void 0&&(r=!1),w.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var y=m.ErrorDetails.UNKNOWN,p=!1,R=this.getInternalLoader(u);switch(u.type){case d.PlaylistContextType.MANIFEST:y=r?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case d.PlaylistContextType.LEVEL:y=r?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case d.PlaylistContextType.AUDIO_TRACK:y=r?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:y=r?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}R&&this.resetInternalLoader(u.type);var O={type:m.ErrorTypes.NETWORK_ERROR,details:y,fatal:p,url:u.url,loader:R,context:u,networkDetails:i};E&&(O.response=E),this.hls.trigger(v.Events.ERROR,O)},h.handlePlaylistLoaded=function(u,i,r,E){var y=r.type,p=r.level,R=r.id,O=r.groupId,_=r.loader,x=r.levelDetails,S=r.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(u,r,"invalid target duration",E);return}if(!_)return;x.live&&(_.getCacheAge&&(x.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(y){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(v.Events.LEVEL_LOADED,{details:x,level:p||0,id:R||0,stats:i,networkDetails:E,deliveryDirectives:S});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(v.Events.AUDIO_TRACK_LOADED,{details:x,id:R||0,groupId:O||"",stats:i,networkDetails:E,deliveryDirectives:S});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(v.Events.SUBTITLE_TRACK_LOADED,{details:x,id:R||0,groupId:O||"",stats:i,networkDetails:E,deliveryDirectives:S});break}},s}();g.default=n},"./src/polyfills/number.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"isFiniteNumber",function(){return N}),T.d(g,"MAX_SAFE_INTEGER",function(){return v});var N=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},v=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,g,T){"use strict";T.r(g);var N=function(){function v(){}return v.getSilentFrame=function(w,b){switch(w){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},v}();g.default=N},"./src/remux/mp4-generator.ts":function(P,g,T){"use strict";T.r(g);var N=Math.pow(2,32)-1,v=function(){function m(){}return m.init=function(){m.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var b;for(b in m.types)m.types.hasOwnProperty(b)&&(m.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),d=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);m.HDLR_TYPES={video:t,audio:d};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=c,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,o,s,o,n),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,a))},m.box=function(b){for(var t=8,d=arguments.length,a=new Array(d>1?d-1:0),c=1;c<d;c++)a[c-1]=arguments[c];for(var o=a.length,n=o;o--;)t+=a[o].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=t&255,s.set(b,4),o=0,t=8;o<n;o++)s.set(a[o],t),t+=a[o].byteLength;return s},m.hdlr=function(b){return m.box(m.types.hdlr,m.HDLR_TYPES[b])},m.mdat=function(b){return m.box(m.types.mdat,b)},m.mdhd=function(b,t){t*=b;var d=Math.floor(t/(N+1)),a=Math.floor(t%(N+1));return m.box(m.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,a>>24,a>>16&255,a>>8&255,a&255,85,196,0,0]))},m.mdia=function(b){return m.box(m.types.mdia,m.mdhd(b.timescale,b.duration),m.hdlr(b.type),m.minf(b))},m.mfhd=function(b){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},m.minf=function(b){return b.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(b)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(b))},m.moof=function(b,t,d){return m.box(m.types.moof,m.mfhd(b),m.traf(d,t))},m.moov=function(b){for(var t=b.length,d=[];t--;)d[t]=m.trak(b[t]);return m.box.apply(null,[m.types.moov,m.mvhd(b[0].timescale,b[0].duration)].concat(d).concat(m.mvex(b)))},m.mvex=function(b){for(var t=b.length,d=[];t--;)d[t]=m.trex(b[t]);return m.box.apply(null,[m.types.mvex].concat(d))},m.mvhd=function(b,t){t*=b;var d=Math.floor(t/(N+1)),a=Math.floor(t%(N+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,a>>24,a>>16&255,a>>8&255,a&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return m.box(m.types.mvhd,c)},m.sdtp=function(b){var t=b.samples||[],d=new Uint8Array(4+t.length),a,c;for(a=0;a<t.length;a++)c=t[a].flags,d[a+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return m.box(m.types.sdtp,d)},m.stbl=function(b){return m.box(m.types.stbl,m.stsd(b),m.box(m.types.stts,m.STTS),m.box(m.types.stsc,m.STSC),m.box(m.types.stsz,m.STSZ),m.box(m.types.stco,m.STCO))},m.avc1=function(b){var t=[],d=[],a,c,o;for(a=0;a<b.sps.length;a++)c=b.sps[a],o=c.byteLength,t.push(o>>>8&255),t.push(o&255),t=t.concat(Array.prototype.slice.call(c));for(a=0;a<b.pps.length;a++)c=b.pps[a],o=c.byteLength,d.push(o>>>8&255),d.push(o&255),d=d.concat(Array.prototype.slice.call(c));var n=m.box(m.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|b.sps.length].concat(t).concat([b.pps.length]).concat(d))),s=b.width,h=b.height,f=b.pixelRatio[0],u=b.pixelRatio[1];return m.box(m.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,u>>24,u>>16&255,u>>8&255,u&255])))},m.esds=function(b){var t=b.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(b.config).concat([6,1,2]))},m.mp4a=function(b){var t=b.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),m.box(m.types.esds,m.esds(b)))},m.mp3=function(b){var t=b.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},m.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(b)):m.box(m.types.stsd,m.STSD,m.mp4a(b)):m.box(m.types.stsd,m.STSD,m.avc1(b))},m.tkhd=function(b){var t=b.id,d=b.duration*b.timescale,a=b.width,c=b.height,o=Math.floor(d/(N+1)),n=Math.floor(d%(N+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,a&255,0,0,c>>8&255,c&255,0,0]))},m.traf=function(b,t){var d=m.sdtp(b),a=b.id,c=Math.floor(t/(N+1)),o=Math.floor(t%(N+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,o>>24,o>>16&255,o>>8&255,o&255])),m.trun(b,d.length+16+20+8+16+8+8),d)},m.trak=function(b){return b.duration=b.duration||4294967295,m.box(m.types.trak,m.tkhd(b),m.mdia(b))},m.trex=function(b){var t=b.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(b,t){var d=b.samples||[],a=d.length,c=12+16*a,o=new Uint8Array(c),n,s,h,f,u,i;for(t+=8+c,o.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,a&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),n=0;n<a;n++)s=d[n],h=s.duration,f=s.size,u=s.flags,i=s.cts,o.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,u.degradPrio&240<<8,u.degradPrio&15,i>>>24&255,i>>>16&255,i>>>8&255,i&255],12+16*n);return m.box(m.types.trun,o)},m.initSegment=function(b){m.types||m.init();var t=m.moov(b),d=new Uint8Array(m.FTYP.byteLength+t.byteLength);return d.set(m.FTYP),d.set(t,m.FTYP.byteLength),d},m}();v.types=void 0,v.HDLR_TYPES=void 0,v.STTS=void 0,v.STSC=void 0,v.STCO=void 0,v.STSZ=void 0,v.VMHD=void 0,v.SMHD=void 0,v.STSD=void 0,v.FTYP=void 0,v.DINF=void 0,g.default=v},"./src/remux/mp4-remuxer.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return i}),T.d(g,"normalizePts",function(){return r});var N=T("./src/polyfills/number.ts"),v=T("./src/remux/aac-helper.ts"),m=T("./src/remux/mp4-generator.ts"),w=T("./src/events.ts"),b=T("./src/errors.ts"),t=T("./src/utils/logger.ts"),d=T("./src/types/loader.ts"),a=T("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var _=arguments[O];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(R[x]=_[x])}return R},c.apply(this,arguments)}var o=10*1e3,n=1024,s=1152,h=null,f=null,u=!1,i=function(){function R(_,x,S,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=_,this.config=x,this.typeSupported=S,this.ISGenerated=!1,h===null){var j=navigator.userAgent||"",F=j.match(/Chrome\/(\d+)/i);h=F?parseInt(F[1]):0}if(f===null){var M=navigator.userAgent.match(/Safari\/(\d+)/i);f=M?parseInt(M[1]):0}u=!!h&&h<75||!!f&&f<600}var O=R.prototype;return O.destroy=function(){},O.resetTimeStamp=function(x){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},O.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(x){var S=!1,C=x.reduce(function(j,F){var M=F.pts-j;return M<-4294967296?(S=!0,r(j,F.pts)):M>0?j:F.pts},x[0].pts);return S&&t.logger.debug("PTS rollover detected"),C},O.remux=function(x,S,C,j,F,M,Y,K){var A,W,U,D,X,ie,oe=F,de=F,Ce=x.pid>-1,Ae=S.pid>-1,me=S.samples.length,Se=x.samples.length>0,ye=me>1,se=(!Ce||Se)&&(!Ae||ye)||this.ISGenerated||Y;if(se){this.ISGenerated||(U=this.generateIS(x,S,F));var ee=this.isVideoContiguous,B=-1;if(ye&&(B=E(S.samples),!ee&&this.config.forceKeyFrameOnDiscontinuity))if(ie=!0,B>0){t.logger.warn("[mp4-remuxer]: Dropped "+B+" out of "+me+" video samples due to a missing keyframe");var G=this.getVideoStartPts(S.samples);S.samples=S.samples.slice(B),S.dropped+=B,de+=(S.samples[0].pts-G)/(S.timescale||9e4)}else B===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+me+" video samples"),ie=!1);if(this.ISGenerated){if(Se&&ye){var V=this.getVideoStartPts(S.samples),Q=r(x.samples[0].pts,V)-V,Z=Q/S.inputTimeScale;oe+=Math.max(0,Z),de+=Math.max(0,-Z)}if(Se){if(x.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,S,F)),W=this.remuxAudio(x,oe,this.isAudioContiguous,M,Ae||ye||K===d.PlaylistLevelType.AUDIO?de:void 0),ye){var ne=W?W.endPTS-W.startPTS:0;S.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,S,F)),A=this.remuxVideo(S,de,ee,ne)}}else ye&&(A=this.remuxVideo(S,de,ee,0));A&&(A.firstKeyFrame=B,A.independent=B!==-1)}}return this.ISGenerated&&(C.samples.length&&(X=this.remuxID3(C,F)),j.samples.length&&(D=this.remuxText(j,F))),{audio:W,video:A,initSegment:U,independent:ie,text:D,id3:X}},O.generateIS=function(x,S,C){var j=x.samples,F=S.samples,M=this.typeSupported,Y={},K=!Object(N.isFiniteNumber)(this._initPTS),A="audio/mp4",W,U,D;if(K&&(W=U=Infinity),x.config&&j.length&&(x.timescale=x.samplerate,x.isAAC||(M.mpeg?(A="audio/mpeg",x.codec=""):M.mp3&&(x.codec="mp3")),Y.audio={id:"audio",container:A,codec:x.codec,initSegment:!x.isAAC&&M.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},K&&(D=x.inputTimeScale,W=U=j[0].pts-Math.round(D*C))),S.sps&&S.pps&&F.length&&(S.timescale=S.inputTimeScale,Y.video={id:"main",container:"video/mp4",codec:S.codec,initSegment:m.default.initSegment([S]),metadata:{width:S.width,height:S.height}},K)){D=S.inputTimeScale;var X=this.getVideoStartPts(F),ie=Math.round(D*C);U=Math.min(U,r(F[0].dts,X)-ie),W=Math.min(W,X-ie)}if(Object.keys(Y).length)return this.ISGenerated=!0,K&&(this._initPTS=W,this._initDTS=U),{tracks:Y,initPTS:W,timescale:D}},O.remuxVideo=function(x,S,C,j){var F=x.inputTimeScale,M=x.samples,Y=[],K=M.length,A=this._initPTS,W=this.nextAvcDts,U=8,D,X,ie,oe=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Ce=0,Ae=!1;if(!C||W===null){var me=S*F,Se=M[0].pts-r(M[0].dts,M[0].pts);W=me-Se}for(var ye=0;ye<K;ye++){var se=M[ye];if(se.pts=r(se.pts-A,W),se.dts=r(se.dts-A,W),se.dts>se.pts){var ee=9e4*.2;Ce=Math.max(Math.min(Ce,se.pts-se.dts),-1*ee)}se.dts<M[ye>0?ye-1:ye].dts&&(Ae=!0)}Ae&&M.sort(function(sr,Zt){var wt=sr.dts-Zt.dts,Br=sr.pts-Zt.pts;return wt||Br}),X=M[0].dts,ie=M[M.length-1].dts;var B=Math.round((ie-X)/(K-1));if(Ce<0){if(Ce<B*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(a.toMsFromMpegTsClock)(-B,!0)+" ms");for(var G=Ce,V=0;V<K;V++)M[V].dts=G=Math.max(G,M[V].pts-B),M[V].pts=Math.max(G,M[V].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(a.toMsFromMpegTsClock)(Ce,!0)+" ms to overcome this issue");for(var Q=0;Q<K;Q++)M[Q].dts=M[Q].dts+Ce}X=M[0].dts}if(C){var Z=X-W,ne=Z>B,re=Z<-1;if(ne||re){ne?t.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(Z,!0)+" ms ("+Z+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(-Z,!0)+" ms ("+Z+"dts) overlapping between fragments detected"),X=W;var $=M[0].pts-Z;M[0].dts=X,M[0].pts=$,t.logger.log("Video: First PTS/DTS adjusted: "+Object(a.toMsFromMpegTsClock)($,!0)+"/"+Object(a.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(a.toMsFromMpegTsClock)(Z,!0)+" ms")}}u&&(X=Math.max(0,X));for(var J=0,le=0,ue=0;ue<K;ue++){for(var we=M[ue],Fe=we.units,Xe=Fe.length,$e=0,et=0;et<Xe;et++)$e+=Fe[et].data.length;le+=$e,J+=Xe,we.length=$e,we.dts=Math.max(we.dts,X),we.pts=Math.max(we.pts,we.dts,0),oe=Math.min(we.pts,oe),de=Math.max(we.pts,de)}ie=M[K-1].dts;var nt=le+4*J+8,at;try{at=new Uint8Array(nt)}catch(sr){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:nt,reason:"fail allocating video mdat "+nt});return}var Be=new DataView(at.buffer);Be.setUint32(0,nt),at.set(m.default.types.mdat,4);for(var Ie=0;Ie<K;Ie++){for(var rt=M[Ie],lt=rt.units,_e=0,ce=0,fe=lt.length;ce<fe;ce++){var ve=lt[ce],Oe=ve.data,ge=ve.data.byteLength;Be.setUint32(U,ge),U+=4,at.set(Oe,U),U+=ge,_e+=4+ge}if(Ie<K-1)D=M[Ie+1].dts-rt.dts;else{var Ee=this.config,Re=rt.dts-M[Ie>0?Ie-1:Ie].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var Le=Math.floor(Ee.maxBufferHole*F),Pe=(j?oe+j*F:this.nextAudioPts)-rt.pts;Pe>Le?(D=Pe-Re,D<0&&(D=Re),t.logger.log("[mp4-remuxer]: It is approximately "+Pe/90+" ms to the next segment; using duration "+D/90+" ms for the last video frame.")):D=Re}else D=Re}var Ke=Math.round(rt.pts-rt.dts);Y.push(new y(rt.key,D,_e,Ke))}if(Y.length&&h&&h<70){var it=Y[0].flags;it.dependsOn=2,it.isNonSync=0}console.assert(D!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=W=ie+D,this.isVideoContiguous=!0;var st=m.default.moof(x.sequenceNumber++,X,c({},x,{samples:Y})),Ot="video",Rt={data1:st,data2:at,startPTS:oe/F,endPTS:(de+D)/F,startDTS:X/F,endDTS:W/F,type:Ot,hasAudio:!1,hasVideo:!0,nb:Y.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(at.length,"MDAT length must not be zero"),Rt},O.remuxAudio=function(x,S,C,j,F){var M=x.inputTimeScale,Y=x.samplerate?x.samplerate:M,K=M/Y,A=x.isAAC?n:s,W=A*K,U=this._initPTS,D=!x.isAAC&&this.typeSupported.mpeg,X=[],ie=x.samples,oe=D?0:8,de=this.nextAudioPts||-1,Ce=S*M;if(this.isAudioContiguous=C=C||ie.length&&de>0&&(j&&Math.abs(Ce-de)<9e3||Math.abs(r(ie[0].pts-U,Ce)-de)<20*W),ie.forEach(function(Oe){Oe.pts=r(Oe.pts-U,Ce)}),!C||de<0){if(ie=ie.filter(function(Oe){return Oe.pts>=0}),!ie.length)return;F===0?de=0:j?de=Math.max(0,Ce):de=ie[0].pts}if(x.isAAC)for(var Ae=F!==void 0,me=this.config.maxAudioFramesDrift,Se=0,ye=de;Se<ie.length;Se++){var se=ie[Se],ee=se.pts,B=ee-ye,G=Math.abs(1e3*B/M);if(B<=-me*W&&Ae)Se===0&&(t.logger.warn("Audio frame @ "+(ee/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*B/M)+" ms."),this.nextAudioPts=de=ye=ee);else if(B>=me*W&&G<o&&Ae){var V=Math.round(B/W);ye=ee-V*W,ye<0&&(V--,ye+=W),Se===0&&(this.nextAudioPts=de=ye),t.logger.warn("[mp4-remuxer]: Injecting "+V+" audio frame @ "+(ye/M).toFixed(3)+"s due to "+Math.round(1e3*B/M)+" ms gap.");for(var Q=0;Q<V;Q++){var Z=Math.max(ye,0),ne=v.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ne||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ne=se.unit.subarray()),ie.splice(Se,0,{unit:ne,pts:Z}),ye+=W,Se++}}se.pts=ye,ye+=W}for(var re=null,$=null,J,le=0,ue=ie.length;ue--;)le+=ie[ue].unit.byteLength;for(var we=0,Fe=ie.length;we<Fe;we++){var Xe=ie[we],$e=Xe.unit,et=Xe.pts;if($!==null){var nt=X[we-1];nt.duration=Math.round((et-$)/K)}else if(C&&x.isAAC&&(et=de),re=et,le>0){le+=oe;try{J=new Uint8Array(le)}catch(Oe){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:le,reason:"fail allocating audio mdat "+le});return}if(!D){var at=new DataView(J.buffer);at.setUint32(0,le),J.set(m.default.types.mdat,4)}}else return;J.set($e,oe);var Be=$e.byteLength;oe+=Be,X.push(new y(!0,A,Be,0)),$=et}var Ie=X.length;if(!Ie)return;var rt=X[X.length-1];this.nextAudioPts=de=$+K*rt.duration;var lt=D?new Uint8Array(0):m.default.moof(x.sequenceNumber++,re/K,c({},x,{samples:X}));x.samples=[];var _e=re/M,ce=de/M,fe="audio",ve={data1:lt,data2:J,startPTS:_e,endPTS:ce,startDTS:_e,endDTS:ce,type:fe,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(J.length,"MDAT length must not be zero"),ve},O.remuxEmptyAudio=function(x,S,C,j){var F=x.inputTimeScale,M=x.samplerate?x.samplerate:F,Y=F/M,K=this.nextAudioPts,A=(K!==null?K:j.startDTS*F)+this._initDTS,W=j.endDTS*F+this._initDTS,U=Y*n,D=Math.ceil((W-A)/U),X=v.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ie=[],oe=0;oe<D;oe++){var de=A+oe*U;ie.push({unit:X,pts:de,dts:de})}return x.samples=ie,this.remuxAudio(x,S,C,!1)},O.remuxID3=function(x,S){var C=x.samples.length;if(!C)return;for(var j=x.inputTimeScale,F=this._initPTS,M=this._initDTS,Y=0;Y<C;Y++){var K=x.samples[Y];K.pts=r(K.pts-F,S*j)/j,K.dts=r(K.dts-M,S*j)/j}var A=x.samples;return x.samples=[],{samples:A}},O.remuxText=function(x,S){var C=x.samples.length;if(!C)return;for(var j=x.inputTimeScale,F=this._initPTS,M=0;M<C;M++){var Y=x.samples[M];Y.pts=r(Y.pts-F,S*j)/j}x.samples.sort(function(A,W){return A.pts-W.pts});var K=x.samples;return x.samples=[],{samples:K}},R}();function r(R,O){var _;if(O===null)return R;for(O<R?_=-8589934592:_=8589934592;Math.abs(R-O)>4294967296;)R+=_;return R}function E(R){for(var O=0;O<R.length;O++)if(R[O].key)return O;return-1}var y=function(O,_,x,S){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=_,this.size=x,this.cts=S,this.flags=new p(O)},p=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/polyfills/number.ts"),v=T("./src/utils/mp4-tools.ts"),m=T("./src/loader/fragment.ts"),w=T("./src/utils/logger.ts"),b=function(){function a(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var c=a.prototype;return c.destroy=function(){},c.resetTimeStamp=function(n){this.initPTS=n,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(n,s,h){this.audioCodec=s,this.videoCodec=h,this.generateInitSegment(n),this.emitInitSegment=!0},c.generateInitSegment=function(n){var s=this.audioCodec,h=this.videoCodec;if(!n||!n.byteLength){this.initTracks=void 0,this.initData=void 0;return}var f=this.initData=Object(v.parseInitSegment)(n);s||(s=d(f.audio,m.ElementaryStreamTypes.AUDIO)),h||(h=d(f.video,m.ElementaryStreamTypes.VIDEO));var u={};f.audio&&f.video?u.audiovideo={container:"video/mp4",codec:s+","+h,initSegment:n,id:"main"}:f.audio?u.audio={container:"audio/mp4",codec:s,initSegment:n,id:"audio"}:f.video?u.video={container:"video/mp4",codec:h,initSegment:n,id:"main"}:w.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=u},c.remux=function(n,s,h,f,u){var i=this.initPTS,r=this.lastEndDTS,E={audio:void 0,video:void 0,text:f,id3:h,initSegment:void 0};Object(N.isFiniteNumber)(r)||(r=this.lastEndDTS=u||0);var y=s.samples;if(!y||!y.length)return E;var p={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(y),R=this.initData),!R||!R.length)return w.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(N.isFiniteNumber)(i)||(this.initPTS=p.initPTS=i=t(R,y,r));var O=Object(v.getDuration)(y,R),_=r,x=O+_;Object(v.offsetStartDTS)(R,y,i),O>0?this.lastEndDTS=x:(w.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var S=!!R.audio,C=!!R.video,j="";S&&(j+="audio"),C&&(j+="video");var F={data1:y,startPTS:_,startDTS:_,endPTS:x,endDTS:x,type:j,hasAudio:S,hasVideo:C,nb:1,dropped:0};return E.audio=F.type==="audio"?F:void 0,E.video=F.type!=="audio"?F:void 0,E.text=f,E.id3=h,E.initSegment=p,E},a}(),t=function(c,o,n){return Object(v.getStartDTS)(c,o)-n};function d(a,c){var o=a==null?void 0:a.codec;return o&&o.length>4?o:o==="hvc1"?"hvc1.1.c.L120.90":o==="av01"?"av01.0.04M.08":o==="avc1"||c===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=b},"./src/task-loop.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return N});var N=function(){function v(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=v.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},v}()},"./src/types/cmcd.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"CMCDVersion",function(){return N}),T.d(g,"CMCDObjectType",function(){return v}),T.d(g,"CMCDStreamingFormat",function(){return m}),T.d(g,"CMCDStreamType",function(){return w});var N=1,v;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(v||(v={}));var m;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(m||(m={}));var w;(function(b){b.VOD="v",b.LIVE="l"})(w||(w={}))},"./src/types/level.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"HlsSkip",function(){return m}),T.d(g,"getSkipValue",function(){return w}),T.d(g,"HlsUrlParameters",function(){return b}),T.d(g,"Level",function(){return t});function N(d,a){for(var c=0;c<a.length;c++){var o=a[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function v(d,a,c){return a&&N(d.prototype,a),c&&N(d,c),d}var m;(function(d){d.No="",d.Yes="YES",d.v2="v2"})(m||(m={}));function w(d,a){var c=d.canSkipUntil,o=d.canSkipDateRanges,n=d.endSN,s=a!==void 0?a-n:0;return c&&s<c?o?m.v2:m.Yes:m.No}var b=function(){function d(c,o,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=o,this.skip=n}var a=d.prototype;return a.addDirectives=function(o){var n=new self.URL(o);return this.msn!==void 0&&n.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&n.searchParams.set("_HLS_part",this.part.toString()),this.skip&&n.searchParams.set("_HLS_skip",this.skip),n.toString()},d}(),t=function(){function d(a){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=[a.url],this.attrs=a.attrs,this.bitrate=a.bitrate,a.details&&(this.details=a.details),this.id=a.id||0,this.name=a.name,this.width=a.width||0,this.height=a.height||0,this.audioCodec=a.audioCodec,this.videoCodec=a.videoCodec,this.unknownCodecs=a.unknownCodecs,this.codecSet=[a.videoCodec,a.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return v(d,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(c){var o=c%this.url.length;this._urlId!==o&&(this.details=void 0,this._urlId=o)}}]),d}()},"./src/types/loader.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"PlaylistContextType",function(){return N}),T.d(g,"PlaylistLevelType",function(){return v});var N;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(N||(N={}));var v;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(v||(v={}))},"./src/types/transmuxer.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"ChunkMetadata",function(){return N});var N=function(w,b,t,d,a,c){d===void 0&&(d=0),a===void 0&&(a=-1),c===void 0&&(c=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=v(),this.buffering={audio:v(),video:v(),audiovideo:v()},this.level=w,this.sn=b,this.id=t,this.size=d,this.part=a,this.partial=c};function v(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"AttrList",function(){return m});var N=/^(\d+)x(\d+)$/,v=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function w(t){typeof t=="string"&&(t=w.parseAttrList(t));for(var d in t)t.hasOwnProperty(d)&&(this[d]=t[d])}var b=w.prototype;return b.decimalInteger=function(d){var a=parseInt(this[d],10);return a>Number.MAX_SAFE_INTEGER?Infinity:a},b.hexadecimalInteger=function(d){if(this[d]){var a=(this[d]||"0x").slice(2);a=(a.length&1?"0":"")+a;for(var c=new Uint8Array(a.length/2),o=0;o<a.length/2;o++)c[o]=parseInt(a.slice(o*2,o*2+2),16);return c}else return null},b.hexadecimalIntegerAsNumber=function(d){var a=parseInt(this[d],16);return a>Number.MAX_SAFE_INTEGER?Infinity:a},b.decimalFloatingPoint=function(d){return parseFloat(this[d])},b.optionalFloat=function(d,a){var c=this[d];return c?parseFloat(c):a},b.enumeratedString=function(d){return this[d]},b.bool=function(d){return this[d]==="YES"},b.decimalResolution=function(d){var a=N.exec(this[d]);return a===null?void 0:{width:parseInt(a[1],10),height:parseInt(a[2],10)}},w.parseAttrList=function(d){var a,c={},o='"';for(v.lastIndex=0;(a=v.exec(d))!==null;){var n=a[2];n.indexOf(o)===0&&n.lastIndexOf(o)===n.length-1&&(n=n.slice(1,-1)),c[a[1]]=n}return c},w}()},"./src/utils/binary-search.ts":function(P,g,T){"use strict";T.r(g);var N={search:function(m,w){for(var b=0,t=m.length-1,d=null,a=null;b<=t;){d=(b+t)/2|0,a=m[d];var c=w(a);if(c>0)b=d+1;else if(c<0)t=d-1;else return a}return null}};g.default=N},"./src/utils/buffer-helper.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"BufferHelper",function(){return m});var N=T("./src/utils/logger.ts"),v={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function w(){}return w.isBuffered=function(t,d){try{if(t){for(var a=w.getBuffered(t),c=0;c<a.length;c++)if(d>=a.start(c)&&d<=a.end(c))return!0}}catch(o){}return!1},w.bufferInfo=function(t,d,a){try{if(t){var c=w.getBuffered(t),o=[],n;for(n=0;n<c.length;n++)o.push({start:c.start(n),end:c.end(n)});return this.bufferedInfo(o,d,a)}}catch(s){}return{len:0,start:d,end:d,nextStart:void 0}},w.bufferedInfo=function(t,d,a){d=Math.max(0,d),t.sort(function(p,R){var O=p.start-R.start;return O||R.end-p.end});var c=[];if(a)for(var o=0;o<t.length;o++){var n=c.length;if(n){var s=c[n-1].end;t[o].start-s<a?t[o].end>s&&(c[n-1].end=t[o].end):c.push(t[o])}else c.push(t[o])}else c=t;for(var h=0,f,u=d,i=d,r=0;r<c.length;r++){var E=c[r].start,y=c[r].end;if(d+a>=E&&d<y)u=E,i=y,h=i-d;else if(d+a<E){f=E;break}}return{len:h,start:u||0,end:i||0,nextStart:f}},w.getBuffered=function(t){try{return t.buffered}catch(d){return N.logger.log("failed to get media.buffered",d),v}},w}()},"./src/utils/cea-608-parser.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"Row",function(){return i}),T.d(g,"CaptionScreen",function(){return r});var N=T("./src/utils/logger.ts"),v={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},m=function(x){var S=x;return v.hasOwnProperty(x)&&(S=v[x]),String.fromCharCode(S)},w=15,b=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},d={17:2,18:4,21:6,22:8,23:10,19:13,20:15},a={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},o=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],n;(function(_){_[_.ERROR=0]="ERROR",_[_.TEXT=1]="TEXT",_[_.WARNING=2]="WARNING",_[_.INFO=2]="INFO",_[_.DEBUG=3]="DEBUG",_[_.DATA=3]="DATA"})(n||(n={}));var s=function(){function _(){this.time=null,this.verboseLevel=n.ERROR}var x=_.prototype;return x.log=function(C,j){this.verboseLevel>=C&&N.logger.log(this.time+" ["+C+"] "+j)},_}(),h=function(x){for(var S=[],C=0;C<x.length;C++)S.push(x[C].toString(16));return S},f=function(){function _(S,C,j,F,M){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=S||"white",this.underline=C||!1,this.italics=j||!1,this.background=F||"black",this.flash=M||!1}var x=_.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(C){for(var j=["foreground","underline","italics","background","flash"],F=0;F<j.length;F++){var M=j[F];C.hasOwnProperty(M)&&(this[M]=C[M])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(C){return this.foreground===C.foreground&&this.underline===C.underline&&this.italics===C.italics&&this.background===C.background&&this.flash===C.flash},x.copy=function(C){this.foreground=C.foreground,this.underline=C.underline,this.italics=C.italics,this.background=C.background,this.flash=C.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},_}(),u=function(){function _(S,C,j,F,M,Y){this.uchar=void 0,this.penState=void 0,this.uchar=S||" ",this.penState=new f(C,j,F,M,Y)}var x=_.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(C,j){this.uchar=C,this.penState.copy(j)},x.setPenState=function(C){this.penState.copy(C)},x.equals=function(C){return this.uchar===C.uchar&&this.penState.equals(C.penState)},x.copy=function(C){this.uchar=C.uchar,this.penState.copy(C.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},_}(),i=function(){function _(S){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<b;C++)this.chars.push(new u);this.logger=S,this.pos=0,this.currPenState=new f}var x=_.prototype;return x.equals=function(C){for(var j=!0,F=0;F<b;F++)if(!this.chars[F].equals(C.chars[F])){j=!1;break}return j},x.copy=function(C){for(var j=0;j<b;j++)this.chars[j].copy(C.chars[j])},x.isEmpty=function(){for(var C=!0,j=0;j<b;j++)if(!this.chars[j].isEmpty()){C=!1;break}return C},x.setCursor=function(C){this.pos!==C&&(this.pos=C),this.pos<0?(this.logger.log(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>b&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},x.moveCursor=function(C){var j=this.pos+C;if(C>1)for(var F=this.pos+1;F<j+1;F++)this.chars[F].setPenState(this.currPenState);this.setCursor(j)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(C){C>=144&&this.backSpace();var j=m(C);if(this.pos>=b){this.logger.log(n.ERROR,"Cannot insert "+C.toString(16)+" ("+j+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(j,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(C){var j;for(j=C;j<b;j++)this.chars[j].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var C=[],j=!0,F=0;F<b;F++){var M=this.chars[F].uchar;M!==" "&&(j=!1),C.push(M)}return j?"":C.join("")},x.setPenStyles=function(C){this.currPenState.setStyles(C);var j=this.chars[this.pos];j.setPenState(this.currPenState)},_}(),r=function(){function _(S){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 i(S));this.logger=S,this.currRow=w-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=_.prototype;return x.reset=function(){for(var C=0;C<w;C++)this.rows[C].clear();this.currRow=w-1},x.equals=function(C){for(var j=!0,F=0;F<w;F++)if(!this.rows[F].equals(C.rows[F])){j=!1;break}return j},x.copy=function(C){for(var j=0;j<w;j++)this.rows[j].copy(C.rows[j])},x.isEmpty=function(){for(var C=!0,j=0;j<w;j++)if(!this.rows[j].isEmpty()){C=!1;break}return C},x.backSpace=function(){var C=this.rows[this.currRow];C.backSpace()},x.clearToEndOfRow=function(){var C=this.rows[this.currRow];C.clearToEndOfRow()},x.insertChar=function(C){var j=this.rows[this.currRow];j.insertChar(C)},x.setPen=function(C){var j=this.rows[this.currRow];j.setPenStyles(C)},x.moveCursor=function(C){var j=this.rows[this.currRow];j.moveCursor(C)},x.setCursor=function(C){this.logger.log(n.INFO,"setCursor: "+C);var j=this.rows[this.currRow];j.setCursor(C)},x.setPAC=function(C){this.logger.log(n.INFO,"pacData = "+JSON.stringify(C));var j=C.row-1;if(this.nrRollUpRows&&j<this.nrRollUpRows-1&&(j=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==j){for(var F=0;F<w;F++)this.rows[F].clear();var M=this.currRow+1-this.nrRollUpRows,Y=this.lastOutputScreen;if(Y){var K=Y.rows[M].cueStartTime,A=this.logger.time;if(K&&A!==null&&K<A)for(var W=0;W<this.nrRollUpRows;W++)this.rows[j-this.nrRollUpRows+W+1].copy(Y.rows[M+W])}}this.currRow=j;var U=this.rows[this.currRow];if(C.indent!==null){var D=C.indent,X=Math.max(D-1,0);U.setCursor(C.indent),C.color=U.chars[X].penState.foreground}var ie={foreground:C.color,underline:C.underline,italics:C.italics,background:"black",flash:!1};this.setPen(ie)},x.setBkgData=function(C){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(C)),this.backSpace(),this.setPen(C),this.insertChar(32)},x.setRollUpRows=function(C){this.nrRollUpRows=C},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(n.TEXT,this.getDisplayText());var C=this.currRow+1-this.nrRollUpRows,j=this.rows.splice(C,1)[0];j.clear(),this.rows.splice(this.currRow,0,j),this.logger.log(n.INFO,"Rolling up")},x.getDisplayText=function(C){C=C||!1;for(var j=[],F="",M=-1,Y=0;Y<w;Y++){var K=this.rows[Y].getTextString();K&&(M=Y+1,C?j.push("Row "+M+": '"+K+"'"):j.push(K.trim()))}return j.length>0&&(C?F="["+j.join(" | ")+"]":F=j.join(`
`)),F},x.getTextAndFormat=function(){return this.rows},_}(),E=function(){function _(S,C,j){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=S,this.outputFilter=C,this.mode=null,this.verbose=0,this.displayedMemory=new r(j),this.nonDisplayedMemory=new r(j),this.lastOutputScreen=new r(j),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=j}var x=_.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(C){this.outputFilter=C},x.setPAC=function(C){this.writeScreen.setPAC(C)},x.setBkgData=function(C){this.writeScreen.setBkgData(C)},x.setMode=function(C){if(C===this.mode)return;this.mode=C,this.logger.log(n.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},x.insertChars=function(C){for(var j=0;j<C.length;j++)this.writeScreen.insertChar(C[j]);var F=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,F+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(n.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(C){this.logger.log(n.INFO,"RU("+C+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(C)},x.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var C=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=C,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(C){this.logger.log(n.INFO,"TO("+C+") - Tab Offset"),this.writeScreen.moveCursor(C)},x.ccMIDROW=function(C){var j={flash:!1};if(j.underline=C%2===1,j.italics=C>=46,j.italics)j.foreground="white";else{var F=Math.floor(C/2)-16,M=["white","green","blue","cyan","red","yellow","magenta"];j.foreground=M[F]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(j)),this.writeScreen.setPen(j)},x.outputDataUpdate=function(C){C===void 0&&(C=!1);var j=this.logger.time;if(j===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=j:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,j,this.lastOutputScreen),C&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:j),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(C){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,C,this.displayedMemory),this.cueStartTime=C))},_}(),y=function(){function _(S,C,j){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var F=new s;this.channels=[null,new E(S,C,F),new E(S+1,j,F)],this.cmdHistory=O(),this.logger=F}var x=_.prototype;return x.getHandler=function(C){return this.channels[C].getHandler()},x.setHandler=function(C,j){this.channels[C].setHandler(j)},x.addData=function(C,j){var F,M,Y,K=!1;this.logger.time=C;for(var A=0;A<j.length;A+=2){if(M=j[A]&127,Y=j[A+1]&127,M===0&&Y===0)continue;if(this.logger.log(n.DATA,"["+h([j[A],j[A+1]])+"] -> ("+h([M,Y])+")"),F=this.parseCmd(M,Y),F||(F=this.parseMidrow(M,Y)),F||(F=this.parsePAC(M,Y)),F||(F=this.parseBackgroundAttributes(M,Y)),!F&&(K=this.parseChars(M,Y),K)){var W=this.currentChannel;if(W&&W>0){var U=this.channels[W];U.insertChars(K)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!F&&!K&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+h([M,Y])+" orig: "+h([j[A],j[A+1]]))}},x.parseCmd=function(C,j){var F=this.cmdHistory,M=(C===20||C===28||C===21||C===29)&&j>=32&&j<=47,Y=(C===23||C===31)&&j>=33&&j<=35;if(!(M||Y))return!1;if(R(C,j,F))return p(null,null,F),this.logger.log(n.DEBUG,"Repeated command ("+h([C,j])+") is dropped"),!0;var K=C===20||C===21||C===23?1:2,A=this.channels[K];return C===20||C===21||C===28||C===29?j===32?A.ccRCL():j===33?A.ccBS():j===34?A.ccAOF():j===35?A.ccAON():j===36?A.ccDER():j===37?A.ccRU(2):j===38?A.ccRU(3):j===39?A.ccRU(4):j===40?A.ccFON():j===41?A.ccRDC():j===42?A.ccTR():j===43?A.ccRTD():j===44?A.ccEDM():j===45?A.ccCR():j===46?A.ccENM():j===47&&A.ccEOC():A.ccTO(j-32),p(C,j,F),this.currentChannel=K,!0},x.parseMidrow=function(C,j){var F=0;if((C===17||C===25)&&j>=32&&j<=47){if(C===17?F=1:F=2,F!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var M=this.channels[F];return M?(M.ccMIDROW(j),this.logger.log(n.DEBUG,"MIDROW ("+h([C,j])+")"),!0):!1}return!1},x.parsePAC=function(C,j){var F,M=this.cmdHistory,Y=(C>=17&&C<=23||C>=25&&C<=31)&&j>=64&&j<=127,K=(C===16||C===24)&&j>=64&&j<=95;if(!(Y||K))return!1;if(R(C,j,M))return p(null,null,M),!0;var A=C<=23?1:2;j>=64&&j<=95?F=A===1?t[C]:a[C]:F=A===1?d[C]:c[C];var W=this.channels[A];return W?(W.setPAC(this.interpretPAC(F,j)),p(C,j,M),this.currentChannel=A,!0):!1},x.interpretPAC=function(C,j){var F,M={color:null,italics:!1,indent:null,underline:!1,row:C};return j>95?F=j-96:F=j-64,M.underline=(F&1)===1,F<=13?M.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(F/2)]:F<=15?(M.italics=!0,M.color="white"):M.indent=Math.floor((F-16)/2)*4,M},x.parseChars=function(C,j){var F,M=null,Y=null;if(C>=25?(F=2,Y=C-8):(F=1,Y=C),Y>=17&&Y<=19){var K;Y===17?K=j+80:Y===18?K=j+112:K=j+144,this.logger.log(n.INFO,"Special char '"+m(K)+"' in channel "+F),M=[K]}else C>=32&&C<=127&&(M=j===0?[C]:[C,j]);if(M){var A=h(M);this.logger.log(n.DEBUG,"Char codes = "+A.join(",")),p(C,j,this.cmdHistory)}return M},x.parseBackgroundAttributes=function(C,j){var F=(C===16||C===24)&&j>=32&&j<=47,M=(C===23||C===31)&&j>=45&&j<=47;if(!(F||M))return!1;var Y,K={};C===16||C===24?(Y=Math.floor((j-32)/2),K.background=o[Y],j%2===1&&(K.background=K.background+"_semi")):j===45?K.background="transparent":(K.foreground="black",j===47&&(K.underline=!0));var A=C<=23?1:2,W=this.channels[A];return W.setBkgData(K),p(C,j,this.cmdHistory),!0},x.reset=function(){for(var C=0;C<Object.keys(this.channels).length;C++){var j=this.channels[C];j&&j.reset()}this.cmdHistory=O()},x.cueSplitAtTime=function(C){for(var j=0;j<this.channels.length;j++){var F=this.channels[j];F&&F.cueSplitAtTime(C)}},_}();function p(_,x,S){S.a=_,S.b=x}function R(_,x,S){return S.a===_&&S.b===x}function O(){return{a:null,b:null}}g.default=y},"./src/utils/codecs.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"isCodecType",function(){return v}),T.d(g,"isCodecSupportedInMp4",function(){return m});var N={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function v(w,b){var t=N[b];return!!t&&t[w.slice(0,4)]===!0}function m(w,b){return MediaSource.isTypeSupported((b||"video")+'/mp4;codecs="'+w+'"')}},"./src/utils/cues.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/utils/vttparser.ts"),v=T("./src/utils/webvtt-parser.ts"),m=T("./src/utils/texttrack-utils.ts"),w=/\s/,b={newCue:function(d,a,c,o){for(var n=[],s,h,f,u,i,r=self.VTTCue||self.TextTrackCue,E=0;E<o.rows.length;E++)if(s=o.rows[E],f=!0,u=0,i="",!s.isEmpty()){for(var y=0;y<s.chars.length;y++)w.test(s.chars[y].uchar)&&f?u++:(i+=s.chars[y].uchar,f=!1);s.cueStartTime=a,a===c&&(c+=1e-4),u>=16?u--:u++;var p=Object(N.fixLineBreaks)(i.trim()),R=Object(v.generateCueId)(a,c,p);(!d||!d.cues||!d.cues.getCueById(R))&&(h=new r(a,c,p),h.id=R,h.line=E+1,h.align="left",h.position=10+Math.min(80,Math.floor(u*8/32)*10),n.push(h))}return d&&n.length&&(n.sort(function(O,_){return O.line==="auto"||_.line==="auto"?0:O.line>8&&_.line>8?_.line-O.line:O.line-_.line}),n.forEach(function(O){return Object(m.addCueToTrack)(d,O)})),n}};g.default=b},"./src/utils/discontinuities.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"findFirstFragWithCC",function(){return w}),T.d(g,"shouldAlignOnDiscontinuities",function(){return b}),T.d(g,"findDiscontinuousReferenceFrag",function(){return t}),T.d(g,"adjustSlidingStart",function(){return a}),T.d(g,"alignStream",function(){return c}),T.d(g,"alignPDT",function(){return n}),T.d(g,"alignFragmentByPDTDelta",function(){return s}),T.d(g,"alignMediaPlaylistByPDT",function(){return h});var N=T("./src/polyfills/number.ts"),v=T("./src/utils/logger.ts"),m=T("./src/controller/level-helper.ts");function w(f,u){for(var i=null,r=0,E=f.length;r<E;r++){var y=f[r];if(y&&y.cc===u){i=y;break}}return i}function b(f,u,i){return!!(u.details&&(i.endCC>i.startCC||f&&f.cc<i.startCC))}function t(f,u){var i=f.fragments,r=u.fragments;if(!r.length||!i.length){v.logger.log("No fragments to align");return}var E=w(i,r[0].cc);if(!E||E&&!E.startPTS){v.logger.log("No frag in previous level to align on");return}return E}function d(f,u){if(f){var i=f.start+u;f.start=f.startPTS=i,f.endPTS=i+f.duration}}function a(f,u){for(var i=u.fragments,r=0,E=i.length;r<E;r++)d(i[r],f);u.fragmentHint&&d(u.fragmentHint,f),u.alignedSliding=!0}function c(f,u,i){if(!u)return;o(f,i,u),!i.alignedSliding&&u.details&&n(i,u.details),!i.alignedSliding&&u.details&&!i.skippedSegments&&Object(m.adjustSliding)(u.details,i)}function o(f,u,i){if(b(f,i,u)){var r=t(i.details,u);r&&Object(N.isFiniteNumber)(r.start)&&(v.logger.log("Adjusting PTS using last level due to CC increase within current level "+u.url),a(r.start,u))}}function n(f,u){if(!u.fragments.length||!f.hasProgramDateTime||!u.hasProgramDateTime)return;var i=u.fragments[0].programDateTime,r=f.fragments[0].programDateTime,E=(r-i)/1e3+u.fragments[0].start;E&&Object(N.isFiniteNumber)(E)&&(v.logger.log("Adjusting PTS using programDateTime delta "+(r-i)+"ms, sliding:"+E.toFixed(3)+" "+f.url+" "),a(E,f))}function s(f,u){var i=f.programDateTime;if(!i)return;var r=(i-u)/1e3;f.start=f.startPTS=r,f.endPTS=r+f.duration}function h(f,u){if(!u.fragments.length||!f.hasProgramDateTime||!u.hasProgramDateTime)return;var i=u.fragments[0].programDateTime,r=u.fragments[0].start,E=i-r*1e3;f.fragments.forEach(function(y){s(y,E)}),f.fragmentHint&&s(f.fragmentHint,E),f.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/utils/ewma.ts"),v=function(){function m(b,t,d){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=d,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new N.default(b),this.fast_=new N.default(t)}var w=m.prototype;return w.update=function(t,d){var a=this.slow_,c=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new N.default(t,a.getEstimate(),a.getTotalWeight())),this.fast_.halfLife!==d&&(this.fast_=new N.default(d,c.getEstimate(),c.getTotalWeight()))},w.sample=function(t,d){t=Math.max(t,this.minDelayMs_);var a=8*d,c=t/1e3,o=a/c;this.fast_.sample(c,o),this.slow_.sample(c,o)},w.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},w.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},w.destroy=function(){},m}();g.default=v},"./src/utils/ewma.ts":function(P,g,T){"use strict";T.r(g);var N=function(){function v(w,b,t){b===void 0&&(b=0),t===void 0&&(t=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_=b,this.totalWeight_=t}var m=v.prototype;return m.sample=function(b,t){var d=Math.pow(this.alpha_,b);this.estimate_=t*(1-d)+d*this.estimate_,this.totalWeight_+=b},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},v}();g.default=N},"./src/utils/fetch-loader.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"fetchSupported",function(){return s});var N=T("./src/polyfills/number.ts"),v=T("./src/loader/load-stats.ts"),m=T("./src/demux/chunk-cache.ts");function w(r,E){r.prototype=Object.create(E.prototype),r.prototype.constructor=r,c(r,E)}function b(r){var E=typeof Map=="function"?new Map:void 0;return b=function(p){if(p===null||!a(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(p))return E.get(p);E.set(p,R)}function R(){return t(p,arguments,o(this).constructor)}return R.prototype=Object.create(p.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),c(R,p)},b(r)}function t(r,E,y){return d()?t=Reflect.construct:t=function(R,O,_){var x=[null];x.push.apply(x,O);var S=Function.bind.apply(R,x),C=new S;return _&&c(C,_.prototype),C},t.apply(null,arguments)}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}function a(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function c(r,E){return c=Object.setPrototypeOf||function(p,R){return p.__proto__=R,p},c(r,E)}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},o(r)}function n(){return n=Object.assign||function(r){for(var E=1;E<arguments.length;E++){var y=arguments[E];for(var p in y)Object.prototype.hasOwnProperty.call(y,p)&&(r[p]=y[p])}return r},n.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(r){}return!1}var h=function(){function r(y){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=y.fetchSetup||u,this.controller=new self.AbortController,this.stats=new v.LoadStats}var E=r.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(p,R,O){var _=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var S=f(p,this.controller.signal),C=O.onProgress,j=p.responseType==="arraybuffer",F=j?"byteLength":"length";this.context=p,this.config=R,this.callbacks=O,this.request=this.fetchSetup(p,S),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){_.abortInternal(),O.onTimeout(x,p,_.response)},R.timeout),self.fetch(this.request).then(function(M){if(_.response=_.loader=M,!M.ok){var Y=M.status,K=M.statusText;throw new i(K||"fetch, bad network response",Y,M)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(M.headers.get("Content-Length")||"0"),C&&Object(N.isFiniteNumber)(R.highWaterMark)?_.loadProgressively(M,x,p,R.highWaterMark,C):j?M.arrayBuffer():M.text()}).then(function(M){var Y=_.response;self.clearTimeout(_.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=M[F];var K={url:Y.url,data:M};C&&!Object(N.isFiniteNumber)(R.highWaterMark)&&C(x,p,M,Y),O.onSuccess(K,x,p,Y)}).catch(function(M){if(self.clearTimeout(_.requestTimeout),x.aborted)return;var Y=M.code||0;O.onError({code:Y,text:M.message},p,M.details)})},E.getCacheAge=function(){var p=null;if(this.response){var R=this.response.headers.get("age");p=R?parseFloat(R):null}return p},E.loadProgressively=function(p,R,O,_,x){_===void 0&&(_=0);var S=new m.default,C=p.body.getReader(),j=function F(){return C.read().then(function(M){if(M.done)return S.dataLength&&x(R,O,S.flush(),p),Promise.resolve(new ArrayBuffer(0));var Y=M.value,K=Y.length;return R.loaded+=K,K<_||S.dataLength?(S.push(Y),S.dataLength>=_&&x(R,O,S.flush(),p)):x(R,O,Y,p),F()}).catch(function(){return Promise.reject()})};return j()},r}();function f(r,E){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(n({},r.headers))};return r.rangeEnd&&y.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),y}function u(r,E){return new self.Request(r.url,E)}var i=function(r){w(E,r);function E(y,p,R){var O;return O=r.call(this,y)||this,O.code=void 0,O.details=void 0,O.code=p,O.details=R,O}return E}(b(Error));g.default=h},"./src/utils/imsc1-ttml-parser.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"IMSC1_CODEC",function(){return a}),T.d(g,"parseIMSC1",function(){return s});var N=T("./src/utils/mp4-tools.ts"),v=T("./src/utils/vttparser.ts"),m=T("./src/utils/vttcue.ts"),w=T("./src/demux/id3.ts"),b=T("./src/utils/timescale-conversion.ts"),t=T("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(_){for(var x=1;x<arguments.length;x++){var S=arguments[x];for(var C in S)Object.prototype.hasOwnProperty.call(S,C)&&(_[C]=S[C])}return _},d.apply(this,arguments)}var a="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,o=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,n={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(_,x,S,C,j){var F=Object(N.findBox)(new Uint8Array(_),["mdat"]);if(F.length===0){j(new Error("Could not parse IMSC1 mdat"));return}var M=F[0],Y=Object(w.utf8ArrayToStr)(new Uint8Array(_,M.start,M.end-M.start)),K=Object(b.toTimescaleFromScale)(x,1,S);try{C(h(Y,K))}catch(A){j(A)}}function h(_,x){var S=new DOMParser,C=S.parseFromString(_,"text/xml"),j=C.getElementsByTagName("tt")[0];if(!j)throw new Error("Invalid ttml");var F={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},M=Object.keys(F).reduce(function(U,D){return U[D]=j.getAttribute("ttp:"+D)||F[D],U},{}),Y=j.getAttribute("xml:space")!=="preserve",K=u(f(j,"styling","style")),A=u(f(j,"layout","region")),W=f(j,"body","[begin]");return[].map.call(W,function(U){var D=i(U,Y);if(!D||!U.hasAttribute("begin"))return null;var X=p(U.getAttribute("begin"),M),ie=p(U.getAttribute("dur"),M),oe=p(U.getAttribute("end"),M);if(X===null)throw y(U);if(oe===null){if(ie===null)throw y(U);oe=X+ie}var de=new m.default(X-x,oe-x,D);de.id=Object(t.generateCueId)(de.startTime,de.endTime,de.text);var Ce=A[U.getAttribute("region")],Ae=K[U.getAttribute("style")];de.position=10,de.size=80;var me=r(Ce,Ae),Se=me.textAlign;if(Se){var ye=n[Se];ye&&(de.lineAlign=ye),de.align=Se}return d(de,me),de}).filter(function(U){return U!==null})}function f(_,x,S){var C=_.getElementsByTagName(x)[0];return C?[].slice.call(C.querySelectorAll(S)):[]}function u(_){return _.reduce(function(x,S){var C=S.getAttribute("xml:id");return C&&(x[C]=S),x},{})}function i(_,x){return[].slice.call(_.childNodes).reduce(function(S,C,j){var F;return C.nodeName==="br"&&j?S+`
`:(F=C.childNodes)!==null&&F!==void 0&&F.length?i(C,x):x?S+C.textContent.trim().replace(/\s+/g," "):S+C.textContent},"")}function r(_,x){var S="http://www.w3.org/ns/ttml#styling",C=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return C.reduce(function(j,F){var M=E(x,S,F)||E(_,S,F);return M&&(j[F]=M),j},{})}function E(_,x,S){return _.hasAttributeNS(x,S)?_.getAttributeNS(x,S):null}function y(_){return new Error("Could not parse ttml timestamp "+_)}function p(_,x){if(!_)return null;var S=Object(v.parseTimeStamp)(_);return S===null&&(c.test(_)?S=R(_,x):o.test(_)&&(S=O(_,x))),S}function R(_,x){var S=c.exec(_),C=(S[4]|0)+(S[5]|0)/x.subFrameRate;return(S[1]|0)*3600+(S[2]|0)*60+(S[3]|0)+C/x.frameRate}function O(_,x){var S=o.exec(_),C=Number(S[1]),j=S[2];switch(j){case"h":return C*3600;case"m":return C*60;case"ms":return C*1e3;case"f":return C/x.frameRate;case"t":return C/x.tickRate}return C}},"./src/utils/logger.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"enableLogs",function(){return t}),T.d(g,"logger",function(){return d});var N=function(){},v={trace:N,debug:N,log:N,warn:N,info:N,error:N},m=v;function w(a){var c=self.console[a];return c?c.bind(self.console,"["+a+"] >"):N}function b(a){for(var c=arguments.length,o=new Array(c>1?c-1:0),n=1;n<c;n++)o[n-1]=arguments[n];o.forEach(function(s){m[s]=a[s]?a[s].bind(a):w(s)})}function t(a){if(self.console&&a===!0||typeof a=="object"){b(a,"debug","log","info","warn","error");try{m.log()}catch(c){m=v}}else m=v}var d=m},"./src/utils/mediakeys-helper.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"KeySystems",function(){return N}),T.d(g,"requestMediaKeySystemAccess",function(){return v});var N;(function(m){m.WIDEVINE="com.widevine.alpha",m.PLAYREADY="com.microsoft.playready"})(N||(N={}));var v=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"getMediaSource",function(){return N});function N(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"bin2str",function(){return b}),T.d(g,"readUint16",function(){return t}),T.d(g,"readUint32",function(){return d}),T.d(g,"writeUint32",function(){return a}),T.d(g,"findBox",function(){return c}),T.d(g,"parseSegmentIndex",function(){return o}),T.d(g,"parseInitSegment",function(){return n}),T.d(g,"getStartDTS",function(){return s}),T.d(g,"getDuration",function(){return h}),T.d(g,"computeRawDurationFromSamples",function(){return f}),T.d(g,"offsetStartDTS",function(){return u}),T.d(g,"segmentValidRange",function(){return i}),T.d(g,"appendUint8Array",function(){return r});var N=T("./src/utils/typed-array.ts"),v=T("./src/loader/fragment.ts"),m=Math.pow(2,32)-1,w=[].push;function b(E){return String.fromCharCode.apply(null,E)}function t(E,y){"data"in E&&(y+=E.start,E=E.data);var p=E[y]<<8|E[y+1];return p<0?65536+p:p}function d(E,y){"data"in E&&(y+=E.start,E=E.data);var p=E[y]<<24|E[y+1]<<16|E[y+2]<<8|E[y+3];return p<0?4294967296+p:p}function a(E,y,p){"data"in E&&(y+=E.start,E=E.data),E[y]=p>>24,E[y+1]=p>>16&255,E[y+2]=p>>8&255,E[y+3]=p&255}function c(E,y){var p=[];if(!y.length)return p;var R,O,_;"data"in E?(R=E.data,O=E.start,_=E.end):(R=E,O=0,_=R.byteLength);for(var x=O;x<_;){var S=d(R,x),C=b(R.subarray(x+4,x+8)),j=S>1?x+S:_;if(C===y[0])if(y.length===1)p.push({data:R,start:x+8,end:j});else{var F=c({data:R,start:x+8,end:j},y.slice(1));F.length&&w.apply(p,F)}x=j}return p}function o(E){var y=c(E,["moov"]),p=y[0],R=p?p.end:null,O=c(E,["sidx"]);if(!O||!O[0])return null;var _=[],x=O[0],S=x.data[0],C=S===0?8:16,j=d(x,C);C+=4;var F=0,M=0;S===0?C+=8:C+=16,C+=2;var Y=x.end+M,K=t(x,C);C+=2;for(var A=0;A<K;A++){var W=C,U=d(x,W);W+=4;var D=U&2147483647,X=(U&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ie=d(x,W);W+=4,_.push({referenceSize:D,subsegmentDuration:ie,info:{duration:ie/j,start:Y,end:Y+D-1}}),Y+=D,W+=4,C=W}return{earliestPresentationTime:F,timescale:j,version:S,referencesCount:K,references:_,moovEndOffset:R}}function n(E){for(var y=[],p=c(E,["moov","trak"]),R=0;R<p.length;R++){var O=p[R],_=c(O,["tkhd"])[0];if(_){var x=_.data[_.start],S=x===0?12:20,C=d(_,S),j=c(O,["mdia","mdhd"])[0];if(j){x=j.data[j.start],S=x===0?12:20;var F=d(j,S),M=c(O,["mdia","hdlr"])[0];if(M){var Y=b(M.data.subarray(M.start+8,M.start+12)),K={soun:v.ElementaryStreamTypes.AUDIO,vide:v.ElementaryStreamTypes.VIDEO}[Y];if(K){var A=c(O,["mdia","minf","stbl","stsd"])[0],W=void 0;A&&(W=b(A.data.subarray(A.start+12,A.start+16))),y[C]={timescale:F,type:K},y[K]={timescale:F,id:C,codec:W}}}}}}var U=c(E,["moov","mvex","trex"]);return U.forEach(function(D){var X=d(D,4),ie=y[X];ie&&(ie.default={duration:d(D,12),flags:d(D,20)})}),y}function s(E,y){return c(y,["moof","traf"]).reduce(function(p,R){var O=c(R,["tfdt"])[0],_=O.data[O.start],x=c(R,["tfhd"]).reduce(function(S,C){var j=d(C,4),F=E[j];if(F){var M=d(O,4);_===1&&(M*=Math.pow(2,32),M+=d(O,8));var Y=F.timescale||9e4,K=M/Y;if(isFinite(K)&&(S===null||K<S))return K}return S},null);return x!==null&&isFinite(x)&&(p===null||x<p)?x:p},null)||0}function h(E,y){for(var p=0,R=0,O=0,_=c(E,["moof","traf"]),x=0;x<_.length;x++){var S=_[x],C=c(S,["tfhd"])[0],j=d(C,4),F=y[j];if(!F)continue;var M=F.default,Y=d(C,0)|(M==null?void 0:M.flags),K=M==null?void 0:M.duration;Y&8&&(Y&2?K=d(C,12):K=d(C,8));for(var A=F.timescale||9e4,W=c(S,["trun"]),U=0;U<W.length;U++){if(K){var D=d(W[U],4);p=K*D}else p=f(W[U]);F.type===v.ElementaryStreamTypes.VIDEO?R+=p/A:F.type===v.ElementaryStreamTypes.AUDIO&&(O+=p/A)}}if(R===0&&O===0){var X=o(E);if(X!=null&&X.references)return X.references.reduce(function(ie,oe){return ie+oe.info.duration||0},0)}return R||O}function f(E){var y=d(E,0),p=8;y&1&&(p+=4),y&4&&(p+=4);for(var R=0,O=d(E,4),_=0;_<O;_++){if(y&256){var x=d(E,p);R+=x,p+=4}y&512&&(p+=4),y&1024&&(p+=4),y&2048&&(p+=4)}return R}function u(E,y,p){c(y,["moof","traf"]).forEach(function(R){c(R,["tfhd"]).forEach(function(O){var _=d(O,4),x=E[_];if(!x)return;var S=x.timescale||9e4;c(R,["tfdt"]).forEach(function(C){var j=C.data[C.start],F=d(C,4);if(j===0)a(C,4,F-p*S);else{F*=Math.pow(2,32),F+=d(C,8),F-=p*S,F=Math.max(F,0);var M=Math.floor(F/(m+1)),Y=Math.floor(F%(m+1));a(C,4,M),a(C,8,Y)}})})})}function i(E){var y={valid:null,remainder:null},p=c(E,["moof"]);if(p){if(p.length<2)return y.remainder=E,y}else return y;var R=p[p.length-1];return y.valid=Object(N.sliceUint8)(E,0,R.start-8),y.remainder=Object(N.sliceUint8)(E,R.start-8),y}function r(E,y){var p=new Uint8Array(E.length+y.length);return p.set(E),p.set(y,E.length),p}},"./src/utils/output-filter.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"default",function(){return N});var N=function(){function v(w,b){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=w,this.trackName=b}var m=v.prototype;return m.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},m.newCue=function(b,t,d){(this.startTime===null||this.startTime>b)&&(this.startTime=b),this.endTime=t,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},v}()},"./src/utils/texttrack-utils.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"sendAddTrackEvent",function(){return v}),T.d(g,"addCueToTrack",function(){return m}),T.d(g,"clearCurrentCues",function(){return w}),T.d(g,"removeCuesInRange",function(){return b}),T.d(g,"getCuesInRange",function(){return d});var N=T("./src/utils/logger.ts");function v(a,c){var o;try{o=new Event("addtrack")}catch(n){o=document.createEvent("Event"),o.initEvent("addtrack",!1,!1)}o.track=a,c.dispatchEvent(o)}function m(a,c){var o=a.mode;if(o==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(c.id))try{if(a.addCue(c),!a.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(s){N.logger.debug("[texttrack-utils]: "+s);var n=new self.TextTrackCue(c.startTime,c.endTime,c.text);n.id=c.id,a.addCue(n)}o==="disabled"&&(a.mode=o)}function w(a){var c=a.mode;if(c==="disabled"&&(a.mode="hidden"),a.cues)for(var o=a.cues.length;o--;)a.removeCue(a.cues[o]);c==="disabled"&&(a.mode=c)}function b(a,c,o){var n=a.mode;if(n==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0)for(var s=d(a.cues,c,o),h=0;h<s.length;h++)a.removeCue(s[h]);n==="disabled"&&(a.mode=n)}function t(a,c){if(c<a[0].startTime)return 0;var o=a.length-1;if(c>a[o].endTime)return-1;for(var n=0,s=o;n<=s;){var h=Math.floor((s+n)/2);if(c<a[h].startTime)s=h-1;else if(c>a[h].startTime&&n<o)n=h+1;else return h}return a[n].startTime-c<c-a[s].startTime?n:s}function d(a,c,o){var n=[],s=t(a,c);if(s>-1)for(var h=s,f=a.length;h<f;h++){var u=a[h];if(u.startTime>=c&&u.endTime<=o)n.push(u);else if(u.startTime>o)return n}return n}},"./src/utils/time-ranges.ts":function(P,g,T){"use strict";T.r(g);var N={toString:function(m){for(var w="",b=m.length,t=0;t<b;t++)w+="["+m.start(t).toFixed(3)+","+m.end(t).toFixed(3)+"]";return w}};g.default=N},"./src/utils/timescale-conversion.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"toTimescaleFromBase",function(){return v}),T.d(g,"toTimescaleFromScale",function(){return m}),T.d(g,"toMsFromMpegTsClock",function(){return w}),T.d(g,"toMpegTsClockFromTimescale",function(){return b});var N=9e4;function v(t,d,a,c){a===void 0&&(a=1),c===void 0&&(c=!1);var o=t*d*a;return c?Math.round(o):o}function m(t,d,a,c){return a===void 0&&(a=1),c===void 0&&(c=!1),v(t,d,1/a,c)}function w(t,d){return d===void 0&&(d=!1),v(t,1e3,1/N,d)}function b(t,d){return d===void 0&&(d=1),v(t,N,1/d)}},"./src/utils/typed-array.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"sliceUint8",function(){return N});function N(v,m,w){return Uint8Array.prototype.slice?v.slice(m,w):new Uint8Array(Array.prototype.slice.call(v,m,w))}},"./src/utils/vttcue.ts":function(P,g,T){"use strict";T.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var N=["","lr","rl"],v=["start","middle","end","left","right"];function m(a,c){if(typeof c!="string")return!1;if(!Array.isArray(a))return!1;var o=c.toLowerCase();return~a.indexOf(o)?o:!1}function w(a){return m(N,a)}function b(a){return m(v,a)}function t(a){for(var c=arguments.length,o=new Array(c>1?c-1:0),n=1;n<c;n++)o[n-1]=arguments[n];for(var s=1;s<arguments.length;s++){var h=arguments[s];for(var f in h)a[f]=h[f]}return a}function d(a,c,o){var n=this,s={enumerable:!0};n.hasBeenReset=!1;var h="",f=!1,u=a,i=c,r=o,E=null,y="",p=!0,R="auto",O="start",_=50,x="middle",S=50,C="middle";Object.defineProperty(n,"id",t({},s,{get:function(){return h},set:function(F){h=""+F}})),Object.defineProperty(n,"pauseOnExit",t({},s,{get:function(){return f},set:function(F){f=!!F}})),Object.defineProperty(n,"startTime",t({},s,{get:function(){return u},set:function(F){if(typeof F!="number")throw new TypeError("Start time must be set to a number.");u=F,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",t({},s,{get:function(){return i},set:function(F){if(typeof F!="number")throw new TypeError("End time must be set to a number.");i=F,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",t({},s,{get:function(){return r},set:function(F){r=""+F,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",t({},s,{get:function(){return E},set:function(F){E=F,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",t({},s,{get:function(){return y},set:function(F){var M=w(F);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",t({},s,{get:function(){return p},set:function(F){p=!!F,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",t({},s,{get:function(){return R},set:function(F){if(typeof F!="number"&&F!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=F,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",t({},s,{get:function(){return O},set:function(F){var M=b(F);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");O=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",t({},s,{get:function(){return _},set:function(F){if(F<0||F>100)throw new Error("Position must be between 0 and 100.");_=F,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",t({},s,{get:function(){return x},set:function(F){var M=b(F);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");x=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",t({},s,{get:function(){return S},set:function(F){if(F<0||F>100)throw new Error("Size must be between 0 and 100.");S=F,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",t({},s,{get:function(){return C},set:function(F){var M=b(F);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");C=M,this.hasBeenReset=!0}})),n.displayState=void 0}return d.prototype.getCueAsHTML=function(){var a=self.WebVTT;return a.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"parseTimeStamp",function(){return m}),T.d(g,"fixLineBreaks",function(){return c}),T.d(g,"VTTParser",function(){return o});var N=T("./src/utils/vttcue.ts"),v=function(){function n(){}var s=n.prototype;return s.decode=function(f,u){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))},n}();function m(n){function s(f,u,i,r){return(f|0)*3600+(u|0)*60+(i|0)+parseFloat(r||0)}var h=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?s(h[2],h[3],0,h[4]):s(h[1],h[2],h[3],h[4]):null}var w=function(){function n(){this.values=Object.create(null)}var s=n.prototype;return s.set=function(f,u){!this.get(f)&&u!==""&&(this.values[f]=u)},s.get=function(f,u,i){return i?this.has(f)?this.values[f]:u[i]:this.has(f)?this.values[f]:u},s.has=function(f){return f in this.values},s.alt=function(f,u,i){for(var r=0;r<i.length;++r)if(u===i[r]){this.set(f,u);break}},s.integer=function(f,u){/^-?\d+$/.test(u)&&this.set(f,parseInt(u,10))},s.percent=function(f,u){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(u)){var i=parseFloat(u);if(i>=0&&i<=100)return this.set(f,i),!0}return!1},n}();function b(n,s,h,f){var u=f?n.split(f):[n];for(var i in u){if(typeof u[i]!="string")continue;var r=u[i].split(h);if(r.length!==2)continue;var E=r[0],y=r[1];s(E,y)}}var t=new N.default(0,0,""),d=t.align==="middle"?"middle":"center";function a(n,s,h){var f=n;function u(){var E=m(n);if(E===null)throw new Error("Malformed timestamp: "+f);return n=n.replace(/^[^\sa-zA-Z-]+/,""),E}function i(E,y){var p=new w;b(E,function(_,x){var S;switch(_){case"region":for(var C=h.length-1;C>=0;C--)if(h[C].id===x){p.set(_,h[C].region);break}break;case"vertical":p.alt(_,x,["rl","lr"]);break;case"line":S=x.split(","),p.integer(_,S[0]),p.percent(_,S[0])&&p.set("snapToLines",!1),p.alt(_,S[0],["auto"]),S.length===2&&p.alt("lineAlign",S[1],["start",d,"end"]);break;case"position":S=x.split(","),p.percent(_,S[0]),S.length===2&&p.alt("positionAlign",S[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":p.percent(_,x);break;case"align":p.alt(_,x,["start",d,"end","left","right"]);break}},/:/,/\s/),y.region=p.get("region",null),y.vertical=p.get("vertical","");var R=p.get("line","auto");R==="auto"&&t.line===-1&&(R=-1),y.line=R,y.lineAlign=p.get("lineAlign","start"),y.snapToLines=p.get("snapToLines",!0),y.size=p.get("size",100),y.align=p.get("align",d);var O=p.get("position","auto");O==="auto"&&t.position===50&&(O=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=O}function r(){n=n.replace(/^\s+/,"")}if(r(),s.startTime=u(),r(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+f);n=n.substr(3),r(),s.endTime=u(),r(),i(n,s)}function c(n){return n.replace(/<br(?: \/)?>/gi,`
`)}var o=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new v,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=n.prototype;return s.parse=function(f){var u=this;f&&(u.buffer+=u.decoder.decode(f,{stream:!0}));function i(){var O=u.buffer,_=0;for(O=c(O);_<O.length&&O[_]!=="\r"&&O[_]!==`
`;)++_;var x=O.substr(0,_);return O[_]==="\r"&&++_,O[_]===`
`&&++_,u.buffer=O.substr(_),x}function r(O){b(O,function(_,x){},/:/)}try{var E="";if(u.state==="INITIAL"){if(!/\r\n|\n/.test(u.buffer))return this;E=i();var y=E.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");u.state="HEADER"}for(var p=!1;u.buffer;){if(!/\r\n|\n/.test(u.buffer))return this;p?p=!1:E=i();switch(u.state){case"HEADER":/:/.test(E)?r(E):E||(u.state="ID");continue;case"NOTE":E||(u.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){u.state="NOTE";break}if(!E)continue;if(u.cue=new N.default(0,0,""),u.state="CUE",E.indexOf("-->")===-1){u.cue.id=E;continue}case"CUE":if(!u.cue){u.state="BADCUE";continue}try{a(E,u.cue,u.regionList)}catch(O){u.cue=null,u.state="BADCUE";continue}u.state="CUETEXT";continue;case"CUETEXT":{var R=E.indexOf("-->")!==-1;if(!E||R&&(p=!0)){u.oncue&&u.cue&&u.oncue(u.cue),u.cue=null,u.state="ID";continue}if(u.cue===null)continue;u.cue.text&&(u.cue.text+=`
`),u.cue.text+=E}continue;case"BADCUE":E||(u.state="ID")}}}catch(O){u.state==="CUETEXT"&&u.cue&&u.oncue&&u.oncue(u.cue),u.cue=null,u.state=u.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var f=this;try{if((f.cue||f.state==="HEADER")&&(f.buffer+=`
`,f.parse()),f.state==="INITIAL"||f.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(u){f.onparsingerror&&f.onparsingerror(u)}return f.onflush&&f.onflush(),this},n}()},"./src/utils/webvtt-parser.ts":function(P,g,T){"use strict";T.r(g),T.d(g,"generateCueId",function(){return o}),T.d(g,"parseWebVTT",function(){return s});var N=T("./src/polyfills/number.ts"),v=T("./src/utils/vttparser.ts"),m=T("./src/demux/id3.ts"),w=T("./src/utils/timescale-conversion.ts"),b=T("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,d=function(f,u,i){return i===void 0&&(i=0),f.substr(i,u.length)===u},a=function(f){var u=parseInt(f.substr(-3)),i=parseInt(f.substr(-6,2)),r=parseInt(f.substr(-9,2)),E=f.length>9?parseInt(f.substr(0,f.indexOf(":"))):0;if(!Object(N.isFiniteNumber)(u)||!Object(N.isFiniteNumber)(i)||!Object(N.isFiniteNumber)(r)||!Object(N.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+f);return u+=1e3*i,u+=60*1e3*r,u+=60*60*1e3*E,u},c=function(f){for(var u=5381,i=f.length;i;)u=u*33^f.charCodeAt(--i);return(u>>>0).toString()};function o(h,f,u){return c(h.toString())+c(f.toString())+c(u)}var n=function(f,u,i){var r=f[u],E=f[r.prevCC];if(!E||!E.new&&r.new){f.ccOffset=f.presentationOffset=r.start,r.new=!1;return}for(;(y=E)!==null&&y!==void 0&&y.new;){var y;f.ccOffset+=r.start-E.start,r.new=!1,r=E,E=f[r.prevCC]}f.presentationOffset=i};function s(h,f,u,i,r,E,y,p){var R=new v.VTTParser,O=Object(m.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(t,`
`).split(`
`),_=[],x=Object(w.toMpegTsClockFromTimescale)(f,u),S="00:00.000",C=0,j=0,F,M=!0,Y=!1;R.oncue=function(K){var A=i[r],W=i.ccOffset,U=(C-x)/9e4;if(A!=null&&A.new&&(j!==void 0?W=i.ccOffset=A.start:n(i,r,U)),U&&(W=U-i.presentationOffset),Y){var D=K.endTime-K.startTime,X=Object(b.normalizePts)((K.startTime+W-j)*9e4,E*9e4)/9e4;K.startTime=X,K.endTime=X+D}var ie=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(ie)),K.id||(K.id=o(K.startTime,K.endTime,ie)),K.endTime>0&&_.push(K)},R.onparsingerror=function(K){F=K},R.onflush=function(){if(F){p(F);return}y(_)},O.forEach(function(K){if(M)if(d(K,"X-TIMESTAMP-MAP=")){M=!1,Y=!0,K.substr(16).split(",").forEach(function(A){d(A,"LOCAL:")?S=A.substr(6):d(A,"MPEGTS:")&&(C=parseInt(A.substr(7)))});try{j=a(S)/1e3}catch(A){Y=!1,F=A}return}else K===""&&(M=!1);R.parse(K+`
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(P,g,T){"use strict";T.r(g);var N=T("./src/utils/logger.ts"),v=T("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,w=function(){function b(d){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=d?d.xhrSetup:null,this.stats=new v.LoadStats,this.retryDelay=0}var t=b.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var a=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),a&&(a.onreadystatechange=null,a.onprogress=null,a.readyState!==4&&(this.stats.aborted=!0,a.abort()))},t.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(a,c,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=a,this.config=c,this.callbacks=o,this.retryDelay=c.retryDelay,this.loadInternal()},t.loadInternal=function(){var a=this.config,c=this.context;if(!a)return;var o=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var s=this.xhrSetup;try{if(s)try{s(o,c.url)}catch(u){o.open("GET",c.url,!0),s(o,c.url)}o.readyState||o.open("GET",c.url,!0);var h=this.context.headers;if(h)for(var f in h)o.setRequestHeader(f,h[f])}catch(u){this.callbacks.onError({code:o.status,text:u.message},c,o);return}c.rangeEnd&&o.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),o.onreadystatechange=this.readystatechange.bind(this),o.onprogress=this.loadprogress.bind(this),o.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),o.send()},t.readystatechange=function(){var a=this.context,c=this.loader,o=this.stats;if(!a||!c)return;var n=c.readyState,s=this.config;if(o.aborted)return;if(n>=2)if(self.clearTimeout(this.requestTimeout),o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start)),n===4){c.onreadystatechange=null,c.onprogress=null;var h=c.status;if(h>=200&&h<300){o.loading.end=Math.max(self.performance.now(),o.loading.first);var f,u;if(a.responseType==="arraybuffer"?(f=c.response,u=f.byteLength):(f=c.responseText,u=f.length),o.loaded=o.total=u,!this.callbacks)return;var i=this.callbacks.onProgress;if(i&&i(o,a,f,c),!this.callbacks)return;var r={url:c.responseURL,data:f};this.callbacks.onSuccess(r,o,a,c)}else o.retry>=s.maxRetry||h>=400&&h<499?(N.logger.error(h+" while loading "+a.url),this.callbacks.onError({code:h,text:c.statusText},a,c)):(N.logger.warn(h+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),o.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},t.loadtimeout=function(){N.logger.warn("timeout while loading "+this.context.url);var a=this.callbacks;a&&(this.abortInternal(),a.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(a){var c=this.stats;c.loaded=a.loaded,a.lengthComputable&&(c.total=a.total)},t.getCacheAge=function(){var a=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");a=c?parseFloat(c):null}return a},b}();g.default=w}}).default})},vHTk:function(H,q,L){H.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.StreamCipher,v=g.algo,m=v.RC4=N.extend({_doReset:function(){for(var t=this._key,d=t.words,a=t.sigBytes,c=this._S=[],o=0;o<256;o++)c[o]=o;for(var o=0,n=0;o<256;o++){var s=o%a,h=d[s>>>2]>>>24-s%4*8&255;n=(n+c[o]+h)%256;var f=c[o];c[o]=c[n],c[n]=f}this._i=this._j=0},_doProcessBlock:function(t,d){t[d]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var t=this._S,d=this._i,a=this._j,c=0,o=0;o<4;o++){d=(d+1)%256,a=(a+t[d])%256;var n=t[d];t[d]=t[a],t[a]=n,c|=t[(t[d]+t[a])%256]<<24-o*8}return this._i=d,this._j=a,c}g.RC4=N._createHelper(m);var b=v.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)w.call(this)}});g.RC4Drop=N._createHelper(b)}(),P.RC4})},wCXF:function(H,q,L){"use strict";L.d(q,"a",function(){return $e});var P=L("rePB"),g=L("VTBJ"),T=L("KQm4"),N=L("U8pU"),v=L("ODXe"),m=L("q1tI"),w=L("TSYQ"),b=L.n(w),t=L("Gytx"),d=L.n(t),a=L("Kwbf"),c=L("t23M"),o=L("qx4F"),n=L("6eGT"),s=L("IBYe"),h=L("Ff2n"),f=L("c+Xe"),u=L("fyJ8"),i=L("biw7");function r(Be,Ie,rt,lt,_e){var ce=rt[Be]||{},fe=rt[Ie]||{},ve,Oe;ce.fixed==="left"?ve=lt.left[Be]:fe.fixed==="right"&&(Oe=lt.right[Ie]);var ge=!1,Ee=!1,Re=!1,Le=!1,Pe=rt[Ie+1],Ke=rt[Be-1];if(_e==="rtl"){if(ve!==void 0){var it=Ke&&Ke.fixed==="left";Le=!it}else if(Oe!==void 0){var st=Pe&&Pe.fixed==="right";Re=!st}}else if(ve!==void 0){var Ot=Pe&&Pe.fixed==="left";ge=!Ot}else if(Oe!==void 0){var Rt=Ke&&Ke.fixed==="right";Ee=!Rt}return{fixLeft:ve,fixRight:Oe,lastFixLeft:ge,firstFixRight:Ee,lastFixRight:Re,firstFixLeft:Le,isSticky:lt.isSticky}}var E=L("sR1s");function y(Be){var Ie=Be.cells,rt=Be.stickyOffsets,lt=Be.flattenColumns,_e=Be.rowComponent,ce=Be.cellComponent,fe=Be.onHeaderRow,ve=Be.index,Oe=m.useContext(i.a),ge=Oe.prefixCls,Ee=Oe.direction,Re;fe&&(Re=fe(Ie.map(function(Pe){return Pe.column}),ve));var Le=Object(E.a)(Ie.map(function(Pe){return Pe.column}));return m.createElement(_e,Object.assign({},Re),Ie.map(function(Pe,Ke){var it=Pe.column,st=r(Pe.colStart,Pe.colEnd,lt,rt,Ee),Ot;return it&&it.onHeaderCell&&(Ot=Pe.column.onHeaderCell(it)),m.createElement(u.a,Object.assign({},Pe,{ellipsis:it.ellipsis,align:it.align,component:ce,prefixCls:ge,key:Le[Ke]},st,{additionalProps:Ot,rowType:"header"}))}))}y.displayName="HeaderRow";var p=y;function R(Be){var Ie=[];function rt(fe,ve){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Oe]=Ie[Oe]||[];var ge=ve,Ee=fe.filter(Boolean).map(function(Re){var Le={key:Re.key,className:Re.className||"",children:Re.title,column:Re,colStart:ge},Pe=1,Ke=Re.children;return Ke&&Ke.length>0&&(Pe=rt(Ke,ge,Oe+1).reduce(function(it,st){return it+st},0),Le.hasSubColumns=!0),"colSpan"in Re&&(Pe=Re.colSpan),"rowSpan"in Re&&(Le.rowSpan=Re.rowSpan),Le.colSpan=Pe,Le.colEnd=Le.colStart+Pe-1,Ie[Oe].push(Le),ge+=Pe,Pe});return Ee}rt(Be,0);for(var lt=Ie.length,_e=function(ve){Ie[ve].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=lt-ve)})},ce=0;ce<lt;ce+=1)_e(ce);return Ie}function O(Be){var Ie=Be.stickyOffsets,rt=Be.columns,lt=Be.flattenColumns,_e=Be.onHeaderRow,ce=m.useContext(i.a),fe=ce.prefixCls,ve=ce.getComponent,Oe=m.useMemo(function(){return R(rt)},[rt]),ge=ve(["header","wrapper"],"thead"),Ee=ve(["header","row"],"tr"),Re=ve(["header","cell"],"th");return m.createElement(ge,{className:"".concat(fe,"-thead")},Oe.map(function(Le,Pe){var Ke=m.createElement(p,{key:Pe,flattenColumns:lt,cells:Le,stickyOffsets:Ie,rowComponent:Ee,cellComponent:Re,onHeaderRow:_e,index:Pe});return Ke}))}var _=O,x=L("hW8S");function S(Be){for(var Ie=Be.colWidths,rt=Be.columns,lt=Be.columCount,_e=[],ce=lt||rt.length,fe=!1,ve=ce-1;ve>=0;ve-=1){var Oe=Ie[ve],ge=rt&&rt[ve],Ee=ge&&ge[x.a];(Oe||Ee||fe)&&(_e.unshift(m.createElement("col",Object.assign({key:ve,style:{width:Oe,minWidth:Oe}},Ee))),fe=!0)}return m.createElement("colgroup",null,_e)}var C=S;function j(Be,Ie){return Object(m.useMemo)(function(){for(var rt=[],lt=0;lt<Ie;lt+=1){var _e=Be[lt];if(_e!==void 0)rt[lt]=_e;else return null}return rt},[Be.join("_"),Ie])}var F=m.forwardRef(function(Be,Ie){var rt=Be.noData,lt=Be.columns,_e=Be.flattenColumns,ce=Be.colWidths,fe=Be.columCount,ve=Be.stickyOffsets,Oe=Be.direction,ge=Be.fixHeader,Ee=Be.offsetHeader,Re=Be.stickyClassName,Le=Be.onScroll,Pe=Object(h.a)(Be,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ke=m.useContext(i.a),it=Ke.prefixCls,st=Ke.scrollbarSize,Ot=Ke.isSticky,Rt=Ot&&!ge?0:st,sr=m.useRef(null),Zt=m.useCallback(function(an){Object(f.b)(Ie,an),Object(f.b)(sr,an)},[]);m.useEffect(function(){var an;function tn(Ir){var hn=Ir.currentTarget,lr=Ir.deltaX;lr&&(Le({currentTarget:hn,scrollLeft:hn.scrollLeft+lr}),Ir.preventDefault())}return(an=sr.current)===null||an===void 0||an.addEventListener("wheel",tn),function(){var Ir;(Ir=sr.current)===null||Ir===void 0||Ir.removeEventListener("wheel",tn)}},[]);var wt=_e[_e.length-1],Br={fixed:wt?wt.fixed:null,onHeaderCell:function(){return{className:"".concat(it,"-cell-scrollbar")}}},Nr=Object(m.useMemo)(function(){return Rt?[].concat(Object(T.a)(lt),[Br]):lt},[Rt,lt]),jr=Object(m.useMemo)(function(){return Rt?[].concat(Object(T.a)(_e),[Br]):_e},[Rt,_e]),cn=Object(m.useMemo)(function(){var an=ve.right,tn=ve.left;return Object(g.a)(Object(g.a)({},ve),{},{left:Oe==="rtl"?[].concat(Object(T.a)(tn.map(function(Ir){return Ir+Rt})),[0]):tn,right:Oe==="rtl"?an:[].concat(Object(T.a)(an.map(function(Ir){return Ir+Rt})),[0]),isSticky:Ot})},[Rt,ve,Ot]),xr=j(ce,fe);return m.createElement("div",{style:Object(g.a)({overflow:"hidden"},Ot?{top:Ee}:{}),ref:Zt,className:b()("".concat(it,"-header"),Object(P.a)({},Re,!!Re))},m.createElement("table",{style:{tableLayout:"fixed",visibility:rt||xr?null:"hidden"}},m.createElement(C,{colWidths:xr?[].concat(Object(T.a)(xr),[Rt]):[],columCount:fe+1,columns:jr}),m.createElement(_,Object.assign({},Pe,{stickyOffsets:cn,columns:Nr,flattenColumns:jr}))))});F.displayName="FixedHeader";var M=F,Y=m.createContext(null),K=Y;function A(Be){var Ie=Be.prefixCls,rt=Be.children,lt=Be.component,_e=Be.cellComponent,ce=Be.fixHeader,fe=Be.fixColumn,ve=Be.horizonScroll,Oe=Be.className,ge=Be.expanded,Ee=Be.componentWidth,Re=Be.colSpan,Le=m.useContext(i.a),Pe=Le.scrollbarSize;return m.useMemo(function(){var Ke=rt;return fe&&(Ke=m.createElement("div",{style:{width:Ee-(ce?Pe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},Ke)),m.createElement(lt,{className:Oe,style:{display:ge?null:"none"}},m.createElement(u.a,{component:_e,prefixCls:Ie,colSpan:Re},Ke))},[rt,lt,ce,ve,Oe,ge,Ee,Re,Pe])}var W=A;function U(Be){var Ie=Be.className,rt=Be.style,lt=Be.record,_e=Be.index,ce=Be.rowKey,fe=Be.getRowKey,ve=Be.rowExpandable,Oe=Be.expandedKeys,ge=Be.onRow,Ee=Be.indent,Re=Ee===void 0?0:Ee,Le=Be.rowComponent,Pe=Be.cellComponent,Ke=Be.childrenColumnName,it=m.useContext(i.a),st=it.prefixCls,Ot=it.fixedInfoList,Rt=m.useContext(K),sr=Rt.fixHeader,Zt=Rt.fixColumn,wt=Rt.horizonScroll,Br=Rt.componentWidth,Nr=Rt.flattenColumns,jr=Rt.expandableType,cn=Rt.expandRowByClick,xr=Rt.onTriggerExpand,an=Rt.rowClassName,tn=Rt.expandedRowClassName,Ir=Rt.indentSize,hn=Rt.expandIcon,lr=Rt.expandedRowRender,Cr=Rt.expandIconColumnIndex,gr=m.useState(!1),xn=Object(v.a)(gr,2),Wn=xn[0],gn=xn[1],Bt=Oe&&Oe.has(Be.recordKey);m.useEffect(function(){Bt&&gn(!0)},[Bt]);var Kr=jr==="row"&&(!ve||ve(lt)),rn=jr==="nest",Or=Ke&&lt&&lt[Ke],Lr=Kr||rn,Wr;ge&&(Wr=ge(lt,_e));var jn=function(wr){if(cn&&Lr&&xr(lt,wr),Wr&&Wr.onClick){for(var si,It=arguments.length,Zn=new Array(It>1?It-1:0),Bn=1;Bn<It;Bn++)Zn[Bn-1]=arguments[Bn];(si=Wr).onClick.apply(si,[wr].concat(Zn))}},yn;typeof an=="string"?yn=an:typeof an=="function"&&(yn=an(lt,_e,Re));var St=Object(E.a)(Nr),ur=m.createElement(Le,Object.assign({},Wr,{"data-row-key":ce,className:b()(Ie,"".concat(st,"-row"),"".concat(st,"-row-level-").concat(Re),yn,Wr&&Wr.className),style:Object(g.a)(Object(g.a)({},rt),Wr?Wr.style:null),onClick:jn}),Nr.map(function(Un,wr){var si=Un.render,It=Un.dataIndex,Zn=Un.className,Bn=St[wr],zi=Ot[wr],Ti;wr===(Cr||0)&&rn&&(Ti=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(Ir*Re,"px")},className:"".concat(st,"-row-indent indent-level-").concat(Re)}),hn({prefixCls:st,expanded:Bt,expandable:Or,record:lt,onExpand:xr})));var ri;return Un.onCell&&(ri=Un.onCell(lt,_e)),m.createElement(u.a,Object.assign({className:Zn,ellipsis:Un.ellipsis,align:Un.align,component:Pe,prefixCls:st,key:Bn,record:lt,index:_e,dataIndex:It,render:si,shouldCellUpdate:Un.shouldCellUpdate},zi,{appendNode:Ti,additionalProps:ri}))})),oi;if(Kr&&(Wn||Bt)){var wi=lr(lt,_e,Re+1,Bt),Pi=tn&&tn(lt,_e,Re);oi=m.createElement(W,{expanded:Bt,className:b()("".concat(st,"-expanded-row"),"".concat(st,"-expanded-row-level-").concat(Re+1),Pi),prefixCls:st,fixHeader:sr,fixColumn:Zt,horizonScroll:wt,component:Le,componentWidth:Br,cellComponent:Pe,colSpan:Nr.length},wi)}var vi;return Or&&Bt&&(vi=(lt[Ke]||[]).map(function(Un,wr){var si=fe(Un,wr);return m.createElement(U,Object.assign({},Be,{key:si,rowKey:si,record:Un,recordKey:si,index:wr,indent:Re+1}))})),m.createElement(m.Fragment,null,ur,oi,vi)}U.displayName="BodyRow";var D=U,X=m.createContext(null),ie=X;function oe(Be){var Ie=Be.columnKey,rt=Be.onColumnResize,lt=m.useRef();return m.useEffect(function(){lt.current&&rt(Ie,lt.current.offsetWidth)},[]),m.createElement(c.a,{onResize:function(ce){var fe=ce.offsetWidth;rt(Ie,fe)}},m.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(Be){var Ie=Be.data,rt=Be.getRowKey,lt=Be.measureColumnWidth,_e=Be.expandedKeys,ce=Be.onRow,fe=Be.rowExpandable,ve=Be.emptyNode,Oe=Be.childrenColumnName,ge=m.useContext(ie),Ee=ge.onColumnResize,Re=m.useContext(i.a),Le=Re.prefixCls,Pe=Re.getComponent,Ke=m.useContext(K),it=Ke.fixHeader,st=Ke.horizonScroll,Ot=Ke.flattenColumns,Rt=Ke.componentWidth;return m.useMemo(function(){var sr=Pe(["body","wrapper"],"tbody"),Zt=Pe(["body","row"],"tr"),wt=Pe(["body","cell"],"td"),Br;Ie.length?Br=Ie.map(function(jr,cn){var xr=rt(jr,cn);return m.createElement(D,{key:xr,rowKey:xr,record:jr,recordKey:xr,index:cn,rowComponent:Zt,cellComponent:wt,expandedKeys:_e,onRow:ce,getRowKey:rt,rowExpandable:fe,childrenColumnName:Oe})}):Br=m.createElement(W,{expanded:!0,className:"".concat(Le,"-placeholder"),prefixCls:Le,fixHeader:it,fixColumn:st,horizonScroll:st,component:Zt,componentWidth:Rt,cellComponent:wt,colSpan:Ot.length},ve);var Nr=Object(E.a)(Ot);return m.createElement(sr,{className:"".concat(Le,"-tbody")},lt&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(Le,"-measure-row"),style:{height:0}},Nr.map(function(jr){return m.createElement(oe,{key:jr,columnKey:jr,onColumnResize:Ee})})),Br)},[Ie,Le,ce,lt,_e,rt,Pe,Rt,ve,Ot])}var Ce=m.memo(de);Ce.displayName="Body";var Ae=Ce,me=L("wRmb"),Se=L("xEkU"),ye=L.n(Se);function se(Be){var Ie=Object(m.useRef)(Be),rt=Object(m.useState)({}),lt=Object(v.a)(rt,2),_e=lt[1],ce=Object(m.useRef)(null),fe=Object(m.useRef)([]);function ve(Oe){ce.current===null&&(fe.current=[],ce.current=ye()(function(){fe.current.forEach(function(ge){Ie.current=ge(Ie.current)}),ce.current=null,_e({})})),fe.current.push(Oe)}return Object(m.useEffect)(function(){return function(){ye.a.cancel(ce.current)}},[]),[Ie.current,ve]}function ee(Be){var Ie=Object(m.useRef)(Be),rt=Object(m.useRef)(null);function lt(){window.clearTimeout(rt.current)}function _e(fe){Ie.current=fe,lt(),rt.current=window.setTimeout(function(){Ie.current=null,rt.current=null},100)}function ce(){return Ie.current}return Object(m.useEffect)(function(){return lt},[]),[_e,ce]}function B(Be,Ie,rt){var lt=Object(m.useMemo)(function(){for(var _e=[],ce=[],fe=0,ve=0,Oe=0;Oe<Ie;Oe+=1)if(rt==="rtl"){ce[Oe]=ve,ve+=Be[Oe]||0;var ge=Ie-Oe-1;_e[ge]=fe,fe+=Be[ge]||0}else{_e[Oe]=fe,fe+=Be[Oe]||0;var Ee=Ie-Oe-1;ce[Ee]=ve,ve+=Be[Ee]||0}return{left:_e,right:ce}},[Be,Ie,rt]);return lt}var G=B;function V(Be){var Ie=Be.className,rt=Be.children;return m.createElement("div",{className:Ie},rt)}var Q=V,Z=L("n6Qo");function ne(Be){var Ie,rt=Be.prefixCls,lt=Be.record,_e=Be.onExpand,ce=Be.expanded,fe=Be.expandable,ve="".concat(rt,"-row-expand-icon");if(!fe)return m.createElement("span",{className:b()(ve,"".concat(rt,"-row-spaced"))});var Oe=function(Ee){_e(lt,Ee),Ee.stopPropagation()};return m.createElement("span",{className:b()(ve,(Ie={},Object(P.a)(Ie,"".concat(rt,"-row-expanded"),ce),Object(P.a)(Ie,"".concat(rt,"-row-collapsed"),!ce),Ie)),onClick:Oe})}function re(Be,Ie,rt){var lt=[];function _e(ce){(ce||[]).forEach(function(fe,ve){lt.push(Ie(fe,ve)),_e(fe[rt])})}return _e(Be),lt}var $=L("zT1h"),J=L("y0+3"),le=function(Ie,rt){var lt,_e,ce=Ie.scrollBodyRef,fe=Ie.onScroll,ve=Ie.offsetScroll,Oe=m.useContext(i.a),ge=Oe.prefixCls,Ee=((lt=ce.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,Re=((_e=ce.current)===null||_e===void 0?void 0:_e.clientWidth)||0,Le=Ee&&Re*(Re/Ee),Pe=m.useRef(),Ke=se({scrollLeft:0,isHiddenScrollBar:!1}),it=Object(v.a)(Ke,2),st=it[0],Ot=it[1],Rt=m.useRef({delta:0,x:0}),sr=m.useState(!1),Zt=Object(v.a)(sr,2),wt=Zt[0],Br=Zt[1],Nr=function(){Br(!1)},jr=function(Ir){Ir.persist(),Rt.current.delta=Ir.pageX-st.scrollLeft,Rt.current.x=0,Br(!0),Ir.preventDefault()},cn=function(Ir){var hn,lr=Ir||((hn=window)===null||hn===void 0?void 0:hn.event),Cr=lr.buttons;if(!wt||Cr===0){wt&&Br(!1);return}var gr=Rt.current.x+Ir.pageX-Rt.current.x-Rt.current.delta;gr<=0&&(gr=0),gr+Le>=Re&&(gr=Re-Le),fe({scrollLeft:gr/Re*(Ee+2)}),Rt.current.x=Ir.pageX},xr=function(){var Ir=Object(J.b)(ce.current).top,hn=Ir+ce.current.offsetHeight,lr=document.documentElement.scrollTop+window.innerHeight;hn-Object(o.a)()<=lr||Ir>=lr-ve?Ot(function(Cr){return Object(g.a)(Object(g.a)({},Cr),{},{isHiddenScrollBar:!0})}):Ot(function(Cr){return Object(g.a)(Object(g.a)({},Cr),{},{isHiddenScrollBar:!1})})},an=function(Ir){Ot(function(hn){return Object(g.a)(Object(g.a)({},hn),{},{scrollLeft:Ir/Ee*Re||0})})};return m.useImperativeHandle(rt,function(){return{setScrollLeft:an}}),m.useEffect(function(){var tn=Object($.a)(document.body,"mouseup",Nr,!1),Ir=Object($.a)(document.body,"mousemove",cn,!1);return xr(),function(){tn.remove(),Ir.remove()}},[Le,wt]),m.useEffect(function(){var tn=Object($.a)(window,"scroll",xr,!1),Ir=Object($.a)(window,"resize",xr,!1);return function(){tn.remove(),Ir.remove()}},[]),m.useEffect(function(){st.isHiddenScrollBar||Ot(function(tn){var Ir,hn;return Object(g.a)(Object(g.a)({},tn),{},{scrollLeft:ce.current.scrollLeft/((Ir=ce.current)===null||Ir===void 0?void 0:Ir.scrollWidth)*((hn=ce.current)===null||hn===void 0?void 0:hn.clientWidth)})})},[st.isHiddenScrollBar]),Ee<=Re||!Le||st.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(o.a)(),width:Re,bottom:ve},className:"".concat(ge,"-sticky-scroll")},m.createElement("div",{onMouseDown:jr,ref:Pe,className:b()("".concat(ge,"-sticky-scroll-bar"),Object(P.a)({},"".concat(ge,"-sticky-scroll-bar-active"),wt)),style:{width:"".concat(Le,"px"),transform:"translate3d(".concat(st.scrollLeft,"px, 0, 0)")}}))},ue=m.forwardRef(le);function we(Be,Ie){return m.useMemo(function(){var rt=!!Be;return{isSticky:rt,stickyClassName:rt?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(N.a)(Be)==="object"&&Be.offsetHeader||0,offsetScroll:Object(N.a)(Be)==="object"&&Be.offsetScroll||0}},[Be,Ie])}var Fe=[],Xe={},$e="rc-table-internal-hook",et=m.memo(function(Be){var Ie=Be.children;return Ie},function(Be,Ie){return d()(Be.props,Ie.props)?Be.pingLeft!==Ie.pingLeft||Be.pingRight!==Ie.pingRight:!1});function nt(Be){var Ie,rt=Be.prefixCls,lt=Be.className,_e=Be.rowClassName,ce=Be.style,fe=Be.data,ve=Be.rowKey,Oe=Be.scroll,ge=Be.tableLayout,Ee=Be.direction,Re=Be.title,Le=Be.footer,Pe=Be.summary,Ke=Be.id,it=Be.showHeader,st=Be.components,Ot=Be.emptyText,Rt=Be.onRow,sr=Be.onHeaderRow,Zt=Be.internalHooks,wt=Be.transformColumns,Br=Be.internalRefs,Nr=Be.sticky,jr=fe||Fe,cn=!!jr.length,xr=m.useState(0),an=Object(v.a)(xr,2),tn=an[0],Ir=an[1];m.useEffect(function(){Ir(Object(o.a)())});var hn=m.useMemo(function(){return Object(E.c)(st,{})},[st]),lr=m.useCallback(function(Tr,At){return Object(E.b)(hn,Tr)||At},[hn]),Cr=m.useMemo(function(){return typeof ve=="function"?ve:function(Tr){var At=Tr&&Tr[ve];return At}},[ve]),gr=Object(x.c)(Be),xn=gr.expandIcon,Wn=gr.expandedRowKeys,gn=gr.defaultExpandedRowKeys,Bt=gr.defaultExpandAllRows,Kr=gr.expandedRowRender,rn=gr.onExpand,Or=gr.onExpandedRowsChange,Lr=gr.expandRowByClick,Wr=gr.rowExpandable,jn=gr.expandIconColumnIndex,yn=gr.expandedRowClassName,St=gr.childrenColumnName,ur=gr.indentSize,oi=xn||ne,wi=St||"children",Pi=m.useMemo(function(){return Kr?"row":Be.expandable&&Zt===$e&&Be.expandable.__PARENT_RENDER_ICON__||jr.some(function(Tr){return Tr&&Object(N.a)(Tr)==="object"&&Tr[wi]})?"nest":!1},[!!Kr,jr]),vi=m.useState(function(){return gn||(Bt?re(jr,Cr,wi):[])}),Un=Object(v.a)(vi,2),wr=Un[0],si=Un[1],It=m.useMemo(function(){return new Set(Wn||wr||[])},[Wn,wr]),Zn=m.useCallback(function(Tr){var At=Cr(Tr,jr.indexOf(Tr)),Ht,ir=It.has(At);ir?(It.delete(At),Ht=Object(T.a)(It)):Ht=[].concat(Object(T.a)(It),[At]),si(Ht),rn&&rn(!ir,Tr),Or&&Or(Ht)},[Cr,It,jr,rn,Or]),Bn=m.useState(0),zi=Object(v.a)(Bn,2),Ti=zi[0],ri=zi[1],Qi=Object(me.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Be),gr),{},{expandable:!!Kr,expandedKeys:It,getRowKey:Cr,onTriggerExpand:Zn,expandIcon:oi,expandIconColumnIndex:jn,direction:Ee}),Zt===$e?wt:null),Zi=Object(v.a)(Qi,2),li=Zi[0],In=Zi[1],ui=m.useMemo(function(){return{columns:li,flattenColumns:In}},[li,In]),Mi=m.useRef(),yi=m.useRef(),bi=m.useRef(),Da=m.useState(!1),Vi=Object(v.a)(Da,2),zn=Vi[0],Gi=Vi[1],_a=m.useState(!1),Ni=Object(v.a)(_a,2),ci=Ni[0],oa=Ni[1],pa=se(new Map),sa=Object(v.a)(pa,2),ma=sa[0],qi=sa[1],Si=Object(E.a)(In),ea=Si.map(function(Tr){return ma.get(Tr)}),Ea=m.useMemo(function(){return ea},[ea.join("_")]),mt=G(Ea,In.length,Ee),qe=Oe&&Object(E.d)(Oe.y),pt=Oe&&Object(E.d)(Oe.x),_t=pt&&In.some(function(Tr){var At=Tr.fixed;return At}),Ut=m.useRef(),Dt=we(Nr,rt),Vt=Dt.isSticky,Pt=Dt.offsetHeader,ut=Dt.offsetScroll,vt=Dt.stickyClassName,yt,tr,Jt;qe&&(tr={overflowY:"scroll",maxHeight:Oe.y}),pt&&(yt={overflowX:"auto"},qe||(tr={overflowY:"hidden"}),Jt={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var Wt=m.useCallback(function(Tr,At){qi(function(Ht){var ir=new Map(Ht);return ir.set(Tr,At),ir})},[]),Ft=ee(null),Xt=Object(v.a)(Ft,2),qt=Xt[0],Ze=Xt[1];function vr(Tr,At){if(!At)return;typeof At=="function"?At(Tr):At.scrollLeft!==Tr&&(At.scrollLeft=Tr)}var Ar=function(At){var Ht=At.currentTarget,ir=At.scrollLeft,Kt=typeof ir=="number"?ir:Ht.scrollLeft,ct=Ht||Xe;if(!Ze()||Ze()===ct){var dt;qt(ct),vr(Kt,yi.current),vr(Kt,bi.current),vr(Kt,(dt=Ut.current)===null||dt===void 0?void 0:dt.setScrollLeft)}if(Ht){var Mt=Ht.scrollWidth,xt=Ht.clientWidth;Gi(Kt>0),oa(Kt<Mt-xt)}},cr=function(){bi.current&&Ar({currentTarget:bi.current})},ht=function(At){var Ht=At.width;cr(),ri(Mi.current?Mi.current.offsetWidth:Ht)};m.useEffect(function(){return cr},[]),m.useEffect(function(){pt&&cr()},[pt]),m.useEffect(function(){Zt===$e&&Br&&(Br.body.current=bi.current)});var bt=lr(["table"],"table"),ft=m.useMemo(function(){return ge||(_t?Oe.x==="max-content"?"auto":"fixed":qe||In.some(function(Tr){var At=Tr.ellipsis;return At})?"fixed":"auto")},[qe,_t,In,ge]),Tt,zt={colWidths:Ea,columCount:In.length,stickyOffsets:mt,onHeaderRow:sr,fixHeader:qe},rr=m.useMemo(function(){return cn?null:typeof Ot=="function"?Ot():Ot},[cn,Ot]),Gt=m.createElement(Ae,{data:jr,measureColumnWidth:qe||pt||Vt,expandedKeys:It,rowExpandable:Wr,getRowKey:Cr,onRow:Rt,emptyNode:rr,childrenColumnName:wi}),yr=m.createElement(C,{colWidths:In.map(function(Tr){var At=Tr.width;return At}),columns:In}),kr=Pe&&m.createElement(Z.b,null,Pe(jr)),or=lr(["body"]);if(qe||Vt){var Qe;typeof or=="function"?(Qe=or(jr,{scrollbarSize:tn,ref:bi,onScroll:Ar}),zt.colWidths=In.map(function(Tr,At){var Ht=Tr.width,ir=At===li.length-1?Ht-tn:Ht;return typeof ir=="number"&&!Number.isNaN(ir)?ir:(Object(a.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Qe=m.createElement("div",{style:Object(g.a)(Object(g.a)({},yt),tr),onScroll:Ar,ref:bi,className:b()("".concat(rt,"-body"))},m.createElement(bt,{style:Object(g.a)(Object(g.a)({},Jt),{},{tableLayout:ft})},yr,Gt,kr),Vt&&m.createElement(ue,{ref:Ut,offsetScroll:ut,scrollBodyRef:bi,onScroll:Ar})),Tt=m.createElement(m.Fragment,null,it!==!1&&m.createElement(M,Object.assign({noData:!jr.length},zt,ui,{direction:Ee,offsetHeader:Pt,stickyClassName:vt,ref:yi,onScroll:Ar})),Qe)}else Tt=m.createElement("div",{style:Object(g.a)(Object(g.a)({},yt),tr),className:b()("".concat(rt,"-content")),onScroll:Ar,ref:bi},m.createElement(bt,{style:Object(g.a)(Object(g.a)({},Jt),{},{tableLayout:ft})},yr,it!==!1&&m.createElement(_,Object.assign({},zt,ui)),Gt,kr));var kt=Object(x.b)(Be),Zr=m.createElement("div",Object.assign({className:b()(rt,lt,(Ie={},Object(P.a)(Ie,"".concat(rt,"-rtl"),Ee==="rtl"),Object(P.a)(Ie,"".concat(rt,"-ping-left"),zn),Object(P.a)(Ie,"".concat(rt,"-ping-right"),ci),Object(P.a)(Ie,"".concat(rt,"-layout-fixed"),ge==="fixed"),Object(P.a)(Ie,"".concat(rt,"-fixed-header"),qe),Object(P.a)(Ie,"".concat(rt,"-fixed-column"),_t),Object(P.a)(Ie,"".concat(rt,"-scroll-horizontal"),pt),Object(P.a)(Ie,"".concat(rt,"-has-fix-left"),In[0]&&In[0].fixed),Object(P.a)(Ie,"".concat(rt,"-has-fix-right"),In[In.length-1]&&In[In.length-1].fixed==="right"),Ie)),style:ce,id:Ke,ref:Mi},kt),m.createElement(et,{pingLeft:zn,pingRight:ci,props:Object(g.a)(Object(g.a)({},Be),{},{stickyOffsets:mt,mergedExpandedKeys:It})},Re&&m.createElement(Q,{className:"".concat(rt,"-title")},Re(jr)),m.createElement("div",{className:"".concat(rt,"-container")},Tt),Le&&m.createElement(Q,{className:"".concat(rt,"-footer")},Le(jr))));pt&&(Zr=m.createElement(c.a,{onResize:ht},Zr));var Vr=m.useMemo(function(){return{prefixCls:rt,getComponent:lr,scrollbarSize:tn,direction:Ee,fixedInfoList:In.map(function(Tr,At){return r(At,At,In,mt,Ee)}),isSticky:Vt}},[rt,lr,tn,Ee,In,mt,Ee,Vt]),nr=m.useMemo(function(){return Object(g.a)(Object(g.a)({},ui),{},{tableLayout:ft,rowClassName:_e,expandedRowClassName:yn,componentWidth:Ti,fixHeader:qe,fixColumn:_t,horizonScroll:pt,expandIcon:oi,expandableType:Pi,expandRowByClick:Lr,expandedRowRender:Kr,onTriggerExpand:Zn,expandIconColumnIndex:jn,indentSize:ur})},[ui,ft,_e,yn,Ti,qe,_t,pt,oi,Pi,Lr,Kr,Zn,jn,ur]),br=m.useMemo(function(){return{onColumnResize:Wt}},[Wt]);return m.createElement(i.a.Provider,{value:Vr},m.createElement(K.Provider,{value:nr},m.createElement(ie.Provider,{value:br},Zr)))}nt.Column=s.a,nt.ColumnGroup=n.a,nt.Summary=Z.a,nt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var at=q.b=nt},wRmb:function(H,q,L){"use strict";L.d(q,"a",function(){return d});var P=L("rePB"),g=L("KQm4"),T=L("VTBJ"),N=L("Ff2n"),v=L("q1tI"),m=L.n(v),w=L("Kwbf"),b=L("Zm9Q"),t=L("hW8S");function d(s){return Object(b.a)(s).filter(function(h){return v.isValidElement(h)}).map(function(h){var f=h.key,u=h.props,i=u.children,r=Object(N.a)(u,["children"]),E=Object(T.a)({key:f},r);return i&&(E.children=d(i)),E})}function a(s){return s.reduce(function(h,f){var u=f.fixed,i=u===!0?"left":u,r=f.children;return r&&r.length>0?[].concat(Object(g.a)(h),Object(g.a)(a(r).map(function(E){return Object(T.a)({fixed:i},E)}))):[].concat(Object(g.a)(h),[Object(T.a)(Object(T.a)({},f),{},{fixed:i})])},[])}function c(s){for(var h=!0,f=0;f<s.length;f+=1){var u=s[f];if(h&&u.fixed!=="left")h=!1;else if(!h&&u.fixed==="left"){Object(w.a)(!1,"Index ".concat(f-1," of `columns` missing `fixed='left'` prop."));break}}for(var i=!0,r=s.length-1;r>=0;r-=1){var E=s[r];if(i&&E.fixed!=="right")i=!1;else if(!i&&E.fixed==="right"){Object(w.a)(!1,"Index ".concat(r+1," of `columns` missing `fixed='right'` prop."));break}}}function o(s){return s.map(function(h){var f=h.fixed,u=Object(N.a)(h,["fixed"]),i=f;return f==="left"?i="right":f==="right"&&(i="left"),Object(T.a)({fixed:i},u)})}function n(s,h){var f=s.prefixCls,u=s.columns,i=s.children,r=s.expandable,E=s.expandedKeys,y=s.getRowKey,p=s.onTriggerExpand,R=s.expandIcon,O=s.rowExpandable,_=s.expandIconColumnIndex,x=s.direction,S=s.expandRowByClick,C=v.useMemo(function(){return u||d(i)},[u,i]),j=v.useMemo(function(){if(r){var Y,K=_||0,A=C[K],W=(Y={},Object(P.a)(Y,t.a,{className:"".concat(f,"-expand-icon-col")}),Object(P.a)(Y,"title",""),Object(P.a)(Y,"fixed",A?A.fixed:null),Object(P.a)(Y,"className","".concat(f,"-row-expand-icon-cell")),Object(P.a)(Y,"render",function(X,ie,oe){var de=y(ie,oe),Ce=E.has(de),Ae=O?O(ie):!0,me=R({prefixCls:f,expanded:Ce,expandable:Ae,record:ie,onExpand:p});return S?v.createElement("span",{onClick:function(ye){return ye.stopPropagation()}},me):me}),Y),U=C.slice();return K>=0&&U.splice(K,0,W),U}return C},[r,C,y,E,R,x]),F=v.useMemo(function(){var Y=j;return h&&(Y=h(Y)),Y.length||(Y=[{render:function(){return null}}]),Y},[h,j,x]),M=v.useMemo(function(){return x==="rtl"?o(a(F)):a(F)},[F,x]);return[F,M]}q.b=n},wZgz:function(H,q,L){(function(P,g,T){H.exports=q=g(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.BlockCipher,v=g.algo,m=[],w=[],b=[],t=[],d=[],a=[],c=[],o=[],n=[],s=[];(function(){for(var u=[],i=0;i<256;i++)i<128?u[i]=i<<1:u[i]=i<<1^283;for(var r=0,E=0,i=0;i<256;i++){var y=E^E<<1^E<<2^E<<3^E<<4;y=y>>>8^y&255^99,m[r]=y,w[y]=r;var p=u[r],R=u[p],O=u[R],_=u[y]*257^y*16843008;b[r]=_<<24|_>>>8,t[r]=_<<16|_>>>16,d[r]=_<<8|_>>>24,a[r]=_;var _=O*16843009^R*65537^p*257^r*16843008;c[y]=_<<24|_>>>8,o[y]=_<<16|_>>>16,n[y]=_<<8|_>>>24,s[y]=_,r?(r=p^u[u[u[O^p]]],E^=u[u[E]]):r=E=1}})();var h=[0,1,2,4,8,16,32,64,128,27,54],f=v.AES=N.extend({_doReset:function(){var u;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var i=this._keyPriorReset=this._key,r=i.words,E=i.sigBytes/4,y=this._nRounds=E+6,p=(y+1)*4,R=this._keySchedule=[],O=0;O<p;O++)O<E?R[O]=r[O]:(u=R[O-1],O%E?E>6&&O%E==4&&(u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255]):(u=u<<8|u>>>24,u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255],u^=h[O/E|0]<<24),R[O]=R[O-E]^u);for(var _=this._invKeySchedule=[],x=0;x<p;x++){var O=p-x;if(x%4)var u=R[O];else var u=R[O-4];x<4||O<=4?_[x]=u:_[x]=c[m[u>>>24]]^o[m[u>>>16&255]]^n[m[u>>>8&255]]^s[m[u&255]]}},encryptBlock:function(u,i){this._doCryptBlock(u,i,this._keySchedule,b,t,d,a,m)},decryptBlock:function(u,i){var r=u[i+1];u[i+1]=u[i+3],u[i+3]=r,this._doCryptBlock(u,i,this._invKeySchedule,c,o,n,s,w);var r=u[i+1];u[i+1]=u[i+3],u[i+3]=r},_doCryptBlock:function(u,i,r,E,y,p,R,O){for(var _=this._nRounds,x=u[i]^r[0],S=u[i+1]^r[1],C=u[i+2]^r[2],j=u[i+3]^r[3],F=4,M=1;M<_;M++){var Y=E[x>>>24]^y[S>>>16&255]^p[C>>>8&255]^R[j&255]^r[F++],K=E[S>>>24]^y[C>>>16&255]^p[j>>>8&255]^R[x&255]^r[F++],A=E[C>>>24]^y[j>>>16&255]^p[x>>>8&255]^R[S&255]^r[F++],W=E[j>>>24]^y[x>>>16&255]^p[S>>>8&255]^R[C&255]^r[F++];x=Y,S=K,C=A,j=W}var Y=(O[x>>>24]<<24|O[S>>>16&255]<<16|O[C>>>8&255]<<8|O[j&255])^r[F++],K=(O[S>>>24]<<24|O[C>>>16&255]<<16|O[j>>>8&255]<<8|O[x&255])^r[F++],A=(O[C>>>24]<<24|O[j>>>16&255]<<16|O[x>>>8&255]<<8|O[S&255])^r[F++],W=(O[j>>>24]<<24|O[x>>>16&255]<<16|O[S>>>8&255]<<8|O[C&255])^r[F++];u[i]=Y,u[i+1]=K,u[i+2]=A,u[i+3]=W},keySize:256/32});g.AES=N._createHelper(f)}(),P.AES})},wbyO:function(H,q,L){(function(P,g){H.exports=q=g(L("Ib8C"))})(this,function(P){return function(){var g=P,T=g.lib,N=T.WordArray,v=g.enc,m=v.Base64url={stringify:function(b,t=!0){var d=b.words,a=b.sigBytes,c=t?this._safe_map:this._map;b.clamp();for(var o=[],n=0;n<a;n+=3)for(var s=d[n>>>2]>>>24-n%4*8&255,h=d[n+1>>>2]>>>24-(n+1)%4*8&255,f=d[n+2>>>2]>>>24-(n+2)%4*8&255,u=s<<16|h<<8|f,i=0;i<4&&n+i*.75<a;i++)o.push(c.charAt(u>>>6*(3-i)&63));var r=c.charAt(64);if(r)for(;o.length%4;)o.push(r);return o.join("")},parse:function(b,t=!0){var d=b.length,a=t?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var o=0;o<a.length;o++)c[a.charCodeAt(o)]=o}var n=a.charAt(64);if(n){var s=b.indexOf(n);s!==-1&&(d=s)}return w(b,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function w(b,t,d){for(var a=[],c=0,o=0;o<t;o++)if(o%4){var n=d[b.charCodeAt(o-1)]<<o%4*2,s=d[b.charCodeAt(o)]>>>6-o%4*2,h=n|s;a[c>>>2]|=h<<24-c%4*8,c++}return N.create(a,c)}}(),P.enc.Base64url})},"y0+3":function(H,q,L){"use strict";L.d(q,"a",function(){return a}),L.d(q,"b",function(){return o});var P=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function N(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function v(n,s,h){if(s=s.toLowerCase(),h==="auto"){if(s==="height")return n.offsetHeight;if(s==="width")return n.offsetWidth}return s in g||(g[s]=P.test(s)),g[s]?parseFloat(h)||0:h}function m(n,s){var h=arguments.length,f=N(n);return s=T[s]?"cssFloat"in n.style?"cssFloat":"styleFloat":s,h===1?f:v(n,s,f[s]||n.style[s])}function w(n,s,h){var f=arguments.length;if(s=T[s]?"cssFloat"in n.style?"cssFloat":"styleFloat":s,f===3)return typeof h=="number"&&P.test(s)&&(h="".concat(h,"px")),n.style[s]=h,h;for(var u in s)s.hasOwnProperty(u)&&w(n,u,s[u]);return N(n)}function b(n){return n===document.body?document.documentElement.clientWidth:n.offsetWidth}function t(n){return n===document.body?window.innerHeight||document.documentElement.clientHeight:n.offsetHeight}function d(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:s}}function a(){var n=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:s}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function o(n){var s=n.getBoundingClientRect(),h=document.documentElement;return{left:s.left+(window.pageXOffset||h.scrollLeft)-(h.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||h.scrollTop)-(h.clientTop||document.body.clientTop||0)}}},"yTi+":function(H,q,L){H.exports=L.p+"static/AssistantCode3.fdd8db3c.jpeg"},zrhs:function(H,q,L){"use strict";var P=L("2qtc"),g=L("kLXV"),T=L("PpiC"),N=L("q1tI"),v=L.n(N),m=L("9kvl"),w=function(t){var d=t.shixunsDetail,a=t.globalSetting,c=t.loading,o=t.dispatch,n=Object(T.a)(t,["shixunsDetail","globalSetting","loading","dispatch"]);return v.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:d.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){o({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){o({type:"shixunsDetail/setActionTabs",payload:{}})}},v.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",v.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};q.a=Object(m.a)(function(b){var t=b.shixunsDetail,d=b.loading,a=b.globalSetting;return{shixunsDetail:t,globalSetting:a,loading:d.models.index}})(w)}}]);