@syhr/sy-graph 1.0.9-beta.6 → 1.0.9-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/sy-graph.cjs CHANGED
@@ -1,16 +1,19 @@
1
- "use strict";require('./graph.css');var Ac=Object.defineProperty,Cc=Object.defineProperties;var Sc=Object.getOwnPropertyDescriptors;var hn=Object.getOwnPropertySymbols;var ka=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable;var sr=(e,r)=>(r=Symbol[e])?r:Symbol.for("Symbol."+e),Bc=e=>{throw TypeError(e)},mt=Math.pow,gi=(e,r,t)=>r in e?Ac(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,he=(e,r)=>{for(var t in r||(r={}))ka.call(r,t)&&gi(e,t,r[t]);if(hn)for(var t of hn(r))Ta.call(r,t)&&gi(e,t,r[t]);return e},we=(e,r)=>Cc(e,Sc(r));var Fa=(e,r)=>{var t={};for(var n in e)ka.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&hn)for(var n of hn(e))r.indexOf(n)<0&&Ta.call(e,n)&&(t[n]=e[n]);return t};var It=(e,r,t)=>gi(e,typeof r!="symbol"?r+"":r,t);var je=(e,r,t)=>new Promise((n,l)=>{var a=d=>{try{u(t.next(d))}catch(s){l(s)}},o=d=>{try{u(t.throw(d))}catch(s){l(s)}},u=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,o);u((t=t.apply(e,r)).next())}),jt=function(e,r){this[0]=e,this[1]=r},xi=(e,r,t)=>{var n=(o,u,d,s)=>{try{var i=t[o](u),p=(u=i.value)instanceof jt,c=i.done;Promise.resolve(p?u[0]:u).then(f=>p?n(o==="return"?o:"next",u[1]?{done:f.done,value:f.value}:f,d,s):d({value:f,done:c})).catch(f=>n("throw",f,d,s))}catch(f){s(f)}},l=o=>a[o]=u=>new Promise((d,s)=>n(o,u,d,s)),a={};return t=t.apply(e,r),a[sr("asyncIterator")]=()=>a,l("next"),l("throw"),l("return"),a},bi=e=>{var r=e[sr("asyncIterator")],t=!1,n,l={};return r==null?(r=e[sr("iterator")](),n=a=>l[a]=o=>r[a](o)):(r=r.call(e),n=a=>l[a]=o=>{if(t){if(t=!1,a==="throw")throw o;return o}return t=!0,{done:!1,value:new jt(new Promise(u=>{var d=r[a](o);d instanceof Object||Bc("Object expected"),u(d)}),1)}}),l[sr("iterator")]=()=>l,n("next"),"throw"in r?n("throw"):l.throw=a=>{throw a},"return"in r&&n("return"),l},Ia=(e,r,t)=>(r=e[sr("asyncIterator")])?r.call(e):(e=e[sr("iterator")](),r={},t=(n,l)=>(l=e[n])&&(r[n]=a=>new Promise((o,u,d)=>(a=l.call(e,a),d=a.done,Promise.resolve(a.value).then(s=>o({value:s,done:d}),u)))),t("next"),t("return"),r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("vue"),jn=require("lodash-es"),ru=require("@meta2d/utils"),Pe=require("@meta2d/core"),kc=require("@meta2d/plugin-mind-core"),Tc=require("@meta2d/plugin-mind-collapse"),Fc=require("@meta2d/form-diagram"),Ic=require("@meta2d/class-diagram"),Dc=require("@meta2d/le5le-charts"),Da=require("@meta2d/flow-diagram"),wi=require("@meta2d/fta-diagram"),Ra=require("@meta2d/sequence-diagram"),Oa=require("@meta2d/activity-diagram");var xe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Rc(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),t}var Cr=TypeError;const Oc={},Pc=Object.freeze(Object.defineProperty({__proto__:null,default:Oc},Symbol.toStringTag,{value:"Module"})),nu=Rc(Pc);var ta=typeof Map=="function"&&Map.prototype,_i=Object.getOwnPropertyDescriptor&&ta?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pn=ta&&_i&&typeof _i.get=="function"?_i.get:null,Pa=ta&&Map.prototype.forEach,ra=typeof Set=="function"&&Set.prototype,Ei=Object.getOwnPropertyDescriptor&&ra?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Nn=ra&&Ei&&typeof Ei.get=="function"?Ei.get:null,Na=ra&&Set.prototype.forEach,Nc=typeof WeakMap=="function"&&WeakMap.prototype,Nr=Nc?WeakMap.prototype.has:null,Mc=typeof WeakSet=="function"&&WeakSet.prototype,Mr=Mc?WeakSet.prototype.has:null,Lc=typeof WeakRef=="function"&&WeakRef.prototype,Ma=Lc?WeakRef.prototype.deref:null,Uc=Boolean.prototype.valueOf,qc=Object.prototype.toString,$c=Function.prototype.toString,zc=String.prototype.match,na=String.prototype.slice,Ot=String.prototype.replace,jc=String.prototype.toUpperCase,La=String.prototype.toLowerCase,iu=RegExp.prototype.test,Ua=Array.prototype.concat,bt=Array.prototype.join,Hc=Array.prototype.slice,qa=Math.floor,Po=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ai=Object.getOwnPropertySymbols,No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,xr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Lr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xr||!0)?Symbol.toStringTag:null,ou=Object.prototype.propertyIsEnumerable,$a=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function za(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||iu.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-qa(-e):qa(e);if(n!==e){var l=String(n),a=na.call(r,l.length+1);return Ot.call(l,t,"$&_")+"."+Ot.call(Ot.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ot.call(r,t,"$&_")}var Mo=nu,ja=Mo.custom,Ha=lu(ja)?ja:null,au={__proto__:null,double:'"',single:"'"},Vc={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Hn=function e(r,t,n,l){var a=t||{};if(Ct(a,"quoteStyle")&&!Ct(au,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ct(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ct(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ct(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ct(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return cu(r,a);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var d=String(r);return u?za(r,d):d}if(typeof r=="bigint"){var s=String(r)+"n";return u?za(r,s):s}var i=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=i&&i>0&&typeof r=="object")return Lo(r)?"[Array]":"[Object]";var p=cf(a,n);if(typeof l=="undefined")l=[];else if(uu(l,r)>=0)return"[Circular]";function c(C,I,z){if(I&&(l=Hc.call(l),l.push(I)),z){var W={depth:a.depth};return Ct(a,"quoteStyle")&&(W.quoteStyle=a.quoteStyle),e(C,W,n+1,l)}return e(C,a,n+1,l)}if(typeof r=="function"&&!Va(r)){var f=ef(r),h=dn(r,c);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+bt.call(h,", ")+" }":"")}if(lu(r)){var v=xr?Ot.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):No.call(r);return typeof r=="object"&&!xr?Ir(v):v}if(sf(r)){for(var m="<"+La.call(String(r.nodeName)),g=r.attributes||[],b=0;b<g.length;b++)m+=" "+g[b].name+"="+su(Wc(g[b].value),"double",a);return m+=">",r.childNodes&&r.childNodes.length&&(m+="..."),m+="</"+La.call(String(r.nodeName))+">",m}if(Lo(r)){if(r.length===0)return"[]";var y=dn(r,c);return p&&!uf(y)?"["+Uo(y,p)+"]":"[ "+bt.call(y,", ")+" ]"}if(Gc(r)){var _=dn(r,c);return!("cause"in Error.prototype)&&"cause"in r&&!ou.call(r,"cause")?"{ ["+String(r)+"] "+bt.call(Ua.call("[cause]: "+c(r.cause),_),", ")+" }":_.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+bt.call(_,", ")+" }"}if(typeof r=="object"&&o){if(Ha&&typeof r[Ha]=="function"&&Mo)return Mo(r,{depth:i-n});if(o!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(tf(r)){var T=[];return Pa&&Pa.call(r,function(C,I){T.push(c(I,r,!0)+" => "+c(C,r))}),Wa("Map",Pn.call(r),T,p)}if(of(r)){var B=[];return Na&&Na.call(r,function(C){B.push(c(C,r))}),Wa("Set",Nn.call(r),B,p)}if(rf(r))return Ci("WeakMap");if(af(r))return Ci("WeakSet");if(nf(r))return Ci("WeakRef");if(Yc(r))return Ir(c(Number(r)));if(Zc(r))return Ir(c(Po.call(r)));if(Xc(r))return Ir(Uc.call(r));if(Qc(r))return Ir(c(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof xe!="undefined"&&r===xe)return"{ [object globalThis] }";if(!Kc(r)&&!Va(r)){var F=dn(r,c),R=$a?$a(r)===Object.prototype:r instanceof Object||r.constructor===Object,Z=r instanceof Object?"":"null prototype",j=!R&&Lr&&Object(r)===r&&Lr in r?na.call(Nt(r),8,-1):Z?"Object":"",E=R||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",A=E+(j||Z?"["+bt.call(Ua.call([],j||[],Z||[]),": ")+"] ":"");return F.length===0?A+"{}":p?A+"{"+Uo(F,p)+"}":A+"{ "+bt.call(F,", ")+" }"}return String(r)};function su(e,r,t){var n=t.quoteStyle||r,l=au[n];return l+e+l}function Wc(e){return Ot.call(String(e),/"/g,"&quot;")}function tr(e){return!Lr||!(typeof e=="object"&&(Lr in e||typeof e[Lr]!="undefined"))}function Lo(e){return Nt(e)==="[object Array]"&&tr(e)}function Kc(e){return Nt(e)==="[object Date]"&&tr(e)}function Va(e){return Nt(e)==="[object RegExp]"&&tr(e)}function Gc(e){return Nt(e)==="[object Error]"&&tr(e)}function Qc(e){return Nt(e)==="[object String]"&&tr(e)}function Yc(e){return Nt(e)==="[object Number]"&&tr(e)}function Xc(e){return Nt(e)==="[object Boolean]"&&tr(e)}function lu(e){if(xr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!No)return!1;try{return No.call(e),!0}catch(r){}return!1}function Zc(e){if(!e||typeof e!="object"||!Po)return!1;try{return Po.call(e),!0}catch(r){}return!1}var Jc=Object.prototype.hasOwnProperty||function(e){return e in this};function Ct(e,r){return Jc.call(e,r)}function Nt(e){return qc.call(e)}function ef(e){if(e.name)return e.name;var r=zc.call($c.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function uu(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function tf(e){if(!Pn||!e||typeof e!="object")return!1;try{Pn.call(e);try{Nn.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function rf(e){if(!Nr||!e||typeof e!="object")return!1;try{Nr.call(e,Nr);try{Mr.call(e,Mr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function nf(e){if(!Ma||!e||typeof e!="object")return!1;try{return Ma.call(e),!0}catch(r){}return!1}function of(e){if(!Nn||!e||typeof e!="object")return!1;try{Nn.call(e);try{Pn.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function af(e){if(!Mr||!e||typeof e!="object")return!1;try{Mr.call(e,Mr);try{Nr.call(e,Nr)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function sf(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function cu(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return cu(na.call(e,0,r.maxStringLength),r)+n}var l=Vc[r.quoteStyle||"single"];l.lastIndex=0;var a=Ot.call(Ot.call(e,l,"\\$1"),/[\x00-\x1f]/g,lf);return su(a,"single",r)}function lf(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+jc.call(r.toString(16))}function Ir(e){return"Object("+e+")"}function Ci(e){return e+" { ? }"}function Wa(e,r,t,n){var l=n?Uo(t,n):bt.call(t,", ");return e+" ("+r+") {"+l+"}"}function uf(e){for(var r=0;r<e.length;r++)if(uu(e[r],`
2
- `)>=0)return!1;return!0}function cf(e,r){var t;if(e.indent===" ")t=" ";else if(typeof e.indent=="number"&&e.indent>0)t=bt.call(Array(e.indent+1)," ");else return null;return{base:t,prev:bt.call(Array(r+1),t)}}function Uo(e,r){if(e.length===0)return"";var t=`
3
- `+r.prev+r.base;return t+bt.call(e,","+t)+`
4
- `+r.prev}function dn(e,r){var t=Lo(e),n=[];if(t){n.length=e.length;for(var l=0;l<e.length;l++)n[l]=Ct(e,l)?r(e[l],e):""}var a=typeof Ai=="function"?Ai(e):[],o;if(xr){o={};for(var u=0;u<a.length;u++)o["$"+a[u]]=a[u]}for(var d in e)Ct(e,d)&&(t&&String(Number(d))===d&&d<e.length||xr&&o["$"+d]instanceof Symbol||(iu.call(/[^\w$]/,d)?n.push(r(d,e)+": "+r(e[d],e)):n.push(d+": "+r(e[d],e))));if(typeof Ai=="function")for(var s=0;s<a.length;s++)ou.call(e,a[s])&&n.push("["+r(a[s])+"]: "+r(e[a[s]],e));return n}var ff=Hn,hf=Cr,Vn=function(e,r,t){for(var n=e,l;(l=n.next)!=null;n=l)if(l.key===r)return n.next=l.next,t||(l.next=e.next,e.next=l),l},df=function(e,r){if(e){var t=Vn(e,r);return t&&t.value}},pf=function(e,r,t){var n=Vn(e,r);n?n.value=t:e.next={key:r,next:e.next,value:t}},mf=function(e,r){return e?!!Vn(e,r):!1},vf=function(e,r){if(e)return Vn(e,r,!0)},yf=function(){var r,t={assert:function(n){if(!t.has(n))throw new hf("Side channel does not contain "+ff(n))},delete:function(n){var l=r&&r.next,a=vf(r,n);return a&&l&&l===a&&(r=void 0),!!a},get:function(n){return df(r,n)},has:function(n){return mf(r,n)},set:function(n,l){r||(r={next:void 0}),pf(r,n,l)}};return t},fu=Object,gf=Error,xf=EvalError,bf=RangeError,wf=ReferenceError,_f=SyntaxError,Ef=URIError,Af=Math.abs,Cf=Math.floor,Sf=Math.max,Bf=Math.min,kf=Math.pow,Tf=Math.round,Ff=Number.isNaN||function(r){return r!==r},If=Ff,Df=function(r){return If(r)||r===0?r:r<0?-1:1},Rf=Object.getOwnPropertyDescriptor,Sn=Rf;if(Sn)try{Sn([],"length")}catch(e){Sn=null}var hu=Sn,Bn=Object.defineProperty||!1;if(Bn)try{Bn({},"a",{value:1})}catch(e){Bn=!1}var Of=Bn,Si,Ka;function Pf(){return Ka||(Ka=1,Si=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var l=42;r[t]=l;for(var a in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(r,t);if(u.value!==l||u.enumerable!==!0)return!1}return!0}),Si}var Bi,Ga;function Nf(){if(Ga)return Bi;Ga=1;var e=typeof Symbol!="undefined"&&Symbol,r=Pf();return Bi=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()},Bi}var ki,Qa;function du(){return Qa||(Qa=1,ki=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),ki}var Ti,Ya;function pu(){if(Ya)return Ti;Ya=1;var e=fu;return Ti=e.getPrototypeOf||null,Ti}var Fi,Xa;function Mf(){if(Xa)return Fi;Xa=1;var e="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,t=Math.max,n="[object Function]",l=function(d,s){for(var i=[],p=0;p<d.length;p+=1)i[p]=d[p];for(var c=0;c<s.length;c+=1)i[c+d.length]=s[c];return i},a=function(d,s){for(var i=[],p=s,c=0;p<d.length;p+=1,c+=1)i[c]=d[p];return i},o=function(u,d){for(var s="",i=0;i<u.length;i+=1)s+=u[i],i+1<u.length&&(s+=d);return s};return Fi=function(d){var s=this;if(typeof s!="function"||r.apply(s)!==n)throw new TypeError(e+s);for(var i=a(arguments,1),p,c=function(){if(this instanceof p){var g=s.apply(this,l(i,arguments));return Object(g)===g?g:this}return s.apply(d,l(i,arguments))},f=t(0,s.length-i.length),h=[],v=0;v<f;v++)h[v]="$"+v;if(p=Function("binder","return function ("+o(h,",")+"){ return binder.apply(this,arguments); }")(c),s.prototype){var m=function(){};m.prototype=s.prototype,p.prototype=new m,m.prototype=null}return p},Fi}var Ii,Za;function Wn(){if(Za)return Ii;Za=1;var e=Mf();return Ii=Function.prototype.bind||e,Ii}var Di,Ja;function ia(){return Ja||(Ja=1,Di=Function.prototype.call),Di}var Ri,es;function mu(){return es||(es=1,Ri=Function.prototype.apply),Ri}var Lf=typeof Reflect!="undefined"&&Reflect&&Reflect.apply,Uf=Wn(),qf=mu(),$f=ia(),zf=Lf,jf=zf||Uf.call($f,qf),Hf=Wn(),Vf=Cr,Wf=ia(),Kf=jf,vu=function(r){if(r.length<1||typeof r[0]!="function")throw new Vf("a function is required");return Kf(Hf,Wf,r)},Oi,ts;function Gf(){if(ts)return Oi;ts=1;var e=vu,r=hu,t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&r&&r(Object.prototype,"__proto__"),l=Object,a=l.getPrototypeOf;return Oi=n&&typeof n.get=="function"?e([n.get]):typeof a=="function"?function(u){return a(u==null?u:l(u))}:!1,Oi}var Pi,rs;function Qf(){if(rs)return Pi;rs=1;var e=du(),r=pu(),t=Gf();return Pi=e?function(l){return e(l)}:r?function(l){if(!l||typeof l!="object"&&typeof l!="function")throw new TypeError("getProto: not an object");return r(l)}:t?function(l){return t(l)}:null,Pi}var Ni,ns;function Yf(){if(ns)return Ni;ns=1;var e=Function.prototype.call,r=Object.prototype.hasOwnProperty,t=Wn();return Ni=t.call(e,r),Ni}var Ee,Xf=fu,Zf=gf,Jf=xf,eh=bf,th=wf,br=_f,mr=Cr,rh=Ef,nh=Af,ih=Cf,oh=Sf,ah=Bf,sh=kf,lh=Tf,uh=Df,yu=Function,Mi=function(e){try{return yu('"use strict"; return ('+e+").constructor;")()}catch(r){}},$r=hu,ch=Of,Li=function(){throw new mr},fh=$r?function(){try{return arguments.callee,Li}catch(e){try{return $r(arguments,"callee").get}catch(r){return Li}}}():Li,lr=Nf()(),$e=Qf(),hh=pu(),dh=du(),gu=mu(),Wr=ia(),hr={},ph=typeof Uint8Array=="undefined"||!$e?Ee:$e(Uint8Array),Qt={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Ee:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Ee:ArrayBuffer,"%ArrayIteratorPrototype%":lr&&$e?$e([][Symbol.iterator]()):Ee,"%AsyncFromSyncIteratorPrototype%":Ee,"%AsyncFunction%":hr,"%AsyncGenerator%":hr,"%AsyncGeneratorFunction%":hr,"%AsyncIteratorPrototype%":hr,"%Atomics%":typeof Atomics=="undefined"?Ee:Atomics,"%BigInt%":typeof BigInt=="undefined"?Ee:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Ee:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Ee:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Ee:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Zf,"%eval%":eval,"%EvalError%":Jf,"%Float16Array%":typeof Float16Array=="undefined"?Ee:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Ee:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Ee:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Ee:FinalizationRegistry,"%Function%":yu,"%GeneratorFunction%":hr,"%Int8Array%":typeof Int8Array=="undefined"?Ee:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Ee:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Ee:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lr&&$e?$e($e([][Symbol.iterator]())):Ee,"%JSON%":typeof JSON=="object"?JSON:Ee,"%Map%":typeof Map=="undefined"?Ee:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!lr||!$e?Ee:$e(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Xf,"%Object.getOwnPropertyDescriptor%":$r,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Ee:Promise,"%Proxy%":typeof Proxy=="undefined"?Ee:Proxy,"%RangeError%":eh,"%ReferenceError%":th,"%Reflect%":typeof Reflect=="undefined"?Ee:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Ee:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!lr||!$e?Ee:$e(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Ee:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lr&&$e?$e(""[Symbol.iterator]()):Ee,"%Symbol%":lr?Symbol:Ee,"%SyntaxError%":br,"%ThrowTypeError%":fh,"%TypedArray%":ph,"%TypeError%":mr,"%Uint8Array%":typeof Uint8Array=="undefined"?Ee:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Ee:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Ee:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Ee:Uint32Array,"%URIError%":rh,"%WeakMap%":typeof WeakMap=="undefined"?Ee:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Ee:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Ee:WeakSet,"%Function.prototype.call%":Wr,"%Function.prototype.apply%":gu,"%Object.defineProperty%":ch,"%Object.getPrototypeOf%":hh,"%Math.abs%":nh,"%Math.floor%":ih,"%Math.max%":oh,"%Math.min%":ah,"%Math.pow%":sh,"%Math.round%":lh,"%Math.sign%":uh,"%Reflect.getPrototypeOf%":dh};if($e)try{null.error}catch(e){var mh=$e($e(e));Qt["%Error.prototype%"]=mh}var vh=function e(r){var t;if(r==="%AsyncFunction%")t=Mi("async function () {}");else if(r==="%GeneratorFunction%")t=Mi("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=Mi("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var l=e("%AsyncGenerator%");l&&$e&&(t=$e(l.prototype))}return Qt[r]=t,t},is={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Kr=Wn(),Mn=Yf(),yh=Kr.call(Wr,Array.prototype.concat),gh=Kr.call(gu,Array.prototype.splice),os=Kr.call(Wr,String.prototype.replace),Ln=Kr.call(Wr,String.prototype.slice),xh=Kr.call(Wr,RegExp.prototype.exec),bh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,wh=/\\(\\)?/g,_h=function(r){var t=Ln(r,0,1),n=Ln(r,-1);if(t==="%"&&n!=="%")throw new br("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new br("invalid intrinsic syntax, expected opening `%`");var l=[];return os(r,bh,function(a,o,u,d){l[l.length]=u?os(d,wh,"$1"):o||a}),l},Eh=function(r,t){var n=r,l;if(Mn(is,n)&&(l=is[n],n="%"+l[0]+"%"),Mn(Qt,n)){var a=Qt[n];if(a===hr&&(a=vh(n)),typeof a=="undefined"&&!t)throw new mr("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:l,name:n,value:a}}throw new br("intrinsic "+r+" does not exist!")},oa=function(r,t){if(typeof r!="string"||r.length===0)throw new mr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new mr('"allowMissing" argument must be a boolean');if(xh(/^%?[^%]*%?$/,r)===null)throw new br("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_h(r),l=n.length>0?n[0]:"",a=Eh("%"+l+"%",t),o=a.name,u=a.value,d=!1,s=a.alias;s&&(l=s[0],gh(n,yh([0,1],s)));for(var i=1,p=!0;i<n.length;i+=1){var c=n[i],f=Ln(c,0,1),h=Ln(c,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new br("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(d=!0),l+="."+c,o="%"+l+"%",Mn(Qt,o))u=Qt[o];else if(u!=null){if(!(c in u)){if(!t)throw new mr("base intrinsic for "+r+" exists, but the property is not available.");return}if($r&&i+1>=n.length){var v=$r(u,c);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?u=v.get:u=u[c]}else p=Mn(u,c),u=u[c];p&&!d&&(Qt[o]=u)}}return u},xu=oa,bu=vu,Ah=bu([xu("%String.prototype.indexOf%")]),wu=function(r,t){var n=xu(r,!!t);return typeof n=="function"&&Ah(r,".prototype.")>-1?bu([n]):n},Ch=oa,Gr=wu,Sh=Hn,Bh=Cr,as=Ch("%Map%",!0),kh=Gr("Map.prototype.get",!0),Th=Gr("Map.prototype.set",!0),Fh=Gr("Map.prototype.has",!0),Ih=Gr("Map.prototype.delete",!0),Dh=Gr("Map.prototype.size",!0),_u=!!as&&function(){var r,t={assert:function(n){if(!t.has(n))throw new Bh("Side channel does not contain "+Sh(n))},delete:function(n){if(r){var l=Ih(r,n);return Dh(r)===0&&(r=void 0),l}return!1},get:function(n){if(r)return kh(r,n)},has:function(n){return r?Fh(r,n):!1},set:function(n,l){r||(r=new as),Th(r,n,l)}};return t},Rh=oa,Kn=wu,Oh=Hn,pn=_u,Ph=Cr,ur=Rh("%WeakMap%",!0),Nh=Kn("WeakMap.prototype.get",!0),Mh=Kn("WeakMap.prototype.set",!0),Lh=Kn("WeakMap.prototype.has",!0),Uh=Kn("WeakMap.prototype.delete",!0),qh=ur?function(){var r,t,n={assert:function(l){if(!n.has(l))throw new Ph("Side channel does not contain "+Oh(l))},delete:function(l){if(ur&&l&&(typeof l=="object"||typeof l=="function")){if(r)return Uh(r,l)}else if(pn&&t)return t.delete(l);return!1},get:function(l){return ur&&l&&(typeof l=="object"||typeof l=="function")&&r?Nh(r,l):t&&t.get(l)},has:function(l){return ur&&l&&(typeof l=="object"||typeof l=="function")&&r?Lh(r,l):!!t&&t.has(l)},set:function(l,a){ur&&l&&(typeof l=="object"||typeof l=="function")?(r||(r=new ur),Mh(r,l,a)):pn&&(t||(t=pn()),t.set(l,a))}};return n}:pn,$h=Cr,zh=Hn,jh=yf,Hh=_u,Vh=qh,Wh=Vh||Hh||jh,Eu=function(){var r,t={assert:function(n){if(!t.has(n))throw new $h("Side channel does not contain "+zh(n))},delete:function(n){return!!r&&r.delete(n)},get:function(n){return r&&r.get(n)},has:function(n){return!!r&&r.has(n)},set:function(n,l){r||(r=Wh()),r.set(n,l)}};return t},Kh=String.prototype.replace,Gh=/%20/g,Ui={RFC1738:"RFC1738",RFC3986:"RFC3986"},aa={default:Ui.RFC3986,formatters:{RFC1738:function(e){return Kh.call(e,Gh,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ui.RFC1738,RFC3986:Ui.RFC3986},Qh=aa,Yh=Eu,qi=Object.prototype.hasOwnProperty,Vt=Array.isArray,Gn=Yh(),pr=function(r,t){return Gn.set(r,t),r},Wt=function(r){return Gn.has(r)},Rr=function(r){return Gn.get(r)},qo=function(r,t){Gn.set(r,t)},vt=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),Xh=function(r){for(;r.length>1;){var t=r.pop(),n=t.obj[t.prop];if(Vt(n)){for(var l=[],a=0;a<n.length;++a)typeof n[a]!="undefined"&&(l[l.length]=n[a]);t.obj[t.prop]=l}}},Ur=function(r,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},l=0;l<r.length;++l)typeof r[l]!="undefined"&&(n[l]=r[l]);return n},Zh=function e(r,t,n){if(!t)return r;if(typeof t!="object"&&typeof t!="function"){if(Vt(r)){var l=r.length;if(n&&typeof n.arrayLimit=="number"&&l>n.arrayLimit)return pr(Ur(r.concat(t),n),l);r[l]=t}else if(r&&typeof r=="object")if(Wt(r)){var a=Rr(r)+1;r[a]=t,qo(r,a)}else(n&&(n.plainObjects||n.allowPrototypes)||!qi.call(Object.prototype,t))&&(r[t]=!0);else return[r,t];return r}if(!r||typeof r!="object"){if(Wt(t)){for(var o=Object.keys(t),u=n&&n.plainObjects?{__proto__:null,0:r}:{0:r},d=0;d<o.length;d++){var s=parseInt(o[d],10);u[s+1]=t[o[d]]}return pr(u,Rr(t)+1)}var i=[r].concat(t);return n&&typeof n.arrayLimit=="number"&&i.length>n.arrayLimit?pr(Ur(i,n),i.length-1):i}var p=r;return Vt(r)&&!Vt(t)&&(p=Ur(r,n)),Vt(r)&&Vt(t)?(t.forEach(function(c,f){if(qi.call(r,f)){var h=r[f];h&&typeof h=="object"&&c&&typeof c=="object"?r[f]=e(h,c,n):r[r.length]=c}else r[f]=c}),r):Object.keys(t).reduce(function(c,f){var h=t[f];if(qi.call(c,f)?c[f]=e(c[f],h,n):c[f]=h,Wt(t)&&!Wt(c)&&pr(c,Rr(t)),Wt(c)){var v=parseInt(f,10);String(v)===f&&v>=0&&v>Rr(c)&&qo(c,v)}return c},p)},Jh=function(r,t){return Object.keys(t).reduce(function(n,l){return n[l]=t[l],n},r)},ed=function(e,r,t){var n=e.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(l){return n}},$i=1024,td=function(r,t,n,l,a){if(r.length===0)return r;var o=r;if(typeof r=="symbol"?o=Symbol.prototype.toString.call(r):typeof r!="string"&&(o=String(r)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var u="",d=0;d<o.length;d+=$i){for(var s=o.length>=$i?o.slice(d,d+$i):o,i=[],p=0;p<s.length;++p){var c=s.charCodeAt(p);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===Qh.RFC1738&&(c===40||c===41)){i[i.length]=s.charAt(p);continue}if(c<128){i[i.length]=vt[c];continue}if(c<2048){i[i.length]=vt[192|c>>6]+vt[128|c&63];continue}if(c<55296||c>=57344){i[i.length]=vt[224|c>>12]+vt[128|c>>6&63]+vt[128|c&63];continue}p+=1,c=65536+((c&1023)<<10|s.charCodeAt(p)&1023),i[i.length]=vt[240|c>>18]+vt[128|c>>12&63]+vt[128|c>>6&63]+vt[128|c&63]}u+=i.join("")}return u},rd=function(r){for(var t=[{obj:{o:r},prop:"o"}],n=[],l=0;l<t.length;++l)for(var a=t[l],o=a.obj[a.prop],u=Object.keys(o),d=0;d<u.length;++d){var s=u[d],i=o[s];typeof i=="object"&&i!==null&&n.indexOf(i)===-1&&(t[t.length]={obj:o,prop:s},n[n.length]=i)}return Xh(t),r},nd=function(r){return Object.prototype.toString.call(r)==="[object RegExp]"},id=function(r){return!r||typeof r!="object"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))},od=function(r,t,n,l){if(Wt(r)){var a=Rr(r)+1;return r[a]=t,qo(r,a),r}var o=[].concat(r,t);return o.length>n?pr(Ur(o,{plainObjects:l}),o.length-1):o},ad=function(r,t){if(Vt(r)){for(var n=[],l=0;l<r.length;l+=1)n[n.length]=t(r[l]);return n}return t(r)},Au={arrayToObject:Ur,assign:Jh,combine:od,compact:rd,decode:ed,encode:td,isBuffer:id,isOverflow:Wt,isRegExp:nd,markOverflow:pr,maybeMap:ad,merge:Zh},Cu=Eu,kn=Au,qr=aa,sd=Object.prototype.hasOwnProperty,Su={brackets:function(r){return r+"[]"},comma:"comma",indices:function(r,t){return r+"["+t+"]"},repeat:function(r){return r}},xt=Array.isArray,ld=Array.prototype.push,Bu=function(e,r){ld.apply(e,xt(r)?r:[r])},ud=Date.prototype.toISOString,ss=qr.default,Ne={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:kn.encode,encodeValuesOnly:!1,filter:void 0,format:ss,formatter:qr.formatters[ss],indices:!1,serializeDate:function(r){return ud.call(r)},skipNulls:!1,strictNullHandling:!1},cd=function(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="symbol"||typeof r=="bigint"},zi={},fd=function e(r,t,n,l,a,o,u,d,s,i,p,c,f,h,v,m,g,b){for(var y=r,_=b,T=0,B=!1;(_=_.get(zi))!==void 0&&!B;){var F=_.get(r);if(T+=1,typeof F!="undefined"){if(F===T)throw new RangeError("Cyclic object value");B=!0}typeof _.get(zi)=="undefined"&&(T=0)}if(typeof i=="function"?y=i(t,y):y instanceof Date?y=f(y):n==="comma"&&xt(y)&&(y=kn.maybeMap(y,function(V){return V instanceof Date?f(V):V})),y===null){if(o)return s&&!m?s(t,Ne.encoder,g,"key",h):t;y=""}if(cd(y)||kn.isBuffer(y)){if(s){var R=m?t:s(t,Ne.encoder,g,"key",h);return[v(R)+"="+v(s(y,Ne.encoder,g,"value",h))]}return[v(t)+"="+v(String(y))]}var Z=[];if(typeof y=="undefined")return Z;var j;if(n==="comma"&&xt(y))m&&s&&(y=kn.maybeMap(y,s)),j=[{value:y.length>0?y.join(",")||null:void 0}];else if(xt(i))j=i;else{var E=Object.keys(y);j=p?E.sort(p):E}var A=d?String(t).replace(/\./g,"%2E"):String(t),C=l&&xt(y)&&y.length===1?A+"[]":A;if(a&&xt(y)&&y.length===0)return C+"[]";for(var I=0;I<j.length;++I){var z=j[I],W=typeof z=="object"&&z&&typeof z.value!="undefined"?z.value:y[z];if(!(u&&W===null)){var G=c&&d?String(z).replace(/\./g,"%2E"):String(z),q=xt(y)?typeof n=="function"?n(C,G):C:C+(c?"."+G:"["+G+"]");b.set(r,T);var N=Cu();N.set(zi,b),Bu(Z,e(W,q,n,l,a,o,u,d,n==="comma"&&m&&xt(y)?null:s,i,p,c,f,h,v,m,g,N))}}return Z},hd=function(r){if(!r)return Ne;if(typeof r.allowEmptyArrays!="undefined"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.encodeDotInKeys!="undefined"&&typeof r.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(r.encoder!==null&&typeof r.encoder!="undefined"&&typeof r.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=r.charset||Ne.charset;if(typeof r.charset!="undefined"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=qr.default;if(typeof r.format!="undefined"){if(!sd.call(qr.formatters,r.format))throw new TypeError("Unknown format option provided.");n=r.format}var l=qr.formatters[n],a=Ne.filter;(typeof r.filter=="function"||xt(r.filter))&&(a=r.filter);var o;if(r.arrayFormat in Su?o=r.arrayFormat:"indices"in r?o=r.indices?"indices":"repeat":o=Ne.arrayFormat,"commaRoundTrip"in r&&typeof r.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof r.allowDots=="undefined"?r.encodeDotInKeys===!0?!0:Ne.allowDots:!!r.allowDots;return{addQueryPrefix:typeof r.addQueryPrefix=="boolean"?r.addQueryPrefix:Ne.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:Ne.allowEmptyArrays,arrayFormat:o,charset:t,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:Ne.charsetSentinel,commaRoundTrip:!!r.commaRoundTrip,delimiter:typeof r.delimiter=="undefined"?Ne.delimiter:r.delimiter,encode:typeof r.encode=="boolean"?r.encode:Ne.encode,encodeDotInKeys:typeof r.encodeDotInKeys=="boolean"?r.encodeDotInKeys:Ne.encodeDotInKeys,encoder:typeof r.encoder=="function"?r.encoder:Ne.encoder,encodeValuesOnly:typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:Ne.encodeValuesOnly,filter:a,format:n,formatter:l,serializeDate:typeof r.serializeDate=="function"?r.serializeDate:Ne.serializeDate,skipNulls:typeof r.skipNulls=="boolean"?r.skipNulls:Ne.skipNulls,sort:typeof r.sort=="function"?r.sort:null,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:Ne.strictNullHandling}},dd=function(e,r){var t=e,n=hd(r),l,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):xt(n.filter)&&(a=n.filter,l=a);var o=[];if(typeof t!="object"||t===null)return"";var u=Su[n.arrayFormat],d=u==="comma"&&n.commaRoundTrip;l||(l=Object.keys(t)),n.sort&&l.sort(n.sort);for(var s=Cu(),i=0;i<l.length;++i){var p=l[i],c=t[p];n.skipNulls&&c===null||Bu(o,fd(c,p,u,d,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,s))}var f=o.join(n.delimiter),h=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},_t=Au,Tn=Object.prototype.hasOwnProperty,ji=Array.isArray,De={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:_t.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},pd=function(e){return e.replace(/&#(\d+);/g,function(r,t){return String.fromCharCode(parseInt(t,10))})},ku=function(e,r,t){if(e&&typeof e=="string"&&r.comma&&e.indexOf(",")>-1)return e.split(",");if(r.throwOnLimitExceeded&&t>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");return e},md="utf8=%26%2310003%3B",vd="utf8=%E2%9C%93",yd=function(r,t){var n={__proto__:null},l=t.ignoreQueryPrefix?r.replace(/^\?/,""):r;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=l.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var u=-1,d,s=t.charset;if(t.charsetSentinel)for(d=0;d<o.length;++d)o[d].indexOf("utf8=")===0&&(o[d]===vd?s="utf-8":o[d]===md&&(s="iso-8859-1"),u=d,d=o.length);for(d=0;d<o.length;++d)if(d!==u){var i=o[d],p=i.indexOf("]="),c=p===-1?i.indexOf("="):p+1,f,h;if(c===-1?(f=t.decoder(i,De.decoder,s,"key"),h=t.strictNullHandling?null:""):(f=t.decoder(i.slice(0,c),De.decoder,s,"key"),f!==null&&(h=_t.maybeMap(ku(i.slice(c+1),t,ji(n[f])?n[f].length:0),function(m){return t.decoder(m,De.decoder,s,"value")}))),h&&t.interpretNumericEntities&&s==="iso-8859-1"&&(h=pd(String(h))),i.indexOf("[]=")>-1&&(h=ji(h)?[h]:h),t.comma&&ji(h)&&h.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");h=_t.combine([],h,t.arrayLimit,t.plainObjects)}if(f!==null){var v=Tn.call(n,f);v&&t.duplicates==="combine"?n[f]=_t.combine(n[f],h,t.arrayLimit,t.plainObjects):(!v||t.duplicates==="last")&&(n[f]=h)}}return n},gd=function(e,r,t,n){var l=0;if(e.length>0&&e[e.length-1]==="[]"){var a=e.slice(0,-1).join("");l=Array.isArray(r)&&r[a]?r[a].length:0}for(var o=n?r:ku(r,t,l),u=e.length-1;u>=0;--u){var d,s=e[u];if(s==="[]"&&t.parseArrays)_t.isOverflow(o)?d=o:d=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:_t.combine([],o,t.arrayLimit,t.plainObjects);else{d=t.plainObjects?{__proto__:null}:{};var i=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,p=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,c=parseInt(p,10),f=!isNaN(c)&&s!==p&&String(c)===p&&c>=0&&t.parseArrays;if(!t.parseArrays&&p==="")d={0:o};else if(f&&c<t.arrayLimit)d=[],d[c]=o;else{if(f&&t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");f?(d[c]=o,_t.markOverflow(d,c)):p!=="__proto__"&&(d[p]=o)}}o=d}return o},xd=function(r,t){var n=t.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r;if(t.depth<=0)return!t.plainObjects&&Tn.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var l=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,o=l.exec(n),u=o?n.slice(0,o.index):n,d=[];if(u){if(!t.plainObjects&&Tn.call(Object.prototype,u)&&!t.allowPrototypes)return;d[d.length]=u}for(var s=0;(o=a.exec(n))!==null&&s<t.depth;){s+=1;var i=o[1].slice(1,-1);if(!t.plainObjects&&Tn.call(Object.prototype,i)&&!t.allowPrototypes)return;d[d.length]=o[1]}if(o){if(t.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");d[d.length]="["+n.slice(o.index)+"]"}return d},bd=function(r,t,n,l){if(r){var a=xd(r,n);if(a)return gd(a,t,n,l)}},wd=function(r){if(!r)return De;if(typeof r.allowEmptyArrays!="undefined"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.decodeDotInKeys!="undefined"&&typeof r.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(r.decoder!==null&&typeof r.decoder!="undefined"&&typeof r.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof r.charset!="undefined"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof r.throwOnLimitExceeded!="undefined"&&typeof r.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=typeof r.charset=="undefined"?De.charset:r.charset,n=typeof r.duplicates=="undefined"?De.duplicates:r.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var l=typeof r.allowDots=="undefined"?r.decodeDotInKeys===!0?!0:De.allowDots:!!r.allowDots;return{allowDots:l,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:De.allowEmptyArrays,allowPrototypes:typeof r.allowPrototypes=="boolean"?r.allowPrototypes:De.allowPrototypes,allowSparse:typeof r.allowSparse=="boolean"?r.allowSparse:De.allowSparse,arrayLimit:typeof r.arrayLimit=="number"?r.arrayLimit:De.arrayLimit,charset:t,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:De.charsetSentinel,comma:typeof r.comma=="boolean"?r.comma:De.comma,decodeDotInKeys:typeof r.decodeDotInKeys=="boolean"?r.decodeDotInKeys:De.decodeDotInKeys,decoder:typeof r.decoder=="function"?r.decoder:De.decoder,delimiter:typeof r.delimiter=="string"||_t.isRegExp(r.delimiter)?r.delimiter:De.delimiter,depth:typeof r.depth=="number"||r.depth===!1?+r.depth:De.depth,duplicates:n,ignoreQueryPrefix:r.ignoreQueryPrefix===!0,interpretNumericEntities:typeof r.interpretNumericEntities=="boolean"?r.interpretNumericEntities:De.interpretNumericEntities,parameterLimit:typeof r.parameterLimit=="number"?r.parameterLimit:De.parameterLimit,parseArrays:r.parseArrays!==!1,plainObjects:typeof r.plainObjects=="boolean"?r.plainObjects:De.plainObjects,strictDepth:typeof r.strictDepth=="boolean"?!!r.strictDepth:De.strictDepth,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:De.strictNullHandling,throwOnLimitExceeded:typeof r.throwOnLimitExceeded=="boolean"?r.throwOnLimitExceeded:!1}},_d=function(e,r){var t=wd(r);if(e===""||e===null||typeof e=="undefined")return t.plainObjects?{__proto__:null}:{};for(var n=typeof e=="string"?yd(e,t):e,l=t.plainObjects?{__proto__:null}:{},a=Object.keys(n),o=0;o<a.length;++o){var u=a[o],d=bd(u,n[u],t,typeof e=="string");l=_t.merge(l,d,t)}return t.allowSparse===!0?l:_t.compact(l)},Ed=dd,Ad=_d,Cd=aa,Sd={formats:Cd,parse:Ad,stringify:Ed};const Bd=ea(Sd);function Tu(e,r){return function(){return e.apply(r,arguments)}}const{toString:kd}=Object.prototype,{getPrototypeOf:sa}=Object,{iterator:Qn,toStringTag:Fu}=Symbol,Yn=(e=>r=>{const t=kd.call(r);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),dt=e=>(e=e.toLowerCase(),r=>Yn(r)===e),Xn=e=>r=>typeof r===e,{isArray:Sr}=Array,wr=Xn("undefined");function Qr(e){return e!==null&&!wr(e)&&e.constructor!==null&&!wr(e.constructor)&&Ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Iu=dt("ArrayBuffer");function Td(e){let r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&Iu(e.buffer),r}const Fd=Xn("string"),Ze=Xn("function"),Du=Xn("number"),Yr=e=>e!==null&&typeof e=="object",Id=e=>e===!0||e===!1,Fn=e=>{if(Yn(e)!=="object")return!1;const r=sa(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Fu in e)&&!(Qn in e)},Dd=e=>{if(!Yr(e)||Qr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(r){return!1}},Rd=dt("Date"),Od=dt("File"),Pd=dt("Blob"),Nd=dt("FileList"),Md=e=>Yr(e)&&Ze(e.pipe),Ld=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||Ze(e.append)&&((r=Yn(e))==="formdata"||r==="object"&&Ze(e.toString)&&e.toString()==="[object FormData]"))},Ud=dt("URLSearchParams"),[qd,$d,zd,jd]=["ReadableStream","Request","Response","Headers"].map(dt),Hd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xr(e,r,{allOwnKeys:t=!1}={}){if(e===null||typeof e=="undefined")return;let n,l;if(typeof e!="object"&&(e=[e]),Sr(e))for(n=0,l=e.length;n<l;n++)r.call(null,e[n],n,e);else{if(Qr(e))return;const a=t?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let u;for(n=0;n<o;n++)u=a[n],r.call(null,e[u],u,e)}}function Ru(e,r){if(Qr(e))return null;r=r.toLowerCase();const t=Object.keys(e);let n=t.length,l;for(;n-- >0;)if(l=t[n],r===l.toLowerCase())return l;return null}const Kt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Ou=e=>!wr(e)&&e!==Kt;function $o(){const{caseless:e,skipUndefined:r}=Ou(this)&&this||{},t={},n=(l,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const o=e&&Ru(t,a)||a;Fn(t[o])&&Fn(l)?t[o]=$o(t[o],l):Fn(l)?t[o]=$o({},l):Sr(l)?t[o]=l.slice():(!r||!wr(l))&&(t[o]=l)};for(let l=0,a=arguments.length;l<a;l++)arguments[l]&&Xr(arguments[l],n);return t}const Vd=(e,r,t,{allOwnKeys:n}={})=>(Xr(r,(l,a)=>{t&&Ze(l)?Object.defineProperty(e,a,{value:Tu(l,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Wd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Kd=(e,r,t,n)=>{e.prototype=Object.create(r.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:r.prototype}),t&&Object.assign(e.prototype,t)},Gd=(e,r,t,n)=>{let l,a,o;const u={};if(r=r||{},e==null)return r;do{for(l=Object.getOwnPropertyNames(e),a=l.length;a-- >0;)o=l[a],(!n||n(o,e,r))&&!u[o]&&(r[o]=e[o],u[o]=!0);e=t!==!1&&sa(e)}while(e&&(!t||t(e,r))&&e!==Object.prototype);return r},Qd=(e,r,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=r.length;const n=e.indexOf(r,t);return n!==-1&&n===t},Yd=e=>{if(!e)return null;if(Sr(e))return e;let r=e.length;if(!Du(r))return null;const t=new Array(r);for(;r-- >0;)t[r]=e[r];return t},Xd=(e=>r=>e&&r instanceof e)(typeof Uint8Array!="undefined"&&sa(Uint8Array)),Zd=(e,r)=>{const n=(e&&e[Qn]).call(e);let l;for(;(l=n.next())&&!l.done;){const a=l.value;r.call(e,a[0],a[1])}},Jd=(e,r)=>{let t;const n=[];for(;(t=e.exec(r))!==null;)n.push(t);return n},ep=dt("HTMLFormElement"),tp=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,l){return n.toUpperCase()+l}),ls=(({hasOwnProperty:e})=>(r,t)=>e.call(r,t))(Object.prototype),rp=dt("RegExp"),Pu=(e,r)=>{const t=Object.getOwnPropertyDescriptors(e),n={};Xr(t,(l,a)=>{let o;(o=r(l,a,e))!==!1&&(n[a]=o||l)}),Object.defineProperties(e,n)},np=e=>{Pu(e,(r,t)=>{if(Ze(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=e[t];if(Ze(n)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},ip=(e,r)=>{const t={},n=l=>{l.forEach(a=>{t[a]=!0})};return Sr(e)?n(e):n(String(e).split(r)),t},op=()=>{},ap=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function sp(e){return!!(e&&Ze(e.append)&&e[Fu]==="FormData"&&e[Qn])}const lp=e=>{const r=new Array(10),t=(n,l)=>{if(Yr(n)){if(r.indexOf(n)>=0)return;if(Qr(n))return n;if(!("toJSON"in n)){r[l]=n;const a=Sr(n)?[]:{};return Xr(n,(o,u)=>{const d=t(o,l+1);!wr(d)&&(a[u]=d)}),r[l]=void 0,a}}return n};return t(e,0)},up=dt("AsyncFunction"),cp=e=>e&&(Yr(e)||Ze(e))&&Ze(e.then)&&Ze(e.catch),Nu=((e,r)=>e?setImmediate:r?((t,n)=>(Kt.addEventListener("message",({source:l,data:a})=>{l===Kt&&a===t&&n.length&&n.shift()()},!1),l=>{n.push(l),Kt.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ze(Kt.postMessage)),fp=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Kt):typeof process!="undefined"&&process.nextTick||Nu,hp=e=>e!=null&&Ze(e[Qn]),le={isArray:Sr,isArrayBuffer:Iu,isBuffer:Qr,isFormData:Ld,isArrayBufferView:Td,isString:Fd,isNumber:Du,isBoolean:Id,isObject:Yr,isPlainObject:Fn,isEmptyObject:Dd,isReadableStream:qd,isRequest:$d,isResponse:zd,isHeaders:jd,isUndefined:wr,isDate:Rd,isFile:Od,isBlob:Pd,isRegExp:rp,isFunction:Ze,isStream:Md,isURLSearchParams:Ud,isTypedArray:Xd,isFileList:Nd,forEach:Xr,merge:$o,extend:Vd,trim:Hd,stripBOM:Wd,inherits:Kd,toFlatObject:Gd,kindOf:Yn,kindOfTest:dt,endsWith:Qd,toArray:Yd,forEachEntry:Zd,matchAll:Jd,isHTMLForm:ep,hasOwnProperty:ls,hasOwnProp:ls,reduceDescriptors:Pu,freezeMethods:np,toObjectSet:ip,toCamelCase:tp,noop:op,toFiniteNumber:ap,findKey:Ru,global:Kt,isContextDefined:Ou,isSpecCompliantForm:sp,toJSONObject:lp,isAsyncFn:up,isThenable:cp,setImmediate:Nu,asap:fp,isIterable:hp};let be=class Mu extends Error{static from(r,t,n,l,a,o){const u=new Mu(r.message,t||r.code,n,l,a);return u.cause=r,u.name=r.name,o&&Object.assign(u,o),u}constructor(r,t,n,l,a){super(r),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),l&&(this.request=l),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:le.toJSONObject(this.config),code:this.code,status:this.status}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";be.ERR_BAD_OPTION="ERR_BAD_OPTION";be.ECONNABORTED="ECONNABORTED";be.ETIMEDOUT="ETIMEDOUT";be.ERR_NETWORK="ERR_NETWORK";be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";be.ERR_DEPRECATED="ERR_DEPRECATED";be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";be.ERR_BAD_REQUEST="ERR_BAD_REQUEST";be.ERR_CANCELED="ERR_CANCELED";be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";be.ERR_INVALID_URL="ERR_INVALID_URL";const dp=null;function zo(e){return le.isPlainObject(e)||le.isArray(e)}function Lu(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function us(e,r,t){return e?e.concat(r).map(function(l,a){return l=Lu(l),!t&&a?"["+l+"]":l}).join(t?".":""):r}function pp(e){return le.isArray(e)&&!e.some(zo)}const mp=le.toFlatObject(le,{},null,function(r){return/^is[A-Z]/.test(r)});function Zn(e,r,t){if(!le.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,t=le.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!le.isUndefined(m[v])});const n=t.metaTokens,l=t.visitor||i,a=t.dots,o=t.indexes,d=(t.Blob||typeof Blob!="undefined"&&Blob)&&le.isSpecCompliantForm(r);if(!le.isFunction(l))throw new TypeError("visitor must be a function");function s(h){if(h===null)return"";if(le.isDate(h))return h.toISOString();if(le.isBoolean(h))return h.toString();if(!d&&le.isBlob(h))throw new be("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(h)||le.isTypedArray(h)?d&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function i(h,v,m){let g=h;if(h&&!m&&typeof h=="object"){if(le.endsWith(v,"{}"))v=n?v:v.slice(0,-2),h=JSON.stringify(h);else if(le.isArray(h)&&pp(h)||(le.isFileList(h)||le.endsWith(v,"[]"))&&(g=le.toArray(h)))return v=Lu(v),g.forEach(function(y,_){!(le.isUndefined(y)||y===null)&&r.append(o===!0?us([v],_,a):o===null?v:v+"[]",s(y))}),!1}return zo(h)?!0:(r.append(us(m,v,a),s(h)),!1)}const p=[],c=Object.assign(mp,{defaultVisitor:i,convertValue:s,isVisitable:zo});function f(h,v){if(!le.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(h),le.forEach(h,function(g,b){(!(le.isUndefined(g)||g===null)&&l.call(r,g,le.isString(b)?b.trim():b,v,c))===!0&&f(g,v?v.concat(b):[b])}),p.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return f(e),r}function cs(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return r[n]})}function la(e,r){this._pairs=[],e&&Zn(e,this,r)}const Uu=la.prototype;Uu.append=function(r,t){this._pairs.push([r,t])};Uu.toString=function(r){const t=r?function(n){return r.call(this,n,cs)}:cs;return this._pairs.map(function(l){return t(l[0])+"="+t(l[1])},"").join("&")};function vp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qu(e,r,t){if(!r)return e;const n=t&&t.encode||vp,l=le.isFunction(t)?{serialize:t}:t,a=l&&l.serialize;let o;if(a?o=a(r,l):o=le.isURLSearchParams(r)?r.toString():new la(r,l).toString(n),o){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class fs{constructor(){this.handlers=[]}use(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){le.forEach(this.handlers,function(n){n!==null&&r(n)})}}const ua={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},yp=typeof URLSearchParams!="undefined"?URLSearchParams:la,gp=typeof FormData!="undefined"?FormData:null,xp=typeof Blob!="undefined"?Blob:null,bp={isBrowser:!0,classes:{URLSearchParams:yp,FormData:gp,Blob:xp},protocols:["http","https","file","blob","url","data"]},ca=typeof window!="undefined"&&typeof document!="undefined",jo=typeof navigator=="object"&&navigator||void 0,wp=ca&&(!jo||["ReactNative","NativeScript","NS"].indexOf(jo.product)<0),_p=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ep=ca&&window.location.href||"http://localhost",Ap=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ca,hasStandardBrowserEnv:wp,hasStandardBrowserWebWorkerEnv:_p,navigator:jo,origin:Ep},Symbol.toStringTag,{value:"Module"})),Ke=he(he({},Ap),bp);function Cp(e,r){return Zn(e,new Ke.classes.URLSearchParams,he({visitor:function(t,n,l,a){return Ke.isNode&&le.isBuffer(t)?(this.append(n,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},r))}function Sp(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function Bp(e){const r={},t=Object.keys(e);let n;const l=t.length;let a;for(n=0;n<l;n++)a=t[n],r[a]=e[a];return r}function $u(e){function r(t,n,l,a){let o=t[a++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),d=a>=t.length;return o=!o&&le.isArray(l)?l.length:o,d?(le.hasOwnProp(l,o)?l[o]=[l[o],n]:l[o]=n,!u):((!l[o]||!le.isObject(l[o]))&&(l[o]=[]),r(t,n,l[o],a)&&le.isArray(l[o])&&(l[o]=Bp(l[o])),!u)}if(le.isFormData(e)&&le.isFunction(e.entries)){const t={};return le.forEachEntry(e,(n,l)=>{r(Sp(n),l,t,0)}),t}return null}function kp(e,r,t){if(le.isString(e))try{return(r||JSON.parse)(e),le.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}const Zr={transitional:ua,adapter:["xhr","http","fetch"],transformRequest:[function(r,t){const n=t.getContentType()||"",l=n.indexOf("application/json")>-1,a=le.isObject(r);if(a&&le.isHTMLForm(r)&&(r=new FormData(r)),le.isFormData(r))return l?JSON.stringify($u(r)):r;if(le.isArrayBuffer(r)||le.isBuffer(r)||le.isStream(r)||le.isFile(r)||le.isBlob(r)||le.isReadableStream(r))return r;if(le.isArrayBufferView(r))return r.buffer;if(le.isURLSearchParams(r))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let u;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Cp(r,this.formSerializer).toString();if((u=le.isFileList(r))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Zn(u?{"files[]":r}:r,d&&new d,this.formSerializer)}}return a||l?(t.setContentType("application/json",!1),kp(r)):r}],transformResponse:[function(r){const t=this.transitional||Zr.transitional,n=t&&t.forcedJSONParsing,l=this.responseType==="json";if(le.isResponse(r)||le.isReadableStream(r))return r;if(r&&le.isString(r)&&(n&&!this.responseType||l)){const o=!(t&&t.silentJSONParsing)&&l;try{return JSON.parse(r,this.parseReviver)}catch(u){if(o)throw u.name==="SyntaxError"?be.from(u,be.ERR_BAD_RESPONSE,this,null,this.response):u}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{Zr.headers[e]={}});const Tp=le.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fp=e=>{const r={};let t,n,l;return e&&e.split(`
5
- `).forEach(function(o){l=o.indexOf(":"),t=o.substring(0,l).trim().toLowerCase(),n=o.substring(l+1).trim(),!(!t||r[t]&&Tp[t])&&(t==="set-cookie"?r[t]?r[t].push(n):r[t]=[n]:r[t]=r[t]?r[t]+", "+n:n)}),r},hs=Symbol("internals");function Dr(e){return e&&String(e).trim().toLowerCase()}function In(e){return e===!1||e==null?e:le.isArray(e)?e.map(In):String(e)}function Ip(e){const r=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(e);)r[n[1]]=n[2];return r}const Dp=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hi(e,r,t,n,l){if(le.isFunction(n))return n.call(this,r,t);if(l&&(r=t),!!le.isString(r)){if(le.isString(n))return r.indexOf(n)!==-1;if(le.isRegExp(n))return n.test(r)}}function Rp(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,t,n)=>t.toUpperCase()+n)}function Op(e,r){const t=le.toCamelCase(" "+r);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+t,{value:function(l,a,o){return this[n].call(this,r,l,a,o)},configurable:!0})})}let Je=class{constructor(r){r&&this.set(r)}set(r,t,n){const l=this;function a(u,d,s){const i=Dr(d);if(!i)throw new Error("header name must be a non-empty string");const p=le.findKey(l,i);(!p||l[p]===void 0||s===!0||s===void 0&&l[p]!==!1)&&(l[p||d]=In(u))}const o=(u,d)=>le.forEach(u,(s,i)=>a(s,i,d));if(le.isPlainObject(r)||r instanceof this.constructor)o(r,t);else if(le.isString(r)&&(r=r.trim())&&!Dp(r))o(Fp(r),t);else if(le.isObject(r)&&le.isIterable(r)){let u={},d,s;for(const i of r){if(!le.isArray(i))throw TypeError("Object iterator must return a key-value pair");u[s=i[0]]=(d=u[s])?le.isArray(d)?[...d,i[1]]:[d,i[1]]:i[1]}o(u,t)}else r!=null&&a(t,r,n);return this}get(r,t){if(r=Dr(r),r){const n=le.findKey(this,r);if(n){const l=this[n];if(!t)return l;if(t===!0)return Ip(l);if(le.isFunction(t))return t.call(this,l,n);if(le.isRegExp(t))return t.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,t){if(r=Dr(r),r){const n=le.findKey(this,r);return!!(n&&this[n]!==void 0&&(!t||Hi(this,this[n],n,t)))}return!1}delete(r,t){const n=this;let l=!1;function a(o){if(o=Dr(o),o){const u=le.findKey(n,o);u&&(!t||Hi(n,n[u],u,t))&&(delete n[u],l=!0)}}return le.isArray(r)?r.forEach(a):a(r),l}clear(r){const t=Object.keys(this);let n=t.length,l=!1;for(;n--;){const a=t[n];(!r||Hi(this,this[a],a,r,!0))&&(delete this[a],l=!0)}return l}normalize(r){const t=this,n={};return le.forEach(this,(l,a)=>{const o=le.findKey(n,a);if(o){t[o]=In(l),delete t[a];return}const u=r?Rp(a):String(a).trim();u!==a&&delete t[a],t[u]=In(l),n[u]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const t=Object.create(null);return le.forEach(this,(n,l)=>{n!=null&&n!==!1&&(t[l]=r&&le.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,t])=>r+": "+t).join(`
6
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...t){const n=new this(r);return t.forEach(l=>n.set(l)),n}static accessor(r){const n=(this[hs]=this[hs]={accessors:{}}).accessors,l=this.prototype;function a(o){const u=Dr(o);n[u]||(Op(l,o),n[u]=!0)}return le.isArray(r)?r.forEach(a):a(r),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(Je.prototype,({value:e},r)=>{let t=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(n){this[t]=n}}});le.freezeMethods(Je);function Vi(e,r){const t=this||Zr,n=r||t,l=Je.from(n.headers);let a=n.data;return le.forEach(e,function(u){a=u.call(t,a,l.normalize(),r?r.status:void 0)}),l.normalize(),a}function zu(e){return!!(e&&e.__CANCEL__)}let Jr=class extends be{constructor(r,t,n){super(r==null?"canceled":r,be.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function ju(e,r,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):r(new be("Request failed with status code "+t.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Pp(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function Np(e,r){e=e||10;const t=new Array(e),n=new Array(e);let l=0,a=0,o;return r=r!==void 0?r:1e3,function(d){const s=Date.now(),i=n[a];o||(o=s),t[l]=d,n[l]=s;let p=a,c=0;for(;p!==l;)c+=t[p++],p=p%e;if(l=(l+1)%e,l===a&&(a=(a+1)%e),s-o<r)return;const f=i&&s-i;return f?Math.round(c*1e3/f):void 0}}function Mp(e,r){let t=0,n=1e3/r,l,a;const o=(s,i=Date.now())=>{t=i,l=null,a&&(clearTimeout(a),a=null),e(...s)};return[(...s)=>{const i=Date.now(),p=i-t;p>=n?o(s,i):(l=s,a||(a=setTimeout(()=>{a=null,o(l)},n-p)))},()=>l&&o(l)]}const Un=(e,r,t=3)=>{let n=0;const l=Np(50,250);return Mp(a=>{const o=a.loaded,u=a.lengthComputable?a.total:void 0,d=o-n,s=l(d),i=o<=u;n=o;const p={loaded:o,total:u,progress:u?o/u:void 0,bytes:d,rate:s||void 0,estimated:s&&u&&i?(u-o)/s:void 0,event:a,lengthComputable:u!=null,[r?"download":"upload"]:!0};e(p)},t)},ds=(e,r)=>{const t=e!=null;return[n=>r[0]({lengthComputable:t,total:e,loaded:n}),r[1]]},ps=e=>(...r)=>le.asap(()=>e(...r)),Lp=Ke.hasStandardBrowserEnv?((e,r)=>t=>(t=new URL(t,Ke.origin),e.protocol===t.protocol&&e.host===t.host&&(r||e.port===t.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,Up=Ke.hasStandardBrowserEnv?{write(e,r,t,n,l,a,o){if(typeof document=="undefined")return;const u=[`${e}=${encodeURIComponent(r)}`];le.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),le.isString(n)&&u.push(`path=${n}`),le.isString(l)&&u.push(`domain=${l}`),a===!0&&u.push("secure"),le.isString(o)&&u.push(`SameSite=${o}`),document.cookie=u.join("; ")},read(e){if(typeof document=="undefined")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function qp(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $p(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function Hu(e,r,t){let n=!qp(r);return e&&(n||t==!1)?$p(e,r):r}const ms=e=>e instanceof Je?he({},e):e;function Xt(e,r){r=r||{};const t={};function n(s,i,p,c){return le.isPlainObject(s)&&le.isPlainObject(i)?le.merge.call({caseless:c},s,i):le.isPlainObject(i)?le.merge({},i):le.isArray(i)?i.slice():i}function l(s,i,p,c){if(le.isUndefined(i)){if(!le.isUndefined(s))return n(void 0,s,p,c)}else return n(s,i,p,c)}function a(s,i){if(!le.isUndefined(i))return n(void 0,i)}function o(s,i){if(le.isUndefined(i)){if(!le.isUndefined(s))return n(void 0,s)}else return n(void 0,i)}function u(s,i,p){if(p in r)return n(s,i);if(p in e)return n(void 0,s)}const d={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(s,i,p)=>l(ms(s),ms(i),p,!0)};return le.forEach(Object.keys(he(he({},e),r)),function(i){if(i==="__proto__"||i==="constructor"||i==="prototype")return;const p=le.hasOwnProp(d,i)?d[i]:l,c=p(e[i],r[i],i);le.isUndefined(c)&&p!==u||(t[i]=c)}),t}const Vu=e=>{const r=Xt({},e);let{data:t,withXSRFToken:n,xsrfHeaderName:l,xsrfCookieName:a,headers:o,auth:u}=r;if(r.headers=o=Je.from(o),r.url=qu(Hu(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),le.isFormData(t)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(le.isFunction(t.getHeaders)){const d=t.getHeaders(),s=["content-type","content-length"];Object.entries(d).forEach(([i,p])=>{s.includes(i.toLowerCase())&&o.set(i,p)})}}if(Ke.hasStandardBrowserEnv&&(n&&le.isFunction(n)&&(n=n(r)),n||n!==!1&&Lp(r.url))){const d=l&&a&&Up.read(a);d&&o.set(l,d)}return r},zp=typeof XMLHttpRequest!="undefined",jp=zp&&function(e){return new Promise(function(t,n){const l=Vu(e);let a=l.data;const o=Je.from(l.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:s}=l,i,p,c,f,h;function v(){f&&f(),h&&h(),l.cancelToken&&l.cancelToken.unsubscribe(i),l.signal&&l.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;m.open(l.method.toUpperCase(),l.url,!0),m.timeout=l.timeout;function g(){if(!m)return;const y=Je.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};ju(function(F){t(F),v()},function(F){n(F),v()},T),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(n(new be("Request aborted",be.ECONNABORTED,e,m)),m=null)},m.onerror=function(_){const T=_&&_.message?_.message:"Network Error",B=new be(T,be.ERR_NETWORK,e,m);B.event=_||null,n(B),m=null},m.ontimeout=function(){let _=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const T=l.transitional||ua;l.timeoutErrorMessage&&(_=l.timeoutErrorMessage),n(new be(_,T.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&le.forEach(o.toJSON(),function(_,T){m.setRequestHeader(T,_)}),le.isUndefined(l.withCredentials)||(m.withCredentials=!!l.withCredentials),u&&u!=="json"&&(m.responseType=l.responseType),s&&([c,h]=Un(s,!0),m.addEventListener("progress",c)),d&&m.upload&&([p,f]=Un(d),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",f)),(l.cancelToken||l.signal)&&(i=y=>{m&&(n(!y||y.type?new Jr(null,e,m):y),m.abort(),m=null)},l.cancelToken&&l.cancelToken.subscribe(i),l.signal&&(l.signal.aborted?i():l.signal.addEventListener("abort",i)));const b=Pp(l.url);if(b&&Ke.protocols.indexOf(b)===-1){n(new be("Unsupported protocol "+b+":",be.ERR_BAD_REQUEST,e));return}m.send(a||null)})},Hp=(e,r)=>{const{length:t}=e=e?e.filter(Boolean):[];if(r||t){let n=new AbortController,l;const a=function(s){if(!l){l=!0,u();const i=s instanceof Error?s:this.reason;n.abort(i instanceof be?i:new Jr(i instanceof Error?i.message:i))}};let o=r&&setTimeout(()=>{o=null,a(new be(`timeout of ${r}ms exceeded`,be.ETIMEDOUT))},r);const u=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(a):s.removeEventListener("abort",a)}),e=null)};e.forEach(s=>s.addEventListener("abort",a));const{signal:d}=n;return d.unsubscribe=()=>le.asap(u),d}},Vp=function*(e,r){let t=e.byteLength;if(t<r){yield e;return}let n=0,l;for(;n<t;)l=n+r,yield e.slice(n,l),n=l},Wp=function(e,r){return xi(this,null,function*(){try{for(var t=Ia(Kp(e)),n,l,a;n=!(l=yield new jt(t.next())).done;n=!1){const o=l.value;yield*bi(Vp(o,r))}}catch(l){a=[l]}finally{try{n&&(l=t.return)&&(yield new jt(l.call(t)))}finally{if(a)throw a[0]}}})},Kp=function(e){return xi(this,null,function*(){if(e[Symbol.asyncIterator]){yield*bi(e);return}const r=e.getReader();try{for(;;){const{done:t,value:n}=yield new jt(r.read());if(t)break;yield n}}finally{yield new jt(r.cancel())}})},vs=(e,r,t,n)=>{const l=Wp(e,r);let a=0,o,u=s=>{o||(o=!0,n&&n(s))};return new ReadableStream({pull(s){return je(this,null,function*(){try{const{done:i,value:p}=yield l.next();if(i){u(),s.close();return}let c=p.byteLength;if(t){let f=a+=c;t(f)}s.enqueue(new Uint8Array(p))}catch(i){throw u(i),i}})},cancel(s){return u(s),l.return()}},{highWaterMark:2})},ys=64*1024,{isFunction:mn}=le,Gp=(({Request:e,Response:r})=>({Request:e,Response:r}))(le.global),{ReadableStream:gs,TextEncoder:xs}=le.global,bs=(e,...r)=>{try{return!!e(...r)}catch(t){return!1}},Qp=e=>{e=le.merge.call({skipUndefined:!0},Gp,e);const{fetch:r,Request:t,Response:n}=e,l=r?mn(r):typeof fetch=="function",a=mn(t),o=mn(n);if(!l)return!1;const u=l&&mn(gs),d=l&&(typeof xs=="function"?(h=>v=>h.encode(v))(new xs):h=>je(exports,null,function*(){return new Uint8Array(yield new t(h).arrayBuffer())})),s=a&&u&&bs(()=>{let h=!1;const v=new t(Ke.origin,{body:new gs,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!v}),i=o&&u&&bs(()=>le.isReadableStream(new n("").body)),p={stream:i&&(h=>h.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!p[h]&&(p[h]=(v,m)=>{let g=v&&v[h];if(g)return g.call(v);throw new be(`Response type '${h}' is not supported`,be.ERR_NOT_SUPPORT,m)})});const c=h=>je(exports,null,function*(){if(h==null)return 0;if(le.isBlob(h))return h.size;if(le.isSpecCompliantForm(h))return(yield new t(Ke.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(le.isArrayBufferView(h)||le.isArrayBuffer(h))return h.byteLength;if(le.isURLSearchParams(h)&&(h=h+""),le.isString(h))return(yield d(h)).byteLength}),f=(h,v)=>je(exports,null,function*(){const m=le.toFiniteNumber(h.getContentLength());return m==null?c(v):m});return h=>je(exports,null,function*(){let{url:v,method:m,data:g,signal:b,cancelToken:y,timeout:_,onDownloadProgress:T,onUploadProgress:B,responseType:F,headers:R,withCredentials:Z="same-origin",fetchOptions:j}=Vu(h),E=r||fetch;F=F?(F+"").toLowerCase():"text";let A=Hp([b,y&&y.toAbortSignal()],_),C=null;const I=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let z;try{if(B&&s&&m!=="get"&&m!=="head"&&(z=yield f(R,g))!==0){let L=new t(v,{method:"POST",body:g,duplex:"half"}),O;if(le.isFormData(g)&&(O=L.headers.get("content-type"))&&R.setContentType(O),L.body){const[K,H]=ds(z,Un(ps(B)));g=vs(L.body,ys,K,H)}}le.isString(Z)||(Z=Z?"include":"omit");const W=a&&"credentials"in t.prototype,G=we(he({},j),{signal:A,method:m.toUpperCase(),headers:R.normalize().toJSON(),body:g,duplex:"half",credentials:W?Z:void 0});C=a&&new t(v,G);let q=yield a?E(C,j):E(v,G);const N=i&&(F==="stream"||F==="response");if(i&&(T||N&&I)){const L={};["status","statusText","headers"].forEach(J=>{L[J]=q[J]});const O=le.toFiniteNumber(q.headers.get("content-length")),[K,H]=T&&ds(O,Un(ps(T),!0))||[];q=new n(vs(q.body,ys,K,()=>{H&&H(),I&&I()}),L)}F=F||"text";let V=yield p[le.findKey(p,F)||"text"](q,h);return!N&&I&&I(),yield new Promise((L,O)=>{ju(L,O,{data:V,headers:Je.from(q.headers),status:q.status,statusText:q.statusText,config:h,request:C})})}catch(W){throw I&&I(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new be("Network Error",be.ERR_NETWORK,h,C,W&&W.response),{cause:W.cause||W}):be.from(W,W&&W.code,h,C,W&&W.response)}})},Yp=new Map,Wu=e=>{let r=e&&e.env||{};const{fetch:t,Request:n,Response:l}=r,a=[n,l,t];let o=a.length,u=o,d,s,i=Yp;for(;u--;)d=a[u],s=i.get(d),s===void 0&&i.set(d,s=u?new Map:Qp(r)),i=s;return s};Wu();const fa={http:dp,xhr:jp,fetch:{get:Wu}};le.forEach(fa,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch(t){}Object.defineProperty(e,"adapterName",{value:r})}});const ws=e=>`- ${e}`,Xp=e=>le.isFunction(e)||e===null||e===!1;function Zp(e,r){e=le.isArray(e)?e:[e];const{length:t}=e;let n,l;const a={};for(let o=0;o<t;o++){n=e[o];let u;if(l=n,!Xp(n)&&(l=fa[(u=String(n)).toLowerCase()],l===void 0))throw new be(`Unknown adapter '${u}'`);if(l&&(le.isFunction(l)||(l=l.get(r))))break;a[u||"#"+o]=l}if(!l){const o=Object.entries(a).map(([d,s])=>`adapter ${d} `+(s===!1?"is not supported by the environment":"is not available in the build"));let u=t?o.length>1?`since :
7
- `+o.map(ws).join(`
8
- `):" "+ws(o[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return l}const Ku={getAdapter:Zp,adapters:fa};function Wi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jr(null,e)}function _s(e){return Wi(e),e.headers=Je.from(e.headers),e.data=Vi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ku.getAdapter(e.adapter||Zr.adapter,e)(e).then(function(n){return Wi(e),n.data=Vi.call(e,e.transformResponse,n),n.headers=Je.from(n.headers),n},function(n){return zu(n)||(Wi(e),n&&n.response&&(n.response.data=Vi.call(e,e.transformResponse,n.response),n.response.headers=Je.from(n.response.headers))),Promise.reject(n)})}const Gu="1.13.5",Jn={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{Jn[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});const Es={};Jn.transitional=function(r,t,n){function l(a,o){return"[Axios v"+Gu+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,u)=>{if(r===!1)throw new be(l(o," has been removed"+(t?" in "+t:"")),be.ERR_DEPRECATED);return t&&!Es[o]&&(Es[o]=!0,console.warn(l(o," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(a,o,u):!0}};Jn.spelling=function(r){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${r}`),!0)};function Jp(e,r,t){if(typeof e!="object")throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let l=n.length;for(;l-- >0;){const a=n[l],o=r[a];if(o){const u=e[a],d=u===void 0||o(u,a,e);if(d!==!0)throw new be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const Dn={assertOptions:Jp,validators:Jn},ot=Dn.validators;let Yt=class{constructor(r){this.defaults=r||{},this.interceptors={request:new fs,response:new fs}}request(r,t){return je(this,null,function*(){try{return yield this._request(r,t)}catch(n){if(n instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const a=l.stack?l.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
9
- `+a):n.stack=a}catch(o){}}throw n}})}_request(r,t){typeof r=="string"?(t=t||{},t.url=r):t=r||{},t=Xt(this.defaults,t);const{transitional:n,paramsSerializer:l,headers:a}=t;n!==void 0&&Dn.assertOptions(n,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean)},!1),l!=null&&(le.isFunction(l)?t.paramsSerializer={serialize:l}:Dn.assertOptions(l,{encode:ot.function,serialize:ot.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Dn.assertOptions(t,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&le.merge(a.common,a[t.method]);a&&le.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),t.headers=Je.concat(o,a);const u=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(t)===!1)return;d=d&&v.synchronous;const m=t.transitional||ua;m&&m.legacyInterceptorReqResOrdering?u.unshift(v.fulfilled,v.rejected):u.push(v.fulfilled,v.rejected)});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let i,p=0,c;if(!d){const h=[_s.bind(this),void 0];for(h.unshift(...u),h.push(...s),c=h.length,i=Promise.resolve(t);p<c;)i=i.then(h[p++],h[p++]);return i}c=u.length;let f=t;for(;p<c;){const h=u[p++],v=u[p++];try{f=h(f)}catch(m){v.call(this,m);break}}try{i=_s.call(this,f)}catch(h){return Promise.reject(h)}for(p=0,c=s.length;p<c;)i=i.then(s[p++],s[p++]);return i}getUri(r){r=Xt(this.defaults,r);const t=Hu(r.baseURL,r.url,r.allowAbsoluteUrls);return qu(t,r.params,r.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(r){Yt.prototype[r]=function(t,n){return this.request(Xt(n||{},{method:r,url:t,data:(n||{}).data}))}});le.forEach(["post","put","patch"],function(r){function t(n){return function(a,o,u){return this.request(Xt(u||{},{method:r,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Yt.prototype[r]=t(),Yt.prototype[r+"Form"]=t(!0)});let e1=class Qu{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const n=this;this.promise.then(l=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](l);n._listeners=null}),this.promise.then=l=>{let a;const o=new Promise(u=>{n.subscribe(u),a=u}).then(l);return o.cancel=function(){n.unsubscribe(a)},o},r(function(a,o,u){n.reason||(n.reason=new Jr(a,o,u),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const t=this._listeners.indexOf(r);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const r=new AbortController,t=n=>{r.abort(n)};return this.subscribe(t),r.signal.unsubscribe=()=>this.unsubscribe(t),r.signal}static source(){let r;return{token:new Qu(function(l){r=l}),cancel:r}}};function t1(e){return function(t){return e.apply(null,t)}}function r1(e){return le.isObject(e)&&e.isAxiosError===!0}const Ho={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ho).forEach(([e,r])=>{Ho[r]=e});function Yu(e){const r=new Yt(e),t=Tu(Yt.prototype.request,r);return le.extend(t,Yt.prototype,r,{allOwnKeys:!0}),le.extend(t,r,null,{allOwnKeys:!0}),t.create=function(l){return Yu(Xt(e,l))},t}const Oe=Yu(Zr);Oe.Axios=Yt;Oe.CanceledError=Jr;Oe.CancelToken=e1;Oe.isCancel=zu;Oe.VERSION=Gu;Oe.toFormData=Zn;Oe.AxiosError=be;Oe.Cancel=Oe.CanceledError;Oe.all=function(r){return Promise.all(r)};Oe.spread=t1;Oe.isAxiosError=r1;Oe.mergeConfig=Xt;Oe.AxiosHeaders=Je;Oe.formToJSON=e=>$u(le.isHTMLForm(e)?new FormData(e):e);Oe.getAdapter=Ku.getAdapter;Oe.HttpStatusCode=Ho;Oe.default=Oe;const{Axios:vg,AxiosError:yg,CanceledError:gg,isCancel:xg,CancelToken:bg,VERSION:wg,all:_g,Cancel:Eg,isAxiosError:Ag,spread:Cg,toFormData:Sg,AxiosHeaders:Bg,HttpStatusCode:kg,formToJSON:Tg,getAdapter:Fg,mergeConfig:Ig}=Oe,nt={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG",PROPS_PANEL:"PROPS_PANEL"},n1={OFFLINE:0},Se={NORMAL:"NORMAL",TEXT:"TEXT",AUDIO:"AUDIO",MP4:"MP4",CAMERA:"CAMERA",VIDEO_STREAM:"VIDEO_STREAM",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",SENSOR:"SENSOR",TABLE:"TABLE",SWITCH:"SWITCH",RADIO:"RADIO",SLIDER:"SLIDER",SELECT:"SELECT",CHECKBOX:"CHECKBOX",TIME:"TIME",BUTTON:"BUTTON",INPUT:"INPUT"},St={POINT:5,YX:6,YC:7,SG:12},vn={Emit:7},i1={STOP:2},o1={1:1,2:2,3:3,4:4,5:5},ei={WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},As={GRAPH:{SOCKET:"GRAPH_SOCKET"}},Ki={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var ti={};/*!
1
+ "use strict";require('./graph.css');var Mc=Object.defineProperty,Lc=Object.defineProperties;var Uc=Object.getOwnPropertyDescriptors;var yn=Object.getOwnPropertySymbols;var Ia=Object.prototype.hasOwnProperty,Ra=Object.prototype.propertyIsEnumerable;var lr=(e,r)=>(r=Symbol[e])?r:Symbol.for("Symbol."+e),$c=e=>{throw TypeError(e)},yt=Math.pow,Ci=(e,r,t)=>r in e?Mc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,fe=(e,r)=>{for(var t in r||(r={}))Ia.call(r,t)&&Ci(e,t,r[t]);if(yn)for(var t of yn(r))Ra.call(r,t)&&Ci(e,t,r[t]);return e},we=(e,r)=>Lc(e,Uc(r));var Oa=(e,r)=>{var t={};for(var n in e)Ia.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&yn)for(var n of yn(e))r.indexOf(n)<0&&Ra.call(e,n)&&(t[n]=e[n]);return t};var It=(e,r,t)=>Ci(e,typeof r!="symbol"?r+"":r,t);var Ne=(e,r,t)=>new Promise((n,l)=>{var o=h=>{try{u(t.next(h))}catch(s){l(s)}},a=h=>{try{u(t.throw(h))}catch(s){l(s)}},u=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,a);u((t=t.apply(e,r)).next())}),Ht=function(e,r){this[0]=e,this[1]=r},Si=(e,r,t)=>{var n=(a,u,h,s)=>{try{var i=t[a](u),p=(u=i.value)instanceof Ht,c=i.done;Promise.resolve(p?u[0]:u).then(f=>p?n(a==="return"?a:"next",u[1]?{done:f.done,value:f.value}:f,h,s):h({value:f,done:c})).catch(f=>n("throw",f,h,s))}catch(f){s(f)}},l=a=>o[a]=u=>new Promise((h,s)=>n(a,u,h,s)),o={};return t=t.apply(e,r),o[lr("asyncIterator")]=()=>o,l("next"),l("throw"),l("return"),o},Bi=e=>{var r=e[lr("asyncIterator")],t=!1,n,l={};return r==null?(r=e[lr("iterator")](),n=o=>l[o]=a=>r[o](a)):(r=r.call(e),n=o=>l[o]=a=>{if(t){if(t=!1,o==="throw")throw a;return a}return t=!0,{done:!1,value:new Ht(new Promise(u=>{var h=r[o](a);h instanceof Object||$c("Object expected"),u(h)}),1)}}),l[lr("iterator")]=()=>l,n("next"),"throw"in r?n("throw"):l.throw=o=>{throw o},"return"in r&&n("return"),l},Pa=(e,r,t)=>(r=e[lr("asyncIterator")])?r.call(e):(e=e[lr("iterator")](),r={},t=(n,l)=>(l=e[n])&&(r[n]=o=>new Promise((a,u,h)=>(o=l.call(e,o),h=o.done,Promise.resolve(o.value).then(s=>a({value:s,done:h}),u)))),t("next"),t("return"),r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("vue"),_r=require("lodash-es"),xu=require("@meta2d/utils"),Me=require("@meta2d/core"),qc=require("@meta2d/plugin-mind-core"),zc=require("@meta2d/plugin-mind-collapse"),jc=require("@meta2d/form-diagram"),Hc=require("@meta2d/class-diagram"),Vc=require("@meta2d/le5le-charts"),Na=require("@meta2d/flow-diagram"),ki=require("@meta2d/fta-diagram"),Ma=require("@meta2d/sequence-diagram"),La=require("@meta2d/activity-diagram");var be=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wc(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),t}var Tr=TypeError;const Gc={},Kc=Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"})),bu=Wc(Kc);var sa=typeof Map=="function"&&Map.prototype,Ti=Object.getOwnPropertyDescriptor&&sa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qn=sa&&Ti&&typeof Ti.get=="function"?Ti.get:null,Ua=sa&&Map.prototype.forEach,la=typeof Set=="function"&&Set.prototype,Fi=Object.getOwnPropertyDescriptor&&la?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,zn=la&&Fi&&typeof Fi.get=="function"?Fi.get:null,$a=la&&Set.prototype.forEach,Qc=typeof WeakMap=="function"&&WeakMap.prototype,$r=Qc?WeakMap.prototype.has:null,Yc=typeof WeakSet=="function"&&WeakSet.prototype,qr=Yc?WeakSet.prototype.has:null,Xc=typeof WeakRef=="function"&&WeakRef.prototype,qa=Xc?WeakRef.prototype.deref:null,Zc=Boolean.prototype.valueOf,Jc=Object.prototype.toString,ef=Function.prototype.toString,tf=String.prototype.match,ua=String.prototype.slice,Pt=String.prototype.replace,rf=String.prototype.toUpperCase,za=String.prototype.toLowerCase,wu=RegExp.prototype.test,ja=Array.prototype.concat,wt=Array.prototype.join,nf=Array.prototype.slice,Ha=Math.floor,qo=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Di=Object.getOwnPropertySymbols,zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Er=typeof Symbol=="function"&&typeof Symbol.iterator=="object",zr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Er||!0)?Symbol.toStringTag:null,_u=Object.prototype.propertyIsEnumerable,Va=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Wa(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||wu.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-Ha(-e):Ha(e);if(n!==e){var l=String(n),o=ua.call(r,l.length+1);return Pt.call(l,t,"$&_")+"."+Pt.call(Pt.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Pt.call(r,t,"$&_")}var jo=bu,Ga=jo.custom,Ka=Cu(Ga)?Ga:null,Eu={__proto__:null,double:'"',single:"'"},of={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Qn=function e(r,t,n,l){var o=t||{};if(St(o,"quoteStyle")&&!St(Eu,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(St(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=St(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(St(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(St(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=o.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Bu(r,o);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var h=String(r);return u?Wa(r,h):h}if(typeof r=="bigint"){var s=String(r)+"n";return u?Wa(r,s):s}var i=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=i&&i>0&&typeof r=="object")return Ho(r)?"[Array]":"[Object]";var p=Ef(o,n);if(typeof l=="undefined")l=[];else if(Su(l,r)>=0)return"[Circular]";function c(S,I,z){if(I&&(l=nf.call(l),l.push(I)),z){var V={depth:o.depth};return St(o,"quoteStyle")&&(V.quoteStyle=o.quoteStyle),e(S,V,n+1,l)}return e(S,o,n+1,l)}if(typeof r=="function"&&!Qa(r)){var f=pf(r),d=vn(r,c);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(d.length>0?" { "+wt.call(d,", ")+" }":"")}if(Cu(r)){var v=Er?Pt.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):zo.call(r);return typeof r=="object"&&!Er?Pr(v):v}if(bf(r)){for(var m="<"+za.call(String(r.nodeName)),b=r.attributes||[],g=0;g<b.length;g++)m+=" "+b[g].name+"="+Au(af(b[g].value),"double",o);return m+=">",r.childNodes&&r.childNodes.length&&(m+="..."),m+="</"+za.call(String(r.nodeName))+">",m}if(Ho(r)){if(r.length===0)return"[]";var y=vn(r,c);return p&&!_f(y)?"["+Vo(y,p)+"]":"[ "+wt.call(y,", ")+" ]"}if(lf(r)){var _=vn(r,c);return!("cause"in Error.prototype)&&"cause"in r&&!_u.call(r,"cause")?"{ ["+String(r)+"] "+wt.call(ja.call("[cause]: "+c(r.cause),_),", ")+" }":_.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+wt.call(_,", ")+" }"}if(typeof r=="object"&&a){if(Ka&&typeof r[Ka]=="function"&&jo)return jo(r,{depth:i-n});if(a!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(mf(r)){var T=[];return Ua&&Ua.call(r,function(S,I){T.push(c(I,r,!0)+" => "+c(S,r))}),Ya("Map",qn.call(r),T,p)}if(gf(r)){var D=[];return $a&&$a.call(r,function(S){D.push(c(S,r))}),Ya("Set",zn.call(r),D,p)}if(yf(r))return Ii("WeakMap");if(xf(r))return Ii("WeakSet");if(vf(r))return Ii("WeakRef");if(cf(r))return Pr(c(Number(r)));if(hf(r))return Pr(c(qo.call(r)));if(ff(r))return Pr(Zc.call(r));if(uf(r))return Pr(c(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof be!="undefined"&&r===be)return"{ [object globalThis] }";if(!sf(r)&&!Qa(r)){var F=vn(r,c),R=Va?Va(r)===Object.prototype:r instanceof Object||r.constructor===Object,X=r instanceof Object?"":"null prototype",H=!R&&zr&&Object(r)===r&&zr in r?ua.call(Mt(r),8,-1):X?"Object":"",E=R||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",A=E+(H||X?"["+wt.call(ja.call([],H||[],X||[]),": ")+"] ":"");return F.length===0?A+"{}":p?A+"{"+Vo(F,p)+"}":A+"{ "+wt.call(F,", ")+" }"}return String(r)};function Au(e,r,t){var n=t.quoteStyle||r,l=Eu[n];return l+e+l}function af(e){return Pt.call(String(e),/"/g,"&quot;")}function rr(e){return!zr||!(typeof e=="object"&&(zr in e||typeof e[zr]!="undefined"))}function Ho(e){return Mt(e)==="[object Array]"&&rr(e)}function sf(e){return Mt(e)==="[object Date]"&&rr(e)}function Qa(e){return Mt(e)==="[object RegExp]"&&rr(e)}function lf(e){return Mt(e)==="[object Error]"&&rr(e)}function uf(e){return Mt(e)==="[object String]"&&rr(e)}function cf(e){return Mt(e)==="[object Number]"&&rr(e)}function ff(e){return Mt(e)==="[object Boolean]"&&rr(e)}function Cu(e){if(Er)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!zo)return!1;try{return zo.call(e),!0}catch(r){}return!1}function hf(e){if(!e||typeof e!="object"||!qo)return!1;try{return qo.call(e),!0}catch(r){}return!1}var df=Object.prototype.hasOwnProperty||function(e){return e in this};function St(e,r){return df.call(e,r)}function Mt(e){return Jc.call(e)}function pf(e){if(e.name)return e.name;var r=tf.call(ef.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function Su(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function mf(e){if(!qn||!e||typeof e!="object")return!1;try{qn.call(e);try{zn.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function yf(e){if(!$r||!e||typeof e!="object")return!1;try{$r.call(e,$r);try{qr.call(e,qr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function vf(e){if(!qa||!e||typeof e!="object")return!1;try{return qa.call(e),!0}catch(r){}return!1}function gf(e){if(!zn||!e||typeof e!="object")return!1;try{zn.call(e);try{qn.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function xf(e){if(!qr||!e||typeof e!="object")return!1;try{qr.call(e,qr);try{$r.call(e,$r)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function bf(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Bu(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Bu(ua.call(e,0,r.maxStringLength),r)+n}var l=of[r.quoteStyle||"single"];l.lastIndex=0;var o=Pt.call(Pt.call(e,l,"\\$1"),/[\x00-\x1f]/g,wf);return Au(o,"single",r)}function wf(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+rf.call(r.toString(16))}function Pr(e){return"Object("+e+")"}function Ii(e){return e+" { ? }"}function Ya(e,r,t,n){var l=n?Vo(t,n):wt.call(t,", ");return e+" ("+r+") {"+l+"}"}function _f(e){for(var r=0;r<e.length;r++)if(Su(e[r],`
2
+ `)>=0)return!1;return!0}function Ef(e,r){var t;if(e.indent===" ")t=" ";else if(typeof e.indent=="number"&&e.indent>0)t=wt.call(Array(e.indent+1)," ");else return null;return{base:t,prev:wt.call(Array(r+1),t)}}function Vo(e,r){if(e.length===0)return"";var t=`
3
+ `+r.prev+r.base;return t+wt.call(e,","+t)+`
4
+ `+r.prev}function vn(e,r){var t=Ho(e),n=[];if(t){n.length=e.length;for(var l=0;l<e.length;l++)n[l]=St(e,l)?r(e[l],e):""}var o=typeof Di=="function"?Di(e):[],a;if(Er){a={};for(var u=0;u<o.length;u++)a["$"+o[u]]=o[u]}for(var h in e)St(e,h)&&(t&&String(Number(h))===h&&h<e.length||Er&&a["$"+h]instanceof Symbol||(wu.call(/[^\w$]/,h)?n.push(r(h,e)+": "+r(e[h],e)):n.push(h+": "+r(e[h],e))));if(typeof Di=="function")for(var s=0;s<o.length;s++)_u.call(e,o[s])&&n.push("["+r(o[s])+"]: "+r(e[o[s]],e));return n}var Af=Qn,Cf=Tr,Yn=function(e,r,t){for(var n=e,l;(l=n.next)!=null;n=l)if(l.key===r)return n.next=l.next,t||(l.next=e.next,e.next=l),l},Sf=function(e,r){if(e){var t=Yn(e,r);return t&&t.value}},Bf=function(e,r,t){var n=Yn(e,r);n?n.value=t:e.next={key:r,next:e.next,value:t}},kf=function(e,r){return e?!!Yn(e,r):!1},Tf=function(e,r){if(e)return Yn(e,r,!0)},Ff=function(){var r,t={assert:function(n){if(!t.has(n))throw new Cf("Side channel does not contain "+Af(n))},delete:function(n){var l=r&&r.next,o=Tf(r,n);return o&&l&&l===o&&(r=void 0),!!o},get:function(n){return Sf(r,n)},has:function(n){return kf(r,n)},set:function(n,l){r||(r={next:void 0}),Bf(r,n,l)}};return t},ku=Object,Df=Error,If=EvalError,Rf=RangeError,Of=ReferenceError,Pf=SyntaxError,Nf=URIError,Mf=Math.abs,Lf=Math.floor,Uf=Math.max,$f=Math.min,qf=Math.pow,zf=Math.round,jf=Number.isNaN||function(r){return r!==r},Hf=jf,Vf=function(r){return Hf(r)||r===0?r:r<0?-1:1},Wf=Object.getOwnPropertyDescriptor,Dn=Wf;if(Dn)try{Dn([],"length")}catch(e){Dn=null}var Tu=Dn,In=Object.defineProperty||!1;if(In)try{In({},"a",{value:1})}catch(e){In=!1}var Gf=In,Ri,Xa;function Kf(){return Xa||(Xa=1,Ri=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var l=42;r[t]=l;for(var o in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var a=Object.getOwnPropertySymbols(r);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(r,t);if(u.value!==l||u.enumerable!==!0)return!1}return!0}),Ri}var Oi,Za;function Qf(){if(Za)return Oi;Za=1;var e=typeof Symbol!="undefined"&&Symbol,r=Kf();return Oi=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()},Oi}var Pi,Ja;function Fu(){return Ja||(Ja=1,Pi=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),Pi}var Ni,es;function Du(){if(es)return Ni;es=1;var e=ku;return Ni=e.getPrototypeOf||null,Ni}var Yf="Function.prototype.bind called on incompatible ",Xf=Object.prototype.toString,Zf=Math.max,Jf="[object Function]",ts=function(r,t){for(var n=[],l=0;l<r.length;l+=1)n[l]=r[l];for(var o=0;o<t.length;o+=1)n[o+r.length]=t[o];return n},eh=function(r,t){for(var n=[],l=t,o=0;l<r.length;l+=1,o+=1)n[o]=r[l];return n},th=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t},rh=function(r){var t=this;if(typeof t!="function"||Xf.apply(t)!==Jf)throw new TypeError(Yf+t);for(var n=eh(arguments,1),l,o=function(){if(this instanceof l){var i=t.apply(this,ts(n,arguments));return Object(i)===i?i:this}return t.apply(r,ts(n,arguments))},a=Zf(0,t.length-n.length),u=[],h=0;h<a;h++)u[h]="$"+h;if(l=Function("binder","return function ("+th(u,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var s=function(){};s.prototype=t.prototype,l.prototype=new s,s.prototype=null}return l},nh=rh,Xn=Function.prototype.bind||nh,ca=Function.prototype.call,Mi,rs;function Iu(){return rs||(rs=1,Mi=Function.prototype.apply),Mi}var ih=typeof Reflect!="undefined"&&Reflect&&Reflect.apply,oh=Xn,ah=Iu(),sh=ca,lh=ih,uh=lh||oh.call(sh,ah),ch=Xn,fh=Tr,hh=ca,dh=uh,Ru=function(r){if(r.length<1||typeof r[0]!="function")throw new fh("a function is required");return dh(ch,hh,r)},Li,ns;function ph(){if(ns)return Li;ns=1;var e=Ru,r=Tu,t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!t&&r&&r(Object.prototype,"__proto__"),l=Object,o=l.getPrototypeOf;return Li=n&&typeof n.get=="function"?e([n.get]):typeof o=="function"?function(u){return o(u==null?u:l(u))}:!1,Li}var Ui,is;function mh(){if(is)return Ui;is=1;var e=Fu(),r=Du(),t=ph();return Ui=e?function(l){return e(l)}:r?function(l){if(!l||typeof l!="object"&&typeof l!="function")throw new TypeError("getProto: not an object");return r(l)}:t?function(l){return t(l)}:null,Ui}var $i,os;function yh(){if(os)return $i;os=1;var e=Function.prototype.call,r=Object.prototype.hasOwnProperty,t=Xn;return $i=t.call(e,r),$i}var Ee,vh=ku,gh=Df,xh=If,bh=Rf,wh=Of,Ar=Pf,gr=Tr,_h=Nf,Eh=Mf,Ah=Lf,Ch=Uf,Sh=$f,Bh=qf,kh=zf,Th=Vf,Ou=Function,qi=function(e){try{return Ou('"use strict"; return ('+e+").constructor;")()}catch(r){}},Vr=Tu,Fh=Gf,zi=function(){throw new gr},Dh=Vr?function(){try{return arguments.callee,zi}catch(e){try{return Vr(arguments,"callee").get}catch(r){return zi}}}():zi,ur=Qf()(),je=mh(),Ih=Du(),Rh=Fu(),Pu=Iu(),Yr=ca,pr={},Oh=typeof Uint8Array=="undefined"||!je?Ee:je(Uint8Array),Yt={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Ee:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Ee:ArrayBuffer,"%ArrayIteratorPrototype%":ur&&je?je([][Symbol.iterator]()):Ee,"%AsyncFromSyncIteratorPrototype%":Ee,"%AsyncFunction%":pr,"%AsyncGenerator%":pr,"%AsyncGeneratorFunction%":pr,"%AsyncIteratorPrototype%":pr,"%Atomics%":typeof Atomics=="undefined"?Ee:Atomics,"%BigInt%":typeof BigInt=="undefined"?Ee:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Ee:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Ee:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Ee:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":gh,"%eval%":eval,"%EvalError%":xh,"%Float16Array%":typeof Float16Array=="undefined"?Ee:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Ee:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Ee:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Ee:FinalizationRegistry,"%Function%":Ou,"%GeneratorFunction%":pr,"%Int8Array%":typeof Int8Array=="undefined"?Ee:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Ee:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Ee:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ur&&je?je(je([][Symbol.iterator]())):Ee,"%JSON%":typeof JSON=="object"?JSON:Ee,"%Map%":typeof Map=="undefined"?Ee:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ur||!je?Ee:je(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":vh,"%Object.getOwnPropertyDescriptor%":Vr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Ee:Promise,"%Proxy%":typeof Proxy=="undefined"?Ee:Proxy,"%RangeError%":bh,"%ReferenceError%":wh,"%Reflect%":typeof Reflect=="undefined"?Ee:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Ee:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ur||!je?Ee:je(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Ee:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ur&&je?je(""[Symbol.iterator]()):Ee,"%Symbol%":ur?Symbol:Ee,"%SyntaxError%":Ar,"%ThrowTypeError%":Dh,"%TypedArray%":Oh,"%TypeError%":gr,"%Uint8Array%":typeof Uint8Array=="undefined"?Ee:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Ee:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Ee:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Ee:Uint32Array,"%URIError%":_h,"%WeakMap%":typeof WeakMap=="undefined"?Ee:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Ee:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Ee:WeakSet,"%Function.prototype.call%":Yr,"%Function.prototype.apply%":Pu,"%Object.defineProperty%":Fh,"%Object.getPrototypeOf%":Ih,"%Math.abs%":Eh,"%Math.floor%":Ah,"%Math.max%":Ch,"%Math.min%":Sh,"%Math.pow%":Bh,"%Math.round%":kh,"%Math.sign%":Th,"%Reflect.getPrototypeOf%":Rh};if(je)try{null.error}catch(e){var Ph=je(je(e));Yt["%Error.prototype%"]=Ph}var Nh=function e(r){var t;if(r==="%AsyncFunction%")t=qi("async function () {}");else if(r==="%GeneratorFunction%")t=qi("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=qi("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var l=e("%AsyncGenerator%");l&&je&&(t=je(l.prototype))}return Yt[r]=t,t},as={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Xr=Xn,jn=yh(),Mh=Xr.call(Yr,Array.prototype.concat),Lh=Xr.call(Pu,Array.prototype.splice),ss=Xr.call(Yr,String.prototype.replace),Hn=Xr.call(Yr,String.prototype.slice),Uh=Xr.call(Yr,RegExp.prototype.exec),$h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qh=/\\(\\)?/g,zh=function(r){var t=Hn(r,0,1),n=Hn(r,-1);if(t==="%"&&n!=="%")throw new Ar("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Ar("invalid intrinsic syntax, expected opening `%`");var l=[];return ss(r,$h,function(o,a,u,h){l[l.length]=u?ss(h,qh,"$1"):a||o}),l},jh=function(r,t){var n=r,l;if(jn(as,n)&&(l=as[n],n="%"+l[0]+"%"),jn(Yt,n)){var o=Yt[n];if(o===pr&&(o=Nh(n)),typeof o=="undefined"&&!t)throw new gr("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:l,name:n,value:o}}throw new Ar("intrinsic "+r+" does not exist!")},fa=function(r,t){if(typeof r!="string"||r.length===0)throw new gr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new gr('"allowMissing" argument must be a boolean');if(Uh(/^%?[^%]*%?$/,r)===null)throw new Ar("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=zh(r),l=n.length>0?n[0]:"",o=jh("%"+l+"%",t),a=o.name,u=o.value,h=!1,s=o.alias;s&&(l=s[0],Lh(n,Mh([0,1],s)));for(var i=1,p=!0;i<n.length;i+=1){var c=n[i],f=Hn(c,0,1),d=Hn(c,-1);if((f==='"'||f==="'"||f==="`"||d==='"'||d==="'"||d==="`")&&f!==d)throw new Ar("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(h=!0),l+="."+c,a="%"+l+"%",jn(Yt,a))u=Yt[a];else if(u!=null){if(!(c in u)){if(!t)throw new gr("base intrinsic for "+r+" exists, but the property is not available.");return}if(Vr&&i+1>=n.length){var v=Vr(u,c);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?u=v.get:u=u[c]}else p=jn(u,c),u=u[c];p&&!h&&(Yt[a]=u)}}return u},Nu=fa,Mu=Ru,Hh=Mu([Nu("%String.prototype.indexOf%")]),Lu=function(r,t){var n=Nu(r,!!t);return typeof n=="function"&&Hh(r,".prototype.")>-1?Mu([n]):n},Vh=fa,Zr=Lu,Wh=Qn,Gh=Tr,ls=Vh("%Map%",!0),Kh=Zr("Map.prototype.get",!0),Qh=Zr("Map.prototype.set",!0),Yh=Zr("Map.prototype.has",!0),Xh=Zr("Map.prototype.delete",!0),Zh=Zr("Map.prototype.size",!0),Uu=!!ls&&function(){var r,t={assert:function(n){if(!t.has(n))throw new Gh("Side channel does not contain "+Wh(n))},delete:function(n){if(r){var l=Xh(r,n);return Zh(r)===0&&(r=void 0),l}return!1},get:function(n){if(r)return Kh(r,n)},has:function(n){return r?Yh(r,n):!1},set:function(n,l){r||(r=new ls),Qh(r,n,l)}};return t},Jh=fa,Zn=Lu,ed=Qn,gn=Uu,td=Tr,cr=Jh("%WeakMap%",!0),rd=Zn("WeakMap.prototype.get",!0),nd=Zn("WeakMap.prototype.set",!0),id=Zn("WeakMap.prototype.has",!0),od=Zn("WeakMap.prototype.delete",!0),ad=cr?function(){var r,t,n={assert:function(l){if(!n.has(l))throw new td("Side channel does not contain "+ed(l))},delete:function(l){if(cr&&l&&(typeof l=="object"||typeof l=="function")){if(r)return od(r,l)}else if(gn&&t)return t.delete(l);return!1},get:function(l){return cr&&l&&(typeof l=="object"||typeof l=="function")&&r?rd(r,l):t&&t.get(l)},has:function(l){return cr&&l&&(typeof l=="object"||typeof l=="function")&&r?id(r,l):!!t&&t.has(l)},set:function(l,o){cr&&l&&(typeof l=="object"||typeof l=="function")?(r||(r=new cr),nd(r,l,o)):gn&&(t||(t=gn()),t.set(l,o))}};return n}:gn,sd=Tr,ld=Qn,ud=Ff,cd=Uu,fd=ad,hd=fd||cd||ud,$u=function(){var r,t={assert:function(n){if(!t.has(n))throw new sd("Side channel does not contain "+ld(n))},delete:function(n){return!!r&&r.delete(n)},get:function(n){return r&&r.get(n)},has:function(n){return!!r&&r.has(n)},set:function(n,l){r||(r=hd()),r.set(n,l)}};return t},dd=String.prototype.replace,pd=/%20/g,ji={RFC1738:"RFC1738",RFC3986:"RFC3986"},ha={default:ji.RFC3986,formatters:{RFC1738:function(e){return dd.call(e,pd,"+")},RFC3986:function(e){return String(e)}},RFC1738:ji.RFC1738,RFC3986:ji.RFC3986},md=ha,yd=$u,Hi=Object.prototype.hasOwnProperty,Wt=Array.isArray,Jn=yd(),yr=function(r,t){return Jn.set(r,t),r},Gt=function(r){return Jn.has(r)},Mr=function(r){return Jn.get(r)},Wo=function(r,t){Jn.set(r,t)},vt=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),vd=function(r){for(;r.length>1;){var t=r.pop(),n=t.obj[t.prop];if(Wt(n)){for(var l=[],o=0;o<n.length;++o)typeof n[o]!="undefined"&&(l[l.length]=n[o]);t.obj[t.prop]=l}}},jr=function(r,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},l=0;l<r.length;++l)typeof r[l]!="undefined"&&(n[l]=r[l]);return n},gd=function e(r,t,n){if(!t)return r;if(typeof t!="object"&&typeof t!="function"){if(Wt(r)){var l=r.length;if(n&&typeof n.arrayLimit=="number"&&l>n.arrayLimit)return yr(jr(r.concat(t),n),l);r[l]=t}else if(r&&typeof r=="object")if(Gt(r)){var o=Mr(r)+1;r[o]=t,Wo(r,o)}else{if(n&&n.strictMerge)return[r,t];(n&&(n.plainObjects||n.allowPrototypes)||!Hi.call(Object.prototype,t))&&(r[t]=!0)}else return[r,t];return r}if(!r||typeof r!="object"){if(Gt(t)){for(var a=Object.keys(t),u=n&&n.plainObjects?{__proto__:null,0:r}:{0:r},h=0;h<a.length;h++){var s=parseInt(a[h],10);u[s+1]=t[a[h]]}return yr(u,Mr(t)+1)}var i=[r].concat(t);return n&&typeof n.arrayLimit=="number"&&i.length>n.arrayLimit?yr(jr(i,n),i.length-1):i}var p=r;return Wt(r)&&!Wt(t)&&(p=jr(r,n)),Wt(r)&&Wt(t)?(t.forEach(function(c,f){if(Hi.call(r,f)){var d=r[f];d&&typeof d=="object"&&c&&typeof c=="object"?r[f]=e(d,c,n):r[r.length]=c}else r[f]=c}),r):Object.keys(t).reduce(function(c,f){var d=t[f];if(Hi.call(c,f)?c[f]=e(c[f],d,n):c[f]=d,Gt(t)&&!Gt(c)&&yr(c,Mr(t)),Gt(c)){var v=parseInt(f,10);String(v)===f&&v>=0&&v>Mr(c)&&Wo(c,v)}return c},p)},xd=function(r,t){return Object.keys(t).reduce(function(n,l){return n[l]=t[l],n},r)},bd=function(e,r,t){var n=e.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(l){return n}},Vi=1024,wd=function(r,t,n,l,o){if(r.length===0)return r;var a=r;if(typeof r=="symbol"?a=Symbol.prototype.toString.call(r):typeof r!="string"&&(a=String(r)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var u="",h=0;h<a.length;h+=Vi){for(var s=a.length>=Vi?a.slice(h,h+Vi):a,i=[],p=0;p<s.length;++p){var c=s.charCodeAt(p);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===md.RFC1738&&(c===40||c===41)){i[i.length]=s.charAt(p);continue}if(c<128){i[i.length]=vt[c];continue}if(c<2048){i[i.length]=vt[192|c>>6]+vt[128|c&63];continue}if(c<55296||c>=57344){i[i.length]=vt[224|c>>12]+vt[128|c>>6&63]+vt[128|c&63];continue}p+=1,c=65536+((c&1023)<<10|s.charCodeAt(p)&1023),i[i.length]=vt[240|c>>18]+vt[128|c>>12&63]+vt[128|c>>6&63]+vt[128|c&63]}u+=i.join("")}return u},_d=function(r){for(var t=[{obj:{o:r},prop:"o"}],n=[],l=0;l<t.length;++l)for(var o=t[l],a=o.obj[o.prop],u=Object.keys(a),h=0;h<u.length;++h){var s=u[h],i=a[s];typeof i=="object"&&i!==null&&n.indexOf(i)===-1&&(t[t.length]={obj:a,prop:s},n[n.length]=i)}return vd(t),r},Ed=function(r){return Object.prototype.toString.call(r)==="[object RegExp]"},Ad=function(r){return!r||typeof r!="object"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))},Cd=function(r,t,n,l){if(Gt(r)){var o=Mr(r)+1;return r[o]=t,Wo(r,o),r}var a=[].concat(r,t);return a.length>n?yr(jr(a,{plainObjects:l}),a.length-1):a},Sd=function(r,t){if(Wt(r)){for(var n=[],l=0;l<r.length;l+=1)n[n.length]=t(r[l]);return n}return t(r)},qu={arrayToObject:jr,assign:xd,combine:Cd,compact:_d,decode:bd,encode:wd,isBuffer:Ad,isOverflow:Gt,isRegExp:Ed,markOverflow:yr,maybeMap:Sd,merge:gd},zu=$u,Rn=qu,Hr=ha,Bd=Object.prototype.hasOwnProperty,ju={brackets:function(r){return r+"[]"},comma:"comma",indices:function(r,t){return r+"["+t+"]"},repeat:function(r){return r}},bt=Array.isArray,kd=Array.prototype.push,Hu=function(e,r){kd.apply(e,bt(r)?r:[r])},Td=Date.prototype.toISOString,us=Hr.default,Le={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Rn.encode,encodeValuesOnly:!1,filter:void 0,format:us,formatter:Hr.formatters[us],indices:!1,serializeDate:function(r){return Td.call(r)},skipNulls:!1,strictNullHandling:!1},Fd=function(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="symbol"||typeof r=="bigint"},Wi={},Dd=function e(r,t,n,l,o,a,u,h,s,i,p,c,f,d,v,m,b,g){for(var y=r,_=g,T=0,D=!1;(_=_.get(Wi))!==void 0&&!D;){var F=_.get(r);if(T+=1,typeof F!="undefined"){if(F===T)throw new RangeError("Cyclic object value");D=!0}typeof _.get(Wi)=="undefined"&&(T=0)}if(typeof i=="function"?y=i(t,y):y instanceof Date?y=f(y):n==="comma"&&bt(y)&&(y=Rn.maybeMap(y,function(G){return G instanceof Date?f(G):G})),y===null){if(a)return s&&!m?s(t,Le.encoder,b,"key",d):t;y=""}if(Fd(y)||Rn.isBuffer(y)){if(s){var R=m?t:s(t,Le.encoder,b,"key",d);return[v(R)+"="+v(s(y,Le.encoder,b,"value",d))]}return[v(t)+"="+v(String(y))]}var X=[];if(typeof y=="undefined")return X;var H;if(n==="comma"&&bt(y))m&&s&&(y=Rn.maybeMap(y,s)),H=[{value:y.length>0?y.join(",")||null:void 0}];else if(bt(i))H=i;else{var E=Object.keys(y);H=p?E.sort(p):E}var A=h?String(t).replace(/\./g,"%2E"):String(t),S=l&&bt(y)&&y.length===1?A+"[]":A;if(o&&bt(y)&&y.length===0)return S+"[]";for(var I=0;I<H.length;++I){var z=H[I],V=typeof z=="object"&&z&&typeof z.value!="undefined"?z.value:y[z];if(!(u&&V===null)){var te=c&&h?String(z).replace(/\./g,"%2E"):String(z),W=bt(y)?typeof n=="function"?n(S,te):S:S+(c?"."+te:"["+te+"]");g.set(r,T);var q=zu();q.set(Wi,g),Hu(X,e(V,W,n,l,o,a,u,h,n==="comma"&&m&&bt(y)?null:s,i,p,c,f,d,v,m,b,q))}}return X},Id=function(r){if(!r)return Le;if(typeof r.allowEmptyArrays!="undefined"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.encodeDotInKeys!="undefined"&&typeof r.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(r.encoder!==null&&typeof r.encoder!="undefined"&&typeof r.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=r.charset||Le.charset;if(typeof r.charset!="undefined"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Hr.default;if(typeof r.format!="undefined"){if(!Bd.call(Hr.formatters,r.format))throw new TypeError("Unknown format option provided.");n=r.format}var l=Hr.formatters[n],o=Le.filter;(typeof r.filter=="function"||bt(r.filter))&&(o=r.filter);var a;if(r.arrayFormat in ju?a=r.arrayFormat:"indices"in r?a=r.indices?"indices":"repeat":a=Le.arrayFormat,"commaRoundTrip"in r&&typeof r.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof r.allowDots=="undefined"?r.encodeDotInKeys===!0?!0:Le.allowDots:!!r.allowDots;return{addQueryPrefix:typeof r.addQueryPrefix=="boolean"?r.addQueryPrefix:Le.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:Le.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:Le.charsetSentinel,commaRoundTrip:!!r.commaRoundTrip,delimiter:typeof r.delimiter=="undefined"?Le.delimiter:r.delimiter,encode:typeof r.encode=="boolean"?r.encode:Le.encode,encodeDotInKeys:typeof r.encodeDotInKeys=="boolean"?r.encodeDotInKeys:Le.encodeDotInKeys,encoder:typeof r.encoder=="function"?r.encoder:Le.encoder,encodeValuesOnly:typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:Le.encodeValuesOnly,filter:o,format:n,formatter:l,serializeDate:typeof r.serializeDate=="function"?r.serializeDate:Le.serializeDate,skipNulls:typeof r.skipNulls=="boolean"?r.skipNulls:Le.skipNulls,sort:typeof r.sort=="function"?r.sort:null,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:Le.strictNullHandling}},Rd=function(e,r){var t=e,n=Id(r),l,o;typeof n.filter=="function"?(o=n.filter,t=o("",t)):bt(n.filter)&&(o=n.filter,l=o);var a=[];if(typeof t!="object"||t===null)return"";var u=ju[n.arrayFormat],h=u==="comma"&&n.commaRoundTrip;l||(l=Object.keys(t)),n.sort&&l.sort(n.sort);for(var s=zu(),i=0;i<l.length;++i){var p=l[i],c=t[p];n.skipNulls&&c===null||Hu(a,Dd(c,p,u,h,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,s))}var f=a.join(n.delimiter),d=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),f.length>0?d+f:""},Et=qu,On=Object.prototype.hasOwnProperty,Gi=Array.isArray,Ie={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Et.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},Od=function(e){return e.replace(/&#(\d+);/g,function(r,t){return String.fromCharCode(parseInt(t,10))})},Vu=function(e,r,t){if(e&&typeof e=="string"&&r.comma&&e.indexOf(",")>-1)return e.split(",");if(r.throwOnLimitExceeded&&t>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");return e},Pd="utf8=%26%2310003%3B",Nd="utf8=%E2%9C%93",Md=function(r,t){var n={__proto__:null},l=t.ignoreQueryPrefix?r.replace(/^\?/,""):r;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=l.split(t.delimiter,t.throwOnLimitExceeded&&typeof o!="undefined"?o+1:o);if(t.throwOnLimitExceeded&&typeof o!="undefined"&&a.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(o===1?"":"s")+" allowed.");var u=-1,h,s=t.charset;if(t.charsetSentinel)for(h=0;h<a.length;++h)a[h].indexOf("utf8=")===0&&(a[h]===Nd?s="utf-8":a[h]===Pd&&(s="iso-8859-1"),u=h,h=a.length);for(h=0;h<a.length;++h)if(h!==u){var i=a[h],p=i.indexOf("]="),c=p===-1?i.indexOf("="):p+1,f,d;if(c===-1?(f=t.decoder(i,Ie.decoder,s,"key"),d=t.strictNullHandling?null:""):(f=t.decoder(i.slice(0,c),Ie.decoder,s,"key"),f!==null&&(d=Et.maybeMap(Vu(i.slice(c+1),t,Gi(n[f])?n[f].length:0),function(m){return t.decoder(m,Ie.decoder,s,"value")}))),d&&t.interpretNumericEntities&&s==="iso-8859-1"&&(d=Od(String(d))),i.indexOf("[]=")>-1&&(d=Gi(d)?[d]:d),t.comma&&Gi(d)&&d.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");d=Et.combine([],d,t.arrayLimit,t.plainObjects)}if(f!==null){var v=On.call(n,f);v&&(t.duplicates==="combine"||i.indexOf("[]=")>-1)?n[f]=Et.combine(n[f],d,t.arrayLimit,t.plainObjects):(!v||t.duplicates==="last")&&(n[f]=d)}}return n},Ld=function(e,r,t,n){var l=0;if(e.length>0&&e[e.length-1]==="[]"){var o=e.slice(0,-1).join("");l=Array.isArray(r)&&r[o]?r[o].length:0}for(var a=n?r:Vu(r,t,l),u=e.length-1;u>=0;--u){var h,s=e[u];if(s==="[]"&&t.parseArrays)Et.isOverflow(a)?h=a:h=t.allowEmptyArrays&&(a===""||t.strictNullHandling&&a===null)?[]:Et.combine([],a,t.arrayLimit,t.plainObjects);else{h=t.plainObjects?{__proto__:null}:{};var i=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,p=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,c=parseInt(p,10),f=!isNaN(c)&&s!==p&&String(c)===p&&c>=0&&t.parseArrays;if(!t.parseArrays&&p==="")h={0:a};else if(f&&c<t.arrayLimit)h=[],h[c]=a;else{if(f&&t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");f?(h[c]=a,Et.markOverflow(h,c)):p!=="__proto__"&&(h[p]=a)}}a=h}return a},Ud=function(r,t){var n=t.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r;if(t.depth<=0)return!t.plainObjects&&On.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var l=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,a=l.exec(n),u=a?n.slice(0,a.index):n,h=[];if(u){if(!t.plainObjects&&On.call(Object.prototype,u)&&!t.allowPrototypes)return;h[h.length]=u}for(var s=0;(a=o.exec(n))!==null&&s<t.depth;){s+=1;var i=a[1].slice(1,-1);if(!t.plainObjects&&On.call(Object.prototype,i)&&!t.allowPrototypes)return;h[h.length]=a[1]}if(a){if(t.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");h[h.length]="["+n.slice(a.index)+"]"}return h},$d=function(r,t,n,l){if(r){var o=Ud(r,n);if(o)return Ld(o,t,n,l)}},qd=function(r){if(!r)return Ie;if(typeof r.allowEmptyArrays!="undefined"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.decodeDotInKeys!="undefined"&&typeof r.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(r.decoder!==null&&typeof r.decoder!="undefined"&&typeof r.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof r.charset!="undefined"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof r.throwOnLimitExceeded!="undefined"&&typeof r.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=typeof r.charset=="undefined"?Ie.charset:r.charset,n=typeof r.duplicates=="undefined"?Ie.duplicates:r.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var l=typeof r.allowDots=="undefined"?r.decodeDotInKeys===!0?!0:Ie.allowDots:!!r.allowDots;return{allowDots:l,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:Ie.allowEmptyArrays,allowPrototypes:typeof r.allowPrototypes=="boolean"?r.allowPrototypes:Ie.allowPrototypes,allowSparse:typeof r.allowSparse=="boolean"?r.allowSparse:Ie.allowSparse,arrayLimit:typeof r.arrayLimit=="number"?r.arrayLimit:Ie.arrayLimit,charset:t,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:Ie.charsetSentinel,comma:typeof r.comma=="boolean"?r.comma:Ie.comma,decodeDotInKeys:typeof r.decodeDotInKeys=="boolean"?r.decodeDotInKeys:Ie.decodeDotInKeys,decoder:typeof r.decoder=="function"?r.decoder:Ie.decoder,delimiter:typeof r.delimiter=="string"||Et.isRegExp(r.delimiter)?r.delimiter:Ie.delimiter,depth:typeof r.depth=="number"||r.depth===!1?+r.depth:Ie.depth,duplicates:n,ignoreQueryPrefix:r.ignoreQueryPrefix===!0,interpretNumericEntities:typeof r.interpretNumericEntities=="boolean"?r.interpretNumericEntities:Ie.interpretNumericEntities,parameterLimit:typeof r.parameterLimit=="number"?r.parameterLimit:Ie.parameterLimit,parseArrays:r.parseArrays!==!1,plainObjects:typeof r.plainObjects=="boolean"?r.plainObjects:Ie.plainObjects,strictDepth:typeof r.strictDepth=="boolean"?!!r.strictDepth:Ie.strictDepth,strictMerge:typeof r.strictMerge=="boolean"?!!r.strictMerge:Ie.strictMerge,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:Ie.strictNullHandling,throwOnLimitExceeded:typeof r.throwOnLimitExceeded=="boolean"?r.throwOnLimitExceeded:!1}},zd=function(e,r){var t=qd(r);if(e===""||e===null||typeof e=="undefined")return t.plainObjects?{__proto__:null}:{};for(var n=typeof e=="string"?Md(e,t):e,l=t.plainObjects?{__proto__:null}:{},o=Object.keys(n),a=0;a<o.length;++a){var u=o[a],h=$d(u,n[u],t,typeof e=="string");l=Et.merge(l,h,t)}return t.allowSparse===!0?l:Et.compact(l)},jd=Rd,Hd=zd,Vd=ha,Wd={formats:Vd,parse:Hd,stringify:jd};const Gd=aa(Wd);function Wu(e,r){return function(){return e.apply(r,arguments)}}const{toString:Kd}=Object.prototype,{getPrototypeOf:ei}=Object,{iterator:ti,toStringTag:Gu}=Symbol,ri=(e=>r=>{const t=Kd.call(r);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),pt=e=>(e=e.toLowerCase(),r=>ri(r)===e),ni=e=>r=>typeof r===e,{isArray:Fr}=Array,Cr=ni("undefined");function Jr(e){return e!==null&&!Cr(e)&&e.constructor!==null&&!Cr(e.constructor)&&tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ku=pt("ArrayBuffer");function Qd(e){let r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&Ku(e.buffer),r}const Yd=ni("string"),tt=ni("function"),Qu=ni("number"),en=e=>e!==null&&typeof e=="object",Xd=e=>e===!0||e===!1,Pn=e=>{if(ri(e)!=="object")return!1;const r=ei(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Gu in e)&&!(ti in e)},Zd=e=>{if(!en(e)||Jr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(r){return!1}},Jd=pt("Date"),ep=pt("File"),tp=e=>!!(e&&typeof e.uri!="undefined"),rp=e=>e&&typeof e.getParts!="undefined",np=pt("Blob"),ip=pt("FileList"),op=e=>en(e)&&tt(e.pipe);function ap(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const cs=ap(),fs=typeof cs.FormData!="undefined"?cs.FormData:void 0,sp=e=>{if(!e)return!1;if(fs&&e instanceof fs)return!0;const r=ei(e);if(!r||r===Object.prototype||!tt(e.append))return!1;const t=ri(e);return t==="formdata"||t==="object"&&tt(e.toString)&&e.toString()==="[object FormData]"},lp=pt("URLSearchParams"),[up,cp,fp,hp]=["ReadableStream","Request","Response","Headers"].map(pt),dp=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tn(e,r,{allOwnKeys:t=!1}={}){if(e===null||typeof e=="undefined")return;let n,l;if(typeof e!="object"&&(e=[e]),Fr(e))for(n=0,l=e.length;n<l;n++)r.call(null,e[n],n,e);else{if(Jr(e))return;const o=t?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let u;for(n=0;n<a;n++)u=o[n],r.call(null,e[u],u,e)}}function Yu(e,r){if(Jr(e))return null;r=r.toLowerCase();const t=Object.keys(e);let n=t.length,l;for(;n-- >0;)if(l=t[n],r===l.toLowerCase())return l;return null}const Kt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Xu=e=>!Cr(e)&&e!==Kt;function Go(...e){const{caseless:r,skipUndefined:t}=Xu(this)&&this||{},n={},l=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=r&&Yu(n,a)||a,h=Ko(n,u)?n[u]:void 0;Pn(h)&&Pn(o)?n[u]=Go(h,o):Pn(o)?n[u]=Go({},o):Fr(o)?n[u]=o.slice():(!t||!Cr(o))&&(n[u]=o)};for(let o=0,a=e.length;o<a;o++)e[o]&&tn(e[o],l);return n}const pp=(e,r,t,{allOwnKeys:n}={})=>(tn(r,(l,o)=>{t&&tt(l)?Object.defineProperty(e,o,{__proto__:null,value:Wu(l,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),mp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yp=(e,r,t,n)=>{e.prototype=Object.create(r.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:r.prototype}),t&&Object.assign(e.prototype,t)},vp=(e,r,t,n)=>{let l,o,a;const u={};if(r=r||{},e==null)return r;do{for(l=Object.getOwnPropertyNames(e),o=l.length;o-- >0;)a=l[o],(!n||n(a,e,r))&&!u[a]&&(r[a]=e[a],u[a]=!0);e=t!==!1&&ei(e)}while(e&&(!t||t(e,r))&&e!==Object.prototype);return r},gp=(e,r,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=r.length;const n=e.indexOf(r,t);return n!==-1&&n===t},xp=e=>{if(!e)return null;if(Fr(e))return e;let r=e.length;if(!Qu(r))return null;const t=new Array(r);for(;r-- >0;)t[r]=e[r];return t},bp=(e=>r=>e&&r instanceof e)(typeof Uint8Array!="undefined"&&ei(Uint8Array)),wp=(e,r)=>{const n=(e&&e[ti]).call(e);let l;for(;(l=n.next())&&!l.done;){const o=l.value;r.call(e,o[0],o[1])}},_p=(e,r)=>{let t;const n=[];for(;(t=e.exec(r))!==null;)n.push(t);return n},Ep=pt("HTMLFormElement"),Ap=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,l){return n.toUpperCase()+l}),Ko=(({hasOwnProperty:e})=>(r,t)=>e.call(r,t))(Object.prototype),Cp=pt("RegExp"),Zu=(e,r)=>{const t=Object.getOwnPropertyDescriptors(e),n={};tn(t,(l,o)=>{let a;(a=r(l,o,e))!==!1&&(n[o]=a||l)}),Object.defineProperties(e,n)},Sp=e=>{Zu(e,(r,t)=>{if(tt(e)&&["arguments","caller","callee"].includes(t))return!1;const n=e[t];if(tt(n)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Bp=(e,r)=>{const t={},n=l=>{l.forEach(o=>{t[o]=!0})};return Fr(e)?n(e):n(String(e).split(r)),t},kp=()=>{},Tp=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function Fp(e){return!!(e&&tt(e.append)&&e[Gu]==="FormData"&&e[ti])}const Dp=e=>{const r=new Array(10),t=(n,l)=>{if(en(n)){if(r.indexOf(n)>=0)return;if(Jr(n))return n;if(!("toJSON"in n)){r[l]=n;const o=Fr(n)?[]:{};return tn(n,(a,u)=>{const h=t(a,l+1);!Cr(h)&&(o[u]=h)}),r[l]=void 0,o}}return n};return t(e,0)},Ip=pt("AsyncFunction"),Rp=e=>e&&(en(e)||tt(e))&&tt(e.then)&&tt(e.catch),Ju=((e,r)=>e?setImmediate:r?((t,n)=>(Kt.addEventListener("message",({source:l,data:o})=>{l===Kt&&o===t&&n.length&&n.shift()()},!1),l=>{n.push(l),Kt.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",tt(Kt.postMessage)),Op=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Kt):typeof process!="undefined"&&process.nextTick||Ju,Pp=e=>e!=null&&tt(e[ti]),le={isArray:Fr,isArrayBuffer:Ku,isBuffer:Jr,isFormData:sp,isArrayBufferView:Qd,isString:Yd,isNumber:Qu,isBoolean:Xd,isObject:en,isPlainObject:Pn,isEmptyObject:Zd,isReadableStream:up,isRequest:cp,isResponse:fp,isHeaders:hp,isUndefined:Cr,isDate:Jd,isFile:ep,isReactNativeBlob:tp,isReactNative:rp,isBlob:np,isRegExp:Cp,isFunction:tt,isStream:op,isURLSearchParams:lp,isTypedArray:bp,isFileList:ip,forEach:tn,merge:Go,extend:pp,trim:dp,stripBOM:mp,inherits:yp,toFlatObject:vp,kindOf:ri,kindOfTest:pt,endsWith:gp,toArray:xp,forEachEntry:wp,matchAll:_p,isHTMLForm:Ep,hasOwnProperty:Ko,hasOwnProp:Ko,reduceDescriptors:Zu,freezeMethods:Sp,toObjectSet:Bp,toCamelCase:Ap,noop:kp,toFiniteNumber:Tp,findKey:Yu,global:Kt,isContextDefined:Xu,isSpecCompliantForm:Fp,toJSONObject:Dp,isAsyncFn:Ip,isThenable:Rp,setImmediate:Ju,asap:Op,isIterable:Pp},Np=le.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mp=e=>{const r={};let t,n,l;return e&&e.split(`
5
+ `).forEach(function(a){l=a.indexOf(":"),t=a.substring(0,l).trim().toLowerCase(),n=a.substring(l+1).trim(),!(!t||r[t]&&Np[t])&&(t==="set-cookie"?r[t]?r[t].push(n):r[t]=[n]:r[t]=r[t]?r[t]+", "+n:n)}),r},hs=Symbol("internals"),Lp=/[^\x09\x20-\x7E\x80-\xFF]/g;function Up(e){let r=0,t=e.length;for(;r<t;){const n=e.charCodeAt(r);if(n!==9&&n!==32)break;r+=1}for(;t>r;){const n=e.charCodeAt(t-1);if(n!==9&&n!==32)break;t-=1}return r===0&&t===e.length?e:e.slice(r,t)}function Nr(e){return e&&String(e).trim().toLowerCase()}function $p(e){return Up(e.replace(Lp,""))}function Nn(e){return e===!1||e==null?e:le.isArray(e)?e.map(Nn):$p(String(e))}function qp(e){const r=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(e);)r[n[1]]=n[2];return r}const zp=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ki(e,r,t,n,l){if(le.isFunction(n))return n.call(this,r,t);if(l&&(r=t),!!le.isString(r)){if(le.isString(n))return r.indexOf(n)!==-1;if(le.isRegExp(n))return n.test(r)}}function jp(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,t,n)=>t.toUpperCase()+n)}function Hp(e,r){const t=le.toCamelCase(" "+r);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+t,{__proto__:null,value:function(l,o,a){return this[n].call(this,r,l,o,a)},configurable:!0})})}let Je=class{constructor(r){r&&this.set(r)}set(r,t,n){const l=this;function o(u,h,s){const i=Nr(h);if(!i)throw new Error("header name must be a non-empty string");const p=le.findKey(l,i);(!p||l[p]===void 0||s===!0||s===void 0&&l[p]!==!1)&&(l[p||h]=Nn(u))}const a=(u,h)=>le.forEach(u,(s,i)=>o(s,i,h));if(le.isPlainObject(r)||r instanceof this.constructor)a(r,t);else if(le.isString(r)&&(r=r.trim())&&!zp(r))a(Mp(r),t);else if(le.isObject(r)&&le.isIterable(r)){let u={},h,s;for(const i of r){if(!le.isArray(i))throw TypeError("Object iterator must return a key-value pair");u[s=i[0]]=(h=u[s])?le.isArray(h)?[...h,i[1]]:[h,i[1]]:i[1]}a(u,t)}else r!=null&&o(t,r,n);return this}get(r,t){if(r=Nr(r),r){const n=le.findKey(this,r);if(n){const l=this[n];if(!t)return l;if(t===!0)return qp(l);if(le.isFunction(t))return t.call(this,l,n);if(le.isRegExp(t))return t.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,t){if(r=Nr(r),r){const n=le.findKey(this,r);return!!(n&&this[n]!==void 0&&(!t||Ki(this,this[n],n,t)))}return!1}delete(r,t){const n=this;let l=!1;function o(a){if(a=Nr(a),a){const u=le.findKey(n,a);u&&(!t||Ki(n,n[u],u,t))&&(delete n[u],l=!0)}}return le.isArray(r)?r.forEach(o):o(r),l}clear(r){const t=Object.keys(this);let n=t.length,l=!1;for(;n--;){const o=t[n];(!r||Ki(this,this[o],o,r,!0))&&(delete this[o],l=!0)}return l}normalize(r){const t=this,n={};return le.forEach(this,(l,o)=>{const a=le.findKey(n,o);if(a){t[a]=Nn(l),delete t[o];return}const u=r?jp(o):String(o).trim();u!==o&&delete t[o],t[u]=Nn(l),n[u]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const t=Object.create(null);return le.forEach(this,(n,l)=>{n!=null&&n!==!1&&(t[l]=r&&le.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,t])=>r+": "+t).join(`
6
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...t){const n=new this(r);return t.forEach(l=>n.set(l)),n}static accessor(r){const n=(this[hs]=this[hs]={accessors:{}}).accessors,l=this.prototype;function o(a){const u=Nr(a);n[u]||(Hp(l,a),n[u]=!0)}return le.isArray(r)?r.forEach(o):o(r),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(Je.prototype,({value:e},r)=>{let t=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(n){this[t]=n}}});le.freezeMethods(Je);const Vp="[REDACTED ****]";function Wp(e){if(le.hasOwnProp(e,"toJSON"))return!0;let r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;){if(le.hasOwnProp(r,"toJSON"))return!0;r=Object.getPrototypeOf(r)}return!1}function Gp(e,r){const t=new Set(r.map(o=>String(o).toLowerCase())),n=[],l=o=>{if(o===null||typeof o!="object"||le.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof Je&&(o=o.toJSON()),n.push(o);let a;if(le.isArray(o))a=[],o.forEach((u,h)=>{const s=l(u);le.isUndefined(s)||(a[h]=s)});else{if(!le.isPlainObject(o)&&Wp(o))return n.pop(),o;a=Object.create(null);for(const[u,h]of Object.entries(o)){const s=t.has(u.toLowerCase())?Vp:l(h);le.isUndefined(s)||(a[u]=s)}}return n.pop(),a};return l(e)}let ge=class e0 extends Error{static from(r,t,n,l,o,a){const u=new e0(r.message,t||r.code,n,l,o);return u.cause=r,u.name=r.name,r.status!=null&&u.status==null&&(u.status=r.status),a&&Object.assign(u,a),u}constructor(r,t,n,l,o){super(r),Object.defineProperty(this,"message",{__proto__:null,value:r,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),l&&(this.request=l),o&&(this.response=o,this.status=o.status)}toJSON(){const r=this.config,t=r&&le.hasOwnProp(r,"redact")?r.redact:void 0,n=le.isArray(t)&&t.length>0?Gp(r,t):le.toJSONObject(r);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};ge.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ge.ERR_BAD_OPTION="ERR_BAD_OPTION";ge.ECONNABORTED="ECONNABORTED";ge.ETIMEDOUT="ETIMEDOUT";ge.ECONNREFUSED="ECONNREFUSED";ge.ERR_NETWORK="ERR_NETWORK";ge.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ge.ERR_DEPRECATED="ERR_DEPRECATED";ge.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ge.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ge.ERR_CANCELED="ERR_CANCELED";ge.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ge.ERR_INVALID_URL="ERR_INVALID_URL";ge.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Kp=null;function Qo(e){return le.isPlainObject(e)||le.isArray(e)}function t0(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function Qi(e,r,t){return e?e.concat(r).map(function(l,o){return l=t0(l),!t&&o?"["+l+"]":l}).join(t?".":""):r}function Qp(e){return le.isArray(e)&&!e.some(Qo)}const Yp=le.toFlatObject(le,{},null,function(r){return/^is[A-Z]/.test(r)});function ii(e,r,t){if(!le.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,t=le.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!le.isUndefined(b[m])});const n=t.metaTokens,l=t.visitor||p,o=t.dots,a=t.indexes,u=t.Blob||typeof Blob!="undefined"&&Blob,h=t.maxDepth===void 0?100:t.maxDepth,s=u&&le.isSpecCompliantForm(r);if(!le.isFunction(l))throw new TypeError("visitor must be a function");function i(v){if(v===null)return"";if(le.isDate(v))return v.toISOString();if(le.isBoolean(v))return v.toString();if(!s&&le.isBlob(v))throw new ge("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(v)||le.isTypedArray(v)?s&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function p(v,m,b){let g=v;if(le.isReactNative(r)&&le.isReactNativeBlob(v))return r.append(Qi(b,m,o),i(v)),!1;if(v&&!b&&typeof v=="object"){if(le.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(le.isArray(v)&&Qp(v)||(le.isFileList(v)||le.endsWith(m,"[]"))&&(g=le.toArray(v)))return m=t0(m),g.forEach(function(_,T){!(le.isUndefined(_)||_===null)&&r.append(a===!0?Qi([m],T,o):a===null?m:m+"[]",i(_))}),!1}return Qo(v)?!0:(r.append(Qi(b,m,o),i(v)),!1)}const c=[],f=Object.assign(Yp,{defaultVisitor:p,convertValue:i,isVisitable:Qo});function d(v,m,b=0){if(!le.isUndefined(v)){if(b>h)throw new ge("Object is too deeply nested ("+b+" levels). Max depth: "+h,ge.ERR_FORM_DATA_DEPTH_EXCEEDED);if(c.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(v),le.forEach(v,function(y,_){(!(le.isUndefined(y)||y===null)&&l.call(r,y,le.isString(_)?_.trim():_,m,f))===!0&&d(y,m?m.concat(_):[_],b+1)}),c.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return d(e),r}function ds(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return r[n]})}function da(e,r){this._pairs=[],e&&ii(e,this,r)}const r0=da.prototype;r0.append=function(r,t){this._pairs.push([r,t])};r0.toString=function(r){const t=r?function(n){return r.call(this,n,ds)}:ds;return this._pairs.map(function(l){return t(l[0])+"="+t(l[1])},"").join("&")};function Xp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function n0(e,r,t){if(!r)return e;const n=t&&t.encode||Xp,l=le.isFunction(t)?{serialize:t}:t,o=l&&l.serialize;let a;if(o?a=o(r,l):a=le.isURLSearchParams(r)?r.toString():new da(r,l).toString(n),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ps{constructor(){this.handlers=[]}use(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){le.forEach(this.handlers,function(n){n!==null&&r(n)})}}const pa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Zp=typeof URLSearchParams!="undefined"?URLSearchParams:da,Jp=typeof FormData!="undefined"?FormData:null,e1=typeof Blob!="undefined"?Blob:null,t1={isBrowser:!0,classes:{URLSearchParams:Zp,FormData:Jp,Blob:e1},protocols:["http","https","file","blob","url","data"]},ma=typeof window!="undefined"&&typeof document!="undefined",Yo=typeof navigator=="object"&&navigator||void 0,r1=ma&&(!Yo||["ReactNative","NativeScript","NS"].indexOf(Yo.product)<0),n1=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",i1=ma&&window.location.href||"http://localhost",o1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ma,hasStandardBrowserEnv:r1,hasStandardBrowserWebWorkerEnv:n1,navigator:Yo,origin:i1},Symbol.toStringTag,{value:"Module"})),Ke=fe(fe({},o1),t1);function a1(e,r){return ii(e,new Ke.classes.URLSearchParams,fe({visitor:function(t,n,l,o){return Ke.isNode&&le.isBuffer(t)?(this.append(n,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},r))}function s1(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function l1(e){const r={},t=Object.keys(e);let n;const l=t.length;let o;for(n=0;n<l;n++)o=t[n],r[o]=e[o];return r}function i0(e){function r(t,n,l,o){let a=t[o++];if(a==="__proto__")return!0;const u=Number.isFinite(+a),h=o>=t.length;return a=!a&&le.isArray(l)?l.length:a,h?(le.hasOwnProp(l,a)?l[a]=le.isArray(l[a])?l[a].concat(n):[l[a],n]:l[a]=n,!u):((!l[a]||!le.isObject(l[a]))&&(l[a]=[]),r(t,n,l[a],o)&&le.isArray(l[a])&&(l[a]=l1(l[a])),!u)}if(le.isFormData(e)&&le.isFunction(e.entries)){const t={};return le.forEachEntry(e,(n,l)=>{r(s1(n),l,t,0)}),t}return null}const fr=(e,r)=>e!=null&&le.hasOwnProp(e,r)?e[r]:void 0;function u1(e,r,t){if(le.isString(e))try{return(r||JSON.parse)(e),le.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}const rn={transitional:pa,adapter:["xhr","http","fetch"],transformRequest:[function(r,t){const n=t.getContentType()||"",l=n.indexOf("application/json")>-1,o=le.isObject(r);if(o&&le.isHTMLForm(r)&&(r=new FormData(r)),le.isFormData(r))return l?JSON.stringify(i0(r)):r;if(le.isArrayBuffer(r)||le.isBuffer(r)||le.isStream(r)||le.isFile(r)||le.isBlob(r)||le.isReadableStream(r))return r;if(le.isArrayBufferView(r))return r.buffer;if(le.isURLSearchParams(r))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let u;if(o){const h=fr(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return a1(r,h).toString();if((u=le.isFileList(r))||n.indexOf("multipart/form-data")>-1){const s=fr(this,"env"),i=s&&s.FormData;return ii(u?{"files[]":r}:r,i&&new i,h)}}return o||l?(t.setContentType("application/json",!1),u1(r)):r}],transformResponse:[function(r){const t=fr(this,"transitional")||rn.transitional,n=t&&t.forcedJSONParsing,l=fr(this,"responseType"),o=l==="json";if(le.isResponse(r)||le.isReadableStream(r))return r;if(r&&le.isString(r)&&(n&&!l||o)){const u=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(r,fr(this,"parseReviver"))}catch(h){if(u)throw h.name==="SyntaxError"?ge.from(h,ge.ERR_BAD_RESPONSE,this,null,fr(this,"response")):h}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch","query"],e=>{rn.headers[e]={}});function Yi(e,r){const t=this||rn,n=r||t,l=Je.from(n.headers);let o=n.data;return le.forEach(e,function(u){o=u.call(t,o,l.normalize(),r?r.status:void 0)}),l.normalize(),o}function o0(e){return!!(e&&e.__CANCEL__)}let nn=class extends ge{constructor(r,t,n){super(r==null?"canceled":r,ge.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function a0(e,r,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):r(new ge("Request failed with status code "+t.status,t.status>=400&&t.status<500?ge.ERR_BAD_REQUEST:ge.ERR_BAD_RESPONSE,t.config,t.request,t))}function c1(e){const r=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return r&&r[1]||""}function f1(e,r){e=e||10;const t=new Array(e),n=new Array(e);let l=0,o=0,a;return r=r!==void 0?r:1e3,function(h){const s=Date.now(),i=n[o];a||(a=s),t[l]=h,n[l]=s;let p=o,c=0;for(;p!==l;)c+=t[p++],p=p%e;if(l=(l+1)%e,l===o&&(o=(o+1)%e),s-a<r)return;const f=i&&s-i;return f?Math.round(c*1e3/f):void 0}}function h1(e,r){let t=0,n=1e3/r,l,o;const a=(s,i=Date.now())=>{t=i,l=null,o&&(clearTimeout(o),o=null),e(...s)};return[(...s)=>{const i=Date.now(),p=i-t;p>=n?a(s,i):(l=s,o||(o=setTimeout(()=>{o=null,a(l)},n-p)))},()=>l&&a(l)]}const Vn=(e,r,t=3)=>{let n=0;const l=f1(50,250);return h1(o=>{const a=o.loaded,u=o.lengthComputable?o.total:void 0,h=u!=null?Math.min(a,u):a,s=Math.max(0,h-n),i=l(s);n=Math.max(n,h);const p={loaded:h,total:u,progress:u?h/u:void 0,bytes:s,rate:i||void 0,estimated:i&&u?(u-h)/i:void 0,event:o,lengthComputable:u!=null,[r?"download":"upload"]:!0};e(p)},t)},ms=(e,r)=>{const t=e!=null;return[n=>r[0]({lengthComputable:t,total:e,loaded:n}),r[1]]},ys=e=>(...r)=>le.asap(()=>e(...r)),d1=Ke.hasStandardBrowserEnv?((e,r)=>t=>(t=new URL(t,Ke.origin),e.protocol===t.protocol&&e.host===t.host&&(r||e.port===t.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,p1=Ke.hasStandardBrowserEnv?{write(e,r,t,n,l,o,a){if(typeof document=="undefined")return;const u=[`${e}=${encodeURIComponent(r)}`];le.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),le.isString(n)&&u.push(`path=${n}`),le.isString(l)&&u.push(`domain=${l}`),o===!0&&u.push("secure"),le.isString(a)&&u.push(`SameSite=${a}`),document.cookie=u.join("; ")},read(e){if(typeof document=="undefined")return null;const r=document.cookie.split(";");for(let t=0;t<r.length;t++){const n=r[t].replace(/^\s+/,""),l=n.indexOf("=");if(l!==-1&&n.slice(0,l)===e)return decodeURIComponent(n.slice(l+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function m1(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function y1(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function s0(e,r,t){let n=!m1(r);return e&&(n||t===!1)?y1(e,r):r}const vs=e=>e instanceof Je?fe({},e):e;function Zt(e,r){r=r||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(s,i,p,c){return le.isPlainObject(s)&&le.isPlainObject(i)?le.merge.call({caseless:c},s,i):le.isPlainObject(i)?le.merge({},i):le.isArray(i)?i.slice():i}function l(s,i,p,c){if(le.isUndefined(i)){if(!le.isUndefined(s))return n(void 0,s,p,c)}else return n(s,i,p,c)}function o(s,i){if(!le.isUndefined(i))return n(void 0,i)}function a(s,i){if(le.isUndefined(i)){if(!le.isUndefined(s))return n(void 0,s)}else return n(void 0,i)}function u(s,i,p){if(le.hasOwnProp(r,p))return n(s,i);if(le.hasOwnProp(e,p))return n(void 0,s)}const h={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:u,headers:(s,i,p)=>l(vs(s),vs(i),p,!0)};return le.forEach(Object.keys(fe(fe({},e),r)),function(i){if(i==="__proto__"||i==="constructor"||i==="prototype")return;const p=le.hasOwnProp(h,i)?h[i]:l,c=le.hasOwnProp(e,i)?e[i]:void 0,f=le.hasOwnProp(r,i)?r[i]:void 0,d=p(c,f,i);le.isUndefined(d)&&p!==u||(t[i]=d)}),t}const v1=["content-type","content-length"];function g1(e,r,t){if(t!=="content-only"){e.set(r);return}Object.entries(r).forEach(([n,l])=>{v1.includes(n.toLowerCase())&&e.set(n,l)})}const x1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(r,t)=>String.fromCharCode(parseInt(t,16))),l0=e=>{const r=Zt({},e),t=c=>le.hasOwnProp(r,c)?r[c]:void 0,n=t("data");let l=t("withXSRFToken");const o=t("xsrfHeaderName"),a=t("xsrfCookieName");let u=t("headers");const h=t("auth"),s=t("baseURL"),i=t("allowAbsoluteUrls"),p=t("url");if(r.headers=u=Je.from(u),r.url=n0(s0(s,p,i),e.params,e.paramsSerializer),h&&u.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?x1(h.password):""))),le.isFormData(n)&&(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv?u.setContentType(void 0):le.isFunction(n.getHeaders)&&g1(u,n.getHeaders(),t("formDataHeaderPolicy"))),Ke.hasStandardBrowserEnv&&(le.isFunction(l)&&(l=l(r)),l===!0||l==null&&d1(r.url))){const f=o&&a&&p1.read(a);f&&u.set(o,f)}return r},b1=typeof XMLHttpRequest!="undefined",w1=b1&&function(e){return new Promise(function(t,n){const l=l0(e);let o=l.data;const a=Je.from(l.headers).normalize();let{responseType:u,onUploadProgress:h,onDownloadProgress:s}=l,i,p,c,f,d;function v(){f&&f(),d&&d(),l.cancelToken&&l.cancelToken.unsubscribe(i),l.signal&&l.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;m.open(l.method.toUpperCase(),l.url,!0),m.timeout=l.timeout;function b(){if(!m)return;const y=Je.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};a0(function(F){t(F),v()},function(F){n(F),v()},T),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(b)},m.onabort=function(){m&&(n(new ge("Request aborted",ge.ECONNABORTED,e,m)),v(),m=null)},m.onerror=function(_){const T=_&&_.message?_.message:"Network Error",D=new ge(T,ge.ERR_NETWORK,e,m);D.event=_||null,n(D),v(),m=null},m.ontimeout=function(){let _=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const T=l.transitional||pa;l.timeoutErrorMessage&&(_=l.timeoutErrorMessage),n(new ge(_,T.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,m)),v(),m=null},o===void 0&&a.setContentType(null),"setRequestHeader"in m&&le.forEach(a.toJSON(),function(_,T){m.setRequestHeader(T,_)}),le.isUndefined(l.withCredentials)||(m.withCredentials=!!l.withCredentials),u&&u!=="json"&&(m.responseType=l.responseType),s&&([c,d]=Vn(s,!0),m.addEventListener("progress",c)),h&&m.upload&&([p,f]=Vn(h),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",f)),(l.cancelToken||l.signal)&&(i=y=>{m&&(n(!y||y.type?new nn(null,e,m):y),m.abort(),v(),m=null)},l.cancelToken&&l.cancelToken.subscribe(i),l.signal&&(l.signal.aborted?i():l.signal.addEventListener("abort",i)));const g=c1(l.url);if(g&&!Ke.protocols.includes(g)){n(new ge("Unsupported protocol "+g+":",ge.ERR_BAD_REQUEST,e));return}m.send(o||null)})},_1=(e,r)=>{const{length:t}=e=e?e.filter(Boolean):[];if(r||t){let n=new AbortController,l;const o=function(s){if(!l){l=!0,u();const i=s instanceof Error?s:this.reason;n.abort(i instanceof ge?i:new nn(i instanceof Error?i.message:i))}};let a=r&&setTimeout(()=>{a=null,o(new ge(`timeout of ${r}ms exceeded`,ge.ETIMEDOUT))},r);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(o):s.removeEventListener("abort",o)}),e=null)};e.forEach(s=>s.addEventListener("abort",o));const{signal:h}=n;return h.unsubscribe=()=>le.asap(u),h}},E1=function*(e,r){let t=e.byteLength;if(t<r){yield e;return}let n=0,l;for(;n<t;)l=n+r,yield e.slice(n,l),n=l},A1=function(e,r){return Si(this,null,function*(){try{for(var t=Pa(C1(e)),n,l,o;n=!(l=yield new Ht(t.next())).done;n=!1){const a=l.value;yield*Bi(E1(a,r))}}catch(l){o=[l]}finally{try{n&&(l=t.return)&&(yield new Ht(l.call(t)))}finally{if(o)throw o[0]}}})},C1=function(e){return Si(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Bi(e);return}const r=e.getReader();try{for(;;){const{done:t,value:n}=yield new Ht(r.read());if(t)break;yield n}}finally{yield new Ht(r.cancel())}})},gs=(e,r,t,n)=>{const l=A1(e,r);let o=0,a,u=s=>{a||(a=!0,n&&n(s))};return new ReadableStream({pull(s){return Ne(this,null,function*(){try{const{done:i,value:p}=yield l.next();if(i){u(),s.close();return}let c=p.byteLength;if(t){let f=o+=c;t(f)}s.enqueue(new Uint8Array(p))}catch(i){throw u(i),i}})},cancel(s){return u(s),l.return()}},{highWaterMark:2})};function S1(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const r=e.indexOf(",");if(r<0)return 0;const t=e.slice(5,r),n=e.slice(r+1);if(/;base64/i.test(t)){let a=n.length;const u=n.length;for(let f=0;f<u;f++)if(n.charCodeAt(f)===37&&f+2<u){const d=n.charCodeAt(f+1),v=n.charCodeAt(f+2);(d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(a-=2,f+=2)}let h=0,s=u-1;const i=f=>f>=2&&n.charCodeAt(f-2)===37&&n.charCodeAt(f-1)===51&&(n.charCodeAt(f)===68||n.charCodeAt(f)===100);s>=0&&(n.charCodeAt(s)===61?(h++,s--):i(s)&&(h++,s-=3)),h===1&&s>=0&&(n.charCodeAt(s)===61||i(s))&&h++;const c=Math.floor(a/4)*3-(h||0);return c>0?c:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let o=0;for(let a=0,u=n.length;a<u;a++){const h=n.charCodeAt(a);if(h<128)o+=1;else if(h<2048)o+=2;else if(h>=55296&&h<=56319&&a+1<u){const s=n.charCodeAt(a+1);s>=56320&&s<=57343?(o+=4,a++):o+=3}else o+=3}return o}const ya="1.16.0",xs=64*1024,{isFunction:xn}=le,bs=(e,...r)=>{try{return!!e(...r)}catch(t){return!1}},B1=e=>{var b;const r=(b=le.global)!=null?b:globalThis,{ReadableStream:t,TextEncoder:n}=r;e=le.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response},e);const{fetch:l,Request:o,Response:a}=e,u=l?xn(l):typeof fetch=="function",h=xn(o),s=xn(a);if(!u)return!1;const i=u&&xn(t),p=u&&(typeof n=="function"?(g=>y=>g.encode(y))(new n):g=>Ne(exports,null,function*(){return new Uint8Array(yield new o(g).arrayBuffer())})),c=h&&i&&bs(()=>{let g=!1;const y=new o(Ke.origin,{body:new t,method:"POST",get duplex(){return g=!0,"half"}}),_=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),g&&!_}),f=s&&i&&bs(()=>le.isReadableStream(new a("").body)),d={stream:f&&(g=>g.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(y,_)=>{let T=y&&y[g];if(T)return T.call(y);throw new ge(`Response type '${g}' is not supported`,ge.ERR_NOT_SUPPORT,_)})});const v=g=>Ne(exports,null,function*(){if(g==null)return 0;if(le.isBlob(g))return g.size;if(le.isSpecCompliantForm(g))return(yield new o(Ke.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(le.isArrayBufferView(g)||le.isArrayBuffer(g))return g.byteLength;if(le.isURLSearchParams(g)&&(g=g+""),le.isString(g))return(yield p(g)).byteLength}),m=(g,y)=>Ne(exports,null,function*(){const _=le.toFiniteNumber(g.getContentLength());return _==null?v(y):_});return g=>Ne(exports,null,function*(){let{url:y,method:_,data:T,signal:D,cancelToken:F,timeout:R,onDownloadProgress:X,onUploadProgress:H,responseType:E,headers:A,withCredentials:S="same-origin",fetchOptions:I,maxContentLength:z,maxBodyLength:V}=l0(g);const te=le.isNumber(z)&&z>-1,W=le.isNumber(V)&&V>-1;let q=l||fetch;E=E?(E+"").toLowerCase():"text";let G=_1([D,F&&F.toAbortSignal()],R),U=null;const L=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Y;try{if(te&&typeof y=="string"&&y.startsWith("data:")&&S1(y)>z)throw new ge("maxContentLength size of "+z+" exceeded",ge.ERR_BAD_RESPONSE,g,U);if(W&&_!=="get"&&_!=="head"){const x=yield m(A,T);if(typeof x=="number"&&isFinite(x)&&x>V)throw new ge("Request body larger than maxBodyLength limit",ge.ERR_BAD_REQUEST,g,U)}if(H&&c&&_!=="get"&&_!=="head"&&(Y=yield m(A,T))!==0){let x=new o(y,{method:"POST",body:T,duplex:"half"}),w;if(le.isFormData(T)&&(w=x.headers.get("content-type"))&&A.setContentType(w),x.body){const[k,j]=ms(Y,Vn(ys(H)));T=gs(x.body,xs,k,j)}}le.isString(S)||(S=S?"include":"omit");const P=h&&"credentials"in o.prototype;if(le.isFormData(T)){const x=A.getContentType();x&&/^multipart\/form-data/i.test(x)&&!/boundary=/i.test(x)&&A.delete("content-type")}A.set("User-Agent","axios/"+ya,!1);const J=we(fe({},I),{signal:G,method:_.toUpperCase(),headers:A.normalize().toJSON(),body:T,duplex:"half",credentials:P?S:void 0});U=h&&new o(y,J);let ne=yield h?q(U,I):q(y,J);if(te){const x=le.toFiniteNumber(ne.headers.get("content-length"));if(x!=null&&x>z)throw new ge("maxContentLength size of "+z+" exceeded",ge.ERR_BAD_RESPONSE,g,U)}const ie=f&&(E==="stream"||E==="response");if(f&&ne.body&&(X||te||ie&&L)){const x={};["status","statusText","headers"].forEach(re=>{x[re]=ne[re]});const w=le.toFiniteNumber(ne.headers.get("content-length")),[k,j]=X&&ms(w,Vn(ys(X),!0))||[];let Z=0;const ee=re=>{if(te&&(Z=re,Z>z))throw new ge("maxContentLength size of "+z+" exceeded",ge.ERR_BAD_RESPONSE,g,U);k&&k(re)};ne=new a(gs(ne.body,xs,ee,()=>{j&&j(),L&&L()}),x)}E=E||"text";let ae=yield d[le.findKey(d,E)||"text"](ne,g);if(te&&!f&&!ie){let x;if(ae!=null&&(typeof ae.byteLength=="number"?x=ae.byteLength:typeof ae.size=="number"?x=ae.size:typeof ae=="string"&&(x=typeof n=="function"?new n().encode(ae).byteLength:ae.length)),typeof x=="number"&&x>z)throw new ge("maxContentLength size of "+z+" exceeded",ge.ERR_BAD_RESPONSE,g,U)}return!ie&&L&&L(),yield new Promise((x,w)=>{a0(x,w,{data:ae,headers:Je.from(ne.headers),status:ne.status,statusText:ne.statusText,config:g,request:U})})}catch(P){if(L&&L(),G&&G.aborted&&G.reason instanceof ge){const J=G.reason;throw J.config=g,U&&(J.request=U),P!==J&&(J.cause=P),J}throw P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,g,U,P&&P.response),{cause:P.cause||P}):ge.from(P,P&&P.code,g,U,P&&P.response)}})},k1=new Map,u0=e=>{let r=e&&e.env||{};const{fetch:t,Request:n,Response:l}=r,o=[n,l,t];let a=o.length,u=a,h,s,i=k1;for(;u--;)h=o[u],s=i.get(h),s===void 0&&i.set(h,s=u?new Map:B1(r)),i=s;return s};u0();const va={http:Kp,xhr:w1,fetch:{get:u0}};le.forEach(va,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:r})}catch(t){}Object.defineProperty(e,"adapterName",{__proto__:null,value:r})}});const ws=e=>`- ${e}`,T1=e=>le.isFunction(e)||e===null||e===!1;function F1(e,r){e=le.isArray(e)?e:[e];const{length:t}=e;let n,l;const o={};for(let a=0;a<t;a++){n=e[a];let u;if(l=n,!T1(n)&&(l=va[(u=String(n)).toLowerCase()],l===void 0))throw new ge(`Unknown adapter '${u}'`);if(l&&(le.isFunction(l)||(l=l.get(r))))break;o[u||"#"+a]=l}if(!l){const a=Object.entries(o).map(([h,s])=>`adapter ${h} `+(s===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since :
7
+ `+a.map(ws).join(`
8
+ `):" "+ws(a[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return l}const c0={getAdapter:F1,adapters:va};function Xi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nn(null,e)}function _s(e){return Xi(e),e.headers=Je.from(e.headers),e.data=Yi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),c0.getAdapter(e.adapter||rn.adapter,e)(e).then(function(n){Xi(e),e.response=n;try{n.data=Yi.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=Je.from(n.headers),n},function(n){if(!o0(n)&&(Xi(e),n&&n.response)){e.response=n.response;try{n.response.data=Yi.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=Je.from(n.response.headers)}return Promise.reject(n)})}const oi={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{oi[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});const Es={};oi.transitional=function(r,t,n){function l(o,a){return"[Axios v"+ya+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,u)=>{if(r===!1)throw new ge(l(a," has been removed"+(t?" in "+t:"")),ge.ERR_DEPRECATED);return t&&!Es[a]&&(Es[a]=!0,console.warn(l(a," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(o,a,u):!0}};oi.spelling=function(r){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${r}`),!0)};function D1(e,r,t){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let l=n.length;for(;l-- >0;){const o=n[l],a=Object.prototype.hasOwnProperty.call(r,o)?r[o]:void 0;if(a){const u=e[o],h=u===void 0||a(u,o,e);if(h!==!0)throw new ge("option "+o+" must be "+h,ge.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const Mn={assertOptions:D1,validators:oi},at=Mn.validators;let Xt=class{constructor(r){this.defaults=r||{},this.interceptors={request:new ps,response:new ps}}request(r,t){return Ne(this,null,function*(){try{return yield this._request(r,t)}catch(n){if(n instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const o=(()=>{if(!l.stack)return"";const a=l.stack.indexOf(`
9
+ `);return a===-1?"":l.stack.slice(a+1)})();try{if(!n.stack)n.stack=o;else if(o){const a=o.indexOf(`
10
+ `),u=a===-1?-1:o.indexOf(`
11
+ `,a+1),h=u===-1?"":o.slice(u+1);String(n.stack).endsWith(h)||(n.stack+=`
12
+ `+o)}}catch(a){}}throw n}})}_request(r,t){typeof r=="string"?(t=t||{},t.url=r):t=r||{},t=Zt(this.defaults,t);const{transitional:n,paramsSerializer:l,headers:o}=t;n!==void 0&&Mn.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean),legacyInterceptorReqResOrdering:at.transitional(at.boolean)},!1),l!=null&&(le.isFunction(l)?t.paramsSerializer={serialize:l}:Mn.assertOptions(l,{encode:at.function,serialize:at.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mn.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&le.merge(o.common,o[t.method]);o&&le.forEach(["delete","get","head","post","put","patch","query","common"],d=>{delete o[d]}),t.headers=Je.concat(a,o);const u=[];let h=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(t)===!1)return;h=h&&v.synchronous;const m=t.transitional||pa;m&&m.legacyInterceptorReqResOrdering?u.unshift(v.fulfilled,v.rejected):u.push(v.fulfilled,v.rejected)});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let i,p=0,c;if(!h){const d=[_s.bind(this),void 0];for(d.unshift(...u),d.push(...s),c=d.length,i=Promise.resolve(t);p<c;)i=i.then(d[p++],d[p++]);return i}c=u.length;let f=t;for(;p<c;){const d=u[p++],v=u[p++];try{f=d(f)}catch(m){v.call(this,m);break}}try{i=_s.call(this,f)}catch(d){return Promise.reject(d)}for(p=0,c=s.length;p<c;)i=i.then(s[p++],s[p++]);return i}getUri(r){r=Zt(this.defaults,r);const t=s0(r.baseURL,r.url,r.allowAbsoluteUrls);return n0(t,r.params,r.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(r){Xt.prototype[r]=function(t,n){return this.request(Zt(n||{},{method:r,url:t,data:(n||{}).data}))}});le.forEach(["post","put","patch","query"],function(r){function t(n){return function(o,a,u){return this.request(Zt(u||{},{method:r,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Xt.prototype[r]=t(),r!=="query"&&(Xt.prototype[r+"Form"]=t(!0))});let I1=class f0{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const n=this;this.promise.then(l=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](l);n._listeners=null}),this.promise.then=l=>{let o;const a=new Promise(u=>{n.subscribe(u),o=u}).then(l);return a.cancel=function(){n.unsubscribe(o)},a},r(function(o,a,u){n.reason||(n.reason=new nn(o,a,u),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const t=this._listeners.indexOf(r);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const r=new AbortController,t=n=>{r.abort(n)};return this.subscribe(t),r.signal.unsubscribe=()=>this.unsubscribe(t),r.signal}static source(){let r;return{token:new f0(function(l){r=l}),cancel:r}}};function R1(e){return function(t){return e.apply(null,t)}}function O1(e){return le.isObject(e)&&e.isAxiosError===!0}const Xo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Xo).forEach(([e,r])=>{Xo[r]=e});function h0(e){const r=new Xt(e),t=Wu(Xt.prototype.request,r);return le.extend(t,Xt.prototype,r,{allOwnKeys:!0}),le.extend(t,r,null,{allOwnKeys:!0}),t.create=function(l){return h0(Zt(e,l))},t}const Pe=h0(rn);Pe.Axios=Xt;Pe.CanceledError=nn;Pe.CancelToken=I1;Pe.isCancel=o0;Pe.VERSION=ya;Pe.toFormData=ii;Pe.AxiosError=ge;Pe.Cancel=Pe.CanceledError;Pe.all=function(r){return Promise.all(r)};Pe.spread=R1;Pe.isAxiosError=O1;Pe.mergeConfig=Zt;Pe.AxiosHeaders=Je;Pe.formToJSON=e=>i0(le.isHTMLForm(e)?new FormData(e):e);Pe.getAdapter=c0.getAdapter;Pe.HttpStatusCode=Xo;Pe.default=Pe;const{Axios:sx,AxiosError:lx,CanceledError:ux,isCancel:cx,CancelToken:fx,VERSION:hx,all:dx,Cancel:px,isAxiosError:mx,spread:yx,toFormData:vx,AxiosHeaders:gx,HttpStatusCode:xx,formToJSON:bx,getAdapter:_x,mergeConfig:Ex,create:Ax}=Pe,P1={OFFLINE:0},N1={STOP:2},M1={1:1,2:2,3:3,4:4,5:5},Oe={AREA:1,BAY:2,DEVICE:3,COMPONENT:4,POINT:5,YX:6,YC:7,YK:8,AUX_DEVICE:9,LD:10,LN:11,SG:12},L1={[Oe.AREA]:"area",[Oe.BAY]:"bay",[Oe.DEVICE]:"device",[Oe.COMPONENT]:"component",[Oe.POINT]:"patrolpoint",[Oe.YX]:"yxpoint",[Oe.YC]:"ycpoint",[Oe.YK]:"ykpoint",[Oe.AUX_DEVICE]:"acdevice",[Oe.LD]:"ld",[Oe.LN]:"ln",[Oe.SG]:"sgpoint"},Ze={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG",GIS_PROPS_PANEL:"GIS_PROPS_PANEL"},bn={Emit:7},Bt={NONE:"none",WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},Se={TEXT:"TEXT",NORMAL:"NORMAL",MP4:"MP4",TIME:"TIME",AUDIO:"AUDIO",RADIO:"RADIO",TABLE:"TABLE",INPUT:"INPUT",BUTTON:"BUTTON",CAMERA:"CAMERA",SELECT:"SELECT",SENSOR:"SENSOR",GIS_SENSOR:"GIS_SENSOR",SLIDER:"SLIDER",SWITCH:"SWITCH",CHECKBOX:"CHECKBOX",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",VIDEO_STREAM:"VIDEO_STREAM"},As={GRAPH:{SOCKET:"GRAPH_SOCKET"}},Zi={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var ai={};/*!
10
13
  * vite-plugin-qiankun.js v1.0.14
11
14
  * (c) 2021-2022 Teng Mao Qing
12
15
  * Released under the MIT License.
13
- */Object.defineProperty(ti,"__esModule",{value:!0});var dr=typeof window!="undefined"?window.proxy||window:{},Xu=function(e){dr!=null&&dr.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),dr.qiankunName&&(window.moudleQiankunAppLifeCycles[dr.qiankunName]=e))};ti.default=Xu;var a1=ti.qiankunWindow=dr;ti.renderWithQiankun=Xu;const Rn="/",s1=a1||window,ha=s1.meta.vite.micro.type||ei.QIANKUN,Zu=ha===ei.WUJIE,Ju=ha===ei.QIANKUN,e0=ha===ei.MICROAPP,l1=window.top!==window.self||Zu||Ju||e0;console.log("🚀 ~ isNested:",l1,Zu,Ju,e0);const u1=location.protocol==="https:",c1=location.hostname,f1=u1?"wss:":"ws:",h1=location.port,d1=location.origin,Cs=`${f1}//${location.host}/ws`;window.meta.graph.savePath,window.meta.graph.graphPenPath,window.meta.graph.templatePath,window.meta.graph.graphImgUploadPath;const Ie=Oe.create({baseURL:d1,timeout:window.meta.axios.timeout||12e4,withCredentials:!1,paramsSerializer:e=>Bd.stringify(e)});Ie.interceptors.request.use(e=>(e.headers["x-token"]="ewoglCJhbGcilDogpc3",e),e=>Promise.reject(e));Ie.interceptors.response.use(e=>{const{data:r}=e;return Promise.resolve(r)},e=>Promise.reject(e));function p1(e,r={},t={}){return new Promise(n=>{Ie.get(e,he({params:r},t)).then(l=>n({res:l,err:null})).catch(l=>n({res:null,err:l}))})}function m1(e,r={},t={}){return new Promise(n=>{Ie.post(e,r,t).then(l=>n({res:l,err:null})).catch(l=>n({res:null,err:l}))})}function v1(e,r={},t={}){return Ie.get(e,he({params:r},t))}function y1(e,r={},t={}){return Ie.post(e,r,t)}function g1(e,r={}){return Ie.get(`/filehandle/${e}`,{params:r})}function x1(e,r={},t={}){return Ie.post(`/filehandle/${e}`,r,t)}function b1(e,r={}){return Ie.get(`/user/${e}`,{params:r})}function w1(e,r={},t={}){return Ie.post(`/user/${e}`,r,t)}function _1(e,r={}){return Ie.get(`${e}`,r.local?{params:r,baseURL:Rn}:{params:r})}function E1(e,r={}){return Ie.get(`/media/${e}/`,{params:r})}function A1(e,r={},t={}){return Ie.post(`/media/${e}/`,r,t)}function C1(e,r={}){return Ie.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${e}/`,{params:r})}function S1(e,r={},t={}){return Ie.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${e}/`,r,t)}function B1(e,r={}){return Ie.get(`/history/${e}`,{params:r})}function k1(e,r={},t={}){return Ie.post(`/history/${e}`,r,t)}function T1(e,r={}){return Ie.get(`/scada/${e}`,{params:r})}function F1(e,r={},t={}){return Ie.post(`/scada/${e}`,r,t)}function I1(e,r={}){return Ie.get(`/common/factory/${e}`,{params:r})}function D1(e,r={},t={}){return Ie.post(`/common/factory/${e}`,r,t)}function R1(e,r={}){return Ie.get(`/factory/${e}`,{params:r})}function O1(e,r={},t={}){return Ie.post(`/factory/${e}`,r,t)}const Vo={getApi:p1,postApi:m1,getFileApi:g1,postFileApi:x1,getBaseApi:v1,postBaseApi:y1,getUserApi:b1,postUserApi:w1,getGraphApi:_1,getMediaApi:E1,postMediaApi:A1,getScadaApi:T1,postScadaApi:F1,getCommonApi:C1,postCommonApi:S1,getHistoryApi:B1,postHistoryApi:k1,getFactoryApi:R1,postFactoryApi:O1,getCommonFactoryApi:I1,postCommonFactoryApi:D1};function P1(e){return{all:e=e||new Map,on:function(r,t){var n=e.get(r);n?n.push(t):e.set(r,[t])},off:function(r,t){var n=e.get(r);n&&(t?n.splice(n.indexOf(t)>>>0,1):e.set(r,[]))},emit:function(r,t){var n=e.get(r);n&&n.slice().map(function(l){l(t)}),(n=e.get("*"))&&n.slice().map(function(l){l(r,t)})}}}const Wo=P1();function Ss(e){return Object.prototype.toString.call(e).slice(8,-1)}function Bs(e){if(typeof e!="string")return!1;const r=/^-?\d+(\.\d+)?$/;return e.trim()!==""&&r.test(e.trim())}var N1={exports:{}};function Or(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Gi={exports:{}},ks;function Ae(){return ks||(ks=1,function(e,r){(function(t,n){e.exports=n()})(xe,function(){var t=t||function(n,l){var a;if(typeof window!="undefined"&&window.crypto&&(a=window.crypto),typeof self!="undefined"&&self.crypto&&(a=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(a=globalThis.crypto),!a&&typeof window!="undefined"&&window.msCrypto&&(a=window.msCrypto),!a&&typeof xe!="undefined"&&xe.crypto&&(a=xe.crypto),!a&&typeof Or=="function")try{a=nu}catch(b){}var o=function(){if(a){if(typeof a.getRandomValues=="function")try{return a.getRandomValues(new Uint32Array(1))[0]}catch(b){}if(typeof a.randomBytes=="function")try{return a.randomBytes(4).readInt32LE()}catch(b){}}throw new Error("Native crypto module could not be used to get secure random number.")},u=Object.create||function(){function b(){}return function(y){var _;return b.prototype=y,_=new b,b.prototype=null,_}}(),d={},s=d.lib={},i=s.Base=function(){return{extend:function(b){var y=u(this);return b&&y.mixIn(b),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var y in b)b.hasOwnProperty(y)&&(this[y]=b[y]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=s.WordArray=i.extend({init:function(b,y){b=this.words=b||[],y!=l?this.sigBytes=y:this.sigBytes=b.length*4},toString:function(b){return(b||f).stringify(this)},concat:function(b){var y=this.words,_=b.words,T=this.sigBytes,B=b.sigBytes;if(this.clamp(),T%4)for(var F=0;F<B;F++){var R=_[F>>>2]>>>24-F%4*8&255;y[T+F>>>2]|=R<<24-(T+F)%4*8}else for(var Z=0;Z<B;Z+=4)y[T+Z>>>2]=_[Z>>>2];return this.sigBytes+=B,this},clamp:function(){var b=this.words,y=this.sigBytes;b[y>>>2]&=4294967295<<32-y%4*8,b.length=n.ceil(y/4)},clone:function(){var b=i.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var y=[],_=0;_<b;_+=4)y.push(o());return new p.init(y,b)}}),c=d.enc={},f=c.Hex={stringify:function(b){for(var y=b.words,_=b.sigBytes,T=[],B=0;B<_;B++){var F=y[B>>>2]>>>24-B%4*8&255;T.push((F>>>4).toString(16)),T.push((F&15).toString(16))}return T.join("")},parse:function(b){for(var y=b.length,_=[],T=0;T<y;T+=2)_[T>>>3]|=parseInt(b.substr(T,2),16)<<24-T%8*4;return new p.init(_,y/2)}},h=c.Latin1={stringify:function(b){for(var y=b.words,_=b.sigBytes,T=[],B=0;B<_;B++){var F=y[B>>>2]>>>24-B%4*8&255;T.push(String.fromCharCode(F))}return T.join("")},parse:function(b){for(var y=b.length,_=[],T=0;T<y;T++)_[T>>>2]|=(b.charCodeAt(T)&255)<<24-T%4*8;return new p.init(_,y)}},v=c.Utf8={stringify:function(b){try{return decodeURIComponent(escape(h.stringify(b)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(b){return h.parse(unescape(encodeURIComponent(b)))}},m=s.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=v.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var y,_=this._data,T=_.words,B=_.sigBytes,F=this.blockSize,R=F*4,Z=B/R;b?Z=n.ceil(Z):Z=n.max((Z|0)-this._minBufferSize,0);var j=Z*F,E=n.min(j*4,B);if(j){for(var A=0;A<j;A+=F)this._doProcessBlock(T,A);y=T.splice(0,j),_.sigBytes-=E}return new p.init(y,E)},clone:function(){var b=i.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0});s.Hasher=m.extend({cfg:i.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){b&&this._append(b);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(b){return function(y,_){return new b.init(_).finalize(y)}},_createHmacHelper:function(b){return function(y,_){return new g.HMAC.init(b,_).finalize(y)}}});var g=d.algo={};return d}(Math);return t})}(Gi)),Gi.exports}var Qi={exports:{}},Ts;function ri(){return Ts||(Ts=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(n){var l=t,a=l.lib,o=a.Base,u=a.WordArray,d=l.x64={};d.Word=o.extend({init:function(s,i){this.high=s,this.low=i}}),d.WordArray=o.extend({init:function(s,i){s=this.words=s||[],i!=n?this.sigBytes=i:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,i=s.length,p=[],c=0;c<i;c++){var f=s[c];p.push(f.high),p.push(f.low)}return u.create(p,this.sigBytes)},clone:function(){for(var s=o.clone.call(this),i=s.words=this.words.slice(0),p=i.length,c=0;c<p;c++)i[c]=i[c].clone();return s}})}(),t})}(Qi)),Qi.exports}var Yi={exports:{}},Fs;function M1(){return Fs||(Fs=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,l=n.lib,a=l.WordArray,o=a.init,u=a.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var s=d.byteLength,i=[],p=0;p<s;p++)i[p>>>2]|=d[p]<<24-p%4*8;o.call(this,i,s)}else o.apply(this,arguments)};u.prototype=a}}(),t.lib.WordArray})}(Yi)),Yi.exports}var Xi={exports:{}},Is;function L1(){return Is||(Is=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.WordArray,o=n.enc;o.Utf16=o.Utf16BE={stringify:function(d){for(var s=d.words,i=d.sigBytes,p=[],c=0;c<i;c+=2){var f=s[c>>>2]>>>16-c%4*8&65535;p.push(String.fromCharCode(f))}return p.join("")},parse:function(d){for(var s=d.length,i=[],p=0;p<s;p++)i[p>>>1]|=d.charCodeAt(p)<<16-p%2*16;return a.create(i,s*2)}},o.Utf16LE={stringify:function(d){for(var s=d.words,i=d.sigBytes,p=[],c=0;c<i;c+=2){var f=u(s[c>>>2]>>>16-c%4*8&65535);p.push(String.fromCharCode(f))}return p.join("")},parse:function(d){for(var s=d.length,i=[],p=0;p<s;p++)i[p>>>1]|=u(d.charCodeAt(p)<<16-p%2*16);return a.create(i,s*2)}};function u(d){return d<<8&4278255360|d>>>8&16711935}}(),t.enc.Utf16})}(Xi)),Xi.exports}var Zi={exports:{}},Ds;function rr(){return Ds||(Ds=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.WordArray,o=n.enc;o.Base64={stringify:function(d){var s=d.words,i=d.sigBytes,p=this._map;d.clamp();for(var c=[],f=0;f<i;f+=3)for(var h=s[f>>>2]>>>24-f%4*8&255,v=s[f+1>>>2]>>>24-(f+1)%4*8&255,m=s[f+2>>>2]>>>24-(f+2)%4*8&255,g=h<<16|v<<8|m,b=0;b<4&&f+b*.75<i;b++)c.push(p.charAt(g>>>6*(3-b)&63));var y=p.charAt(64);if(y)for(;c.length%4;)c.push(y);return c.join("")},parse:function(d){var s=d.length,i=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var c=0;c<i.length;c++)p[i.charCodeAt(c)]=c}var f=i.charAt(64);if(f){var h=d.indexOf(f);h!==-1&&(s=h)}return u(d,s,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function u(d,s,i){for(var p=[],c=0,f=0;f<s;f++)if(f%4){var h=i[d.charCodeAt(f-1)]<<f%4*2,v=i[d.charCodeAt(f)]>>>6-f%4*2,m=h|v;p[c>>>2]|=m<<24-c%4*8,c++}return a.create(p,c)}}(),t.enc.Base64})}(Zi)),Zi.exports}var Ji={exports:{}},Rs;function U1(){return Rs||(Rs=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.WordArray,o=n.enc;o.Base64url={stringify:function(d,s){s===void 0&&(s=!0);var i=d.words,p=d.sigBytes,c=s?this._safe_map:this._map;d.clamp();for(var f=[],h=0;h<p;h+=3)for(var v=i[h>>>2]>>>24-h%4*8&255,m=i[h+1>>>2]>>>24-(h+1)%4*8&255,g=i[h+2>>>2]>>>24-(h+2)%4*8&255,b=v<<16|m<<8|g,y=0;y<4&&h+y*.75<p;y++)f.push(c.charAt(b>>>6*(3-y)&63));var _=c.charAt(64);if(_)for(;f.length%4;)f.push(_);return f.join("")},parse:function(d,s){s===void 0&&(s=!0);var i=d.length,p=s?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var f=0;f<p.length;f++)c[p.charCodeAt(f)]=f}var h=p.charAt(64);if(h){var v=d.indexOf(h);v!==-1&&(i=v)}return u(d,i,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function u(d,s,i){for(var p=[],c=0,f=0;f<s;f++)if(f%4){var h=i[d.charCodeAt(f-1)]<<f%4*2,v=i[d.charCodeAt(f)]>>>6-f%4*2,m=h|v;p[c>>>2]|=m<<24-c%4*8,c++}return a.create(p,c)}}(),t.enc.Base64url})}(Ji)),Ji.exports}var eo={exports:{}},Os;function nr(){return Os||(Os=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(n){var l=t,a=l.lib,o=a.WordArray,u=a.Hasher,d=l.algo,s=[];(function(){for(var v=0;v<64;v++)s[v]=n.abs(n.sin(v+1))*4294967296|0})();var i=d.MD5=u.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,m){for(var g=0;g<16;g++){var b=m+g,y=v[b];v[b]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var _=this._hash.words,T=v[m+0],B=v[m+1],F=v[m+2],R=v[m+3],Z=v[m+4],j=v[m+5],E=v[m+6],A=v[m+7],C=v[m+8],I=v[m+9],z=v[m+10],W=v[m+11],G=v[m+12],q=v[m+13],N=v[m+14],V=v[m+15],L=_[0],O=_[1],K=_[2],H=_[3];L=p(L,O,K,H,T,7,s[0]),H=p(H,L,O,K,B,12,s[1]),K=p(K,H,L,O,F,17,s[2]),O=p(O,K,H,L,R,22,s[3]),L=p(L,O,K,H,Z,7,s[4]),H=p(H,L,O,K,j,12,s[5]),K=p(K,H,L,O,E,17,s[6]),O=p(O,K,H,L,A,22,s[7]),L=p(L,O,K,H,C,7,s[8]),H=p(H,L,O,K,I,12,s[9]),K=p(K,H,L,O,z,17,s[10]),O=p(O,K,H,L,W,22,s[11]),L=p(L,O,K,H,G,7,s[12]),H=p(H,L,O,K,q,12,s[13]),K=p(K,H,L,O,N,17,s[14]),O=p(O,K,H,L,V,22,s[15]),L=c(L,O,K,H,B,5,s[16]),H=c(H,L,O,K,E,9,s[17]),K=c(K,H,L,O,W,14,s[18]),O=c(O,K,H,L,T,20,s[19]),L=c(L,O,K,H,j,5,s[20]),H=c(H,L,O,K,z,9,s[21]),K=c(K,H,L,O,V,14,s[22]),O=c(O,K,H,L,Z,20,s[23]),L=c(L,O,K,H,I,5,s[24]),H=c(H,L,O,K,N,9,s[25]),K=c(K,H,L,O,R,14,s[26]),O=c(O,K,H,L,C,20,s[27]),L=c(L,O,K,H,q,5,s[28]),H=c(H,L,O,K,F,9,s[29]),K=c(K,H,L,O,A,14,s[30]),O=c(O,K,H,L,G,20,s[31]),L=f(L,O,K,H,j,4,s[32]),H=f(H,L,O,K,C,11,s[33]),K=f(K,H,L,O,W,16,s[34]),O=f(O,K,H,L,N,23,s[35]),L=f(L,O,K,H,B,4,s[36]),H=f(H,L,O,K,Z,11,s[37]),K=f(K,H,L,O,A,16,s[38]),O=f(O,K,H,L,z,23,s[39]),L=f(L,O,K,H,q,4,s[40]),H=f(H,L,O,K,T,11,s[41]),K=f(K,H,L,O,R,16,s[42]),O=f(O,K,H,L,E,23,s[43]),L=f(L,O,K,H,I,4,s[44]),H=f(H,L,O,K,G,11,s[45]),K=f(K,H,L,O,V,16,s[46]),O=f(O,K,H,L,F,23,s[47]),L=h(L,O,K,H,T,6,s[48]),H=h(H,L,O,K,A,10,s[49]),K=h(K,H,L,O,N,15,s[50]),O=h(O,K,H,L,j,21,s[51]),L=h(L,O,K,H,G,6,s[52]),H=h(H,L,O,K,R,10,s[53]),K=h(K,H,L,O,z,15,s[54]),O=h(O,K,H,L,B,21,s[55]),L=h(L,O,K,H,C,6,s[56]),H=h(H,L,O,K,V,10,s[57]),K=h(K,H,L,O,E,15,s[58]),O=h(O,K,H,L,q,21,s[59]),L=h(L,O,K,H,Z,6,s[60]),H=h(H,L,O,K,W,10,s[61]),K=h(K,H,L,O,F,15,s[62]),O=h(O,K,H,L,I,21,s[63]),_[0]=_[0]+L|0,_[1]=_[1]+O|0,_[2]=_[2]+K|0,_[3]=_[3]+H|0},_doFinalize:function(){var v=this._data,m=v.words,g=this._nDataBytes*8,b=v.sigBytes*8;m[b>>>5]|=128<<24-b%32;var y=n.floor(g/4294967296),_=g;m[(b+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,v.sigBytes=(m.length+1)*4,this._process();for(var T=this._hash,B=T.words,F=0;F<4;F++){var R=B[F];B[F]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return T},clone:function(){var v=u.clone.call(this);return v._hash=this._hash.clone(),v}});function p(v,m,g,b,y,_,T){var B=v+(m&g|~m&b)+y+T;return(B<<_|B>>>32-_)+m}function c(v,m,g,b,y,_,T){var B=v+(m&b|g&~b)+y+T;return(B<<_|B>>>32-_)+m}function f(v,m,g,b,y,_,T){var B=v+(m^g^b)+y+T;return(B<<_|B>>>32-_)+m}function h(v,m,g,b,y,_,T){var B=v+(g^(m|~b))+y+T;return(B<<_|B>>>32-_)+m}l.MD5=u._createHelper(i),l.HmacMD5=u._createHmacHelper(i)}(Math),t.MD5})}(eo)),eo.exports}var to={exports:{}},Ps;function t0(){return Ps||(Ps=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.WordArray,o=l.Hasher,u=n.algo,d=[],s=u.SHA1=o.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(i,p){for(var c=this._hash.words,f=c[0],h=c[1],v=c[2],m=c[3],g=c[4],b=0;b<80;b++){if(b<16)d[b]=i[p+b]|0;else{var y=d[b-3]^d[b-8]^d[b-14]^d[b-16];d[b]=y<<1|y>>>31}var _=(f<<5|f>>>27)+g+d[b];b<20?_+=(h&v|~h&m)+1518500249:b<40?_+=(h^v^m)+1859775393:b<60?_+=(h&v|h&m|v&m)-1894007588:_+=(h^v^m)-899497514,g=m,m=v,v=h<<30|h>>>2,h=f,f=_}c[0]=c[0]+f|0,c[1]=c[1]+h|0,c[2]=c[2]+v|0,c[3]=c[3]+m|0,c[4]=c[4]+g|0},_doFinalize:function(){var i=this._data,p=i.words,c=this._nDataBytes*8,f=i.sigBytes*8;return p[f>>>5]|=128<<24-f%32,p[(f+64>>>9<<4)+14]=Math.floor(c/4294967296),p[(f+64>>>9<<4)+15]=c,i.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var i=o.clone.call(this);return i._hash=this._hash.clone(),i}});n.SHA1=o._createHelper(s),n.HmacSHA1=o._createHmacHelper(s)}(),t.SHA1})}(to)),to.exports}var ro={exports:{}},Ns;function da(){return Ns||(Ns=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){return function(n){var l=t,a=l.lib,o=a.WordArray,u=a.Hasher,d=l.algo,s=[],i=[];(function(){function f(g){for(var b=n.sqrt(g),y=2;y<=b;y++)if(!(g%y))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var v=2,m=0;m<64;)f(v)&&(m<8&&(s[m]=h(n.pow(v,1/2))),i[m]=h(n.pow(v,1/3)),m++),v++})();var p=[],c=d.SHA256=u.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(f,h){for(var v=this._hash.words,m=v[0],g=v[1],b=v[2],y=v[3],_=v[4],T=v[5],B=v[6],F=v[7],R=0;R<64;R++){if(R<16)p[R]=f[h+R]|0;else{var Z=p[R-15],j=(Z<<25|Z>>>7)^(Z<<14|Z>>>18)^Z>>>3,E=p[R-2],A=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;p[R]=j+p[R-7]+A+p[R-16]}var C=_&T^~_&B,I=m&g^m&b^g&b,z=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),W=(_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25),G=F+W+C+i[R]+p[R],q=z+I;F=B,B=T,T=_,_=y+G|0,y=b,b=g,g=m,m=G+q|0}v[0]=v[0]+m|0,v[1]=v[1]+g|0,v[2]=v[2]+b|0,v[3]=v[3]+y|0,v[4]=v[4]+_|0,v[5]=v[5]+T|0,v[6]=v[6]+B|0,v[7]=v[7]+F|0},_doFinalize:function(){var f=this._data,h=f.words,v=this._nDataBytes*8,m=f.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=n.floor(v/4294967296),h[(m+64>>>9<<4)+15]=v,f.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var f=u.clone.call(this);return f._hash=this._hash.clone(),f}});l.SHA256=u._createHelper(c),l.HmacSHA256=u._createHmacHelper(c)}(Math),t.SHA256})}(ro)),ro.exports}var no={exports:{}},Ms;function q1(){return Ms||(Ms=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),da())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.WordArray,o=n.algo,u=o.SHA256,d=o.SHA224=u.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=u._doFinalize.call(this);return s.sigBytes-=4,s}});n.SHA224=u._createHelper(d),n.HmacSHA224=u._createHmacHelper(d)}(),t.SHA224})}(no)),no.exports}var io={exports:{}},Ls;function r0(){return Ls||(Ls=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ri())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.Hasher,o=n.x64,u=o.Word,d=o.WordArray,s=n.algo;function i(){return u.create.apply(u,arguments)}var p=[i(1116352408,3609767458),i(1899447441,602891725),i(3049323471,3964484399),i(3921009573,2173295548),i(961987163,4081628472),i(1508970993,3053834265),i(2453635748,2937671579),i(2870763221,3664609560),i(3624381080,2734883394),i(310598401,1164996542),i(607225278,1323610764),i(1426881987,3590304994),i(1925078388,4068182383),i(2162078206,991336113),i(2614888103,633803317),i(3248222580,3479774868),i(3835390401,2666613458),i(4022224774,944711139),i(264347078,2341262773),i(604807628,2007800933),i(770255983,1495990901),i(1249150122,1856431235),i(1555081692,3175218132),i(1996064986,2198950837),i(2554220882,3999719339),i(2821834349,766784016),i(2952996808,2566594879),i(3210313671,3203337956),i(3336571891,1034457026),i(3584528711,2466948901),i(113926993,3758326383),i(338241895,168717936),i(666307205,1188179964),i(773529912,1546045734),i(1294757372,1522805485),i(1396182291,2643833823),i(1695183700,2343527390),i(1986661051,1014477480),i(2177026350,1206759142),i(2456956037,344077627),i(2730485921,1290863460),i(2820302411,3158454273),i(3259730800,3505952657),i(3345764771,106217008),i(3516065817,3606008344),i(3600352804,1432725776),i(4094571909,1467031594),i(275423344,851169720),i(430227734,3100823752),i(506948616,1363258195),i(659060556,3750685593),i(883997877,3785050280),i(958139571,3318307427),i(1322822218,3812723403),i(1537002063,2003034995),i(1747873779,3602036899),i(1955562222,1575990012),i(2024104815,1125592928),i(2227730452,2716904306),i(2361852424,442776044),i(2428436474,593698344),i(2756734187,3733110249),i(3204031479,2999351573),i(3329325298,3815920427),i(3391569614,3928383900),i(3515267271,566280711),i(3940187606,3454069534),i(4118630271,4000239992),i(116418474,1914138554),i(174292421,2731055270),i(289380356,3203993006),i(460393269,320620315),i(685471733,587496836),i(852142971,1086792851),i(1017036298,365543100),i(1126000580,2618297676),i(1288033470,3409855158),i(1501505948,4234509866),i(1607167915,987167468),i(1816402316,1246189591)],c=[];(function(){for(var h=0;h<80;h++)c[h]=i()})();var f=s.SHA512=a.extend({_doReset:function(){this._hash=new d.init([new u.init(1779033703,4089235720),new u.init(3144134277,2227873595),new u.init(1013904242,4271175723),new u.init(2773480762,1595750129),new u.init(1359893119,2917565137),new u.init(2600822924,725511199),new u.init(528734635,4215389547),new u.init(1541459225,327033209)])},_doProcessBlock:function(h,v){for(var m=this._hash.words,g=m[0],b=m[1],y=m[2],_=m[3],T=m[4],B=m[5],F=m[6],R=m[7],Z=g.high,j=g.low,E=b.high,A=b.low,C=y.high,I=y.low,z=_.high,W=_.low,G=T.high,q=T.low,N=B.high,V=B.low,L=F.high,O=F.low,K=R.high,H=R.low,J=Z,ne=j,ie=E,te=A,x=C,w=I,D=z,Q=W,ee=G,re=q,se=N,$=V,S=L,k=O,X=K,ae=H,ue=0;ue<80;ue++){var ce,me,ge=c[ue];if(ue<16)me=ge.high=h[v+ue*2]|0,ce=ge.low=h[v+ue*2+1]|0;else{var Ce=c[ue-15],Te=Ce.high,Be=Ce.low,kt=(Te>>>1|Be<<31)^(Te>>>8|Be<<24)^Te>>>7,Ut=(Be>>>1|Te<<31)^(Be>>>8|Te<<24)^(Be>>>7|Te<<25),qt=c[ue-2],Tt=qt.high,__$t__=qt.low,ii=(Tt>>>19|__$t__<<13)^(Tt<<3|__$t__>>>29)^Tt>>>6,ar=(__$t__>>>19|Tt<<13)^(__$t__<<3|Tt>>>29)^(__$t__>>>6|Tt<<26),en=c[ue-7],tn=en.high,oi=en.low,Tr=c[ue-16],ai=Tr.high,rn=Tr.low;ce=Ut+oi,me=kt+tn+(ce>>>0<Ut>>>0?1:0),ce=ce+ar,me=me+ii+(ce>>>0<ar>>>0?1:0),ce=ce+rn,me=me+ai+(ce>>>0<rn>>>0?1:0),ge.high=me,ge.low=ce}var si=ee&se^~ee&S,nn=re&$^~re&k,li=J&ie^J&x^ie&x,ui=ne&te^ne&w^te&w,ci=(J>>>28|ne<<4)^(J<<30|ne>>>2)^(J<<25|ne>>>7),on=(ne>>>28|J<<4)^(ne<<30|J>>>2)^(ne<<25|J>>>7),fi=(ee>>>14|re<<18)^(ee>>>18|re<<14)^(ee<<23|re>>>9),hi=(re>>>14|ee<<18)^(re>>>18|ee<<14)^(re<<23|ee>>>9),an=p[ue],di=an.high,sn=an.low,Ge=ae+hi,pt=X+fi+(Ge>>>0<ae>>>0?1:0),Ge=Ge+nn,pt=pt+si+(Ge>>>0<nn>>>0?1:0),Ge=Ge+sn,pt=pt+di+(Ge>>>0<sn>>>0?1:0),Ge=Ge+ce,pt=pt+me+(Ge>>>0<ce>>>0?1:0),ln=on+ui,pi=ci+li+(ln>>>0<on>>>0?1:0);X=S,ae=k,S=se,k=$,se=ee,$=re,re=Q+Ge|0,ee=D+pt+(re>>>0<Q>>>0?1:0)|0,D=x,Q=w,x=ie,w=te,ie=J,te=ne,ne=Ge+ln|0,J=pt+pi+(ne>>>0<Ge>>>0?1:0)|0}j=g.low=j+ne,g.high=Z+J+(j>>>0<ne>>>0?1:0),A=b.low=A+te,b.high=E+ie+(A>>>0<te>>>0?1:0),I=y.low=I+w,y.high=C+x+(I>>>0<w>>>0?1:0),W=_.low=W+Q,_.high=z+D+(W>>>0<Q>>>0?1:0),q=T.low=q+re,T.high=G+ee+(q>>>0<re>>>0?1:0),V=B.low=V+$,B.high=N+se+(V>>>0<$>>>0?1:0),O=F.low=O+k,F.high=L+S+(O>>>0<k>>>0?1:0),H=R.low=H+ae,R.high=K+X+(H>>>0<ae>>>0?1:0)},_doFinalize:function(){var h=this._data,v=h.words,m=this._nDataBytes*8,g=h.sigBytes*8;v[g>>>5]|=128<<24-g%32,v[(g+128>>>10<<5)+30]=Math.floor(m/4294967296),v[(g+128>>>10<<5)+31]=m,h.sigBytes=v.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h},blockSize:1024/32});n.SHA512=a._createHelper(f),n.HmacSHA512=a._createHmacHelper(f)}(),t.SHA512})}(io)),io.exports}var oo={exports:{}},Us;function $1(){return Us||(Us=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ri(),r0())})(xe,function(t){return function(){var n=t,l=n.x64,a=l.Word,o=l.WordArray,u=n.algo,d=u.SHA512,s=u.SHA384=d.extend({_doReset:function(){this._hash=new o.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var i=d._doFinalize.call(this);return i.sigBytes-=16,i}});n.SHA384=d._createHelper(s),n.HmacSHA384=d._createHmacHelper(s)}(),t.SHA384})}(oo)),oo.exports}var ao={exports:{}},qs;function z1(){return qs||(qs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ri())})(xe,function(t){return function(n){var l=t,a=l.lib,o=a.WordArray,u=a.Hasher,d=l.x64,s=d.Word,i=l.algo,p=[],c=[],f=[];(function(){for(var m=1,g=0,b=0;b<24;b++){p[m+5*g]=(b+1)*(b+2)/2%64;var y=g%5,_=(2*m+3*g)%5;m=y,g=_}for(var m=0;m<5;m++)for(var g=0;g<5;g++)c[m+5*g]=g+(2*m+3*g)%5*5;for(var T=1,B=0;B<24;B++){for(var F=0,R=0,Z=0;Z<7;Z++){if(T&1){var j=(1<<Z)-1;j<32?R^=1<<j:F^=1<<j-32}T&128?T=T<<1^113:T<<=1}f[B]=s.create(F,R)}})();var h=[];(function(){for(var m=0;m<25;m++)h[m]=s.create()})();var v=i.SHA3=u.extend({cfg:u.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],g=0;g<25;g++)m[g]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,g){for(var b=this._state,y=this.blockSize/2,_=0;_<y;_++){var T=m[g+2*_],B=m[g+2*_+1];T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360;var F=b[_];F.high^=B,F.low^=T}for(var R=0;R<24;R++){for(var Z=0;Z<5;Z++){for(var j=0,E=0,A=0;A<5;A++){var F=b[Z+5*A];j^=F.high,E^=F.low}var C=h[Z];C.high=j,C.low=E}for(var Z=0;Z<5;Z++)for(var I=h[(Z+4)%5],z=h[(Z+1)%5],W=z.high,G=z.low,j=I.high^(W<<1|G>>>31),E=I.low^(G<<1|W>>>31),A=0;A<5;A++){var F=b[Z+5*A];F.high^=j,F.low^=E}for(var q=1;q<25;q++){var j,E,F=b[q],N=F.high,V=F.low,L=p[q];L<32?(j=N<<L|V>>>32-L,E=V<<L|N>>>32-L):(j=V<<L-32|N>>>64-L,E=N<<L-32|V>>>64-L);var O=h[c[q]];O.high=j,O.low=E}var K=h[0],H=b[0];K.high=H.high,K.low=H.low;for(var Z=0;Z<5;Z++)for(var A=0;A<5;A++){var q=Z+5*A,F=b[q],J=h[q],ne=h[(Z+1)%5+5*A],ie=h[(Z+2)%5+5*A];F.high=J.high^~ne.high&ie.high,F.low=J.low^~ne.low&ie.low}var F=b[0],te=f[R];F.high^=te.high,F.low^=te.low}},_doFinalize:function(){var m=this._data,g=m.words;this._nDataBytes*8;var b=m.sigBytes*8,y=this.blockSize*32;g[b>>>5]|=1<<24-b%32,g[(n.ceil((b+1)/y)*y>>>5)-1]|=128,m.sigBytes=g.length*4,this._process();for(var _=this._state,T=this.cfg.outputLength/8,B=T/8,F=[],R=0;R<B;R++){var Z=_[R],j=Z.high,E=Z.low;j=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,F.push(E),F.push(j)}return new o.init(F,T)},clone:function(){for(var m=u.clone.call(this),g=m._state=this._state.slice(0),b=0;b<25;b++)g[b]=g[b].clone();return m}});l.SHA3=u._createHelper(v),l.HmacSHA3=u._createHmacHelper(v)}(Math),t.SHA3})}(ao)),ao.exports}var so={exports:{}},$s;function j1(){return $s||($s=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){/** @preserve
16
+ */Object.defineProperty(ai,"__esModule",{value:!0});var mr=typeof window!="undefined"?window.proxy||window:{},d0=function(e){mr!=null&&mr.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),mr.qiankunName&&(window.moudleQiankunAppLifeCycles[mr.qiankunName]=e))};ai.default=d0;var Ln=ai.qiankunWindow=mr;ai.renderWithQiankun=d0;function U1(){return window.__POWERED_BY_WUJIE__||window.$wujie?Bt.WUJIE:window.__POWERED_BY_QIANKUN__||Ln!=null&&Ln.__POWERED_BY_QIANKUN__?Bt.QIANKUN:window.__MICRO_APP_ENVIRONMENT__||window.microApp?Bt.MICROAPP:Bt.NONE}function $1(){return{microType:U1()}}const Un="/",{microType:Cs}=$1(),q1=Ln||window;var nu,iu;const si=Cs!==Bt.NONE?Cs:(iu=(nu=q1.meta)==null?void 0:nu.vite.micro)==null?void 0:iu.type,z1=si===Bt.WUJIE,j1=si===Bt.QIANKUN,H1=si===Bt.MICROAPP,V1=window.top!==window.self||si!==Bt.NONE;console.log("🚀 ~ isNested:",V1,z1,j1,H1);const W1=location.protocol==="https:",G1=location.hostname,K1=W1?"wss:":"ws:",Q1=location.port,Y1=location.origin,Ss=`${K1}//${location.host}/ws`;var ou,au,su,lu,uu,cu,fu,hu,du,pu,mu,yu;(au=(ou=window.meta)==null?void 0:ou.graph)!=null&&au.savePath,(lu=(su=window.meta)==null?void 0:su.graph)!=null&&lu.graphPenPath,(cu=(uu=window.meta)==null?void 0:uu.graph)!=null&&cu.templatePath,(hu=(fu=window.meta)==null?void 0:fu.graph)!=null&&hu.graphImgUploadPath,(pu=(du=window.meta)==null?void 0:du.graph)!=null&&pu.threeSavePath,(yu=(mu=window.meta)==null?void 0:mu.graph)!=null&&yu.threeModelPath;const De=Pe.create({baseURL:Y1,timeout:window.meta.axios.timeout||12e4,withCredentials:!1,paramsSerializer:e=>Gd.stringify(e)});De.interceptors.request.use(e=>(e.headers["x-token"]="ewoglCJhbGcilDogpc3",e),e=>Promise.reject(e));De.interceptors.response.use(e=>{const{data:r}=e;return Promise.resolve(r)},e=>Promise.reject(e));function X1(e,r={},t={}){return new Promise(n=>{De.get(e,fe({params:r},t)).then(l=>n({res:l,err:null})).catch(l=>n({res:null,err:l}))})}function Z1(e,r={},t={}){return new Promise(n=>{De.post(e,r,t).then(l=>n({res:l,err:null})).catch(l=>n({res:null,err:l}))})}function J1(e,r={},t={}){return De.get(e,fe({params:r},t))}function em(e,r={},t={}){return De.post(e,r,t)}function tm(e,r={}){return De.get(`/filehandle/${e}`,{params:r})}function rm(e,r={},t={}){return De.post(`/filehandle/${e}`,r,t)}function nm(e,r={}){return De.get(`/user/${e}`,{params:r})}function im(e,r={},t={}){return De.post(`/user/${e}`,r,t)}function om(e,r={}){return De.get(`${e}`,r.local?{params:r,baseURL:Un}:{params:r})}function am(e,r={}){return De.get(`/media/${e}/`,{params:r})}function sm(e,r={},t={}){return De.post(`/media/${e}/`,r,t)}function lm(e,r={}){return De.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${e}/`,{params:r})}function um(e,r={},t={}){return De.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${e}/`,r,t)}function cm(e,r={}){return De.get(`/history/${e}`,{params:r})}function fm(e,r={},t={}){return De.post(`/history/${e}`,r,t)}function hm(e,r={}){return De.get(`/scada/${e}`,{params:r})}function dm(e,r={},t={}){return De.post(`/scada/${e}`,r,t)}function pm(e,r={}){return De.get(`/common/factory/${e}`,{params:r})}function mm(e,r={},t={}){return De.post(`/common/factory/${e}`,r,t)}function ym(e,r={}){return De.get(`/factory/${e}`,{params:r})}function vm(e,r={},t={}){return De.post(`/factory/${e}`,r,t)}function gm(e,r={}){return De.get(`/pd/${e}`,{params:r})}function xm(e,r={},t={}){return De.post(`/pd/${e}`,r,t)}const vr={getApi:X1,postApi:Z1,getFileApi:tm,postFileApi:rm,getBaseApi:J1,postBaseApi:em,getUserApi:nm,postUserApi:im,getGraphApi:om,getMediaApi:am,postMediaApi:sm,getScadaApi:hm,postScadaApi:dm,getCommonApi:lm,postCommonApi:um,getHistoryApi:cm,postHistoryApi:fm,getFactoryApi:ym,postFactoryApi:vm,getCommonFactoryApi:pm,postCommonFactoryApi:mm,getPDApi:gm,postPDApi:xm};function bm(e){return{all:e=e||new Map,on:function(r,t){var n=e.get(r);n?n.push(t):e.set(r,[t])},off:function(r,t){var n=e.get(r);n&&(t?n.splice(n.indexOf(t)>>>0,1):e.set(r,[]))},emit:function(r,t){var n=e.get(r);n&&n.slice().map(function(l){l(t)}),(n=e.get("*"))&&n.slice().map(function(l){l(r,t)})}}}const Zo=bm();var p0={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(be,function(){var t=1e3,n=6e4,l=36e5,o="millisecond",a="second",u="minute",h="hour",s="day",i="week",p="month",c="quarter",f="year",d="date",v="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var z=["th","st","nd","rd"],V=I%100;return"["+I+(z[(V-20)%10]||z[V]||z[0])+"]"}},y=function(I,z,V){var te=String(I);return!te||te.length>=z?I:""+Array(z+1-te.length).join(V)+I},_={s:y,z:function(I){var z=-I.utcOffset(),V=Math.abs(z),te=Math.floor(V/60),W=V%60;return(z<=0?"+":"-")+y(te,2,"0")+":"+y(W,2,"0")},m:function I(z,V){if(z.date()<V.date())return-I(V,z);var te=12*(V.year()-z.year())+(V.month()-z.month()),W=z.clone().add(te,p),q=V-W<0,G=z.clone().add(te+(q?-1:1),p);return+(-(te+(V-W)/(q?W-G:G-W))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:p,y:f,w:i,d:s,D:d,h,m:u,s:a,ms:o,Q:c}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},T="en",D={};D[T]=g;var F="$isDayjsObject",R=function(I){return I instanceof A||!(!I||!I[F])},X=function I(z,V,te){var W;if(!z)return T;if(typeof z=="string"){var q=z.toLowerCase();D[q]&&(W=q),V&&(D[q]=V,W=q);var G=z.split("-");if(!W&&G.length>1)return I(G[0])}else{var U=z.name;D[U]=z,W=U}return!te&&W&&(T=W),W||!te&&T},H=function(I,z){if(R(I))return I.clone();var V=typeof z=="object"?z:{};return V.date=I,V.args=arguments,new A(V)},E=_;E.l=X,E.i=R,E.w=function(I,z){return H(I,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var A=function(){function I(V){this.$L=X(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[F]=!0}var z=I.prototype;return z.parse=function(V){this.$d=function(te){var W=te.date,q=te.utc;if(W===null)return new Date(NaN);if(E.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var G=W.match(m);if(G){var U=G[2]-1||0,L=(G[7]||"0").substring(0,3);return q?new Date(Date.UTC(G[1],U,G[3]||1,G[4]||0,G[5]||0,G[6]||0,L)):new Date(G[1],U,G[3]||1,G[4]||0,G[5]||0,G[6]||0,L)}}return new Date(W)}(V),this.init()},z.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},z.$utils=function(){return E},z.isValid=function(){return this.$d.toString()!==v},z.isSame=function(V,te){var W=H(V);return this.startOf(te)<=W&&W<=this.endOf(te)},z.isAfter=function(V,te){return H(V)<this.startOf(te)},z.isBefore=function(V,te){return this.endOf(te)<H(V)},z.$g=function(V,te,W){return E.u(V)?this[te]:this.set(W,V)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(V,te){var W=this,q=!!E.u(te)||te,G=E.p(V),U=function(x,w){var k=E.w(W.$u?Date.UTC(W.$y,w,x):new Date(W.$y,w,x),W);return q?k:k.endOf(s)},L=function(x,w){return E.w(W.toDate()[x].apply(W.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(w)),W)},Y=this.$W,P=this.$M,J=this.$D,ne="set"+(this.$u?"UTC":"");switch(G){case f:return q?U(1,0):U(31,11);case p:return q?U(1,P):U(0,P+1);case i:var ie=this.$locale().weekStart||0,ae=(Y<ie?Y+7:Y)-ie;return U(q?J-ae:J+(6-ae),P);case s:case d:return L(ne+"Hours",0);case h:return L(ne+"Minutes",1);case u:return L(ne+"Seconds",2);case a:return L(ne+"Milliseconds",3);default:return this.clone()}},z.endOf=function(V){return this.startOf(V,!1)},z.$set=function(V,te){var W,q=E.p(V),G="set"+(this.$u?"UTC":""),U=(W={},W[s]=G+"Date",W[d]=G+"Date",W[p]=G+"Month",W[f]=G+"FullYear",W[h]=G+"Hours",W[u]=G+"Minutes",W[a]=G+"Seconds",W[o]=G+"Milliseconds",W)[q],L=q===s?this.$D+(te-this.$W):te;if(q===p||q===f){var Y=this.clone().set(d,1);Y.$d[U](L),Y.init(),this.$d=Y.set(d,Math.min(this.$D,Y.daysInMonth())).$d}else U&&this.$d[U](L);return this.init(),this},z.set=function(V,te){return this.clone().$set(V,te)},z.get=function(V){return this[E.p(V)]()},z.add=function(V,te){var W,q=this;V=Number(V);var G=E.p(te),U=function(P){var J=H(q);return E.w(J.date(J.date()+Math.round(P*V)),q)};if(G===p)return this.set(p,this.$M+V);if(G===f)return this.set(f,this.$y+V);if(G===s)return U(1);if(G===i)return U(7);var L=(W={},W[u]=n,W[h]=l,W[a]=t,W)[G]||1,Y=this.$d.getTime()+V*L;return E.w(Y,this)},z.subtract=function(V,te){return this.add(-1*V,te)},z.format=function(V){var te=this,W=this.$locale();if(!this.isValid())return W.invalidDate||v;var q=V||"YYYY-MM-DDTHH:mm:ssZ",G=E.z(this),U=this.$H,L=this.$m,Y=this.$M,P=W.weekdays,J=W.months,ne=W.meridiem,ie=function(w,k,j,Z){return w&&(w[k]||w(te,q))||j[k].slice(0,Z)},ae=function(w){return E.s(U%12||12,w,"0")},x=ne||function(w,k,j){var Z=w<12?"AM":"PM";return j?Z.toLowerCase():Z};return q.replace(b,function(w,k){return k||function(j){switch(j){case"YY":return String(te.$y).slice(-2);case"YYYY":return E.s(te.$y,4,"0");case"M":return Y+1;case"MM":return E.s(Y+1,2,"0");case"MMM":return ie(W.monthsShort,Y,J,3);case"MMMM":return ie(J,Y);case"D":return te.$D;case"DD":return E.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return ie(W.weekdaysMin,te.$W,P,2);case"ddd":return ie(W.weekdaysShort,te.$W,P,3);case"dddd":return P[te.$W];case"H":return String(U);case"HH":return E.s(U,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return x(U,L,!0);case"A":return x(U,L,!1);case"m":return String(L);case"mm":return E.s(L,2,"0");case"s":return String(te.$s);case"ss":return E.s(te.$s,2,"0");case"SSS":return E.s(te.$ms,3,"0");case"Z":return G}return null}(w)||G.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(V,te,W){var q,G=this,U=E.p(te),L=H(V),Y=(L.utcOffset()-this.utcOffset())*n,P=this-L,J=function(){return E.m(G,L)};switch(U){case f:q=J()/12;break;case p:q=J();break;case c:q=J()/3;break;case i:q=(P-Y)/6048e5;break;case s:q=(P-Y)/864e5;break;case h:q=P/l;break;case u:q=P/n;break;case a:q=P/t;break;default:q=P}return W?q:E.a(q)},z.daysInMonth=function(){return this.endOf(p).$D},z.$locale=function(){return D[this.$L]},z.locale=function(V,te){if(!V)return this.$L;var W=this.clone(),q=X(V,te,!0);return q&&(W.$L=q),W},z.clone=function(){return E.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},I}(),S=A.prototype;return H.prototype=S,[["$ms",o],["$s",a],["$m",u],["$H",h],["$W",s],["$M",p],["$y",f],["$D",d]].forEach(function(I){S[I[1]]=function(z){return this.$g(z,I[0],I[1])}}),H.extend=function(I,z){return I.$i||(I(z,A,H),I.$i=!0),H},H.locale=X,H.isDayjs=R,H.unix=function(I){return H(1e3*I)},H.en=D[T],H.Ls=D,H.p={},H})})(p0);var wm=p0.exports;const _m=aa(wm),Em=[65535,-99999];function Ji(e){if(typeof e!="string")return!1;const r=/^-?\d+(\.\d+)?$/;return e.trim()!==""&&r.test(e.trim())}function wn(e){return typeof e=="number"&&!Em.includes(e)}const Bs=()=>{var n;const e={},r=((n=window.location.href.split("?"))==null?void 0:n[1])||"",t=new URLSearchParams(r);for(const[l,o]of t.entries())e[l]=o;return e};function ks(e){return Object.prototype.toString.call(e).slice(8,-1)}var Am={exports:{}};function Lr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var eo={exports:{}},Ts;function Ae(){return Ts||(Ts=1,function(e,r){(function(t,n){e.exports=n()})(be,function(){var t=t||function(n,l){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof be!="undefined"&&be.crypto&&(o=be.crypto),!o&&typeof Lr=="function")try{o=bu}catch(g){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(g){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},u=Object.create||function(){function g(){}return function(y){var _;return g.prototype=y,_=new g,g.prototype=null,_}}(),h={},s=h.lib={},i=s.Base=function(){return{extend:function(g){var y=u(this);return g&&y.mixIn(g),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var y in g)g.hasOwnProperty(y)&&(this[y]=g[y]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=s.WordArray=i.extend({init:function(g,y){g=this.words=g||[],y!=l?this.sigBytes=y:this.sigBytes=g.length*4},toString:function(g){return(g||f).stringify(this)},concat:function(g){var y=this.words,_=g.words,T=this.sigBytes,D=g.sigBytes;if(this.clamp(),T%4)for(var F=0;F<D;F++){var R=_[F>>>2]>>>24-F%4*8&255;y[T+F>>>2]|=R<<24-(T+F)%4*8}else for(var X=0;X<D;X+=4)y[T+X>>>2]=_[X>>>2];return this.sigBytes+=D,this},clamp:function(){var g=this.words,y=this.sigBytes;g[y>>>2]&=4294967295<<32-y%4*8,g.length=n.ceil(y/4)},clone:function(){var g=i.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var y=[],_=0;_<g;_+=4)y.push(a());return new p.init(y,g)}}),c=h.enc={},f=c.Hex={stringify:function(g){for(var y=g.words,_=g.sigBytes,T=[],D=0;D<_;D++){var F=y[D>>>2]>>>24-D%4*8&255;T.push((F>>>4).toString(16)),T.push((F&15).toString(16))}return T.join("")},parse:function(g){for(var y=g.length,_=[],T=0;T<y;T+=2)_[T>>>3]|=parseInt(g.substr(T,2),16)<<24-T%8*4;return new p.init(_,y/2)}},d=c.Latin1={stringify:function(g){for(var y=g.words,_=g.sigBytes,T=[],D=0;D<_;D++){var F=y[D>>>2]>>>24-D%4*8&255;T.push(String.fromCharCode(F))}return T.join("")},parse:function(g){for(var y=g.length,_=[],T=0;T<y;T++)_[T>>>2]|=(g.charCodeAt(T)&255)<<24-T%4*8;return new p.init(_,y)}},v=c.Utf8={stringify:function(g){try{return decodeURIComponent(escape(d.stringify(g)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(g){return d.parse(unescape(encodeURIComponent(g)))}},m=s.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=v.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var y,_=this._data,T=_.words,D=_.sigBytes,F=this.blockSize,R=F*4,X=D/R;g?X=n.ceil(X):X=n.max((X|0)-this._minBufferSize,0);var H=X*F,E=n.min(H*4,D);if(H){for(var A=0;A<H;A+=F)this._doProcessBlock(T,A);y=T.splice(0,H),_.sigBytes-=E}return new p.init(y,E)},clone:function(){var g=i.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0});s.Hasher=m.extend({cfg:i.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){g&&this._append(g);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(g){return function(y,_){return new g.init(_).finalize(y)}},_createHmacHelper:function(g){return function(y,_){return new b.HMAC.init(g,_).finalize(y)}}});var b=h.algo={};return h}(Math);return t})}(eo)),eo.exports}var to={exports:{}},Fs;function li(){return Fs||(Fs=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(n){var l=t,o=l.lib,a=o.Base,u=o.WordArray,h=l.x64={};h.Word=a.extend({init:function(s,i){this.high=s,this.low=i}}),h.WordArray=a.extend({init:function(s,i){s=this.words=s||[],i!=n?this.sigBytes=i:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,i=s.length,p=[],c=0;c<i;c++){var f=s[c];p.push(f.high),p.push(f.low)}return u.create(p,this.sigBytes)},clone:function(){for(var s=a.clone.call(this),i=s.words=this.words.slice(0),p=i.length,c=0;c<p;c++)i[c]=i[c].clone();return s}})}(),t})}(to)),to.exports}var ro={exports:{}},Ds;function Cm(){return Ds||(Ds=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,l=n.lib,o=l.WordArray,a=o.init,u=o.init=function(h){if(h instanceof ArrayBuffer&&(h=new Uint8Array(h)),(h instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&h instanceof Uint8ClampedArray||h instanceof Int16Array||h instanceof Uint16Array||h instanceof Int32Array||h instanceof Uint32Array||h instanceof Float32Array||h instanceof Float64Array)&&(h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength)),h instanceof Uint8Array){for(var s=h.byteLength,i=[],p=0;p<s;p++)i[p>>>2]|=h[p]<<24-p%4*8;a.call(this,i,s)}else a.apply(this,arguments)};u.prototype=o}}(),t.lib.WordArray})}(ro)),ro.exports}var no={exports:{}},Is;function Sm(){return Is||(Is=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(){var n=t,l=n.lib,o=l.WordArray,a=n.enc;a.Utf16=a.Utf16BE={stringify:function(h){for(var s=h.words,i=h.sigBytes,p=[],c=0;c<i;c+=2){var f=s[c>>>2]>>>16-c%4*8&65535;p.push(String.fromCharCode(f))}return p.join("")},parse:function(h){for(var s=h.length,i=[],p=0;p<s;p++)i[p>>>1]|=h.charCodeAt(p)<<16-p%2*16;return o.create(i,s*2)}},a.Utf16LE={stringify:function(h){for(var s=h.words,i=h.sigBytes,p=[],c=0;c<i;c+=2){var f=u(s[c>>>2]>>>16-c%4*8&65535);p.push(String.fromCharCode(f))}return p.join("")},parse:function(h){for(var s=h.length,i=[],p=0;p<s;p++)i[p>>>1]|=u(h.charCodeAt(p)<<16-p%2*16);return o.create(i,s*2)}};function u(h){return h<<8&4278255360|h>>>8&16711935}}(),t.enc.Utf16})}(no)),no.exports}var io={exports:{}},Rs;function nr(){return Rs||(Rs=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(){var n=t,l=n.lib,o=l.WordArray,a=n.enc;a.Base64={stringify:function(h){var s=h.words,i=h.sigBytes,p=this._map;h.clamp();for(var c=[],f=0;f<i;f+=3)for(var d=s[f>>>2]>>>24-f%4*8&255,v=s[f+1>>>2]>>>24-(f+1)%4*8&255,m=s[f+2>>>2]>>>24-(f+2)%4*8&255,b=d<<16|v<<8|m,g=0;g<4&&f+g*.75<i;g++)c.push(p.charAt(b>>>6*(3-g)&63));var y=p.charAt(64);if(y)for(;c.length%4;)c.push(y);return c.join("")},parse:function(h){var s=h.length,i=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var c=0;c<i.length;c++)p[i.charCodeAt(c)]=c}var f=i.charAt(64);if(f){var d=h.indexOf(f);d!==-1&&(s=d)}return u(h,s,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function u(h,s,i){for(var p=[],c=0,f=0;f<s;f++)if(f%4){var d=i[h.charCodeAt(f-1)]<<f%4*2,v=i[h.charCodeAt(f)]>>>6-f%4*2,m=d|v;p[c>>>2]|=m<<24-c%4*8,c++}return o.create(p,c)}}(),t.enc.Base64})}(io)),io.exports}var oo={exports:{}},Os;function Bm(){return Os||(Os=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(){var n=t,l=n.lib,o=l.WordArray,a=n.enc;a.Base64url={stringify:function(h,s){s===void 0&&(s=!0);var i=h.words,p=h.sigBytes,c=s?this._safe_map:this._map;h.clamp();for(var f=[],d=0;d<p;d+=3)for(var v=i[d>>>2]>>>24-d%4*8&255,m=i[d+1>>>2]>>>24-(d+1)%4*8&255,b=i[d+2>>>2]>>>24-(d+2)%4*8&255,g=v<<16|m<<8|b,y=0;y<4&&d+y*.75<p;y++)f.push(c.charAt(g>>>6*(3-y)&63));var _=c.charAt(64);if(_)for(;f.length%4;)f.push(_);return f.join("")},parse:function(h,s){s===void 0&&(s=!0);var i=h.length,p=s?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var f=0;f<p.length;f++)c[p.charCodeAt(f)]=f}var d=p.charAt(64);if(d){var v=h.indexOf(d);v!==-1&&(i=v)}return u(h,i,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function u(h,s,i){for(var p=[],c=0,f=0;f<s;f++)if(f%4){var d=i[h.charCodeAt(f-1)]<<f%4*2,v=i[h.charCodeAt(f)]>>>6-f%4*2,m=d|v;p[c>>>2]|=m<<24-c%4*8,c++}return o.create(p,c)}}(),t.enc.Base64url})}(oo)),oo.exports}var ao={exports:{}},Ps;function ir(){return Ps||(Ps=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(n){var l=t,o=l.lib,a=o.WordArray,u=o.Hasher,h=l.algo,s=[];(function(){for(var v=0;v<64;v++)s[v]=n.abs(n.sin(v+1))*4294967296|0})();var i=h.MD5=u.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,m){for(var b=0;b<16;b++){var g=m+b,y=v[g];v[g]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var _=this._hash.words,T=v[m+0],D=v[m+1],F=v[m+2],R=v[m+3],X=v[m+4],H=v[m+5],E=v[m+6],A=v[m+7],S=v[m+8],I=v[m+9],z=v[m+10],V=v[m+11],te=v[m+12],W=v[m+13],q=v[m+14],G=v[m+15],U=_[0],L=_[1],Y=_[2],P=_[3];U=p(U,L,Y,P,T,7,s[0]),P=p(P,U,L,Y,D,12,s[1]),Y=p(Y,P,U,L,F,17,s[2]),L=p(L,Y,P,U,R,22,s[3]),U=p(U,L,Y,P,X,7,s[4]),P=p(P,U,L,Y,H,12,s[5]),Y=p(Y,P,U,L,E,17,s[6]),L=p(L,Y,P,U,A,22,s[7]),U=p(U,L,Y,P,S,7,s[8]),P=p(P,U,L,Y,I,12,s[9]),Y=p(Y,P,U,L,z,17,s[10]),L=p(L,Y,P,U,V,22,s[11]),U=p(U,L,Y,P,te,7,s[12]),P=p(P,U,L,Y,W,12,s[13]),Y=p(Y,P,U,L,q,17,s[14]),L=p(L,Y,P,U,G,22,s[15]),U=c(U,L,Y,P,D,5,s[16]),P=c(P,U,L,Y,E,9,s[17]),Y=c(Y,P,U,L,V,14,s[18]),L=c(L,Y,P,U,T,20,s[19]),U=c(U,L,Y,P,H,5,s[20]),P=c(P,U,L,Y,z,9,s[21]),Y=c(Y,P,U,L,G,14,s[22]),L=c(L,Y,P,U,X,20,s[23]),U=c(U,L,Y,P,I,5,s[24]),P=c(P,U,L,Y,q,9,s[25]),Y=c(Y,P,U,L,R,14,s[26]),L=c(L,Y,P,U,S,20,s[27]),U=c(U,L,Y,P,W,5,s[28]),P=c(P,U,L,Y,F,9,s[29]),Y=c(Y,P,U,L,A,14,s[30]),L=c(L,Y,P,U,te,20,s[31]),U=f(U,L,Y,P,H,4,s[32]),P=f(P,U,L,Y,S,11,s[33]),Y=f(Y,P,U,L,V,16,s[34]),L=f(L,Y,P,U,q,23,s[35]),U=f(U,L,Y,P,D,4,s[36]),P=f(P,U,L,Y,X,11,s[37]),Y=f(Y,P,U,L,A,16,s[38]),L=f(L,Y,P,U,z,23,s[39]),U=f(U,L,Y,P,W,4,s[40]),P=f(P,U,L,Y,T,11,s[41]),Y=f(Y,P,U,L,R,16,s[42]),L=f(L,Y,P,U,E,23,s[43]),U=f(U,L,Y,P,I,4,s[44]),P=f(P,U,L,Y,te,11,s[45]),Y=f(Y,P,U,L,G,16,s[46]),L=f(L,Y,P,U,F,23,s[47]),U=d(U,L,Y,P,T,6,s[48]),P=d(P,U,L,Y,A,10,s[49]),Y=d(Y,P,U,L,q,15,s[50]),L=d(L,Y,P,U,H,21,s[51]),U=d(U,L,Y,P,te,6,s[52]),P=d(P,U,L,Y,R,10,s[53]),Y=d(Y,P,U,L,z,15,s[54]),L=d(L,Y,P,U,D,21,s[55]),U=d(U,L,Y,P,S,6,s[56]),P=d(P,U,L,Y,G,10,s[57]),Y=d(Y,P,U,L,E,15,s[58]),L=d(L,Y,P,U,W,21,s[59]),U=d(U,L,Y,P,X,6,s[60]),P=d(P,U,L,Y,V,10,s[61]),Y=d(Y,P,U,L,F,15,s[62]),L=d(L,Y,P,U,I,21,s[63]),_[0]=_[0]+U|0,_[1]=_[1]+L|0,_[2]=_[2]+Y|0,_[3]=_[3]+P|0},_doFinalize:function(){var v=this._data,m=v.words,b=this._nDataBytes*8,g=v.sigBytes*8;m[g>>>5]|=128<<24-g%32;var y=n.floor(b/4294967296),_=b;m[(g+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m[(g+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,v.sigBytes=(m.length+1)*4,this._process();for(var T=this._hash,D=T.words,F=0;F<4;F++){var R=D[F];D[F]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return T},clone:function(){var v=u.clone.call(this);return v._hash=this._hash.clone(),v}});function p(v,m,b,g,y,_,T){var D=v+(m&b|~m&g)+y+T;return(D<<_|D>>>32-_)+m}function c(v,m,b,g,y,_,T){var D=v+(m&g|b&~g)+y+T;return(D<<_|D>>>32-_)+m}function f(v,m,b,g,y,_,T){var D=v+(m^b^g)+y+T;return(D<<_|D>>>32-_)+m}function d(v,m,b,g,y,_,T){var D=v+(b^(m|~g))+y+T;return(D<<_|D>>>32-_)+m}l.MD5=u._createHelper(i),l.HmacMD5=u._createHmacHelper(i)}(Math),t.MD5})}(ao)),ao.exports}var so={exports:{}},Ns;function m0(){return Ns||(Ns=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(){var n=t,l=n.lib,o=l.WordArray,a=l.Hasher,u=n.algo,h=[],s=u.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(i,p){for(var c=this._hash.words,f=c[0],d=c[1],v=c[2],m=c[3],b=c[4],g=0;g<80;g++){if(g<16)h[g]=i[p+g]|0;else{var y=h[g-3]^h[g-8]^h[g-14]^h[g-16];h[g]=y<<1|y>>>31}var _=(f<<5|f>>>27)+b+h[g];g<20?_+=(d&v|~d&m)+1518500249:g<40?_+=(d^v^m)+1859775393:g<60?_+=(d&v|d&m|v&m)-1894007588:_+=(d^v^m)-899497514,b=m,m=v,v=d<<30|d>>>2,d=f,f=_}c[0]=c[0]+f|0,c[1]=c[1]+d|0,c[2]=c[2]+v|0,c[3]=c[3]+m|0,c[4]=c[4]+b|0},_doFinalize:function(){var i=this._data,p=i.words,c=this._nDataBytes*8,f=i.sigBytes*8;return p[f>>>5]|=128<<24-f%32,p[(f+64>>>9<<4)+14]=Math.floor(c/4294967296),p[(f+64>>>9<<4)+15]=c,i.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var i=a.clone.call(this);return i._hash=this._hash.clone(),i}});n.SHA1=a._createHelper(s),n.HmacSHA1=a._createHmacHelper(s)}(),t.SHA1})}(so)),so.exports}var lo={exports:{}},Ms;function ga(){return Ms||(Ms=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){return function(n){var l=t,o=l.lib,a=o.WordArray,u=o.Hasher,h=l.algo,s=[],i=[];(function(){function f(b){for(var g=n.sqrt(b),y=2;y<=g;y++)if(!(b%y))return!1;return!0}function d(b){return(b-(b|0))*4294967296|0}for(var v=2,m=0;m<64;)f(v)&&(m<8&&(s[m]=d(n.pow(v,1/2))),i[m]=d(n.pow(v,1/3)),m++),v++})();var p=[],c=h.SHA256=u.extend({_doReset:function(){this._hash=new a.init(s.slice(0))},_doProcessBlock:function(f,d){for(var v=this._hash.words,m=v[0],b=v[1],g=v[2],y=v[3],_=v[4],T=v[5],D=v[6],F=v[7],R=0;R<64;R++){if(R<16)p[R]=f[d+R]|0;else{var X=p[R-15],H=(X<<25|X>>>7)^(X<<14|X>>>18)^X>>>3,E=p[R-2],A=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;p[R]=H+p[R-7]+A+p[R-16]}var S=_&T^~_&D,I=m&b^m&g^b&g,z=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),V=(_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25),te=F+V+S+i[R]+p[R],W=z+I;F=D,D=T,T=_,_=y+te|0,y=g,g=b,b=m,m=te+W|0}v[0]=v[0]+m|0,v[1]=v[1]+b|0,v[2]=v[2]+g|0,v[3]=v[3]+y|0,v[4]=v[4]+_|0,v[5]=v[5]+T|0,v[6]=v[6]+D|0,v[7]=v[7]+F|0},_doFinalize:function(){var f=this._data,d=f.words,v=this._nDataBytes*8,m=f.sigBytes*8;return d[m>>>5]|=128<<24-m%32,d[(m+64>>>9<<4)+14]=n.floor(v/4294967296),d[(m+64>>>9<<4)+15]=v,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=u.clone.call(this);return f._hash=this._hash.clone(),f}});l.SHA256=u._createHelper(c),l.HmacSHA256=u._createHmacHelper(c)}(Math),t.SHA256})}(lo)),lo.exports}var uo={exports:{}},Ls;function km(){return Ls||(Ls=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ga())})(be,function(t){return function(){var n=t,l=n.lib,o=l.WordArray,a=n.algo,u=a.SHA256,h=a.SHA224=u.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=u._doFinalize.call(this);return s.sigBytes-=4,s}});n.SHA224=u._createHelper(h),n.HmacSHA224=u._createHmacHelper(h)}(),t.SHA224})}(uo)),uo.exports}var co={exports:{}},Us;function y0(){return Us||(Us=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),li())})(be,function(t){return function(){var n=t,l=n.lib,o=l.Hasher,a=n.x64,u=a.Word,h=a.WordArray,s=n.algo;function i(){return u.create.apply(u,arguments)}var p=[i(1116352408,3609767458),i(1899447441,602891725),i(3049323471,3964484399),i(3921009573,2173295548),i(961987163,4081628472),i(1508970993,3053834265),i(2453635748,2937671579),i(2870763221,3664609560),i(3624381080,2734883394),i(310598401,1164996542),i(607225278,1323610764),i(1426881987,3590304994),i(1925078388,4068182383),i(2162078206,991336113),i(2614888103,633803317),i(3248222580,3479774868),i(3835390401,2666613458),i(4022224774,944711139),i(264347078,2341262773),i(604807628,2007800933),i(770255983,1495990901),i(1249150122,1856431235),i(1555081692,3175218132),i(1996064986,2198950837),i(2554220882,3999719339),i(2821834349,766784016),i(2952996808,2566594879),i(3210313671,3203337956),i(3336571891,1034457026),i(3584528711,2466948901),i(113926993,3758326383),i(338241895,168717936),i(666307205,1188179964),i(773529912,1546045734),i(1294757372,1522805485),i(1396182291,2643833823),i(1695183700,2343527390),i(1986661051,1014477480),i(2177026350,1206759142),i(2456956037,344077627),i(2730485921,1290863460),i(2820302411,3158454273),i(3259730800,3505952657),i(3345764771,106217008),i(3516065817,3606008344),i(3600352804,1432725776),i(4094571909,1467031594),i(275423344,851169720),i(430227734,3100823752),i(506948616,1363258195),i(659060556,3750685593),i(883997877,3785050280),i(958139571,3318307427),i(1322822218,3812723403),i(1537002063,2003034995),i(1747873779,3602036899),i(1955562222,1575990012),i(2024104815,1125592928),i(2227730452,2716904306),i(2361852424,442776044),i(2428436474,593698344),i(2756734187,3733110249),i(3204031479,2999351573),i(3329325298,3815920427),i(3391569614,3928383900),i(3515267271,566280711),i(3940187606,3454069534),i(4118630271,4000239992),i(116418474,1914138554),i(174292421,2731055270),i(289380356,3203993006),i(460393269,320620315),i(685471733,587496836),i(852142971,1086792851),i(1017036298,365543100),i(1126000580,2618297676),i(1288033470,3409855158),i(1501505948,4234509866),i(1607167915,987167468),i(1816402316,1246189591)],c=[];(function(){for(var d=0;d<80;d++)c[d]=i()})();var f=s.SHA512=o.extend({_doReset:function(){this._hash=new h.init([new u.init(1779033703,4089235720),new u.init(3144134277,2227873595),new u.init(1013904242,4271175723),new u.init(2773480762,1595750129),new u.init(1359893119,2917565137),new u.init(2600822924,725511199),new u.init(528734635,4215389547),new u.init(1541459225,327033209)])},_doProcessBlock:function(d,v){for(var m=this._hash.words,b=m[0],g=m[1],y=m[2],_=m[3],T=m[4],D=m[5],F=m[6],R=m[7],X=b.high,H=b.low,E=g.high,A=g.low,S=y.high,I=y.low,z=_.high,V=_.low,te=T.high,W=T.low,q=D.high,G=D.low,U=F.high,L=F.low,Y=R.high,P=R.low,J=X,ne=H,ie=E,ae=A,x=S,w=I,k=z,j=V,Z=te,ee=W,re=q,M=G,C=U,B=L,K=Y,oe=P,ue=0;ue<80;ue++){var ce,me,xe=c[ue];if(ue<16)me=xe.high=d[v+ue*2]|0,ce=xe.low=d[v+ue*2+1]|0;else{var Ce=c[ue-15],Te=Ce.high,Be=Ce.low,Tt=(Te>>>1|Be<<31)^(Te>>>8|Be<<24)^Te>>>7,__$t__=(Be>>>1|Te<<31)^(Be>>>8|Te<<24)^(Be>>>7|Te<<25),qt=c[ue-2],Ft=qt.high,zt=qt.low,fi=(Ft>>>19|zt<<13)^(Ft<<3|zt>>>29)^Ft>>>6,sr=(zt>>>19|Ft<<13)^(zt<<3|Ft>>>29)^(zt>>>6|Ft<<26),on=c[ue-7],an=on.high,hi=on.low,Rr=c[ue-16],di=Rr.high,sn=Rr.low;ce=__$t__+hi,me=Tt+an+(ce>>>0<__$t__>>>0?1:0),ce=ce+sr,me=me+fi+(ce>>>0<sr>>>0?1:0),ce=ce+sn,me=me+di+(ce>>>0<sn>>>0?1:0),xe.high=me,xe.low=ce}var pi=Z&re^~Z&C,ln=ee&M^~ee&B,mi=J&ie^J&x^ie&x,yi=ne&ae^ne&w^ae&w,vi=(J>>>28|ne<<4)^(J<<30|ne>>>2)^(J<<25|ne>>>7),un=(ne>>>28|J<<4)^(ne<<30|J>>>2)^(ne<<25|J>>>7),gi=(Z>>>14|ee<<18)^(Z>>>18|ee<<14)^(Z<<23|ee>>>9),xi=(ee>>>14|Z<<18)^(ee>>>18|Z<<14)^(ee<<23|Z>>>9),cn=p[ue],bi=cn.high,fn=cn.low,Qe=oe+xi,mt=K+gi+(Qe>>>0<oe>>>0?1:0),Qe=Qe+ln,mt=mt+pi+(Qe>>>0<ln>>>0?1:0),Qe=Qe+fn,mt=mt+bi+(Qe>>>0<fn>>>0?1:0),Qe=Qe+ce,mt=mt+me+(Qe>>>0<ce>>>0?1:0),hn=un+yi,wi=vi+mi+(hn>>>0<un>>>0?1:0);K=C,oe=B,C=re,B=M,re=Z,M=ee,ee=j+Qe|0,Z=k+mt+(ee>>>0<j>>>0?1:0)|0,k=x,j=w,x=ie,w=ae,ie=J,ae=ne,ne=Qe+hn|0,J=mt+wi+(ne>>>0<Qe>>>0?1:0)|0}H=b.low=H+ne,b.high=X+J+(H>>>0<ne>>>0?1:0),A=g.low=A+ae,g.high=E+ie+(A>>>0<ae>>>0?1:0),I=y.low=I+w,y.high=S+x+(I>>>0<w>>>0?1:0),V=_.low=V+j,_.high=z+k+(V>>>0<j>>>0?1:0),W=T.low=W+ee,T.high=te+Z+(W>>>0<ee>>>0?1:0),G=D.low=G+M,D.high=q+re+(G>>>0<M>>>0?1:0),L=F.low=L+B,F.high=U+C+(L>>>0<B>>>0?1:0),P=R.low=P+oe,R.high=Y+K+(P>>>0<oe>>>0?1:0)},_doFinalize:function(){var d=this._data,v=d.words,m=this._nDataBytes*8,b=d.sigBytes*8;v[b>>>5]|=128<<24-b%32,v[(b+128>>>10<<5)+30]=Math.floor(m/4294967296),v[(b+128>>>10<<5)+31]=m,d.sigBytes=v.length*4,this._process();var g=this._hash.toX32();return g},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});n.SHA512=o._createHelper(f),n.HmacSHA512=o._createHmacHelper(f)}(),t.SHA512})}(co)),co.exports}var fo={exports:{}},$s;function Tm(){return $s||($s=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),li(),y0())})(be,function(t){return function(){var n=t,l=n.x64,o=l.Word,a=l.WordArray,u=n.algo,h=u.SHA512,s=u.SHA384=h.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var i=h._doFinalize.call(this);return i.sigBytes-=16,i}});n.SHA384=h._createHelper(s),n.HmacSHA384=h._createHmacHelper(s)}(),t.SHA384})}(fo)),fo.exports}var ho={exports:{}},qs;function Fm(){return qs||(qs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),li())})(be,function(t){return function(n){var l=t,o=l.lib,a=o.WordArray,u=o.Hasher,h=l.x64,s=h.Word,i=l.algo,p=[],c=[],f=[];(function(){for(var m=1,b=0,g=0;g<24;g++){p[m+5*b]=(g+1)*(g+2)/2%64;var y=b%5,_=(2*m+3*b)%5;m=y,b=_}for(var m=0;m<5;m++)for(var b=0;b<5;b++)c[m+5*b]=b+(2*m+3*b)%5*5;for(var T=1,D=0;D<24;D++){for(var F=0,R=0,X=0;X<7;X++){if(T&1){var H=(1<<X)-1;H<32?R^=1<<H:F^=1<<H-32}T&128?T=T<<1^113:T<<=1}f[D]=s.create(F,R)}})();var d=[];(function(){for(var m=0;m<25;m++)d[m]=s.create()})();var v=i.SHA3=u.extend({cfg:u.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],b=0;b<25;b++)m[b]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,b){for(var g=this._state,y=this.blockSize/2,_=0;_<y;_++){var T=m[b+2*_],D=m[b+2*_+1];T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360;var F=g[_];F.high^=D,F.low^=T}for(var R=0;R<24;R++){for(var X=0;X<5;X++){for(var H=0,E=0,A=0;A<5;A++){var F=g[X+5*A];H^=F.high,E^=F.low}var S=d[X];S.high=H,S.low=E}for(var X=0;X<5;X++)for(var I=d[(X+4)%5],z=d[(X+1)%5],V=z.high,te=z.low,H=I.high^(V<<1|te>>>31),E=I.low^(te<<1|V>>>31),A=0;A<5;A++){var F=g[X+5*A];F.high^=H,F.low^=E}for(var W=1;W<25;W++){var H,E,F=g[W],q=F.high,G=F.low,U=p[W];U<32?(H=q<<U|G>>>32-U,E=G<<U|q>>>32-U):(H=G<<U-32|q>>>64-U,E=q<<U-32|G>>>64-U);var L=d[c[W]];L.high=H,L.low=E}var Y=d[0],P=g[0];Y.high=P.high,Y.low=P.low;for(var X=0;X<5;X++)for(var A=0;A<5;A++){var W=X+5*A,F=g[W],J=d[W],ne=d[(X+1)%5+5*A],ie=d[(X+2)%5+5*A];F.high=J.high^~ne.high&ie.high,F.low=J.low^~ne.low&ie.low}var F=g[0],ae=f[R];F.high^=ae.high,F.low^=ae.low}},_doFinalize:function(){var m=this._data,b=m.words;this._nDataBytes*8;var g=m.sigBytes*8,y=this.blockSize*32;b[g>>>5]|=1<<24-g%32,b[(n.ceil((g+1)/y)*y>>>5)-1]|=128,m.sigBytes=b.length*4,this._process();for(var _=this._state,T=this.cfg.outputLength/8,D=T/8,F=[],R=0;R<D;R++){var X=_[R],H=X.high,E=X.low;H=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,F.push(E),F.push(H)}return new a.init(F,T)},clone:function(){for(var m=u.clone.call(this),b=m._state=this._state.slice(0),g=0;g<25;g++)b[g]=b[g].clone();return m}});l.SHA3=u._createHelper(v),l.HmacSHA3=u._createHmacHelper(v)}(Math),t.SHA3})}(ho)),ho.exports}var po={exports:{}},zs;function Dm(){return zs||(zs=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){/** @preserve
14
17
  (c) 2012 by Cédric Mesnil. All rights reserved.
15
18
 
16
19
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -19,29 +22,29 @@
19
22
  - 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.
20
23
 
21
24
  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.
22
- */return function(n){var l=t,a=l.lib,o=a.WordArray,u=a.Hasher,d=l.algo,s=o.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]),i=o.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]),p=o.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]),c=o.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]),f=o.create([0,1518500249,1859775393,2400959708,2840853838]),h=o.create([1352829926,1548603684,1836072691,2053994217,0]),v=d.RIPEMD160=u.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(B,F){for(var R=0;R<16;R++){var Z=F+R,j=B[Z];B[Z]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360}var E=this._hash.words,A=f.words,C=h.words,I=s.words,z=i.words,W=p.words,G=c.words,q,N,V,L,O,K,H,J,ne,ie;K=q=E[0],H=N=E[1],J=V=E[2],ne=L=E[3],ie=O=E[4];for(var te,R=0;R<80;R+=1)te=q+B[F+I[R]]|0,R<16?te+=m(N,V,L)+A[0]:R<32?te+=g(N,V,L)+A[1]:R<48?te+=b(N,V,L)+A[2]:R<64?te+=y(N,V,L)+A[3]:te+=_(N,V,L)+A[4],te=te|0,te=T(te,W[R]),te=te+O|0,q=O,O=L,L=T(V,10),V=N,N=te,te=K+B[F+z[R]]|0,R<16?te+=_(H,J,ne)+C[0]:R<32?te+=y(H,J,ne)+C[1]:R<48?te+=b(H,J,ne)+C[2]:R<64?te+=g(H,J,ne)+C[3]:te+=m(H,J,ne)+C[4],te=te|0,te=T(te,G[R]),te=te+ie|0,K=ie,ie=ne,ne=T(J,10),J=H,H=te;te=E[1]+V+ne|0,E[1]=E[2]+L+ie|0,E[2]=E[3]+O+K|0,E[3]=E[4]+q+H|0,E[4]=E[0]+N+J|0,E[0]=te},_doFinalize:function(){var B=this._data,F=B.words,R=this._nDataBytes*8,Z=B.sigBytes*8;F[Z>>>5]|=128<<24-Z%32,F[(Z+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,B.sigBytes=(F.length+1)*4,this._process();for(var j=this._hash,E=j.words,A=0;A<5;A++){var C=E[A];E[A]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return j},clone:function(){var B=u.clone.call(this);return B._hash=this._hash.clone(),B}});function m(B,F,R){return B^F^R}function g(B,F,R){return B&F|~B&R}function b(B,F,R){return(B|~F)^R}function y(B,F,R){return B&R|F&~R}function _(B,F,R){return B^(F|~R)}function T(B,F){return B<<F|B>>>32-F}l.RIPEMD160=u._createHelper(v),l.HmacRIPEMD160=u._createHmacHelper(v)}(),t.RIPEMD160})}(so)),so.exports}var lo={exports:{}},zs;function pa(){return zs||(zs=1,function(e,r){(function(t,n){e.exports=n(Ae())})(xe,function(t){(function(){var n=t,l=n.lib,a=l.Base,o=n.enc,u=o.Utf8,d=n.algo;d.HMAC=a.extend({init:function(s,i){s=this._hasher=new s.init,typeof i=="string"&&(i=u.parse(i));var p=s.blockSize,c=p*4;i.sigBytes>c&&(i=s.finalize(i)),i.clamp();for(var f=this._oKey=i.clone(),h=this._iKey=i.clone(),v=f.words,m=h.words,g=0;g<p;g++)v[g]^=1549556828,m[g]^=909522486;f.sigBytes=h.sigBytes=c,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var i=this._hasher,p=i.finalize(s);i.reset();var c=i.finalize(this._oKey.clone().concat(p));return c}})})()})}(lo)),lo.exports}var uo={exports:{}},js;function H1(){return js||(js=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),da(),pa())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.Base,o=l.WordArray,u=n.algo,d=u.SHA256,s=u.HMAC,i=u.PBKDF2=a.extend({cfg:a.extend({keySize:128/32,hasher:d,iterations:25e4}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,c){for(var f=this.cfg,h=s.create(f.hasher,p),v=o.create(),m=o.create([1]),g=v.words,b=m.words,y=f.keySize,_=f.iterations;g.length<y;){var T=h.update(c).finalize(m);h.reset();for(var B=T.words,F=B.length,R=T,Z=1;Z<_;Z++){R=h.finalize(R),h.reset();for(var j=R.words,E=0;E<F;E++)B[E]^=j[E]}v.concat(T),b[0]++}return v.sigBytes=y*4,v}});n.PBKDF2=function(p,c,f){return i.create(f).compute(p,c)}}(),t.PBKDF2})}(uo)),uo.exports}var co={exports:{}},Hs;function Mt(){return Hs||(Hs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),t0(),pa())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.Base,o=l.WordArray,u=n.algo,d=u.MD5,s=u.EvpKDF=a.extend({cfg:a.extend({keySize:128/32,hasher:d,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,p){for(var c,f=this.cfg,h=f.hasher.create(),v=o.create(),m=v.words,g=f.keySize,b=f.iterations;m.length<g;){c&&h.update(c),c=h.update(i).finalize(p),h.reset();for(var y=1;y<b;y++)c=h.finalize(c),h.reset();v.concat(c)}return v.sigBytes=g*4,v}});n.EvpKDF=function(i,p,c){return s.create(c).compute(i,p)}}(),t.EvpKDF})}(co)),co.exports}var fo={exports:{}},Vs;function ze(){return Vs||(Vs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),Mt())})(xe,function(t){t.lib.Cipher||function(n){var l=t,a=l.lib,o=a.Base,u=a.WordArray,d=a.BufferedBlockAlgorithm,s=l.enc;s.Utf8;var i=s.Base64,p=l.algo,c=p.EvpKDF,f=a.Cipher=d.extend({cfg:o.extend(),createEncryptor:function(j,E){return this.create(this._ENC_XFORM_MODE,j,E)},createDecryptor:function(j,E){return this.create(this._DEC_XFORM_MODE,j,E)},init:function(j,E,A){this.cfg=this.cfg.extend(A),this._xformMode=j,this._key=E,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(j){return this._append(j),this._process()},finalize:function(j){j&&this._append(j);var E=this._doFinalize();return E},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function j(E){return typeof E=="string"?Z:B}return function(E){return{encrypt:function(A,C,I){return j(C).encrypt(E,A,C,I)},decrypt:function(A,C,I){return j(C).decrypt(E,A,C,I)}}}}()});a.StreamCipher=f.extend({_doFinalize:function(){var j=this._process(!0);return j},blockSize:1});var h=l.mode={},v=a.BlockCipherMode=o.extend({createEncryptor:function(j,E){return this.Encryptor.create(j,E)},createDecryptor:function(j,E){return this.Decryptor.create(j,E)},init:function(j,E){this._cipher=j,this._iv=E}}),m=h.CBC=function(){var j=v.extend();j.Encryptor=j.extend({processBlock:function(A,C){var I=this._cipher,z=I.blockSize;E.call(this,A,C,z),I.encryptBlock(A,C),this._prevBlock=A.slice(C,C+z)}}),j.Decryptor=j.extend({processBlock:function(A,C){var I=this._cipher,z=I.blockSize,W=A.slice(C,C+z);I.decryptBlock(A,C),E.call(this,A,C,z),this._prevBlock=W}});function E(A,C,I){var z,W=this._iv;W?(z=W,this._iv=n):z=this._prevBlock;for(var G=0;G<I;G++)A[C+G]^=z[G]}return j}(),g=l.pad={},b=g.Pkcs7={pad:function(j,E){for(var A=E*4,C=A-j.sigBytes%A,I=C<<24|C<<16|C<<8|C,z=[],W=0;W<C;W+=4)z.push(I);var G=u.create(z,C);j.concat(G)},unpad:function(j){var E=j.words[j.sigBytes-1>>>2]&255;j.sigBytes-=E}};a.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:b}),reset:function(){var j;f.reset.call(this);var E=this.cfg,A=E.iv,C=E.mode;this._xformMode==this._ENC_XFORM_MODE?j=C.createEncryptor:(j=C.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==j?this._mode.init(this,A&&A.words):(this._mode=j.call(C,this,A&&A.words),this._mode.__creator=j)},_doProcessBlock:function(j,E){this._mode.processBlock(j,E)},_doFinalize:function(){var j,E=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(E.pad(this._data,this.blockSize),j=this._process(!0)):(j=this._process(!0),E.unpad(j)),j},blockSize:128/32});var y=a.CipherParams=o.extend({init:function(j){this.mixIn(j)},toString:function(j){return(j||this.formatter).stringify(this)}}),_=l.format={},T=_.OpenSSL={stringify:function(j){var E,A=j.ciphertext,C=j.salt;return C?E=u.create([1398893684,1701076831]).concat(C).concat(A):E=A,E.toString(i)},parse:function(j){var E,A=i.parse(j),C=A.words;return C[0]==1398893684&&C[1]==1701076831&&(E=u.create(C.slice(2,4)),C.splice(0,4),A.sigBytes-=16),y.create({ciphertext:A,salt:E})}},B=a.SerializableCipher=o.extend({cfg:o.extend({format:T}),encrypt:function(j,E,A,C){C=this.cfg.extend(C);var I=j.createEncryptor(A,C),z=I.finalize(E),W=I.cfg;return y.create({ciphertext:z,key:A,iv:W.iv,algorithm:j,mode:W.mode,padding:W.padding,blockSize:j.blockSize,formatter:C.format})},decrypt:function(j,E,A,C){C=this.cfg.extend(C),E=this._parse(E,C.format);var I=j.createDecryptor(A,C).finalize(E.ciphertext);return I},_parse:function(j,E){return typeof j=="string"?E.parse(j,this):j}}),F=l.kdf={},R=F.OpenSSL={execute:function(j,E,A,C,I){if(C||(C=u.random(64/8)),I)var z=c.create({keySize:E+A,hasher:I}).compute(j,C);else var z=c.create({keySize:E+A}).compute(j,C);var W=u.create(z.words.slice(E),A*4);return z.sigBytes=E*4,y.create({key:z,iv:W,salt:C})}},Z=a.PasswordBasedCipher=B.extend({cfg:B.cfg.extend({kdf:R}),encrypt:function(j,E,A,C){C=this.cfg.extend(C);var I=C.kdf.execute(A,j.keySize,j.ivSize,C.salt,C.hasher);C.iv=I.iv;var z=B.encrypt.call(this,j,E,I.key,C);return z.mixIn(I),z},decrypt:function(j,E,A,C){C=this.cfg.extend(C),E=this._parse(E,C.format);var I=C.kdf.execute(A,j.keySize,j.ivSize,E.salt,C.hasher);C.iv=I.iv;var z=B.decrypt.call(this,j,E,I.key,C);return z}})}()})}(fo)),fo.exports}var ho={exports:{}},Ws;function V1(){return Ws||(Ws=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.mode.CFB=function(){var n=t.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(a,o){var u=this._cipher,d=u.blockSize;l.call(this,a,o,d,u),this._prevBlock=a.slice(o,o+d)}}),n.Decryptor=n.extend({processBlock:function(a,o){var u=this._cipher,d=u.blockSize,s=a.slice(o,o+d);l.call(this,a,o,d,u),this._prevBlock=s}});function l(a,o,u,d){var s,i=this._iv;i?(s=i.slice(0),this._iv=void 0):s=this._prevBlock,d.encryptBlock(s,0);for(var p=0;p<u;p++)a[o+p]^=s[p]}return n}(),t.mode.CFB})}(ho)),ho.exports}var po={exports:{}},Ks;function W1(){return Ks||(Ks=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.mode.CTR=function(){var n=t.lib.BlockCipherMode.extend(),l=n.Encryptor=n.extend({processBlock:function(a,o){var u=this._cipher,d=u.blockSize,s=this._iv,i=this._counter;s&&(i=this._counter=s.slice(0),this._iv=void 0);var p=i.slice(0);u.encryptBlock(p,0),i[d-1]=i[d-1]+1|0;for(var c=0;c<d;c++)a[o+c]^=p[c]}});return n.Decryptor=l,n}(),t.mode.CTR})}(po)),po.exports}var mo={exports:{}},Gs;function K1(){return Gs||(Gs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){/** @preserve
25
+ */return function(n){var l=t,o=l.lib,a=o.WordArray,u=o.Hasher,h=l.algo,s=a.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]),i=a.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]),p=a.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]),c=a.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]),f=a.create([0,1518500249,1859775393,2400959708,2840853838]),d=a.create([1352829926,1548603684,1836072691,2053994217,0]),v=h.RIPEMD160=u.extend({_doReset:function(){this._hash=a.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(D,F){for(var R=0;R<16;R++){var X=F+R,H=D[X];D[X]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}var E=this._hash.words,A=f.words,S=d.words,I=s.words,z=i.words,V=p.words,te=c.words,W,q,G,U,L,Y,P,J,ne,ie;Y=W=E[0],P=q=E[1],J=G=E[2],ne=U=E[3],ie=L=E[4];for(var ae,R=0;R<80;R+=1)ae=W+D[F+I[R]]|0,R<16?ae+=m(q,G,U)+A[0]:R<32?ae+=b(q,G,U)+A[1]:R<48?ae+=g(q,G,U)+A[2]:R<64?ae+=y(q,G,U)+A[3]:ae+=_(q,G,U)+A[4],ae=ae|0,ae=T(ae,V[R]),ae=ae+L|0,W=L,L=U,U=T(G,10),G=q,q=ae,ae=Y+D[F+z[R]]|0,R<16?ae+=_(P,J,ne)+S[0]:R<32?ae+=y(P,J,ne)+S[1]:R<48?ae+=g(P,J,ne)+S[2]:R<64?ae+=b(P,J,ne)+S[3]:ae+=m(P,J,ne)+S[4],ae=ae|0,ae=T(ae,te[R]),ae=ae+ie|0,Y=ie,ie=ne,ne=T(J,10),J=P,P=ae;ae=E[1]+G+ne|0,E[1]=E[2]+U+ie|0,E[2]=E[3]+L+Y|0,E[3]=E[4]+W+P|0,E[4]=E[0]+q+J|0,E[0]=ae},_doFinalize:function(){var D=this._data,F=D.words,R=this._nDataBytes*8,X=D.sigBytes*8;F[X>>>5]|=128<<24-X%32,F[(X+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,D.sigBytes=(F.length+1)*4,this._process();for(var H=this._hash,E=H.words,A=0;A<5;A++){var S=E[A];E[A]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return H},clone:function(){var D=u.clone.call(this);return D._hash=this._hash.clone(),D}});function m(D,F,R){return D^F^R}function b(D,F,R){return D&F|~D&R}function g(D,F,R){return(D|~F)^R}function y(D,F,R){return D&R|F&~R}function _(D,F,R){return D^(F|~R)}function T(D,F){return D<<F|D>>>32-F}l.RIPEMD160=u._createHelper(v),l.HmacRIPEMD160=u._createHmacHelper(v)}(),t.RIPEMD160})}(po)),po.exports}var mo={exports:{}},js;function xa(){return js||(js=1,function(e,r){(function(t,n){e.exports=n(Ae())})(be,function(t){(function(){var n=t,l=n.lib,o=l.Base,a=n.enc,u=a.Utf8,h=n.algo;h.HMAC=o.extend({init:function(s,i){s=this._hasher=new s.init,typeof i=="string"&&(i=u.parse(i));var p=s.blockSize,c=p*4;i.sigBytes>c&&(i=s.finalize(i)),i.clamp();for(var f=this._oKey=i.clone(),d=this._iKey=i.clone(),v=f.words,m=d.words,b=0;b<p;b++)v[b]^=1549556828,m[b]^=909522486;f.sigBytes=d.sigBytes=c,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var i=this._hasher,p=i.finalize(s);i.reset();var c=i.finalize(this._oKey.clone().concat(p));return c}})})()})}(mo)),mo.exports}var yo={exports:{}},Hs;function Im(){return Hs||(Hs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ga(),xa())})(be,function(t){return function(){var n=t,l=n.lib,o=l.Base,a=l.WordArray,u=n.algo,h=u.SHA256,s=u.HMAC,i=u.PBKDF2=o.extend({cfg:o.extend({keySize:128/32,hasher:h,iterations:25e4}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,c){for(var f=this.cfg,d=s.create(f.hasher,p),v=a.create(),m=a.create([1]),b=v.words,g=m.words,y=f.keySize,_=f.iterations;b.length<y;){var T=d.update(c).finalize(m);d.reset();for(var D=T.words,F=D.length,R=T,X=1;X<_;X++){R=d.finalize(R),d.reset();for(var H=R.words,E=0;E<F;E++)D[E]^=H[E]}v.concat(T),g[0]++}return v.sigBytes=y*4,v}});n.PBKDF2=function(p,c,f){return i.create(f).compute(p,c)}}(),t.PBKDF2})}(yo)),yo.exports}var vo={exports:{}},Vs;function Lt(){return Vs||(Vs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),m0(),xa())})(be,function(t){return function(){var n=t,l=n.lib,o=l.Base,a=l.WordArray,u=n.algo,h=u.MD5,s=u.EvpKDF=o.extend({cfg:o.extend({keySize:128/32,hasher:h,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,p){for(var c,f=this.cfg,d=f.hasher.create(),v=a.create(),m=v.words,b=f.keySize,g=f.iterations;m.length<b;){c&&d.update(c),c=d.update(i).finalize(p),d.reset();for(var y=1;y<g;y++)c=d.finalize(c),d.reset();v.concat(c)}return v.sigBytes=b*4,v}});n.EvpKDF=function(i,p,c){return s.create(c).compute(i,p)}}(),t.EvpKDF})}(vo)),vo.exports}var go={exports:{}},Ws;function He(){return Ws||(Ws=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),Lt())})(be,function(t){t.lib.Cipher||function(n){var l=t,o=l.lib,a=o.Base,u=o.WordArray,h=o.BufferedBlockAlgorithm,s=l.enc;s.Utf8;var i=s.Base64,p=l.algo,c=p.EvpKDF,f=o.Cipher=h.extend({cfg:a.extend(),createEncryptor:function(H,E){return this.create(this._ENC_XFORM_MODE,H,E)},createDecryptor:function(H,E){return this.create(this._DEC_XFORM_MODE,H,E)},init:function(H,E,A){this.cfg=this.cfg.extend(A),this._xformMode=H,this._key=E,this.reset()},reset:function(){h.reset.call(this),this._doReset()},process:function(H){return this._append(H),this._process()},finalize:function(H){H&&this._append(H);var E=this._doFinalize();return E},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function H(E){return typeof E=="string"?X:D}return function(E){return{encrypt:function(A,S,I){return H(S).encrypt(E,A,S,I)},decrypt:function(A,S,I){return H(S).decrypt(E,A,S,I)}}}}()});o.StreamCipher=f.extend({_doFinalize:function(){var H=this._process(!0);return H},blockSize:1});var d=l.mode={},v=o.BlockCipherMode=a.extend({createEncryptor:function(H,E){return this.Encryptor.create(H,E)},createDecryptor:function(H,E){return this.Decryptor.create(H,E)},init:function(H,E){this._cipher=H,this._iv=E}}),m=d.CBC=function(){var H=v.extend();H.Encryptor=H.extend({processBlock:function(A,S){var I=this._cipher,z=I.blockSize;E.call(this,A,S,z),I.encryptBlock(A,S),this._prevBlock=A.slice(S,S+z)}}),H.Decryptor=H.extend({processBlock:function(A,S){var I=this._cipher,z=I.blockSize,V=A.slice(S,S+z);I.decryptBlock(A,S),E.call(this,A,S,z),this._prevBlock=V}});function E(A,S,I){var z,V=this._iv;V?(z=V,this._iv=n):z=this._prevBlock;for(var te=0;te<I;te++)A[S+te]^=z[te]}return H}(),b=l.pad={},g=b.Pkcs7={pad:function(H,E){for(var A=E*4,S=A-H.sigBytes%A,I=S<<24|S<<16|S<<8|S,z=[],V=0;V<S;V+=4)z.push(I);var te=u.create(z,S);H.concat(te)},unpad:function(H){var E=H.words[H.sigBytes-1>>>2]&255;H.sigBytes-=E}};o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:g}),reset:function(){var H;f.reset.call(this);var E=this.cfg,A=E.iv,S=E.mode;this._xformMode==this._ENC_XFORM_MODE?H=S.createEncryptor:(H=S.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==H?this._mode.init(this,A&&A.words):(this._mode=H.call(S,this,A&&A.words),this._mode.__creator=H)},_doProcessBlock:function(H,E){this._mode.processBlock(H,E)},_doFinalize:function(){var H,E=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(E.pad(this._data,this.blockSize),H=this._process(!0)):(H=this._process(!0),E.unpad(H)),H},blockSize:128/32});var y=o.CipherParams=a.extend({init:function(H){this.mixIn(H)},toString:function(H){return(H||this.formatter).stringify(this)}}),_=l.format={},T=_.OpenSSL={stringify:function(H){var E,A=H.ciphertext,S=H.salt;return S?E=u.create([1398893684,1701076831]).concat(S).concat(A):E=A,E.toString(i)},parse:function(H){var E,A=i.parse(H),S=A.words;return S[0]==1398893684&&S[1]==1701076831&&(E=u.create(S.slice(2,4)),S.splice(0,4),A.sigBytes-=16),y.create({ciphertext:A,salt:E})}},D=o.SerializableCipher=a.extend({cfg:a.extend({format:T}),encrypt:function(H,E,A,S){S=this.cfg.extend(S);var I=H.createEncryptor(A,S),z=I.finalize(E),V=I.cfg;return y.create({ciphertext:z,key:A,iv:V.iv,algorithm:H,mode:V.mode,padding:V.padding,blockSize:H.blockSize,formatter:S.format})},decrypt:function(H,E,A,S){S=this.cfg.extend(S),E=this._parse(E,S.format);var I=H.createDecryptor(A,S).finalize(E.ciphertext);return I},_parse:function(H,E){return typeof H=="string"?E.parse(H,this):H}}),F=l.kdf={},R=F.OpenSSL={execute:function(H,E,A,S,I){if(S||(S=u.random(64/8)),I)var z=c.create({keySize:E+A,hasher:I}).compute(H,S);else var z=c.create({keySize:E+A}).compute(H,S);var V=u.create(z.words.slice(E),A*4);return z.sigBytes=E*4,y.create({key:z,iv:V,salt:S})}},X=o.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:R}),encrypt:function(H,E,A,S){S=this.cfg.extend(S);var I=S.kdf.execute(A,H.keySize,H.ivSize,S.salt,S.hasher);S.iv=I.iv;var z=D.encrypt.call(this,H,E,I.key,S);return z.mixIn(I),z},decrypt:function(H,E,A,S){S=this.cfg.extend(S),E=this._parse(E,S.format);var I=S.kdf.execute(A,H.keySize,H.ivSize,E.salt,S.hasher);S.iv=I.iv;var z=D.decrypt.call(this,H,E,I.key,S);return z}})}()})}(go)),go.exports}var xo={exports:{}},Gs;function Rm(){return Gs||(Gs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.mode.CFB=function(){var n=t.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(o,a){var u=this._cipher,h=u.blockSize;l.call(this,o,a,h,u),this._prevBlock=o.slice(a,a+h)}}),n.Decryptor=n.extend({processBlock:function(o,a){var u=this._cipher,h=u.blockSize,s=o.slice(a,a+h);l.call(this,o,a,h,u),this._prevBlock=s}});function l(o,a,u,h){var s,i=this._iv;i?(s=i.slice(0),this._iv=void 0):s=this._prevBlock,h.encryptBlock(s,0);for(var p=0;p<u;p++)o[a+p]^=s[p]}return n}(),t.mode.CFB})}(xo)),xo.exports}var bo={exports:{}},Ks;function Om(){return Ks||(Ks=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.mode.CTR=function(){var n=t.lib.BlockCipherMode.extend(),l=n.Encryptor=n.extend({processBlock:function(o,a){var u=this._cipher,h=u.blockSize,s=this._iv,i=this._counter;s&&(i=this._counter=s.slice(0),this._iv=void 0);var p=i.slice(0);u.encryptBlock(p,0),i[h-1]=i[h-1]+1|0;for(var c=0;c<h;c++)o[a+c]^=p[c]}});return n.Decryptor=l,n}(),t.mode.CTR})}(bo)),bo.exports}var wo={exports:{}},Qs;function Pm(){return Qs||(Qs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){/** @preserve
23
26
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
24
27
  * derived from CryptoJS.mode.CTR
25
28
  * Jan Hruby jhruby.web@gmail.com
26
- */return t.mode.CTRGladman=function(){var n=t.lib.BlockCipherMode.extend();function l(u){if((u>>24&255)===255){var d=u>>16&255,s=u>>8&255,i=u&255;d===255?(d=0,s===255?(s=0,i===255?i=0:++i):++s):++d,u=0,u+=d<<16,u+=s<<8,u+=i}else u+=1<<24;return u}function a(u){return(u[0]=l(u[0]))===0&&(u[1]=l(u[1])),u}var o=n.Encryptor=n.extend({processBlock:function(u,d){var s=this._cipher,i=s.blockSize,p=this._iv,c=this._counter;p&&(c=this._counter=p.slice(0),this._iv=void 0),a(c);var f=c.slice(0);s.encryptBlock(f,0);for(var h=0;h<i;h++)u[d+h]^=f[h]}});return n.Decryptor=o,n}(),t.mode.CTRGladman})}(mo)),mo.exports}var vo={exports:{}},Qs;function G1(){return Qs||(Qs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.mode.OFB=function(){var n=t.lib.BlockCipherMode.extend(),l=n.Encryptor=n.extend({processBlock:function(a,o){var u=this._cipher,d=u.blockSize,s=this._iv,i=this._keystream;s&&(i=this._keystream=s.slice(0),this._iv=void 0),u.encryptBlock(i,0);for(var p=0;p<d;p++)a[o+p]^=i[p]}});return n.Decryptor=l,n}(),t.mode.OFB})}(vo)),vo.exports}var yo={exports:{}},Ys;function Q1(){return Ys||(Ys=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.mode.ECB=function(){var n=t.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(l,a){this._cipher.encryptBlock(l,a)}}),n.Decryptor=n.extend({processBlock:function(l,a){this._cipher.decryptBlock(l,a)}}),n}(),t.mode.ECB})}(yo)),yo.exports}var go={exports:{}},Xs;function Y1(){return Xs||(Xs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.pad.AnsiX923={pad:function(n,l){var a=n.sigBytes,o=l*4,u=o-a%o,d=a+u-1;n.clamp(),n.words[d>>>2]|=u<<24-d%4*8,n.sigBytes+=u},unpad:function(n){var l=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=l}},t.pad.Ansix923})}(go)),go.exports}var xo={exports:{}},Zs;function X1(){return Zs||(Zs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.pad.Iso10126={pad:function(n,l){var a=l*4,o=a-n.sigBytes%a;n.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(n){var l=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=l}},t.pad.Iso10126})}(xo)),xo.exports}var bo={exports:{}},Js;function Z1(){return Js||(Js=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.pad.Iso97971={pad:function(n,l){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,l)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})}(bo)),bo.exports}var wo={exports:{}},el;function J1(){return el||(el=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.pad.ZeroPadding={pad:function(n,l){var a=l*4;n.clamp(),n.sigBytes+=a-(n.sigBytes%a||a)},unpad:function(n){for(var l=n.words,a=n.sigBytes-1,a=n.sigBytes-1;a>=0;a--)if(l[a>>>2]>>>24-a%4*8&255){n.sigBytes=a+1;break}}},t.pad.ZeroPadding})}(wo)),wo.exports}var _o={exports:{}},tl;function em(){return tl||(tl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(_o)),_o.exports}var Eo={exports:{}},rl;function tm(){return rl||(rl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),ze())})(xe,function(t){return function(n){var l=t,a=l.lib,o=a.CipherParams,u=l.enc,d=u.Hex,s=l.format;s.Hex={stringify:function(i){return i.ciphertext.toString(d)},parse:function(i){var p=d.parse(i);return o.create({ciphertext:p})}}}(),t.format.Hex})}(Eo)),Eo.exports}var Ao={exports:{}},nl;function rm(){return nl||(nl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),rr(),nr(),Mt(),ze())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.BlockCipher,o=n.algo,u=[],d=[],s=[],i=[],p=[],c=[],f=[],h=[],v=[],m=[];(function(){for(var y=[],_=0;_<256;_++)_<128?y[_]=_<<1:y[_]=_<<1^283;for(var T=0,B=0,_=0;_<256;_++){var F=B^B<<1^B<<2^B<<3^B<<4;F=F>>>8^F&255^99,u[T]=F,d[F]=T;var R=y[T],Z=y[R],j=y[Z],E=y[F]*257^F*16843008;s[T]=E<<24|E>>>8,i[T]=E<<16|E>>>16,p[T]=E<<8|E>>>24,c[T]=E;var E=j*16843009^Z*65537^R*257^T*16843008;f[F]=E<<24|E>>>8,h[F]=E<<16|E>>>16,v[F]=E<<8|E>>>24,m[F]=E,T?(T=R^y[y[y[j^R]]],B^=y[y[B]]):T=B=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],b=o.AES=a.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,T=_.words,B=_.sigBytes/4,F=this._nRounds=B+6,R=(F+1)*4,Z=this._keySchedule=[],j=0;j<R;j++)j<B?Z[j]=T[j]:(y=Z[j-1],j%B?B>6&&j%B==4&&(y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[y&255]):(y=y<<8|y>>>24,y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[y&255],y^=g[j/B|0]<<24),Z[j]=Z[j-B]^y);for(var E=this._invKeySchedule=[],A=0;A<R;A++){var j=R-A;if(A%4)var y=Z[j];else var y=Z[j-4];A<4||j<=4?E[A]=y:E[A]=f[u[y>>>24]]^h[u[y>>>16&255]]^v[u[y>>>8&255]]^m[u[y&255]]}}},encryptBlock:function(y,_){this._doCryptBlock(y,_,this._keySchedule,s,i,p,c,u)},decryptBlock:function(y,_){var T=y[_+1];y[_+1]=y[_+3],y[_+3]=T,this._doCryptBlock(y,_,this._invKeySchedule,f,h,v,m,d);var T=y[_+1];y[_+1]=y[_+3],y[_+3]=T},_doCryptBlock:function(y,_,T,B,F,R,Z,j){for(var E=this._nRounds,A=y[_]^T[0],C=y[_+1]^T[1],I=y[_+2]^T[2],z=y[_+3]^T[3],W=4,G=1;G<E;G++){var q=B[A>>>24]^F[C>>>16&255]^R[I>>>8&255]^Z[z&255]^T[W++],N=B[C>>>24]^F[I>>>16&255]^R[z>>>8&255]^Z[A&255]^T[W++],V=B[I>>>24]^F[z>>>16&255]^R[A>>>8&255]^Z[C&255]^T[W++],L=B[z>>>24]^F[A>>>16&255]^R[C>>>8&255]^Z[I&255]^T[W++];A=q,C=N,I=V,z=L}var q=(j[A>>>24]<<24|j[C>>>16&255]<<16|j[I>>>8&255]<<8|j[z&255])^T[W++],N=(j[C>>>24]<<24|j[I>>>16&255]<<16|j[z>>>8&255]<<8|j[A&255])^T[W++],V=(j[I>>>24]<<24|j[z>>>16&255]<<16|j[A>>>8&255]<<8|j[C&255])^T[W++],L=(j[z>>>24]<<24|j[A>>>16&255]<<16|j[C>>>8&255]<<8|j[I&255])^T[W++];y[_]=q,y[_+1]=N,y[_+2]=V,y[_+3]=L},keySize:256/32});n.AES=a._createHelper(b)}(),t.AES})}(Ao)),Ao.exports}var Co={exports:{}},il;function nm(){return il||(il=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),rr(),nr(),Mt(),ze())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.WordArray,o=l.BlockCipher,u=n.algo,d=[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],s=[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],i=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],p=[{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}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=u.DES=o.extend({_doReset:function(){for(var g=this._key,b=g.words,y=[],_=0;_<56;_++){var T=d[_]-1;y[_]=b[T>>>5]>>>31-T%32&1}for(var B=this._subKeys=[],F=0;F<16;F++){for(var R=B[F]=[],Z=i[F],_=0;_<24;_++)R[_/6|0]|=y[(s[_]-1+Z)%28]<<31-_%6,R[4+(_/6|0)]|=y[28+(s[_+24]-1+Z)%28]<<31-_%6;R[0]=R[0]<<1|R[0]>>>31;for(var _=1;_<7;_++)R[_]=R[_]>>>(_-1)*4+3;R[7]=R[7]<<5|R[7]>>>27}for(var j=this._invSubKeys=[],_=0;_<16;_++)j[_]=B[15-_]},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._subKeys)},decryptBlock:function(g,b){this._doCryptBlock(g,b,this._invSubKeys)},_doCryptBlock:function(g,b,y){this._lBlock=g[b],this._rBlock=g[b+1],h.call(this,4,252645135),h.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),h.call(this,1,1431655765);for(var _=0;_<16;_++){for(var T=y[_],B=this._lBlock,F=this._rBlock,R=0,Z=0;Z<8;Z++)R|=p[Z][((F^T[Z])&c[Z])>>>0];this._lBlock=F,this._rBlock=B^R}var j=this._lBlock;this._lBlock=this._rBlock,this._rBlock=j,h.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),g[b]=this._lBlock,g[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(g,b){var y=(this._lBlock>>>g^this._rBlock)&b;this._rBlock^=y,this._lBlock^=y<<g}function v(g,b){var y=(this._rBlock>>>g^this._lBlock)&b;this._lBlock^=y,this._rBlock^=y<<g}n.DES=o._createHelper(f);var m=u.TripleDES=o.extend({_doReset:function(){var g=this._key,b=g.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=b.slice(0,2),_=b.length<4?b.slice(0,2):b.slice(2,4),T=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=f.createEncryptor(a.create(y)),this._des2=f.createEncryptor(a.create(_)),this._des3=f.createEncryptor(a.create(T))},encryptBlock:function(g,b){this._des1.encryptBlock(g,b),this._des2.decryptBlock(g,b),this._des3.encryptBlock(g,b)},decryptBlock:function(g,b){this._des3.decryptBlock(g,b),this._des2.encryptBlock(g,b),this._des1.decryptBlock(g,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=o._createHelper(m)}(),t.TripleDES})}(Co)),Co.exports}var So={exports:{}},ol;function im(){return ol||(ol=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),rr(),nr(),Mt(),ze())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.StreamCipher,o=n.algo,u=o.RC4=a.extend({_doReset:function(){for(var i=this._key,p=i.words,c=i.sigBytes,f=this._S=[],h=0;h<256;h++)f[h]=h;for(var h=0,v=0;h<256;h++){var m=h%c,g=p[m>>>2]>>>24-m%4*8&255;v=(v+f[h]+g)%256;var b=f[h];f[h]=f[v],f[v]=b}this._i=this._j=0},_doProcessBlock:function(i,p){i[p]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var i=this._S,p=this._i,c=this._j,f=0,h=0;h<4;h++){p=(p+1)%256,c=(c+i[p])%256;var v=i[p];i[p]=i[c],i[c]=v,f|=i[(i[p]+i[c])%256]<<24-h*8}return this._i=p,this._j=c,f}n.RC4=a._createHelper(u);var s=o.RC4Drop=u.extend({cfg:u.cfg.extend({drop:192}),_doReset:function(){u._doReset.call(this);for(var i=this.cfg.drop;i>0;i--)d.call(this)}});n.RC4Drop=a._createHelper(s)}(),t.RC4})}(So)),So.exports}var Bo={exports:{}},al;function om(){return al||(al=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),rr(),nr(),Mt(),ze())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.StreamCipher,o=n.algo,u=[],d=[],s=[],i=o.Rabbit=a.extend({_doReset:function(){for(var c=this._key.words,f=this.cfg.iv,h=0;h<4;h++)c[h]=(c[h]<<8|c[h]>>>24)&16711935|(c[h]<<24|c[h]>>>8)&4278255360;var v=this._X=[c[0],c[3]<<16|c[2]>>>16,c[1],c[0]<<16|c[3]>>>16,c[2],c[1]<<16|c[0]>>>16,c[3],c[2]<<16|c[1]>>>16],m=this._C=[c[2]<<16|c[2]>>>16,c[0]&4294901760|c[1]&65535,c[3]<<16|c[3]>>>16,c[1]&4294901760|c[2]&65535,c[0]<<16|c[0]>>>16,c[2]&4294901760|c[3]&65535,c[1]<<16|c[1]>>>16,c[3]&4294901760|c[0]&65535];this._b=0;for(var h=0;h<4;h++)p.call(this);for(var h=0;h<8;h++)m[h]^=v[h+4&7];if(f){var g=f.words,b=g[0],y=g[1],_=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,T=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,B=_>>>16|T&4294901760,F=T<<16|_&65535;m[0]^=_,m[1]^=B,m[2]^=T,m[3]^=F,m[4]^=_,m[5]^=B,m[6]^=T,m[7]^=F;for(var h=0;h<4;h++)p.call(this)}},_doProcessBlock:function(c,f){var h=this._X;p.call(this),u[0]=h[0]^h[5]>>>16^h[3]<<16,u[1]=h[2]^h[7]>>>16^h[5]<<16,u[2]=h[4]^h[1]>>>16^h[7]<<16,u[3]=h[6]^h[3]>>>16^h[1]<<16;for(var v=0;v<4;v++)u[v]=(u[v]<<8|u[v]>>>24)&16711935|(u[v]<<24|u[v]>>>8)&4278255360,c[f+v]^=u[v]},blockSize:128/32,ivSize:64/32});function p(){for(var c=this._X,f=this._C,h=0;h<8;h++)d[h]=f[h];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<d[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<d[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<d[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<d[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<d[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<d[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<d[6]>>>0?1:0)|0,this._b=f[7]>>>0<d[7]>>>0?1:0;for(var h=0;h<8;h++){var v=c[h]+f[h],m=v&65535,g=v>>>16,b=((m*m>>>17)+m*g>>>15)+g*g,y=((v&4294901760)*v|0)+((v&65535)*v|0);s[h]=b^y}c[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,c[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,c[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,c[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,c[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,c[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,c[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,c[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}n.Rabbit=a._createHelper(i)}(),t.Rabbit})}(Bo)),Bo.exports}var ko={exports:{}},sl;function am(){return sl||(sl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),rr(),nr(),Mt(),ze())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.StreamCipher,o=n.algo,u=[],d=[],s=[],i=o.RabbitLegacy=a.extend({_doReset:function(){var c=this._key.words,f=this.cfg.iv,h=this._X=[c[0],c[3]<<16|c[2]>>>16,c[1],c[0]<<16|c[3]>>>16,c[2],c[1]<<16|c[0]>>>16,c[3],c[2]<<16|c[1]>>>16],v=this._C=[c[2]<<16|c[2]>>>16,c[0]&4294901760|c[1]&65535,c[3]<<16|c[3]>>>16,c[1]&4294901760|c[2]&65535,c[0]<<16|c[0]>>>16,c[2]&4294901760|c[3]&65535,c[1]<<16|c[1]>>>16,c[3]&4294901760|c[0]&65535];this._b=0;for(var m=0;m<4;m++)p.call(this);for(var m=0;m<8;m++)v[m]^=h[m+4&7];if(f){var g=f.words,b=g[0],y=g[1],_=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,T=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,B=_>>>16|T&4294901760,F=T<<16|_&65535;v[0]^=_,v[1]^=B,v[2]^=T,v[3]^=F,v[4]^=_,v[5]^=B,v[6]^=T,v[7]^=F;for(var m=0;m<4;m++)p.call(this)}},_doProcessBlock:function(c,f){var h=this._X;p.call(this),u[0]=h[0]^h[5]>>>16^h[3]<<16,u[1]=h[2]^h[7]>>>16^h[5]<<16,u[2]=h[4]^h[1]>>>16^h[7]<<16,u[3]=h[6]^h[3]>>>16^h[1]<<16;for(var v=0;v<4;v++)u[v]=(u[v]<<8|u[v]>>>24)&16711935|(u[v]<<24|u[v]>>>8)&4278255360,c[f+v]^=u[v]},blockSize:128/32,ivSize:64/32});function p(){for(var c=this._X,f=this._C,h=0;h<8;h++)d[h]=f[h];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<d[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<d[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<d[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<d[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<d[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<d[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<d[6]>>>0?1:0)|0,this._b=f[7]>>>0<d[7]>>>0?1:0;for(var h=0;h<8;h++){var v=c[h]+f[h],m=v&65535,g=v>>>16,b=((m*m>>>17)+m*g>>>15)+g*g,y=((v&4294901760)*v|0)+((v&65535)*v|0);s[h]=b^y}c[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,c[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,c[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,c[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,c[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,c[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,c[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,c[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}n.RabbitLegacy=a._createHelper(i)}(),t.RabbitLegacy})}(ko)),ko.exports}var To={exports:{}},ll;function sm(){return ll||(ll=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),rr(),nr(),Mt(),ze())})(xe,function(t){return function(){var n=t,l=n.lib,a=l.BlockCipher,o=n.algo;const u=16,d=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var i={pbox:[],sbox:[]};function p(m,g){let b=g>>24&255,y=g>>16&255,_=g>>8&255,T=g&255,B=m.sbox[0][b]+m.sbox[1][y];return B=B^m.sbox[2][_],B=B+m.sbox[3][T],B}function c(m,g,b){let y=g,_=b,T;for(let B=0;B<u;++B)y=y^m.pbox[B],_=p(m,y)^_,T=y,y=_,_=T;return T=y,y=_,_=T,_=_^m.pbox[u],y=y^m.pbox[u+1],{left:y,right:_}}function f(m,g,b){let y=g,_=b,T;for(let B=u+1;B>1;--B)y=y^m.pbox[B],_=p(m,y)^_,T=y,y=_,_=T;return T=y,y=_,_=T,_=_^m.pbox[1],y=y^m.pbox[0],{left:y,right:_}}function h(m,g,b){for(let F=0;F<4;F++){m.sbox[F]=[];for(let R=0;R<256;R++)m.sbox[F][R]=s[F][R]}let y=0;for(let F=0;F<u+2;F++)m.pbox[F]=d[F]^g[y],y++,y>=b&&(y=0);let _=0,T=0,B=0;for(let F=0;F<u+2;F+=2)B=c(m,_,T),_=B.left,T=B.right,m.pbox[F]=_,m.pbox[F+1]=T;for(let F=0;F<4;F++)for(let R=0;R<256;R+=2)B=c(m,_,T),_=B.left,T=B.right,m.sbox[F][R]=_,m.sbox[F][R+1]=T;return!0}var v=o.Blowfish=a.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,g=m.words,b=m.sigBytes/4;h(i,g,b)}},encryptBlock:function(m,g){var b=c(i,m[g],m[g+1]);m[g]=b.left,m[g+1]=b.right},decryptBlock:function(m,g){var b=f(i,m[g],m[g+1]);m[g]=b.left,m[g+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=a._createHelper(v)}(),t.Blowfish})}(To)),To.exports}(function(e,r){(function(t,n,l){e.exports=n(Ae(),ri(),M1(),L1(),rr(),U1(),nr(),t0(),da(),q1(),r0(),$1(),z1(),j1(),pa(),H1(),Mt(),ze(),V1(),W1(),K1(),G1(),Q1(),Y1(),X1(),Z1(),J1(),em(),tm(),rm(),nm(),im(),om(),am(),sm())})(xe,function(t){return t})})(N1);var _e={},ni={};ni.byteLength=cm;ni.toByteArray=hm;ni.fromByteArray=mm;var wt=[],at=[],lm=typeof Uint8Array!="undefined"?Uint8Array:Array,Fo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var cr=0,um=Fo.length;cr<um;++cr)wt[cr]=Fo[cr],at[Fo.charCodeAt(cr)]=cr;at[45]=62;at[95]=63;function n0(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function cm(e){var r=n0(e),t=r[0],n=r[1];return(t+n)*3/4-n}function fm(e,r,t){return(r+t)*3/4-t}function hm(e){var r,t=n0(e),n=t[0],l=t[1],a=new lm(fm(e,n,l)),o=0,u=l>0?n-4:n,d;for(d=0;d<u;d+=4)r=at[e.charCodeAt(d)]<<18|at[e.charCodeAt(d+1)]<<12|at[e.charCodeAt(d+2)]<<6|at[e.charCodeAt(d+3)],a[o++]=r>>16&255,a[o++]=r>>8&255,a[o++]=r&255;return l===2&&(r=at[e.charCodeAt(d)]<<2|at[e.charCodeAt(d+1)]>>4,a[o++]=r&255),l===1&&(r=at[e.charCodeAt(d)]<<10|at[e.charCodeAt(d+1)]<<4|at[e.charCodeAt(d+2)]>>2,a[o++]=r>>8&255,a[o++]=r&255),a}function dm(e){return wt[e>>18&63]+wt[e>>12&63]+wt[e>>6&63]+wt[e&63]}function pm(e,r,t){for(var n,l=[],a=r;a<t;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),l.push(dm(n));return l.join("")}function mm(e){for(var r,t=e.length,n=t%3,l=[],a=16383,o=0,u=t-n;o<u;o+=a)l.push(pm(e,o,o+a>u?u:o+a));return n===1?(r=e[t-1],l.push(wt[r>>2]+wt[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],l.push(wt[r>>10]+wt[r>>4&63]+wt[r<<2&63]+"=")),l.join("")}var ma={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ma.read=function(e,r,t,n,l){var a,o,u=l*8-n-1,d=(1<<u)-1,s=d>>1,i=-7,p=t?l-1:0,c=t?-1:1,f=e[r+p];for(p+=c,a=f&(1<<-i)-1,f>>=-i,i+=u;i>0;a=a*256+e[r+p],p+=c,i-=8);for(o=a&(1<<-i)-1,a>>=-i,i+=n;i>0;o=o*256+e[r+p],p+=c,i-=8);if(a===0)a=1-s;else{if(a===d)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-s}return(f?-1:1)*o*Math.pow(2,a-n)};ma.write=function(e,r,t,n,l,a){var o,u,d,s=a*8-l-1,i=(1<<s)-1,p=i>>1,c=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,h=n?1:-1,v=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,o=i):(o=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-o))<1&&(o--,d*=2),o+p>=1?r+=c/d:r+=c*Math.pow(2,1-p),r*d>=2&&(o++,d/=2),o+p>=i?(u=0,o=i):o+p>=1?(u=(r*d-1)*Math.pow(2,l),o=o+p):(u=r*Math.pow(2,p-1)*Math.pow(2,l),o=0));l>=8;e[t+f]=u&255,f+=h,u/=256,l-=8);for(o=o<<l|u,s+=l;s>0;e[t+f]=o&255,f+=h,o/=256,s-=8);e[t+f-h]|=v*128};/*!
29
+ */return t.mode.CTRGladman=function(){var n=t.lib.BlockCipherMode.extend();function l(u){if((u>>24&255)===255){var h=u>>16&255,s=u>>8&255,i=u&255;h===255?(h=0,s===255?(s=0,i===255?i=0:++i):++s):++h,u=0,u+=h<<16,u+=s<<8,u+=i}else u+=1<<24;return u}function o(u){return(u[0]=l(u[0]))===0&&(u[1]=l(u[1])),u}var a=n.Encryptor=n.extend({processBlock:function(u,h){var s=this._cipher,i=s.blockSize,p=this._iv,c=this._counter;p&&(c=this._counter=p.slice(0),this._iv=void 0),o(c);var f=c.slice(0);s.encryptBlock(f,0);for(var d=0;d<i;d++)u[h+d]^=f[d]}});return n.Decryptor=a,n}(),t.mode.CTRGladman})}(wo)),wo.exports}var _o={exports:{}},Ys;function Nm(){return Ys||(Ys=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.mode.OFB=function(){var n=t.lib.BlockCipherMode.extend(),l=n.Encryptor=n.extend({processBlock:function(o,a){var u=this._cipher,h=u.blockSize,s=this._iv,i=this._keystream;s&&(i=this._keystream=s.slice(0),this._iv=void 0),u.encryptBlock(i,0);for(var p=0;p<h;p++)o[a+p]^=i[p]}});return n.Decryptor=l,n}(),t.mode.OFB})}(_o)),_o.exports}var Eo={exports:{}},Xs;function Mm(){return Xs||(Xs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.mode.ECB=function(){var n=t.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(l,o){this._cipher.encryptBlock(l,o)}}),n.Decryptor=n.extend({processBlock:function(l,o){this._cipher.decryptBlock(l,o)}}),n}(),t.mode.ECB})}(Eo)),Eo.exports}var Ao={exports:{}},Zs;function Lm(){return Zs||(Zs=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.pad.AnsiX923={pad:function(n,l){var o=n.sigBytes,a=l*4,u=a-o%a,h=o+u-1;n.clamp(),n.words[h>>>2]|=u<<24-h%4*8,n.sigBytes+=u},unpad:function(n){var l=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=l}},t.pad.Ansix923})}(Ao)),Ao.exports}var Co={exports:{}},Js;function Um(){return Js||(Js=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.pad.Iso10126={pad:function(n,l){var o=l*4,a=o-n.sigBytes%o;n.concat(t.lib.WordArray.random(a-1)).concat(t.lib.WordArray.create([a<<24],1))},unpad:function(n){var l=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=l}},t.pad.Iso10126})}(Co)),Co.exports}var So={exports:{}},el;function $m(){return el||(el=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.pad.Iso97971={pad:function(n,l){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,l)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})}(So)),So.exports}var Bo={exports:{}},tl;function qm(){return tl||(tl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.pad.ZeroPadding={pad:function(n,l){var o=l*4;n.clamp(),n.sigBytes+=o-(n.sigBytes%o||o)},unpad:function(n){for(var l=n.words,o=n.sigBytes-1,o=n.sigBytes-1;o>=0;o--)if(l[o>>>2]>>>24-o%4*8&255){n.sigBytes=o+1;break}}},t.pad.ZeroPadding})}(Bo)),Bo.exports}var ko={exports:{}},rl;function zm(){return rl||(rl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(ko)),ko.exports}var To={exports:{}},nl;function jm(){return nl||(nl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),He())})(be,function(t){return function(n){var l=t,o=l.lib,a=o.CipherParams,u=l.enc,h=u.Hex,s=l.format;s.Hex={stringify:function(i){return i.ciphertext.toString(h)},parse:function(i){var p=h.parse(i);return a.create({ciphertext:p})}}}(),t.format.Hex})}(To)),To.exports}var Fo={exports:{}},il;function Hm(){return il||(il=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),nr(),ir(),Lt(),He())})(be,function(t){return function(){var n=t,l=n.lib,o=l.BlockCipher,a=n.algo,u=[],h=[],s=[],i=[],p=[],c=[],f=[],d=[],v=[],m=[];(function(){for(var y=[],_=0;_<256;_++)_<128?y[_]=_<<1:y[_]=_<<1^283;for(var T=0,D=0,_=0;_<256;_++){var F=D^D<<1^D<<2^D<<3^D<<4;F=F>>>8^F&255^99,u[T]=F,h[F]=T;var R=y[T],X=y[R],H=y[X],E=y[F]*257^F*16843008;s[T]=E<<24|E>>>8,i[T]=E<<16|E>>>16,p[T]=E<<8|E>>>24,c[T]=E;var E=H*16843009^X*65537^R*257^T*16843008;f[F]=E<<24|E>>>8,d[F]=E<<16|E>>>16,v[F]=E<<8|E>>>24,m[F]=E,T?(T=R^y[y[y[H^R]]],D^=y[y[D]]):T=D=1}})();var b=[0,1,2,4,8,16,32,64,128,27,54],g=a.AES=o.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,T=_.words,D=_.sigBytes/4,F=this._nRounds=D+6,R=(F+1)*4,X=this._keySchedule=[],H=0;H<R;H++)H<D?X[H]=T[H]:(y=X[H-1],H%D?D>6&&H%D==4&&(y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[y&255]):(y=y<<8|y>>>24,y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[y&255],y^=b[H/D|0]<<24),X[H]=X[H-D]^y);for(var E=this._invKeySchedule=[],A=0;A<R;A++){var H=R-A;if(A%4)var y=X[H];else var y=X[H-4];A<4||H<=4?E[A]=y:E[A]=f[u[y>>>24]]^d[u[y>>>16&255]]^v[u[y>>>8&255]]^m[u[y&255]]}}},encryptBlock:function(y,_){this._doCryptBlock(y,_,this._keySchedule,s,i,p,c,u)},decryptBlock:function(y,_){var T=y[_+1];y[_+1]=y[_+3],y[_+3]=T,this._doCryptBlock(y,_,this._invKeySchedule,f,d,v,m,h);var T=y[_+1];y[_+1]=y[_+3],y[_+3]=T},_doCryptBlock:function(y,_,T,D,F,R,X,H){for(var E=this._nRounds,A=y[_]^T[0],S=y[_+1]^T[1],I=y[_+2]^T[2],z=y[_+3]^T[3],V=4,te=1;te<E;te++){var W=D[A>>>24]^F[S>>>16&255]^R[I>>>8&255]^X[z&255]^T[V++],q=D[S>>>24]^F[I>>>16&255]^R[z>>>8&255]^X[A&255]^T[V++],G=D[I>>>24]^F[z>>>16&255]^R[A>>>8&255]^X[S&255]^T[V++],U=D[z>>>24]^F[A>>>16&255]^R[S>>>8&255]^X[I&255]^T[V++];A=W,S=q,I=G,z=U}var W=(H[A>>>24]<<24|H[S>>>16&255]<<16|H[I>>>8&255]<<8|H[z&255])^T[V++],q=(H[S>>>24]<<24|H[I>>>16&255]<<16|H[z>>>8&255]<<8|H[A&255])^T[V++],G=(H[I>>>24]<<24|H[z>>>16&255]<<16|H[A>>>8&255]<<8|H[S&255])^T[V++],U=(H[z>>>24]<<24|H[A>>>16&255]<<16|H[S>>>8&255]<<8|H[I&255])^T[V++];y[_]=W,y[_+1]=q,y[_+2]=G,y[_+3]=U},keySize:256/32});n.AES=o._createHelper(g)}(),t.AES})}(Fo)),Fo.exports}var Do={exports:{}},ol;function Vm(){return ol||(ol=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),nr(),ir(),Lt(),He())})(be,function(t){return function(){var n=t,l=n.lib,o=l.WordArray,a=l.BlockCipher,u=n.algo,h=[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],s=[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],i=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],p=[{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}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=u.DES=a.extend({_doReset:function(){for(var b=this._key,g=b.words,y=[],_=0;_<56;_++){var T=h[_]-1;y[_]=g[T>>>5]>>>31-T%32&1}for(var D=this._subKeys=[],F=0;F<16;F++){for(var R=D[F]=[],X=i[F],_=0;_<24;_++)R[_/6|0]|=y[(s[_]-1+X)%28]<<31-_%6,R[4+(_/6|0)]|=y[28+(s[_+24]-1+X)%28]<<31-_%6;R[0]=R[0]<<1|R[0]>>>31;for(var _=1;_<7;_++)R[_]=R[_]>>>(_-1)*4+3;R[7]=R[7]<<5|R[7]>>>27}for(var H=this._invSubKeys=[],_=0;_<16;_++)H[_]=D[15-_]},encryptBlock:function(b,g){this._doCryptBlock(b,g,this._subKeys)},decryptBlock:function(b,g){this._doCryptBlock(b,g,this._invSubKeys)},_doCryptBlock:function(b,g,y){this._lBlock=b[g],this._rBlock=b[g+1],d.call(this,4,252645135),d.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),d.call(this,1,1431655765);for(var _=0;_<16;_++){for(var T=y[_],D=this._lBlock,F=this._rBlock,R=0,X=0;X<8;X++)R|=p[X][((F^T[X])&c[X])>>>0];this._lBlock=F,this._rBlock=D^R}var H=this._lBlock;this._lBlock=this._rBlock,this._rBlock=H,d.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),b[g]=this._lBlock,b[g+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function d(b,g){var y=(this._lBlock>>>b^this._rBlock)&g;this._rBlock^=y,this._lBlock^=y<<b}function v(b,g){var y=(this._rBlock>>>b^this._lBlock)&g;this._lBlock^=y,this._rBlock^=y<<b}n.DES=a._createHelper(f);var m=u.TripleDES=a.extend({_doReset:function(){var b=this._key,g=b.words;if(g.length!==2&&g.length!==4&&g.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=g.slice(0,2),_=g.length<4?g.slice(0,2):g.slice(2,4),T=g.length<6?g.slice(0,2):g.slice(4,6);this._des1=f.createEncryptor(o.create(y)),this._des2=f.createEncryptor(o.create(_)),this._des3=f.createEncryptor(o.create(T))},encryptBlock:function(b,g){this._des1.encryptBlock(b,g),this._des2.decryptBlock(b,g),this._des3.encryptBlock(b,g)},decryptBlock:function(b,g){this._des3.decryptBlock(b,g),this._des2.encryptBlock(b,g),this._des1.decryptBlock(b,g)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=a._createHelper(m)}(),t.TripleDES})}(Do)),Do.exports}var Io={exports:{}},al;function Wm(){return al||(al=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),nr(),ir(),Lt(),He())})(be,function(t){return function(){var n=t,l=n.lib,o=l.StreamCipher,a=n.algo,u=a.RC4=o.extend({_doReset:function(){for(var i=this._key,p=i.words,c=i.sigBytes,f=this._S=[],d=0;d<256;d++)f[d]=d;for(var d=0,v=0;d<256;d++){var m=d%c,b=p[m>>>2]>>>24-m%4*8&255;v=(v+f[d]+b)%256;var g=f[d];f[d]=f[v],f[v]=g}this._i=this._j=0},_doProcessBlock:function(i,p){i[p]^=h.call(this)},keySize:256/32,ivSize:0});function h(){for(var i=this._S,p=this._i,c=this._j,f=0,d=0;d<4;d++){p=(p+1)%256,c=(c+i[p])%256;var v=i[p];i[p]=i[c],i[c]=v,f|=i[(i[p]+i[c])%256]<<24-d*8}return this._i=p,this._j=c,f}n.RC4=o._createHelper(u);var s=a.RC4Drop=u.extend({cfg:u.cfg.extend({drop:192}),_doReset:function(){u._doReset.call(this);for(var i=this.cfg.drop;i>0;i--)h.call(this)}});n.RC4Drop=o._createHelper(s)}(),t.RC4})}(Io)),Io.exports}var Ro={exports:{}},sl;function Gm(){return sl||(sl=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),nr(),ir(),Lt(),He())})(be,function(t){return function(){var n=t,l=n.lib,o=l.StreamCipher,a=n.algo,u=[],h=[],s=[],i=a.Rabbit=o.extend({_doReset:function(){for(var c=this._key.words,f=this.cfg.iv,d=0;d<4;d++)c[d]=(c[d]<<8|c[d]>>>24)&16711935|(c[d]<<24|c[d]>>>8)&4278255360;var v=this._X=[c[0],c[3]<<16|c[2]>>>16,c[1],c[0]<<16|c[3]>>>16,c[2],c[1]<<16|c[0]>>>16,c[3],c[2]<<16|c[1]>>>16],m=this._C=[c[2]<<16|c[2]>>>16,c[0]&4294901760|c[1]&65535,c[3]<<16|c[3]>>>16,c[1]&4294901760|c[2]&65535,c[0]<<16|c[0]>>>16,c[2]&4294901760|c[3]&65535,c[1]<<16|c[1]>>>16,c[3]&4294901760|c[0]&65535];this._b=0;for(var d=0;d<4;d++)p.call(this);for(var d=0;d<8;d++)m[d]^=v[d+4&7];if(f){var b=f.words,g=b[0],y=b[1],_=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,T=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,D=_>>>16|T&4294901760,F=T<<16|_&65535;m[0]^=_,m[1]^=D,m[2]^=T,m[3]^=F,m[4]^=_,m[5]^=D,m[6]^=T,m[7]^=F;for(var d=0;d<4;d++)p.call(this)}},_doProcessBlock:function(c,f){var d=this._X;p.call(this),u[0]=d[0]^d[5]>>>16^d[3]<<16,u[1]=d[2]^d[7]>>>16^d[5]<<16,u[2]=d[4]^d[1]>>>16^d[7]<<16,u[3]=d[6]^d[3]>>>16^d[1]<<16;for(var v=0;v<4;v++)u[v]=(u[v]<<8|u[v]>>>24)&16711935|(u[v]<<24|u[v]>>>8)&4278255360,c[f+v]^=u[v]},blockSize:128/32,ivSize:64/32});function p(){for(var c=this._X,f=this._C,d=0;d<8;d++)h[d]=f[d];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<h[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<h[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<h[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<h[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<h[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<h[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<h[6]>>>0?1:0)|0,this._b=f[7]>>>0<h[7]>>>0?1:0;for(var d=0;d<8;d++){var v=c[d]+f[d],m=v&65535,b=v>>>16,g=((m*m>>>17)+m*b>>>15)+b*b,y=((v&4294901760)*v|0)+((v&65535)*v|0);s[d]=g^y}c[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,c[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,c[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,c[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,c[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,c[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,c[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,c[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}n.Rabbit=o._createHelper(i)}(),t.Rabbit})}(Ro)),Ro.exports}var Oo={exports:{}},ll;function Km(){return ll||(ll=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),nr(),ir(),Lt(),He())})(be,function(t){return function(){var n=t,l=n.lib,o=l.StreamCipher,a=n.algo,u=[],h=[],s=[],i=a.RabbitLegacy=o.extend({_doReset:function(){var c=this._key.words,f=this.cfg.iv,d=this._X=[c[0],c[3]<<16|c[2]>>>16,c[1],c[0]<<16|c[3]>>>16,c[2],c[1]<<16|c[0]>>>16,c[3],c[2]<<16|c[1]>>>16],v=this._C=[c[2]<<16|c[2]>>>16,c[0]&4294901760|c[1]&65535,c[3]<<16|c[3]>>>16,c[1]&4294901760|c[2]&65535,c[0]<<16|c[0]>>>16,c[2]&4294901760|c[3]&65535,c[1]<<16|c[1]>>>16,c[3]&4294901760|c[0]&65535];this._b=0;for(var m=0;m<4;m++)p.call(this);for(var m=0;m<8;m++)v[m]^=d[m+4&7];if(f){var b=f.words,g=b[0],y=b[1],_=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,T=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,D=_>>>16|T&4294901760,F=T<<16|_&65535;v[0]^=_,v[1]^=D,v[2]^=T,v[3]^=F,v[4]^=_,v[5]^=D,v[6]^=T,v[7]^=F;for(var m=0;m<4;m++)p.call(this)}},_doProcessBlock:function(c,f){var d=this._X;p.call(this),u[0]=d[0]^d[5]>>>16^d[3]<<16,u[1]=d[2]^d[7]>>>16^d[5]<<16,u[2]=d[4]^d[1]>>>16^d[7]<<16,u[3]=d[6]^d[3]>>>16^d[1]<<16;for(var v=0;v<4;v++)u[v]=(u[v]<<8|u[v]>>>24)&16711935|(u[v]<<24|u[v]>>>8)&4278255360,c[f+v]^=u[v]},blockSize:128/32,ivSize:64/32});function p(){for(var c=this._X,f=this._C,d=0;d<8;d++)h[d]=f[d];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<h[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<h[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<h[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<h[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<h[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<h[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<h[6]>>>0?1:0)|0,this._b=f[7]>>>0<h[7]>>>0?1:0;for(var d=0;d<8;d++){var v=c[d]+f[d],m=v&65535,b=v>>>16,g=((m*m>>>17)+m*b>>>15)+b*b,y=((v&4294901760)*v|0)+((v&65535)*v|0);s[d]=g^y}c[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,c[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,c[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,c[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,c[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,c[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,c[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,c[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}n.RabbitLegacy=o._createHelper(i)}(),t.RabbitLegacy})}(Oo)),Oo.exports}var Po={exports:{}},ul;function Qm(){return ul||(ul=1,function(e,r){(function(t,n,l){e.exports=n(Ae(),nr(),ir(),Lt(),He())})(be,function(t){return function(){var n=t,l=n.lib,o=l.BlockCipher,a=n.algo;const u=16,h=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var i={pbox:[],sbox:[]};function p(m,b){let g=b>>24&255,y=b>>16&255,_=b>>8&255,T=b&255,D=m.sbox[0][g]+m.sbox[1][y];return D=D^m.sbox[2][_],D=D+m.sbox[3][T],D}function c(m,b,g){let y=b,_=g,T;for(let D=0;D<u;++D)y=y^m.pbox[D],_=p(m,y)^_,T=y,y=_,_=T;return T=y,y=_,_=T,_=_^m.pbox[u],y=y^m.pbox[u+1],{left:y,right:_}}function f(m,b,g){let y=b,_=g,T;for(let D=u+1;D>1;--D)y=y^m.pbox[D],_=p(m,y)^_,T=y,y=_,_=T;return T=y,y=_,_=T,_=_^m.pbox[1],y=y^m.pbox[0],{left:y,right:_}}function d(m,b,g){for(let F=0;F<4;F++){m.sbox[F]=[];for(let R=0;R<256;R++)m.sbox[F][R]=s[F][R]}let y=0;for(let F=0;F<u+2;F++)m.pbox[F]=h[F]^b[y],y++,y>=g&&(y=0);let _=0,T=0,D=0;for(let F=0;F<u+2;F+=2)D=c(m,_,T),_=D.left,T=D.right,m.pbox[F]=_,m.pbox[F+1]=T;for(let F=0;F<4;F++)for(let R=0;R<256;R+=2)D=c(m,_,T),_=D.left,T=D.right,m.sbox[F][R]=_,m.sbox[F][R+1]=T;return!0}var v=a.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,b=m.words,g=m.sigBytes/4;d(i,b,g)}},encryptBlock:function(m,b){var g=c(i,m[b],m[b+1]);m[b]=g.left,m[b+1]=g.right},decryptBlock:function(m,b){var g=f(i,m[b],m[b+1]);m[b]=g.left,m[b+1]=g.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=o._createHelper(v)}(),t.Blowfish})}(Po)),Po.exports}(function(e,r){(function(t,n,l){e.exports=n(Ae(),li(),Cm(),Sm(),nr(),Bm(),ir(),m0(),ga(),km(),y0(),Tm(),Fm(),Dm(),xa(),Im(),Lt(),He(),Rm(),Om(),Pm(),Nm(),Mm(),Lm(),Um(),$m(),qm(),zm(),jm(),Hm(),Vm(),Wm(),Gm(),Km(),Qm())})(be,function(t){return t})})(Am);var _e={},ui={};ui.byteLength=Zm;ui.toByteArray=ey;ui.fromByteArray=ny;var _t=[],st=[],Ym=typeof Uint8Array!="undefined"?Uint8Array:Array,No="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var hr=0,Xm=No.length;hr<Xm;++hr)_t[hr]=No[hr],st[No.charCodeAt(hr)]=hr;st[45]=62;st[95]=63;function v0(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Zm(e){var r=v0(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Jm(e,r,t){return(r+t)*3/4-t}function ey(e){var r,t=v0(e),n=t[0],l=t[1],o=new Ym(Jm(e,n,l)),a=0,u=l>0?n-4:n,h;for(h=0;h<u;h+=4)r=st[e.charCodeAt(h)]<<18|st[e.charCodeAt(h+1)]<<12|st[e.charCodeAt(h+2)]<<6|st[e.charCodeAt(h+3)],o[a++]=r>>16&255,o[a++]=r>>8&255,o[a++]=r&255;return l===2&&(r=st[e.charCodeAt(h)]<<2|st[e.charCodeAt(h+1)]>>4,o[a++]=r&255),l===1&&(r=st[e.charCodeAt(h)]<<10|st[e.charCodeAt(h+1)]<<4|st[e.charCodeAt(h+2)]>>2,o[a++]=r>>8&255,o[a++]=r&255),o}function ty(e){return _t[e>>18&63]+_t[e>>12&63]+_t[e>>6&63]+_t[e&63]}function ry(e,r,t){for(var n,l=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),l.push(ty(n));return l.join("")}function ny(e){for(var r,t=e.length,n=t%3,l=[],o=16383,a=0,u=t-n;a<u;a+=o)l.push(ry(e,a,a+o>u?u:a+o));return n===1?(r=e[t-1],l.push(_t[r>>2]+_t[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],l.push(_t[r>>10]+_t[r>>4&63]+_t[r<<2&63]+"=")),l.join("")}var ba={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ba.read=function(e,r,t,n,l){var o,a,u=l*8-n-1,h=(1<<u)-1,s=h>>1,i=-7,p=t?l-1:0,c=t?-1:1,f=e[r+p];for(p+=c,o=f&(1<<-i)-1,f>>=-i,i+=u;i>0;o=o*256+e[r+p],p+=c,i-=8);for(a=o&(1<<-i)-1,o>>=-i,i+=n;i>0;a=a*256+e[r+p],p+=c,i-=8);if(o===0)o=1-s;else{if(o===h)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-s}return(f?-1:1)*a*Math.pow(2,o-n)};ba.write=function(e,r,t,n,l,o){var a,u,h,s=o*8-l-1,i=(1<<s)-1,p=i>>1,c=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,v=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=i):(a=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-a))<1&&(a--,h*=2),a+p>=1?r+=c/h:r+=c*Math.pow(2,1-p),r*h>=2&&(a++,h/=2),a+p>=i?(u=0,a=i):a+p>=1?(u=(r*h-1)*Math.pow(2,l),a=a+p):(u=r*Math.pow(2,p-1)*Math.pow(2,l),a=0));l>=8;e[t+f]=u&255,f+=d,u/=256,l-=8);for(a=a<<l|u,s+=l;s>0;e[t+f]=a&255,f+=d,a/=256,s-=8);e[t+f-d]|=v*128};/*!
27
30
  * The buffer module from node.js, for the browser.
28
31
  *
29
32
  * @author Feross Aboukhadijeh <https://feross.org>
30
33
  * @license MIT
31
- */(function(e){var r=ni,t=ma,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;var l=2147483647;e.kMaxLength=l,u.TYPED_ARRAY_SUPPORT=a(),!u.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var $=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf($,S),$.foo()===42}catch(k){return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function o($){if($>l)throw new RangeError('The value "'+$+'" is invalid for option "size"');var S=new Uint8Array($);return Object.setPrototypeOf(S,u.prototype),S}function u($,S,k){if(typeof $=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p($)}return d($,S,k)}u.poolSize=8192;function d($,S,k){if(typeof $=="string")return c($,S);if(ArrayBuffer.isView($))return h($);if($==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(ee($,ArrayBuffer)||$&&ee($.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ee($,SharedArrayBuffer)||$&&ee($.buffer,SharedArrayBuffer)))return v($,S,k);if(typeof $=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var X=$.valueOf&&$.valueOf();if(X!=null&&X!==$)return u.from(X,S,k);var ae=m($);if(ae)return ae;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]=="function")return u.from($[Symbol.toPrimitive]("string"),S,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}u.from=function($,S,k){return d($,S,k)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function s($){if(typeof $!="number")throw new TypeError('"size" argument must be of type number');if($<0)throw new RangeError('The value "'+$+'" is invalid for option "size"')}function i($,S,k){return s($),$<=0?o($):S!==void 0?typeof k=="string"?o($).fill(S,k):o($).fill(S):o($)}u.alloc=function($,S,k){return i($,S,k)};function p($){return s($),o($<0?0:g($)|0)}u.allocUnsafe=function($){return p($)},u.allocUnsafeSlow=function($){return p($)};function c($,S){if((typeof S!="string"||S==="")&&(S="utf8"),!u.isEncoding(S))throw new TypeError("Unknown encoding: "+S);var k=y($,S)|0,X=o(k),ae=X.write($,S);return ae!==k&&(X=X.slice(0,ae)),X}function f($){for(var S=$.length<0?0:g($.length)|0,k=o(S),X=0;X<S;X+=1)k[X]=$[X]&255;return k}function h($){if(ee($,Uint8Array)){var S=new Uint8Array($);return v(S.buffer,S.byteOffset,S.byteLength)}return f($)}function v($,S,k){if(S<0||$.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if($.byteLength<S+(k||0))throw new RangeError('"length" is outside of buffer bounds');var X;return S===void 0&&k===void 0?X=new Uint8Array($):k===void 0?X=new Uint8Array($,S):X=new Uint8Array($,S,k),Object.setPrototypeOf(X,u.prototype),X}function m($){if(u.isBuffer($)){var S=g($.length)|0,k=o(S);return k.length===0||$.copy(k,0,0,S),k}if($.length!==void 0)return typeof $.length!="number"||re($.length)?o(0):f($);if($.type==="Buffer"&&Array.isArray($.data))return f($.data)}function g($){if($>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return $|0}function b($){return+$!=$&&($=0),u.alloc(+$)}u.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==u.prototype},u.compare=function(S,k){if(ee(S,Uint8Array)&&(S=u.from(S,S.offset,S.byteLength)),ee(k,Uint8Array)&&(k=u.from(k,k.offset,k.byteLength)),!u.isBuffer(S)||!u.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===k)return 0;for(var X=S.length,ae=k.length,ue=0,ce=Math.min(X,ae);ue<ce;++ue)if(S[ue]!==k[ue]){X=S[ue],ae=k[ue];break}return X<ae?-1:ae<X?1:0},u.isEncoding=function(S){switch(String(S).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}},u.concat=function(S,k){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return u.alloc(0);var X;if(k===void 0)for(k=0,X=0;X<S.length;++X)k+=S[X].length;var ae=u.allocUnsafe(k),ue=0;for(X=0;X<S.length;++X){var ce=S[X];if(ee(ce,Uint8Array))ue+ce.length>ae.length?u.from(ce).copy(ae,ue):Uint8Array.prototype.set.call(ae,ce,ue);else if(u.isBuffer(ce))ce.copy(ae,ue);else throw new TypeError('"list" argument must be an Array of Buffers');ue+=ce.length}return ae};function y($,S){if(u.isBuffer($))return $.length;if(ArrayBuffer.isView($)||ee($,ArrayBuffer))return $.byteLength;if(typeof $!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);var k=$.length,X=arguments.length>2&&arguments[2]===!0;if(!X&&k===0)return 0;for(var ae=!1;;)switch(S){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return te($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return D($).length;default:if(ae)return X?-1:te($).length;S=(""+S).toLowerCase(),ae=!0}}u.byteLength=y;function _($,S,k){var X=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,S>>>=0,k<=S))return"";for($||($="utf8");;)switch($){case"hex":return N(this,S,k);case"utf8":case"utf-8":return I(this,S,k);case"ascii":return G(this,S,k);case"latin1":case"binary":return q(this,S,k);case"base64":return C(this,S,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,S,k);default:if(X)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),X=!0}}u.prototype._isBuffer=!0;function T($,S,k){var X=$[S];$[S]=$[k],$[k]=X}u.prototype.swap16=function(){var S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<S;k+=2)T(this,k,k+1);return this},u.prototype.swap32=function(){var S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<S;k+=4)T(this,k,k+3),T(this,k+1,k+2);return this},u.prototype.swap64=function(){var S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<S;k+=8)T(this,k,k+7),T(this,k+1,k+6),T(this,k+2,k+5),T(this,k+3,k+4);return this},u.prototype.toString=function(){var S=this.length;return S===0?"":arguments.length===0?I(this,0,S):_.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(S){if(!u.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:u.compare(this,S)===0},u.prototype.inspect=function(){var S="",k=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,k).replace(/(.{2})/g,"$1 ").trim(),this.length>k&&(S+=" ... "),"<Buffer "+S+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(S,k,X,ae,ue){if(ee(S,Uint8Array)&&(S=u.from(S,S.offset,S.byteLength)),!u.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(k===void 0&&(k=0),X===void 0&&(X=S?S.length:0),ae===void 0&&(ae=0),ue===void 0&&(ue=this.length),k<0||X>S.length||ae<0||ue>this.length)throw new RangeError("out of range index");if(ae>=ue&&k>=X)return 0;if(ae>=ue)return-1;if(k>=X)return 1;if(k>>>=0,X>>>=0,ae>>>=0,ue>>>=0,this===S)return 0;for(var ce=ue-ae,me=X-k,ge=Math.min(ce,me),Ce=this.slice(ae,ue),Te=S.slice(k,X),Be=0;Be<ge;++Be)if(Ce[Be]!==Te[Be]){ce=Ce[Be],me=Te[Be];break}return ce<me?-1:me<ce?1:0};function B($,S,k,X,ae){if($.length===0)return-1;if(typeof k=="string"?(X=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,re(k)&&(k=ae?0:$.length-1),k<0&&(k=$.length+k),k>=$.length){if(ae)return-1;k=$.length-1}else if(k<0)if(ae)k=0;else return-1;if(typeof S=="string"&&(S=u.from(S,X)),u.isBuffer(S))return S.length===0?-1:F($,S,k,X,ae);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call($,S,k):Uint8Array.prototype.lastIndexOf.call($,S,k):F($,[S],k,X,ae);throw new TypeError("val must be string, number or Buffer")}function F($,S,k,X,ae){var ue=1,ce=$.length,me=S.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if($.length<2||S.length<2)return-1;ue=2,ce/=2,me/=2,k/=2}function ge(Ut,qt){return ue===1?Ut[qt]:Ut.readUInt16BE(qt*ue)}var Ce;if(ae){var Te=-1;for(Ce=k;Ce<ce;Ce++)if(ge($,Ce)===ge(S,Te===-1?0:Ce-Te)){if(Te===-1&&(Te=Ce),Ce-Te+1===me)return Te*ue}else Te!==-1&&(Ce-=Ce-Te),Te=-1}else for(k+me>ce&&(k=ce-me),Ce=k;Ce>=0;Ce--){for(var Be=!0,kt=0;kt<me;kt++)if(ge($,Ce+kt)!==ge(S,kt)){Be=!1;break}if(Be)return Ce}return-1}u.prototype.includes=function(S,k,X){return this.indexOf(S,k,X)!==-1},u.prototype.indexOf=function(S,k,X){return B(this,S,k,X,!0)},u.prototype.lastIndexOf=function(S,k,X){return B(this,S,k,X,!1)};function R($,S,k,X){k=Number(k)||0;var ae=$.length-k;X?(X=Number(X),X>ae&&(X=ae)):X=ae;var ue=S.length;X>ue/2&&(X=ue/2);for(var ce=0;ce<X;++ce){var me=parseInt(S.substr(ce*2,2),16);if(re(me))return ce;$[k+ce]=me}return ce}function Z($,S,k,X){return Q(te(S,$.length-k),$,k,X)}function j($,S,k,X){return Q(x(S),$,k,X)}function E($,S,k,X){return Q(D(S),$,k,X)}function A($,S,k,X){return Q(w(S,$.length-k),$,k,X)}u.prototype.write=function(S,k,X,ae){if(k===void 0)ae="utf8",X=this.length,k=0;else if(X===void 0&&typeof k=="string")ae=k,X=this.length,k=0;else if(isFinite(k))k=k>>>0,isFinite(X)?(X=X>>>0,ae===void 0&&(ae="utf8")):(ae=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-k;if((X===void 0||X>ue)&&(X=ue),S.length>0&&(X<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");for(var ce=!1;;)switch(ae){case"hex":return R(this,S,k,X);case"utf8":case"utf-8":return Z(this,S,k,X);case"ascii":case"latin1":case"binary":return j(this,S,k,X);case"base64":return E(this,S,k,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,S,k,X);default:if(ce)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),ce=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C($,S,k){return S===0&&k===$.length?r.fromByteArray($):r.fromByteArray($.slice(S,k))}function I($,S,k){k=Math.min($.length,k);for(var X=[],ae=S;ae<k;){var ue=$[ae],ce=null,me=ue>239?4:ue>223?3:ue>191?2:1;if(ae+me<=k){var ge,Ce,Te,Be;switch(me){case 1:ue<128&&(ce=ue);break;case 2:ge=$[ae+1],(ge&192)===128&&(Be=(ue&31)<<6|ge&63,Be>127&&(ce=Be));break;case 3:ge=$[ae+1],Ce=$[ae+2],(ge&192)===128&&(Ce&192)===128&&(Be=(ue&15)<<12|(ge&63)<<6|Ce&63,Be>2047&&(Be<55296||Be>57343)&&(ce=Be));break;case 4:ge=$[ae+1],Ce=$[ae+2],Te=$[ae+3],(ge&192)===128&&(Ce&192)===128&&(Te&192)===128&&(Be=(ue&15)<<18|(ge&63)<<12|(Ce&63)<<6|Te&63,Be>65535&&Be<1114112&&(ce=Be))}}ce===null?(ce=65533,me=1):ce>65535&&(ce-=65536,X.push(ce>>>10&1023|55296),ce=56320|ce&1023),X.push(ce),ae+=me}return W(X)}var z=4096;function W($){var S=$.length;if(S<=z)return String.fromCharCode.apply(String,$);for(var k="",X=0;X<S;)k+=String.fromCharCode.apply(String,$.slice(X,X+=z));return k}function G($,S,k){var X="";k=Math.min($.length,k);for(var ae=S;ae<k;++ae)X+=String.fromCharCode($[ae]&127);return X}function q($,S,k){var X="";k=Math.min($.length,k);for(var ae=S;ae<k;++ae)X+=String.fromCharCode($[ae]);return X}function N($,S,k){var X=$.length;(!S||S<0)&&(S=0),(!k||k<0||k>X)&&(k=X);for(var ae="",ue=S;ue<k;++ue)ae+=se[$[ue]];return ae}function V($,S,k){for(var X=$.slice(S,k),ae="",ue=0;ue<X.length-1;ue+=2)ae+=String.fromCharCode(X[ue]+X[ue+1]*256);return ae}u.prototype.slice=function(S,k){var X=this.length;S=~~S,k=k===void 0?X:~~k,S<0?(S+=X,S<0&&(S=0)):S>X&&(S=X),k<0?(k+=X,k<0&&(k=0)):k>X&&(k=X),k<S&&(k=S);var ae=this.subarray(S,k);return Object.setPrototypeOf(ae,u.prototype),ae};function L($,S,k){if($%1!==0||$<0)throw new RangeError("offset is not uint");if($+S>k)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(S,k,X){S=S>>>0,k=k>>>0,X||L(S,k,this.length);for(var ae=this[S],ue=1,ce=0;++ce<k&&(ue*=256);)ae+=this[S+ce]*ue;return ae},u.prototype.readUintBE=u.prototype.readUIntBE=function(S,k,X){S=S>>>0,k=k>>>0,X||L(S,k,this.length);for(var ae=this[S+--k],ue=1;k>0&&(ue*=256);)ae+=this[S+--k]*ue;return ae},u.prototype.readUint8=u.prototype.readUInt8=function(S,k){return S=S>>>0,k||L(S,1,this.length),this[S]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(S,k){return S=S>>>0,k||L(S,2,this.length),this[S]|this[S+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(S,k){return S=S>>>0,k||L(S,2,this.length),this[S]<<8|this[S+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(S,k){return S=S>>>0,k||L(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(S,k){return S=S>>>0,k||L(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},u.prototype.readIntLE=function(S,k,X){S=S>>>0,k=k>>>0,X||L(S,k,this.length);for(var ae=this[S],ue=1,ce=0;++ce<k&&(ue*=256);)ae+=this[S+ce]*ue;return ue*=128,ae>=ue&&(ae-=Math.pow(2,8*k)),ae},u.prototype.readIntBE=function(S,k,X){S=S>>>0,k=k>>>0,X||L(S,k,this.length);for(var ae=k,ue=1,ce=this[S+--ae];ae>0&&(ue*=256);)ce+=this[S+--ae]*ue;return ue*=128,ce>=ue&&(ce-=Math.pow(2,8*k)),ce},u.prototype.readInt8=function(S,k){return S=S>>>0,k||L(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},u.prototype.readInt16LE=function(S,k){S=S>>>0,k||L(S,2,this.length);var X=this[S]|this[S+1]<<8;return X&32768?X|4294901760:X},u.prototype.readInt16BE=function(S,k){S=S>>>0,k||L(S,2,this.length);var X=this[S+1]|this[S]<<8;return X&32768?X|4294901760:X},u.prototype.readInt32LE=function(S,k){return S=S>>>0,k||L(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},u.prototype.readInt32BE=function(S,k){return S=S>>>0,k||L(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},u.prototype.readFloatLE=function(S,k){return S=S>>>0,k||L(S,4,this.length),t.read(this,S,!0,23,4)},u.prototype.readFloatBE=function(S,k){return S=S>>>0,k||L(S,4,this.length),t.read(this,S,!1,23,4)},u.prototype.readDoubleLE=function(S,k){return S=S>>>0,k||L(S,8,this.length),t.read(this,S,!0,52,8)},u.prototype.readDoubleBE=function(S,k){return S=S>>>0,k||L(S,8,this.length),t.read(this,S,!1,52,8)};function O($,S,k,X,ae,ue){if(!u.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>ae||S<ue)throw new RangeError('"value" argument is out of bounds');if(k+X>$.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(S,k,X,ae){if(S=+S,k=k>>>0,X=X>>>0,!ae){var ue=Math.pow(2,8*X)-1;O(this,S,k,X,ue,0)}var ce=1,me=0;for(this[k]=S&255;++me<X&&(ce*=256);)this[k+me]=S/ce&255;return k+X},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(S,k,X,ae){if(S=+S,k=k>>>0,X=X>>>0,!ae){var ue=Math.pow(2,8*X)-1;O(this,S,k,X,ue,0)}var ce=X-1,me=1;for(this[k+ce]=S&255;--ce>=0&&(me*=256);)this[k+ce]=S/me&255;return k+X},u.prototype.writeUint8=u.prototype.writeUInt8=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,1,255,0),this[k]=S&255,k+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,2,65535,0),this[k]=S&255,this[k+1]=S>>>8,k+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,2,65535,0),this[k]=S>>>8,this[k+1]=S&255,k+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,4,4294967295,0),this[k+3]=S>>>24,this[k+2]=S>>>16,this[k+1]=S>>>8,this[k]=S&255,k+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,4,4294967295,0),this[k]=S>>>24,this[k+1]=S>>>16,this[k+2]=S>>>8,this[k+3]=S&255,k+4},u.prototype.writeIntLE=function(S,k,X,ae){if(S=+S,k=k>>>0,!ae){var ue=Math.pow(2,8*X-1);O(this,S,k,X,ue-1,-ue)}var ce=0,me=1,ge=0;for(this[k]=S&255;++ce<X&&(me*=256);)S<0&&ge===0&&this[k+ce-1]!==0&&(ge=1),this[k+ce]=(S/me>>0)-ge&255;return k+X},u.prototype.writeIntBE=function(S,k,X,ae){if(S=+S,k=k>>>0,!ae){var ue=Math.pow(2,8*X-1);O(this,S,k,X,ue-1,-ue)}var ce=X-1,me=1,ge=0;for(this[k+ce]=S&255;--ce>=0&&(me*=256);)S<0&&ge===0&&this[k+ce+1]!==0&&(ge=1),this[k+ce]=(S/me>>0)-ge&255;return k+X},u.prototype.writeInt8=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,1,127,-128),S<0&&(S=255+S+1),this[k]=S&255,k+1},u.prototype.writeInt16LE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,2,32767,-32768),this[k]=S&255,this[k+1]=S>>>8,k+2},u.prototype.writeInt16BE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,2,32767,-32768),this[k]=S>>>8,this[k+1]=S&255,k+2},u.prototype.writeInt32LE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,4,2147483647,-2147483648),this[k]=S&255,this[k+1]=S>>>8,this[k+2]=S>>>16,this[k+3]=S>>>24,k+4},u.prototype.writeInt32BE=function(S,k,X){return S=+S,k=k>>>0,X||O(this,S,k,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[k]=S>>>24,this[k+1]=S>>>16,this[k+2]=S>>>8,this[k+3]=S&255,k+4};function K($,S,k,X,ae,ue){if(k+X>$.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function H($,S,k,X,ae){return S=+S,k=k>>>0,ae||K($,S,k,4),t.write($,S,k,X,23,4),k+4}u.prototype.writeFloatLE=function(S,k,X){return H(this,S,k,!0,X)},u.prototype.writeFloatBE=function(S,k,X){return H(this,S,k,!1,X)};function J($,S,k,X,ae){return S=+S,k=k>>>0,ae||K($,S,k,8),t.write($,S,k,X,52,8),k+8}u.prototype.writeDoubleLE=function(S,k,X){return J(this,S,k,!0,X)},u.prototype.writeDoubleBE=function(S,k,X){return J(this,S,k,!1,X)},u.prototype.copy=function(S,k,X,ae){if(!u.isBuffer(S))throw new TypeError("argument should be a Buffer");if(X||(X=0),!ae&&ae!==0&&(ae=this.length),k>=S.length&&(k=S.length),k||(k=0),ae>0&&ae<X&&(ae=X),ae===X||S.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("sourceEnd out of bounds");ae>this.length&&(ae=this.length),S.length-k<ae-X&&(ae=S.length-k+X);var ue=ae-X;return this===S&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(k,X,ae):Uint8Array.prototype.set.call(S,this.subarray(X,ae),k),ue},u.prototype.fill=function(S,k,X,ae){if(typeof S=="string"){if(typeof k=="string"?(ae=k,k=0,X=this.length):typeof X=="string"&&(ae=X,X=this.length),ae!==void 0&&typeof ae!="string")throw new TypeError("encoding must be a string");if(typeof ae=="string"&&!u.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);if(S.length===1){var ue=S.charCodeAt(0);(ae==="utf8"&&ue<128||ae==="latin1")&&(S=ue)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(k<0||this.length<k||this.length<X)throw new RangeError("Out of range index");if(X<=k)return this;k=k>>>0,X=X===void 0?this.length:X>>>0,S||(S=0);var ce;if(typeof S=="number")for(ce=k;ce<X;++ce)this[ce]=S;else{var me=u.isBuffer(S)?S:u.from(S,ae),ge=me.length;if(ge===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(ce=0;ce<X-k;++ce)this[ce+k]=me[ce%ge]}return this};var ne=/[^+/0-9A-Za-z-_]/g;function ie($){if($=$.split("=")[0],$=$.trim().replace(ne,""),$.length<2)return"";for(;$.length%4!==0;)$=$+"=";return $}function te($,S){S=S||1/0;for(var k,X=$.length,ae=null,ue=[],ce=0;ce<X;++ce){if(k=$.charCodeAt(ce),k>55295&&k<57344){if(!ae){if(k>56319){(S-=3)>-1&&ue.push(239,191,189);continue}else if(ce+1===X){(S-=3)>-1&&ue.push(239,191,189);continue}ae=k;continue}if(k<56320){(S-=3)>-1&&ue.push(239,191,189),ae=k;continue}k=(ae-55296<<10|k-56320)+65536}else ae&&(S-=3)>-1&&ue.push(239,191,189);if(ae=null,k<128){if((S-=1)<0)break;ue.push(k)}else if(k<2048){if((S-=2)<0)break;ue.push(k>>6|192,k&63|128)}else if(k<65536){if((S-=3)<0)break;ue.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((S-=4)<0)break;ue.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return ue}function x($){for(var S=[],k=0;k<$.length;++k)S.push($.charCodeAt(k)&255);return S}function w($,S){for(var k,X,ae,ue=[],ce=0;ce<$.length&&!((S-=2)<0);++ce)k=$.charCodeAt(ce),X=k>>8,ae=k%256,ue.push(ae),ue.push(X);return ue}function D($){return r.toByteArray(ie($))}function Q($,S,k,X){for(var ae=0;ae<X&&!(ae+k>=S.length||ae>=$.length);++ae)S[ae+k]=$[ae];return ae}function ee($,S){return $ instanceof S||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===S.name}function re($){return $!==$}var se=function(){for(var $="0123456789abcdef",S=new Array(256),k=0;k<16;++k)for(var X=k*16,ae=0;ae<16;++ae)S[X+ae]=$[k]+$[ae];return S}()})(_e);var vm=_e.Buffer,ym=function(e){if(e instanceof Uint8Array){if(e.byteOffset===0&&e.byteLength===e.buffer.byteLength)return e.buffer;if(typeof e.buffer.slice=="function")return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(vm.isBuffer(e)){for(var r=new Uint8Array(e.length),t=e.length,n=0;n<t;n++)r[n]=e[n];return r.buffer}else throw new Error("Argument must be a Buffer")};const zr=ea(ym);var i0={exports:{}};(function(e,r){(function(){var t,n=0xdeadbeefcafe,l=(n&16777215)==15715070;function a(M,U,Y){M!=null&&(typeof M=="number"?this.fromNumber(M,U,Y):U==null&&typeof M!="string"?this.fromString(M,256):this.fromString(M,U))}function o(){return new a(null)}function u(M,U,Y,oe,fe,de){for(;--de>=0;){var pe=U*this[M++]+Y[oe]+fe;fe=Math.floor(pe/67108864),Y[oe++]=pe&67108863}return fe}function d(M,U,Y,oe,fe,de){for(var pe=U&32767,ve=U>>15;--de>=0;){var Fe=this[M]&32767,Ue=this[M++]>>15,it=ve*Fe+Ue*pe;Fe=pe*Fe+((it&32767)<<15)+Y[oe]+(fe&1073741823),fe=(Fe>>>30)+(it>>>15)+ve*Ue+(fe>>>30),Y[oe++]=Fe&1073741823}return fe}function s(M,U,Y,oe,fe,de){for(var pe=U&16383,ve=U>>14;--de>=0;){var Fe=this[M]&16383,Ue=this[M++]>>14,it=ve*Fe+Ue*pe;Fe=pe*Fe+((it&16383)<<14)+Y[oe]+fe,fe=(Fe>>28)+(it>>14)+ve*Ue,Y[oe++]=Fe&268435455}return fe}var i=typeof navigator!="undefined";i&&l&&navigator.appName=="Microsoft Internet Explorer"?(a.prototype.am=d,t=30):i&&l&&navigator.appName!="Netscape"?(a.prototype.am=u,t=26):(a.prototype.am=s,t=28),a.prototype.DB=t,a.prototype.DM=(1<<t)-1,a.prototype.DV=1<<t;var p=52;a.prototype.FV=Math.pow(2,p),a.prototype.F1=p-t,a.prototype.F2=2*t-p;var c="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array,h,v;for(h=48,v=0;v<=9;++v)f[h++]=v;for(h=97,v=10;v<36;++v)f[h++]=v;for(h=65,v=10;v<36;++v)f[h++]=v;function m(M){return c.charAt(M)}function g(M,U){var Y=f[M.charCodeAt(U)];return Y==null?-1:Y}function b(M){for(var U=this.t-1;U>=0;--U)M[U]=this[U];M.t=this.t,M.s=this.s}function y(M){this.t=1,this.s=M<0?-1:0,M>0?this[0]=M:M<-1?this[0]=M+this.DV:this.t=0}function _(M){var U=o();return U.fromInt(M),U}function T(M,U){var Y;if(U==16)Y=4;else if(U==8)Y=3;else if(U==256)Y=8;else if(U==2)Y=1;else if(U==32)Y=5;else if(U==4)Y=2;else{this.fromRadix(M,U);return}this.t=0,this.s=0;for(var oe=M.length,fe=!1,de=0;--oe>=0;){var pe=Y==8?M[oe]&255:g(M,oe);if(pe<0){M.charAt(oe)=="-"&&(fe=!0);continue}fe=!1,de==0?this[this.t++]=pe:de+Y>this.DB?(this[this.t-1]|=(pe&(1<<this.DB-de)-1)<<de,this[this.t++]=pe>>this.DB-de):this[this.t-1]|=pe<<de,de+=Y,de>=this.DB&&(de-=this.DB)}Y==8&&M[0]&128&&(this.s=-1,de>0&&(this[this.t-1]|=(1<<this.DB-de)-1<<de)),this.clamp(),fe&&a.ZERO.subTo(this,this)}function B(){for(var M=this.s&this.DM;this.t>0&&this[this.t-1]==M;)--this.t}function F(M){if(this.s<0)return"-"+this.negate().toString(M);var U;if(M==16)U=4;else if(M==8)U=3;else if(M==2)U=1;else if(M==32)U=5;else if(M==4)U=2;else return this.toRadix(M);var Y=(1<<U)-1,oe,fe=!1,de="",pe=this.t,ve=this.DB-pe*this.DB%U;if(pe-- >0)for(ve<this.DB&&(oe=this[pe]>>ve)>0&&(fe=!0,de=m(oe));pe>=0;)ve<U?(oe=(this[pe]&(1<<ve)-1)<<U-ve,oe|=this[--pe]>>(ve+=this.DB-U)):(oe=this[pe]>>(ve-=U)&Y,ve<=0&&(ve+=this.DB,--pe)),oe>0&&(fe=!0),fe&&(de+=m(oe));return fe?de:"0"}function R(){var M=o();return a.ZERO.subTo(this,M),M}function Z(){return this.s<0?this.negate():this}function j(M){var U=this.s-M.s;if(U!=0)return U;var Y=this.t;if(U=Y-M.t,U!=0)return this.s<0?-U:U;for(;--Y>=0;)if((U=this[Y]-M[Y])!=0)return U;return 0}function E(M){var U=1,Y;return(Y=M>>>16)!=0&&(M=Y,U+=16),(Y=M>>8)!=0&&(M=Y,U+=8),(Y=M>>4)!=0&&(M=Y,U+=4),(Y=M>>2)!=0&&(M=Y,U+=2),(Y=M>>1)!=0&&(M=Y,U+=1),U}function A(){return this.t<=0?0:this.DB*(this.t-1)+E(this[this.t-1]^this.s&this.DM)}function C(M,U){var Y;for(Y=this.t-1;Y>=0;--Y)U[Y+M]=this[Y];for(Y=M-1;Y>=0;--Y)U[Y]=0;U.t=this.t+M,U.s=this.s}function I(M,U){for(var Y=M;Y<this.t;++Y)U[Y-M]=this[Y];U.t=Math.max(this.t-M,0),U.s=this.s}function z(M,U){var Y=M%this.DB,oe=this.DB-Y,fe=(1<<oe)-1,de=Math.floor(M/this.DB),pe=this.s<<Y&this.DM,ve;for(ve=this.t-1;ve>=0;--ve)U[ve+de+1]=this[ve]>>oe|pe,pe=(this[ve]&fe)<<Y;for(ve=de-1;ve>=0;--ve)U[ve]=0;U[de]=pe,U.t=this.t+de+1,U.s=this.s,U.clamp()}function W(M,U){U.s=this.s;var Y=Math.floor(M/this.DB);if(Y>=this.t){U.t=0;return}var oe=M%this.DB,fe=this.DB-oe,de=(1<<oe)-1;U[0]=this[Y]>>oe;for(var pe=Y+1;pe<this.t;++pe)U[pe-Y-1]|=(this[pe]&de)<<fe,U[pe-Y]=this[pe]>>oe;oe>0&&(U[this.t-Y-1]|=(this.s&de)<<fe),U.t=this.t-Y,U.clamp()}function G(M,U){for(var Y=0,oe=0,fe=Math.min(M.t,this.t);Y<fe;)oe+=this[Y]-M[Y],U[Y++]=oe&this.DM,oe>>=this.DB;if(M.t<this.t){for(oe-=M.s;Y<this.t;)oe+=this[Y],U[Y++]=oe&this.DM,oe>>=this.DB;oe+=this.s}else{for(oe+=this.s;Y<M.t;)oe-=M[Y],U[Y++]=oe&this.DM,oe>>=this.DB;oe-=M.s}U.s=oe<0?-1:0,oe<-1?U[Y++]=this.DV+oe:oe>0&&(U[Y++]=oe),U.t=Y,U.clamp()}function q(M,U){var Y=this.abs(),oe=M.abs(),fe=Y.t;for(U.t=fe+oe.t;--fe>=0;)U[fe]=0;for(fe=0;fe<oe.t;++fe)U[fe+Y.t]=Y.am(0,oe[fe],U,fe,0,Y.t);U.s=0,U.clamp(),this.s!=M.s&&a.ZERO.subTo(U,U)}function N(M){for(var U=this.abs(),Y=M.t=2*U.t;--Y>=0;)M[Y]=0;for(Y=0;Y<U.t-1;++Y){var oe=U.am(Y,U[Y],M,2*Y,0,1);(M[Y+U.t]+=U.am(Y+1,2*U[Y],M,2*Y+1,oe,U.t-Y-1))>=U.DV&&(M[Y+U.t]-=U.DV,M[Y+U.t+1]=1)}M.t>0&&(M[M.t-1]+=U.am(Y,U[Y],M,2*Y,0,1)),M.s=0,M.clamp()}function V(M,U,Y){var oe=M.abs();if(!(oe.t<=0)){var fe=this.abs();if(fe.t<oe.t){U!=null&&U.fromInt(0),Y!=null&&this.copyTo(Y);return}Y==null&&(Y=o());var de=o(),pe=this.s,ve=M.s,Fe=this.DB-E(oe[oe.t-1]);Fe>0?(oe.lShiftTo(Fe,de),fe.lShiftTo(Fe,Y)):(oe.copyTo(de),fe.copyTo(Y));var Ue=de.t,it=de[Ue-1];if(it!=0){var tt=it*(1<<this.F1)+(Ue>1?de[Ue-2]>>this.F2:0),Et=this.FV/tt,cn=(1<<this.F1)/tt,ut=1<<this.F2,ct=Y.t,fn=ct-Ue,Ft=U==null?o():U;for(de.dlShiftTo(fn,Ft),Y.compareTo(Ft)>=0&&(Y[Y.t++]=1,Y.subTo(Ft,Y)),a.ONE.dlShiftTo(Ue,Ft),Ft.subTo(de,de);de.t<Ue;)de[de.t++]=0;for(;--fn>=0;){var yi=Y[--ct]==it?this.DM:Math.floor(Y[ct]*Et+(Y[ct-1]+ut)*cn);if((Y[ct]+=de.am(0,yi,Y,fn,0,Ue))<yi)for(de.dlShiftTo(fn,Ft),Y.subTo(Ft,Y);Y[ct]<--yi;)Y.subTo(Ft,Y)}U!=null&&(Y.drShiftTo(Ue,U),pe!=ve&&a.ZERO.subTo(U,U)),Y.t=Ue,Y.clamp(),Fe>0&&Y.rShiftTo(Fe,Y),pe<0&&a.ZERO.subTo(Y,Y)}}}function L(M){var U=o();return this.abs().divRemTo(M,null,U),this.s<0&&U.compareTo(a.ZERO)>0&&M.subTo(U,U),U}function O(M){this.m=M}function K(M){return M.s<0||M.compareTo(this.m)>=0?M.mod(this.m):M}function H(M){return M}function J(M){M.divRemTo(this.m,null,M)}function ne(M,U,Y){M.multiplyTo(U,Y),this.reduce(Y)}function ie(M,U){M.squareTo(U),this.reduce(U)}O.prototype.convert=K,O.prototype.revert=H,O.prototype.reduce=J,O.prototype.mulTo=ne,O.prototype.sqrTo=ie;function te(){if(this.t<1)return 0;var M=this[0];if(!(M&1))return 0;var U=M&3;return U=U*(2-(M&15)*U)&15,U=U*(2-(M&255)*U)&255,U=U*(2-((M&65535)*U&65535))&65535,U=U*(2-M*U%this.DV)%this.DV,U>0?this.DV-U:-U}function x(M){this.m=M,this.mp=M.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<M.DB-15)-1,this.mt2=2*M.t}function w(M){var U=o();return M.abs().dlShiftTo(this.m.t,U),U.divRemTo(this.m,null,U),M.s<0&&U.compareTo(a.ZERO)>0&&this.m.subTo(U,U),U}function D(M){var U=o();return M.copyTo(U),this.reduce(U),U}function Q(M){for(;M.t<=this.mt2;)M[M.t++]=0;for(var U=0;U<this.m.t;++U){var Y=M[U]&32767,oe=Y*this.mpl+((Y*this.mph+(M[U]>>15)*this.mpl&this.um)<<15)&M.DM;for(Y=U+this.m.t,M[Y]+=this.m.am(0,oe,M,U,0,this.m.t);M[Y]>=M.DV;)M[Y]-=M.DV,M[++Y]++}M.clamp(),M.drShiftTo(this.m.t,M),M.compareTo(this.m)>=0&&M.subTo(this.m,M)}function ee(M,U){M.squareTo(U),this.reduce(U)}function re(M,U,Y){M.multiplyTo(U,Y),this.reduce(Y)}x.prototype.convert=w,x.prototype.revert=D,x.prototype.reduce=Q,x.prototype.mulTo=re,x.prototype.sqrTo=ee;function se(){return(this.t>0?this[0]&1:this.s)==0}function $(M,U){if(M>4294967295||M<1)return a.ONE;var Y=o(),oe=o(),fe=U.convert(this),de=E(M)-1;for(fe.copyTo(Y);--de>=0;)if(U.sqrTo(Y,oe),(M&1<<de)>0)U.mulTo(oe,fe,Y);else{var pe=Y;Y=oe,oe=pe}return U.revert(Y)}function S(M,U){var Y;return M<256||U.isEven()?Y=new O(U):Y=new x(U),this.exp(M,Y)}a.prototype.copyTo=b,a.prototype.fromInt=y,a.prototype.fromString=T,a.prototype.clamp=B,a.prototype.dlShiftTo=C,a.prototype.drShiftTo=I,a.prototype.lShiftTo=z,a.prototype.rShiftTo=W,a.prototype.subTo=G,a.prototype.multiplyTo=q,a.prototype.squareTo=N,a.prototype.divRemTo=V,a.prototype.invDigit=te,a.prototype.isEven=se,a.prototype.exp=$,a.prototype.toString=F,a.prototype.negate=R,a.prototype.abs=Z,a.prototype.compareTo=j,a.prototype.bitLength=A,a.prototype.mod=L,a.prototype.modPowInt=S,a.ZERO=_(0),a.ONE=_(1);function k(){var M=o();return this.copyTo(M),M}function X(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function ae(){return this.t==0?this.s:this[0]<<24>>24}function ue(){return this.t==0?this.s:this[0]<<16>>16}function ce(M){return Math.floor(Math.LN2*this.DB/Math.log(M))}function me(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function ge(M){if(M==null&&(M=10),this.signum()==0||M<2||M>36)return"0";var U=this.chunkSize(M),Y=Math.pow(M,U),oe=_(Y),fe=o(),de=o(),pe="";for(this.divRemTo(oe,fe,de);fe.signum()>0;)pe=(Y+de.intValue()).toString(M).substr(1)+pe,fe.divRemTo(oe,fe,de);return de.intValue().toString(M)+pe}function Ce(M,U){this.fromInt(0),U==null&&(U=10);for(var Y=this.chunkSize(U),oe=Math.pow(U,Y),fe=!1,de=0,pe=0,ve=0;ve<M.length;++ve){var Fe=g(M,ve);if(Fe<0){M.charAt(ve)=="-"&&this.signum()==0&&(fe=!0);continue}pe=U*pe+Fe,++de>=Y&&(this.dMultiply(oe),this.dAddOffset(pe,0),de=0,pe=0)}de>0&&(this.dMultiply(Math.pow(U,de)),this.dAddOffset(pe,0)),fe&&a.ZERO.subTo(this,this)}function Te(M,U,Y){if(typeof U=="number")if(M<2)this.fromInt(1);else for(this.fromNumber(M,Y),this.testBit(M-1)||this.bitwiseTo(a.ONE.shiftLeft(M-1),ar,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(U);)this.dAddOffset(2,0),this.bitLength()>M&&this.subTo(a.ONE.shiftLeft(M-1),this);else{var oe=new Array,fe=M&7;oe.length=(M>>3)+1,U.nextBytes(oe),fe>0?oe[0]&=(1<<fe)-1:oe[0]=0,this.fromString(oe,256)}}function Be(){var M=this.t,U=new Array;U[0]=this.s;var Y=this.DB-M*this.DB%8,oe,fe=0;if(M-- >0)for(Y<this.DB&&(oe=this[M]>>Y)!=(this.s&this.DM)>>Y&&(U[fe++]=oe|this.s<<this.DB-Y);M>=0;)Y<8?(oe=(this[M]&(1<<Y)-1)<<8-Y,oe|=this[--M]>>(Y+=this.DB-8)):(oe=this[M]>>(Y-=8)&255,Y<=0&&(Y+=this.DB,--M)),oe&128&&(oe|=-256),fe==0&&(this.s&128)!=(oe&128)&&++fe,(fe>0||oe!=this.s)&&(U[fe++]=oe);return U}function kt(M){return this.compareTo(M)==0}function Ut(M){return this.compareTo(M)<0?this:M}function qt(M){return this.compareTo(M)>0?this:M}function Tt(M,U,Y){var oe,fe,de=Math.min(M.t,this.t);for(oe=0;oe<de;++oe)Y[oe]=U(this[oe],M[oe]);if(M.t<this.t){for(fe=M.s&this.DM,oe=de;oe<this.t;++oe)Y[oe]=U(this[oe],fe);Y.t=this.t}else{for(fe=this.s&this.DM,oe=de;oe<M.t;++oe)Y[oe]=U(fe,M[oe]);Y.t=M.t}Y.s=U(this.s,M.s),Y.clamp()}function __$t__(M,U){return M&U}function ii(M){var U=o();return this.bitwiseTo(M,__$t__,U),U}function ar(M,U){return M|U}function en(M){var U=o();return this.bitwiseTo(M,ar,U),U}function tn(M,U){return M^U}function oi(M){var U=o();return this.bitwiseTo(M,tn,U),U}function Tr(M,U){return M&~U}function ai(M){var U=o();return this.bitwiseTo(M,Tr,U),U}function rn(){for(var M=o(),U=0;U<this.t;++U)M[U]=this.DM&~this[U];return M.t=this.t,M.s=~this.s,M}function si(M){var U=o();return M<0?this.rShiftTo(-M,U):this.lShiftTo(M,U),U}function nn(M){var U=o();return M<0?this.lShiftTo(-M,U):this.rShiftTo(M,U),U}function li(M){if(M==0)return-1;var U=0;return M&65535||(M>>=16,U+=16),M&255||(M>>=8,U+=8),M&15||(M>>=4,U+=4),M&3||(M>>=2,U+=2),M&1||++U,U}function ui(){for(var M=0;M<this.t;++M)if(this[M]!=0)return M*this.DB+li(this[M]);return this.s<0?this.t*this.DB:-1}function ci(M){for(var U=0;M!=0;)M&=M-1,++U;return U}function on(){for(var M=0,U=this.s&this.DM,Y=0;Y<this.t;++Y)M+=ci(this[Y]^U);return M}function fi(M){var U=Math.floor(M/this.DB);return U>=this.t?this.s!=0:(this[U]&1<<M%this.DB)!=0}function hi(M,U){var Y=a.ONE.shiftLeft(M);return this.bitwiseTo(Y,U,Y),Y}function an(M){return this.changeBit(M,ar)}function di(M){return this.changeBit(M,Tr)}function sn(M){return this.changeBit(M,tn)}function Ge(M,U){for(var Y=0,oe=0,fe=Math.min(M.t,this.t);Y<fe;)oe+=this[Y]+M[Y],U[Y++]=oe&this.DM,oe>>=this.DB;if(M.t<this.t){for(oe+=M.s;Y<this.t;)oe+=this[Y],U[Y++]=oe&this.DM,oe>>=this.DB;oe+=this.s}else{for(oe+=this.s;Y<M.t;)oe+=M[Y],U[Y++]=oe&this.DM,oe>>=this.DB;oe+=M.s}U.s=oe<0?-1:0,oe>0?U[Y++]=oe:oe<-1&&(U[Y++]=this.DV+oe),U.t=Y,U.clamp()}function pt(M){var U=o();return this.addTo(M,U),U}function ln(M){var U=o();return this.subTo(M,U),U}function pi(M){var U=o();return this.multiplyTo(M,U),U}function Q0(){var M=o();return this.squareTo(M),M}function Y0(M){var U=o();return this.divRemTo(M,U,null),U}function X0(M){var U=o();return this.divRemTo(M,null,U),U}function Z0(M){var U=o(),Y=o();return this.divRemTo(M,U,Y),new Array(U,Y)}function J0(M){this[this.t]=this.am(0,M-1,this,0,0,this.t),++this.t,this.clamp()}function ec(M,U){if(M!=0){for(;this.t<=U;)this[this.t++]=0;for(this[U]+=M;this[U]>=this.DV;)this[U]-=this.DV,++U>=this.t&&(this[this.t++]=0),++this[U]}}function Fr(){}function Ea(M){return M}function tc(M,U,Y){M.multiplyTo(U,Y)}function rc(M,U){M.squareTo(U)}Fr.prototype.convert=Ea,Fr.prototype.revert=Ea,Fr.prototype.mulTo=tc,Fr.prototype.sqrTo=rc;function nc(M){return this.exp(M,new Fr)}function ic(M,U,Y){var oe=Math.min(this.t+M.t,U);for(Y.s=0,Y.t=oe;oe>0;)Y[--oe]=0;var fe;for(fe=Y.t-this.t;oe<fe;++oe)Y[oe+this.t]=this.am(0,M[oe],Y,oe,0,this.t);for(fe=Math.min(M.t,U);oe<fe;++oe)this.am(0,M[oe],Y,oe,0,U-oe);Y.clamp()}function oc(M,U,Y){--U;var oe=Y.t=this.t+M.t-U;for(Y.s=0;--oe>=0;)Y[oe]=0;for(oe=Math.max(U-this.t,0);oe<M.t;++oe)Y[this.t+oe-U]=this.am(U-oe,M[oe],Y,0,0,this.t+oe-U);Y.clamp(),Y.drShiftTo(1,Y)}function zt(M){this.r2=o(),this.q3=o(),a.ONE.dlShiftTo(2*M.t,this.r2),this.mu=this.r2.divide(M),this.m=M}function ac(M){if(M.s<0||M.t>2*this.m.t)return M.mod(this.m);if(M.compareTo(this.m)<0)return M;var U=o();return M.copyTo(U),this.reduce(U),U}function sc(M){return M}function lc(M){for(M.drShiftTo(this.m.t-1,this.r2),M.t>this.m.t+1&&(M.t=this.m.t+1,M.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);M.compareTo(this.r2)<0;)M.dAddOffset(1,this.m.t+1);for(M.subTo(this.r2,M);M.compareTo(this.m)>=0;)M.subTo(this.m,M)}function uc(M,U){M.squareTo(U),this.reduce(U)}function cc(M,U,Y){M.multiplyTo(U,Y),this.reduce(Y)}zt.prototype.convert=ac,zt.prototype.revert=sc,zt.prototype.reduce=lc,zt.prototype.mulTo=cc,zt.prototype.sqrTo=uc;function fc(M,U){var Y=M.bitLength(),oe,fe=_(1),de;if(Y<=0)return fe;Y<18?oe=1:Y<48?oe=3:Y<144?oe=4:Y<768?oe=5:oe=6,Y<8?de=new O(U):U.isEven()?de=new zt(U):de=new x(U);var pe=new Array,ve=3,Fe=oe-1,Ue=(1<<oe)-1;if(pe[1]=de.convert(this),oe>1){var it=o();for(de.sqrTo(pe[1],it);ve<=Ue;)pe[ve]=o(),de.mulTo(it,pe[ve-2],pe[ve]),ve+=2}var tt=M.t-1,Et,cn=!0,ut=o(),ct;for(Y=E(M[tt])-1;tt>=0;){for(Y>=Fe?Et=M[tt]>>Y-Fe&Ue:(Et=(M[tt]&(1<<Y+1)-1)<<Fe-Y,tt>0&&(Et|=M[tt-1]>>this.DB+Y-Fe)),ve=oe;!(Et&1);)Et>>=1,--ve;if((Y-=ve)<0&&(Y+=this.DB,--tt),cn)pe[Et].copyTo(fe),cn=!1;else{for(;ve>1;)de.sqrTo(fe,ut),de.sqrTo(ut,fe),ve-=2;ve>0?de.sqrTo(fe,ut):(ct=fe,fe=ut,ut=ct),de.mulTo(ut,pe[Et],fe)}for(;tt>=0&&!(M[tt]&1<<Y);)de.sqrTo(fe,ut),ct=fe,fe=ut,ut=ct,--Y<0&&(Y=this.DB-1,--tt)}return de.revert(fe)}function hc(M){var U=this.s<0?this.negate():this.clone(),Y=M.s<0?M.negate():M.clone();if(U.compareTo(Y)<0){var oe=U;U=Y,Y=oe}var fe=U.getLowestSetBit(),de=Y.getLowestSetBit();if(de<0)return U;for(fe<de&&(de=fe),de>0&&(U.rShiftTo(de,U),Y.rShiftTo(de,Y));U.signum()>0;)(fe=U.getLowestSetBit())>0&&U.rShiftTo(fe,U),(fe=Y.getLowestSetBit())>0&&Y.rShiftTo(fe,Y),U.compareTo(Y)>=0?(U.subTo(Y,U),U.rShiftTo(1,U)):(Y.subTo(U,Y),Y.rShiftTo(1,Y));return de>0&&Y.lShiftTo(de,Y),Y}function dc(M){if(M<=0)return 0;var U=this.DV%M,Y=this.s<0?M-1:0;if(this.t>0)if(U==0)Y=this[0]%M;else for(var oe=this.t-1;oe>=0;--oe)Y=(U*Y+this[oe])%M;return Y}function pc(M){var U=M.isEven();if(this.isEven()&&U||M.signum()==0)return a.ZERO;for(var Y=M.clone(),oe=this.clone(),fe=_(1),de=_(0),pe=_(0),ve=_(1);Y.signum()!=0;){for(;Y.isEven();)Y.rShiftTo(1,Y),U?((!fe.isEven()||!de.isEven())&&(fe.addTo(this,fe),de.subTo(M,de)),fe.rShiftTo(1,fe)):de.isEven()||de.subTo(M,de),de.rShiftTo(1,de);for(;oe.isEven();)oe.rShiftTo(1,oe),U?((!pe.isEven()||!ve.isEven())&&(pe.addTo(this,pe),ve.subTo(M,ve)),pe.rShiftTo(1,pe)):ve.isEven()||ve.subTo(M,ve),ve.rShiftTo(1,ve);Y.compareTo(oe)>=0?(Y.subTo(oe,Y),U&&fe.subTo(pe,fe),de.subTo(ve,de)):(oe.subTo(Y,oe),U&&pe.subTo(fe,pe),ve.subTo(de,ve))}if(oe.compareTo(a.ONE)!=0)return a.ZERO;if(ve.compareTo(M)>=0)return ve.subtract(M);if(ve.signum()<0)ve.addTo(M,ve);else return ve;return ve.signum()<0?ve.add(M):ve}var Qe=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],mc=(1<<26)/Qe[Qe.length-1];function vc(M){var U,Y=this.abs();if(Y.t==1&&Y[0]<=Qe[Qe.length-1]){for(U=0;U<Qe.length;++U)if(Y[0]==Qe[U])return!0;return!1}if(Y.isEven())return!1;for(U=1;U<Qe.length;){for(var oe=Qe[U],fe=U+1;fe<Qe.length&&oe<mc;)oe*=Qe[fe++];for(oe=Y.modInt(oe);U<fe;)if(oe%Qe[U++]==0)return!1}return Y.millerRabin(M)}function yc(M){var U=this.subtract(a.ONE),Y=U.getLowestSetBit();if(Y<=0)return!1;var oe=U.shiftRight(Y);M=M+1>>1,M>Qe.length&&(M=Qe.length);for(var fe=o(),de=0;de<M;++de){fe.fromInt(Qe[Math.floor(Math.random()*Qe.length)]);var pe=fe.modPow(oe,this);if(pe.compareTo(a.ONE)!=0&&pe.compareTo(U)!=0){for(var ve=1;ve++<Y&&pe.compareTo(U)!=0;)if(pe=pe.modPowInt(2,this),pe.compareTo(a.ONE)==0)return!1;if(pe.compareTo(U)!=0)return!1}}return!0}a.prototype.chunkSize=ce,a.prototype.toRadix=ge,a.prototype.fromRadix=Ce,a.prototype.fromNumber=Te,a.prototype.bitwiseTo=Tt,a.prototype.changeBit=hi,a.prototype.addTo=Ge,a.prototype.dMultiply=J0,a.prototype.dAddOffset=ec,a.prototype.multiplyLowerTo=ic,a.prototype.multiplyUpperTo=oc,a.prototype.modInt=dc,a.prototype.millerRabin=yc,a.prototype.clone=k,a.prototype.intValue=X,a.prototype.byteValue=ae,a.prototype.shortValue=ue,a.prototype.signum=me,a.prototype.toByteArray=Be,a.prototype.equals=kt,a.prototype.min=Ut,a.prototype.max=qt,a.prototype.and=ii,a.prototype.or=en,a.prototype.xor=oi,a.prototype.andNot=ai,a.prototype.not=rn,a.prototype.shiftLeft=si,a.prototype.shiftRight=nn,a.prototype.getLowestSetBit=ui,a.prototype.bitCount=on,a.prototype.testBit=fi,a.prototype.setBit=an,a.prototype.clearBit=di,a.prototype.flipBit=sn,a.prototype.add=pt,a.prototype.subtract=ln,a.prototype.multiply=pi,a.prototype.divide=Y0,a.prototype.remainder=X0,a.prototype.divideAndRemainder=Z0,a.prototype.modPow=fc,a.prototype.modInverse=pc,a.prototype.pow=nc,a.prototype.gcd=hc,a.prototype.isProbablePrime=vc,a.prototype.square=Q0,a.prototype.Barrett=zt;var un,et,Le;function gc(M){et[Le++]^=M&255,et[Le++]^=M>>8&255,et[Le++]^=M>>16&255,et[Le++]^=M>>24&255,Le>=vi&&(Le-=vi)}function Aa(){gc(new Date().getTime())}if(et==null){et=new Array,Le=0;var lt;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var Ca=new Uint8Array(32);for(window.crypto.getRandomValues(Ca),lt=0;lt<32;++lt)et[Le++]=Ca[lt]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Sa=window.crypto.random(32);for(lt=0;lt<Sa.length;++lt)et[Le++]=Sa.charCodeAt(lt)&255}}for(;Le<vi;)lt=Math.floor(65536*Math.random()),et[Le++]=lt>>>8,et[Le++]=lt&255;Le=0,Aa()}function xc(){if(un==null){for(Aa(),un=Ec(),un.init(et),Le=0;Le<et.length;++Le)et[Le]=0;Le=0}return un.next()}function bc(M){var U;for(U=0;U<M.length;++U)M[U]=xc()}function Ba(){}Ba.prototype.nextBytes=bc;function mi(){this.i=0,this.j=0,this.S=new Array}function wc(M){var U,Y,oe;for(U=0;U<256;++U)this.S[U]=U;for(Y=0,U=0;U<256;++U)Y=Y+this.S[U]+M[U%M.length]&255,oe=this.S[U],this.S[U]=this.S[Y],this.S[Y]=oe;this.i=0,this.j=0}function _c(){var M;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,M=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=M,this.S[M+this.S[this.i]&255]}mi.prototype.init=wc,mi.prototype.next=_c;function Ec(){return new mi}var vi=256;e.exports={default:a,BigInteger:a,SecureRandom:Ba}}).call(xe)})(i0);var ke=i0.exports,gm=ke.BigInteger.prototype.Barrett;function Ye(e,r){this.x=r,this.q=e}function Xe(e,r,t,n){this.curve=e,this.x=r,this.y=t,this.z=n==null?ke.BigInteger.ONE:n,this.zinv=null}function gt(e,r,t){this.q=e,this.a=this.fromBigInteger(r),this.b=this.fromBigInteger(t),this.infinity=new Xe(this,null,null),this.reducer=new gm(this.q)}Ye.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},Ye.prototype.toBigInteger=function(){return this.x},Ye.prototype.negate=function(){return new Ye(this.q,this.x.negate().mod(this.q))},Ye.prototype.add=function(e){return new Ye(this.q,this.x.add(e.toBigInteger()).mod(this.q))},Ye.prototype.subtract=function(e){return new Ye(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},Ye.prototype.multiply=function(e){return new Ye(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},Ye.prototype.square=function(){return new Ye(this.q,this.x.square().mod(this.q))},Ye.prototype.divide=function(e){return new Ye(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},Xe.prototype.getX=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)},Xe.prototype.getY=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)},Xe.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(ke.BigInteger.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(ke.BigInteger.ZERO))},Xe.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(ke.BigInteger.ZERO)&&!this.y.toBigInteger().equals(ke.BigInteger.ZERO)},Xe.prototype.negate=function(){return new Xe(this.curve,this.x,this.y.negate(),this.z)},Xe.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),t=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(ke.BigInteger.ZERO.equals(t))return ke.BigInteger.ZERO.equals(r)?this.twice():this.curve.getInfinity();var n=new ke.BigInteger("3"),l=this.x.toBigInteger(),a=this.y.toBigInteger(),o=(e.x.toBigInteger(),e.y.toBigInteger(),t.square()),u=o.multiply(t),d=l.multiply(o),s=r.square().multiply(this.z),i=s.subtract(d.shiftLeft(1)).multiply(e.z).subtract(u).multiply(t).mod(this.curve.q),p=d.multiply(n).multiply(r).subtract(a.multiply(u)).subtract(s.multiply(r)).multiply(e.z).add(r.multiply(u)).mod(this.curve.q),c=u.multiply(this.z).multiply(e.z).mod(this.curve.q);return new Xe(this.curve,this.curve.fromBigInteger(i),this.curve.fromBigInteger(p),c)},Xe.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var e=new ke.BigInteger("3"),r=this.x.toBigInteger(),t=this.y.toBigInteger(),n=t.multiply(this.z),l=n.multiply(t).mod(this.curve.q),a=this.curve.a.toBigInteger(),o=r.square().multiply(e);ke.BigInteger.ZERO.equals(a)||(o=o.add(this.z.square().multiply(a)));var u=(o=o.mod(this.curve.q)).square().subtract(r.shiftLeft(3).multiply(l)).shiftLeft(1).multiply(n).mod(this.curve.q),d=o.multiply(e).multiply(r).subtract(l.shiftLeft(1)).shiftLeft(2).multiply(l).subtract(o.square().multiply(o)).mod(this.curve.q),s=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new Xe(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(d),s)},Xe.prototype.multiply=function(e){if(this.isInfinity())return this;if(e.signum()==0)return this.curve.getInfinity();var r,t=e,n=t.multiply(new ke.BigInteger("3")),l=this.negate(),a=this;for(r=n.bitLength()-2;r>0;--r){a=a.twice();var o=n.testBit(r);o!=t.testBit(r)&&(a=a.add(o?this:l))}return a},Xe.prototype.multiplyTwo=function(e,r,t){var n;n=e.bitLength()>t.bitLength()?e.bitLength()-1:t.bitLength()-1;for(var l=this.curve.getInfinity(),a=this.add(r);n>=0;)l=l.twice(),e.testBit(n)?l=t.testBit(n)?l.add(a):l.add(this):t.testBit(n)&&(l=l.add(r)),--n;return l},gt.prototype.getQ=function(){return this.q},gt.prototype.getA=function(){return this.a},gt.prototype.getB=function(){return this.b},gt.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},gt.prototype.getInfinity=function(){return this.infinity},gt.prototype.fromBigInteger=function(e){return new Ye(this.q,e)},gt.prototype.reduce=function(e){this.reducer.reduce(e)},gt.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var r=(e.length-2)/2,t=e.substr(2,r),n=e.substr(r+2,r);return new Xe(this,this.fromBigInteger(new ke.BigInteger(t,16)),this.fromBigInteger(new ke.BigInteger(n,16)));default:return null}},gt.prototype.encodePointHex=function(e){if(e.isInfinity())return"00";var r=e.getX().toBigInteger().toString(16),t=e.getY().toBigInteger().toString(16),n=this.getQ().toString(16).length;for(n%2!=0&&n++;r.length<n;)r="0"+r;for(;t.length<n;)t="0"+t;return"04"+r+t};var qe=function(e,r){return e<<(r%=32)|e>>>32-r},yt=function(e,r){var t=r-e.length;return(t>0?"0".repeat(t):"")+e},xm=function(e){return e<16?2043430169:2055708042},bm=function(e,r,t,n){return n<16?e^r^t:e&r|e&t|r&t},wm=function(e,r,t,n){return n<16?e^r^t:e&r|~e&t},_m=function(e,r,t){for(var n,l,a,o,u,d=function(b){var y,_=new Array(132);b.forEach(function(F,R){_[R]=F});for(var T=16;T<68;T++)_[T]=(y=_[T-16]^_[T-9]^qe(_[T-3],15))^qe(y,15)^qe(y,23)^qe(_[T-13],7)^_[T-6];for(var B=0;B<64;B++)_[B+68]=_[B]^_[B+4];return _}(r),s=e[0],i=e[1],p=e[2],c=e[3],f=e[4],h=e[5],v=e[6],m=e[7],g=0;g<64;g++)l=(n=qe(qe(s,12)+f+qe(xm(g),g),7))^qe(s,12),a=bm(s,i,p,g)+c+l+d[g+68],o=wm(f,h,v,g)+m+n+d[g],c=p,p=qe(i,9),i=s,s=a,m=v,v=qe(h,19),h=f,f=(u=o)^qe(u,9)^qe(u,17);return[s^e[0],i^e[1],p^e[2],c^e[3],f^e[4],h^e[5],v^e[6],m^e[7]]},Ko=function(e,r,t){if(typeof e=="string"?e=_e.Buffer.from(e,r||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var n,l,a,o,u,d;n=e,l=_e.Buffer.alloc(1,128),o=_e.Buffer.alloc(a=(a=n.length%64)>=56?64-a%56-1:56-a-1,0),u=_e.Buffer.alloc(8),d=8*n.length,u.writeUInt32BE(Math.floor(d/Math.pow(2,32)),0),u.writeUInt32BE(d%Math.pow(2,32),4);for(var s=(e=_e.Buffer.concat([n,l,o,u],n.length+1+a+8)).length/64,i=new Array(s),p=0;p<s;p++){i[p]=new Array(16);for(var c=0;c<16;c++)i[p][c]=e.readUInt32BE(64*p+4*c)}var f=new Array(s);f[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var h=0;h<s;h++)f[h+1]=_m(f[h],i[h]);var v=_e.Buffer.alloc(32);return f[s].forEach(function(m,g){return v.writeInt32BE(m,4*g)}),t?v.toString(t):zr(v)},ul=new ke.SecureRandom,va=function(){var e=new gt(new ke.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new ke.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new ke.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),r=e.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:e,G:r,n:new ke.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),cl=va.curve,fl=va.G,yn=va.n;function hl(e,r){for(var t=[],n=Math.ceil(r/32),l=r%32,a=1;a<=n;a++){var o=_e.Buffer.allocUnsafe(4);o.writeUInt32BE(a);var u=Ko(_e.Buffer.concat([e,o]));t.push(a===n&&l?_e.Buffer.from(u).slice(0,l):_e.Buffer.from(u))}return _e.Buffer.concat(t,r)}var Em={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var e=new ke.BigInteger(yn.bitLength(),ul).mod(yn.subtract(new ke.BigInteger("2"))).add(ke.BigInteger.ONE),r=yt(e.toString(16),64),t=fl.multiply(e);return{privateKey:r,publicKey:"04"+yt(t.getX().toBigInteger().toString(16),64)+yt(t.getY().toBigInteger().toString(16),64)}},encrypt:function(e,r,t){var n=t||{},l=n.mode,a=l===void 0?1:l,o=n.outputEncoding,u=n.pc;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var d=new ke.BigInteger(yn.bitLength(),ul).mod(yn.subtract(ke.BigInteger.ONE)).add(ke.BigInteger.ONE),s=fl.multiply(d),i=yt(s.getX().toBigInteger().toString(16),64)+yt(s.getY().toBigInteger().toString(16),64),p=cl.decodePointHex(r).multiply(d),c=yt(p.getX().toBigInteger().toString(16),64),f=yt(p.getY().toBigInteger().toString(16),64),h=hl(_e.Buffer.from(c+f,"hex"),e.length),v=yt(new ke.BigInteger(e.toString("hex"),16).xor(new ke.BigInteger(h.toString("hex"),16)).toString(16),2*e.length),m=Ko(c+e.toString("hex")+f,"hex","hex"),g=_e.Buffer.from((u?"04":"")+(a===0?i+v+m:i+m+v),"hex");return o?g.toString(o):zr(g)},decrypt:function(e,r,t){var n=t||{},l=n.mode,a=l===void 0?1:l,o=n.outputEncoding,u=n.pc;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var d=(e=u?e.slice(1):e).slice(0,32).toString("hex"),s=e.slice(32,64).toString("hex"),i=cl.decodePointHex("04"+d+s).multiply(new ke.BigInteger(r,16)),p=yt(i.getX().toBigInteger().toString(16),64),c=yt(i.getY().toBigInteger().toString(16),64),f=e.slice(64,96),h=e.slice(96);a===0&&(f=e.slice(e.length-32),h=e.slice(64,e.length-32));var v=hl(_e.Buffer.from(p+c,"hex"),h.length),m=new ke.BigInteger(h.toString("hex"),16).xor(new ke.BigInteger(v.toString("hex"),16)).toString(16),g=Ko(p+m+c,"hex","hex")===f.toString("hex")?_e.Buffer.from(m,"hex"):_e.Buffer.alloc(0);return o?g.toString(o):zr(g)}},gn=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],xn=[2746333894,1453994832,1736282519,2993693404],Am=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],bn=/^[0-9a-f]{32}$/i,o0=function(e){return gn[(4026531840&e)>>>28][(251658240&e)>>>24]<<24|gn[(15728640&e)>>>20][(983040&e)>>>16]<<16|gn[(61440&e)>>>12][(3840&e)>>>8]<<8|gn[(240&e)>>>4][(15&e)>>>0]<<0},a0=function(e){return(r=o0(e))^qe(r,2)^qe(r,10)^qe(r,18)^qe(r,24);var r},s0=function(e){var r,t=new Array(36);t[0]=e[0]^xn[0],t[1]=e[1]^xn[1],t[2]=e[2]^xn[2],t[3]=e[3]^xn[3];for(var n=new Array(32),l=0;l<32;l++)t[l+4]=t[l]^(r=o0(t[l+1]^t[l+2]^t[l+3]^Am[l]))^qe(r,13)^qe(r,23),n[l]=t[l+4];return n},dl=function(e,r){for(var t=s0(r),n=0;n<32;n++)e[n+4]=e[n]^a0(e[n+1]^e[n+2]^e[n+3]^t[n]);return[e[35],e[34],e[33],e[32]]},pl=function(e,r){for(var t=s0(r).reverse(),n=0;n<32;n++)e[n+4]=e[n]^a0(e[n+1]^e[n+2]^e[n+3]^t[n]);return[e[35],e[34],e[33],e[32]]},wn=function(e){return[e.readInt32BE(0),e.readInt32BE(4),e.readInt32BE(8),e.readInt32BE(12)]},_n=function(e){for(var r=_e.Buffer.alloc(16),t=0;t<4;t++)r.writeInt32BE(e[t],4*t);return r},_r={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(e,r,t){var n=t||{},l=n.mode,a=n.iv,o=n.outputEncoding;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');if(!bn.test(r))throw new TypeError("Invalid value of cipher `key`");if(r=_e.Buffer.from(r,"hex"),l===2&&!bn.test(a))throw new TypeError("Invalid value of `iv` option");return function(u,d,s,i){s&&(s=wn(s)),d=wn(d);for(var p=[],c=(u=function(T){var B=16-T.length%16,F=_e.Buffer.alloc(B,B);return _e.Buffer.concat([T,F],T.length+B)}(u)).length/16,f=0;f<c;f++)if(s){var h=16*f,v=[s[0]^u.readInt32BE(h),s[1]^u.readInt32BE(h+4),s[2]^u.readInt32BE(h+8),s[3]^u.readInt32BE(h+12)],m=dl(v,d);p.push(_n(m)),s=m.slice(0)}else{var g=16*f,b=[u.readInt32BE(g),u.readInt32BE(g+4),u.readInt32BE(g+8),u.readInt32BE(g+12)],y=dl(b,d);p.push(_n(y))}var _=_e.Buffer.concat(p,u.length);return i?_.toString(i):zr(_)}(e,r,a=l===2?_e.Buffer.from(a,"hex"):null,o)},decrypt:function(e,r,t){var n=t||{},l=n.mode,a=n.iv,o=n.outputEncoding;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');if(!bn.test(r))throw new TypeError("Invalid value of cipher `key`");if(r=_e.Buffer.from(r,"hex"),l===2&&!bn.test(a))throw new TypeError("Invalid value of `iv` option");return function(u,d,s,i){s&&(s=wn(s)),d=wn(d);var p=[],c=u.length/16;if(s)for(var f=c-1;f>=0;f--){var h,v=16*f;h=f>0?[u.readInt32BE(v-16),u.readInt32BE(v-16+4),u.readInt32BE(v-16+8),u.readInt32BE(v-16+12)]:s;var m=[u.readInt32BE(v),u.readInt32BE(v+4),u.readInt32BE(v+8),u.readInt32BE(v+12)],g=pl(m,d);p.unshift(_n([g[0]^h[0],g[1]^h[1],g[2]^h[2],g[3]^h[3]]))}else for(var b=0;b<c;b++){var y=16*b,_=[u.readInt32BE(y),u.readInt32BE(y+4),u.readInt32BE(y+8),u.readInt32BE(y+12)],T=pl(_,d);p.push(_n(T))}var B=_e.Buffer.concat(p,u.length-p[p.length-1][15]);return i?B.toString(i):zr(B)}(e,r,a=l===2?_e.Buffer.from(a,"hex"):null,o)}};(function(){if(typeof Object.id=="undefined"){var e=0;Object.id=function(r){return typeof r.__uniqueid=="undefined"&&Object.defineProperty(r,"__uniqueid",{value:++e,enumerable:!1,writable:!1}),r.__uniqueid}}})();function Cm(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(t){var n,l,a,o,u,d;for(a=t.length,l=0,n="";l<a;){if(o=t.charCodeAt(l++)&255,l==a){n+=e.charAt(o>>2),n+=e.charAt((o&3)<<4),n+="==";break}if(u=t.charCodeAt(l++),l==a){n+=e.charAt(o>>2),n+=e.charAt((o&3)<<4|(u&240)>>4),n+=e.charAt((u&15)<<2),n+="=";break}d=t.charCodeAt(l++),n+=e.charAt(o>>2),n+=e.charAt((o&3)<<4|(u&240)>>4),n+=e.charAt((u&15)<<2|(d&192)>>6),n+=e.charAt(d&63)}return n},this.decode=function(t){var n,l,a,o,u,d,s;for(d=t.length,u=0,s="";u<d;){do n=r[t.charCodeAt(u++)&255];while(u<d&&n==-1);if(n==-1)break;do l=r[t.charCodeAt(u++)&255];while(u<d&&l==-1);if(l==-1)break;s+=String.fromCharCode(n<<2|(l&48)>>4);do{if(a=t.charCodeAt(u++)&255,a==61)return s;a=r[a]}while(u<d&&a==-1);if(a==-1)break;s+=String.fromCharCode((l&15)<<4|(a&60)>>2);do{if(o=t.charCodeAt(u++)&255,o==61)return s;o=r[o]}while(u<d&&o==-1);if(o==-1)break;s+=String.fromCharCode((a&3)<<6|o)}return s},this.utf16to8=function(t){var n,l,a,o;for(n="",a=t.length,l=0;l<a;l++)o=t.charCodeAt(l),o>=1&&o<=127?n+=t.charAt(l):o>2047?(n+=String.fromCharCode(224|o>>12&15),n+=String.fromCharCode(128|o>>6&63),n+=String.fromCharCode(128|o>>0&63)):(n+=String.fromCharCode(192|o>>6&31),n+=String.fromCharCode(128|o>>0&63));return n},this.utf8to16=function(t){var n,l,a,o,u,d;for(n="",a=t.length,l=0;l<a;)switch(o=t.charCodeAt(l++),o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=t.charAt(l-1);break;case 12:case 13:u=t.charCodeAt(l++),n+=String.fromCharCode((o&31)<<6|u&63);break;case 14:u=t.charCodeAt(l++),d=t.charCodeAt(l++),n+=String.fromCharCode((o&15)<<12|(u&63)<<6|(d&63)<<0);break}return n},this.charToHex=function(t){var n,l,a;for(n="",l=0;l<t.length;)a=t.charCodeAt(l++).toString(16),n+="\\0x"+a,n+=l>0&&l%8==0?`\r
32
- `:", ";return n}}function Sm(){var e=0,r=new Object;this.add=function(t,n){this.containsKey(t)||e++,r[t]=n},this.getValue=function(t){return this.containsKey(t)?r[t]:null},this.remove=function(t){this.containsKey(t)&&delete r[t]&&e--},this.containsKey=function(t){return t in r},this.containsValue=function(t){for(var n in r)if(r[n]==t)return!0;return!1},this.getValues=function(){var t=[];for(var n in r)t.push(r[n]);return t},this.getKeys=function(){var t=[];for(var n in r)t.push(n);return t},this.getSize=function(){return e},this.clear=function(){e=0,r=new Object}}function Bm(e){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new Sm,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var r=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(r)},this.loadModuleCallBack=function(r){if(!r)throw r.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(r,t,n){var l=Object.id(n).toString();this.callbacks_.add(l,n);var a={MsgId:l,Method:r+"|"+e};t&&(a.Param=JSON.stringify(t));var o=JSON.stringify(a);this.connect&&this.ws.send(o)},this.ready=function(r){this.ready_func_=r},this._callback=function(r){var t=JSON.parse(r.data),n=t.MsgId;if(this.callbacks_.containsKey(n)){var l=this.callbacks_.getValue(n);l(t.Result,t.Response),this.callbacks_.remove(n)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:r,DongleInfoNum:t},n){this.exec("Arm_GetDongleInfo",[parseInt(r),parseInt(t)],n)},this.Arm_Enum=function(r){this.exec("Arm_Enum",null,r)},this.Arm_Open=function({Index:r},t){this.exec("Arm_Open",[parseInt(r)],t)},this.Arm_Close=function({Handle:r},t){this.exec("Arm_Close",[parseInt(r)],t)},this.Arm_VerifyPIN=function({Handle:r,UserPin:t,UserType:n},l){this.exec("Arm_VerifyPIN",[parseInt(r),n,t],l)},this.Arm_ResetState=function({Handle:r},t){this.exec("Arm_ResetState",[parseInt(r)],t)},this.Arm_GenRandom=function({Handle:r,RandomLen:t},n){this.exec("Arm_GenRandom",[parseInt(r),parseInt(t)],n)},this.Arm_LEDControl=function({Handle:r,LedFlag:t},n){this.exec("Arm_LEDControl",[parseInt(r),t],n)},this.Arm_SwitchProtocol=function({Handle:r,ProtocolFlag:t},n){this.exec("Arm_SwitchProtocol",[parseInt(r),t],n)},this.Arm_CreateFile=function({Handle:r,FileID:t,FileType:n,AttrBuffer:l},a){this.exec("Arm_CreateFile",[parseInt(r),n,parseInt(t),l],a)},this.Arm_WriteFile=function({Handle:r,FileID:t,FileType:n,FileOffset:l,DataInput:a},o){this.exec("Arm_WriteFile",[parseInt(r),n,parseInt(t),parseInt(l),a],o)},this.Arm_ReadFile0001=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0001"),parseInt(0),parseInt("64")],t)},this.Arm_ReadFile0002=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0002"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0003=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0003"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0004=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0004"),parseInt(0),parseInt("2048")],t)},this.Arm_ReadFile0005=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0005"),parseInt(0),parseInt("2048")],t)},this.Arm_DownloadExeFile=function({Handle:r,Count:t,ExeFileInfo:n},l){this.exec("Arm_DownloadExeFile",[parseInt(r),parseInt(t),n],l)},this.Arm_RunExeFile=function({Handle:r,FileID:t,InData:n,DataLen:l},a){this.exec("Arm_RunExeFile",[parseInt(r),parseInt(t),n,n.length,parseInt(l)],a)},this.Arm_ReadRunExeFileData=function(r){this.exec("Arm_ReadRunExeFileData",null,r)},this.Arm_DeleteFile=function({Handle:r,FileID:t,FileType:n},l){this.exec("Arm_DeleteFile",[parseInt(r),n,parseInt(t)],l)},this.Arm_WriteData=function({Handle:r,Offset:t,DataInput:n},l){this.exec("Arm_WriteData",[parseInt(r),parseInt(t),n],l)},this.Arm_ReadData=function({Handle:r,Offset:t,ReadLength:n},l){this.exec("Arm_ReadData",[parseInt(r),parseInt(t),n],l)},this.Arm_WriteShareMemory=function({Handle:r,DataInput:t},n){this.exec("Arm_WriteShareMemory",[parseInt(r),t],n)},this.Arm_ReadShareMemory=function({Handle:r},t){this.exec("Arm_ReadShareMemory",[parseInt(r)],t)},this.Arm_GenUniqueKey=function({Handle:r,Seed:t},n){this.exec("Arm_GenUniqueKey",[parseInt(r),t.length,t],n)},this.Arm_ChangePIN=function({Handle:r,NewPIN:t,OldPIN:n,TryCount:l,PinFlag:a},o){this.exec("Arm_ChangePIN",[parseInt(r),a,n,t,parseInt(l)],o)},this.Arm_ResetUserPIN=function({Handle:r,AdminPIN:t},n){this.exec("Arm_ResetUserPIN",[parseInt(r),t],n)},this.Arm_SetUserID=function({Handle:r,UserID:t},n){this.exec("Arm_SetUserID",[parseInt(r),parseInt(t)],n)},this.Arm_GetDeadline=function({Handle:r},t){this.exec("Arm_GetDeadline",[parseInt(r)],t)},this.Arm_SetDeadline=function({Handle:r,SetDeadTime:t},n){this.exec("Arm_SetDeadline",[parseInt(r),parseInt(t)],n)},this.Arm_GetUTCTime=function({Handle:r},t){this.exec("Arm_GetUTCTime",[parseInt(r)],t)},this.Arm_RFS=function({Handle:r},t){this.exec("Arm_RFS",[parseInt(r)],t)},this.Arm_RsaGenPubPriKey=function({Handle:r,RsaFileId:t},n){this.exec("Arm_RsaGenPubPriKey",[parseInt(r),parseInt(t)],n)},this.Arm_EccGenPubPriKey=function({Handle:r,EccFileId:t},n){this.exec("Arm_EccGenPubPriKey",[parseInt(r),parseInt(t)],n)},this.Arm_Sm2GenPubPriKey=function({Handle:r,Sm2FileId:t},n){this.exec("Arm_Sm2GenPubPriKey",[parseInt(r),parseInt(t)],n)},this.Arm_ReadRsaPri=function(r){this.exec("Arm_ReadRsaPri",null,r)},this.Arm_ReadRsaPub=function(r){this.exec("Arm_ReadRsaPub",null,r)},this.Arm_ReadEccPri=function(r){this.exec("Arm_ReadEccPri",null,r)},this.Arm_ReadEccPub=function(r){this.exec("Arm_ReadEccPub",null,r)},this.Arm_ReadSm2Pri=function(r){this.exec("Arm_ReadSm2Pri",null,r)},this.Arm_ReadSm2Pub=function(r){this.exec("Arm_ReadSm2Pub",null,r)},this.Arm_RsaPri=function({Handle:r,RsaPri_Flag:t,RsaPriInData:n,RsaPriFileID:l,RsaPriFileSize:a},o){this.exec("Arm_RsaPri",[parseInt(r),parseInt(l),parseInt(a),t,n],o)},this.Arm_RsaPub=function({Handle:r,RsaPubKey:t,RsaPub_Flag:n,RsaPubInData:l,RsaPubFileSize:a},o){this.exec("Arm_RsaPub",[parseInt(r),parseInt(a),n,t,t.length,l],o)},this.Arm_EccSign=function({Handle:r,HashData:t,EccFileId:n},l){this.exec("Arm_EccSign",[parseInt(r),parseInt(n),t],l)},this.Arm_EccVerify=function({Handle:r,HashData:t,EccPubKey:n,EccSignData:l},a){this.exec("Arm_EccVerify",[parseInt(r),n,n.length,t,l],a)},this.Arm_Sm2Sign=function({Handle:r,HashData:t,Sm2FileId:n},l){this.exec("Arm_Sm2Sign",[parseInt(r),parseInt(n),t],l)},this.Arm_Sm2Verify=function({Handle:r,HashData:t,Sm2PubKey:n,Sm2SignData:l},a){this.exec("Arm_Sm2Verify",[parseInt(r),n,n.length,t,l],a)},this.Arm_TDES=function({Handle:r,Tdes_Flag:t,TdesFileID:n,TdesInData:l},a){this.exec("Arm_TDES",[parseInt(r),parseInt(n),t,l],a)},this.Arm_SM4=function({Handle:r,Sm4_Flag:t,Sm4FileID:n,Sm4InData:l},a){this.exec("Arm_SM4",[parseInt(r),parseInt(n),t,l],a)},this.Arm_HASH=function({Handle:r,Hash_Flag:t,HashInData:n},l){this.exec("Arm_HASH",[parseInt(r),t,n],l)},this.Arm_Seed=function({Handle:r,SeedData:t,SeedLength:n},l){this.exec("Arm_Seed",[parseInt(r),n,t],l)},this.Arm_LimitSeedCount=function({Handle:r,SeedCount:t},n){this.exec("Arm_LimitSeedCount",[parseInt(r),parseInt(t)],n)},this.Arm_GenMotherKey=function({Handle:r,SeedLen:t,SeedForPID:n,SonCount:l,StartUserID:a,AdminTryCount:o,UserPin:u,UserTryCount:d,UpdateRSAPriKey:s},i){this.exec("Arm_GenMotherKey",[parseInt(r),parseInt(t),n,u,parseInt(d),parseInt(o),s,parseInt(a),parseInt(l)],i)},this.Arm_RequestInit=function({Handle:r},t){this.exec("Arm_RequestInit",[parseInt(r)],t)},this.Arm_GetInitDataFromMother=function({Handle:r},t){this.exec("Arm_GetInitDataFromMother",[parseInt(r),Request],t)},this.Arm_InitSon=function({Handle:r,InitData:t},n){this.exec("Arm_InitSon",[parseInt(r),t],n)},this.Arm_SetUpdatePriKey=function({Handle:r,UpdatePriKey:t},n){this.exec("Arm_SetUpdatePriKey",[parseInt(r),t],n)},this.Arm_MakeUpdatePacket=function({Handle:r,HID:t,Func:n,FileID:l,FileType:a,Offset:o,DataLen:u,DataBuffer:d,UpRSAPubKey:s},i){this.exec("Arm_MakeUpdatePacket",[parseInt(r),t,n,a,parseInt(l),parseInt(o),d,s,parseInt(u)],i)},this.Arm_MakeUpdatePacketFromMother=function({Handle:r,HID:t,Func:n,FileID:l,FileType:a,Offset:o,DataLen:u,DataBuffer:d},s){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(r),t,n,a,parseInt(l),parseInt(o),d,parseInt(u)],s)},this.Arm_Update=function({Handle:r,UpdateData:t},n){this.exec("Arm_Update",[parseInt(r),t],n)},this.Arm_Set_DATA_FILE_ATTR=function({Size:r,ReadPriv:t,WritePriv:n},l){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(r),parseInt(t),parseInt(n)],l)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:r,Size:t,Type:n,Priv:l,IsReset:a,IsDecOnRAM:o},u){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[n,parseInt(t),parseInt(r),parseInt(l),parseInt(o),parseInt(a)],u)},this.Arm_Set_KEY_FILE_ATTR=function({Size:r,PrivEnc:t},n){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(r),parseInt(t)],n)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:r,PrivExe:t},n){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(r),parseInt(t)],n)},this.Arm_Set_DATA_LIC=function({ReadPriv:r,WritePriv:t},n){this.exec("Arm_Set_DATA_LIC",[parseInt(r),parseInt(t)],n)},this.Arm_Set_PRIKEY_LIC=function({Count:r,Priv:t,IsReset:n,IsDecOnRAM:l},a){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(r),parseInt(t),parseInt(l),parseInt(n)],a)},this.Arm_Set_KEY_LIC=function({PrivEnc:r},t){this.exec("Arm_Set_KEY_LIC",[parseInt(r)],t)},this.Arm_Set_EXE_LIC=function({PrivExe:r},t){this.exec("Arm_Set_EXE_LIC",[parseInt(r)],t)},this.Arm_Set_EXE_FILE_INFO=function({FileID:r,FileData:t,FileSize:n,InBuffer:l,CallLimit:a},o){this.exec("Arm_Set_EXE_FILE_INFO",[l,parseInt(n),parseInt(r),parseInt(a),t,t.length],o)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:r},t){this.exec("Arm_Clear_EXE_FILE_INFO",[r],t)}}const km={HID:0},En={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},ml={USER:0};class l0{constructor(){It(this,"Base64",new Cm);It(this,"AtlCtrl",null);It(this,"ArmCount",0);It(this,"ArmIndex",0);It(this,"ArmHandle",0);It(this,"ArmRandom","");try{this.AtlCtrl=new Bm("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(r){console.error(r),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((r,t)=>{this.AtlCtrl.Arm_Enum((n,l)=>{n?(this.ArmCount=+l,r(l)):t(l)})})}armOpen(r=0){if(this.AtlCtrl)return this.ArmIndex=r,new Promise((t,n)=>{this.AtlCtrl.Arm_Open({Index:r},(l,a)=>{l?(this.ArmHandle=+a,t(a)):(this.ArmHandle=a,n(a))})})}armClose(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_Close({Handle:r},(l,a)=>{l?t(a):n(a)})})}armChangePIN(r,t,n=255,l=ml.USER,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((o,u)=>{this.AtlCtrl.Arm_ChangePIN({Handle:a,NewPIN:r,OldPIN:t,TryCount:n,PinFlag:l},(d,s)=>{d&&s==0?(this.ArmPin=r,o(s)):u(s)})})}armGenRandom(r=16,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_GenRandom({Handle:t,RandomLen:r},(a,o)=>{a?(this.ArmRandom=o,n(o)):l(o)})})}armGetDeadline(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_GetDeadline({Handle:r},(l,a)=>{l?(this.ArmDeadline=a,t(a)):n(a)})})}armGenUniqueKey(r="MTIzNDU2Nzg5MA==",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:t,Seed:r},(a,o)=>{a?(this.ArmUKey=o,n(o)):l(o)})})}armGetDongleInfo(r=0,t=En.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=r,new Promise((n,l)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:r,DongleInfoNum:t},(a,o)=>{if(a){switch(t){case En.USER_ID:this.ArmUid=o;break;case En.PRODUCT_ID:this.ArmPid=o;break;case En.HARDWARE_ID:this.ArmHid=o;break}n(o)}else l(o)})})}armLEDControl(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_LEDControl({Handle:t,LedFlag:r},(a,o)=>{a&&o==0?n(o):l(o)})})}armRFS(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_RFS({Handle:r},(l,a)=>{l&&a==0?t(a):n(a)})})}armReadFile(r="0001",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl[`Arm_ReadFile${r}`]({Handle:t},(a,o)=>{if(a&&o.length>0)try{o=this.Base64.decode(o),n(o)}catch(u){console.error(u),n(o)}else l(o)})})}armResetState(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_ResetState({Handle:r},(l,a)=>{l&&a==0?t(a):n(a)})})}armResetUserPIN(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:t,AdminPIN:r},(a,o)=>{a&&o==0?n(o):l(o)})})}armSetUserID(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_SetUserID({Handle:t,UserID:r},(a,o)=>{a&&o==0?n(o):l(o)})})}armSetDeadline(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_SetDeadline({Handle:t,SetDeadTime:r},(a,o)=>{a&&o==0?n(o):l(o)})})}armSwitchProtocol(r=km.HID,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:t,ProtocolFlag:r},(a,o)=>{a&&o==0?n(o):l(o)})})}armVerifyPIN(r,t=ml.USER,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((l,a)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:n,UserPin:r,UserType:t},(o,u)=>{o&&u==0?(this.ArmPin=r,l(u)):a(u)})})}armReadData(r=0,t=128,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((l,a)=>{this.AtlCtrl.Arm_ReadData({Handle:n,Offset:r,ReadLength:t},(o,u)=>{o?(this.ArmData=u,l(u)):a(u)})})}armWriteData(r,t=0,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((l,a)=>{this.AtlCtrl.Arm_WriteData({Handle:n,Offset:t,DataInput:r},(o,u)=>{o&&u==0?l(u):a(u)})})}armReadShareMemory(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:r},(l,a)=>{l?(this.ArmData=a,t(a)):n(a)})})}armWriteShareMemory(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:t,DataInput:r},(a,o)=>{a&&o==0?n(o):l(o)})})}}const u0=Symbol(),On="el",Tm="is-",Ht=(e,r,t,n,l)=>{let a=`${e}-${r}`;return t&&(a+=`-${t}`),n&&(a+=`__${n}`),l&&(a+=`--${l}`),a},c0=Symbol("namespaceContextKey"),Fm=e=>{const r=e||(P.getCurrentInstance()?P.inject(c0,P.ref(On)):P.ref(On));return P.computed(()=>P.unref(r)||On)},Br=(e,r)=>{const t=Fm(r);return{namespace:t,b:(v="")=>Ht(t.value,e,v,"",""),e:v=>v?Ht(t.value,e,"",v,""):"",m:v=>v?Ht(t.value,e,"","",v):"",be:(v,m)=>v&&m?Ht(t.value,e,v,m,""):"",em:(v,m)=>v&&m?Ht(t.value,e,"",v,m):"",bm:(v,m)=>v&&m?Ht(t.value,e,v,"",m):"",bem:(v,m,g)=>v&&m&&g?Ht(t.value,e,v,m,g):"",is:(v,...m)=>{const g=m.length>=1?m[0]:!0;return v&&g?`${Tm}${v}`:""},cssVar:v=>{const m={};for(const g in v)v[g]&&(m[`--${t.value}-${g}`]=v[g]);return m},cssVarName:v=>`--${t.value}-${v}`,cssVarBlock:v=>{const m={};for(const g in v)v[g]&&(m[`--${t.value}-${e}-${g}`]=v[g]);return m},cssVarBlockName:v=>`--${t.value}-${e}-${v}`}};/**
33
- * @vue/shared v3.5.29
34
+ */(function(e){var r=ui,t=ba,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50;var l=2147483647;e.kMaxLength=l,u.TYPED_ARRAY_SUPPORT=o(),!u.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var M=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf(M,C),M.foo()===42}catch(B){return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function a(M){if(M>l)throw new RangeError('The value "'+M+'" is invalid for option "size"');var C=new Uint8Array(M);return Object.setPrototypeOf(C,u.prototype),C}function u(M,C,B){if(typeof M=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(M)}return h(M,C,B)}u.poolSize=8192;function h(M,C,B){if(typeof M=="string")return c(M,C);if(ArrayBuffer.isView(M))return d(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(Z(M,ArrayBuffer)||M&&Z(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Z(M,SharedArrayBuffer)||M&&Z(M.buffer,SharedArrayBuffer)))return v(M,C,B);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var K=M.valueOf&&M.valueOf();if(K!=null&&K!==M)return u.from(K,C,B);var oe=m(M);if(oe)return oe;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return u.from(M[Symbol.toPrimitive]("string"),C,B);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}u.from=function(M,C,B){return h(M,C,B)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function s(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function i(M,C,B){return s(M),M<=0?a(M):C!==void 0?typeof B=="string"?a(M).fill(C,B):a(M).fill(C):a(M)}u.alloc=function(M,C,B){return i(M,C,B)};function p(M){return s(M),a(M<0?0:b(M)|0)}u.allocUnsafe=function(M){return p(M)},u.allocUnsafeSlow=function(M){return p(M)};function c(M,C){if((typeof C!="string"||C==="")&&(C="utf8"),!u.isEncoding(C))throw new TypeError("Unknown encoding: "+C);var B=y(M,C)|0,K=a(B),oe=K.write(M,C);return oe!==B&&(K=K.slice(0,oe)),K}function f(M){for(var C=M.length<0?0:b(M.length)|0,B=a(C),K=0;K<C;K+=1)B[K]=M[K]&255;return B}function d(M){if(Z(M,Uint8Array)){var C=new Uint8Array(M);return v(C.buffer,C.byteOffset,C.byteLength)}return f(M)}function v(M,C,B){if(C<0||M.byteLength<C)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<C+(B||0))throw new RangeError('"length" is outside of buffer bounds');var K;return C===void 0&&B===void 0?K=new Uint8Array(M):B===void 0?K=new Uint8Array(M,C):K=new Uint8Array(M,C,B),Object.setPrototypeOf(K,u.prototype),K}function m(M){if(u.isBuffer(M)){var C=b(M.length)|0,B=a(C);return B.length===0||M.copy(B,0,0,C),B}if(M.length!==void 0)return typeof M.length!="number"||ee(M.length)?a(0):f(M);if(M.type==="Buffer"&&Array.isArray(M.data))return f(M.data)}function b(M){if(M>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return M|0}function g(M){return+M!=M&&(M=0),u.alloc(+M)}u.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==u.prototype},u.compare=function(C,B){if(Z(C,Uint8Array)&&(C=u.from(C,C.offset,C.byteLength)),Z(B,Uint8Array)&&(B=u.from(B,B.offset,B.byteLength)),!u.isBuffer(C)||!u.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===B)return 0;for(var K=C.length,oe=B.length,ue=0,ce=Math.min(K,oe);ue<ce;++ue)if(C[ue]!==B[ue]){K=C[ue],oe=B[ue];break}return K<oe?-1:oe<K?1:0},u.isEncoding=function(C){switch(String(C).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}},u.concat=function(C,B){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return u.alloc(0);var K;if(B===void 0)for(B=0,K=0;K<C.length;++K)B+=C[K].length;var oe=u.allocUnsafe(B),ue=0;for(K=0;K<C.length;++K){var ce=C[K];if(Z(ce,Uint8Array))ue+ce.length>oe.length?u.from(ce).copy(oe,ue):Uint8Array.prototype.set.call(oe,ce,ue);else if(u.isBuffer(ce))ce.copy(oe,ue);else throw new TypeError('"list" argument must be an Array of Buffers');ue+=ce.length}return oe};function y(M,C){if(u.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||Z(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);var B=M.length,K=arguments.length>2&&arguments[2]===!0;if(!K&&B===0)return 0;for(var oe=!1;;)switch(C){case"ascii":case"latin1":case"binary":return B;case"utf8":case"utf-8":return ae(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B*2;case"hex":return B>>>1;case"base64":return k(M).length;default:if(oe)return K?-1:ae(M).length;C=(""+C).toLowerCase(),oe=!0}}u.byteLength=y;function _(M,C,B){var K=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((B===void 0||B>this.length)&&(B=this.length),B<=0)||(B>>>=0,C>>>=0,B<=C))return"";for(M||(M="utf8");;)switch(M){case"hex":return q(this,C,B);case"utf8":case"utf-8":return I(this,C,B);case"ascii":return te(this,C,B);case"latin1":case"binary":return W(this,C,B);case"base64":return S(this,C,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,C,B);default:if(K)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),K=!0}}u.prototype._isBuffer=!0;function T(M,C,B){var K=M[C];M[C]=M[B],M[B]=K}u.prototype.swap16=function(){var C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var B=0;B<C;B+=2)T(this,B,B+1);return this},u.prototype.swap32=function(){var C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var B=0;B<C;B+=4)T(this,B,B+3),T(this,B+1,B+2);return this},u.prototype.swap64=function(){var C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var B=0;B<C;B+=8)T(this,B,B+7),T(this,B+1,B+6),T(this,B+2,B+5),T(this,B+3,B+4);return this},u.prototype.toString=function(){var C=this.length;return C===0?"":arguments.length===0?I(this,0,C):_.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(C){if(!u.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:u.compare(this,C)===0},u.prototype.inspect=function(){var C="",B=e.INSPECT_MAX_BYTES;return C=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(C+=" ... "),"<Buffer "+C+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(C,B,K,oe,ue){if(Z(C,Uint8Array)&&(C=u.from(C,C.offset,C.byteLength)),!u.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(B===void 0&&(B=0),K===void 0&&(K=C?C.length:0),oe===void 0&&(oe=0),ue===void 0&&(ue=this.length),B<0||K>C.length||oe<0||ue>this.length)throw new RangeError("out of range index");if(oe>=ue&&B>=K)return 0;if(oe>=ue)return-1;if(B>=K)return 1;if(B>>>=0,K>>>=0,oe>>>=0,ue>>>=0,this===C)return 0;for(var ce=ue-oe,me=K-B,xe=Math.min(ce,me),Ce=this.slice(oe,ue),Te=C.slice(B,K),Be=0;Be<xe;++Be)if(Ce[Be]!==Te[Be]){ce=Ce[Be],me=Te[Be];break}return ce<me?-1:me<ce?1:0};function D(M,C,B,K,oe){if(M.length===0)return-1;if(typeof B=="string"?(K=B,B=0):B>2147483647?B=2147483647:B<-2147483648&&(B=-2147483648),B=+B,ee(B)&&(B=oe?0:M.length-1),B<0&&(B=M.length+B),B>=M.length){if(oe)return-1;B=M.length-1}else if(B<0)if(oe)B=0;else return-1;if(typeof C=="string"&&(C=u.from(C,K)),u.isBuffer(C))return C.length===0?-1:F(M,C,B,K,oe);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?oe?Uint8Array.prototype.indexOf.call(M,C,B):Uint8Array.prototype.lastIndexOf.call(M,C,B):F(M,[C],B,K,oe);throw new TypeError("val must be string, number or Buffer")}function F(M,C,B,K,oe){var ue=1,ce=M.length,me=C.length;if(K!==void 0&&(K=String(K).toLowerCase(),K==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(M.length<2||C.length<2)return-1;ue=2,ce/=2,me/=2,B/=2}function xe(__$t__,qt){return ue===1?__$t__[qt]:__$t__.readUInt16BE(qt*ue)}var Ce;if(oe){var Te=-1;for(Ce=B;Ce<ce;Ce++)if(xe(M,Ce)===xe(C,Te===-1?0:Ce-Te)){if(Te===-1&&(Te=Ce),Ce-Te+1===me)return Te*ue}else Te!==-1&&(Ce-=Ce-Te),Te=-1}else for(B+me>ce&&(B=ce-me),Ce=B;Ce>=0;Ce--){for(var Be=!0,Tt=0;Tt<me;Tt++)if(xe(M,Ce+Tt)!==xe(C,Tt)){Be=!1;break}if(Be)return Ce}return-1}u.prototype.includes=function(C,B,K){return this.indexOf(C,B,K)!==-1},u.prototype.indexOf=function(C,B,K){return D(this,C,B,K,!0)},u.prototype.lastIndexOf=function(C,B,K){return D(this,C,B,K,!1)};function R(M,C,B,K){B=Number(B)||0;var oe=M.length-B;K?(K=Number(K),K>oe&&(K=oe)):K=oe;var ue=C.length;K>ue/2&&(K=ue/2);for(var ce=0;ce<K;++ce){var me=parseInt(C.substr(ce*2,2),16);if(ee(me))return ce;M[B+ce]=me}return ce}function X(M,C,B,K){return j(ae(C,M.length-B),M,B,K)}function H(M,C,B,K){return j(x(C),M,B,K)}function E(M,C,B,K){return j(k(C),M,B,K)}function A(M,C,B,K){return j(w(C,M.length-B),M,B,K)}u.prototype.write=function(C,B,K,oe){if(B===void 0)oe="utf8",K=this.length,B=0;else if(K===void 0&&typeof B=="string")oe=B,K=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(K)?(K=K>>>0,oe===void 0&&(oe="utf8")):(oe=K,K=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-B;if((K===void 0||K>ue)&&(K=ue),C.length>0&&(K<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");for(var ce=!1;;)switch(oe){case"hex":return R(this,C,B,K);case"utf8":case"utf-8":return X(this,C,B,K);case"ascii":case"latin1":case"binary":return H(this,C,B,K);case"base64":return E(this,C,B,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,C,B,K);default:if(ce)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),ce=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(M,C,B){return C===0&&B===M.length?r.fromByteArray(M):r.fromByteArray(M.slice(C,B))}function I(M,C,B){B=Math.min(M.length,B);for(var K=[],oe=C;oe<B;){var ue=M[oe],ce=null,me=ue>239?4:ue>223?3:ue>191?2:1;if(oe+me<=B){var xe,Ce,Te,Be;switch(me){case 1:ue<128&&(ce=ue);break;case 2:xe=M[oe+1],(xe&192)===128&&(Be=(ue&31)<<6|xe&63,Be>127&&(ce=Be));break;case 3:xe=M[oe+1],Ce=M[oe+2],(xe&192)===128&&(Ce&192)===128&&(Be=(ue&15)<<12|(xe&63)<<6|Ce&63,Be>2047&&(Be<55296||Be>57343)&&(ce=Be));break;case 4:xe=M[oe+1],Ce=M[oe+2],Te=M[oe+3],(xe&192)===128&&(Ce&192)===128&&(Te&192)===128&&(Be=(ue&15)<<18|(xe&63)<<12|(Ce&63)<<6|Te&63,Be>65535&&Be<1114112&&(ce=Be))}}ce===null?(ce=65533,me=1):ce>65535&&(ce-=65536,K.push(ce>>>10&1023|55296),ce=56320|ce&1023),K.push(ce),oe+=me}return V(K)}var z=4096;function V(M){var C=M.length;if(C<=z)return String.fromCharCode.apply(String,M);for(var B="",K=0;K<C;)B+=String.fromCharCode.apply(String,M.slice(K,K+=z));return B}function te(M,C,B){var K="";B=Math.min(M.length,B);for(var oe=C;oe<B;++oe)K+=String.fromCharCode(M[oe]&127);return K}function W(M,C,B){var K="";B=Math.min(M.length,B);for(var oe=C;oe<B;++oe)K+=String.fromCharCode(M[oe]);return K}function q(M,C,B){var K=M.length;(!C||C<0)&&(C=0),(!B||B<0||B>K)&&(B=K);for(var oe="",ue=C;ue<B;++ue)oe+=re[M[ue]];return oe}function G(M,C,B){for(var K=M.slice(C,B),oe="",ue=0;ue<K.length-1;ue+=2)oe+=String.fromCharCode(K[ue]+K[ue+1]*256);return oe}u.prototype.slice=function(C,B){var K=this.length;C=~~C,B=B===void 0?K:~~B,C<0?(C+=K,C<0&&(C=0)):C>K&&(C=K),B<0?(B+=K,B<0&&(B=0)):B>K&&(B=K),B<C&&(B=C);var oe=this.subarray(C,B);return Object.setPrototypeOf(oe,u.prototype),oe};function U(M,C,B){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+C>B)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(C,B,K){C=C>>>0,B=B>>>0,K||U(C,B,this.length);for(var oe=this[C],ue=1,ce=0;++ce<B&&(ue*=256);)oe+=this[C+ce]*ue;return oe},u.prototype.readUintBE=u.prototype.readUIntBE=function(C,B,K){C=C>>>0,B=B>>>0,K||U(C,B,this.length);for(var oe=this[C+--B],ue=1;B>0&&(ue*=256);)oe+=this[C+--B]*ue;return oe},u.prototype.readUint8=u.prototype.readUInt8=function(C,B){return C=C>>>0,B||U(C,1,this.length),this[C]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(C,B){return C=C>>>0,B||U(C,2,this.length),this[C]|this[C+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(C,B){return C=C>>>0,B||U(C,2,this.length),this[C]<<8|this[C+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(C,B){return C=C>>>0,B||U(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(C,B){return C=C>>>0,B||U(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},u.prototype.readIntLE=function(C,B,K){C=C>>>0,B=B>>>0,K||U(C,B,this.length);for(var oe=this[C],ue=1,ce=0;++ce<B&&(ue*=256);)oe+=this[C+ce]*ue;return ue*=128,oe>=ue&&(oe-=Math.pow(2,8*B)),oe},u.prototype.readIntBE=function(C,B,K){C=C>>>0,B=B>>>0,K||U(C,B,this.length);for(var oe=B,ue=1,ce=this[C+--oe];oe>0&&(ue*=256);)ce+=this[C+--oe]*ue;return ue*=128,ce>=ue&&(ce-=Math.pow(2,8*B)),ce},u.prototype.readInt8=function(C,B){return C=C>>>0,B||U(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},u.prototype.readInt16LE=function(C,B){C=C>>>0,B||U(C,2,this.length);var K=this[C]|this[C+1]<<8;return K&32768?K|4294901760:K},u.prototype.readInt16BE=function(C,B){C=C>>>0,B||U(C,2,this.length);var K=this[C+1]|this[C]<<8;return K&32768?K|4294901760:K},u.prototype.readInt32LE=function(C,B){return C=C>>>0,B||U(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},u.prototype.readInt32BE=function(C,B){return C=C>>>0,B||U(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},u.prototype.readFloatLE=function(C,B){return C=C>>>0,B||U(C,4,this.length),t.read(this,C,!0,23,4)},u.prototype.readFloatBE=function(C,B){return C=C>>>0,B||U(C,4,this.length),t.read(this,C,!1,23,4)},u.prototype.readDoubleLE=function(C,B){return C=C>>>0,B||U(C,8,this.length),t.read(this,C,!0,52,8)},u.prototype.readDoubleBE=function(C,B){return C=C>>>0,B||U(C,8,this.length),t.read(this,C,!1,52,8)};function L(M,C,B,K,oe,ue){if(!u.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>oe||C<ue)throw new RangeError('"value" argument is out of bounds');if(B+K>M.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(C,B,K,oe){if(C=+C,B=B>>>0,K=K>>>0,!oe){var ue=Math.pow(2,8*K)-1;L(this,C,B,K,ue,0)}var ce=1,me=0;for(this[B]=C&255;++me<K&&(ce*=256);)this[B+me]=C/ce&255;return B+K},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(C,B,K,oe){if(C=+C,B=B>>>0,K=K>>>0,!oe){var ue=Math.pow(2,8*K)-1;L(this,C,B,K,ue,0)}var ce=K-1,me=1;for(this[B+ce]=C&255;--ce>=0&&(me*=256);)this[B+ce]=C/me&255;return B+K},u.prototype.writeUint8=u.prototype.writeUInt8=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,1,255,0),this[B]=C&255,B+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,2,65535,0),this[B]=C&255,this[B+1]=C>>>8,B+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,2,65535,0),this[B]=C>>>8,this[B+1]=C&255,B+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,4,4294967295,0),this[B+3]=C>>>24,this[B+2]=C>>>16,this[B+1]=C>>>8,this[B]=C&255,B+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,4,4294967295,0),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4},u.prototype.writeIntLE=function(C,B,K,oe){if(C=+C,B=B>>>0,!oe){var ue=Math.pow(2,8*K-1);L(this,C,B,K,ue-1,-ue)}var ce=0,me=1,xe=0;for(this[B]=C&255;++ce<K&&(me*=256);)C<0&&xe===0&&this[B+ce-1]!==0&&(xe=1),this[B+ce]=(C/me>>0)-xe&255;return B+K},u.prototype.writeIntBE=function(C,B,K,oe){if(C=+C,B=B>>>0,!oe){var ue=Math.pow(2,8*K-1);L(this,C,B,K,ue-1,-ue)}var ce=K-1,me=1,xe=0;for(this[B+ce]=C&255;--ce>=0&&(me*=256);)C<0&&xe===0&&this[B+ce+1]!==0&&(xe=1),this[B+ce]=(C/me>>0)-xe&255;return B+K},u.prototype.writeInt8=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,1,127,-128),C<0&&(C=255+C+1),this[B]=C&255,B+1},u.prototype.writeInt16LE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,2,32767,-32768),this[B]=C&255,this[B+1]=C>>>8,B+2},u.prototype.writeInt16BE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,2,32767,-32768),this[B]=C>>>8,this[B+1]=C&255,B+2},u.prototype.writeInt32LE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,4,2147483647,-2147483648),this[B]=C&255,this[B+1]=C>>>8,this[B+2]=C>>>16,this[B+3]=C>>>24,B+4},u.prototype.writeInt32BE=function(C,B,K){return C=+C,B=B>>>0,K||L(this,C,B,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4};function Y(M,C,B,K,oe,ue){if(B+K>M.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("Index out of range")}function P(M,C,B,K,oe){return C=+C,B=B>>>0,oe||Y(M,C,B,4),t.write(M,C,B,K,23,4),B+4}u.prototype.writeFloatLE=function(C,B,K){return P(this,C,B,!0,K)},u.prototype.writeFloatBE=function(C,B,K){return P(this,C,B,!1,K)};function J(M,C,B,K,oe){return C=+C,B=B>>>0,oe||Y(M,C,B,8),t.write(M,C,B,K,52,8),B+8}u.prototype.writeDoubleLE=function(C,B,K){return J(this,C,B,!0,K)},u.prototype.writeDoubleBE=function(C,B,K){return J(this,C,B,!1,K)},u.prototype.copy=function(C,B,K,oe){if(!u.isBuffer(C))throw new TypeError("argument should be a Buffer");if(K||(K=0),!oe&&oe!==0&&(oe=this.length),B>=C.length&&(B=C.length),B||(B=0),oe>0&&oe<K&&(oe=K),oe===K||C.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(K<0||K>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),C.length-B<oe-K&&(oe=C.length-B+K);var ue=oe-K;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,K,oe):Uint8Array.prototype.set.call(C,this.subarray(K,oe),B),ue},u.prototype.fill=function(C,B,K,oe){if(typeof C=="string"){if(typeof B=="string"?(oe=B,B=0,K=this.length):typeof K=="string"&&(oe=K,K=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!u.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(C.length===1){var ue=C.charCodeAt(0);(oe==="utf8"&&ue<128||oe==="latin1")&&(C=ue)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(B<0||this.length<B||this.length<K)throw new RangeError("Out of range index");if(K<=B)return this;B=B>>>0,K=K===void 0?this.length:K>>>0,C||(C=0);var ce;if(typeof C=="number")for(ce=B;ce<K;++ce)this[ce]=C;else{var me=u.isBuffer(C)?C:u.from(C,oe),xe=me.length;if(xe===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(ce=0;ce<K-B;++ce)this[ce+B]=me[ce%xe]}return this};var ne=/[^+/0-9A-Za-z-_]/g;function ie(M){if(M=M.split("=")[0],M=M.trim().replace(ne,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function ae(M,C){C=C||1/0;for(var B,K=M.length,oe=null,ue=[],ce=0;ce<K;++ce){if(B=M.charCodeAt(ce),B>55295&&B<57344){if(!oe){if(B>56319){(C-=3)>-1&&ue.push(239,191,189);continue}else if(ce+1===K){(C-=3)>-1&&ue.push(239,191,189);continue}oe=B;continue}if(B<56320){(C-=3)>-1&&ue.push(239,191,189),oe=B;continue}B=(oe-55296<<10|B-56320)+65536}else oe&&(C-=3)>-1&&ue.push(239,191,189);if(oe=null,B<128){if((C-=1)<0)break;ue.push(B)}else if(B<2048){if((C-=2)<0)break;ue.push(B>>6|192,B&63|128)}else if(B<65536){if((C-=3)<0)break;ue.push(B>>12|224,B>>6&63|128,B&63|128)}else if(B<1114112){if((C-=4)<0)break;ue.push(B>>18|240,B>>12&63|128,B>>6&63|128,B&63|128)}else throw new Error("Invalid code point")}return ue}function x(M){for(var C=[],B=0;B<M.length;++B)C.push(M.charCodeAt(B)&255);return C}function w(M,C){for(var B,K,oe,ue=[],ce=0;ce<M.length&&!((C-=2)<0);++ce)B=M.charCodeAt(ce),K=B>>8,oe=B%256,ue.push(oe),ue.push(K);return ue}function k(M){return r.toByteArray(ie(M))}function j(M,C,B,K){for(var oe=0;oe<K&&!(oe+B>=C.length||oe>=M.length);++oe)C[oe+B]=M[oe];return oe}function Z(M,C){return M instanceof C||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===C.name}function ee(M){return M!==M}var re=function(){for(var M="0123456789abcdef",C=new Array(256),B=0;B<16;++B)for(var K=B*16,oe=0;oe<16;++oe)C[K+oe]=M[B]+M[oe];return C}()})(_e);var iy=_e.Buffer,oy=function(e){if(e instanceof Uint8Array){if(e.byteOffset===0&&e.byteLength===e.buffer.byteLength)return e.buffer;if(typeof e.buffer.slice=="function")return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(iy.isBuffer(e)){for(var r=new Uint8Array(e.length),t=e.length,n=0;n<t;n++)r[n]=e[n];return r.buffer}else throw new Error("Argument must be a Buffer")};const Wr=aa(oy);var g0={exports:{}};(function(e,r){(function(){var t,n=0xdeadbeefcafe,l=(n&16777215)==15715070;function o(N,$,Q){N!=null&&(typeof N=="number"?this.fromNumber(N,$,Q):$==null&&typeof N!="string"?this.fromString(N,256):this.fromString(N,$))}function a(){return new o(null)}function u(N,$,Q,se,he,de){for(;--de>=0;){var pe=$*this[N++]+Q[se]+he;he=Math.floor(pe/67108864),Q[se++]=pe&67108863}return he}function h(N,$,Q,se,he,de){for(var pe=$&32767,ye=$>>15;--de>=0;){var Fe=this[N]&32767,qe=this[N++]>>15,ot=ye*Fe+qe*pe;Fe=pe*Fe+((ot&32767)<<15)+Q[se]+(he&1073741823),he=(Fe>>>30)+(ot>>>15)+ye*qe+(he>>>30),Q[se++]=Fe&1073741823}return he}function s(N,$,Q,se,he,de){for(var pe=$&16383,ye=$>>14;--de>=0;){var Fe=this[N]&16383,qe=this[N++]>>14,ot=ye*Fe+qe*pe;Fe=pe*Fe+((ot&16383)<<14)+Q[se]+he,he=(Fe>>28)+(ot>>14)+ye*qe,Q[se++]=Fe&268435455}return he}var i=typeof navigator!="undefined";i&&l&&navigator.appName=="Microsoft Internet Explorer"?(o.prototype.am=h,t=30):i&&l&&navigator.appName!="Netscape"?(o.prototype.am=u,t=26):(o.prototype.am=s,t=28),o.prototype.DB=t,o.prototype.DM=(1<<t)-1,o.prototype.DV=1<<t;var p=52;o.prototype.FV=Math.pow(2,p),o.prototype.F1=p-t,o.prototype.F2=2*t-p;var c="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array,d,v;for(d=48,v=0;v<=9;++v)f[d++]=v;for(d=97,v=10;v<36;++v)f[d++]=v;for(d=65,v=10;v<36;++v)f[d++]=v;function m(N){return c.charAt(N)}function b(N,$){var Q=f[N.charCodeAt($)];return Q==null?-1:Q}function g(N){for(var $=this.t-1;$>=0;--$)N[$]=this[$];N.t=this.t,N.s=this.s}function y(N){this.t=1,this.s=N<0?-1:0,N>0?this[0]=N:N<-1?this[0]=N+this.DV:this.t=0}function _(N){var $=a();return $.fromInt(N),$}function T(N,$){var Q;if($==16)Q=4;else if($==8)Q=3;else if($==256)Q=8;else if($==2)Q=1;else if($==32)Q=5;else if($==4)Q=2;else{this.fromRadix(N,$);return}this.t=0,this.s=0;for(var se=N.length,he=!1,de=0;--se>=0;){var pe=Q==8?N[se]&255:b(N,se);if(pe<0){N.charAt(se)=="-"&&(he=!0);continue}he=!1,de==0?this[this.t++]=pe:de+Q>this.DB?(this[this.t-1]|=(pe&(1<<this.DB-de)-1)<<de,this[this.t++]=pe>>this.DB-de):this[this.t-1]|=pe<<de,de+=Q,de>=this.DB&&(de-=this.DB)}Q==8&&N[0]&128&&(this.s=-1,de>0&&(this[this.t-1]|=(1<<this.DB-de)-1<<de)),this.clamp(),he&&o.ZERO.subTo(this,this)}function D(){for(var N=this.s&this.DM;this.t>0&&this[this.t-1]==N;)--this.t}function F(N){if(this.s<0)return"-"+this.negate().toString(N);var $;if(N==16)$=4;else if(N==8)$=3;else if(N==2)$=1;else if(N==32)$=5;else if(N==4)$=2;else return this.toRadix(N);var Q=(1<<$)-1,se,he=!1,de="",pe=this.t,ye=this.DB-pe*this.DB%$;if(pe-- >0)for(ye<this.DB&&(se=this[pe]>>ye)>0&&(he=!0,de=m(se));pe>=0;)ye<$?(se=(this[pe]&(1<<ye)-1)<<$-ye,se|=this[--pe]>>(ye+=this.DB-$)):(se=this[pe]>>(ye-=$)&Q,ye<=0&&(ye+=this.DB,--pe)),se>0&&(he=!0),he&&(de+=m(se));return he?de:"0"}function R(){var N=a();return o.ZERO.subTo(this,N),N}function X(){return this.s<0?this.negate():this}function H(N){var $=this.s-N.s;if($!=0)return $;var Q=this.t;if($=Q-N.t,$!=0)return this.s<0?-$:$;for(;--Q>=0;)if(($=this[Q]-N[Q])!=0)return $;return 0}function E(N){var $=1,Q;return(Q=N>>>16)!=0&&(N=Q,$+=16),(Q=N>>8)!=0&&(N=Q,$+=8),(Q=N>>4)!=0&&(N=Q,$+=4),(Q=N>>2)!=0&&(N=Q,$+=2),(Q=N>>1)!=0&&(N=Q,$+=1),$}function A(){return this.t<=0?0:this.DB*(this.t-1)+E(this[this.t-1]^this.s&this.DM)}function S(N,$){var Q;for(Q=this.t-1;Q>=0;--Q)$[Q+N]=this[Q];for(Q=N-1;Q>=0;--Q)$[Q]=0;$.t=this.t+N,$.s=this.s}function I(N,$){for(var Q=N;Q<this.t;++Q)$[Q-N]=this[Q];$.t=Math.max(this.t-N,0),$.s=this.s}function z(N,$){var Q=N%this.DB,se=this.DB-Q,he=(1<<se)-1,de=Math.floor(N/this.DB),pe=this.s<<Q&this.DM,ye;for(ye=this.t-1;ye>=0;--ye)$[ye+de+1]=this[ye]>>se|pe,pe=(this[ye]&he)<<Q;for(ye=de-1;ye>=0;--ye)$[ye]=0;$[de]=pe,$.t=this.t+de+1,$.s=this.s,$.clamp()}function V(N,$){$.s=this.s;var Q=Math.floor(N/this.DB);if(Q>=this.t){$.t=0;return}var se=N%this.DB,he=this.DB-se,de=(1<<se)-1;$[0]=this[Q]>>se;for(var pe=Q+1;pe<this.t;++pe)$[pe-Q-1]|=(this[pe]&de)<<he,$[pe-Q]=this[pe]>>se;se>0&&($[this.t-Q-1]|=(this.s&de)<<he),$.t=this.t-Q,$.clamp()}function te(N,$){for(var Q=0,se=0,he=Math.min(N.t,this.t);Q<he;)se+=this[Q]-N[Q],$[Q++]=se&this.DM,se>>=this.DB;if(N.t<this.t){for(se-=N.s;Q<this.t;)se+=this[Q],$[Q++]=se&this.DM,se>>=this.DB;se+=this.s}else{for(se+=this.s;Q<N.t;)se-=N[Q],$[Q++]=se&this.DM,se>>=this.DB;se-=N.s}$.s=se<0?-1:0,se<-1?$[Q++]=this.DV+se:se>0&&($[Q++]=se),$.t=Q,$.clamp()}function W(N,$){var Q=this.abs(),se=N.abs(),he=Q.t;for($.t=he+se.t;--he>=0;)$[he]=0;for(he=0;he<se.t;++he)$[he+Q.t]=Q.am(0,se[he],$,he,0,Q.t);$.s=0,$.clamp(),this.s!=N.s&&o.ZERO.subTo($,$)}function q(N){for(var $=this.abs(),Q=N.t=2*$.t;--Q>=0;)N[Q]=0;for(Q=0;Q<$.t-1;++Q){var se=$.am(Q,$[Q],N,2*Q,0,1);(N[Q+$.t]+=$.am(Q+1,2*$[Q],N,2*Q+1,se,$.t-Q-1))>=$.DV&&(N[Q+$.t]-=$.DV,N[Q+$.t+1]=1)}N.t>0&&(N[N.t-1]+=$.am(Q,$[Q],N,2*Q,0,1)),N.s=0,N.clamp()}function G(N,$,Q){var se=N.abs();if(!(se.t<=0)){var he=this.abs();if(he.t<se.t){$!=null&&$.fromInt(0),Q!=null&&this.copyTo(Q);return}Q==null&&(Q=a());var de=a(),pe=this.s,ye=N.s,Fe=this.DB-E(se[se.t-1]);Fe>0?(se.lShiftTo(Fe,de),he.lShiftTo(Fe,Q)):(se.copyTo(de),he.copyTo(Q));var qe=de.t,ot=de[qe-1];if(ot!=0){var nt=ot*(1<<this.F1)+(qe>1?de[qe-2]>>this.F2:0),At=this.FV/nt,pn=(1<<this.F1)/nt,ct=1<<this.F2,ft=Q.t,mn=ft-qe,Dt=$==null?a():$;for(de.dlShiftTo(mn,Dt),Q.compareTo(Dt)>=0&&(Q[Q.t++]=1,Q.subTo(Dt,Q)),o.ONE.dlShiftTo(qe,Dt),Dt.subTo(de,de);de.t<qe;)de[de.t++]=0;for(;--mn>=0;){var Ai=Q[--ft]==ot?this.DM:Math.floor(Q[ft]*At+(Q[ft-1]+ct)*pn);if((Q[ft]+=de.am(0,Ai,Q,mn,0,qe))<Ai)for(de.dlShiftTo(mn,Dt),Q.subTo(Dt,Q);Q[ft]<--Ai;)Q.subTo(Dt,Q)}$!=null&&(Q.drShiftTo(qe,$),pe!=ye&&o.ZERO.subTo($,$)),Q.t=qe,Q.clamp(),Fe>0&&Q.rShiftTo(Fe,Q),pe<0&&o.ZERO.subTo(Q,Q)}}}function U(N){var $=a();return this.abs().divRemTo(N,null,$),this.s<0&&$.compareTo(o.ZERO)>0&&N.subTo($,$),$}function L(N){this.m=N}function Y(N){return N.s<0||N.compareTo(this.m)>=0?N.mod(this.m):N}function P(N){return N}function J(N){N.divRemTo(this.m,null,N)}function ne(N,$,Q){N.multiplyTo($,Q),this.reduce(Q)}function ie(N,$){N.squareTo($),this.reduce($)}L.prototype.convert=Y,L.prototype.revert=P,L.prototype.reduce=J,L.prototype.mulTo=ne,L.prototype.sqrTo=ie;function ae(){if(this.t<1)return 0;var N=this[0];if(!(N&1))return 0;var $=N&3;return $=$*(2-(N&15)*$)&15,$=$*(2-(N&255)*$)&255,$=$*(2-((N&65535)*$&65535))&65535,$=$*(2-N*$%this.DV)%this.DV,$>0?this.DV-$:-$}function x(N){this.m=N,this.mp=N.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<N.DB-15)-1,this.mt2=2*N.t}function w(N){var $=a();return N.abs().dlShiftTo(this.m.t,$),$.divRemTo(this.m,null,$),N.s<0&&$.compareTo(o.ZERO)>0&&this.m.subTo($,$),$}function k(N){var $=a();return N.copyTo($),this.reduce($),$}function j(N){for(;N.t<=this.mt2;)N[N.t++]=0;for(var $=0;$<this.m.t;++$){var Q=N[$]&32767,se=Q*this.mpl+((Q*this.mph+(N[$]>>15)*this.mpl&this.um)<<15)&N.DM;for(Q=$+this.m.t,N[Q]+=this.m.am(0,se,N,$,0,this.m.t);N[Q]>=N.DV;)N[Q]-=N.DV,N[++Q]++}N.clamp(),N.drShiftTo(this.m.t,N),N.compareTo(this.m)>=0&&N.subTo(this.m,N)}function Z(N,$){N.squareTo($),this.reduce($)}function ee(N,$,Q){N.multiplyTo($,Q),this.reduce(Q)}x.prototype.convert=w,x.prototype.revert=k,x.prototype.reduce=j,x.prototype.mulTo=ee,x.prototype.sqrTo=Z;function re(){return(this.t>0?this[0]&1:this.s)==0}function M(N,$){if(N>4294967295||N<1)return o.ONE;var Q=a(),se=a(),he=$.convert(this),de=E(N)-1;for(he.copyTo(Q);--de>=0;)if($.sqrTo(Q,se),(N&1<<de)>0)$.mulTo(se,he,Q);else{var pe=Q;Q=se,se=pe}return $.revert(Q)}function C(N,$){var Q;return N<256||$.isEven()?Q=new L($):Q=new x($),this.exp(N,Q)}o.prototype.copyTo=g,o.prototype.fromInt=y,o.prototype.fromString=T,o.prototype.clamp=D,o.prototype.dlShiftTo=S,o.prototype.drShiftTo=I,o.prototype.lShiftTo=z,o.prototype.rShiftTo=V,o.prototype.subTo=te,o.prototype.multiplyTo=W,o.prototype.squareTo=q,o.prototype.divRemTo=G,o.prototype.invDigit=ae,o.prototype.isEven=re,o.prototype.exp=M,o.prototype.toString=F,o.prototype.negate=R,o.prototype.abs=X,o.prototype.compareTo=H,o.prototype.bitLength=A,o.prototype.mod=U,o.prototype.modPowInt=C,o.ZERO=_(0),o.ONE=_(1);function B(){var N=a();return this.copyTo(N),N}function K(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function oe(){return this.t==0?this.s:this[0]<<24>>24}function ue(){return this.t==0?this.s:this[0]<<16>>16}function ce(N){return Math.floor(Math.LN2*this.DB/Math.log(N))}function me(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function xe(N){if(N==null&&(N=10),this.signum()==0||N<2||N>36)return"0";var $=this.chunkSize(N),Q=Math.pow(N,$),se=_(Q),he=a(),de=a(),pe="";for(this.divRemTo(se,he,de);he.signum()>0;)pe=(Q+de.intValue()).toString(N).substr(1)+pe,he.divRemTo(se,he,de);return de.intValue().toString(N)+pe}function Ce(N,$){this.fromInt(0),$==null&&($=10);for(var Q=this.chunkSize($),se=Math.pow($,Q),he=!1,de=0,pe=0,ye=0;ye<N.length;++ye){var Fe=b(N,ye);if(Fe<0){N.charAt(ye)=="-"&&this.signum()==0&&(he=!0);continue}pe=$*pe+Fe,++de>=Q&&(this.dMultiply(se),this.dAddOffset(pe,0),de=0,pe=0)}de>0&&(this.dMultiply(Math.pow($,de)),this.dAddOffset(pe,0)),he&&o.ZERO.subTo(this,this)}function Te(N,$,Q){if(typeof $=="number")if(N<2)this.fromInt(1);else for(this.fromNumber(N,Q),this.testBit(N-1)||this.bitwiseTo(o.ONE.shiftLeft(N-1),sr,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime($);)this.dAddOffset(2,0),this.bitLength()>N&&this.subTo(o.ONE.shiftLeft(N-1),this);else{var se=new Array,he=N&7;se.length=(N>>3)+1,$.nextBytes(se),he>0?se[0]&=(1<<he)-1:se[0]=0,this.fromString(se,256)}}function Be(){var N=this.t,$=new Array;$[0]=this.s;var Q=this.DB-N*this.DB%8,se,he=0;if(N-- >0)for(Q<this.DB&&(se=this[N]>>Q)!=(this.s&this.DM)>>Q&&($[he++]=se|this.s<<this.DB-Q);N>=0;)Q<8?(se=(this[N]&(1<<Q)-1)<<8-Q,se|=this[--N]>>(Q+=this.DB-8)):(se=this[N]>>(Q-=8)&255,Q<=0&&(Q+=this.DB,--N)),se&128&&(se|=-256),he==0&&(this.s&128)!=(se&128)&&++he,(he>0||se!=this.s)&&($[he++]=se);return $}function Tt(N){return this.compareTo(N)==0}function __$t__(N){return this.compareTo(N)<0?this:N}function qt(N){return this.compareTo(N)>0?this:N}function Ft(N,$,Q){var se,he,de=Math.min(N.t,this.t);for(se=0;se<de;++se)Q[se]=$(this[se],N[se]);if(N.t<this.t){for(he=N.s&this.DM,se=de;se<this.t;++se)Q[se]=$(this[se],he);Q.t=this.t}else{for(he=this.s&this.DM,se=de;se<N.t;++se)Q[se]=$(he,N[se]);Q.t=N.t}Q.s=$(this.s,N.s),Q.clamp()}function zt(N,$){return N&$}function fi(N){var $=a();return this.bitwiseTo(N,zt,$),$}function sr(N,$){return N|$}function on(N){var $=a();return this.bitwiseTo(N,sr,$),$}function an(N,$){return N^$}function hi(N){var $=a();return this.bitwiseTo(N,an,$),$}function Rr(N,$){return N&~$}function di(N){var $=a();return this.bitwiseTo(N,Rr,$),$}function sn(){for(var N=a(),$=0;$<this.t;++$)N[$]=this.DM&~this[$];return N.t=this.t,N.s=~this.s,N}function pi(N){var $=a();return N<0?this.rShiftTo(-N,$):this.lShiftTo(N,$),$}function ln(N){var $=a();return N<0?this.lShiftTo(-N,$):this.rShiftTo(N,$),$}function mi(N){if(N==0)return-1;var $=0;return N&65535||(N>>=16,$+=16),N&255||(N>>=8,$+=8),N&15||(N>>=4,$+=4),N&3||(N>>=2,$+=2),N&1||++$,$}function yi(){for(var N=0;N<this.t;++N)if(this[N]!=0)return N*this.DB+mi(this[N]);return this.s<0?this.t*this.DB:-1}function vi(N){for(var $=0;N!=0;)N&=N-1,++$;return $}function un(){for(var N=0,$=this.s&this.DM,Q=0;Q<this.t;++Q)N+=vi(this[Q]^$);return N}function gi(N){var $=Math.floor(N/this.DB);return $>=this.t?this.s!=0:(this[$]&1<<N%this.DB)!=0}function xi(N,$){var Q=o.ONE.shiftLeft(N);return this.bitwiseTo(Q,$,Q),Q}function cn(N){return this.changeBit(N,sr)}function bi(N){return this.changeBit(N,Rr)}function fn(N){return this.changeBit(N,an)}function Qe(N,$){for(var Q=0,se=0,he=Math.min(N.t,this.t);Q<he;)se+=this[Q]+N[Q],$[Q++]=se&this.DM,se>>=this.DB;if(N.t<this.t){for(se+=N.s;Q<this.t;)se+=this[Q],$[Q++]=se&this.DM,se>>=this.DB;se+=this.s}else{for(se+=this.s;Q<N.t;)se+=N[Q],$[Q++]=se&this.DM,se>>=this.DB;se+=N.s}$.s=se<0?-1:0,se>0?$[Q++]=se:se<-1&&($[Q++]=this.DV+se),$.t=Q,$.clamp()}function mt(N){var $=a();return this.addTo(N,$),$}function hn(N){var $=a();return this.subTo(N,$),$}function wi(N){var $=a();return this.multiplyTo(N,$),$}function lc(){var N=a();return this.squareTo(N),N}function uc(N){var $=a();return this.divRemTo(N,$,null),$}function cc(N){var $=a();return this.divRemTo(N,null,$),$}function fc(N){var $=a(),Q=a();return this.divRemTo(N,$,Q),new Array($,Q)}function hc(N){this[this.t]=this.am(0,N-1,this,0,0,this.t),++this.t,this.clamp()}function dc(N,$){if(N!=0){for(;this.t<=$;)this[this.t++]=0;for(this[$]+=N;this[$]>=this.DV;)this[$]-=this.DV,++$>=this.t&&(this[this.t++]=0),++this[$]}}function Or(){}function Ba(N){return N}function pc(N,$,Q){N.multiplyTo($,Q)}function mc(N,$){N.squareTo($)}Or.prototype.convert=Ba,Or.prototype.revert=Ba,Or.prototype.mulTo=pc,Or.prototype.sqrTo=mc;function yc(N){return this.exp(N,new Or)}function vc(N,$,Q){var se=Math.min(this.t+N.t,$);for(Q.s=0,Q.t=se;se>0;)Q[--se]=0;var he;for(he=Q.t-this.t;se<he;++se)Q[se+this.t]=this.am(0,N[se],Q,se,0,this.t);for(he=Math.min(N.t,$);se<he;++se)this.am(0,N[se],Q,se,0,$-se);Q.clamp()}function gc(N,$,Q){--$;var se=Q.t=this.t+N.t-$;for(Q.s=0;--se>=0;)Q[se]=0;for(se=Math.max($-this.t,0);se<N.t;++se)Q[this.t+se-$]=this.am($-se,N[se],Q,0,0,this.t+se-$);Q.clamp(),Q.drShiftTo(1,Q)}function jt(N){this.r2=a(),this.q3=a(),o.ONE.dlShiftTo(2*N.t,this.r2),this.mu=this.r2.divide(N),this.m=N}function xc(N){if(N.s<0||N.t>2*this.m.t)return N.mod(this.m);if(N.compareTo(this.m)<0)return N;var $=a();return N.copyTo($),this.reduce($),$}function bc(N){return N}function wc(N){for(N.drShiftTo(this.m.t-1,this.r2),N.t>this.m.t+1&&(N.t=this.m.t+1,N.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);N.compareTo(this.r2)<0;)N.dAddOffset(1,this.m.t+1);for(N.subTo(this.r2,N);N.compareTo(this.m)>=0;)N.subTo(this.m,N)}function _c(N,$){N.squareTo($),this.reduce($)}function Ec(N,$,Q){N.multiplyTo($,Q),this.reduce(Q)}jt.prototype.convert=xc,jt.prototype.revert=bc,jt.prototype.reduce=wc,jt.prototype.mulTo=Ec,jt.prototype.sqrTo=_c;function Ac(N,$){var Q=N.bitLength(),se,he=_(1),de;if(Q<=0)return he;Q<18?se=1:Q<48?se=3:Q<144?se=4:Q<768?se=5:se=6,Q<8?de=new L($):$.isEven()?de=new jt($):de=new x($);var pe=new Array,ye=3,Fe=se-1,qe=(1<<se)-1;if(pe[1]=de.convert(this),se>1){var ot=a();for(de.sqrTo(pe[1],ot);ye<=qe;)pe[ye]=a(),de.mulTo(ot,pe[ye-2],pe[ye]),ye+=2}var nt=N.t-1,At,pn=!0,ct=a(),ft;for(Q=E(N[nt])-1;nt>=0;){for(Q>=Fe?At=N[nt]>>Q-Fe&qe:(At=(N[nt]&(1<<Q+1)-1)<<Fe-Q,nt>0&&(At|=N[nt-1]>>this.DB+Q-Fe)),ye=se;!(At&1);)At>>=1,--ye;if((Q-=ye)<0&&(Q+=this.DB,--nt),pn)pe[At].copyTo(he),pn=!1;else{for(;ye>1;)de.sqrTo(he,ct),de.sqrTo(ct,he),ye-=2;ye>0?de.sqrTo(he,ct):(ft=he,he=ct,ct=ft),de.mulTo(ct,pe[At],he)}for(;nt>=0&&!(N[nt]&1<<Q);)de.sqrTo(he,ct),ft=he,he=ct,ct=ft,--Q<0&&(Q=this.DB-1,--nt)}return de.revert(he)}function Cc(N){var $=this.s<0?this.negate():this.clone(),Q=N.s<0?N.negate():N.clone();if($.compareTo(Q)<0){var se=$;$=Q,Q=se}var he=$.getLowestSetBit(),de=Q.getLowestSetBit();if(de<0)return $;for(he<de&&(de=he),de>0&&($.rShiftTo(de,$),Q.rShiftTo(de,Q));$.signum()>0;)(he=$.getLowestSetBit())>0&&$.rShiftTo(he,$),(he=Q.getLowestSetBit())>0&&Q.rShiftTo(he,Q),$.compareTo(Q)>=0?($.subTo(Q,$),$.rShiftTo(1,$)):(Q.subTo($,Q),Q.rShiftTo(1,Q));return de>0&&Q.lShiftTo(de,Q),Q}function Sc(N){if(N<=0)return 0;var $=this.DV%N,Q=this.s<0?N-1:0;if(this.t>0)if($==0)Q=this[0]%N;else for(var se=this.t-1;se>=0;--se)Q=($*Q+this[se])%N;return Q}function Bc(N){var $=N.isEven();if(this.isEven()&&$||N.signum()==0)return o.ZERO;for(var Q=N.clone(),se=this.clone(),he=_(1),de=_(0),pe=_(0),ye=_(1);Q.signum()!=0;){for(;Q.isEven();)Q.rShiftTo(1,Q),$?((!he.isEven()||!de.isEven())&&(he.addTo(this,he),de.subTo(N,de)),he.rShiftTo(1,he)):de.isEven()||de.subTo(N,de),de.rShiftTo(1,de);for(;se.isEven();)se.rShiftTo(1,se),$?((!pe.isEven()||!ye.isEven())&&(pe.addTo(this,pe),ye.subTo(N,ye)),pe.rShiftTo(1,pe)):ye.isEven()||ye.subTo(N,ye),ye.rShiftTo(1,ye);Q.compareTo(se)>=0?(Q.subTo(se,Q),$&&he.subTo(pe,he),de.subTo(ye,de)):(se.subTo(Q,se),$&&pe.subTo(he,pe),ye.subTo(de,ye))}if(se.compareTo(o.ONE)!=0)return o.ZERO;if(ye.compareTo(N)>=0)return ye.subtract(N);if(ye.signum()<0)ye.addTo(N,ye);else return ye;return ye.signum()<0?ye.add(N):ye}var Ye=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],kc=(1<<26)/Ye[Ye.length-1];function Tc(N){var $,Q=this.abs();if(Q.t==1&&Q[0]<=Ye[Ye.length-1]){for($=0;$<Ye.length;++$)if(Q[0]==Ye[$])return!0;return!1}if(Q.isEven())return!1;for($=1;$<Ye.length;){for(var se=Ye[$],he=$+1;he<Ye.length&&se<kc;)se*=Ye[he++];for(se=Q.modInt(se);$<he;)if(se%Ye[$++]==0)return!1}return Q.millerRabin(N)}function Fc(N){var $=this.subtract(o.ONE),Q=$.getLowestSetBit();if(Q<=0)return!1;var se=$.shiftRight(Q);N=N+1>>1,N>Ye.length&&(N=Ye.length);for(var he=a(),de=0;de<N;++de){he.fromInt(Ye[Math.floor(Math.random()*Ye.length)]);var pe=he.modPow(se,this);if(pe.compareTo(o.ONE)!=0&&pe.compareTo($)!=0){for(var ye=1;ye++<Q&&pe.compareTo($)!=0;)if(pe=pe.modPowInt(2,this),pe.compareTo(o.ONE)==0)return!1;if(pe.compareTo($)!=0)return!1}}return!0}o.prototype.chunkSize=ce,o.prototype.toRadix=xe,o.prototype.fromRadix=Ce,o.prototype.fromNumber=Te,o.prototype.bitwiseTo=Ft,o.prototype.changeBit=xi,o.prototype.addTo=Qe,o.prototype.dMultiply=hc,o.prototype.dAddOffset=dc,o.prototype.multiplyLowerTo=vc,o.prototype.multiplyUpperTo=gc,o.prototype.modInt=Sc,o.prototype.millerRabin=Fc,o.prototype.clone=B,o.prototype.intValue=K,o.prototype.byteValue=oe,o.prototype.shortValue=ue,o.prototype.signum=me,o.prototype.toByteArray=Be,o.prototype.equals=Tt,o.prototype.min=__$t__,o.prototype.max=qt,o.prototype.and=fi,o.prototype.or=on,o.prototype.xor=hi,o.prototype.andNot=di,o.prototype.not=sn,o.prototype.shiftLeft=pi,o.prototype.shiftRight=ln,o.prototype.getLowestSetBit=yi,o.prototype.bitCount=un,o.prototype.testBit=gi,o.prototype.setBit=cn,o.prototype.clearBit=bi,o.prototype.flipBit=fn,o.prototype.add=mt,o.prototype.subtract=hn,o.prototype.multiply=wi,o.prototype.divide=uc,o.prototype.remainder=cc,o.prototype.divideAndRemainder=fc,o.prototype.modPow=Ac,o.prototype.modInverse=Bc,o.prototype.pow=yc,o.prototype.gcd=Cc,o.prototype.isProbablePrime=Tc,o.prototype.square=lc,o.prototype.Barrett=jt;var dn,rt,$e;function Dc(N){rt[$e++]^=N&255,rt[$e++]^=N>>8&255,rt[$e++]^=N>>16&255,rt[$e++]^=N>>24&255,$e>=Ei&&($e-=Ei)}function ka(){Dc(new Date().getTime())}if(rt==null){rt=new Array,$e=0;var ut;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var Ta=new Uint8Array(32);for(window.crypto.getRandomValues(Ta),ut=0;ut<32;++ut)rt[$e++]=Ta[ut]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Fa=window.crypto.random(32);for(ut=0;ut<Fa.length;++ut)rt[$e++]=Fa.charCodeAt(ut)&255}}for(;$e<Ei;)ut=Math.floor(65536*Math.random()),rt[$e++]=ut>>>8,rt[$e++]=ut&255;$e=0,ka()}function Ic(){if(dn==null){for(ka(),dn=Nc(),dn.init(rt),$e=0;$e<rt.length;++$e)rt[$e]=0;$e=0}return dn.next()}function Rc(N){var $;for($=0;$<N.length;++$)N[$]=Ic()}function Da(){}Da.prototype.nextBytes=Rc;function _i(){this.i=0,this.j=0,this.S=new Array}function Oc(N){var $,Q,se;for($=0;$<256;++$)this.S[$]=$;for(Q=0,$=0;$<256;++$)Q=Q+this.S[$]+N[$%N.length]&255,se=this.S[$],this.S[$]=this.S[Q],this.S[Q]=se;this.i=0,this.j=0}function Pc(){var N;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,N=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=N,this.S[N+this.S[this.i]&255]}_i.prototype.init=Oc,_i.prototype.next=Pc;function Nc(){return new _i}var Ei=256;e.exports={default:o,BigInteger:o,SecureRandom:Da}}).call(be)})(g0);var ke=g0.exports,ay=ke.BigInteger.prototype.Barrett;function Xe(e,r){this.x=r,this.q=e}function et(e,r,t,n){this.curve=e,this.x=r,this.y=t,this.z=n==null?ke.BigInteger.ONE:n,this.zinv=null}function xt(e,r,t){this.q=e,this.a=this.fromBigInteger(r),this.b=this.fromBigInteger(t),this.infinity=new et(this,null,null),this.reducer=new ay(this.q)}Xe.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},Xe.prototype.toBigInteger=function(){return this.x},Xe.prototype.negate=function(){return new Xe(this.q,this.x.negate().mod(this.q))},Xe.prototype.add=function(e){return new Xe(this.q,this.x.add(e.toBigInteger()).mod(this.q))},Xe.prototype.subtract=function(e){return new Xe(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},Xe.prototype.multiply=function(e){return new Xe(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},Xe.prototype.square=function(){return new Xe(this.q,this.x.square().mod(this.q))},Xe.prototype.divide=function(e){return new Xe(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},et.prototype.getX=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)},et.prototype.getY=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)},et.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(ke.BigInteger.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(ke.BigInteger.ZERO))},et.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(ke.BigInteger.ZERO)&&!this.y.toBigInteger().equals(ke.BigInteger.ZERO)},et.prototype.negate=function(){return new et(this.curve,this.x,this.y.negate(),this.z)},et.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),t=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(ke.BigInteger.ZERO.equals(t))return ke.BigInteger.ZERO.equals(r)?this.twice():this.curve.getInfinity();var n=new ke.BigInteger("3"),l=this.x.toBigInteger(),o=this.y.toBigInteger(),a=(e.x.toBigInteger(),e.y.toBigInteger(),t.square()),u=a.multiply(t),h=l.multiply(a),s=r.square().multiply(this.z),i=s.subtract(h.shiftLeft(1)).multiply(e.z).subtract(u).multiply(t).mod(this.curve.q),p=h.multiply(n).multiply(r).subtract(o.multiply(u)).subtract(s.multiply(r)).multiply(e.z).add(r.multiply(u)).mod(this.curve.q),c=u.multiply(this.z).multiply(e.z).mod(this.curve.q);return new et(this.curve,this.curve.fromBigInteger(i),this.curve.fromBigInteger(p),c)},et.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var e=new ke.BigInteger("3"),r=this.x.toBigInteger(),t=this.y.toBigInteger(),n=t.multiply(this.z),l=n.multiply(t).mod(this.curve.q),o=this.curve.a.toBigInteger(),a=r.square().multiply(e);ke.BigInteger.ZERO.equals(o)||(a=a.add(this.z.square().multiply(o)));var u=(a=a.mod(this.curve.q)).square().subtract(r.shiftLeft(3).multiply(l)).shiftLeft(1).multiply(n).mod(this.curve.q),h=a.multiply(e).multiply(r).subtract(l.shiftLeft(1)).shiftLeft(2).multiply(l).subtract(a.square().multiply(a)).mod(this.curve.q),s=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new et(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(h),s)},et.prototype.multiply=function(e){if(this.isInfinity())return this;if(e.signum()==0)return this.curve.getInfinity();var r,t=e,n=t.multiply(new ke.BigInteger("3")),l=this.negate(),o=this;for(r=n.bitLength()-2;r>0;--r){o=o.twice();var a=n.testBit(r);a!=t.testBit(r)&&(o=o.add(a?this:l))}return o},et.prototype.multiplyTwo=function(e,r,t){var n;n=e.bitLength()>t.bitLength()?e.bitLength()-1:t.bitLength()-1;for(var l=this.curve.getInfinity(),o=this.add(r);n>=0;)l=l.twice(),e.testBit(n)?l=t.testBit(n)?l.add(o):l.add(this):t.testBit(n)&&(l=l.add(r)),--n;return l},xt.prototype.getQ=function(){return this.q},xt.prototype.getA=function(){return this.a},xt.prototype.getB=function(){return this.b},xt.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},xt.prototype.getInfinity=function(){return this.infinity},xt.prototype.fromBigInteger=function(e){return new Xe(this.q,e)},xt.prototype.reduce=function(e){this.reducer.reduce(e)},xt.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var r=(e.length-2)/2,t=e.substr(2,r),n=e.substr(r+2,r);return new et(this,this.fromBigInteger(new ke.BigInteger(t,16)),this.fromBigInteger(new ke.BigInteger(n,16)));default:return null}},xt.prototype.encodePointHex=function(e){if(e.isInfinity())return"00";var r=e.getX().toBigInteger().toString(16),t=e.getY().toBigInteger().toString(16),n=this.getQ().toString(16).length;for(n%2!=0&&n++;r.length<n;)r="0"+r;for(;t.length<n;)t="0"+t;return"04"+r+t};var ze=function(e,r){return e<<(r%=32)|e>>>32-r},gt=function(e,r){var t=r-e.length;return(t>0?"0".repeat(t):"")+e},sy=function(e){return e<16?2043430169:2055708042},ly=function(e,r,t,n){return n<16?e^r^t:e&r|e&t|r&t},uy=function(e,r,t,n){return n<16?e^r^t:e&r|~e&t},cy=function(e,r,t){for(var n,l,o,a,u,h=function(g){var y,_=new Array(132);g.forEach(function(F,R){_[R]=F});for(var T=16;T<68;T++)_[T]=(y=_[T-16]^_[T-9]^ze(_[T-3],15))^ze(y,15)^ze(y,23)^ze(_[T-13],7)^_[T-6];for(var D=0;D<64;D++)_[D+68]=_[D]^_[D+4];return _}(r),s=e[0],i=e[1],p=e[2],c=e[3],f=e[4],d=e[5],v=e[6],m=e[7],b=0;b<64;b++)l=(n=ze(ze(s,12)+f+ze(sy(b),b),7))^ze(s,12),o=ly(s,i,p,b)+c+l+h[b+68],a=uy(f,d,v,b)+m+n+h[b],c=p,p=ze(i,9),i=s,s=o,m=v,v=ze(d,19),d=f,f=(u=a)^ze(u,9)^ze(u,17);return[s^e[0],i^e[1],p^e[2],c^e[3],f^e[4],d^e[5],v^e[6],m^e[7]]},Jo=function(e,r,t){if(typeof e=="string"?e=_e.Buffer.from(e,r||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var n,l,o,a,u,h;n=e,l=_e.Buffer.alloc(1,128),a=_e.Buffer.alloc(o=(o=n.length%64)>=56?64-o%56-1:56-o-1,0),u=_e.Buffer.alloc(8),h=8*n.length,u.writeUInt32BE(Math.floor(h/Math.pow(2,32)),0),u.writeUInt32BE(h%Math.pow(2,32),4);for(var s=(e=_e.Buffer.concat([n,l,a,u],n.length+1+o+8)).length/64,i=new Array(s),p=0;p<s;p++){i[p]=new Array(16);for(var c=0;c<16;c++)i[p][c]=e.readUInt32BE(64*p+4*c)}var f=new Array(s);f[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var d=0;d<s;d++)f[d+1]=cy(f[d],i[d]);var v=_e.Buffer.alloc(32);return f[s].forEach(function(m,b){return v.writeInt32BE(m,4*b)}),t?v.toString(t):Wr(v)},cl=new ke.SecureRandom,wa=function(){var e=new xt(new ke.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new ke.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new ke.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),r=e.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:e,G:r,n:new ke.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),fl=wa.curve,hl=wa.G,_n=wa.n;function dl(e,r){for(var t=[],n=Math.ceil(r/32),l=r%32,o=1;o<=n;o++){var a=_e.Buffer.allocUnsafe(4);a.writeUInt32BE(o);var u=Jo(_e.Buffer.concat([e,a]));t.push(o===n&&l?_e.Buffer.from(u).slice(0,l):_e.Buffer.from(u))}return _e.Buffer.concat(t,r)}var fy={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var e=new ke.BigInteger(_n.bitLength(),cl).mod(_n.subtract(new ke.BigInteger("2"))).add(ke.BigInteger.ONE),r=gt(e.toString(16),64),t=hl.multiply(e);return{privateKey:r,publicKey:"04"+gt(t.getX().toBigInteger().toString(16),64)+gt(t.getY().toBigInteger().toString(16),64)}},encrypt:function(e,r,t){var n=t||{},l=n.mode,o=l===void 0?1:l,a=n.outputEncoding,u=n.pc;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var h=new ke.BigInteger(_n.bitLength(),cl).mod(_n.subtract(ke.BigInteger.ONE)).add(ke.BigInteger.ONE),s=hl.multiply(h),i=gt(s.getX().toBigInteger().toString(16),64)+gt(s.getY().toBigInteger().toString(16),64),p=fl.decodePointHex(r).multiply(h),c=gt(p.getX().toBigInteger().toString(16),64),f=gt(p.getY().toBigInteger().toString(16),64),d=dl(_e.Buffer.from(c+f,"hex"),e.length),v=gt(new ke.BigInteger(e.toString("hex"),16).xor(new ke.BigInteger(d.toString("hex"),16)).toString(16),2*e.length),m=Jo(c+e.toString("hex")+f,"hex","hex"),b=_e.Buffer.from((u?"04":"")+(o===0?i+v+m:i+m+v),"hex");return a?b.toString(a):Wr(b)},decrypt:function(e,r,t){var n=t||{},l=n.mode,o=l===void 0?1:l,a=n.outputEncoding,u=n.pc;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var h=(e=u?e.slice(1):e).slice(0,32).toString("hex"),s=e.slice(32,64).toString("hex"),i=fl.decodePointHex("04"+h+s).multiply(new ke.BigInteger(r,16)),p=gt(i.getX().toBigInteger().toString(16),64),c=gt(i.getY().toBigInteger().toString(16),64),f=e.slice(64,96),d=e.slice(96);o===0&&(f=e.slice(e.length-32),d=e.slice(64,e.length-32));var v=dl(_e.Buffer.from(p+c,"hex"),d.length),m=new ke.BigInteger(d.toString("hex"),16).xor(new ke.BigInteger(v.toString("hex"),16)).toString(16),b=Jo(p+m+c,"hex","hex")===f.toString("hex")?_e.Buffer.from(m,"hex"):_e.Buffer.alloc(0);return a?b.toString(a):Wr(b)}},En=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],An=[2746333894,1453994832,1736282519,2993693404],hy=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],Cn=/^[0-9a-f]{32}$/i,x0=function(e){return En[(4026531840&e)>>>28][(251658240&e)>>>24]<<24|En[(15728640&e)>>>20][(983040&e)>>>16]<<16|En[(61440&e)>>>12][(3840&e)>>>8]<<8|En[(240&e)>>>4][(15&e)>>>0]<<0},b0=function(e){return(r=x0(e))^ze(r,2)^ze(r,10)^ze(r,18)^ze(r,24);var r},w0=function(e){var r,t=new Array(36);t[0]=e[0]^An[0],t[1]=e[1]^An[1],t[2]=e[2]^An[2],t[3]=e[3]^An[3];for(var n=new Array(32),l=0;l<32;l++)t[l+4]=t[l]^(r=x0(t[l+1]^t[l+2]^t[l+3]^hy[l]))^ze(r,13)^ze(r,23),n[l]=t[l+4];return n},pl=function(e,r){for(var t=w0(r),n=0;n<32;n++)e[n+4]=e[n]^b0(e[n+1]^e[n+2]^e[n+3]^t[n]);return[e[35],e[34],e[33],e[32]]},ml=function(e,r){for(var t=w0(r).reverse(),n=0;n<32;n++)e[n+4]=e[n]^b0(e[n+1]^e[n+2]^e[n+3]^t[n]);return[e[35],e[34],e[33],e[32]]},Sn=function(e){return[e.readInt32BE(0),e.readInt32BE(4),e.readInt32BE(8),e.readInt32BE(12)]},Bn=function(e){for(var r=_e.Buffer.alloc(16),t=0;t<4;t++)r.writeInt32BE(e[t],4*t);return r},Sr={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(e,r,t){var n=t||{},l=n.mode,o=n.iv,a=n.outputEncoding;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');if(!Cn.test(r))throw new TypeError("Invalid value of cipher `key`");if(r=_e.Buffer.from(r,"hex"),l===2&&!Cn.test(o))throw new TypeError("Invalid value of `iv` option");return function(u,h,s,i){s&&(s=Sn(s)),h=Sn(h);for(var p=[],c=(u=function(T){var D=16-T.length%16,F=_e.Buffer.alloc(D,D);return _e.Buffer.concat([T,F],T.length+D)}(u)).length/16,f=0;f<c;f++)if(s){var d=16*f,v=[s[0]^u.readInt32BE(d),s[1]^u.readInt32BE(d+4),s[2]^u.readInt32BE(d+8),s[3]^u.readInt32BE(d+12)],m=pl(v,h);p.push(Bn(m)),s=m.slice(0)}else{var b=16*f,g=[u.readInt32BE(b),u.readInt32BE(b+4),u.readInt32BE(b+8),u.readInt32BE(b+12)],y=pl(g,h);p.push(Bn(y))}var _=_e.Buffer.concat(p,u.length);return i?_.toString(i):Wr(_)}(e,r,o=l===2?_e.Buffer.from(o,"hex"):null,a)},decrypt:function(e,r,t){var n=t||{},l=n.mode,o=n.iv,a=n.outputEncoding;if(typeof e=="string"?e=_e.Buffer.from(e,n.inputEncoding):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');if(!Cn.test(r))throw new TypeError("Invalid value of cipher `key`");if(r=_e.Buffer.from(r,"hex"),l===2&&!Cn.test(o))throw new TypeError("Invalid value of `iv` option");return function(u,h,s,i){s&&(s=Sn(s)),h=Sn(h);var p=[],c=u.length/16;if(s)for(var f=c-1;f>=0;f--){var d,v=16*f;d=f>0?[u.readInt32BE(v-16),u.readInt32BE(v-16+4),u.readInt32BE(v-16+8),u.readInt32BE(v-16+12)]:s;var m=[u.readInt32BE(v),u.readInt32BE(v+4),u.readInt32BE(v+8),u.readInt32BE(v+12)],b=ml(m,h);p.unshift(Bn([b[0]^d[0],b[1]^d[1],b[2]^d[2],b[3]^d[3]]))}else for(var g=0;g<c;g++){var y=16*g,_=[u.readInt32BE(y),u.readInt32BE(y+4),u.readInt32BE(y+8),u.readInt32BE(y+12)],T=ml(_,h);p.push(Bn(T))}var D=_e.Buffer.concat(p,u.length-p[p.length-1][15]);return i?D.toString(i):Wr(D)}(e,r,o=l===2?_e.Buffer.from(o,"hex"):null,a)}};(function(){if(typeof Object.id=="undefined"){var e=0;Object.id=function(r){return typeof r.__uniqueid=="undefined"&&Object.defineProperty(r,"__uniqueid",{value:++e,enumerable:!1,writable:!1}),r.__uniqueid}}})();function dy(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(t){var n,l,o,a,u,h;for(o=t.length,l=0,n="";l<o;){if(a=t.charCodeAt(l++)&255,l==o){n+=e.charAt(a>>2),n+=e.charAt((a&3)<<4),n+="==";break}if(u=t.charCodeAt(l++),l==o){n+=e.charAt(a>>2),n+=e.charAt((a&3)<<4|(u&240)>>4),n+=e.charAt((u&15)<<2),n+="=";break}h=t.charCodeAt(l++),n+=e.charAt(a>>2),n+=e.charAt((a&3)<<4|(u&240)>>4),n+=e.charAt((u&15)<<2|(h&192)>>6),n+=e.charAt(h&63)}return n},this.decode=function(t){var n,l,o,a,u,h,s;for(h=t.length,u=0,s="";u<h;){do n=r[t.charCodeAt(u++)&255];while(u<h&&n==-1);if(n==-1)break;do l=r[t.charCodeAt(u++)&255];while(u<h&&l==-1);if(l==-1)break;s+=String.fromCharCode(n<<2|(l&48)>>4);do{if(o=t.charCodeAt(u++)&255,o==61)return s;o=r[o]}while(u<h&&o==-1);if(o==-1)break;s+=String.fromCharCode((l&15)<<4|(o&60)>>2);do{if(a=t.charCodeAt(u++)&255,a==61)return s;a=r[a]}while(u<h&&a==-1);if(a==-1)break;s+=String.fromCharCode((o&3)<<6|a)}return s},this.utf16to8=function(t){var n,l,o,a;for(n="",o=t.length,l=0;l<o;l++)a=t.charCodeAt(l),a>=1&&a<=127?n+=t.charAt(l):a>2047?(n+=String.fromCharCode(224|a>>12&15),n+=String.fromCharCode(128|a>>6&63),n+=String.fromCharCode(128|a>>0&63)):(n+=String.fromCharCode(192|a>>6&31),n+=String.fromCharCode(128|a>>0&63));return n},this.utf8to16=function(t){var n,l,o,a,u,h;for(n="",o=t.length,l=0;l<o;)switch(a=t.charCodeAt(l++),a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=t.charAt(l-1);break;case 12:case 13:u=t.charCodeAt(l++),n+=String.fromCharCode((a&31)<<6|u&63);break;case 14:u=t.charCodeAt(l++),h=t.charCodeAt(l++),n+=String.fromCharCode((a&15)<<12|(u&63)<<6|(h&63)<<0);break}return n},this.charToHex=function(t){var n,l,o;for(n="",l=0;l<t.length;)o=t.charCodeAt(l++).toString(16),n+="\\0x"+o,n+=l>0&&l%8==0?`\r
35
+ `:", ";return n}}function py(){var e=0,r=new Object;this.add=function(t,n){this.containsKey(t)||e++,r[t]=n},this.getValue=function(t){return this.containsKey(t)?r[t]:null},this.remove=function(t){this.containsKey(t)&&delete r[t]&&e--},this.containsKey=function(t){return t in r},this.containsValue=function(t){for(var n in r)if(r[n]==t)return!0;return!1},this.getValues=function(){var t=[];for(var n in r)t.push(r[n]);return t},this.getKeys=function(){var t=[];for(var n in r)t.push(n);return t},this.getSize=function(){return e},this.clear=function(){e=0,r=new Object}}function my(e){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new py,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var r=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(r)},this.loadModuleCallBack=function(r){if(!r)throw r.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(r,t,n){var l=Object.id(n).toString();this.callbacks_.add(l,n);var o={MsgId:l,Method:r+"|"+e};t&&(o.Param=JSON.stringify(t));var a=JSON.stringify(o);this.connect&&this.ws.send(a)},this.ready=function(r){this.ready_func_=r},this._callback=function(r){var t=JSON.parse(r.data),n=t.MsgId;if(this.callbacks_.containsKey(n)){var l=this.callbacks_.getValue(n);l(t.Result,t.Response),this.callbacks_.remove(n)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:r,DongleInfoNum:t},n){this.exec("Arm_GetDongleInfo",[parseInt(r),parseInt(t)],n)},this.Arm_Enum=function(r){this.exec("Arm_Enum",null,r)},this.Arm_Open=function({Index:r},t){this.exec("Arm_Open",[parseInt(r)],t)},this.Arm_Close=function({Handle:r},t){this.exec("Arm_Close",[parseInt(r)],t)},this.Arm_VerifyPIN=function({Handle:r,UserPin:t,UserType:n},l){this.exec("Arm_VerifyPIN",[parseInt(r),n,t],l)},this.Arm_ResetState=function({Handle:r},t){this.exec("Arm_ResetState",[parseInt(r)],t)},this.Arm_GenRandom=function({Handle:r,RandomLen:t},n){this.exec("Arm_GenRandom",[parseInt(r),parseInt(t)],n)},this.Arm_LEDControl=function({Handle:r,LedFlag:t},n){this.exec("Arm_LEDControl",[parseInt(r),t],n)},this.Arm_SwitchProtocol=function({Handle:r,ProtocolFlag:t},n){this.exec("Arm_SwitchProtocol",[parseInt(r),t],n)},this.Arm_CreateFile=function({Handle:r,FileID:t,FileType:n,AttrBuffer:l},o){this.exec("Arm_CreateFile",[parseInt(r),n,parseInt(t),l],o)},this.Arm_WriteFile=function({Handle:r,FileID:t,FileType:n,FileOffset:l,DataInput:o},a){this.exec("Arm_WriteFile",[parseInt(r),n,parseInt(t),parseInt(l),o],a)},this.Arm_ReadFile0001=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0001"),parseInt(0),parseInt("64")],t)},this.Arm_ReadFile0002=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0002"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0003=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0003"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0004=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0004"),parseInt(0),parseInt("2048")],t)},this.Arm_ReadFile0005=function({Handle:r},t){this.exec("Arm_ReadFile",[parseInt(r),parseInt("0005"),parseInt(0),parseInt("2048")],t)},this.Arm_DownloadExeFile=function({Handle:r,Count:t,ExeFileInfo:n},l){this.exec("Arm_DownloadExeFile",[parseInt(r),parseInt(t),n],l)},this.Arm_RunExeFile=function({Handle:r,FileID:t,InData:n,DataLen:l},o){this.exec("Arm_RunExeFile",[parseInt(r),parseInt(t),n,n.length,parseInt(l)],o)},this.Arm_ReadRunExeFileData=function(r){this.exec("Arm_ReadRunExeFileData",null,r)},this.Arm_DeleteFile=function({Handle:r,FileID:t,FileType:n},l){this.exec("Arm_DeleteFile",[parseInt(r),n,parseInt(t)],l)},this.Arm_WriteData=function({Handle:r,Offset:t,DataInput:n},l){this.exec("Arm_WriteData",[parseInt(r),parseInt(t),n],l)},this.Arm_ReadData=function({Handle:r,Offset:t,ReadLength:n},l){this.exec("Arm_ReadData",[parseInt(r),parseInt(t),n],l)},this.Arm_WriteShareMemory=function({Handle:r,DataInput:t},n){this.exec("Arm_WriteShareMemory",[parseInt(r),t],n)},this.Arm_ReadShareMemory=function({Handle:r},t){this.exec("Arm_ReadShareMemory",[parseInt(r)],t)},this.Arm_GenUniqueKey=function({Handle:r,Seed:t},n){this.exec("Arm_GenUniqueKey",[parseInt(r),t.length,t],n)},this.Arm_ChangePIN=function({Handle:r,NewPIN:t,OldPIN:n,TryCount:l,PinFlag:o},a){this.exec("Arm_ChangePIN",[parseInt(r),o,n,t,parseInt(l)],a)},this.Arm_ResetUserPIN=function({Handle:r,AdminPIN:t},n){this.exec("Arm_ResetUserPIN",[parseInt(r),t],n)},this.Arm_SetUserID=function({Handle:r,UserID:t},n){this.exec("Arm_SetUserID",[parseInt(r),parseInt(t)],n)},this.Arm_GetDeadline=function({Handle:r},t){this.exec("Arm_GetDeadline",[parseInt(r)],t)},this.Arm_SetDeadline=function({Handle:r,SetDeadTime:t},n){this.exec("Arm_SetDeadline",[parseInt(r),parseInt(t)],n)},this.Arm_GetUTCTime=function({Handle:r},t){this.exec("Arm_GetUTCTime",[parseInt(r)],t)},this.Arm_RFS=function({Handle:r},t){this.exec("Arm_RFS",[parseInt(r)],t)},this.Arm_RsaGenPubPriKey=function({Handle:r,RsaFileId:t},n){this.exec("Arm_RsaGenPubPriKey",[parseInt(r),parseInt(t)],n)},this.Arm_EccGenPubPriKey=function({Handle:r,EccFileId:t},n){this.exec("Arm_EccGenPubPriKey",[parseInt(r),parseInt(t)],n)},this.Arm_Sm2GenPubPriKey=function({Handle:r,Sm2FileId:t},n){this.exec("Arm_Sm2GenPubPriKey",[parseInt(r),parseInt(t)],n)},this.Arm_ReadRsaPri=function(r){this.exec("Arm_ReadRsaPri",null,r)},this.Arm_ReadRsaPub=function(r){this.exec("Arm_ReadRsaPub",null,r)},this.Arm_ReadEccPri=function(r){this.exec("Arm_ReadEccPri",null,r)},this.Arm_ReadEccPub=function(r){this.exec("Arm_ReadEccPub",null,r)},this.Arm_ReadSm2Pri=function(r){this.exec("Arm_ReadSm2Pri",null,r)},this.Arm_ReadSm2Pub=function(r){this.exec("Arm_ReadSm2Pub",null,r)},this.Arm_RsaPri=function({Handle:r,RsaPri_Flag:t,RsaPriInData:n,RsaPriFileID:l,RsaPriFileSize:o},a){this.exec("Arm_RsaPri",[parseInt(r),parseInt(l),parseInt(o),t,n],a)},this.Arm_RsaPub=function({Handle:r,RsaPubKey:t,RsaPub_Flag:n,RsaPubInData:l,RsaPubFileSize:o},a){this.exec("Arm_RsaPub",[parseInt(r),parseInt(o),n,t,t.length,l],a)},this.Arm_EccSign=function({Handle:r,HashData:t,EccFileId:n},l){this.exec("Arm_EccSign",[parseInt(r),parseInt(n),t],l)},this.Arm_EccVerify=function({Handle:r,HashData:t,EccPubKey:n,EccSignData:l},o){this.exec("Arm_EccVerify",[parseInt(r),n,n.length,t,l],o)},this.Arm_Sm2Sign=function({Handle:r,HashData:t,Sm2FileId:n},l){this.exec("Arm_Sm2Sign",[parseInt(r),parseInt(n),t],l)},this.Arm_Sm2Verify=function({Handle:r,HashData:t,Sm2PubKey:n,Sm2SignData:l},o){this.exec("Arm_Sm2Verify",[parseInt(r),n,n.length,t,l],o)},this.Arm_TDES=function({Handle:r,Tdes_Flag:t,TdesFileID:n,TdesInData:l},o){this.exec("Arm_TDES",[parseInt(r),parseInt(n),t,l],o)},this.Arm_SM4=function({Handle:r,Sm4_Flag:t,Sm4FileID:n,Sm4InData:l},o){this.exec("Arm_SM4",[parseInt(r),parseInt(n),t,l],o)},this.Arm_HASH=function({Handle:r,Hash_Flag:t,HashInData:n},l){this.exec("Arm_HASH",[parseInt(r),t,n],l)},this.Arm_Seed=function({Handle:r,SeedData:t,SeedLength:n},l){this.exec("Arm_Seed",[parseInt(r),n,t],l)},this.Arm_LimitSeedCount=function({Handle:r,SeedCount:t},n){this.exec("Arm_LimitSeedCount",[parseInt(r),parseInt(t)],n)},this.Arm_GenMotherKey=function({Handle:r,SeedLen:t,SeedForPID:n,SonCount:l,StartUserID:o,AdminTryCount:a,UserPin:u,UserTryCount:h,UpdateRSAPriKey:s},i){this.exec("Arm_GenMotherKey",[parseInt(r),parseInt(t),n,u,parseInt(h),parseInt(a),s,parseInt(o),parseInt(l)],i)},this.Arm_RequestInit=function({Handle:r},t){this.exec("Arm_RequestInit",[parseInt(r)],t)},this.Arm_GetInitDataFromMother=function({Handle:r},t){this.exec("Arm_GetInitDataFromMother",[parseInt(r),Request],t)},this.Arm_InitSon=function({Handle:r,InitData:t},n){this.exec("Arm_InitSon",[parseInt(r),t],n)},this.Arm_SetUpdatePriKey=function({Handle:r,UpdatePriKey:t},n){this.exec("Arm_SetUpdatePriKey",[parseInt(r),t],n)},this.Arm_MakeUpdatePacket=function({Handle:r,HID:t,Func:n,FileID:l,FileType:o,Offset:a,DataLen:u,DataBuffer:h,UpRSAPubKey:s},i){this.exec("Arm_MakeUpdatePacket",[parseInt(r),t,n,o,parseInt(l),parseInt(a),h,s,parseInt(u)],i)},this.Arm_MakeUpdatePacketFromMother=function({Handle:r,HID:t,Func:n,FileID:l,FileType:o,Offset:a,DataLen:u,DataBuffer:h},s){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(r),t,n,o,parseInt(l),parseInt(a),h,parseInt(u)],s)},this.Arm_Update=function({Handle:r,UpdateData:t},n){this.exec("Arm_Update",[parseInt(r),t],n)},this.Arm_Set_DATA_FILE_ATTR=function({Size:r,ReadPriv:t,WritePriv:n},l){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(r),parseInt(t),parseInt(n)],l)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:r,Size:t,Type:n,Priv:l,IsReset:o,IsDecOnRAM:a},u){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[n,parseInt(t),parseInt(r),parseInt(l),parseInt(a),parseInt(o)],u)},this.Arm_Set_KEY_FILE_ATTR=function({Size:r,PrivEnc:t},n){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(r),parseInt(t)],n)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:r,PrivExe:t},n){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(r),parseInt(t)],n)},this.Arm_Set_DATA_LIC=function({ReadPriv:r,WritePriv:t},n){this.exec("Arm_Set_DATA_LIC",[parseInt(r),parseInt(t)],n)},this.Arm_Set_PRIKEY_LIC=function({Count:r,Priv:t,IsReset:n,IsDecOnRAM:l},o){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(r),parseInt(t),parseInt(l),parseInt(n)],o)},this.Arm_Set_KEY_LIC=function({PrivEnc:r},t){this.exec("Arm_Set_KEY_LIC",[parseInt(r)],t)},this.Arm_Set_EXE_LIC=function({PrivExe:r},t){this.exec("Arm_Set_EXE_LIC",[parseInt(r)],t)},this.Arm_Set_EXE_FILE_INFO=function({FileID:r,FileData:t,FileSize:n,InBuffer:l,CallLimit:o},a){this.exec("Arm_Set_EXE_FILE_INFO",[l,parseInt(n),parseInt(r),parseInt(o),t,t.length],a)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:r},t){this.exec("Arm_Clear_EXE_FILE_INFO",[r],t)}}const yy={HID:0},kn={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},yl={USER:0};class _0{constructor(){It(this,"Base64",new dy);It(this,"AtlCtrl",null);It(this,"ArmCount",0);It(this,"ArmIndex",0);It(this,"ArmHandle",0);It(this,"ArmRandom","");try{this.AtlCtrl=new my("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(r){console.error(r),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((r,t)=>{this.AtlCtrl.Arm_Enum((n,l)=>{n?(this.ArmCount=+l,r(l)):t(l)})})}armOpen(r=0){if(this.AtlCtrl)return this.ArmIndex=r,new Promise((t,n)=>{this.AtlCtrl.Arm_Open({Index:r},(l,o)=>{l?(this.ArmHandle=+o,t(o)):(this.ArmHandle=o,n(o))})})}armClose(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_Close({Handle:r},(l,o)=>{l?t(o):n(o)})})}armChangePIN(r,t,n=255,l=yl.USER,o=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,u)=>{this.AtlCtrl.Arm_ChangePIN({Handle:o,NewPIN:r,OldPIN:t,TryCount:n,PinFlag:l},(h,s)=>{h&&s==0?(this.ArmPin=r,a(s)):u(s)})})}armGenRandom(r=16,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_GenRandom({Handle:t,RandomLen:r},(o,a)=>{o?(this.ArmRandom=a,n(a)):l(a)})})}armGetDeadline(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_GetDeadline({Handle:r},(l,o)=>{l?(this.ArmDeadline=o,t(o)):n(o)})})}armGenUniqueKey(r="MTIzNDU2Nzg5MA==",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:t,Seed:r},(o,a)=>{o?(this.ArmUKey=a,n(a)):l(a)})})}armGetDongleInfo(r=0,t=kn.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=r,new Promise((n,l)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:r,DongleInfoNum:t},(o,a)=>{if(o){switch(t){case kn.USER_ID:this.ArmUid=a;break;case kn.PRODUCT_ID:this.ArmPid=a;break;case kn.HARDWARE_ID:this.ArmHid=a;break}n(a)}else l(a)})})}armLEDControl(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_LEDControl({Handle:t,LedFlag:r},(o,a)=>{o&&a==0?n(a):l(a)})})}armRFS(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_RFS({Handle:r},(l,o)=>{l&&o==0?t(o):n(o)})})}armReadFile(r="0001",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl[`Arm_ReadFile${r}`]({Handle:t},(o,a)=>{if(o&&a.length>0)try{a=this.Base64.decode(a),n(a)}catch(u){console.error(u),n(a)}else l(a)})})}armResetState(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_ResetState({Handle:r},(l,o)=>{l&&o==0?t(o):n(o)})})}armResetUserPIN(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:t,AdminPIN:r},(o,a)=>{o&&a==0?n(a):l(a)})})}armSetUserID(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_SetUserID({Handle:t,UserID:r},(o,a)=>{o&&a==0?n(a):l(a)})})}armSetDeadline(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_SetDeadline({Handle:t,SetDeadTime:r},(o,a)=>{o&&a==0?n(a):l(a)})})}armSwitchProtocol(r=yy.HID,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:t,ProtocolFlag:r},(o,a)=>{o&&a==0?n(a):l(a)})})}armVerifyPIN(r,t=yl.USER,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((l,o)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:n,UserPin:r,UserType:t},(a,u)=>{a&&u==0?(this.ArmPin=r,l(u)):o(u)})})}armReadData(r=0,t=128,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((l,o)=>{this.AtlCtrl.Arm_ReadData({Handle:n,Offset:r,ReadLength:t},(a,u)=>{a?(this.ArmData=u,l(u)):o(u)})})}armWriteData(r,t=0,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((l,o)=>{this.AtlCtrl.Arm_WriteData({Handle:n,Offset:t,DataInput:r},(a,u)=>{a&&u==0?l(u):o(u)})})}armReadShareMemory(r=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,n)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:r},(l,o)=>{l?(this.ArmData=o,t(o)):n(o)})})}armWriteShareMemory(r,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,l)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:t,DataInput:r},(o,a)=>{o&&a==0?n(a):l(a)})})}}const E0=Symbol(),$n="el",vy="is-",Vt=(e,r,t,n,l)=>{let o=`${e}-${r}`;return t&&(o+=`-${t}`),n&&(o+=`__${n}`),l&&(o+=`--${l}`),o},A0=Symbol("namespaceContextKey"),gy=e=>{const r=e||(O.getCurrentInstance()?O.inject(A0,O.ref($n)):O.ref($n));return O.computed(()=>O.unref(r)||$n)},Dr=(e,r)=>{const t=gy(r);return{namespace:t,b:(v="")=>Vt(t.value,e,v,"",""),e:v=>v?Vt(t.value,e,"",v,""):"",m:v=>v?Vt(t.value,e,"","",v):"",be:(v,m)=>v&&m?Vt(t.value,e,v,m,""):"",em:(v,m)=>v&&m?Vt(t.value,e,"",v,m):"",bm:(v,m)=>v&&m?Vt(t.value,e,v,"",m):"",bem:(v,m,b)=>v&&m&&b?Vt(t.value,e,v,m,b):"",is:(v,...m)=>{const b=m.length>=1?m[0]:!0;return v&&b?`${vy}${v}`:""},cssVar:v=>{const m={};for(const b in v)v[b]&&(m[`--${t.value}-${b}`]=v[b]);return m},cssVarName:v=>`--${t.value}-${v}`,cssVarBlock:v=>{const m={};for(const b in v)v[b]&&(m[`--${t.value}-${e}-${b}`]=v[b]);return m},cssVarBlockName:v=>`--${t.value}-${e}-${v}`}};/**
36
+ * @vue/shared v3.5.33
34
37
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
35
38
  * @license MIT
36
- **/process.env.NODE_ENV!=="production"&&Object.freeze({});process.env.NODE_ENV!=="production"&&Object.freeze([]);const Im=()=>{},Dm=Object.prototype.hasOwnProperty,Go=(e,r)=>Dm.call(e,r),Rm=Array.isArray,jr=e=>typeof e=="function",Bt=e=>typeof e=="string",f0=e=>e!==null&&typeof e=="object",Om=e=>e===void 0,Io=e=>typeof e=="boolean",Zt=e=>typeof e=="number",Qo=e=>typeof Element=="undefined"?!1:e instanceof Element,Pm=e=>Bt(e)?!Number.isNaN(Number(e)):!1;var vl;const Lt=typeof window!="undefined",Nm=e=>typeof e=="string",Mm=()=>{};Lt&&((vl=window==null?void 0:window.navigator)!=null&&vl.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ya(e){return typeof e=="function"?e():P.unref(e)}function Lm(e){return e}function ga(e){return P.getCurrentScope()?(P.onScopeDispose(e),!0):!1}function Um(e,r=!0){P.getCurrentInstance()?P.onMounted(e):r?e():P.nextTick(e)}function h0(e,r,t={}){const{immediate:n=!0}=t,l=P.ref(!1);let a=null;function o(){a&&(clearTimeout(a),a=null)}function u(){l.value=!1,o()}function d(...s){o(),l.value=!0,a=setTimeout(()=>{l.value=!1,a=null,e(...s)},ya(r))}return n&&(l.value=!0,Lt&&d()),ga(u),{isPending:P.readonly(l),start:d,stop:u}}function d0(e){var r;const t=ya(e);return(r=t==null?void 0:t.$el)!=null?r:t}const p0=Lt?window:void 0;function m0(...e){let r,t,n,l;if(Nm(e[0])||Array.isArray(e[0])?([t,n,l]=e,r=p0):[r,t,n,l]=e,!r)return Mm;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const a=[],o=()=>{a.forEach(i=>i()),a.length=0},u=(i,p,c,f)=>(i.addEventListener(p,c,f),()=>i.removeEventListener(p,c,f)),d=P.watch(()=>[d0(r),ya(l)],([i,p])=>{o(),i&&a.push(...t.flatMap(c=>n.map(f=>u(i,c,f,p))))},{immediate:!0,flush:"post"}),s=()=>{d(),o()};return ga(s),s}function qm(e,r=!1){const t=P.ref(),n=()=>t.value=!!e();return n(),Um(n,r),t}const yl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},gl="__vueuse_ssr_handlers__";yl[gl]=yl[gl]||{};var xl=Object.getOwnPropertySymbols,$m=Object.prototype.hasOwnProperty,zm=Object.prototype.propertyIsEnumerable,jm=(e,r)=>{var t={};for(var n in e)$m.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&xl)for(var n of xl(e))r.indexOf(n)<0&&zm.call(e,n)&&(t[n]=e[n]);return t};function Hm(e,r,t={}){const n=t,{window:l=p0}=n,a=jm(n,["window"]);let o;const u=qm(()=>l&&"ResizeObserver"in l),d=()=>{o&&(o.disconnect(),o=void 0)},s=P.watch(()=>d0(e),p=>{d(),u.value&&l&&p&&(o=new ResizeObserver(r),o.observe(p,a))},{immediate:!0,flush:"post"}),i=()=>{d(),s()};return ga(i),{isSupported:u,stop:i}}var bl;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(bl||(bl={}));var Vm=Object.defineProperty,wl=Object.getOwnPropertySymbols,Wm=Object.prototype.hasOwnProperty,Km=Object.prototype.propertyIsEnumerable,_l=(e,r,t)=>r in e?Vm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Gm=(e,r)=>{for(var t in r||(r={}))Wm.call(r,t)&&_l(e,t,r[t]);if(wl)for(var t of wl(r))Km.call(r,t)&&_l(e,t,r[t]);return e};const Qm={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Gm({linear:Lm},Qm);class Ym extends Error{constructor(r){super(r),this.name="ElementPlusError"}}function ir(e,r){if(typeof process!="undefined"&&process.env.NODE_ENV!=="production"){const t=Bt(e)?new Ym(`[${e}] ${r}`):e;console.warn(t)}}const El={current:0},Al=P.ref(0),v0=2e3,Cl=Symbol("elZIndexContextKey"),y0=Symbol("zIndexContextKey"),Xm=e=>{const r=P.getCurrentInstance()?P.inject(Cl,El):El,t=e||(P.getCurrentInstance()?P.inject(y0,void 0):void 0),n=P.computed(()=>{const o=P.unref(t);return Zt(o)?o:v0}),l=P.computed(()=>n.value+Al.value),a=()=>(r.current++,Al.value=r.current,l.value);return!Lt&&!P.inject(Cl)&&ir("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
37
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,currentZIndex:l,nextZIndex:a}};var Zm={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Jm=e=>(r,t)=>ev(r,t,P.unref(e)),ev=(e,r,t)=>jn.get(t,e,e).replace(/\{(\w+)\}/g,(n,l)=>{var a;return`${(a=r==null?void 0:r[l])!=null?a:`{${l}}`}`}),tv=e=>{const r=P.computed(()=>P.unref(e).name),t=P.isRef(e)?e:P.ref(e);return{lang:r,locale:t,t:Jm(e)}},g0=Symbol("localeContextKey"),rv=e=>{const r=e||P.inject(g0,P.ref());return tv(P.computed(()=>r.value||Zm))},x0="__epPropKey",Me=e=>e,nv=e=>f0(e)&&!!e[x0],b0=(e,r)=>{if(!f0(e)||nv(e))return e;const{values:t,required:n,default:l,type:a,validator:o}=e,d={type:a,required:!!n,validator:t||o?s=>{let i=!1,p=[];if(t&&(p=Array.from(t),Go(e,"default")&&p.push(l),i||(i=p.includes(s))),o&&(i||(i=o(s))),!i&&p.length>0){const c=[...new Set(p)].map(f=>JSON.stringify(f)).join(", ");P.warn(`Invalid prop: validation failed${r?` for prop "${r}"`:""}. Expected one of [${c}], got value ${JSON.stringify(s)}.`)}return i}:void 0,[x0]:!0};return Go(e,"default")&&(d.default=l),d},or=e=>jn.fromPairs(Object.entries(e).map(([r,t])=>[r,b0(t,r)])),iv=["","default","small","large"],w0=b0({type:String,values:iv,required:!1}),_0=Symbol("size"),ov=()=>{const e=P.inject(_0,{});return P.computed(()=>P.unref(e.size)||"")},av=Symbol("emptyValuesContextKey"),sv=or({emptyValues:Array,valueOnClear:{type:Me([String,Number,Boolean,Function]),default:void 0,validator:e=>(e=jr(e)?e():e,Rm(e)?e.every(r=>!r):!e)}}),Sl=e=>Object.keys(e),qn=P.ref();function xa(e,r=void 0){const t=P.getCurrentInstance()?P.inject(u0,qn):qn;return e?P.computed(()=>{var n,l;return(l=(n=t.value)==null?void 0:n[e])!=null?l:r}):t}function E0(e,r){const t=xa(),n=Br(e,P.computed(()=>{var u;return((u=t.value)==null?void 0:u.namespace)||On})),l=rv(P.computed(()=>{var u;return(u=t.value)==null?void 0:u.locale})),a=Xm(P.computed(()=>{var u;return((u=t.value)==null?void 0:u.zIndex)||v0})),o=P.computed(()=>{var u;return P.unref(r)||((u=t.value)==null?void 0:u.size)||""});return A0(P.computed(()=>P.unref(t)||{})),{ns:n,locale:l,zIndex:a,size:o}}const A0=(e,r,t=!1)=>{var n;const l=!!P.getCurrentInstance(),a=l?xa():void 0,o=(n=void 0)!=null?n:l?P.provide:void 0;if(!o){ir("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const u=P.computed(()=>{const d=P.unref(e);return a!=null&&a.value?lv(a.value,d):d});return o(u0,u),o(g0,P.computed(()=>u.value.locale)),o(c0,P.computed(()=>u.value.namespace)),o(y0,P.computed(()=>u.value.zIndex)),o(_0,{size:P.computed(()=>u.value.size||"")}),o(av,P.computed(()=>({emptyValues:u.value.emptyValues,valueOnClear:u.value.valueOnClear}))),(t||!qn.value)&&(qn.value=u.value),u},lv=(e,r)=>{const t=[...new Set([...Sl(e),...Sl(r)])],n={};for(const l of t)n[l]=r[l]!==void 0?r[l]:e[l];return n};var kr=(e,r)=>{const t=e.__vccOpts||e;for(const[n,l]of r)t[n]=l;return t};const uv="utils/dom/style";function Yo(e,r="px"){if(!e&&e!==0)return"";if(Zt(e)||Pm(e))return`${e}${r}`;if(Bt(e))return e;ir(uv,"binding value must be a string or number")}const ba=(e,r)=>{if(e.install=t=>{for(const n of[e,...Object.values(r!=null?r:{})])t.component(n.name,n)},r)for(const[t,n]of Object.entries(r))e[t]=n;return e},C0=(e,r)=>(e.install=t=>{e._context=t._context,t.config.globalProperties[r]=e},e),cv=e=>(e.install=Im,e),fv=or({size:{type:Me([Number,String])},color:{type:String}}),hv=P.defineComponent({name:"ElIcon",inheritAttrs:!1}),dv=P.defineComponent(we(he({},hv),{props:fv,setup(e){const r=e,t=Br("icon"),n=P.computed(()=>{const{size:l,color:a}=r,o=Yo(l);return!o&&!a?{}:{fontSize:o,"--color":a}});return(l,a)=>(P.openBlock(),P.createElementBlock("i",P.mergeProps({class:P.unref(t).b(),style:P.unref(n)},l.$attrs),[P.renderSlot(l.$slots,"default")],16))}}));var pv=kr(dv,[["__file","icon.vue"]]);const Er=ba(pv);/*! Element Plus Icons Vue v2.3.2 */var mv=P.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(r,t)=>(P.openBlock(),P.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[P.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),vv=mv,yv=P.defineComponent({name:"Close",__name:"close",setup(e){return(r,t)=>(P.openBlock(),P.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[P.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),S0=yv,gv=P.defineComponent({name:"InfoFilled",__name:"info-filled",setup(e){return(r,t)=>(P.openBlock(),P.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[P.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Bl=gv,xv=P.defineComponent({name:"Loading",__name:"loading",setup(e){return(r,t)=>(P.openBlock(),P.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[P.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),B0=xv,bv=P.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(e){return(r,t)=>(P.openBlock(),P.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[P.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),wv=bv,_v=P.defineComponent({name:"WarningFilled",__name:"warning-filled",setup(e){return(r,t)=>(P.openBlock(),P.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[P.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Ev=_v;const Hr=Me([String,Object,Function]),Av={Close:S0},$n={primary:Bl,success:wv,warning:Ev,error:vv,info:Bl},Cv=()=>Lt&&/android/i.test(window.navigator.userAgent),Sv=e=>e,wa=Symbol("formContextKey"),k0=Symbol("formItemContextKey"),Bv=()=>{const e=P.inject(wa,void 0),r=P.inject(k0,void 0);return{form:e,formItem:r}},T0=e=>{const r=P.getCurrentInstance();return P.computed(()=>{var t,n;return(n=(t=r==null?void 0:r.proxy)==null?void 0:t.$props)==null?void 0:n[e]})},kv=(e,r={})=>{const t=P.ref(void 0),n=r.prop?t:T0("size"),l=r.global?t:ov(),a=r.form?{size:void 0}:P.inject(wa,void 0),o=r.formItem?{size:void 0}:P.inject(k0,void 0);return P.computed(()=>n.value||P.unref(e)||(o==null?void 0:o.size)||(a==null?void 0:a.size)||l.value||"")},F0=e=>{const r=T0("disabled"),t=P.inject(wa,void 0);return P.computed(()=>{var n,l,a;return(a=(l=(n=r.value)!=null?n:P.unref(e))!=null?l:t==null?void 0:t.disabled)!=null?a:!1})},vr={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},I0=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const r=Tv(e);if(r){if(Object.values(vr).includes(r))return r;switch(r){case" ":return vr.space;default:return""}}return""},Tv=e=>{let r=e.key&&e.key!=="Unidentified"?e.key:"";if(!r&&e.type==="keyup"&&Cv()){const t=e.target;r=t.value.charAt(t.selectionStart-1)}return r},Fv=or({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Me([String,Object,Array])},offset:{type:Me(Array),default:[0,0]},badgeClass:{type:String}}),Iv=P.defineComponent({name:"ElBadge"}),Dv=P.defineComponent(we(he({},Iv),{props:Fv,setup(e,{expose:r}){const t=e,n=Br("badge"),l=P.computed(()=>t.isDot?"":Zt(t.value)&&Zt(t.max)?t.max<t.value?`${t.max}+`:`${t.value}`:`${t.value}`),a=P.computed(()=>{var o;return[{backgroundColor:t.color,marginRight:Yo(-t.offset[0]),marginTop:Yo(t.offset[1])},(o=t.badgeStyle)!=null?o:{}]});return r({content:l}),(o,u)=>(P.openBlock(),P.createElementBlock("div",{class:P.normalizeClass(P.unref(n).b())},[P.renderSlot(o.$slots,"default"),P.createVNode(P.Transition,{name:`${P.unref(n).namespace.value}-zoom-in-center`,persisted:""},{default:P.withCtx(()=>[P.withDirectives(P.createElementVNode("sup",{class:P.normalizeClass([P.unref(n).e("content"),P.unref(n).em("content",o.type),P.unref(n).is("fixed",!!o.$slots.default),P.unref(n).is("dot",o.isDot),P.unref(n).is("hide-zero",!o.showZero&&o.value===0),o.badgeClass]),style:P.normalizeStyle(P.unref(a))},[P.renderSlot(o.$slots,"content",{value:P.unref(l)},()=>[P.createTextVNode(P.toDisplayString(P.unref(l)),1)])],6),[[P.vShow,!o.hidden&&(P.unref(l)||o.isDot||o.$slots.content)]])]),_:3},8,["name"])],2))}}));var Rv=kr(Dv,[["__file","badge.vue"]]);const Ov=ba(Rv),D0=Symbol("buttonGroupContextKey"),Pv=({from:e,replacement:r,scope:t,version:n,ref:l,type:a="API"},o)=>{P.watch(()=>P.unref(o),u=>{u&&ir(t,`[${a}] ${e} is about to be deprecated in version ${n}, please use ${r} instead.
39
+ **/process.env.NODE_ENV!=="production"&&Object.freeze({});process.env.NODE_ENV!=="production"&&Object.freeze([]);const xy=()=>{},by=Object.prototype.hasOwnProperty,ea=(e,r)=>by.call(e,r),wy=Array.isArray,Gr=e=>typeof e=="function",kt=e=>typeof e=="string",C0=e=>e!==null&&typeof e=="object",_y=e=>e===void 0,Mo=e=>typeof e=="boolean",Jt=e=>typeof e=="number",ta=e=>typeof Element=="undefined"?!1:e instanceof Element,Ey=e=>kt(e)?!Number.isNaN(Number(e)):!1;var vl;const Ut=typeof window!="undefined",Ay=e=>typeof e=="string",Cy=()=>{};Ut&&((vl=window==null?void 0:window.navigator)!=null&&vl.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function _a(e){return typeof e=="function"?e():O.unref(e)}function Sy(e){return e}function Ea(e){return O.getCurrentScope()?(O.onScopeDispose(e),!0):!1}function By(e,r=!0){O.getCurrentInstance()?O.onMounted(e):r?e():O.nextTick(e)}function S0(e,r,t={}){const{immediate:n=!0}=t,l=O.ref(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function u(){l.value=!1,a()}function h(...s){a(),l.value=!0,o=setTimeout(()=>{l.value=!1,o=null,e(...s)},_a(r))}return n&&(l.value=!0,Ut&&h()),Ea(u),{isPending:O.readonly(l),start:h,stop:u}}function B0(e){var r;const t=_a(e);return(r=t==null?void 0:t.$el)!=null?r:t}const k0=Ut?window:void 0;function T0(...e){let r,t,n,l;if(Ay(e[0])||Array.isArray(e[0])?([t,n,l]=e,r=k0):[r,t,n,l]=e,!r)return Cy;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const o=[],a=()=>{o.forEach(i=>i()),o.length=0},u=(i,p,c,f)=>(i.addEventListener(p,c,f),()=>i.removeEventListener(p,c,f)),h=O.watch(()=>[B0(r),_a(l)],([i,p])=>{a(),i&&o.push(...t.flatMap(c=>n.map(f=>u(i,c,f,p))))},{immediate:!0,flush:"post"}),s=()=>{h(),a()};return Ea(s),s}function ky(e,r=!1){const t=O.ref(),n=()=>t.value=!!e();return n(),By(n,r),t}const gl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},xl="__vueuse_ssr_handlers__";gl[xl]=gl[xl]||{};var bl=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,Dy=(e,r)=>{var t={};for(var n in e)Ty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&bl)for(var n of bl(e))r.indexOf(n)<0&&Fy.call(e,n)&&(t[n]=e[n]);return t};function Iy(e,r,t={}){const n=t,{window:l=k0}=n,o=Dy(n,["window"]);let a;const u=ky(()=>l&&"ResizeObserver"in l),h=()=>{a&&(a.disconnect(),a=void 0)},s=O.watch(()=>B0(e),p=>{h(),u.value&&l&&p&&(a=new ResizeObserver(r),a.observe(p,o))},{immediate:!0,flush:"post"}),i=()=>{h(),s()};return Ea(i),{isSupported:u,stop:i}}var wl;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(wl||(wl={}));var Ry=Object.defineProperty,_l=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,El=(e,r,t)=>r in e?Ry(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ny=(e,r)=>{for(var t in r||(r={}))Oy.call(r,t)&&El(e,t,r[t]);if(_l)for(var t of _l(r))Py.call(r,t)&&El(e,t,r[t]);return e};const My={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Ny({linear:Sy},My);class Ly extends Error{constructor(r){super(r),this.name="ElementPlusError"}}function or(e,r){if(typeof process!="undefined"&&process.env.NODE_ENV!=="production"){const t=kt(e)?new Ly(`[${e}] ${r}`):e;console.warn(t)}}const Al={current:0},Cl=O.ref(0),F0=2e3,Sl=Symbol("elZIndexContextKey"),D0=Symbol("zIndexContextKey"),Uy=e=>{const r=O.getCurrentInstance()?O.inject(Sl,Al):Al,t=e||(O.getCurrentInstance()?O.inject(D0,void 0):void 0),n=O.computed(()=>{const a=O.unref(t);return Jt(a)?a:F0}),l=O.computed(()=>n.value+Cl.value),o=()=>(r.current++,Cl.value=r.current,l.value);return!Ut&&!O.inject(Sl)&&or("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
40
+ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,currentZIndex:l,nextZIndex:o}};var $y={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const qy=e=>(r,t)=>zy(r,t,O.unref(e)),zy=(e,r,t)=>_r.get(t,e,e).replace(/\{(\w+)\}/g,(n,l)=>{var o;return`${(o=r==null?void 0:r[l])!=null?o:`{${l}}`}`}),jy=e=>{const r=O.computed(()=>O.unref(e).name),t=O.isRef(e)?e:O.ref(e);return{lang:r,locale:t,t:qy(e)}},I0=Symbol("localeContextKey"),Hy=e=>{const r=e||O.inject(I0,O.ref());return jy(O.computed(()=>r.value||$y))},R0="__epPropKey",Ue=e=>e,Vy=e=>C0(e)&&!!e[R0],O0=(e,r)=>{if(!C0(e)||Vy(e))return e;const{values:t,required:n,default:l,type:o,validator:a}=e,h={type:o,required:!!n,validator:t||a?s=>{let i=!1,p=[];if(t&&(p=Array.from(t),ea(e,"default")&&p.push(l),i||(i=p.includes(s))),a&&(i||(i=a(s))),!i&&p.length>0){const c=[...new Set(p)].map(f=>JSON.stringify(f)).join(", ");O.warn(`Invalid prop: validation failed${r?` for prop "${r}"`:""}. Expected one of [${c}], got value ${JSON.stringify(s)}.`)}return i}:void 0,[R0]:!0};return ea(e,"default")&&(h.default=l),h},ar=e=>_r.fromPairs(Object.entries(e).map(([r,t])=>[r,O0(t,r)])),Wy=["","default","small","large"],P0=O0({type:String,values:Wy,required:!1}),N0=Symbol("size"),Gy=()=>{const e=O.inject(N0,{});return O.computed(()=>O.unref(e.size)||"")},Ky=Symbol("emptyValuesContextKey"),Qy=ar({emptyValues:Array,valueOnClear:{type:Ue([String,Number,Boolean,Function]),default:void 0,validator:e=>(e=Gr(e)?e():e,wy(e)?e.every(r=>!r):!e)}}),Bl=e=>Object.keys(e),Wn=O.ref();function Aa(e,r=void 0){const t=O.getCurrentInstance()?O.inject(E0,Wn):Wn;return e?O.computed(()=>{var n,l;return(l=(n=t.value)==null?void 0:n[e])!=null?l:r}):t}function M0(e,r){const t=Aa(),n=Dr(e,O.computed(()=>{var u;return((u=t.value)==null?void 0:u.namespace)||$n})),l=Hy(O.computed(()=>{var u;return(u=t.value)==null?void 0:u.locale})),o=Uy(O.computed(()=>{var u;return((u=t.value)==null?void 0:u.zIndex)||F0})),a=O.computed(()=>{var u;return O.unref(r)||((u=t.value)==null?void 0:u.size)||""});return L0(O.computed(()=>O.unref(t)||{})),{ns:n,locale:l,zIndex:o,size:a}}const L0=(e,r,t=!1)=>{var n;const l=!!O.getCurrentInstance(),o=l?Aa():void 0,a=(n=void 0)!=null?n:l?O.provide:void 0;if(!a){or("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const u=O.computed(()=>{const h=O.unref(e);return o!=null&&o.value?Yy(o.value,h):h});return a(E0,u),a(I0,O.computed(()=>u.value.locale)),a(A0,O.computed(()=>u.value.namespace)),a(D0,O.computed(()=>u.value.zIndex)),a(N0,{size:O.computed(()=>u.value.size||"")}),a(Ky,O.computed(()=>({emptyValues:u.value.emptyValues,valueOnClear:u.value.valueOnClear}))),(t||!Wn.value)&&(Wn.value=u.value),u},Yy=(e,r)=>{const t=[...new Set([...Bl(e),...Bl(r)])],n={};for(const l of t)n[l]=r[l]!==void 0?r[l]:e[l];return n};var Ir=(e,r)=>{const t=e.__vccOpts||e;for(const[n,l]of r)t[n]=l;return t};const Xy="utils/dom/style";function ra(e,r="px"){if(!e&&e!==0)return"";if(Jt(e)||Ey(e))return`${e}${r}`;if(kt(e))return e;or(Xy,"binding value must be a string or number")}const Ca=(e,r)=>{if(e.install=t=>{for(const n of[e,...Object.values(r!=null?r:{})])t.component(n.name,n)},r)for(const[t,n]of Object.entries(r))e[t]=n;return e},U0=(e,r)=>(e.install=t=>{e._context=t._context,t.config.globalProperties[r]=e},e),Zy=e=>(e.install=xy,e),Jy=ar({size:{type:Ue([Number,String])},color:{type:String}}),ev=O.defineComponent({name:"ElIcon",inheritAttrs:!1}),tv=O.defineComponent(we(fe({},ev),{props:Jy,setup(e){const r=e,t=Dr("icon"),n=O.computed(()=>{const{size:l,color:o}=r,a=ra(l);return!a&&!o?{}:{fontSize:a,"--color":o}});return(l,o)=>(O.openBlock(),O.createElementBlock("i",O.mergeProps({class:O.unref(t).b(),style:O.unref(n)},l.$attrs),[O.renderSlot(l.$slots,"default")],16))}}));var rv=Ir(tv,[["__file","icon.vue"]]);const Br=Ca(rv);/*! Element Plus Icons Vue v2.3.2 */var nv=O.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(r,t)=>(O.openBlock(),O.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[O.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),iv=nv,ov=O.defineComponent({name:"Close",__name:"close",setup(e){return(r,t)=>(O.openBlock(),O.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[O.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),$0=ov,av=O.defineComponent({name:"InfoFilled",__name:"info-filled",setup(e){return(r,t)=>(O.openBlock(),O.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[O.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),kl=av,sv=O.defineComponent({name:"Loading",__name:"loading",setup(e){return(r,t)=>(O.openBlock(),O.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[O.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),q0=sv,lv=O.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(e){return(r,t)=>(O.openBlock(),O.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[O.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),uv=lv,cv=O.defineComponent({name:"WarningFilled",__name:"warning-filled",setup(e){return(r,t)=>(O.openBlock(),O.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[O.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),fv=cv;const Kr=Ue([String,Object,Function]),hv={Close:$0},Gn={primary:kl,success:uv,warning:fv,error:iv,info:kl},dv=()=>Ut&&/android/i.test(window.navigator.userAgent),pv=e=>e,Sa=Symbol("formContextKey"),z0=Symbol("formItemContextKey"),mv=()=>{const e=O.inject(Sa,void 0),r=O.inject(z0,void 0);return{form:e,formItem:r}},j0=e=>{const r=O.getCurrentInstance();return O.computed(()=>{var t,n;return(n=(t=r==null?void 0:r.proxy)==null?void 0:t.$props)==null?void 0:n[e]})},yv=(e,r={})=>{const t=O.ref(void 0),n=r.prop?t:j0("size"),l=r.global?t:Gy(),o=r.form?{size:void 0}:O.inject(Sa,void 0),a=r.formItem?{size:void 0}:O.inject(z0,void 0);return O.computed(()=>n.value||O.unref(e)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||l.value||"")},H0=e=>{const r=j0("disabled"),t=O.inject(Sa,void 0);return O.computed(()=>{var n,l,o;return(o=(l=(n=r.value)!=null?n:O.unref(e))!=null?l:t==null?void 0:t.disabled)!=null?o:!1})},xr={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},V0=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const r=vv(e);if(r){if(Object.values(xr).includes(r))return r;switch(r){case" ":return xr.space;default:return""}}return""},vv=e=>{let r=e.key&&e.key!=="Unidentified"?e.key:"";if(!r&&e.type==="keyup"&&dv()){const t=e.target;r=t.value.charAt(t.selectionStart-1)}return r},gv=ar({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Ue([String,Object,Array])},offset:{type:Ue(Array),default:[0,0]},badgeClass:{type:String}}),xv=O.defineComponent({name:"ElBadge"}),bv=O.defineComponent(we(fe({},xv),{props:gv,setup(e,{expose:r}){const t=e,n=Dr("badge"),l=O.computed(()=>t.isDot?"":Jt(t.value)&&Jt(t.max)?t.max<t.value?`${t.max}+`:`${t.value}`:`${t.value}`),o=O.computed(()=>{var a;return[{backgroundColor:t.color,marginRight:ra(-t.offset[0]),marginTop:ra(t.offset[1])},(a=t.badgeStyle)!=null?a:{}]});return r({content:l}),(a,u)=>(O.openBlock(),O.createElementBlock("div",{class:O.normalizeClass(O.unref(n).b())},[O.renderSlot(a.$slots,"default"),O.createVNode(O.Transition,{name:`${O.unref(n).namespace.value}-zoom-in-center`,persisted:""},{default:O.withCtx(()=>[O.withDirectives(O.createElementVNode("sup",{class:O.normalizeClass([O.unref(n).e("content"),O.unref(n).em("content",a.type),O.unref(n).is("fixed",!!a.$slots.default),O.unref(n).is("dot",a.isDot),O.unref(n).is("hide-zero",!a.showZero&&a.value===0),a.badgeClass]),style:O.normalizeStyle(O.unref(o))},[O.renderSlot(a.$slots,"content",{value:O.unref(l)},()=>[O.createTextVNode(O.toDisplayString(O.unref(l)),1)])],6),[[O.vShow,!a.hidden&&(O.unref(l)||a.isDot||a.$slots.content)]])]),_:3},8,["name"])],2))}}));var wv=Ir(bv,[["__file","badge.vue"]]);const _v=Ca(wv),W0=Symbol("buttonGroupContextKey"),Ev=({from:e,replacement:r,scope:t,version:n,ref:l,type:o="API"},a)=>{O.watch(()=>O.unref(a),u=>{u&&or(t,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${r} instead.
38
41
  For more detail, please visit: ${l}
39
- `)},{immediate:!0})},Nv=(e,r)=>{Pv({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},P.computed(()=>e.type==="text"));const t=P.inject(D0,void 0),n=xa("button"),{form:l}=Bv(),a=kv(P.computed(()=>t==null?void 0:t.size)),o=F0(),u=P.ref(),d=P.useSlots(),s=P.computed(()=>{var g;return e.type||(t==null?void 0:t.type)||((g=n.value)==null?void 0:g.type)||""}),i=P.computed(()=>{var g,b,y;return(y=(b=e.autoInsertSpace)!=null?b:(g=n.value)==null?void 0:g.autoInsertSpace)!=null?y:!1}),p=P.computed(()=>{var g,b,y;return(y=(b=e.plain)!=null?b:(g=n.value)==null?void 0:g.plain)!=null?y:!1}),c=P.computed(()=>{var g,b,y;return(y=(b=e.round)!=null?b:(g=n.value)==null?void 0:g.round)!=null?y:!1}),f=P.computed(()=>{var g,b,y;return(y=(b=e.text)!=null?b:(g=n.value)==null?void 0:g.text)!=null?y:!1}),h=P.computed(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),v=P.computed(()=>{var g;const b=(g=d.default)==null?void 0:g.call(d);if(i.value&&(b==null?void 0:b.length)===1){const y=b[0];if((y==null?void 0:y.type)===P.Text){const _=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:o,_size:a,_type:s,_ref:u,_props:h,_plain:p,_round:c,_text:f,shouldAddSpace:v,handleClick:g=>{if(o.value||e.loading){g.stopPropagation();return}e.nativeType==="reset"&&(l==null||l.resetFields()),r("click",g)}}},Mv=["default","primary","success","warning","info","danger","text",""],Lv=["button","submit","reset"],Xo=or({size:w0,disabled:{type:Boolean,default:void 0},type:{type:String,values:Mv,default:""},icon:{type:Hr},nativeType:{type:String,values:Lv,default:"button"},loading:Boolean,loadingIcon:{type:Hr,default:()=>B0},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Me([String,Object]),default:"button"}}),Uv={click:e=>e instanceof MouseEvent};function He(e,r){qv(e)&&(e="100%");var t=$v(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function An(e){return Math.min(1,Math.max(0,e))}function qv(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function $v(e){return typeof e=="string"&&e.indexOf("%")!==-1}function R0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gt(e){return e.length===1?"0"+e:String(e)}function zv(e,r,t){return{r:He(e,255)*255,g:He(r,255)*255,b:He(t,255)*255}}function kl(e,r,t){e=He(e,255),r=He(r,255),t=He(t,255);var n=Math.max(e,r,t),l=Math.min(e,r,t),a=0,o=0,u=(n+l)/2;if(n===l)o=0,a=0;else{var d=n-l;switch(o=u>.5?d/(2-n-l):d/(n+l),n){case e:a=(r-t)/d+(r<t?6:0);break;case r:a=(t-e)/d+2;break;case t:a=(e-r)/d+4;break}a/=6}return{h:a,s:o,l:u}}function Do(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*(6*t):t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function jv(e,r,t){var n,l,a;if(e=He(e,360),r=He(r,100),t=He(t,100),r===0)l=t,a=t,n=t;else{var o=t<.5?t*(1+r):t+r-t*r,u=2*t-o;n=Do(u,o,e+1/3),l=Do(u,o,e),a=Do(u,o,e-1/3)}return{r:n*255,g:l*255,b:a*255}}function Tl(e,r,t){e=He(e,255),r=He(r,255),t=He(t,255);var n=Math.max(e,r,t),l=Math.min(e,r,t),a=0,o=n,u=n-l,d=n===0?0:u/n;if(n===l)a=0;else{switch(n){case e:a=(r-t)/u+(r<t?6:0);break;case r:a=(t-e)/u+2;break;case t:a=(e-r)/u+4;break}a/=6}return{h:a,s:d,v:o}}function Hv(e,r,t){e=He(e,360)*6,r=He(r,100),t=He(t,100);var n=Math.floor(e),l=e-n,a=t*(1-r),o=t*(1-l*r),u=t*(1-(1-l)*r),d=n%6,s=[t,o,a,a,u,t][d],i=[u,t,t,o,a,a][d],p=[a,a,u,t,t,o][d];return{r:s*255,g:i*255,b:p*255}}function Fl(e,r,t,n){var l=[Gt(Math.round(e).toString(16)),Gt(Math.round(r).toString(16)),Gt(Math.round(t).toString(16))];return n&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0):l.join("")}function Vv(e,r,t,n,l){var a=[Gt(Math.round(e).toString(16)),Gt(Math.round(r).toString(16)),Gt(Math.round(t).toString(16)),Gt(Wv(n))];return l&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Wv(e){return Math.round(parseFloat(e)*255).toString(16)}function Il(e){return rt(e)/255}function rt(e){return parseInt(e,16)}function Kv(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Zo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Gv(e){var r={r:0,g:0,b:0},t=1,n=null,l=null,a=null,o=!1,u=!1;return typeof e=="string"&&(e=Xv(e)),typeof e=="object"&&(At(e.r)&&At(e.g)&&At(e.b)?(r=zv(e.r,e.g,e.b),o=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):At(e.h)&&At(e.s)&&At(e.v)?(n=Cn(e.s),l=Cn(e.v),r=Hv(e.h,n,l),o=!0,u="hsv"):At(e.h)&&At(e.s)&&At(e.l)&&(n=Cn(e.s),a=Cn(e.l),r=jv(e.h,n,a),o=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=R0(t),{ok:o,format:e.format||u,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}var Qv="[-\\+]?\\d+%?",Yv="[-\\+]?\\d*\\.\\d+%?",Pt="(?:".concat(Yv,")|(?:").concat(Qv,")"),Ro="[\\s|\\(]+(".concat(Pt,")[,|\\s]+(").concat(Pt,")[,|\\s]+(").concat(Pt,")\\s*\\)?"),Oo="[\\s|\\(]+(".concat(Pt,")[,|\\s]+(").concat(Pt,")[,|\\s]+(").concat(Pt,")[,|\\s]+(").concat(Pt,")\\s*\\)?"),ft={CSS_UNIT:new RegExp(Pt),rgb:new RegExp("rgb"+Ro),rgba:new RegExp("rgba"+Oo),hsl:new RegExp("hsl"+Ro),hsla:new RegExp("hsla"+Oo),hsv:new RegExp("hsv"+Ro),hsva:new RegExp("hsva"+Oo),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 Xv(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(Zo[e])e=Zo[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=ft.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=ft.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=ft.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=ft.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=ft.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=ft.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=ft.hex8.exec(e),t?{r:rt(t[1]),g:rt(t[2]),b:rt(t[3]),a:Il(t[4]),format:r?"name":"hex8"}:(t=ft.hex6.exec(e),t?{r:rt(t[1]),g:rt(t[2]),b:rt(t[3]),format:r?"name":"hex"}:(t=ft.hex4.exec(e),t?{r:rt(t[1]+t[1]),g:rt(t[2]+t[2]),b:rt(t[3]+t[3]),a:Il(t[4]+t[4]),format:r?"name":"hex8"}:(t=ft.hex3.exec(e),t?{r:rt(t[1]+t[1]),g:rt(t[2]+t[2]),b:rt(t[3]+t[3]),format:r?"name":"hex"}:!1)))))))))}function At(e){return!!ft.CSS_UNIT.exec(String(e))}var Zv=function(){function e(r,t){r===void 0&&(r=""),t===void 0&&(t={});var n;if(r instanceof e)return r;typeof r=="number"&&(r=Kv(r)),this.originalInput=r;var l=Gv(r);this.originalInput=r,this.r=l.r,this.g=l.g,this.b=l.b,this.a=l.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=t.format)!==null&&n!==void 0?n:l.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=l.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},e.prototype.getLuminance=function(){var r=this.toRgb(),t,n,l,a=r.r/255,o=r.g/255,u=r.b/255;return a<=.03928?t=a/12.92:t=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),u<=.03928?l=u/12.92:l=Math.pow((u+.055)/1.055,2.4),.2126*t+.7152*n+.0722*l},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(r){return this.a=R0(r),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var r=this.toHsl().s;return r===0},e.prototype.toHsv=function(){var r=Tl(this.r,this.g,this.b);return{h:r.h*360,s:r.s,v:r.v,a:this.a}},e.prototype.toHsvString=function(){var r=Tl(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),l=Math.round(r.v*100);return this.a===1?"hsv(".concat(t,", ").concat(n,"%, ").concat(l,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var r=kl(this.r,this.g,this.b);return{h:r.h*360,s:r.s,l:r.l,a:this.a}},e.prototype.toHslString=function(){var r=kl(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),l=Math.round(r.l*100);return this.a===1?"hsl(".concat(t,", ").concat(n,"%, ").concat(l,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(r){return r===void 0&&(r=!1),Fl(this.r,this.g,this.b,r)},e.prototype.toHexString=function(r){return r===void 0&&(r=!1),"#"+this.toHex(r)},e.prototype.toHex8=function(r){return r===void 0&&(r=!1),Vv(this.r,this.g,this.b,this.a,r)},e.prototype.toHex8String=function(r){return r===void 0&&(r=!1),"#"+this.toHex8(r)},e.prototype.toHexShortString=function(r){return r===void 0&&(r=!1),this.a===1?this.toHexString(r):this.toHex8String(r)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var r=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(r,", ").concat(t,", ").concat(n,")"):"rgba(".concat(r,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var r=function(t){return"".concat(Math.round(He(t,255)*100),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var r=function(t){return Math.round(He(t,255)*100)};return this.a===1?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var r="#"+Fl(this.r,this.g,this.b,!1),t=0,n=Object.entries(Zo);t<n.length;t++){var l=n[t],a=l[0],o=l[1];if(r===o)return a}return!1},e.prototype.toString=function(r){var t=!!r;r=r!=null?r:this.format;var n=!1,l=this.a<1&&this.a>=0,a=!t&&l&&(r.startsWith("hex")||r==="name");return a?r==="name"&&this.a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l+=r/100,t.l=An(t.l),new e(t)},e.prototype.brighten=function(r){r===void 0&&(r=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),new e(t)},e.prototype.darken=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l-=r/100,t.l=An(t.l),new e(t)},e.prototype.tint=function(r){return r===void 0&&(r=10),this.mix("white",r)},e.prototype.shade=function(r){return r===void 0&&(r=10),this.mix("black",r)},e.prototype.desaturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s-=r/100,t.s=An(t.s),new e(t)},e.prototype.saturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s+=r/100,t.s=An(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(r){var t=this.toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,new e(t)},e.prototype.mix=function(r,t){t===void 0&&(t=50);var n=this.toRgb(),l=new e(r).toRgb(),a=t/100,o={r:(l.r-n.r)*a+n.r,g:(l.g-n.g)*a+n.g,b:(l.b-n.b)*a+n.b,a:(l.a-n.a)*a+n.a};return new e(o)},e.prototype.analogous=function(r,t){r===void 0&&(r=6),t===void 0&&(t=30);var n=this.toHsl(),l=360/t,a=[this];for(n.h=(n.h-(l*r>>1)+720)%360;--r;)n.h=(n.h+l)%360,a.push(new e(n));return a},e.prototype.complement=function(){var r=this.toHsl();return r.h=(r.h+180)%360,new e(r)},e.prototype.monochromatic=function(r){r===void 0&&(r=6);for(var t=this.toHsv(),n=t.h,l=t.s,a=t.v,o=[],u=1/r;r--;)o.push(new e({h:n,s:l,v:a})),a=(a+u)%1;return o},e.prototype.splitcomplement=function(){var r=this.toHsl(),t=r.h;return[this,new e({h:(t+72)%360,s:r.s,l:r.l}),new e({h:(t+216)%360,s:r.s,l:r.l})]},e.prototype.onBackground=function(r){var t=this.toRgb(),n=new e(r).toRgb(),l=t.a+n.a*(1-t.a);return new e({r:(t.r*t.a+n.r*n.a*(1-t.a))/l,g:(t.g*t.a+n.g*n.a*(1-t.a))/l,b:(t.b*t.a+n.b*n.a*(1-t.a))/l,a:l})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(r){for(var t=this.toHsl(),n=t.h,l=[this],a=360/r,o=1;o<r;o++)l.push(new e({h:(n+o*a)%360,s:t.s,l:t.l}));return l},e.prototype.equals=function(r){return this.toRgbString()===new e(r).toRgbString()},e}();function Dt(e,r=20){return e.mix("#141414",r).toString()}function Jv(e){const r=F0(),t=Br("button");return P.computed(()=>{let n={},l=e.color;if(l){const a=l.match(/var\((.*?)\)/);a&&(l=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const o=new Zv(l),u=e.dark?o.tint(20).toString():Dt(o,20);if(e.plain)n=t.cssVarBlock({"bg-color":e.dark?Dt(o,90):o.tint(90).toString(),"text-color":l,"border-color":e.dark?Dt(o,50):o.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":l,"hover-border-color":l,"active-bg-color":u,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":u}),r.value&&(n[t.cssVarBlockName("disabled-bg-color")]=e.dark?Dt(o,90):o.tint(90).toString(),n[t.cssVarBlockName("disabled-text-color")]=e.dark?Dt(o,50):o.tint(50).toString(),n[t.cssVarBlockName("disabled-border-color")]=e.dark?Dt(o,80):o.tint(80).toString());else{const d=e.dark?Dt(o,30):o.tint(30).toString(),s=o.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(n=t.cssVarBlock({"bg-color":l,"text-color":s,"border-color":l,"hover-bg-color":d,"hover-text-color":s,"hover-border-color":d,"active-bg-color":u,"active-border-color":u}),r.value){const i=e.dark?Dt(o,50):o.tint(50).toString();n[t.cssVarBlockName("disabled-bg-color")]=i,n[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,n[t.cssVarBlockName("disabled-border-color")]=i}}}return n})}const ey=P.defineComponent({name:"ElButton"}),ty=P.defineComponent(we(he({},ey),{props:Xo,emits:Uv,setup(e,{expose:r,emit:t}){const n=e,l=Jv(n),a=Br("button"),{_ref:o,_size:u,_type:d,_disabled:s,_props:i,_plain:p,_round:c,_text:f,shouldAddSpace:h,handleClick:v}=Nv(n,t),m=P.computed(()=>[a.b(),a.m(d.value),a.m(u.value),a.is("disabled",s.value),a.is("loading",n.loading),a.is("plain",p.value),a.is("round",c.value),a.is("circle",n.circle),a.is("text",f.value),a.is("link",n.link),a.is("has-bg",n.bg)]);return r({ref:o,size:u,type:d,disabled:s,shouldAddSpace:h}),(g,b)=>(P.openBlock(),P.createBlock(P.resolveDynamicComponent(g.tag),P.mergeProps({ref_key:"_ref",ref:o},P.unref(i),{class:P.unref(m),style:P.unref(l),onClick:P.unref(v)}),{default:P.withCtx(()=>[g.loading?(P.openBlock(),P.createElementBlock(P.Fragment,{key:0},[g.$slots.loading?P.renderSlot(g.$slots,"loading",{key:0}):(P.openBlock(),P.createBlock(P.unref(Er),{key:1,class:P.normalizeClass(P.unref(a).is("loading"))},{default:P.withCtx(()=>[(P.openBlock(),P.createBlock(P.resolveDynamicComponent(g.loadingIcon)))]),_:1},8,["class"]))],64)):g.icon||g.$slots.icon?(P.openBlock(),P.createBlock(P.unref(Er),{key:1},{default:P.withCtx(()=>[g.icon?(P.openBlock(),P.createBlock(P.resolveDynamicComponent(g.icon),{key:0})):P.renderSlot(g.$slots,"icon",{key:1})]),_:3})):P.createCommentVNode("v-if",!0),g.$slots.default?(P.openBlock(),P.createElementBlock("span",{key:2,class:P.normalizeClass({[P.unref(a).em("text","expand")]:P.unref(h)})},[P.renderSlot(g.$slots,"default")],2)):P.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}}));var ry=kr(ty,[["__file","button.vue"]]);const ny={size:Xo.size,type:Xo.type,direction:{type:Me(String),values:["horizontal","vertical"],default:"horizontal"}},iy=P.defineComponent({name:"ElButtonGroup"}),oy=P.defineComponent(we(he({},iy),{props:ny,setup(e){const r=e;P.provide(D0,P.reactive({size:P.toRef(r,"size"),type:P.toRef(r,"type")}));const t=Br("button");return(n,l)=>(P.openBlock(),P.createElementBlock("div",{class:P.normalizeClass([P.unref(t).b("group"),P.unref(t).bm("group",r.direction)])},[P.renderSlot(n.$slots,"default")],2))}}));var O0=kr(oy,[["__file","button-group.vue"]]);const ay=ba(ry,{ButtonGroup:O0});cv(O0);var P0={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(xe,function(){var t=1e3,n=6e4,l=36e5,a="millisecond",o="second",u="minute",d="hour",s="day",i="week",p="month",c="quarter",f="year",h="date",v="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var z=["th","st","nd","rd"],W=I%100;return"["+I+(z[(W-20)%10]||z[W]||z[0])+"]"}},y=function(I,z,W){var G=String(I);return!G||G.length>=z?I:""+Array(z+1-G.length).join(W)+I},_={s:y,z:function(I){var z=-I.utcOffset(),W=Math.abs(z),G=Math.floor(W/60),q=W%60;return(z<=0?"+":"-")+y(G,2,"0")+":"+y(q,2,"0")},m:function I(z,W){if(z.date()<W.date())return-I(W,z);var G=12*(W.year()-z.year())+(W.month()-z.month()),q=z.clone().add(G,p),N=W-q<0,V=z.clone().add(G+(N?-1:1),p);return+(-(G+(W-q)/(N?q-V:V-q))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:p,y:f,w:i,d:s,D:h,h:d,m:u,s:o,ms:a,Q:c}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},T="en",B={};B[T]=b;var F="$isDayjsObject",R=function(I){return I instanceof A||!(!I||!I[F])},Z=function I(z,W,G){var q;if(!z)return T;if(typeof z=="string"){var N=z.toLowerCase();B[N]&&(q=N),W&&(B[N]=W,q=N);var V=z.split("-");if(!q&&V.length>1)return I(V[0])}else{var L=z.name;B[L]=z,q=L}return!G&&q&&(T=q),q||!G&&T},j=function(I,z){if(R(I))return I.clone();var W=typeof z=="object"?z:{};return W.date=I,W.args=arguments,new A(W)},E=_;E.l=Z,E.i=R,E.w=function(I,z){return j(I,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var A=function(){function I(W){this.$L=Z(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[F]=!0}var z=I.prototype;return z.parse=function(W){this.$d=function(G){var q=G.date,N=G.utc;if(q===null)return new Date(NaN);if(E.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var V=q.match(m);if(V){var L=V[2]-1||0,O=(V[7]||"0").substring(0,3);return N?new Date(Date.UTC(V[1],L,V[3]||1,V[4]||0,V[5]||0,V[6]||0,O)):new Date(V[1],L,V[3]||1,V[4]||0,V[5]||0,V[6]||0,O)}}return new Date(q)}(W),this.init()},z.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},z.$utils=function(){return E},z.isValid=function(){return this.$d.toString()!==v},z.isSame=function(W,G){var q=j(W);return this.startOf(G)<=q&&q<=this.endOf(G)},z.isAfter=function(W,G){return j(W)<this.startOf(G)},z.isBefore=function(W,G){return this.endOf(G)<j(W)},z.$g=function(W,G,q){return E.u(W)?this[G]:this.set(q,W)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(W,G){var q=this,N=!!E.u(G)||G,V=E.p(W),L=function(x,w){var D=E.w(q.$u?Date.UTC(q.$y,w,x):new Date(q.$y,w,x),q);return N?D:D.endOf(s)},O=function(x,w){return E.w(q.toDate()[x].apply(q.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(w)),q)},K=this.$W,H=this.$M,J=this.$D,ne="set"+(this.$u?"UTC":"");switch(V){case f:return N?L(1,0):L(31,11);case p:return N?L(1,H):L(0,H+1);case i:var ie=this.$locale().weekStart||0,te=(K<ie?K+7:K)-ie;return L(N?J-te:J+(6-te),H);case s:case h:return O(ne+"Hours",0);case d:return O(ne+"Minutes",1);case u:return O(ne+"Seconds",2);case o:return O(ne+"Milliseconds",3);default:return this.clone()}},z.endOf=function(W){return this.startOf(W,!1)},z.$set=function(W,G){var q,N=E.p(W),V="set"+(this.$u?"UTC":""),L=(q={},q[s]=V+"Date",q[h]=V+"Date",q[p]=V+"Month",q[f]=V+"FullYear",q[d]=V+"Hours",q[u]=V+"Minutes",q[o]=V+"Seconds",q[a]=V+"Milliseconds",q)[N],O=N===s?this.$D+(G-this.$W):G;if(N===p||N===f){var K=this.clone().set(h,1);K.$d[L](O),K.init(),this.$d=K.set(h,Math.min(this.$D,K.daysInMonth())).$d}else L&&this.$d[L](O);return this.init(),this},z.set=function(W,G){return this.clone().$set(W,G)},z.get=function(W){return this[E.p(W)]()},z.add=function(W,G){var q,N=this;W=Number(W);var V=E.p(G),L=function(H){var J=j(N);return E.w(J.date(J.date()+Math.round(H*W)),N)};if(V===p)return this.set(p,this.$M+W);if(V===f)return this.set(f,this.$y+W);if(V===s)return L(1);if(V===i)return L(7);var O=(q={},q[u]=n,q[d]=l,q[o]=t,q)[V]||1,K=this.$d.getTime()+W*O;return E.w(K,this)},z.subtract=function(W,G){return this.add(-1*W,G)},z.format=function(W){var G=this,q=this.$locale();if(!this.isValid())return q.invalidDate||v;var N=W||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),L=this.$H,O=this.$m,K=this.$M,H=q.weekdays,J=q.months,ne=q.meridiem,ie=function(w,D,Q,ee){return w&&(w[D]||w(G,N))||Q[D].slice(0,ee)},te=function(w){return E.s(L%12||12,w,"0")},x=ne||function(w,D,Q){var ee=w<12?"AM":"PM";return Q?ee.toLowerCase():ee};return N.replace(g,function(w,D){return D||function(Q){switch(Q){case"YY":return String(G.$y).slice(-2);case"YYYY":return E.s(G.$y,4,"0");case"M":return K+1;case"MM":return E.s(K+1,2,"0");case"MMM":return ie(q.monthsShort,K,J,3);case"MMMM":return ie(J,K);case"D":return G.$D;case"DD":return E.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return ie(q.weekdaysMin,G.$W,H,2);case"ddd":return ie(q.weekdaysShort,G.$W,H,3);case"dddd":return H[G.$W];case"H":return String(L);case"HH":return E.s(L,2,"0");case"h":return te(1);case"hh":return te(2);case"a":return x(L,O,!0);case"A":return x(L,O,!1);case"m":return String(O);case"mm":return E.s(O,2,"0");case"s":return String(G.$s);case"ss":return E.s(G.$s,2,"0");case"SSS":return E.s(G.$ms,3,"0");case"Z":return V}return null}(w)||V.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(W,G,q){var N,V=this,L=E.p(G),O=j(W),K=(O.utcOffset()-this.utcOffset())*n,H=this-O,J=function(){return E.m(V,O)};switch(L){case f:N=J()/12;break;case p:N=J();break;case c:N=J()/3;break;case i:N=(H-K)/6048e5;break;case s:N=(H-K)/864e5;break;case d:N=H/l;break;case u:N=H/n;break;case o:N=H/t;break;default:N=H}return q?N:E.a(N)},z.daysInMonth=function(){return this.endOf(p).$D},z.$locale=function(){return B[this.$L]},z.locale=function(W,G){if(!W)return this.$L;var q=this.clone(),N=Z(W,G,!0);return N&&(q.$L=N),q},z.clone=function(){return E.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},I}(),C=A.prototype;return j.prototype=C,[["$ms",a],["$s",o],["$m",u],["$H",d],["$W",s],["$M",p],["$y",f],["$D",h]].forEach(function(I){C[I[1]]=function(z){return this.$g(z,I[0],I[1])}}),j.extend=function(I,z){return I.$i||(I(z,A,j),I.$i=!0),j},j.locale=Z,j.isDayjs=R,j.unix=function(I){return j(1e3*I)},j.en=B[T],j.Ls=B,j.p={},j})})(P0);var sy=P0.exports;const ly=ea(sy),uy=or(he({a11y:{type:Boolean,default:!0},locale:{type:Me(Object)},size:w0,button:{type:Me(Object)},card:{type:Me(Object)},dialog:{type:Me(Object)},link:{type:Me(Object)},experimentalFeatures:{type:Me(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Me(Object)},zIndex:Number,namespace:{type:String,default:"el"}},sv)),We={placement:"top"};P.defineComponent({name:"ElConfigProvider",props:uy,setup(e,{slots:r}){const t=A0(e);return P.watch(()=>e.message,n=>{var l,a;Object.assign(We,(a=(l=t==null?void 0:t.value)==null?void 0:l.message)!=null?a:{},n!=null?n:{})},{immediate:!0,deep:!0}),()=>P.renderSlot(r,"default",{config:t==null?void 0:t.value})}});const N0=["primary","success","info","warning","error"],M0=["top","top-left","top-right","bottom","bottom-left","bottom-right"],yr="top",Ve=Sv({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:Lt?document.body:void 0}),cy=or({customClass:{type:String,default:Ve.customClass},dangerouslyUseHTMLString:{type:Boolean,default:Ve.dangerouslyUseHTMLString},duration:{type:Number,default:Ve.duration},icon:{type:Hr,default:Ve.icon},id:{type:String,default:Ve.id},message:{type:Me([String,Object,Function]),default:Ve.message},onClose:{type:Me(Function),default:Ve.onClose},showClose:{type:Boolean,default:Ve.showClose},type:{type:String,values:N0,default:Ve.type},plain:{type:Boolean,default:Ve.plain},offset:{type:Number,default:Ve.offset},placement:{type:String,values:M0,default:Ve.placement},zIndex:{type:Number,default:Ve.zIndex},grouping:{type:Boolean,default:Ve.grouping},repeatNum:{type:Number,default:Ve.repeatNum}}),fy={destroy:()=>!0},ht=P.shallowReactive({}),hy=e=>(ht[e]||(ht[e]=P.shallowReactive([])),ht[e]),dy=(e,r)=>{const t=ht[r]||[],n=t.findIndex(o=>o.id===e),l=t[n];let a;return n>0&&(a=t[n-1]),{current:l,prev:a}},py=(e,r)=>{const{prev:t}=dy(e,r);return t?t.vm.exposed.bottom.value:0},my=(e,r,t)=>(ht[t]||[]).findIndex(a=>a.id===e)>0?16:r,vy=P.defineComponent({name:"ElMessage"}),yy=P.defineComponent(we(he({},vy),{props:cy,emits:fy,setup(e,{expose:r,emit:t}){const n=e,{Close:l}=Av,a=P.ref(!1),{ns:o,zIndex:u}=E0("message"),{currentZIndex:d,nextZIndex:s}=u,i=P.ref(),p=P.ref(!1),c=P.ref(0);let f;const h=P.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),v=P.computed(()=>{const A=n.type;return{[o.bm("icon",A)]:A&&$n[A]}}),m=P.computed(()=>n.icon||$n[n.type]||""),g=P.computed(()=>n.placement||yr),b=P.computed(()=>py(n.id,g.value)),y=P.computed(()=>my(n.id,n.offset,g.value)+b.value),_=P.computed(()=>c.value+y.value),T=P.computed(()=>g.value.includes("left")?o.is("left"):g.value.includes("right")?o.is("right"):o.is("center")),B=P.computed(()=>g.value.startsWith("top")?"top":"bottom"),F=P.computed(()=>({[B.value]:`${y.value}px`,zIndex:d.value}));function R(){n.duration!==0&&({stop:f}=h0(()=>{j()},n.duration))}function Z(){f==null||f()}function j(){p.value=!1,P.nextTick(()=>{var A;a.value||((A=n.onClose)==null||A.call(n),t("destroy"))})}function E(A){I0(A)===vr.esc&&j()}return P.onMounted(()=>{R(),s(),p.value=!0}),P.watch(()=>n.repeatNum,()=>{Z(),R()}),m0(document,"keydown",E),Hm(i,()=>{c.value=i.value.getBoundingClientRect().height}),r({visible:p,bottom:_,close:j}),(A,C)=>(P.openBlock(),P.createBlock(P.Transition,{name:P.unref(o).b("fade"),onBeforeEnter:I=>a.value=!0,onBeforeLeave:A.onClose,onAfterLeave:I=>A.$emit("destroy"),persisted:""},{default:P.withCtx(()=>[P.withDirectives(P.createElementVNode("div",{id:A.id,ref_key:"messageRef",ref:i,class:P.normalizeClass([P.unref(o).b(),{[P.unref(o).m(A.type)]:A.type},P.unref(o).is("closable",A.showClose),P.unref(o).is("plain",A.plain),P.unref(o).is("bottom",P.unref(B)==="bottom"),P.unref(T),A.customClass]),style:P.normalizeStyle(P.unref(F)),role:"alert",onMouseenter:Z,onMouseleave:R},[A.repeatNum>1?(P.openBlock(),P.createBlock(P.unref(Ov),{key:0,value:A.repeatNum,type:P.unref(h),class:P.normalizeClass(P.unref(o).e("badge"))},null,8,["value","type","class"])):P.createCommentVNode("v-if",!0),P.unref(m)?(P.openBlock(),P.createBlock(P.unref(Er),{key:1,class:P.normalizeClass([P.unref(o).e("icon"),P.unref(v)])},{default:P.withCtx(()=>[(P.openBlock(),P.createBlock(P.resolveDynamicComponent(P.unref(m))))]),_:1},8,["class"])):P.createCommentVNode("v-if",!0),P.renderSlot(A.$slots,"default",{},()=>[A.dangerouslyUseHTMLString?(P.openBlock(),P.createElementBlock(P.Fragment,{key:1},[P.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),P.createElementVNode("p",{class:P.normalizeClass(P.unref(o).e("content")),innerHTML:A.message},null,10,["innerHTML"])],2112)):(P.openBlock(),P.createElementBlock("p",{key:0,class:P.normalizeClass(P.unref(o).e("content"))},P.toDisplayString(A.message),3))]),A.showClose?(P.openBlock(),P.createBlock(P.unref(Er),{key:2,class:P.normalizeClass(P.unref(o).e("closeBtn")),onClick:P.withModifiers(j,["stop"])},{default:P.withCtx(()=>[P.createVNode(P.unref(l))]),_:1},8,["class","onClick"])):P.createCommentVNode("v-if",!0)],46,["id"]),[[P.vShow,p.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}}));var gy=kr(yy,[["__file","message.vue"]]);let xy=1;const by=e=>{if(!e.appendTo)e.appendTo=document.body;else if(Bt(e.appendTo)){let t=document.querySelector(e.appendTo);Qo(t)||(ir("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},wy=e=>{!e.placement&&Bt(We.placement)&&We.placement&&(e.placement=We.placement),e.placement||(e.placement=yr),M0.includes(e.placement)||(ir("ElMessage",`Invalid placement: ${e.placement}. Falling back to '${yr}'.`),e.placement=yr)},L0=e=>{const r=!e||Bt(e)||P.isVNode(e)||jr(e)?{message:e}:e,t=he(he({},Ve),r);return by(t),wy(t),Io(We.grouping)&&!t.grouping&&(t.grouping=We.grouping),Zt(We.duration)&&t.duration===3e3&&(t.duration=We.duration),Zt(We.offset)&&t.offset===16&&(t.offset=We.offset),Io(We.showClose)&&!t.showClose&&(t.showClose=We.showClose),Io(We.plain)&&!t.plain&&(t.plain=We.plain),t},_y=e=>{const r=e.props.placement||yr,t=ht[r],n=t.indexOf(e);if(n===-1)return;t.splice(n,1);const{handler:l}=e;l.close()},Ey=(n,t)=>{var l=n,{appendTo:e}=l,r=Fa(l,["appendTo"]);const a=`message_${xy++}`,o=r.onClose,u=document.createElement("div"),d=we(he({},r),{id:a,onClose:()=>{o==null||o(),_y(c)},onDestroy:()=>{P.render(null,u)}}),s=P.createVNode(gy,d,jr(d.message)||P.isVNode(d.message)?{default:jr(d.message)?d.message:()=>d.message}:null);s.appContext=t||Jt._context,P.render(s,u),e.appendChild(u.firstElementChild);const i=s.component,c={id:a,vnode:s,vm:i,handler:{close:()=>{i.exposed.close()}},props:s.component.props};return c},Jt=(e={},r)=>{if(!Lt)return{close:()=>{}};const t=L0(e),n=hy(t.placement||yr);if(t.grouping&&n.length){const a=n.find(({vnode:o})=>{var u;return((u=o.props)==null?void 0:u.message)===t.message});if(a)return a.props.repeatNum+=1,a.props.type=t.type,a.handler}if(Zt(We.max)&&n.length>=We.max)return{close:()=>{}};const l=Ey(t,r);return n.push(l),l.handler};N0.forEach(e=>{Jt[e]=(r={},t)=>{const n=L0(r);return Jt(we(he({},n),{type:e}),t)}});function Ay(e){for(const r in ht)if(Go(ht,r)){const t=[...ht[r]];for(const n of t)(!e||e===n.props.type)&&n.handler.close()}}function Cy(e){if(!ht[e])return;[...ht[e]].forEach(t=>t.handler.close())}Jt.closeAll=Ay;Jt.closeAllByPlacement=Cy;Jt._context=null;const st=C0(Jt,"$message"),U0=["primary","success","info","warning","error"],Sy=or({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Hr},id:{type:String,default:""},message:{type:Me([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:Me(Function),default:()=>{}},onClose:{type:Me(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...U0,""],default:""},zIndex:Number,closeIcon:{type:Hr,default:S0}}),By={destroy:()=>!0},ky=P.defineComponent({name:"ElNotification"}),Ty=P.defineComponent(we(he({},ky),{props:Sy,emits:By,setup(e,{expose:r}){const t=e,{ns:n,zIndex:l}=E0("notification"),{nextZIndex:a,currentZIndex:o}=l,u=P.ref(!1);let d;const s=P.computed(()=>{const b=t.type;return b&&$n[t.type]?n.m(b):""}),i=P.computed(()=>t.type&&$n[t.type]||t.icon),p=P.computed(()=>t.position.endsWith("right")?"right":"left"),c=P.computed(()=>t.position.startsWith("top")?"top":"bottom"),f=P.computed(()=>{var b;return{[c.value]:`${t.offset}px`,zIndex:(b=t.zIndex)!=null?b:o.value}});function h(){t.duration>0&&({stop:d}=h0(()=>{u.value&&m()},t.duration))}function v(){d==null||d()}function m(){u.value=!1}function g(b){switch(I0(b)){case vr.delete:case vr.backspace:v();break;case vr.esc:u.value&&m();break;default:h();break}}return P.onMounted(()=>{h(),a(),u.value=!0}),m0(document,"keydown",g),r({visible:u,close:m}),(b,y)=>(P.openBlock(),P.createBlock(P.Transition,{name:P.unref(n).b("fade"),onBeforeLeave:b.onClose,onAfterLeave:_=>b.$emit("destroy"),persisted:""},{default:P.withCtx(()=>[P.withDirectives(P.createElementVNode("div",{id:b.id,class:P.normalizeClass([P.unref(n).b(),b.customClass,P.unref(p)]),style:P.normalizeStyle(P.unref(f)),role:"alert",onMouseenter:v,onMouseleave:h,onClick:b.onClick},[P.unref(i)?(P.openBlock(),P.createBlock(P.unref(Er),{key:0,class:P.normalizeClass([P.unref(n).e("icon"),P.unref(s)])},{default:P.withCtx(()=>[(P.openBlock(),P.createBlock(P.resolveDynamicComponent(P.unref(i))))]),_:1},8,["class"])):P.createCommentVNode("v-if",!0),P.createElementVNode("div",{class:P.normalizeClass(P.unref(n).e("group"))},[P.createElementVNode("h2",{class:P.normalizeClass(P.unref(n).e("title")),textContent:P.toDisplayString(b.title)},null,10,["textContent"]),P.withDirectives(P.createElementVNode("div",{class:P.normalizeClass(P.unref(n).e("content")),style:P.normalizeStyle(b.title?void 0:{margin:0})},[P.renderSlot(b.$slots,"default",{},()=>[b.dangerouslyUseHTMLString?(P.openBlock(),P.createElementBlock(P.Fragment,{key:1},[P.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),P.createElementVNode("p",{innerHTML:b.message},null,8,["innerHTML"])],2112)):(P.openBlock(),P.createElementBlock("p",{key:0},P.toDisplayString(b.message),1))])],6),[[P.vShow,b.message]]),b.showClose?(P.openBlock(),P.createBlock(P.unref(Er),{key:0,class:P.normalizeClass(P.unref(n).e("closeBtn")),onClick:P.withModifiers(m,["stop"])},{default:P.withCtx(()=>[(P.openBlock(),P.createBlock(P.resolveDynamicComponent(b.closeIcon)))]),_:1},8,["class","onClick"])):P.createCommentVNode("v-if",!0)],2)],46,["id","onClick"]),[[P.vShow,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}}));var Fy=kr(Ty,[["__file","notification.vue"]]);const Ar={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},zn=16;let Iy=1;const er=function(e={},r){if(!Lt)return{close:()=>{}};(Bt(e)||P.isVNode(e))&&(e={message:e});const t=e.position||"top-right";let n=e.offset||0;Ar[t].forEach(({vm:i})=>{var p;n+=(((p=i.el)==null?void 0:p.offsetHeight)||0)+zn}),n+=zn;const l=`notification_${Iy++}`,a=e.onClose,o=we(he({},e),{offset:n,id:l,onClose:()=>{Dy(l,t,a)}});let u=document.body;Qo(e.appendTo)?u=e.appendTo:Bt(e.appendTo)&&(u=document.querySelector(e.appendTo)),Qo(u)||(ir("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),u=document.body);const d=document.createElement("div"),s=P.createVNode(Fy,o,jr(o.message)?o.message:P.isVNode(o.message)?()=>o.message:null);return s.appContext=Om(r)?er._context:r,s.props.onDestroy=()=>{P.render(null,d)},P.render(s,d),Ar[t].push({vm:s}),u.appendChild(d.firstElementChild),{close:()=>{s.component.exposed.visible.value=!1}}};U0.forEach(e=>{er[e]=(r={},t)=>((Bt(r)||P.isVNode(r))&&(r={message:r}),er(we(he({},r),{type:e}),t))});function Dy(e,r,t){const n=Ar[r],l=n.findIndex(({vm:s})=>{var i;return((i=s.component)==null?void 0:i.props.id)===e});if(l===-1)return;const{vm:a}=n[l];if(!a)return;t==null||t(a);const o=a.el.offsetHeight,u=r.split("-")[0];n.splice(l,1);const d=n.length;if(!(d<1))for(let s=l;s<d;s++){const{el:i,component:p}=n[s].vm,c=Number.parseInt(i.style[u],10)-o-zn;p.props.offset=c}}function Ry(){for(const e of Object.values(Ar))e.forEach(({vm:r})=>{r.component.exposed.visible.value=!1})}function Oy(e="top-right"){var r,t,n,l;let a=((n=(t=(r=Ar[e][0])==null?void 0:r.vm.component)==null?void 0:t.props)==null?void 0:n.offset)||0;for(const{vm:o}of Ar[e])o.component.props.offset=a,a+=(((l=o.el)==null?void 0:l.offsetHeight)||0)+zn}er.closeAll=Ry;er.updateOffsets=Oy;er._context=null;const Py=C0(er,"$notify"),q0="0123456789abcdeffedcba9876543210",$0="4b0de988570c3a0f",Ny=window.ENCRYPT;let gr=Ny&&new l0;function z0(e=16,r="0123456789abcdefghijklmnopqrstuvwxyz"){let t="",n=r.length;for(;e>0;)t+=r[Math.floor(Math.random()*n)],e--;return t}function j0(){return je(this,null,function*(){return gr||(gr=new l0),new Promise((e,r)=>{gr.armEnum().then(t=>{e(+t)}).catch(t=>{st({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),r(t)})})})}jn.throttle(()=>je(exports,null,function*(){const e=yield j0(),r={};if(typeof e!="number"||e<=0)st({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),r.resetToken();else{const t=yield Ly();if(!r.token)return;t.length?t.includes(r.ukeyHid)||(st({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),r.resetToken()):(st({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),r.resetToken())}}),5e3,{trailing:!1});function My(e=0){return je(this,null,function*(){return gr?new Promise((r,t)=>{gr.armGetDongleInfo(e).then(n=>{n?r(n):(st({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),t(n))}).catch(n=>{t(n)})}):st({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function Ly(){return je(this,null,function*(){if(!gr)return st({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const e=yield j0();let r=[];for(let t=0;t<e;t++){const n=yield My(t);r.push(n)}return r})}z0(16);z0(16);const H0=window.meta.app.inspect?_r.constants.CBC:_r.constants.ECB;Em.generateKeyPair();function Dl(e,r,t={}){const n=V0($0),l=t.mode||H0;t=l===_r.constants.ECB?he({mode:l,inputEncoding:"utf8",outputEncoding:"hex"},t):he({iv:q0,mode:l,inputEncoding:"utf8",outputEncoding:"hex"},t);let a="";try{a=_r.encrypt(e,n,t)}catch(o){console.log("err: ",o)}return a}function Rl(e,r,t={}){const n=V0($0),l=t.mode||H0;return t=l===_r.constants.ECB?he({mode:l,inputEncoding:"hex",outputEncoding:"utf8"},t):he({iv:q0,mode:l,inputEncoding:"hex",outputEncoding:"utf8"},t),_r.decrypt(e,n,t)}function V0(e){return[...e].map(r=>r.charCodeAt().toString(16)).join("")}const Ol={getLocal:e=>{try{let r=window.localStorage.getItem(e);return r=r!==null?Rl(r):r,JSON.parse(r)}catch(r){console.error(r)}},setLocal:(e,r)=>{try{let t=JSON.stringify(r);t=t!==null?Dl(t):t,window.localStorage.setItem(e,t)}catch(t){console.error(t)}},eachLocal:e=>{if(!e||Ss(e)!=="Function")return console.error("传递参数非函数类型!");for(let r=0,t=window.localStorage.length;r<t;r++){const n=window.localStorage.key(r);e((void 0).getLocal(n),n)}},clearLocal:()=>{window.localStorage.clear()},removeLocal:e=>{window.localStorage.removeItem(e)},getSession:e=>{try{let r=window.sessionStorage.getItem(e);return r=r!==null?Rl(r):r,JSON.parse(r)}catch(r){console.error(r)}},setSession:(e,r)=>{try{let t=JSON.stringify(r);t=t!==null?Dl(t):t,window.sessionStorage.setItem(e,t)}catch(t){console.error(t)}},eachSession:e=>{if(!e||Ss(e)!=="Function")return console.error("传递参数非函数类型!");for(let r=0,t=window.sessionStorage.length;r<t;r++){const n=window.sessionStorage.key(r);e((void 0).getSession(n),n)}},clearSession:()=>{window.sessionStorage.clear()},removeSession:e=>{window.sessionStorage.removeItem(e)}},Pl=e=>{const{quality:r,value:t,function_id:n}=e;return(r>>7&1)===1||r===0&&n===2&&t===1},Nl="USER_TOKEN",Ml="STATION_ID",Uy=[{key:0,value:"离线"},{key:1,value:"在线"}],qy=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],$y=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],zy="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e",Rt=window.meta.graph.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},W0=window.meta.graph.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200",1:"#e2ac06",2:"#fa800a",3:"#f04155",4:"#ff0000"},K0=window.meta.graph.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff",1:"#fff",2:"#fff",3:"#fff",4:"#fff"},Re={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:Uy.map(e=>({label:e.value,value:e.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:qy.map(e=>({label:e.value,value:e.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:$y.map(e=>({label:e.value,value:e.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},ye=we(he({penType:Se.NORMAL},Re),{form:[...Rt[Se.NORMAL],...Re.form]});St.YX,St.YX,St.YX,Se.POINT_VALUE,Re.anchors,window.visibleLevel,Re.form,Re.form,window.dataType,window.dataProp,window.visibleLevel,Re.form,window.dataType,window.dataProp,window.visibleLevel,Re.form,window.dataType,window.dataProp,window.visibleLevel,K0[0],Se.LIGHT_PLATE,W0[0],Re.anchors,window.visibleLevel,[...Rt[Se.LIGHT_PLATE],...Re.form],Rn+"",Se.SENSOR,Re.anchors,window.visibleLevel,[...Rt[Se.LIGHT_PLATE],...Re.form],we(he({width:100,height:30,name:"text",text:"文本",disableAnchor:!0,penType:Se.TEXT},Re),{form:[...Rt[Se.TEXT],...Re.form]}),he({width:100,height:100,name:"square"},ye),we(he({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},ye),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),he({width:200,height:50,borderRadius:0,name:"rectangle"},ye),he({width:100,height:100,name:"circle"},ye),he({width:100,height:100,name:"triangle"},ye),he({width:100,height:100,name:"diamond"},ye),he({width:100,height:100,name:"pentagon"},ye),he({width:100,height:100,name:"hexagon"},ye),he({width:100,height:100,name:"pentagram"},ye),he({width:120,height:60,name:"leftArrow"},ye),he({width:120,height:60,name:"rightArrow"},ye),he({width:150,height:60,name:"twowayArrow"},ye),he({width:100,height:100,name:"cloud"},ye),he({textTop:-.1,width:100,height:100,name:"message"},ye),he({width:80,height:100,name:"file"},ye),we(he({width:60,height:100,name:"cube",z:.25},ye),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),he({width:70,height:100,name:"people"},ye),we(he({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},ye),{penType:Se.BUTTON}),we(he({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},ye),{penType:Se.INPUT}),we(he({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},ye),{penType:Se.SELECT}),we(he({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,fontSize:20,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},ye),{penType:Se.SLIDER}),we(he({name:"time",penName:"时间",width:300,height:40,text:`${ly().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,fontSize:20,interval:67,fillZero:!0},ye),{penType:Se.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...ye.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),we(he({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},ye),{penType:Se.SWITCH}),we(he({name:"radio",penName:"单选框",direction:"horizontal",width:150,height:30,checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},ye),{penType:Se.RADIO}),we(he({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},ye),{penType:Se.CHECKBOX}),we(he({name:"table2",width:80,height:30,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,hasHeader:!0,color:"#333",textColor:"#444"},ye),{penType:Se.TABLE,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),we(he({name:"table2",width:80,height:30,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!0,hasHeader:!0,color:"#333",textColor:"#444"},ye),{penType:Se.TABLE,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),we(he({name:"table2",width:80,height:30,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,swiper:!0,maxNum:5,hasHeader:!0,color:"#333",textColor:"#444"},ye),{penType:Se.TABLE,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}],["5","智能家居","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),we(he({name:"svg",width:100,height:100,image:Rn+"/icon/audio.svg",audioId:"",penType:Se.AUDIO},Re),{form:[...Rt[Se.AUDIO],...Re.form],events:[{name:"enter",action:vn.Emit,value:nt.OPEN_AUDIO,where:{type:""},params:JSON.stringify({action:nt.OPEN_AUDIO,data:""})},{name:"leave",action:vn.Emit,value:nt.CLOSE_AUDIO,where:{type:""},params:JSON.stringify({action:nt.CLOSE_AUDIO,data:""})}]}),we(he({name:"svg",width:100,height:100,image:Rn+"/icon/camera.svg",cameraId:"",events:[{name:"enter",action:vn.Emit,value:nt.OPEN_CAMERA,where:{type:""},params:JSON.stringify({action:nt.OPEN_CAMERA,data:""})},{name:"leave",action:vn.Emit,value:nt.CLOSE_CAMERA,where:{type:""},params:JSON.stringify({action:nt.CLOSE_CAMERA,data:""})}],penType:Se.CAMERA},Re),{form:[...Rt[Se.CAMERA],...Re.form]}),we(he({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:Se.MP4},Re),{form:[...Rt[Se.MP4],...Re.form]}),we(he({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:Se.VIDEO_STREAM},Re),{form:[...Rt[Se.VIDEO_STREAM],...Re.form]}),he({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle"},ye),he({text:"流程",width:120,height:40,name:"rectangle"},ye),he({text:"判定",width:120,height:60,name:"diamond"},ye),he({text:"数据",width:120,height:50,name:"flowData",offsetX:.14},ye),he({text:"准备",width:120,height:50,name:"hexagon"},ye),he({text:"子流程",width:120,height:50,name:"flowSubprocess"},ye),he({text:"数据库",width:80,height:120,name:"flowDb"},ye),he({text:"文档",width:120,height:100,name:"flowDocument"},ye),he({text:"内部存储",width:120,height:80,name:"flowInternalStorage"},ye),he({text:"外部存储",width:120,height:80,name:"flowExternStorage"},ye),he({text:"队列",width:100,height:100,name:"flowQueue"},ye),he({text:"手动输入",width:120,height:80,name:"flowManually"},ye),he({text:"展示",width:120,height:80,name:"flowDisplay"},ye),he({text:"并行模式",width:120,height:50,name:"flowParallel"},ye),he({text:"注释",width:100,height:100,name:"flowComment"},ye),he({text:"",width:30,height:30,name:"circle",background:"#555",lineWidth:0},ye),he({width:30,height:30,name:"activityFinal"},ye),he({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle"},ye),he({text:"决策/合并",width:120,height:50,name:"diamond"},ye),he({text:"垂直泳道",width:200,height:500,name:"swimlaneV",textBaseline:"top",textTop:20,lineTop:.08},ye),he({text:"水平泳道",width:500,height:200,name:"swimlaneH",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},ye),he({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",fillStyle:"#555",strokeStyle:"transparent"},ye),he({text:"水平分岔/汇合",width:150,height:10,name:"forkH",fillStyle:"#555",strokeStyle:"transparent"},ye),he({name:"andGate",width:100,height:150},ye),he({name:"basicEvent",width:100,height:150},ye),he({name:"unexpandedEvent",width:100,height:150},ye),he({name:"priorityAndGate",width:100,height:150},ye),he({name:"forbiddenGate",width:100,height:150},ye),he({name:"event",width:100,height:150},ye),he({name:"switchEvent",width:100,height:150},ye),he({name:"conditionalEvent",width:150,height:100},ye),he({name:"transferSymbol",width:100,height:150},ye),he({name:"orGate",width:100,height:150},ye),he({name:"xorGate",width:100,height:150},ye),he({name:"votingGate",width:100,height:150},ye);const jy=(e,r={isDev:!1,devServerUrl:"",devServerPort:8443})=>e.replace(/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,`$1${r.isDev?r.devServerUrl:c1}:${r.isDev?r.devServerPort:h1}`);class Hy{constructor(r){It(this,"editor");this.editor=r}initPlugin(r,t,n={}){r.installPenPlugins({name:t},[{plugin:kc.mindBoxPlugin,options:n},{plugin:Tc.collapseChildPlugin,options:n}])}}var Ll;(function(e){e[e.Node=0]="Node",e[e.Line=1]="Line"})(Ll||(Ll={}));var Ul;(function(e){e[e.None=0]="None",e[e.DisableEdit=1]="DisableEdit",e[e.DisableMove=2]="DisableMove",e[e.DisableScale=3]="DisableScale",e[e.DisableMoveScale=4]="DisableMoveScale",e[e.Disable=10]="Disable"})(Ul||(Ul={}));var ql;(function(e){e[e.Default=0]="Default",e[e.In=1]="In",e[e.Out=2]="Out"})(ql||(ql={}));var $l;(function(e){e[e.None=0]="None",e[e.Linear=1]="Linear",e[e.Radial=2]="Radial"})($l||($l={}));var zl;(function(e){e[e.CanvasTemplate=1]="CanvasTemplate",e[e.CanvasImageBottom=2]="CanvasImageBottom",e[e.CanvasMain=3]="CanvasMain",e[e.CanvasImage=4]="CanvasImage"})(zl||(zl={}));var jl;(function(e){e[e.Normal=0]="Normal",e[e.Beads=1]="Beads",e[e.Dot=2]="Dot",e[e.Arrow=3]="Arrow",e[e.WaterDrop=4]="WaterDrop",e[e.Custom=5]="Custom"})(jl||(jl={}));var Hl;(function(e){e[e.Image=0]="Image",e[e.Icon=1]="Icon",e[e.Pen=2]="Pen",e[e.Element=3]="Element"})(Hl||(Hl={}));var Vl;(function(e){e[e.None=0]="None",e[e.LineAnchor=1]="LineAnchor",e[e.NodeAnchor=2]="NodeAnchor",e[e.Line=3]="Line",e[e.Node=4]="Node",e[e.Resize=5]="Resize",e[e.Rotate=6]="Rotate",e[e.LineAnchorPrev=7]="LineAnchorPrev",e[e.LineAnchorNext=8]="LineAnchorNext"})(Vl||(Vl={}));var Wl;(function(e){e[e.None=0]="None",e[e.Translate=1]="Translate",e[e.Select=2]="Select",e[e.Resize=3]="Resize",e[e.AddAnchor=4]="AddAnchor"})(Wl||(Wl={}));var Kl;(function(e){e[e.None=0]="None",e[e.Down=1]="Down",e[e.Translate=2]="Translate"})(Kl||(Kl={}));var Gl;(function(e){e[e.None=-1]="None",e[e.Up=0]="Up",e[e.Right=1]="Right",e[e.Bottom=2]="Bottom",e[e.Left=3]="Left"})(Gl||(Gl={}));var Ql;(function(e){e[e.Mirror=0]="Mirror",e[e.Bilateral=1]="Bilateral",e[e.Free=2]="Free"})(Ql||(Ql={}));var Yl;(function(e){e[e.Default=0]="Default",e[e.In=1]="In",e[e.Out=2]="Out",e[e.DisableConnected=3]="DisableConnected",e[e.DisableConnectTo=4]="DisableConnectTo",e[e.Disable=10]="Disable"})(Yl||(Yl={}));var Xl;(function(e){e[e.Default=0]="Default",e[e.Line=1]="Line"})(Xl||(Xl={}));var Jo;(function(e){e[e.None=-1]="None",e[e.Document=0]="Document",e[e.Canvas=1]="Canvas"})(Jo||(Jo={}));Jo.Document;var Zl;(function(e){e[e.Add=0]="Add",e[e.Update=1]="Update",e[e.Delete=2]="Delete",e[e.Replace=3]="Replace"})(Zl||(Zl={}));function Jl(e){const r=parseInt,t=Math.round;let n=e.length,l={};if(n>9){const[a,o,u,d]=e=e.split(",");if(n=e.length,n<3||n>4)return null;l.r=r(a[3]=="a"?a.slice(5):a.slice(4)),l.g=r(o),l.b=r(u),l.a=d?parseFloat(d):-1}else{if(n==8||n==6||n<4)return null;n<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(n>4?e[4]+e[4]:"")),e=r(e.slice(1),16),n==9||n==5?(l.r=e>>24&255,l.g=e>>16&255,l.b=e>>8&255,l.a=t((e&255)/.255)/1e3):(l.r=e>>16,l.g=e>>8&255,l.b=e&255,l.a=-1)}return l}function Vy(e,r,t,n){let l,a,o,u,d,s,i,p=Math.round,c=typeof t=="string";return typeof e!="number"||e<-1||e>1||typeof r!="string"||r[0]!="r"&&r[0]!="#"||t&&!c||(i=r.length>9,i=c?t.length>9?!0:t=="c"?!i:!1:i,d=Jl(r),u=e<0,s=t&&t!="c"?Jl(t):u?{r:0,g:0,b:0,a:-1}:{r:255,g:255,b:255,a:-1},e=u?e*-1:e,u=1-e,!d||!s)?null:(n?(l=p(u*d.r+e*s.r),a=p(u*d.g+e*s.g),o=p(u*d.b+e*s.b)):(l=p(mt(u*mt(d.r,2)+e*mt(s.r,2),.5)),a=p(mt(u*mt(d.g,2)+e*mt(s.g,2),.5)),o=p(mt(u*mt(d.b,2)+e*mt(s.b,2),.5))),c=d.a,s=s.a,d=c>=0||s>=0,c=d?c<0?s:s<0?c:c*u+s*e:0,i?"rgb"+(d?"a(":"(")+l+","+a+","+o+(d?","+p(c*1e3)/1e3:"")+")":"#"+(4294967296+l*16777216+a*65536+o*256+(d?p(c*255):0)).toString(16).slice(1,d?void 0:-2))}globalThis.pSBC=Vy;var eu;(function(e){e[e.None=0]="None",e[e.LocalStorage=1]="LocalStorage",e[e.Cookie=2]="Cookie"})(eu||(eu={}));location.host.indexOf("le5le.com");const fr={};var tu;(function(e){e[e.Link=0]="Link",e[e.SetProps=1]="SetProps",e[e.StartAnimate=2]="StartAnimate",e[e.PauseAnimate=3]="PauseAnimate",e[e.StopAnimate=4]="StopAnimate",e[e.JS=5]="JS",e[e.GlobalFn=6]="GlobalFn",e[e.Emit=7]="Emit",e[e.StartVideo=8]="StartVideo",e[e.PauseVideo=9]="PauseVideo",e[e.StopVideo=10]="StopVideo",e[e.SendPropData=11]="SendPropData",e[e.SendVarData=12]="SendVarData",e[e.Navigator=13]="Navigator",e[e.Dialog=14]="Dialog",e[e.SendData=15]="SendData",e[e.PostMessage=16]="PostMessage",e[e.PostMessageToParent=17]="PostMessageToParent",e[e.Message=18]="Message"})(tu||(tu={}));var Wy={exports:{}};(function(e,r){(function(t){e.exports=t()})(function(){return function(){return function t(n,l,a){function o(s,i){if(!l[s]){if(!n[s]){var p=typeof Or=="function"&&Or;if(!i&&p)return p(s,!0);if(u)return u(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=l[s]={exports:{}};n[s][0].call(f.exports,function(h){return o(n[s][1][h]||h)},f,f.exports,t,n,l,a)}return l[s].exports}for(var u=typeof Or=="function"&&Or,d=0;d<a.length;d++)o(a[d]);return o}}()({1:[function(t,n,l){(function(a,o){(function(){const u=t("events").EventEmitter,d=t("./store"),s=t("./topic-alias-recv"),i=t("./topic-alias-send"),p=t("mqtt-packet"),c=t("./default-message-id-provider"),f=t("readable-stream").Writable,h=t("inherits"),v=t("reinterval"),m=t("rfdc/default"),g=t("./validations"),b=t("xtend"),y=t("debug")("mqttjs:client"),_=a?a.nextTick:function(C){setTimeout(C,0)},T=o.setImmediate||function(C){_(C)},B={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},F={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function R(C,I){let z;I.properties&&(z=I.properties.topicAlias);let W=I.topic.toString();if(W.length===0){if(z===void 0)return new Error("Unregistered Topic Alias");if((W=C.topicAliasSend.getTopicByAlias(z))===void 0)return new Error("Unregistered Topic Alias");I.topic=W}z&&delete I.properties.topicAlias}function Z(C,I,z){y("sendPacket :: packet: %O",I),y("sendPacket :: emitting `packetsend`"),C.emit("packetsend",I),y("sendPacket :: writing to stream");const W=p.writeToStream(I,C.stream,C.options);y("sendPacket :: writeToStream result %s",W),!W&&z&&z!==E?(y("sendPacket :: handle events on `drain` once through callback."),C.stream.once("drain",z)):z&&(y("sendPacket :: invoking cb"),z())}function j(C,I,z,W){y("storeAndSend :: store packet with cmd %s to outgoingStore",I.cmd);let G,q=I;if(q.cmd==="publish"&&(q=m(I),G=R(C,q)))return z&&z(G);C.outgoingStore.put(q,function(N){if(N)return z&&z(N);W(),Z(C,I,z)})}function E(C){y("nop ::",C)}function A(C,I){let z;const W=this;if(!(this instanceof A))return new A(C,I);for(z in this.options=I||{},B)this.options[z]===void 0?this.options[z]=B[z]:this.options[z]=I[z];y("MqttClient :: options.protocol",I.protocol),y("MqttClient :: options.protocolVersion",I.protocolVersion),y("MqttClient :: options.username",I.username),y("MqttClient :: options.keepalive",I.keepalive),y("MqttClient :: options.reconnectPeriod",I.reconnectPeriod),y("MqttClient :: options.rejectUnauthorized",I.rejectUnauthorized),y("MqttClient :: options.topicAliasMaximum",I.topicAliasMaximum),this.options.clientId=typeof I.clientId=="string"?I.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),y("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=I.protocolVersion===5&&I.customHandleAcks?I.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=C,this.messageIdProvider=this.options.messageIdProvider===void 0?new c:this.options.messageIdProvider,this.outgoingStore=I.outgoingStore||new d,this.incomingStore=I.incomingStore||new d,this.queueQoSZero=I.queueQoSZero===void 0||I.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,I.topicAliasMaximum>0&&(I.topicAliasMaximum>65535?y("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(I.topicAliasMaximum)),this.on("connect",function(){const G=this.queue;y("connect :: sending queued packets"),function q(){const N=G.shift();y("deliver :: entry %o",N);let V=null;if(!N)return void W._resubscribe();V=N.packet,y("deliver :: call _sendPacket for %o",V);let L=!0;V.messageId&&V.messageId!==0&&(W.messageIdProvider.register(V.messageId)||(L=!1)),L?W._sendPacket(V,function(O){N.cb&&N.cb(O),q()}):(y("messageId: %d has already used. The message is skipped and removed.",V.messageId),q())}()}),this.on("close",function(){y("close :: connected set to `false`"),this.connected=!1,y("close :: clearing connackTimer"),clearTimeout(this.connackTimer),y("close :: clearing ping timer"),W.pingTimer!==null&&(W.pingTimer.clear(),W.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),y("close :: calling _setupReconnect"),this._setupReconnect()}),u.call(this),y("MqttClient :: setting up stream"),this._setupStream()}h(A,u),A.prototype._setupStream=function(){const C=this,I=new f,z=p.parser(this.options);let W=null;const G=[];function q(){if(G.length)_(N);else{const L=W;W=null,L()}}function N(){y("work :: getting next packet in queue");const L=G.shift();if(L)y("work :: packet pulled from queue"),C._handlePacket(L,q);else{y("work :: no packets in queue");const O=W;W=null,y("work :: done flag is %s",!!O),O&&O()}}y("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),y("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),z.on("packet",function(L){y("parser :: on packet push to packets array."),G.push(L)}),I._write=function(L,O,K){W=K,y("writable stream :: parsing buffer"),z.parse(L),N()},y("_setupStream :: pipe stream to writable stream"),this.stream.pipe(I),this.stream.on("error",function(L){y("streamErrorHandler :: error",L.message),L.code?(y("streamErrorHandler :: emitting error"),C.emit("error",L)):E(L)}),this.stream.on("close",function(){var L;y("(%s)stream :: on close",C.options.clientId),(L=C.outgoing)&&(y("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(L).forEach(function(O){L[O].volatile&&typeof L[O].cb=="function"&&(L[O].cb(new Error("Connection closed")),delete L[O])})),y("stream: emit close to MqttClient"),C.emit("close")}),y("_setupStream: sending packet `connect`");const V=Object.create(this.options);if(V.cmd="connect",this.topicAliasRecv&&(V.properties||(V.properties={}),this.topicAliasRecv&&(V.properties.topicAliasMaximum=this.topicAliasRecv.max)),Z(this,V),z.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return C.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"&&Z(this,b({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){y("!!connectTimeout hit!! Calling _cleanUp with force `true`"),C._cleanUp(!0)},this.options.connectTimeout)},A.prototype._handlePacket=function(C,I){const z=this.options;if(z.protocolVersion===5&&z.properties&&z.properties.maximumPacketSize&&z.properties.maximumPacketSize<C.length)return this.emit("error",new Error("exceeding packets size "+C.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(y("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",C),C.cmd){case"publish":this._handlePublish(C,I);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(C),I();break;case"pubrel":this._handlePubrel(C,I);break;case"connack":this._handleConnack(C),I();break;case"auth":this._handleAuth(C),I();break;case"pingresp":this._handlePingresp(C),I();break;case"disconnect":this._handleDisconnect(C),I()}},A.prototype._checkDisconnecting=function(C){return this.disconnecting&&(C&&C!==E?C(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},A.prototype.publish=function(C,I,z,W){y("publish :: message `%s` to topic `%s`",I,C);const G=this.options;if(typeof z=="function"&&(W=z,z=null),z=b({qos:0,retain:!1,dup:!1},z),this._checkDisconnecting(W))return this;const q=this,N=function(){let V=0;if((z.qos===1||z.qos===2)&&(V=q._nextId())===null)return y("No messageId left"),!1;const L={cmd:"publish",topic:C,payload:I,qos:z.qos,retain:z.retain,messageId:V,dup:z.dup};switch(G.protocolVersion===5&&(L.properties=z.properties),y("publish :: qos",z.qos),z.qos){case 1:case 2:q.outgoing[L.messageId]={volatile:!1,cb:W||E},y("MqttClient:publish: packet cmd: %s",L.cmd),q._sendPacket(L,void 0,z.cbStorePut);break;default:y("MqttClient:publish: packet cmd: %s",L.cmd),q._sendPacket(L,W,z.cbStorePut)}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!N())&&this._storeProcessingQueue.push({invoke:N,cbStorePut:z.cbStorePut,callback:W}),this},A.prototype.subscribe=function(){const C=this,I=new Array(arguments.length);for(let H=0;H<arguments.length;H++)I[H]=arguments[H];const z=[];let W=I.shift();const G=W.resubscribe;let q=I.pop()||E,N=I.pop();const V=this.options.protocolVersion;delete W.resubscribe,typeof W=="string"&&(W=[W]),typeof q!="function"&&(N=q,q=E);const L=g.validateTopics(W);if(L!==null)return T(q,new Error("Invalid topic "+L)),this;if(this._checkDisconnecting(q))return y("subscribe: discconecting true"),this;const O={qos:0};if(V===5&&(O.nl=!1,O.rap=!1,O.rh=0),N=b(O,N),Array.isArray(W)?W.forEach(function(H){if(y("subscribe: array topic %s",H),!Object.prototype.hasOwnProperty.call(C._resubscribeTopics,H)||C._resubscribeTopics[H].qos<N.qos||G){const J={topic:H,qos:N.qos};V===5&&(J.nl=N.nl,J.rap=N.rap,J.rh=N.rh,J.properties=N.properties),y("subscribe: pushing topic `%s` and qos `%s` to subs list",J.topic,J.qos),z.push(J)}}):Object.keys(W).forEach(function(H){if(y("subscribe: object topic %s",H),!Object.prototype.hasOwnProperty.call(C._resubscribeTopics,H)||C._resubscribeTopics[H].qos<W[H].qos||G){const J={topic:H,qos:W[H].qos};V===5&&(J.nl=W[H].nl,J.rap=W[H].rap,J.rh=W[H].rh,J.properties=N.properties),y("subscribe: pushing `%s` to subs list",J),z.push(J)}}),!z.length)return q(null,[]),this;const K=function(){const H=C._nextId();if(H===null)return y("No messageId left"),!1;const J={cmd:"subscribe",subscriptions:z,qos:1,retain:!1,dup:!1,messageId:H};if(N.properties&&(J.properties=N.properties),C.options.resubscribe){y("subscribe :: resubscribe true");const ne=[];z.forEach(function(ie){if(C.options.reconnectPeriod>0){const te={qos:ie.qos};V===5&&(te.nl=ie.nl||!1,te.rap=ie.rap||!1,te.rh=ie.rh||0,te.properties=ie.properties),C._resubscribeTopics[ie.topic]=te,ne.push(ie.topic)}}),C.messageIdToTopic[J.messageId]=ne}return C.outgoing[J.messageId]={volatile:!0,cb:function(ne,ie){if(!ne){const te=ie.granted;for(let x=0;x<te.length;x+=1)z[x].qos=te[x]}q(ne,z)}},y("subscribe :: call _sendPacket"),C._sendPacket(J),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!K())&&this._storeProcessingQueue.push({invoke:K,callback:q}),this},A.prototype.unsubscribe=function(){const C=this,I=new Array(arguments.length);for(let V=0;V<arguments.length;V++)I[V]=arguments[V];let z=I.shift(),W=I.pop()||E,G=I.pop();typeof z=="string"&&(z=[z]),typeof W!="function"&&(G=W,W=E);const q=g.validateTopics(z);if(q!==null)return T(W,new Error("Invalid topic "+q)),this;if(C._checkDisconnecting(W))return this;const N=function(){const V=C._nextId();if(V===null)return y("No messageId left"),!1;const L={cmd:"unsubscribe",qos:1,messageId:V};return typeof z=="string"?L.unsubscriptions=[z]:Array.isArray(z)&&(L.unsubscriptions=z),C.options.resubscribe&&L.unsubscriptions.forEach(function(O){delete C._resubscribeTopics[O]}),typeof G=="object"&&G.properties&&(L.properties=G.properties),C.outgoing[L.messageId]={volatile:!0,cb:W},y("unsubscribe: call _sendPacket"),C._sendPacket(L),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!N())&&this._storeProcessingQueue.push({invoke:N,callback:W}),this},A.prototype.end=function(C,I,z){const W=this;function G(){y("end :: (%s) :: finish :: calling _cleanUp with force %s",W.options.clientId,C),W._cleanUp(C,()=>{y("end :: finish :: calling process.nextTick on closeStores"),_(function(){y("end :: closeStores: closing incoming and outgoing stores"),W.disconnected=!0,W.incomingStore.close(function(q){W.outgoingStore.close(function(N){if(y("end :: closeStores: emitting end"),W.emit("end"),z){const V=q||N;y("end :: closeStores: invoking callback with args"),z(V)}})}),W._deferredReconnect&&W._deferredReconnect()}.bind(W))},I)}return y("end :: (%s)",this.options.clientId),C!=null&&typeof C=="boolean"||(z=I||E,I=C,C=!1,typeof I!="object"&&(z=I,I=null,typeof z!="function"&&(z=E))),typeof I!="object"&&(z=I,I=null),y("end :: cb? %s",!!z),z=z||E,this.disconnecting?(z(),this):(this._clearReconnect(),this.disconnecting=!0,!C&&Object.keys(this.outgoing).length>0?(y("end :: (%s) :: calling finish in 10ms once outgoing is empty",W.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,G,10))):(y("end :: (%s) :: immediately calling finish",W.options.clientId),G()),this)},A.prototype.removeOutgoingMessage=function(C){const I=this.outgoing[C]?this.outgoing[C].cb:null;return delete this.outgoing[C],this.outgoingStore.del({messageId:C},function(){I(new Error("Message removed"))}),this},A.prototype.reconnect=function(C){y("client reconnect");const I=this,z=function(){C?(I.options.incomingStore=C.incomingStore,I.options.outgoingStore=C.outgoingStore):(I.options.incomingStore=null,I.options.outgoingStore=null),I.incomingStore=I.options.incomingStore||new d,I.outgoingStore=I.options.outgoingStore||new d,I.disconnecting=!1,I.disconnected=!1,I._deferredReconnect=null,I._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=z:z(),this},A.prototype._reconnect=function(){y("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),y("client already connected. disconnecting first.")):(y("_reconnect: calling _setupStream"),this._setupStream())},A.prototype._setupReconnect=function(){const C=this;!C.disconnecting&&!C.reconnectTimer&&C.options.reconnectPeriod>0?(this.reconnecting||(y("_setupReconnect :: emit `offline` state"),this.emit("offline"),y("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),y("_setupReconnect :: setting reconnectTimer for %d ms",C.options.reconnectPeriod),C.reconnectTimer=setInterval(function(){y("reconnectTimer :: reconnect triggered!"),C._reconnect()},C.options.reconnectPeriod)):y("_setupReconnect :: doing nothing...")},A.prototype._clearReconnect=function(){y("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},A.prototype._cleanUp=function(C,I){const z=arguments[2];if(I&&(y("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",I)),y("_cleanUp :: forced? %s",C),C)this.options.reconnectPeriod===0&&this.options.clean&&(W=this.outgoing)&&(y("flush: queue exists? %b",!!W),Object.keys(W).forEach(function(G){typeof W[G].cb=="function"&&(W[G].cb(new Error("Connection closed")),delete W[G])})),y("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const G=b({cmd:"disconnect"},z);y("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(G,T.bind(null,this.stream.end.bind(this.stream)))}var W;this.disconnecting||(y("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(y("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),I&&!this.connected&&(y("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",I),I())},A.prototype._sendPacket=function(C,I,z){y("_sendPacket :: (%s) :: start",this.options.clientId),z=z||E,I=I||E;const W=function(G,q){if(G.options.protocolVersion===5&&q.cmd==="publish"){let N;q.properties&&(N=q.properties.topicAlias);const V=q.topic.toString();if(G.topicAliasSend)if(N){if(V.length!==0&&(y("applyTopicAlias :: register topic: %s - alias: %d",V,N),!G.topicAliasSend.put(V,N)))return y("applyTopicAlias :: error out of range. topic: %s - alias: %d",V,N),new Error("Sending Topic Alias out of range")}else V.length!==0&&(G.options.autoAssignTopicAlias?(N=G.topicAliasSend.getAliasByTopic(V))?(q.topic="",q.properties=we(he({},q.properties),{topicAlias:N}),y("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",V,N)):(N=G.topicAliasSend.getLruAlias(),G.topicAliasSend.put(V,N),q.properties=we(he({},q.properties),{topicAlias:N}),y("applyTopicAlias :: auto assign topic: %s - alias: %d",V,N)):G.options.autoUseTopicAlias&&(N=G.topicAliasSend.getAliasByTopic(V))&&(q.topic="",q.properties=we(he({},q.properties),{topicAlias:N}),y("applyTopicAlias :: auto use topic: %s - alias: %d",V,N)));else if(N)return y("applyTopicAlias :: error out of range. topic: %s - alias: %d",V,N),new Error("Sending Topic Alias out of range")}}(this,C);if(W)I(W);else{if(!this.connected)return C.cmd==="auth"?(this._shiftPingInterval(),void Z(this,C,I)):(y("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(C,I,z));switch(this._shiftPingInterval(),C.cmd){case"publish":break;case"pubrel":return void j(this,C,I,z);default:return void Z(this,C,I)}switch(C.qos){case 2:case 1:j(this,C,I,z);break;case 0:default:Z(this,C,I)}y("_sendPacket :: (%s) :: end",this.options.clientId)}},A.prototype._storePacket=function(C,I,z){y("_storePacket :: packet: %o",C),y("_storePacket :: cb? %s",!!I),z=z||E;let W=C;if(W.cmd==="publish"){const G=R(this,W=m(C));if(G)return I&&I(G)}(W.qos||0)===0&&this.queueQoSZero||W.cmd!=="publish"?this.queue.push({packet:W,cb:I}):W.qos>0?(I=this.outgoing[W.messageId]?this.outgoing[W.messageId].cb:null,this.outgoingStore.put(W,function(G){if(G)return I&&I(G);z()})):I&&I(new Error("No connection to broker"))},A.prototype._setupPingTimer=function(){y("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const C=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=v(function(){C._checkPing()},1e3*this.options.keepalive))},A.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},A.prototype._checkPing=function(){y("_checkPing :: checking ping..."),this.pingResp?(y("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(y("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},A.prototype._handlePingresp=function(){this.pingResp=!0},A.prototype._handleConnack=function(C){y("_handleConnack");const I=this.options,z=I.protocolVersion===5?C.reasonCode:C.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,C.properties){if(C.properties.topicAliasMaximum){if(C.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));C.properties.topicAliasMaximum>0&&(this.topicAliasSend=new i(C.properties.topicAliasMaximum))}C.properties.serverKeepAlive&&I.keepalive&&(I.keepalive=C.properties.serverKeepAlive,this._shiftPingInterval()),C.properties.maximumPacketSize&&(I.properties||(I.properties={}),I.properties.maximumPacketSize=C.properties.maximumPacketSize)}if(z===0)this.reconnecting=!1,this._onConnect(C);else if(z>0){const W=new Error("Connection refused: "+F[z]);W.code=z,this.emit("error",W)}},A.prototype._handleAuth=function(C){const I=this.options.protocolVersion,z=I===5?C.reasonCode:C.returnCode;if(I!==5){const G=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+I);return G.code=z,void this.emit("error",G)}const W=this;this.handleAuth(C,function(G,q){if(G)W.emit("error",G);else if(z===24)W.reconnecting=!1,W._sendPacket(q);else{const N=new Error("Connection refused: "+F[z]);G.code=z,W.emit("error",N)}})},A.prototype.handleAuth=function(C,I){I()},A.prototype._handlePublish=function(C,I){y("_handlePublish: packet %o",C),I=I!==void 0?I:E;let z=C.topic.toString();const W=C.payload,G=C.qos,q=C.messageId,N=this,V=this.options,L=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let O;if(C.properties&&(O=C.properties.topicAlias),O!==void 0)if(z.length===0){if(!(O>0&&O<=65535))return y("_handlePublish :: topic alias out of range. alias: %d",O),void this.emit("error",new Error("Received Topic Alias is out of range"));{const K=this.topicAliasRecv.getTopicByAlias(O);if(!K)return y("_handlePublish :: unregistered topic alias. alias: %d",O),void this.emit("error",new Error("Received unregistered Topic Alias"));y("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",z=K,O)}}else{if(!this.topicAliasRecv.put(z,O))return y("_handlePublish :: topic alias out of range. alias: %d",O),void this.emit("error",new Error("Received Topic Alias is out of range"));y("_handlePublish :: registered topic: %s - alias: %d",z,O)}}switch(y("_handlePublish: qos %d",G),G){case 2:V.customHandleAcks(z,W,C,function(O,K){return O instanceof Error||(K=O,O=null),O?N.emit("error",O):L.indexOf(K)===-1?N.emit("error",new Error("Wrong reason code for pubrec")):void(K?N._sendPacket({cmd:"pubrec",messageId:q,reasonCode:K},I):N.incomingStore.put(C,function(){N._sendPacket({cmd:"pubrec",messageId:q},I)}))});break;case 1:V.customHandleAcks(z,W,C,function(O,K){return O instanceof Error||(K=O,O=null),O?N.emit("error",O):L.indexOf(K)===-1?N.emit("error",new Error("Wrong reason code for puback")):(K||N.emit("message",z,W,C),void N.handleMessage(C,function(H){if(H)return I&&I(H);N._sendPacket({cmd:"puback",messageId:q,reasonCode:K},I)}))});break;case 0:this.emit("message",z,W,C),this.handleMessage(C,I);break;default:y("_handlePublish: unknown QoS. Doing nothing.")}},A.prototype.handleMessage=function(C,I){I()},A.prototype._handleAck=function(C){const I=C.messageId,z=C.cmd;let W=null;const G=this.outgoing[I]?this.outgoing[I].cb:null,q=this;let N;if(G){switch(y("_handleAck :: packet type",z),z){case"pubcomp":case"puback":{const V=C.reasonCode;V&&V>0&&V!==16&&((N=new Error("Publish error: "+F[V])).code=V,G(N,C)),delete this.outgoing[I],this.outgoingStore.del(C,G),this.messageIdProvider.deallocate(I),this._invokeStoreProcessingQueue();break}case"pubrec":{W={cmd:"pubrel",qos:2,messageId:I};const V=C.reasonCode;V&&V>0&&V!==16?((N=new Error("Publish error: "+F[V])).code=V,G(N,C)):this._sendPacket(W);break}case"suback":delete this.outgoing[I],this.messageIdProvider.deallocate(I);for(let V=0;V<C.granted.length;V++)if(128&C.granted[V]){const L=this.messageIdToTopic[I];L&&L.forEach(function(O){delete q._resubscribeTopics[O]})}this._invokeStoreProcessingQueue(),G(null,C);break;case"unsuback":delete this.outgoing[I],this.messageIdProvider.deallocate(I),this._invokeStoreProcessingQueue(),G(null);break;default:q.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")}else y("_handleAck :: Server sent an ack in error. Ignoring.")},A.prototype._handlePubrel=function(C,I){y("handling pubrel packet"),I=I!==void 0?I:E;const z=this,W={cmd:"pubcomp",messageId:C.messageId};z.incomingStore.get(C,function(G,q){G?z._sendPacket(W,I):(z.emit("message",q.topic,q.payload,q),z.handleMessage(q,function(N){if(N)return I(N);z.incomingStore.del(q,E),z._sendPacket(W,I)}))})},A.prototype._handleDisconnect=function(C){this.emit("disconnect",C)},A.prototype._nextId=function(){return this.messageIdProvider.allocate()},A.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},A.prototype._resubscribe=function(){y("_resubscribe");const C=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion===5&&!this.connackPacket.sessionPresent)&&C.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){y("_resubscribe: protocolVersion 5");for(let I=0;I<C.length;I++){const z={};z[C[I]]=this._resubscribeTopics[C[I]],z.resubscribe=!0,this.subscribe(z,{properties:z[C[I]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},A.prototype._onConnect=function(C){if(this.disconnected)return void this.emit("connect",C);const I=this;this.connackPacket=C,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0,function z(){let W=I.outgoingStore.createStream();function G(){I._storeProcessing=!1,I._packetIdsDuringStoreProcessing={}}function q(){W.destroy(),W=null,I._flushStoreProcessingQueue(),G()}I.once("close",q),W.on("error",function(N){G(),I._flushStoreProcessingQueue(),I.removeListener("close",q),I.emit("error",N)}),W.on("end",function(){let N=!0;for(const V in I._packetIdsDuringStoreProcessing)if(!I._packetIdsDuringStoreProcessing[V]){N=!1;break}N?(G(),I.removeListener("close",q),I._invokeAllStoreProcessingQueue(),I.emit("connect",C)):z()}),function N(){if(!W)return;I._storeProcessing=!0;const V=W.read(1);let L;V?I._packetIdsDuringStoreProcessing[V.messageId]?N():I.disconnecting||I.reconnectTimer?W.destroy&&W.destroy():(L=I.outgoing[V.messageId]?I.outgoing[V.messageId].cb:null,I.outgoing[V.messageId]={volatile:!1,cb:function(O,K){L&&L(O,K),N()}},I._packetIdsDuringStoreProcessing[V.messageId]=!0,I.messageIdProvider.register(V.messageId)?I._sendPacket(V):y("messageId: %d has already used.",V.messageId)):W.once("readable",N)}()}()},A.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const C=this._storeProcessingQueue[0];if(C&&C.invoke())return this._storeProcessingQueue.shift(),!0}return!1},A.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},A.prototype._flushStoreProcessingQueue=function(){for(const C of this._storeProcessingQueue)C.cbStorePut&&C.cbStorePut(new Error("Connection closed")),C.callback&&C.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},n.exports=A}).call(this)}).call(this,t("_process"),typeof xe!="undefined"?xe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(t,n,l){const{Buffer:a}=t("buffer"),o=t("readable-stream").Transform,u=t("duplexify");let d,s,i,p=!1;n.exports=function(c,f){if(f.hostname=f.hostname||f.host,!f.hostname)throw new Error("Could not determine host. Specify host manually.");const h=f.protocolId==="MQIsdp"&&f.protocolVersion===3?"mqttv3.1":"mqtt";(function(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})})(f);const v=function(m,g){const b=m.protocol==="alis"?"wss":"ws";let y=b+"://"+m.hostname+m.path;return m.port&&m.port!==80&&m.port!==443&&(y=b+"://"+m.hostname+":"+m.port+m.path),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,g)),y}(f,c);return(d=f.my).connectSocket({url:v,protocols:h}),s=function(){const m=new o;return m._write=function(g,b,y){d.sendSocketMessage({data:g.buffer,success:function(){y()},fail:function(){y(new Error)}})},m._flush=function(g){d.closeSocket({success:function(){g()}})},m}(),i=u.obj(),p||(p=!0,d.onSocketOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),d.onSocketMessage(function(m){if(typeof m.data=="string"){const g=a.from(m.data,"base64");s.push(g)}else{const g=new FileReader;g.addEventListener("load",function(){let b=g.result;b=b instanceof ArrayBuffer?a.from(b):a.from(b,"utf8"),s.push(b)}),g.readAsArrayBuffer(m.data)}}),d.onSocketClose(function(){i.end(),i.destroy()}),d.onSocketError(function(m){i.destroy(m)})),i}},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(t,n,l){const a=t("net"),o=t("debug")("mqttjs:tcp");n.exports=function(u,d){d.port=d.port||1883,d.hostname=d.hostname||d.host||"localhost";const s=d.port,i=d.hostname;return o("port %d and host %s",s,i),a.createConnection(s,i)}},{debug:18,net:16}],4:[function(t,n,l){const a=t("tls"),o=t("net"),u=t("debug")("mqttjs:tls");n.exports=function(d,s){s.port=s.port||8883,s.host=s.hostname||s.host||"localhost",o.isIP(s.host)===0&&(s.servername=s.host),s.rejectUnauthorized=s.rejectUnauthorized!==!1,delete s.path,u("port %d host %s rejectUnauthorized %b",s.port,s.host,s.rejectUnauthorized);const i=a.connect(s);function p(c){s.rejectUnauthorized&&d.emit("error",c),i.end()}return i.on("secureConnect",function(){s.rejectUnauthorized&&!i.authorized?i.emit("error",new Error("TLS not authorized")):i.removeListener("error",p)}),i.on("error",p),i}},{debug:18,net:16,tls:16}],5:[function(t,n,l){(function(a){(function(){const{Buffer:o}=t("buffer"),u=t("ws"),d=t("debug")("mqttjs:ws"),s=t("duplexify"),i=t("readable-stream").Transform,p=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],c=a!==void 0&&a.title==="browser"||typeof __webpack_require__=="function";function f(v,m){let g=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(g=v.transformWsUrl(g,v,m)),g}function h(v){const m=v;return v.hostname||(m.hostname="localhost"),v.port||(v.protocol==="wss"?m.port=443:m.port=80),v.path||(m.path="/"),v.wsOptions||(m.wsOptions={}),c||v.protocol!=="wss"||p.forEach(function(g){Object.prototype.hasOwnProperty.call(v,g)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,g)&&(m.wsOptions[g]=v[g])}),m}n.exports=c?function(v,m){let g;d("browserStreamBuilder");const b=function(C){const I=h(C);if(I.hostname||(I.hostname=I.host),!I.hostname){if(typeof document=="undefined")throw new Error("Could not determine host. Specify host manually.");const z=new URL(document.URL);I.hostname=z.hostname,I.port||(I.port=z.port)}return I.objectMode===void 0&&(I.objectMode=!(I.binary===!0||I.binary===void 0)),I}(m).browserBufferSize||524288,y=m.browserBufferTimeout||1e3,_=!m.objectMode,T=function(C,I){const z=I.protocolId==="MQIsdp"&&I.protocolVersion===3?"mqttv3.1":"mqtt",W=f(I,C),G=new WebSocket(W,[z]);return G.binaryType="arraybuffer",G}(v,m),B=function(C,I,z){const W=new i({objectModeMode:C.objectMode});return W._write=I,W._flush=z,W}(m,function C(I,z,W){T.bufferedAmount>b&&setTimeout(C,y,I,z,W),_&&typeof I=="string"&&(I=o.from(I,"utf8"));try{T.send(I)}catch(G){return W(G)}W()},function(C){T.close(),C()});m.objectMode||(B._writev=A),B.on("close",()=>{T.close()});const F=T.addEventListener!==void 0;function R(){g.setReadable(B),g.setWritable(B),g.emit("connect")}function Z(){g.end(),g.destroy()}function j(C){g.destroy(C)}function E(C){let I=C.data;I=I instanceof ArrayBuffer?o.from(I):o.from(I,"utf8"),B.push(I)}function A(C,I){const z=new Array(C.length);for(let W=0;W<C.length;W++)typeof C[W].chunk=="string"?z[W]=o.from(C[W],"utf8"):z[W]=C[W].chunk;this._write(o.concat(z),"binary",I)}return T.readyState===T.OPEN?g=B:(g=g=s(void 0,void 0,m),m.objectMode||(g._writev=A),F?T.addEventListener("open",R):T.onopen=R),g.socket=T,F?(T.addEventListener("close",Z),T.addEventListener("error",j),T.addEventListener("message",E)):(T.onclose=Z,T.onerror=j,T.onmessage=E),g}:function(v,m){d("streamBuilder");const g=h(m),b=f(g,v),y=function(T,B,F){d("createWebSocket"),d("protocol: "+F.protocolId+" "+F.protocolVersion);const R=F.protocolId==="MQIsdp"&&F.protocolVersion===3?"mqttv3.1":"mqtt";return d("creating new Websocket for url: "+B+" and protocol: "+R),new u(B,[R],F.wsOptions)}(0,b,g),_=u.createWebSocketStream(y,g.wsOptions);return _.url=b,y.on("close",()=>{_.destroy()}),_}}).call(this)}).call(this,t("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(t,n,l){const{Buffer:a}=t("buffer"),o=t("readable-stream").Transform,u=t("duplexify");let d,s,i;n.exports=function(p,c){if(c.hostname=c.hostname||c.host,!c.hostname)throw new Error("Could not determine host. Specify host manually.");const f=c.protocolId==="MQIsdp"&&c.protocolVersion===3?"mqttv3.1":"mqtt";(function(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})})(c);const h=function(m,g){const b=m.protocol==="wxs"?"wss":"ws";let y=b+"://"+m.hostname+m.path;return m.port&&m.port!==80&&m.port!==443&&(y=b+"://"+m.hostname+":"+m.port+m.path),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,g)),y}(c,p);d=wx.connectSocket({url:h,protocols:[f]}),s=function(){const m=new o;return m._write=function(g,b,y){d.send({data:g.buffer,success:function(){y()},fail:function(_){y(new Error(_))}})},m._flush=function(g){d.close({success:function(){g()}})},m}(),(i=u.obj())._destroy=function(m,g){d.close({success:function(){g&&g(m)}})};const v=i.destroy;return i.destroy=function(){i.destroy=v;const m=this;setTimeout(function(){d.close({fail:function(){m._destroy(new Error)}})},0)}.bind(i),d.onOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),d.onMessage(function(m){let g=m.data;g=g instanceof ArrayBuffer?a.from(g):a.from(g,"utf8"),s.push(g)}),d.onClose(function(){i.end(),i.destroy()}),d.onError(function(m){i.destroy(new Error(m.errMsg))}),i}},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(t,n,l){function a(){if(!(this instanceof a))return new a;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}a.prototype.allocate=function(){const o=this.nextId++;return this.nextId===65536&&(this.nextId=1),o},a.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},a.prototype.register=function(o){return!0},a.prototype.deallocate=function(o){},a.prototype.clear=function(){},n.exports=a},{}],8:[function(t,n,l){const a=t("xtend"),o=t("readable-stream").Readable,u={objectMode:!0},d={clean:!0};function s(i){if(!(this instanceof s))return new s(i);this.options=i||{},this.options=a(d,i),this._inflights=new Map}s.prototype.put=function(i,p){return this._inflights.set(i.messageId,i),p&&p(),this},s.prototype.createStream=function(){const i=new o(u),p=[];let c=!1,f=0;return this._inflights.forEach(function(h,v){p.push(h)}),i._read=function(){!c&&f<p.length?this.push(p[f++]):this.push(null)},i.destroy=function(){if(c)return;const h=this;c=!0,setTimeout(function(){h.emit("close")},0)},i},s.prototype.del=function(i,p){return(i=this._inflights.get(i.messageId))?(this._inflights.delete(i.messageId),p(null,i)):p&&p(new Error("missing packet")),this},s.prototype.get=function(i,p){return(i=this._inflights.get(i.messageId))?p(null,i):p&&p(new Error("missing packet")),this},s.prototype.close=function(i){this.options.clean&&(this._inflights=null),i&&i()},n.exports=s},{"readable-stream":69,xtend:81}],9:[function(t,n,l){function a(o){if(!(this instanceof a))return new a(o);this.aliasToTopic={},this.max=o}a.prototype.put=function(o,u){return!(u===0||u>this.max)&&(this.aliasToTopic[u]=o,this.length=Object.keys(this.aliasToTopic).length,!0)},a.prototype.getTopicByAlias=function(o){return this.aliasToTopic[o]},a.prototype.clear=function(){this.aliasToTopic={}},n.exports=a},{}],10:[function(t,n,l){const a=t("lru-cache"),o=t("number-allocator").NumberAllocator;function u(d){if(!(this instanceof u))return new u(d);d>0&&(this.aliasToTopic=new a({max:d}),this.topicToAlias={},this.numberAllocator=new o(1,d),this.max=d,this.length=0)}u.prototype.put=function(d,s){if(s===0||s>this.max)return!1;const i=this.aliasToTopic.get(s);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(s,d),this.topicToAlias[d]=s,this.numberAllocator.use(s),this.length=this.aliasToTopic.length,!0},u.prototype.getTopicByAlias=function(d){return this.aliasToTopic.get(d)},u.prototype.getAliasByTopic=function(d){const s=this.topicToAlias[d];return s!==void 0&&this.aliasToTopic.get(s),s},u.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},u.prototype.getLruAlias=function(){return this.numberAllocator.firstVacant()||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},n.exports=u},{"lru-cache":37,"number-allocator":46}],11:[function(t,n,l){function a(o){const u=o.split("/");for(let d=0;d<u.length;d++)if(u[d]!=="+"){if(u[d]==="#")return d===u.length-1;if(u[d].indexOf("+")!==-1||u[d].indexOf("#")!==-1)return!1}return!0}n.exports={validateTopics:function(o){if(o.length===0)return"empty_topic_list";for(let u=0;u<o.length;u++)if(!a(o[u]))return o[u];return null}}},{}],12:[function(t,n,l){(function(a){(function(){const o=t("../client"),u=t("../store"),d=t("url"),s=t("xtend"),i=t("debug")("mqttjs"),p={};function c(f,h){if(i("connecting to an MQTT broker..."),typeof f!="object"||h||(h=f,f=null),h=h||{},f){const m=d.parse(f,!0);if(m.port!=null&&(m.port=Number(m.port)),(h=s(m,h)).protocol===null)throw new Error("Missing protocol");h.protocol=h.protocol.replace(/:$/,"")}if(function(m){let g;m.auth&&((g=m.auth.match(/^(.+):(.+)$/))?(m.username=g[1],m.password=g[2]):m.username=m.auth)}(h),h.query&&typeof h.query.clientId=="string"&&(h.clientId=h.query.clientId),h.cert&&h.key){if(!h.protocol)throw new Error("Missing secure protocol key");if(["mqtts","wss","wxs","alis"].indexOf(h.protocol)===-1)switch(h.protocol){case"mqtt":h.protocol="mqtts";break;case"ws":h.protocol="wss";break;case"wx":h.protocol="wxs";break;case"ali":h.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+h.protocol+'"!')}}if(!p[h.protocol]){const m=["mqtts","wss"].indexOf(h.protocol)!==-1;h.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(g,b){return(!m||b%2!=0)&&typeof p[g]=="function"})[0]}if(h.clean===!1&&!h.clientId)throw new Error("Missing clientId for unclean clients");h.protocol&&(h.defaultProtocol=h.protocol);const v=new o(function(m){return h.servers&&(m._reconnectCount&&m._reconnectCount!==h.servers.length||(m._reconnectCount=0),h.host=h.servers[m._reconnectCount].host,h.port=h.servers[m._reconnectCount].port,h.protocol=h.servers[m._reconnectCount].protocol?h.servers[m._reconnectCount].protocol:h.defaultProtocol,h.hostname=h.host,m._reconnectCount++),i("calling streambuilder for",h.protocol),p[h.protocol](m,h)},h);return v.on("error",function(){}),v}a!==void 0&&a.title!=="browser"||typeof __webpack_require__!="function"?(p.mqtt=t("./tcp"),p.tcp=t("./tcp"),p.ssl=t("./tls"),p.tls=t("./tls"),p.mqtts=t("./tls")):(p.wx=t("./wx"),p.wxs=t("./wx"),p.ali=t("./ali"),p.alis=t("./ali")),p.ws=t("./ws"),p.wss=t("./ws"),n.exports=c,n.exports.connect=c,n.exports.MqttClient=o,n.exports.Store=u}).call(this)}).call(this,t("_process"))},{"../client":1,"../store":8,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:50,debug:18,url:76,xtend:81}],13:[function(t,n,l){l.byteLength=function(f){var h=p(f),v=h[0],m=h[1];return 3*(v+m)/4-m},l.toByteArray=function(f){var h,v,m=p(f),g=m[0],b=m[1],y=new u(function(B,F,R){return 3*(F+R)/4-R}(0,g,b)),_=0,T=b>0?g-4:g;for(v=0;v<T;v+=4)h=o[f.charCodeAt(v)]<<18|o[f.charCodeAt(v+1)]<<12|o[f.charCodeAt(v+2)]<<6|o[f.charCodeAt(v+3)],y[_++]=h>>16&255,y[_++]=h>>8&255,y[_++]=255&h;return b===2&&(h=o[f.charCodeAt(v)]<<2|o[f.charCodeAt(v+1)]>>4,y[_++]=255&h),b===1&&(h=o[f.charCodeAt(v)]<<10|o[f.charCodeAt(v+1)]<<4|o[f.charCodeAt(v+2)]>>2,y[_++]=h>>8&255,y[_++]=255&h),y},l.fromByteArray=function(f){for(var h,v=f.length,m=v%3,g=[],b=0,y=v-m;b<y;b+=16383)g.push(c(f,b,b+16383>y?y:b+16383));return m===1?(h=f[v-1],g.push(a[h>>2]+a[h<<4&63]+"==")):m===2&&(h=(f[v-2]<<8)+f[v-1],g.push(a[h>>10]+a[h>>4&63]+a[h<<2&63]+"=")),g.join("")};for(var a=[],o=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=d.length;s<i;++s)a[s]=d[s],o[d.charCodeAt(s)]=s;function p(f){var h=f.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=f.indexOf("=");return v===-1&&(v=h),[v,v===h?0:4-v%4]}function c(f,h,v){for(var m,g,b=[],y=h;y<v;y+=3)m=(f[y]<<16&16711680)+(f[y+1]<<8&65280)+(255&f[y+2]),b.push(a[(g=m)>>18&63]+a[g>>12&63]+a[g>>6&63]+a[63&g]);return b.join("")}o[45]=62,o[95]=63},{}],14:[function(t,n,l){const{Buffer:a}=t("buffer"),o=Symbol.for("BufferList");function u(d){if(!(this instanceof u))return new u(d);u._init.call(this,d)}u._init=function(d){Object.defineProperty(this,o,{value:!0}),this._bufs=[],this.length=0,d&&this.append(d)},u.prototype._new=function(d){return new u(d)},u.prototype._offset=function(d){if(d===0)return[0,0];let s=0;for(let i=0;i<this._bufs.length;i++){const p=s+this._bufs[i].length;if(d<p||i===this._bufs.length-1)return[i,d-s];s=p}},u.prototype._reverseOffset=function(d){const s=d[0];let i=d[1];for(let p=0;p<s;p++)i+=this._bufs[p].length;return i},u.prototype.get=function(d){if(d>this.length||d<0)return;const s=this._offset(d);return this._bufs[s[0]][s[1]]},u.prototype.slice=function(d,s){return typeof d=="number"&&d<0&&(d+=this.length),typeof s=="number"&&s<0&&(s+=this.length),this.copy(null,0,d,s)},u.prototype.copy=function(d,s,i,p){if((typeof i!="number"||i<0)&&(i=0),(typeof p!="number"||p>this.length)&&(p=this.length),i>=this.length||p<=0)return d||a.alloc(0);const c=!!d,f=this._offset(i),h=p-i;let v=h,m=c&&s||0,g=f[1];if(i===0&&p===this.length){if(!c)return this._bufs.length===1?this._bufs[0]:a.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(d,m),m+=this._bufs[b].length;return d}if(v<=this._bufs[f[0]].length-g)return c?this._bufs[f[0]].copy(d,s,g,g+v):this._bufs[f[0]].slice(g,g+v);c||(d=a.allocUnsafe(h));for(let b=f[0];b<this._bufs.length;b++){const y=this._bufs[b].length-g;if(!(v>y)){this._bufs[b].copy(d,m,g,g+v),m+=y;break}this._bufs[b].copy(d,m,g),m+=y,v-=y,g&&(g=0)}return d.length>m?d.slice(0,m):d},u.prototype.shallowSlice=function(d,s){if(d=d||0,s=typeof s!="number"?this.length:s,d<0&&(d+=this.length),s<0&&(s+=this.length),d===s)return this._new();const i=this._offset(d),p=this._offset(s),c=this._bufs.slice(i[0],p[0]+1);return p[1]===0?c.pop():c[c.length-1]=c[c.length-1].slice(0,p[1]),i[1]!==0&&(c[0]=c[0].slice(i[1])),this._new(c)},u.prototype.toString=function(d,s,i){return this.slice(s,i).toString(d)},u.prototype.consume=function(d){if(d=Math.trunc(d),Number.isNaN(d)||d<=0)return this;for(;this._bufs.length;){if(!(d>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(d),this.length-=d;break}d-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},u.prototype.duplicate=function(){const d=this._new();for(let s=0;s<this._bufs.length;s++)d.append(this._bufs[s]);return d},u.prototype.append=function(d){if(d==null)return this;if(d.buffer)this._appendBuffer(a.from(d.buffer,d.byteOffset,d.byteLength));else if(Array.isArray(d))for(let s=0;s<d.length;s++)this.append(d[s]);else if(this._isBufferList(d))for(let s=0;s<d._bufs.length;s++)this.append(d._bufs[s]);else typeof d=="number"&&(d=d.toString()),this._appendBuffer(a.from(d));return this},u.prototype._appendBuffer=function(d){this._bufs.push(d),this.length+=d.length},u.prototype.indexOf=function(d,s,i){if(i===void 0&&typeof s=="string"&&(i=s,s=void 0),typeof d=="function"||Array.isArray(d))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof d=="number"?d=a.from([d]):typeof d=="string"?d=a.from(d,i):this._isBufferList(d)?d=d.slice():Array.isArray(d.buffer)?d=a.from(d.buffer,d.byteOffset,d.byteLength):a.isBuffer(d)||(d=a.from(d)),s=Number(s||0),isNaN(s)&&(s=0),s<0&&(s=this.length+s),s<0&&(s=0),d.length===0)return s>this.length?this.length:s;const p=this._offset(s);let c=p[0],f=p[1];for(;c<this._bufs.length;c++){const h=this._bufs[c];for(;f<h.length;)if(h.length-f>=d.length){const v=h.indexOf(d,f);if(v!==-1)return this._reverseOffset([c,v]);f=h.length-d.length+1}else{const v=this._reverseOffset([c,f]);if(this._match(v,d))return v;f++}f=0}return-1},u.prototype._match=function(d,s){if(this.length-d<s.length)return!1;for(let i=0;i<s.length;i++)if(this.get(d+i)!==s[i])return!1;return!0},function(){const d={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const s in d)(function(i){u.prototype[i]=d[i]===null?function(p,c){return this.slice(p,p+c)[i](0,c)}:function(p=0){return this.slice(p,p+d[i])[i](0)}})(s)}(),u.prototype._isBufferList=function(d){return d instanceof u||u.isBufferList(d)},u.isBufferList=function(d){return d!=null&&d[o]},n.exports=u},{buffer:17}],15:[function(t,n,l){const a=t("readable-stream").Duplex,o=t("inherits"),u=t("./BufferList");function d(s){if(!(this instanceof d))return new d(s);if(typeof s=="function"){this._callback=s;const i=function(p){this._callback&&(this._callback(p),this._callback=null)}.bind(this);this.on("pipe",function(p){p.on("error",i)}),this.on("unpipe",function(p){p.removeListener("error",i)}),s=null}u._init.call(this,s),a.call(this)}o(d,a),Object.assign(d.prototype,u.prototype),d.prototype._new=function(s){return new d(s)},d.prototype._write=function(s,i,p){this._appendBuffer(s),typeof p=="function"&&p()},d.prototype._read=function(s){if(!this.length)return this.push(null);s=Math.min(s,this.length),this.push(this.slice(0,s)),this.consume(s)},d.prototype.end=function(s){a.prototype.end.call(this,s),this._callback&&(this._callback(null,this.slice()),this._callback=null)},d.prototype._destroy=function(s,i){this._bufs.length=0,this.length=0,i(s)},d.prototype._isBufferList=function(s){return s instanceof d||s instanceof u||d.isBufferList(s)},d.isBufferList=u.isBufferList,n.exports=d,n.exports.BufferListStream=d,n.exports.BufferList=u},{"./BufferList":14,inherits:24,"readable-stream":69}],16:[function(t,n,l){},{}],17:[function(t,n,l){(function(a){(function(){var o=t("base64-js"),u=t("ieee754");l.Buffer=i,l.SlowBuffer=function(x){return+x!=x&&(x=0),i.alloc(+x)},l.INSPECT_MAX_BYTES=50;var d=2147483647;function s(x){if(x>d)throw new RangeError('The value "'+x+'" is invalid for option "size"');var w=new Uint8Array(x);return w.__proto__=i.prototype,w}function i(x,w,D){if(typeof x=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(x)}return p(x,w,D)}function p(x,w,D){if(typeof x=="string")return function(re,se){if(typeof se=="string"&&se!==""||(se="utf8"),!i.isEncoding(se))throw new TypeError("Unknown encoding: "+se);var $=0|m(re,se),S=s($),k=S.write(re,se);return k!==$&&(S=S.slice(0,k)),S}(x,w);if(ArrayBuffer.isView(x))return h(x);if(x==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(ie(x,ArrayBuffer)||x&&ie(x.buffer,ArrayBuffer))return function(re,se,$){if(se<0||re.byteLength<se)throw new RangeError('"offset" is outside of buffer bounds');if(re.byteLength<se+($||0))throw new RangeError('"length" is outside of buffer bounds');var S;return S=se===void 0&&$===void 0?new Uint8Array(re):$===void 0?new Uint8Array(re,se):new Uint8Array(re,se,$),S.__proto__=i.prototype,S}(x,w,D);if(typeof x=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Q=x.valueOf&&x.valueOf();if(Q!=null&&Q!==x)return i.from(Q,w,D);var ee=function(re){if(i.isBuffer(re)){var se=0|v(re.length),$=s(se);return $.length===0||re.copy($,0,0,se),$}if(re.length!==void 0)return typeof re.length!="number"||te(re.length)?s(0):h(re);if(re.type==="Buffer"&&Array.isArray(re.data))return h(re.data)}(x);if(ee)return ee;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return i.from(x[Symbol.toPrimitive]("string"),w,D);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}function c(x){if(typeof x!="number")throw new TypeError('"size" argument must be of type number');if(x<0)throw new RangeError('The value "'+x+'" is invalid for option "size"')}function f(x){return c(x),s(x<0?0:0|v(x))}function h(x){for(var w=x.length<0?0:0|v(x.length),D=s(w),Q=0;Q<w;Q+=1)D[Q]=255&x[Q];return D}function v(x){if(x>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|x}function m(x,w){if(i.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||ie(x,ArrayBuffer))return x.byteLength;if(typeof x!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof x);var D=x.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&D===0)return 0;for(var ee=!1;;)switch(w){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return H(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*D;case"hex":return D>>>1;case"base64":return J(x).length;default:if(ee)return Q?-1:H(x).length;w=(""+w).toLowerCase(),ee=!0}}function g(x,w,D){var Q=x[w];x[w]=x[D],x[D]=Q}function b(x,w,D,Q,ee){if(x.length===0)return-1;if(typeof D=="string"?(Q=D,D=0):D>2147483647?D=2147483647:D<-2147483648&&(D=-2147483648),te(D=+D)&&(D=ee?0:x.length-1),D<0&&(D=x.length+D),D>=x.length){if(ee)return-1;D=x.length-1}else if(D<0){if(!ee)return-1;D=0}if(typeof w=="string"&&(w=i.from(w,Q)),i.isBuffer(w))return w.length===0?-1:y(x,w,D,Q,ee);if(typeof w=="number")return w&=255,typeof Uint8Array.prototype.indexOf=="function"?ee?Uint8Array.prototype.indexOf.call(x,w,D):Uint8Array.prototype.lastIndexOf.call(x,w,D):y(x,[w],D,Q,ee);throw new TypeError("val must be string, number or Buffer")}function y(x,w,D,Q,ee){var re,se=1,$=x.length,S=w.length;if(Q!==void 0&&((Q=String(Q).toLowerCase())==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(x.length<2||w.length<2)return-1;se=2,$/=2,S/=2,D/=2}function k(ce,me){return se===1?ce[me]:ce.readUInt16BE(me*se)}if(ee){var X=-1;for(re=D;re<$;re++)if(k(x,re)===k(w,X===-1?0:re-X)){if(X===-1&&(X=re),re-X+1===S)return X*se}else X!==-1&&(re-=re-X),X=-1}else for(D+S>$&&(D=$-S),re=D;re>=0;re--){for(var ae=!0,ue=0;ue<S;ue++)if(k(x,re+ue)!==k(w,ue)){ae=!1;break}if(ae)return re}return-1}function _(x,w,D,Q){D=Number(D)||0;var ee=x.length-D;Q?(Q=Number(Q))>ee&&(Q=ee):Q=ee;var re=w.length;Q>re/2&&(Q=re/2);for(var se=0;se<Q;++se){var $=parseInt(w.substr(2*se,2),16);if(te($))return se;x[D+se]=$}return se}function T(x,w,D,Q){return ne(H(w,x.length-D),x,D,Q)}function B(x,w,D,Q){return ne(function(ee){for(var re=[],se=0;se<ee.length;++se)re.push(255&ee.charCodeAt(se));return re}(w),x,D,Q)}function F(x,w,D,Q){return B(x,w,D,Q)}function R(x,w,D,Q){return ne(J(w),x,D,Q)}function Z(x,w,D,Q){return ne(function(ee,re){for(var se,$,S,k=[],X=0;X<ee.length&&!((re-=2)<0);++X)se=ee.charCodeAt(X),$=se>>8,S=se%256,k.push(S),k.push($);return k}(w,x.length-D),x,D,Q)}function j(x,w,D){return w===0&&D===x.length?o.fromByteArray(x):o.fromByteArray(x.slice(w,D))}function E(x,w,D){D=Math.min(x.length,D);for(var Q=[],ee=w;ee<D;){var re,se,$,S,k=x[ee],X=null,ae=k>239?4:k>223?3:k>191?2:1;if(ee+ae<=D)switch(ae){case 1:k<128&&(X=k);break;case 2:(192&(re=x[ee+1]))==128&&(S=(31&k)<<6|63&re)>127&&(X=S);break;case 3:re=x[ee+1],se=x[ee+2],(192&re)==128&&(192&se)==128&&(S=(15&k)<<12|(63&re)<<6|63&se)>2047&&(S<55296||S>57343)&&(X=S);break;case 4:re=x[ee+1],se=x[ee+2],$=x[ee+3],(192&re)==128&&(192&se)==128&&(192&$)==128&&(S=(15&k)<<18|(63&re)<<12|(63&se)<<6|63&$)>65535&&S<1114112&&(X=S)}X===null?(X=65533,ae=1):X>65535&&(X-=65536,Q.push(X>>>10&1023|55296),X=56320|1023&X),Q.push(X),ee+=ae}return function(ue){var ce=ue.length;if(ce<=A)return String.fromCharCode.apply(String,ue);for(var me="",ge=0;ge<ce;)me+=String.fromCharCode.apply(String,ue.slice(ge,ge+=A));return me}(Q)}l.kMaxLength=d,i.TYPED_ARRAY_SUPPORT=function(){try{var x=new Uint8Array(1);return x.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},x.foo()===42}catch(w){return!1}}(),i.TYPED_ARRAY_SUPPORT||typeof console=="undefined"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),typeof Symbol!="undefined"&&Symbol.species!=null&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(x,w,D){return p(x,w,D)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(x,w,D){return function(Q,ee,re){return c(Q),Q<=0?s(Q):ee!==void 0?typeof re=="string"?s(Q).fill(ee,re):s(Q).fill(ee):s(Q)}(x,w,D)},i.allocUnsafe=function(x){return f(x)},i.allocUnsafeSlow=function(x){return f(x)},i.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==i.prototype},i.compare=function(x,w){if(ie(x,Uint8Array)&&(x=i.from(x,x.offset,x.byteLength)),ie(w,Uint8Array)&&(w=i.from(w,w.offset,w.byteLength)),!i.isBuffer(x)||!i.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===w)return 0;for(var D=x.length,Q=w.length,ee=0,re=Math.min(D,Q);ee<re;++ee)if(x[ee]!==w[ee]){D=x[ee],Q=w[ee];break}return D<Q?-1:Q<D?1:0},i.isEncoding=function(x){switch(String(x).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}},i.concat=function(x,w){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return i.alloc(0);var D;if(w===void 0)for(w=0,D=0;D<x.length;++D)w+=x[D].length;var Q=i.allocUnsafe(w),ee=0;for(D=0;D<x.length;++D){var re=x[D];if(ie(re,Uint8Array)&&(re=i.from(re)),!i.isBuffer(re))throw new TypeError('"list" argument must be an Array of Buffers');re.copy(Q,ee),ee+=re.length}return Q},i.byteLength=m,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var x=this.length;if(x%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var w=0;w<x;w+=2)g(this,w,w+1);return this},i.prototype.swap32=function(){var x=this.length;if(x%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var w=0;w<x;w+=4)g(this,w,w+3),g(this,w+1,w+2);return this},i.prototype.swap64=function(){var x=this.length;if(x%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var w=0;w<x;w+=8)g(this,w,w+7),g(this,w+1,w+6),g(this,w+2,w+5),g(this,w+3,w+4);return this},i.prototype.toString=function(){var x=this.length;return x===0?"":arguments.length===0?E(this,0,x):function(w,D,Q){var ee=!1;if((D===void 0||D<0)&&(D=0),D>this.length||((Q===void 0||Q>this.length)&&(Q=this.length),Q<=0)||(Q>>>=0)<=(D>>>=0))return"";for(w||(w="utf8");;)switch(w){case"hex":return z(this,D,Q);case"utf8":case"utf-8":return E(this,D,Q);case"ascii":return C(this,D,Q);case"latin1":case"binary":return I(this,D,Q);case"base64":return j(this,D,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,D,Q);default:if(ee)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),ee=!0}}.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(x){if(!i.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x||i.compare(this,x)===0},i.prototype.inspect=function(){var x="",w=l.INSPECT_MAX_BYTES;return x=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(x+=" ... "),"<Buffer "+x+">"},i.prototype.compare=function(x,w,D,Q,ee){if(ie(x,Uint8Array)&&(x=i.from(x,x.offset,x.byteLength)),!i.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(w===void 0&&(w=0),D===void 0&&(D=x?x.length:0),Q===void 0&&(Q=0),ee===void 0&&(ee=this.length),w<0||D>x.length||Q<0||ee>this.length)throw new RangeError("out of range index");if(Q>=ee&&w>=D)return 0;if(Q>=ee)return-1;if(w>=D)return 1;if(w>>>=0,D>>>=0,Q>>>=0,ee>>>=0,this===x)return 0;for(var re=ee-Q,se=D-w,$=Math.min(re,se),S=this.slice(Q,ee),k=x.slice(w,D),X=0;X<$;++X)if(S[X]!==k[X]){re=S[X],se=k[X];break}return re<se?-1:se<re?1:0},i.prototype.includes=function(x,w,D){return this.indexOf(x,w,D)!==-1},i.prototype.indexOf=function(x,w,D){return b(this,x,w,D,!0)},i.prototype.lastIndexOf=function(x,w,D){return b(this,x,w,D,!1)},i.prototype.write=function(x,w,D,Q){if(w===void 0)Q="utf8",D=this.length,w=0;else if(D===void 0&&typeof w=="string")Q=w,D=this.length,w=0;else{if(!isFinite(w))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");w>>>=0,isFinite(D)?(D>>>=0,Q===void 0&&(Q="utf8")):(Q=D,D=void 0)}var ee=this.length-w;if((D===void 0||D>ee)&&(D=ee),x.length>0&&(D<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var re=!1;;)switch(Q){case"hex":return _(this,x,w,D);case"utf8":case"utf-8":return T(this,x,w,D);case"ascii":return B(this,x,w,D);case"latin1":case"binary":return F(this,x,w,D);case"base64":return R(this,x,w,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,x,w,D);default:if(re)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),re=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function C(x,w,D){var Q="";D=Math.min(x.length,D);for(var ee=w;ee<D;++ee)Q+=String.fromCharCode(127&x[ee]);return Q}function I(x,w,D){var Q="";D=Math.min(x.length,D);for(var ee=w;ee<D;++ee)Q+=String.fromCharCode(x[ee]);return Q}function z(x,w,D){var Q=x.length;(!w||w<0)&&(w=0),(!D||D<0||D>Q)&&(D=Q);for(var ee="",re=w;re<D;++re)ee+=K(x[re]);return ee}function W(x,w,D){for(var Q=x.slice(w,D),ee="",re=0;re<Q.length;re+=2)ee+=String.fromCharCode(Q[re]+256*Q[re+1]);return ee}function G(x,w,D){if(x%1!=0||x<0)throw new RangeError("offset is not uint");if(x+w>D)throw new RangeError("Trying to access beyond buffer length")}function q(x,w,D,Q,ee,re){if(!i.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>ee||w<re)throw new RangeError('"value" argument is out of bounds');if(D+Q>x.length)throw new RangeError("Index out of range")}function N(x,w,D,Q,ee,re){if(D+Q>x.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("Index out of range")}function V(x,w,D,Q,ee){return w=+w,D>>>=0,ee||N(x,0,D,4),u.write(x,w,D,Q,23,4),D+4}function L(x,w,D,Q,ee){return w=+w,D>>>=0,ee||N(x,0,D,8),u.write(x,w,D,Q,52,8),D+8}i.prototype.slice=function(x,w){var D=this.length;x=~~x,w=w===void 0?D:~~w,x<0?(x+=D)<0&&(x=0):x>D&&(x=D),w<0?(w+=D)<0&&(w=0):w>D&&(w=D),w<x&&(w=x);var Q=this.subarray(x,w);return Q.__proto__=i.prototype,Q},i.prototype.readUIntLE=function(x,w,D){x>>>=0,w>>>=0,D||G(x,w,this.length);for(var Q=this[x],ee=1,re=0;++re<w&&(ee*=256);)Q+=this[x+re]*ee;return Q},i.prototype.readUIntBE=function(x,w,D){x>>>=0,w>>>=0,D||G(x,w,this.length);for(var Q=this[x+--w],ee=1;w>0&&(ee*=256);)Q+=this[x+--w]*ee;return Q},i.prototype.readUInt8=function(x,w){return x>>>=0,w||G(x,1,this.length),this[x]},i.prototype.readUInt16LE=function(x,w){return x>>>=0,w||G(x,2,this.length),this[x]|this[x+1]<<8},i.prototype.readUInt16BE=function(x,w){return x>>>=0,w||G(x,2,this.length),this[x]<<8|this[x+1]},i.prototype.readUInt32LE=function(x,w){return x>>>=0,w||G(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+16777216*this[x+3]},i.prototype.readUInt32BE=function(x,w){return x>>>=0,w||G(x,4,this.length),16777216*this[x]+(this[x+1]<<16|this[x+2]<<8|this[x+3])},i.prototype.readIntLE=function(x,w,D){x>>>=0,w>>>=0,D||G(x,w,this.length);for(var Q=this[x],ee=1,re=0;++re<w&&(ee*=256);)Q+=this[x+re]*ee;return Q>=(ee*=128)&&(Q-=Math.pow(2,8*w)),Q},i.prototype.readIntBE=function(x,w,D){x>>>=0,w>>>=0,D||G(x,w,this.length);for(var Q=w,ee=1,re=this[x+--Q];Q>0&&(ee*=256);)re+=this[x+--Q]*ee;return re>=(ee*=128)&&(re-=Math.pow(2,8*w)),re},i.prototype.readInt8=function(x,w){return x>>>=0,w||G(x,1,this.length),128&this[x]?-1*(255-this[x]+1):this[x]},i.prototype.readInt16LE=function(x,w){x>>>=0,w||G(x,2,this.length);var D=this[x]|this[x+1]<<8;return 32768&D?4294901760|D:D},i.prototype.readInt16BE=function(x,w){x>>>=0,w||G(x,2,this.length);var D=this[x+1]|this[x]<<8;return 32768&D?4294901760|D:D},i.prototype.readInt32LE=function(x,w){return x>>>=0,w||G(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},i.prototype.readInt32BE=function(x,w){return x>>>=0,w||G(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},i.prototype.readFloatLE=function(x,w){return x>>>=0,w||G(x,4,this.length),u.read(this,x,!0,23,4)},i.prototype.readFloatBE=function(x,w){return x>>>=0,w||G(x,4,this.length),u.read(this,x,!1,23,4)},i.prototype.readDoubleLE=function(x,w){return x>>>=0,w||G(x,8,this.length),u.read(this,x,!0,52,8)},i.prototype.readDoubleBE=function(x,w){return x>>>=0,w||G(x,8,this.length),u.read(this,x,!1,52,8)},i.prototype.writeUIntLE=function(x,w,D,Q){x=+x,w>>>=0,D>>>=0,Q||q(this,x,w,D,Math.pow(2,8*D)-1,0);var ee=1,re=0;for(this[w]=255&x;++re<D&&(ee*=256);)this[w+re]=x/ee&255;return w+D},i.prototype.writeUIntBE=function(x,w,D,Q){x=+x,w>>>=0,D>>>=0,Q||q(this,x,w,D,Math.pow(2,8*D)-1,0);var ee=D-1,re=1;for(this[w+ee]=255&x;--ee>=0&&(re*=256);)this[w+ee]=x/re&255;return w+D},i.prototype.writeUInt8=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,1,255,0),this[w]=255&x,w+1},i.prototype.writeUInt16LE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,2,65535,0),this[w]=255&x,this[w+1]=x>>>8,w+2},i.prototype.writeUInt16BE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,2,65535,0),this[w]=x>>>8,this[w+1]=255&x,w+2},i.prototype.writeUInt32LE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,4,4294967295,0),this[w+3]=x>>>24,this[w+2]=x>>>16,this[w+1]=x>>>8,this[w]=255&x,w+4},i.prototype.writeUInt32BE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,4,4294967295,0),this[w]=x>>>24,this[w+1]=x>>>16,this[w+2]=x>>>8,this[w+3]=255&x,w+4},i.prototype.writeIntLE=function(x,w,D,Q){if(x=+x,w>>>=0,!Q){var ee=Math.pow(2,8*D-1);q(this,x,w,D,ee-1,-ee)}var re=0,se=1,$=0;for(this[w]=255&x;++re<D&&(se*=256);)x<0&&$===0&&this[w+re-1]!==0&&($=1),this[w+re]=(x/se>>0)-$&255;return w+D},i.prototype.writeIntBE=function(x,w,D,Q){if(x=+x,w>>>=0,!Q){var ee=Math.pow(2,8*D-1);q(this,x,w,D,ee-1,-ee)}var re=D-1,se=1,$=0;for(this[w+re]=255&x;--re>=0&&(se*=256);)x<0&&$===0&&this[w+re+1]!==0&&($=1),this[w+re]=(x/se>>0)-$&255;return w+D},i.prototype.writeInt8=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,1,127,-128),x<0&&(x=255+x+1),this[w]=255&x,w+1},i.prototype.writeInt16LE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,2,32767,-32768),this[w]=255&x,this[w+1]=x>>>8,w+2},i.prototype.writeInt16BE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,2,32767,-32768),this[w]=x>>>8,this[w+1]=255&x,w+2},i.prototype.writeInt32LE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,4,2147483647,-2147483648),this[w]=255&x,this[w+1]=x>>>8,this[w+2]=x>>>16,this[w+3]=x>>>24,w+4},i.prototype.writeInt32BE=function(x,w,D){return x=+x,w>>>=0,D||q(this,x,w,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[w]=x>>>24,this[w+1]=x>>>16,this[w+2]=x>>>8,this[w+3]=255&x,w+4},i.prototype.writeFloatLE=function(x,w,D){return V(this,x,w,!0,D)},i.prototype.writeFloatBE=function(x,w,D){return V(this,x,w,!1,D)},i.prototype.writeDoubleLE=function(x,w,D){return L(this,x,w,!0,D)},i.prototype.writeDoubleBE=function(x,w,D){return L(this,x,w,!1,D)},i.prototype.copy=function(x,w,D,Q){if(!i.isBuffer(x))throw new TypeError("argument should be a Buffer");if(D||(D=0),Q||Q===0||(Q=this.length),w>=x.length&&(w=x.length),w||(w=0),Q>0&&Q<D&&(Q=D),Q===D||x.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),x.length-w<Q-D&&(Q=x.length-w+D);var ee=Q-D;if(this===x&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(w,D,Q);else if(this===x&&D<w&&w<Q)for(var re=ee-1;re>=0;--re)x[re+w]=this[re+D];else Uint8Array.prototype.set.call(x,this.subarray(D,Q),w);return ee},i.prototype.fill=function(x,w,D,Q){if(typeof x=="string"){if(typeof w=="string"?(Q=w,w=0,D=this.length):typeof D=="string"&&(Q=D,D=this.length),Q!==void 0&&typeof Q!="string")throw new TypeError("encoding must be a string");if(typeof Q=="string"&&!i.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);if(x.length===1){var ee=x.charCodeAt(0);(Q==="utf8"&&ee<128||Q==="latin1")&&(x=ee)}}else typeof x=="number"&&(x&=255);if(w<0||this.length<w||this.length<D)throw new RangeError("Out of range index");if(D<=w)return this;var re;if(w>>>=0,D=D===void 0?this.length:D>>>0,x||(x=0),typeof x=="number")for(re=w;re<D;++re)this[re]=x;else{var se=i.isBuffer(x)?x:i.from(x,Q),$=se.length;if($===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(re=0;re<D-w;++re)this[re+w]=se[re%$]}return this};var O=/[^+/0-9A-Za-z-_]/g;function K(x){return x<16?"0"+x.toString(16):x.toString(16)}function H(x,w){var D;w=w||1/0;for(var Q=x.length,ee=null,re=[],se=0;se<Q;++se){if((D=x.charCodeAt(se))>55295&&D<57344){if(!ee){if(D>56319){(w-=3)>-1&&re.push(239,191,189);continue}if(se+1===Q){(w-=3)>-1&&re.push(239,191,189);continue}ee=D;continue}if(D<56320){(w-=3)>-1&&re.push(239,191,189),ee=D;continue}D=65536+(ee-55296<<10|D-56320)}else ee&&(w-=3)>-1&&re.push(239,191,189);if(ee=null,D<128){if((w-=1)<0)break;re.push(D)}else if(D<2048){if((w-=2)<0)break;re.push(D>>6|192,63&D|128)}else if(D<65536){if((w-=3)<0)break;re.push(D>>12|224,D>>6&63|128,63&D|128)}else{if(!(D<1114112))throw new Error("Invalid code point");if((w-=4)<0)break;re.push(D>>18|240,D>>12&63|128,D>>6&63|128,63&D|128)}}return re}function J(x){return o.toByteArray(function(w){if((w=(w=w.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;w.length%4!=0;)w+="=";return w}(x))}function ne(x,w,D,Q){for(var ee=0;ee<Q&&!(ee+D>=w.length||ee>=x.length);++ee)w[ee+D]=x[ee];return ee}function ie(x,w){return x instanceof w||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===w.name}function te(x){return x!=x}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(t,n,l){(function(a){(function(){l.formatArgs=function(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;u.splice(1,0,d,"color: inherit");let s=0,i=0;u[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&p==="%c"&&(i=++s)}),u.splice(i,0,d)},l.save=function(u){try{u?l.storage.setItem("debug",u):l.storage.removeItem("debug")}catch(d){}},l.load=function(){let u;try{u=l.storage.getItem("debug")}catch(d){}return!u&&a!==void 0&&"env"in a&&(u=a.env.DEBUG),u},l.useColors=function(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},l.storage=function(){try{return localStorage}catch(u){}}(),l.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),l.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],l.log=console.debug||console.log||(()=>{}),n.exports=t("./common")(l);const{formatters:o}=n.exports;o.j=function(u){try{return JSON.stringify(u)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}}).call(this)}).call(this,t("_process"))},{"./common":19,_process:50}],19:[function(t,n,l){n.exports=function(a){function o(s){let i,p,c,f=null;function h(...v){if(!h.enabled)return;const m=h,g=Number(new Date),b=g-(i||g);m.diff=b,m.prev=i,m.curr=g,i=g,v[0]=o.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let y=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(_,T)=>{if(_==="%%")return"%";y++;const B=o.formatters[T];if(typeof B=="function"){const F=v[y];_=B.call(m,F),v.splice(y,1),y--}return _}),o.formatArgs.call(m,v),(m.log||o.log).apply(m,v)}return h.namespace=s,h.useColors=o.useColors(),h.color=o.selectColor(s),h.extend=u,h.destroy=o.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==o.namespaces&&(p=o.namespaces,c=o.enabled(s)),c),set:v=>{f=v}}),typeof o.init=="function"&&o.init(h),h}function u(s,i){const p=o(this.namespace+(i===void 0?":":i)+s);return p.log=this.log,p}function d(s){return s.toString().substring(2,s.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(s){return s instanceof Error?s.stack||s.message:s},o.disable=function(){const s=[...o.names.map(d),...o.skips.map(d).map(i=>"-"+i)].join(",");return o.enable(""),s},o.enable=function(s){let i;o.save(s),o.namespaces=s,o.names=[],o.skips=[];const p=(typeof s=="string"?s:"").split(/[\s,]+/),c=p.length;for(i=0;i<c;i++)p[i]&&((s=p[i].replace(/\*/g,".*?"))[0]==="-"?o.skips.push(new RegExp("^"+s.substr(1)+"$")):o.names.push(new RegExp("^"+s+"$")))},o.enabled=function(s){if(s[s.length-1]==="*")return!0;let i,p;for(i=0,p=o.skips.length;i<p;i++)if(o.skips[i].test(s))return!1;for(i=0,p=o.names.length;i<p;i++)if(o.names[i].test(s))return!0;return!1},o.humanize=t("ms"),o.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(a).forEach(s=>{o[s]=a[s]}),o.names=[],o.skips=[],o.formatters={},o.selectColor=function(s){let i=0;for(let p=0;p<s.length;p++)i=(i<<5)-i+s.charCodeAt(p),i|=0;return o.colors[Math.abs(i)%o.colors.length]},o.enable(o.load()),o}},{ms:45}],20:[function(t,n,l){(function(a,o){(function(){var u=t("readable-stream"),d=t("end-of-stream"),s=t("inherits"),i=t("stream-shift"),p=o.from&&o.from!==Uint8Array.from?o.from([0]):new o([0]),c=function(m,g){m._corked?m.once("uncork",g):g()},f=function(m,g){return function(b){b?function(y,_){y._autoDestroy&&y.destroy(_)}(m,b.message==="premature close"?null:b):g&&!m._ended&&m.end()}},h=function(){},v=function(m,g,b){if(!(this instanceof v))return new v(m,g,b);u.Duplex.call(this,b),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!b||b.autoDestroy!==!1,this._forwardDestroy=!b||b.destroy!==!1,this._forwardEnd=!b||b.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,m&&this.setWritable(m),g&&this.setReadable(g)};s(v,u.Duplex),v.obj=function(m,g,b){return b||(b={}),b.objectMode=!0,b.highWaterMark=16,new v(m,g,b)},v.prototype.cork=function(){++this._corked==1&&this.emit("cork")},v.prototype.uncork=function(){this._corked&&--this._corked==0&&this.emit("uncork")},v.prototype.setWritable=function(m){if(this._unwrite&&this._unwrite(),this.destroyed)m&&m.destroy&&m.destroy();else if(m!==null&&m!==!1){var g=this,b=d(m,{writable:!0,readable:!1},f(this,this._forwardEnd)),y=function(){var _=g._ondrain;g._ondrain=null,_&&_()};this._unwrite&&a.nextTick(y),this._writable=m,this._writable.on("drain",y),this._unwrite=function(){g._writable.removeListener("drain",y),b()},this.uncork()}else this.end()},v.prototype.setReadable=function(m){if(this._unread&&this._unread(),this.destroyed)m&&m.destroy&&m.destroy();else{if(m===null||m===!1)return this.push(null),void this.resume();var g,b=this,y=d(m,{writable:!1,readable:!0},f(this)),_=function(){b._forward()},T=function(){b.push(null)};this._drained=!0,this._readable=m,this._readable2=m._readableState?m:(g=m,new u.Readable({objectMode:!0,highWaterMark:16}).wrap(g)),this._readable2.on("readable",_),this._readable2.on("end",T),this._unread=function(){b._readable2.removeListener("readable",_),b._readable2.removeListener("end",T),y()},this._forward()}},v.prototype._read=function(){this._drained=!0,this._forward()},v.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var m;for(this._forwarding=!0;this._drained&&(m=i(this._readable2))!==null;)this.destroyed||(this._drained=this.push(m));this._forwarding=!1}},v.prototype.destroy=function(m,g){if(g||(g=h),this.destroyed)return g(null);this.destroyed=!0;var b=this;a.nextTick(function(){b._destroy(m),g(null)})},v.prototype._destroy=function(m){if(m){var g=this._ondrain;this._ondrain=null,g?g(m):this.emit("error",m)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},v.prototype._write=function(m,g,b){if(!this.destroyed)return this._corked?c(this,this._write.bind(this,m,g,b)):m===p?this._finish(b):this._writable?void(this._writable.write(m)===!1?this._ondrain=b:this.destroyed||b()):b()},v.prototype._finish=function(m){var g=this;this.emit("preend"),c(this,function(){var b,y;b=g._forwardEnd&&g._writable,y=function(){g._writableState.prefinished===!1&&(g._writableState.prefinished=!0),g.emit("prefinish"),c(g,m)},b?b._writableState&&b._writableState.finished?y():b._writableState?b.end(y):(b.end(),y()):y()})},v.prototype.end=function(m,g,b){return typeof m=="function"?this.end(null,null,m):typeof g=="function"?this.end(m,null,g):(this._ended=!0,m&&this.write(m),this._writableState.ending||this._writableState.destroyed||this.write(p),u.Writable.prototype.end.call(this,b))},n.exports=v}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(t,n,l){(function(a){(function(){var o=t("once"),u=function(){},d=function(s,i,p){if(typeof i=="function")return d(s,null,i);i||(i={}),p=o(p||u);var c=s._writableState,f=s._readableState,h=i.readable||i.readable!==!1&&s.readable,v=i.writable||i.writable!==!1&&s.writable,m=!1,g=function(){s.writable||b()},b=function(){v=!1,h||p.call(s)},y=function(){h=!1,v||p.call(s)},_=function(Z){p.call(s,Z?new Error("exited with error code: "+Z):null)},T=function(Z){p.call(s,Z)},B=function(){a.nextTick(F)},F=function(){if(!m)return(!h||f&&f.ended&&!f.destroyed)&&(!v||c&&c.ended&&!c.destroyed)?void 0:p.call(s,new Error("premature close"))},R=function(){s.req.on("finish",b)};return function(Z){return Z.setHeader&&typeof Z.abort=="function"}(s)?(s.on("complete",b),s.on("abort",B),s.req?R():s.on("request",R)):v&&!c&&(s.on("end",g),s.on("close",g)),function(Z){return Z.stdio&&Array.isArray(Z.stdio)&&Z.stdio.length===3}(s)&&s.on("exit",_),s.on("end",y),s.on("finish",b),i.error!==!1&&s.on("error",T),s.on("close",B),function(){m=!0,s.removeListener("complete",b),s.removeListener("abort",B),s.removeListener("request",R),s.req&&s.req.removeListener("finish",b),s.removeListener("end",g),s.removeListener("close",g),s.removeListener("finish",b),s.removeListener("exit",_),s.removeListener("end",y),s.removeListener("error",T),s.removeListener("close",B)}};n.exports=d}).call(this)}).call(this,t("_process"))},{_process:50,once:48}],22:[function(t,n,l){var a=Object.create||function(y){var _=function(){};return _.prototype=y,new _},o=Object.keys||function(y){var _=[];for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&_.push(T);return T},u=Function.prototype.bind||function(y){var _=this;return function(){return _.apply(y,arguments)}};function d(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=a(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}n.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0;var s,i=10;try{var p={};Object.defineProperty&&Object.defineProperty(p,"x",{value:0}),s=p.x===0}catch(y){s=!1}function c(y){return y._maxListeners===void 0?d.defaultMaxListeners:y._maxListeners}function f(y,_,T,B){var F,R,Z;if(typeof T!="function")throw new TypeError('"listener" argument must be a function');if((R=y._events)?(R.newListener&&(y.emit("newListener",_,T.listener?T.listener:T),R=y._events),Z=R[_]):(R=y._events=a(null),y._eventsCount=0),Z){if(typeof Z=="function"?Z=R[_]=B?[T,Z]:[Z,T]:B?Z.unshift(T):Z.push(T),!Z.warned&&(F=c(y))&&F>0&&Z.length>F){Z.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+Z.length+' "'+String(_)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');j.name="MaxListenersExceededWarning",j.emitter=y,j.type=_,j.count=Z.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",j.name,j.message)}}else Z=R[_]=T,++y._eventsCount;return y}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var y=new Array(arguments.length),_=0;_<y.length;++_)y[_]=arguments[_];this.listener.apply(this.target,y)}}function v(y,_,T){var B={fired:!1,wrapFn:void 0,target:y,type:_,listener:T},F=u.call(h,B);return F.listener=T,B.wrapFn=F,F}function m(y,_,T){var B=y._events;if(!B)return[];var F=B[_];return F?typeof F=="function"?T?[F.listener||F]:[F]:T?function(R){for(var Z=new Array(R.length),j=0;j<Z.length;++j)Z[j]=R[j].listener||R[j];return Z}(F):b(F,F.length):[]}function g(y){var _=this._events;if(_){var T=_[y];if(typeof T=="function")return 1;if(T)return T.length}return 0}function b(y,_){for(var T=new Array(_),B=0;B<_;++B)T[B]=y[B];return T}s?Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(y){if(typeof y!="number"||y<0||y!=y)throw new TypeError('"defaultMaxListeners" must be a positive number');i=y}}):d.defaultMaxListeners=i,d.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||isNaN(y))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=y,this},d.prototype.getMaxListeners=function(){return c(this)},d.prototype.emit=function(y){var _,T,B,F,R,Z,j=y==="error";if(Z=this._events)j=j&&Z.error==null;else if(!j)return!1;if(j){if(arguments.length>1&&(_=arguments[1]),_ instanceof Error)throw _;var E=new Error('Unhandled "error" event. ('+_+")");throw E.context=_,E}if(!(T=Z[y]))return!1;var A=typeof T=="function";switch(B=arguments.length){case 1:(function(C,I,z){if(I)C.call(z);else for(var W=C.length,G=b(C,W),q=0;q<W;++q)G[q].call(z)})(T,A,this);break;case 2:(function(C,I,z,W){if(I)C.call(z,W);else for(var G=C.length,q=b(C,G),N=0;N<G;++N)q[N].call(z,W)})(T,A,this,arguments[1]);break;case 3:(function(C,I,z,W,G){if(I)C.call(z,W,G);else for(var q=C.length,N=b(C,q),V=0;V<q;++V)N[V].call(z,W,G)})(T,A,this,arguments[1],arguments[2]);break;case 4:(function(C,I,z,W,G,q){if(I)C.call(z,W,G,q);else for(var N=C.length,V=b(C,N),L=0;L<N;++L)V[L].call(z,W,G,q)})(T,A,this,arguments[1],arguments[2],arguments[3]);break;default:for(F=new Array(B-1),R=1;R<B;R++)F[R-1]=arguments[R];(function(C,I,z,W){if(I)C.apply(z,W);else for(var G=C.length,q=b(C,G),N=0;N<G;++N)q[N].apply(z,W)})(T,A,this,F)}return!0},d.prototype.addListener=function(y,_){return f(this,y,_,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(y,_){return f(this,y,_,!0)},d.prototype.once=function(y,_){if(typeof _!="function")throw new TypeError('"listener" argument must be a function');return this.on(y,v(this,y,_)),this},d.prototype.prependOnceListener=function(y,_){if(typeof _!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(y,v(this,y,_)),this},d.prototype.removeListener=function(y,_){var T,B,F,R,Z;if(typeof _!="function")throw new TypeError('"listener" argument must be a function');if(!(B=this._events))return this;if(!(T=B[y]))return this;if(T===_||T.listener===_)--this._eventsCount==0?this._events=a(null):(delete B[y],B.removeListener&&this.emit("removeListener",y,T.listener||_));else if(typeof T!="function"){for(F=-1,R=T.length-1;R>=0;R--)if(T[R]===_||T[R].listener===_){Z=T[R].listener,F=R;break}if(F<0)return this;F===0?T.shift():function(j,E){for(var A=E,C=A+1,I=j.length;C<I;A+=1,C+=1)j[A]=j[C];j.pop()}(T,F),T.length===1&&(B[y]=T[0]),B.removeListener&&this.emit("removeListener",y,Z||_)}return this},d.prototype.removeAllListeners=function(y){var _,T,B;if(!(T=this._events))return this;if(!T.removeListener)return arguments.length===0?(this._events=a(null),this._eventsCount=0):T[y]&&(--this._eventsCount==0?this._events=a(null):delete T[y]),this;if(arguments.length===0){var F,R=o(T);for(B=0;B<R.length;++B)(F=R[B])!=="removeListener"&&this.removeAllListeners(F);return this.removeAllListeners("removeListener"),this._events=a(null),this._eventsCount=0,this}if(typeof(_=T[y])=="function")this.removeListener(y,_);else if(_)for(B=_.length-1;B>=0;B--)this.removeListener(y,_[B]);return this},d.prototype.listeners=function(y){return m(this,y,!0)},d.prototype.rawListeners=function(y){return m(this,y,!1)},d.listenerCount=function(y,_){return typeof y.listenerCount=="function"?y.listenerCount(_):g.call(y,_)},d.prototype.listenerCount=g,d.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],23:[function(t,n,l){l.read=function(a,o,u,d,s){var i,p,c=8*s-d-1,f=(1<<c)-1,h=f>>1,v=-7,m=u?s-1:0,g=u?-1:1,b=a[o+m];for(m+=g,i=b&(1<<-v)-1,b>>=-v,v+=c;v>0;i=256*i+a[o+m],m+=g,v-=8);for(p=i&(1<<-v)-1,i>>=-v,v+=d;v>0;p=256*p+a[o+m],m+=g,v-=8);if(i===0)i=1-h;else{if(i===f)return p?NaN:1/0*(b?-1:1);p+=Math.pow(2,d),i-=h}return(b?-1:1)*p*Math.pow(2,i-d)},l.write=function(a,o,u,d,s,i){var p,c,f,h=8*i-s-1,v=(1<<h)-1,m=v>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=d?0:i-1,y=d?1:-1,_=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(c=isNaN(o)?1:0,p=v):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+m>=1?g/f:g*Math.pow(2,1-m))*f>=2&&(p++,f/=2),p+m>=v?(c=0,p=v):p+m>=1?(c=(o*f-1)*Math.pow(2,s),p+=m):(c=o*Math.pow(2,m-1)*Math.pow(2,s),p=0));s>=8;a[u+b]=255&c,b+=y,c/=256,s-=8);for(p=p<<s|c,h+=s;h>0;a[u+b]=255&p,b+=y,p/=256,h-=8);a[u+b-y]|=128*_}},{}],24:[function(t,n,l){typeof Object.create=="function"?n.exports=function(a,o){o&&(a.super_=o,a.prototype=Object.create(o.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(a,o){if(o){a.super_=o;var u=function(){};u.prototype=o.prototype,a.prototype=new u,a.prototype.constructor=a}}},{}],25:[function(t,n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=function(){function o(u,d){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=u,this.value=d}return o.prototype.rotateLeft=function(){var u=this.parent,d=this.brother,s=this.leftChild,i=this.rightChild;if(!i)throw new Error("unknown error");var p=i.leftChild,c=i.rightChild;return u&&(u.leftChild===this?u.leftChild=i:u.rightChild===this&&(u.rightChild=i)),i.parent=u,i.brother=d,i.leftChild=this,i.rightChild=c,d&&(d.brother=i),this.parent=i,this.brother=c,this.leftChild=s,this.rightChild=p,c&&(c.parent=i,c.brother=this),s&&(s.parent=this,s.brother=p),p&&(p.parent=this,p.brother=s),i},o.prototype.rotateRight=function(){var u=this.parent,d=this.brother,s=this.leftChild;if(!s)throw new Error("unknown error");var i=this.rightChild,p=s.leftChild,c=s.rightChild;return u&&(u.leftChild===this?u.leftChild=s:u.rightChild===this&&(u.rightChild=s)),s.parent=u,s.brother=d,s.leftChild=p,s.rightChild=this,d&&(d.brother=s),p&&(p.parent=s,p.brother=this),this.parent=s,this.brother=p,this.leftChild=c,this.rightChild=i,c&&(c.parent=this,c.brother=i),i&&(i.parent=this,i.brother=c),s},o.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},o.TreeNodeColorType={red:!0,black:!1},o}();Object.freeze(a),l.default=a},{}],26:[function(t,n,l){var a=this&&this.__generator||function(u,d){var s,i,p,c,f={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(v){return function(m){return function(g){if(s)throw new TypeError("Generator is already executing.");for(;f;)try{if(s=1,i&&(p=2&g[0]?i.return:g[0]?i.throw||((p=i.return)&&p.call(i),0):i.next)&&!(p=p.call(i,g[1])).done)return p;switch(i=0,p&&(g=[2&g[0],p.value]),g[0]){case 0:case 1:p=g;break;case 4:return f.label++,{value:g[1],done:!1};case 5:f.label++,i=g[1],g=[0];continue;case 7:g=f.ops.pop(),f.trys.pop();continue;default:if(!(p=(p=f.trys).length>0&&p[p.length-1])&&(g[0]===6||g[0]===2)){f=0;continue}if(g[0]===3&&(!p||g[1]>p[0]&&g[1]<p[3])){f.label=g[1];break}if(g[0]===6&&f.label<p[1]){f.label=p[1],p=g;break}if(p&&f.label<p[2]){f.label=p[2],f.ops.push(g);break}p[2]&&f.ops.pop(),f.trys.pop();continue}g=d.call(u,f)}catch(b){g=[6,b],i=0}finally{s=p=0}if(5&g[0])throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}([v,m])}}};function o(u){var d=this;u===void 0&&(u=[]);var s=[],i=0,p=0,c=0,f=0,h=0,v=0;this.size=function(){return v},this.empty=function(){return v===0},this.clear=function(){i=c=p=f=h=v=0,g.call(this,o.bucketSize),v=0},this.front=function(){return s[i][p]},this.back=function(){return s[c][f]},this.forEach=function(b){if(!this.empty()){var y=0;if(i!==c){for(T=p;T<o.bucketSize;++T)b(s[i][T],y++);for(T=i+1;T<c;++T)for(var _=0;_<o.bucketSize;++_)b(s[T][_],y++);for(T=0;T<=f;++T)b(s[c][T],y++)}else for(var T=p;T<=f;++T)b(s[i][T],y++)}};var m=function(b){var y=i*o.bucketSize+p,_=y+b,T=c*o.bucketSize+f;if(_<y||_>T)throw new Error("pos should more than 0 and less than queue's size");return{curNodeBucketIndex:Math.floor(_/o.bucketSize),curNodePointerIndex:_%o.bucketSize}};this.getElementByPos=function(b){var y=m(b),_=y.curNodeBucketIndex,T=y.curNodePointerIndex;return s[_][T]},this.eraseElementByPos=function(b){var y=this;if(b<0||b>v)throw new Error("pos should more than 0 and less than queue's size");if(b===0)this.popFront();else if(b===this.size())this.popBack();else{for(var _=[],T=b+1;T<v;++T)_.push(this.getElementByPos(T));this.cut(b),this.popBack(),_.forEach(function(B){return y.pushBack(B)})}},this.eraseElementByValue=function(b){if(!this.empty()){var y=[];this.forEach(function(B){B!==b&&y.push(B)});for(var _=y.length,T=0;T<_;++T)this.setElementByPos(T,y[T]);this.cut(_-1)}};var g=function(b){for(var y=[],_=b*o.sigma,T=Math.max(Math.ceil(_/o.bucketSize),2),B=0;B<T;++B)y.push(new Array(o.bucketSize));var F=Math.ceil(b/o.bucketSize),R=Math.floor(T/2)-Math.floor(F/2),Z=R,j=0;if(this.size())for(B=0;B<F;++B){for(var E=0;E<o.bucketSize;++E)if(y[R+B][E]=this.front(),this.popFront(),this.empty()){Z=R+B,j=E;break}if(this.empty())break}s=y,i=R,p=0,c=Z,f=j,h=T,v=b};this.pushBack=function(b){this.empty()||(c===h-1&&f===o.bucketSize-1&&g.call(this,this.size()),f<o.bucketSize-1?++f:c<h-1&&(++c,f=0)),++v,s[c][f]=b},this.popBack=function(){this.empty()||(this.size()!==1&&(f>0?--f:i<c&&(--c,f=o.bucketSize-1)),v>0&&--v)},this.setElementByPos=function(b,y){var _=m(b),T=_.curNodeBucketIndex,B=_.curNodePointerIndex;s[T][B]=y},this.insert=function(b,y,_){var T=this;if(_===void 0&&(_=1),b===0)for(;_--;)this.pushFront(y);else if(b===this.size())for(;_--;)this.pushBack(y);else{for(var B=[],F=b;F<v;++F)B.push(this.getElementByPos(F));for(this.cut(b-1),F=0;F<_;++F)this.pushBack(y);B.forEach(function(R){return T.pushBack(R)})}},this.find=function(b){if(i===c){for(var y=p;y<=f;++y)if(s[i][y]===b)return!0;return!1}for(y=p;y<o.bucketSize;++y)if(s[i][y]===b)return!0;for(y=i+1;y<c;++y)for(var _=0;_<o.bucketSize;++_)if(s[y][_]===b)return!0;for(y=0;y<=f;++y)if(s[c][y]===b)return!0;return!1},this.reverse=function(){for(var b=0,y=v-1;b<y;){var _=this.getElementByPos(b);this.setElementByPos(b,this.getElementByPos(y)),this.setElementByPos(y,_),++b,--y}},this.unique=function(){if(!this.empty()){var b=[],y=this.front();this.forEach(function(T,B){B!==0&&T===y||(b.push(T),y=T)});for(var _=0;_<v;++_)this.setElementByPos(_,b[_]);this.cut(b.length-1)}},this.sort=function(b){var y=[];this.forEach(function(T){y.push(T)}),y.sort(b);for(var _=0;_<v;++_)this.setElementByPos(_,y[_])},this.pushFront=function(b){this.empty()||(i===0&&p===0&&g.call(this,this.size()),p>0?--p:i>0&&(--i,p=o.bucketSize-1)),++v,s[i][p]=b},this.popFront=function(){this.empty()||(this.size()!==1&&(p<o.bucketSize-1?++p:i<c&&(++i,p=0)),v>0&&--v)},this.shrinkToFit=function(){var b=this,y=[];this.forEach(function(F){y.push(F)});var _=y.length;s=[];for(var T=Math.ceil(_/o.bucketSize),B=0;B<T;++B)s.push(new Array(o.bucketSize));this.clear(),y.forEach(function(F){return b.pushBack(F)})},this.cut=function(b){if(b<0)this.clear();else{var y=m(b),_=y.curNodeBucketIndex,T=y.curNodePointerIndex;c=_,f=T,v=b+1}},this[Symbol.iterator]=function(){return function(){var b,y;return a(this,function(_){switch(_.label){case 0:if(v===0)return[2];if(i!==c)return[3,5];y=p,_.label=1;case 1:return y<=f?[4,s[i][y]]:[3,4];case 2:_.sent(),_.label=3;case 3:return++y,[3,1];case 4:return[2];case 5:y=p,_.label=6;case 6:return y<o.bucketSize?[4,s[i][y]]:[3,9];case 7:_.sent(),_.label=8;case 8:return++y,[3,6];case 9:y=i+1,_.label=10;case 10:if(!(y<c))return[3,15];b=0,_.label=11;case 11:return b<o.bucketSize?[4,s[y][b]]:[3,14];case 12:_.sent(),_.label=13;case 13:return++b,[3,11];case 14:return++y,[3,10];case 15:y=0,_.label=16;case 16:return y<=f?[4,s[c][y]]:[3,19];case 17:_.sent(),_.label=18;case 18:return++y,[3,16];case 19:return[2]}})}()},function(){var b=o.bucketSize;u.size?b=u.size():u.length&&(b=u.length);var y=b*o.sigma;h=Math.ceil(y/o.bucketSize),h=Math.max(h,3);for(var _=0;_<h;++_)s.push(new Array(o.bucketSize));var T=Math.ceil(b/o.bucketSize);i=Math.floor(h/2)-Math.floor(T/2),c=i,u.forEach(function(B){return d.pushBack(B)})}(),Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),o.sigma=3,o.bucketSize=5e3,Object.freeze(o),l.default=o},{}],27:[function(t,n,l){var a=this&&this.__generator||function(i,p){var c,f,h,v,m={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(b){return function(y){return function(_){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,f&&(h=2&_[0]?f.return:_[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,_[1])).done)return h;switch(f=0,h&&(_=[2&_[0],h.value]),_[0]){case 0:case 1:h=_;break;case 4:return m.label++,{value:_[1],done:!1};case 5:m.label++,f=_[1],_=[0];continue;case 7:_=m.ops.pop(),m.trys.pop();continue;default:if(!(h=(h=m.trys).length>0&&h[h.length-1])&&(_[0]===6||_[0]===2)){m=0;continue}if(_[0]===3&&(!h||_[1]>h[0]&&_[1]<h[3])){m.label=_[1];break}if(_[0]===6&&m.label<h[1]){m.label=h[1],h=_;break}if(h&&m.label<h[2]){m.label=h[2],m.ops.push(_);break}h[2]&&m.ops.pop(),m.trys.pop();continue}_=p.call(i,m)}catch(T){_=[6,T],f=0}finally{c=h=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([b,y])}}},o=this&&this.__values||function(i){var p=typeof Symbol=="function"&&Symbol.iterator,c=p&&i[p],f=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&f>=i.length&&(i=void 0),{value:i&&i[f++],done:!i}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../LinkList/LinkList"),d=t("../Map/Map");function s(i,p,c){var f=this;if(i===void 0&&(i=[]),p===void 0&&(p=s.initSize),c=c||function(g){var b,y,_=0,T="";if(typeof g=="number")_=((_=Math.floor(g))<<5)-_,_&=_;else{T=typeof g!="string"?JSON.stringify(g):g;try{for(var B=o(T),F=B.next();!F.done;F=B.next())_=(_<<5)-_+F.value.charCodeAt(0),_&=_}catch(R){b={error:R}}finally{try{F&&!F.done&&(y=B.return)&&y.call(B)}finally{if(b)throw b.error}}}return _^=_>>>16},(p&p-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var h=0,v=[],m=Math.max(s.initSize,Math.min(s.maxSize,p));this.size=function(){return h},this.empty=function(){return h===0},this.clear=function(){h=0,m=p,v=[]},this.forEach=function(g){var b=0;v.forEach(function(y){y.forEach(function(_){g(_,b++)})})},this.setElement=function(g,b){var y,_;if(g==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(b!=null){var T=c(g)&m-1;if(v[T]){var B=v[T].size();if(v[T]instanceof u.default){try{for(var F=o(v[T]),R=F.next();!R.done;R=F.next()){var Z=R.value;if(Z.key===g)return void(Z.value=b)}}catch(E){y={error:E}}finally{try{R&&!R.done&&(_=F.return)&&_.call(F)}finally{if(y)throw y.error}}v[T].pushBack({key:g,value:b}),v[T].size()>=s.treeifyThreshold&&(v[T]=new d.default(v[T]))}else v[T].setElement(g,b);var j=v[T].size();h+=j-B}else++h,v[T]=new u.default([{key:g,value:b}]);h>m*s.sigma&&function(E){if(!(E>=s.maxSize)){m=2*E;var A=[];v.forEach(function(C,I){if(!C.empty()){if(C instanceof u.default&&C.size()===1){var z=C.front(),W=z.key,G=z.value;A[c(W)&m-1]=new u.default([{key:W,value:G}])}else if(C instanceof d.default){var q=new u.default,N=new u.default;C.forEach(function(O){c(O.key)&E?N.pushBack(O):q.pushBack(O)}),q.size()>s.untreeifyThreshold?A[I]=new d.default(q):q.size()&&(A[I]=q),N.size()>s.untreeifyThreshold?A[I+E]=new d.default(N):N.size()&&(A[I+E]=N)}else{var V=new u.default,L=new u.default;C.forEach(function(O){c(O.key)&E?L.pushBack(O):V.pushBack(O)}),V.size()&&(A[I]=V),L.size()&&(A[I+E]=L)}v[I].clear()}}),v=A}}.call(this,m)}else this.eraseElementByKey(g)},this.getElementByKey=function(g){var b,y,_=c(g)&m-1;if(v[_]){if(v[_]instanceof d.default)return v[_].getElementByKey(g);try{for(var T=o(v[_]),B=T.next();!B.done;B=T.next()){var F=B.value;if(F.key===g)return F.value}}catch(R){b={error:R}}finally{try{B&&!B.done&&(y=T.return)&&y.call(T)}finally{if(b)throw b.error}}}},this.eraseElementByKey=function(g){var b,y,_=c(g)&m-1;if(v[_]){var T=v[_].size();if(v[_]instanceof d.default)v[_].eraseElementByKey(g),v[_].size()<=s.untreeifyThreshold&&(v[_]=new u.default(v[_]));else{var B=-1;try{for(var F=o(v[_]),R=F.next();!R.done;R=F.next())if(++B,R.value.key===g){v[_].eraseElementByPos(B);break}}catch(j){b={error:j}}finally{try{R&&!R.done&&(y=F.return)&&y.call(F)}finally{if(b)throw b.error}}}var Z=v[_].size();h+=Z-T}},this.find=function(g){var b,y,_=c(g)&m-1;if(!v[_])return!1;if(v[_]instanceof d.default)return v[_].find(g);try{for(var T=o(v[_]),B=T.next();!B.done;B=T.next())if(B.value.key===g)return!0}catch(F){b={error:F}}finally{try{B&&!B.done&&(y=T.return)&&y.call(T)}finally{if(b)throw b.error}}return!1},this[Symbol.iterator]=function(){return function(){var g,b,y,_,T,B;return a(this,function(F){switch(F.label){case 0:g=0,F.label=1;case 1:if(!(g<m))return[3,10];for(;g<m&&!v[g];)++g;if(g>=m)return[3,10];F.label=2;case 2:F.trys.push([2,7,8,9]),T=void 0,b=o(v[g]),y=b.next(),F.label=3;case 3:return y.done?[3,6]:[4,y.value];case 4:F.sent(),F.label=5;case 5:return y=b.next(),[3,3];case 6:return[3,9];case 7:return _=F.sent(),T={error:_},[3,9];case 8:try{y&&!y.done&&(B=b.return)&&B.call(b)}finally{if(T)throw T.error}return[7];case 9:return++g,[3,1];case 10:return[2]}})}()},i.forEach(function(g){var b=g.key,y=g.value;return f.setElement(b,y)}),Object.freeze(this)}s.initSize=16,s.maxSize=1<<30,s.sigma=.75,s.treeifyThreshold=8,s.untreeifyThreshold=6,s.minTreeifySize=64,Object.freeze(s),l.default=s},{"../LinkList/LinkList":29,"../Map/Map":30}],28:[function(t,n,l){var a=this&&this.__generator||function(i,p){var c,f,h,v,m={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(b){return function(y){return function(_){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,f&&(h=2&_[0]?f.return:_[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,_[1])).done)return h;switch(f=0,h&&(_=[2&_[0],h.value]),_[0]){case 0:case 1:h=_;break;case 4:return m.label++,{value:_[1],done:!1};case 5:m.label++,f=_[1],_=[0];continue;case 7:_=m.ops.pop(),m.trys.pop();continue;default:if(!(h=(h=m.trys).length>0&&h[h.length-1])&&(_[0]===6||_[0]===2)){m=0;continue}if(_[0]===3&&(!h||_[1]>h[0]&&_[1]<h[3])){m.label=_[1];break}if(_[0]===6&&m.label<h[1]){m.label=h[1],h=_;break}if(h&&m.label<h[2]){m.label=h[2],m.ops.push(_);break}h[2]&&m.ops.pop(),m.trys.pop();continue}_=p.call(i,m)}catch(T){_=[6,T],f=0}finally{c=h=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([b,y])}}},o=this&&this.__values||function(i){var p=typeof Symbol=="function"&&Symbol.iterator,c=p&&i[p],f=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&f>=i.length&&(i=void 0),{value:i&&i[f++],done:!i}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../Set/Set"),d=t("../LinkList/LinkList");function s(i,p,c){var f=this;if(i===void 0&&(i=[]),p===void 0&&(p=s.initSize),c=c||function(g){var b=0,y="";if(typeof g=="number")b=((b=Math.floor(g))<<5)-b,b&=b;else{y=typeof g!="string"?JSON.stringify(g):g;for(var _=0;_<y.length;_++)b=(b<<5)-b+y.charCodeAt(_),b&=b}return b^=b>>>16},(p&p-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var h=0,v=[],m=Math.max(s.initSize,Math.min(s.maxSize,p));this.size=function(){return h},this.empty=function(){return h===0},this.clear=function(){h=0,m=p,v=[]},this.forEach=function(g){var b=0;v.forEach(function(y){y.forEach(function(_){g(_,b++)})})},this.insert=function(g){if(g==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var b=c(g)&m-1;if(v[b]){var y=v[b].size();if(v[b]instanceof d.default){if(v[b].find(g))return;v[b].pushBack(g),v[b].size()>=s.treeifyThreshold&&(v[b]=new u.default(v[b]))}else v[b].insert(g);var _=v[b].size();h+=_-y}else v[b]=new d.default([g]),++h;h>m*s.sigma&&function(T){if(!(T>=s.maxSize)){m=2*T;var B=[];v.forEach(function(F,R){if(!F.empty()){if(F instanceof d.default&&F.size()===1){var Z=F.front();if(Z===void 0)throw new Error("unknown error");B[c(Z)&m-1]=new d.default([Z])}else if(F instanceof u.default){var j=new d.default,E=new d.default;F.forEach(function(I){c(I)&T?E.pushBack(I):j.pushBack(I)}),j.size()>s.untreeifyThreshold?B[R]=new u.default(j):j.size()&&(B[R]=j),E.size()>s.untreeifyThreshold?B[R+T]=new u.default(E):E.size()&&(B[R+T]=E)}else{var A=new d.default,C=new d.default;F.forEach(function(I){c(I)&T?C.pushBack(I):A.pushBack(I)}),A.size()&&(B[R]=A),C.size()&&(B[R+T]=C)}v[R].clear()}}),v=B}}.call(this,m)},this.eraseElementByValue=function(g){var b=c(g)&m-1;if(v[b]){var y=v[b].size();v[b].eraseElementByValue(g),v[b]instanceof u.default&&v[b].size()<=s.untreeifyThreshold&&(v[b]=new d.default(v[b]));var _=v[b].size();h+=_-y}},this.find=function(g){var b=c(g)&m-1;return!!v[b]&&v[b].find(g)},this[Symbol.iterator]=function(){return function(){var g,b,y,_,T,B;return a(this,function(F){switch(F.label){case 0:g=0,F.label=1;case 1:if(!(g<m))return[3,10];for(;g<m&&!v[g];)++g;if(g>=m)return[3,10];F.label=2;case 2:F.trys.push([2,7,8,9]),T=void 0,b=o(v[g]),y=b.next(),F.label=3;case 3:return y.done?[3,6]:[4,y.value];case 4:F.sent(),F.label=5;case 5:return y=b.next(),[3,3];case 6:return[3,9];case 7:return _=F.sent(),T={error:_},[3,9];case 8:try{y&&!y.done&&(B=b.return)&&B.call(b)}finally{if(T)throw T.error}return[7];case 9:return++g,[3,1];case 10:return[2]}})}()},i.forEach(function(g){return f.insert(g)}),Object.freeze(this)}s.initSize=16,s.maxSize=1<<30,s.sigma=.75,s.treeifyThreshold=8,s.untreeifyThreshold=6,s.minTreeifySize=64,Object.freeze(s),l.default=s},{"../LinkList/LinkList":29,"../Set/Set":33}],29:[function(t,n,l){var a=this&&this.__generator||function(d,s){var i,p,c,f,h={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return f={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function v(m){return function(g){return function(b){if(i)throw new TypeError("Generator is already executing.");for(;h;)try{if(i=1,p&&(c=2&b[0]?p.return:b[0]?p.throw||((c=p.return)&&c.call(p),0):p.next)&&!(c=c.call(p,b[1])).done)return c;switch(p=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,p=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!(c=(c=h.trys).length>0&&c[c.length-1])&&(b[0]===6||b[0]===2)){h=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){h.label=b[1];break}if(b[0]===6&&h.label<c[1]){h.label=c[1],c=b;break}if(c&&h.label<c[2]){h.label=c[2],h.ops.push(b);break}c[2]&&h.ops.pop(),h.trys.pop();continue}b=s.call(d,h)}catch(y){b=[6,y],p=0}finally{i=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([m,g])}}};Object.defineProperty(l,"__esModule",{value:!0});var o=function(){return function(d){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=d}}();function u(d){var s=this;d===void 0&&(d=[]);var i=0,p=void 0,c=void 0;this.size=function(){return i},this.empty=function(){return i===0},this.clear=function(){p=c=void 0,i=0},this.front=function(){return p==null?void 0:p.value},this.back=function(){return c==null?void 0:c.value},this.forEach=function(f){for(var h=p,v=0;h;){if(h.value===void 0)throw new Error("unknown error");f(h.value,v++),h=h.next}},this.getElementByPos=function(f){if(f<0||f>=i)throw new Error("pos must more then 0 and less then the list length");for(var h=p;f--&&h;)h=h.next;if(!h||h.value===void 0)throw new Error("unknown error");return h.value},this.eraseElementByPos=function(f){if(f<0||f>=i)throw new Error("erase pos must more then 0 and less then the list length");if(f===0)this.popFront();else if(f===i-1)this.popBack();else{for(var h=p;f--;){if(!(h!=null&&h.next))throw new Error("unknown error");h=h.next}if(!h||!h.pre||!h.next)throw new Error("unknown error");var v=h.pre,m=h.next;m.pre=v,v.next=m,i>0&&--i}},this.eraseElementByValue=function(f){for(;p&&p.value===f;)this.popFront();for(;c&&c.value===f;)this.popBack();if(p)for(var h=p;h;){if(h.value===f){var v=h.pre,m=h.next;m&&(m.pre=v),v&&(v.next=m),i>0&&--i}h=h.next}},this.pushBack=function(f){if(f==null)throw new Error("you can't push null or undefined here");++i;var h=new o(f);c?(c.next=h,h.pre=c,c=h):p=c=h},this.popBack=function(){c&&(i>0&&--i,c&&(p===c?p=c=void 0:(c=c.pre)&&(c.next=void 0)))},this.setElementByPos=function(f,h){if(h==null)throw new Error("you can't set null or undefined here");if(f<0||f>=i)throw new Error("pos must more then 0 and less then the list length");for(var v=p;f--;){if(!v)throw new Error("unknown error");v=v.next}v&&(v.value=h)},this.insert=function(f,h,v){if(v===void 0&&(v=1),h==null)throw new Error("you can't insert null or undefined here");if(f<0||f>i)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(v<0)throw new Error("insert size must more than 0");if(f===0)for(;v--;)this.pushFront(h);else if(f===i)for(;v--;)this.pushBack(h);else{for(var m=p,g=1;g<f;++g){if(!(m!=null&&m.next))throw new Error("unknown error");m=m==null?void 0:m.next}if(!m)throw new Error("unknown error");var b=m.next;for(i+=v;v--;)m.next=new o(h),m.next.pre=m,m=m.next;m.next=b,b&&(b.pre=m)}},this.find=function(f){for(var h=p;h;){if(h.value===f)return!0;h=h.next}return!1},this.reverse=function(){for(var f=p,h=c,v=0;f&&h&&2*v<i;){var m=f.value;f.value=h.value,h.value=m,f=f.next,h=h.pre,++v}},this.unique=function(){for(var f=p;f;){for(var h=f;h&&h.next&&h.value===h.next.value;)h=h.next,i>0&&--i;f.next=h.next,f.next&&(f.next.pre=f),f=f.next}},this.sort=function(f){var h=[];this.forEach(function(m){h.push(m)}),h.sort(f);var v=p;h.forEach(function(m){v&&(v.value=m,v=v.next)})},this.pushFront=function(f){if(f==null)throw new Error("you can't push null or undefined here");++i;var h=new o(f);p?(h.next=p,p.pre=h,p=h):p=c=h},this.popFront=function(){p&&(i>0&&--i,p&&(p===c?p=c=void 0:(p=p.next)&&(p.pre=void 0)))},this.merge=function(f){var h=this,v=p;f.forEach(function(m){for(;v&&v.value!==void 0&&v.value<=m;)v=v.next;if(v===void 0)h.pushBack(m),v=c;else if(v===p)h.pushFront(m),v=p;else{++i;var g=v.pre;g&&(g.next=new o(m),g.next.pre=g,g.next.next=v,v&&(v.pre=g.next))}})},this[Symbol.iterator]=function(){return function(){var f;return a(this,function(h){switch(h.label){case 0:f=p,h.label=1;case 1:if(f===void 0)return[3,3];if(!f.value)throw new Error("unknown error");return[4,f.value];case 2:return h.sent(),f=f.next,[3,1];case 3:return[2]}})}()},d.forEach(function(f){return s.pushBack(f)}),Object.freeze(this)}Object.freeze(u),l.default=u},{}],30:[function(t,n,l){var a=this&&this.__generator||function(s,i){var p,c,f,h,v={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(g){return function(b){return function(y){if(p)throw new TypeError("Generator is already executing.");for(;v;)try{if(p=1,c&&(f=2&y[0]?c.return:y[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,y[1])).done)return f;switch(c=0,f&&(y=[2&y[0],f.value]),y[0]){case 0:case 1:f=y;break;case 4:return v.label++,{value:y[1],done:!1};case 5:v.label++,c=y[1],y=[0];continue;case 7:y=v.ops.pop(),v.trys.pop();continue;default:if(!(f=(f=v.trys).length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){v=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){v.label=y[1];break}if(y[0]===6&&v.label<f[1]){v.label=f[1],f=y;break}if(f&&v.label<f[2]){v.label=f[2],v.ops.push(y);break}f[2]&&v.ops.pop(),v.trys.pop();continue}y=i.call(s,v)}catch(_){y=[6,_],c=0}finally{p=f=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([g,b])}}},o=this&&this.__values||function(s){var i=typeof Symbol=="function"&&Symbol.iterator,p=i&&s[i],c=0;if(p)return p.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../Base/TreeNode");function d(s,i){var p=this;s===void 0&&(s=[]),i=i||function(E,A){return E<A?-1:E>A?1:0};var c=0,f=new u.default;f.color=u.default.TreeNodeColorType.black,this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,f.key=f.value=void 0,f.leftChild=f.rightChild=f.brother=void 0};var h=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.leftChild?h(E.leftChild):E},v=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.rightChild?v(E.rightChild):E};this.front=function(){if(!this.empty()){var E=h(f);if(E.key===void 0||E.value===void 0)throw new Error("unknown error");return{key:E.key,value:E.value}}},this.back=function(){if(!this.empty()){var E=v(f);if(E.key===void 0||E.value===void 0)throw new Error("unknown error");return{key:E.key,value:E.value}}},this.forEach=function(E){var A,C,I=0;try{for(var z=o(this),W=z.next();!W.done;W=z.next())E(W.value,I++)}catch(G){A={error:G}}finally{try{W&&!W.done&&(C=z.return)&&C.call(z)}finally{if(A)throw A.error}}},this.getElementByPos=function(E){var A,C;if(E<0||E>=this.size())throw new Error("pos must more than 0 and less than set's size");var I=0;try{for(var z=o(this),W=z.next();!W.done;W=z.next()){var G=W.value;if(I===E)return G;++I}}catch(q){A={error:q}}finally{try{W&&!W.done&&(C=z.return)&&C.call(z)}finally{if(A)throw A.error}}throw new Error("unknown Error")};var m=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0){var C=i(E.key,A);return C===0?{key:E.key,value:E.value}:C<0?m(E.rightChild,A):m(E.leftChild,A)||{key:E.key,value:E.value}}};this.lowerBound=function(E){return m(f,E)};var g=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0)return i(E.key,A)<=0?g(E.rightChild,A):g(E.leftChild,A)||{key:E.key,value:E.value}};this.upperBound=function(E){return g(f,E)};var b=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0){var C=i(E.key,A);return C===0?{key:E.key,value:E.value}:C>0?b(E.leftChild,A):b(E.rightChild,A)||{key:E.key,value:E.value}}};this.reverseLowerBound=function(E){return b(f,E)};var y=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0)return i(E.key,A)>=0?y(E.leftChild,A):y(E.rightChild,A)||{key:E.key,value:E.value}};this.reverseUpperBound=function(E){return y(f,E)};var _=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(E.color!==u.default.TreeNodeColorType.red){var C=E.brother;if(!C)throw new Error("unknown error");if(E===A.leftChild)if(C.color===u.default.TreeNodeColorType.red){C.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red;var I=A.rotateLeft();f===A&&(f=I),_(E)}else C.color===u.default.TreeNodeColorType.black&&(C.rightChild&&C.rightChild.color===u.default.TreeNodeColorType.red?(C.color=A.color,A.color=u.default.TreeNodeColorType.black,C.rightChild&&(C.rightChild.color=u.default.TreeNodeColorType.black),I=A.rotateLeft(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):C.rightChild&&C.rightChild.color!==u.default.TreeNodeColorType.black||!C.leftChild||C.leftChild.color!==u.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==u.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==u.default.TreeNodeColorType.black||(C.color=u.default.TreeNodeColorType.red,_(A)):(C.color=u.default.TreeNodeColorType.red,C.leftChild&&(C.leftChild.color=u.default.TreeNodeColorType.black),I=C.rotateRight(),f===C&&(f=I),_(E)));else E===A.rightChild&&(C.color===u.default.TreeNodeColorType.red?(C.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red,I=A.rotateRight(),f===A&&(f=I),_(E)):C.color===u.default.TreeNodeColorType.black&&(C.leftChild&&C.leftChild.color===u.default.TreeNodeColorType.red?(C.color=A.color,A.color=u.default.TreeNodeColorType.black,C.leftChild&&(C.leftChild.color=u.default.TreeNodeColorType.black),I=A.rotateRight(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):C.leftChild&&C.leftChild.color!==u.default.TreeNodeColorType.black||!C.rightChild||C.rightChild.color!==u.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==u.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==u.default.TreeNodeColorType.black||(C.color=u.default.TreeNodeColorType.red,_(A)):(C.color=u.default.TreeNodeColorType.red,C.rightChild&&(C.rightChild.color=u.default.TreeNodeColorType.black),I=C.rotateLeft(),f===C&&(f=I),_(E))))}else E.color=u.default.TreeNodeColorType.black},T=function(E){for(var A=E;A.leftChild||A.rightChild;){if(A.rightChild){A=h(A.rightChild);var C=E.key;E.key=A.key,A.key=C;var I=E.value;E.value=A.value,A.value=I,E=A}A.leftChild&&(A=v(A.leftChild),C=E.key,E.key=A.key,A.key=C,I=E.value,E.value=A.value,A.value=I,E=A)}_(A),A&&A.remove(),--c,f.color=u.default.TreeNodeColorType.black},B=function(E,A){return!(!E||E.key===void 0)&&(!!B(E.leftChild,A)||!!A(E)||B(E.rightChild,A))};this.eraseElementByPos=function(E){if(E<0||E>=c)throw new Error("pos must more than 0 and less than set's size");var A=0;B(f,function(C){return E===A?(T(C),!0):(++A,!1)})},this.eraseElementByKey=function(E){if(!this.empty()){var A=Z(f,E);A!==void 0&&A.key!==void 0&&i(A.key,E)===0&&T(A)}};var F=function(E,A){if(!E||E.key===void 0)throw new Error("unknown error");var C=i(A,E.key);return C<0?E.leftChild?F(E.leftChild,A):(E.leftChild=new u.default,E.leftChild.parent=E,E.leftChild.brother=E.rightChild,E.rightChild&&(E.rightChild.brother=E.leftChild),E.leftChild):C>0?E.rightChild?F(E.rightChild,A):(E.rightChild=new u.default,E.rightChild.parent=E,E.rightChild.brother=E.leftChild,E.leftChild&&(E.leftChild.brother=E.rightChild),E.rightChild):E},R=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(A.color!==u.default.TreeNodeColorType.black&&A.color===u.default.TreeNodeColorType.red){var C=A.brother,I=A.parent;if(!I)throw new Error("unknown error");if(C&&C.color===u.default.TreeNodeColorType.red)C.color=A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,R(I);else if(!C||C.color===u.default.TreeNodeColorType.black)if(A===I.leftChild)if(E===A.leftChild){A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red;var z=I.rotateRight();I===f&&(f=z)}else E===A.rightChild&&(z=A.rotateLeft(),I===f&&(f=z),R(A));else A===I.rightChild&&(E===A.leftChild?(z=A.rotateRight(),I===f&&(f=z),R(A)):E===A.rightChild&&(A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,z=I.rotateLeft(),I===f&&(f=z)))}};this.setElement=function(E,A){if(E==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(A!=null){if(this.empty())return++c,f.key=E,f.value=A,void(f.color=u.default.TreeNodeColorType.black);var C=F(f,E);C.key===void 0||i(C.key,E)!==0?(++c,C.key=E,C.value=A,R(C),f.color=u.default.TreeNodeColorType.black):C.value=A}else this.eraseElementByKey(E)};var Z=function(E,A){if(E&&E.key!==void 0){var C=i(A,E.key);return C<0?Z(E.leftChild,A):C>0?Z(E.rightChild,A):E}};this.find=function(E){return!!Z(f,E)},this.getElementByKey=function(E){var A=Z(f,E);if((A==null?void 0:A.key)===void 0||(A==null?void 0:A.value)===void 0)throw new Error("unknown error");return A.value},this.union=function(E){var A=this;E.forEach(function(C){var I=C.key,z=C.value;return A.setElement(I,z)})},this.getHeight=function(){if(this.empty())return 0;var E=function(A){return A?Math.max(E(A.leftChild),E(A.rightChild))+1:1};return E(f)};var j=function(E){return a(this,function(A){switch(A.label){case 0:return E&&E.key!==void 0&&E.value!==void 0?[5,o(j(E.leftChild))]:[2];case 1:return A.sent(),[4,{key:E.key,value:E.value}];case 2:return A.sent(),[5,o(j(E.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return j(f)},s.forEach(function(E){var A=E.key,C=E.value;return p.setElement(A,C)}),Object.freeze(this)}Object.freeze(d),l.default=d},{"../Base/TreeNode":25}],31:[function(t,n,l){function a(o,u){o===void 0&&(o=[]),u=u||function(c,f){return c>f?-1:c<f?1:0};var d=[];o.forEach(function(c){return d.push(c)});var s=d.length,i=function(c,f){if(c<0||c>=s)throw new Error("unknown error");if(f<0||f>=s)throw new Error("unknown error");var h=d[c];d[c]=d[f],d[f]=h},p=function(c){if(c<0||c>=s)throw new Error("unknown error");var f=2*c+1,h=2*c+2;f<s&&u(d[c],d[f])>0&&i(c,f),h<s&&u(d[c],d[h])>0&&i(c,h)};(function(){for(var c=Math.floor((s-1)/2);c>=0;--c)for(var f=c,h=2*f+1;h<s;){var v=h+1,m=h;if(v<s&&u(d[h],d[v])>0&&(m=v),u(d[f],d[m])<=0)break;i(f,m),h=2*(f=m)+1}})(),this.size=function(){return s},this.empty=function(){return s===0},this.clear=function(){s=0,d.length=0},this.push=function(c){if(d.push(c),++s!==1)for(var f=s-1;f>0;){var h=Math.floor((f-1)/2);if(u(d[h],c)<=0)break;p(h),f=h}},this.pop=function(){if(!this.empty())if(this.size()!==1){var c=d[s-1];--s;for(var f=0;f<this.size();){var h=2*f+1,v=2*f+2;if(h>=this.size())break;var m=h;if(v<this.size()&&u(d[h],d[v])>0&&(m=v),u(d[m],c)>=0)break;d[f]=d[m],f=m}d[f]=c}else--s},this.top=function(){return d[0]},Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),Object.freeze(a),l.default=a},{}],32:[function(t,n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=t("../LinkList/LinkList");function o(u){u===void 0&&(u=[]);var d=new a.default(u);this.size=function(){return d.size()},this.empty=function(){return d.empty()},this.clear=function(){d.clear()},this.push=function(s){d.pushBack(s)},this.pop=function(){d.popFront()},this.front=function(){return d.front()},Object.freeze(this)}Object.freeze(o),l.default=o},{"../LinkList/LinkList":29}],33:[function(t,n,l){var a=this&&this.__generator||function(s,i){var p,c,f,h,v={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(g){return function(b){return function(y){if(p)throw new TypeError("Generator is already executing.");for(;v;)try{if(p=1,c&&(f=2&y[0]?c.return:y[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,y[1])).done)return f;switch(c=0,f&&(y=[2&y[0],f.value]),y[0]){case 0:case 1:f=y;break;case 4:return v.label++,{value:y[1],done:!1};case 5:v.label++,c=y[1],y=[0];continue;case 7:y=v.ops.pop(),v.trys.pop();continue;default:if(!(f=(f=v.trys).length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){v=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){v.label=y[1];break}if(y[0]===6&&v.label<f[1]){v.label=f[1],f=y;break}if(f&&v.label<f[2]){v.label=f[2],v.ops.push(y);break}f[2]&&v.ops.pop(),v.trys.pop();continue}y=i.call(s,v)}catch(_){y=[6,_],c=0}finally{p=f=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([g,b])}}},o=this&&this.__values||function(s){var i=typeof Symbol=="function"&&Symbol.iterator,p=i&&s[i],c=0;if(p)return p.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../Base/TreeNode");function d(s,i){var p=this;s===void 0&&(s=[]),i=i||function(E,A){return E<A?-1:E>A?1:0};var c=0,f=new u.default;f.color=u.default.TreeNodeColorType.black,this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,f.key=void 0,f.leftChild=f.rightChild=f.brother=f.parent=void 0,f.color=u.default.TreeNodeColorType.black};var h=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.leftChild?h(E.leftChild):E},v=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.rightChild?v(E.rightChild):E};this.front=function(){if(!this.empty())return h(f).key},this.back=function(){if(!this.empty())return v(f).key},this.forEach=function(E){var A,C,I=0;try{for(var z=o(this),W=z.next();!W.done;W=z.next())E(W.value,I++)}catch(G){A={error:G}}finally{try{W&&!W.done&&(C=z.return)&&C.call(z)}finally{if(A)throw A.error}}},this.getElementByPos=function(E){var A,C;if(E<0||E>=this.size())throw new Error("pos must more than 0 and less than set's size");var I=0;try{for(var z=o(this),W=z.next();!W.done;W=z.next()){var G=W.value;if(I===E)return G;++I}}catch(q){A={error:q}}finally{try{W&&!W.done&&(C=z.return)&&C.call(z)}finally{if(A)throw A.error}}throw new Error("unknown error")};var m=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(E.color!==u.default.TreeNodeColorType.red){var C=E.brother;if(!C)throw new Error("unknown error");if(E===A.leftChild)if(C.color===u.default.TreeNodeColorType.red){C.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red;var I=A.rotateLeft();f===A&&(f=I),m(E)}else C.color===u.default.TreeNodeColorType.black&&(C.rightChild&&C.rightChild.color===u.default.TreeNodeColorType.red?(C.color=A.color,A.color=u.default.TreeNodeColorType.black,C.rightChild&&(C.rightChild.color=u.default.TreeNodeColorType.black),I=A.rotateLeft(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):C.rightChild&&C.rightChild.color!==u.default.TreeNodeColorType.black||!C.leftChild||C.leftChild.color!==u.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==u.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==u.default.TreeNodeColorType.black||(C.color=u.default.TreeNodeColorType.red,m(A)):(C.color=u.default.TreeNodeColorType.red,C.leftChild&&(C.leftChild.color=u.default.TreeNodeColorType.black),I=C.rotateRight(),f===C&&(f=I),m(E)));else E===A.rightChild&&(C.color===u.default.TreeNodeColorType.red?(C.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red,I=A.rotateRight(),f===A&&(f=I),m(E)):C.color===u.default.TreeNodeColorType.black&&(C.leftChild&&C.leftChild.color===u.default.TreeNodeColorType.red?(C.color=A.color,A.color=u.default.TreeNodeColorType.black,C.leftChild&&(C.leftChild.color=u.default.TreeNodeColorType.black),I=A.rotateRight(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):C.leftChild&&C.leftChild.color!==u.default.TreeNodeColorType.black||!C.rightChild||C.rightChild.color!==u.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==u.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==u.default.TreeNodeColorType.black||(C.color=u.default.TreeNodeColorType.red,m(A)):(C.color=u.default.TreeNodeColorType.red,C.rightChild&&(C.rightChild.color=u.default.TreeNodeColorType.black),I=C.rotateLeft(),f===C&&(f=I),m(E))))}else E.color=u.default.TreeNodeColorType.black},g=function(E){for(var A=E;A.leftChild||A.rightChild;){if(A.rightChild){A=h(A.rightChild);var C=E.key;E.key=A.key,A.key=C,E=A}A.leftChild&&(A=v(A.leftChild),C=E.key,E.key=A.key,A.key=C,E=A)}m(A),A&&A.remove(),--c,f.color=u.default.TreeNodeColorType.black},b=function(E,A){return!(!E||E.key===void 0)&&(!!b(E.leftChild,A)||!!A(E)||b(E.rightChild,A))};this.eraseElementByPos=function(E){if(E<0||E>=c)throw new Error("pos must more than 0 and less than set's size");var A=0;b(f,function(C){return E===A?(g(C),!0):(++A,!1)})},this.eraseElementByValue=function(E){if(!this.empty()){var A=T(f,E);A!==void 0&&A.key!==void 0&&i(A.key,E)===0&&g(A)}};var y=function(E,A){if(!E||E.key===void 0)throw new Error("unknown error");var C=i(A,E.key);return C<0?E.leftChild?y(E.leftChild,A):(E.leftChild=new u.default,E.leftChild.parent=E,E.leftChild.brother=E.rightChild,E.rightChild&&(E.rightChild.brother=E.leftChild),E.leftChild):C>0?E.rightChild?y(E.rightChild,A):(E.rightChild=new u.default,E.rightChild.parent=E,E.rightChild.brother=E.leftChild,E.leftChild&&(E.leftChild.brother=E.rightChild),E.rightChild):E},_=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(A.color!==u.default.TreeNodeColorType.black&&A.color===u.default.TreeNodeColorType.red){var C=A.brother,I=A.parent;if(!I)throw new Error("unknown error");if(C&&C.color===u.default.TreeNodeColorType.red)C.color=A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,_(I);else if(!C||C.color===u.default.TreeNodeColorType.black)if(A===I.leftChild)if(E===A.leftChild){A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red;var z=I.rotateRight();I===f&&(f=z)}else E===A.rightChild&&(z=A.rotateLeft(),I===f&&(f=z),_(A));else A===I.rightChild&&(E===A.leftChild?(z=A.rotateRight(),I===f&&(f=z),_(A)):E===A.rightChild&&(A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,z=I.rotateLeft(),I===f&&(f=z)))}};this.insert=function(E){if(E==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty())return++c,f.key=E,void(f.color=u.default.TreeNodeColorType.black);var A=y(f,E);A.key!==void 0&&i(A.key,E)===0||(++c,A.key=E,_(A),f.color=u.default.TreeNodeColorType.black)};var T=function(E,A){if(E&&E.key!==void 0){var C=i(A,E.key);return C<0?T(E.leftChild,A):C>0?T(E.rightChild,A):E}};this.find=function(E){var A=T(f,E);return A!==void 0&&A.key!==void 0&&i(A.key,E)===0};var B=function(E,A){if(E&&E.key!==void 0){var C=i(E.key,A);if(C===0)return E.key;if(C<0)return B(E.rightChild,A);var I=B(E.leftChild,A);return I!==void 0?I:E.key}};this.lowerBound=function(E){return B(f,E)};var F=function(E,A){if(E&&E.key!==void 0){if(i(E.key,A)<=0)return F(E.rightChild,A);var C=F(E.leftChild,A);return C!==void 0?C:E.key}};this.upperBound=function(E){return F(f,E)};var R=function(E,A){if(E&&E.key!==void 0){var C=i(E.key,A);if(C===0)return E.key;if(C>0)return R(E.leftChild,A);var I=R(E.rightChild,A);return I!==void 0?I:E.key}};this.reverseLowerBound=function(E){return R(f,E)};var Z=function(E,A){if(E&&E.key!==void 0){if(i(E.key,A)>=0)return Z(E.leftChild,A);var C=Z(E.rightChild,A);return C!==void 0?C:E.key}};this.reverseUpperBound=function(E){return Z(f,E)},this.union=function(E){var A=this;E.forEach(function(C){return A.insert(C)})},this.getHeight=function(){if(this.empty())return 0;var E=function(A){return A?Math.max(E(A.leftChild),E(A.rightChild))+1:1};return E(f)};var j=function(E){return a(this,function(A){switch(A.label){case 0:return E&&E.key!==void 0?[5,o(j(E.leftChild))]:[2];case 1:return A.sent(),[4,E.key];case 2:return A.sent(),[5,o(j(E.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return j(f)},s.forEach(function(E){return p.insert(E)}),Object.freeze(this)}Object.freeze(d),l.default=d},{"../Base/TreeNode":25}],34:[function(t,n,l){function a(o){var u=this;o===void 0&&(o=[]);var d=0,s=[];this.size=function(){return d},this.empty=function(){return d===0},this.clear=function(){d=0,s.length=0},this.push=function(i){s.push(i),++d},this.pop=function(){s.pop(),d>0&&--d},this.top=function(){return s[d-1]},o.forEach(function(i){return u.push(i)}),Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),Object.freeze(a),l.default=a},{}],35:[function(t,n,l){var a=this&&this.__generator||function(i,p){var c,f,h,v,m={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(b){return function(y){return function(_){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,f&&(h=2&_[0]?f.return:_[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,_[1])).done)return h;switch(f=0,h&&(_=[2&_[0],h.value]),_[0]){case 0:case 1:h=_;break;case 4:return m.label++,{value:_[1],done:!1};case 5:m.label++,f=_[1],_=[0];continue;case 7:_=m.ops.pop(),m.trys.pop();continue;default:if(!(h=(h=m.trys).length>0&&h[h.length-1])&&(_[0]===6||_[0]===2)){m=0;continue}if(_[0]===3&&(!h||_[1]>h[0]&&_[1]<h[3])){m.label=_[1];break}if(_[0]===6&&m.label<h[1]){m.label=h[1],h=_;break}if(h&&m.label<h[2]){m.label=h[2],m.ops.push(_);break}h[2]&&m.ops.pop(),m.trys.pop();continue}_=p.call(i,m)}catch(T){_=[6,T],f=0}finally{c=h=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([b,y])}}},o=this&&this.__read||function(i,p){var c=typeof Symbol=="function"&&i[Symbol.iterator];if(!c)return i;var f,h,v=c.call(i),m=[];try{for(;(p===void 0||p-- >0)&&!(f=v.next()).done;)m.push(f.value)}catch(g){h={error:g}}finally{try{f&&!f.done&&(c=v.return)&&c.call(v)}finally{if(h)throw h.error}}return m},u=this&&this.__spreadArray||function(i,p,c){if(c||arguments.length===2)for(var f,h=0,v=p.length;h<v;h++)!f&&h in p||(f||(f=Array.prototype.slice.call(p,0,h)),f[h]=p[h]);return i.concat(f||Array.prototype.slice.call(p))},d=this&&this.__values||function(i){var p=typeof Symbol=="function"&&Symbol.iterator,c=p&&i[p],f=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&f>=i.length&&(i=void 0),{value:i&&i[f++],done:!i}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};function s(i){var p=this;i===void 0&&(i=[]);var c=0,f=[];this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,f.length=0},this.front=function(){if(!this.empty())return f[0]},this.back=function(){if(!this.empty())return f[c-1]},this.forEach=function(h){f.forEach(h)},this.getElementByPos=function(h){if(h<0||h>=c)throw new Error("pos must more than 0 and less than vector's size");return f[h]},this.eraseElementByPos=function(h){if(h<0||h>=c)throw new Error("pos must more than 0 and less than vector's size");for(var v=h;v<c-1;++v)f[v]=f[v+1];this.popBack()},this.eraseElementByValue=function(h){var v=[];this.forEach(function(g){g!==h&&v.push(g)}),v.forEach(function(g,b){f[b]=g});for(var m=v.length;c>m;)this.popBack()},this.pushBack=function(h){f.push(h),++c},this.popBack=function(){f.pop(),c>0&&--c},this.setElementByPos=function(h,v){if(h<0||h>=c)throw new Error("pos must more than 0 and less than vector's size");f[h]=v},this.insert=function(h,v,m){if(m===void 0&&(m=1),h<0||h>c)throw new Error("pos must more than 0 and less than or equal to vector's size");f.splice.apply(f,u([h,0],o(new Array(m).fill(v)),!1)),c+=m},this.find=function(h){return f.includes(h)},this.reverse=function(){f.reverse()},this.unique=function(){var h,v=[];this.forEach(function(g,b){b!==0&&g===h||(v.push(g),h=g)}),v.forEach(function(g,b){f[b]=g});for(var m=v.length;c>m;)this.popBack()},this.sort=function(h){f.sort(h)},this[Symbol.iterator]=function(){return function(){return a(this,function(h){switch(h.label){case 0:return[5,d(f)];case 1:return[2,h.sent()]}})}()},i.forEach(function(h){return p.pushBack(h)}),Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),Object.freeze(s),l.default=s},{}],36:[function(t,n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.HashMap=l.HashSet=l.Map=l.Set=l.PriorityQueue=l.Deque=l.LinkList=l.Queue=l.Stack=l.Vector=void 0;var a=t("./Vector/Vector");l.Vector=a.default;var o=t("./Stack/Stack");l.Stack=o.default;var u=t("./Queue/Queue");l.Queue=u.default;var d=t("./LinkList/LinkList");l.LinkList=d.default;var s=t("./Deque/Deque");l.Deque=s.default;var i=t("./PriorityQueue/PriorityQueue");l.PriorityQueue=i.default;var p=t("./Set/Set");l.Set=p.default;var c=t("./Map/Map");l.Map=c.default;var f=t("./HashSet/HashSet");l.HashSet=f.default;var h=t("./HashMap/HashMap");l.HashMap=h.default},{"./Deque/Deque":26,"./HashMap/HashMap":27,"./HashSet/HashSet":28,"./LinkList/LinkList":29,"./Map/Map":30,"./PriorityQueue/PriorityQueue":31,"./Queue/Queue":32,"./Set/Set":33,"./Stack/Stack":34,"./Vector/Vector":35}],37:[function(t,n,l){const a=t("yallist"),o=Symbol("max"),u=Symbol("length"),d=Symbol("lengthCalculator"),s=Symbol("allowStale"),i=Symbol("maxAge"),p=Symbol("dispose"),c=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),v=Symbol("updateAgeOnGet"),m=()=>1,g=(F,R,Z)=>{const j=F[h].get(R);if(j){const E=j.value;if(b(F,E)){if(_(F,j),!F[s])return}else Z&&(F[v]&&(j.value.now=Date.now()),F[f].unshiftNode(j));return E.value}},b=(F,R)=>{if(!R||!R.maxAge&&!F[i])return!1;const Z=Date.now()-R.now;return R.maxAge?Z>R.maxAge:F[i]&&Z>F[i]},y=F=>{if(F[u]>F[o])for(let R=F[f].tail;F[u]>F[o]&&R!==null;){const Z=R.prev;_(F,R),R=Z}},_=(F,R)=>{if(R){const Z=R.value;F[p]&&F[p](Z.key,Z.value),F[u]-=Z.length,F[h].delete(Z.key),F[f].removeNode(R)}};class T{constructor(R,Z,j,E,A){this.key=R,this.value=Z,this.length=j,this.now=E,this.maxAge=A||0}}const B=(F,R,Z,j)=>{let E=Z.value;b(F,E)&&(_(F,Z),F[s]||(E=void 0)),E&&R.call(j,E.value,E.key,F)};n.exports=class{constructor(F){if(typeof F=="number"&&(F={max:F}),F||(F={}),F.max&&(typeof F.max!="number"||F.max<0))throw new TypeError("max must be a non-negative number");this[o]=F.max||1/0;const R=F.length||m;if(this[d]=typeof R!="function"?m:R,this[s]=F.stale||!1,F.maxAge&&typeof F.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=F.maxAge||0,this[p]=F.dispose,this[c]=F.noDisposeOnSet||!1,this[v]=F.updateAgeOnGet||!1,this.reset()}set max(F){if(typeof F!="number"||F<0)throw new TypeError("max must be a non-negative number");this[o]=F||1/0,y(this)}get max(){return this[o]}set allowStale(F){this[s]=!!F}get allowStale(){return this[s]}set maxAge(F){if(typeof F!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=F,y(this)}get maxAge(){return this[i]}set lengthCalculator(F){typeof F!="function"&&(F=m),F!==this[d]&&(this[d]=F,this[u]=0,this[f].forEach(R=>{R.length=this[d](R.value,R.key),this[u]+=R.length})),y(this)}get lengthCalculator(){return this[d]}get length(){return this[u]}get itemCount(){return this[f].length}rforEach(F,R){R=R||this;for(let Z=this[f].tail;Z!==null;){const j=Z.prev;B(this,F,Z,R),Z=j}}forEach(F,R){R=R||this;for(let Z=this[f].head;Z!==null;){const j=Z.next;B(this,F,Z,R),Z=j}}keys(){return this[f].toArray().map(F=>F.key)}values(){return this[f].toArray().map(F=>F.value)}reset(){this[p]&&this[f]&&this[f].length&&this[f].forEach(F=>this[p](F.key,F.value)),this[h]=new Map,this[f]=new a,this[u]=0}dump(){return this[f].map(F=>!b(this,F)&&{k:F.key,v:F.value,e:F.now+(F.maxAge||0)}).toArray().filter(F=>F)}dumpLru(){return this[f]}set(F,R,Z){if((Z=Z||this[i])&&typeof Z!="number")throw new TypeError("maxAge must be a number");const j=Z?Date.now():0,E=this[d](R,F);if(this[h].has(F)){if(E>this[o])return _(this,this[h].get(F)),!1;const C=this[h].get(F).value;return this[p]&&(this[c]||this[p](F,C.value)),C.now=j,C.maxAge=Z,C.value=R,this[u]+=E-C.length,C.length=E,this.get(F),y(this),!0}const A=new T(F,R,E,j,Z);return A.length>this[o]?(this[p]&&this[p](F,R),!1):(this[u]+=A.length,this[f].unshift(A),this[h].set(F,this[f].head),y(this),!0)}has(F){if(!this[h].has(F))return!1;const R=this[h].get(F).value;return!b(this,R)}get(F){return g(this,F,!0)}peek(F){return g(this,F,!1)}pop(){const F=this[f].tail;return F?(_(this,F),F.value):null}del(F){_(this,this[h].get(F))}load(F){this.reset();const R=Date.now();for(let Z=F.length-1;Z>=0;Z--){const j=F[Z],E=j.e||0;if(E===0)this.set(j.k,j.v);else{const A=E-R;A>0&&this.set(j.k,j.v,A)}}}prune(){this[h].forEach((F,R)=>g(this,R,!1))}}},{yallist:83}],38:[function(t,n,l){(function(a){(function(){const o=n.exports;o.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},o.codes={};for(const d in o.types){const s=o.types[d];o.codes[s]=d}o.CMD_SHIFT=4,o.CMD_MASK=240,o.DUP_MASK=8,o.QOS_MASK=3,o.QOS_SHIFT=1,o.RETAIN_MASK=1,o.VARBYTEINT_MASK=127,o.VARBYTEINT_FIN_MASK=128,o.VARBYTEINT_MAX=268435455,o.SESSIONPRESENT_MASK=1,o.SESSIONPRESENT_HEADER=a.from([o.SESSIONPRESENT_MASK]),o.CONNACK_HEADER=a.from([o.codes.connack<<o.CMD_SHIFT]),o.USERNAME_MASK=128,o.PASSWORD_MASK=64,o.WILL_RETAIN_MASK=32,o.WILL_QOS_MASK=24,o.WILL_QOS_SHIFT=3,o.WILL_FLAG_MASK=4,o.CLEAN_SESSION_MASK=2,o.CONNECT_HEADER=a.from([o.codes.connect<<o.CMD_SHIFT]),o.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},o.propertiesCodes={};for(const d in o.properties){const s=o.properties[d];o.propertiesCodes[s]=d}function u(d){return[0,1,2].map(s=>[0,1].map(i=>[0,1].map(p=>{const c=a.alloc(1);return c.writeUInt8(o.codes[d]<<o.CMD_SHIFT|(i?o.DUP_MASK:0)|s<<o.QOS_SHIFT|p,0,!0),c})))}o.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},o.PUBLISH_HEADER=u("publish"),o.SUBSCRIBE_HEADER=u("subscribe"),o.SUBSCRIBE_OPTIONS_QOS_MASK=3,o.SUBSCRIBE_OPTIONS_NL_MASK=1,o.SUBSCRIBE_OPTIONS_NL_SHIFT=2,o.SUBSCRIBE_OPTIONS_RAP_MASK=1,o.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,o.SUBSCRIBE_OPTIONS_RH_MASK=3,o.SUBSCRIBE_OPTIONS_RH_SHIFT=4,o.SUBSCRIBE_OPTIONS_RH=[0,16,32],o.SUBSCRIBE_OPTIONS_NL=4,o.SUBSCRIBE_OPTIONS_RAP=8,o.SUBSCRIBE_OPTIONS_QOS=[0,1,2],o.UNSUBSCRIBE_HEADER=u("unsubscribe"),o.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},o.SUBACK_HEADER=a.from([o.codes.suback<<o.CMD_SHIFT]),o.VERSION3=a.from([3]),o.VERSION4=a.from([4]),o.VERSION5=a.from([5]),o.VERSION131=a.from([131]),o.VERSION132=a.from([132]),o.QOS=[0,1,2].map(d=>a.from([d])),o.EMPTY={pingreq:a.from([o.codes.pingreq<<4,0]),pingresp:a.from([o.codes.pingresp<<4,0]),disconnect:a.from([o.codes.disconnect<<4,0])}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],39:[function(t,n,l){(function(a){(function(){const o=t("./writeToStream"),u=t("events");class d extends u{constructor(){super(),this._array=new Array(20),this._i=0}write(i){return this._array[this._i++]=i,!0}concat(){let i=0;const p=new Array(this._array.length),c=this._array;let f,h=0;for(f=0;f<c.length&&c[f]!==void 0;f++)typeof c[f]!="string"?p[f]=c[f].length:p[f]=a.byteLength(c[f]),i+=p[f];const v=a.allocUnsafe(i);for(f=0;f<c.length&&c[f]!==void 0;f++)typeof c[f]!="string"?(c[f].copy(v,h),h+=p[f]):(v.write(c[f],h),h+=p[f]);return v}}n.exports=function(s,i){const p=new d;return o(s,p,i),p.concat()}}).call(this)}).call(this,t("buffer").Buffer)},{"./writeToStream":44,buffer:17,events:22}],40:[function(t,n,l){l.parser=t("./parser").parser,l.generate=t("./generate"),l.writeToStream=t("./writeToStream")},{"./generate":39,"./parser":43,"./writeToStream":44}],41:[function(t,n,l){(function(a){(function(){const u={},d=a.isBuffer(a.from([1,2]).subarray(0,1));function s(i){const p=a.allocUnsafe(2);return p.writeUInt8(i>>8,0),p.writeUInt8(255&i,1),p}n.exports={cache:u,generateCache:function(){for(let i=0;i<65536;i++)u[i]=s(i)},generateNumber:s,genBufVariableByteInt:function(i){let p=0,c=0;const f=a.allocUnsafe(4);do p=i%128|0,(i=i/128|0)>0&&(p|=128),f.writeUInt8(p,c++);while(i>0&&c<4);return i>0&&(c=0),d?f.subarray(0,c):f.slice(0,c)},generate4ByteBuffer:function(i){const p=a.allocUnsafe(4);return p.writeUInt32BE(i,0),p}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],42:[function(t,n,l){n.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],43:[function(t,n,l){const a=t("bl"),o=t("events"),u=t("./packet"),d=t("./constants"),s=t("debug")("mqtt-packet:parser");class i extends o{constructor(){super(),this.parser=this.constructor.parser}static parser(c){return this instanceof i?(this.settings=c||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new i().parser(c)}_resetState(){s("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new u,this.error=null,this._list=a(),this._stateCounter=0}parse(c){for(this.error&&this._resetState(),this._list.append(c),s("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,s("parse: state complete. _stateCounter is now: %d",this._stateCounter),s("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return s("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const c=this._list.readUInt8(0);return this.packet.cmd=d.types[c>>d.CMD_SHIFT],this.packet.retain=(c&d.RETAIN_MASK)!=0,this.packet.qos=c>>d.QOS_SHIFT&d.QOS_MASK,this.packet.dup=(c&d.DUP_MASK)!=0,s("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const c=this._parseVarByteNum(!0);return c&&(this.packet.length=c.value,this._list.consume(c.bytes)),s("_parseLength %d",c.value),!!c}_parsePayload(){s("_parsePayload: payload %O",this._list);let c=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}c=!0}return s("_parsePayload complete result: %s",c),c}_parseConnect(){let c,f,h,v;s("_parseConnect");const m={},g=this.packet,b=this._parseString();if(b===null)return this._emitError(new Error("Cannot parse protocolId"));if(b!=="MQTT"&&b!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(m.username=this._list.readUInt8(this._pos)&d.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&d.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&d.WILL_FLAG_MASK,m.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&d.WILL_RETAIN_MASK)!=0,g.will.qos=(this._list.readUInt8(this._pos)&d.WILL_QOS_MASK)>>d.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&d.CLEAN_SESSION_MASK)!=0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){const _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(g.properties=_)}const y=this._parseString();if(y===null)return this._emitError(new Error("Packet too short"));if(g.clientId=y,s("_parseConnect: packet.clientId: %s",g.clientId),m.will){if(g.protocolVersion===5){const _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(g.will.properties=_)}if((c=this._parseString())===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=c,s("_parseConnect: packet.will.topic: %s",g.will.topic),(f=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=f,s("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(m.username){if((v=this._parseString())===null)return this._emitError(new Error("Cannot parse username"));g.username=v,s("_parseConnect: packet.username: %s",g.username)}if(m.password){if((h=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse password"));g.password=h}return this.settings=g,s("_parseConnect: complete"),g}_parseConnack(){s("_parseConnack");const c=this.packet;if(this._list.length<1)return null;if(c.sessionPresent=!!(this._list.readUInt8(this._pos++)&d.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?c.reasonCode=this._list.readUInt8(this._pos++):c.reasonCode=0;else{if(this._list.length<2)return null;c.returnCode=this._list.readUInt8(this._pos++)}if(c.returnCode===-1||c.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}s("_parseConnack: complete")}_parsePublish(){s("_parsePublish");const c=this.packet;if(c.topic=this._parseString(),c.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(c.qos>0)||this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}c.payload=this._list.slice(this._pos,c.length),s("_parsePublish: payload from buffer list: %o",c.payload)}}_parseSubscribe(){s("_parseSubscribe");const c=this.packet;let f,h,v,m,g,b,y;if(c.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(c.subscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(c.properties=_)}for(;this._pos<c.length;){if((f=this._parseString())===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=c.length)return this._emitError(new Error("Malformed Subscribe Payload"));v=(h=this._parseByte())&d.SUBSCRIBE_OPTIONS_QOS_MASK,b=(h>>d.SUBSCRIBE_OPTIONS_NL_SHIFT&d.SUBSCRIBE_OPTIONS_NL_MASK)!=0,g=(h>>d.SUBSCRIBE_OPTIONS_RAP_SHIFT&d.SUBSCRIBE_OPTIONS_RAP_MASK)!=0,m=h>>d.SUBSCRIBE_OPTIONS_RH_SHIFT&d.SUBSCRIBE_OPTIONS_RH_MASK,y={topic:f,qos:v},this.settings.protocolVersion===5?(y.nl=b,y.rap=g,y.rh=m):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",y),c.subscriptions.push(y)}}}_parseSuback(){s("_parseSuback");const c=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){s("_parseUnsubscribe");const c=this.packet;if(c.unsubscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}for(;this._pos<c.length;){const f=this._parseString();if(f===null)return this._emitError(new Error("Cannot parse topic"));s("_parseUnsubscribe: push topic `%s` to unsubscriptions",f),c.unsubscriptions.push(f)}}}_parseUnsuback(){s("_parseUnsuback");const c=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(this.settings.protocolVersion===5){const f=this._parseProperties();for(Object.getOwnPropertyNames(f).length&&(c.properties=f),c.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){s("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const c=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5&&(c.length>2?(c.reasonCode=this._parseByte(),s("_parseConfirmation: packet.reasonCode `%d`",c.reasonCode)):c.reasonCode=0,c.length>3)){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}return!0}_parseDisconnect(){const c=this.packet;if(s("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?c.reasonCode=this._parseByte():c.reasonCode=0;const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}return s("_parseDisconnect result: true"),!0}_parseAuth(){s("_parseAuth");const c=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));c.reasonCode=this._parseByte();const f=this._parseProperties();return Object.getOwnPropertyNames(f).length&&(c.properties=f),s("_parseAuth: result: true"),!0}_parseMessageId(){const c=this.packet;return c.messageId=this._parseNum(),c.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(s("_parseMessageId: packet.messageId %d",c.messageId),!0)}_parseString(c){const f=this._parseNum(),h=f+this._pos;if(f===-1||h>this._list.length||h>this.packet.length)return null;const v=this._list.toString("utf8",this._pos,h);return this._pos+=f,s("_parseString: result: %s",v),v}_parseStringPair(){return s("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const c=this._parseNum(),f=c+this._pos;if(c===-1||f>this._list.length||f>this.packet.length)return null;const h=this._list.slice(this._pos,f);return this._pos+=c,s("_parseBuffer: result: %o",h),h}_parseNum(){if(this._list.length-this._pos<2)return-1;const c=this._list.readUInt16BE(this._pos);return this._pos+=2,s("_parseNum: result: %s",c),c}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const c=this._list.readUInt32BE(this._pos);return this._pos+=4,s("_parse4ByteNum: result: %s",c),c}_parseVarByteNum(c){s("_parseVarByteNum");let f,h=0,v=1,m=0,g=!1;const b=this._pos?this._pos:0;for(;h<4&&b+h<this._list.length;){if(m+=v*((f=this._list.readUInt8(b+h++))&d.VARBYTEINT_MASK),v*=128,(f&d.VARBYTEINT_FIN_MASK)==0){g=!0;break}if(this._list.length<=h)break}return!g&&h===4&&this._list.length>=h&&this._emitError(new Error("Invalid variable byte integer")),b&&(this._pos+=h),s("_parseVarByteNum: result: %o",g=!!g&&(c?{bytes:h,value:m}:m)),g}_parseByte(){let c;return this._pos<this._list.length&&(c=this._list.readUInt8(this._pos),this._pos++),s("_parseByte: result: %o",c),c}_parseByType(c){switch(s("_parseByType: type: %s",c),c){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){s("_parseProperties");const c=this._parseVarByteNum(),f=this._pos+c,h={};for(;this._pos<f;){const v=this._parseByte();if(!v)return this._emitError(new Error("Cannot parse property code type")),!1;const m=d.propertiesCodes[v];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m!=="userProperties")h[m]?Array.isArray(h[m])?h[m].push(this._parseByType(d.propertiesTypes[m])):(h[m]=[h[m]],h[m].push(this._parseByType(d.propertiesTypes[m]))):h[m]=this._parseByType(d.propertiesTypes[m]);else{h[m]||(h[m]=Object.create(null));const g=this._parseByType(d.propertiesTypes[m]);if(h[m][g.name])if(Array.isArray(h[m][g.name]))h[m][g.name].push(g.value);else{const b=h[m][g.name];h[m][g.name]=[b],h[m][g.name].push(g.value)}else h[m][g.name]=g.value}}return h}_newPacket(){return s("_newPacket"),this.packet&&(this._list.consume(this.packet.length),s("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),s("_newPacket: new packet"),this.packet=new u,this._pos=0,!0}_emitError(c){s("_emitError"),this.error=c,this.emit("error",c)}}n.exports=i},{"./constants":38,"./packet":42,bl:15,debug:18,events:22}],44:[function(t,n,l){(function(a){(function(){const o=t("./constants"),u=a.allocUnsafe(0),d=a.from([0]),s=t("./numbers"),i=t("process-nextick-args").nextTick,p=t("debug")("mqtt-packet:writeToStream"),c=s.cache,f=s.generateNumber,h=s.generateCache,v=s.genBufVariableByteInt,m=s.generate4ByteBuffer;let g=Z,b=!0;function y(q,N,V){switch(p("generate called"),N.cork&&(N.cork(),i(_,N)),b&&(b=!1,h()),p("generate: packet.cmd: %s",q.cmd),q.cmd){case"connect":return function(L,O,K){const H=L||{},J=H.protocolId||"MQTT";let ne=H.protocolVersion||4;const ie=H.will;let te=H.clean;const x=H.keepalive||0,w=H.clientId||"",D=H.username,Q=H.password,ee=H.properties;te===void 0&&(te=!0);let re=0;if(typeof J!="string"&&!a.isBuffer(J))return O.emit("error",new Error("Invalid protocolId")),!1;if(re+=J.length+2,ne!==3&&ne!==4&&ne!==5)return O.emit("error",new Error("Invalid protocol version")),!1;if(re+=1,(typeof w=="string"||a.isBuffer(w))&&(w||ne>=4)&&(w||te))re+=a.byteLength(w)+2;else{if(ne<4)return O.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*te==0)return O.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof x!="number"||x<0||x>65535||x%1!=0)return O.emit("error",new Error("Invalid keepalive")),!1;if(re+=2,re+=1,ne===5){var se=A(O,ee);if(!se)return!1;re+=se.length}if(ie){if(typeof ie!="object")return O.emit("error",new Error("Invalid will")),!1;if(!ie.topic||typeof ie.topic!="string")return O.emit("error",new Error("Invalid will topic")),!1;if(re+=a.byteLength(ie.topic)+2,re+=2,ie.payload){if(!(ie.payload.length>=0))return O.emit("error",new Error("Invalid will payload")),!1;typeof ie.payload=="string"?re+=a.byteLength(ie.payload):re+=ie.payload.length}var $={};if(ne===5){if(!($=A(O,ie.properties)))return!1;re+=$.length}}let S=!1;if(D!=null){if(!G(D))return O.emit("error",new Error("Invalid username")),!1;S=!0,re+=a.byteLength(D)+2}if(Q!=null){if(!S)return O.emit("error",new Error("Username is required to use password")),!1;if(!G(Q))return O.emit("error",new Error("Invalid password")),!1;re+=W(Q)+2}O.write(o.CONNECT_HEADER),B(O,re),E(O,J),H.bridgeMode&&(ne+=128),O.write(ne===131?o.VERSION131:ne===132?o.VERSION132:ne===4?o.VERSION4:ne===5?o.VERSION5:o.VERSION3);let k=0;return k|=D!=null?o.USERNAME_MASK:0,k|=Q!=null?o.PASSWORD_MASK:0,k|=ie&&ie.retain?o.WILL_RETAIN_MASK:0,k|=ie&&ie.qos?ie.qos<<o.WILL_QOS_SHIFT:0,k|=ie?o.WILL_FLAG_MASK:0,k|=te?o.CLEAN_SESSION_MASK:0,O.write(a.from([k])),g(O,x),ne===5&&se.write(),E(O,w),ie&&(ne===5&&$.write(),F(O,ie.topic),E(O,ie.payload)),D!=null&&E(O,D),Q!=null&&E(O,Q),!0}(q,N);case"connack":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=H===5?J.reasonCode:J.returnCode,ie=J.properties;let te=2;if(typeof ne!="number")return O.emit("error",new Error("Invalid return code")),!1;let x=null;if(H===5){if(!(x=A(O,ie)))return!1;te+=x.length}return O.write(o.CONNACK_HEADER),B(O,te),O.write(J.sessionPresent?o.SESSIONPRESENT_HEADER:d),O.write(a.from([ne])),x!=null&&x.write(),!0}(q,N,V);case"publish":return function(L,O,K){p("publish: packet: %o",L);const H=K?K.protocolVersion:4,J=L||{},ne=J.qos||0,ie=J.retain?o.RETAIN_MASK:0,te=J.topic,x=J.payload||u,w=J.messageId,D=J.properties;let Q=0;if(typeof te=="string")Q+=a.byteLength(te)+2;else{if(!a.isBuffer(te))return O.emit("error",new Error("Invalid topic")),!1;Q+=te.length+2}if(a.isBuffer(x)?Q+=x.length:Q+=a.byteLength(x),ne&&typeof w!="number")return O.emit("error",new Error("Invalid messageId")),!1;ne&&(Q+=2);let ee=null;if(H===5){if(!(ee=A(O,D)))return!1;Q+=ee.length}return O.write(o.PUBLISH_HEADER[ne][J.dup?1:0][ie?1:0]),B(O,Q),g(O,W(te)),O.write(te),ne>0&&g(O,w),ee!=null&&ee.write(),p("publish: payload: %o",x),O.write(x)}(q,N,V);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=J.cmd||"puback",ie=J.messageId,te=J.dup&&ne==="pubrel"?o.DUP_MASK:0;let x=0;const w=J.reasonCode,D=J.properties;let Q=H===5?3:2;if(ne==="pubrel"&&(x=1),typeof ie!="number")return O.emit("error",new Error("Invalid messageId")),!1;let ee=null;if(H===5&&typeof D=="object"){if(!(ee=C(O,D,K,Q)))return!1;Q+=ee.length}return O.write(o.ACKS[ne][x][te][0]),B(O,Q),g(O,ie),H===5&&O.write(a.from([w])),ee!==null&&ee.write(),!0}(q,N,V);case"subscribe":return function(L,O,K){p("subscribe: packet: ");const H=K?K.protocolVersion:4,J=L||{},ne=J.dup?o.DUP_MASK:0,ie=J.messageId,te=J.subscriptions,x=J.properties;let w=0;if(typeof ie!="number")return O.emit("error",new Error("Invalid messageId")),!1;w+=2;let D=null;if(H===5){if(!(D=A(O,x)))return!1;w+=D.length}if(typeof te!="object"||!te.length)return O.emit("error",new Error("Invalid subscriptions")),!1;for(let ee=0;ee<te.length;ee+=1){const re=te[ee].topic,se=te[ee].qos;if(typeof re!="string")return O.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof se!="number")return O.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(H===5){if(typeof(te[ee].nl||!1)!="boolean")return O.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(te[ee].rap||!1)!="boolean")return O.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const k=te[ee].rh||0;if(typeof k!="number"||k>2)return O.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}w+=a.byteLength(re)+2+1}p("subscribe: writing to stream: %o",o.SUBSCRIBE_HEADER),O.write(o.SUBSCRIBE_HEADER[1][ne?1:0][0]),B(O,w),g(O,ie),D!==null&&D.write();let Q=!0;for(const ee of te){const re=ee.topic,se=ee.qos,$=+ee.nl,S=+ee.rap,k=ee.rh;let X;F(O,re),X=o.SUBSCRIBE_OPTIONS_QOS[se],H===5&&(X|=$?o.SUBSCRIBE_OPTIONS_NL:0,X|=S?o.SUBSCRIBE_OPTIONS_RAP:0,X|=k?o.SUBSCRIBE_OPTIONS_RH[k]:0),Q=O.write(a.from([X]))}return Q}(q,N,V);case"suback":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=J.messageId,ie=J.granted,te=J.properties;let x=0;if(typeof ne!="number")return O.emit("error",new Error("Invalid messageId")),!1;if(x+=2,typeof ie!="object"||!ie.length)return O.emit("error",new Error("Invalid qos vector")),!1;for(let D=0;D<ie.length;D+=1){if(typeof ie[D]!="number")return O.emit("error",new Error("Invalid qos vector")),!1;x+=1}let w=null;if(H===5){if(!(w=C(O,te,K,x)))return!1;x+=w.length}return O.write(o.SUBACK_HEADER),B(O,x),g(O,ne),w!==null&&w.write(),O.write(a.from(ie))}(q,N,V);case"unsubscribe":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=J.messageId,ie=J.dup?o.DUP_MASK:0,te=J.unsubscriptions,x=J.properties;let w=0;if(typeof ne!="number")return O.emit("error",new Error("Invalid messageId")),!1;if(w+=2,typeof te!="object"||!te.length)return O.emit("error",new Error("Invalid unsubscriptions")),!1;for(let ee=0;ee<te.length;ee+=1){if(typeof te[ee]!="string")return O.emit("error",new Error("Invalid unsubscriptions")),!1;w+=a.byteLength(te[ee])+2}let D=null;if(H===5){if(!(D=A(O,x)))return!1;w+=D.length}O.write(o.UNSUBSCRIBE_HEADER[1][ie?1:0][0]),B(O,w),g(O,ne),D!==null&&D.write();let Q=!0;for(let ee=0;ee<te.length;ee++)Q=F(O,te[ee]);return Q}(q,N,V);case"unsuback":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=J.messageId,ie=J.dup?o.DUP_MASK:0,te=J.granted,x=J.properties,w=J.cmd;let D=2;if(typeof ne!="number")return O.emit("error",new Error("Invalid messageId")),!1;if(H===5){if(typeof te!="object"||!te.length)return O.emit("error",new Error("Invalid qos vector")),!1;for(let ee=0;ee<te.length;ee+=1){if(typeof te[ee]!="number")return O.emit("error",new Error("Invalid qos vector")),!1;D+=1}}let Q=null;if(H===5){if(!(Q=C(O,x,K,D)))return!1;D+=Q.length}return O.write(o.ACKS[w][0][ie][0]),B(O,D),g(O,ne),Q!==null&&Q.write(),H===5&&O.write(a.from(te)),!0}(q,N,V);case"pingreq":case"pingresp":return function(L,O,K){return O.write(o.EMPTY[L.cmd])}(q,N);case"disconnect":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=J.reasonCode,ie=J.properties;let te=H===5?1:0,x=null;if(H===5){if(!(x=C(O,ie,K,te)))return!1;te+=x.length}return O.write(a.from([o.codes.disconnect<<4])),B(O,te),H===5&&O.write(a.from([ne])),x!==null&&x.write(),!0}(q,N,V);case"auth":return function(L,O,K){const H=K?K.protocolVersion:4,J=L||{},ne=J.reasonCode,ie=J.properties;let te=H===5?1:0;H!==5&&O.emit("error",new Error("Invalid mqtt version for auth packet"));const x=C(O,ie,K,te);return x?(te+=x.length,O.write(a.from([o.codes.auth<<4])),B(O,te),O.write(a.from([ne])),x!==null&&x.write(),!0):!1}(q,N,V);default:return N.emit("error",new Error("Unknown command")),!1}}function _(q){q.uncork()}Object.defineProperty(y,"cacheNumbers",{get:()=>g===Z,set(q){q?(c&&Object.keys(c).length!==0||(b=!0),g=Z):(b=!1,g=j)}});const T={};function B(q,N){if(N>o.VARBYTEINT_MAX)return q.emit("error",new Error(`Invalid variable byte integer: ${N}`)),!1;let V=T[N];return V||(V=v(N),N<16384&&(T[N]=V)),p("writeVarByteInt: writing to stream: %o",V),q.write(V)}function F(q,N){const V=a.byteLength(N);return g(q,V),p("writeString: %s",N),q.write(N,"utf8")}function R(q,N,V){F(q,N),F(q,V)}function Z(q,N){return p("writeNumberCached: number: %d",N),p("writeNumberCached: %o",c[N]),q.write(c[N])}function j(q,N){const V=f(N);return p("writeNumberGenerated: %o",V),q.write(V)}function E(q,N){typeof N=="string"?F(q,N):N?(g(q,N.length),q.write(N)):g(q,0)}function A(q,N){if(typeof N!="object"||N.length!=null)return{length:1,write(){z(q,{},0)}};let V=0;function L(O,K){let H=0;switch(o.propertiesTypes[O]){case"byte":if(typeof K!="boolean")return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=2;break;case"int8":if(typeof K!="number"||K<0||K>255)return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=2;break;case"binary":if(K&&K===null)return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=1+a.byteLength(K)+2;break;case"int16":if(typeof K!="number"||K<0||K>65535)return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=3;break;case"int32":if(typeof K!="number"||K<0||K>4294967295)return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=5;break;case"var":if(typeof K!="number"||K<0||K>268435455)return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=1+a.byteLength(v(K));break;case"string":if(typeof K!="string")return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=3+a.byteLength(K.toString());break;case"pair":if(typeof K!="object")return q.emit("error",new Error(`Invalid ${O}: ${K}`)),!1;H+=Object.getOwnPropertyNames(K).reduce((J,ne)=>{const ie=K[ne];return Array.isArray(ie)?J+=ie.reduce((te,x)=>te+=3+a.byteLength(ne.toString())+2+a.byteLength(x.toString()),0):J+=3+a.byteLength(ne.toString())+2+a.byteLength(K[ne].toString()),J},0);break;default:return q.emit("error",new Error(`Invalid property ${O}: ${K}`)),!1}return H}if(N)for(const O in N){let K=0,H=0;const J=N[O];if(Array.isArray(J))for(let ne=0;ne<J.length;ne++){if(!(H=L(O,J[ne])))return!1;K+=H}else{if(!(H=L(O,J)))return!1;K=H}if(!K)return!1;V+=K}return{length:a.byteLength(v(V))+V,write(){z(q,N,V)}}}function C(q,N,V,L){const O=["reasonString","userProperties"],K=V&&V.properties&&V.properties.maximumPacketSize?V.properties.maximumPacketSize:0;let H=A(q,N);if(K)for(;L+H.length>K;){const J=O.shift();if(!J||!N[J])return!1;delete N[J],H=A(q,N)}return H}function I(q,N,V){switch(o.propertiesTypes[N]){case"byte":q.write(a.from([o.properties[N]])),q.write(a.from([+V]));break;case"int8":q.write(a.from([o.properties[N]])),q.write(a.from([V]));break;case"binary":q.write(a.from([o.properties[N]])),E(q,V);break;case"int16":q.write(a.from([o.properties[N]])),g(q,V);break;case"int32":q.write(a.from([o.properties[N]])),function(L,O){const K=m(O);p("write4ByteNumber: %o",K),L.write(K)}(q,V);break;case"var":q.write(a.from([o.properties[N]])),B(q,V);break;case"string":q.write(a.from([o.properties[N]])),F(q,V);break;case"pair":Object.getOwnPropertyNames(V).forEach(L=>{const O=V[L];Array.isArray(O)?O.forEach(K=>{q.write(a.from([o.properties[N]])),R(q,L.toString(),K.toString())}):(q.write(a.from([o.properties[N]])),R(q,L.toString(),O.toString()))});break;default:return q.emit("error",new Error(`Invalid property ${N} value: ${V}`)),!1}}function z(q,N,V){B(q,V);for(const L in N)if(Object.prototype.hasOwnProperty.call(N,L)&&N[L]!==null){const O=N[L];if(Array.isArray(O))for(let K=0;K<O.length;K++)I(q,L,O[K]);else I(q,L,O)}}function W(q){return q?q instanceof a?q.length:a.byteLength(q):0}function G(q){return typeof q=="string"||q instanceof a}n.exports=y}).call(this)}).call(this,t("buffer").Buffer)},{"./constants":38,"./numbers":41,buffer:17,debug:18,"process-nextick-args":49}],45:[function(t,n,l){var a=1e3,o=60*a,u=60*o,d=24*u,s=7*d,i=365.25*d;function p(c,f,h,v){var m=f>=1.5*h;return Math.round(c/h)+" "+v+(m?"s":"")}n.exports=function(c,f){f=f||{};var h=typeof c;if(h==="string"&&c.length>0)return function(v){if(!((v=String(v)).length>100)){var m=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(v);if(m){var g=parseFloat(m[1]);switch((m[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return g*i;case"weeks":case"week":case"w":return g*s;case"days":case"day":case"d":return g*d;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*o;case"seconds":case"second":case"secs":case"sec":case"s":return g*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}(c);if(h==="number"&&isFinite(c))return f.long?function(v){var m=Math.abs(v);return m>=d?p(v,m,d,"day"):m>=u?p(v,m,u,"hour"):m>=o?p(v,m,o,"minute"):m>=a?p(v,m,a,"second"):v+" ms"}(c):function(v){var m=Math.abs(v);return m>=d?Math.round(v/d)+"d":m>=u?Math.round(v/u)+"h":m>=o?Math.round(v/o)+"m":m>=a?Math.round(v/a)+"s":v+"ms"}(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))}},{}],46:[function(t,n,l){const a=t("./lib/number-allocator.js");n.exports.NumberAllocator=a},{"./lib/number-allocator.js":47}],47:[function(t,n,l){const a=t("js-sdsl").Set,o=t("debug")("number-allocator:trace"),u=t("debug")("number-allocator:error");function d(i,p){this.low=i,this.high=p}function s(i,p){if(!(this instanceof s))return new s(i,p);this.min=i,this.max=p,this.ss=new a([],(c,f)=>c.compare(f)),o("Create"),this.clear()}d.prototype.equals=function(i){return this.low===i.low&&this.high===i.high},d.prototype.compare=function(i){return this.low<i.low&&this.high<i.low?-1:i.low<this.low&&i.high<this.low?1:0},s.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},s.prototype.alloc=function(){if(this.ss.size()===0)return o("alloc():empty"),null;const i=this.ss.front(),p=i.low;return p+1<=i.high?++i.low:this.ss.eraseElementByPos(0),o("alloc():"+p),p},s.prototype.use=function(i){const p=new d(i,i),c=this.ss.lowerBound(p);if(c){if(c.equals(p))return this.ss.eraseElementByValue(c),o("use():"+i),!0;if(c.low>i)return!1;if(c.low===i)return++c.low,o("use():"+i),!0;if(c.high===i)return--c.high,o("use():"+i),!0;const f=c.low;return c.low=i+1,this.ss.insert(new d(f,i-1)),o("use():"+i),!0}return o("use():failed"),!1},s.prototype.free=function(i){if(i<this.min||i>this.max)return void u("free():"+i+" is out of range");const p=new d(i,i),c=this.ss.lowerBound(p);if(c){if(c.low<=i&&i<=c.high)return void u("free():"+i+" has already been vacant");if(c===this.ss.front())i+1===c.low?--c.low:this.ss.insert(p);else{const f=this.ss.reverseLowerBound(p);f.high+1===i?i+1===c.low?(this.ss.eraseElementByValue(f),c.low=f.low):f.high=i:i+1===c.low?c.low=i:this.ss.insert(p)}}else{if(c===this.ss.front())return void this.ss.insert(p);const f=this.ss.reverseLowerBound(p);f.high+1===i?f.high=i:this.ss.insert(p)}o("free():"+i)},s.prototype.clear=function(){o("clear()"),this.ss.clear(),this.ss.insert(new d(this.min,this.max))},s.prototype.intervalCount=function(){return this.ss.size()},s.prototype.dump=function(){console.log("length:"+this.ss.size());for(const i of this.ss)console.log(i)},n.exports=s},{debug:18,"js-sdsl":36}],48:[function(t,n,l){var a=t("wrappy");function o(d){var s=function(){return s.called?s.value:(s.called=!0,s.value=d.apply(this,arguments))};return s.called=!1,s}function u(d){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=d.apply(this,arguments)},i=d.name||"Function wrapped with `once`";return s.onceError=i+" shouldn't be called more than once",s.called=!1,s}n.exports=a(o),n.exports.strict=a(u),o.proto=o(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u(this)},configurable:!0})})},{wrappy:79}],49:[function(t,n,l){(function(a){(function(){a===void 0||!a.version||a.version.indexOf("v0.")===0||a.version.indexOf("v1.")===0&&a.version.indexOf("v1.8.")!==0?n.exports={nextTick:function(o,u,d,s){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var i,p,c=arguments.length;switch(c){case 0:case 1:return a.nextTick(o);case 2:return a.nextTick(function(){o.call(null,u)});case 3:return a.nextTick(function(){o.call(null,u,d)});case 4:return a.nextTick(function(){o.call(null,u,d,s)});default:for(i=new Array(c-1),p=0;p<i.length;)i[p++]=arguments[p];return a.nextTick(function(){o.apply(null,i)})}}}:n.exports=a}).call(this)}).call(this,t("_process"))},{_process:50}],50:[function(t,n,l){var a,o,u=n.exports={};function d(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(y){if(a===setTimeout)return setTimeout(y,0);if((a===d||!a)&&setTimeout)return a=setTimeout,setTimeout(y,0);try{return a(y,0)}catch(_){try{return a.call(null,y,0)}catch(T){return a.call(this,y,0)}}}(function(){try{a=typeof setTimeout=="function"?setTimeout:d}catch(y){a=d}try{o=typeof clearTimeout=="function"?clearTimeout:s}catch(y){o=s}})();var p,c=[],f=!1,h=-1;function v(){f&&p&&(f=!1,p.length?c=p.concat(c):h=-1,c.length&&m())}function m(){if(!f){var y=i(v);f=!0;for(var _=c.length;_;){for(p=c,c=[];++h<_;)p&&p[h].run();h=-1,_=c.length}p=null,f=!1,function(T){if(o===clearTimeout)return clearTimeout(T);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(T);try{o(T)}catch(B){try{return o.call(null,T)}catch(F){return o.call(this,T)}}}(y)}}function g(y,_){this.fun=y,this.array=_}function b(){}u.nextTick=function(y){var _=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)_[T-1]=arguments[T];c.push(new g(y,_)),c.length!==1||f||i(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=b,u.addListener=b,u.once=b,u.off=b,u.removeListener=b,u.removeAllListeners=b,u.emit=b,u.prependListener=b,u.prependOnceListener=b,u.listeners=function(y){return[]},u.binding=function(y){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(y){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],51:[function(t,n,l){(function(a){(function(){(function(o){var u=typeof l=="object"&&l&&!l.nodeType&&l,d=typeof n=="object"&&n&&!n.nodeType&&n,s=typeof a=="object"&&a;s.global!==s&&s.window!==s&&s.self!==s||(o=s);var i,p,c=2147483647,f=36,h=1,v=26,m=38,g=700,b=72,y=128,_="-",T=/^xn--/,B=/[^\x20-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Z=f-h,j=Math.floor,E=String.fromCharCode;function A(L){throw new RangeError(R[L])}function C(L,O){for(var K=L.length,H=[];K--;)H[K]=O(L[K]);return H}function I(L,O){var K=L.split("@"),H="";return K.length>1&&(H=K[0]+"@",L=K[1]),H+C((L=L.replace(F,".")).split("."),O).join(".")}function z(L){for(var O,K,H=[],J=0,ne=L.length;J<ne;)(O=L.charCodeAt(J++))>=55296&&O<=56319&&J<ne?(64512&(K=L.charCodeAt(J++)))==56320?H.push(((1023&O)<<10)+(1023&K)+65536):(H.push(O),J--):H.push(O);return H}function W(L){return C(L,function(O){var K="";return O>65535&&(K+=E((O-=65536)>>>10&1023|55296),O=56320|1023&O),K+=E(O)}).join("")}function G(L,O){return L+22+75*(L<26)-((O!=0)<<5)}function q(L,O,K){var H=0;for(L=K?j(L/g):L>>1,L+=j(L/O);L>Z*v>>1;H+=f)L=j(L/Z);return j(H+(Z+1)*L/(L+m))}function N(L){var O,K,H,J,ne,ie,te,x,w,D,Q,ee=[],re=L.length,se=0,$=y,S=b;for((K=L.lastIndexOf(_))<0&&(K=0),H=0;H<K;++H)L.charCodeAt(H)>=128&&A("not-basic"),ee.push(L.charCodeAt(H));for(J=K>0?K+1:0;J<re;){for(ne=se,ie=1,te=f;J>=re&&A("invalid-input"),((x=(Q=L.charCodeAt(J++))-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:f)>=f||x>j((c-se)/ie))&&A("overflow"),se+=x*ie,!(x<(w=te<=S?h:te>=S+v?v:te-S));te+=f)ie>j(c/(D=f-w))&&A("overflow"),ie*=D;S=q(se-ne,O=ee.length+1,ne==0),j(se/O)>c-$&&A("overflow"),$+=j(se/O),se%=O,ee.splice(se++,0,$)}return W(ee)}function V(L){var O,K,H,J,ne,ie,te,x,w,D,Q,ee,re,se,$,S=[];for(ee=(L=z(L)).length,O=y,K=0,ne=b,ie=0;ie<ee;++ie)(Q=L[ie])<128&&S.push(E(Q));for(H=J=S.length,J&&S.push(_);H<ee;){for(te=c,ie=0;ie<ee;++ie)(Q=L[ie])>=O&&Q<te&&(te=Q);for(te-O>j((c-K)/(re=H+1))&&A("overflow"),K+=(te-O)*re,O=te,ie=0;ie<ee;++ie)if((Q=L[ie])<O&&++K>c&&A("overflow"),Q==O){for(x=K,w=f;!(x<(D=w<=ne?h:w>=ne+v?v:w-ne));w+=f)$=x-D,se=f-D,S.push(E(G(D+$%se,0))),x=j($/se);S.push(E(G(x,0))),ne=q(K,re,H==J),K=0,++H}++K,++O}return S.join("")}if(i={version:"1.4.1",ucs2:{decode:z,encode:W},decode:N,encode:V,toASCII:function(L){return I(L,function(O){return B.test(O)?"xn--"+V(O):O})},toUnicode:function(L){return I(L,function(O){return T.test(O)?N(O.slice(4).toLowerCase()):O})}},u&&d)if(n.exports==u)d.exports=i;else for(p in i)i.hasOwnProperty(p)&&(u[p]=i[p]);else o.punycode=i})(this)}).call(this)}).call(this,typeof xe!="undefined"?xe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],52:[function(t,n,l){function a(u,d){return Object.prototype.hasOwnProperty.call(u,d)}n.exports=function(u,d,s,i){d=d||"&",s=s||"=";var p={};if(typeof u!="string"||u.length===0)return p;var c=/\+/g;u=u.split(d);var f=1e3;i&&typeof i.maxKeys=="number"&&(f=i.maxKeys);var h=u.length;f>0&&h>f&&(h=f);for(var v=0;v<h;++v){var m,g,b,y,_=u[v].replace(c,"%20"),T=_.indexOf(s);T>=0?(m=_.substr(0,T),g=_.substr(T+1)):(m=_,g=""),b=decodeURIComponent(m),y=decodeURIComponent(g),a(p,b)?o(p[b])?p[b].push(y):p[b]=[p[b],y]:p[b]=y}return p};var o=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"}},{}],53:[function(t,n,l){var a=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};n.exports=function(s,i,p,c){return i=i||"&",p=p||"=",s===null&&(s=void 0),typeof s=="object"?u(d(s),function(f){var h=encodeURIComponent(a(f))+p;return o(s[f])?u(s[f],function(v){return h+encodeURIComponent(a(v))}).join(i):h+encodeURIComponent(a(s[f]))}).join(i):c?encodeURIComponent(a(c))+p+encodeURIComponent(a(s)):""};var o=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"};function u(s,i){if(s.map)return s.map(i);for(var p=[],c=0;c<s.length;c++)p.push(i(s[c],c));return p}var d=Object.keys||function(s){var i=[];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&i.push(p);return i}},{}],54:[function(t,n,l){l.decode=l.parse=t("./decode"),l.encode=l.stringify=t("./encode")},{"./decode":52,"./encode":53}],55:[function(t,n,l){var a={};function o(d,s,i){i||(i=Error);var p=function(c){var f,h;function v(m,g,b){return c.call(this,function(y,_,T){return typeof s=="string"?s:s(y,_,T)}(m,g,b))||this}return h=c,(f=v).prototype=Object.create(h.prototype),f.prototype.constructor=f,f.__proto__=h,v}(i);p.prototype.name=i.name,p.prototype.code=d,a[d]=p}function u(d,s){if(Array.isArray(d)){var i=d.length;return d=d.map(function(p){return String(p)}),i>2?"one of ".concat(s," ").concat(d.slice(0,i-1).join(", "),", or ")+d[i-1]:i===2?"one of ".concat(s," ").concat(d[0]," or ").concat(d[1]):"of ".concat(s," ").concat(d[0])}return"of ".concat(s," ").concat(String(d))}o("ERR_INVALID_OPT_VALUE",function(d,s){return'The value "'+s+'" is invalid for option "'+d+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(d,s,i){var p,c,f;if(typeof s=="string"&&(c="not ",s.substr(0,c.length)===c)?(p="must not be",s=s.replace(/^not /,"")):p="must be",function(v,m,g){return(g===void 0||g>v.length)&&(g=v.length),v.substring(g-m.length,g)===m}(d," argument"))f="The ".concat(d," ").concat(p," ").concat(u(s,"type"));else{var h=function(v,m,g){return typeof g!="number"&&(g=0),!(g+m.length>v.length)&&v.indexOf(m,g)!==-1}(d,".")?"property":"argument";f='The "'.concat(d,'" ').concat(h," ").concat(p," ").concat(u(s,"type"))}return f+=". Received type ".concat(typeof i)},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(d){return"The "+d+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(d){return"Cannot call "+d+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(d){return"Unknown encoding: "+d},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),n.exports.codes=a},{}],56:[function(t,n,l){(function(a){(function(){var o=Object.keys||function(v){var m=[];for(var g in v)m.push(g);return m};n.exports=c;var u=t("./_stream_readable"),d=t("./_stream_writable");t("inherits")(c,u);for(var s=o(d.prototype),i=0;i<s.length;i++){var p=s[i];c.prototype[p]||(c.prototype[p]=d.prototype[p])}function c(v){if(!(this instanceof c))return new c(v);u.call(this,v),d.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||a.nextTick(h,this)}function h(v){v.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":58,"./_stream_writable":60,_process:50,inherits:24}],57:[function(t,n,l){n.exports=o;var a=t("./_stream_transform");function o(u){if(!(this instanceof o))return new o(u);a.call(this,u)}t("inherits")(o,a),o.prototype._transform=function(u,d,s){s(null,u)}},{"./_stream_transform":59,inherits:24}],58:[function(t,n,l){(function(a,o){(function(){var u;n.exports=A,A.ReadableState=E,t("events").EventEmitter;var d=function(x,w){return x.listeners(w).length},s=t("./internal/streams/stream"),i=t("buffer").Buffer,p=o.Uint8Array||function(){},c,f=t("util");c=f&&f.debuglog?f.debuglog("stream"):function(){};var h,v,m,g=t("./internal/streams/buffer_list"),b=t("./internal/streams/destroy"),y=t("./internal/streams/state").getHighWaterMark,_=t("../errors").codes,T=_.ERR_INVALID_ARG_TYPE,B=_.ERR_STREAM_PUSH_AFTER_EOF,F=_.ERR_METHOD_NOT_IMPLEMENTED,R=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(A,s);var Z=b.errorOrDestroy,j=["error","close","destroy","pause","resume"];function E(x,w,D){u=u||t("./_stream_duplex"),x=x||{},typeof D!="boolean"&&(D=w instanceof u),this.objectMode=!!x.objectMode,D&&(this.objectMode=this.objectMode||!!x.readableObjectMode),this.highWaterMark=y(this,x,"readableHighWaterMark",D),this.buffer=new g,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.paused=!0,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(h||(h=t("string_decoder/").StringDecoder),this.decoder=new h(x.encoding),this.encoding=x.encoding)}function A(x){if(u=u||t("./_stream_duplex"),!(this instanceof A))return new A(x);var w=this instanceof u;this._readableState=new E(x,this,w),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),s.call(this)}function C(x,w,D,Q,ee){c("readableAddChunk",w);var re,se=x._readableState;if(w===null)se.reading=!1,function($,S){if(c("onEofChunk"),!S.ended){if(S.decoder){var k=S.decoder.end();k&&k.length&&(S.buffer.push(k),S.length+=S.objectMode?1:k.length)}S.ended=!0,S.sync?G($):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,q($)))}}(x,se);else if(ee||(re=function($,S){var k;X=S,i.isBuffer(X)||X instanceof p||typeof S=="string"||S===void 0||$.objectMode||(k=new T("chunk",["string","Buffer","Uint8Array"],S));var X;return k}(se,w)),re)Z(x,re);else if(se.objectMode||w&&w.length>0)if(typeof w=="string"||se.objectMode||Object.getPrototypeOf(w)===i.prototype||(w=function($){return i.from($)}(w)),Q)se.endEmitted?Z(x,new R):I(x,se,w,!0);else if(se.ended)Z(x,new B);else{if(se.destroyed)return!1;se.reading=!1,se.decoder&&!D?(w=se.decoder.write(w),se.objectMode||w.length!==0?I(x,se,w,!1):N(x,se)):I(x,se,w,!1)}else Q||(se.reading=!1,N(x,se));return!se.ended&&(se.length<se.highWaterMark||se.length===0)}function I(x,w,D,Q){w.flowing&&w.length===0&&!w.sync?(w.awaitDrain=0,x.emit("data",D)):(w.length+=w.objectMode?1:D.length,Q?w.buffer.unshift(D):w.buffer.push(D),w.needReadable&&G(x)),N(x,w)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),A.prototype.destroy=b.destroy,A.prototype._undestroy=b.undestroy,A.prototype._destroy=function(x,w){w(x)},A.prototype.push=function(x,w){var D,Q=this._readableState;return Q.objectMode?D=!0:typeof x=="string"&&((w=w||Q.defaultEncoding)!==Q.encoding&&(x=i.from(x,w),w=""),D=!0),C(this,x,w,!1,D)},A.prototype.unshift=function(x){return C(this,x,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(x){h||(h=t("string_decoder/").StringDecoder);var w=new h(x);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;for(var D=this._readableState.buffer.head,Q="";D!==null;)Q+=w.write(D.data),D=D.next;return this._readableState.buffer.clear(),Q!==""&&this._readableState.buffer.push(Q),this._readableState.length=Q.length,this};var z=1073741824;function W(x,w){return x<=0||w.length===0&&w.ended?0:w.objectMode?1:x!=x?w.flowing&&w.length?w.buffer.head.data.length:w.length:(x>w.highWaterMark&&(w.highWaterMark=function(D){return D>=z?D=z:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}(x)),x<=w.length?x:w.ended?w.length:(w.needReadable=!0,0))}function G(x){var w=x._readableState;c("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,w.emittedReadable||(c("emitReadable",w.flowing),w.emittedReadable=!0,a.nextTick(q,x))}function q(x){var w=x._readableState;c("emitReadable_",w.destroyed,w.length,w.ended),w.destroyed||!w.length&&!w.ended||(x.emit("readable"),w.emittedReadable=!1),w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,H(x)}function N(x,w){w.readingMore||(w.readingMore=!0,a.nextTick(V,x,w))}function V(x,w){for(;!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0);){var D=w.length;if(c("maybeReadMore read 0"),x.read(0),D===w.length)break}w.readingMore=!1}function L(x){var w=x._readableState;w.readableListening=x.listenerCount("readable")>0,w.resumeScheduled&&!w.paused?w.flowing=!0:x.listenerCount("data")>0&&x.resume()}function O(x){c("readable nexttick read 0"),x.read(0)}function K(x,w){c("resume",w.reading),w.reading||x.read(0),w.resumeScheduled=!1,x.emit("resume"),H(x),w.flowing&&!w.reading&&x.read(0)}function H(x){var w=x._readableState;for(c("flow",w.flowing);w.flowing&&x.read()!==null;);}function J(x,w){return w.length===0?null:(w.objectMode?D=w.buffer.shift():!x||x>=w.length?(D=w.decoder?w.buffer.join(""):w.buffer.length===1?w.buffer.first():w.buffer.concat(w.length),w.buffer.clear()):D=w.buffer.consume(x,w.decoder),D);var D}function ne(x){var w=x._readableState;c("endReadable",w.endEmitted),w.endEmitted||(w.ended=!0,a.nextTick(ie,w,x))}function ie(x,w){if(c("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,w.readable=!1,w.emit("end"),x.autoDestroy)){var D=w._writableState;(!D||D.autoDestroy&&D.finished)&&w.destroy()}}function te(x,w){for(var D=0,Q=x.length;D<Q;D++)if(x[D]===w)return D;return-1}A.prototype.read=function(x){c("read",x),x=parseInt(x,10);var w=this._readableState,D=x;if(x!==0&&(w.emittedReadable=!1),x===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended))return c("read: emitReadable",w.length,w.ended),w.length===0&&w.ended?ne(this):G(this),null;if((x=W(x,w))===0&&w.ended)return w.length===0&&ne(this),null;var Q,ee=w.needReadable;return c("need readable",ee),(w.length===0||w.length-x<w.highWaterMark)&&c("length less than watermark",ee=!0),w.ended||w.reading?c("reading or ended",ee=!1):ee&&(c("do read"),w.reading=!0,w.sync=!0,w.length===0&&(w.needReadable=!0),this._read(w.highWaterMark),w.sync=!1,w.reading||(x=W(D,w))),(Q=x>0?J(x,w):null)===null?(w.needReadable=w.length<=w.highWaterMark,x=0):(w.length-=x,w.awaitDrain=0),w.length===0&&(w.ended||(w.needReadable=!0),D!==x&&w.ended&&ne(this)),Q!==null&&this.emit("data",Q),Q},A.prototype._read=function(x){Z(this,new F("_read()"))},A.prototype.pipe=function(x,w){var D=this,Q=this._readableState;switch(Q.pipesCount){case 0:Q.pipes=x;break;case 1:Q.pipes=[Q.pipes,x];break;default:Q.pipes.push(x)}Q.pipesCount+=1,c("pipe count=%d opts=%j",Q.pipesCount,w);var ee=(!w||w.end!==!1)&&x!==a.stdout&&x!==a.stderr?se:ce;function re(me,ge){c("onunpipe"),me===D&&ge&&ge.hasUnpiped===!1&&(ge.hasUnpiped=!0,c("cleanup"),x.removeListener("close",ae),x.removeListener("finish",ue),x.removeListener("drain",$),x.removeListener("error",X),x.removeListener("unpipe",re),D.removeListener("end",se),D.removeListener("end",ce),D.removeListener("data",k),S=!0,!Q.awaitDrain||x._writableState&&!x._writableState.needDrain||$())}function se(){c("onend"),x.end()}Q.endEmitted?a.nextTick(ee):D.once("end",ee),x.on("unpipe",re);var $=function(me){return function(){var ge=me._readableState;c("pipeOnDrain",ge.awaitDrain),ge.awaitDrain&&ge.awaitDrain--,ge.awaitDrain===0&&d(me,"data")&&(ge.flowing=!0,H(me))}}(D);x.on("drain",$);var S=!1;function k(me){c("ondata");var ge=x.write(me);c("dest.write",ge),ge===!1&&((Q.pipesCount===1&&Q.pipes===x||Q.pipesCount>1&&te(Q.pipes,x)!==-1)&&!S&&(c("false write response, pause",Q.awaitDrain),Q.awaitDrain++),D.pause())}function X(me){c("onerror",me),ce(),x.removeListener("error",X),d(x,"error")===0&&Z(x,me)}function ae(){x.removeListener("finish",ue),ce()}function ue(){c("onfinish"),x.removeListener("close",ae),ce()}function ce(){c("unpipe"),D.unpipe(x)}return D.on("data",k),function(me,ge,Ce){if(typeof me.prependListener=="function")return me.prependListener(ge,Ce);me._events&&me._events[ge]?Array.isArray(me._events[ge])?me._events[ge].unshift(Ce):me._events[ge]=[Ce,me._events[ge]]:me.on(ge,Ce)}(x,"error",X),x.once("close",ae),x.once("finish",ue),x.emit("pipe",D),Q.flowing||(c("pipe resume"),D.resume()),x},A.prototype.unpipe=function(x){var w=this._readableState,D={hasUnpiped:!1};if(w.pipesCount===0)return this;if(w.pipesCount===1)return x&&x!==w.pipes?this:(x||(x=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,x&&x.emit("unpipe",this,D),this);if(!x){var Q=w.pipes,ee=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var re=0;re<ee;re++)Q[re].emit("unpipe",this,{hasUnpiped:!1});return this}var se=te(w.pipes,x);return se===-1?this:(w.pipes.splice(se,1),w.pipesCount-=1,w.pipesCount===1&&(w.pipes=w.pipes[0]),x.emit("unpipe",this,D),this)},A.prototype.on=function(x,w){var D=s.prototype.on.call(this,x,w),Q=this._readableState;return x==="data"?(Q.readableListening=this.listenerCount("readable")>0,Q.flowing!==!1&&this.resume()):x==="readable"&&(Q.endEmitted||Q.readableListening||(Q.readableListening=Q.needReadable=!0,Q.flowing=!1,Q.emittedReadable=!1,c("on readable",Q.length,Q.reading),Q.length?G(this):Q.reading||a.nextTick(O,this))),D},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(x,w){var D=s.prototype.removeListener.call(this,x,w);return x==="readable"&&a.nextTick(L,this),D},A.prototype.removeAllListeners=function(x){var w=s.prototype.removeAllListeners.apply(this,arguments);return x!=="readable"&&x!==void 0||a.nextTick(L,this),w},A.prototype.resume=function(){var x=this._readableState;return x.flowing||(c("resume"),x.flowing=!x.readableListening,function(w,D){D.resumeScheduled||(D.resumeScheduled=!0,a.nextTick(K,w,D))}(this,x)),x.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(x){var w=this,D=this._readableState,Q=!1;for(var ee in x.on("end",function(){if(c("wrapped end"),D.decoder&&!D.ended){var se=D.decoder.end();se&&se.length&&w.push(se)}w.push(null)}),x.on("data",function(se){c("wrapped data"),D.decoder&&(se=D.decoder.write(se)),(!D.objectMode||se!=null)&&(D.objectMode||se&&se.length)&&(w.push(se)||(Q=!0,x.pause()))}),x)this[ee]===void 0&&typeof x[ee]=="function"&&(this[ee]=function(se){return function(){return x[se].apply(x,arguments)}}(ee));for(var re=0;re<j.length;re++)x.on(j[re],this.emit.bind(this,j[re]));return this._read=function(se){c("wrapped _read",se),Q&&(Q=!1,x.resume())},this},typeof Symbol=="function"&&(A.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=t("./internal/streams/async_iterator")),v(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),A._fromList=J,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(A.from=function(x,w){return m===void 0&&(m=t("./internal/streams/from")),m(A,x,w)})}).call(this)}).call(this,t("_process"),typeof xe!="undefined"?xe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/async_iterator":61,"./internal/streams/buffer_list":62,"./internal/streams/destroy":63,"./internal/streams/from":65,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,events:22,inherits:24,"string_decoder/":75,util:16}],59:[function(t,n,l){n.exports=p;var a=t("../errors").codes,o=a.ERR_METHOD_NOT_IMPLEMENTED,u=a.ERR_MULTIPLE_CALLBACK,d=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=a.ERR_TRANSFORM_WITH_LENGTH_0,i=t("./_stream_duplex");function p(h){if(!(this instanceof p))return new p(h);i.call(this,h),this._transformState={afterTransform:function(v,m){var g=this._transformState;g.transforming=!1;var b=g.writecb;if(b===null)return this.emit("error",new u);g.writechunk=null,g.writecb=null,m!=null&&this.push(m),b(v);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",c)}function c(){var h=this;typeof this._flush!="function"||this._readableState.destroyed?f(this,null,null):this._flush(function(v,m){f(h,v,m)})}function f(h,v,m){if(v)return h.emit("error",v);if(m!=null&&h.push(m),h._writableState.length)throw new s;if(h._transformState.transforming)throw new d;return h.push(null)}t("inherits")(p,i),p.prototype.push=function(h,v){return this._transformState.needTransform=!1,i.prototype.push.call(this,h,v)},p.prototype._transform=function(h,v,m){m(new o("_transform()"))},p.prototype._write=function(h,v,m){var g=this._transformState;if(g.writecb=m,g.writechunk=h,g.writeencoding=v,!g.transforming){var b=this._readableState;(g.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},p.prototype._read=function(h){var v=this._transformState;v.writechunk===null||v.transforming?v.needTransform=!0:(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform))},p.prototype._destroy=function(h,v){i.prototype._destroy.call(this,h,function(m){v(m)})}},{"../errors":55,"./_stream_duplex":56,inherits:24}],60:[function(t,n,l){(function(a,o){(function(){function u(N){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(L,O,K){var H=L.entry;for(L.entry=null;H;){var J=H.callback;O.pendingcb--,J(K),H=H.next}O.corkedRequestsFree.next=L})(V,N)}}var d;n.exports=A,A.WritableState=E;var s={deprecate:t("util-deprecate")},i=t("./internal/streams/stream"),p=t("buffer").Buffer,c=o.Uint8Array||function(){},f,h=t("./internal/streams/destroy"),v=t("./internal/streams/state").getHighWaterMark,m=t("../errors").codes,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_MULTIPLE_CALLBACK,_=m.ERR_STREAM_CANNOT_PIPE,T=m.ERR_STREAM_DESTROYED,B=m.ERR_STREAM_NULL_VALUES,F=m.ERR_STREAM_WRITE_AFTER_END,R=m.ERR_UNKNOWN_ENCODING,Z=h.errorOrDestroy;function j(){}function E(N,V,L){d=d||t("./_stream_duplex"),N=N||{},typeof L!="boolean"&&(L=V instanceof d),this.objectMode=!!N.objectMode,L&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=v(this,N,"writableHighWaterMark",L),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=N.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){(function(H,J){var ne=H._writableState,ie=ne.sync,te=ne.writecb;if(typeof te!="function")throw new y;if(function(w){w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0}(ne),J)(function(w,D,Q,ee,re){--D.pendingcb,Q?(a.nextTick(re,ee),a.nextTick(q,w,D),w._writableState.errorEmitted=!0,Z(w,ee)):(re(ee),w._writableState.errorEmitted=!0,Z(w,ee),q(w,D))})(H,ne,ie,J,te);else{var x=W(ne)||H.destroyed;x||ne.corked||ne.bufferProcessing||!ne.bufferedRequest||z(H,ne),ie?a.nextTick(I,H,ne,x,te):I(H,ne,x,te)}})(V,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}function A(N){var V=this instanceof(d=d||t("./_stream_duplex"));if(!V&&!f.call(A,this))return new A(N);this._writableState=new E(N,this,V),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),i.call(this)}function C(N,V,L,O,K,H,J){V.writelen=O,V.writecb=J,V.writing=!0,V.sync=!0,V.destroyed?V.onwrite(new T("write")):L?N._writev(K,V.onwrite):N._write(K,H,V.onwrite),V.sync=!1}function I(N,V,L,O){L||function(K,H){H.length===0&&H.needDrain&&(H.needDrain=!1,K.emit("drain"))}(N,V),V.pendingcb--,O(),q(N,V)}function z(N,V){V.bufferProcessing=!0;var L=V.bufferedRequest;if(N._writev&&L&&L.next){var O=V.bufferedRequestCount,K=new Array(O),H=V.corkedRequestsFree;H.entry=L;for(var J=0,ne=!0;L;)K[J]=L,L.isBuf||(ne=!1),L=L.next,J+=1;K.allBuffers=ne,C(N,V,!0,V.length,K,"",H.finish),V.pendingcb++,V.lastBufferedRequest=null,H.next?(V.corkedRequestsFree=H.next,H.next=null):V.corkedRequestsFree=new u(V),V.bufferedRequestCount=0}else{for(;L;){var ie=L.chunk,te=L.encoding,x=L.callback;if(C(N,V,!1,V.objectMode?1:ie.length,ie,te,x),L=L.next,V.bufferedRequestCount--,V.writing)break}L===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=L,V.bufferProcessing=!1}function W(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function G(N,V){N._final(function(L){V.pendingcb--,L&&Z(N,L),V.prefinished=!0,N.emit("prefinish"),q(N,V)})}function q(N,V){var L=W(V);if(L&&(function(K,H){H.prefinished||H.finalCalled||(typeof K._final!="function"||H.destroyed?(H.prefinished=!0,K.emit("prefinish")):(H.pendingcb++,H.finalCalled=!0,a.nextTick(G,K,H)))}(N,V),V.pendingcb===0&&(V.finished=!0,N.emit("finish"),V.autoDestroy))){var O=N._readableState;(!O||O.autoDestroy&&O.endEmitted)&&N.destroy()}return L}t("inherits")(A,i),E.prototype.getBuffer=function(){for(var N=this.bufferedRequest,V=[];N;)V.push(N),N=N.next;return V},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(N){}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(N){return!!f.call(this,N)||this===A&&N&&N._writableState instanceof E}})):f=function(N){return N instanceof this},A.prototype.pipe=function(){Z(this,new _)},A.prototype.write=function(N,V,L){var O,K=this._writableState,H=!1,J=!K.objectMode&&(O=N,p.isBuffer(O)||O instanceof c);return J&&!p.isBuffer(N)&&(N=function(ne){return p.from(ne)}(N)),typeof V=="function"&&(L=V,V=null),J?V="buffer":V||(V=K.defaultEncoding),typeof L!="function"&&(L=j),K.ending?function(ne,ie){var te=new F;Z(ne,te),a.nextTick(ie,te)}(this,L):(J||function(ne,ie,te,x){var w;return te===null?w=new B:typeof te=="string"||ie.objectMode||(w=new g("chunk",["string","Buffer"],te)),!w||(Z(ne,w),a.nextTick(x,w),!1)}(this,K,N,L))&&(K.pendingcb++,H=function(ne,ie,te,x,w,D){if(!te){var Q=function($,S,k){return $.objectMode||$.decodeStrings===!1||typeof S!="string"||(S=p.from(S,k)),S}(ie,x,w);x!==Q&&(te=!0,w="buffer",x=Q)}var ee=ie.objectMode?1:x.length;ie.length+=ee;var re=ie.length<ie.highWaterMark;if(re||(ie.needDrain=!0),ie.writing||ie.corked){var se=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:x,encoding:w,isBuf:te,callback:D,next:null},se?se.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1}else C(ne,ie,!1,ee,x,w,D);return re}(this,K,J,N,V,L)),H},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var N=this._writableState;N.corked&&(N.corked--,N.writing||N.corked||N.bufferProcessing||!N.bufferedRequest||z(this,N))},A.prototype.setDefaultEncoding=function(N){if(typeof N=="string"&&(N=N.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((N+"").toLowerCase())>-1))throw new R(N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(N,V,L){L(new b("_write()"))},A.prototype._writev=null,A.prototype.end=function(N,V,L){var O=this._writableState;return typeof N=="function"?(L=N,N=null,V=null):typeof V=="function"&&(L=V,V=null),N!=null&&this.write(N,V),O.corked&&(O.corked=1,this.uncork()),O.ending||function(K,H,J){H.ending=!0,q(K,H),J&&(H.finished?a.nextTick(J):K.once("finish",J)),H.ended=!0,K.writable=!1}(this,O,L),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(N,V){V(N)}}).call(this)}).call(this,t("_process"),typeof xe!="undefined"?xe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/destroy":63,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,inherits:24,"util-deprecate":78}],61:[function(t,n,l){(function(a){(function(){var o;function u(_,T,B){return T in _?Object.defineProperty(_,T,{value:B,enumerable:!0,configurable:!0,writable:!0}):_[T]=B,_}var d=t("./end-of-stream"),s=Symbol("lastResolve"),i=Symbol("lastReject"),p=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),v=Symbol("stream");function m(_,T){return{value:_,done:T}}function g(_){var T=_[s];if(T!==null){var B=_[v].read();B!==null&&(_[f]=null,_[s]=null,_[i]=null,T(m(B,!1)))}}var b=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((u(o={get stream(){return this[v]},next:function(){var _=this,T=this[p];if(T!==null)return Promise.reject(T);if(this[c])return Promise.resolve(m(void 0,!0));if(this[v].destroyed)return new Promise(function(Z,j){a.nextTick(function(){_[p]?j(_[p]):Z(m(void 0,!0))})});var B,F=this[f];if(F)B=new Promise(function(Z,j){return function(E,A){Z.then(function(){j[c]?E(m(void 0,!0)):j[h](E,A)},A)}}(F,this));else{var R=this[v].read();if(R!==null)return Promise.resolve(m(R,!1));B=new Promise(this[h])}return this[f]=B,B}},Symbol.asyncIterator,function(){return this}),u(o,"return",function(){var _=this;return new Promise(function(T,B){_[v].destroy(null,function(F){F?B(F):T(m(void 0,!0))})})}),o),b);n.exports=function(_){var T,B=Object.create(y,(u(T={},v,{value:_,writable:!0}),u(T,s,{value:null,writable:!0}),u(T,i,{value:null,writable:!0}),u(T,p,{value:null,writable:!0}),u(T,c,{value:_._readableState.endEmitted,writable:!0}),u(T,h,{value:function(F,R){var Z=B[v].read();Z?(B[f]=null,B[s]=null,B[i]=null,F(m(Z,!1))):(B[s]=F,B[i]=R)},writable:!0}),T));return B[f]=null,d(_,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R=B[i];return R!==null&&(B[f]=null,B[s]=null,B[i]=null,R(F)),void(B[p]=F)}var Z=B[s];Z!==null&&(B[f]=null,B[s]=null,B[i]=null,Z(m(void 0,!0))),B[c]=!0}),_.on("readable",function(F){a.nextTick(g,F)}.bind(null,B)),B}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":64,_process:50}],62:[function(t,n,l){function a(p,c){var f=Object.keys(p);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(p);c&&(h=h.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),f.push.apply(f,h)}return f}function o(p,c,f){return c in p?Object.defineProperty(p,c,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[c]=f,p}function u(p,c){for(var f=0;f<c.length;f++){var h=c[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(p,h.key,h)}}var d=t("buffer").Buffer,s=t("util").inspect,i=s&&s.custom||"inspect";n.exports=function(){function p(){(function(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")})(this,p),this.head=null,this.tail=null,this.length=0}var c,f;return c=p,(f=[{key:"push",value:function(h){var v={data:h,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(h){var v={data:h,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(h){if(this.length===0)return"";for(var v=this.head,m=""+v.data;v=v.next;)m+=h+v.data;return m}},{key:"concat",value:function(h){if(this.length===0)return d.alloc(0);for(var v,m,g,b=d.allocUnsafe(h>>>0),y=this.head,_=0;y;)v=y.data,m=b,g=_,d.prototype.copy.call(v,m,g),_+=y.data.length,y=y.next;return b}},{key:"consume",value:function(h,v){var m;return h<this.head.data.length?(m=this.head.data.slice(0,h),this.head.data=this.head.data.slice(h)):m=h===this.head.data.length?this.shift():v?this._getString(h):this._getBuffer(h),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(h){var v=this.head,m=1,g=v.data;for(h-=g.length;v=v.next;){var b=v.data,y=h>b.length?b.length:h;if(y===b.length?g+=b:g+=b.slice(0,h),(h-=y)===0){y===b.length?(++m,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=b.slice(y));break}++m}return this.length-=m,g}},{key:"_getBuffer",value:function(h){var v=d.allocUnsafe(h),m=this.head,g=1;for(m.data.copy(v),h-=m.data.length;m=m.next;){var b=m.data,y=h>b.length?b.length:h;if(b.copy(v,v.length-h,0,y),(h-=y)===0){y===b.length?(++g,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=b.slice(y));break}++g}return this.length-=g,v}},{key:i,value:function(h,v){return s(this,function(m){for(var g=1;g<arguments.length;g++){var b=arguments[g]!=null?arguments[g]:{};g%2?a(Object(b),!0).forEach(function(y){o(m,y,b[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(b)):a(Object(b)).forEach(function(y){Object.defineProperty(m,y,Object.getOwnPropertyDescriptor(b,y))})}return m}({},v,{depth:0,customInspect:!1}))}}])&&u(c.prototype,f),p}()},{buffer:17,util:16}],63:[function(t,n,l){(function(a){(function(){function o(s,i){d(s,i),u(s)}function u(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function d(s,i){s.emit("error",i)}n.exports={destroy:function(s,i){var p=this,c=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return c||f?(i?i(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(d,this,s)):a.nextTick(d,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(h){!i&&h?p._writableState?p._writableState.errorEmitted?a.nextTick(u,p):(p._writableState.errorEmitted=!0,a.nextTick(o,p,h)):a.nextTick(o,p,h):i?(a.nextTick(u,p),i(h)):a.nextTick(u,p)}),this)},undestroy:function(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(s,i){var p=s._readableState,c=s._writableState;p&&p.autoDestroy||c&&c.autoDestroy?s.destroy(i):s.emit("error",i)}}}).call(this)}).call(this,t("_process"))},{_process:50}],64:[function(t,n,l){var a=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}n.exports=function u(d,s,i){if(typeof s=="function")return u(d,null,s);s||(s={}),i=function(T){var B=!1;return function(){if(!B){B=!0;for(var F=arguments.length,R=new Array(F),Z=0;Z<F;Z++)R[Z]=arguments[Z];T.apply(this,R)}}}(i||o);var p=s.readable||s.readable!==!1&&d.readable,c=s.writable||s.writable!==!1&&d.writable,f=function(){d.writable||v()},h=d._writableState&&d._writableState.finished,v=function(){c=!1,h=!0,p||i.call(d)},m=d._readableState&&d._readableState.endEmitted,g=function(){p=!1,m=!0,c||i.call(d)},b=function(T){i.call(d,T)},y=function(){var T;return p&&!m?(d._readableState&&d._readableState.ended||(T=new a),i.call(d,T)):c&&!h?(d._writableState&&d._writableState.ended||(T=new a),i.call(d,T)):void 0},_=function(){d.req.on("finish",v)};return function(T){return T.setHeader&&typeof T.abort=="function"}(d)?(d.on("complete",v),d.on("abort",y),d.req?_():d.on("request",_)):c&&!d._writableState&&(d.on("end",f),d.on("close",f)),d.on("end",g),d.on("finish",v),s.error!==!1&&d.on("error",b),d.on("close",y),function(){d.removeListener("complete",v),d.removeListener("abort",y),d.removeListener("request",_),d.req&&d.req.removeListener("finish",v),d.removeListener("end",f),d.removeListener("close",f),d.removeListener("finish",v),d.removeListener("end",g),d.removeListener("error",b),d.removeListener("close",y)}}},{"../../../errors":55}],65:[function(t,n,l){n.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],66:[function(t,n,l){var a,o=t("../../../errors").codes,u=o.ERR_MISSING_ARGS,d=o.ERR_STREAM_DESTROYED;function s(c){if(c)throw c}function i(c){c()}function p(c,f){return c.pipe(f)}n.exports=function(){for(var c=arguments.length,f=new Array(c),h=0;h<c;h++)f[h]=arguments[h];var v,m=function(b){return b.length?typeof b[b.length-1]!="function"?s:b.pop():s}(f);if(Array.isArray(f[0])&&(f=f[0]),f.length<2)throw new u("streams");var g=f.map(function(b,y){var _=y<f.length-1;return function(T,B,F,R){R=function(E){var A=!1;return function(){A||(A=!0,E.apply(void 0,arguments))}}(R);var Z=!1;T.on("close",function(){Z=!0}),a===void 0&&(a=t("./end-of-stream")),a(T,{readable:B,writable:F},function(E){if(E)return R(E);Z=!0,R()});var j=!1;return function(E){if(!Z&&!j)return j=!0,function(A){return A.setHeader&&typeof A.abort=="function"}(T)?T.abort():typeof T.destroy=="function"?T.destroy():void R(E||new d("pipe"))}}(b,_,y>0,function(T){v||(v=T),T&&g.forEach(i),_||(g.forEach(i),m(v))})});return f.reduce(p)}},{"../../../errors":55,"./end-of-stream":64}],67:[function(t,n,l){var a=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;n.exports={getHighWaterMark:function(o,u,d,s){var i=function(p,c,f){return p.highWaterMark!=null?p.highWaterMark:c?p[f]:null}(u,s,d);if(i!=null){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new a(s?d:"highWaterMark",i);return Math.floor(i)}return o.objectMode?16:16384}}},{"../../../errors":55}],68:[function(t,n,l){n.exports=t("events").EventEmitter},{events:22}],69:[function(t,n,l){(l=n.exports=t("./lib/_stream_readable.js")).Stream=l,l.Readable=l,l.Writable=t("./lib/_stream_writable.js"),l.Duplex=t("./lib/_stream_duplex.js"),l.Transform=t("./lib/_stream_transform.js"),l.PassThrough=t("./lib/_stream_passthrough.js"),l.finished=t("./lib/internal/streams/end-of-stream.js"),l.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":56,"./lib/_stream_passthrough.js":57,"./lib/_stream_readable.js":58,"./lib/_stream_transform.js":59,"./lib/_stream_writable.js":60,"./lib/internal/streams/end-of-stream.js":64,"./lib/internal/streams/pipeline.js":66}],70:[function(t,n,l){n.exports=function(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var a;if(arguments.length>0){a=new Array(arguments.length-2);for(var o=0;o<a.length;o++)a[o]=arguments[o+2]}return new function(u,d,s){var i=this;this._callback=u,this._args=s,this._interval=setInterval(u,d,this._args),this.reschedule=function(p){p||(p=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,p,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}(arguments[0],arguments[1],a)}},{}],71:[function(t,n,l){n.exports=t("./index.js")()},{"./index.js":72}],72:[function(t,n,l){(function(a){(function(){function o(u){return u instanceof a?a.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}n.exports=function(u){return(u=u||{}).circles?function(s){var i=[],p=[];return s.proto?function f(h){if(typeof h!="object"||h===null)return h;if(h instanceof Date)return new Date(h);if(Array.isArray(h))return c(h,f);if(h instanceof Map)return new Map(c(Array.from(h),f));if(h instanceof Set)return new Set(c(Array.from(h),f));var v={};for(var m in i.push(h),p.push(v),h){var g=h[m];if(typeof g!="object"||g===null)v[m]=g;else if(g instanceof Date)v[m]=new Date(g);else if(g instanceof Map)v[m]=new Map(c(Array.from(g),f));else if(g instanceof Set)v[m]=new Set(c(Array.from(g),f));else if(ArrayBuffer.isView(g))v[m]=o(g);else{var b=i.indexOf(g);v[m]=b!==-1?p[b]:f(g)}}return i.pop(),p.pop(),v}:function f(h){if(typeof h!="object"||h===null)return h;if(h instanceof Date)return new Date(h);if(Array.isArray(h))return c(h,f);if(h instanceof Map)return new Map(c(Array.from(h),f));if(h instanceof Set)return new Set(c(Array.from(h),f));var v={};for(var m in i.push(h),p.push(v),h)if(Object.hasOwnProperty.call(h,m)!==!1){var g=h[m];if(typeof g!="object"||g===null)v[m]=g;else if(g instanceof Date)v[m]=new Date(g);else if(g instanceof Map)v[m]=new Map(c(Array.from(g),f));else if(g instanceof Set)v[m]=new Set(c(Array.from(g),f));else if(ArrayBuffer.isView(g))v[m]=o(g);else{var b=i.indexOf(g);v[m]=b!==-1?p[b]:f(g)}}return i.pop(),p.pop(),v};function c(f,h){for(var v=Object.keys(f),m=new Array(v.length),g=0;g<v.length;g++){var b=v[g],y=f[b];if(typeof y!="object"||y===null)m[b]=y;else if(y instanceof Date)m[b]=new Date(y);else if(ArrayBuffer.isView(y))m[b]=o(y);else{var _=i.indexOf(y);m[b]=_!==-1?p[_]:h(y)}}return m}}(u):u.proto?function s(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return d(i,s);if(i instanceof Map)return new Map(d(Array.from(i),s));if(i instanceof Set)return new Set(d(Array.from(i),s));var p={};for(var c in i){var f=i[c];typeof f!="object"||f===null?p[c]=f:f instanceof Date?p[c]=new Date(f):f instanceof Map?p[c]=new Map(d(Array.from(f),s)):f instanceof Set?p[c]=new Set(d(Array.from(f),s)):ArrayBuffer.isView(f)?p[c]=o(f):p[c]=s(f)}return p}:function s(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return d(i,s);if(i instanceof Map)return new Map(d(Array.from(i),s));if(i instanceof Set)return new Set(d(Array.from(i),s));var p={};for(var c in i)if(Object.hasOwnProperty.call(i,c)!==!1){var f=i[c];typeof f!="object"||f===null?p[c]=f:f instanceof Date?p[c]=new Date(f):f instanceof Map?p[c]=new Map(d(Array.from(f),s)):f instanceof Set?p[c]=new Set(d(Array.from(f),s)):ArrayBuffer.isView(f)?p[c]=o(f):p[c]=s(f)}return p};function d(s,i){for(var p=Object.keys(s),c=new Array(p.length),f=0;f<p.length;f++){var h=p[f],v=s[h];typeof v!="object"||v===null?c[h]=v:v instanceof Date?c[h]=new Date(v):ArrayBuffer.isView(v)?c[h]=o(v):c[h]=i(v)}return c}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],73:[function(t,n,l){var a=t("buffer"),o=a.Buffer;function u(s,i){for(var p in s)i[p]=s[p]}function d(s,i,p){return o(s,i,p)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?n.exports=a:(u(a,l),l.Buffer=d),d.prototype=Object.create(o.prototype),u(o,d),d.from=function(s,i,p){if(typeof s=="number")throw new TypeError("Argument must not be a number");return o(s,i,p)},d.alloc=function(s,i,p){if(typeof s!="number")throw new TypeError("Argument must be a number");var c=o(s);return i!==void 0?typeof p=="string"?c.fill(i,p):c.fill(i):c.fill(0),c},d.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return o(s)},d.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(s)}},{buffer:17}],74:[function(t,n,l){n.exports=function(a){var o=a._readableState;return o?o.objectMode||typeof a._duplexState=="number"?a.read():a.read((u=o,u.buffer.length?u.buffer.head?u.buffer.head.data.length:u.buffer[0].length:u.length)):null;var u}},{}],75:[function(t,n,l){var a=t("safe-buffer").Buffer,o=a.isEncoding||function(m){switch((m=""+m)&&m.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 u(m){var g;switch(this.encoding=function(b){var y=function(_){if(!_)return"utf8";for(var T;;)switch(_){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 _;default:if(T)return;_=(""+_).toLowerCase(),T=!0}}(b);if(typeof y!="string"&&(a.isEncoding===o||!o(b)))throw new Error("Unknown encoding: "+b);return y||b}(m),this.encoding){case"utf16le":this.text=i,this.end=p,g=4;break;case"utf8":this.fillLast=s,g=4;break;case"base64":this.text=c,this.end=f,g=3;break;default:return this.write=h,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(g)}function d(m){return m<=127?0:m>>5==6?2:m>>4==14?3:m>>3==30?4:m>>6==2?-1:-2}function s(m){var g=this.lastTotal-this.lastNeed,b=function(y,_,T){if((192&_[0])!=128)return y.lastNeed=0,"�";if(y.lastNeed>1&&_.length>1){if((192&_[1])!=128)return y.lastNeed=1,"�";if(y.lastNeed>2&&_.length>2&&(192&_[2])!=128)return y.lastNeed=2,"�"}}(this,m);return b!==void 0?b:this.lastNeed<=m.length?(m.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(m.copy(this.lastChar,g,0,m.length),void(this.lastNeed-=m.length))}function i(m,g){if((m.length-g)%2==0){var b=m.toString("utf16le",g);if(b){var y=b.charCodeAt(b.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",g,m.length-1)}function p(m){var g=m&&m.length?this.write(m):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,b)}return g}function c(m,g){var b=(m.length-g)%3;return b===0?m.toString("base64",g):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",g,m.length-b))}function f(m){var g=m&&m.length?this.write(m):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function h(m){return m.toString(this.encoding)}function v(m){return m&&m.length?this.write(m):""}l.StringDecoder=u,u.prototype.write=function(m){if(m.length===0)return"";var g,b;if(this.lastNeed){if((g=this.fillLast(m))===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b<m.length?g?g+this.text(m,b):this.text(m,b):g||""},u.prototype.end=function(m){var g=m&&m.length?this.write(m):"";return this.lastNeed?g+"�":g},u.prototype.text=function(m,g){var b=function(_,T,B){var F=T.length-1;if(F<B)return 0;var R=d(T[F]);return R>=0?(R>0&&(_.lastNeed=R-1),R):--F<B||R===-2?0:(R=d(T[F]))>=0?(R>0&&(_.lastNeed=R-2),R):--F<B||R===-2?0:(R=d(T[F]))>=0?(R>0&&(R===2?R=0:_.lastNeed=R-3),R):0}(this,m,g);if(!this.lastNeed)return m.toString("utf8",g);this.lastTotal=b;var y=m.length-(b-this.lastNeed);return m.copy(this.lastChar,0,y),m.toString("utf8",g,y)},u.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length}},{"safe-buffer":73}],76:[function(t,n,l){var a=t("punycode"),o=t("./util");function u(){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}l.parse=T,l.resolve=function(B,F){return T(B,!1,!0).resolve(F)},l.resolveObject=function(B,F){return B?T(B,!1,!0).resolveObject(F):F},l.format=function(B){return o.isString(B)&&(B=T(B)),B instanceof u?B.format():u.prototype.format.call(B)},l.Url=u;var d=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
40
- `," "]),c=["'"].concat(p),f=["%","/","?",";","#"].concat(c),h=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");function T(B,F,R){if(B&&o.isObject(B)&&B instanceof u)return B;var Z=new u;return Z.parse(B,F,R),Z}u.prototype.parse=function(B,F,R){if(!o.isString(B))throw new TypeError("Parameter 'url' must be a string, not "+typeof B);var Z=B.indexOf("?"),j=Z!==-1&&Z<B.indexOf("#")?"?":"#",E=B.split(j);E[0]=E[0].replace(/\\/g,"/");var A=B=E.join(j);if(A=A.trim(),!R&&B.split("#").length===1){var C=i.exec(A);if(C)return this.path=A,this.href=A,this.pathname=C[1],C[2]?(this.search=C[2],this.query=F?_.parse(this.search.substr(1)):this.search.substr(1)):F&&(this.search="",this.query={}),this}var I=d.exec(A);if(I){var z=(I=I[0]).toLowerCase();this.protocol=z,A=A.substr(I.length)}if(R||I||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var W=A.substr(0,2)==="//";!W||I&&b[I]||(A=A.substr(2),this.slashes=!0)}if(!b[I]&&(W||I&&!y[I])){for(var G,q,N=-1,V=0;V<h.length;V++)(L=A.indexOf(h[V]))!==-1&&(N===-1||L<N)&&(N=L);for((q=N===-1?A.lastIndexOf("@"):A.lastIndexOf("@",N))!==-1&&(G=A.slice(0,q),A=A.slice(q+1),this.auth=decodeURIComponent(G)),N=-1,V=0;V<f.length;V++){var L;(L=A.indexOf(f[V]))!==-1&&(N===-1||L<N)&&(N=L)}N===-1&&(N=A.length),this.host=A.slice(0,N),A=A.slice(N),this.parseHost(),this.hostname=this.hostname||"";var O=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!O)for(var K=this.hostname.split(/\./),H=(V=0,K.length);V<H;V++){var J=K[V];if(J&&!J.match(v)){for(var ne="",ie=0,te=J.length;ie<te;ie++)J.charCodeAt(ie)>127?ne+="x":ne+=J[ie];if(!ne.match(v)){var x=K.slice(0,V),w=K.slice(V+1),D=J.match(m);D&&(x.push(D[1]),w.unshift(D[2])),w.length&&(A="/"+w.join(".")+A),this.hostname=x.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=a.toASCII(this.hostname));var Q=this.port?":"+this.port:"",ee=this.hostname||"";this.host=ee+Q,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),A[0]!=="/"&&(A="/"+A))}if(!g[z])for(V=0,H=c.length;V<H;V++){var re=c[V];if(A.indexOf(re)!==-1){var se=encodeURIComponent(re);se===re&&(se=escape(re)),A=A.split(re).join(se)}}var $=A.indexOf("#");$!==-1&&(this.hash=A.substr($),A=A.slice(0,$));var S=A.indexOf("?");if(S!==-1?(this.search=A.substr(S),this.query=A.substr(S+1),F&&(this.query=_.parse(this.query)),A=A.slice(0,S)):F&&(this.search="",this.query={}),A&&(this.pathname=A),y[z]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Q=this.pathname||"";var k=this.search||"";this.path=Q+k}return this.href=this.format(),this},u.prototype.format=function(){var B=this.auth||"";B&&(B=(B=encodeURIComponent(B)).replace(/%3A/i,":"),B+="@");var F=this.protocol||"",R=this.pathname||"",Z=this.hash||"",j=!1,E="";this.host?j=B+this.host:this.hostname&&(j=B+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(j+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(E=_.stringify(this.query));var A=this.search||E&&"?"+E||"";return F&&F.substr(-1)!==":"&&(F+=":"),this.slashes||(!F||y[F])&&j!==!1?(j="//"+(j||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):j||(j=""),Z&&Z.charAt(0)!=="#"&&(Z="#"+Z),A&&A.charAt(0)!=="?"&&(A="?"+A),F+j+(R=R.replace(/[?#]/g,function(C){return encodeURIComponent(C)}))+(A=A.replace("#","%23"))+Z},u.prototype.resolve=function(B){return this.resolveObject(T(B,!1,!0)).format()},u.prototype.resolveObject=function(B){if(o.isString(B)){var F=new u;F.parse(B,!1,!0),B=F}for(var R=new u,Z=Object.keys(this),j=0;j<Z.length;j++){var E=Z[j];R[E]=this[E]}if(R.hash=B.hash,B.href==="")return R.href=R.format(),R;if(B.slashes&&!B.protocol){for(var A=Object.keys(B),C=0;C<A.length;C++){var I=A[C];I!=="protocol"&&(R[I]=B[I])}return y[R.protocol]&&R.hostname&&!R.pathname&&(R.path=R.pathname="/"),R.href=R.format(),R}if(B.protocol&&B.protocol!==R.protocol){if(!y[B.protocol]){for(var z=Object.keys(B),W=0;W<z.length;W++){var G=z[W];R[G]=B[G]}return R.href=R.format(),R}if(R.protocol=B.protocol,B.host||b[B.protocol])R.pathname=B.pathname;else{for(var q=(B.pathname||"").split("/");q.length&&!(B.host=q.shift()););B.host||(B.host=""),B.hostname||(B.hostname=""),q[0]!==""&&q.unshift(""),q.length<2&&q.unshift(""),R.pathname=q.join("/")}if(R.search=B.search,R.query=B.query,R.host=B.host||"",R.auth=B.auth,R.hostname=B.hostname||B.host,R.port=B.port,R.pathname||R.search){var N=R.pathname||"",V=R.search||"";R.path=N+V}return R.slashes=R.slashes||B.slashes,R.href=R.format(),R}var L=R.pathname&&R.pathname.charAt(0)==="/",O=B.host||B.pathname&&B.pathname.charAt(0)==="/",K=O||L||R.host&&B.pathname,H=K,J=R.pathname&&R.pathname.split("/")||[],ne=(q=B.pathname&&B.pathname.split("/")||[],R.protocol&&!y[R.protocol]);if(ne&&(R.hostname="",R.port=null,R.host&&(J[0]===""?J[0]=R.host:J.unshift(R.host)),R.host="",B.protocol&&(B.hostname=null,B.port=null,B.host&&(q[0]===""?q[0]=B.host:q.unshift(B.host)),B.host=null),K=K&&(q[0]===""||J[0]==="")),O)R.host=B.host||B.host===""?B.host:R.host,R.hostname=B.hostname||B.hostname===""?B.hostname:R.hostname,R.search=B.search,R.query=B.query,J=q;else if(q.length)J||(J=[]),J.pop(),J=J.concat(q),R.search=B.search,R.query=B.query;else if(!o.isNullOrUndefined(B.search))return ne&&(R.hostname=R.host=J.shift(),(D=!!(R.host&&R.host.indexOf("@")>0)&&R.host.split("@"))&&(R.auth=D.shift(),R.host=R.hostname=D.shift())),R.search=B.search,R.query=B.query,o.isNull(R.pathname)&&o.isNull(R.search)||(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R;if(!J.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var ie=J.slice(-1)[0],te=(R.host||B.host||J.length>1)&&(ie==="."||ie==="..")||ie==="",x=0,w=J.length;w>=0;w--)(ie=J[w])==="."?J.splice(w,1):ie===".."?(J.splice(w,1),x++):x&&(J.splice(w,1),x--);if(!K&&!H)for(;x--;x)J.unshift("..");!K||J[0]===""||J[0]&&J[0].charAt(0)==="/"||J.unshift(""),te&&J.join("/").substr(-1)!=="/"&&J.push("");var D,Q=J[0]===""||J[0]&&J[0].charAt(0)==="/";return ne&&(R.hostname=R.host=Q?"":J.length?J.shift():"",(D=!!(R.host&&R.host.indexOf("@")>0)&&R.host.split("@"))&&(R.auth=D.shift(),R.host=R.hostname=D.shift())),(K=K||R.host&&J.length)&&!Q&&J.unshift(""),J.length?R.pathname=J.join("/"):(R.pathname=null,R.path=null),o.isNull(R.pathname)&&o.isNull(R.search)||(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=B.auth||R.auth,R.slashes=R.slashes||B.slashes,R.href=R.format(),R},u.prototype.parseHost=function(){var B=this.host,F=s.exec(B);F&&((F=F[0])!==":"&&(this.port=F.substr(1)),B=B.substr(0,B.length-F.length)),B&&(this.hostname=B)}},{"./util":77,punycode:51,querystring:54}],77:[function(t,n,l){n.exports={isString:function(a){return typeof a=="string"},isObject:function(a){return typeof a=="object"&&a!==null},isNull:function(a){return a===null},isNullOrUndefined:function(a){return a==null}}},{}],78:[function(t,n,l){(function(a){(function(){function o(u){try{if(!a.localStorage)return!1}catch(s){return!1}var d=a.localStorage[u];return d!=null&&String(d).toLowerCase()==="true"}n.exports=function(u,d){if(o("noDeprecation"))return u;var s=!1;return function(){if(!s){if(o("throwDeprecation"))throw new Error(d);o("traceDeprecation")?console.trace(d):console.warn(d),s=!0}return u.apply(this,arguments)}}}).call(this)}).call(this,typeof xe!="undefined"?xe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],79:[function(t,n,l){n.exports=function a(o,u){if(o&&u)return a(o)(u);if(typeof o!="function")throw new TypeError("need wrapper function");return Object.keys(o).forEach(function(s){d[s]=o[s]}),d;function d(){for(var s=new Array(arguments.length),i=0;i<s.length;i++)s[i]=arguments[i];var p=o.apply(this,s),c=s[s.length-1];return typeof p=="function"&&p!==c&&Object.keys(c).forEach(function(f){p[f]=c[f]}),p}}},{}],80:[function(t,n,l){n.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}],81:[function(t,n,l){n.exports=function(){for(var o={},u=0;u<arguments.length;u++){var d=arguments[u];for(var s in d)a.call(d,s)&&(o[s]=d[s])}return o};var a=Object.prototype.hasOwnProperty},{}],82:[function(t,n,l){n.exports=function(a){a.prototype[Symbol.iterator]=function*(){for(let o=this.head;o;o=o.next)yield o.value}}},{}],83:[function(t,n,l){function a(i){var p=this;if(p instanceof a||(p=new a),p.tail=null,p.head=null,p.length=0,i&&typeof i.forEach=="function")i.forEach(function(h){p.push(h)});else if(arguments.length>0)for(var c=0,f=arguments.length;c<f;c++)p.push(arguments[c]);return p}function o(i,p,c){var f=p===i.head?new s(c,null,p,i):new s(c,p,p.next,i);return f.next===null&&(i.tail=f),f.prev===null&&(i.head=f),i.length++,f}function u(i,p){i.tail=new s(p,i.tail,null,i),i.head||(i.head=i.tail),i.length++}function d(i,p){i.head=new s(p,null,i.head,i),i.tail||(i.tail=i.head),i.length++}function s(i,p,c,f){if(!(this instanceof s))return new s(i,p,c,f);this.list=f,this.value=i,p?(p.next=this,this.prev=p):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}n.exports=a,a.Node=s,a.create=a,a.prototype.removeNode=function(i){if(i.list!==this)throw new Error("removing node which does not belong to this list");var p=i.next,c=i.prev;return p&&(p.prev=c),c&&(c.next=p),i===this.head&&(this.head=p),i===this.tail&&(this.tail=c),i.list.length--,i.next=null,i.prev=null,i.list=null,p},a.prototype.unshiftNode=function(i){if(i!==this.head){i.list&&i.list.removeNode(i);var p=this.head;i.list=this,i.next=p,p&&(p.prev=i),this.head=i,this.tail||(this.tail=i),this.length++}},a.prototype.pushNode=function(i){if(i!==this.tail){i.list&&i.list.removeNode(i);var p=this.tail;i.list=this,i.prev=p,p&&(p.next=i),this.tail=i,this.head||(this.head=i),this.length++}},a.prototype.push=function(){for(var i=0,p=arguments.length;i<p;i++)u(this,arguments[i]);return this.length},a.prototype.unshift=function(){for(var i=0,p=arguments.length;i<p;i++)d(this,arguments[i]);return this.length},a.prototype.pop=function(){if(this.tail){var i=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,i}},a.prototype.shift=function(){if(this.head){var i=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,i}},a.prototype.forEach=function(i,p){p=p||this;for(var c=this.head,f=0;c!==null;f++)i.call(p,c.value,f,this),c=c.next},a.prototype.forEachReverse=function(i,p){p=p||this;for(var c=this.tail,f=this.length-1;c!==null;f--)i.call(p,c.value,f,this),c=c.prev},a.prototype.get=function(i){for(var p=0,c=this.head;c!==null&&p<i;p++)c=c.next;if(p===i&&c!==null)return c.value},a.prototype.getReverse=function(i){for(var p=0,c=this.tail;c!==null&&p<i;p++)c=c.prev;if(p===i&&c!==null)return c.value},a.prototype.map=function(i,p){p=p||this;for(var c=new a,f=this.head;f!==null;)c.push(i.call(p,f.value,this)),f=f.next;return c},a.prototype.mapReverse=function(i,p){p=p||this;for(var c=new a,f=this.tail;f!==null;)c.push(i.call(p,f.value,this)),f=f.prev;return c},a.prototype.reduce=function(i,p){var c,f=this.head;if(arguments.length>1)c=p;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");f=this.head.next,c=this.head.value}for(var h=0;f!==null;h++)c=i(c,f.value,h),f=f.next;return c},a.prototype.reduceReverse=function(i,p){var c,f=this.tail;if(arguments.length>1)c=p;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");f=this.tail.prev,c=this.tail.value}for(var h=this.length-1;f!==null;h--)c=i(c,f.value,h),f=f.prev;return c},a.prototype.toArray=function(){for(var i=new Array(this.length),p=0,c=this.head;c!==null;p++)i[p]=c.value,c=c.next;return i},a.prototype.toArrayReverse=function(){for(var i=new Array(this.length),p=0,c=this.tail;c!==null;p++)i[p]=c.value,c=c.prev;return i},a.prototype.slice=function(i,p){(p=p||this.length)<0&&(p+=this.length),(i=i||0)<0&&(i+=this.length);var c=new a;if(p<i||p<0)return c;i<0&&(i=0),p>this.length&&(p=this.length);for(var f=0,h=this.head;h!==null&&f<i;f++)h=h.next;for(;h!==null&&f<p;f++,h=h.next)c.push(h.value);return c},a.prototype.sliceReverse=function(i,p){(p=p||this.length)<0&&(p+=this.length),(i=i||0)<0&&(i+=this.length);var c=new a;if(p<i||p<0)return c;i<0&&(i=0),p>this.length&&(p=this.length);for(var f=this.length,h=this.tail;h!==null&&f>p;f--)h=h.prev;for(;h!==null&&f>i;f--,h=h.prev)c.push(h.value);return c},a.prototype.splice=function(i,p,...c){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var f=0,h=this.head;h!==null&&f<i;f++)h=h.next;var v=[];for(f=0;h&&f<p;f++)v.push(h.value),h=this.removeNode(h);for(h===null&&(h=this.tail),h!==this.head&&h!==this.tail&&(h=h.prev),f=0;f<c.length;f++)h=o(this,h,c[f]);return v},a.prototype.reverse=function(){for(var i=this.head,p=this.tail,c=i;c!==null;c=c.prev){var f=c.prev;c.prev=c.next,c.next=f}return this.head=p,this.tail=i,this};try{t("./iterator.js")(a)}catch(i){}},{"./iterator.js":82}]},{},[12])(12)})})(Wy);function Ky(e,r){var o,u;let t=r.payload.topicName,n=r.payload.message,l=r.payload.notifyTime,a=`<div style="padding:0px 12px 0px 0px;width:300px;">
42
+ `)},{immediate:!0})},Av=(e,r)=>{Ev({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},O.computed(()=>e.type==="text"));const t=O.inject(W0,void 0),n=Aa("button"),{form:l}=mv(),o=yv(O.computed(()=>t==null?void 0:t.size)),a=H0(),u=O.ref(),h=O.useSlots(),s=O.computed(()=>{var b;return e.type||(t==null?void 0:t.type)||((b=n.value)==null?void 0:b.type)||""}),i=O.computed(()=>{var b,g,y;return(y=(g=e.autoInsertSpace)!=null?g:(b=n.value)==null?void 0:b.autoInsertSpace)!=null?y:!1}),p=O.computed(()=>{var b,g,y;return(y=(g=e.plain)!=null?g:(b=n.value)==null?void 0:b.plain)!=null?y:!1}),c=O.computed(()=>{var b,g,y;return(y=(g=e.round)!=null?g:(b=n.value)==null?void 0:b.round)!=null?y:!1}),f=O.computed(()=>{var b,g,y;return(y=(g=e.text)!=null?g:(b=n.value)==null?void 0:b.text)!=null?y:!1}),d=O.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),v=O.computed(()=>{var b;const g=(b=h.default)==null?void 0:b.call(h);if(i.value&&(g==null?void 0:g.length)===1){const y=g[0];if((y==null?void 0:y.type)===O.Text){const _=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:a,_size:o,_type:s,_ref:u,_props:d,_plain:p,_round:c,_text:f,shouldAddSpace:v,handleClick:b=>{if(a.value||e.loading){b.stopPropagation();return}e.nativeType==="reset"&&(l==null||l.resetFields()),r("click",b)}}},Cv=["default","primary","success","warning","info","danger","text",""],Sv=["button","submit","reset"],na=ar({size:P0,disabled:{type:Boolean,default:void 0},type:{type:String,values:Cv,default:""},icon:{type:Kr},nativeType:{type:String,values:Sv,default:"button"},loading:Boolean,loadingIcon:{type:Kr,default:()=>q0},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Ue([String,Object]),default:"button"}}),Bv={click:e=>e instanceof MouseEvent};function Ve(e,r){kv(e)&&(e="100%");var t=Tv(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function Tn(e){return Math.min(1,Math.max(0,e))}function kv(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tv(e){return typeof e=="string"&&e.indexOf("%")!==-1}function G0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Qt(e){return e.length===1?"0"+e:String(e)}function Fv(e,r,t){return{r:Ve(e,255)*255,g:Ve(r,255)*255,b:Ve(t,255)*255}}function Tl(e,r,t){e=Ve(e,255),r=Ve(r,255),t=Ve(t,255);var n=Math.max(e,r,t),l=Math.min(e,r,t),o=0,a=0,u=(n+l)/2;if(n===l)a=0,o=0;else{var h=n-l;switch(a=u>.5?h/(2-n-l):h/(n+l),n){case e:o=(r-t)/h+(r<t?6:0);break;case r:o=(t-e)/h+2;break;case t:o=(e-r)/h+4;break}o/=6}return{h:o,s:a,l:u}}function Lo(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*(6*t):t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function Dv(e,r,t){var n,l,o;if(e=Ve(e,360),r=Ve(r,100),t=Ve(t,100),r===0)l=t,o=t,n=t;else{var a=t<.5?t*(1+r):t+r-t*r,u=2*t-a;n=Lo(u,a,e+1/3),l=Lo(u,a,e),o=Lo(u,a,e-1/3)}return{r:n*255,g:l*255,b:o*255}}function Fl(e,r,t){e=Ve(e,255),r=Ve(r,255),t=Ve(t,255);var n=Math.max(e,r,t),l=Math.min(e,r,t),o=0,a=n,u=n-l,h=n===0?0:u/n;if(n===l)o=0;else{switch(n){case e:o=(r-t)/u+(r<t?6:0);break;case r:o=(t-e)/u+2;break;case t:o=(e-r)/u+4;break}o/=6}return{h:o,s:h,v:a}}function Iv(e,r,t){e=Ve(e,360)*6,r=Ve(r,100),t=Ve(t,100);var n=Math.floor(e),l=e-n,o=t*(1-r),a=t*(1-l*r),u=t*(1-(1-l)*r),h=n%6,s=[t,a,o,o,u,t][h],i=[u,t,t,a,o,o][h],p=[o,o,u,t,t,a][h];return{r:s*255,g:i*255,b:p*255}}function Dl(e,r,t,n){var l=[Qt(Math.round(e).toString(16)),Qt(Math.round(r).toString(16)),Qt(Math.round(t).toString(16))];return n&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0):l.join("")}function Rv(e,r,t,n,l){var o=[Qt(Math.round(e).toString(16)),Qt(Math.round(r).toString(16)),Qt(Math.round(t).toString(16)),Qt(Ov(n))];return l&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Ov(e){return Math.round(parseFloat(e)*255).toString(16)}function Il(e){return it(e)/255}function it(e){return parseInt(e,16)}function Pv(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ia={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nv(e){var r={r:0,g:0,b:0},t=1,n=null,l=null,o=null,a=!1,u=!1;return typeof e=="string"&&(e=Uv(e)),typeof e=="object"&&(Ct(e.r)&&Ct(e.g)&&Ct(e.b)?(r=Fv(e.r,e.g,e.b),a=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ct(e.h)&&Ct(e.s)&&Ct(e.v)?(n=Fn(e.s),l=Fn(e.v),r=Iv(e.h,n,l),a=!0,u="hsv"):Ct(e.h)&&Ct(e.s)&&Ct(e.l)&&(n=Fn(e.s),o=Fn(e.l),r=Dv(e.h,n,o),a=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=G0(t),{ok:a,format:e.format||u,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}var Mv="[-\\+]?\\d+%?",Lv="[-\\+]?\\d*\\.\\d+%?",Nt="(?:".concat(Lv,")|(?:").concat(Mv,")"),Uo="[\\s|\\(]+(".concat(Nt,")[,|\\s]+(").concat(Nt,")[,|\\s]+(").concat(Nt,")\\s*\\)?"),$o="[\\s|\\(]+(".concat(Nt,")[,|\\s]+(").concat(Nt,")[,|\\s]+(").concat(Nt,")[,|\\s]+(").concat(Nt,")\\s*\\)?"),ht={CSS_UNIT:new RegExp(Nt),rgb:new RegExp("rgb"+Uo),rgba:new RegExp("rgba"+$o),hsl:new RegExp("hsl"+Uo),hsla:new RegExp("hsla"+$o),hsv:new RegExp("hsv"+Uo),hsva:new RegExp("hsva"+$o),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 Uv(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(ia[e])e=ia[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=ht.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=ht.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=ht.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=ht.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=ht.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=ht.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=ht.hex8.exec(e),t?{r:it(t[1]),g:it(t[2]),b:it(t[3]),a:Il(t[4]),format:r?"name":"hex8"}:(t=ht.hex6.exec(e),t?{r:it(t[1]),g:it(t[2]),b:it(t[3]),format:r?"name":"hex"}:(t=ht.hex4.exec(e),t?{r:it(t[1]+t[1]),g:it(t[2]+t[2]),b:it(t[3]+t[3]),a:Il(t[4]+t[4]),format:r?"name":"hex8"}:(t=ht.hex3.exec(e),t?{r:it(t[1]+t[1]),g:it(t[2]+t[2]),b:it(t[3]+t[3]),format:r?"name":"hex"}:!1)))))))))}function Ct(e){return!!ht.CSS_UNIT.exec(String(e))}var $v=function(){function e(r,t){r===void 0&&(r=""),t===void 0&&(t={});var n;if(r instanceof e)return r;typeof r=="number"&&(r=Pv(r)),this.originalInput=r;var l=Nv(r);this.originalInput=r,this.r=l.r,this.g=l.g,this.b=l.b,this.a=l.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=t.format)!==null&&n!==void 0?n:l.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=l.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},e.prototype.getLuminance=function(){var r=this.toRgb(),t,n,l,o=r.r/255,a=r.g/255,u=r.b/255;return o<=.03928?t=o/12.92:t=Math.pow((o+.055)/1.055,2.4),a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),u<=.03928?l=u/12.92:l=Math.pow((u+.055)/1.055,2.4),.2126*t+.7152*n+.0722*l},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(r){return this.a=G0(r),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var r=this.toHsl().s;return r===0},e.prototype.toHsv=function(){var r=Fl(this.r,this.g,this.b);return{h:r.h*360,s:r.s,v:r.v,a:this.a}},e.prototype.toHsvString=function(){var r=Fl(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),l=Math.round(r.v*100);return this.a===1?"hsv(".concat(t,", ").concat(n,"%, ").concat(l,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var r=Tl(this.r,this.g,this.b);return{h:r.h*360,s:r.s,l:r.l,a:this.a}},e.prototype.toHslString=function(){var r=Tl(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),l=Math.round(r.l*100);return this.a===1?"hsl(".concat(t,", ").concat(n,"%, ").concat(l,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(r){return r===void 0&&(r=!1),Dl(this.r,this.g,this.b,r)},e.prototype.toHexString=function(r){return r===void 0&&(r=!1),"#"+this.toHex(r)},e.prototype.toHex8=function(r){return r===void 0&&(r=!1),Rv(this.r,this.g,this.b,this.a,r)},e.prototype.toHex8String=function(r){return r===void 0&&(r=!1),"#"+this.toHex8(r)},e.prototype.toHexShortString=function(r){return r===void 0&&(r=!1),this.a===1?this.toHexString(r):this.toHex8String(r)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var r=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(r,", ").concat(t,", ").concat(n,")"):"rgba(".concat(r,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var r=function(t){return"".concat(Math.round(Ve(t,255)*100),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var r=function(t){return Math.round(Ve(t,255)*100)};return this.a===1?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var r="#"+Dl(this.r,this.g,this.b,!1),t=0,n=Object.entries(ia);t<n.length;t++){var l=n[t],o=l[0],a=l[1];if(r===a)return o}return!1},e.prototype.toString=function(r){var t=!!r;r=r!=null?r:this.format;var n=!1,l=this.a<1&&this.a>=0,o=!t&&l&&(r.startsWith("hex")||r==="name");return o?r==="name"&&this.a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l+=r/100,t.l=Tn(t.l),new e(t)},e.prototype.brighten=function(r){r===void 0&&(r=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),new e(t)},e.prototype.darken=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l-=r/100,t.l=Tn(t.l),new e(t)},e.prototype.tint=function(r){return r===void 0&&(r=10),this.mix("white",r)},e.prototype.shade=function(r){return r===void 0&&(r=10),this.mix("black",r)},e.prototype.desaturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s-=r/100,t.s=Tn(t.s),new e(t)},e.prototype.saturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s+=r/100,t.s=Tn(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(r){var t=this.toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,new e(t)},e.prototype.mix=function(r,t){t===void 0&&(t=50);var n=this.toRgb(),l=new e(r).toRgb(),o=t/100,a={r:(l.r-n.r)*o+n.r,g:(l.g-n.g)*o+n.g,b:(l.b-n.b)*o+n.b,a:(l.a-n.a)*o+n.a};return new e(a)},e.prototype.analogous=function(r,t){r===void 0&&(r=6),t===void 0&&(t=30);var n=this.toHsl(),l=360/t,o=[this];for(n.h=(n.h-(l*r>>1)+720)%360;--r;)n.h=(n.h+l)%360,o.push(new e(n));return o},e.prototype.complement=function(){var r=this.toHsl();return r.h=(r.h+180)%360,new e(r)},e.prototype.monochromatic=function(r){r===void 0&&(r=6);for(var t=this.toHsv(),n=t.h,l=t.s,o=t.v,a=[],u=1/r;r--;)a.push(new e({h:n,s:l,v:o})),o=(o+u)%1;return a},e.prototype.splitcomplement=function(){var r=this.toHsl(),t=r.h;return[this,new e({h:(t+72)%360,s:r.s,l:r.l}),new e({h:(t+216)%360,s:r.s,l:r.l})]},e.prototype.onBackground=function(r){var t=this.toRgb(),n=new e(r).toRgb(),l=t.a+n.a*(1-t.a);return new e({r:(t.r*t.a+n.r*n.a*(1-t.a))/l,g:(t.g*t.a+n.g*n.a*(1-t.a))/l,b:(t.b*t.a+n.b*n.a*(1-t.a))/l,a:l})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(r){for(var t=this.toHsl(),n=t.h,l=[this],o=360/r,a=1;a<r;a++)l.push(new e({h:(n+a*o)%360,s:t.s,l:t.l}));return l},e.prototype.equals=function(r){return this.toRgbString()===new e(r).toRgbString()},e}();function Rt(e,r=20){return e.mix("#141414",r).toString()}function qv(e){const r=H0(),t=Dr("button");return O.computed(()=>{let n={},l=e.color;if(l){const o=l.match(/var\((.*?)\)/);o&&(l=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const a=new $v(l),u=e.dark?a.tint(20).toString():Rt(a,20);if(e.plain)n=t.cssVarBlock({"bg-color":e.dark?Rt(a,90):a.tint(90).toString(),"text-color":l,"border-color":e.dark?Rt(a,50):a.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":l,"hover-border-color":l,"active-bg-color":u,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":u}),r.value&&(n[t.cssVarBlockName("disabled-bg-color")]=e.dark?Rt(a,90):a.tint(90).toString(),n[t.cssVarBlockName("disabled-text-color")]=e.dark?Rt(a,50):a.tint(50).toString(),n[t.cssVarBlockName("disabled-border-color")]=e.dark?Rt(a,80):a.tint(80).toString());else{const h=e.dark?Rt(a,30):a.tint(30).toString(),s=a.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(n=t.cssVarBlock({"bg-color":l,"text-color":s,"border-color":l,"hover-bg-color":h,"hover-text-color":s,"hover-border-color":h,"active-bg-color":u,"active-border-color":u}),r.value){const i=e.dark?Rt(a,50):a.tint(50).toString();n[t.cssVarBlockName("disabled-bg-color")]=i,n[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,n[t.cssVarBlockName("disabled-border-color")]=i}}}return n})}const zv=O.defineComponent({name:"ElButton"}),jv=O.defineComponent(we(fe({},zv),{props:na,emits:Bv,setup(e,{expose:r,emit:t}){const n=e,l=qv(n),o=Dr("button"),{_ref:a,_size:u,_type:h,_disabled:s,_props:i,_plain:p,_round:c,_text:f,shouldAddSpace:d,handleClick:v}=Av(n,t),m=O.computed(()=>[o.b(),o.m(h.value),o.m(u.value),o.is("disabled",s.value),o.is("loading",n.loading),o.is("plain",p.value),o.is("round",c.value),o.is("circle",n.circle),o.is("text",f.value),o.is("link",n.link),o.is("has-bg",n.bg)]);return r({ref:a,size:u,type:h,disabled:s,shouldAddSpace:d}),(b,g)=>(O.openBlock(),O.createBlock(O.resolveDynamicComponent(b.tag),O.mergeProps({ref_key:"_ref",ref:a},O.unref(i),{class:O.unref(m),style:O.unref(l),onClick:O.unref(v)}),{default:O.withCtx(()=>[b.loading?(O.openBlock(),O.createElementBlock(O.Fragment,{key:0},[b.$slots.loading?O.renderSlot(b.$slots,"loading",{key:0}):(O.openBlock(),O.createBlock(O.unref(Br),{key:1,class:O.normalizeClass(O.unref(o).is("loading"))},{default:O.withCtx(()=>[(O.openBlock(),O.createBlock(O.resolveDynamicComponent(b.loadingIcon)))]),_:1},8,["class"]))],64)):b.icon||b.$slots.icon?(O.openBlock(),O.createBlock(O.unref(Br),{key:1},{default:O.withCtx(()=>[b.icon?(O.openBlock(),O.createBlock(O.resolveDynamicComponent(b.icon),{key:0})):O.renderSlot(b.$slots,"icon",{key:1})]),_:3})):O.createCommentVNode("v-if",!0),b.$slots.default?(O.openBlock(),O.createElementBlock("span",{key:2,class:O.normalizeClass({[O.unref(o).em("text","expand")]:O.unref(d)})},[O.renderSlot(b.$slots,"default")],2)):O.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}}));var Hv=Ir(jv,[["__file","button.vue"]]);const Vv={size:na.size,type:na.type,direction:{type:Ue(String),values:["horizontal","vertical"],default:"horizontal"}},Wv=O.defineComponent({name:"ElButtonGroup"}),Gv=O.defineComponent(we(fe({},Wv),{props:Vv,setup(e){const r=e;O.provide(W0,O.reactive({size:O.toRef(r,"size"),type:O.toRef(r,"type")}));const t=Dr("button");return(n,l)=>(O.openBlock(),O.createElementBlock("div",{class:O.normalizeClass([O.unref(t).b("group"),O.unref(t).bm("group",r.direction)])},[O.renderSlot(n.$slots,"default")],2))}}));var K0=Ir(Gv,[["__file","button-group.vue"]]);const Kv=Ca(Hv,{ButtonGroup:K0});Zy(K0);const Qv=ar(fe({a11y:{type:Boolean,default:!0},locale:{type:Ue(Object)},size:P0,button:{type:Ue(Object)},card:{type:Ue(Object)},dialog:{type:Ue(Object)},link:{type:Ue(Object)},experimentalFeatures:{type:Ue(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Ue(Object)},zIndex:Number,namespace:{type:String,default:"el"}},Qy)),Ge={placement:"top"};O.defineComponent({name:"ElConfigProvider",props:Qv,setup(e,{slots:r}){const t=L0(e);return O.watch(()=>e.message,n=>{var l,o;Object.assign(Ge,(o=(l=t==null?void 0:t.value)==null?void 0:l.message)!=null?o:{},n!=null?n:{})},{immediate:!0,deep:!0}),()=>O.renderSlot(r,"default",{config:t==null?void 0:t.value})}});const Q0=["primary","success","info","warning","error"],Y0=["top","top-left","top-right","bottom","bottom-left","bottom-right"],br="top",We=pv({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:Ut?document.body:void 0}),Yv=ar({customClass:{type:String,default:We.customClass},dangerouslyUseHTMLString:{type:Boolean,default:We.dangerouslyUseHTMLString},duration:{type:Number,default:We.duration},icon:{type:Kr,default:We.icon},id:{type:String,default:We.id},message:{type:Ue([String,Object,Function]),default:We.message},onClose:{type:Ue(Function),default:We.onClose},showClose:{type:Boolean,default:We.showClose},type:{type:String,values:Q0,default:We.type},plain:{type:Boolean,default:We.plain},offset:{type:Number,default:We.offset},placement:{type:String,values:Y0,default:We.placement},zIndex:{type:Number,default:We.zIndex},grouping:{type:Boolean,default:We.grouping},repeatNum:{type:Number,default:We.repeatNum}}),Xv={destroy:()=>!0},dt=O.shallowReactive({}),Zv=e=>(dt[e]||(dt[e]=O.shallowReactive([])),dt[e]),Jv=(e,r)=>{const t=dt[r]||[],n=t.findIndex(a=>a.id===e),l=t[n];let o;return n>0&&(o=t[n-1]),{current:l,prev:o}},eg=(e,r)=>{const{prev:t}=Jv(e,r);return t?t.vm.exposed.bottom.value:0},tg=(e,r,t)=>(dt[t]||[]).findIndex(o=>o.id===e)>0?16:r,rg=O.defineComponent({name:"ElMessage"}),ng=O.defineComponent(we(fe({},rg),{props:Yv,emits:Xv,setup(e,{expose:r,emit:t}){const n=e,{Close:l}=hv,o=O.ref(!1),{ns:a,zIndex:u}=M0("message"),{currentZIndex:h,nextZIndex:s}=u,i=O.ref(),p=O.ref(!1),c=O.ref(0);let f;const d=O.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),v=O.computed(()=>{const A=n.type;return{[a.bm("icon",A)]:A&&Gn[A]}}),m=O.computed(()=>n.icon||Gn[n.type]||""),b=O.computed(()=>n.placement||br),g=O.computed(()=>eg(n.id,b.value)),y=O.computed(()=>tg(n.id,n.offset,b.value)+g.value),_=O.computed(()=>c.value+y.value),T=O.computed(()=>b.value.includes("left")?a.is("left"):b.value.includes("right")?a.is("right"):a.is("center")),D=O.computed(()=>b.value.startsWith("top")?"top":"bottom"),F=O.computed(()=>({[D.value]:`${y.value}px`,zIndex:h.value}));function R(){n.duration!==0&&({stop:f}=S0(()=>{H()},n.duration))}function X(){f==null||f()}function H(){p.value=!1,O.nextTick(()=>{var A;o.value||((A=n.onClose)==null||A.call(n),t("destroy"))})}function E(A){V0(A)===xr.esc&&H()}return O.onMounted(()=>{R(),s(),p.value=!0}),O.watch(()=>n.repeatNum,()=>{X(),R()}),T0(document,"keydown",E),Iy(i,()=>{c.value=i.value.getBoundingClientRect().height}),r({visible:p,bottom:_,close:H}),(A,S)=>(O.openBlock(),O.createBlock(O.Transition,{name:O.unref(a).b("fade"),onBeforeEnter:I=>o.value=!0,onBeforeLeave:A.onClose,onAfterLeave:I=>A.$emit("destroy"),persisted:""},{default:O.withCtx(()=>[O.withDirectives(O.createElementVNode("div",{id:A.id,ref_key:"messageRef",ref:i,class:O.normalizeClass([O.unref(a).b(),{[O.unref(a).m(A.type)]:A.type},O.unref(a).is("closable",A.showClose),O.unref(a).is("plain",A.plain),O.unref(a).is("bottom",O.unref(D)==="bottom"),O.unref(T),A.customClass]),style:O.normalizeStyle(O.unref(F)),role:"alert",onMouseenter:X,onMouseleave:R},[A.repeatNum>1?(O.openBlock(),O.createBlock(O.unref(_v),{key:0,value:A.repeatNum,type:O.unref(d),class:O.normalizeClass(O.unref(a).e("badge"))},null,8,["value","type","class"])):O.createCommentVNode("v-if",!0),O.unref(m)?(O.openBlock(),O.createBlock(O.unref(Br),{key:1,class:O.normalizeClass([O.unref(a).e("icon"),O.unref(v)])},{default:O.withCtx(()=>[(O.openBlock(),O.createBlock(O.resolveDynamicComponent(O.unref(m))))]),_:1},8,["class"])):O.createCommentVNode("v-if",!0),O.renderSlot(A.$slots,"default",{},()=>[A.dangerouslyUseHTMLString?(O.openBlock(),O.createElementBlock(O.Fragment,{key:1},[O.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),O.createElementVNode("p",{class:O.normalizeClass(O.unref(a).e("content")),innerHTML:A.message},null,10,["innerHTML"])],2112)):(O.openBlock(),O.createElementBlock("p",{key:0,class:O.normalizeClass(O.unref(a).e("content"))},O.toDisplayString(A.message),3))]),A.showClose?(O.openBlock(),O.createBlock(O.unref(Br),{key:2,class:O.normalizeClass(O.unref(a).e("closeBtn")),onClick:O.withModifiers(H,["stop"])},{default:O.withCtx(()=>[O.createVNode(O.unref(l))]),_:1},8,["class","onClick"])):O.createCommentVNode("v-if",!0)],46,["id"]),[[O.vShow,p.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}}));var ig=Ir(ng,[["__file","message.vue"]]);let og=1;const ag=e=>{if(!e.appendTo)e.appendTo=document.body;else if(kt(e.appendTo)){let t=document.querySelector(e.appendTo);ta(t)||(or("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},sg=e=>{!e.placement&&kt(Ge.placement)&&Ge.placement&&(e.placement=Ge.placement),e.placement||(e.placement=br),Y0.includes(e.placement)||(or("ElMessage",`Invalid placement: ${e.placement}. Falling back to '${br}'.`),e.placement=br)},X0=e=>{const r=!e||kt(e)||O.isVNode(e)||Gr(e)?{message:e}:e,t=fe(fe({},We),r);return ag(t),sg(t),Mo(Ge.grouping)&&!t.grouping&&(t.grouping=Ge.grouping),Jt(Ge.duration)&&t.duration===3e3&&(t.duration=Ge.duration),Jt(Ge.offset)&&t.offset===16&&(t.offset=Ge.offset),Mo(Ge.showClose)&&!t.showClose&&(t.showClose=Ge.showClose),Mo(Ge.plain)&&!t.plain&&(t.plain=Ge.plain),t},lg=e=>{const r=e.props.placement||br,t=dt[r],n=t.indexOf(e);if(n===-1)return;t.splice(n,1);const{handler:l}=e;l.close()},ug=(n,t)=>{var l=n,{appendTo:e}=l,r=Oa(l,["appendTo"]);const o=`message_${og++}`,a=r.onClose,u=document.createElement("div"),h=we(fe({},r),{id:o,onClose:()=>{a==null||a(),lg(c)},onDestroy:()=>{O.render(null,u)}}),s=O.createVNode(ig,h,Gr(h.message)||O.isVNode(h.message)?{default:Gr(h.message)?h.message:()=>h.message}:null);s.appContext=t||er._context,O.render(s,u),e.appendChild(u.firstElementChild);const i=s.component,c={id:o,vnode:s,vm:i,handler:{close:()=>{i.exposed.close()}},props:s.component.props};return c},er=(e={},r)=>{if(!Ut)return{close:()=>{}};const t=X0(e),n=Zv(t.placement||br);if(t.grouping&&n.length){const o=n.find(({vnode:a})=>{var u;return((u=a.props)==null?void 0:u.message)===t.message});if(o)return o.props.repeatNum+=1,o.props.type=t.type,o.handler}if(Jt(Ge.max)&&n.length>=Ge.max)return{close:()=>{}};const l=ug(t,r);return n.push(l),l.handler};Q0.forEach(e=>{er[e]=(r={},t)=>{const n=X0(r);return er(we(fe({},n),{type:e}),t)}});function cg(e){for(const r in dt)if(ea(dt,r)){const t=[...dt[r]];for(const n of t)(!e||e===n.props.type)&&n.handler.close()}}function fg(e){if(!dt[e])return;[...dt[e]].forEach(t=>t.handler.close())}er.closeAll=cg;er.closeAllByPlacement=fg;er._context=null;const lt=U0(er,"$message"),Z0=["primary","success","info","warning","error"],hg=ar({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Kr},id:{type:String,default:""},message:{type:Ue([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:Ue(Function),default:()=>{}},onClose:{type:Ue(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...Z0,""],default:""},zIndex:Number,closeIcon:{type:Kr,default:$0}}),dg={destroy:()=>!0},pg=O.defineComponent({name:"ElNotification"}),mg=O.defineComponent(we(fe({},pg),{props:hg,emits:dg,setup(e,{expose:r}){const t=e,{ns:n,zIndex:l}=M0("notification"),{nextZIndex:o,currentZIndex:a}=l,u=O.ref(!1);let h;const s=O.computed(()=>{const g=t.type;return g&&Gn[t.type]?n.m(g):""}),i=O.computed(()=>t.type&&Gn[t.type]||t.icon),p=O.computed(()=>t.position.endsWith("right")?"right":"left"),c=O.computed(()=>t.position.startsWith("top")?"top":"bottom"),f=O.computed(()=>{var g;return{[c.value]:`${t.offset}px`,zIndex:(g=t.zIndex)!=null?g:a.value}});function d(){t.duration>0&&({stop:h}=S0(()=>{u.value&&m()},t.duration))}function v(){h==null||h()}function m(){u.value=!1}function b(g){switch(V0(g)){case xr.delete:case xr.backspace:v();break;case xr.esc:u.value&&m();break;default:d();break}}return O.onMounted(()=>{d(),o(),u.value=!0}),T0(document,"keydown",b),r({visible:u,close:m}),(g,y)=>(O.openBlock(),O.createBlock(O.Transition,{name:O.unref(n).b("fade"),onBeforeLeave:g.onClose,onAfterLeave:_=>g.$emit("destroy"),persisted:""},{default:O.withCtx(()=>[O.withDirectives(O.createElementVNode("div",{id:g.id,class:O.normalizeClass([O.unref(n).b(),g.customClass,O.unref(p)]),style:O.normalizeStyle(O.unref(f)),role:"alert",onMouseenter:v,onMouseleave:d,onClick:g.onClick},[O.unref(i)?(O.openBlock(),O.createBlock(O.unref(Br),{key:0,class:O.normalizeClass([O.unref(n).e("icon"),O.unref(s)])},{default:O.withCtx(()=>[(O.openBlock(),O.createBlock(O.resolveDynamicComponent(O.unref(i))))]),_:1},8,["class"])):O.createCommentVNode("v-if",!0),O.createElementVNode("div",{class:O.normalizeClass(O.unref(n).e("group"))},[O.createElementVNode("h2",{class:O.normalizeClass(O.unref(n).e("title")),textContent:O.toDisplayString(g.title)},null,10,["textContent"]),O.withDirectives(O.createElementVNode("div",{class:O.normalizeClass(O.unref(n).e("content")),style:O.normalizeStyle(g.title?void 0:{margin:0})},[O.renderSlot(g.$slots,"default",{},()=>[g.dangerouslyUseHTMLString?(O.openBlock(),O.createElementBlock(O.Fragment,{key:1},[O.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),O.createElementVNode("p",{innerHTML:g.message},null,8,["innerHTML"])],2112)):(O.openBlock(),O.createElementBlock("p",{key:0},O.toDisplayString(g.message),1))])],6),[[O.vShow,g.message]]),g.showClose?(O.openBlock(),O.createBlock(O.unref(Br),{key:0,class:O.normalizeClass(O.unref(n).e("closeBtn")),onClick:O.withModifiers(m,["stop"])},{default:O.withCtx(()=>[(O.openBlock(),O.createBlock(O.resolveDynamicComponent(g.closeIcon)))]),_:1},8,["class","onClick"])):O.createCommentVNode("v-if",!0)],2)],46,["id","onClick"]),[[O.vShow,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}}));var yg=Ir(mg,[["__file","notification.vue"]]);const kr={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Kn=16;let vg=1;const tr=function(e={},r){if(!Ut)return{close:()=>{}};(kt(e)||O.isVNode(e))&&(e={message:e});const t=e.position||"top-right";let n=e.offset||0;kr[t].forEach(({vm:i})=>{var p;n+=(((p=i.el)==null?void 0:p.offsetHeight)||0)+Kn}),n+=Kn;const l=`notification_${vg++}`,o=e.onClose,a=we(fe({},e),{offset:n,id:l,onClose:()=>{gg(l,t,o)}});let u=document.body;ta(e.appendTo)?u=e.appendTo:kt(e.appendTo)&&(u=document.querySelector(e.appendTo)),ta(u)||(or("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),u=document.body);const h=document.createElement("div"),s=O.createVNode(yg,a,Gr(a.message)?a.message:O.isVNode(a.message)?()=>a.message:null);return s.appContext=_y(r)?tr._context:r,s.props.onDestroy=()=>{O.render(null,h)},O.render(s,h),kr[t].push({vm:s}),u.appendChild(h.firstElementChild),{close:()=>{s.component.exposed.visible.value=!1}}};Z0.forEach(e=>{tr[e]=(r={},t)=>((kt(r)||O.isVNode(r))&&(r={message:r}),tr(we(fe({},r),{type:e}),t))});function gg(e,r,t){const n=kr[r],l=n.findIndex(({vm:s})=>{var i;return((i=s.component)==null?void 0:i.props.id)===e});if(l===-1)return;const{vm:o}=n[l];if(!o)return;t==null||t(o);const a=o.el.offsetHeight,u=r.split("-")[0];n.splice(l,1);const h=n.length;if(!(h<1))for(let s=l;s<h;s++){const{el:i,component:p}=n[s].vm,c=Number.parseInt(i.style[u],10)-a-Kn;p.props.offset=c}}function xg(){for(const e of Object.values(kr))e.forEach(({vm:r})=>{r.component.exposed.visible.value=!1})}function bg(e="top-right"){var r,t,n,l;let o=((n=(t=(r=kr[e][0])==null?void 0:r.vm.component)==null?void 0:t.props)==null?void 0:n.offset)||0;for(const{vm:a}of kr[e])a.component.props.offset=o,o+=(((l=a.el)==null?void 0:l.offsetHeight)||0)+Kn}tr.closeAll=xg;tr.updateOffsets=bg;tr._context=null;const wg=U0(tr,"$notify"),J0="0123456789abcdeffedcba9876543210",ec="4b0de988570c3a0f",_g=window.ENCRYPT;let wr=_g&&new _0;function tc(e=16,r="0123456789abcdefghijklmnopqrstuvwxyz"){let t="",n=r.length;for(;e>0;)t+=r[Math.floor(Math.random()*n)],e--;return t}function rc(){return Ne(this,null,function*(){return wr||(wr=new _0),new Promise((e,r)=>{wr.armEnum().then(t=>{e(+t)}).catch(t=>{lt({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),r(t)})})})}_r.throttle(()=>Ne(exports,null,function*(){const e=yield rc(),r={};if(typeof e!="number"||e<=0)lt({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),r.resetToken();else{const t=yield Ag();if(!r.token)return;t.length?t.includes(r.ukeyHid)||(lt({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),r.resetToken()):(lt({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),r.resetToken())}}),5e3,{trailing:!1});function Eg(e=0){return Ne(this,null,function*(){return wr?new Promise((r,t)=>{wr.armGetDongleInfo(e).then(n=>{n?r(n):(lt({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),t(n))}).catch(n=>{t(n)})}):lt({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function Ag(){return Ne(this,null,function*(){if(!wr)return lt({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const e=yield rc();let r=[];for(let t=0;t<e;t++){const n=yield Eg(t);r.push(n)}return r})}tc(16);tc(16);const nc=window.meta.app.inspect?Sr.constants.CBC:Sr.constants.ECB;fy.generateKeyPair();function Rl(e,r,t={}){const n=ic(ec),l=t.mode||nc;t=l===Sr.constants.ECB?fe({mode:l,inputEncoding:"utf8",outputEncoding:"hex"},t):fe({iv:J0,mode:l,inputEncoding:"utf8",outputEncoding:"hex"},t);let o="";try{o=Sr.encrypt(e,n,t)}catch(a){console.log("err: ",a)}return o}function Ol(e,r,t={}){const n=ic(ec),l=t.mode||nc;return t=l===Sr.constants.ECB?fe({mode:l,inputEncoding:"hex",outputEncoding:"utf8"},t):fe({iv:J0,mode:l,inputEncoding:"hex",outputEncoding:"utf8"},t),Sr.decrypt(e,n,t)}function ic(e){return[...e].map(r=>r.charCodeAt().toString(16)).join("")}const Pl={getLocal:e=>{try{let r=window.localStorage.getItem(e);return r=r!==null?Ol(r):r,JSON.parse(r)}catch(r){console.error(r)}},setLocal:(e,r)=>{try{let t=JSON.stringify(r);t=t!==null?Rl(t):t,window.localStorage.setItem(e,t)}catch(t){console.error(t)}},eachLocal:e=>{if(!e||ks(e)!=="Function")return console.error("传递参数非函数类型!");for(let r=0,t=window.localStorage.length;r<t;r++){const n=window.localStorage.key(r);e((void 0).getLocal(n),n)}},clearLocal:()=>{window.localStorage.clear()},removeLocal:e=>{window.localStorage.removeItem(e)},getSession:e=>{try{let r=window.sessionStorage.getItem(e);return r=r!==null?Ol(r):r,JSON.parse(r)}catch(r){console.error(r)}},setSession:(e,r)=>{try{let t=JSON.stringify(r);t=t!==null?Rl(t):t,window.sessionStorage.setItem(e,t)}catch(t){console.error(t)}},eachSession:e=>{if(!e||ks(e)!=="Function")return console.error("传递参数非函数类型!");for(let r=0,t=window.sessionStorage.length;r<t;r++){const n=window.sessionStorage.key(r);e((void 0).getSession(n),n)}},clearSession:()=>{window.sessionStorage.clear()},removeSession:e=>{window.sessionStorage.removeItem(e)}},Nl=e=>{const{quality:r,value:t,function_id:n}=e;return(r>>7&1)===1||r===0&&n===2&&t===1},Ml="USER_TOKEN",Ll="STATION_ID",Cg=[{key:0,value:"离线"},{key:1,value:"在线"}],Sg=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],Bg=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],kg="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e",Ot=window.meta.graph.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},oc=window.meta.graph.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200",1:"#e2ac06",2:"#fa800a",3:"#f04155",4:"#ff0000"},ac=window.meta.graph.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff",1:"#fff",2:"#fff",3:"#fff",4:"#fff"},Re={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:Cg.map(e=>({label:e.value,value:e.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:Sg.map(e=>({label:e.value,value:e.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:Bg.map(e=>({label:e.value,value:e.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},ve=we(fe({penType:Se.NORMAL},Re),{form:[...Ot[Se.NORMAL],...Re.form]});Oe.YX,Oe.YX,Oe.YX,Se.POINT_VALUE,Re.anchors,window.visibleLevel,Re.form,Re.form,window.dataType,window.dataProp,window.visibleLevel,Re.form,window.dataType,window.dataProp,window.visibleLevel,Re.form,window.dataType,window.dataProp,window.visibleLevel,ac[0],Se.LIGHT_PLATE,oc[0],Re.anchors,window.visibleLevel,[...Ot[Se.LIGHT_PLATE],...Re.form],Un+"",Se.SENSOR,Re.anchors,window.visibleLevel,[...Ot[Se.LIGHT_PLATE],...Re.form],we(fe({width:100,height:30,name:"text",penName:"文本",text:"文本",disableAnchor:!0,penType:Se.TEXT},Re),{form:[...Ot[Se.TEXT],...Re.form]}),fe({width:100,height:100,name:"square",penName:"正方形"},ve),we(fe({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},ve),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),fe({width:200,height:50,borderRadius:0,name:"rectangle",penName:"矩形"},ve),fe({width:100,height:100,name:"circle",penName:"圆"},ve),fe({width:100,height:100,name:"triangle",penName:"三角形"},ve),fe({width:100,height:100,name:"diamond",penName:"菱形"},ve),fe({width:100,height:100,name:"pentagon",penName:"五边形"},ve),fe({width:100,height:100,name:"hexagon",penName:"六边形"},ve),fe({width:100,height:100,name:"pentagram",penName:"五角星"},ve),fe({width:120,height:60,name:"leftArrow",penName:"左箭头"},ve),fe({width:120,height:60,penName:"右箭头",name:"rightArrow"},ve),fe({width:150,height:60,name:"twowayArrow",penName:"双向箭头"},ve),fe({width:100,height:100,name:"cloud",penName:"云"},ve),fe({textTop:-.1,width:100,height:100,name:"message",penName:"消息框"},ve),fe({width:80,height:100,name:"file",penName:"文件"},ve),we(fe({width:60,height:100,name:"cube",penName:"立方体",z:.25},ve),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),fe({width:70,height:100,name:"people",penName:"人"},ve),we(fe({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},ve),{penType:Se.BUTTON}),we(fe({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},ve),{penType:Se.INPUT}),we(fe({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},ve),{penType:Se.SELECT}),we(fe({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,fontSize:20,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},ve),{penType:Se.SLIDER}),we(fe({name:"time",penName:"时间",width:300,height:40,text:`${_m().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,fontSize:20,interval:67,fillZero:!0},ve),{penType:Se.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...ve.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),we(fe({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},ve),{penType:Se.SWITCH}),we(fe({name:"radio",penName:"单选框",direction:"horizontal",width:150,height:30,checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},ve),{penType:Se.RADIO}),we(fe({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},ve),{penType:Se.CHECKBOX}),we(fe({name:"table2",penName:"表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,hasHeader:!0,color:"#333",textColor:"#444"},ve),{penType:Se.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),we(fe({name:"table2",penName:"斑马纹表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!0,hasHeader:!0,color:"#333",textColor:"#444"},ve),{penType:Se.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),we(fe({name:"table2",penName:"滚动表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,swiper:!0,maxNum:5,hasHeader:!0,color:"#333",textColor:"#444"},ve),{penType:Se.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}],["5","智能家居","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),we(fe({name:"svg",width:100,height:100,image:Un+"/icon/audio.svg",audioId:"",penName:"音频",datable:!0,penType:Se.AUDIO},Re),{form:[...Ot[Se.AUDIO],...Re.form],events:[{name:"enter",action:bn.Emit,value:Ze.OPEN_AUDIO,where:{type:""},params:JSON.stringify({action:Ze.OPEN_AUDIO,data:""})},{name:"leave",action:bn.Emit,value:Ze.CLOSE_AUDIO,where:{type:""},params:JSON.stringify({action:Ze.CLOSE_AUDIO,data:""})}]}),we(fe({name:"svg",width:100,height:100,image:Un+"/icon/camera.svg",cameraId:"",penName:"摄像机",datable:!0,events:[{name:"enter",action:bn.Emit,value:Ze.OPEN_CAMERA,where:{type:""},params:JSON.stringify({action:Ze.OPEN_CAMERA,data:""})},{name:"leave",action:bn.Emit,value:Ze.CLOSE_CAMERA,where:{type:""},params:JSON.stringify({action:Ze.CLOSE_CAMERA,data:""})}],penType:Se.CAMERA},Re),{form:[...Ot[Se.CAMERA],...Re.form]}),we(fe({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penName:"MP4",penType:Se.MP4},Re),{form:[...Ot[Se.MP4],...Re.form]}),we(fe({name:"video",width:100,height:100,penName:"视频流",datable:!0,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:Se.VIDEO_STREAM},Re),{form:[...Ot[Se.VIDEO_STREAM],...Re.form]}),fe({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle",penName:"开始/结束"},ve),fe({text:"流程",width:120,height:40,name:"rectangle",penName:"流程"},ve),fe({text:"判定",width:120,height:60,name:"diamond",penName:"判定"},ve),fe({text:"数据",width:120,height:50,name:"flowData",penName:"数据",offsetX:.14},ve),fe({text:"准备",width:120,height:50,name:"hexagon",penName:"准备"},ve),fe({text:"子流程",width:120,height:50,name:"flowSubprocess",penName:"子流程"},ve),fe({text:"数据库",width:80,height:120,name:"flowDb",penName:"数据库"},ve),fe({text:"文档",width:120,height:100,name:"flowDocument",penName:"文档"},ve),fe({text:"内部存储",width:120,height:80,name:"flowInternalStorage",penName:"内部存储"},ve),fe({text:"外部存储",width:120,height:80,name:"flowExternStorage",penName:"外部存储"},ve),fe({text:"队列",width:100,height:100,name:"flowQueue",penName:"队列"},ve),fe({text:"手动输入",width:120,height:80,name:"flowManually",penName:"手动输入"},ve),fe({text:"展示",width:120,height:80,name:"flowDisplay",penName:"展示"},ve),fe({text:"并行模式",width:120,height:50,name:"flowParallel",penName:"并行模式"},ve),fe({text:"注释",width:100,height:100,name:"flowComment",penName:"注释"},ve),fe({text:"",width:30,height:30,name:"circle",penName:"开始",background:"#555",lineWidth:0},ve),fe({width:30,height:30,name:"activityFinal",penName:"结束"},ve),fe({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle",penName:"活动"},ve),fe({text:"决策/合并",width:120,height:50,name:"diamond",penName:"决策/合并"},ve),fe({text:"垂直泳道",width:200,height:500,name:"swimlaneV",penName:"垂直泳道",textBaseline:"top",textTop:20,lineTop:.08},ve),fe({text:"水平泳道",width:500,height:200,name:"swimlaneH",penName:"水平泳道",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},ve),fe({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",penName:"垂直分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},ve),fe({text:"水平分岔/汇合",width:150,height:10,name:"forkH",penName:"水平分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},ve),fe({name:"andGate",penName:"与门",width:100,height:150},ve),fe({name:"basicEvent",penName:"基本事件",width:100,height:150},ve),fe({name:"unexpandedEvent",penName:"未展开事件",width:100,height:150},ve),fe({name:"priorityAndGate",penName:"优先AND门",width:100,height:150},ve),fe({name:"forbiddenGate",penName:"禁止门",width:100,height:150},ve),fe({name:"event",penName:"事件",width:100,height:150},ve),fe({name:"switchEvent",penName:"开关事件",width:100,height:150},ve),fe({name:"conditionalEvent",penName:"条件事件",width:150,height:100},ve),fe({name:"transferSymbol",penName:"转移符号",width:100,height:150},ve),fe({name:"orGate",penName:"或门",width:100,height:150},ve),fe({name:"xorGate",penName:"异或门",width:100,height:150},ve),fe({name:"votingGate",penName:"表决门",width:100,height:150},ve);const Tg=(e,r={isDev:!1,devServerUrl:"",devServerPort:8443})=>e.replace(/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,`$1${r.isDev?r.devServerUrl:G1}:${r.isDev?r.devServerPort:Q1}`),ci=(e,r)=>{const t=e.__vccOpts||e;for(const[n,l]of r)t[n]=l;return t},Fg={class:"props-panel__title"},Dg={class:"props-panel__value"},Ig={class:"props-panel__value-num"},Rg=Object.assign({name:"PropsPanle"},{__name:"PropsPanle",props:{data:{type:Object,default:null}},emits:["close"],setup(e,{emit:r}){const t=e,n=r;function l(a){return a==null||a==="—"?"—":typeof a=="number"?a.toFixed(2):a}const o=()=>{n("close")};return(a,u)=>{var h,s;return O.openBlock(),O.createElementBlock("div",{class:"props-panel",onMouseleave:o},[O.createElementVNode("div",Fg,O.toDisplayString(((h=t==null?void 0:t.data)==null?void 0:h.name)||"—"),1),u[1]||(u[1]=O.createElementVNode("div",{class:"props-panel__label"},"脉冲峰值",-1)),O.createElementVNode("div",Dg,[O.createElementVNode("span",Ig,O.toDisplayString(l((s=t==null?void 0:t.data)==null?void 0:s.value)),1),u[0]||(u[0]=O.createElementVNode("span",{class:"props-panel__unit"},"dBm",-1))])],32)}}}),Og=ci(Rg,[["__scopeId","data-v-22337bb1"]]);class Pg{constructor(r){It(this,"editor");this.editor=r}initPlugin(r,t,n={}){r.installPenPlugins({name:t},[{plugin:qc.mindBoxPlugin,options:n},{plugin:zc.collapseChildPlugin,options:n}])}}var Ul;(function(e){e[e.Node=0]="Node",e[e.Line=1]="Line"})(Ul||(Ul={}));var $l;(function(e){e[e.None=0]="None",e[e.DisableEdit=1]="DisableEdit",e[e.DisableMove=2]="DisableMove",e[e.DisableScale=3]="DisableScale",e[e.DisableMoveScale=4]="DisableMoveScale",e[e.Disable=10]="Disable"})($l||($l={}));var ql;(function(e){e[e.Default=0]="Default",e[e.In=1]="In",e[e.Out=2]="Out"})(ql||(ql={}));var zl;(function(e){e[e.None=0]="None",e[e.Linear=1]="Linear",e[e.Radial=2]="Radial"})(zl||(zl={}));var jl;(function(e){e[e.CanvasTemplate=1]="CanvasTemplate",e[e.CanvasImageBottom=2]="CanvasImageBottom",e[e.CanvasMain=3]="CanvasMain",e[e.CanvasImage=4]="CanvasImage"})(jl||(jl={}));var Hl;(function(e){e[e.Normal=0]="Normal",e[e.Beads=1]="Beads",e[e.Dot=2]="Dot",e[e.Arrow=3]="Arrow",e[e.WaterDrop=4]="WaterDrop",e[e.Custom=5]="Custom"})(Hl||(Hl={}));var Vl;(function(e){e[e.Image=0]="Image",e[e.Icon=1]="Icon",e[e.Pen=2]="Pen",e[e.Element=3]="Element"})(Vl||(Vl={}));var Wl;(function(e){e[e.None=0]="None",e[e.LineAnchor=1]="LineAnchor",e[e.NodeAnchor=2]="NodeAnchor",e[e.Line=3]="Line",e[e.Node=4]="Node",e[e.Resize=5]="Resize",e[e.Rotate=6]="Rotate",e[e.LineAnchorPrev=7]="LineAnchorPrev",e[e.LineAnchorNext=8]="LineAnchorNext"})(Wl||(Wl={}));var Gl;(function(e){e[e.None=0]="None",e[e.Translate=1]="Translate",e[e.Select=2]="Select",e[e.Resize=3]="Resize",e[e.AddAnchor=4]="AddAnchor"})(Gl||(Gl={}));var Kl;(function(e){e[e.None=0]="None",e[e.Down=1]="Down",e[e.Translate=2]="Translate"})(Kl||(Kl={}));var Ql;(function(e){e[e.None=-1]="None",e[e.Up=0]="Up",e[e.Right=1]="Right",e[e.Bottom=2]="Bottom",e[e.Left=3]="Left"})(Ql||(Ql={}));var Yl;(function(e){e[e.Mirror=0]="Mirror",e[e.Bilateral=1]="Bilateral",e[e.Free=2]="Free"})(Yl||(Yl={}));var Xl;(function(e){e[e.Default=0]="Default",e[e.In=1]="In",e[e.Out=2]="Out",e[e.DisableConnected=3]="DisableConnected",e[e.DisableConnectTo=4]="DisableConnectTo",e[e.Disable=10]="Disable"})(Xl||(Xl={}));var Zl;(function(e){e[e.Default=0]="Default",e[e.Line=1]="Line"})(Zl||(Zl={}));var oa;(function(e){e[e.None=-1]="None",e[e.Document=0]="Document",e[e.Canvas=1]="Canvas"})(oa||(oa={}));oa.Document;var Jl;(function(e){e[e.Add=0]="Add",e[e.Update=1]="Update",e[e.Delete=2]="Delete",e[e.Replace=3]="Replace"})(Jl||(Jl={}));function eu(e){const r=parseInt,t=Math.round;let n=e.length,l={};if(n>9){const[o,a,u,h]=e=e.split(",");if(n=e.length,n<3||n>4)return null;l.r=r(o[3]=="a"?o.slice(5):o.slice(4)),l.g=r(a),l.b=r(u),l.a=h?parseFloat(h):-1}else{if(n==8||n==6||n<4)return null;n<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(n>4?e[4]+e[4]:"")),e=r(e.slice(1),16),n==9||n==5?(l.r=e>>24&255,l.g=e>>16&255,l.b=e>>8&255,l.a=t((e&255)/.255)/1e3):(l.r=e>>16,l.g=e>>8&255,l.b=e&255,l.a=-1)}return l}function Ng(e,r,t,n){let l,o,a,u,h,s,i,p=Math.round,c=typeof t=="string";return typeof e!="number"||e<-1||e>1||typeof r!="string"||r[0]!="r"&&r[0]!="#"||t&&!c||(i=r.length>9,i=c?t.length>9?!0:t=="c"?!i:!1:i,h=eu(r),u=e<0,s=t&&t!="c"?eu(t):u?{r:0,g:0,b:0,a:-1}:{r:255,g:255,b:255,a:-1},e=u?e*-1:e,u=1-e,!h||!s)?null:(n?(l=p(u*h.r+e*s.r),o=p(u*h.g+e*s.g),a=p(u*h.b+e*s.b)):(l=p(yt(u*yt(h.r,2)+e*yt(s.r,2),.5)),o=p(yt(u*yt(h.g,2)+e*yt(s.g,2),.5)),a=p(yt(u*yt(h.b,2)+e*yt(s.b,2),.5))),c=h.a,s=s.a,h=c>=0||s>=0,c=h?c<0?s:s<0?c:c*u+s*e:0,i?"rgb"+(h?"a(":"(")+l+","+o+","+a+(h?","+p(c*1e3)/1e3:"")+")":"#"+(4294967296+l*16777216+o*65536+a*256+(h?p(c*255):0)).toString(16).slice(1,h?void 0:-2))}globalThis.pSBC=Ng;var tu;(function(e){e[e.None=0]="None",e[e.LocalStorage=1]="LocalStorage",e[e.Cookie=2]="Cookie"})(tu||(tu={}));location.host.indexOf("le5le.com");const dr={};var ru;(function(e){e[e.Link=0]="Link",e[e.SetProps=1]="SetProps",e[e.StartAnimate=2]="StartAnimate",e[e.PauseAnimate=3]="PauseAnimate",e[e.StopAnimate=4]="StopAnimate",e[e.JS=5]="JS",e[e.GlobalFn=6]="GlobalFn",e[e.Emit=7]="Emit",e[e.StartVideo=8]="StartVideo",e[e.PauseVideo=9]="PauseVideo",e[e.StopVideo=10]="StopVideo",e[e.SendPropData=11]="SendPropData",e[e.SendVarData=12]="SendVarData",e[e.Navigator=13]="Navigator",e[e.Dialog=14]="Dialog",e[e.SendData=15]="SendData",e[e.PostMessage=16]="PostMessage",e[e.PostMessageToParent=17]="PostMessageToParent",e[e.Message=18]="Message"})(ru||(ru={}));var Mg={exports:{}};(function(e,r){(function(t){e.exports=t()})(function(){return function(){return function t(n,l,o){function a(s,i){if(!l[s]){if(!n[s]){var p=typeof Lr=="function"&&Lr;if(!i&&p)return p(s,!0);if(u)return u(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=l[s]={exports:{}};n[s][0].call(f.exports,function(d){return a(n[s][1][d]||d)},f,f.exports,t,n,l,o)}return l[s].exports}for(var u=typeof Lr=="function"&&Lr,h=0;h<o.length;h++)a(o[h]);return a}}()({1:[function(t,n,l){(function(o,a){(function(){const u=t("events").EventEmitter,h=t("./store"),s=t("./topic-alias-recv"),i=t("./topic-alias-send"),p=t("mqtt-packet"),c=t("./default-message-id-provider"),f=t("readable-stream").Writable,d=t("inherits"),v=t("reinterval"),m=t("rfdc/default"),b=t("./validations"),g=t("xtend"),y=t("debug")("mqttjs:client"),_=o?o.nextTick:function(S){setTimeout(S,0)},T=a.setImmediate||function(S){_(S)},D={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},F={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function R(S,I){let z;I.properties&&(z=I.properties.topicAlias);let V=I.topic.toString();if(V.length===0){if(z===void 0)return new Error("Unregistered Topic Alias");if((V=S.topicAliasSend.getTopicByAlias(z))===void 0)return new Error("Unregistered Topic Alias");I.topic=V}z&&delete I.properties.topicAlias}function X(S,I,z){y("sendPacket :: packet: %O",I),y("sendPacket :: emitting `packetsend`"),S.emit("packetsend",I),y("sendPacket :: writing to stream");const V=p.writeToStream(I,S.stream,S.options);y("sendPacket :: writeToStream result %s",V),!V&&z&&z!==E?(y("sendPacket :: handle events on `drain` once through callback."),S.stream.once("drain",z)):z&&(y("sendPacket :: invoking cb"),z())}function H(S,I,z,V){y("storeAndSend :: store packet with cmd %s to outgoingStore",I.cmd);let te,W=I;if(W.cmd==="publish"&&(W=m(I),te=R(S,W)))return z&&z(te);S.outgoingStore.put(W,function(q){if(q)return z&&z(q);V(),X(S,I,z)})}function E(S){y("nop ::",S)}function A(S,I){let z;const V=this;if(!(this instanceof A))return new A(S,I);for(z in this.options=I||{},D)this.options[z]===void 0?this.options[z]=D[z]:this.options[z]=I[z];y("MqttClient :: options.protocol",I.protocol),y("MqttClient :: options.protocolVersion",I.protocolVersion),y("MqttClient :: options.username",I.username),y("MqttClient :: options.keepalive",I.keepalive),y("MqttClient :: options.reconnectPeriod",I.reconnectPeriod),y("MqttClient :: options.rejectUnauthorized",I.rejectUnauthorized),y("MqttClient :: options.topicAliasMaximum",I.topicAliasMaximum),this.options.clientId=typeof I.clientId=="string"?I.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),y("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=I.protocolVersion===5&&I.customHandleAcks?I.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=S,this.messageIdProvider=this.options.messageIdProvider===void 0?new c:this.options.messageIdProvider,this.outgoingStore=I.outgoingStore||new h,this.incomingStore=I.incomingStore||new h,this.queueQoSZero=I.queueQoSZero===void 0||I.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,I.topicAliasMaximum>0&&(I.topicAliasMaximum>65535?y("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(I.topicAliasMaximum)),this.on("connect",function(){const te=this.queue;y("connect :: sending queued packets"),function W(){const q=te.shift();y("deliver :: entry %o",q);let G=null;if(!q)return void V._resubscribe();G=q.packet,y("deliver :: call _sendPacket for %o",G);let U=!0;G.messageId&&G.messageId!==0&&(V.messageIdProvider.register(G.messageId)||(U=!1)),U?V._sendPacket(G,function(L){q.cb&&q.cb(L),W()}):(y("messageId: %d has already used. The message is skipped and removed.",G.messageId),W())}()}),this.on("close",function(){y("close :: connected set to `false`"),this.connected=!1,y("close :: clearing connackTimer"),clearTimeout(this.connackTimer),y("close :: clearing ping timer"),V.pingTimer!==null&&(V.pingTimer.clear(),V.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),y("close :: calling _setupReconnect"),this._setupReconnect()}),u.call(this),y("MqttClient :: setting up stream"),this._setupStream()}d(A,u),A.prototype._setupStream=function(){const S=this,I=new f,z=p.parser(this.options);let V=null;const te=[];function W(){if(te.length)_(q);else{const U=V;V=null,U()}}function q(){y("work :: getting next packet in queue");const U=te.shift();if(U)y("work :: packet pulled from queue"),S._handlePacket(U,W);else{y("work :: no packets in queue");const L=V;V=null,y("work :: done flag is %s",!!L),L&&L()}}y("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),y("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),z.on("packet",function(U){y("parser :: on packet push to packets array."),te.push(U)}),I._write=function(U,L,Y){V=Y,y("writable stream :: parsing buffer"),z.parse(U),q()},y("_setupStream :: pipe stream to writable stream"),this.stream.pipe(I),this.stream.on("error",function(U){y("streamErrorHandler :: error",U.message),U.code?(y("streamErrorHandler :: emitting error"),S.emit("error",U)):E(U)}),this.stream.on("close",function(){var U;y("(%s)stream :: on close",S.options.clientId),(U=S.outgoing)&&(y("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(U).forEach(function(L){U[L].volatile&&typeof U[L].cb=="function"&&(U[L].cb(new Error("Connection closed")),delete U[L])})),y("stream: emit close to MqttClient"),S.emit("close")}),y("_setupStream: sending packet `connect`");const G=Object.create(this.options);if(G.cmd="connect",this.topicAliasRecv&&(G.properties||(G.properties={}),this.topicAliasRecv&&(G.properties.topicAliasMaximum=this.topicAliasRecv.max)),X(this,G),z.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return S.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"&&X(this,g({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){y("!!connectTimeout hit!! Calling _cleanUp with force `true`"),S._cleanUp(!0)},this.options.connectTimeout)},A.prototype._handlePacket=function(S,I){const z=this.options;if(z.protocolVersion===5&&z.properties&&z.properties.maximumPacketSize&&z.properties.maximumPacketSize<S.length)return this.emit("error",new Error("exceeding packets size "+S.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(y("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",S),S.cmd){case"publish":this._handlePublish(S,I);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(S),I();break;case"pubrel":this._handlePubrel(S,I);break;case"connack":this._handleConnack(S),I();break;case"auth":this._handleAuth(S),I();break;case"pingresp":this._handlePingresp(S),I();break;case"disconnect":this._handleDisconnect(S),I()}},A.prototype._checkDisconnecting=function(S){return this.disconnecting&&(S&&S!==E?S(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},A.prototype.publish=function(S,I,z,V){y("publish :: message `%s` to topic `%s`",I,S);const te=this.options;if(typeof z=="function"&&(V=z,z=null),z=g({qos:0,retain:!1,dup:!1},z),this._checkDisconnecting(V))return this;const W=this,q=function(){let G=0;if((z.qos===1||z.qos===2)&&(G=W._nextId())===null)return y("No messageId left"),!1;const U={cmd:"publish",topic:S,payload:I,qos:z.qos,retain:z.retain,messageId:G,dup:z.dup};switch(te.protocolVersion===5&&(U.properties=z.properties),y("publish :: qos",z.qos),z.qos){case 1:case 2:W.outgoing[U.messageId]={volatile:!1,cb:V||E},y("MqttClient:publish: packet cmd: %s",U.cmd),W._sendPacket(U,void 0,z.cbStorePut);break;default:y("MqttClient:publish: packet cmd: %s",U.cmd),W._sendPacket(U,V,z.cbStorePut)}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!q())&&this._storeProcessingQueue.push({invoke:q,cbStorePut:z.cbStorePut,callback:V}),this},A.prototype.subscribe=function(){const S=this,I=new Array(arguments.length);for(let P=0;P<arguments.length;P++)I[P]=arguments[P];const z=[];let V=I.shift();const te=V.resubscribe;let W=I.pop()||E,q=I.pop();const G=this.options.protocolVersion;delete V.resubscribe,typeof V=="string"&&(V=[V]),typeof W!="function"&&(q=W,W=E);const U=b.validateTopics(V);if(U!==null)return T(W,new Error("Invalid topic "+U)),this;if(this._checkDisconnecting(W))return y("subscribe: discconecting true"),this;const L={qos:0};if(G===5&&(L.nl=!1,L.rap=!1,L.rh=0),q=g(L,q),Array.isArray(V)?V.forEach(function(P){if(y("subscribe: array topic %s",P),!Object.prototype.hasOwnProperty.call(S._resubscribeTopics,P)||S._resubscribeTopics[P].qos<q.qos||te){const J={topic:P,qos:q.qos};G===5&&(J.nl=q.nl,J.rap=q.rap,J.rh=q.rh,J.properties=q.properties),y("subscribe: pushing topic `%s` and qos `%s` to subs list",J.topic,J.qos),z.push(J)}}):Object.keys(V).forEach(function(P){if(y("subscribe: object topic %s",P),!Object.prototype.hasOwnProperty.call(S._resubscribeTopics,P)||S._resubscribeTopics[P].qos<V[P].qos||te){const J={topic:P,qos:V[P].qos};G===5&&(J.nl=V[P].nl,J.rap=V[P].rap,J.rh=V[P].rh,J.properties=q.properties),y("subscribe: pushing `%s` to subs list",J),z.push(J)}}),!z.length)return W(null,[]),this;const Y=function(){const P=S._nextId();if(P===null)return y("No messageId left"),!1;const J={cmd:"subscribe",subscriptions:z,qos:1,retain:!1,dup:!1,messageId:P};if(q.properties&&(J.properties=q.properties),S.options.resubscribe){y("subscribe :: resubscribe true");const ne=[];z.forEach(function(ie){if(S.options.reconnectPeriod>0){const ae={qos:ie.qos};G===5&&(ae.nl=ie.nl||!1,ae.rap=ie.rap||!1,ae.rh=ie.rh||0,ae.properties=ie.properties),S._resubscribeTopics[ie.topic]=ae,ne.push(ie.topic)}}),S.messageIdToTopic[J.messageId]=ne}return S.outgoing[J.messageId]={volatile:!0,cb:function(ne,ie){if(!ne){const ae=ie.granted;for(let x=0;x<ae.length;x+=1)z[x].qos=ae[x]}W(ne,z)}},y("subscribe :: call _sendPacket"),S._sendPacket(J),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!Y())&&this._storeProcessingQueue.push({invoke:Y,callback:W}),this},A.prototype.unsubscribe=function(){const S=this,I=new Array(arguments.length);for(let G=0;G<arguments.length;G++)I[G]=arguments[G];let z=I.shift(),V=I.pop()||E,te=I.pop();typeof z=="string"&&(z=[z]),typeof V!="function"&&(te=V,V=E);const W=b.validateTopics(z);if(W!==null)return T(V,new Error("Invalid topic "+W)),this;if(S._checkDisconnecting(V))return this;const q=function(){const G=S._nextId();if(G===null)return y("No messageId left"),!1;const U={cmd:"unsubscribe",qos:1,messageId:G};return typeof z=="string"?U.unsubscriptions=[z]:Array.isArray(z)&&(U.unsubscriptions=z),S.options.resubscribe&&U.unsubscriptions.forEach(function(L){delete S._resubscribeTopics[L]}),typeof te=="object"&&te.properties&&(U.properties=te.properties),S.outgoing[U.messageId]={volatile:!0,cb:V},y("unsubscribe: call _sendPacket"),S._sendPacket(U),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!q())&&this._storeProcessingQueue.push({invoke:q,callback:V}),this},A.prototype.end=function(S,I,z){const V=this;function te(){y("end :: (%s) :: finish :: calling _cleanUp with force %s",V.options.clientId,S),V._cleanUp(S,()=>{y("end :: finish :: calling process.nextTick on closeStores"),_(function(){y("end :: closeStores: closing incoming and outgoing stores"),V.disconnected=!0,V.incomingStore.close(function(W){V.outgoingStore.close(function(q){if(y("end :: closeStores: emitting end"),V.emit("end"),z){const G=W||q;y("end :: closeStores: invoking callback with args"),z(G)}})}),V._deferredReconnect&&V._deferredReconnect()}.bind(V))},I)}return y("end :: (%s)",this.options.clientId),S!=null&&typeof S=="boolean"||(z=I||E,I=S,S=!1,typeof I!="object"&&(z=I,I=null,typeof z!="function"&&(z=E))),typeof I!="object"&&(z=I,I=null),y("end :: cb? %s",!!z),z=z||E,this.disconnecting?(z(),this):(this._clearReconnect(),this.disconnecting=!0,!S&&Object.keys(this.outgoing).length>0?(y("end :: (%s) :: calling finish in 10ms once outgoing is empty",V.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,te,10))):(y("end :: (%s) :: immediately calling finish",V.options.clientId),te()),this)},A.prototype.removeOutgoingMessage=function(S){const I=this.outgoing[S]?this.outgoing[S].cb:null;return delete this.outgoing[S],this.outgoingStore.del({messageId:S},function(){I(new Error("Message removed"))}),this},A.prototype.reconnect=function(S){y("client reconnect");const I=this,z=function(){S?(I.options.incomingStore=S.incomingStore,I.options.outgoingStore=S.outgoingStore):(I.options.incomingStore=null,I.options.outgoingStore=null),I.incomingStore=I.options.incomingStore||new h,I.outgoingStore=I.options.outgoingStore||new h,I.disconnecting=!1,I.disconnected=!1,I._deferredReconnect=null,I._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=z:z(),this},A.prototype._reconnect=function(){y("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),y("client already connected. disconnecting first.")):(y("_reconnect: calling _setupStream"),this._setupStream())},A.prototype._setupReconnect=function(){const S=this;!S.disconnecting&&!S.reconnectTimer&&S.options.reconnectPeriod>0?(this.reconnecting||(y("_setupReconnect :: emit `offline` state"),this.emit("offline"),y("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),y("_setupReconnect :: setting reconnectTimer for %d ms",S.options.reconnectPeriod),S.reconnectTimer=setInterval(function(){y("reconnectTimer :: reconnect triggered!"),S._reconnect()},S.options.reconnectPeriod)):y("_setupReconnect :: doing nothing...")},A.prototype._clearReconnect=function(){y("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},A.prototype._cleanUp=function(S,I){const z=arguments[2];if(I&&(y("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",I)),y("_cleanUp :: forced? %s",S),S)this.options.reconnectPeriod===0&&this.options.clean&&(V=this.outgoing)&&(y("flush: queue exists? %b",!!V),Object.keys(V).forEach(function(te){typeof V[te].cb=="function"&&(V[te].cb(new Error("Connection closed")),delete V[te])})),y("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const te=g({cmd:"disconnect"},z);y("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(te,T.bind(null,this.stream.end.bind(this.stream)))}var V;this.disconnecting||(y("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(y("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),I&&!this.connected&&(y("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",I),I())},A.prototype._sendPacket=function(S,I,z){y("_sendPacket :: (%s) :: start",this.options.clientId),z=z||E,I=I||E;const V=function(te,W){if(te.options.protocolVersion===5&&W.cmd==="publish"){let q;W.properties&&(q=W.properties.topicAlias);const G=W.topic.toString();if(te.topicAliasSend)if(q){if(G.length!==0&&(y("applyTopicAlias :: register topic: %s - alias: %d",G,q),!te.topicAliasSend.put(G,q)))return y("applyTopicAlias :: error out of range. topic: %s - alias: %d",G,q),new Error("Sending Topic Alias out of range")}else G.length!==0&&(te.options.autoAssignTopicAlias?(q=te.topicAliasSend.getAliasByTopic(G))?(W.topic="",W.properties=we(fe({},W.properties),{topicAlias:q}),y("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",G,q)):(q=te.topicAliasSend.getLruAlias(),te.topicAliasSend.put(G,q),W.properties=we(fe({},W.properties),{topicAlias:q}),y("applyTopicAlias :: auto assign topic: %s - alias: %d",G,q)):te.options.autoUseTopicAlias&&(q=te.topicAliasSend.getAliasByTopic(G))&&(W.topic="",W.properties=we(fe({},W.properties),{topicAlias:q}),y("applyTopicAlias :: auto use topic: %s - alias: %d",G,q)));else if(q)return y("applyTopicAlias :: error out of range. topic: %s - alias: %d",G,q),new Error("Sending Topic Alias out of range")}}(this,S);if(V)I(V);else{if(!this.connected)return S.cmd==="auth"?(this._shiftPingInterval(),void X(this,S,I)):(y("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(S,I,z));switch(this._shiftPingInterval(),S.cmd){case"publish":break;case"pubrel":return void H(this,S,I,z);default:return void X(this,S,I)}switch(S.qos){case 2:case 1:H(this,S,I,z);break;case 0:default:X(this,S,I)}y("_sendPacket :: (%s) :: end",this.options.clientId)}},A.prototype._storePacket=function(S,I,z){y("_storePacket :: packet: %o",S),y("_storePacket :: cb? %s",!!I),z=z||E;let V=S;if(V.cmd==="publish"){const te=R(this,V=m(S));if(te)return I&&I(te)}(V.qos||0)===0&&this.queueQoSZero||V.cmd!=="publish"?this.queue.push({packet:V,cb:I}):V.qos>0?(I=this.outgoing[V.messageId]?this.outgoing[V.messageId].cb:null,this.outgoingStore.put(V,function(te){if(te)return I&&I(te);z()})):I&&I(new Error("No connection to broker"))},A.prototype._setupPingTimer=function(){y("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const S=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=v(function(){S._checkPing()},1e3*this.options.keepalive))},A.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},A.prototype._checkPing=function(){y("_checkPing :: checking ping..."),this.pingResp?(y("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(y("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},A.prototype._handlePingresp=function(){this.pingResp=!0},A.prototype._handleConnack=function(S){y("_handleConnack");const I=this.options,z=I.protocolVersion===5?S.reasonCode:S.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,S.properties){if(S.properties.topicAliasMaximum){if(S.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));S.properties.topicAliasMaximum>0&&(this.topicAliasSend=new i(S.properties.topicAliasMaximum))}S.properties.serverKeepAlive&&I.keepalive&&(I.keepalive=S.properties.serverKeepAlive,this._shiftPingInterval()),S.properties.maximumPacketSize&&(I.properties||(I.properties={}),I.properties.maximumPacketSize=S.properties.maximumPacketSize)}if(z===0)this.reconnecting=!1,this._onConnect(S);else if(z>0){const V=new Error("Connection refused: "+F[z]);V.code=z,this.emit("error",V)}},A.prototype._handleAuth=function(S){const I=this.options.protocolVersion,z=I===5?S.reasonCode:S.returnCode;if(I!==5){const te=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+I);return te.code=z,void this.emit("error",te)}const V=this;this.handleAuth(S,function(te,W){if(te)V.emit("error",te);else if(z===24)V.reconnecting=!1,V._sendPacket(W);else{const q=new Error("Connection refused: "+F[z]);te.code=z,V.emit("error",q)}})},A.prototype.handleAuth=function(S,I){I()},A.prototype._handlePublish=function(S,I){y("_handlePublish: packet %o",S),I=I!==void 0?I:E;let z=S.topic.toString();const V=S.payload,te=S.qos,W=S.messageId,q=this,G=this.options,U=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let L;if(S.properties&&(L=S.properties.topicAlias),L!==void 0)if(z.length===0){if(!(L>0&&L<=65535))return y("_handlePublish :: topic alias out of range. alias: %d",L),void this.emit("error",new Error("Received Topic Alias is out of range"));{const Y=this.topicAliasRecv.getTopicByAlias(L);if(!Y)return y("_handlePublish :: unregistered topic alias. alias: %d",L),void this.emit("error",new Error("Received unregistered Topic Alias"));y("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",z=Y,L)}}else{if(!this.topicAliasRecv.put(z,L))return y("_handlePublish :: topic alias out of range. alias: %d",L),void this.emit("error",new Error("Received Topic Alias is out of range"));y("_handlePublish :: registered topic: %s - alias: %d",z,L)}}switch(y("_handlePublish: qos %d",te),te){case 2:G.customHandleAcks(z,V,S,function(L,Y){return L instanceof Error||(Y=L,L=null),L?q.emit("error",L):U.indexOf(Y)===-1?q.emit("error",new Error("Wrong reason code for pubrec")):void(Y?q._sendPacket({cmd:"pubrec",messageId:W,reasonCode:Y},I):q.incomingStore.put(S,function(){q._sendPacket({cmd:"pubrec",messageId:W},I)}))});break;case 1:G.customHandleAcks(z,V,S,function(L,Y){return L instanceof Error||(Y=L,L=null),L?q.emit("error",L):U.indexOf(Y)===-1?q.emit("error",new Error("Wrong reason code for puback")):(Y||q.emit("message",z,V,S),void q.handleMessage(S,function(P){if(P)return I&&I(P);q._sendPacket({cmd:"puback",messageId:W,reasonCode:Y},I)}))});break;case 0:this.emit("message",z,V,S),this.handleMessage(S,I);break;default:y("_handlePublish: unknown QoS. Doing nothing.")}},A.prototype.handleMessage=function(S,I){I()},A.prototype._handleAck=function(S){const I=S.messageId,z=S.cmd;let V=null;const te=this.outgoing[I]?this.outgoing[I].cb:null,W=this;let q;if(te){switch(y("_handleAck :: packet type",z),z){case"pubcomp":case"puback":{const G=S.reasonCode;G&&G>0&&G!==16&&((q=new Error("Publish error: "+F[G])).code=G,te(q,S)),delete this.outgoing[I],this.outgoingStore.del(S,te),this.messageIdProvider.deallocate(I),this._invokeStoreProcessingQueue();break}case"pubrec":{V={cmd:"pubrel",qos:2,messageId:I};const G=S.reasonCode;G&&G>0&&G!==16?((q=new Error("Publish error: "+F[G])).code=G,te(q,S)):this._sendPacket(V);break}case"suback":delete this.outgoing[I],this.messageIdProvider.deallocate(I);for(let G=0;G<S.granted.length;G++)if(128&S.granted[G]){const U=this.messageIdToTopic[I];U&&U.forEach(function(L){delete W._resubscribeTopics[L]})}this._invokeStoreProcessingQueue(),te(null,S);break;case"unsuback":delete this.outgoing[I],this.messageIdProvider.deallocate(I),this._invokeStoreProcessingQueue(),te(null);break;default:W.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")}else y("_handleAck :: Server sent an ack in error. Ignoring.")},A.prototype._handlePubrel=function(S,I){y("handling pubrel packet"),I=I!==void 0?I:E;const z=this,V={cmd:"pubcomp",messageId:S.messageId};z.incomingStore.get(S,function(te,W){te?z._sendPacket(V,I):(z.emit("message",W.topic,W.payload,W),z.handleMessage(W,function(q){if(q)return I(q);z.incomingStore.del(W,E),z._sendPacket(V,I)}))})},A.prototype._handleDisconnect=function(S){this.emit("disconnect",S)},A.prototype._nextId=function(){return this.messageIdProvider.allocate()},A.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},A.prototype._resubscribe=function(){y("_resubscribe");const S=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion===5&&!this.connackPacket.sessionPresent)&&S.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){y("_resubscribe: protocolVersion 5");for(let I=0;I<S.length;I++){const z={};z[S[I]]=this._resubscribeTopics[S[I]],z.resubscribe=!0,this.subscribe(z,{properties:z[S[I]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},A.prototype._onConnect=function(S){if(this.disconnected)return void this.emit("connect",S);const I=this;this.connackPacket=S,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0,function z(){let V=I.outgoingStore.createStream();function te(){I._storeProcessing=!1,I._packetIdsDuringStoreProcessing={}}function W(){V.destroy(),V=null,I._flushStoreProcessingQueue(),te()}I.once("close",W),V.on("error",function(q){te(),I._flushStoreProcessingQueue(),I.removeListener("close",W),I.emit("error",q)}),V.on("end",function(){let q=!0;for(const G in I._packetIdsDuringStoreProcessing)if(!I._packetIdsDuringStoreProcessing[G]){q=!1;break}q?(te(),I.removeListener("close",W),I._invokeAllStoreProcessingQueue(),I.emit("connect",S)):z()}),function q(){if(!V)return;I._storeProcessing=!0;const G=V.read(1);let U;G?I._packetIdsDuringStoreProcessing[G.messageId]?q():I.disconnecting||I.reconnectTimer?V.destroy&&V.destroy():(U=I.outgoing[G.messageId]?I.outgoing[G.messageId].cb:null,I.outgoing[G.messageId]={volatile:!1,cb:function(L,Y){U&&U(L,Y),q()}},I._packetIdsDuringStoreProcessing[G.messageId]=!0,I.messageIdProvider.register(G.messageId)?I._sendPacket(G):y("messageId: %d has already used.",G.messageId)):V.once("readable",q)}()}()},A.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const S=this._storeProcessingQueue[0];if(S&&S.invoke())return this._storeProcessingQueue.shift(),!0}return!1},A.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},A.prototype._flushStoreProcessingQueue=function(){for(const S of this._storeProcessingQueue)S.cbStorePut&&S.cbStorePut(new Error("Connection closed")),S.callback&&S.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},n.exports=A}).call(this)}).call(this,t("_process"),typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(t,n,l){const{Buffer:o}=t("buffer"),a=t("readable-stream").Transform,u=t("duplexify");let h,s,i,p=!1;n.exports=function(c,f){if(f.hostname=f.hostname||f.host,!f.hostname)throw new Error("Could not determine host. Specify host manually.");const d=f.protocolId==="MQIsdp"&&f.protocolVersion===3?"mqttv3.1":"mqtt";(function(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})})(f);const v=function(m,b){const g=m.protocol==="alis"?"wss":"ws";let y=g+"://"+m.hostname+m.path;return m.port&&m.port!==80&&m.port!==443&&(y=g+"://"+m.hostname+":"+m.port+m.path),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,b)),y}(f,c);return(h=f.my).connectSocket({url:v,protocols:d}),s=function(){const m=new a;return m._write=function(b,g,y){h.sendSocketMessage({data:b.buffer,success:function(){y()},fail:function(){y(new Error)}})},m._flush=function(b){h.closeSocket({success:function(){b()}})},m}(),i=u.obj(),p||(p=!0,h.onSocketOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onSocketMessage(function(m){if(typeof m.data=="string"){const b=o.from(m.data,"base64");s.push(b)}else{const b=new FileReader;b.addEventListener("load",function(){let g=b.result;g=g instanceof ArrayBuffer?o.from(g):o.from(g,"utf8"),s.push(g)}),b.readAsArrayBuffer(m.data)}}),h.onSocketClose(function(){i.end(),i.destroy()}),h.onSocketError(function(m){i.destroy(m)})),i}},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(t,n,l){const o=t("net"),a=t("debug")("mqttjs:tcp");n.exports=function(u,h){h.port=h.port||1883,h.hostname=h.hostname||h.host||"localhost";const s=h.port,i=h.hostname;return a("port %d and host %s",s,i),o.createConnection(s,i)}},{debug:18,net:16}],4:[function(t,n,l){const o=t("tls"),a=t("net"),u=t("debug")("mqttjs:tls");n.exports=function(h,s){s.port=s.port||8883,s.host=s.hostname||s.host||"localhost",a.isIP(s.host)===0&&(s.servername=s.host),s.rejectUnauthorized=s.rejectUnauthorized!==!1,delete s.path,u("port %d host %s rejectUnauthorized %b",s.port,s.host,s.rejectUnauthorized);const i=o.connect(s);function p(c){s.rejectUnauthorized&&h.emit("error",c),i.end()}return i.on("secureConnect",function(){s.rejectUnauthorized&&!i.authorized?i.emit("error",new Error("TLS not authorized")):i.removeListener("error",p)}),i.on("error",p),i}},{debug:18,net:16,tls:16}],5:[function(t,n,l){(function(o){(function(){const{Buffer:a}=t("buffer"),u=t("ws"),h=t("debug")("mqttjs:ws"),s=t("duplexify"),i=t("readable-stream").Transform,p=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],c=o!==void 0&&o.title==="browser"||typeof __webpack_require__=="function";function f(v,m){let b=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(b=v.transformWsUrl(b,v,m)),b}function d(v){const m=v;return v.hostname||(m.hostname="localhost"),v.port||(v.protocol==="wss"?m.port=443:m.port=80),v.path||(m.path="/"),v.wsOptions||(m.wsOptions={}),c||v.protocol!=="wss"||p.forEach(function(b){Object.prototype.hasOwnProperty.call(v,b)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,b)&&(m.wsOptions[b]=v[b])}),m}n.exports=c?function(v,m){let b;h("browserStreamBuilder");const g=function(S){const I=d(S);if(I.hostname||(I.hostname=I.host),!I.hostname){if(typeof document=="undefined")throw new Error("Could not determine host. Specify host manually.");const z=new URL(document.URL);I.hostname=z.hostname,I.port||(I.port=z.port)}return I.objectMode===void 0&&(I.objectMode=!(I.binary===!0||I.binary===void 0)),I}(m).browserBufferSize||524288,y=m.browserBufferTimeout||1e3,_=!m.objectMode,T=function(S,I){const z=I.protocolId==="MQIsdp"&&I.protocolVersion===3?"mqttv3.1":"mqtt",V=f(I,S),te=new WebSocket(V,[z]);return te.binaryType="arraybuffer",te}(v,m),D=function(S,I,z){const V=new i({objectModeMode:S.objectMode});return V._write=I,V._flush=z,V}(m,function S(I,z,V){T.bufferedAmount>g&&setTimeout(S,y,I,z,V),_&&typeof I=="string"&&(I=a.from(I,"utf8"));try{T.send(I)}catch(te){return V(te)}V()},function(S){T.close(),S()});m.objectMode||(D._writev=A),D.on("close",()=>{T.close()});const F=T.addEventListener!==void 0;function R(){b.setReadable(D),b.setWritable(D),b.emit("connect")}function X(){b.end(),b.destroy()}function H(S){b.destroy(S)}function E(S){let I=S.data;I=I instanceof ArrayBuffer?a.from(I):a.from(I,"utf8"),D.push(I)}function A(S,I){const z=new Array(S.length);for(let V=0;V<S.length;V++)typeof S[V].chunk=="string"?z[V]=a.from(S[V],"utf8"):z[V]=S[V].chunk;this._write(a.concat(z),"binary",I)}return T.readyState===T.OPEN?b=D:(b=b=s(void 0,void 0,m),m.objectMode||(b._writev=A),F?T.addEventListener("open",R):T.onopen=R),b.socket=T,F?(T.addEventListener("close",X),T.addEventListener("error",H),T.addEventListener("message",E)):(T.onclose=X,T.onerror=H,T.onmessage=E),b}:function(v,m){h("streamBuilder");const b=d(m),g=f(b,v),y=function(T,D,F){h("createWebSocket"),h("protocol: "+F.protocolId+" "+F.protocolVersion);const R=F.protocolId==="MQIsdp"&&F.protocolVersion===3?"mqttv3.1":"mqtt";return h("creating new Websocket for url: "+D+" and protocol: "+R),new u(D,[R],F.wsOptions)}(0,g,b),_=u.createWebSocketStream(y,b.wsOptions);return _.url=g,y.on("close",()=>{_.destroy()}),_}}).call(this)}).call(this,t("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(t,n,l){const{Buffer:o}=t("buffer"),a=t("readable-stream").Transform,u=t("duplexify");let h,s,i;n.exports=function(p,c){if(c.hostname=c.hostname||c.host,!c.hostname)throw new Error("Could not determine host. Specify host manually.");const f=c.protocolId==="MQIsdp"&&c.protocolVersion===3?"mqttv3.1":"mqtt";(function(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})})(c);const d=function(m,b){const g=m.protocol==="wxs"?"wss":"ws";let y=g+"://"+m.hostname+m.path;return m.port&&m.port!==80&&m.port!==443&&(y=g+"://"+m.hostname+":"+m.port+m.path),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,b)),y}(c,p);h=wx.connectSocket({url:d,protocols:[f]}),s=function(){const m=new a;return m._write=function(b,g,y){h.send({data:b.buffer,success:function(){y()},fail:function(_){y(new Error(_))}})},m._flush=function(b){h.close({success:function(){b()}})},m}(),(i=u.obj())._destroy=function(m,b){h.close({success:function(){b&&b(m)}})};const v=i.destroy;return i.destroy=function(){i.destroy=v;const m=this;setTimeout(function(){h.close({fail:function(){m._destroy(new Error)}})},0)}.bind(i),h.onOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onMessage(function(m){let b=m.data;b=b instanceof ArrayBuffer?o.from(b):o.from(b,"utf8"),s.push(b)}),h.onClose(function(){i.end(),i.destroy()}),h.onError(function(m){i.destroy(new Error(m.errMsg))}),i}},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(t,n,l){function o(){if(!(this instanceof o))return new o;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}o.prototype.allocate=function(){const a=this.nextId++;return this.nextId===65536&&(this.nextId=1),a},o.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},o.prototype.register=function(a){return!0},o.prototype.deallocate=function(a){},o.prototype.clear=function(){},n.exports=o},{}],8:[function(t,n,l){const o=t("xtend"),a=t("readable-stream").Readable,u={objectMode:!0},h={clean:!0};function s(i){if(!(this instanceof s))return new s(i);this.options=i||{},this.options=o(h,i),this._inflights=new Map}s.prototype.put=function(i,p){return this._inflights.set(i.messageId,i),p&&p(),this},s.prototype.createStream=function(){const i=new a(u),p=[];let c=!1,f=0;return this._inflights.forEach(function(d,v){p.push(d)}),i._read=function(){!c&&f<p.length?this.push(p[f++]):this.push(null)},i.destroy=function(){if(c)return;const d=this;c=!0,setTimeout(function(){d.emit("close")},0)},i},s.prototype.del=function(i,p){return(i=this._inflights.get(i.messageId))?(this._inflights.delete(i.messageId),p(null,i)):p&&p(new Error("missing packet")),this},s.prototype.get=function(i,p){return(i=this._inflights.get(i.messageId))?p(null,i):p&&p(new Error("missing packet")),this},s.prototype.close=function(i){this.options.clean&&(this._inflights=null),i&&i()},n.exports=s},{"readable-stream":69,xtend:81}],9:[function(t,n,l){function o(a){if(!(this instanceof o))return new o(a);this.aliasToTopic={},this.max=a}o.prototype.put=function(a,u){return!(u===0||u>this.max)&&(this.aliasToTopic[u]=a,this.length=Object.keys(this.aliasToTopic).length,!0)},o.prototype.getTopicByAlias=function(a){return this.aliasToTopic[a]},o.prototype.clear=function(){this.aliasToTopic={}},n.exports=o},{}],10:[function(t,n,l){const o=t("lru-cache"),a=t("number-allocator").NumberAllocator;function u(h){if(!(this instanceof u))return new u(h);h>0&&(this.aliasToTopic=new o({max:h}),this.topicToAlias={},this.numberAllocator=new a(1,h),this.max=h,this.length=0)}u.prototype.put=function(h,s){if(s===0||s>this.max)return!1;const i=this.aliasToTopic.get(s);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(s,h),this.topicToAlias[h]=s,this.numberAllocator.use(s),this.length=this.aliasToTopic.length,!0},u.prototype.getTopicByAlias=function(h){return this.aliasToTopic.get(h)},u.prototype.getAliasByTopic=function(h){const s=this.topicToAlias[h];return s!==void 0&&this.aliasToTopic.get(s),s},u.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},u.prototype.getLruAlias=function(){return this.numberAllocator.firstVacant()||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},n.exports=u},{"lru-cache":37,"number-allocator":46}],11:[function(t,n,l){function o(a){const u=a.split("/");for(let h=0;h<u.length;h++)if(u[h]!=="+"){if(u[h]==="#")return h===u.length-1;if(u[h].indexOf("+")!==-1||u[h].indexOf("#")!==-1)return!1}return!0}n.exports={validateTopics:function(a){if(a.length===0)return"empty_topic_list";for(let u=0;u<a.length;u++)if(!o(a[u]))return a[u];return null}}},{}],12:[function(t,n,l){(function(o){(function(){const a=t("../client"),u=t("../store"),h=t("url"),s=t("xtend"),i=t("debug")("mqttjs"),p={};function c(f,d){if(i("connecting to an MQTT broker..."),typeof f!="object"||d||(d=f,f=null),d=d||{},f){const m=h.parse(f,!0);if(m.port!=null&&(m.port=Number(m.port)),(d=s(m,d)).protocol===null)throw new Error("Missing protocol");d.protocol=d.protocol.replace(/:$/,"")}if(function(m){let b;m.auth&&((b=m.auth.match(/^(.+):(.+)$/))?(m.username=b[1],m.password=b[2]):m.username=m.auth)}(d),d.query&&typeof d.query.clientId=="string"&&(d.clientId=d.query.clientId),d.cert&&d.key){if(!d.protocol)throw new Error("Missing secure protocol key");if(["mqtts","wss","wxs","alis"].indexOf(d.protocol)===-1)switch(d.protocol){case"mqtt":d.protocol="mqtts";break;case"ws":d.protocol="wss";break;case"wx":d.protocol="wxs";break;case"ali":d.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+d.protocol+'"!')}}if(!p[d.protocol]){const m=["mqtts","wss"].indexOf(d.protocol)!==-1;d.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(b,g){return(!m||g%2!=0)&&typeof p[b]=="function"})[0]}if(d.clean===!1&&!d.clientId)throw new Error("Missing clientId for unclean clients");d.protocol&&(d.defaultProtocol=d.protocol);const v=new a(function(m){return d.servers&&(m._reconnectCount&&m._reconnectCount!==d.servers.length||(m._reconnectCount=0),d.host=d.servers[m._reconnectCount].host,d.port=d.servers[m._reconnectCount].port,d.protocol=d.servers[m._reconnectCount].protocol?d.servers[m._reconnectCount].protocol:d.defaultProtocol,d.hostname=d.host,m._reconnectCount++),i("calling streambuilder for",d.protocol),p[d.protocol](m,d)},d);return v.on("error",function(){}),v}o!==void 0&&o.title!=="browser"||typeof __webpack_require__!="function"?(p.mqtt=t("./tcp"),p.tcp=t("./tcp"),p.ssl=t("./tls"),p.tls=t("./tls"),p.mqtts=t("./tls")):(p.wx=t("./wx"),p.wxs=t("./wx"),p.ali=t("./ali"),p.alis=t("./ali")),p.ws=t("./ws"),p.wss=t("./ws"),n.exports=c,n.exports.connect=c,n.exports.MqttClient=a,n.exports.Store=u}).call(this)}).call(this,t("_process"))},{"../client":1,"../store":8,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:50,debug:18,url:76,xtend:81}],13:[function(t,n,l){l.byteLength=function(f){var d=p(f),v=d[0],m=d[1];return 3*(v+m)/4-m},l.toByteArray=function(f){var d,v,m=p(f),b=m[0],g=m[1],y=new u(function(D,F,R){return 3*(F+R)/4-R}(0,b,g)),_=0,T=g>0?b-4:b;for(v=0;v<T;v+=4)d=a[f.charCodeAt(v)]<<18|a[f.charCodeAt(v+1)]<<12|a[f.charCodeAt(v+2)]<<6|a[f.charCodeAt(v+3)],y[_++]=d>>16&255,y[_++]=d>>8&255,y[_++]=255&d;return g===2&&(d=a[f.charCodeAt(v)]<<2|a[f.charCodeAt(v+1)]>>4,y[_++]=255&d),g===1&&(d=a[f.charCodeAt(v)]<<10|a[f.charCodeAt(v+1)]<<4|a[f.charCodeAt(v+2)]>>2,y[_++]=d>>8&255,y[_++]=255&d),y},l.fromByteArray=function(f){for(var d,v=f.length,m=v%3,b=[],g=0,y=v-m;g<y;g+=16383)b.push(c(f,g,g+16383>y?y:g+16383));return m===1?(d=f[v-1],b.push(o[d>>2]+o[d<<4&63]+"==")):m===2&&(d=(f[v-2]<<8)+f[v-1],b.push(o[d>>10]+o[d>>4&63]+o[d<<2&63]+"=")),b.join("")};for(var o=[],a=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=h.length;s<i;++s)o[s]=h[s],a[h.charCodeAt(s)]=s;function p(f){var d=f.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=f.indexOf("=");return v===-1&&(v=d),[v,v===d?0:4-v%4]}function c(f,d,v){for(var m,b,g=[],y=d;y<v;y+=3)m=(f[y]<<16&16711680)+(f[y+1]<<8&65280)+(255&f[y+2]),g.push(o[(b=m)>>18&63]+o[b>>12&63]+o[b>>6&63]+o[63&b]);return g.join("")}a[45]=62,a[95]=63},{}],14:[function(t,n,l){const{Buffer:o}=t("buffer"),a=Symbol.for("BufferList");function u(h){if(!(this instanceof u))return new u(h);u._init.call(this,h)}u._init=function(h){Object.defineProperty(this,a,{value:!0}),this._bufs=[],this.length=0,h&&this.append(h)},u.prototype._new=function(h){return new u(h)},u.prototype._offset=function(h){if(h===0)return[0,0];let s=0;for(let i=0;i<this._bufs.length;i++){const p=s+this._bufs[i].length;if(h<p||i===this._bufs.length-1)return[i,h-s];s=p}},u.prototype._reverseOffset=function(h){const s=h[0];let i=h[1];for(let p=0;p<s;p++)i+=this._bufs[p].length;return i},u.prototype.get=function(h){if(h>this.length||h<0)return;const s=this._offset(h);return this._bufs[s[0]][s[1]]},u.prototype.slice=function(h,s){return typeof h=="number"&&h<0&&(h+=this.length),typeof s=="number"&&s<0&&(s+=this.length),this.copy(null,0,h,s)},u.prototype.copy=function(h,s,i,p){if((typeof i!="number"||i<0)&&(i=0),(typeof p!="number"||p>this.length)&&(p=this.length),i>=this.length||p<=0)return h||o.alloc(0);const c=!!h,f=this._offset(i),d=p-i;let v=d,m=c&&s||0,b=f[1];if(i===0&&p===this.length){if(!c)return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length);for(let g=0;g<this._bufs.length;g++)this._bufs[g].copy(h,m),m+=this._bufs[g].length;return h}if(v<=this._bufs[f[0]].length-b)return c?this._bufs[f[0]].copy(h,s,b,b+v):this._bufs[f[0]].slice(b,b+v);c||(h=o.allocUnsafe(d));for(let g=f[0];g<this._bufs.length;g++){const y=this._bufs[g].length-b;if(!(v>y)){this._bufs[g].copy(h,m,b,b+v),m+=y;break}this._bufs[g].copy(h,m,b),m+=y,v-=y,b&&(b=0)}return h.length>m?h.slice(0,m):h},u.prototype.shallowSlice=function(h,s){if(h=h||0,s=typeof s!="number"?this.length:s,h<0&&(h+=this.length),s<0&&(s+=this.length),h===s)return this._new();const i=this._offset(h),p=this._offset(s),c=this._bufs.slice(i[0],p[0]+1);return p[1]===0?c.pop():c[c.length-1]=c[c.length-1].slice(0,p[1]),i[1]!==0&&(c[0]=c[0].slice(i[1])),this._new(c)},u.prototype.toString=function(h,s,i){return this.slice(s,i).toString(h)},u.prototype.consume=function(h){if(h=Math.trunc(h),Number.isNaN(h)||h<=0)return this;for(;this._bufs.length;){if(!(h>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(h),this.length-=h;break}h-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},u.prototype.duplicate=function(){const h=this._new();for(let s=0;s<this._bufs.length;s++)h.append(this._bufs[s]);return h},u.prototype.append=function(h){if(h==null)return this;if(h.buffer)this._appendBuffer(o.from(h.buffer,h.byteOffset,h.byteLength));else if(Array.isArray(h))for(let s=0;s<h.length;s++)this.append(h[s]);else if(this._isBufferList(h))for(let s=0;s<h._bufs.length;s++)this.append(h._bufs[s]);else typeof h=="number"&&(h=h.toString()),this._appendBuffer(o.from(h));return this},u.prototype._appendBuffer=function(h){this._bufs.push(h),this.length+=h.length},u.prototype.indexOf=function(h,s,i){if(i===void 0&&typeof s=="string"&&(i=s,s=void 0),typeof h=="function"||Array.isArray(h))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof h=="number"?h=o.from([h]):typeof h=="string"?h=o.from(h,i):this._isBufferList(h)?h=h.slice():Array.isArray(h.buffer)?h=o.from(h.buffer,h.byteOffset,h.byteLength):o.isBuffer(h)||(h=o.from(h)),s=Number(s||0),isNaN(s)&&(s=0),s<0&&(s=this.length+s),s<0&&(s=0),h.length===0)return s>this.length?this.length:s;const p=this._offset(s);let c=p[0],f=p[1];for(;c<this._bufs.length;c++){const d=this._bufs[c];for(;f<d.length;)if(d.length-f>=h.length){const v=d.indexOf(h,f);if(v!==-1)return this._reverseOffset([c,v]);f=d.length-h.length+1}else{const v=this._reverseOffset([c,f]);if(this._match(v,h))return v;f++}f=0}return-1},u.prototype._match=function(h,s){if(this.length-h<s.length)return!1;for(let i=0;i<s.length;i++)if(this.get(h+i)!==s[i])return!1;return!0},function(){const h={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const s in h)(function(i){u.prototype[i]=h[i]===null?function(p,c){return this.slice(p,p+c)[i](0,c)}:function(p=0){return this.slice(p,p+h[i])[i](0)}})(s)}(),u.prototype._isBufferList=function(h){return h instanceof u||u.isBufferList(h)},u.isBufferList=function(h){return h!=null&&h[a]},n.exports=u},{buffer:17}],15:[function(t,n,l){const o=t("readable-stream").Duplex,a=t("inherits"),u=t("./BufferList");function h(s){if(!(this instanceof h))return new h(s);if(typeof s=="function"){this._callback=s;const i=function(p){this._callback&&(this._callback(p),this._callback=null)}.bind(this);this.on("pipe",function(p){p.on("error",i)}),this.on("unpipe",function(p){p.removeListener("error",i)}),s=null}u._init.call(this,s),o.call(this)}a(h,o),Object.assign(h.prototype,u.prototype),h.prototype._new=function(s){return new h(s)},h.prototype._write=function(s,i,p){this._appendBuffer(s),typeof p=="function"&&p()},h.prototype._read=function(s){if(!this.length)return this.push(null);s=Math.min(s,this.length),this.push(this.slice(0,s)),this.consume(s)},h.prototype.end=function(s){o.prototype.end.call(this,s),this._callback&&(this._callback(null,this.slice()),this._callback=null)},h.prototype._destroy=function(s,i){this._bufs.length=0,this.length=0,i(s)},h.prototype._isBufferList=function(s){return s instanceof h||s instanceof u||h.isBufferList(s)},h.isBufferList=u.isBufferList,n.exports=h,n.exports.BufferListStream=h,n.exports.BufferList=u},{"./BufferList":14,inherits:24,"readable-stream":69}],16:[function(t,n,l){},{}],17:[function(t,n,l){(function(o){(function(){var a=t("base64-js"),u=t("ieee754");l.Buffer=i,l.SlowBuffer=function(x){return+x!=x&&(x=0),i.alloc(+x)},l.INSPECT_MAX_BYTES=50;var h=2147483647;function s(x){if(x>h)throw new RangeError('The value "'+x+'" is invalid for option "size"');var w=new Uint8Array(x);return w.__proto__=i.prototype,w}function i(x,w,k){if(typeof x=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(x)}return p(x,w,k)}function p(x,w,k){if(typeof x=="string")return function(ee,re){if(typeof re=="string"&&re!==""||(re="utf8"),!i.isEncoding(re))throw new TypeError("Unknown encoding: "+re);var M=0|m(ee,re),C=s(M),B=C.write(ee,re);return B!==M&&(C=C.slice(0,B)),C}(x,w);if(ArrayBuffer.isView(x))return d(x);if(x==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(ie(x,ArrayBuffer)||x&&ie(x.buffer,ArrayBuffer))return function(ee,re,M){if(re<0||ee.byteLength<re)throw new RangeError('"offset" is outside of buffer bounds');if(ee.byteLength<re+(M||0))throw new RangeError('"length" is outside of buffer bounds');var C;return C=re===void 0&&M===void 0?new Uint8Array(ee):M===void 0?new Uint8Array(ee,re):new Uint8Array(ee,re,M),C.__proto__=i.prototype,C}(x,w,k);if(typeof x=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var j=x.valueOf&&x.valueOf();if(j!=null&&j!==x)return i.from(j,w,k);var Z=function(ee){if(i.isBuffer(ee)){var re=0|v(ee.length),M=s(re);return M.length===0||ee.copy(M,0,0,re),M}if(ee.length!==void 0)return typeof ee.length!="number"||ae(ee.length)?s(0):d(ee);if(ee.type==="Buffer"&&Array.isArray(ee.data))return d(ee.data)}(x);if(Z)return Z;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return i.from(x[Symbol.toPrimitive]("string"),w,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}function c(x){if(typeof x!="number")throw new TypeError('"size" argument must be of type number');if(x<0)throw new RangeError('The value "'+x+'" is invalid for option "size"')}function f(x){return c(x),s(x<0?0:0|v(x))}function d(x){for(var w=x.length<0?0:0|v(x.length),k=s(w),j=0;j<w;j+=1)k[j]=255&x[j];return k}function v(x){if(x>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|x}function m(x,w){if(i.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||ie(x,ArrayBuffer))return x.byteLength;if(typeof x!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof x);var k=x.length,j=arguments.length>2&&arguments[2]===!0;if(!j&&k===0)return 0;for(var Z=!1;;)switch(w){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return P(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*k;case"hex":return k>>>1;case"base64":return J(x).length;default:if(Z)return j?-1:P(x).length;w=(""+w).toLowerCase(),Z=!0}}function b(x,w,k){var j=x[w];x[w]=x[k],x[k]=j}function g(x,w,k,j,Z){if(x.length===0)return-1;if(typeof k=="string"?(j=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),ae(k=+k)&&(k=Z?0:x.length-1),k<0&&(k=x.length+k),k>=x.length){if(Z)return-1;k=x.length-1}else if(k<0){if(!Z)return-1;k=0}if(typeof w=="string"&&(w=i.from(w,j)),i.isBuffer(w))return w.length===0?-1:y(x,w,k,j,Z);if(typeof w=="number")return w&=255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(x,w,k):Uint8Array.prototype.lastIndexOf.call(x,w,k):y(x,[w],k,j,Z);throw new TypeError("val must be string, number or Buffer")}function y(x,w,k,j,Z){var ee,re=1,M=x.length,C=w.length;if(j!==void 0&&((j=String(j).toLowerCase())==="ucs2"||j==="ucs-2"||j==="utf16le"||j==="utf-16le")){if(x.length<2||w.length<2)return-1;re=2,M/=2,C/=2,k/=2}function B(ce,me){return re===1?ce[me]:ce.readUInt16BE(me*re)}if(Z){var K=-1;for(ee=k;ee<M;ee++)if(B(x,ee)===B(w,K===-1?0:ee-K)){if(K===-1&&(K=ee),ee-K+1===C)return K*re}else K!==-1&&(ee-=ee-K),K=-1}else for(k+C>M&&(k=M-C),ee=k;ee>=0;ee--){for(var oe=!0,ue=0;ue<C;ue++)if(B(x,ee+ue)!==B(w,ue)){oe=!1;break}if(oe)return ee}return-1}function _(x,w,k,j){k=Number(k)||0;var Z=x.length-k;j?(j=Number(j))>Z&&(j=Z):j=Z;var ee=w.length;j>ee/2&&(j=ee/2);for(var re=0;re<j;++re){var M=parseInt(w.substr(2*re,2),16);if(ae(M))return re;x[k+re]=M}return re}function T(x,w,k,j){return ne(P(w,x.length-k),x,k,j)}function D(x,w,k,j){return ne(function(Z){for(var ee=[],re=0;re<Z.length;++re)ee.push(255&Z.charCodeAt(re));return ee}(w),x,k,j)}function F(x,w,k,j){return D(x,w,k,j)}function R(x,w,k,j){return ne(J(w),x,k,j)}function X(x,w,k,j){return ne(function(Z,ee){for(var re,M,C,B=[],K=0;K<Z.length&&!((ee-=2)<0);++K)re=Z.charCodeAt(K),M=re>>8,C=re%256,B.push(C),B.push(M);return B}(w,x.length-k),x,k,j)}function H(x,w,k){return w===0&&k===x.length?a.fromByteArray(x):a.fromByteArray(x.slice(w,k))}function E(x,w,k){k=Math.min(x.length,k);for(var j=[],Z=w;Z<k;){var ee,re,M,C,B=x[Z],K=null,oe=B>239?4:B>223?3:B>191?2:1;if(Z+oe<=k)switch(oe){case 1:B<128&&(K=B);break;case 2:(192&(ee=x[Z+1]))==128&&(C=(31&B)<<6|63&ee)>127&&(K=C);break;case 3:ee=x[Z+1],re=x[Z+2],(192&ee)==128&&(192&re)==128&&(C=(15&B)<<12|(63&ee)<<6|63&re)>2047&&(C<55296||C>57343)&&(K=C);break;case 4:ee=x[Z+1],re=x[Z+2],M=x[Z+3],(192&ee)==128&&(192&re)==128&&(192&M)==128&&(C=(15&B)<<18|(63&ee)<<12|(63&re)<<6|63&M)>65535&&C<1114112&&(K=C)}K===null?(K=65533,oe=1):K>65535&&(K-=65536,j.push(K>>>10&1023|55296),K=56320|1023&K),j.push(K),Z+=oe}return function(ue){var ce=ue.length;if(ce<=A)return String.fromCharCode.apply(String,ue);for(var me="",xe=0;xe<ce;)me+=String.fromCharCode.apply(String,ue.slice(xe,xe+=A));return me}(j)}l.kMaxLength=h,i.TYPED_ARRAY_SUPPORT=function(){try{var x=new Uint8Array(1);return x.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},x.foo()===42}catch(w){return!1}}(),i.TYPED_ARRAY_SUPPORT||typeof console=="undefined"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),typeof Symbol!="undefined"&&Symbol.species!=null&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(x,w,k){return p(x,w,k)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(x,w,k){return function(j,Z,ee){return c(j),j<=0?s(j):Z!==void 0?typeof ee=="string"?s(j).fill(Z,ee):s(j).fill(Z):s(j)}(x,w,k)},i.allocUnsafe=function(x){return f(x)},i.allocUnsafeSlow=function(x){return f(x)},i.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==i.prototype},i.compare=function(x,w){if(ie(x,Uint8Array)&&(x=i.from(x,x.offset,x.byteLength)),ie(w,Uint8Array)&&(w=i.from(w,w.offset,w.byteLength)),!i.isBuffer(x)||!i.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===w)return 0;for(var k=x.length,j=w.length,Z=0,ee=Math.min(k,j);Z<ee;++Z)if(x[Z]!==w[Z]){k=x[Z],j=w[Z];break}return k<j?-1:j<k?1:0},i.isEncoding=function(x){switch(String(x).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}},i.concat=function(x,w){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return i.alloc(0);var k;if(w===void 0)for(w=0,k=0;k<x.length;++k)w+=x[k].length;var j=i.allocUnsafe(w),Z=0;for(k=0;k<x.length;++k){var ee=x[k];if(ie(ee,Uint8Array)&&(ee=i.from(ee)),!i.isBuffer(ee))throw new TypeError('"list" argument must be an Array of Buffers');ee.copy(j,Z),Z+=ee.length}return j},i.byteLength=m,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var x=this.length;if(x%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var w=0;w<x;w+=2)b(this,w,w+1);return this},i.prototype.swap32=function(){var x=this.length;if(x%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var w=0;w<x;w+=4)b(this,w,w+3),b(this,w+1,w+2);return this},i.prototype.swap64=function(){var x=this.length;if(x%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var w=0;w<x;w+=8)b(this,w,w+7),b(this,w+1,w+6),b(this,w+2,w+5),b(this,w+3,w+4);return this},i.prototype.toString=function(){var x=this.length;return x===0?"":arguments.length===0?E(this,0,x):function(w,k,j){var Z=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0)<=(k>>>=0))return"";for(w||(w="utf8");;)switch(w){case"hex":return z(this,k,j);case"utf8":case"utf-8":return E(this,k,j);case"ascii":return S(this,k,j);case"latin1":case"binary":return I(this,k,j);case"base64":return H(this,k,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,k,j);default:if(Z)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),Z=!0}}.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(x){if(!i.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x||i.compare(this,x)===0},i.prototype.inspect=function(){var x="",w=l.INSPECT_MAX_BYTES;return x=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(x+=" ... "),"<Buffer "+x+">"},i.prototype.compare=function(x,w,k,j,Z){if(ie(x,Uint8Array)&&(x=i.from(x,x.offset,x.byteLength)),!i.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(w===void 0&&(w=0),k===void 0&&(k=x?x.length:0),j===void 0&&(j=0),Z===void 0&&(Z=this.length),w<0||k>x.length||j<0||Z>this.length)throw new RangeError("out of range index");if(j>=Z&&w>=k)return 0;if(j>=Z)return-1;if(w>=k)return 1;if(w>>>=0,k>>>=0,j>>>=0,Z>>>=0,this===x)return 0;for(var ee=Z-j,re=k-w,M=Math.min(ee,re),C=this.slice(j,Z),B=x.slice(w,k),K=0;K<M;++K)if(C[K]!==B[K]){ee=C[K],re=B[K];break}return ee<re?-1:re<ee?1:0},i.prototype.includes=function(x,w,k){return this.indexOf(x,w,k)!==-1},i.prototype.indexOf=function(x,w,k){return g(this,x,w,k,!0)},i.prototype.lastIndexOf=function(x,w,k){return g(this,x,w,k,!1)},i.prototype.write=function(x,w,k,j){if(w===void 0)j="utf8",k=this.length,w=0;else if(k===void 0&&typeof w=="string")j=w,k=this.length,w=0;else{if(!isFinite(w))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");w>>>=0,isFinite(k)?(k>>>=0,j===void 0&&(j="utf8")):(j=k,k=void 0)}var Z=this.length-w;if((k===void 0||k>Z)&&(k=Z),x.length>0&&(k<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");j||(j="utf8");for(var ee=!1;;)switch(j){case"hex":return _(this,x,w,k);case"utf8":case"utf-8":return T(this,x,w,k);case"ascii":return D(this,x,w,k);case"latin1":case"binary":return F(this,x,w,k);case"base64":return R(this,x,w,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,x,w,k);default:if(ee)throw new TypeError("Unknown encoding: "+j);j=(""+j).toLowerCase(),ee=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function S(x,w,k){var j="";k=Math.min(x.length,k);for(var Z=w;Z<k;++Z)j+=String.fromCharCode(127&x[Z]);return j}function I(x,w,k){var j="";k=Math.min(x.length,k);for(var Z=w;Z<k;++Z)j+=String.fromCharCode(x[Z]);return j}function z(x,w,k){var j=x.length;(!w||w<0)&&(w=0),(!k||k<0||k>j)&&(k=j);for(var Z="",ee=w;ee<k;++ee)Z+=Y(x[ee]);return Z}function V(x,w,k){for(var j=x.slice(w,k),Z="",ee=0;ee<j.length;ee+=2)Z+=String.fromCharCode(j[ee]+256*j[ee+1]);return Z}function te(x,w,k){if(x%1!=0||x<0)throw new RangeError("offset is not uint");if(x+w>k)throw new RangeError("Trying to access beyond buffer length")}function W(x,w,k,j,Z,ee){if(!i.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>Z||w<ee)throw new RangeError('"value" argument is out of bounds');if(k+j>x.length)throw new RangeError("Index out of range")}function q(x,w,k,j,Z,ee){if(k+j>x.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function G(x,w,k,j,Z){return w=+w,k>>>=0,Z||q(x,0,k,4),u.write(x,w,k,j,23,4),k+4}function U(x,w,k,j,Z){return w=+w,k>>>=0,Z||q(x,0,k,8),u.write(x,w,k,j,52,8),k+8}i.prototype.slice=function(x,w){var k=this.length;x=~~x,w=w===void 0?k:~~w,x<0?(x+=k)<0&&(x=0):x>k&&(x=k),w<0?(w+=k)<0&&(w=0):w>k&&(w=k),w<x&&(w=x);var j=this.subarray(x,w);return j.__proto__=i.prototype,j},i.prototype.readUIntLE=function(x,w,k){x>>>=0,w>>>=0,k||te(x,w,this.length);for(var j=this[x],Z=1,ee=0;++ee<w&&(Z*=256);)j+=this[x+ee]*Z;return j},i.prototype.readUIntBE=function(x,w,k){x>>>=0,w>>>=0,k||te(x,w,this.length);for(var j=this[x+--w],Z=1;w>0&&(Z*=256);)j+=this[x+--w]*Z;return j},i.prototype.readUInt8=function(x,w){return x>>>=0,w||te(x,1,this.length),this[x]},i.prototype.readUInt16LE=function(x,w){return x>>>=0,w||te(x,2,this.length),this[x]|this[x+1]<<8},i.prototype.readUInt16BE=function(x,w){return x>>>=0,w||te(x,2,this.length),this[x]<<8|this[x+1]},i.prototype.readUInt32LE=function(x,w){return x>>>=0,w||te(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+16777216*this[x+3]},i.prototype.readUInt32BE=function(x,w){return x>>>=0,w||te(x,4,this.length),16777216*this[x]+(this[x+1]<<16|this[x+2]<<8|this[x+3])},i.prototype.readIntLE=function(x,w,k){x>>>=0,w>>>=0,k||te(x,w,this.length);for(var j=this[x],Z=1,ee=0;++ee<w&&(Z*=256);)j+=this[x+ee]*Z;return j>=(Z*=128)&&(j-=Math.pow(2,8*w)),j},i.prototype.readIntBE=function(x,w,k){x>>>=0,w>>>=0,k||te(x,w,this.length);for(var j=w,Z=1,ee=this[x+--j];j>0&&(Z*=256);)ee+=this[x+--j]*Z;return ee>=(Z*=128)&&(ee-=Math.pow(2,8*w)),ee},i.prototype.readInt8=function(x,w){return x>>>=0,w||te(x,1,this.length),128&this[x]?-1*(255-this[x]+1):this[x]},i.prototype.readInt16LE=function(x,w){x>>>=0,w||te(x,2,this.length);var k=this[x]|this[x+1]<<8;return 32768&k?4294901760|k:k},i.prototype.readInt16BE=function(x,w){x>>>=0,w||te(x,2,this.length);var k=this[x+1]|this[x]<<8;return 32768&k?4294901760|k:k},i.prototype.readInt32LE=function(x,w){return x>>>=0,w||te(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},i.prototype.readInt32BE=function(x,w){return x>>>=0,w||te(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},i.prototype.readFloatLE=function(x,w){return x>>>=0,w||te(x,4,this.length),u.read(this,x,!0,23,4)},i.prototype.readFloatBE=function(x,w){return x>>>=0,w||te(x,4,this.length),u.read(this,x,!1,23,4)},i.prototype.readDoubleLE=function(x,w){return x>>>=0,w||te(x,8,this.length),u.read(this,x,!0,52,8)},i.prototype.readDoubleBE=function(x,w){return x>>>=0,w||te(x,8,this.length),u.read(this,x,!1,52,8)},i.prototype.writeUIntLE=function(x,w,k,j){x=+x,w>>>=0,k>>>=0,j||W(this,x,w,k,Math.pow(2,8*k)-1,0);var Z=1,ee=0;for(this[w]=255&x;++ee<k&&(Z*=256);)this[w+ee]=x/Z&255;return w+k},i.prototype.writeUIntBE=function(x,w,k,j){x=+x,w>>>=0,k>>>=0,j||W(this,x,w,k,Math.pow(2,8*k)-1,0);var Z=k-1,ee=1;for(this[w+Z]=255&x;--Z>=0&&(ee*=256);)this[w+Z]=x/ee&255;return w+k},i.prototype.writeUInt8=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,1,255,0),this[w]=255&x,w+1},i.prototype.writeUInt16LE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,2,65535,0),this[w]=255&x,this[w+1]=x>>>8,w+2},i.prototype.writeUInt16BE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,2,65535,0),this[w]=x>>>8,this[w+1]=255&x,w+2},i.prototype.writeUInt32LE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,4,4294967295,0),this[w+3]=x>>>24,this[w+2]=x>>>16,this[w+1]=x>>>8,this[w]=255&x,w+4},i.prototype.writeUInt32BE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,4,4294967295,0),this[w]=x>>>24,this[w+1]=x>>>16,this[w+2]=x>>>8,this[w+3]=255&x,w+4},i.prototype.writeIntLE=function(x,w,k,j){if(x=+x,w>>>=0,!j){var Z=Math.pow(2,8*k-1);W(this,x,w,k,Z-1,-Z)}var ee=0,re=1,M=0;for(this[w]=255&x;++ee<k&&(re*=256);)x<0&&M===0&&this[w+ee-1]!==0&&(M=1),this[w+ee]=(x/re>>0)-M&255;return w+k},i.prototype.writeIntBE=function(x,w,k,j){if(x=+x,w>>>=0,!j){var Z=Math.pow(2,8*k-1);W(this,x,w,k,Z-1,-Z)}var ee=k-1,re=1,M=0;for(this[w+ee]=255&x;--ee>=0&&(re*=256);)x<0&&M===0&&this[w+ee+1]!==0&&(M=1),this[w+ee]=(x/re>>0)-M&255;return w+k},i.prototype.writeInt8=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,1,127,-128),x<0&&(x=255+x+1),this[w]=255&x,w+1},i.prototype.writeInt16LE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,2,32767,-32768),this[w]=255&x,this[w+1]=x>>>8,w+2},i.prototype.writeInt16BE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,2,32767,-32768),this[w]=x>>>8,this[w+1]=255&x,w+2},i.prototype.writeInt32LE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,4,2147483647,-2147483648),this[w]=255&x,this[w+1]=x>>>8,this[w+2]=x>>>16,this[w+3]=x>>>24,w+4},i.prototype.writeInt32BE=function(x,w,k){return x=+x,w>>>=0,k||W(this,x,w,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[w]=x>>>24,this[w+1]=x>>>16,this[w+2]=x>>>8,this[w+3]=255&x,w+4},i.prototype.writeFloatLE=function(x,w,k){return G(this,x,w,!0,k)},i.prototype.writeFloatBE=function(x,w,k){return G(this,x,w,!1,k)},i.prototype.writeDoubleLE=function(x,w,k){return U(this,x,w,!0,k)},i.prototype.writeDoubleBE=function(x,w,k){return U(this,x,w,!1,k)},i.prototype.copy=function(x,w,k,j){if(!i.isBuffer(x))throw new TypeError("argument should be a Buffer");if(k||(k=0),j||j===0||(j=this.length),w>=x.length&&(w=x.length),w||(w=0),j>0&&j<k&&(j=k),j===k||x.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=this.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("sourceEnd out of bounds");j>this.length&&(j=this.length),x.length-w<j-k&&(j=x.length-w+k);var Z=j-k;if(this===x&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(w,k,j);else if(this===x&&k<w&&w<j)for(var ee=Z-1;ee>=0;--ee)x[ee+w]=this[ee+k];else Uint8Array.prototype.set.call(x,this.subarray(k,j),w);return Z},i.prototype.fill=function(x,w,k,j){if(typeof x=="string"){if(typeof w=="string"?(j=w,w=0,k=this.length):typeof k=="string"&&(j=k,k=this.length),j!==void 0&&typeof j!="string")throw new TypeError("encoding must be a string");if(typeof j=="string"&&!i.isEncoding(j))throw new TypeError("Unknown encoding: "+j);if(x.length===1){var Z=x.charCodeAt(0);(j==="utf8"&&Z<128||j==="latin1")&&(x=Z)}}else typeof x=="number"&&(x&=255);if(w<0||this.length<w||this.length<k)throw new RangeError("Out of range index");if(k<=w)return this;var ee;if(w>>>=0,k=k===void 0?this.length:k>>>0,x||(x=0),typeof x=="number")for(ee=w;ee<k;++ee)this[ee]=x;else{var re=i.isBuffer(x)?x:i.from(x,j),M=re.length;if(M===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(ee=0;ee<k-w;++ee)this[ee+w]=re[ee%M]}return this};var L=/[^+/0-9A-Za-z-_]/g;function Y(x){return x<16?"0"+x.toString(16):x.toString(16)}function P(x,w){var k;w=w||1/0;for(var j=x.length,Z=null,ee=[],re=0;re<j;++re){if((k=x.charCodeAt(re))>55295&&k<57344){if(!Z){if(k>56319){(w-=3)>-1&&ee.push(239,191,189);continue}if(re+1===j){(w-=3)>-1&&ee.push(239,191,189);continue}Z=k;continue}if(k<56320){(w-=3)>-1&&ee.push(239,191,189),Z=k;continue}k=65536+(Z-55296<<10|k-56320)}else Z&&(w-=3)>-1&&ee.push(239,191,189);if(Z=null,k<128){if((w-=1)<0)break;ee.push(k)}else if(k<2048){if((w-=2)<0)break;ee.push(k>>6|192,63&k|128)}else if(k<65536){if((w-=3)<0)break;ee.push(k>>12|224,k>>6&63|128,63&k|128)}else{if(!(k<1114112))throw new Error("Invalid code point");if((w-=4)<0)break;ee.push(k>>18|240,k>>12&63|128,k>>6&63|128,63&k|128)}}return ee}function J(x){return a.toByteArray(function(w){if((w=(w=w.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;w.length%4!=0;)w+="=";return w}(x))}function ne(x,w,k,j){for(var Z=0;Z<j&&!(Z+k>=w.length||Z>=x.length);++Z)w[Z+k]=x[Z];return Z}function ie(x,w){return x instanceof w||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===w.name}function ae(x){return x!=x}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(t,n,l){(function(o){(function(){l.formatArgs=function(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const h="color: "+this.color;u.splice(1,0,h,"color: inherit");let s=0,i=0;u[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&p==="%c"&&(i=++s)}),u.splice(i,0,h)},l.save=function(u){try{u?l.storage.setItem("debug",u):l.storage.removeItem("debug")}catch(h){}},l.load=function(){let u;try{u=l.storage.getItem("debug")}catch(h){}return!u&&o!==void 0&&"env"in o&&(u=o.env.DEBUG),u},l.useColors=function(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},l.storage=function(){try{return localStorage}catch(u){}}(),l.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),l.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],l.log=console.debug||console.log||(()=>{}),n.exports=t("./common")(l);const{formatters:a}=n.exports;a.j=function(u){try{return JSON.stringify(u)}catch(h){return"[UnexpectedJSONParseError]: "+h.message}}}).call(this)}).call(this,t("_process"))},{"./common":19,_process:50}],19:[function(t,n,l){n.exports=function(o){function a(s){let i,p,c,f=null;function d(...v){if(!d.enabled)return;const m=d,b=Number(new Date),g=b-(i||b);m.diff=g,m.prev=i,m.curr=b,i=b,v[0]=a.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let y=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(_,T)=>{if(_==="%%")return"%";y++;const D=a.formatters[T];if(typeof D=="function"){const F=v[y];_=D.call(m,F),v.splice(y,1),y--}return _}),a.formatArgs.call(m,v),(m.log||a.log).apply(m,v)}return d.namespace=s,d.useColors=a.useColors(),d.color=a.selectColor(s),d.extend=u,d.destroy=a.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==a.namespaces&&(p=a.namespaces,c=a.enabled(s)),c),set:v=>{f=v}}),typeof a.init=="function"&&a.init(d),d}function u(s,i){const p=a(this.namespace+(i===void 0?":":i)+s);return p.log=this.log,p}function h(s){return s.toString().substring(2,s.toString().length-2).replace(/\.\*\?$/,"*")}return a.debug=a,a.default=a,a.coerce=function(s){return s instanceof Error?s.stack||s.message:s},a.disable=function(){const s=[...a.names.map(h),...a.skips.map(h).map(i=>"-"+i)].join(",");return a.enable(""),s},a.enable=function(s){let i;a.save(s),a.namespaces=s,a.names=[],a.skips=[];const p=(typeof s=="string"?s:"").split(/[\s,]+/),c=p.length;for(i=0;i<c;i++)p[i]&&((s=p[i].replace(/\*/g,".*?"))[0]==="-"?a.skips.push(new RegExp("^"+s.substr(1)+"$")):a.names.push(new RegExp("^"+s+"$")))},a.enabled=function(s){if(s[s.length-1]==="*")return!0;let i,p;for(i=0,p=a.skips.length;i<p;i++)if(a.skips[i].test(s))return!1;for(i=0,p=a.names.length;i<p;i++)if(a.names[i].test(s))return!0;return!1},a.humanize=t("ms"),a.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(o).forEach(s=>{a[s]=o[s]}),a.names=[],a.skips=[],a.formatters={},a.selectColor=function(s){let i=0;for(let p=0;p<s.length;p++)i=(i<<5)-i+s.charCodeAt(p),i|=0;return a.colors[Math.abs(i)%a.colors.length]},a.enable(a.load()),a}},{ms:45}],20:[function(t,n,l){(function(o,a){(function(){var u=t("readable-stream"),h=t("end-of-stream"),s=t("inherits"),i=t("stream-shift"),p=a.from&&a.from!==Uint8Array.from?a.from([0]):new a([0]),c=function(m,b){m._corked?m.once("uncork",b):b()},f=function(m,b){return function(g){g?function(y,_){y._autoDestroy&&y.destroy(_)}(m,g.message==="premature close"?null:g):b&&!m._ended&&m.end()}},d=function(){},v=function(m,b,g){if(!(this instanceof v))return new v(m,b,g);u.Duplex.call(this,g),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!g||g.autoDestroy!==!1,this._forwardDestroy=!g||g.destroy!==!1,this._forwardEnd=!g||g.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,m&&this.setWritable(m),b&&this.setReadable(b)};s(v,u.Duplex),v.obj=function(m,b,g){return g||(g={}),g.objectMode=!0,g.highWaterMark=16,new v(m,b,g)},v.prototype.cork=function(){++this._corked==1&&this.emit("cork")},v.prototype.uncork=function(){this._corked&&--this._corked==0&&this.emit("uncork")},v.prototype.setWritable=function(m){if(this._unwrite&&this._unwrite(),this.destroyed)m&&m.destroy&&m.destroy();else if(m!==null&&m!==!1){var b=this,g=h(m,{writable:!0,readable:!1},f(this,this._forwardEnd)),y=function(){var _=b._ondrain;b._ondrain=null,_&&_()};this._unwrite&&o.nextTick(y),this._writable=m,this._writable.on("drain",y),this._unwrite=function(){b._writable.removeListener("drain",y),g()},this.uncork()}else this.end()},v.prototype.setReadable=function(m){if(this._unread&&this._unread(),this.destroyed)m&&m.destroy&&m.destroy();else{if(m===null||m===!1)return this.push(null),void this.resume();var b,g=this,y=h(m,{writable:!1,readable:!0},f(this)),_=function(){g._forward()},T=function(){g.push(null)};this._drained=!0,this._readable=m,this._readable2=m._readableState?m:(b=m,new u.Readable({objectMode:!0,highWaterMark:16}).wrap(b)),this._readable2.on("readable",_),this._readable2.on("end",T),this._unread=function(){g._readable2.removeListener("readable",_),g._readable2.removeListener("end",T),y()},this._forward()}},v.prototype._read=function(){this._drained=!0,this._forward()},v.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var m;for(this._forwarding=!0;this._drained&&(m=i(this._readable2))!==null;)this.destroyed||(this._drained=this.push(m));this._forwarding=!1}},v.prototype.destroy=function(m,b){if(b||(b=d),this.destroyed)return b(null);this.destroyed=!0;var g=this;o.nextTick(function(){g._destroy(m),b(null)})},v.prototype._destroy=function(m){if(m){var b=this._ondrain;this._ondrain=null,b?b(m):this.emit("error",m)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},v.prototype._write=function(m,b,g){if(!this.destroyed)return this._corked?c(this,this._write.bind(this,m,b,g)):m===p?this._finish(g):this._writable?void(this._writable.write(m)===!1?this._ondrain=g:this.destroyed||g()):g()},v.prototype._finish=function(m){var b=this;this.emit("preend"),c(this,function(){var g,y;g=b._forwardEnd&&b._writable,y=function(){b._writableState.prefinished===!1&&(b._writableState.prefinished=!0),b.emit("prefinish"),c(b,m)},g?g._writableState&&g._writableState.finished?y():g._writableState?g.end(y):(g.end(),y()):y()})},v.prototype.end=function(m,b,g){return typeof m=="function"?this.end(null,null,m):typeof b=="function"?this.end(m,null,b):(this._ended=!0,m&&this.write(m),this._writableState.ending||this._writableState.destroyed||this.write(p),u.Writable.prototype.end.call(this,g))},n.exports=v}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(t,n,l){(function(o){(function(){var a=t("once"),u=function(){},h=function(s,i,p){if(typeof i=="function")return h(s,null,i);i||(i={}),p=a(p||u);var c=s._writableState,f=s._readableState,d=i.readable||i.readable!==!1&&s.readable,v=i.writable||i.writable!==!1&&s.writable,m=!1,b=function(){s.writable||g()},g=function(){v=!1,d||p.call(s)},y=function(){d=!1,v||p.call(s)},_=function(X){p.call(s,X?new Error("exited with error code: "+X):null)},T=function(X){p.call(s,X)},D=function(){o.nextTick(F)},F=function(){if(!m)return(!d||f&&f.ended&&!f.destroyed)&&(!v||c&&c.ended&&!c.destroyed)?void 0:p.call(s,new Error("premature close"))},R=function(){s.req.on("finish",g)};return function(X){return X.setHeader&&typeof X.abort=="function"}(s)?(s.on("complete",g),s.on("abort",D),s.req?R():s.on("request",R)):v&&!c&&(s.on("end",b),s.on("close",b)),function(X){return X.stdio&&Array.isArray(X.stdio)&&X.stdio.length===3}(s)&&s.on("exit",_),s.on("end",y),s.on("finish",g),i.error!==!1&&s.on("error",T),s.on("close",D),function(){m=!0,s.removeListener("complete",g),s.removeListener("abort",D),s.removeListener("request",R),s.req&&s.req.removeListener("finish",g),s.removeListener("end",b),s.removeListener("close",b),s.removeListener("finish",g),s.removeListener("exit",_),s.removeListener("end",y),s.removeListener("error",T),s.removeListener("close",D)}};n.exports=h}).call(this)}).call(this,t("_process"))},{_process:50,once:48}],22:[function(t,n,l){var o=Object.create||function(y){var _=function(){};return _.prototype=y,new _},a=Object.keys||function(y){var _=[];for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&_.push(T);return T},u=Function.prototype.bind||function(y){var _=this;return function(){return _.apply(y,arguments)}};function h(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=o(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}n.exports=h,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._maxListeners=void 0;var s,i=10;try{var p={};Object.defineProperty&&Object.defineProperty(p,"x",{value:0}),s=p.x===0}catch(y){s=!1}function c(y){return y._maxListeners===void 0?h.defaultMaxListeners:y._maxListeners}function f(y,_,T,D){var F,R,X;if(typeof T!="function")throw new TypeError('"listener" argument must be a function');if((R=y._events)?(R.newListener&&(y.emit("newListener",_,T.listener?T.listener:T),R=y._events),X=R[_]):(R=y._events=o(null),y._eventsCount=0),X){if(typeof X=="function"?X=R[_]=D?[T,X]:[X,T]:D?X.unshift(T):X.push(T),!X.warned&&(F=c(y))&&F>0&&X.length>F){X.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+X.length+' "'+String(_)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');H.name="MaxListenersExceededWarning",H.emitter=y,H.type=_,H.count=X.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",H.name,H.message)}}else X=R[_]=T,++y._eventsCount;return y}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var y=new Array(arguments.length),_=0;_<y.length;++_)y[_]=arguments[_];this.listener.apply(this.target,y)}}function v(y,_,T){var D={fired:!1,wrapFn:void 0,target:y,type:_,listener:T},F=u.call(d,D);return F.listener=T,D.wrapFn=F,F}function m(y,_,T){var D=y._events;if(!D)return[];var F=D[_];return F?typeof F=="function"?T?[F.listener||F]:[F]:T?function(R){for(var X=new Array(R.length),H=0;H<X.length;++H)X[H]=R[H].listener||R[H];return X}(F):g(F,F.length):[]}function b(y){var _=this._events;if(_){var T=_[y];if(typeof T=="function")return 1;if(T)return T.length}return 0}function g(y,_){for(var T=new Array(_),D=0;D<_;++D)T[D]=y[D];return T}s?Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(y){if(typeof y!="number"||y<0||y!=y)throw new TypeError('"defaultMaxListeners" must be a positive number');i=y}}):h.defaultMaxListeners=i,h.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||isNaN(y))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=y,this},h.prototype.getMaxListeners=function(){return c(this)},h.prototype.emit=function(y){var _,T,D,F,R,X,H=y==="error";if(X=this._events)H=H&&X.error==null;else if(!H)return!1;if(H){if(arguments.length>1&&(_=arguments[1]),_ instanceof Error)throw _;var E=new Error('Unhandled "error" event. ('+_+")");throw E.context=_,E}if(!(T=X[y]))return!1;var A=typeof T=="function";switch(D=arguments.length){case 1:(function(S,I,z){if(I)S.call(z);else for(var V=S.length,te=g(S,V),W=0;W<V;++W)te[W].call(z)})(T,A,this);break;case 2:(function(S,I,z,V){if(I)S.call(z,V);else for(var te=S.length,W=g(S,te),q=0;q<te;++q)W[q].call(z,V)})(T,A,this,arguments[1]);break;case 3:(function(S,I,z,V,te){if(I)S.call(z,V,te);else for(var W=S.length,q=g(S,W),G=0;G<W;++G)q[G].call(z,V,te)})(T,A,this,arguments[1],arguments[2]);break;case 4:(function(S,I,z,V,te,W){if(I)S.call(z,V,te,W);else for(var q=S.length,G=g(S,q),U=0;U<q;++U)G[U].call(z,V,te,W)})(T,A,this,arguments[1],arguments[2],arguments[3]);break;default:for(F=new Array(D-1),R=1;R<D;R++)F[R-1]=arguments[R];(function(S,I,z,V){if(I)S.apply(z,V);else for(var te=S.length,W=g(S,te),q=0;q<te;++q)W[q].apply(z,V)})(T,A,this,F)}return!0},h.prototype.addListener=function(y,_){return f(this,y,_,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(y,_){return f(this,y,_,!0)},h.prototype.once=function(y,_){if(typeof _!="function")throw new TypeError('"listener" argument must be a function');return this.on(y,v(this,y,_)),this},h.prototype.prependOnceListener=function(y,_){if(typeof _!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(y,v(this,y,_)),this},h.prototype.removeListener=function(y,_){var T,D,F,R,X;if(typeof _!="function")throw new TypeError('"listener" argument must be a function');if(!(D=this._events))return this;if(!(T=D[y]))return this;if(T===_||T.listener===_)--this._eventsCount==0?this._events=o(null):(delete D[y],D.removeListener&&this.emit("removeListener",y,T.listener||_));else if(typeof T!="function"){for(F=-1,R=T.length-1;R>=0;R--)if(T[R]===_||T[R].listener===_){X=T[R].listener,F=R;break}if(F<0)return this;F===0?T.shift():function(H,E){for(var A=E,S=A+1,I=H.length;S<I;A+=1,S+=1)H[A]=H[S];H.pop()}(T,F),T.length===1&&(D[y]=T[0]),D.removeListener&&this.emit("removeListener",y,X||_)}return this},h.prototype.removeAllListeners=function(y){var _,T,D;if(!(T=this._events))return this;if(!T.removeListener)return arguments.length===0?(this._events=o(null),this._eventsCount=0):T[y]&&(--this._eventsCount==0?this._events=o(null):delete T[y]),this;if(arguments.length===0){var F,R=a(T);for(D=0;D<R.length;++D)(F=R[D])!=="removeListener"&&this.removeAllListeners(F);return this.removeAllListeners("removeListener"),this._events=o(null),this._eventsCount=0,this}if(typeof(_=T[y])=="function")this.removeListener(y,_);else if(_)for(D=_.length-1;D>=0;D--)this.removeListener(y,_[D]);return this},h.prototype.listeners=function(y){return m(this,y,!0)},h.prototype.rawListeners=function(y){return m(this,y,!1)},h.listenerCount=function(y,_){return typeof y.listenerCount=="function"?y.listenerCount(_):b.call(y,_)},h.prototype.listenerCount=b,h.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],23:[function(t,n,l){l.read=function(o,a,u,h,s){var i,p,c=8*s-h-1,f=(1<<c)-1,d=f>>1,v=-7,m=u?s-1:0,b=u?-1:1,g=o[a+m];for(m+=b,i=g&(1<<-v)-1,g>>=-v,v+=c;v>0;i=256*i+o[a+m],m+=b,v-=8);for(p=i&(1<<-v)-1,i>>=-v,v+=h;v>0;p=256*p+o[a+m],m+=b,v-=8);if(i===0)i=1-d;else{if(i===f)return p?NaN:1/0*(g?-1:1);p+=Math.pow(2,h),i-=d}return(g?-1:1)*p*Math.pow(2,i-h)},l.write=function(o,a,u,h,s,i){var p,c,f,d=8*i-s-1,v=(1<<d)-1,m=v>>1,b=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=h?0:i-1,y=h?1:-1,_=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(c=isNaN(a)?1:0,p=v):(p=Math.floor(Math.log(a)/Math.LN2),a*(f=Math.pow(2,-p))<1&&(p--,f*=2),(a+=p+m>=1?b/f:b*Math.pow(2,1-m))*f>=2&&(p++,f/=2),p+m>=v?(c=0,p=v):p+m>=1?(c=(a*f-1)*Math.pow(2,s),p+=m):(c=a*Math.pow(2,m-1)*Math.pow(2,s),p=0));s>=8;o[u+g]=255&c,g+=y,c/=256,s-=8);for(p=p<<s|c,d+=s;d>0;o[u+g]=255&p,g+=y,p/=256,d-=8);o[u+g-y]|=128*_}},{}],24:[function(t,n,l){typeof Object.create=="function"?n.exports=function(o,a){a&&(o.super_=a,o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(o,a){if(a){o.super_=a;var u=function(){};u.prototype=a.prototype,o.prototype=new u,o.prototype.constructor=o}}},{}],25:[function(t,n,l){Object.defineProperty(l,"__esModule",{value:!0});var o=function(){function a(u,h){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=u,this.value=h}return a.prototype.rotateLeft=function(){var u=this.parent,h=this.brother,s=this.leftChild,i=this.rightChild;if(!i)throw new Error("unknown error");var p=i.leftChild,c=i.rightChild;return u&&(u.leftChild===this?u.leftChild=i:u.rightChild===this&&(u.rightChild=i)),i.parent=u,i.brother=h,i.leftChild=this,i.rightChild=c,h&&(h.brother=i),this.parent=i,this.brother=c,this.leftChild=s,this.rightChild=p,c&&(c.parent=i,c.brother=this),s&&(s.parent=this,s.brother=p),p&&(p.parent=this,p.brother=s),i},a.prototype.rotateRight=function(){var u=this.parent,h=this.brother,s=this.leftChild;if(!s)throw new Error("unknown error");var i=this.rightChild,p=s.leftChild,c=s.rightChild;return u&&(u.leftChild===this?u.leftChild=s:u.rightChild===this&&(u.rightChild=s)),s.parent=u,s.brother=h,s.leftChild=p,s.rightChild=this,h&&(h.brother=s),p&&(p.parent=s,p.brother=this),this.parent=s,this.brother=p,this.leftChild=c,this.rightChild=i,c&&(c.parent=this,c.brother=i),i&&(i.parent=this,i.brother=c),s},a.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},a.TreeNodeColorType={red:!0,black:!1},a}();Object.freeze(o),l.default=o},{}],26:[function(t,n,l){var o=this&&this.__generator||function(u,h){var s,i,p,c,f={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(v){return function(m){return function(b){if(s)throw new TypeError("Generator is already executing.");for(;f;)try{if(s=1,i&&(p=2&b[0]?i.return:b[0]?i.throw||((p=i.return)&&p.call(i),0):i.next)&&!(p=p.call(i,b[1])).done)return p;switch(i=0,p&&(b=[2&b[0],p.value]),b[0]){case 0:case 1:p=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,i=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(!(p=(p=f.trys).length>0&&p[p.length-1])&&(b[0]===6||b[0]===2)){f=0;continue}if(b[0]===3&&(!p||b[1]>p[0]&&b[1]<p[3])){f.label=b[1];break}if(b[0]===6&&f.label<p[1]){f.label=p[1],p=b;break}if(p&&f.label<p[2]){f.label=p[2],f.ops.push(b);break}p[2]&&f.ops.pop(),f.trys.pop();continue}b=h.call(u,f)}catch(g){b=[6,g],i=0}finally{s=p=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([v,m])}}};function a(u){var h=this;u===void 0&&(u=[]);var s=[],i=0,p=0,c=0,f=0,d=0,v=0;this.size=function(){return v},this.empty=function(){return v===0},this.clear=function(){i=c=p=f=d=v=0,b.call(this,a.bucketSize),v=0},this.front=function(){return s[i][p]},this.back=function(){return s[c][f]},this.forEach=function(g){if(!this.empty()){var y=0;if(i!==c){for(T=p;T<a.bucketSize;++T)g(s[i][T],y++);for(T=i+1;T<c;++T)for(var _=0;_<a.bucketSize;++_)g(s[T][_],y++);for(T=0;T<=f;++T)g(s[c][T],y++)}else for(var T=p;T<=f;++T)g(s[i][T],y++)}};var m=function(g){var y=i*a.bucketSize+p,_=y+g,T=c*a.bucketSize+f;if(_<y||_>T)throw new Error("pos should more than 0 and less than queue's size");return{curNodeBucketIndex:Math.floor(_/a.bucketSize),curNodePointerIndex:_%a.bucketSize}};this.getElementByPos=function(g){var y=m(g),_=y.curNodeBucketIndex,T=y.curNodePointerIndex;return s[_][T]},this.eraseElementByPos=function(g){var y=this;if(g<0||g>v)throw new Error("pos should more than 0 and less than queue's size");if(g===0)this.popFront();else if(g===this.size())this.popBack();else{for(var _=[],T=g+1;T<v;++T)_.push(this.getElementByPos(T));this.cut(g),this.popBack(),_.forEach(function(D){return y.pushBack(D)})}},this.eraseElementByValue=function(g){if(!this.empty()){var y=[];this.forEach(function(D){D!==g&&y.push(D)});for(var _=y.length,T=0;T<_;++T)this.setElementByPos(T,y[T]);this.cut(_-1)}};var b=function(g){for(var y=[],_=g*a.sigma,T=Math.max(Math.ceil(_/a.bucketSize),2),D=0;D<T;++D)y.push(new Array(a.bucketSize));var F=Math.ceil(g/a.bucketSize),R=Math.floor(T/2)-Math.floor(F/2),X=R,H=0;if(this.size())for(D=0;D<F;++D){for(var E=0;E<a.bucketSize;++E)if(y[R+D][E]=this.front(),this.popFront(),this.empty()){X=R+D,H=E;break}if(this.empty())break}s=y,i=R,p=0,c=X,f=H,d=T,v=g};this.pushBack=function(g){this.empty()||(c===d-1&&f===a.bucketSize-1&&b.call(this,this.size()),f<a.bucketSize-1?++f:c<d-1&&(++c,f=0)),++v,s[c][f]=g},this.popBack=function(){this.empty()||(this.size()!==1&&(f>0?--f:i<c&&(--c,f=a.bucketSize-1)),v>0&&--v)},this.setElementByPos=function(g,y){var _=m(g),T=_.curNodeBucketIndex,D=_.curNodePointerIndex;s[T][D]=y},this.insert=function(g,y,_){var T=this;if(_===void 0&&(_=1),g===0)for(;_--;)this.pushFront(y);else if(g===this.size())for(;_--;)this.pushBack(y);else{for(var D=[],F=g;F<v;++F)D.push(this.getElementByPos(F));for(this.cut(g-1),F=0;F<_;++F)this.pushBack(y);D.forEach(function(R){return T.pushBack(R)})}},this.find=function(g){if(i===c){for(var y=p;y<=f;++y)if(s[i][y]===g)return!0;return!1}for(y=p;y<a.bucketSize;++y)if(s[i][y]===g)return!0;for(y=i+1;y<c;++y)for(var _=0;_<a.bucketSize;++_)if(s[y][_]===g)return!0;for(y=0;y<=f;++y)if(s[c][y]===g)return!0;return!1},this.reverse=function(){for(var g=0,y=v-1;g<y;){var _=this.getElementByPos(g);this.setElementByPos(g,this.getElementByPos(y)),this.setElementByPos(y,_),++g,--y}},this.unique=function(){if(!this.empty()){var g=[],y=this.front();this.forEach(function(T,D){D!==0&&T===y||(g.push(T),y=T)});for(var _=0;_<v;++_)this.setElementByPos(_,g[_]);this.cut(g.length-1)}},this.sort=function(g){var y=[];this.forEach(function(T){y.push(T)}),y.sort(g);for(var _=0;_<v;++_)this.setElementByPos(_,y[_])},this.pushFront=function(g){this.empty()||(i===0&&p===0&&b.call(this,this.size()),p>0?--p:i>0&&(--i,p=a.bucketSize-1)),++v,s[i][p]=g},this.popFront=function(){this.empty()||(this.size()!==1&&(p<a.bucketSize-1?++p:i<c&&(++i,p=0)),v>0&&--v)},this.shrinkToFit=function(){var g=this,y=[];this.forEach(function(F){y.push(F)});var _=y.length;s=[];for(var T=Math.ceil(_/a.bucketSize),D=0;D<T;++D)s.push(new Array(a.bucketSize));this.clear(),y.forEach(function(F){return g.pushBack(F)})},this.cut=function(g){if(g<0)this.clear();else{var y=m(g),_=y.curNodeBucketIndex,T=y.curNodePointerIndex;c=_,f=T,v=g+1}},this[Symbol.iterator]=function(){return function(){var g,y;return o(this,function(_){switch(_.label){case 0:if(v===0)return[2];if(i!==c)return[3,5];y=p,_.label=1;case 1:return y<=f?[4,s[i][y]]:[3,4];case 2:_.sent(),_.label=3;case 3:return++y,[3,1];case 4:return[2];case 5:y=p,_.label=6;case 6:return y<a.bucketSize?[4,s[i][y]]:[3,9];case 7:_.sent(),_.label=8;case 8:return++y,[3,6];case 9:y=i+1,_.label=10;case 10:if(!(y<c))return[3,15];g=0,_.label=11;case 11:return g<a.bucketSize?[4,s[y][g]]:[3,14];case 12:_.sent(),_.label=13;case 13:return++g,[3,11];case 14:return++y,[3,10];case 15:y=0,_.label=16;case 16:return y<=f?[4,s[c][y]]:[3,19];case 17:_.sent(),_.label=18;case 18:return++y,[3,16];case 19:return[2]}})}()},function(){var g=a.bucketSize;u.size?g=u.size():u.length&&(g=u.length);var y=g*a.sigma;d=Math.ceil(y/a.bucketSize),d=Math.max(d,3);for(var _=0;_<d;++_)s.push(new Array(a.bucketSize));var T=Math.ceil(g/a.bucketSize);i=Math.floor(d/2)-Math.floor(T/2),c=i,u.forEach(function(D){return h.pushBack(D)})}(),Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),a.sigma=3,a.bucketSize=5e3,Object.freeze(a),l.default=a},{}],27:[function(t,n,l){var o=this&&this.__generator||function(i,p){var c,f,d,v,m={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return v={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function b(g){return function(y){return function(_){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return m.label++,{value:_[1],done:!1};case 5:m.label++,f=_[1],_=[0];continue;case 7:_=m.ops.pop(),m.trys.pop();continue;default:if(!(d=(d=m.trys).length>0&&d[d.length-1])&&(_[0]===6||_[0]===2)){m=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]<d[3])){m.label=_[1];break}if(_[0]===6&&m.label<d[1]){m.label=d[1],d=_;break}if(d&&m.label<d[2]){m.label=d[2],m.ops.push(_);break}d[2]&&m.ops.pop(),m.trys.pop();continue}_=p.call(i,m)}catch(T){_=[6,T],f=0}finally{c=d=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([g,y])}}},a=this&&this.__values||function(i){var p=typeof Symbol=="function"&&Symbol.iterator,c=p&&i[p],f=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&f>=i.length&&(i=void 0),{value:i&&i[f++],done:!i}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../LinkList/LinkList"),h=t("../Map/Map");function s(i,p,c){var f=this;if(i===void 0&&(i=[]),p===void 0&&(p=s.initSize),c=c||function(b){var g,y,_=0,T="";if(typeof b=="number")_=((_=Math.floor(b))<<5)-_,_&=_;else{T=typeof b!="string"?JSON.stringify(b):b;try{for(var D=a(T),F=D.next();!F.done;F=D.next())_=(_<<5)-_+F.value.charCodeAt(0),_&=_}catch(R){g={error:R}}finally{try{F&&!F.done&&(y=D.return)&&y.call(D)}finally{if(g)throw g.error}}}return _^=_>>>16},(p&p-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var d=0,v=[],m=Math.max(s.initSize,Math.min(s.maxSize,p));this.size=function(){return d},this.empty=function(){return d===0},this.clear=function(){d=0,m=p,v=[]},this.forEach=function(b){var g=0;v.forEach(function(y){y.forEach(function(_){b(_,g++)})})},this.setElement=function(b,g){var y,_;if(b==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(g!=null){var T=c(b)&m-1;if(v[T]){var D=v[T].size();if(v[T]instanceof u.default){try{for(var F=a(v[T]),R=F.next();!R.done;R=F.next()){var X=R.value;if(X.key===b)return void(X.value=g)}}catch(E){y={error:E}}finally{try{R&&!R.done&&(_=F.return)&&_.call(F)}finally{if(y)throw y.error}}v[T].pushBack({key:b,value:g}),v[T].size()>=s.treeifyThreshold&&(v[T]=new h.default(v[T]))}else v[T].setElement(b,g);var H=v[T].size();d+=H-D}else++d,v[T]=new u.default([{key:b,value:g}]);d>m*s.sigma&&function(E){if(!(E>=s.maxSize)){m=2*E;var A=[];v.forEach(function(S,I){if(!S.empty()){if(S instanceof u.default&&S.size()===1){var z=S.front(),V=z.key,te=z.value;A[c(V)&m-1]=new u.default([{key:V,value:te}])}else if(S instanceof h.default){var W=new u.default,q=new u.default;S.forEach(function(L){c(L.key)&E?q.pushBack(L):W.pushBack(L)}),W.size()>s.untreeifyThreshold?A[I]=new h.default(W):W.size()&&(A[I]=W),q.size()>s.untreeifyThreshold?A[I+E]=new h.default(q):q.size()&&(A[I+E]=q)}else{var G=new u.default,U=new u.default;S.forEach(function(L){c(L.key)&E?U.pushBack(L):G.pushBack(L)}),G.size()&&(A[I]=G),U.size()&&(A[I+E]=U)}v[I].clear()}}),v=A}}.call(this,m)}else this.eraseElementByKey(b)},this.getElementByKey=function(b){var g,y,_=c(b)&m-1;if(v[_]){if(v[_]instanceof h.default)return v[_].getElementByKey(b);try{for(var T=a(v[_]),D=T.next();!D.done;D=T.next()){var F=D.value;if(F.key===b)return F.value}}catch(R){g={error:R}}finally{try{D&&!D.done&&(y=T.return)&&y.call(T)}finally{if(g)throw g.error}}}},this.eraseElementByKey=function(b){var g,y,_=c(b)&m-1;if(v[_]){var T=v[_].size();if(v[_]instanceof h.default)v[_].eraseElementByKey(b),v[_].size()<=s.untreeifyThreshold&&(v[_]=new u.default(v[_]));else{var D=-1;try{for(var F=a(v[_]),R=F.next();!R.done;R=F.next())if(++D,R.value.key===b){v[_].eraseElementByPos(D);break}}catch(H){g={error:H}}finally{try{R&&!R.done&&(y=F.return)&&y.call(F)}finally{if(g)throw g.error}}}var X=v[_].size();d+=X-T}},this.find=function(b){var g,y,_=c(b)&m-1;if(!v[_])return!1;if(v[_]instanceof h.default)return v[_].find(b);try{for(var T=a(v[_]),D=T.next();!D.done;D=T.next())if(D.value.key===b)return!0}catch(F){g={error:F}}finally{try{D&&!D.done&&(y=T.return)&&y.call(T)}finally{if(g)throw g.error}}return!1},this[Symbol.iterator]=function(){return function(){var b,g,y,_,T,D;return o(this,function(F){switch(F.label){case 0:b=0,F.label=1;case 1:if(!(b<m))return[3,10];for(;b<m&&!v[b];)++b;if(b>=m)return[3,10];F.label=2;case 2:F.trys.push([2,7,8,9]),T=void 0,g=a(v[b]),y=g.next(),F.label=3;case 3:return y.done?[3,6]:[4,y.value];case 4:F.sent(),F.label=5;case 5:return y=g.next(),[3,3];case 6:return[3,9];case 7:return _=F.sent(),T={error:_},[3,9];case 8:try{y&&!y.done&&(D=g.return)&&D.call(g)}finally{if(T)throw T.error}return[7];case 9:return++b,[3,1];case 10:return[2]}})}()},i.forEach(function(b){var g=b.key,y=b.value;return f.setElement(g,y)}),Object.freeze(this)}s.initSize=16,s.maxSize=1<<30,s.sigma=.75,s.treeifyThreshold=8,s.untreeifyThreshold=6,s.minTreeifySize=64,Object.freeze(s),l.default=s},{"../LinkList/LinkList":29,"../Map/Map":30}],28:[function(t,n,l){var o=this&&this.__generator||function(i,p){var c,f,d,v,m={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return v={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function b(g){return function(y){return function(_){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return m.label++,{value:_[1],done:!1};case 5:m.label++,f=_[1],_=[0];continue;case 7:_=m.ops.pop(),m.trys.pop();continue;default:if(!(d=(d=m.trys).length>0&&d[d.length-1])&&(_[0]===6||_[0]===2)){m=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]<d[3])){m.label=_[1];break}if(_[0]===6&&m.label<d[1]){m.label=d[1],d=_;break}if(d&&m.label<d[2]){m.label=d[2],m.ops.push(_);break}d[2]&&m.ops.pop(),m.trys.pop();continue}_=p.call(i,m)}catch(T){_=[6,T],f=0}finally{c=d=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([g,y])}}},a=this&&this.__values||function(i){var p=typeof Symbol=="function"&&Symbol.iterator,c=p&&i[p],f=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&f>=i.length&&(i=void 0),{value:i&&i[f++],done:!i}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../Set/Set"),h=t("../LinkList/LinkList");function s(i,p,c){var f=this;if(i===void 0&&(i=[]),p===void 0&&(p=s.initSize),c=c||function(b){var g=0,y="";if(typeof b=="number")g=((g=Math.floor(b))<<5)-g,g&=g;else{y=typeof b!="string"?JSON.stringify(b):b;for(var _=0;_<y.length;_++)g=(g<<5)-g+y.charCodeAt(_),g&=g}return g^=g>>>16},(p&p-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var d=0,v=[],m=Math.max(s.initSize,Math.min(s.maxSize,p));this.size=function(){return d},this.empty=function(){return d===0},this.clear=function(){d=0,m=p,v=[]},this.forEach=function(b){var g=0;v.forEach(function(y){y.forEach(function(_){b(_,g++)})})},this.insert=function(b){if(b==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var g=c(b)&m-1;if(v[g]){var y=v[g].size();if(v[g]instanceof h.default){if(v[g].find(b))return;v[g].pushBack(b),v[g].size()>=s.treeifyThreshold&&(v[g]=new u.default(v[g]))}else v[g].insert(b);var _=v[g].size();d+=_-y}else v[g]=new h.default([b]),++d;d>m*s.sigma&&function(T){if(!(T>=s.maxSize)){m=2*T;var D=[];v.forEach(function(F,R){if(!F.empty()){if(F instanceof h.default&&F.size()===1){var X=F.front();if(X===void 0)throw new Error("unknown error");D[c(X)&m-1]=new h.default([X])}else if(F instanceof u.default){var H=new h.default,E=new h.default;F.forEach(function(I){c(I)&T?E.pushBack(I):H.pushBack(I)}),H.size()>s.untreeifyThreshold?D[R]=new u.default(H):H.size()&&(D[R]=H),E.size()>s.untreeifyThreshold?D[R+T]=new u.default(E):E.size()&&(D[R+T]=E)}else{var A=new h.default,S=new h.default;F.forEach(function(I){c(I)&T?S.pushBack(I):A.pushBack(I)}),A.size()&&(D[R]=A),S.size()&&(D[R+T]=S)}v[R].clear()}}),v=D}}.call(this,m)},this.eraseElementByValue=function(b){var g=c(b)&m-1;if(v[g]){var y=v[g].size();v[g].eraseElementByValue(b),v[g]instanceof u.default&&v[g].size()<=s.untreeifyThreshold&&(v[g]=new h.default(v[g]));var _=v[g].size();d+=_-y}},this.find=function(b){var g=c(b)&m-1;return!!v[g]&&v[g].find(b)},this[Symbol.iterator]=function(){return function(){var b,g,y,_,T,D;return o(this,function(F){switch(F.label){case 0:b=0,F.label=1;case 1:if(!(b<m))return[3,10];for(;b<m&&!v[b];)++b;if(b>=m)return[3,10];F.label=2;case 2:F.trys.push([2,7,8,9]),T=void 0,g=a(v[b]),y=g.next(),F.label=3;case 3:return y.done?[3,6]:[4,y.value];case 4:F.sent(),F.label=5;case 5:return y=g.next(),[3,3];case 6:return[3,9];case 7:return _=F.sent(),T={error:_},[3,9];case 8:try{y&&!y.done&&(D=g.return)&&D.call(g)}finally{if(T)throw T.error}return[7];case 9:return++b,[3,1];case 10:return[2]}})}()},i.forEach(function(b){return f.insert(b)}),Object.freeze(this)}s.initSize=16,s.maxSize=1<<30,s.sigma=.75,s.treeifyThreshold=8,s.untreeifyThreshold=6,s.minTreeifySize=64,Object.freeze(s),l.default=s},{"../LinkList/LinkList":29,"../Set/Set":33}],29:[function(t,n,l){var o=this&&this.__generator||function(h,s){var i,p,c,f,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return f={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function v(m){return function(b){return function(g){if(i)throw new TypeError("Generator is already executing.");for(;d;)try{if(i=1,p&&(c=2&g[0]?p.return:g[0]?p.throw||((c=p.return)&&c.call(p),0):p.next)&&!(c=c.call(p,g[1])).done)return c;switch(p=0,c&&(g=[2&g[0],c.value]),g[0]){case 0:case 1:c=g;break;case 4:return d.label++,{value:g[1],done:!1};case 5:d.label++,p=g[1],g=[0];continue;case 7:g=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(g[0]===6||g[0]===2)){d=0;continue}if(g[0]===3&&(!c||g[1]>c[0]&&g[1]<c[3])){d.label=g[1];break}if(g[0]===6&&d.label<c[1]){d.label=c[1],c=g;break}if(c&&d.label<c[2]){d.label=c[2],d.ops.push(g);break}c[2]&&d.ops.pop(),d.trys.pop();continue}g=s.call(h,d)}catch(y){g=[6,y],p=0}finally{i=c=0}if(5&g[0])throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}([m,b])}}};Object.defineProperty(l,"__esModule",{value:!0});var a=function(){return function(h){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=h}}();function u(h){var s=this;h===void 0&&(h=[]);var i=0,p=void 0,c=void 0;this.size=function(){return i},this.empty=function(){return i===0},this.clear=function(){p=c=void 0,i=0},this.front=function(){return p==null?void 0:p.value},this.back=function(){return c==null?void 0:c.value},this.forEach=function(f){for(var d=p,v=0;d;){if(d.value===void 0)throw new Error("unknown error");f(d.value,v++),d=d.next}},this.getElementByPos=function(f){if(f<0||f>=i)throw new Error("pos must more then 0 and less then the list length");for(var d=p;f--&&d;)d=d.next;if(!d||d.value===void 0)throw new Error("unknown error");return d.value},this.eraseElementByPos=function(f){if(f<0||f>=i)throw new Error("erase pos must more then 0 and less then the list length");if(f===0)this.popFront();else if(f===i-1)this.popBack();else{for(var d=p;f--;){if(!(d!=null&&d.next))throw new Error("unknown error");d=d.next}if(!d||!d.pre||!d.next)throw new Error("unknown error");var v=d.pre,m=d.next;m.pre=v,v.next=m,i>0&&--i}},this.eraseElementByValue=function(f){for(;p&&p.value===f;)this.popFront();for(;c&&c.value===f;)this.popBack();if(p)for(var d=p;d;){if(d.value===f){var v=d.pre,m=d.next;m&&(m.pre=v),v&&(v.next=m),i>0&&--i}d=d.next}},this.pushBack=function(f){if(f==null)throw new Error("you can't push null or undefined here");++i;var d=new a(f);c?(c.next=d,d.pre=c,c=d):p=c=d},this.popBack=function(){c&&(i>0&&--i,c&&(p===c?p=c=void 0:(c=c.pre)&&(c.next=void 0)))},this.setElementByPos=function(f,d){if(d==null)throw new Error("you can't set null or undefined here");if(f<0||f>=i)throw new Error("pos must more then 0 and less then the list length");for(var v=p;f--;){if(!v)throw new Error("unknown error");v=v.next}v&&(v.value=d)},this.insert=function(f,d,v){if(v===void 0&&(v=1),d==null)throw new Error("you can't insert null or undefined here");if(f<0||f>i)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(v<0)throw new Error("insert size must more than 0");if(f===0)for(;v--;)this.pushFront(d);else if(f===i)for(;v--;)this.pushBack(d);else{for(var m=p,b=1;b<f;++b){if(!(m!=null&&m.next))throw new Error("unknown error");m=m==null?void 0:m.next}if(!m)throw new Error("unknown error");var g=m.next;for(i+=v;v--;)m.next=new a(d),m.next.pre=m,m=m.next;m.next=g,g&&(g.pre=m)}},this.find=function(f){for(var d=p;d;){if(d.value===f)return!0;d=d.next}return!1},this.reverse=function(){for(var f=p,d=c,v=0;f&&d&&2*v<i;){var m=f.value;f.value=d.value,d.value=m,f=f.next,d=d.pre,++v}},this.unique=function(){for(var f=p;f;){for(var d=f;d&&d.next&&d.value===d.next.value;)d=d.next,i>0&&--i;f.next=d.next,f.next&&(f.next.pre=f),f=f.next}},this.sort=function(f){var d=[];this.forEach(function(m){d.push(m)}),d.sort(f);var v=p;d.forEach(function(m){v&&(v.value=m,v=v.next)})},this.pushFront=function(f){if(f==null)throw new Error("you can't push null or undefined here");++i;var d=new a(f);p?(d.next=p,p.pre=d,p=d):p=c=d},this.popFront=function(){p&&(i>0&&--i,p&&(p===c?p=c=void 0:(p=p.next)&&(p.pre=void 0)))},this.merge=function(f){var d=this,v=p;f.forEach(function(m){for(;v&&v.value!==void 0&&v.value<=m;)v=v.next;if(v===void 0)d.pushBack(m),v=c;else if(v===p)d.pushFront(m),v=p;else{++i;var b=v.pre;b&&(b.next=new a(m),b.next.pre=b,b.next.next=v,v&&(v.pre=b.next))}})},this[Symbol.iterator]=function(){return function(){var f;return o(this,function(d){switch(d.label){case 0:f=p,d.label=1;case 1:if(f===void 0)return[3,3];if(!f.value)throw new Error("unknown error");return[4,f.value];case 2:return d.sent(),f=f.next,[3,1];case 3:return[2]}})}()},h.forEach(function(f){return s.pushBack(f)}),Object.freeze(this)}Object.freeze(u),l.default=u},{}],30:[function(t,n,l){var o=this&&this.__generator||function(s,i){var p,c,f,d,v={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function m(b){return function(g){return function(y){if(p)throw new TypeError("Generator is already executing.");for(;v;)try{if(p=1,c&&(f=2&y[0]?c.return:y[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,y[1])).done)return f;switch(c=0,f&&(y=[2&y[0],f.value]),y[0]){case 0:case 1:f=y;break;case 4:return v.label++,{value:y[1],done:!1};case 5:v.label++,c=y[1],y=[0];continue;case 7:y=v.ops.pop(),v.trys.pop();continue;default:if(!(f=(f=v.trys).length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){v=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){v.label=y[1];break}if(y[0]===6&&v.label<f[1]){v.label=f[1],f=y;break}if(f&&v.label<f[2]){v.label=f[2],v.ops.push(y);break}f[2]&&v.ops.pop(),v.trys.pop();continue}y=i.call(s,v)}catch(_){y=[6,_],c=0}finally{p=f=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([b,g])}}},a=this&&this.__values||function(s){var i=typeof Symbol=="function"&&Symbol.iterator,p=i&&s[i],c=0;if(p)return p.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../Base/TreeNode");function h(s,i){var p=this;s===void 0&&(s=[]),i=i||function(E,A){return E<A?-1:E>A?1:0};var c=0,f=new u.default;f.color=u.default.TreeNodeColorType.black,this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,f.key=f.value=void 0,f.leftChild=f.rightChild=f.brother=void 0};var d=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.leftChild?d(E.leftChild):E},v=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.rightChild?v(E.rightChild):E};this.front=function(){if(!this.empty()){var E=d(f);if(E.key===void 0||E.value===void 0)throw new Error("unknown error");return{key:E.key,value:E.value}}},this.back=function(){if(!this.empty()){var E=v(f);if(E.key===void 0||E.value===void 0)throw new Error("unknown error");return{key:E.key,value:E.value}}},this.forEach=function(E){var A,S,I=0;try{for(var z=a(this),V=z.next();!V.done;V=z.next())E(V.value,I++)}catch(te){A={error:te}}finally{try{V&&!V.done&&(S=z.return)&&S.call(z)}finally{if(A)throw A.error}}},this.getElementByPos=function(E){var A,S;if(E<0||E>=this.size())throw new Error("pos must more than 0 and less than set's size");var I=0;try{for(var z=a(this),V=z.next();!V.done;V=z.next()){var te=V.value;if(I===E)return te;++I}}catch(W){A={error:W}}finally{try{V&&!V.done&&(S=z.return)&&S.call(z)}finally{if(A)throw A.error}}throw new Error("unknown Error")};var m=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0){var S=i(E.key,A);return S===0?{key:E.key,value:E.value}:S<0?m(E.rightChild,A):m(E.leftChild,A)||{key:E.key,value:E.value}}};this.lowerBound=function(E){return m(f,E)};var b=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0)return i(E.key,A)<=0?b(E.rightChild,A):b(E.leftChild,A)||{key:E.key,value:E.value}};this.upperBound=function(E){return b(f,E)};var g=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0){var S=i(E.key,A);return S===0?{key:E.key,value:E.value}:S>0?g(E.leftChild,A):g(E.rightChild,A)||{key:E.key,value:E.value}}};this.reverseLowerBound=function(E){return g(f,E)};var y=function(E,A){if(E&&E.key!==void 0&&E.value!==void 0)return i(E.key,A)>=0?y(E.leftChild,A):y(E.rightChild,A)||{key:E.key,value:E.value}};this.reverseUpperBound=function(E){return y(f,E)};var _=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(E.color!==u.default.TreeNodeColorType.red){var S=E.brother;if(!S)throw new Error("unknown error");if(E===A.leftChild)if(S.color===u.default.TreeNodeColorType.red){S.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red;var I=A.rotateLeft();f===A&&(f=I),_(E)}else S.color===u.default.TreeNodeColorType.black&&(S.rightChild&&S.rightChild.color===u.default.TreeNodeColorType.red?(S.color=A.color,A.color=u.default.TreeNodeColorType.black,S.rightChild&&(S.rightChild.color=u.default.TreeNodeColorType.black),I=A.rotateLeft(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):S.rightChild&&S.rightChild.color!==u.default.TreeNodeColorType.black||!S.leftChild||S.leftChild.color!==u.default.TreeNodeColorType.red?S.leftChild&&S.leftChild.color!==u.default.TreeNodeColorType.black||S.rightChild&&S.rightChild.color!==u.default.TreeNodeColorType.black||(S.color=u.default.TreeNodeColorType.red,_(A)):(S.color=u.default.TreeNodeColorType.red,S.leftChild&&(S.leftChild.color=u.default.TreeNodeColorType.black),I=S.rotateRight(),f===S&&(f=I),_(E)));else E===A.rightChild&&(S.color===u.default.TreeNodeColorType.red?(S.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red,I=A.rotateRight(),f===A&&(f=I),_(E)):S.color===u.default.TreeNodeColorType.black&&(S.leftChild&&S.leftChild.color===u.default.TreeNodeColorType.red?(S.color=A.color,A.color=u.default.TreeNodeColorType.black,S.leftChild&&(S.leftChild.color=u.default.TreeNodeColorType.black),I=A.rotateRight(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):S.leftChild&&S.leftChild.color!==u.default.TreeNodeColorType.black||!S.rightChild||S.rightChild.color!==u.default.TreeNodeColorType.red?S.leftChild&&S.leftChild.color!==u.default.TreeNodeColorType.black||S.rightChild&&S.rightChild.color!==u.default.TreeNodeColorType.black||(S.color=u.default.TreeNodeColorType.red,_(A)):(S.color=u.default.TreeNodeColorType.red,S.rightChild&&(S.rightChild.color=u.default.TreeNodeColorType.black),I=S.rotateLeft(),f===S&&(f=I),_(E))))}else E.color=u.default.TreeNodeColorType.black},T=function(E){for(var A=E;A.leftChild||A.rightChild;){if(A.rightChild){A=d(A.rightChild);var S=E.key;E.key=A.key,A.key=S;var I=E.value;E.value=A.value,A.value=I,E=A}A.leftChild&&(A=v(A.leftChild),S=E.key,E.key=A.key,A.key=S,I=E.value,E.value=A.value,A.value=I,E=A)}_(A),A&&A.remove(),--c,f.color=u.default.TreeNodeColorType.black},D=function(E,A){return!(!E||E.key===void 0)&&(!!D(E.leftChild,A)||!!A(E)||D(E.rightChild,A))};this.eraseElementByPos=function(E){if(E<0||E>=c)throw new Error("pos must more than 0 and less than set's size");var A=0;D(f,function(S){return E===A?(T(S),!0):(++A,!1)})},this.eraseElementByKey=function(E){if(!this.empty()){var A=X(f,E);A!==void 0&&A.key!==void 0&&i(A.key,E)===0&&T(A)}};var F=function(E,A){if(!E||E.key===void 0)throw new Error("unknown error");var S=i(A,E.key);return S<0?E.leftChild?F(E.leftChild,A):(E.leftChild=new u.default,E.leftChild.parent=E,E.leftChild.brother=E.rightChild,E.rightChild&&(E.rightChild.brother=E.leftChild),E.leftChild):S>0?E.rightChild?F(E.rightChild,A):(E.rightChild=new u.default,E.rightChild.parent=E,E.rightChild.brother=E.leftChild,E.leftChild&&(E.leftChild.brother=E.rightChild),E.rightChild):E},R=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(A.color!==u.default.TreeNodeColorType.black&&A.color===u.default.TreeNodeColorType.red){var S=A.brother,I=A.parent;if(!I)throw new Error("unknown error");if(S&&S.color===u.default.TreeNodeColorType.red)S.color=A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,R(I);else if(!S||S.color===u.default.TreeNodeColorType.black)if(A===I.leftChild)if(E===A.leftChild){A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red;var z=I.rotateRight();I===f&&(f=z)}else E===A.rightChild&&(z=A.rotateLeft(),I===f&&(f=z),R(A));else A===I.rightChild&&(E===A.leftChild?(z=A.rotateRight(),I===f&&(f=z),R(A)):E===A.rightChild&&(A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,z=I.rotateLeft(),I===f&&(f=z)))}};this.setElement=function(E,A){if(E==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(A!=null){if(this.empty())return++c,f.key=E,f.value=A,void(f.color=u.default.TreeNodeColorType.black);var S=F(f,E);S.key===void 0||i(S.key,E)!==0?(++c,S.key=E,S.value=A,R(S),f.color=u.default.TreeNodeColorType.black):S.value=A}else this.eraseElementByKey(E)};var X=function(E,A){if(E&&E.key!==void 0){var S=i(A,E.key);return S<0?X(E.leftChild,A):S>0?X(E.rightChild,A):E}};this.find=function(E){return!!X(f,E)},this.getElementByKey=function(E){var A=X(f,E);if((A==null?void 0:A.key)===void 0||(A==null?void 0:A.value)===void 0)throw new Error("unknown error");return A.value},this.union=function(E){var A=this;E.forEach(function(S){var I=S.key,z=S.value;return A.setElement(I,z)})},this.getHeight=function(){if(this.empty())return 0;var E=function(A){return A?Math.max(E(A.leftChild),E(A.rightChild))+1:1};return E(f)};var H=function(E){return o(this,function(A){switch(A.label){case 0:return E&&E.key!==void 0&&E.value!==void 0?[5,a(H(E.leftChild))]:[2];case 1:return A.sent(),[4,{key:E.key,value:E.value}];case 2:return A.sent(),[5,a(H(E.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return H(f)},s.forEach(function(E){var A=E.key,S=E.value;return p.setElement(A,S)}),Object.freeze(this)}Object.freeze(h),l.default=h},{"../Base/TreeNode":25}],31:[function(t,n,l){function o(a,u){a===void 0&&(a=[]),u=u||function(c,f){return c>f?-1:c<f?1:0};var h=[];a.forEach(function(c){return h.push(c)});var s=h.length,i=function(c,f){if(c<0||c>=s)throw new Error("unknown error");if(f<0||f>=s)throw new Error("unknown error");var d=h[c];h[c]=h[f],h[f]=d},p=function(c){if(c<0||c>=s)throw new Error("unknown error");var f=2*c+1,d=2*c+2;f<s&&u(h[c],h[f])>0&&i(c,f),d<s&&u(h[c],h[d])>0&&i(c,d)};(function(){for(var c=Math.floor((s-1)/2);c>=0;--c)for(var f=c,d=2*f+1;d<s;){var v=d+1,m=d;if(v<s&&u(h[d],h[v])>0&&(m=v),u(h[f],h[m])<=0)break;i(f,m),d=2*(f=m)+1}})(),this.size=function(){return s},this.empty=function(){return s===0},this.clear=function(){s=0,h.length=0},this.push=function(c){if(h.push(c),++s!==1)for(var f=s-1;f>0;){var d=Math.floor((f-1)/2);if(u(h[d],c)<=0)break;p(d),f=d}},this.pop=function(){if(!this.empty())if(this.size()!==1){var c=h[s-1];--s;for(var f=0;f<this.size();){var d=2*f+1,v=2*f+2;if(d>=this.size())break;var m=d;if(v<this.size()&&u(h[d],h[v])>0&&(m=v),u(h[m],c)>=0)break;h[f]=h[m],f=m}h[f]=c}else--s},this.top=function(){return h[0]},Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),Object.freeze(o),l.default=o},{}],32:[function(t,n,l){Object.defineProperty(l,"__esModule",{value:!0});var o=t("../LinkList/LinkList");function a(u){u===void 0&&(u=[]);var h=new o.default(u);this.size=function(){return h.size()},this.empty=function(){return h.empty()},this.clear=function(){h.clear()},this.push=function(s){h.pushBack(s)},this.pop=function(){h.popFront()},this.front=function(){return h.front()},Object.freeze(this)}Object.freeze(a),l.default=a},{"../LinkList/LinkList":29}],33:[function(t,n,l){var o=this&&this.__generator||function(s,i){var p,c,f,d,v={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function m(b){return function(g){return function(y){if(p)throw new TypeError("Generator is already executing.");for(;v;)try{if(p=1,c&&(f=2&y[0]?c.return:y[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,y[1])).done)return f;switch(c=0,f&&(y=[2&y[0],f.value]),y[0]){case 0:case 1:f=y;break;case 4:return v.label++,{value:y[1],done:!1};case 5:v.label++,c=y[1],y=[0];continue;case 7:y=v.ops.pop(),v.trys.pop();continue;default:if(!(f=(f=v.trys).length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){v=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){v.label=y[1];break}if(y[0]===6&&v.label<f[1]){v.label=f[1],f=y;break}if(f&&v.label<f[2]){v.label=f[2],v.ops.push(y);break}f[2]&&v.ops.pop(),v.trys.pop();continue}y=i.call(s,v)}catch(_){y=[6,_],c=0}finally{p=f=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([b,g])}}},a=this&&this.__values||function(s){var i=typeof Symbol=="function"&&Symbol.iterator,p=i&&s[i],c=0;if(p)return p.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(l,"__esModule",{value:!0});var u=t("../Base/TreeNode");function h(s,i){var p=this;s===void 0&&(s=[]),i=i||function(E,A){return E<A?-1:E>A?1:0};var c=0,f=new u.default;f.color=u.default.TreeNodeColorType.black,this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,f.key=void 0,f.leftChild=f.rightChild=f.brother=f.parent=void 0,f.color=u.default.TreeNodeColorType.black};var d=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.leftChild?d(E.leftChild):E},v=function(E){if(!E||E.key===void 0)throw new Error("unknown error");return E.rightChild?v(E.rightChild):E};this.front=function(){if(!this.empty())return d(f).key},this.back=function(){if(!this.empty())return v(f).key},this.forEach=function(E){var A,S,I=0;try{for(var z=a(this),V=z.next();!V.done;V=z.next())E(V.value,I++)}catch(te){A={error:te}}finally{try{V&&!V.done&&(S=z.return)&&S.call(z)}finally{if(A)throw A.error}}},this.getElementByPos=function(E){var A,S;if(E<0||E>=this.size())throw new Error("pos must more than 0 and less than set's size");var I=0;try{for(var z=a(this),V=z.next();!V.done;V=z.next()){var te=V.value;if(I===E)return te;++I}}catch(W){A={error:W}}finally{try{V&&!V.done&&(S=z.return)&&S.call(z)}finally{if(A)throw A.error}}throw new Error("unknown error")};var m=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(E.color!==u.default.TreeNodeColorType.red){var S=E.brother;if(!S)throw new Error("unknown error");if(E===A.leftChild)if(S.color===u.default.TreeNodeColorType.red){S.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red;var I=A.rotateLeft();f===A&&(f=I),m(E)}else S.color===u.default.TreeNodeColorType.black&&(S.rightChild&&S.rightChild.color===u.default.TreeNodeColorType.red?(S.color=A.color,A.color=u.default.TreeNodeColorType.black,S.rightChild&&(S.rightChild.color=u.default.TreeNodeColorType.black),I=A.rotateLeft(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):S.rightChild&&S.rightChild.color!==u.default.TreeNodeColorType.black||!S.leftChild||S.leftChild.color!==u.default.TreeNodeColorType.red?S.leftChild&&S.leftChild.color!==u.default.TreeNodeColorType.black||S.rightChild&&S.rightChild.color!==u.default.TreeNodeColorType.black||(S.color=u.default.TreeNodeColorType.red,m(A)):(S.color=u.default.TreeNodeColorType.red,S.leftChild&&(S.leftChild.color=u.default.TreeNodeColorType.black),I=S.rotateRight(),f===S&&(f=I),m(E)));else E===A.rightChild&&(S.color===u.default.TreeNodeColorType.red?(S.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red,I=A.rotateRight(),f===A&&(f=I),m(E)):S.color===u.default.TreeNodeColorType.black&&(S.leftChild&&S.leftChild.color===u.default.TreeNodeColorType.red?(S.color=A.color,A.color=u.default.TreeNodeColorType.black,S.leftChild&&(S.leftChild.color=u.default.TreeNodeColorType.black),I=A.rotateRight(),f===A&&(f=I),E.color=u.default.TreeNodeColorType.black):S.leftChild&&S.leftChild.color!==u.default.TreeNodeColorType.black||!S.rightChild||S.rightChild.color!==u.default.TreeNodeColorType.red?S.leftChild&&S.leftChild.color!==u.default.TreeNodeColorType.black||S.rightChild&&S.rightChild.color!==u.default.TreeNodeColorType.black||(S.color=u.default.TreeNodeColorType.red,m(A)):(S.color=u.default.TreeNodeColorType.red,S.rightChild&&(S.rightChild.color=u.default.TreeNodeColorType.black),I=S.rotateLeft(),f===S&&(f=I),m(E))))}else E.color=u.default.TreeNodeColorType.black},b=function(E){for(var A=E;A.leftChild||A.rightChild;){if(A.rightChild){A=d(A.rightChild);var S=E.key;E.key=A.key,A.key=S,E=A}A.leftChild&&(A=v(A.leftChild),S=E.key,E.key=A.key,A.key=S,E=A)}m(A),A&&A.remove(),--c,f.color=u.default.TreeNodeColorType.black},g=function(E,A){return!(!E||E.key===void 0)&&(!!g(E.leftChild,A)||!!A(E)||g(E.rightChild,A))};this.eraseElementByPos=function(E){if(E<0||E>=c)throw new Error("pos must more than 0 and less than set's size");var A=0;g(f,function(S){return E===A?(b(S),!0):(++A,!1)})},this.eraseElementByValue=function(E){if(!this.empty()){var A=T(f,E);A!==void 0&&A.key!==void 0&&i(A.key,E)===0&&b(A)}};var y=function(E,A){if(!E||E.key===void 0)throw new Error("unknown error");var S=i(A,E.key);return S<0?E.leftChild?y(E.leftChild,A):(E.leftChild=new u.default,E.leftChild.parent=E,E.leftChild.brother=E.rightChild,E.rightChild&&(E.rightChild.brother=E.leftChild),E.leftChild):S>0?E.rightChild?y(E.rightChild,A):(E.rightChild=new u.default,E.rightChild.parent=E,E.rightChild.brother=E.leftChild,E.leftChild&&(E.leftChild.brother=E.rightChild),E.rightChild):E},_=function(E){var A=E.parent;if(!A){if(E===f)return;throw new Error("unknown error")}if(A.color!==u.default.TreeNodeColorType.black&&A.color===u.default.TreeNodeColorType.red){var S=A.brother,I=A.parent;if(!I)throw new Error("unknown error");if(S&&S.color===u.default.TreeNodeColorType.red)S.color=A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,_(I);else if(!S||S.color===u.default.TreeNodeColorType.black)if(A===I.leftChild)if(E===A.leftChild){A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red;var z=I.rotateRight();I===f&&(f=z)}else E===A.rightChild&&(z=A.rotateLeft(),I===f&&(f=z),_(A));else A===I.rightChild&&(E===A.leftChild?(z=A.rotateRight(),I===f&&(f=z),_(A)):E===A.rightChild&&(A.color=u.default.TreeNodeColorType.black,I.color=u.default.TreeNodeColorType.red,z=I.rotateLeft(),I===f&&(f=z)))}};this.insert=function(E){if(E==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty())return++c,f.key=E,void(f.color=u.default.TreeNodeColorType.black);var A=y(f,E);A.key!==void 0&&i(A.key,E)===0||(++c,A.key=E,_(A),f.color=u.default.TreeNodeColorType.black)};var T=function(E,A){if(E&&E.key!==void 0){var S=i(A,E.key);return S<0?T(E.leftChild,A):S>0?T(E.rightChild,A):E}};this.find=function(E){var A=T(f,E);return A!==void 0&&A.key!==void 0&&i(A.key,E)===0};var D=function(E,A){if(E&&E.key!==void 0){var S=i(E.key,A);if(S===0)return E.key;if(S<0)return D(E.rightChild,A);var I=D(E.leftChild,A);return I!==void 0?I:E.key}};this.lowerBound=function(E){return D(f,E)};var F=function(E,A){if(E&&E.key!==void 0){if(i(E.key,A)<=0)return F(E.rightChild,A);var S=F(E.leftChild,A);return S!==void 0?S:E.key}};this.upperBound=function(E){return F(f,E)};var R=function(E,A){if(E&&E.key!==void 0){var S=i(E.key,A);if(S===0)return E.key;if(S>0)return R(E.leftChild,A);var I=R(E.rightChild,A);return I!==void 0?I:E.key}};this.reverseLowerBound=function(E){return R(f,E)};var X=function(E,A){if(E&&E.key!==void 0){if(i(E.key,A)>=0)return X(E.leftChild,A);var S=X(E.rightChild,A);return S!==void 0?S:E.key}};this.reverseUpperBound=function(E){return X(f,E)},this.union=function(E){var A=this;E.forEach(function(S){return A.insert(S)})},this.getHeight=function(){if(this.empty())return 0;var E=function(A){return A?Math.max(E(A.leftChild),E(A.rightChild))+1:1};return E(f)};var H=function(E){return o(this,function(A){switch(A.label){case 0:return E&&E.key!==void 0?[5,a(H(E.leftChild))]:[2];case 1:return A.sent(),[4,E.key];case 2:return A.sent(),[5,a(H(E.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return H(f)},s.forEach(function(E){return p.insert(E)}),Object.freeze(this)}Object.freeze(h),l.default=h},{"../Base/TreeNode":25}],34:[function(t,n,l){function o(a){var u=this;a===void 0&&(a=[]);var h=0,s=[];this.size=function(){return h},this.empty=function(){return h===0},this.clear=function(){h=0,s.length=0},this.push=function(i){s.push(i),++h},this.pop=function(){s.pop(),h>0&&--h},this.top=function(){return s[h-1]},a.forEach(function(i){return u.push(i)}),Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),Object.freeze(o),l.default=o},{}],35:[function(t,n,l){var o=this&&this.__generator||function(i,p){var c,f,d,v,m={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return v={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function b(g){return function(y){return function(_){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return m.label++,{value:_[1],done:!1};case 5:m.label++,f=_[1],_=[0];continue;case 7:_=m.ops.pop(),m.trys.pop();continue;default:if(!(d=(d=m.trys).length>0&&d[d.length-1])&&(_[0]===6||_[0]===2)){m=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]<d[3])){m.label=_[1];break}if(_[0]===6&&m.label<d[1]){m.label=d[1],d=_;break}if(d&&m.label<d[2]){m.label=d[2],m.ops.push(_);break}d[2]&&m.ops.pop(),m.trys.pop();continue}_=p.call(i,m)}catch(T){_=[6,T],f=0}finally{c=d=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([g,y])}}},a=this&&this.__read||function(i,p){var c=typeof Symbol=="function"&&i[Symbol.iterator];if(!c)return i;var f,d,v=c.call(i),m=[];try{for(;(p===void 0||p-- >0)&&!(f=v.next()).done;)m.push(f.value)}catch(b){d={error:b}}finally{try{f&&!f.done&&(c=v.return)&&c.call(v)}finally{if(d)throw d.error}}return m},u=this&&this.__spreadArray||function(i,p,c){if(c||arguments.length===2)for(var f,d=0,v=p.length;d<v;d++)!f&&d in p||(f||(f=Array.prototype.slice.call(p,0,d)),f[d]=p[d]);return i.concat(f||Array.prototype.slice.call(p))},h=this&&this.__values||function(i){var p=typeof Symbol=="function"&&Symbol.iterator,c=p&&i[p],f=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&f>=i.length&&(i=void 0),{value:i&&i[f++],done:!i}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};function s(i){var p=this;i===void 0&&(i=[]);var c=0,f=[];this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,f.length=0},this.front=function(){if(!this.empty())return f[0]},this.back=function(){if(!this.empty())return f[c-1]},this.forEach=function(d){f.forEach(d)},this.getElementByPos=function(d){if(d<0||d>=c)throw new Error("pos must more than 0 and less than vector's size");return f[d]},this.eraseElementByPos=function(d){if(d<0||d>=c)throw new Error("pos must more than 0 and less than vector's size");for(var v=d;v<c-1;++v)f[v]=f[v+1];this.popBack()},this.eraseElementByValue=function(d){var v=[];this.forEach(function(b){b!==d&&v.push(b)}),v.forEach(function(b,g){f[g]=b});for(var m=v.length;c>m;)this.popBack()},this.pushBack=function(d){f.push(d),++c},this.popBack=function(){f.pop(),c>0&&--c},this.setElementByPos=function(d,v){if(d<0||d>=c)throw new Error("pos must more than 0 and less than vector's size");f[d]=v},this.insert=function(d,v,m){if(m===void 0&&(m=1),d<0||d>c)throw new Error("pos must more than 0 and less than or equal to vector's size");f.splice.apply(f,u([d,0],a(new Array(m).fill(v)),!1)),c+=m},this.find=function(d){return f.includes(d)},this.reverse=function(){f.reverse()},this.unique=function(){var d,v=[];this.forEach(function(b,g){g!==0&&b===d||(v.push(b),d=b)}),v.forEach(function(b,g){f[g]=b});for(var m=v.length;c>m;)this.popBack()},this.sort=function(d){f.sort(d)},this[Symbol.iterator]=function(){return function(){return o(this,function(d){switch(d.label){case 0:return[5,h(f)];case 1:return[2,d.sent()]}})}()},i.forEach(function(d){return p.pushBack(d)}),Object.freeze(this)}Object.defineProperty(l,"__esModule",{value:!0}),Object.freeze(s),l.default=s},{}],36:[function(t,n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.HashMap=l.HashSet=l.Map=l.Set=l.PriorityQueue=l.Deque=l.LinkList=l.Queue=l.Stack=l.Vector=void 0;var o=t("./Vector/Vector");l.Vector=o.default;var a=t("./Stack/Stack");l.Stack=a.default;var u=t("./Queue/Queue");l.Queue=u.default;var h=t("./LinkList/LinkList");l.LinkList=h.default;var s=t("./Deque/Deque");l.Deque=s.default;var i=t("./PriorityQueue/PriorityQueue");l.PriorityQueue=i.default;var p=t("./Set/Set");l.Set=p.default;var c=t("./Map/Map");l.Map=c.default;var f=t("./HashSet/HashSet");l.HashSet=f.default;var d=t("./HashMap/HashMap");l.HashMap=d.default},{"./Deque/Deque":26,"./HashMap/HashMap":27,"./HashSet/HashSet":28,"./LinkList/LinkList":29,"./Map/Map":30,"./PriorityQueue/PriorityQueue":31,"./Queue/Queue":32,"./Set/Set":33,"./Stack/Stack":34,"./Vector/Vector":35}],37:[function(t,n,l){const o=t("yallist"),a=Symbol("max"),u=Symbol("length"),h=Symbol("lengthCalculator"),s=Symbol("allowStale"),i=Symbol("maxAge"),p=Symbol("dispose"),c=Symbol("noDisposeOnSet"),f=Symbol("lruList"),d=Symbol("cache"),v=Symbol("updateAgeOnGet"),m=()=>1,b=(F,R,X)=>{const H=F[d].get(R);if(H){const E=H.value;if(g(F,E)){if(_(F,H),!F[s])return}else X&&(F[v]&&(H.value.now=Date.now()),F[f].unshiftNode(H));return E.value}},g=(F,R)=>{if(!R||!R.maxAge&&!F[i])return!1;const X=Date.now()-R.now;return R.maxAge?X>R.maxAge:F[i]&&X>F[i]},y=F=>{if(F[u]>F[a])for(let R=F[f].tail;F[u]>F[a]&&R!==null;){const X=R.prev;_(F,R),R=X}},_=(F,R)=>{if(R){const X=R.value;F[p]&&F[p](X.key,X.value),F[u]-=X.length,F[d].delete(X.key),F[f].removeNode(R)}};class T{constructor(R,X,H,E,A){this.key=R,this.value=X,this.length=H,this.now=E,this.maxAge=A||0}}const D=(F,R,X,H)=>{let E=X.value;g(F,E)&&(_(F,X),F[s]||(E=void 0)),E&&R.call(H,E.value,E.key,F)};n.exports=class{constructor(F){if(typeof F=="number"&&(F={max:F}),F||(F={}),F.max&&(typeof F.max!="number"||F.max<0))throw new TypeError("max must be a non-negative number");this[a]=F.max||1/0;const R=F.length||m;if(this[h]=typeof R!="function"?m:R,this[s]=F.stale||!1,F.maxAge&&typeof F.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=F.maxAge||0,this[p]=F.dispose,this[c]=F.noDisposeOnSet||!1,this[v]=F.updateAgeOnGet||!1,this.reset()}set max(F){if(typeof F!="number"||F<0)throw new TypeError("max must be a non-negative number");this[a]=F||1/0,y(this)}get max(){return this[a]}set allowStale(F){this[s]=!!F}get allowStale(){return this[s]}set maxAge(F){if(typeof F!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=F,y(this)}get maxAge(){return this[i]}set lengthCalculator(F){typeof F!="function"&&(F=m),F!==this[h]&&(this[h]=F,this[u]=0,this[f].forEach(R=>{R.length=this[h](R.value,R.key),this[u]+=R.length})),y(this)}get lengthCalculator(){return this[h]}get length(){return this[u]}get itemCount(){return this[f].length}rforEach(F,R){R=R||this;for(let X=this[f].tail;X!==null;){const H=X.prev;D(this,F,X,R),X=H}}forEach(F,R){R=R||this;for(let X=this[f].head;X!==null;){const H=X.next;D(this,F,X,R),X=H}}keys(){return this[f].toArray().map(F=>F.key)}values(){return this[f].toArray().map(F=>F.value)}reset(){this[p]&&this[f]&&this[f].length&&this[f].forEach(F=>this[p](F.key,F.value)),this[d]=new Map,this[f]=new o,this[u]=0}dump(){return this[f].map(F=>!g(this,F)&&{k:F.key,v:F.value,e:F.now+(F.maxAge||0)}).toArray().filter(F=>F)}dumpLru(){return this[f]}set(F,R,X){if((X=X||this[i])&&typeof X!="number")throw new TypeError("maxAge must be a number");const H=X?Date.now():0,E=this[h](R,F);if(this[d].has(F)){if(E>this[a])return _(this,this[d].get(F)),!1;const S=this[d].get(F).value;return this[p]&&(this[c]||this[p](F,S.value)),S.now=H,S.maxAge=X,S.value=R,this[u]+=E-S.length,S.length=E,this.get(F),y(this),!0}const A=new T(F,R,E,H,X);return A.length>this[a]?(this[p]&&this[p](F,R),!1):(this[u]+=A.length,this[f].unshift(A),this[d].set(F,this[f].head),y(this),!0)}has(F){if(!this[d].has(F))return!1;const R=this[d].get(F).value;return!g(this,R)}get(F){return b(this,F,!0)}peek(F){return b(this,F,!1)}pop(){const F=this[f].tail;return F?(_(this,F),F.value):null}del(F){_(this,this[d].get(F))}load(F){this.reset();const R=Date.now();for(let X=F.length-1;X>=0;X--){const H=F[X],E=H.e||0;if(E===0)this.set(H.k,H.v);else{const A=E-R;A>0&&this.set(H.k,H.v,A)}}}prune(){this[d].forEach((F,R)=>b(this,R,!1))}}},{yallist:83}],38:[function(t,n,l){(function(o){(function(){const a=n.exports;a.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},a.codes={};for(const h in a.types){const s=a.types[h];a.codes[s]=h}a.CMD_SHIFT=4,a.CMD_MASK=240,a.DUP_MASK=8,a.QOS_MASK=3,a.QOS_SHIFT=1,a.RETAIN_MASK=1,a.VARBYTEINT_MASK=127,a.VARBYTEINT_FIN_MASK=128,a.VARBYTEINT_MAX=268435455,a.SESSIONPRESENT_MASK=1,a.SESSIONPRESENT_HEADER=o.from([a.SESSIONPRESENT_MASK]),a.CONNACK_HEADER=o.from([a.codes.connack<<a.CMD_SHIFT]),a.USERNAME_MASK=128,a.PASSWORD_MASK=64,a.WILL_RETAIN_MASK=32,a.WILL_QOS_MASK=24,a.WILL_QOS_SHIFT=3,a.WILL_FLAG_MASK=4,a.CLEAN_SESSION_MASK=2,a.CONNECT_HEADER=o.from([a.codes.connect<<a.CMD_SHIFT]),a.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},a.propertiesCodes={};for(const h in a.properties){const s=a.properties[h];a.propertiesCodes[s]=h}function u(h){return[0,1,2].map(s=>[0,1].map(i=>[0,1].map(p=>{const c=o.alloc(1);return c.writeUInt8(a.codes[h]<<a.CMD_SHIFT|(i?a.DUP_MASK:0)|s<<a.QOS_SHIFT|p,0,!0),c})))}a.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},a.PUBLISH_HEADER=u("publish"),a.SUBSCRIBE_HEADER=u("subscribe"),a.SUBSCRIBE_OPTIONS_QOS_MASK=3,a.SUBSCRIBE_OPTIONS_NL_MASK=1,a.SUBSCRIBE_OPTIONS_NL_SHIFT=2,a.SUBSCRIBE_OPTIONS_RAP_MASK=1,a.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,a.SUBSCRIBE_OPTIONS_RH_MASK=3,a.SUBSCRIBE_OPTIONS_RH_SHIFT=4,a.SUBSCRIBE_OPTIONS_RH=[0,16,32],a.SUBSCRIBE_OPTIONS_NL=4,a.SUBSCRIBE_OPTIONS_RAP=8,a.SUBSCRIBE_OPTIONS_QOS=[0,1,2],a.UNSUBSCRIBE_HEADER=u("unsubscribe"),a.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},a.SUBACK_HEADER=o.from([a.codes.suback<<a.CMD_SHIFT]),a.VERSION3=o.from([3]),a.VERSION4=o.from([4]),a.VERSION5=o.from([5]),a.VERSION131=o.from([131]),a.VERSION132=o.from([132]),a.QOS=[0,1,2].map(h=>o.from([h])),a.EMPTY={pingreq:o.from([a.codes.pingreq<<4,0]),pingresp:o.from([a.codes.pingresp<<4,0]),disconnect:o.from([a.codes.disconnect<<4,0])}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],39:[function(t,n,l){(function(o){(function(){const a=t("./writeToStream"),u=t("events");class h extends u{constructor(){super(),this._array=new Array(20),this._i=0}write(i){return this._array[this._i++]=i,!0}concat(){let i=0;const p=new Array(this._array.length),c=this._array;let f,d=0;for(f=0;f<c.length&&c[f]!==void 0;f++)typeof c[f]!="string"?p[f]=c[f].length:p[f]=o.byteLength(c[f]),i+=p[f];const v=o.allocUnsafe(i);for(f=0;f<c.length&&c[f]!==void 0;f++)typeof c[f]!="string"?(c[f].copy(v,d),d+=p[f]):(v.write(c[f],d),d+=p[f]);return v}}n.exports=function(s,i){const p=new h;return a(s,p,i),p.concat()}}).call(this)}).call(this,t("buffer").Buffer)},{"./writeToStream":44,buffer:17,events:22}],40:[function(t,n,l){l.parser=t("./parser").parser,l.generate=t("./generate"),l.writeToStream=t("./writeToStream")},{"./generate":39,"./parser":43,"./writeToStream":44}],41:[function(t,n,l){(function(o){(function(){const u={},h=o.isBuffer(o.from([1,2]).subarray(0,1));function s(i){const p=o.allocUnsafe(2);return p.writeUInt8(i>>8,0),p.writeUInt8(255&i,1),p}n.exports={cache:u,generateCache:function(){for(let i=0;i<65536;i++)u[i]=s(i)},generateNumber:s,genBufVariableByteInt:function(i){let p=0,c=0;const f=o.allocUnsafe(4);do p=i%128|0,(i=i/128|0)>0&&(p|=128),f.writeUInt8(p,c++);while(i>0&&c<4);return i>0&&(c=0),h?f.subarray(0,c):f.slice(0,c)},generate4ByteBuffer:function(i){const p=o.allocUnsafe(4);return p.writeUInt32BE(i,0),p}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],42:[function(t,n,l){n.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],43:[function(t,n,l){const o=t("bl"),a=t("events"),u=t("./packet"),h=t("./constants"),s=t("debug")("mqtt-packet:parser");class i extends a{constructor(){super(),this.parser=this.constructor.parser}static parser(c){return this instanceof i?(this.settings=c||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new i().parser(c)}_resetState(){s("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new u,this.error=null,this._list=o(),this._stateCounter=0}parse(c){for(this.error&&this._resetState(),this._list.append(c),s("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,s("parse: state complete. _stateCounter is now: %d",this._stateCounter),s("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return s("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const c=this._list.readUInt8(0);return this.packet.cmd=h.types[c>>h.CMD_SHIFT],this.packet.retain=(c&h.RETAIN_MASK)!=0,this.packet.qos=c>>h.QOS_SHIFT&h.QOS_MASK,this.packet.dup=(c&h.DUP_MASK)!=0,s("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const c=this._parseVarByteNum(!0);return c&&(this.packet.length=c.value,this._list.consume(c.bytes)),s("_parseLength %d",c.value),!!c}_parsePayload(){s("_parsePayload: payload %O",this._list);let c=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}c=!0}return s("_parsePayload complete result: %s",c),c}_parseConnect(){let c,f,d,v;s("_parseConnect");const m={},b=this.packet,g=this._parseString();if(g===null)return this._emitError(new Error("Cannot parse protocolId"));if(g!=="MQTT"&&g!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(b.protocolId=g,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(b.protocolVersion=this._list.readUInt8(this._pos),b.protocolVersion>=128&&(b.bridgeMode=!0,b.protocolVersion=b.protocolVersion-128),b.protocolVersion!==3&&b.protocolVersion!==4&&b.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(m.username=this._list.readUInt8(this._pos)&h.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&h.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&h.WILL_FLAG_MASK,m.will&&(b.will={},b.will.retain=(this._list.readUInt8(this._pos)&h.WILL_RETAIN_MASK)!=0,b.will.qos=(this._list.readUInt8(this._pos)&h.WILL_QOS_MASK)>>h.WILL_QOS_SHIFT),b.clean=(this._list.readUInt8(this._pos)&h.CLEAN_SESSION_MASK)!=0,this._pos++,b.keepalive=this._parseNum(),b.keepalive===-1)return this._emitError(new Error("Packet too short"));if(b.protocolVersion===5){const _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(b.properties=_)}const y=this._parseString();if(y===null)return this._emitError(new Error("Packet too short"));if(b.clientId=y,s("_parseConnect: packet.clientId: %s",b.clientId),m.will){if(b.protocolVersion===5){const _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(b.will.properties=_)}if((c=this._parseString())===null)return this._emitError(new Error("Cannot parse will topic"));if(b.will.topic=c,s("_parseConnect: packet.will.topic: %s",b.will.topic),(f=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse will payload"));b.will.payload=f,s("_parseConnect: packet.will.paylaod: %s",b.will.payload)}if(m.username){if((v=this._parseString())===null)return this._emitError(new Error("Cannot parse username"));b.username=v,s("_parseConnect: packet.username: %s",b.username)}if(m.password){if((d=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse password"));b.password=d}return this.settings=b,s("_parseConnect: complete"),b}_parseConnack(){s("_parseConnack");const c=this.packet;if(this._list.length<1)return null;if(c.sessionPresent=!!(this._list.readUInt8(this._pos++)&h.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?c.reasonCode=this._list.readUInt8(this._pos++):c.reasonCode=0;else{if(this._list.length<2)return null;c.returnCode=this._list.readUInt8(this._pos++)}if(c.returnCode===-1||c.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}s("_parseConnack: complete")}_parsePublish(){s("_parsePublish");const c=this.packet;if(c.topic=this._parseString(),c.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(c.qos>0)||this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}c.payload=this._list.slice(this._pos,c.length),s("_parsePublish: payload from buffer list: %o",c.payload)}}_parseSubscribe(){s("_parseSubscribe");const c=this.packet;let f,d,v,m,b,g,y;if(c.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(c.subscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(c.properties=_)}for(;this._pos<c.length;){if((f=this._parseString())===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=c.length)return this._emitError(new Error("Malformed Subscribe Payload"));v=(d=this._parseByte())&h.SUBSCRIBE_OPTIONS_QOS_MASK,g=(d>>h.SUBSCRIBE_OPTIONS_NL_SHIFT&h.SUBSCRIBE_OPTIONS_NL_MASK)!=0,b=(d>>h.SUBSCRIBE_OPTIONS_RAP_SHIFT&h.SUBSCRIBE_OPTIONS_RAP_MASK)!=0,m=d>>h.SUBSCRIBE_OPTIONS_RH_SHIFT&h.SUBSCRIBE_OPTIONS_RH_MASK,y={topic:f,qos:v},this.settings.protocolVersion===5?(y.nl=g,y.rap=b,y.rh=m):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",y),c.subscriptions.push(y)}}}_parseSuback(){s("_parseSuback");const c=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){s("_parseUnsubscribe");const c=this.packet;if(c.unsubscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}for(;this._pos<c.length;){const f=this._parseString();if(f===null)return this._emitError(new Error("Cannot parse topic"));s("_parseUnsubscribe: push topic `%s` to unsubscriptions",f),c.unsubscriptions.push(f)}}}_parseUnsuback(){s("_parseUnsuback");const c=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(this.settings.protocolVersion===5){const f=this._parseProperties();for(Object.getOwnPropertyNames(f).length&&(c.properties=f),c.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){s("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const c=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5&&(c.length>2?(c.reasonCode=this._parseByte(),s("_parseConfirmation: packet.reasonCode `%d`",c.reasonCode)):c.reasonCode=0,c.length>3)){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}return!0}_parseDisconnect(){const c=this.packet;if(s("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?c.reasonCode=this._parseByte():c.reasonCode=0;const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(c.properties=f)}return s("_parseDisconnect result: true"),!0}_parseAuth(){s("_parseAuth");const c=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));c.reasonCode=this._parseByte();const f=this._parseProperties();return Object.getOwnPropertyNames(f).length&&(c.properties=f),s("_parseAuth: result: true"),!0}_parseMessageId(){const c=this.packet;return c.messageId=this._parseNum(),c.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(s("_parseMessageId: packet.messageId %d",c.messageId),!0)}_parseString(c){const f=this._parseNum(),d=f+this._pos;if(f===-1||d>this._list.length||d>this.packet.length)return null;const v=this._list.toString("utf8",this._pos,d);return this._pos+=f,s("_parseString: result: %s",v),v}_parseStringPair(){return s("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const c=this._parseNum(),f=c+this._pos;if(c===-1||f>this._list.length||f>this.packet.length)return null;const d=this._list.slice(this._pos,f);return this._pos+=c,s("_parseBuffer: result: %o",d),d}_parseNum(){if(this._list.length-this._pos<2)return-1;const c=this._list.readUInt16BE(this._pos);return this._pos+=2,s("_parseNum: result: %s",c),c}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const c=this._list.readUInt32BE(this._pos);return this._pos+=4,s("_parse4ByteNum: result: %s",c),c}_parseVarByteNum(c){s("_parseVarByteNum");let f,d=0,v=1,m=0,b=!1;const g=this._pos?this._pos:0;for(;d<4&&g+d<this._list.length;){if(m+=v*((f=this._list.readUInt8(g+d++))&h.VARBYTEINT_MASK),v*=128,(f&h.VARBYTEINT_FIN_MASK)==0){b=!0;break}if(this._list.length<=d)break}return!b&&d===4&&this._list.length>=d&&this._emitError(new Error("Invalid variable byte integer")),g&&(this._pos+=d),s("_parseVarByteNum: result: %o",b=!!b&&(c?{bytes:d,value:m}:m)),b}_parseByte(){let c;return this._pos<this._list.length&&(c=this._list.readUInt8(this._pos),this._pos++),s("_parseByte: result: %o",c),c}_parseByType(c){switch(s("_parseByType: type: %s",c),c){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){s("_parseProperties");const c=this._parseVarByteNum(),f=this._pos+c,d={};for(;this._pos<f;){const v=this._parseByte();if(!v)return this._emitError(new Error("Cannot parse property code type")),!1;const m=h.propertiesCodes[v];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m!=="userProperties")d[m]?Array.isArray(d[m])?d[m].push(this._parseByType(h.propertiesTypes[m])):(d[m]=[d[m]],d[m].push(this._parseByType(h.propertiesTypes[m]))):d[m]=this._parseByType(h.propertiesTypes[m]);else{d[m]||(d[m]=Object.create(null));const b=this._parseByType(h.propertiesTypes[m]);if(d[m][b.name])if(Array.isArray(d[m][b.name]))d[m][b.name].push(b.value);else{const g=d[m][b.name];d[m][b.name]=[g],d[m][b.name].push(b.value)}else d[m][b.name]=b.value}}return d}_newPacket(){return s("_newPacket"),this.packet&&(this._list.consume(this.packet.length),s("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),s("_newPacket: new packet"),this.packet=new u,this._pos=0,!0}_emitError(c){s("_emitError"),this.error=c,this.emit("error",c)}}n.exports=i},{"./constants":38,"./packet":42,bl:15,debug:18,events:22}],44:[function(t,n,l){(function(o){(function(){const a=t("./constants"),u=o.allocUnsafe(0),h=o.from([0]),s=t("./numbers"),i=t("process-nextick-args").nextTick,p=t("debug")("mqtt-packet:writeToStream"),c=s.cache,f=s.generateNumber,d=s.generateCache,v=s.genBufVariableByteInt,m=s.generate4ByteBuffer;let b=X,g=!0;function y(W,q,G){switch(p("generate called"),q.cork&&(q.cork(),i(_,q)),g&&(g=!1,d()),p("generate: packet.cmd: %s",W.cmd),W.cmd){case"connect":return function(U,L,Y){const P=U||{},J=P.protocolId||"MQTT";let ne=P.protocolVersion||4;const ie=P.will;let ae=P.clean;const x=P.keepalive||0,w=P.clientId||"",k=P.username,j=P.password,Z=P.properties;ae===void 0&&(ae=!0);let ee=0;if(typeof J!="string"&&!o.isBuffer(J))return L.emit("error",new Error("Invalid protocolId")),!1;if(ee+=J.length+2,ne!==3&&ne!==4&&ne!==5)return L.emit("error",new Error("Invalid protocol version")),!1;if(ee+=1,(typeof w=="string"||o.isBuffer(w))&&(w||ne>=4)&&(w||ae))ee+=o.byteLength(w)+2;else{if(ne<4)return L.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*ae==0)return L.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof x!="number"||x<0||x>65535||x%1!=0)return L.emit("error",new Error("Invalid keepalive")),!1;if(ee+=2,ee+=1,ne===5){var re=A(L,Z);if(!re)return!1;ee+=re.length}if(ie){if(typeof ie!="object")return L.emit("error",new Error("Invalid will")),!1;if(!ie.topic||typeof ie.topic!="string")return L.emit("error",new Error("Invalid will topic")),!1;if(ee+=o.byteLength(ie.topic)+2,ee+=2,ie.payload){if(!(ie.payload.length>=0))return L.emit("error",new Error("Invalid will payload")),!1;typeof ie.payload=="string"?ee+=o.byteLength(ie.payload):ee+=ie.payload.length}var M={};if(ne===5){if(!(M=A(L,ie.properties)))return!1;ee+=M.length}}let C=!1;if(k!=null){if(!te(k))return L.emit("error",new Error("Invalid username")),!1;C=!0,ee+=o.byteLength(k)+2}if(j!=null){if(!C)return L.emit("error",new Error("Username is required to use password")),!1;if(!te(j))return L.emit("error",new Error("Invalid password")),!1;ee+=V(j)+2}L.write(a.CONNECT_HEADER),D(L,ee),E(L,J),P.bridgeMode&&(ne+=128),L.write(ne===131?a.VERSION131:ne===132?a.VERSION132:ne===4?a.VERSION4:ne===5?a.VERSION5:a.VERSION3);let B=0;return B|=k!=null?a.USERNAME_MASK:0,B|=j!=null?a.PASSWORD_MASK:0,B|=ie&&ie.retain?a.WILL_RETAIN_MASK:0,B|=ie&&ie.qos?ie.qos<<a.WILL_QOS_SHIFT:0,B|=ie?a.WILL_FLAG_MASK:0,B|=ae?a.CLEAN_SESSION_MASK:0,L.write(o.from([B])),b(L,x),ne===5&&re.write(),E(L,w),ie&&(ne===5&&M.write(),F(L,ie.topic),E(L,ie.payload)),k!=null&&E(L,k),j!=null&&E(L,j),!0}(W,q);case"connack":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=P===5?J.reasonCode:J.returnCode,ie=J.properties;let ae=2;if(typeof ne!="number")return L.emit("error",new Error("Invalid return code")),!1;let x=null;if(P===5){if(!(x=A(L,ie)))return!1;ae+=x.length}return L.write(a.CONNACK_HEADER),D(L,ae),L.write(J.sessionPresent?a.SESSIONPRESENT_HEADER:h),L.write(o.from([ne])),x!=null&&x.write(),!0}(W,q,G);case"publish":return function(U,L,Y){p("publish: packet: %o",U);const P=Y?Y.protocolVersion:4,J=U||{},ne=J.qos||0,ie=J.retain?a.RETAIN_MASK:0,ae=J.topic,x=J.payload||u,w=J.messageId,k=J.properties;let j=0;if(typeof ae=="string")j+=o.byteLength(ae)+2;else{if(!o.isBuffer(ae))return L.emit("error",new Error("Invalid topic")),!1;j+=ae.length+2}if(o.isBuffer(x)?j+=x.length:j+=o.byteLength(x),ne&&typeof w!="number")return L.emit("error",new Error("Invalid messageId")),!1;ne&&(j+=2);let Z=null;if(P===5){if(!(Z=A(L,k)))return!1;j+=Z.length}return L.write(a.PUBLISH_HEADER[ne][J.dup?1:0][ie?1:0]),D(L,j),b(L,V(ae)),L.write(ae),ne>0&&b(L,w),Z!=null&&Z.write(),p("publish: payload: %o",x),L.write(x)}(W,q,G);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=J.cmd||"puback",ie=J.messageId,ae=J.dup&&ne==="pubrel"?a.DUP_MASK:0;let x=0;const w=J.reasonCode,k=J.properties;let j=P===5?3:2;if(ne==="pubrel"&&(x=1),typeof ie!="number")return L.emit("error",new Error("Invalid messageId")),!1;let Z=null;if(P===5&&typeof k=="object"){if(!(Z=S(L,k,Y,j)))return!1;j+=Z.length}return L.write(a.ACKS[ne][x][ae][0]),D(L,j),b(L,ie),P===5&&L.write(o.from([w])),Z!==null&&Z.write(),!0}(W,q,G);case"subscribe":return function(U,L,Y){p("subscribe: packet: ");const P=Y?Y.protocolVersion:4,J=U||{},ne=J.dup?a.DUP_MASK:0,ie=J.messageId,ae=J.subscriptions,x=J.properties;let w=0;if(typeof ie!="number")return L.emit("error",new Error("Invalid messageId")),!1;w+=2;let k=null;if(P===5){if(!(k=A(L,x)))return!1;w+=k.length}if(typeof ae!="object"||!ae.length)return L.emit("error",new Error("Invalid subscriptions")),!1;for(let Z=0;Z<ae.length;Z+=1){const ee=ae[Z].topic,re=ae[Z].qos;if(typeof ee!="string")return L.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof re!="number")return L.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(P===5){if(typeof(ae[Z].nl||!1)!="boolean")return L.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ae[Z].rap||!1)!="boolean")return L.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const B=ae[Z].rh||0;if(typeof B!="number"||B>2)return L.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}w+=o.byteLength(ee)+2+1}p("subscribe: writing to stream: %o",a.SUBSCRIBE_HEADER),L.write(a.SUBSCRIBE_HEADER[1][ne?1:0][0]),D(L,w),b(L,ie),k!==null&&k.write();let j=!0;for(const Z of ae){const ee=Z.topic,re=Z.qos,M=+Z.nl,C=+Z.rap,B=Z.rh;let K;F(L,ee),K=a.SUBSCRIBE_OPTIONS_QOS[re],P===5&&(K|=M?a.SUBSCRIBE_OPTIONS_NL:0,K|=C?a.SUBSCRIBE_OPTIONS_RAP:0,K|=B?a.SUBSCRIBE_OPTIONS_RH[B]:0),j=L.write(o.from([K]))}return j}(W,q,G);case"suback":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=J.messageId,ie=J.granted,ae=J.properties;let x=0;if(typeof ne!="number")return L.emit("error",new Error("Invalid messageId")),!1;if(x+=2,typeof ie!="object"||!ie.length)return L.emit("error",new Error("Invalid qos vector")),!1;for(let k=0;k<ie.length;k+=1){if(typeof ie[k]!="number")return L.emit("error",new Error("Invalid qos vector")),!1;x+=1}let w=null;if(P===5){if(!(w=S(L,ae,Y,x)))return!1;x+=w.length}return L.write(a.SUBACK_HEADER),D(L,x),b(L,ne),w!==null&&w.write(),L.write(o.from(ie))}(W,q,G);case"unsubscribe":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=J.messageId,ie=J.dup?a.DUP_MASK:0,ae=J.unsubscriptions,x=J.properties;let w=0;if(typeof ne!="number")return L.emit("error",new Error("Invalid messageId")),!1;if(w+=2,typeof ae!="object"||!ae.length)return L.emit("error",new Error("Invalid unsubscriptions")),!1;for(let Z=0;Z<ae.length;Z+=1){if(typeof ae[Z]!="string")return L.emit("error",new Error("Invalid unsubscriptions")),!1;w+=o.byteLength(ae[Z])+2}let k=null;if(P===5){if(!(k=A(L,x)))return!1;w+=k.length}L.write(a.UNSUBSCRIBE_HEADER[1][ie?1:0][0]),D(L,w),b(L,ne),k!==null&&k.write();let j=!0;for(let Z=0;Z<ae.length;Z++)j=F(L,ae[Z]);return j}(W,q,G);case"unsuback":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=J.messageId,ie=J.dup?a.DUP_MASK:0,ae=J.granted,x=J.properties,w=J.cmd;let k=2;if(typeof ne!="number")return L.emit("error",new Error("Invalid messageId")),!1;if(P===5){if(typeof ae!="object"||!ae.length)return L.emit("error",new Error("Invalid qos vector")),!1;for(let Z=0;Z<ae.length;Z+=1){if(typeof ae[Z]!="number")return L.emit("error",new Error("Invalid qos vector")),!1;k+=1}}let j=null;if(P===5){if(!(j=S(L,x,Y,k)))return!1;k+=j.length}return L.write(a.ACKS[w][0][ie][0]),D(L,k),b(L,ne),j!==null&&j.write(),P===5&&L.write(o.from(ae)),!0}(W,q,G);case"pingreq":case"pingresp":return function(U,L,Y){return L.write(a.EMPTY[U.cmd])}(W,q);case"disconnect":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=J.reasonCode,ie=J.properties;let ae=P===5?1:0,x=null;if(P===5){if(!(x=S(L,ie,Y,ae)))return!1;ae+=x.length}return L.write(o.from([a.codes.disconnect<<4])),D(L,ae),P===5&&L.write(o.from([ne])),x!==null&&x.write(),!0}(W,q,G);case"auth":return function(U,L,Y){const P=Y?Y.protocolVersion:4,J=U||{},ne=J.reasonCode,ie=J.properties;let ae=P===5?1:0;P!==5&&L.emit("error",new Error("Invalid mqtt version for auth packet"));const x=S(L,ie,Y,ae);return x?(ae+=x.length,L.write(o.from([a.codes.auth<<4])),D(L,ae),L.write(o.from([ne])),x!==null&&x.write(),!0):!1}(W,q,G);default:return q.emit("error",new Error("Unknown command")),!1}}function _(W){W.uncork()}Object.defineProperty(y,"cacheNumbers",{get:()=>b===X,set(W){W?(c&&Object.keys(c).length!==0||(g=!0),b=X):(g=!1,b=H)}});const T={};function D(W,q){if(q>a.VARBYTEINT_MAX)return W.emit("error",new Error(`Invalid variable byte integer: ${q}`)),!1;let G=T[q];return G||(G=v(q),q<16384&&(T[q]=G)),p("writeVarByteInt: writing to stream: %o",G),W.write(G)}function F(W,q){const G=o.byteLength(q);return b(W,G),p("writeString: %s",q),W.write(q,"utf8")}function R(W,q,G){F(W,q),F(W,G)}function X(W,q){return p("writeNumberCached: number: %d",q),p("writeNumberCached: %o",c[q]),W.write(c[q])}function H(W,q){const G=f(q);return p("writeNumberGenerated: %o",G),W.write(G)}function E(W,q){typeof q=="string"?F(W,q):q?(b(W,q.length),W.write(q)):b(W,0)}function A(W,q){if(typeof q!="object"||q.length!=null)return{length:1,write(){z(W,{},0)}};let G=0;function U(L,Y){let P=0;switch(a.propertiesTypes[L]){case"byte":if(typeof Y!="boolean")return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=2;break;case"int8":if(typeof Y!="number"||Y<0||Y>255)return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=2;break;case"binary":if(Y&&Y===null)return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=1+o.byteLength(Y)+2;break;case"int16":if(typeof Y!="number"||Y<0||Y>65535)return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=3;break;case"int32":if(typeof Y!="number"||Y<0||Y>4294967295)return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=5;break;case"var":if(typeof Y!="number"||Y<0||Y>268435455)return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=1+o.byteLength(v(Y));break;case"string":if(typeof Y!="string")return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=3+o.byteLength(Y.toString());break;case"pair":if(typeof Y!="object")return W.emit("error",new Error(`Invalid ${L}: ${Y}`)),!1;P+=Object.getOwnPropertyNames(Y).reduce((J,ne)=>{const ie=Y[ne];return Array.isArray(ie)?J+=ie.reduce((ae,x)=>ae+=3+o.byteLength(ne.toString())+2+o.byteLength(x.toString()),0):J+=3+o.byteLength(ne.toString())+2+o.byteLength(Y[ne].toString()),J},0);break;default:return W.emit("error",new Error(`Invalid property ${L}: ${Y}`)),!1}return P}if(q)for(const L in q){let Y=0,P=0;const J=q[L];if(Array.isArray(J))for(let ne=0;ne<J.length;ne++){if(!(P=U(L,J[ne])))return!1;Y+=P}else{if(!(P=U(L,J)))return!1;Y=P}if(!Y)return!1;G+=Y}return{length:o.byteLength(v(G))+G,write(){z(W,q,G)}}}function S(W,q,G,U){const L=["reasonString","userProperties"],Y=G&&G.properties&&G.properties.maximumPacketSize?G.properties.maximumPacketSize:0;let P=A(W,q);if(Y)for(;U+P.length>Y;){const J=L.shift();if(!J||!q[J])return!1;delete q[J],P=A(W,q)}return P}function I(W,q,G){switch(a.propertiesTypes[q]){case"byte":W.write(o.from([a.properties[q]])),W.write(o.from([+G]));break;case"int8":W.write(o.from([a.properties[q]])),W.write(o.from([G]));break;case"binary":W.write(o.from([a.properties[q]])),E(W,G);break;case"int16":W.write(o.from([a.properties[q]])),b(W,G);break;case"int32":W.write(o.from([a.properties[q]])),function(U,L){const Y=m(L);p("write4ByteNumber: %o",Y),U.write(Y)}(W,G);break;case"var":W.write(o.from([a.properties[q]])),D(W,G);break;case"string":W.write(o.from([a.properties[q]])),F(W,G);break;case"pair":Object.getOwnPropertyNames(G).forEach(U=>{const L=G[U];Array.isArray(L)?L.forEach(Y=>{W.write(o.from([a.properties[q]])),R(W,U.toString(),Y.toString())}):(W.write(o.from([a.properties[q]])),R(W,U.toString(),L.toString()))});break;default:return W.emit("error",new Error(`Invalid property ${q} value: ${G}`)),!1}}function z(W,q,G){D(W,G);for(const U in q)if(Object.prototype.hasOwnProperty.call(q,U)&&q[U]!==null){const L=q[U];if(Array.isArray(L))for(let Y=0;Y<L.length;Y++)I(W,U,L[Y]);else I(W,U,L)}}function V(W){return W?W instanceof o?W.length:o.byteLength(W):0}function te(W){return typeof W=="string"||W instanceof o}n.exports=y}).call(this)}).call(this,t("buffer").Buffer)},{"./constants":38,"./numbers":41,buffer:17,debug:18,"process-nextick-args":49}],45:[function(t,n,l){var o=1e3,a=60*o,u=60*a,h=24*u,s=7*h,i=365.25*h;function p(c,f,d,v){var m=f>=1.5*d;return Math.round(c/d)+" "+v+(m?"s":"")}n.exports=function(c,f){f=f||{};var d=typeof c;if(d==="string"&&c.length>0)return function(v){if(!((v=String(v)).length>100)){var m=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(v);if(m){var b=parseFloat(m[1]);switch((m[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return b*i;case"weeks":case"week":case"w":return b*s;case"days":case"day":case"d":return b*h;case"hours":case"hour":case"hrs":case"hr":case"h":return b*u;case"minutes":case"minute":case"mins":case"min":case"m":return b*a;case"seconds":case"second":case"secs":case"sec":case"s":return b*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return b;default:return}}}}(c);if(d==="number"&&isFinite(c))return f.long?function(v){var m=Math.abs(v);return m>=h?p(v,m,h,"day"):m>=u?p(v,m,u,"hour"):m>=a?p(v,m,a,"minute"):m>=o?p(v,m,o,"second"):v+" ms"}(c):function(v){var m=Math.abs(v);return m>=h?Math.round(v/h)+"d":m>=u?Math.round(v/u)+"h":m>=a?Math.round(v/a)+"m":m>=o?Math.round(v/o)+"s":v+"ms"}(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))}},{}],46:[function(t,n,l){const o=t("./lib/number-allocator.js");n.exports.NumberAllocator=o},{"./lib/number-allocator.js":47}],47:[function(t,n,l){const o=t("js-sdsl").Set,a=t("debug")("number-allocator:trace"),u=t("debug")("number-allocator:error");function h(i,p){this.low=i,this.high=p}function s(i,p){if(!(this instanceof s))return new s(i,p);this.min=i,this.max=p,this.ss=new o([],(c,f)=>c.compare(f)),a("Create"),this.clear()}h.prototype.equals=function(i){return this.low===i.low&&this.high===i.high},h.prototype.compare=function(i){return this.low<i.low&&this.high<i.low?-1:i.low<this.low&&i.high<this.low?1:0},s.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},s.prototype.alloc=function(){if(this.ss.size()===0)return a("alloc():empty"),null;const i=this.ss.front(),p=i.low;return p+1<=i.high?++i.low:this.ss.eraseElementByPos(0),a("alloc():"+p),p},s.prototype.use=function(i){const p=new h(i,i),c=this.ss.lowerBound(p);if(c){if(c.equals(p))return this.ss.eraseElementByValue(c),a("use():"+i),!0;if(c.low>i)return!1;if(c.low===i)return++c.low,a("use():"+i),!0;if(c.high===i)return--c.high,a("use():"+i),!0;const f=c.low;return c.low=i+1,this.ss.insert(new h(f,i-1)),a("use():"+i),!0}return a("use():failed"),!1},s.prototype.free=function(i){if(i<this.min||i>this.max)return void u("free():"+i+" is out of range");const p=new h(i,i),c=this.ss.lowerBound(p);if(c){if(c.low<=i&&i<=c.high)return void u("free():"+i+" has already been vacant");if(c===this.ss.front())i+1===c.low?--c.low:this.ss.insert(p);else{const f=this.ss.reverseLowerBound(p);f.high+1===i?i+1===c.low?(this.ss.eraseElementByValue(f),c.low=f.low):f.high=i:i+1===c.low?c.low=i:this.ss.insert(p)}}else{if(c===this.ss.front())return void this.ss.insert(p);const f=this.ss.reverseLowerBound(p);f.high+1===i?f.high=i:this.ss.insert(p)}a("free():"+i)},s.prototype.clear=function(){a("clear()"),this.ss.clear(),this.ss.insert(new h(this.min,this.max))},s.prototype.intervalCount=function(){return this.ss.size()},s.prototype.dump=function(){console.log("length:"+this.ss.size());for(const i of this.ss)console.log(i)},n.exports=s},{debug:18,"js-sdsl":36}],48:[function(t,n,l){var o=t("wrappy");function a(h){var s=function(){return s.called?s.value:(s.called=!0,s.value=h.apply(this,arguments))};return s.called=!1,s}function u(h){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=h.apply(this,arguments)},i=h.name||"Function wrapped with `once`";return s.onceError=i+" shouldn't be called more than once",s.called=!1,s}n.exports=o(a),n.exports.strict=o(u),a.proto=a(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return a(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u(this)},configurable:!0})})},{wrappy:79}],49:[function(t,n,l){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?n.exports={nextTick:function(a,u,h,s){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var i,p,c=arguments.length;switch(c){case 0:case 1:return o.nextTick(a);case 2:return o.nextTick(function(){a.call(null,u)});case 3:return o.nextTick(function(){a.call(null,u,h)});case 4:return o.nextTick(function(){a.call(null,u,h,s)});default:for(i=new Array(c-1),p=0;p<i.length;)i[p++]=arguments[p];return o.nextTick(function(){a.apply(null,i)})}}}:n.exports=o}).call(this)}).call(this,t("_process"))},{_process:50}],50:[function(t,n,l){var o,a,u=n.exports={};function h(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(y){if(o===setTimeout)return setTimeout(y,0);if((o===h||!o)&&setTimeout)return o=setTimeout,setTimeout(y,0);try{return o(y,0)}catch(_){try{return o.call(null,y,0)}catch(T){return o.call(this,y,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:h}catch(y){o=h}try{a=typeof clearTimeout=="function"?clearTimeout:s}catch(y){a=s}})();var p,c=[],f=!1,d=-1;function v(){f&&p&&(f=!1,p.length?c=p.concat(c):d=-1,c.length&&m())}function m(){if(!f){var y=i(v);f=!0;for(var _=c.length;_;){for(p=c,c=[];++d<_;)p&&p[d].run();d=-1,_=c.length}p=null,f=!1,function(T){if(a===clearTimeout)return clearTimeout(T);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(T);try{a(T)}catch(D){try{return a.call(null,T)}catch(F){return a.call(this,T)}}}(y)}}function b(y,_){this.fun=y,this.array=_}function g(){}u.nextTick=function(y){var _=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)_[T-1]=arguments[T];c.push(new b(y,_)),c.length!==1||f||i(m)},b.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=g,u.addListener=g,u.once=g,u.off=g,u.removeListener=g,u.removeAllListeners=g,u.emit=g,u.prependListener=g,u.prependOnceListener=g,u.listeners=function(y){return[]},u.binding=function(y){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(y){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],51:[function(t,n,l){(function(o){(function(){(function(a){var u=typeof l=="object"&&l&&!l.nodeType&&l,h=typeof n=="object"&&n&&!n.nodeType&&n,s=typeof o=="object"&&o;s.global!==s&&s.window!==s&&s.self!==s||(a=s);var i,p,c=2147483647,f=36,d=1,v=26,m=38,b=700,g=72,y=128,_="-",T=/^xn--/,D=/[^\x20-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=f-d,H=Math.floor,E=String.fromCharCode;function A(U){throw new RangeError(R[U])}function S(U,L){for(var Y=U.length,P=[];Y--;)P[Y]=L(U[Y]);return P}function I(U,L){var Y=U.split("@"),P="";return Y.length>1&&(P=Y[0]+"@",U=Y[1]),P+S((U=U.replace(F,".")).split("."),L).join(".")}function z(U){for(var L,Y,P=[],J=0,ne=U.length;J<ne;)(L=U.charCodeAt(J++))>=55296&&L<=56319&&J<ne?(64512&(Y=U.charCodeAt(J++)))==56320?P.push(((1023&L)<<10)+(1023&Y)+65536):(P.push(L),J--):P.push(L);return P}function V(U){return S(U,function(L){var Y="";return L>65535&&(Y+=E((L-=65536)>>>10&1023|55296),L=56320|1023&L),Y+=E(L)}).join("")}function te(U,L){return U+22+75*(U<26)-((L!=0)<<5)}function W(U,L,Y){var P=0;for(U=Y?H(U/b):U>>1,U+=H(U/L);U>X*v>>1;P+=f)U=H(U/X);return H(P+(X+1)*U/(U+m))}function q(U){var L,Y,P,J,ne,ie,ae,x,w,k,j,Z=[],ee=U.length,re=0,M=y,C=g;for((Y=U.lastIndexOf(_))<0&&(Y=0),P=0;P<Y;++P)U.charCodeAt(P)>=128&&A("not-basic"),Z.push(U.charCodeAt(P));for(J=Y>0?Y+1:0;J<ee;){for(ne=re,ie=1,ae=f;J>=ee&&A("invalid-input"),((x=(j=U.charCodeAt(J++))-48<10?j-22:j-65<26?j-65:j-97<26?j-97:f)>=f||x>H((c-re)/ie))&&A("overflow"),re+=x*ie,!(x<(w=ae<=C?d:ae>=C+v?v:ae-C));ae+=f)ie>H(c/(k=f-w))&&A("overflow"),ie*=k;C=W(re-ne,L=Z.length+1,ne==0),H(re/L)>c-M&&A("overflow"),M+=H(re/L),re%=L,Z.splice(re++,0,M)}return V(Z)}function G(U){var L,Y,P,J,ne,ie,ae,x,w,k,j,Z,ee,re,M,C=[];for(Z=(U=z(U)).length,L=y,Y=0,ne=g,ie=0;ie<Z;++ie)(j=U[ie])<128&&C.push(E(j));for(P=J=C.length,J&&C.push(_);P<Z;){for(ae=c,ie=0;ie<Z;++ie)(j=U[ie])>=L&&j<ae&&(ae=j);for(ae-L>H((c-Y)/(ee=P+1))&&A("overflow"),Y+=(ae-L)*ee,L=ae,ie=0;ie<Z;++ie)if((j=U[ie])<L&&++Y>c&&A("overflow"),j==L){for(x=Y,w=f;!(x<(k=w<=ne?d:w>=ne+v?v:w-ne));w+=f)M=x-k,re=f-k,C.push(E(te(k+M%re,0))),x=H(M/re);C.push(E(te(x,0))),ne=W(Y,ee,P==J),Y=0,++P}++Y,++L}return C.join("")}if(i={version:"1.4.1",ucs2:{decode:z,encode:V},decode:q,encode:G,toASCII:function(U){return I(U,function(L){return D.test(L)?"xn--"+G(L):L})},toUnicode:function(U){return I(U,function(L){return T.test(L)?q(L.slice(4).toLowerCase()):L})}},u&&h)if(n.exports==u)h.exports=i;else for(p in i)i.hasOwnProperty(p)&&(u[p]=i[p]);else a.punycode=i})(this)}).call(this)}).call(this,typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],52:[function(t,n,l){function o(u,h){return Object.prototype.hasOwnProperty.call(u,h)}n.exports=function(u,h,s,i){h=h||"&",s=s||"=";var p={};if(typeof u!="string"||u.length===0)return p;var c=/\+/g;u=u.split(h);var f=1e3;i&&typeof i.maxKeys=="number"&&(f=i.maxKeys);var d=u.length;f>0&&d>f&&(d=f);for(var v=0;v<d;++v){var m,b,g,y,_=u[v].replace(c,"%20"),T=_.indexOf(s);T>=0?(m=_.substr(0,T),b=_.substr(T+1)):(m=_,b=""),g=decodeURIComponent(m),y=decodeURIComponent(b),o(p,g)?a(p[g])?p[g].push(y):p[g]=[p[g],y]:p[g]=y}return p};var a=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"}},{}],53:[function(t,n,l){var o=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};n.exports=function(s,i,p,c){return i=i||"&",p=p||"=",s===null&&(s=void 0),typeof s=="object"?u(h(s),function(f){var d=encodeURIComponent(o(f))+p;return a(s[f])?u(s[f],function(v){return d+encodeURIComponent(o(v))}).join(i):d+encodeURIComponent(o(s[f]))}).join(i):c?encodeURIComponent(o(c))+p+encodeURIComponent(o(s)):""};var a=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"};function u(s,i){if(s.map)return s.map(i);for(var p=[],c=0;c<s.length;c++)p.push(i(s[c],c));return p}var h=Object.keys||function(s){var i=[];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&i.push(p);return i}},{}],54:[function(t,n,l){l.decode=l.parse=t("./decode"),l.encode=l.stringify=t("./encode")},{"./decode":52,"./encode":53}],55:[function(t,n,l){var o={};function a(h,s,i){i||(i=Error);var p=function(c){var f,d;function v(m,b,g){return c.call(this,function(y,_,T){return typeof s=="string"?s:s(y,_,T)}(m,b,g))||this}return d=c,(f=v).prototype=Object.create(d.prototype),f.prototype.constructor=f,f.__proto__=d,v}(i);p.prototype.name=i.name,p.prototype.code=h,o[h]=p}function u(h,s){if(Array.isArray(h)){var i=h.length;return h=h.map(function(p){return String(p)}),i>2?"one of ".concat(s," ").concat(h.slice(0,i-1).join(", "),", or ")+h[i-1]:i===2?"one of ".concat(s," ").concat(h[0]," or ").concat(h[1]):"of ".concat(s," ").concat(h[0])}return"of ".concat(s," ").concat(String(h))}a("ERR_INVALID_OPT_VALUE",function(h,s){return'The value "'+s+'" is invalid for option "'+h+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(h,s,i){var p,c,f;if(typeof s=="string"&&(c="not ",s.substr(0,c.length)===c)?(p="must not be",s=s.replace(/^not /,"")):p="must be",function(v,m,b){return(b===void 0||b>v.length)&&(b=v.length),v.substring(b-m.length,b)===m}(h," argument"))f="The ".concat(h," ").concat(p," ").concat(u(s,"type"));else{var d=function(v,m,b){return typeof b!="number"&&(b=0),!(b+m.length>v.length)&&v.indexOf(m,b)!==-1}(h,".")?"property":"argument";f='The "'.concat(h,'" ').concat(d," ").concat(p," ").concat(u(s,"type"))}return f+=". Received type ".concat(typeof i)},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),n.exports.codes=o},{}],56:[function(t,n,l){(function(o){(function(){var a=Object.keys||function(v){var m=[];for(var b in v)m.push(b);return m};n.exports=c;var u=t("./_stream_readable"),h=t("./_stream_writable");t("inherits")(c,u);for(var s=a(h.prototype),i=0;i<s.length;i++){var p=s[i];c.prototype[p]||(c.prototype[p]=h.prototype[p])}function c(v){if(!(this instanceof c))return new c(v);u.call(this,v),h.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||o.nextTick(d,this)}function d(v){v.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":58,"./_stream_writable":60,_process:50,inherits:24}],57:[function(t,n,l){n.exports=a;var o=t("./_stream_transform");function a(u){if(!(this instanceof a))return new a(u);o.call(this,u)}t("inherits")(a,o),a.prototype._transform=function(u,h,s){s(null,u)}},{"./_stream_transform":59,inherits:24}],58:[function(t,n,l){(function(o,a){(function(){var u;n.exports=A,A.ReadableState=E,t("events").EventEmitter;var h=function(x,w){return x.listeners(w).length},s=t("./internal/streams/stream"),i=t("buffer").Buffer,p=a.Uint8Array||function(){},c,f=t("util");c=f&&f.debuglog?f.debuglog("stream"):function(){};var d,v,m,b=t("./internal/streams/buffer_list"),g=t("./internal/streams/destroy"),y=t("./internal/streams/state").getHighWaterMark,_=t("../errors").codes,T=_.ERR_INVALID_ARG_TYPE,D=_.ERR_STREAM_PUSH_AFTER_EOF,F=_.ERR_METHOD_NOT_IMPLEMENTED,R=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(A,s);var X=g.errorOrDestroy,H=["error","close","destroy","pause","resume"];function E(x,w,k){u=u||t("./_stream_duplex"),x=x||{},typeof k!="boolean"&&(k=w instanceof u),this.objectMode=!!x.objectMode,k&&(this.objectMode=this.objectMode||!!x.readableObjectMode),this.highWaterMark=y(this,x,"readableHighWaterMark",k),this.buffer=new b,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.paused=!0,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(d||(d=t("string_decoder/").StringDecoder),this.decoder=new d(x.encoding),this.encoding=x.encoding)}function A(x){if(u=u||t("./_stream_duplex"),!(this instanceof A))return new A(x);var w=this instanceof u;this._readableState=new E(x,this,w),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),s.call(this)}function S(x,w,k,j,Z){c("readableAddChunk",w);var ee,re=x._readableState;if(w===null)re.reading=!1,function(M,C){if(c("onEofChunk"),!C.ended){if(C.decoder){var B=C.decoder.end();B&&B.length&&(C.buffer.push(B),C.length+=C.objectMode?1:B.length)}C.ended=!0,C.sync?te(M):(C.needReadable=!1,C.emittedReadable||(C.emittedReadable=!0,W(M)))}}(x,re);else if(Z||(ee=function(M,C){var B;K=C,i.isBuffer(K)||K instanceof p||typeof C=="string"||C===void 0||M.objectMode||(B=new T("chunk",["string","Buffer","Uint8Array"],C));var K;return B}(re,w)),ee)X(x,ee);else if(re.objectMode||w&&w.length>0)if(typeof w=="string"||re.objectMode||Object.getPrototypeOf(w)===i.prototype||(w=function(M){return i.from(M)}(w)),j)re.endEmitted?X(x,new R):I(x,re,w,!0);else if(re.ended)X(x,new D);else{if(re.destroyed)return!1;re.reading=!1,re.decoder&&!k?(w=re.decoder.write(w),re.objectMode||w.length!==0?I(x,re,w,!1):q(x,re)):I(x,re,w,!1)}else j||(re.reading=!1,q(x,re));return!re.ended&&(re.length<re.highWaterMark||re.length===0)}function I(x,w,k,j){w.flowing&&w.length===0&&!w.sync?(w.awaitDrain=0,x.emit("data",k)):(w.length+=w.objectMode?1:k.length,j?w.buffer.unshift(k):w.buffer.push(k),w.needReadable&&te(x)),q(x,w)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(x,w){w(x)},A.prototype.push=function(x,w){var k,j=this._readableState;return j.objectMode?k=!0:typeof x=="string"&&((w=w||j.defaultEncoding)!==j.encoding&&(x=i.from(x,w),w=""),k=!0),S(this,x,w,!1,k)},A.prototype.unshift=function(x){return S(this,x,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(x){d||(d=t("string_decoder/").StringDecoder);var w=new d(x);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;for(var k=this._readableState.buffer.head,j="";k!==null;)j+=w.write(k.data),k=k.next;return this._readableState.buffer.clear(),j!==""&&this._readableState.buffer.push(j),this._readableState.length=j.length,this};var z=1073741824;function V(x,w){return x<=0||w.length===0&&w.ended?0:w.objectMode?1:x!=x?w.flowing&&w.length?w.buffer.head.data.length:w.length:(x>w.highWaterMark&&(w.highWaterMark=function(k){return k>=z?k=z:(k--,k|=k>>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,k|=k>>>16,k++),k}(x)),x<=w.length?x:w.ended?w.length:(w.needReadable=!0,0))}function te(x){var w=x._readableState;c("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,w.emittedReadable||(c("emitReadable",w.flowing),w.emittedReadable=!0,o.nextTick(W,x))}function W(x){var w=x._readableState;c("emitReadable_",w.destroyed,w.length,w.ended),w.destroyed||!w.length&&!w.ended||(x.emit("readable"),w.emittedReadable=!1),w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,P(x)}function q(x,w){w.readingMore||(w.readingMore=!0,o.nextTick(G,x,w))}function G(x,w){for(;!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0);){var k=w.length;if(c("maybeReadMore read 0"),x.read(0),k===w.length)break}w.readingMore=!1}function U(x){var w=x._readableState;w.readableListening=x.listenerCount("readable")>0,w.resumeScheduled&&!w.paused?w.flowing=!0:x.listenerCount("data")>0&&x.resume()}function L(x){c("readable nexttick read 0"),x.read(0)}function Y(x,w){c("resume",w.reading),w.reading||x.read(0),w.resumeScheduled=!1,x.emit("resume"),P(x),w.flowing&&!w.reading&&x.read(0)}function P(x){var w=x._readableState;for(c("flow",w.flowing);w.flowing&&x.read()!==null;);}function J(x,w){return w.length===0?null:(w.objectMode?k=w.buffer.shift():!x||x>=w.length?(k=w.decoder?w.buffer.join(""):w.buffer.length===1?w.buffer.first():w.buffer.concat(w.length),w.buffer.clear()):k=w.buffer.consume(x,w.decoder),k);var k}function ne(x){var w=x._readableState;c("endReadable",w.endEmitted),w.endEmitted||(w.ended=!0,o.nextTick(ie,w,x))}function ie(x,w){if(c("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,w.readable=!1,w.emit("end"),x.autoDestroy)){var k=w._writableState;(!k||k.autoDestroy&&k.finished)&&w.destroy()}}function ae(x,w){for(var k=0,j=x.length;k<j;k++)if(x[k]===w)return k;return-1}A.prototype.read=function(x){c("read",x),x=parseInt(x,10);var w=this._readableState,k=x;if(x!==0&&(w.emittedReadable=!1),x===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended))return c("read: emitReadable",w.length,w.ended),w.length===0&&w.ended?ne(this):te(this),null;if((x=V(x,w))===0&&w.ended)return w.length===0&&ne(this),null;var j,Z=w.needReadable;return c("need readable",Z),(w.length===0||w.length-x<w.highWaterMark)&&c("length less than watermark",Z=!0),w.ended||w.reading?c("reading or ended",Z=!1):Z&&(c("do read"),w.reading=!0,w.sync=!0,w.length===0&&(w.needReadable=!0),this._read(w.highWaterMark),w.sync=!1,w.reading||(x=V(k,w))),(j=x>0?J(x,w):null)===null?(w.needReadable=w.length<=w.highWaterMark,x=0):(w.length-=x,w.awaitDrain=0),w.length===0&&(w.ended||(w.needReadable=!0),k!==x&&w.ended&&ne(this)),j!==null&&this.emit("data",j),j},A.prototype._read=function(x){X(this,new F("_read()"))},A.prototype.pipe=function(x,w){var k=this,j=this._readableState;switch(j.pipesCount){case 0:j.pipes=x;break;case 1:j.pipes=[j.pipes,x];break;default:j.pipes.push(x)}j.pipesCount+=1,c("pipe count=%d opts=%j",j.pipesCount,w);var Z=(!w||w.end!==!1)&&x!==o.stdout&&x!==o.stderr?re:ce;function ee(me,xe){c("onunpipe"),me===k&&xe&&xe.hasUnpiped===!1&&(xe.hasUnpiped=!0,c("cleanup"),x.removeListener("close",oe),x.removeListener("finish",ue),x.removeListener("drain",M),x.removeListener("error",K),x.removeListener("unpipe",ee),k.removeListener("end",re),k.removeListener("end",ce),k.removeListener("data",B),C=!0,!j.awaitDrain||x._writableState&&!x._writableState.needDrain||M())}function re(){c("onend"),x.end()}j.endEmitted?o.nextTick(Z):k.once("end",Z),x.on("unpipe",ee);var M=function(me){return function(){var xe=me._readableState;c("pipeOnDrain",xe.awaitDrain),xe.awaitDrain&&xe.awaitDrain--,xe.awaitDrain===0&&h(me,"data")&&(xe.flowing=!0,P(me))}}(k);x.on("drain",M);var C=!1;function B(me){c("ondata");var xe=x.write(me);c("dest.write",xe),xe===!1&&((j.pipesCount===1&&j.pipes===x||j.pipesCount>1&&ae(j.pipes,x)!==-1)&&!C&&(c("false write response, pause",j.awaitDrain),j.awaitDrain++),k.pause())}function K(me){c("onerror",me),ce(),x.removeListener("error",K),h(x,"error")===0&&X(x,me)}function oe(){x.removeListener("finish",ue),ce()}function ue(){c("onfinish"),x.removeListener("close",oe),ce()}function ce(){c("unpipe"),k.unpipe(x)}return k.on("data",B),function(me,xe,Ce){if(typeof me.prependListener=="function")return me.prependListener(xe,Ce);me._events&&me._events[xe]?Array.isArray(me._events[xe])?me._events[xe].unshift(Ce):me._events[xe]=[Ce,me._events[xe]]:me.on(xe,Ce)}(x,"error",K),x.once("close",oe),x.once("finish",ue),x.emit("pipe",k),j.flowing||(c("pipe resume"),k.resume()),x},A.prototype.unpipe=function(x){var w=this._readableState,k={hasUnpiped:!1};if(w.pipesCount===0)return this;if(w.pipesCount===1)return x&&x!==w.pipes?this:(x||(x=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,x&&x.emit("unpipe",this,k),this);if(!x){var j=w.pipes,Z=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var ee=0;ee<Z;ee++)j[ee].emit("unpipe",this,{hasUnpiped:!1});return this}var re=ae(w.pipes,x);return re===-1?this:(w.pipes.splice(re,1),w.pipesCount-=1,w.pipesCount===1&&(w.pipes=w.pipes[0]),x.emit("unpipe",this,k),this)},A.prototype.on=function(x,w){var k=s.prototype.on.call(this,x,w),j=this._readableState;return x==="data"?(j.readableListening=this.listenerCount("readable")>0,j.flowing!==!1&&this.resume()):x==="readable"&&(j.endEmitted||j.readableListening||(j.readableListening=j.needReadable=!0,j.flowing=!1,j.emittedReadable=!1,c("on readable",j.length,j.reading),j.length?te(this):j.reading||o.nextTick(L,this))),k},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(x,w){var k=s.prototype.removeListener.call(this,x,w);return x==="readable"&&o.nextTick(U,this),k},A.prototype.removeAllListeners=function(x){var w=s.prototype.removeAllListeners.apply(this,arguments);return x!=="readable"&&x!==void 0||o.nextTick(U,this),w},A.prototype.resume=function(){var x=this._readableState;return x.flowing||(c("resume"),x.flowing=!x.readableListening,function(w,k){k.resumeScheduled||(k.resumeScheduled=!0,o.nextTick(Y,w,k))}(this,x)),x.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(x){var w=this,k=this._readableState,j=!1;for(var Z in x.on("end",function(){if(c("wrapped end"),k.decoder&&!k.ended){var re=k.decoder.end();re&&re.length&&w.push(re)}w.push(null)}),x.on("data",function(re){c("wrapped data"),k.decoder&&(re=k.decoder.write(re)),(!k.objectMode||re!=null)&&(k.objectMode||re&&re.length)&&(w.push(re)||(j=!0,x.pause()))}),x)this[Z]===void 0&&typeof x[Z]=="function"&&(this[Z]=function(re){return function(){return x[re].apply(x,arguments)}}(Z));for(var ee=0;ee<H.length;ee++)x.on(H[ee],this.emit.bind(this,H[ee]));return this._read=function(re){c("wrapped _read",re),j&&(j=!1,x.resume())},this},typeof Symbol=="function"&&(A.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=t("./internal/streams/async_iterator")),v(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),A._fromList=J,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(A.from=function(x,w){return m===void 0&&(m=t("./internal/streams/from")),m(A,x,w)})}).call(this)}).call(this,t("_process"),typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/async_iterator":61,"./internal/streams/buffer_list":62,"./internal/streams/destroy":63,"./internal/streams/from":65,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,events:22,inherits:24,"string_decoder/":75,util:16}],59:[function(t,n,l){n.exports=p;var o=t("../errors").codes,a=o.ERR_METHOD_NOT_IMPLEMENTED,u=o.ERR_MULTIPLE_CALLBACK,h=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=o.ERR_TRANSFORM_WITH_LENGTH_0,i=t("./_stream_duplex");function p(d){if(!(this instanceof p))return new p(d);i.call(this,d),this._transformState={afterTransform:function(v,m){var b=this._transformState;b.transforming=!1;var g=b.writecb;if(g===null)return this.emit("error",new u);b.writechunk=null,b.writecb=null,m!=null&&this.push(m),g(v);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}.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",c)}function c(){var d=this;typeof this._flush!="function"||this._readableState.destroyed?f(this,null,null):this._flush(function(v,m){f(d,v,m)})}function f(d,v,m){if(v)return d.emit("error",v);if(m!=null&&d.push(m),d._writableState.length)throw new s;if(d._transformState.transforming)throw new h;return d.push(null)}t("inherits")(p,i),p.prototype.push=function(d,v){return this._transformState.needTransform=!1,i.prototype.push.call(this,d,v)},p.prototype._transform=function(d,v,m){m(new a("_transform()"))},p.prototype._write=function(d,v,m){var b=this._transformState;if(b.writecb=m,b.writechunk=d,b.writeencoding=v,!b.transforming){var g=this._readableState;(b.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},p.prototype._read=function(d){var v=this._transformState;v.writechunk===null||v.transforming?v.needTransform=!0:(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform))},p.prototype._destroy=function(d,v){i.prototype._destroy.call(this,d,function(m){v(m)})}},{"../errors":55,"./_stream_duplex":56,inherits:24}],60:[function(t,n,l){(function(o,a){(function(){function u(q){var G=this;this.next=null,this.entry=null,this.finish=function(){(function(U,L,Y){var P=U.entry;for(U.entry=null;P;){var J=P.callback;L.pendingcb--,J(Y),P=P.next}L.corkedRequestsFree.next=U})(G,q)}}var h;n.exports=A,A.WritableState=E;var s={deprecate:t("util-deprecate")},i=t("./internal/streams/stream"),p=t("buffer").Buffer,c=a.Uint8Array||function(){},f,d=t("./internal/streams/destroy"),v=t("./internal/streams/state").getHighWaterMark,m=t("../errors").codes,b=m.ERR_INVALID_ARG_TYPE,g=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_MULTIPLE_CALLBACK,_=m.ERR_STREAM_CANNOT_PIPE,T=m.ERR_STREAM_DESTROYED,D=m.ERR_STREAM_NULL_VALUES,F=m.ERR_STREAM_WRITE_AFTER_END,R=m.ERR_UNKNOWN_ENCODING,X=d.errorOrDestroy;function H(){}function E(q,G,U){h=h||t("./_stream_duplex"),q=q||{},typeof U!="boolean"&&(U=G instanceof h),this.objectMode=!!q.objectMode,U&&(this.objectMode=this.objectMode||!!q.writableObjectMode),this.highWaterMark=v(this,q,"writableHighWaterMark",U),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var L=q.decodeStrings===!1;this.decodeStrings=!L,this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){(function(P,J){var ne=P._writableState,ie=ne.sync,ae=ne.writecb;if(typeof ae!="function")throw new y;if(function(w){w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0}(ne),J)(function(w,k,j,Z,ee){--k.pendingcb,j?(o.nextTick(ee,Z),o.nextTick(W,w,k),w._writableState.errorEmitted=!0,X(w,Z)):(ee(Z),w._writableState.errorEmitted=!0,X(w,Z),W(w,k))})(P,ne,ie,J,ae);else{var x=V(ne)||P.destroyed;x||ne.corked||ne.bufferProcessing||!ne.bufferedRequest||z(P,ne),ie?o.nextTick(I,P,ne,x,ae):I(P,ne,x,ae)}})(G,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}function A(q){var G=this instanceof(h=h||t("./_stream_duplex"));if(!G&&!f.call(A,this))return new A(q);this._writableState=new E(q,this,G),this.writable=!0,q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final)),i.call(this)}function S(q,G,U,L,Y,P,J){G.writelen=L,G.writecb=J,G.writing=!0,G.sync=!0,G.destroyed?G.onwrite(new T("write")):U?q._writev(Y,G.onwrite):q._write(Y,P,G.onwrite),G.sync=!1}function I(q,G,U,L){U||function(Y,P){P.length===0&&P.needDrain&&(P.needDrain=!1,Y.emit("drain"))}(q,G),G.pendingcb--,L(),W(q,G)}function z(q,G){G.bufferProcessing=!0;var U=G.bufferedRequest;if(q._writev&&U&&U.next){var L=G.bufferedRequestCount,Y=new Array(L),P=G.corkedRequestsFree;P.entry=U;for(var J=0,ne=!0;U;)Y[J]=U,U.isBuf||(ne=!1),U=U.next,J+=1;Y.allBuffers=ne,S(q,G,!0,G.length,Y,"",P.finish),G.pendingcb++,G.lastBufferedRequest=null,P.next?(G.corkedRequestsFree=P.next,P.next=null):G.corkedRequestsFree=new u(G),G.bufferedRequestCount=0}else{for(;U;){var ie=U.chunk,ae=U.encoding,x=U.callback;if(S(q,G,!1,G.objectMode?1:ie.length,ie,ae,x),U=U.next,G.bufferedRequestCount--,G.writing)break}U===null&&(G.lastBufferedRequest=null)}G.bufferedRequest=U,G.bufferProcessing=!1}function V(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function te(q,G){q._final(function(U){G.pendingcb--,U&&X(q,U),G.prefinished=!0,q.emit("prefinish"),W(q,G)})}function W(q,G){var U=V(G);if(U&&(function(Y,P){P.prefinished||P.finalCalled||(typeof Y._final!="function"||P.destroyed?(P.prefinished=!0,Y.emit("prefinish")):(P.pendingcb++,P.finalCalled=!0,o.nextTick(te,Y,P)))}(q,G),G.pendingcb===0&&(G.finished=!0,q.emit("finish"),G.autoDestroy))){var L=q._readableState;(!L||L.autoDestroy&&L.endEmitted)&&q.destroy()}return U}t("inherits")(A,i),E.prototype.getBuffer=function(){for(var q=this.bufferedRequest,G=[];q;)G.push(q),q=q.next;return G},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(q){}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(q){return!!f.call(this,q)||this===A&&q&&q._writableState instanceof E}})):f=function(q){return q instanceof this},A.prototype.pipe=function(){X(this,new _)},A.prototype.write=function(q,G,U){var L,Y=this._writableState,P=!1,J=!Y.objectMode&&(L=q,p.isBuffer(L)||L instanceof c);return J&&!p.isBuffer(q)&&(q=function(ne){return p.from(ne)}(q)),typeof G=="function"&&(U=G,G=null),J?G="buffer":G||(G=Y.defaultEncoding),typeof U!="function"&&(U=H),Y.ending?function(ne,ie){var ae=new F;X(ne,ae),o.nextTick(ie,ae)}(this,U):(J||function(ne,ie,ae,x){var w;return ae===null?w=new D:typeof ae=="string"||ie.objectMode||(w=new b("chunk",["string","Buffer"],ae)),!w||(X(ne,w),o.nextTick(x,w),!1)}(this,Y,q,U))&&(Y.pendingcb++,P=function(ne,ie,ae,x,w,k){if(!ae){var j=function(M,C,B){return M.objectMode||M.decodeStrings===!1||typeof C!="string"||(C=p.from(C,B)),C}(ie,x,w);x!==j&&(ae=!0,w="buffer",x=j)}var Z=ie.objectMode?1:x.length;ie.length+=Z;var ee=ie.length<ie.highWaterMark;if(ee||(ie.needDrain=!0),ie.writing||ie.corked){var re=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:x,encoding:w,isBuf:ae,callback:k,next:null},re?re.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1}else S(ne,ie,!1,Z,x,w,k);return ee}(this,Y,J,q,G,U)),P},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var q=this._writableState;q.corked&&(q.corked--,q.writing||q.corked||q.bufferProcessing||!q.bufferedRequest||z(this,q))},A.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new R(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(q,G,U){U(new g("_write()"))},A.prototype._writev=null,A.prototype.end=function(q,G,U){var L=this._writableState;return typeof q=="function"?(U=q,q=null,G=null):typeof G=="function"&&(U=G,G=null),q!=null&&this.write(q,G),L.corked&&(L.corked=1,this.uncork()),L.ending||function(Y,P,J){P.ending=!0,W(Y,P),J&&(P.finished?o.nextTick(J):Y.once("finish",J)),P.ended=!0,Y.writable=!1}(this,L,U),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),A.prototype.destroy=d.destroy,A.prototype._undestroy=d.undestroy,A.prototype._destroy=function(q,G){G(q)}}).call(this)}).call(this,t("_process"),typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/destroy":63,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,inherits:24,"util-deprecate":78}],61:[function(t,n,l){(function(o){(function(){var a;function u(_,T,D){return T in _?Object.defineProperty(_,T,{value:D,enumerable:!0,configurable:!0,writable:!0}):_[T]=D,_}var h=t("./end-of-stream"),s=Symbol("lastResolve"),i=Symbol("lastReject"),p=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),v=Symbol("stream");function m(_,T){return{value:_,done:T}}function b(_){var T=_[s];if(T!==null){var D=_[v].read();D!==null&&(_[f]=null,_[s]=null,_[i]=null,T(m(D,!1)))}}var g=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((u(a={get stream(){return this[v]},next:function(){var _=this,T=this[p];if(T!==null)return Promise.reject(T);if(this[c])return Promise.resolve(m(void 0,!0));if(this[v].destroyed)return new Promise(function(X,H){o.nextTick(function(){_[p]?H(_[p]):X(m(void 0,!0))})});var D,F=this[f];if(F)D=new Promise(function(X,H){return function(E,A){X.then(function(){H[c]?E(m(void 0,!0)):H[d](E,A)},A)}}(F,this));else{var R=this[v].read();if(R!==null)return Promise.resolve(m(R,!1));D=new Promise(this[d])}return this[f]=D,D}},Symbol.asyncIterator,function(){return this}),u(a,"return",function(){var _=this;return new Promise(function(T,D){_[v].destroy(null,function(F){F?D(F):T(m(void 0,!0))})})}),a),g);n.exports=function(_){var T,D=Object.create(y,(u(T={},v,{value:_,writable:!0}),u(T,s,{value:null,writable:!0}),u(T,i,{value:null,writable:!0}),u(T,p,{value:null,writable:!0}),u(T,c,{value:_._readableState.endEmitted,writable:!0}),u(T,d,{value:function(F,R){var X=D[v].read();X?(D[f]=null,D[s]=null,D[i]=null,F(m(X,!1))):(D[s]=F,D[i]=R)},writable:!0}),T));return D[f]=null,h(_,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R=D[i];return R!==null&&(D[f]=null,D[s]=null,D[i]=null,R(F)),void(D[p]=F)}var X=D[s];X!==null&&(D[f]=null,D[s]=null,D[i]=null,X(m(void 0,!0))),D[c]=!0}),_.on("readable",function(F){o.nextTick(b,F)}.bind(null,D)),D}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":64,_process:50}],62:[function(t,n,l){function o(p,c){var f=Object.keys(p);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(p);c&&(d=d.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),f.push.apply(f,d)}return f}function a(p,c,f){return c in p?Object.defineProperty(p,c,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[c]=f,p}function u(p,c){for(var f=0;f<c.length;f++){var d=c[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(p,d.key,d)}}var h=t("buffer").Buffer,s=t("util").inspect,i=s&&s.custom||"inspect";n.exports=function(){function p(){(function(d,v){if(!(d instanceof v))throw new TypeError("Cannot call a class as a function")})(this,p),this.head=null,this.tail=null,this.length=0}var c,f;return c=p,(f=[{key:"push",value:function(d){var v={data:d,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(d){var v={data:d,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(d){if(this.length===0)return"";for(var v=this.head,m=""+v.data;v=v.next;)m+=d+v.data;return m}},{key:"concat",value:function(d){if(this.length===0)return h.alloc(0);for(var v,m,b,g=h.allocUnsafe(d>>>0),y=this.head,_=0;y;)v=y.data,m=g,b=_,h.prototype.copy.call(v,m,b),_+=y.data.length,y=y.next;return g}},{key:"consume",value:function(d,v){var m;return d<this.head.data.length?(m=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):m=d===this.head.data.length?this.shift():v?this._getString(d):this._getBuffer(d),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var v=this.head,m=1,b=v.data;for(d-=b.length;v=v.next;){var g=v.data,y=d>g.length?g.length:d;if(y===g.length?b+=g:b+=g.slice(0,d),(d-=y)===0){y===g.length?(++m,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=g.slice(y));break}++m}return this.length-=m,b}},{key:"_getBuffer",value:function(d){var v=h.allocUnsafe(d),m=this.head,b=1;for(m.data.copy(v),d-=m.data.length;m=m.next;){var g=m.data,y=d>g.length?g.length:d;if(g.copy(v,v.length-d,0,y),(d-=y)===0){y===g.length?(++b,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=g.slice(y));break}++b}return this.length-=b,v}},{key:i,value:function(d,v){return s(this,function(m){for(var b=1;b<arguments.length;b++){var g=arguments[b]!=null?arguments[b]:{};b%2?o(Object(g),!0).forEach(function(y){a(m,y,g[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(g)):o(Object(g)).forEach(function(y){Object.defineProperty(m,y,Object.getOwnPropertyDescriptor(g,y))})}return m}({},v,{depth:0,customInspect:!1}))}}])&&u(c.prototype,f),p}()},{buffer:17,util:16}],63:[function(t,n,l){(function(o){(function(){function a(s,i){h(s,i),u(s)}function u(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function h(s,i){s.emit("error",i)}n.exports={destroy:function(s,i){var p=this,c=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return c||f?(i?i(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(h,this,s)):o.nextTick(h,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(d){!i&&d?p._writableState?p._writableState.errorEmitted?o.nextTick(u,p):(p._writableState.errorEmitted=!0,o.nextTick(a,p,d)):o.nextTick(a,p,d):i?(o.nextTick(u,p),i(d)):o.nextTick(u,p)}),this)},undestroy:function(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(s,i){var p=s._readableState,c=s._writableState;p&&p.autoDestroy||c&&c.autoDestroy?s.destroy(i):s.emit("error",i)}}}).call(this)}).call(this,t("_process"))},{_process:50}],64:[function(t,n,l){var o=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}n.exports=function u(h,s,i){if(typeof s=="function")return u(h,null,s);s||(s={}),i=function(T){var D=!1;return function(){if(!D){D=!0;for(var F=arguments.length,R=new Array(F),X=0;X<F;X++)R[X]=arguments[X];T.apply(this,R)}}}(i||a);var p=s.readable||s.readable!==!1&&h.readable,c=s.writable||s.writable!==!1&&h.writable,f=function(){h.writable||v()},d=h._writableState&&h._writableState.finished,v=function(){c=!1,d=!0,p||i.call(h)},m=h._readableState&&h._readableState.endEmitted,b=function(){p=!1,m=!0,c||i.call(h)},g=function(T){i.call(h,T)},y=function(){var T;return p&&!m?(h._readableState&&h._readableState.ended||(T=new o),i.call(h,T)):c&&!d?(h._writableState&&h._writableState.ended||(T=new o),i.call(h,T)):void 0},_=function(){h.req.on("finish",v)};return function(T){return T.setHeader&&typeof T.abort=="function"}(h)?(h.on("complete",v),h.on("abort",y),h.req?_():h.on("request",_)):c&&!h._writableState&&(h.on("end",f),h.on("close",f)),h.on("end",b),h.on("finish",v),s.error!==!1&&h.on("error",g),h.on("close",y),function(){h.removeListener("complete",v),h.removeListener("abort",y),h.removeListener("request",_),h.req&&h.req.removeListener("finish",v),h.removeListener("end",f),h.removeListener("close",f),h.removeListener("finish",v),h.removeListener("end",b),h.removeListener("error",g),h.removeListener("close",y)}}},{"../../../errors":55}],65:[function(t,n,l){n.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],66:[function(t,n,l){var o,a=t("../../../errors").codes,u=a.ERR_MISSING_ARGS,h=a.ERR_STREAM_DESTROYED;function s(c){if(c)throw c}function i(c){c()}function p(c,f){return c.pipe(f)}n.exports=function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var v,m=function(g){return g.length?typeof g[g.length-1]!="function"?s:g.pop():s}(f);if(Array.isArray(f[0])&&(f=f[0]),f.length<2)throw new u("streams");var b=f.map(function(g,y){var _=y<f.length-1;return function(T,D,F,R){R=function(E){var A=!1;return function(){A||(A=!0,E.apply(void 0,arguments))}}(R);var X=!1;T.on("close",function(){X=!0}),o===void 0&&(o=t("./end-of-stream")),o(T,{readable:D,writable:F},function(E){if(E)return R(E);X=!0,R()});var H=!1;return function(E){if(!X&&!H)return H=!0,function(A){return A.setHeader&&typeof A.abort=="function"}(T)?T.abort():typeof T.destroy=="function"?T.destroy():void R(E||new h("pipe"))}}(g,_,y>0,function(T){v||(v=T),T&&b.forEach(i),_||(b.forEach(i),m(v))})});return f.reduce(p)}},{"../../../errors":55,"./end-of-stream":64}],67:[function(t,n,l){var o=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;n.exports={getHighWaterMark:function(a,u,h,s){var i=function(p,c,f){return p.highWaterMark!=null?p.highWaterMark:c?p[f]:null}(u,s,h);if(i!=null){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new o(s?h:"highWaterMark",i);return Math.floor(i)}return a.objectMode?16:16384}}},{"../../../errors":55}],68:[function(t,n,l){n.exports=t("events").EventEmitter},{events:22}],69:[function(t,n,l){(l=n.exports=t("./lib/_stream_readable.js")).Stream=l,l.Readable=l,l.Writable=t("./lib/_stream_writable.js"),l.Duplex=t("./lib/_stream_duplex.js"),l.Transform=t("./lib/_stream_transform.js"),l.PassThrough=t("./lib/_stream_passthrough.js"),l.finished=t("./lib/internal/streams/end-of-stream.js"),l.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":56,"./lib/_stream_passthrough.js":57,"./lib/_stream_readable.js":58,"./lib/_stream_transform.js":59,"./lib/_stream_writable.js":60,"./lib/internal/streams/end-of-stream.js":64,"./lib/internal/streams/pipeline.js":66}],70:[function(t,n,l){n.exports=function(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var o;if(arguments.length>0){o=new Array(arguments.length-2);for(var a=0;a<o.length;a++)o[a]=arguments[a+2]}return new function(u,h,s){var i=this;this._callback=u,this._args=s,this._interval=setInterval(u,h,this._args),this.reschedule=function(p){p||(p=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,p,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}(arguments[0],arguments[1],o)}},{}],71:[function(t,n,l){n.exports=t("./index.js")()},{"./index.js":72}],72:[function(t,n,l){(function(o){(function(){function a(u){return u instanceof o?o.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}n.exports=function(u){return(u=u||{}).circles?function(s){var i=[],p=[];return s.proto?function f(d){if(typeof d!="object"||d===null)return d;if(d instanceof Date)return new Date(d);if(Array.isArray(d))return c(d,f);if(d instanceof Map)return new Map(c(Array.from(d),f));if(d instanceof Set)return new Set(c(Array.from(d),f));var v={};for(var m in i.push(d),p.push(v),d){var b=d[m];if(typeof b!="object"||b===null)v[m]=b;else if(b instanceof Date)v[m]=new Date(b);else if(b instanceof Map)v[m]=new Map(c(Array.from(b),f));else if(b instanceof Set)v[m]=new Set(c(Array.from(b),f));else if(ArrayBuffer.isView(b))v[m]=a(b);else{var g=i.indexOf(b);v[m]=g!==-1?p[g]:f(b)}}return i.pop(),p.pop(),v}:function f(d){if(typeof d!="object"||d===null)return d;if(d instanceof Date)return new Date(d);if(Array.isArray(d))return c(d,f);if(d instanceof Map)return new Map(c(Array.from(d),f));if(d instanceof Set)return new Set(c(Array.from(d),f));var v={};for(var m in i.push(d),p.push(v),d)if(Object.hasOwnProperty.call(d,m)!==!1){var b=d[m];if(typeof b!="object"||b===null)v[m]=b;else if(b instanceof Date)v[m]=new Date(b);else if(b instanceof Map)v[m]=new Map(c(Array.from(b),f));else if(b instanceof Set)v[m]=new Set(c(Array.from(b),f));else if(ArrayBuffer.isView(b))v[m]=a(b);else{var g=i.indexOf(b);v[m]=g!==-1?p[g]:f(b)}}return i.pop(),p.pop(),v};function c(f,d){for(var v=Object.keys(f),m=new Array(v.length),b=0;b<v.length;b++){var g=v[b],y=f[g];if(typeof y!="object"||y===null)m[g]=y;else if(y instanceof Date)m[g]=new Date(y);else if(ArrayBuffer.isView(y))m[g]=a(y);else{var _=i.indexOf(y);m[g]=_!==-1?p[_]:d(y)}}return m}}(u):u.proto?function s(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return h(i,s);if(i instanceof Map)return new Map(h(Array.from(i),s));if(i instanceof Set)return new Set(h(Array.from(i),s));var p={};for(var c in i){var f=i[c];typeof f!="object"||f===null?p[c]=f:f instanceof Date?p[c]=new Date(f):f instanceof Map?p[c]=new Map(h(Array.from(f),s)):f instanceof Set?p[c]=new Set(h(Array.from(f),s)):ArrayBuffer.isView(f)?p[c]=a(f):p[c]=s(f)}return p}:function s(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return h(i,s);if(i instanceof Map)return new Map(h(Array.from(i),s));if(i instanceof Set)return new Set(h(Array.from(i),s));var p={};for(var c in i)if(Object.hasOwnProperty.call(i,c)!==!1){var f=i[c];typeof f!="object"||f===null?p[c]=f:f instanceof Date?p[c]=new Date(f):f instanceof Map?p[c]=new Map(h(Array.from(f),s)):f instanceof Set?p[c]=new Set(h(Array.from(f),s)):ArrayBuffer.isView(f)?p[c]=a(f):p[c]=s(f)}return p};function h(s,i){for(var p=Object.keys(s),c=new Array(p.length),f=0;f<p.length;f++){var d=p[f],v=s[d];typeof v!="object"||v===null?c[d]=v:v instanceof Date?c[d]=new Date(v):ArrayBuffer.isView(v)?c[d]=a(v):c[d]=i(v)}return c}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],73:[function(t,n,l){var o=t("buffer"),a=o.Buffer;function u(s,i){for(var p in s)i[p]=s[p]}function h(s,i,p){return a(s,i,p)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?n.exports=o:(u(o,l),l.Buffer=h),h.prototype=Object.create(a.prototype),u(a,h),h.from=function(s,i,p){if(typeof s=="number")throw new TypeError("Argument must not be a number");return a(s,i,p)},h.alloc=function(s,i,p){if(typeof s!="number")throw new TypeError("Argument must be a number");var c=a(s);return i!==void 0?typeof p=="string"?c.fill(i,p):c.fill(i):c.fill(0),c},h.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return a(s)},h.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(s)}},{buffer:17}],74:[function(t,n,l){n.exports=function(o){var a=o._readableState;return a?a.objectMode||typeof o._duplexState=="number"?o.read():o.read((u=a,u.buffer.length?u.buffer.head?u.buffer.head.data.length:u.buffer[0].length:u.length)):null;var u}},{}],75:[function(t,n,l){var o=t("safe-buffer").Buffer,a=o.isEncoding||function(m){switch((m=""+m)&&m.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 u(m){var b;switch(this.encoding=function(g){var y=function(_){if(!_)return"utf8";for(var T;;)switch(_){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 _;default:if(T)return;_=(""+_).toLowerCase(),T=!0}}(g);if(typeof y!="string"&&(o.isEncoding===a||!a(g)))throw new Error("Unknown encoding: "+g);return y||g}(m),this.encoding){case"utf16le":this.text=i,this.end=p,b=4;break;case"utf8":this.fillLast=s,b=4;break;case"base64":this.text=c,this.end=f,b=3;break;default:return this.write=d,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(b)}function h(m){return m<=127?0:m>>5==6?2:m>>4==14?3:m>>3==30?4:m>>6==2?-1:-2}function s(m){var b=this.lastTotal-this.lastNeed,g=function(y,_,T){if((192&_[0])!=128)return y.lastNeed=0,"�";if(y.lastNeed>1&&_.length>1){if((192&_[1])!=128)return y.lastNeed=1,"�";if(y.lastNeed>2&&_.length>2&&(192&_[2])!=128)return y.lastNeed=2,"�"}}(this,m);return g!==void 0?g:this.lastNeed<=m.length?(m.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(m.copy(this.lastChar,b,0,m.length),void(this.lastNeed-=m.length))}function i(m,b){if((m.length-b)%2==0){var g=m.toString("utf16le",b);if(g){var y=g.charCodeAt(g.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",b,m.length-1)}function p(m){var b=m&&m.length?this.write(m):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,g)}return b}function c(m,b){var g=(m.length-b)%3;return g===0?m.toString("base64",b):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",b,m.length-g))}function f(m){var b=m&&m.length?this.write(m):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function d(m){return m.toString(this.encoding)}function v(m){return m&&m.length?this.write(m):""}l.StringDecoder=u,u.prototype.write=function(m){if(m.length===0)return"";var b,g;if(this.lastNeed){if((b=this.fillLast(m))===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g<m.length?b?b+this.text(m,g):this.text(m,g):b||""},u.prototype.end=function(m){var b=m&&m.length?this.write(m):"";return this.lastNeed?b+"�":b},u.prototype.text=function(m,b){var g=function(_,T,D){var F=T.length-1;if(F<D)return 0;var R=h(T[F]);return R>=0?(R>0&&(_.lastNeed=R-1),R):--F<D||R===-2?0:(R=h(T[F]))>=0?(R>0&&(_.lastNeed=R-2),R):--F<D||R===-2?0:(R=h(T[F]))>=0?(R>0&&(R===2?R=0:_.lastNeed=R-3),R):0}(this,m,b);if(!this.lastNeed)return m.toString("utf8",b);this.lastTotal=g;var y=m.length-(g-this.lastNeed);return m.copy(this.lastChar,0,y),m.toString("utf8",b,y)},u.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length}},{"safe-buffer":73}],76:[function(t,n,l){var o=t("punycode"),a=t("./util");function u(){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}l.parse=T,l.resolve=function(D,F){return T(D,!1,!0).resolve(F)},l.resolveObject=function(D,F){return D?T(D,!1,!0).resolveObject(F):F},l.format=function(D){return a.isString(D)&&(D=T(D)),D instanceof u?D.format():u.prototype.format.call(D)},l.Url=u;var h=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
43
+ `," "]),c=["'"].concat(p),f=["%","/","?",";","#"].concat(c),d=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");function T(D,F,R){if(D&&a.isObject(D)&&D instanceof u)return D;var X=new u;return X.parse(D,F,R),X}u.prototype.parse=function(D,F,R){if(!a.isString(D))throw new TypeError("Parameter 'url' must be a string, not "+typeof D);var X=D.indexOf("?"),H=X!==-1&&X<D.indexOf("#")?"?":"#",E=D.split(H);E[0]=E[0].replace(/\\/g,"/");var A=D=E.join(H);if(A=A.trim(),!R&&D.split("#").length===1){var S=i.exec(A);if(S)return this.path=A,this.href=A,this.pathname=S[1],S[2]?(this.search=S[2],this.query=F?_.parse(this.search.substr(1)):this.search.substr(1)):F&&(this.search="",this.query={}),this}var I=h.exec(A);if(I){var z=(I=I[0]).toLowerCase();this.protocol=z,A=A.substr(I.length)}if(R||I||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var V=A.substr(0,2)==="//";!V||I&&g[I]||(A=A.substr(2),this.slashes=!0)}if(!g[I]&&(V||I&&!y[I])){for(var te,W,q=-1,G=0;G<d.length;G++)(U=A.indexOf(d[G]))!==-1&&(q===-1||U<q)&&(q=U);for((W=q===-1?A.lastIndexOf("@"):A.lastIndexOf("@",q))!==-1&&(te=A.slice(0,W),A=A.slice(W+1),this.auth=decodeURIComponent(te)),q=-1,G=0;G<f.length;G++){var U;(U=A.indexOf(f[G]))!==-1&&(q===-1||U<q)&&(q=U)}q===-1&&(q=A.length),this.host=A.slice(0,q),A=A.slice(q),this.parseHost(),this.hostname=this.hostname||"";var L=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!L)for(var Y=this.hostname.split(/\./),P=(G=0,Y.length);G<P;G++){var J=Y[G];if(J&&!J.match(v)){for(var ne="",ie=0,ae=J.length;ie<ae;ie++)J.charCodeAt(ie)>127?ne+="x":ne+=J[ie];if(!ne.match(v)){var x=Y.slice(0,G),w=Y.slice(G+1),k=J.match(m);k&&(x.push(k[1]),w.unshift(k[2])),w.length&&(A="/"+w.join(".")+A),this.hostname=x.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=o.toASCII(this.hostname));var j=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+j,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),A[0]!=="/"&&(A="/"+A))}if(!b[z])for(G=0,P=c.length;G<P;G++){var ee=c[G];if(A.indexOf(ee)!==-1){var re=encodeURIComponent(ee);re===ee&&(re=escape(ee)),A=A.split(ee).join(re)}}var M=A.indexOf("#");M!==-1&&(this.hash=A.substr(M),A=A.slice(0,M));var C=A.indexOf("?");if(C!==-1?(this.search=A.substr(C),this.query=A.substr(C+1),F&&(this.query=_.parse(this.query)),A=A.slice(0,C)):F&&(this.search="",this.query={}),A&&(this.pathname=A),y[z]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var B=this.search||"";this.path=j+B}return this.href=this.format(),this},u.prototype.format=function(){var D=this.auth||"";D&&(D=(D=encodeURIComponent(D)).replace(/%3A/i,":"),D+="@");var F=this.protocol||"",R=this.pathname||"",X=this.hash||"",H=!1,E="";this.host?H=D+this.host:this.hostname&&(H=D+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(H+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(E=_.stringify(this.query));var A=this.search||E&&"?"+E||"";return F&&F.substr(-1)!==":"&&(F+=":"),this.slashes||(!F||y[F])&&H!==!1?(H="//"+(H||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):H||(H=""),X&&X.charAt(0)!=="#"&&(X="#"+X),A&&A.charAt(0)!=="?"&&(A="?"+A),F+H+(R=R.replace(/[?#]/g,function(S){return encodeURIComponent(S)}))+(A=A.replace("#","%23"))+X},u.prototype.resolve=function(D){return this.resolveObject(T(D,!1,!0)).format()},u.prototype.resolveObject=function(D){if(a.isString(D)){var F=new u;F.parse(D,!1,!0),D=F}for(var R=new u,X=Object.keys(this),H=0;H<X.length;H++){var E=X[H];R[E]=this[E]}if(R.hash=D.hash,D.href==="")return R.href=R.format(),R;if(D.slashes&&!D.protocol){for(var A=Object.keys(D),S=0;S<A.length;S++){var I=A[S];I!=="protocol"&&(R[I]=D[I])}return y[R.protocol]&&R.hostname&&!R.pathname&&(R.path=R.pathname="/"),R.href=R.format(),R}if(D.protocol&&D.protocol!==R.protocol){if(!y[D.protocol]){for(var z=Object.keys(D),V=0;V<z.length;V++){var te=z[V];R[te]=D[te]}return R.href=R.format(),R}if(R.protocol=D.protocol,D.host||g[D.protocol])R.pathname=D.pathname;else{for(var W=(D.pathname||"").split("/");W.length&&!(D.host=W.shift()););D.host||(D.host=""),D.hostname||(D.hostname=""),W[0]!==""&&W.unshift(""),W.length<2&&W.unshift(""),R.pathname=W.join("/")}if(R.search=D.search,R.query=D.query,R.host=D.host||"",R.auth=D.auth,R.hostname=D.hostname||D.host,R.port=D.port,R.pathname||R.search){var q=R.pathname||"",G=R.search||"";R.path=q+G}return R.slashes=R.slashes||D.slashes,R.href=R.format(),R}var U=R.pathname&&R.pathname.charAt(0)==="/",L=D.host||D.pathname&&D.pathname.charAt(0)==="/",Y=L||U||R.host&&D.pathname,P=Y,J=R.pathname&&R.pathname.split("/")||[],ne=(W=D.pathname&&D.pathname.split("/")||[],R.protocol&&!y[R.protocol]);if(ne&&(R.hostname="",R.port=null,R.host&&(J[0]===""?J[0]=R.host:J.unshift(R.host)),R.host="",D.protocol&&(D.hostname=null,D.port=null,D.host&&(W[0]===""?W[0]=D.host:W.unshift(D.host)),D.host=null),Y=Y&&(W[0]===""||J[0]==="")),L)R.host=D.host||D.host===""?D.host:R.host,R.hostname=D.hostname||D.hostname===""?D.hostname:R.hostname,R.search=D.search,R.query=D.query,J=W;else if(W.length)J||(J=[]),J.pop(),J=J.concat(W),R.search=D.search,R.query=D.query;else if(!a.isNullOrUndefined(D.search))return ne&&(R.hostname=R.host=J.shift(),(k=!!(R.host&&R.host.indexOf("@")>0)&&R.host.split("@"))&&(R.auth=k.shift(),R.host=R.hostname=k.shift())),R.search=D.search,R.query=D.query,a.isNull(R.pathname)&&a.isNull(R.search)||(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R;if(!J.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var ie=J.slice(-1)[0],ae=(R.host||D.host||J.length>1)&&(ie==="."||ie==="..")||ie==="",x=0,w=J.length;w>=0;w--)(ie=J[w])==="."?J.splice(w,1):ie===".."?(J.splice(w,1),x++):x&&(J.splice(w,1),x--);if(!Y&&!P)for(;x--;x)J.unshift("..");!Y||J[0]===""||J[0]&&J[0].charAt(0)==="/"||J.unshift(""),ae&&J.join("/").substr(-1)!=="/"&&J.push("");var k,j=J[0]===""||J[0]&&J[0].charAt(0)==="/";return ne&&(R.hostname=R.host=j?"":J.length?J.shift():"",(k=!!(R.host&&R.host.indexOf("@")>0)&&R.host.split("@"))&&(R.auth=k.shift(),R.host=R.hostname=k.shift())),(Y=Y||R.host&&J.length)&&!j&&J.unshift(""),J.length?R.pathname=J.join("/"):(R.pathname=null,R.path=null),a.isNull(R.pathname)&&a.isNull(R.search)||(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=D.auth||R.auth,R.slashes=R.slashes||D.slashes,R.href=R.format(),R},u.prototype.parseHost=function(){var D=this.host,F=s.exec(D);F&&((F=F[0])!==":"&&(this.port=F.substr(1)),D=D.substr(0,D.length-F.length)),D&&(this.hostname=D)}},{"./util":77,punycode:51,querystring:54}],77:[function(t,n,l){n.exports={isString:function(o){return typeof o=="string"},isObject:function(o){return typeof o=="object"&&o!==null},isNull:function(o){return o===null},isNullOrUndefined:function(o){return o==null}}},{}],78:[function(t,n,l){(function(o){(function(){function a(u){try{if(!o.localStorage)return!1}catch(s){return!1}var h=o.localStorage[u];return h!=null&&String(h).toLowerCase()==="true"}n.exports=function(u,h){if(a("noDeprecation"))return u;var s=!1;return function(){if(!s){if(a("throwDeprecation"))throw new Error(h);a("traceDeprecation")?console.trace(h):console.warn(h),s=!0}return u.apply(this,arguments)}}}).call(this)}).call(this,typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],79:[function(t,n,l){n.exports=function o(a,u){if(a&&u)return o(a)(u);if(typeof a!="function")throw new TypeError("need wrapper function");return Object.keys(a).forEach(function(s){h[s]=a[s]}),h;function h(){for(var s=new Array(arguments.length),i=0;i<s.length;i++)s[i]=arguments[i];var p=a.apply(this,s),c=s[s.length-1];return typeof p=="function"&&p!==c&&Object.keys(c).forEach(function(f){p[f]=c[f]}),p}}},{}],80:[function(t,n,l){n.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}],81:[function(t,n,l){n.exports=function(){for(var a={},u=0;u<arguments.length;u++){var h=arguments[u];for(var s in h)o.call(h,s)&&(a[s]=h[s])}return a};var o=Object.prototype.hasOwnProperty},{}],82:[function(t,n,l){n.exports=function(o){o.prototype[Symbol.iterator]=function*(){for(let a=this.head;a;a=a.next)yield a.value}}},{}],83:[function(t,n,l){function o(i){var p=this;if(p instanceof o||(p=new o),p.tail=null,p.head=null,p.length=0,i&&typeof i.forEach=="function")i.forEach(function(d){p.push(d)});else if(arguments.length>0)for(var c=0,f=arguments.length;c<f;c++)p.push(arguments[c]);return p}function a(i,p,c){var f=p===i.head?new s(c,null,p,i):new s(c,p,p.next,i);return f.next===null&&(i.tail=f),f.prev===null&&(i.head=f),i.length++,f}function u(i,p){i.tail=new s(p,i.tail,null,i),i.head||(i.head=i.tail),i.length++}function h(i,p){i.head=new s(p,null,i.head,i),i.tail||(i.tail=i.head),i.length++}function s(i,p,c,f){if(!(this instanceof s))return new s(i,p,c,f);this.list=f,this.value=i,p?(p.next=this,this.prev=p):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}n.exports=o,o.Node=s,o.create=o,o.prototype.removeNode=function(i){if(i.list!==this)throw new Error("removing node which does not belong to this list");var p=i.next,c=i.prev;return p&&(p.prev=c),c&&(c.next=p),i===this.head&&(this.head=p),i===this.tail&&(this.tail=c),i.list.length--,i.next=null,i.prev=null,i.list=null,p},o.prototype.unshiftNode=function(i){if(i!==this.head){i.list&&i.list.removeNode(i);var p=this.head;i.list=this,i.next=p,p&&(p.prev=i),this.head=i,this.tail||(this.tail=i),this.length++}},o.prototype.pushNode=function(i){if(i!==this.tail){i.list&&i.list.removeNode(i);var p=this.tail;i.list=this,i.prev=p,p&&(p.next=i),this.tail=i,this.head||(this.head=i),this.length++}},o.prototype.push=function(){for(var i=0,p=arguments.length;i<p;i++)u(this,arguments[i]);return this.length},o.prototype.unshift=function(){for(var i=0,p=arguments.length;i<p;i++)h(this,arguments[i]);return this.length},o.prototype.pop=function(){if(this.tail){var i=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,i}},o.prototype.shift=function(){if(this.head){var i=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,i}},o.prototype.forEach=function(i,p){p=p||this;for(var c=this.head,f=0;c!==null;f++)i.call(p,c.value,f,this),c=c.next},o.prototype.forEachReverse=function(i,p){p=p||this;for(var c=this.tail,f=this.length-1;c!==null;f--)i.call(p,c.value,f,this),c=c.prev},o.prototype.get=function(i){for(var p=0,c=this.head;c!==null&&p<i;p++)c=c.next;if(p===i&&c!==null)return c.value},o.prototype.getReverse=function(i){for(var p=0,c=this.tail;c!==null&&p<i;p++)c=c.prev;if(p===i&&c!==null)return c.value},o.prototype.map=function(i,p){p=p||this;for(var c=new o,f=this.head;f!==null;)c.push(i.call(p,f.value,this)),f=f.next;return c},o.prototype.mapReverse=function(i,p){p=p||this;for(var c=new o,f=this.tail;f!==null;)c.push(i.call(p,f.value,this)),f=f.prev;return c},o.prototype.reduce=function(i,p){var c,f=this.head;if(arguments.length>1)c=p;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");f=this.head.next,c=this.head.value}for(var d=0;f!==null;d++)c=i(c,f.value,d),f=f.next;return c},o.prototype.reduceReverse=function(i,p){var c,f=this.tail;if(arguments.length>1)c=p;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");f=this.tail.prev,c=this.tail.value}for(var d=this.length-1;f!==null;d--)c=i(c,f.value,d),f=f.prev;return c},o.prototype.toArray=function(){for(var i=new Array(this.length),p=0,c=this.head;c!==null;p++)i[p]=c.value,c=c.next;return i},o.prototype.toArrayReverse=function(){for(var i=new Array(this.length),p=0,c=this.tail;c!==null;p++)i[p]=c.value,c=c.prev;return i},o.prototype.slice=function(i,p){(p=p||this.length)<0&&(p+=this.length),(i=i||0)<0&&(i+=this.length);var c=new o;if(p<i||p<0)return c;i<0&&(i=0),p>this.length&&(p=this.length);for(var f=0,d=this.head;d!==null&&f<i;f++)d=d.next;for(;d!==null&&f<p;f++,d=d.next)c.push(d.value);return c},o.prototype.sliceReverse=function(i,p){(p=p||this.length)<0&&(p+=this.length),(i=i||0)<0&&(i+=this.length);var c=new o;if(p<i||p<0)return c;i<0&&(i=0),p>this.length&&(p=this.length);for(var f=this.length,d=this.tail;d!==null&&f>p;f--)d=d.prev;for(;d!==null&&f>i;f--,d=d.prev)c.push(d.value);return c},o.prototype.splice=function(i,p,...c){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var f=0,d=this.head;d!==null&&f<i;f++)d=d.next;var v=[];for(f=0;d&&f<p;f++)v.push(d.value),d=this.removeNode(d);for(d===null&&(d=this.tail),d!==this.head&&d!==this.tail&&(d=d.prev),f=0;f<c.length;f++)d=a(this,d,c[f]);return v},o.prototype.reverse=function(){for(var i=this.head,p=this.tail,c=i;c!==null;c=c.prev){var f=c.prev;c.prev=c.next,c.next=f}return this.head=p,this.tail=i,this};try{t("./iterator.js")(o)}catch(i){}},{"./iterator.js":82}]},{},[12])(12)})})(Mg);function Lg(e,r){var a,u;let t=r.payload.topicName,n=r.payload.message,l=r.payload.notifyTime,o=`<div style="padding:0px 12px 0px 0px;width:300px;">
41
44
  <div style="display:flex;height: 20px;justify-content: space-between">
42
45
  <div style="color: #000000d9;
43
46
  font-size: 14px;
44
- font-weight: 700;">${t}</div><div style="color: #00000073;">${Gy(l)}</div>
47
+ font-weight: 700;">${t}</div><div style="color: #00000073;">${Ug(l)}</div>
45
48
  </div>
46
49
  <span>${n}</span>
47
- </div>`;e.message({content:a,duration:0,closeBtn:!0,placement:"right",height:75}),(o=r.payload.detail)!=null&&o.alarmConfigId&&Qy(e,(u=r.payload.detail)==null?void 0:u.alarmConfigId)}globalThis.doWarning=Ky;function Gy(e){const r=new Date(e),t=r.getFullYear(),n=(r.getMonth()+1+"").padStart(2,"0"),l=(r.getDate()+"").padStart(2,"0"),a=(r.getHours()+"").padStart(2,"0"),o=(r.getMinutes()+"").padStart(2,"0"),u=(r.getSeconds()+"").padStart(2,"0");return t+"-"+n+"-"+l+" "+a+":"+o+":"+u}function Qy(e,r){return je(this,null,function*(){const t=yield fetch(`/api/alarm/config/${r}`,{headers:{"X-Access-Token":localStorage.getItem("X-Access-Token")||new URLSearchParams(location.search).get("X-Access-Token")||"","Content-Type":"application/json"},method:"GET"});if(t.ok){let n=yield t.json();n.result.media&&G0(e,n.result.media,n.result.playTimes)}})}function G0(e,r,t){if(e.store.globalAudio||(e.store.globalAudio=document.createElement("audio")),e.store.globalAudio.src=r,e.store.globalAudio.play(),t===-1)e.store.globalAudio.loop=!0;else{e.store.globalAudio.loop=!1;let n=0;e.store.globalAudio.onended=()=>{n++,n<t&&e.store.globalAudio.play()}}}globalThis.createAudio=G0;const Yy="original_meta2d";function Xy(){return localStorage.removeItem(Yy)}let Pr={};const Zy=e=>{const r=document.querySelectorAll("video");let t=null;if(r.forEach(l=>{l.getAttribute("src")===e.video&&(t=l)}),!t)return;t.setAttribute("muted","muted"),t.setAttribute("autoplay","autoplay"),t.setAttribute("loop","loop"),t.setAttribute("crossorigin",""),t.setAttribute("controls",""),t.style.display="none",t.parentElement.style.border="2px solid #ffc878";const n=new JessibucaPro({container:t.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return e.autoPlay&&e.streamUrl&&n.play(e.streamUrl),Pr[e.id]=n,n},Jy=()=>{Object.keys(Pr).forEach(e=>{Pr[e].destroy(),Pr[e]=null}),Pr={}},_a=(e,r)=>{const t=e.__vccOpts||e;for(const[n,l]of r)t[n]=l;return t},eg={class:"sy-empty"},tg={key:1,class:"sy-empty-picture"},rg={class:"sy-empty-description"},ng=Object.assign({name:"SyEmpty"},{__name:"index",props:{image:{type:String,default:"empty"},imageSize:{type:Number,default:80},description:{type:String,default:"暂无数据"},onlyText:{type:Boolean,default:!1}},setup(e){P.useCssVars(l=>({dbdd1bf2:n.value.width,d36455f4:n.value.height}));const r=e,t=P.computed(()=>({"font-size":r.imageSize?`${r.imageSize}px`:"80px"})),n=P.computed(()=>r.imageSize?{width:r.imageSize*1.2+"px",height:r.imageSize+"px"}:{width:"187px",height:"144px"});return(l,a)=>{const o=P.resolveComponent("SyIcon"),u=P.resolveComponent("el-icon");return P.openBlock(),P.createElementBlock("div",eg,[e.image!=="empty"?(P.openBlock(),P.createElementBlock("span",{key:0,class:"sy-empty-image",style:P.normalizeStyle(t.value)},[e.image!=="loading"?(P.openBlock(),P.createBlock(o,{key:0,name:e.image,gradient:""},null,8,["name"])):(P.openBlock(),P.createBlock(u,{key:1,class:"is-loading",style:{color:"#1671d4"}},{default:P.withCtx(()=>[P.createVNode(P.unref(B0))]),_:1}))],4)):e.onlyText?P.createCommentVNode("",!0):(P.openBlock(),P.createElementBlock("span",tg)),P.createElementVNode("div",rg,[P.createElementVNode("p",null,P.toDisplayString(e.description),1)])])}}}),ig=_a(ng,[["__scopeId","data-v-c5e7d407"]]),og=Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["loaded","load-error"],setup(e,{expose:r,emit:t}){const n=t,l=e,a=P.ref(null),o=P.shallowRef(),u=P.computed(()=>!!(l.data||l.url));P.watch(()=>[l.data,l.url],()=>{u.value&&s()});let d=P.ref(!0);function s(){return je(this,null,function*(){try{if(d.value=!0,yield P.nextTick(),!a.value){console.error("未找到meta2d元素!");return}let g=null;if(l.data?g=l.data:l.url&&(g=yield v()),!g||!g.data){d.value=!1,console.log("图纸数据为空"),n("load-error");return}const b=g.options||{background:"#eee",disableAnchor:!1};if(o.value&&(o.value.destroy(!0),o.value=null),!a.value){console.error("Meta2D 容器元素不可用");return}o.value=new Pe.Meta2d(a.value,he({},b)),b.visibleLevel&&o.value.scale(b.visibleLevel),i(),p(),yield c(g.data),o.value.render(),f(),setTimeout(()=>{window.meta2dTools&&window.registerToolsNew()},1e3),n("loaded",o.value)}catch(g){console.error("初始化编辑器失败:",g)}})}function i(){if(!o.value)return;new Hy({}).initPlugin(o.value,"mindNode",{})}function p(){Pe.register(Ic.classPens()),Pe.register(Da.flowPens()),Pe.registerAnchors(Da.flowAnchors()),Pe.register(Ra.sequencePens()),Pe.registerCanvasDraw(Ra.sequencePensbyCtx()),Pe.register(Oa.activityDiagram()),Pe.registerCanvasDraw(Oa.activityDiagramByCtx()),Pe.registerCanvasDraw(Fc.formPens()),Pe.registerCanvasDraw(Dc.chartsPens()),Pe.register(wi.ftaPens()),Pe.registerAnchors(wi.ftaAnchors()),Pe.registerCanvasDraw(wi.ftaPensbyCtx())}function c(g){var b;if(o.value){if(typeof g.locked=="undefined"&&(g.locked=0),g.bkImage&&o.value.setBackgroundImage(g.bkImage),g.pens&&g.pens.length>0){const y=[];g.pens.forEach(B=>{B.name==="video"&&B.streamUrl?y.push(B):B.name==="image"&&B.image&&(B.image=jy(B.image,l.devConfig))}),y.length>0&&setTimeout(()=>{y.forEach(B=>{Zy(B)})},500);const _=window.meta.graph.penCountThreshold||2e3;g.pens.length>_&&g.scale&&g.pens.forEach(B=>{const F=B.visibleLevel;F!==void 0?(B.visible=g.scale>=F,B.visible||(B.disabled=!0,B.locked=Pe.LockState.Disable)):(B.visible=!0,B.disabled=!1,B.locked=Pe.LockState.None)})}o.value.open(g),!l.preview&&((b=g.networks)!=null&&b.length)&&o.value.closeNetwork()}}function f(){o.value&&o.value.on("scale",h)}const h=jn.debounce(g=>{var b,y,_,T;try{if(!o.value)return;Wo.emit("graph-scale",g);let B=o.value.store.data.pens;const F=window.meta.graph.penCountThreshold||2e3,R=B.length>F;for(let Z=0;Z<B.length;Z++){const j=B[Z];if([Se.VIDEO_STREAM,Se.MP4].includes(j.penType)){if(((y=(b=fr[j.id])==null?void 0:b.children)==null?void 0:y.length)===3){let E=fr[j.id].children[0],A=fr[j.id].children[2];E.style.width=A.currentTime/A.duration*j.calculative.worldRect.width+"px"}else if(((T=(_=fr[j.id])==null?void 0:_.children)==null?void 0:T.length)===2){let E=fr[j.id].children[0],A=fr[j.id].children[1];E.style.width=A.currentTime/A.duration*j.calculative.worldRect.width+"px"}}if(R){const E=j.visibleLevel!==void 0?g>=j.visibleLevel:!0;o.value._setValue({id:j.id,visible:E,disabled:!E,locked:E?Pe.LockState.None:Pe.LockState.Disable})}}o.value.render()}catch(B){console.error("处理缩放失败:",B)}},500);function v(){return je(this,null,function*(){if(!l.url)return st.error("图纸路径为空!"),null;try{return(yield Vo.getGraphApi(l.url,{local:l.local}))||null}catch(g){return null}})}const m=()=>{o.value&&o.value.resize()};return P.onMounted(()=>{u.value&&s(),window.document.addEventListener("resize",m)}),P.onUnmounted(()=>{Jy(),Xy(),o.value&&(l.preview?(ru.clearLineCross(),o.value.destroy(!0)):o.value.off("scale",h)),window.document.removeEventListener("resize",m)}),r({stage:o}),(g,b)=>(P.openBlock(),P.createElementBlock("div",{ref_key:"meta2dRef",ref:a,class:"meta2d-editor"},[P.unref(d)?P.createCommentVNode("",!0):(P.openBlock(),P.createBlock(ig,{key:0,class:"meta2d-empty",description:"图纸不存在"}))],512))}}),ag=_a(og,[["__scopeId","data-v-178370a7"]]),sg={class:"preview-container"},lg={key:0,class:"back-btn"},ug=Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},config:{type:Object,default:()=>({socketUrl:Cs,stationIdKey:Ml,enableToken:!0,userTokenKey:Nl,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:As.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},apiInstance:{type:Object,default:()=>Vo},mittInstance:{type:Object,default:()=>Wo},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["error","loaded","custom-msg","socket-msg"],setup(e,{expose:r,emit:t}){const n=t,l=e;let a=P.ref(!1),o=P.ref(""),u=P.ref(!1);const d=P.ref(null),s=P.ref(""),i=P.ref(!1),p=P.computed(()=>{var G;return(G=d.value)==null?void 0:G.stage}),c=P.computed(()=>{var G;return(G=p.value)==null?void 0:G.store}),f=P.computed(()=>he({socketUrl:Cs,stationIdKey:Ml,enableToken:!0,userTokenKey:Nl,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:As.GRAPH.SOCKET},l.config)),h=()=>l.apiInstance||Vo,v=()=>l.mittInstance||Wo,m=(G,q="")=>{const N={error:G,message:q,timestamp:new Date().toISOString()};n("error",N),l.errorHandler.callback?l.errorHandler.callback(N):l.errorHandler.showMessage&&st&&st.error(`${q}: ${G.message||G}`)},g=()=>{o.value&&(s.value=o.value,i.value=u.value)},b={},y=G=>{var q,N,V,L,O,K;try{if(!G)return;if((q=G==null?void 0:G.includes)!=null&&q.call(G,"token 必传"))return st.warning(G);const H=typeof G=="string"?JSON.parse(G):G;if((H==null?void 0:H.data)==="服务错误"||(V=(N=H==null?void 0:H.data)==null?void 0:N.includes)!=null&&V.call(N,"token is expired"))return st.warning(H.data);switch(n("socket-msg",H),H.action){case Ki.ACPOINT.YCVALUE:case Ki.ACPOINT.YXVALUE:if((L=H==null?void 0:H.data)!=null&&L.point_id){const J=p.value.find(H.data.point_id);J&&(b[H.data.point_id]=H.action===Ki.ACPOINT.YXVALUE?H.data.value:H.data.value_disp||H.data.value,I(J,H.data))}break;default:if(((O=H.data)==null?void 0:O.length)>0){const J=setTimeout(()=>{clearTimeout(J),p.value&&(H.data.forEach(ne=>{b[ne.dataId||ne.point_id]=ne.value_disp||ne.value}),H.data.forEach(ne=>{const ie=p.value.find(ne.dataId||ne.point_id);I(ie,ne)}))},f.value.messageDelay);l.customCallbacks.onWebSocketMessage&&l.customCallbacks.onWebSocketMessage(H),(K=window.customSocketFn)==null||K.call(window,G)}break}return!0}catch(H){return m(H,"WebSocket消息处理"),!0}},_=G=>je(this,null,function*(){try{if(G.msgName)switch(G.msgName){case nt.CHANGE_GRAPH:case nt.NOTIFY_DIALOG:T(G);break}else T(G);n("custom-msg",G),l.customCallbacks.onCustomMessage&&l.customCallbacks.onCustomMessage(G)}catch(q){m(q,"自定义消息处理")}}),T=G=>{var q;if(G.params){const N=JSON.parse(G.params);switch(N.action){case nt.CHANGE_GRAPH:(N==null?void 0:N.data)!=="图纸id"?(o.value=s.value,u.value=i.value,a.value=N.isBack,(q=N==null?void 0:N.data)!=null&&q.startsWith("/")?(s.value=N==null?void 0:N.data,i.value=!0):(i.value=!1,F(N.data))):console.warn("切换图纸信息为空");break;case nt.NOTIFY_DIALOG:N.msg!=="通知内容"?Py(he({message:N.msg},N)):console.warn("通知内容为空");break}}},B=G=>{var q,N,V,L,O,K,H,J,ne;try{n("loaded",G);const ie=Z(),te=f.value,x=Ol.getSession(te.stationIdKey),w=Ol.getSession(te.userTokenKey);te.enableWebSocket&&x&&w&&((V=(N=(q=G.store)==null?void 0:q.data)==null?void 0:N.networks)!=null&&V.length?(K=(O=(L=G.store)==null?void 0:L.data)==null?void 0:O.networks)==null||K.forEach(Q=>{var ee;Q.protocol==="websocket"&&((ee=Q.url)!=null&&ee.includes("station_id")||(Q.url=`${Q.url}?station_id=${x}`),te.enableToken?Q.protocols=w:Q.protocols=void 0)}):(J=(H=G.store)==null?void 0:H.data)!=null&&J.websocket?((ne=G.store.data.websocket)!=null&&ne.includes("station_id")||(G.store.data.websocket=`${G.store.data.websocket}?station_id=${x}`),te.enableToken?G.store.data.websocketProtocols=w:G.store.data.websocketProtocols=void 0,G.closeSocket(),G.connectSocket()):(G.store.data.websocket=`${te.socketUrl}?station_id=${x}`,te.enableToken?G.store.data.websocketProtocols=w:G.store.data.websocketProtocols=void 0,G.connectWebsocket())),(l.showMap||ie.showMap==="true")&&G.showMap(),G.setRule({rule:!1}),G.setOptions({disableRuleLine:!0}),G.setGrid({grid:!1}),G.lock(Pe.LockState.DisableEdit),A().forEach(Q=>{var ee;(ee=Q==null?void 0:Q.events)!=null&&ee.length?j({id:Q.id,locked:1},!1):j({id:Q.id,locked:10},!1)}),G.render(),te.enableAutoFit&&G.fitView(!0,te.fitPadding),Object.values(nt).forEach(Q=>{G.on(Q,ee=>_(we(he({},ee),{msgName:Q})))}),G&&(G.socketFn=y),l.customCallbacks.onStageLoaded&&l.customCallbacks.onStageLoaded(G),l.isInitData&&R(G)}catch(ie){m(ie,"图纸加载完成处理")}},F=G=>je(this,null,function*(){var q;try{if(l.url){s.value=l.url,i.value=l.local;return}const N=Z();if(G=G||l.gid||N.id,N.local==="true"&&(i.value=!0),G){const V=h();if(V&&V.getCommonApi){const L=yield V.getCommonApi(l.isFactory?"graph":"floorplan",{guid:G});if((q=L.data)!=null&&q.length)s.value=L.data[0].path,l.customCallbacks.onGraphLoaded&&l.customCallbacks.onGraphLoaded(s.value);else{const O="未找到图纸!";m(new Error(O),"获取图纸数据")}}else m(new Error("API实例不可用"),"初始化图纸数据!")}else s.value=l.url,i.value=l.local}catch(N){m(N,"获取图纸数据失败")}}),R=G=>je(this,null,function*(){var q,N,V,L;if(G){let O=[],K=[],H=[];const J=G.store.data.pens;for(let ie=0;ie<J.length;ie++){const te=J[ie];te.bindDataId?(q=te.form)!=null&&q.length&&te.form.forEach(x=>{if(x.dataIds.dataId)switch(x.dataIds.dataType){case St.YC:O.push(we(he({},x),{nodeName:x.dataIds.name,penId:te.id,penName:te.penName}));break;case St.YX:K.push(we(he({},x),{nodeName:x.dataIds.name,penId:te.id,penName:te.penName}));break;case St.SG:K.push(we(he({},x),{nodeName:x.dataIds.name,penId:te.id,penName:te.penName}));break;case St.POINT:H.push(we(he({},x),{nodeName:x.dataIds.name,penId:te.id,penName:te.penName}));break}}):(N=te.statusBindData)!=null&&N.length&&te.statusBindData.forEach(x=>{if(x.dataId)switch(x.dataType){case St.YX:K.push({showChild:0,value:0,nodeName:x.dataName,penId:te.id,penName:te.penName,dataId:x.dataId});break;case St.SG:K.push({showChild:0,value:0,nodeName:x.dataName,penId:te.id,penName:te.penName,dataId:x.dataId});break}})}let ne=[];if(O.length){const ie=h();if(ie&&ie.postCommonApi){const te=yield ie.postCommonApi("queryrealtimepoint",{point_id:O.map(x=>{var w;return((w=x==null?void 0:x.dataIds)==null?void 0:w.dataId)||x.dataId}).join(",")});(V=te==null?void 0:te.data)!=null&&V.length&&(te.data.forEach(x=>{b[x.guid]=x.value_disp||x.value}),ne=[...ne,...te.data])}}if(K.length){const ie=h();if(ie&&ie.postCommonApi){const te=yield ie.postCommonApi("queryrealtimepoint",{point_id:K.map(x=>{var w;return((w=x==null?void 0:x.dataIds)==null?void 0:w.dataId)||x.dataId}).join(",")});(L=te==null?void 0:te.data)!=null&&L.length&&(te.data.forEach(x=>{b[x.guid]=Bs(x.value)?Number(x.value):x.value}),ne=[...ne,...te.data])}}ne.length&&ne.forEach(ie=>{const te=G.find(ie.guid);I(te,we(he({},ie),{value:Bs(ie.value)?Number(ie.value):ie.value,value_disp:ie.value_disp,alarm_value:ie.alarm_value,point_id:ie.guid}))})}}),Z=()=>{var V;const G={},q=((V=window.location.href.split("?"))==null?void 0:V[1])||"",N=new URLSearchParams(q);for(const[L,O]of N.entries())G[L]=O;return G},j=(G,q=!0)=>{if(p.value)return p.value.setValue(G,{render:q})},E=()=>p.value,A=()=>{var G,q;return((q=(G=c.value)==null?void 0:G.data)==null?void 0:q.pens)||[]},C=()=>Se,I=(()=>{let G=null;const q=new Map,N=new Map,V=O=>{var H;if(!((H=O.children)!=null&&H.length))return[];const K=O.id||"";if(!K)return[];if(!N.has(K)&&c.value){const J=Pe.getAllChildren(O,c.value);N.set(K,J)}return N.get(K)||[]},L=()=>{if(q.size===0||!p.value||!c.value)return;const O=[],K=[],H=c.value.animates;q.forEach(({pen:J,dataItem:ne,formKey:ie})=>{switch(ie){case"showChild":j({id:J.id,showChild:+ne.value},!1);break;case"text":j({id:J.id,text:ne.value_disp||ne.value},!1);break;case"light_plate":{const te=ne.value===-1||Pl(ne)?"#999999":K0[ne.value!==void 0?ne.value:ne.alarm_value],x=ne.value===-1||Pl(ne)?"#cccccc":W0[ne.value!==void 0?ne.value:ne.alarm_value];j({id:J.id,textColor:te,background:x},!1)}break;case"point_value":J.penType===Se.POINT_VALUE&&V(J).forEach(x=>{x.name==="text"&&j({id:x.id,text:ne.value},!1)});break;case"online_state":{let te=ne.value?void 0:"contrast(0%)";j({id:J.id,filter:te},!1),V(J).forEach(w=>{j({id:w.id,filter:te},!1)})}break;case"charged_state":{const te=ne.value===n1.OFFLINE?"contrast(0%)":void 0;te!==J.filter&&(j({id:J.id,filter:te},!1),V(J).forEach(w=>{j({id:w.id,filter:te},!1)}))}break;case"electric_direction":ne.value===i1.STOP?H!=null&&H.has(J)&&K.push(J):!!ne.value!==J.animateReverse&&(j({id:J.id,animateReverse:!!ne.value},!1),H!=null&&H.has(J)||O.push(J));break;case"electric_size":{const te=o1[ne.value];te!==void 0&&te!==J.lineWidth&&j({id:J.id,lineWidth:te},!1)}break;default:j({id:J.id,[ie]:ne.value},!1);break}}),K.length>0&&p.value.stopAnimate(K),O.length>0&&p.value.startAnimate(O),q.clear(),p.value.render()};return(O,K)=>{O!=null&&O.length&&(O.forEach(H=>{var ne;const J=H.form;if((ne=H.statusBindData)!=null&&ne.length){if(!b[K.guid])return;const ie=[...H.statusBindData],te=ie.findIndex(x=>x.dataId===K.guid);if(te!==-1){const x=ie[te];ie.find(D=>x.sort<D.sort&&b[D.dataId])||q.set(H.id,{pen:H,formKey:"showChild",dataItem:we(he({},K),{value:te})})}}else J!=null&&J.length&&J.forEach(ie=>{if(!(Array.isArray(ie.dataIds)?ie.dataIds:[ie.dataIds]).some(D=>(D==null?void 0:D.dataId)&&((D==null?void 0:D.dataId)===K.dataId||(D==null?void 0:D.dataId)===K.point_id)))return;const w=`${H.id}-${ie.key}`;q.set(w,{pen:H,dataItem:K,formKey:ie.key})})}),G&&clearTimeout(G),G=setTimeout(()=>{L(),G=null},f.value.debounceDelay))}})(),z=G=>{if(p.value){for(let q=0;q<G.length;q++){const N=G[q];b[N.dataId||N.point_id]=N.value_disp||N.value;const V=p.value.find(N.dataId);setTimeout(()=>{I(V,N)},f.value.messageDelay)}p.value.render(),l.customCallbacks.onBatchUpdate&&l.customCallbacks.onBatchUpdate(G)}},W=(G,q=!1)=>{if(!p.value)return;const N=A();for(let V=0;V<N.length;V++){const L=N[V];let O=!1;q?O=G===L.dataProp:O=G===5?!0:L.dataProp<=G,j({id:L.id,visible:O},!1)}p.value.fitView(),p.value.render(),l.customCallbacks.onLevelChange&&l.customCallbacks.onLevelChange(G,q)};return P.watch(()=>[l.url,l.isFactory,l.local,l.data,l.gid],()=>{F()}),P.watch(()=>l.showMap,G=>{p.value&&(G?p.value.showMap():p.value.hideMap())}),P.onMounted(()=>{const G=v();G&&G.on&&G.on(f.value.graphSocket,y),F()}),P.onUnmounted(()=>{const G=v();G&&G.off&&G.off(f.value.graphSocket,y)}),r({setValue:j,getStage:E,getAllPens:A,getCustomPenType:C,batchUpdatePen:z,handleLineCross:ru.handleLineCross,changeVisibleByLevel:W}),(G,q)=>(P.openBlock(),P.createElementBlock("div",sg,[P.createVNode(ag,{ref_key:"graphRef",ref:d,url:s.value,local:i.value,data:l.data,"dev-config":l.devConfig,preview:"",onLoaded:B},null,8,["url","local","data","dev-config"]),P.unref(a)?(P.openBlock(),P.createElementBlock("div",lg,[P.createVNode(P.unref(ay),{type:"primary",onClick:g},{default:P.withCtx(()=>[...q[0]||(q[0]=[P.createTextVNode("返回",-1)])]),_:1})])):P.createCommentVNode("",!0)]))}}),Vr=_a(ug,[["__scopeId","data-v-211359e7"]]);Vr.name||(Vr.name="SyGraph");const cg=e=>{e.component(Vr.name||"SyGraph",Vr)},fg={install:cg};exports.SyGraph=Vr;exports.default=fg;
50
+ </div>`;e.message({content:o,duration:0,closeBtn:!0,placement:"right",height:75}),(a=r.payload.detail)!=null&&a.alarmConfigId&&$g(e,(u=r.payload.detail)==null?void 0:u.alarmConfigId)}globalThis.doWarning=Lg;function Ug(e){const r=new Date(e),t=r.getFullYear(),n=(r.getMonth()+1+"").padStart(2,"0"),l=(r.getDate()+"").padStart(2,"0"),o=(r.getHours()+"").padStart(2,"0"),a=(r.getMinutes()+"").padStart(2,"0"),u=(r.getSeconds()+"").padStart(2,"0");return t+"-"+n+"-"+l+" "+o+":"+a+":"+u}function $g(e,r){return Ne(this,null,function*(){const t=yield fetch(`/api/alarm/config/${r}`,{headers:{"X-Access-Token":localStorage.getItem("X-Access-Token")||new URLSearchParams(location.search).get("X-Access-Token")||"","Content-Type":"application/json"},method:"GET"});if(t.ok){let n=yield t.json();n.result.media&&sc(e,n.result.media,n.result.playTimes)}})}function sc(e,r,t){if(e.store.globalAudio||(e.store.globalAudio=document.createElement("audio")),e.store.globalAudio.src=r,e.store.globalAudio.play(),t===-1)e.store.globalAudio.loop=!0;else{e.store.globalAudio.loop=!1;let n=0;e.store.globalAudio.onended=()=>{n++,n<t&&e.store.globalAudio.play()}}}globalThis.createAudio=sc;const qg="original_meta2d";function zg(){return localStorage.removeItem(qg)}let Ur={};const jg=e=>{const r=document.querySelectorAll("video");let t=null;if(r.forEach(l=>{l.getAttribute("src")===e.video&&(t=l)}),!t)return;t.setAttribute("muted","muted"),t.setAttribute("autoplay","autoplay"),t.setAttribute("loop","loop"),t.setAttribute("crossorigin",""),t.setAttribute("controls",""),t.style.display="none",t.parentElement.style.border="2px solid #ffc878";const n=new JessibucaPro({container:t.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return e.autoPlay&&e.streamUrl&&n.play(e.streamUrl),Ur[e.id]=n,n},Hg=()=>{Object.keys(Ur).forEach(e=>{Ur[e].destroy(),Ur[e]=null}),Ur={}},Vg={class:"sy-empty"},Wg={key:1,class:"sy-empty-picture"},Gg={class:"sy-empty-description"},Kg=Object.assign({name:"SyEmpty"},{__name:"index",props:{image:{type:String,default:"empty"},imageSize:{type:Number,default:80},description:{type:String,default:"暂无数据"},onlyText:{type:Boolean,default:!1}},setup(e){O.useCssVars(l=>({a7383bac:n.value.width,v736d2d7a:n.value.height}));const r=e,t=O.computed(()=>({"font-size":r.imageSize?`${r.imageSize}px`:"80px"})),n=O.computed(()=>r.imageSize?{width:r.imageSize*1.2+"px",height:r.imageSize+"px"}:{width:"187px",height:"144px"});return(l,o)=>{const a=O.resolveComponent("SyIcon"),u=O.resolveComponent("el-icon");return O.openBlock(),O.createElementBlock("div",Vg,[e.image!=="empty"?(O.openBlock(),O.createElementBlock("span",{key:0,class:"sy-empty-image",style:O.normalizeStyle(t.value)},[e.image!=="loading"?(O.openBlock(),O.createBlock(a,{key:0,name:e.image,gradient:""},null,8,["name"])):(O.openBlock(),O.createBlock(u,{key:1,class:"is-loading",style:{color:"#1671d4"}},{default:O.withCtx(()=>[O.createVNode(O.unref(q0))]),_:1}))],4)):e.onlyText?O.createCommentVNode("",!0):(O.openBlock(),O.createElementBlock("span",Wg)),O.createElementVNode("div",Gg,[O.createElementVNode("p",null,O.toDisplayString(e.description),1)])])}}}),Qg=ci(Kg,[["__scopeId","data-v-247a0fc9"]]),Yg=Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["loaded","load-error"],setup(e,{expose:r,emit:t}){const n=t,l=e,o=O.ref(null),a=O.shallowRef(),u=O.computed(()=>!!(l.data||l.url));O.watch(()=>[l.data,l.url],()=>{u.value&&s()});let h=O.ref(!0);function s(){return Ne(this,null,function*(){try{if(h.value=!0,yield O.nextTick(),!o.value){console.error("未找到meta2d元素!");return}let g=null;if(l.data?g=l.data:l.url&&(g=yield m()),!g||!g.data){h.value=!1,console.log("图纸数据为空"),n("load-error");return}const y=g.options||{background:"#eee",disableAnchor:!1};if(a.value&&(a.value.destroy(!0),a.value=null),!o.value){console.error("Meta2D 容器元素不可用");return}a.value=new Me.Meta2d(o.value,fe({},y)),y.visibleLevel&&a.value.scale(y.visibleLevel),i(),p(),yield c(g.data),a.value.render(),d(),setTimeout(()=>{window.meta2dTools&&window.registerToolsNew()},1e3),n("loaded",a.value)}catch(g){console.error("初始化编辑器失败:",g)}})}function i(){if(!a.value)return;new Pg({}).initPlugin(a.value,"mindNode",{})}function p(){Me.register(Hc.classPens()),Me.register(Na.flowPens()),Me.registerAnchors(Na.flowAnchors()),Me.register(Ma.sequencePens()),Me.registerCanvasDraw(Ma.sequencePensbyCtx()),Me.register(La.activityDiagram()),Me.registerCanvasDraw(La.activityDiagramByCtx()),Me.registerCanvasDraw(jc.formPens()),Me.registerCanvasDraw(Vc.chartsPens()),Me.register(ki.ftaPens()),Me.registerAnchors(ki.ftaAnchors()),Me.registerCanvasDraw(ki.ftaPensbyCtx())}function c(g){var y;if(a.value){if(typeof g.locked=="undefined"&&(g.locked=0),g.bkImage&&a.value.setBackgroundImage(g.bkImage),g.pens&&g.pens.length>0){const _=[];g.pens.forEach(F=>{F.name==="video"&&F.streamUrl?_.push(F):F.name==="image"&&F.image?F.image=Tg(F.image,l.devConfig):F.penType===Se.TABLE&&F.dataType&&f(F)}),_.length>0&&setTimeout(()=>{_.forEach(F=>{jg(F)})},500);const T=window.meta.graph.penCountThreshold||2e3;g.pens.length>T&&g.scale&&g.pens.forEach(F=>{const R=F.visibleLevel;R!==void 0?(F.visible=g.scale>=R,F.visible||(F.disabled=!0,F.locked=Me.LockState.Disable)):(F.visible=!0,F.disabled=!1,F.locked=Me.LockState.None)})}a.value.open(g),!l.preview&&((y=g.networks)!=null&&y.length)&&a.value.closeNetwork()}}const f=g=>Ne(this,null,function*(){var _;const y=yield vr.getCommonApi(L1[g.dataType],{offset:0,limit:g.tableSize||10});if((_=y.data)!=null&&_.length){const T=g.tableHeader||[{prop:"id",label:"ID"},{prop:"guid",label:"标识"},{prop:"name",label:"名称"}],D=y.data.map(F=>T.filter(R=>R.isShow).map(R=>{const X=F[R.prop];return R.choices?R.choices[X]||X:_r.isObject(X)?X.name:X}));a.value.setValue({id:g.id,dataY:D})}else a.value.setValue({id:g.id,dataY:[]})}),d=()=>{a.value&&a.value.on("scale",v)},v=_r.debounce(g=>{var y,_,T,D;try{if(!a.value)return;Zo.emit("graph-scale",g);let F=a.value.store.data.pens;const R=window.meta.graph.penCountThreshold||2e3,X=F.length>R;for(let H=0;H<F.length;H++){const E=F[H];if([Se.VIDEO_STREAM,Se.MP4].includes(E.penType)){if(((_=(y=dr[E.id])==null?void 0:y.children)==null?void 0:_.length)===3){let A=dr[E.id].children[0],S=dr[E.id].children[2];A.style.width=S.currentTime/S.duration*E.calculative.worldRect.width+"px"}else if(((D=(T=dr[E.id])==null?void 0:T.children)==null?void 0:D.length)===2){let A=dr[E.id].children[0],S=dr[E.id].children[1];A.style.width=S.currentTime/S.duration*E.calculative.worldRect.width+"px"}}if(X){const A=E.visibleLevel!==void 0?g>=E.visibleLevel:!0;a.value._setValue({id:E.id,visible:A,disabled:!A,locked:A?Me.LockState.None:Me.LockState.Disable})}}a.value.render()}catch(F){console.error("处理缩放失败:",F)}},500);function m(){return Ne(this,null,function*(){if(!l.url)return lt.error("图纸路径为空!"),null;try{return(yield vr.getGraphApi(l.url,{local:l.local}))||null}catch(g){return null}})}const b=()=>{a.value&&a.value.resize()};return O.onMounted(()=>{u.value&&s(),window.addEventListener("resize",b)}),O.onUnmounted(()=>{Hg(),zg(),a.value&&(l.preview?(xu.clearLineCross(),a.value.destroy(!0)):a.value.off("scale",v)),window.removeEventListener("resize",b)}),r({stage:a}),(g,y)=>(O.openBlock(),O.createElementBlock("div",{ref_key:"meta2dRef",ref:o,class:"meta2d-editor"},[O.unref(h)?O.createCommentVNode("",!0):(O.openBlock(),O.createBlock(Qg,{key:0,class:"meta2d-empty",description:"图纸不存在"}))],512))}}),Xg=ci(Yg,[["__scopeId","data-v-c2470fcc"]]),Zg={class:"meta2d-preview"},Jg={key:0,class:"back-btn"};var vu,gu;const ex=Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},lang:{type:String,default:((gu=(vu=window.meta)==null?void 0:vu.app)==null?void 0:gu.lang)||"zh-cn"},config:{type:Object,default:()=>({socketUrl:Ss,stationIdKey:Ll,enableToken:!0,userTokenKey:Ml,useToken:void 0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:As.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},apiInstance:{type:Object,default:()=>vr},mittInstance:{type:Object,default:()=>Zo},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["error","loaded","custom-msg","socket-msg"],setup(e,{expose:r,emit:t}){const n=t,l=e;let o=O.ref(!1),a=O.ref(""),u=O.ref(!1);const h=O.ref(null),s=O.ref(""),i=O.ref(!1),p=O.computed(()=>{var P;return(P=h.value)==null?void 0:P.stage}),c=O.computed(()=>{var P;return(P=p.value)==null?void 0:P.store}),f=O.computed(()=>fe({socketUrl:Ss,stationIdKey:Ll,enableToken:!0,userTokenKey:Ml,userToken:void 0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:As.GRAPH.SOCKET},l.config)),d=()=>l.apiInstance||vr,v=()=>l.mittInstance||Zo,m=(P,J="")=>{const ne={error:P,message:J,timestamp:new Date().toISOString()};n("error",ne),l.errorHandler.callback?l.errorHandler.callback(ne):l.errorHandler.showMessage&&lt&&lt.error(`${J}: ${P.message||P}`)},b=()=>{a.value&&(s.value=a.value,i.value=u.value)},g={},y=O.ref(!1),_=O.ref({left:0,top:0}),T=P=>{y.value&&(_.value={left:P.clientX+20,top:P.clientY+20})},D=P=>{var J,ne,ie,ae,x,w;try{if(!P)return;if((J=P==null?void 0:P.includes)!=null&&J.call(P,"token 必传"))return lt.warning(P);const k=typeof P=="string"?JSON.parse(P):P;if((k==null?void 0:k.data)==="服务错误"||(ie=(ne=k==null?void 0:k.data)==null?void 0:ne.includes)!=null&&ie.call(ne,"token is expired"))return lt.warning(k.data);switch(n("socket-msg",k),k.action){case Zi.ACPOINT.YCVALUE:case Zi.ACPOINT.YXVALUE:if((ae=k==null?void 0:k.data)!=null&&ae.point_id){const j=p.value.find(k.data.point_id);j&&(g[k.data.point_id]=k.action===Zi.ACPOINT.YXVALUE?wn(k.data.value)?k.data.value:0:wn(k.data.value_disp||k.data.value)?k.data.value_disp||k.data.value:0,U(j,k.data))}break;default:if(((x=k.data)==null?void 0:x.length)>0){const j=setTimeout(()=>{clearTimeout(j),p.value&&(k.data.forEach(Z=>{g[Z.dataId||Z.point_id]=Z.value_disp||Z.value}),k.data.forEach(Z=>{const ee=p.value.find(Z.dataId||Z.point_id);U(ee,Z)}))},f.value.messageDelay);l.customCallbacks.onWebSocketMessage&&l.customCallbacks.onWebSocketMessage(k),(w=window.customSocketFn)==null||w.call(window,P)}break}return!0}catch(k){return m(k,"WebSocket消息处理"),!0}},F=O.ref({});let R={},X=null;const H=P=>Ne(this,null,function*(){console.log("🚀 ~ handleEvent ~ msg:",P);try{if(P.msgName)switch(P.msgName){case Ze.CHANGE_GRAPH:case Ze.NOTIFY_DIALOG:case Ze.GIS_PROPS_PANEL:E(P);break}else E(P);n("custom-msg",P),l.customCallbacks.onCustomMessage&&l.customCallbacks.onCustomMessage(P)}catch(J){m(J,"自定义消息处理")}}),E=P=>{var ie,ae;let J;if(P.params)try{J=JSON.parse(P.params)}catch(x){J=P.params}switch(P.msgName){case Ze.CHANGE_GRAPH:(J==null?void 0:J.data)!=="图纸id"?(a.value=s.value,u.value=i.value,o.value=J.isBack,(ie=J==null?void 0:J.data)!=null&&ie.startsWith("/")?(s.value=J==null?void 0:J.data,i.value=!0):(i.value=!1,S(J.data))):console.warn("切换图纸信息为空");break;case Ze.NOTIFY_DIALOG:J.msg!=="通知内容"?wg(fe({message:J.msg},J)):console.warn("通知内容为空");break;case Ze.GIS_PROPS_PANEL:P.eventName==="enter"?(y.value=!0,F.value=((ae=P==null?void 0:P.pen)==null?void 0:ae.bindData)||{},P.e&&(_.value={left:P.e.clientX+20,top:P.e.clientY+20})):(y.value=!1,F.value={});break}},A=P=>{var J,ne,ie,ae,x,w,k,j,Z;try{n("loaded",P);const ee=Bs(),re=f.value,M=Pl.getSession(re.stationIdKey),C=Pl.getSession(re.userTokenKey);re.enableWebSocket&&M&&C&&((ie=(ne=(J=P.store)==null?void 0:J.data)==null?void 0:ne.networks)!=null&&ie.length?(w=(x=(ae=P.store)==null?void 0:ae.data)==null?void 0:x.networks)==null||w.forEach(K=>{var oe;K.protocol==="websocket"&&((oe=K.url)!=null&&oe.includes("station_id")||(K.url=`${K.url}?station_id=${M}`),re.enableToken?K.protocols=re.userToken||C:K.protocols=void 0)}):(j=(k=P.store)==null?void 0:k.data)!=null&&j.websocket?((Z=P.store.data.websocket)!=null&&Z.includes("station_id")||(P.store.data.websocket=`${P.store.data.websocket}?station_id=${M}`),re.enableToken?P.store.data.websocketProtocols=re.userToken||C:P.store.data.websocketProtocols=void 0,P.closeSocket(),P.connectSocket()):(P.store.data.websocket=`${re.socketUrl}?station_id=${M}`,re.enableToken?P.store.data.websocketProtocols=C:P.store.data.websocketProtocols=void 0,P.connectWebsocket())),(l.showMap||ee.showMap==="true")&&P.showMap(),P.setRule({rule:!1}),P.setOptions({disableRuleLine:!0}),P.setGrid({grid:!1}),P.lock(Me.LockState.DisableEdit),q().forEach(K=>{var oe;(oe=K==null?void 0:K.events)!=null&&oe.length?te({id:K.id,locked:1},!1):te({id:K.id,locked:10},!1)}),P.render(),re.enableAutoFit&&P.fitView(!0,re.fitPadding),Object.values(Ze).forEach(K=>{P.on(K,oe=>H(we(fe({},oe),{msgName:K})))}),P&&(P.socketFn=D),l.customCallbacks.onStageLoaded&&l.customCallbacks.onStageLoaded(P),l.isInitData&&z(P),window.addEventListener("mousemove",T)}catch(ee){m(ee,"图纸加载完成处理")}},S=_r.throttle(P=>Ne(this,null,function*(){var J;try{if(l.url){i.value=l.local,yield I(l.url);return}const ne=Bs();if(P=P||l.gid||ne.id,ne.local==="true"&&(i.value=!0),P){const ie=d();if(ie&&ie.getCommonApi){const ae=yield ie.getCommonApi(l.isFactory?"graph":"floorplan",{guid:P});if((J=ae.data)!=null&&J.length)yield I(ae.data[0].path);else{const x="未找到图纸!";m(new Error(x),"获取图纸数据")}}else m(new Error("API实例不可用"),"初始化图纸数据!")}else i.value=l.local,yield I(l.url);l.customCallbacks.onGraphLoaded&&l.customCallbacks.onGraphLoaded(s.value)}catch(ne){m(ne,"获取图纸数据失败")}})),I=P=>Ne(this,null,function*(){const J=P.split(".");if(P.includes(l.lang)||J.length!==3){s.value=P;return}const ne=`${J[0]}.${l.lang}.${J[2]}`;try{const ie=yield vr.getGraphApi(ne,{local:l.local}).catch(()=>{console.warn("多语言图纸不存在,使用默认图纸")});s.value=ie?ne:P}catch(ie){s.value=P}}),z=P=>Ne(this,null,function*(){var J,ne,ie,ae;if(P){let x=[],w=[],k=[];R={};const j=P.store.data.pens;for(let ee=0;ee<j.length;ee++){const re=j[ee];re.bindDataId?(J=re.form)!=null&&J.length?re.form.forEach(M=>{if(M.dataIds.dataId)switch(M.dataIds.dataType){case Oe.YC:x.push(we(fe({},M),{nodeName:M.dataIds.name,penId:re.id,penName:re.penName}));break;case Oe.YX:w.push(we(fe({},M),{nodeName:M.dataIds.name,penId:re.id,penName:re.penName}));break;case Oe.SG:w.push(we(fe({},M),{nodeName:M.dataIds.name,penId:re.id,penName:re.penName}));break;case Oe.POINT:k.push(we(fe({},M),{nodeName:M.dataIds.name,penId:re.id,penName:re.penName}));break}}):re.penType===Se.GIS_SENSOR&&re.bindData&&(R[re.bindData.ied_id]||(R[re.bindData.ied_id]=[]),te({id:re.id,title:void 0}),R[re.bindData.ied_id].push(fe({penId:re.id},re.bindData))):(ne=re.statusBindData)!=null&&ne.length&&re.statusBindData.forEach(M=>{if(M.dataId)switch(M.dataType){case Oe.YX:w.push({showChild:0,value:0,nodeName:M.dataName,penId:re.id,penName:re.penName,dataId:M.dataId});break;case Oe.SG:w.push({showChild:0,value:0,nodeName:M.dataName,penId:re.id,penName:re.penName,dataId:M.dataId});break}})}let Z=[];if(x.length){const ee=d();if(ee&&ee.postCommonApi){const re=yield ee.postCommonApi("queryrealtimepoint",{point_id:x.map(M=>{var C;return((C=M==null?void 0:M.dataIds)==null?void 0:C.dataId)||M.dataId}).join(",")});(ie=re==null?void 0:re.data)!=null&&ie.length&&(re.data.forEach(M=>{g[M.guid]=M.value_disp||M.value}),Z=[...Z,...re.data])}}if(w.length){const ee=d();if(ee&&ee.postCommonApi){const re=yield ee.postCommonApi("queryrealtimepoint",{point_id:w.map(M=>{var C;return((C=M==null?void 0:M.dataIds)==null?void 0:C.dataId)||M.dataId}).join(",")});(ae=re==null?void 0:re.data)!=null&&ae.length&&(re.data.forEach(M=>{g[M.guid]=Ji(M.value)?Number(M.value):M.value}),Z=[...Z,...re.data])}}Z.length&&Z.forEach(ee=>{const re=P.find(ee.guid);U(re,we(fe({},ee),{value:Ji(ee.value)?wn(Number(ee.value))?Number(ee.value):0:ee.value,value_disp:ee.value_disp,alarm_value:ee.alarm_value,point_id:ee.guid}))}),R&&Object.keys(R).length?(X&&clearInterval(X),V(),X=setInterval(()=>{V()},3e3)):X&&clearInterval(X)}}),V=()=>Ne(this,null,function*(){var P;if(R){const J=Object.keys(R);if(J.length){const ne=yield vr.postPDApi("querychannelstatus/",J.map(ie=>({ied_id:ie,ln_list:R[ie]})));(P=ne==null?void 0:ne.data)!=null&&P.length&&J.forEach(ie=>{const ae=ne.data.find(w=>w.ied_id===ie),x=R[ie];x!=null&&x.length&&x.forEach(w=>{const k=ae.result.find(j=>j.ln_id===w.ln_id);k&&te({id:w.penId,showChild:k.status==="告警"?2:k.status==="正常"?1:0,bindData:we(fe({},w),{status:k.status,value:Ji(k.amp_peak)?wn(Number(k.amp_peak))?Number(k.amp_peak):0:k.amp_peak})},!1)})})}}}),te=(P,J=!0)=>{if(p.value)return p.value.setValue(P,{render:J})},W=()=>p.value,q=()=>{var P,J;return((J=(P=c.value)==null?void 0:P.data)==null?void 0:J.pens)||[]},G=()=>Se,U=(()=>{let P=null;const J=new Map,ne=new Map,ie=x=>{var k;if(!((k=x.children)!=null&&k.length))return[];const w=x.id||"";if(!w)return[];if(!ne.has(w)&&c.value){const j=Me.getAllChildren(x,c.value);ne.set(w,j)}return ne.get(w)||[]},ae=()=>{if(J.size===0||!p.value||!c.value)return;const x=[],w=[],k=c.value.animates;J.forEach(({pen:j,dataItem:Z,formKey:ee})=>{switch(ee){case"showChild":te({id:j.id,showChild:+Z.value},!1);break;case"text":te({id:j.id,text:Z.value_disp||Z.value},!1);break;case"light_plate":{const re=Z.value===-1||Nl(Z)?"#999999":ac[Z.value!==void 0?Z.value:Z.alarm_value],M=Z.value===-1||Nl(Z)?"#cccccc":oc[Z.value!==void 0?Z.value:Z.alarm_value];te({id:j.id,textColor:re,background:M},!1)}break;case"point_value":j.penType===Se.POINT_VALUE&&ie(j).forEach(M=>{M.name==="text"&&te({id:M.id,text:Z.value},!1)});break;case"online_state":{let re=Z.value?void 0:"contrast(0%)";te({id:j.id,filter:re},!1),ie(j).forEach(C=>{te({id:C.id,filter:re},!1)})}break;case"charged_state":{const re=Z.value===P1.OFFLINE?"contrast(0%)":void 0;re!==j.filter&&(te({id:j.id,filter:re},!1),ie(j).forEach(C=>{te({id:C.id,filter:re},!1)}))}break;case"electric_direction":Z.value===N1.STOP?k!=null&&k.has(j)&&w.push(j):!!Z.value!==j.animateReverse&&(te({id:j.id,animateReverse:!!Z.value},!1),k!=null&&k.has(j)||x.push(j));break;case"electric_size":{const re=M1[Z.value];re!==void 0&&re!==j.lineWidth&&te({id:j.id,lineWidth:re},!1)}break;default:te({id:j.id,[ee]:Z.value},!1);break}}),w.length>0&&p.value.stopAnimate(w),x.length>0&&p.value.startAnimate(x),J.clear(),p.value.render()};return(x,w)=>{x!=null&&x.length&&(x.forEach(k=>{var Z;const j=k.form;if((Z=k.statusBindData)!=null&&Z.length){if(!g[w.guid])return;const ee=[...k.statusBindData],re=ee.findIndex(M=>M.dataId===w.guid);if(re!==-1){const M=ee[re];ee.find(B=>M.sort<B.sort&&g[B.dataId])||J.set(k.id,{pen:k,formKey:"showChild",dataItem:we(fe({},w),{value:re})})}}else j!=null&&j.length&&j.forEach(ee=>{if(!(Array.isArray(ee.dataIds)?ee.dataIds:[ee.dataIds]).some(B=>(B==null?void 0:B.dataId)&&((B==null?void 0:B.dataId)===w.dataId||(B==null?void 0:B.dataId)===w.point_id)))return;const C=`${k.id}-${ee.key}`;J.set(C,{pen:k,dataItem:w,formKey:ee.key})})}),P&&clearTimeout(P),P=setTimeout(()=>{ae(),P=null},f.value.debounceDelay))}})(),L=P=>{if(p.value){for(let J=0;J<P.length;J++){const ne=P[J];g[ne.dataId||ne.point_id]=ne.value_disp||ne.value;const ie=p.value.find(ne.dataId);setTimeout(()=>{U(ie,ne)},f.value.messageDelay)}p.value.render(),l.customCallbacks.onBatchUpdate&&l.customCallbacks.onBatchUpdate(P)}},Y=(P,J=!1)=>{if(!p.value)return;const ne=q();for(let ie=0;ie<ne.length;ie++){const ae=ne[ie];let x=!1;J?x=P===ae.dataProp:x=P===5?!0:ae.dataProp<=P,te({id:ae.id,visible:x},!1)}p.value.fitView(),p.value.render(),l.customCallbacks.onLevelChange&&l.customCallbacks.onLevelChange(P,J)};return O.watch(()=>[l.gid,l.url,l.data,l.lang,l.local,l.isFactory],()=>{S()}),O.watch(()=>l.showMap,P=>{p.value&&(P?p.value.showMap():p.value.hideMap())}),O.onMounted(()=>{const P=v();P&&P.on&&P.on(f.value.graphSocket,D),S()}),O.onUnmounted(()=>{R=null;const P=v();P&&P.off&&P.off(f.value.graphSocket,D),window.removeEventListener("mousemove",T)}),r({setValue:te,getStage:W,getAllPens:q,getCustomPenType:G,batchUpdatePen:L,handleLineCross:xu.handleLineCross,changeVisibleByLevel:Y}),(P,J)=>(O.openBlock(),O.createElementBlock("div",Zg,[O.createVNode(Xg,{ref_key:"graphRef",ref:h,url:s.value,local:i.value,data:l.data,"dev-config":l.devConfig,preview:"",onLoaded:A},null,8,["url","local","data","dev-config"]),O.unref(o)?(O.openBlock(),O.createElementBlock("div",Jg,[O.createVNode(O.unref(Kv),{type:"primary",onClick:b},{default:O.withCtx(()=>[...J[1]||(J[1]=[O.createTextVNode("返回",-1)])]),_:1})])):O.createCommentVNode("",!0),y.value?(O.openBlock(),O.createBlock(Og,{key:1,data:F.value,style:O.normalizeStyle({top:_.value.top+"px",left:_.value.left+"px",position:"fixed",pointerEvents:"none"}),onClose:J[0]||(J[0]=ne=>y.value=!1)},null,8,["data","style"])):O.createCommentVNode("",!0)]))}}),Qr=ci(ex,[["__scopeId","data-v-96554230"]]);Qr.name||(Qr.name="SyGraph");const tx=e=>{e.component(Qr.name||"SyGraph",Qr)},rx={install:tx};exports.SyGraph=Qr;exports.default=rx;